@zigrivers/scaffold 3.1.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -40
- package/content/knowledge/core/test-skeleton-generation.md +313 -0
- package/{knowledge → content/knowledge}/execution/enhancement-workflow.md +1 -1
- package/content/knowledge/product/vision-innovation.md +273 -0
- package/{knowledge → content/knowledge}/tools/post-implementation-review-methodology.md +1 -1
- package/{pipeline → content/pipeline}/consolidation/workflow-audit.md +1 -1
- package/{pipeline → content/pipeline}/decisions/review-adrs.md +1 -1
- package/{pipeline → content/pipeline}/environment/design-system.md +1 -1
- package/{pipeline → content/pipeline}/finalization/implementation-playbook.md +2 -2
- package/{pipeline → content/pipeline}/foundation/tech-stack.md +1 -1
- package/{pipeline → content/pipeline}/modeling/review-domain-modeling.md +1 -1
- package/{pipeline → content/pipeline}/planning/implementation-plan-review.md +2 -1
- package/{pipeline → content/pipeline}/quality/review-testing.md +1 -1
- package/{pipeline → content/pipeline}/quality/story-tests.md +2 -2
- package/{pipeline → content/pipeline}/vision/innovate-vision.md +1 -1
- package/content/skills/mmr/SKILL.md +65 -0
- package/content/skills/multi-model-dispatch/SKILL.md +327 -0
- package/{agent-skills → content/skills}/scaffold-pipeline/SKILL.md +14 -8
- package/{agent-skills → content/skills}/scaffold-runner/SKILL.md +64 -19
- package/{tools → content/tools}/post-implementation-review.md +2 -2
- package/{tools → content/tools}/prompt-pipeline.md +7 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +17 -1
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/build.test.js +6 -5
- package/dist/cli/commands/build.test.js.map +1 -1
- package/dist/cli/commands/info.test.js +2 -2
- package/dist/cli/commands/info.test.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +9 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/init.test.js +6 -0
- package/dist/cli/commands/init.test.js.map +1 -1
- package/dist/cli/commands/list.test.js +8 -8
- package/dist/cli/commands/list.test.js.map +1 -1
- package/dist/cli/commands/run.test.js +4 -4
- package/dist/cli/commands/run.test.js.map +1 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +16 -86
- package/dist/cli/commands/skill.js.map +1 -1
- package/dist/cli/commands/skill.test.js +27 -46
- package/dist/cli/commands/skill.test.js.map +1 -1
- package/dist/cli/middleware/project-root.d.ts.map +1 -1
- package/dist/cli/middleware/project-root.js +16 -0
- package/dist/cli/middleware/project-root.js.map +1 -1
- package/dist/cli/middleware/project-root.test.js +20 -0
- package/dist/cli/middleware/project-root.test.js.map +1 -1
- package/dist/core/adapters/gemini.js +2 -2
- package/dist/core/adapters/gemini.js.map +1 -1
- package/dist/core/adapters/gemini.test.js +1 -1
- package/dist/core/adapters/gemini.test.js.map +1 -1
- package/dist/core/skills/sync.d.ts +36 -0
- package/dist/core/skills/sync.d.ts.map +1 -0
- package/dist/core/skills/sync.js +119 -0
- package/dist/core/skills/sync.js.map +1 -0
- package/dist/core/skills/sync.test.d.ts +2 -0
- package/dist/core/skills/sync.test.d.ts.map +1 -0
- package/dist/core/skills/sync.test.js +166 -0
- package/dist/core/skills/sync.test.js.map +1 -0
- package/dist/e2e/commands.test.js +10 -10
- package/dist/e2e/commands.test.js.map +1 -1
- package/dist/e2e/knowledge.test.js +5 -4
- package/dist/e2e/knowledge.test.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/project/adopt.test.js +8 -8
- package/dist/project/adopt.test.js.map +1 -1
- package/dist/utils/fs.d.ts +5 -5
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +15 -15
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/fs.test.js +9 -9
- package/dist/utils/fs.test.js.map +1 -1
- package/dist/validation/index.test.js +2 -2
- package/dist/validation/index.test.js.map +1 -1
- package/package.json +3 -6
- package/skills/mmr/SKILL.md +65 -0
- package/skills/scaffold-pipeline/SKILL.md +3 -3
- /package/{knowledge → content/knowledge}/core/adr-craft.md +0 -0
- /package/{knowledge → content/knowledge}/core/ai-memory-management.md +0 -0
- /package/{knowledge → content/knowledge}/core/api-design.md +0 -0
- /package/{knowledge → content/knowledge}/core/automated-review-tooling.md +0 -0
- /package/{knowledge → content/knowledge}/core/claude-md-patterns.md +0 -0
- /package/{knowledge → content/knowledge}/core/coding-conventions.md +0 -0
- /package/{knowledge → content/knowledge}/core/database-design.md +0 -0
- /package/{knowledge → content/knowledge}/core/design-system-tokens.md +0 -0
- /package/{knowledge → content/knowledge}/core/dev-environment.md +0 -0
- /package/{knowledge → content/knowledge}/core/domain-modeling.md +0 -0
- /package/{knowledge → content/knowledge}/core/eval-craft.md +0 -0
- /package/{knowledge → content/knowledge}/core/git-workflow-patterns.md +0 -0
- /package/{knowledge → content/knowledge}/core/multi-model-review-dispatch.md +0 -0
- /package/{knowledge → content/knowledge}/core/operations-runbook.md +0 -0
- /package/{knowledge → content/knowledge}/core/project-structure-patterns.md +0 -0
- /package/{knowledge → content/knowledge}/core/review-step-template.md +0 -0
- /package/{knowledge → content/knowledge}/core/security-best-practices.md +0 -0
- /package/{knowledge → content/knowledge}/core/system-architecture.md +0 -0
- /package/{knowledge → content/knowledge}/core/task-decomposition.md +0 -0
- /package/{knowledge → content/knowledge}/core/task-tracking.md +0 -0
- /package/{knowledge → content/knowledge}/core/tech-stack-selection.md +0 -0
- /package/{knowledge → content/knowledge}/core/testing-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/core/user-stories.md +0 -0
- /package/{knowledge → content/knowledge}/core/user-story-innovation.md +0 -0
- /package/{knowledge → content/knowledge}/core/ux-specification.md +0 -0
- /package/{knowledge → content/knowledge}/execution/task-claiming-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/execution/tdd-execution-loop.md +0 -0
- /package/{knowledge → content/knowledge}/execution/worktree-management.md +0 -0
- /package/{knowledge → content/knowledge}/finalization/apply-fixes-and-freeze.md +0 -0
- /package/{knowledge → content/knowledge}/finalization/developer-onboarding.md +0 -0
- /package/{knowledge → content/knowledge}/finalization/implementation-playbook.md +0 -0
- /package/{knowledge → content/knowledge}/product/gap-analysis.md +0 -0
- /package/{knowledge → content/knowledge}/product/prd-craft.md +0 -0
- /package/{knowledge → content/knowledge}/product/prd-innovation.md +0 -0
- /package/{knowledge → content/knowledge}/product/vision-craft.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-adr.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-api-design.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-database-design.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-domain-modeling.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-implementation-tasks.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-methodology.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-operations.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-prd.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-security.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-system-architecture.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-testing-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-user-stories.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-ux-specification.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-vision.md +0 -0
- /package/{knowledge → content/knowledge}/tools/release-management.md +0 -0
- /package/{knowledge → content/knowledge}/tools/session-analysis.md +0 -0
- /package/{knowledge → content/knowledge}/tools/version-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/validation/critical-path-analysis.md +0 -0
- /package/{knowledge → content/knowledge}/validation/cross-phase-consistency.md +0 -0
- /package/{knowledge → content/knowledge}/validation/decision-completeness.md +0 -0
- /package/{knowledge → content/knowledge}/validation/dependency-validation.md +0 -0
- /package/{knowledge → content/knowledge}/validation/implementability-review.md +0 -0
- /package/{knowledge → content/knowledge}/validation/scope-management.md +0 -0
- /package/{knowledge → content/knowledge}/validation/traceability.md +0 -0
- /package/{methodology → content/methodology}/README.md +0 -0
- /package/{methodology → content/methodology}/custom-defaults.yml +0 -0
- /package/{methodology → content/methodology}/deep.yml +0 -0
- /package/{methodology → content/methodology}/mvp.yml +0 -0
- /package/{pipeline → content/pipeline}/architecture/review-architecture.md +0 -0
- /package/{pipeline → content/pipeline}/architecture/system-architecture.md +0 -0
- /package/{pipeline → content/pipeline}/build/multi-agent-resume.md +0 -0
- /package/{pipeline → content/pipeline}/build/multi-agent-start.md +0 -0
- /package/{pipeline → content/pipeline}/build/new-enhancement.md +0 -0
- /package/{pipeline → content/pipeline}/build/quick-task.md +0 -0
- /package/{pipeline → content/pipeline}/build/single-agent-resume.md +0 -0
- /package/{pipeline → content/pipeline}/build/single-agent-start.md +0 -0
- /package/{pipeline → content/pipeline}/consolidation/claude-md-optimization.md +0 -0
- /package/{pipeline → content/pipeline}/decisions/adrs.md +0 -0
- /package/{pipeline → content/pipeline}/environment/ai-memory-setup.md +0 -0
- /package/{pipeline → content/pipeline}/environment/automated-pr-review.md +0 -0
- /package/{pipeline → content/pipeline}/environment/dev-env-setup.md +0 -0
- /package/{pipeline → content/pipeline}/environment/git-workflow.md +0 -0
- /package/{pipeline → content/pipeline}/finalization/apply-fixes-and-freeze.md +0 -0
- /package/{pipeline → content/pipeline}/finalization/developer-onboarding-guide.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/beads.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/coding-standards.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/project-structure.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/tdd.md +0 -0
- /package/{pipeline → content/pipeline}/integration/add-e2e-testing.md +0 -0
- /package/{pipeline → content/pipeline}/modeling/domain-modeling.md +0 -0
- /package/{pipeline → content/pipeline}/parity/platform-parity-review.md +0 -0
- /package/{pipeline → content/pipeline}/planning/implementation-plan.md +0 -0
- /package/{pipeline → content/pipeline}/pre/create-prd.md +0 -0
- /package/{pipeline → content/pipeline}/pre/innovate-prd.md +0 -0
- /package/{pipeline → content/pipeline}/pre/innovate-user-stories.md +0 -0
- /package/{pipeline → content/pipeline}/pre/review-prd.md +0 -0
- /package/{pipeline → content/pipeline}/pre/review-user-stories.md +0 -0
- /package/{pipeline → content/pipeline}/pre/user-stories.md +0 -0
- /package/{pipeline → content/pipeline}/quality/create-evals.md +0 -0
- /package/{pipeline → content/pipeline}/quality/operations.md +0 -0
- /package/{pipeline → content/pipeline}/quality/review-operations.md +0 -0
- /package/{pipeline → content/pipeline}/quality/review-security.md +0 -0
- /package/{pipeline → content/pipeline}/quality/security.md +0 -0
- /package/{pipeline → content/pipeline}/specification/api-contracts.md +0 -0
- /package/{pipeline → content/pipeline}/specification/database-schema.md +0 -0
- /package/{pipeline → content/pipeline}/specification/review-api.md +0 -0
- /package/{pipeline → content/pipeline}/specification/review-database.md +0 -0
- /package/{pipeline → content/pipeline}/specification/review-ux.md +0 -0
- /package/{pipeline → content/pipeline}/specification/ux-spec.md +0 -0
- /package/{pipeline → content/pipeline}/validation/critical-path-walkthrough.md +0 -0
- /package/{pipeline → content/pipeline}/validation/cross-phase-consistency.md +0 -0
- /package/{pipeline → content/pipeline}/validation/decision-completeness.md +0 -0
- /package/{pipeline → content/pipeline}/validation/dependency-graph-validation.md +0 -0
- /package/{pipeline → content/pipeline}/validation/implementability-dry-run.md +0 -0
- /package/{pipeline → content/pipeline}/validation/scope-creep-check.md +0 -0
- /package/{pipeline → content/pipeline}/validation/traceability-matrix.md +0 -0
- /package/{pipeline → content/pipeline}/vision/create-vision.md +0 -0
- /package/{pipeline → content/pipeline}/vision/review-vision.md +0 -0
- /package/{tools → content/tools}/dashboard.md +0 -0
- /package/{tools → content/tools}/release.md +0 -0
- /package/{tools → content/tools}/review-code.md +0 -0
- /package/{tools → content/tools}/review-pr.md +0 -0
- /package/{tools → content/tools}/session-analyzer.md +0 -0
- /package/{tools → content/tools}/update.md +0 -0
- /package/{tools → content/tools}/version-bump.md +0 -0
- /package/{tools → content/tools}/version.md +0 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-model-dispatch
|
|
3
|
+
description: Correct patterns for invoking Codex CLI and Gemini CLI as independent reviewers from Claude Code. Covers headless invocation, context bundling, output parsing, dual-model reconciliation, and fallback handling.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Multi-Model Dispatch
|
|
7
|
+
|
|
8
|
+
This skill teaches Claude Code how to correctly invoke Codex and Gemini CLIs for independent review of artifacts. Use this whenever a pipeline step needs multi-model validation at depth 4-5.
|
|
9
|
+
|
|
10
|
+
## When This Skill Activates
|
|
11
|
+
|
|
12
|
+
- A review or validation step is running at depth 4+ and wants independent model validation
|
|
13
|
+
- User asks to "run multi-model review" or "get a second opinion from Codex/Gemini"
|
|
14
|
+
- The `automated-pr-review` step is using local CLI review mode
|
|
15
|
+
- The `implementation-plan-review` step dispatches to external CLIs at depth 4+
|
|
16
|
+
|
|
17
|
+
## CLI Detection & Auth Verification
|
|
18
|
+
|
|
19
|
+
Before attempting any dispatch, detect what's available AND verify authentication. A CLI that's installed but not authenticated is useless in headless mode — it will hang on an interactive auth prompt or fail silently.
|
|
20
|
+
|
|
21
|
+
### Step 1: Check CLI Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
command -v codex && echo "codex installed" || echo "codex not found"
|
|
25
|
+
command -v gemini && echo "gemini installed" || echo "gemini not found"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Step 2: Verify Authentication
|
|
29
|
+
|
|
30
|
+
**CRITICAL: Do not skip this step.** Auth tokens expire mid-session. A CLI that worked 30 minutes ago may fail now.
|
|
31
|
+
|
|
32
|
+
**CRITICAL: Previous auth failures do NOT exempt subsequent dispatches.** Auth tokens refresh — a CLI that failed auth during user story review may work fine for domain modeling review. Always re-check auth before EACH review step, not once per session.
|
|
33
|
+
|
|
34
|
+
**Codex auth check** (has a built-in status command):
|
|
35
|
+
```bash
|
|
36
|
+
codex login status 2>/dev/null && echo "codex authenticated" || echo "codex NOT authenticated"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Gemini auth check** (no built-in status command — use a minimal prompt):
|
|
40
|
+
```bash
|
|
41
|
+
GEMINI_AUTH_CHECK=$(NO_BROWSER=true gemini -p "respond with ok" -o json 2>&1)
|
|
42
|
+
GEMINI_EXIT=$?
|
|
43
|
+
if [ "$GEMINI_EXIT" -eq 0 ]; then
|
|
44
|
+
echo "gemini authenticated"
|
|
45
|
+
elif [ "$GEMINI_EXIT" -eq 41 ]; then
|
|
46
|
+
echo "gemini NOT authenticated (exit 41: auth error)"
|
|
47
|
+
else
|
|
48
|
+
echo "gemini auth unknown (exit $GEMINI_EXIT)"
|
|
49
|
+
fi
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Why `NO_BROWSER=true`?** Gemini CLI relaunches itself as a child process for memory management. During the relaunch, it shows a "Do you want to continue? [Y/n]" consent prompt that hangs when stdin is not a TTY (as in Claude Code's Bash tool). `NO_BROWSER=true` suppresses this prompt and uses cached credentials directly.
|
|
53
|
+
|
|
54
|
+
### Step 3: Handle Auth Failures
|
|
55
|
+
|
|
56
|
+
**If a CLI fails auth, do NOT silently fall back.** Instead:
|
|
57
|
+
|
|
58
|
+
1. **Tell the user** which CLI failed auth and why
|
|
59
|
+
2. **Offer interactive recovery**: Ask the user to run the auth command in their terminal:
|
|
60
|
+
- **Codex**: `! codex login` (opens browser for OAuth) or set `CODEX_API_KEY` env var
|
|
61
|
+
- **Gemini**: `! gemini -p "hello"` (triggers OAuth flow) or set `GEMINI_API_KEY` env var
|
|
62
|
+
3. **After recovery**: Re-run the auth check. If it passes, proceed with dispatch.
|
|
63
|
+
4. **If user declines**: Fall back to the other CLI or Claude-only review, but **document the auth failure** in the review summary.
|
|
64
|
+
|
|
65
|
+
The `!` prefix runs the command in the user's terminal session, allowing interactive auth flows (browser OAuth, Y/n prompts) that can't work in headless mode.
|
|
66
|
+
|
|
67
|
+
**If neither CLI is available or authenticated**: Fall back to structured Claude-only self-review. Re-read the artifact with an adversarial lens — actively try to find issues the initial review missed. Document this as "single-model review (no external CLIs available)."
|
|
68
|
+
|
|
69
|
+
## Correct Invocation Patterns
|
|
70
|
+
|
|
71
|
+
### Codex CLI (`codex exec`)
|
|
72
|
+
|
|
73
|
+
**CRITICAL: Use `codex exec`, NOT `codex` directly.** The bare `codex` command launches an interactive TUI that requires a TTY and will fail with "stdin is not a terminal" when run from Claude Code.
|
|
74
|
+
|
|
75
|
+
**CRITICAL: Always include `--skip-git-repo-check`.** Without this flag, Codex fails with "Not inside a trusted directory" when the project hasn't initialized git yet (common early in the pipeline).
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Basic review dispatch
|
|
79
|
+
codex exec --skip-git-repo-check -s read-only --ephemeral "REVIEW_PROMPT_HERE" 2>/dev/null
|
|
80
|
+
|
|
81
|
+
# With specific model and reasoning effort
|
|
82
|
+
codex exec --skip-git-repo-check -m o4-mini -s read-only -c model_reasoning_effort=high --ephemeral "REVIEW_PROMPT_HERE" 2>/dev/null
|
|
83
|
+
|
|
84
|
+
# Reading prompt from stdin (use - flag)
|
|
85
|
+
echo "$REVIEW_PROMPT" | codex exec --skip-git-repo-check -s read-only --ephemeral - 2>/dev/null
|
|
86
|
+
|
|
87
|
+
# With JSON schema enforcement
|
|
88
|
+
codex exec --skip-git-repo-check -s read-only --ephemeral --output-schema schema.json "REVIEW_PROMPT_HERE" 2>/dev/null
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Key flags:**
|
|
92
|
+
| Flag | Purpose |
|
|
93
|
+
|------|---------|
|
|
94
|
+
| `exec` | **Required** — headless mode, no TUI, no TTY needed |
|
|
95
|
+
| `--skip-git-repo-check` | **Required** — allows running outside a git repo or untrusted directory |
|
|
96
|
+
| `-s read-only` | Sandbox: reviewer cannot write files (read-only analysis) |
|
|
97
|
+
| `--ephemeral` | Don't persist session (one-shot review) |
|
|
98
|
+
| `2>/dev/null` | Suppress thinking tokens on stderr (keeps Claude Code context clean) |
|
|
99
|
+
| `--output-schema` | Enforce structured JSON output against a schema file |
|
|
100
|
+
| `-c model_reasoning_effort=high` | Increase reasoning depth for complex reviews |
|
|
101
|
+
|
|
102
|
+
**Output**: Progress streams to stderr (suppressed by `2>/dev/null`). Final answer prints to stdout.
|
|
103
|
+
|
|
104
|
+
### Gemini CLI (`gemini -p`)
|
|
105
|
+
|
|
106
|
+
**Use `-p` / `--prompt` for headless mode.** Without this flag, Gemini launches interactive mode.
|
|
107
|
+
|
|
108
|
+
**CRITICAL: Always prepend `NO_BROWSER=true`.** Without this, Gemini's child process relaunch shows a consent prompt ("Do you want to continue? [Y/n]") that hangs when stdin is not a TTY. This affects ALL non-interactive contexts including Claude Code's Bash tool.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Basic review dispatch
|
|
112
|
+
NO_BROWSER=true gemini -p "REVIEW_PROMPT_HERE" --output-format json --approval-mode yolo 2>/dev/null
|
|
113
|
+
|
|
114
|
+
# With specific model
|
|
115
|
+
NO_BROWSER=true gemini -p "REVIEW_PROMPT_HERE" -m pro --output-format json --approval-mode yolo 2>/dev/null
|
|
116
|
+
|
|
117
|
+
# Reading context from stdin
|
|
118
|
+
cat artifact.md | NO_BROWSER=true gemini -p "Review this artifact for issues" --output-format json --approval-mode yolo 2>/dev/null
|
|
119
|
+
|
|
120
|
+
# With sandbox (no file writes)
|
|
121
|
+
NO_BROWSER=true gemini -p "REVIEW_PROMPT_HERE" --output-format json -s --approval-mode yolo 2>/dev/null
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Key flags:**
|
|
125
|
+
| Flag | Purpose |
|
|
126
|
+
|------|---------|
|
|
127
|
+
| `NO_BROWSER=true` | **Required** — suppresses consent prompt that hangs in non-TTY shells |
|
|
128
|
+
| `-p "prompt"` | **Required** — headless mode, no interactive UI |
|
|
129
|
+
| `--output-format json` | Structured JSON output for parsing |
|
|
130
|
+
| `--approval-mode yolo` | Auto-approve all tool calls (reviewer doesn't need to write) |
|
|
131
|
+
| `-s` | Sandbox mode (extra safety for read-only review) |
|
|
132
|
+
| `-m pro` | Use Gemini Pro model (default is auto) |
|
|
133
|
+
| `2>/dev/null` | Suppress progress output |
|
|
134
|
+
|
|
135
|
+
**Output**: JSON on stdout with `{ response, stats, error }` structure.
|
|
136
|
+
|
|
137
|
+
## Context Bundling
|
|
138
|
+
|
|
139
|
+
When dispatching a review, bundle all relevant context into the prompt. Each CLI gets the same bundle — do NOT share one model's review with the other.
|
|
140
|
+
|
|
141
|
+
### Template for Artifact Review
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
You are reviewing a project artifact for quality issues. Report P0 (critical), P1 (high), and P2 (medium) issues.
|
|
145
|
+
|
|
146
|
+
## Severity Definitions
|
|
147
|
+
- P0: Will cause implementation failure, data loss, security vulnerability, or fundamental architectural flaw
|
|
148
|
+
- P1: Will cause bugs in normal usage, inconsistency across documents, or blocks downstream work
|
|
149
|
+
- P2: Improvement opportunity — style, naming, documentation, minor optimization
|
|
150
|
+
- Do NOT report P3 issues (personal preference, trivial nits)
|
|
151
|
+
|
|
152
|
+
## Review Standards
|
|
153
|
+
[paste contents of docs/review-standards.md if it exists, otherwise use severity definitions above]
|
|
154
|
+
|
|
155
|
+
## Artifact to Review
|
|
156
|
+
[paste full artifact content]
|
|
157
|
+
|
|
158
|
+
## Upstream References
|
|
159
|
+
[paste relevant upstream docs: PRD, tech-stack, coding-standards, etc.]
|
|
160
|
+
|
|
161
|
+
## Output Format
|
|
162
|
+
Respond with a JSON object:
|
|
163
|
+
{
|
|
164
|
+
"approved": true/false,
|
|
165
|
+
"findings": [
|
|
166
|
+
{
|
|
167
|
+
"severity": "P0" or "P1" or "P2",
|
|
168
|
+
"location": "section or line reference",
|
|
169
|
+
"description": "what's wrong",
|
|
170
|
+
"suggestion": "specific fix"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"summary": "one-line assessment"
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
If no P0/P1/P2 issues found, respond with: { "approved": true, "findings": [], "summary": "No issues found." }
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Template for PR Diff Review
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
You are reviewing a pull request diff. Report P0, P1, and P2 issues.
|
|
183
|
+
|
|
184
|
+
## Review Standards
|
|
185
|
+
[paste docs/review-standards.md]
|
|
186
|
+
|
|
187
|
+
## Project Coding Standards
|
|
188
|
+
[paste docs/coding-standards.md]
|
|
189
|
+
|
|
190
|
+
## Test Standards
|
|
191
|
+
[paste docs/tdd-standards.md]
|
|
192
|
+
|
|
193
|
+
## PR Diff
|
|
194
|
+
[paste output of gh pr diff <number> or git diff origin/main...HEAD]
|
|
195
|
+
|
|
196
|
+
## Output Format
|
|
197
|
+
[same JSON format as above, but location = file:line]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Context Size Guidelines
|
|
201
|
+
|
|
202
|
+
| Artifact Type | Max Context | Strategy |
|
|
203
|
+
|--------------|------------|----------|
|
|
204
|
+
| PRD | Full document | Include entirely |
|
|
205
|
+
| User stories | Full document | Include entirely |
|
|
206
|
+
| Architecture | Full document | Include entirely |
|
|
207
|
+
| Domain models | Directory listing + key files | Summarize index, include 2-3 representative files |
|
|
208
|
+
| PR diff | Full diff | If >2000 lines, split into file groups |
|
|
209
|
+
| Implementation plan | Task list + representative tasks | Include full task list, detail for flagged tasks |
|
|
210
|
+
|
|
211
|
+
## Dual-Model Reconciliation
|
|
212
|
+
|
|
213
|
+
When both CLIs produce results, reconcile findings using these rules:
|
|
214
|
+
|
|
215
|
+
| Scenario | Confidence | Action |
|
|
216
|
+
|----------|-----------|--------|
|
|
217
|
+
| Both flag same issue | **High** | Fix immediately — two independent models agree |
|
|
218
|
+
| Both approve (no findings) | **High** | Proceed confidently |
|
|
219
|
+
| One flags P0, other approves | **High** | Fix it — P0 is critical enough from a single source |
|
|
220
|
+
| One flags P1, other approves | **Medium** | Review the finding carefully before fixing. If the finding is specific and actionable, fix it. If vague, skip. |
|
|
221
|
+
| Models contradict each other | **Low** | Present both findings to the user for adjudication |
|
|
222
|
+
|
|
223
|
+
**Independence rule**: Never share one model's review output with the other. Each model must review the artifact independently to avoid confirmation bias.
|
|
224
|
+
|
|
225
|
+
**Round tracking**: For iterative reviews (like PR review loops), track the round number. After 3 fix rounds, merge with a warning and create a follow-up issue for remaining findings.
|
|
226
|
+
|
|
227
|
+
## Fallback Behavior
|
|
228
|
+
|
|
229
|
+
| Situation | Fallback |
|
|
230
|
+
|-----------|----------|
|
|
231
|
+
| Neither CLI available | Structured Claude-only adversarial self-review |
|
|
232
|
+
| Codex only | Single-model review with Codex |
|
|
233
|
+
| Gemini only | Single-model review with Gemini |
|
|
234
|
+
| **CLI auth expired** | **Surface to user with recovery command — do NOT silently fall back** |
|
|
235
|
+
| One CLI fails mid-review (non-auth) | Continue with the other; note the failure in summary |
|
|
236
|
+
| Both CLIs fail (non-auth) | Fall back to Claude-only self-review; warn user |
|
|
237
|
+
| CLI output not parseable as JSON | Treat as text, extract findings manually |
|
|
238
|
+
|
|
239
|
+
**Auth failures are NOT silent fallbacks.** The difference between "CLI not installed" (fall back quietly) and "CLI auth expired" (user action required) is critical. Auth can be fixed in 30 seconds with an interactive command — silently skipping wastes the user's review infrastructure.
|
|
240
|
+
|
|
241
|
+
## Integration with Review Steps
|
|
242
|
+
|
|
243
|
+
All review steps can reference this skill at depth 4-5. The pattern is:
|
|
244
|
+
|
|
245
|
+
1. **Depth 1-3**: Claude-only multi-pass review (step's existing logic)
|
|
246
|
+
2. **Depth 4**: Claude review + single external CLI review (if available)
|
|
247
|
+
3. **Depth 5**: Claude review + dual-model CLI review with reconciliation
|
|
248
|
+
|
|
249
|
+
Each review step adds a "Multi-Model Validation" section at the end that:
|
|
250
|
+
1. Detects available CLIs
|
|
251
|
+
2. Bundles the artifact + upstream references into a review prompt
|
|
252
|
+
3. Dispatches to available CLIs using the patterns above
|
|
253
|
+
4. Reconciles findings using the dual-model rules
|
|
254
|
+
5. Applies fixes for high-confidence findings
|
|
255
|
+
6. Presents medium/low-confidence findings to the user
|
|
256
|
+
|
|
257
|
+
## Error Handling
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Capture exit code AND stderr separately (don't suppress stderr for error detection)
|
|
261
|
+
CODEX_STDERR=$(mktemp)
|
|
262
|
+
OUTPUT=$(codex exec --skip-git-repo-check -s read-only --ephemeral "prompt" 2>"$CODEX_STDERR") || {
|
|
263
|
+
EXIT_CODE=$?
|
|
264
|
+
STDERR_CONTENT=$(cat "$CODEX_STDERR")
|
|
265
|
+
if echo "$STDERR_CONTENT" | grep -qi "refresh token\|please re-run.*login\|sign in again\|auth"; then
|
|
266
|
+
echo "Codex auth expired. Ask user to run: ! codex login"
|
|
267
|
+
# DO NOT silently fall back — surface to user
|
|
268
|
+
else
|
|
269
|
+
echo "Codex CLI failed with exit code $EXIT_CODE"
|
|
270
|
+
# Fall back to Gemini or Claude-only
|
|
271
|
+
fi
|
|
272
|
+
rm -f "$CODEX_STDERR"
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
GEMINI_STDERR=$(mktemp)
|
|
276
|
+
OUTPUT=$(NO_BROWSER=true gemini -p "prompt" --output-format json --approval-mode yolo 2>"$GEMINI_STDERR") || {
|
|
277
|
+
EXIT_CODE=$?
|
|
278
|
+
if [ "$EXIT_CODE" -eq 41 ]; then
|
|
279
|
+
echo "Gemini auth failed (exit 41). Ask user to run: ! gemini -p \"hello\""
|
|
280
|
+
# DO NOT silently fall back — surface to user
|
|
281
|
+
else
|
|
282
|
+
echo "Gemini CLI failed with exit code $EXIT_CODE"
|
|
283
|
+
# Fall back to Codex or Claude-only
|
|
284
|
+
fi
|
|
285
|
+
rm -f "$GEMINI_STDERR"
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Exit Codes
|
|
290
|
+
|
|
291
|
+
**Gemini exit codes:**
|
|
292
|
+
|
|
293
|
+
| Code | Meaning | Action |
|
|
294
|
+
|------|---------|--------|
|
|
295
|
+
| 0 | Success | Parse output |
|
|
296
|
+
| 1 | General error | Fall back to other CLI |
|
|
297
|
+
| **41** | **Auth failure** | **Surface to user — offer `! gemini -p "hello"` recovery** |
|
|
298
|
+
| 42 | Input error | Check prompt format |
|
|
299
|
+
| 52 | Config error | Check `~/.gemini/settings.json` |
|
|
300
|
+
| 53 | Turn limit exceeded | Retry with shorter prompt |
|
|
301
|
+
|
|
302
|
+
**Codex exit codes:**
|
|
303
|
+
|
|
304
|
+
| Code | Meaning | Action |
|
|
305
|
+
|------|---------|--------|
|
|
306
|
+
| 0 | Success | Parse output |
|
|
307
|
+
| 1 | General failure | Check stderr for auth messages |
|
|
308
|
+
|
|
309
|
+
Codex uses exit code 1 for all failures. **Check stderr** for auth-specific messages: "refresh token", "please re-run", "sign in again", "ChatGPT account ID not available".
|
|
310
|
+
|
|
311
|
+
### Auth Recovery Flow
|
|
312
|
+
|
|
313
|
+
When an auth failure is detected during dispatch (not during pre-flight):
|
|
314
|
+
|
|
315
|
+
1. Stop the review dispatch immediately
|
|
316
|
+
2. Tell the user: "Gemini/Codex auth has expired. To re-authenticate, run:"
|
|
317
|
+
3. Suggest: `! codex login` or `! gemini -p "hello"` (the `!` prefix runs it interactively)
|
|
318
|
+
4. After the user re-authenticates, re-run the auth check
|
|
319
|
+
5. If auth succeeds, resume the review dispatch from where it stopped
|
|
320
|
+
6. If the user declines, fall back to the other CLI or Claude-only review
|
|
321
|
+
|
|
322
|
+
## What This Skill Does NOT Do
|
|
323
|
+
|
|
324
|
+
- Does not install CLIs (user must install `codex` and `gemini` separately)
|
|
325
|
+
- Does not authenticate CLIs — but it **detects auth failures** and guides the user through interactive recovery via `!` prefix commands
|
|
326
|
+
- Does not replace Claude's own review passes — it adds independent validation on top
|
|
327
|
+
- Does not work as an MCP server — it uses Bash tool invocations directly
|
|
@@ -31,7 +31,7 @@ Use this skill ONLY when the user asks about:
|
|
|
31
31
|
| 8 | `specification` | Specifications | Creates interface specs: database schema with constraints, API contracts with error codes, UX flows with accessibility. Each conditional. |
|
|
32
32
|
| 9 | `quality` | Quality Gates | Reviews testing, generates test skeletons, creates eval checks, designs deployment pipeline, and conducts security review. |
|
|
33
33
|
| 10 | `parity` | Platform Parity | Audits documentation for platform-specific gaps. Skips for single-platform projects. |
|
|
34
|
-
| 11 | `consolidation` | Consolidation | Optimizes
|
|
34
|
+
| 11 | `consolidation` | Consolidation | Optimizes {{INSTRUCTIONS_FILE}} under 200 lines and audits all workflow docs for consistency. |
|
|
35
35
|
| 12 | `planning` | Planning | Decomposes stories into concrete tasks scoped to ~150 lines and 3 files max, with clear acceptance criteria. |
|
|
36
36
|
| 13 | `validation` | Validation | Seven cross-cutting audits: scope creep, dependency cycles, implementability, traceability, naming drift, broken handoffs, decision completeness. |
|
|
37
37
|
| 14 | `finalization` | Finalization | Applies validation findings, freezes docs, creates onboarding guide, and writes the implementation playbook. |
|
|
@@ -41,13 +41,16 @@ Use this skill ONLY when the user asks about:
|
|
|
41
41
|
|
|
42
42
|
| # | Phase | Command | Notes |
|
|
43
43
|
|---|-------|---------|-------|
|
|
44
|
+
| 0.1 | Product Vision | `/scaffold:create-vision` | Interactive — requires user input |
|
|
45
|
+
| 0.2 | Product Vision | `/scaffold:review-vision` | Multi-pass vision review |
|
|
46
|
+
| 0.3 | Product Vision | `/scaffold:innovate-vision` | **(optional)** Strategic innovation |
|
|
44
47
|
| 1 | Product Definition | `/scaffold:create-prd` | Interactive — requires user input |
|
|
45
48
|
| 2 | Product Definition | `/scaffold:review-prd` | Multi-pass PRD review |
|
|
46
49
|
| 2.5 | Product Definition | `/scaffold:innovate-prd` | **(optional)** Feature-level innovation |
|
|
47
50
|
| 3 | Product Definition | `/scaffold:user-stories` | Covers every PRD feature |
|
|
48
51
|
| 4 | Product Definition | `/scaffold:review-user-stories` | Multi-pass story review; depth 4+ adds requirements index |
|
|
49
52
|
| 4.5 | Product Definition | `/scaffold:innovate-user-stories` | **(optional)** UX-level enhancements |
|
|
50
|
-
| 5 | Project Foundation | `/scaffold:beads` | **(optional)** Creates
|
|
53
|
+
| 5 | Project Foundation | `/scaffold:beads` | **(optional)** Creates {{INSTRUCTIONS_FILE}} + task tracking |
|
|
51
54
|
| 6 | Project Foundation | `/scaffold:tech-stack` | Drives all technical decisions |
|
|
52
55
|
| 7 | Project Foundation | `/scaffold:coding-standards` | References tech-stack.md |
|
|
53
56
|
| 8 | Project Foundation | `/scaffold:tdd` | References tech-stack.md + coding-standards.md |
|
|
@@ -78,8 +81,8 @@ Use this skill ONLY when the user asks about:
|
|
|
78
81
|
| 31 | Quality Gates | `/scaffold:security` | Threat model, auth, data protection |
|
|
79
82
|
| 32 | Quality Gates | `/scaffold:review-security` | Reviews security posture |
|
|
80
83
|
| 33 | Platform Parity | `/scaffold:platform-parity-review` | **(optional)** Multi-platform projects |
|
|
81
|
-
| 34 | Consolidation | `/scaffold:
|
|
82
|
-
| 35 | Consolidation | `/scaffold:workflow-audit` | Run AFTER
|
|
84
|
+
| 34 | Consolidation | `/scaffold:claude-md-optimization` | Run BEFORE workflow-audit |
|
|
85
|
+
| 35 | Consolidation | `/scaffold:workflow-audit` | Run AFTER claude-md-optimization |
|
|
83
86
|
| 36 | Planning | `/scaffold:implementation-plan` | Creates full task graph |
|
|
84
87
|
| 37 | Planning | `/scaffold:implementation-plan-review` | Second pass for quality + multi-model validation (depth 4+) |
|
|
85
88
|
| 38 | Validation | `/scaffold:cross-phase-consistency` | Naming, assumptions, interfaces |
|
|
@@ -117,7 +120,7 @@ Use this skill ONLY when the user asks about:
|
|
|
117
120
|
| `/scaffold:new-enhancement` | Add a feature to an existing project |
|
|
118
121
|
| `/scaffold:quick-task` | Create a focused task for a bug fix, refactor, or small improvement |
|
|
119
122
|
| `/scaffold:version-bump` | Bump version and update changelog without tagging or releasing |
|
|
120
|
-
| `/scaffold:release` |
|
|
123
|
+
| `/scaffold:release` | Run the target project's release ceremony with changelog generation and project-specific release artifacts |
|
|
121
124
|
| `/scaffold:prompt-pipeline` | Show the full pipeline reference |
|
|
122
125
|
| `/scaffold:dashboard` | Open visual pipeline dashboard in browser |
|
|
123
126
|
|
|
@@ -135,7 +138,7 @@ create-prd ─→ review-prd │ tech-stack → coding-standards → tdd
|
|
|
135
138
|
↓ │ ↓ │
|
|
136
139
|
user-stories │ project-structure → dev-env-setup │
|
|
137
140
|
↓ │ ↓ │
|
|
138
|
-
review-user-stories ──┐ │ git-workflow →
|
|
141
|
+
review-user-stories ──┐ │ git-workflow → claude-md-optimization │
|
|
139
142
|
│ │ ↓ ↓ │
|
|
140
143
|
│ │ ai-memory-setup workflow-audit │
|
|
141
144
|
│ │ │
|
|
@@ -189,8 +192,11 @@ Steps within the same track that don't depend on each other can run in parallel
|
|
|
189
192
|
6. **Architecture before Specification** — DB, API, UX specs derive from architecture (can parallelize)
|
|
190
193
|
7. **TDD → Review Testing → Operations → Security** — quality gate chain
|
|
191
194
|
8. **Both tracks converge at Implementation Plan** — depends on tdd, operations, security, AND review-architecture
|
|
192
|
-
9. **
|
|
193
|
-
10. **
|
|
195
|
+
9. **Quality Gates before Consolidation** — consolidation verifies all docs including operations/security
|
|
196
|
+
10. **Claude.md Optimization before Workflow Audit** — optimize first, verify second
|
|
197
|
+
11. **Implementation Plan Review before Validation** — 7 checks run after plan review
|
|
198
|
+
12. **All 7 Validation checks before Apply Fixes & Freeze** — freeze requires all findings
|
|
199
|
+
13. **Finalization before Execution** — agents need frozen docs and playbook
|
|
194
200
|
|
|
195
201
|
## Status & Navigation
|
|
196
202
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scaffold-runner
|
|
3
|
-
description: Interactive wrapper for the scaffold CLI that surfaces decision points, manages pipeline execution, and provides a seamless scaffold workflow inside
|
|
3
|
+
description: Interactive wrapper for the scaffold CLI that surfaces decision points, manages pipeline execution, and provides a seamless scaffold workflow inside Claude Code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Scaffold Runner
|
|
@@ -46,9 +46,9 @@ Save the output. This is the full 7-section prompt that includes step instructio
|
|
|
46
46
|
Scan the assembled prompt for user-facing questions. Look for these patterns:
|
|
47
47
|
|
|
48
48
|
**Explicit question markers:**
|
|
49
|
+
- Lines containing `AskUserQuestionTool` or `AskUserQuestion`
|
|
49
50
|
- Lines containing "ask the user" or "ask me"
|
|
50
|
-
- Lines containing
|
|
51
|
-
- Lines that clearly list decision options for the user
|
|
51
|
+
- Lines containing "Use AskUserQuestionTool for these decisions:"
|
|
52
52
|
|
|
53
53
|
**Common decision categories:**
|
|
54
54
|
- **Depth/thoroughness**: "depth level", "how thorough", "exhaustive vs focused"
|
|
@@ -62,11 +62,11 @@ Scan the assembled prompt for user-facing questions. Look for these patterns:
|
|
|
62
62
|
- Group related questions together (don't ask one at a time)
|
|
63
63
|
- Provide the options mentioned in the prompt text
|
|
64
64
|
- Include your recommendation based on the project context
|
|
65
|
-
- If the prompt says
|
|
65
|
+
- If the prompt says "use AskUserQuestionTool for these decisions:" followed by a bulleted list, extract each bullet as a separate question
|
|
66
66
|
|
|
67
67
|
### Step 4: Surface Decisions to the User
|
|
68
68
|
|
|
69
|
-
Present all extracted decision points to the user using
|
|
69
|
+
Present all extracted decision points to the user using AskUserQuestion. Group them into a single call with up to 4 questions. If there are more than 4, batch them into multiple calls.
|
|
70
70
|
|
|
71
71
|
For each decision:
|
|
72
72
|
- Frame it as a clear choice with concrete options
|
|
@@ -95,7 +95,7 @@ Now execute the assembled prompt as your working instructions. This means:
|
|
|
95
95
|
1. Read the assembled prompt output from Step 2
|
|
96
96
|
2. Follow its instructions section by section
|
|
97
97
|
3. Where the prompt says "ask the user about X", substitute the answer from Step 4
|
|
98
|
-
4. Where the prompt
|
|
98
|
+
4. Where the prompt says "use AskUserQuestionTool", use the pre-collected answer instead
|
|
99
99
|
5. Perform all file operations, artifact creation, and validation the prompt describes
|
|
100
100
|
|
|
101
101
|
**Critical: Execute the FULL prompt faithfully.** Don't skip sections, don't summarize, don't take shortcuts. The assembled prompt was carefully constructed with knowledge base content and project context — every section matters.
|
|
@@ -148,7 +148,7 @@ If no prior activity is detected, suggest `single-agent-start` or `multi-agent-s
|
|
|
148
148
|
|
|
149
149
|
## Tool Execution
|
|
150
150
|
|
|
151
|
-
Tools (version-bump, release, version, update, dashboard, prompt-pipeline, session-analyzer, review-pr) are utility commands orthogonal to the pipeline.
|
|
151
|
+
Tools (version-bump, release, version, update, dashboard, prompt-pipeline, session-analyzer, review-code, review-pr, post-implementation-review) are utility commands orthogonal to the pipeline.
|
|
152
152
|
|
|
153
153
|
### Differences from Pipeline Steps
|
|
154
154
|
|
|
@@ -167,7 +167,51 @@ Tools (version-bump, release, version, update, dashboard, prompt-pipeline, sessi
|
|
|
167
167
|
### Accessing Tools
|
|
168
168
|
|
|
169
169
|
- `scaffold run <tool-name>` — run a specific tool
|
|
170
|
-
- `scaffold list --tools` — show available tools (
|
|
170
|
+
- `scaffold list --section tools` — show available tools (compact)
|
|
171
|
+
- `scaffold list --section tools --verbose` — show with argument hints
|
|
172
|
+
- `scaffold list --section tools --format json` — machine-readable output
|
|
173
|
+
|
|
174
|
+
## Tool Listing
|
|
175
|
+
|
|
176
|
+
When the user asks "what tools are available?", "what can I build?", or "show me the tools":
|
|
177
|
+
|
|
178
|
+
1. Run `scaffold list --section tools --format json`
|
|
179
|
+
2. Parse the JSON: `data.tools.build` (build phase steps) and `data.tools.utility` (utility tools)
|
|
180
|
+
3. Render as two grouped sections:
|
|
181
|
+
|
|
182
|
+
**Build Phase (Phase 15)**
|
|
183
|
+
> These are stateless pipeline steps — they appear in `scaffold next` once Phase 14 is complete and can be run repeatedly.
|
|
184
|
+
|
|
185
|
+
| Command | When to Use |
|
|
186
|
+
|---------|-------------|
|
|
187
|
+
| `scaffold run single-agent-start` | Start the autonomous TDD implementation loop — Claude picks up tasks and builds |
|
|
188
|
+
| `scaffold run single-agent-resume` | Resume where you left off after closing Claude Code |
|
|
189
|
+
| `scaffold run multi-agent-start` | Start parallel implementation with multiple agents in worktrees |
|
|
190
|
+
| `scaffold run multi-agent-resume` | Resume parallel agent work after a break |
|
|
191
|
+
| `scaffold run quick-task` | Create a focused task for a bug fix, refactor, or small improvement |
|
|
192
|
+
| `scaffold run new-enhancement` | Add a new feature to an already-scaffolded project |
|
|
193
|
+
|
|
194
|
+
**Utility Tools**
|
|
195
|
+
> These are orthogonal to the pipeline — usable at any time, not tied to pipeline state.
|
|
196
|
+
|
|
197
|
+
| Command | When to Use |
|
|
198
|
+
|---------|-------------|
|
|
199
|
+
| `scaffold run version-bump` | Mark a milestone with a version number without the full release ceremony |
|
|
200
|
+
| `scaffold run release` | Run the target project's release ceremony — changelog plus whatever release artifacts that project defines. Supports `--dry-run`, `current`, and `rollback` |
|
|
201
|
+
| `scaffold run version` | Show the current scaffold version |
|
|
202
|
+
| `scaffold run update` | Update scaffold to the latest version |
|
|
203
|
+
| `scaffold run dashboard` | Open a visual progress dashboard in your browser |
|
|
204
|
+
| `scaffold run prompt-pipeline` | Print the full pipeline reference table |
|
|
205
|
+
| `scaffold run review-code` | Run all 3 code review channels on local code before commit or push |
|
|
206
|
+
| `scaffold run review-pr` | Run all 3 code review channels (Codex CLI, Gemini CLI, Superpowers) on a PR |
|
|
207
|
+
| `scaffold run post-implementation-review` | Full 3-channel codebase review after an AI agent completes all tasks |
|
|
208
|
+
| `scaffold run session-analyzer` | Analyze Claude Code session logs for patterns and insights |
|
|
209
|
+
|
|
210
|
+
**Display rules:**
|
|
211
|
+
- The tool list comes from CLI output (always complete and up-to-date)
|
|
212
|
+
- The "When to Use" column comes from the table above (stable prose)
|
|
213
|
+
- If the CLI returns a tool not in the table above, display it using its `description` field from the CLI output — graceful degradation
|
|
214
|
+
- For verbose detail (`--verbose`), call `scaffold list --section tools --verbose --format json` and add an Arguments column using the `argumentHint` values
|
|
171
215
|
|
|
172
216
|
## Session Preferences
|
|
173
217
|
|
|
@@ -180,6 +224,7 @@ Track these preferences within the current session to avoid re-asking:
|
|
|
180
224
|
| Methodology | "I'm using MVP" | Informs default recommendations |
|
|
181
225
|
| Batch mode | "Run the next 3 steps" | Execute sequentially, surface decisions for each |
|
|
182
226
|
| Compact status | User is mid-pipeline, only cares about remaining work | Default to `scaffold status --compact` |
|
|
227
|
+
| Pre-push review | "Run review-code before committing and pushing" | Remember to insert `scaffold run review-code` before `git push` in build flows |
|
|
183
228
|
|
|
184
229
|
When the user sets a preference, acknowledge it and apply it to subsequent steps. Don't ask about it again unless the context changes.
|
|
185
230
|
|
|
@@ -217,8 +262,9 @@ Respond to these natural language requests:
|
|
|
217
262
|
| "New feature" / "Add enhancement" | `scaffold run new-enhancement <description>` |
|
|
218
263
|
| "Bump version" / "Version bump" | `scaffold run version-bump` |
|
|
219
264
|
| "Create release" / "Release" | `scaffold run release` |
|
|
220
|
-
| "What tools are available?" | `scaffold list --tools
|
|
265
|
+
| "What tools are available?" | Run `scaffold list --section tools --format json`, render as two-section grouped display — see [Tool Listing](#tool-listing) |
|
|
221
266
|
| "Show version" | `scaffold run version` |
|
|
267
|
+
| "Review local code" / "Review before push" / "Review before committing and pushing" | `scaffold run review-code` |
|
|
222
268
|
| "Review PR" / "Run code review" | `scaffold run review-pr` |
|
|
223
269
|
|
|
224
270
|
### Re-running Steps
|
|
@@ -261,18 +307,18 @@ Use the full `scaffold status` (without `--compact`) when the user asks for a co
|
|
|
261
307
|
Some steps behave significantly differently at higher depths. When running these steps, surface the depth choice as a decision point:
|
|
262
308
|
|
|
263
309
|
**`review-user-stories`** — The review step scales with depth:
|
|
264
|
-
- Depth 1-3:
|
|
310
|
+
- Depth 1-3: Claude-only multi-pass review (6 review passes)
|
|
265
311
|
- Depth 4: Adds requirements index (REQ-xxx IDs) and coverage matrix (coverage.json) for formal PRD traceability
|
|
266
|
-
- Depth 5: Adds multi-model dispatch to Codex/Gemini CLI for independent validation, with graceful fallback to
|
|
312
|
+
- Depth 5: Adds multi-model dispatch to Codex/Gemini CLI for independent validation, with graceful fallback to Claude-only enhanced review if CLIs aren't available
|
|
267
313
|
|
|
268
|
-
When running `review-user-stories` at depth 5, check if `codex` or `gemini` CLI is available (`command -v codex`, `command -v gemini`). If neither is available, inform the user that the step will fall back to a
|
|
314
|
+
When running `review-user-stories` at depth 5, check if `codex` or `gemini` CLI is available (`command -v codex`, `command -v gemini`). If neither is available, inform the user that the step will fall back to a Claude-only adversarial self-review — still valuable but less thorough than multi-model review.
|
|
269
315
|
|
|
270
316
|
**`ai-memory-setup`** — Three-tier AI memory configuration:
|
|
271
|
-
- Tier 1 (Modular Rules): Extracts conventions from coding-standards.md, tech-stack.md, git-workflow.md into path-scoped `.
|
|
317
|
+
- Tier 1 (Modular Rules): Extracts conventions from coding-standards.md, tech-stack.md, git-workflow.md into path-scoped `.claude/rules/` files. Always recommended.
|
|
272
318
|
- Tier 2 (Persistent Memory): Configures MCP Knowledge Graph server (`@modelcontextprotocol/server-memory`), lifecycle hooks (PreCompact, Stop), and decision logging in `docs/decisions/`.
|
|
273
319
|
- Tier 3 (External Context): Adds library documentation server (Context7/Nia/Docfork) to prevent API hallucination. Only relevant for projects with external dependencies.
|
|
274
320
|
|
|
275
|
-
The step auto-detects installed MCP servers and presents tier choices as decision points. Brownfield detection: if `.
|
|
321
|
+
The step auto-detects installed MCP servers and presents tier choices as decision points. Brownfield detection: if `.claude/rules/` exists, enters update mode preserving user customizations.
|
|
276
322
|
|
|
277
323
|
**`add-e2e-testing`** — Unified E2E testing step that auto-detects the platform:
|
|
278
324
|
- Reads `docs/tech-stack.md` and `package.json` to determine web (Playwright), mobile (Maestro), or both
|
|
@@ -299,7 +345,7 @@ All review and validation steps now support independent multi-model validation a
|
|
|
299
345
|
- **Codex**: `codex exec --skip-git-repo-check -s read-only --ephemeral "prompt" 2>/dev/null` (NOT bare `codex`)
|
|
300
346
|
- **Gemini**: `NO_BROWSER=true gemini -p "prompt" --output-format json --approval-mode yolo 2>/dev/null`
|
|
301
347
|
|
|
302
|
-
**`NO_BROWSER=true` is required for all Gemini invocations** from
|
|
348
|
+
**`NO_BROWSER=true` is required for all Gemini invocations** from Claude Code's Bash tool. Without it, Gemini's child process relaunch shows a consent prompt that hangs in non-TTY shells.
|
|
303
349
|
|
|
304
350
|
**Auth verification is mandatory before dispatch.** CLI tokens expire mid-session. Before running any review at depth 4-5:
|
|
305
351
|
1. Check Codex auth: `codex login status`
|
|
@@ -311,7 +357,7 @@ When running a review step at depth 4-5:
|
|
|
311
357
|
1. Check CLI availability before dispatching
|
|
312
358
|
2. If both available, run dual-model review for highest quality
|
|
313
359
|
3. If one available, run single-model external review
|
|
314
|
-
4. If neither available, fall back to
|
|
360
|
+
4. If neither available, fall back to Claude-only adversarial self-review
|
|
315
361
|
|
|
316
362
|
The runner should surface the depth choice as a decision point for review steps, noting that depth 4-5 enables multi-model validation if CLIs are available.
|
|
317
363
|
|
|
@@ -350,7 +396,7 @@ Map natural language requests to concrete step lists using `scaffold status` out
|
|
|
350
396
|
| specification | Specifications | Creates interface specs for each system layer: database schema with constraints, API contracts with endpoints and error codes, UX flows with accessibility. Each conditional. | database-schema, review-database, api-contracts, review-api, ux-spec, review-ux |
|
|
351
397
|
| quality | Quality Gates | Reviews testing strategy, generates test skeletons from acceptance criteria, creates eval checks, designs deployment pipeline, and conducts OWASP security review. | review-testing, story-tests, create-evals, operations, review-operations, security, review-security |
|
|
352
398
|
| parity | Platform Parity | Audits documentation for platform-specific gaps across target platforms. Skips for single-platform projects. | platform-parity-review |
|
|
353
|
-
| consolidation | Consolidation | Optimizes
|
|
399
|
+
| consolidation | Consolidation | Optimizes {{INSTRUCTIONS_FILE}} under 200 lines with critical patterns front-loaded, then audits all workflow docs for consistency. | claude-md-optimization, workflow-audit |
|
|
354
400
|
| planning | Planning | Decomposes stories and architecture into concrete tasks scoped to ~150 lines of code and 3 files max, with clear acceptance criteria. | implementation-plan, implementation-plan-review |
|
|
355
401
|
| validation | Validation | Seven cross-cutting audits catching scope creep, dependency cycles, implementability ambiguities, traceability gaps, naming drift, and broken handoffs. | cross-phase-consistency, traceability-matrix, decision-completeness, critical-path-walkthrough, implementability-dry-run, dependency-graph-validation, scope-creep-check |
|
|
356
402
|
| finalization | Finalization | Applies validation findings, freezes docs, creates developer onboarding guide, and writes the implementation playbook agents follow during every coding session. | apply-fixes-and-freeze, developer-onboarding-guide, implementation-playbook |
|
|
@@ -457,7 +503,6 @@ Batch complete: 6/7 steps executed
|
|
|
457
503
|
✓ security — created security review
|
|
458
504
|
✗ review-security — STOPPED: Codex CLI auth expired (needs: ! codex login)
|
|
459
505
|
○ review-architecture — not reached
|
|
460
|
-
```
|
|
461
506
|
|
|
462
507
|
Issues requiring attention:
|
|
463
508
|
1. review-security blocked on Codex auth — run `! codex login` to fix, then "continue batch"
|
|
@@ -617,5 +662,5 @@ When `scaffold rework --advance` reports all steps done (returns `all_done: true
|
|
|
617
662
|
- **Does not modify .scaffold/config.json** — reads only (unless user explicitly asks to change methodology)
|
|
618
663
|
- **Does not invent pipeline steps** — the pipeline defines what runs; this skill executes it
|
|
619
664
|
- **Does not suppress questions** — every decision point gets surfaced. Silent defaults defeat the purpose.
|
|
620
|
-
- **Does not cache preferences across sessions** — each
|
|
665
|
+
- **Does not cache preferences across sessions** — each Claude Code session starts fresh
|
|
621
666
|
- **Does not run steps in parallel** — batch execution is always sequential (one step at a time per ADR-021). Parallel execution is for the implementation phase via separate worktrees.
|
|
@@ -34,7 +34,7 @@ The three channels are:
|
|
|
34
34
|
- `docs/user-stories.md` (required) — user stories with acceptance criteria; organizing manifest for Phase 2
|
|
35
35
|
- `docs/implementation-plan.md` (optional) — implementation tasks; used to cross-check that all planned deliverables were built
|
|
36
36
|
- `docs/coding-standards.md` (required) — coding conventions for review context
|
|
37
|
-
- `docs/architecture.md` (optional) — used for architecture alignment checks
|
|
37
|
+
- `docs/system-architecture.md` (optional) — used for architecture alignment checks
|
|
38
38
|
- `docs/adrs/` (optional) — architecture decision records for alignment checks
|
|
39
39
|
- `docs/tdd-standards.md` (optional) — test coverage expectations
|
|
40
40
|
- `docs/review-standards.md` (optional) — severity definitions and review criteria
|
|
@@ -120,7 +120,7 @@ find . -type f \
|
|
|
120
120
|
|
|
121
121
|
**Read architecture docs (if present):**
|
|
122
122
|
|
|
123
|
-
Read `docs/architecture.md` if it exists. Read all files in `docs/adrs/` if
|
|
123
|
+
Read `docs/system-architecture.md` if it exists. Read all files in `docs/adrs/` if
|
|
124
124
|
the directory exists. Combine into a single architecture context string. If
|
|
125
125
|
neither exists, use an empty string and note "Architecture docs not found."
|
|
126
126
|
|
|
@@ -30,6 +30,13 @@ Print the following reference directly. Do not read any files or run any command
|
|
|
30
30
|
| Install Beads | `npm install -g @beads/bd` or `brew install beads` **(optional)** |
|
|
31
31
|
| Install Playwright MCP | `claude mcp add playwright npx @playwright/mcp@latest` **(optional — web apps only)** |
|
|
32
32
|
|
|
33
|
+
### Phase 0 — Product Vision (`vision`)
|
|
34
|
+
| # | Prompt | Command | Notes |
|
|
35
|
+
|---|--------|---------|-------|
|
|
36
|
+
| 0.1 | **Product Vision** | `/scaffold:create-vision` | Interactive — requires user input |
|
|
37
|
+
| 0.2 | **Review Vision** | `/scaffold:review-vision` | Multi-pass vision review |
|
|
38
|
+
| 0.3 | **Innovate Vision** | `/scaffold:innovate-vision` | **(optional)** Strategic innovation |
|
|
39
|
+
|
|
33
40
|
### Phase 1 — Product Definition (`pre`)
|
|
34
41
|
| # | Prompt | Command | Notes |
|
|
35
42
|
|---|--------|---------|-------|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAQ,MAAM,OAAO,CAAA;AAKhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAgBzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,WAAW,SAAS;IACxB,eAAe,EAAE,OAAO,CAAA;IACxB,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAoBnE,CAAA;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAQ,MAAM,OAAO,CAAA;AAKhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAgBzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,WAAW,SAAS;IACxB,eAAe,EAAE,OAAO,CAAA;IACxB,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAoBnE,CAAA;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CAwNrG;AAED,eAAe,YAAY,CAAA"}
|