loops: mandate machine-docs/ for ALL coordination files (kickoff/prompts/plan/AGENTS)

Recent phases wrote STATUS/BACKLOG/REVIEW/JOURNAL to the repo ROOT because
build_kickoff + plan.md's tree used bare filenames, even though the loops'
AGENTS.md + INBOX/DECISIONS/DEFERRED conventions already said machine-docs/.
Make machine-docs/ the single mandated home everywhere: build_kickoff now
emits machine-docs/ paths + an explicit FILE-LOCATION RULE; both loop prompts
and plan.md (tree + seed step) updated; orchestrator AGENTS.md documents +
enforces it. resolve_state/INBOX handoff already read machine-docs/ first.
This commit is contained in:
autonomic-bot
2026-06-11 20:56:24 +00:00
parent 23b5fc4753
commit e144354668
5 changed files with 32 additions and 9 deletions
+13 -6
View File
@@ -247,15 +247,22 @@ def build_kickoff(role, idx):
f"now; it defines this phase's mission and Definition of Done.\n"
f"The general loop protocol still applies and lives in /srv/cc-ci/cc-ci-plan/plan.md "
f"(§6.1 coordination, §7 pacing, §9 guardrails) — read those sections too.\n"
f"Track loop state in PHASE-NAMESPACED files in your repo clone: {status}, "
f"BACKLOG-{pid}.md, REVIEW-{pid}.md, JOURNAL-{pid}.md. DECISIONS.md is shared (append).\n"
f'"Done" for this phase = the Builder writes "## DONE" to {status} ONLY after every '
f"Definition-of-Done item is Adversary-verified with a fresh PASS in REVIEW-{pid}.md "
f"(handshake per §6.1).\n"
f"Track loop state in PHASE-NAMESPACED files UNDER machine-docs/ in your repo clone "
f"(create the dir if missing): machine-docs/{status}, machine-docs/BACKLOG-{pid}.md, "
f"machine-docs/REVIEW-{pid}.md, machine-docs/JOURNAL-{pid}.md. machine-docs/DECISIONS.md "
f"is shared (append).\n"
f"FILE-LOCATION RULE (mandatory): ALL coordination / loop-state files live in "
f"machine-docs/, NEVER the repo root — that includes STATUS/BACKLOG/REVIEW/JOURNAL "
f"(phase-namespaced), DECISIONS.md, DEFERRED.md, and the ADVERSARY-INBOX.md / "
f"BUILDER-INBOX.md side-channels. If you ever find one at the root, git mv it into "
f"machine-docs/.\n"
f'"Done" for this phase = the Builder writes "## DONE" to machine-docs/{status} ONLY after '
f"every Definition-of-Done item is Adversary-verified with a fresh PASS in "
f"machine-docs/REVIEW-{pid}.md (handshake per §6.1).\n"
f"The repo's Phase-1 STATUS.md / BACKLOG.md / REVIEW.md are HISTORY from the completed "
f"Phase 1 — do NOT use them as your state; use the phase-namespaced files above.\n"
f'Wherever the standing rules below say "plan.md"/"STATUS.md"/"BACKLOG.md"/"REVIEW.md", '
f"substitute the phase plan and these phase-namespaced files.\n\n"
f"substitute the phase plan and these machine-docs/ phase-namespaced files.\n\n"
f"=== standing role & rules ===\n"
)
role_prompt = (Path(PLAN_DIR) / "prompts" / f"{role}.md").read_text()