diff --git a/get-shit-done/workflows/audit-fix.md b/get-shit-done/workflows/audit-fix.md index 6a3e3cf67..7ee07670f 100644 --- a/get-shit-done/workflows/audit-fix.md +++ b/get-shit-done/workflows/audit-fix.md @@ -101,6 +101,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **b. Run tests:** ```bash AUDIT_TEST_CMD=$(gsd-sdk query config-get workflow.test_command --default "" 2>/dev/null || true) diff --git a/get-shit-done/workflows/audit-milestone.md b/get-shit-done/workflows/audit-milestone.md index 3dfc8f13e..7df375af7 100644 --- a/get-shit-done/workflows/audit-milestone.md +++ b/get-shit-done/workflows/audit-milestone.md @@ -86,6 +86,8 @@ ${AGENT_SKILLS_CHECKER}", ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ## 4. Collect Results Combine: diff --git a/get-shit-done/workflows/code-review-fix.md b/get-shit-done/workflows/code-review-fix.md index ed3e2c486..1cc5aa112 100644 --- a/get-shit-done/workflows/code-review-fix.md +++ b/get-shit-done/workflows/code-review-fix.md @@ -207,6 +207,8 @@ Read REVIEW.md findings, apply fixes, commit each atomically, write REVIEW-FIX.m ") ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **Agent failure handling:** If Task() fails: @@ -281,6 +283,7 @@ ${FILES_CONFIG} Re-review the phase at ${REVIEW_DEPTH} depth. Write findings to ${REVIEW_PATH}. Do NOT commit the output — the orchestrator handles that. ") + # ORCHESTRATOR RULE — CODEX RUNTIME: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result before proceeding. # Check new REVIEW.md status NEW_STATUS=$(REVIEW_PATH="${REVIEW_PATH}" node -e " @@ -319,6 +322,7 @@ iteration: ${ITERATION} Read REVIEW.md findings, apply fixes, commit each atomically, write REVIEW-FIX.md (overwrite previous). Do NOT commit REVIEW-FIX.md. ") + # ORCHESTRATOR RULE — CODEX RUNTIME: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result before proceeding. # Check if fixer succeeded if [ ! -f "${FIX_REPORT_PATH}" ]; then diff --git a/get-shit-done/workflows/code-review.md b/get-shit-done/workflows/code-review.md index 5c5b0ea54..767f4c23d 100644 --- a/get-shit-done/workflows/code-review.md +++ b/get-shit-done/workflows/code-review.md @@ -366,6 +366,8 @@ Do NOT commit the output — the orchestrator handles that. ") ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **Agent failure handling:** If the Task() call fails (agent error, timeout, or exception): diff --git a/get-shit-done/workflows/diagnose-issues.md b/get-shit-done/workflows/diagnose-issues.md index b5017ff06..808acbe51 100644 --- a/get-shit-done/workflows/diagnose-issues.md +++ b/get-shit-done/workflows/diagnose-issues.md @@ -104,6 +104,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above to spawn debug agent(s), stop working on this task immediately. Do not read more files, edit code, or run tests related to these gaps while the subagent(s) are active. Wait for all subagents to return before proceeding. This prevents duplicate work, conflicting edits, and wasted context. + **All agents spawn in single message** (parallel execution). Template placeholders: diff --git a/get-shit-done/workflows/discuss-phase-assumptions.md b/get-shit-done/workflows/discuss-phase-assumptions.md index 4b77924f8..1029bbbfb 100644 --- a/get-shit-done/workflows/discuss-phase-assumptions.md +++ b/get-shit-done/workflows/discuss-phase-assumptions.md @@ -294,6 +294,8 @@ ${AGENT_SKILLS_ANALYZER} """) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, analyze the codebase, or process assumptions while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Parse the subagent's response. Extract: - `assumptions[]` — each with area, statement, evidence, consequence, confidence - `needs_research[]` — topics requiring external research (may be empty) @@ -324,6 +326,8 @@ For each topic, return: Use Context7 (resolve-library-id then query-docs) for library-specific questions. Use WebSearch for ecosystem/best-practice questions. """) + +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not independently research any of these topics while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work and wasted context. Only resume when the subagent result is available. ``` Merge findings back into assumptions: diff --git a/get-shit-done/workflows/discuss-phase/modes/advisor.md b/get-shit-done/workflows/discuss-phase/modes/advisor.md index 0dd12393c..b9a9a28ed 100644 --- a/get-shit-done/workflows/discuss-phase/modes/advisor.md +++ b/get-shit-done/workflows/discuss-phase/modes/advisor.md @@ -109,6 +109,8 @@ research agents. All `Task()` calls spawn simultaneously — do NOT wait for one before starting the next. + > **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling all Task() calls above to spawn research agents, do NOT independently research or analyze any of the gray areas while the subagents are active. Wait for all subagents to return before synthesizing results. This prevents duplicate work and wasted context. + 3. After ALL agents return, **synthesize results** before presenting: For each agent's return: diff --git a/get-shit-done/workflows/docs-update.md b/get-shit-done/workflows/docs-update.md index 8dbb90515..954c34809 100644 --- a/get-shit-done/workflows/docs-update.md +++ b/get-shit-done/workflows/docs-update.md @@ -448,6 +448,8 @@ Write the doc file directly. Return confirmation only — do not return doc cont **CRITICAL:** Agent prompts must contain ONLY the `` block, the `${AGENT_SKILLS}` variable, and the return instruction. Do not include project planning context, workflow prose, or any internal tooling references in agent prompts. +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling all Wave 1 Task() calls above with `run_in_background=true`, do NOT generate any documentation independently while the subagents are active. Wait for all Wave 1 agents to complete before proceeding. This prevents duplicate work and wasted context. + Continue to collect_wave_1. @@ -665,6 +667,8 @@ Write the doc file directly. Return confirmation only — do not return doc cont **CRITICAL:** Agent prompts must contain ONLY the `` block, the `${AGENT_SKILLS}` variable, and the return instruction. Do not include project planning context, workflow prose, or any internal tooling references in agent prompts. +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling all Wave 2 Task() calls above with `run_in_background=true`, do NOT generate any documentation independently while the subagents are active. Wait for all Wave 2 agents to complete before proceeding. This prevents duplicate work and wasted context. + Continue to collect_wave_2. @@ -747,6 +751,8 @@ Write {package_dir}/README.md directly. Return confirmation only — do not retu ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling all per-package Task() calls above with `run_in_background=true`, do NOT generate any package READMEs independently while the subagents are active. Wait for all agents to complete via TaskOutput before proceeding. This prevents duplicate work and wasted context. + Collect confirmations via TaskOutput for all package agents. Note failures in the final report. **Fallback when Task tool is unavailable:** Generate per-package READMEs sequentially inline after the `sequential_generation` step. For each package directory with a `package.json`, construct the equivalent `doc_assignment` block and generate the README following gsd-doc-writer instructions. diff --git a/get-shit-done/workflows/execute-phase.md b/get-shit-done/workflows/execute-phase.md index 4575d2f18..c92a08141 100644 --- a/get-shit-done/workflows/execute-phase.md +++ b/get-shit-done/workflows/execute-phase.md @@ -560,6 +560,8 @@ increases monotonically across waves. `{status}` is `complete` (success), ) ``` + > **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above to spawn executor agent(s), stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **Sequential mode** (`USE_WORKTREES` is `false`): Omit `isolation="worktree"` from the Task call. Replace the `` block with: @@ -1370,6 +1372,8 @@ ${VERIFIER_SKILLS}", ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Read status: ```bash grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' ' diff --git a/get-shit-done/workflows/execute-phase/steps/codebase-drift-gate.md b/get-shit-done/workflows/execute-phase/steps/codebase-drift-gate.md index 3268edab0..ce13ec7f3 100644 --- a/get-shit-done/workflows/execute-phase/steps/codebase-drift-gate.md +++ b/get-shit-done/workflows/execute-phase/steps/codebase-drift-gate.md @@ -64,6 +64,8 @@ ${AGENT_SKILLS_MAPPER}" ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + If the spawn fails or the agent reports an error: log `Codebase drift auto-remap failed: {reason}` and continue to `verify_phase_goal`. The phase is NOT failed by a remap failure. diff --git a/get-shit-done/workflows/explore.md b/get-shit-done/workflows/explore.md index 444859f30..4138c3bf5 100644 --- a/get-shit-done/workflows/explore.md +++ b/get-shit-done/workflows/explore.md @@ -66,6 +66,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Share findings and continue the conversation. If the topic doesn't warrant research, skip this step entirely. **Don't force it.** diff --git a/get-shit-done/workflows/import.md b/get-shit-done/workflows/import.md index 5b5167d0f..5de222c3a 100644 --- a/get-shit-done/workflows/import.md +++ b/get-shit-done/workflows/import.md @@ -198,6 +198,8 @@ Task({ }) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + If the checker returns errors: - Display the errors to the user - Ask the user to resolve issues before the plan is considered imported diff --git a/get-shit-done/workflows/ingest-docs.md b/get-shit-done/workflows/ingest-docs.md index 3017eefb4..24a52b383 100644 --- a/get-shit-done/workflows/ingest-docs.md +++ b/get-shit-done/workflows/ingest-docs.md @@ -195,6 +195,8 @@ Task({ }) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read or synthesize any classified documents independently while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + The synthesizer writes: - `.planning/intel/decisions.md`, `.planning/intel/requirements.md`, `.planning/intel/constraints.md`, `.planning/intel/context.md` - `.planning/intel/SYNTHESIS.md` @@ -261,6 +263,8 @@ Task({ }) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more intel files, write planning artifacts, or create ROADMAP.md independently while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + diff --git a/get-shit-done/workflows/manager.md b/get-shit-done/workflows/manager.md index 6d9da93d8..ca1b891af 100644 --- a/get-shit-done/workflows/manager.md +++ b/get-shit-done/workflows/manager.md @@ -263,6 +263,8 @@ Important: You are running in the background. Do NOT use AskUserQuestion — mak ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above with `run_in_background=true`, do NOT do any planning work for this phase independently. Return to the dashboard immediately and wait for the background agent to report back. Only resume planning-related work when the subagent result is available. + Display: ``` @@ -295,6 +297,8 @@ Important: You are running in the background. Do NOT use AskUserQuestion — mak ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above with `run_in_background=true`, do NOT do any execution work for this phase independently. Return to the dashboard immediately and wait for the background agent to report back. Only resume execution-related work when the subagent result is available. + Display: ``` diff --git a/get-shit-done/workflows/map-codebase.md b/get-shit-done/workflows/map-codebase.md index b3934fa4e..40106db29 100644 --- a/get-shit-done/workflows/map-codebase.md +++ b/get-shit-done/workflows/map-codebase.md @@ -246,6 +246,8 @@ ${AGENT_SKILLS_MAPPER}" ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling all 4 Task() calls above with `run_in_background=true`, do NOT read any source files, analyze the codebase, or write any mapping documents independently while the subagents are active. Wait for all 4 agents to complete before proceeding to collect_confirmations. This prevents duplicate work and wasted context. + Continue to collect_confirmations. diff --git a/get-shit-done/workflows/new-milestone.md b/get-shit-done/workflows/new-milestone.md index ce64da775..15f54032c 100644 --- a/get-shit-done/workflows/new-milestone.md +++ b/get-shit-done/workflows/new-milestone.md @@ -336,6 +336,8 @@ Use template: ~/.claude/get-shit-done/templates/research-project/{FILE} | GATES | Versions current (verify with Context7), rationale explains WHY, integration considered | Categories clear, complexity noted, dependencies identified | Integration points identified, new vs modified explicit, build order considers deps | Pitfalls specific to adding these features, integration pitfalls covered, prevention actionable | | FILE | STACK.md | FEATURES.md | ARCHITECTURE.md | PITFALLS.md | +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling all 4 researcher Task() calls above, do NOT read research files or synthesize content independently while the subagents are active. Wait for all 4 researchers to complete before spawning the synthesizer. This prevents duplicate work and wasted context. + After all 4 complete, spawn synthesizer: ``` @@ -357,6 +359,8 @@ Commit after writing. ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research") ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Display key findings from SUMMARY.md: ``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -489,6 +493,8 @@ Write files first, then return. ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap") ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **Handle return:** **If `## ROADMAP BLOCKED`:** Present blocker, work with user, re-spawn. diff --git a/get-shit-done/workflows/new-project.md b/get-shit-done/workflows/new-project.md index 704fdb48f..fb4131ef6 100644 --- a/get-shit-done/workflows/new-project.md +++ b/get-shit-done/workflows/new-project.md @@ -916,6 +916,8 @@ Use template: ~/.claude/get-shit-done/templates/research-project/PITFALLS.md ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research") ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling all 4 researcher Task() calls above, do NOT read research files or synthesize content independently while the subagents are active. Wait for all 4 researchers to complete before spawning the synthesizer. This prevents duplicate work and wasted context. + After all 4 agents complete, spawn synthesizer to create SUMMARY.md: ``` @@ -941,6 +943,8 @@ Commit after writing. ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research") ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Display research complete banner and key findings: ``` @@ -1156,6 +1160,8 @@ Write files first, then return. This ensures artifacts persist even if context i ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap") ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **Handle roadmapper return:** **If `## ROADMAP BLOCKED`:** @@ -1242,6 +1248,8 @@ Use AskUserQuestion: ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Revise roadmap") ``` + > **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + - Present revised roadmap - Loop until user approves diff --git a/get-shit-done/workflows/plan-phase.md b/get-shit-done/workflows/plan-phase.md index a13ee13fb..06f8b6e23 100644 --- a/get-shit-done/workflows/plan-phase.md +++ b/get-shit-done/workflows/plan-phase.md @@ -391,6 +391,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ### Handle Researcher Return - **`## RESEARCH COMPLETE`:** Display confirmation, continue to step 6 @@ -685,6 +687,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **Handle return:** - **`## PATTERN MAPPING COMPLETE`:** Update `PATTERNS_PATH` to the created file path, continue to step 8. - **Any error or empty return:** Log warning, continue to step 8 without patterns (non-blocking). @@ -815,6 +819,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **If `CHUNKED_MODE` is `true`:** Skip the Task() call above — proceed to step 8.5 instead. ## 8.5. Chunked Planning Mode @@ -869,6 +875,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Handle return: - **`## OUTLINE COMPLETE`:** Read `PLAN-OUTLINE.md`, extract plan list. Continue to 8.5.2. - **Any other return or empty:** Display error. Offer: 1) Retry outline, 2) Stop. @@ -911,6 +919,8 @@ For each plan entry extracted from `PLAN-OUTLINE.md`: ) ``` + > **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + 4. **Verify disk:** Check `${PHASE_DIR}/{plan_id}-PLAN.md` exists. If missing: offer 1) Retry, 2) Stop. 5. **Commit per-plan:** @@ -1067,6 +1077,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ## 11. Handle Checker Return - **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13. @@ -1180,6 +1192,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + After planner returns -> spawn checker again (step 10), increment iteration_count. **If iteration_count >= 3:** diff --git a/get-shit-done/workflows/quick.md b/get-shit-done/workflows/quick.md index ab205c6a5..054b005ef 100644 --- a/get-shit-done/workflows/quick.md +++ b/get-shit-done/workflows/quick.md @@ -392,6 +392,8 @@ Return: ## RESEARCH COMPLETE with file path ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + After researcher returns: 1. Verify research exists at `${QUICK_DIR}/${quick_id}-RESEARCH.md` 2. Report: "Research complete: ${QUICK_DIR}/${quick_id}-RESEARCH.md" @@ -448,6 +450,8 @@ Return: ## PLANNING COMPLETE with plan path ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + After planner returns: 1. Verify plan exists at `${QUICK_DIR}/${quick_id}-PLAN.md` 2. Extract plan count (typically 1 for quick tasks) @@ -512,6 +516,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + **Handle checker return:** - **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 6. @@ -557,6 +563,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + After planner returns → spawn checker again, increment iteration_count. **If iteration_count >= 2:** @@ -634,6 +642,8 @@ ${AGENT_SKILLS_EXECUTOR} ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + After executor returns: 1. **Worktree cleanup:** If the executor ran with `isolation="worktree"`, merge the worktree branch back and clean up: ```bash @@ -775,6 +785,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + If review produces findings, display advisory message. **Error handling:** Failures are non-blocking — catch and proceed. --- @@ -811,6 +823,8 @@ Check must_haves against actual codebase. Create VERIFICATION.md at ${QUICK_DIR} ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Read verification status: ```bash grep "^status:" "${QUICK_DIR}/${quick_id}-VERIFICATION.md" | cut -d: -f2 | tr -d ' ' diff --git a/get-shit-done/workflows/research-phase.md b/get-shit-done/workflows/research-phase.md index 823a3d0af..055506929 100644 --- a/get-shit-done/workflows/research-phase.md +++ b/get-shit-done/workflows/research-phase.md @@ -73,6 +73,8 @@ Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ## Step 5: Handle Return - `## RESEARCH COMPLETE` — Display summary, offer: Plan/Dig deeper/Review/Done diff --git a/get-shit-done/workflows/scan.md b/get-shit-done/workflows/scan.md index 0d32765be..823a3605b 100644 --- a/get-shit-done/workflows/scan.md +++ b/get-shit-done/workflows/scan.md @@ -79,6 +79,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ## Step 5: Report ``` diff --git a/get-shit-done/workflows/secure-phase.md b/get-shit-done/workflows/secure-phase.md index 805f1856f..f2ec84c80 100644 --- a/get-shit-done/workflows/secure-phase.md +++ b/get-shit-done/workflows/secure-phase.md @@ -96,6 +96,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Handle return: - `## SECURED` → record closures → Step 6 - `## OPEN_THREATS` → record closed + open, present user with accept/block choice → Step 6 diff --git a/get-shit-done/workflows/ui-phase.md b/get-shit-done/workflows/ui-phase.md index e162e41f0..dfbf5c3c3 100644 --- a/get-shit-done/workflows/ui-phase.md +++ b/get-shit-done/workflows/ui-phase.md @@ -164,6 +164,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ## 6. Handle Researcher Return **If `## UI-SPEC COMPLETE`:** @@ -215,6 +217,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ## 8. Handle Checker Return **If `## UI-SPEC VERIFIED`:** diff --git a/get-shit-done/workflows/ui-review.md b/get-shit-done/workflows/ui-review.md index 9e705ca6a..bb3e529c3 100644 --- a/get-shit-done/workflows/ui-review.md +++ b/get-shit-done/workflows/ui-review.md @@ -107,6 +107,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + ## 4. Handle Return **If `## UI REVIEW COMPLETE`:** diff --git a/get-shit-done/workflows/validate-phase.md b/get-shit-done/workflows/validate-phase.md index 3b6d7e36f..ebd601e01 100644 --- a/get-shit-done/workflows/validate-phase.md +++ b/get-shit-done/workflows/validate-phase.md @@ -106,6 +106,8 @@ Task( ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + Handle return: - `## GAPS FILLED` → record tests + map updates, Step 6 - `## PARTIAL` → record resolved, move escalated to manual-only, Step 6 diff --git a/get-shit-done/workflows/verify-work.md b/get-shit-done/workflows/verify-work.md index 3fc285b54..76cf4b398 100644 --- a/get-shit-done/workflows/verify-work.md +++ b/get-shit-done/workflows/verify-work.md @@ -551,6 +551,8 @@ Plans must be executable prompts. ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + On return: - **PLANNING COMPLETE:** Proceed to `verify_gap_plans` - **PLANNING INCONCLUSIVE:** Report and offer manual intervention @@ -600,6 +602,8 @@ Return one of: ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + On return: - **VERIFICATION PASSED:** Proceed to `present_ready` - **ISSUES FOUND:** Proceed to `revision_loop` @@ -644,6 +648,8 @@ Do NOT replan from scratch unless issues are fundamental. ) ``` +> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Task() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. + After planner returns → spawn checker again (verify_gap_plans logic) Increment iteration_count