@hegemonart/get-design-done 1.0.7
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/.claude-plugin/marketplace.json +63 -0
- package/.claude-plugin/plugin.json +54 -0
- package/CHANGELOG.md +221 -0
- package/LICENSE +21 -0
- package/README.md +724 -0
- package/SKILL.md +232 -0
- package/agents/README.md +226 -0
- package/agents/a11y-mapper.md +118 -0
- package/agents/component-taxonomy-mapper.md +88 -0
- package/agents/design-advisor.md +139 -0
- package/agents/design-assumptions-analyzer.md +171 -0
- package/agents/design-auditor.md +383 -0
- package/agents/design-context-builder.md +544 -0
- package/agents/design-context-checker-gate.md +90 -0
- package/agents/design-context-checker.md +260 -0
- package/agents/design-discussant.md +98 -0
- package/agents/design-doc-writer.md +229 -0
- package/agents/design-executor.md +452 -0
- package/agents/design-figma-writer.md +302 -0
- package/agents/design-fixer.md +180 -0
- package/agents/design-integration-checker-gate.md +93 -0
- package/agents/design-integration-checker.md +326 -0
- package/agents/design-pattern-mapper.md +206 -0
- package/agents/design-phase-researcher.md +229 -0
- package/agents/design-plan-checker.md +164 -0
- package/agents/design-planner.md +352 -0
- package/agents/design-reflector.md +175 -0
- package/agents/design-research-synthesizer.md +127 -0
- package/agents/design-verifier-gate.md +97 -0
- package/agents/design-verifier.md +605 -0
- package/agents/gdd-graphify-sync.md +100 -0
- package/agents/gdd-intel-updater.md +88 -0
- package/agents/gdd-learnings-extractor.md +85 -0
- package/agents/motion-mapper.md +103 -0
- package/agents/token-mapper.md +103 -0
- package/agents/visual-hierarchy-mapper.md +95 -0
- package/connections/chromatic.md +247 -0
- package/connections/claude-design.md +190 -0
- package/connections/connections.md +218 -0
- package/connections/figma-writer.md +139 -0
- package/connections/figma.md +146 -0
- package/connections/graphify.md +197 -0
- package/connections/pinterest.md +153 -0
- package/connections/preview.md +173 -0
- package/connections/refero.md +189 -0
- package/connections/storybook.md +280 -0
- package/hooks/budget-enforcer.js +318 -0
- package/hooks/context-exhaustion.js +127 -0
- package/hooks/gdd-read-injection-scanner.js +44 -0
- package/hooks/hooks.json +44 -0
- package/package.json +60 -0
- package/reference/BRANCH-PROTECTION.md +65 -0
- package/reference/DEPRECATIONS.md +41 -0
- package/reference/STATE-TEMPLATE.md +200 -0
- package/reference/accessibility.md +190 -0
- package/reference/anti-patterns.md +336 -0
- package/reference/audit-scoring.md +205 -0
- package/reference/checklists.md +137 -0
- package/reference/config-schema.md +319 -0
- package/reference/debugger-philosophy.md +32 -0
- package/reference/heuristics.md +201 -0
- package/reference/intel-schema.md +266 -0
- package/reference/model-prices.md +37 -0
- package/reference/model-tiers.md +118 -0
- package/reference/motion.md +285 -0
- package/reference/parallelism-rules.md +108 -0
- package/reference/priority-matrix.md +31 -0
- package/reference/project-skills-guide.md +42 -0
- package/reference/review-format.md +107 -0
- package/reference/schemas/config.schema.json +41 -0
- package/reference/schemas/hooks.schema.json +55 -0
- package/reference/schemas/intel.schema.json +191 -0
- package/reference/schemas/marketplace.schema.json +72 -0
- package/reference/schemas/plugin.schema.json +59 -0
- package/reference/shared-preamble.md +82 -0
- package/reference/typography.md +229 -0
- package/scripts/aggregate-agent-metrics.js +144 -0
- package/scripts/apply-branch-protection.sh +75 -0
- package/scripts/bootstrap-manifest.txt +3 -0
- package/scripts/bootstrap.sh +80 -0
- package/scripts/build-intel.cjs +458 -0
- package/scripts/detect-stale-refs.cjs +101 -0
- package/scripts/extract-changelog-section.cjs +57 -0
- package/scripts/release-smoke-test.cjs +169 -0
- package/scripts/rollback-release.sh +42 -0
- package/scripts/run-injection-scanner-ci.cjs +92 -0
- package/scripts/validate-frontmatter.cjs +68 -0
- package/scripts/validate-schemas.cjs +225 -0
- package/scripts/verify-version-sync.cjs +30 -0
- package/skills/add-backlog/SKILL.md +47 -0
- package/skills/analyze-dependencies/SKILL.md +184 -0
- package/skills/apply-reflections/SKILL.md +112 -0
- package/skills/audit/SKILL.md +54 -0
- package/skills/brief/SKILL.md +75 -0
- package/skills/cache-manager/SKILL.md +120 -0
- package/skills/compare/SKILL.md +322 -0
- package/skills/complete-cycle/SKILL.md +33 -0
- package/skills/darkmode/SKILL.md +331 -0
- package/skills/debug/SKILL.md +38 -0
- package/skills/design/SKILL.md +281 -0
- package/skills/discover/SKILL.md +172 -0
- package/skills/discuss/SKILL.md +67 -0
- package/skills/do/SKILL.md +45 -0
- package/skills/explore/SKILL.md +109 -0
- package/skills/extract-learnings/SKILL.md +98 -0
- package/skills/fast/SKILL.md +44 -0
- package/skills/figma-write/SKILL.md +40 -0
- package/skills/graphify/SKILL.md +48 -0
- package/skills/health/SKILL.md +48 -0
- package/skills/help/SKILL.md +76 -0
- package/skills/list-assumptions/SKILL.md +60 -0
- package/skills/map/SKILL.md +112 -0
- package/skills/new-cycle/SKILL.md +35 -0
- package/skills/new-project/SKILL.md +53 -0
- package/skills/next/SKILL.md +42 -0
- package/skills/note/SKILL.md +47 -0
- package/skills/optimize/SKILL.md +120 -0
- package/skills/pause/SKILL.md +41 -0
- package/skills/plan/SKILL.md +251 -0
- package/skills/plant-seed/SKILL.md +47 -0
- package/skills/pr-branch/SKILL.md +31 -0
- package/skills/progress/SKILL.md +60 -0
- package/skills/quick/SKILL.md +43 -0
- package/skills/reapply-patches/SKILL.md +31 -0
- package/skills/reflect/SKILL.md +73 -0
- package/skills/resume/SKILL.md +37 -0
- package/skills/review-backlog/SKILL.md +45 -0
- package/skills/router/SKILL.md +67 -0
- package/skills/scan/SKILL.md +721 -0
- package/skills/settings/SKILL.md +78 -0
- package/skills/ship/SKILL.md +31 -0
- package/skills/sketch/SKILL.md +78 -0
- package/skills/sketch-wrap-up/SKILL.md +88 -0
- package/skills/skill-manifest/SKILL.md +79 -0
- package/skills/spike/SKILL.md +67 -0
- package/skills/spike-wrap-up/SKILL.md +81 -0
- package/skills/stats/SKILL.md +50 -0
- package/skills/style/SKILL.md +193 -0
- package/skills/synthesize/SKILL.md +93 -0
- package/skills/todo/SKILL.md +54 -0
- package/skills/undo/SKILL.md +30 -0
- package/skills/update/SKILL.md +36 -0
- package/skills/verify/SKILL.md +452 -0
- package/skills/warm-cache/SKILL.md +113 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-progress
|
|
3
|
+
description: "Shows current pipeline position and routes to next action. --forensic runs 6-check integrity audit."
|
|
4
|
+
argument-hint: "[--forensic]"
|
|
5
|
+
tools: Read, Bash, Grep, Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /gdd:progress
|
|
9
|
+
|
|
10
|
+
**Role:** Show current position in the pipeline and recommend the next action. With `--forensic`, run a 6-check integrity audit.
|
|
11
|
+
|
|
12
|
+
## Step 1 — Read state
|
|
13
|
+
|
|
14
|
+
Read `.design/STATE.md`. Extract:
|
|
15
|
+
- `stage:`, `cycle:`, `last_checkpoint`
|
|
16
|
+
- `<position>` `task_progress`, `status`
|
|
17
|
+
- D-XX count, open todos from `.design/TODO.md` (count unchecked `- [ ]`)
|
|
18
|
+
|
|
19
|
+
If STATE.md does not exist, print: "No pipeline state. Run `/gdd:brief` first." and stop.
|
|
20
|
+
|
|
21
|
+
## Step 2 — Default output
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
━━━ Pipeline state ━━━
|
|
25
|
+
Stage: <stage> Cycle: <cycle or "default"> Wave: <wave>
|
|
26
|
+
Last checkpoint: <timestamp>
|
|
27
|
+
Decisions: <N> Open todos: <N>
|
|
28
|
+
Next: /gdd:<next-stage>
|
|
29
|
+
━━━━━━━━━━━━━━━━━━━━━━
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Recommend next stage via the same logic as `/gdd:next` (route by which artifacts exist).
|
|
33
|
+
|
|
34
|
+
## Step 3 — Forensic audit (only if `--forensic`)
|
|
35
|
+
|
|
36
|
+
Run these six checks and print PASS/WARN/FAIL per check:
|
|
37
|
+
|
|
38
|
+
1. **Stale artifacts** — compare mtime of `.design/DESIGN.md` against most recent file under `src/` via `ls -lt`. WARN if DESIGN.md is older by >7 days.
|
|
39
|
+
2. **Missing transitions** — STATE.md `stage:` vs artifacts present. e.g. stage=`plan` requires DESIGN-CONTEXT.md. FAIL if expected artifact missing.
|
|
40
|
+
3. **Token drift** — `wc -c .design/DESIGN.md .design/DESIGN-CONTEXT.md`; tokens ≈ bytes/4. WARN if combined >50000 tokens.
|
|
41
|
+
4. **Aged DESIGN-DEBT** — read `.design/DESIGN-DEBT.md`; any item whose line predates HEAD by >14 days (check `git blame` or file mtime fallback) → WARN.
|
|
42
|
+
5. **Cycle alignment** — if `cycle:` is set but `.design/CYCLES.md` has no matching heading → FAIL.
|
|
43
|
+
6. **Connection status** — re-probe figma/refero via ToolSearch; compare to STATE.md `<connections>`. WARN on mismatch.
|
|
44
|
+
|
|
45
|
+
Also scan `.design/SEEDS.md` (if present) for seeds whose trigger keywords match STATE.md or CYCLES.md content; list them as "Seed ready to germinate: <text>".
|
|
46
|
+
|
|
47
|
+
Print:
|
|
48
|
+
```
|
|
49
|
+
━━━ Forensic audit ━━━
|
|
50
|
+
[PASS] Stale artifacts
|
|
51
|
+
[WARN] Token drift — 53,400 tokens combined
|
|
52
|
+
[PASS] Missing transitions
|
|
53
|
+
[PASS] Aged DESIGN-DEBT
|
|
54
|
+
[PASS] Cycle alignment
|
|
55
|
+
[WARN] Connection status — figma now unavailable
|
|
56
|
+
Seeds ready: 0
|
|
57
|
+
━━━━━━━━━━━━━━━━━━━━━━
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## PROGRESS COMPLETE
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-quick
|
|
3
|
+
description: "Run the pipeline with optional agents skipped for speed. Skips: phase-researcher, design-assumptions-analyzer, design-integration-checker. Keeps: planner, executor, verifier, auditor."
|
|
4
|
+
argument-hint: "[--skip <agent-name>] [stage]"
|
|
5
|
+
tools: Read, Task
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /gdd:quick
|
|
9
|
+
|
|
10
|
+
Fast pipeline run. Skips optional-quality agents for speed while keeping the core decision chain (planner → executor → verifier → auditor) intact.
|
|
11
|
+
|
|
12
|
+
## Default skipped agents
|
|
13
|
+
|
|
14
|
+
- `design-phase-researcher` — no external research step
|
|
15
|
+
- `design-assumptions-analyzer` — no assumption surfacing
|
|
16
|
+
- `design-integration-checker` — skipped (verifier still runs)
|
|
17
|
+
|
|
18
|
+
## Default kept agents
|
|
19
|
+
|
|
20
|
+
- `design-planner`, `design-executor`, `design-verifier`, `design-auditor`
|
|
21
|
+
|
|
22
|
+
## Steps
|
|
23
|
+
|
|
24
|
+
1. Parse args:
|
|
25
|
+
- Optional stage name (defaults to full pipeline from the current STATE.md position).
|
|
26
|
+
- `--skip <agent-name>` (repeatable) adds to the skip list.
|
|
27
|
+
2. Read `.design/STATE.md` to determine entry stage if none was passed.
|
|
28
|
+
3. For each stage to execute, spawn the stage skill with a `quick_mode: true` flag and the effective skip list in the spawn context. Stage skills read this flag and route around the listed agents.
|
|
29
|
+
4. After each stage, print: "Stage <name> done. Skipped: <list>."
|
|
30
|
+
5. Final summary prints which agents were skipped across the full run.
|
|
31
|
+
|
|
32
|
+
## Use When
|
|
33
|
+
|
|
34
|
+
- You trust the problem scope (no need for fresh research).
|
|
35
|
+
- The project has a mature DESIGN-CONTEXT.md (assumptions already surfaced).
|
|
36
|
+
- You want verify + audit coverage without integration-checker overhead.
|
|
37
|
+
|
|
38
|
+
## Do Not Use When
|
|
39
|
+
|
|
40
|
+
- First pipeline run in a new project — use the full pipeline.
|
|
41
|
+
- Large or cross-cutting changes — skip risks are higher.
|
|
42
|
+
|
|
43
|
+
## QUICK COMPLETE
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-reapply-patches
|
|
3
|
+
description: "Reapply user modifications to reference/ files after a plugin update. Detects customizations via git diff against pristine baseline."
|
|
4
|
+
argument-hint: "[--dry-run]"
|
|
5
|
+
tools: Read, Write, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# gdd-reapply-patches
|
|
9
|
+
|
|
10
|
+
Re-applies user customizations to `reference/*.md` files after `/gdd:update` resyncs the plugin. Customizations are detected by diffing each `reference/` file against a pristine baseline stored in `.gdd-baseline/`.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. **Detect baseline** — check for `.gdd-baseline/reference/`. If it does not exist, warn the user and offer to initialize it from the current `reference/` state (no diffs will be generated on this run; the next `/gdd:update` will use the new baseline).
|
|
15
|
+
2. **Generate diffs** — for each `reference/*.md`, run `git diff --no-index .gdd-baseline/reference/<file> reference/<file>` (or plain `diff -u`). Non-empty diffs are candidate user patches.
|
|
16
|
+
3. **Review patches** — for each non-empty diff, print the hunk and ask: `Apply this customization to the updated reference/<file>? (yes/no/view)`. `view` shows the full diff; `yes` queues the patch; `no` skips it.
|
|
17
|
+
4. **Apply** — for each confirmed patch, apply it with `patch -p0` or with a targeted `Edit` call. Log every applied patch.
|
|
18
|
+
5. **Refresh baseline** — after applying, copy the current `reference/*.md` tree into `.gdd-baseline/reference/` to record the new pristine-for-this-user state.
|
|
19
|
+
6. **Dry-run** — if `--dry-run` is passed, perform steps 1–3 but do not apply patches or refresh the baseline.
|
|
20
|
+
|
|
21
|
+
## Design note
|
|
22
|
+
|
|
23
|
+
`.gdd-baseline/` is per-install and user-local. It must be gitignored by the host project — it is never committed to the plugin repo.
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
End every invocation with:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
## REAPPLY-PATCHES COMPLETE
|
|
31
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-reflect
|
|
3
|
+
description: "Run design-reflector on demand — produces .design/reflections/<cycle-slug>.md with improvement proposals. Review proposals with /gdd:apply-reflections."
|
|
4
|
+
argument-hint: "[--dry-run] [--cycle <slug>]"
|
|
5
|
+
tools: Read, Write, Task
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /gdd:reflect
|
|
9
|
+
|
|
10
|
+
Run `design-reflector` on demand against the current (or specified) cycle. Produces `.design/reflections/<cycle-slug>.md` with numbered improvement proposals. Every proposal requires explicit user review — nothing is auto-applied.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. **Parse args**: extract `--dry-run` flag and `--cycle <slug>` value.
|
|
15
|
+
|
|
16
|
+
2. **Resolve cycle slug**:
|
|
17
|
+
- If `--cycle <slug>` given: use that slug directly
|
|
18
|
+
- Else: read `.design/STATE.md`, extract the active `cycle:` ID from the `<position>` block
|
|
19
|
+
- If STATE.md not found: abort with "No .design/STATE.md found. Run `/gdd:new-project` first."
|
|
20
|
+
|
|
21
|
+
3. **Build required-reading list**:
|
|
22
|
+
```
|
|
23
|
+
.design/STATE.md
|
|
24
|
+
.design/DESIGN-VERIFICATION.md
|
|
25
|
+
.design/learnings/*.md (glob)
|
|
26
|
+
.design/telemetry/costs.jsonl
|
|
27
|
+
.design/agent-metrics.json
|
|
28
|
+
.design/learnings/question-quality.jsonl
|
|
29
|
+
.design/cycles/<slug>/CYCLE-SUMMARY.md
|
|
30
|
+
```
|
|
31
|
+
Use the resolved slug where `<slug>` appears.
|
|
32
|
+
|
|
33
|
+
4. **Spawn design-reflector**:
|
|
34
|
+
```
|
|
35
|
+
Task("design-reflector", """
|
|
36
|
+
<required_reading>
|
|
37
|
+
@.design/STATE.md
|
|
38
|
+
@.design/DESIGN-VERIFICATION.md
|
|
39
|
+
@.design/agent-metrics.json
|
|
40
|
+
@.design/telemetry/costs.jsonl
|
|
41
|
+
@.design/learnings/question-quality.jsonl
|
|
42
|
+
</required_reading>
|
|
43
|
+
|
|
44
|
+
Cycle slug: <slug>
|
|
45
|
+
Dry-run: <true|false>
|
|
46
|
+
|
|
47
|
+
Produce .design/reflections/<slug>.md with all reflection sections and proposals.
|
|
48
|
+
If dry-run is true, print proposals to stdout only — do not write the file.
|
|
49
|
+
""")
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
5. **After completion**:
|
|
53
|
+
- If `--dry-run`: print the agent output directly; skip steps below
|
|
54
|
+
- Else: read `.design/reflections/<slug>.md`
|
|
55
|
+
- Count proposals by type (scan for `[FRONTMATTER]`, `[REFERENCE]`, `[BUDGET]`, `[QUESTION]`, `[GLOBAL-SKILL]`)
|
|
56
|
+
- Print summary:
|
|
57
|
+
```
|
|
58
|
+
Reflection complete — cycle: <slug>
|
|
59
|
+
Proposals: N total
|
|
60
|
+
[FRONTMATTER] N
|
|
61
|
+
[REFERENCE] N
|
|
62
|
+
[BUDGET] N
|
|
63
|
+
[QUESTION] N
|
|
64
|
+
[GLOBAL-SKILL] N
|
|
65
|
+
|
|
66
|
+
Review and apply: /gdd:apply-reflections
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Do Not
|
|
70
|
+
|
|
71
|
+
- Do not auto-apply any proposal.
|
|
72
|
+
- Do not modify agent files, reference files, or budget.json.
|
|
73
|
+
- Do not run the full audit pipeline — this is a standalone reflection run.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-resume
|
|
3
|
+
description: "Restore session context from .design/HANDOFF.md and route to where work left off."
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
tools: Read, Write, Bash, Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /gdd:resume
|
|
9
|
+
|
|
10
|
+
Inverse of `/gdd:pause`. Reads the handoff file, prints a clear "you were here" summary, and routes to the next command.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. Try to read `.design/HANDOFF.md`. If missing, read `.design/STATE.md` and infer position from the `stage:` and `cycle:` fields.
|
|
15
|
+
2. Print a summary in this exact shape:
|
|
16
|
+
```
|
|
17
|
+
Last paused: <timestamp>
|
|
18
|
+
You were: <in-progress description>
|
|
19
|
+
Next step: <next>
|
|
20
|
+
Active sketch: <path or none>
|
|
21
|
+
Open todos: <N>
|
|
22
|
+
```
|
|
23
|
+
3. **Staleness check** — compare mtime of `.design/` artifacts vs `src/` (via Glob + Bash `stat` when available). If `src/` has commits/changes newer than the last pipeline artifact, warn: "Source has changed since last pipeline run — consider re-running explore or verify."
|
|
24
|
+
4. **Route recommendation** based on stage:
|
|
25
|
+
- `brief` → "Run `@get-design-done brief`"
|
|
26
|
+
- `explore` → "Run `@get-design-done explore`"
|
|
27
|
+
- `plan` → "Run `@get-design-done plan`"
|
|
28
|
+
- `design` → "Run `@get-design-done design` to continue"
|
|
29
|
+
- `verify` → "Run `@get-design-done verify`"
|
|
30
|
+
5. Do not auto-execute the next command — just recommend.
|
|
31
|
+
|
|
32
|
+
## Do Not
|
|
33
|
+
|
|
34
|
+
- Do not delete HANDOFF.md (leave it; next `/gdd:pause` overwrites it).
|
|
35
|
+
- Do not modify STATE.md.
|
|
36
|
+
|
|
37
|
+
## RESUME COMPLETE
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-review-backlog
|
|
3
|
+
description: "Review parked backlog items and promote any to active cycle todo."
|
|
4
|
+
tools: Read, Write, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /gdd:review-backlog
|
|
8
|
+
|
|
9
|
+
**Role:** Walk through parked backlog items and for each ask: promote to this cycle, keep parked, or archive.
|
|
10
|
+
|
|
11
|
+
## Step 1 — Read backlog
|
|
12
|
+
|
|
13
|
+
Read `.design/backlog/BACKLOG.md`. Parse each `## <title>` block with its metadata and body. If no parked items, print "No parked backlog items." and stop.
|
|
14
|
+
|
|
15
|
+
## Step 2 — Loop
|
|
16
|
+
|
|
17
|
+
For each item with `**Status**: parked`:
|
|
18
|
+
|
|
19
|
+
Use `AskUserQuestion`:
|
|
20
|
+
```
|
|
21
|
+
Title: <title>
|
|
22
|
+
Added: <date>
|
|
23
|
+
<truncated body>
|
|
24
|
+
|
|
25
|
+
Promote to this cycle | Keep parked | Archive
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Step 3 — Apply decision
|
|
29
|
+
|
|
30
|
+
- **Promote**: append `- [ ] [YYYY-MM-DD] <title>` under `## P1 — High` in `.design/TODO.md` (create file from the TODO.md skeleton if missing). Update backlog item status to `**Status**: promoted` + `**Promoted**: YYYY-MM-DD`.
|
|
31
|
+
- **Keep parked**: leave unchanged.
|
|
32
|
+
- **Archive**: update status to `**Status**: archived` + `**Archived**: YYYY-MM-DD`.
|
|
33
|
+
|
|
34
|
+
Rewrite `.design/backlog/BACKLOG.md` after each decision so crashes preserve progress.
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
━━━ Backlog review ━━━
|
|
40
|
+
Reviewed: 5
|
|
41
|
+
Promoted: 2 Kept parked: 2 Archived: 1
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## REVIEW-BACKLOG COMPLETE
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-router
|
|
3
|
+
description: "Routes a /gdd command to fast|quick|full path and returns {path, model_tier_overrides, estimated_cost_usd, cache_hits}. Deterministic — no model call. Invoked once at command entry before any Agent spawn. Read by hooks/budget-enforcer.js."
|
|
4
|
+
argument-hint: "<intent-string> [<target-artifacts-csv>]"
|
|
5
|
+
tools: Read, Bash, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# gdd-router
|
|
9
|
+
|
|
10
|
+
## Role
|
|
11
|
+
|
|
12
|
+
You are a deterministic routing skill. You do not spawn agents. You read `.design/budget.json`, `reference/model-prices.md`, `.design/cache-manifest.json` (if present), and the agent frontmatter list, then emit a single JSON object describing the planned spawn graph. The budget-enforcer hook (`hooks/budget-enforcer.js`) consumes your output on every `Agent` tool call.
|
|
13
|
+
|
|
14
|
+
## Invocation Contract
|
|
15
|
+
|
|
16
|
+
- **Input**: `intent-string` (e.g., `"run discover stage on greenfield project"`) + optional comma-separated list of target artifacts (files this command will touch).
|
|
17
|
+
- **Output**: a single JSON object to stdout — nothing else on the line, no prose wrapper:
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"path": "fast",
|
|
21
|
+
"model_tier_overrides": {"design-verifier": "haiku"},
|
|
22
|
+
"estimated_cost_usd": 0.034,
|
|
23
|
+
"cache_hits": ["design-context-builder:abc123"]
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
- `path` enum: `fast` (single Haiku + no checkers), `quick` (Sonnet mappers + Haiku verify), `full` (Opus planners + full quality gates).
|
|
27
|
+
- `model_tier_overrides` merges agent frontmatter `default-tier` with `.design/budget.json.tier_overrides` — budget.json wins per D-04.
|
|
28
|
+
- `estimated_cost_usd` is the sum of per-spawn estimates using the D-06 formula and `reference/model-prices.md`.
|
|
29
|
+
- `cache_hits` is a list of `{agent}:{input-hash}` strings that exist in `.design/cache-manifest.json` and are within TTL; emitting a hit lets the hook short-circuit that spawn per D-05.
|
|
30
|
+
|
|
31
|
+
## Path Selection Heuristic
|
|
32
|
+
|
|
33
|
+
| Signal | path |
|
|
34
|
+
|--------|------|
|
|
35
|
+
| Command is `/gdd:scan`, `/gdd:stats`, `/gdd:health`, `/gdd:help` | `fast` |
|
|
36
|
+
| Command spawns exactly one agent (no orchestration) | `fast` |
|
|
37
|
+
| Command spawns parallel mappers but no planners/auditors (`/gdd:discover` in `--auto` mode) | `quick` |
|
|
38
|
+
| Command spawns planners, auditors, verifiers, or integration-checkers (`/gdd:plan`, `/gdd:verify`, `/gdd:audit`) | `full` |
|
|
39
|
+
| `--dry-run` flag present on any command | downgrade one tier (fast↔quick↔full) |
|
|
40
|
+
|
|
41
|
+
## Cost Estimation Algorithm
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
total = 0
|
|
45
|
+
for each agent in planned spawn graph:
|
|
46
|
+
tier = resolve_tier(agent) # budget.json tier_overrides > agent frontmatter default-tier
|
|
47
|
+
(in_tok, out_tok) = token_range_from_size_budget(agent.size_budget) # from reference/model-prices.md
|
|
48
|
+
(in_rate, out_rate) = price_from_tier(tier)
|
|
49
|
+
total += (in_tok / 1e6) * in_rate + (out_tok / 1e6) * out_rate
|
|
50
|
+
return total
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Cache-Hit Detection
|
|
54
|
+
|
|
55
|
+
Delegate to `skills/cache-manager/SKILL.md` (Plan 10.1-02). The router lists candidate `{agent}:{input-hash}` tuples; the cache-manager confirms freshness against TTL from `budget.json.cache_ttl_seconds`.
|
|
56
|
+
|
|
57
|
+
## Integration Point
|
|
58
|
+
|
|
59
|
+
Every `/gdd:*` SKILL.md's first substantive step is: spawn the router via `Task` or inline invocation; receive the JSON blob; pass it to downstream agents as context so the budget-enforcer hook has the router decision available in tool_input metadata when the first Agent spawn fires.
|
|
60
|
+
|
|
61
|
+
## Failure Modes
|
|
62
|
+
|
|
63
|
+
If `.design/budget.json` is missing, assume defaults from `reference/config-schema.md` per D-12. If `reference/model-prices.md` is missing, emit `estimated_cost_usd: null` and log a warning — do not block.
|
|
64
|
+
|
|
65
|
+
## Non-Goals
|
|
66
|
+
|
|
67
|
+
The router does not: (a) make a model call, (b) write files, (c) enforce budget caps (that's the hook's job), (d) learn from history (Phase 11 reflector territory per D-07).
|