aboutsummaryrefslogtreecommitdiff
path: root/scripts/install-ai.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/install-ai.sh')
-rwxr-xr-xscripts/install-ai.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/install-ai.sh b/scripts/install-ai.sh
index 7007eed..8c04e22 100755
--- a/scripts/install-ai.sh
+++ b/scripts/install-ai.sh
@@ -141,6 +141,13 @@ today="$(date +%Y-%m-%d)"
sed "s|\[Project Name\]|$project_name|g; s|\[Date\]|$today|g" \
"$CANONICAL/notes.org" > "$project/.ai/notes.org"
+# Seed AGENTS.md — the runtime-neutral agent entry file (thin pointer at
+# protocols.org, rules, and /name resolution) for Codex-style harnesses.
+# Seed-only, like CLAUDE.md: project-owned after bootstrap, never overwritten.
+if [ ! -e "$project/AGENTS.md" ]; then
+ cp "$REPO/claude-templates/AGENTS.md" "$project/AGENTS.md"
+fi
+
# Tracking setup.
case "$track_mode" in
track)
@@ -172,6 +179,24 @@ case "$track_mode" in
;;
esac
+# Ignore temp/ in BOTH track and gitignore modes (not the "not-a-git-repo"
+# case). temp/ is the home for ephemeral, disposable, regenerable artifacts —
+# throwaway regardless of whether the project tracks its .ai/ tooling, so it
+# rides neither the track .gitkeep step nor the gitignore-only tooling block.
+# working/ is deliberately NOT ignored: it's the tracked home of in-progress
+# work, version-controlled from creation (see working-files.md). Idempotent:
+# accepts either the unanchored `temp/` or anchored `/temp/` form.
+if [ -n "$track_mode" ]; then
+ gi="$project/.gitignore"
+ if ! { [ -f "$gi" ] && { grep -qFx 'temp/' "$gi" || grep -qFx '/temp/' "$gi"; }; }; then
+ {
+ [ -s "$gi" ] && echo ""
+ echo "# Ephemeral working artifacts (throwaway; see working-files.md)"
+ echo "temp/"
+ } >> "$gi"
+ fi
+fi
+
# Banner.
echo
echo "Done."