Skip to content

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

TypeScript

feat: OpenClaw integration v2 — prompt is the bridge (v0.15.9.0) (#816)

Garry Tane2d005c7f49c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2216f6391..7b03b8d17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,24 @@
# Changelog
+## [0.15.9.0] - 2026-04-05 — OpenClaw Integration v2
+
+You can now connect gstack to OpenClaw as a methodology source. OpenClaw spawns Claude Code sessions natively via ACP, and gstack provides the planning discipline and thinking frameworks that make those sessions better.
+
+### Added
+
+- **gstack-lite planning discipline.** A 15-line CLAUDE.md that turns every spawned Claude Code session into a disciplined builder: read first, plan, resolve ambiguity, self-review, report. A/B tested: 2x time, meaningfully better output.
+- **gstack-full pipeline template.** For complete feature builds, chains /autoplan, implement, and /ship into one autonomous flow. Your orchestrator drops a task, gets back a PR.
+- **4 native methodology skills for OpenClaw.** Office hours, CEO review, investigate, and retro, adapted for conversational work that doesn't need a coding environment.
+- **4-tier dispatch routing.** Simple (no gstack), Medium (gstack-lite), Heavy (specific skill), Full (complete pipeline). Documented in docs/OPENCLAW.md with routing guide for OpenClaw's AGENTS.md.
+- **Spawned session detection.** Set OPENCLAW_SESSION env var and gstack auto-skips interactive prompts, focusing on task completion. Works for any orchestrator, not just OpenClaw.
+- **includeSkills host config field.** Union logic with skipSkills (include minus skip). Lets hosts generate only the skills they need instead of everything-minus-a-list.
+- **docs/OPENCLAW.md.** Full architecture doc explaining how gstack integrates with OpenClaw, the prompt-as-bridge model, and what we're NOT building (no daemon, no protocol, no Clawvisor).
+
+### Changed
+
+- OpenClaw host config updated: generates only 4 native skills instead of all 31. Removed staticFiles.SOUL.md (referenced non-existent file).
+- Setup script now prints redirect message for `--host openclaw` instead of attempting full installation.
+
## [0.15.8.1] - 2026-04-05 — Community PR Triage + Error Polish
Closed 12 redundant community PRs, merged 2 ready PRs (#798, #776), and expanded the friendly OpenAI error to every design command. If your org isn't verified, you now get a clear message with the right URL instead of a raw JSON dump, no matter which design command you run.
diff --git a/SKILL.md b/SKILL.md
index 258a7e4a0..395ae1311 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -80,6 +80,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -206,6 +208,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
**Tone:** direct, concrete, sharp, never corporate, never academic. Sound like a builder, not a consultant. Name the file, the function, the command. No filler, no throat-clearing.
diff --git a/VERSION b/VERSION
index 06c9be905..e2d76d240 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.15.8.1
+0.15.9.0
diff --git a/autoplan/SKILL.md b/autoplan/SKILL.md
index bcfb62246..4b268832c 100644
--- a/autoplan/SKILL.md
+++ b/autoplan/SKILL.md
@@ -90,6 +90,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -216,6 +218,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/benchmark/SKILL.md b/benchmark/SKILL.md
index 156ae8cfd..a13c2e8bc 100644
--- a/benchmark/SKILL.md
+++ b/benchmark/SKILL.md
@@ -83,6 +83,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -209,6 +211,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
**Tone:** direct, concrete, sharp, never corporate, never academic. Sound like a builder, not a consultant. Name the file, the function, the command. No filler, no throat-clearing.
diff --git a/browse/SKILL.md b/browse/SKILL.md
index d224b3094..ed840e692 100644
--- a/browse/SKILL.md
+++ b/browse/SKILL.md
@@ -82,6 +82,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -208,6 +210,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
**Tone:** direct, concrete, sharp, never corporate, never academic. Sound like a builder, not a consultant. Name the file, the function, the command. No filler, no throat-clearing.
diff --git a/canary/SKILL.md b/canary/SKILL.md
index e7153e939..32cacd514 100644
--- a/canary/SKILL.md
+++ b/canary/SKILL.md
@@ -82,6 +82,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -208,6 +210,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/checkpoint/SKILL.md b/checkpoint/SKILL.md
index 2967f14c4..82ecb5e06 100644
--- a/checkpoint/SKILL.md
+++ b/checkpoint/SKILL.md
@@ -85,6 +85,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -211,6 +213,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/codex/SKILL.md b/codex/SKILL.md
index 5706dd8c3..bafdf7df6 100644
--- a/codex/SKILL.md
+++ b/codex/SKILL.md
@@ -84,6 +84,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -210,6 +212,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/cso/SKILL.md b/cso/SKILL.md
index 20efe14b9..58a65c8b8 100644
--- a/cso/SKILL.md
+++ b/cso/SKILL.md
@@ -87,6 +87,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -213,6 +215,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/design-consultation/SKILL.md b/design-consultation/SKILL.md
index 92067d745..a8b512b5d 100644
--- a/design-consultation/SKILL.md
+++ b/design-consultation/SKILL.md
@@ -87,6 +87,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -213,6 +215,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/design-html/SKILL.md b/design-html/SKILL.md
index c50b37ed1..cc5aebcd0 100644
--- a/design-html/SKILL.md
+++ b/design-html/SKILL.md
@@ -89,6 +89,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -215,6 +217,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/design-review/SKILL.md b/design-review/SKILL.md
index 9b78080e8..684177b16 100644
--- a/design-review/SKILL.md
+++ b/design-review/SKILL.md
@@ -87,6 +87,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -213,6 +215,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/design-shotgun/SKILL.md b/design-shotgun/SKILL.md
index 7de41cf30..032231461 100644
--- a/design-shotgun/SKILL.md
+++ b/design-shotgun/SKILL.md
@@ -84,6 +84,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -210,6 +212,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/devex-review/SKILL.md b/devex-review/SKILL.md
index 18ba792fa..70cc3fdfb 100644
--- a/devex-review/SKILL.md
+++ b/devex-review/SKILL.md
@@ -87,6 +87,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -213,6 +215,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/docs/OPENCLAW.md b/docs/OPENCLAW.md
new file mode 100644
index 000000000..e2260a149
--- /dev/null
+++ b/docs/OPENCLAW.md
@@ -0,0 +1,161 @@
+# gstack x OpenClaw Integration
+
+gstack integrates with OpenClaw as a methodology source, not a ported codebase.
+OpenClaw's ACP runtime spawns Claude Code sessions natively. gstack provides the
+planning discipline and methodology that makes those sessions better.
+
+This is a lightweight protocol encoded as prompt text. No daemon. No JSON-RPC.
+No compatibility matrices. The prompt is the bridge.
+
+## Architecture
+
+```
+ OpenClaw gstack repo
+ ───────────────────── ──────────────
+ Orchestrator: messaging, Source of truth for
+ calendar, memory, EA methodology + planning
+ │ │
+ ├── Native skills (conversational) ├── Generates native skills
+ │ office-hours, ceo-review, │ via gen-skill-docs pipeline
+ │ investigate, retro │
+ │ ├── Generates gstack-lite
+ ├── sessions_spawn(runtime: "acp") │ (planning discipline)
+ │ │ │
+ │ └── Claude Code ├── Generates gstack-full
+ │ └── gstack installed at │ (complete pipeline)
+ │ ~/.claude/skills/gstack │
+ │ └── docs/OPENCLAW.md (this file)
+ └── Dispatch routing (AGENTS.md)
+```
+
+## Dispatch Routing
+
+OpenClaw decides at spawn time which tier of gstack support to use:
+
+| Tier | When | Prompt prefix |
+|------|------|---------------|
+| **Simple** | One-file edits, typos, config changes | No gstack context injected |
+| **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
+
+- Can it be done in <10 lines of code? -> **Simple**
+- 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)
+
+Add this to OpenClaw's AGENTS.md:
+
+```markdown
+## Coding Task Dispatch
+
+When asked for coding work, pick the dispatch tier:
+
+SIMPLE: "fix this typo," "update that config," single-file changes
+-> sessions_spawn(runtime: "acp", prompt: "<just the task>")
+
+MEDIUM: multi-file features, refactors, skill edits
+-> sessions_spawn(runtime: "acp", prompt: "<gstack-lite content>\n\n<task>")
+
+HEAVY: needs a specific gstack methodology
+-> sessions_spawn(runtime: "acp", prompt: "Load gstack. Run /qa https://...")
+ Skills: /cso, /review, /qa, /ship, /investigate, /design-review, /benchmark
+
+FULL: build a complete feature, multi-day scope, needs planning + review
+-> sessions_spawn(runtime: "acp", prompt: "<gstack-full content>\n\n<task>")
+ 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: "<gstack-plan content>\n\n<task>")
+ 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
+
+When spawning Claude Code in a repo that already has a CLAUDE.md, APPEND
+gstack-lite/full as a new section. Do not replace the repo's existing instructions.
+
+## What gstack generates for OpenClaw
+
+All artifacts live in the `openclaw/` directory and are generated by
+`bun run gen:skill-docs --host openclaw`:
+
+### gstack-lite (Medium tier)
+`openclaw/gstack-lite-CLAUDE.md` — ~15 lines of planning discipline:
+1. Read every file before modifying
+2. Write a 5-line plan: what, why, which files, test case, risk
+3. Resolve ambiguity using decision principles
+4. Self-review before reporting done
+5. Completion report: what shipped, decisions made, anything uncertain
+
+A/B tested: 2x time, meaningfully better output.
+
+### gstack-full (Full tier)
+`openclaw/gstack-full-CLAUDE.md` — chains existing gstack skills:
+1. Read CLAUDE.md and understand the project
+2. Run /autoplan (CEO + eng + design review)
+3. Implement the approved plan
+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/<project-slug>-plan-<date>.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)
+- `openclaw/ceo-review.md` — Strategic challenge (10-section review, 4 modes)
+- `openclaw/investigate.md` — Operational debugging (4-phase methodology)
+- `openclaw/retro.md` — Operational retrospective (weekly review)
+
+These are lean adaptations. They contain the methodology, not the full gstack
+skill infrastructure (no browse, no telemetry, no preamble).
+
+## Spawned session detection
+
+When Claude Code runs inside a session spawned by OpenClaw, the `OPENCLAW_SESSION`
+environment variable should be set. gstack detects this and adjusts:
+- Skips interactive prompts (auto-chooses recommended options)
+- Skips upgrade checks and telemetry prompts
+- Focuses on task completion and prose reporting
+
+Set the env var in sessions_spawn: `env: { OPENCLAW_SESSION: "1" }`
+
+## Installation
+
+For OpenClaw users: tell your OpenClaw agent "install gstack for openclaw."
+
+The agent should:
+1. Install gstack-lite CLAUDE.md into its coding session templates
+2. Install the 4 native methodology skills
+3. Add dispatch routing to AGENTS.md
+4. Verify with a test spawn
+
+For gstack developers: `./setup --host openclaw` outputs this documentation.
+The actual artifacts are generated by `bun run gen:skill-docs --host openclaw`.
+
+## What we don't do
+
+- No dispatch daemon (ACP handles session spawning)
+- No Clawvisor relay (no security layer needed)
+- No bidirectional learnings bridge (brain repo is the knowledge store)
+- No JSON schemas or protocol versioning
+- No SOUL.md from gstack (OpenClaw has its own)
+- No full skill porting (coding skills stay native to Claude Code)
diff --git a/document-release/SKILL.md b/document-release/SKILL.md
index a4f2617ec..f4dde2bf5 100644
--- a/document-release/SKILL.md
+++ b/document-release/SKILL.md
@@ -84,6 +84,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -210,6 +212,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/health/SKILL.md b/health/SKILL.md
index ee42db1f0..801b2ef40 100644
--- a/health/SKILL.md
+++ b/health/SKILL.md
@@ -84,6 +84,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -210,6 +212,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/hosts/openclaw.ts b/hosts/openclaw.ts
index 81f511ff1..86c993079 100644
--- a/hosts/openclaw.ts
+++ b/hosts/openclaw.ts
@@ -23,6 +23,7 @@ const openclaw: HostConfig = {
generation: {
generateMetadata: false,
skipSkills: ['codex'],
+ includeSkills: ['office-hours', 'plan-ceo-review', 'investigate', 'retro'],
},
pathRewrites: [
@@ -69,10 +70,6 @@ const openclaw: HostConfig = {
coAuthorTrailer: 'Co-Authored-By: OpenClaw Agent <[email protected]>',
learningsMode: 'basic',
- // SOUL.md ships as a static file alongside generated skills
- staticFiles: {
- 'SOUL.md': 'openclaw/SOUL.md',
- },
adapter: './scripts/host-adapters/openclaw-adapter',
};
diff --git a/investigate/SKILL.md b/investigate/SKILL.md
index f69914a18..ab5b22317 100644
--- a/investigate/SKILL.md
+++ b/investigate/SKILL.md
@@ -99,6 +99,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -225,6 +227,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/land-and-deploy/SKILL.md b/land-and-deploy/SKILL.md
index b1e75902b..af2394561 100644
--- a/land-and-deploy/SKILL.md
+++ b/land-and-deploy/SKILL.md
@@ -81,6 +81,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -207,6 +209,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/learn/SKILL.md b/learn/SKILL.md
index 9afca4c41..28375e5ab 100644
--- a/learn/SKILL.md
+++ b/learn/SKILL.md
@@ -84,6 +84,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -210,6 +212,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/office-hours/SKILL.md b/office-hours/SKILL.md
index c3cceba3e..289ae6467 100644
--- a/office-hours/SKILL.md
+++ b/office-hours/SKILL.md
@@ -91,6 +91,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -217,6 +219,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/open-gstack-browser/SKILL.md b/open-gstack-browser/SKILL.md
index 31757899e..fad2736ba 100644
--- a/open-gstack-browser/SKILL.md
+++ b/open-gstack-browser/SKILL.md
@@ -81,6 +81,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -207,6 +209,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/openclaw/gstack-full-CLAUDE.md b/openclaw/gstack-full-CLAUDE.md
new file mode 100644
index 000000000..0cca47a44
--- /dev/null
+++ b/openclaw/gstack-full-CLAUDE.md
@@ -0,0 +1,12 @@
+# gstack-full Pipeline
+
+Injected by the orchestrator for complete feature builds. Append to existing CLAUDE.md.
+
+## Full Pipeline
+1. Read CLAUDE.md and understand the project context.
+2. Run /autoplan to review your approach (CEO + eng + design review pipeline).
+3. Implement the approved plan. Follow the planning discipline above.
+4. Run /ship to create a PR with tests, changelog, and version bump.
+5. Report back: PR URL, what shipped, decisions made, anything uncertain.
+
+Do not ask for human input until the PR is ready for review.
diff --git a/openclaw/gstack-lite-CLAUDE.md b/openclaw/gstack-lite-CLAUDE.md
new file mode 100644
index 000000000..a6e0d1d3b
--- /dev/null
+++ b/openclaw/gstack-lite-CLAUDE.md
@@ -0,0 +1,12 @@
+# gstack-lite Planning Discipline
+
+Injected by the orchestrator into spawned Claude Code sessions. Append to existing CLAUDE.md.
+
+## Planning Discipline
+1. Read every file you will modify. Understand existing patterns first.
+2. Before writing code, state your plan: what, why, which files, test case, risk.
+3. When ambiguous, prefer: completeness over shortcuts, existing patterns over new ones,
+ reversible choices over irreversible ones, safe defaults over clever ones.
+4. Self-review your changes before reporting done. Check for: missed files, broken
+ imports, untested paths, style inconsistencies.
+5. Report when done: what shipped, what decisions you made, anything uncertain.
diff --git a/openclaw/gstack-plan-CLAUDE.md b/openclaw/gstack-plan-CLAUDE.md
new file mode 100644
index 000000000..d1a32ef18
--- /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/<project-slug>-plan-<date>.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/plan-ceo-review/SKILL.md b/plan-ceo-review/SKILL.md
index 3cafdb6f9..716ee652c 100644
--- a/plan-ceo-review/SKILL.md
+++ b/plan-ceo-review/SKILL.md
@@ -87,6 +87,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -213,6 +215,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/plan-design-review/SKILL.md b/plan-design-review/SKILL.md
index 7d24477b8..0779ee2cb 100644
--- a/plan-design-review/SKILL.md
+++ b/plan-design-review/SKILL.md
@@ -85,6 +85,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -211,6 +213,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/plan-devex-review/SKILL.md b/plan-devex-review/SKILL.md
index 6c2547ca4..4df9a5216 100644
--- a/plan-devex-review/SKILL.md
+++ b/plan-devex-review/SKILL.md
@@ -89,6 +89,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -215,6 +217,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/plan-eng-review/SKILL.md b/plan-eng-review/SKILL.md
index 32f3d9799..1634f28fa 100644
--- a/plan-eng-review/SKILL.md
+++ b/plan-eng-review/SKILL.md
@@ -87,6 +87,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -213,6 +215,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/qa-only/SKILL.md b/qa-only/SKILL.md
index e49088c71..a34932b5d 100644
--- a/qa-only/SKILL.md
+++ b/qa-only/SKILL.md
@@ -83,6 +83,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -209,6 +211,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/qa/SKILL.md b/qa/SKILL.md
index 06e23e6f5..fcffb10fd 100644
--- a/qa/SKILL.md
+++ b/qa/SKILL.md
@@ -89,6 +89,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -215,6 +217,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/retro/SKILL.md b/retro/SKILL.md
index 6b059aee9..cbbabdc52 100644
--- a/retro/SKILL.md
+++ b/retro/SKILL.md
@@ -82,6 +82,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -208,6 +210,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/review/SKILL.md b/review/SKILL.md
index 8c88d0e2f..43b6c200e 100644
--- a/review/SKILL.md
+++ b/review/SKILL.md
@@ -85,6 +85,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -211,6 +213,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/scripts/gen-skill-docs.ts b/scripts/gen-skill-docs.ts
index 3ecd9d56e..4da9203ff 100644
--- a/scripts/gen-skill-docs.ts
+++ b/scripts/gen-skill-docs.ts
@@ -507,11 +507,16 @@ for (const currentHost of hostsToRun) {
let hasChanges = false;
const tokenBudget: Array<{ skill: string; lines: number; tokens: number }> = [];
+ const currentHostConfig = getHostConfig(currentHost);
for (const tmplPath of findTemplates()) {
- // Skip skills listed in host config's generation.skipSkills
- const currentHostConfig = getHostConfig(currentHost);
+ const dir = path.basename(path.dirname(tmplPath));
+
+ // includeSkills allowlist (union logic: include minus skip)
+ if (currentHostConfig.generation.includeSkills?.length) {
+ if (!currentHostConfig.generation.includeSkills.includes(dir)) continue;
+ }
+ // skipSkills denylist (subtracts from includeSkills or full set)
if (currentHostConfig.generation.skipSkills?.length) {
- const dir = path.basename(path.dirname(tmplPath));
if (currentHostConfig.generation.skipSkills.includes(dir)) continue;
}
@@ -539,6 +544,68 @@ for (const currentHost of hostsToRun) {
tokenBudget.push({ skill: relOutput, lines, tokens });
}
+ // Generate gstack-lite and gstack-full for OpenClaw host
+ if (currentHost === 'openclaw' && !DRY_RUN) {
+ const openclawDir = path.join(ROOT, 'openclaw');
+ if (!fs.existsSync(openclawDir)) fs.mkdirSync(openclawDir, { recursive: true });
+
+ const gstackLite = `# gstack-lite Planning Discipline
+
+Injected by the orchestrator into spawned Claude Code sessions. Append to existing CLAUDE.md.
+
+## Planning Discipline
+1. Read every file you will modify. Understand existing patterns first.
+2. Before writing code, state your plan: what, why, which files, test case, risk.
+3. When ambiguous, prefer: completeness over shortcuts, existing patterns over new ones,
+ reversible choices over irreversible ones, safe defaults over clever ones.
+4. Self-review your changes before reporting done. Check for: missed files, broken
+ imports, untested paths, style inconsistencies.
+5. Report when done: what shipped, what decisions you made, anything uncertain.
+`;
+ fs.writeFileSync(path.join(openclawDir, 'gstack-lite-CLAUDE.md'), gstackLite);
+ console.log('GENERATED: openclaw/gstack-lite-CLAUDE.md');
+
+ const gstackFull = `# gstack-full Pipeline
+
+Injected by the orchestrator for complete feature builds. Append to existing CLAUDE.md.
+
+## Full Pipeline
+1. Read CLAUDE.md and understand the project context.
+2. Run /autoplan to review your approach (CEO + eng + design review pipeline).
+3. Implement the approved plan. Follow the planning discipline above.
+4. Run /ship to create a PR with tests, changelog, and version bump.
+5. Report back: PR URL, what shipped, decisions made, anything uncertain.
+
+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/<project-slug>-plan-<date>.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) {
console.error(`\nGenerated SKILL.md files are stale (${currentHost} host). Run: bun run gen:skill-docs --host ${currentHost}`);
if (HOST_ARG_VAL !== 'all') process.exit(1);
diff --git a/scripts/host-config.ts b/scripts/host-config.ts
index 240fb0d4a..4421c4a79 100644
--- a/scripts/host-config.ts
+++ b/scripts/host-config.ts
@@ -62,6 +62,8 @@ export interface HostConfig {
metadataFormat?: string | null;
/** Skill directories to exclude from generation for this host. */
skipSkills?: string[];
+ /** Skill directories to include (allowlist). Union logic: include minus skip. */
+ includeSkills?: string[];
};
// --- Content Rewrites ---
diff --git a/scripts/resolvers/preamble.ts b/scripts/resolvers/preamble.ts
index 56989befa..732a51a42 100644
--- a/scripts/resolvers/preamble.ts
+++ b/scripts/resolvers/preamble.ts
@@ -89,6 +89,8 @@ fi
_ROUTING_DECLINED=$(${ctx.paths.binDir}/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
\`\`\``;
}
@@ -226,6 +228,15 @@ Say "No problem. You can add routing rules later by running \`gstack-config set
This only happens once per project. If \`HAS_ROUTING\` is \`yes\` or \`ROUTING_DECLINED\` is \`true\`, skip this entirely.`;
}
+function generateSpawnedSessionCheck(): string {
+ return `If \`SPAWNED_SESSION\` is \`"true"\`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.`;
+}
+
function generateAskUserFormat(_ctx: TemplateContext): string {
return `## AskUserQuestion Format
@@ -675,6 +686,7 @@ export function generatePreamble(ctx: TemplateContext): string {
generateTelemetryPrompt(ctx),
generateProactivePrompt(ctx),
generateRoutingInjection(ctx),
+ generateSpawnedSessionCheck(),
generateVoiceDirective(tier),
...(tier >= 2 ? [generateContextRecovery(ctx), generateAskUserFormat(ctx), generateCompletenessSection()] : []),
...(tier >= 3 ? [generateRepoModeSection(), generateSearchBeforeBuildingSection(ctx)] : []),
diff --git a/setup b/setup
index 19adc73d5..fd2981406 100755
--- a/setup
+++ b/setup
@@ -46,7 +46,19 @@ done
case "$HOST" in
claude|codex|kiro|factory|auto) ;;
- *) echo "Unknown --host value: $HOST (expected claude, codex, kiro, factory, or auto)" >&2; exit 1 ;;
+ openclaw)
+ echo ""
+ echo "OpenClaw integration uses a different model — OpenClaw spawns Claude Code"
+ echo "sessions natively via ACP. gstack provides methodology artifacts, not a"
+ echo "full skill installation."
+ echo ""
+ echo "To integrate gstack with OpenClaw:"
+ echo " 1. Tell your OpenClaw agent: 'install gstack for openclaw'"
+ echo " 2. Or generate artifacts: bun run gen:skill-docs --host openclaw"
+ echo " 3. See docs/OPENCLAW.md for the full architecture"
+ echo ""
+ exit 0 ;;
+ *) echo "Unknown --host value: $HOST (expected claude, codex, kiro, factory, openclaw, or auto)" >&2; exit 1 ;;
esac
# ─── Resolve skill prefix preference ─────────────────────────
diff --git a/setup-browser-cookies/SKILL.md b/setup-browser-cookies/SKILL.md
index 549c4d258..717d64056 100644
--- a/setup-browser-cookies/SKILL.md
+++ b/setup-browser-cookies/SKILL.md
@@ -79,6 +79,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -205,6 +207,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
**Tone:** direct, concrete, sharp, never corporate, never academic. Sound like a builder, not a consultant. Name the file, the function, the command. No filler, no throat-clearing.
diff --git a/setup-deploy/SKILL.md b/setup-deploy/SKILL.md
index 0dfd1df45..6791b956f 100644
--- a/setup-deploy/SKILL.md
+++ b/setup-deploy/SKILL.md
@@ -85,6 +85,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -211,6 +213,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/ship/SKILL.md b/ship/SKILL.md
index 25afbb032..34cfaa7b2 100644
--- a/ship/SKILL.md
+++ b/ship/SKILL.md
@@ -86,6 +86,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -212,6 +214,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
diff --git a/test/fixtures/golden/claude-ship-SKILL.md b/test/fixtures/golden/claude-ship-SKILL.md
index 4886ea03b..34cfaa7b2 100644
--- a/test/fixtures/golden/claude-ship-SKILL.md
+++ b/test/fixtures/golden/claude-ship-SKILL.md
@@ -86,6 +86,8 @@ fi
_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -212,6 +214,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
@@ -443,6 +452,31 @@ artifacts that inform the plan, not code changes:
These are read-only in spirit — they inspect the live site, generate visual artifacts,
or get independent opinions. They do NOT modify project source files.
+## Skill Invocation During Plan Mode
+
+If a user invokes a skill during plan mode, that invoked skill workflow takes
+precedence over generic plan mode behavior until it finishes or the user explicitly
+cancels that skill.
+
+Treat the loaded skill as executable instructions, not reference material. Follow
+it step by step. Do not summarize, skip, reorder, or shortcut its steps.
+
+If the skill says to use AskUserQuestion, do that. Those AskUserQuestion calls
+satisfy plan mode's requirement to end turns with AskUserQuestion.
+
+If the skill reaches a STOP point, stop immediately at that point, ask the required
+question if any, and wait for the user's response. Do not continue the workflow
+past a STOP point, and do not call ExitPlanMode at that point.
+
+If the skill includes commands marked "PLAN MODE EXCEPTION — ALWAYS RUN," execute
+them. The skill may edit the plan file, and other writes are allowed only if they
+are already permitted by Plan Mode Safe Operations or explicitly marked as a plan
+mode exception.
+
+Only call ExitPlanMode after the active skill workflow is complete and there are no
+other invoked skill workflows left to run, or if the user explicitly tells you to
+cancel the skill or leave plan mode.
+
## Plan Status Footer
When you are in plan mode and about to call ExitPlanMode:
diff --git a/test/fixtures/golden/codex-ship-SKILL.md b/test/fixtures/golden/codex-ship-SKILL.md
index 6331b650b..ec0116f06 100644
--- a/test/fixtures/golden/codex-ship-SKILL.md
+++ b/test/fixtures/golden/codex-ship-SKILL.md
@@ -80,6 +80,8 @@ fi
_ROUTING_DECLINED=$($GSTACK_BIN/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -206,6 +208,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
@@ -437,6 +446,31 @@ artifacts that inform the plan, not code changes:
These are read-only in spirit — they inspect the live site, generate visual artifacts,
or get independent opinions. They do NOT modify project source files.
+## Skill Invocation During Plan Mode
+
+If a user invokes a skill during plan mode, that invoked skill workflow takes
+precedence over generic plan mode behavior until it finishes or the user explicitly
+cancels that skill.
+
+Treat the loaded skill as executable instructions, not reference material. Follow
+it step by step. Do not summarize, skip, reorder, or shortcut its steps.
+
+If the skill says to use AskUserQuestion, do that. Those AskUserQuestion calls
+satisfy plan mode's requirement to end turns with AskUserQuestion.
+
+If the skill reaches a STOP point, stop immediately at that point, ask the required
+question if any, and wait for the user's response. Do not continue the workflow
+past a STOP point, and do not call ExitPlanMode at that point.
+
+If the skill includes commands marked "PLAN MODE EXCEPTION — ALWAYS RUN," execute
+them. The skill may edit the plan file, and other writes are allowed only if they
+are already permitted by Plan Mode Safe Operations or explicitly marked as a plan
+mode exception.
+
+Only call ExitPlanMode after the active skill workflow is complete and there are no
+other invoked skill workflows left to run, or if the user explicitly tells you to
+cancel the skill or leave plan mode.
+
## Plan Status Footer
When you are in plan mode and about to call ExitPlanMode:
diff --git a/test/fixtures/golden/factory-ship-SKILL.md b/test/fixtures/golden/factory-ship-SKILL.md
index 04dcfd5c3..95f051118 100644
--- a/test/fixtures/golden/factory-ship-SKILL.md
+++ b/test/fixtures/golden/factory-ship-SKILL.md
@@ -82,6 +82,8 @@ fi
_ROUTING_DECLINED=$($GSTACK_BIN/gstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
+# Detect spawned session (OpenClaw or other orchestrator)
+[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true
```
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
@@ -208,6 +210,13 @@ Say "No problem. You can add routing rules later by running `gstack-config set r
This only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.
+If `SPAWNED_SESSION` is `"true"`, you are running inside a session spawned by an
+AI orchestrator (e.g., OpenClaw). In spawned sessions:
+- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
+- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.
+- Focus on completing the task and reporting results via prose output.
+- End with a completion report: what shipped, decisions made, anything uncertain.
+
## Voice
You are GStack, an open source AI builder framework shaped by Garry Tan's product, startup, and engineering judgment. Encode how he thinks, not his biography.
@@ -439,6 +448,31 @@ artifacts that inform the plan, not code changes:
These are read-only in spirit — they inspect the live site, generate visual artifacts,
or get independent opinions. They do NOT modify project source files.
+## Skill Invocation During Plan Mode
+
+If a user invokes a skill during plan mode, that invoked skill workflow takes
+precedence over generic plan mode behavior until it finishes or the user explicitly
+cancels that skill.
+
+Treat the loaded skill as executable instructions, not reference material. Follow
+it step by step. Do not summarize, skip, reorder, or shortcut its steps.
+
+If the skill says to use AskUserQuestion, do that. Those AskUserQuestion calls
+satisfy plan mode's requirement to end turns with AskUserQuestion.
+
+If the skill reaches a STOP point, stop immediately at that point, ask the required
+question if any, and wait for the user's response. Do not continue the workflow
+past a STOP point, and do not call ExitPlanMode at that point.
+
+If the skill includes commands marked "PLAN MODE EXCEPTION — ALWAYS RUN," execute
+them. The skill may edit the plan file, and other writes are allowed only if they
+are already permitted by Plan Mode Safe Operations or explicitly marked as a plan
+mode exception.
+
+Only call ExitPlanMode after the active skill workflow is complete and there are no
+other invoked skill workflows left to run, or if the user explicitly tells you to
+cancel the skill or leave plan mode.
+
## Plan Status Footer
When you are in plan mode and about to call ExitPlanMode:
diff --git a/test/host-config.test.ts b/test/host-config.test.ts
index acd6c24a5..7c667710d 100644
--- a/test/host-config.test.ts
+++ b/test/host-config.test.ts
@@ -484,9 +484,17 @@ describe('host config correctness', () => {
expect(openclaw.adapter).toContain('openclaw-adapter');
});
- test('openclaw has staticFiles for SOUL.md', () => {
- expect(openclaw.staticFiles).toBeDefined();
- expect(openclaw.staticFiles!['SOUL.md']).toBeDefined();
+ test('openclaw has no staticFiles (SOUL.md removed)', () => {
+ expect(openclaw.staticFiles).toBeUndefined();
+ });
+
+ test('openclaw has includeSkills for native methodology skills', () => {
+ expect(openclaw.generation.includeSkills).toBeDefined();
+ expect(openclaw.generation.includeSkills).toContain('office-hours');
+ expect(openclaw.generation.includeSkills).toContain('plan-ceo-review');
+ expect(openclaw.generation.includeSkills).toContain('investigate');
+ expect(openclaw.generation.includeSkills).toContain('retro');
+ expect(openclaw.generation.includeSkills!.length).toBe(4);
});
test('every host has coAuthorTrailer or undefined', () => {