enhance(#4405): split the rest of the eager-window workflows worth splitting (#4536)

This commit is contained in:
Tom Boucher
2026-09-08 00:17:22 -04:00
committed by GitHub
parent 18c899def5
commit e03921c7d8
38 changed files with 1328 additions and 907 deletions

View File

@@ -0,0 +1,216 @@
# new-project.md — deferred elaboration
Read in full when `workflow.compact_content` is `false` (the default) — see
`gsd-core/references/compact-content-gate.md` for the check and resolution rule this
spine defers to. Each `§` below is the full text the spine condenses at the point it
names.
## § 1 — Prior Spike/Sketch Detection (Step 2b)
Check for existing spike and sketch work that should inform project setup:
```bash
# Check for spike findings skill (project-local)
SPIKE_SKILL=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1 || true)
# Check for sketch findings skill (project-local)
SKETCH_SKILL=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1 || true)
# Check for raw spikes/sketches in .planning/
HAS_SPIKES=$(ls .planning/spikes/MANIFEST.md 2>/dev/null)
HAS_SKETCHES=$(ls .planning/sketches/MANIFEST.md 2>/dev/null)
```
If any of these exist, surface them before questioning:
```
⚡ Prior exploration detected:
{if SPIKE_SKILL} ✓ Spike findings skill: {path} — validated patterns from experiments
{if SKETCH_SKILL} ✓ Sketch findings skill: {path} — validated design decisions
{if HAS_SPIKES && !SPIKE_SKILL} ◆ Raw spikes in .planning/spikes/ — consider `/gsd:spike --wrap-up` to package findings
{if HAS_SKETCHES && !SKETCH_SKILL} ◆ Raw sketches in .planning/sketches/ — consider `/gsd:sketch --wrap-up` to package findings
These findings will be incorporated into project context and available to planning agents.
```
If spike/sketch findings skills exist, read their SKILL.md files to inform the questioning phase — they contain validated patterns, constraints, and design decisions that should shape the project definition.
## § 2 — Research Decision: the four researcher prompts, synthesizer prompt, and self-heal steps
Spawn 4 parallel gsd-project-researcher agents with path references:
<!-- #2517 model-omit-on-inherit -->
> **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`researcher_model`, `synthesizer_model`, `roadmapper_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
```text
Agent(prompt="<research_type>
Project Research — Stack dimension for [domain].
</research_type>
<milestone_context>
[greenfield OR subsequent]
Greenfield: Research the standard stack for building [domain] from scratch.
Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
</milestone_context>
<question>
What's the standard 2025 stack for [domain]?
</question>
<required_reading>
- {project_path} (Project context and goals)
</required_reading>
${AGENT_SKILLS_RESEARCHER}
<downstream_consumer>
Your STACK.md feeds into roadmap creation. Be prescriptive:
- Specific libraries with versions
- Clear rationale for each choice
- What NOT to use and why
</downstream_consumer>
<quality_gate>
- [ ] Versions are current (verify with Context7/official docs, not training data)
- [ ] Rationale explains WHY, not just WHAT
- [ ] Confidence levels assigned to each recommendation
</quality_gate>
<!-- #2508 runtime-aware-dispatch -->
> **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
<output>
Write to: {research_dir}/STACK.md
Use template: ~/.claude/gsd-core/templates/research-project/STACK.md
</output>
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research")
Agent(prompt="<research_type>
Project Research — Features dimension for [domain].
</research_type>
<milestone_context>
[greenfield OR subsequent]
Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
Subsequent: How do [target features] typically work? What's expected behavior?
</milestone_context>
<question>
What features do [domain] products have? What's table stakes vs differentiating?
</question>
<required_reading>
- {project_path} (Project context, for the Features researcher)
</required_reading>
${AGENT_SKILLS_RESEARCHER}
<downstream_consumer>
Your FEATURES.md feeds into requirements definition. Categorize clearly:
- Table stakes (must have or users leave)
- Differentiators (competitive advantage)
- Anti-features (things to deliberately NOT build)
</downstream_consumer>
<quality_gate>
- [ ] Categories are clear (table stakes vs differentiators vs anti-features)
- [ ] Complexity noted for each feature
- [ ] Dependencies between features identified
</quality_gate>
<output>
Write to: {research_dir}/FEATURES.md
Use template: ~/.claude/gsd-core/templates/research-project/FEATURES.md
</output>
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Features research")
Agent(prompt="<research_type>
Project Research — Architecture dimension for [domain].
</research_type>
<milestone_context>
[greenfield OR subsequent]
Greenfield: How are [domain] systems typically structured? What are major components?
Subsequent: How do [target features] integrate with existing [domain] architecture?
</milestone_context>
<question>
How are [domain] systems typically structured? What are major components?
</question>
<required_reading>
- {project_path} (Project context, for the Architecture researcher)
</required_reading>
${AGENT_SKILLS_RESEARCHER}
<downstream_consumer>
Your ARCHITECTURE.md informs phase structure in roadmap. Include:
- Component boundaries (what talks to what)
- Data flow (how information moves)
- Suggested build order (dependencies between components)
</downstream_consumer>
<quality_gate>
- [ ] Components clearly defined with boundaries
- [ ] Data flow direction explicit
- [ ] Build order implications noted
</quality_gate>
<output>
Write to: {research_dir}/ARCHITECTURE.md
Use template: ~/.claude/gsd-core/templates/research-project/ARCHITECTURE.md
</output>
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Architecture research")
Agent(prompt="<research_type>
Project Research — Pitfalls dimension for [domain].
</research_type>
<milestone_context>
[greenfield OR subsequent]
Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
Subsequent: What are common mistakes when adding [target features] to [domain]?
</milestone_context>
<question>
What do [domain] projects commonly get wrong? Critical mistakes?
</question>
<required_reading>
- {project_path} (Project context, for the Pitfalls researcher)
</required_reading>
${AGENT_SKILLS_RESEARCHER}
<downstream_consumer>
Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
- Warning signs (how to detect early)
- Prevention strategy (how to avoid)
- Which phase should address it
</downstream_consumer>
<quality_gate>
- [ ] Pitfalls are specific to this domain (not generic advice)
- [ ] Prevention strategies are actionable
- [ ] Phase mapping included where relevant
</quality_gate>
<output>
Write to: {research_dir}/PITFALLS.md
Use template: ~/.claude/gsd-core/templates/research-project/PITFALLS.md
</output>
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research")
```
(The "wait for all 4 researchers before spawning the synthesizer" orchestrator rule, the full
synthesizer `Agent()` call, and the entire #222 self-heal recovery sequence — including its log
message and closing guarantee — are all stated verbatim in the spine. A pre-existing structural
drift guard (`tests/research-agent-profiles.test.cjs`) pins them there, so nothing about this
particular sub-flow is deferred to this file.)