From db18f0f16cd1e2792cca9052a6a1f3e66b3d3c08 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 5 Apr 2026 02:06:15 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20add=20Plan=20dispatch=20tier=20?= =?UTF-8?q?=E2=80=94=20full=20review=20gauntlet=20for=20Claude=20Code=20pr?= =?UTF-8?q?oject=20planning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New gstack-plan template chains /office-hours → /autoplan (CEO + eng + design + DX + codex adversarial), saves the reviewed plan, and reports back to the orchestrator. The orchestrator persists the plan link to its own memory store. 5 tiers now: Simple, Medium, Heavy, Full, Plan. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/OPENCLAW.md | 20 ++++++++++++++++++++ openclaw/gstack-plan-CLAUDE.md | 20 ++++++++++++++++++++ scripts/gen-skill-docs.ts | 24 ++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 openclaw/gstack-plan-CLAUDE.md diff --git a/docs/OPENCLAW.md b/docs/OPENCLAW.md index 3c1152a7..e2260a14 100644 --- a/docs/OPENCLAW.md +++ b/docs/OPENCLAW.md @@ -38,6 +38,7 @@ OpenClaw decides at spawn time which tier of gstack support to use: | **Medium** | Multi-file features, refactors | gstack-lite CLAUDE.md appended | | **Heavy** | Specific gstack skill needed | "Load gstack. Run /X" | | **Full** | Complete features, objectives, projects | gstack-full pipeline appended | +| **Plan** | "Help me plan a Claude Code project" | gstack-plan pipeline appended | ### Decision heuristic @@ -45,6 +46,7 @@ OpenClaw decides at spawn time which tier of gstack support to use: - Does it touch multiple files but the approach is obvious? -> **Medium** - Does the user name a specific skill (/cso, /review, /qa)? -> **Heavy** - Is it a feature, project, or objective (not a task)? -> **Full** +- Does the user want to PLAN something for Claude Code without implementing yet? -> **Plan** ### Dispatch routing guide (for AGENTS.md) @@ -68,6 +70,13 @@ HEAVY: needs a specific gstack methodology FULL: build a complete feature, multi-day scope, needs planning + review -> sessions_spawn(runtime: "acp", prompt: "\n\n") Claude Code runs: /autoplan -> implement -> /ship -> report back + +PLAN: user wants to plan a Claude Code project, spec out a feature, or design + something before any code is written +-> sessions_spawn(runtime: "acp", prompt: "\n\n") + Claude Code runs: /office-hours -> /autoplan -> saves plan file -> reports back + The orchestrator persists the plan link to its memory/knowledge store. + When the user is ready to implement, spawn a new FULL session pointing at the plan. ``` ### CLAUDE.md collision handling @@ -98,6 +107,17 @@ A/B tested: 2x time, meaningfully better output. 4. Run /ship to create a PR 5. Report back with PR URL and decisions +### gstack-plan (Plan tier) +`openclaw/gstack-plan-CLAUDE.md` — full review gauntlet, no implementation: +1. Run /office-hours to produce a design doc +2. Run /autoplan (CEO + eng + design + DX reviews + codex adversarial) +3. Save the reviewed plan to `plans/-plan-.md` +4. Report back: plan path, summary, key decisions, recommended next step + +The orchestrator persists the plan link to its own memory store (brain repo, +knowledge base, or whatever is configured in AGENTS.md). When the user is +ready to build, spawn a FULL session that references the saved plan. + ### Native methodology skills Conversational skills for non-coding work, generated from gstack source templates: - `openclaw/office-hours.md` — Product interrogation (6 forcing questions) diff --git a/openclaw/gstack-plan-CLAUDE.md b/openclaw/gstack-plan-CLAUDE.md new file mode 100644 index 00000000..d1a32ef1 --- /dev/null +++ b/openclaw/gstack-plan-CLAUDE.md @@ -0,0 +1,20 @@ +# gstack-plan: Full Review Gauntlet + +Injected by the orchestrator when the user wants to plan a Claude Code project. +Append to existing CLAUDE.md. + +## Planning Pipeline +1. Read CLAUDE.md and understand the project context. +2. Run /office-hours to produce a design doc (problem statement, premises, alternatives). +3. Run /autoplan to review the design (CEO + eng + design + DX reviews + codex adversarial). +4. Save the final reviewed plan to a file the orchestrator can reference later. + Write it to: plans/-plan-.md in the current repo. + Include the design doc, all review decisions, and the implementation sequence. +5. Report back to the orchestrator: + - Plan file path + - One-paragraph summary of what was designed and the key decisions + - List of accepted scope expansions (if any) + - Recommended next step (usually: spawn a new session with gstack-full to implement) + +Do not implement anything. This is planning only. +The orchestrator will persist the plan link to its own memory/knowledge store. diff --git a/scripts/gen-skill-docs.ts b/scripts/gen-skill-docs.ts index b1f8d74c..4da9203f 100644 --- a/scripts/gen-skill-docs.ts +++ b/scripts/gen-skill-docs.ts @@ -580,6 +580,30 @@ Do not ask for human input until the PR is ready for review. `; fs.writeFileSync(path.join(openclawDir, 'gstack-full-CLAUDE.md'), gstackFull); console.log('GENERATED: openclaw/gstack-full-CLAUDE.md'); + + const gstackPlan = `# gstack-plan: Full Review Gauntlet + +Injected by the orchestrator when the user wants to plan a Claude Code project. +Append to existing CLAUDE.md. + +## Planning Pipeline +1. Read CLAUDE.md and understand the project context. +2. Run /office-hours to produce a design doc (problem statement, premises, alternatives). +3. Run /autoplan to review the design (CEO + eng + design + DX reviews + codex adversarial). +4. Save the final reviewed plan to a file the orchestrator can reference later. + Write it to: plans/-plan-.md in the current repo. + Include the design doc, all review decisions, and the implementation sequence. +5. Report back to the orchestrator: + - Plan file path + - One-paragraph summary of what was designed and the key decisions + - List of accepted scope expansions (if any) + - Recommended next step (usually: spawn a new session with gstack-full to implement) + +Do not implement anything. This is planning only. +The orchestrator will persist the plan link to its own memory/knowledge store. +`; + fs.writeFileSync(path.join(openclawDir, 'gstack-plan-CLAUDE.md'), gstackPlan); + console.log('GENERATED: openclaw/gstack-plan-CLAUDE.md'); } if (DRY_RUN && hasChanges) {