From c3df3a1f67f2bfb0e0536b09db6bcfc85fb7328a Mon Sep 17 00:00:00 2001 From: Lan Nguyen Si Date: Sat, 25 Jul 2026 14:47:31 +0700 Subject: [PATCH] chore(repo): gitignore root .ai/ orchestrator-workflow run state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Untracked run directories under .ai/runs/ (00-goal.md through 06-handoff.md per run) made the worktree dirty, which failed `harness preflight`'s clean-worktree check and deadlocked the investigation gate. Observed on the MacBook during the toolchain-parity rollout on 2026-07-23; the run files had to be parked on a local-only branch to get a clean tree. Run state is orchestration bookkeeping and does not belong in commits or PRs (operator rule, 2026-06-19). The pattern is root-anchored (`/.ai/`, not `.ai/`) on purpose. An unanchored pattern matches at every directory level and would also swallow packages/agent-memory-sync/.ai/ and packages/memory-digest-cli/.ai/, which hold 8 tracked per-package agent docs (AGENTS.md, ARCHITECTURE.md, DECISIONS.md, TASKS.md). Those files stay tracked either way, but an unanchored rule hides them from every gitignore-aware search tool and makes `git add -A` silently skip new files there — while both packages' docs/ways-of-working.md tell agents to read `.ai/AGENTS.md` first. Nothing under the repo-root .ai/ is tracked, so the ignore takes effect immediately. The harness split-ignore special case (tracking .ai/workflow/ and .ai/solution-acceptance.json while ignoring only .ai/runs/) does not apply: this repo has neither, and no reference to solution-acceptance. If it ever enables solution-acceptance, adopt that split instead. Verified: git check-ignore -v .ai/runs -> .gitignore:10:/.ai/ .ai/runs git check-ignore --no-index -v packages/agent-memory-sync/.ai/AGENTS.md -> not ignored (exit 1) rg --hidden --files -g '**/.ai/**' -> all 8 package docs still discoverable Refs: b2c6efec-629f-49b2-82b0-6685966bcece Co-Authored-By: Claude Opus 5 (1M context) --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index f4e2c6d..5a2e3ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ node_modules/ dist/ *.tsbuildinfo + +# orchestrator-workflow run state: local orchestration bookkeeping, never committed. +# Untracked run directories otherwise make the worktree dirty and fail the +# clean-worktree preflight check. +# Root-anchored on purpose: packages/*/.ai/ holds tracked per-package agent docs +# (AGENTS.md, ARCHITECTURE.md, DECISIONS.md, TASKS.md) that must not be caught. +/.ai/