|
|
|
|
@@ -27,6 +27,31 @@ Valid GSD subagent types (use exact names — do not fall back to 'general-purpo
|
|
|
|
|
- gsd-plan-checker — Reviews plan quality before execution
|
|
|
|
|
</available_agent_types>
|
|
|
|
|
|
|
|
|
|
<runtime_compatibility>
|
|
|
|
|
**Subagent spawning — top-level Claude Code:**
|
|
|
|
|
The Agent tool IS available in a top-level Claude Code session. Always spawn
|
|
|
|
|
gsd-phase-researcher, gsd-planner, and gsd-plan-checker as separate Agent() calls.
|
|
|
|
|
Never absorb these roles inline. Role separation is required regardless of `--chain`
|
|
|
|
|
or `--auto` — those options suppress interactive prompts only; they NEVER authorize
|
|
|
|
|
collapsing plan roles into the orchestrator context.
|
|
|
|
|
|
|
|
|
|
**Backgrounded Claude Code (via manager/autonomous):**
|
|
|
|
|
The calling workflow (manager.md / autonomous.md) already runs plan-phase inline via
|
|
|
|
|
Skill() on Claude Code so that the plan-checker subagent can still spawn. plan-phase
|
|
|
|
|
itself does not need to detect this case.
|
|
|
|
|
|
|
|
|
|
**#1009 caveat (discuss-phase early-exit):**
|
|
|
|
|
The "display the command and exit" instruction near `## 4` applies only to the
|
|
|
|
|
discuss-phase early-exit path. It does NOT authorize inline role performance for any
|
|
|
|
|
plan-phase agents.
|
|
|
|
|
|
|
|
|
|
**Other runtimes:**
|
|
|
|
|
If the Agent tool is genuinely absent (e.g. a backgrounded Claude Code agent per
|
|
|
|
|
#853, or a non-Claude runtime that does not expose Agent/agent), log the gap and
|
|
|
|
|
stop — do NOT perform researcher/planner/checker roles inline. Independent agent
|
|
|
|
|
contexts are required for the plan-checker gate to be meaningful.
|
|
|
|
|
</runtime_compatibility>
|
|
|
|
|
|
|
|
|
|
<process>
|
|
|
|
|
|
|
|
|
|
## 0. Git Branch Invariant
|
|
|
|
|
@@ -537,7 +562,7 @@ Agent(
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() 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.
|
|
|
|
|
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() 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
|
|
|
|
|
|
|
|
|
|
@@ -856,7 +881,7 @@ Agent(
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() 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.
|
|
|
|
|
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() 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.
|
|
|
|
|
@@ -1019,7 +1044,7 @@ Agent(
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() 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.
|
|
|
|
|
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() 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 Agent() call above — proceed to step 8.5 instead.
|
|
|
|
|
|
|
|
|
|
@@ -1075,7 +1100,7 @@ Agent(
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() 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.
|
|
|
|
|
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() 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.
|
|
|
|
|
@@ -1119,7 +1144,7 @@ For each plan entry extracted from `PLAN-OUTLINE.md`:
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() 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.
|
|
|
|
|
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() 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.
|
|
|
|
|
|
|
|
|
|
@@ -1277,7 +1302,7 @@ Agent(
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() 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.
|
|
|
|
|
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() 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
|
|
|
|
|
|
|
|
|
|
@@ -1392,7 +1417,7 @@ Agent(
|
|
|
|
|
)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() 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.
|
|
|
|
|
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() 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.
|
|
|
|
|
|
|
|
|
|
|