bigpowers 2.87.4 β 2.87.5
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/.cursor/rules/align-grid.mdc +109 -0
- package/.cursor/rules/assess-impact.mdc +90 -0
- package/.cursor/rules/audit-code.mdc +183 -0
- package/.cursor/rules/audit-plan.mdc +88 -0
- package/.cursor/rules/build-epic.mdc +104 -0
- package/.cursor/rules/change-request.mdc +120 -0
- package/.cursor/rules/commit-message.mdc +139 -0
- package/.cursor/rules/compose-workflow.mdc +81 -0
- package/.cursor/rules/context7-mcp.mdc +54 -0
- package/.cursor/rules/craft-skill.mdc +195 -0
- package/.cursor/rules/deepen-architecture.mdc +259 -0
- package/.cursor/rules/define-language.mdc +79 -0
- package/.cursor/rules/define-success.mdc +11 -0
- package/.cursor/rules/delegate-task.mdc +90 -0
- package/.cursor/rules/deploy.mdc +197 -0
- package/.cursor/rules/design-interface.mdc +96 -0
- package/.cursor/rules/develop-tdd.mdc +415 -0
- package/.cursor/rules/diagnose-root.mdc +23 -0
- package/.cursor/rules/diagnose-stall.mdc +53 -0
- package/.cursor/rules/dispatch-agents.mdc +117 -0
- package/.cursor/rules/edit-document.mdc +22 -0
- package/.cursor/rules/elaborate-spec.mdc +100 -0
- package/.cursor/rules/enforce-first.mdc +44 -0
- package/.cursor/rules/evolve-skill.mdc +54 -0
- package/.cursor/rules/execute-plan.mdc +60 -0
- package/.cursor/rules/extract-design.mdc +131 -0
- package/.cursor/rules/find-way.mdc +190 -0
- package/.cursor/rules/fix-bug.mdc +66 -0
- package/.cursor/rules/gate-trace.mdc +91 -0
- package/.cursor/rules/generate-allure-report.mdc +284 -0
- package/.cursor/rules/grill-me.mdc +107 -0
- package/.cursor/rules/grill-with-docs.mdc +52 -0
- package/.cursor/rules/guard-git.mdc +230 -0
- package/.cursor/rules/harden-vps.mdc +290 -0
- package/.cursor/rules/hook-commits.mdc +93 -0
- package/.cursor/rules/inspect-quality.mdc +105 -0
- package/.cursor/rules/investigate-bug.mdc +126 -0
- package/.cursor/rules/kickoff-branch.mdc +142 -0
- package/.cursor/rules/maintain-wiki.mdc +63 -0
- package/.cursor/rules/map-codebase.mdc +70 -0
- package/.cursor/rules/migrate-spec.mdc +907 -0
- package/.cursor/rules/model-domain.mdc +231 -0
- package/.cursor/rules/orchestrate-project.mdc +173 -0
- package/.cursor/rules/organize-workspace.mdc +163 -0
- package/.cursor/rules/plan-refactor.mdc +86 -0
- package/.cursor/rules/plan-release.mdc +144 -0
- package/.cursor/rules/plan-tests.mdc +74 -0
- package/.cursor/rules/plan-work.mdc +271 -0
- package/.cursor/rules/publish-package.mdc +337 -0
- package/.cursor/rules/quick-fix.mdc +113 -0
- package/.cursor/rules/release-branch.mdc +301 -0
- package/.cursor/rules/request-review.mdc +112 -0
- package/.cursor/rules/research-first.mdc +86 -0
- package/.cursor/rules/reset-baseline.mdc +20 -0
- package/.cursor/rules/respond-review.mdc +70 -0
- package/.cursor/rules/run-benchmark.mdc +84 -0
- package/.cursor/rules/run-evals.mdc +79 -0
- package/.cursor/rules/run-planning.mdc +100 -0
- package/.cursor/rules/scope-work.mdc +62 -0
- package/.cursor/rules/search-skills.mdc +72 -0
- package/.cursor/rules/security-review.mdc +383 -0
- package/.cursor/rules/seed-conventions.mdc +311 -0
- package/.cursor/rules/session-state.mdc +145 -0
- package/.cursor/rules/setup-environment.mdc +38 -0
- package/.cursor/rules/simple-english.mdc +345 -0
- package/.cursor/rules/simulate-agents.mdc +25 -0
- package/.cursor/rules/slice-tasks.mdc +67 -0
- package/.cursor/rules/smoke-test.mdc +260 -0
- package/.cursor/rules/spike-prototype.mdc +94 -0
- package/.cursor/rules/stocktake-skills.mdc +73 -0
- package/.cursor/rules/survey-context.mdc +134 -0
- package/.cursor/rules/terse-mode.mdc +41 -0
- package/.cursor/rules/trace-requirement.mdc +68 -0
- package/.cursor/rules/using-bigpowers.mdc +110 -0
- package/.cursor/rules/validate-contracts.mdc +285 -0
- package/.cursor/rules/validate-fix.mdc +146 -0
- package/.cursor/rules/verify-work.mdc +190 -0
- package/.cursor/rules/visual-dashboard.mdc +49 -0
- package/.cursor/rules/wire-ci.mdc +380 -0
- package/.cursor/rules/wire-observability.mdc +96 -0
- package/.cursor/rules/write-document.mdc +280 -0
- package/.gemini/extensions/bigpowers/commands/prompts/align-grid.md +109 -0
- package/.gemini/extensions/bigpowers/commands/prompts/assess-impact.md +90 -0
- package/.gemini/extensions/bigpowers/commands/prompts/audit-code.md +183 -0
- package/.gemini/extensions/bigpowers/commands/prompts/audit-plan.md +88 -0
- package/.gemini/extensions/bigpowers/commands/prompts/build-epic.md +104 -0
- package/.gemini/extensions/bigpowers/commands/prompts/change-request.md +120 -0
- package/.gemini/extensions/bigpowers/commands/prompts/commit-message.md +139 -0
- package/.gemini/extensions/bigpowers/commands/prompts/compose-workflow.md +81 -0
- package/.gemini/extensions/bigpowers/commands/prompts/context7-mcp.md +54 -0
- package/.gemini/extensions/bigpowers/commands/prompts/craft-skill.md +195 -0
- package/.gemini/extensions/bigpowers/commands/prompts/deepen-architecture.md +259 -0
- package/.gemini/extensions/bigpowers/commands/prompts/define-language.md +79 -0
- package/.gemini/extensions/bigpowers/commands/prompts/define-success.md +11 -0
- package/.gemini/extensions/bigpowers/commands/prompts/delegate-task.md +90 -0
- package/.gemini/extensions/bigpowers/commands/prompts/deploy.md +197 -0
- package/.gemini/extensions/bigpowers/commands/prompts/design-interface.md +96 -0
- package/.gemini/extensions/bigpowers/commands/prompts/develop-tdd.md +415 -0
- package/.gemini/extensions/bigpowers/commands/prompts/diagnose-root.md +23 -0
- package/.gemini/extensions/bigpowers/commands/prompts/diagnose-stall.md +53 -0
- package/.gemini/extensions/bigpowers/commands/prompts/dispatch-agents.md +117 -0
- package/.gemini/extensions/bigpowers/commands/prompts/edit-document.md +22 -0
- package/.gemini/extensions/bigpowers/commands/prompts/elaborate-spec.md +100 -0
- package/.gemini/extensions/bigpowers/commands/prompts/enforce-first.md +44 -0
- package/.gemini/extensions/bigpowers/commands/prompts/evolve-skill.md +54 -0
- package/.gemini/extensions/bigpowers/commands/prompts/execute-plan.md +60 -0
- package/.gemini/extensions/bigpowers/commands/prompts/extract-design.md +131 -0
- package/.gemini/extensions/bigpowers/commands/prompts/find-way.md +190 -0
- package/.gemini/extensions/bigpowers/commands/prompts/fix-bug.md +66 -0
- package/.gemini/extensions/bigpowers/commands/prompts/gate-trace.md +91 -0
- package/.gemini/extensions/bigpowers/commands/prompts/generate-allure-report.md +284 -0
- package/.gemini/extensions/bigpowers/commands/prompts/grill-me.md +107 -0
- package/.gemini/extensions/bigpowers/commands/prompts/grill-with-docs.md +52 -0
- package/.gemini/extensions/bigpowers/commands/prompts/guard-git.md +230 -0
- package/.gemini/extensions/bigpowers/commands/prompts/harden-vps.md +290 -0
- package/.gemini/extensions/bigpowers/commands/prompts/hook-commits.md +93 -0
- package/.gemini/extensions/bigpowers/commands/prompts/inspect-quality.md +105 -0
- package/.gemini/extensions/bigpowers/commands/prompts/investigate-bug.md +126 -0
- package/.gemini/extensions/bigpowers/commands/prompts/kickoff-branch.md +142 -0
- package/.gemini/extensions/bigpowers/commands/prompts/maintain-wiki.md +63 -0
- package/.gemini/extensions/bigpowers/commands/prompts/map-codebase.md +70 -0
- package/.gemini/extensions/bigpowers/commands/prompts/migrate-spec.md +907 -0
- package/.gemini/extensions/bigpowers/commands/prompts/model-domain.md +231 -0
- package/.gemini/extensions/bigpowers/commands/prompts/orchestrate-project.md +173 -0
- package/.gemini/extensions/bigpowers/commands/prompts/organize-workspace.md +163 -0
- package/.gemini/extensions/bigpowers/commands/prompts/plan-refactor.md +86 -0
- package/.gemini/extensions/bigpowers/commands/prompts/plan-release.md +144 -0
- package/.gemini/extensions/bigpowers/commands/prompts/plan-tests.md +74 -0
- package/.gemini/extensions/bigpowers/commands/prompts/plan-work.md +271 -0
- package/.gemini/extensions/bigpowers/commands/prompts/publish-package.md +337 -0
- package/.gemini/extensions/bigpowers/commands/prompts/quick-fix.md +113 -0
- package/.gemini/extensions/bigpowers/commands/prompts/release-branch.md +301 -0
- package/.gemini/extensions/bigpowers/commands/prompts/request-review.md +112 -0
- package/.gemini/extensions/bigpowers/commands/prompts/research-first.md +86 -0
- package/.gemini/extensions/bigpowers/commands/prompts/reset-baseline.md +20 -0
- package/.gemini/extensions/bigpowers/commands/prompts/respond-review.md +70 -0
- package/.gemini/extensions/bigpowers/commands/prompts/run-benchmark.md +84 -0
- package/.gemini/extensions/bigpowers/commands/prompts/run-evals.md +79 -0
- package/.gemini/extensions/bigpowers/commands/prompts/run-planning.md +100 -0
- package/.gemini/extensions/bigpowers/commands/prompts/scope-work.md +62 -0
- package/.gemini/extensions/bigpowers/commands/prompts/search-skills.md +72 -0
- package/.gemini/extensions/bigpowers/commands/prompts/security-review.md +383 -0
- package/.gemini/extensions/bigpowers/commands/prompts/seed-conventions.md +311 -0
- package/.gemini/extensions/bigpowers/commands/prompts/session-state.md +145 -0
- package/.gemini/extensions/bigpowers/commands/prompts/setup-environment.md +38 -0
- package/.gemini/extensions/bigpowers/commands/prompts/simple-english.md +345 -0
- package/.gemini/extensions/bigpowers/commands/prompts/simulate-agents.md +25 -0
- package/.gemini/extensions/bigpowers/commands/prompts/slice-tasks.md +67 -0
- package/.gemini/extensions/bigpowers/commands/prompts/smoke-test.md +260 -0
- package/.gemini/extensions/bigpowers/commands/prompts/spike-prototype.md +94 -0
- package/.gemini/extensions/bigpowers/commands/prompts/stocktake-skills.md +73 -0
- package/.gemini/extensions/bigpowers/commands/prompts/survey-context.md +134 -0
- package/.gemini/extensions/bigpowers/commands/prompts/terse-mode.md +41 -0
- package/.gemini/extensions/bigpowers/commands/prompts/trace-requirement.md +68 -0
- package/.gemini/extensions/bigpowers/commands/prompts/using-bigpowers.md +110 -0
- package/.gemini/extensions/bigpowers/commands/prompts/validate-contracts.md +285 -0
- package/.gemini/extensions/bigpowers/commands/prompts/validate-fix.md +146 -0
- package/.gemini/extensions/bigpowers/commands/prompts/verify-work.md +190 -0
- package/.gemini/extensions/bigpowers/commands/prompts/visual-dashboard.md +49 -0
- package/.gemini/extensions/bigpowers/commands/prompts/wire-ci.md +380 -0
- package/.gemini/extensions/bigpowers/commands/prompts/wire-observability.md +96 -0
- package/.gemini/extensions/bigpowers/commands/prompts/write-document.md +280 -0
- package/.gemini/extensions/bigpowers/gemini-extension.json +16 -0
- package/.gemini/extensions/bigpowers/hooks/HOOKS.md +43 -0
- package/.gemini/extensions/bigpowers/hooks/before-tool-git-guard.sh +26 -0
- package/.gemini/extensions/bigpowers/hooks/before-tool-rtk.sh +14 -0
- package/.gemini/extensions/bigpowers/hooks/before-tool-token-mgmt.sh +19 -0
- package/.gemini/extensions/bigpowers/hooks/hooks-manifest.json +36 -0
- package/.gemini/extensions/bigpowers/hooks/run-hook.cmd +29 -0
- package/.gemini/extensions/bigpowers/hooks/session-start +48 -0
- package/.gemini/extensions/bigpowers/hooks/settings.json.example +41 -0
- package/.gemini/extensions/bigpowers/skills/align-grid/SKILL.md +111 -0
- package/.gemini/extensions/bigpowers/skills/assess-impact/SKILL.md +92 -0
- package/.gemini/extensions/bigpowers/skills/audit-code/SKILL.md +185 -0
- package/.gemini/extensions/bigpowers/skills/audit-plan/SKILL.md +90 -0
- package/.gemini/extensions/bigpowers/skills/build-epic/SKILL.md +106 -0
- package/.gemini/extensions/bigpowers/skills/change-request/SKILL.md +122 -0
- package/.gemini/extensions/bigpowers/skills/commit-message/SKILL.md +141 -0
- package/.gemini/extensions/bigpowers/skills/compose-workflow/SKILL.md +83 -0
- package/.gemini/extensions/bigpowers/skills/context7-mcp/SKILL.md +56 -0
- package/.gemini/extensions/bigpowers/skills/craft-skill/SKILL.md +197 -0
- package/.gemini/extensions/bigpowers/skills/deepen-architecture/SKILL.md +261 -0
- package/.gemini/extensions/bigpowers/skills/define-language/SKILL.md +81 -0
- package/.gemini/extensions/bigpowers/skills/define-success/SKILL.md +13 -0
- package/.gemini/extensions/bigpowers/skills/delegate-task/SKILL.md +92 -0
- package/.gemini/extensions/bigpowers/skills/deploy/SKILL.md +199 -0
- package/.gemini/extensions/bigpowers/skills/design-interface/SKILL.md +98 -0
- package/.gemini/extensions/bigpowers/skills/develop-tdd/SKILL.md +417 -0
- package/.gemini/extensions/bigpowers/skills/diagnose-root/SKILL.md +25 -0
- package/.gemini/extensions/bigpowers/skills/diagnose-stall/SKILL.md +55 -0
- package/.gemini/extensions/bigpowers/skills/dispatch-agents/SKILL.md +119 -0
- package/.gemini/extensions/bigpowers/skills/edit-document/SKILL.md +24 -0
- package/.gemini/extensions/bigpowers/skills/elaborate-spec/SKILL.md +102 -0
- package/.gemini/extensions/bigpowers/skills/enforce-first/SKILL.md +46 -0
- package/.gemini/extensions/bigpowers/skills/evolve-skill/SKILL.md +56 -0
- package/.gemini/extensions/bigpowers/skills/execute-plan/SKILL.md +62 -0
- package/.gemini/extensions/bigpowers/skills/extract-design/SKILL.md +133 -0
- package/.gemini/extensions/bigpowers/skills/find-way/SKILL.md +192 -0
- package/.gemini/extensions/bigpowers/skills/fix-bug/SKILL.md +68 -0
- package/.gemini/extensions/bigpowers/skills/gate-trace/SKILL.md +93 -0
- package/.gemini/extensions/bigpowers/skills/generate-allure-report/SKILL.md +286 -0
- package/.gemini/extensions/bigpowers/skills/grill-me/SKILL.md +109 -0
- package/.gemini/extensions/bigpowers/skills/grill-with-docs/SKILL.md +54 -0
- package/.gemini/extensions/bigpowers/skills/guard-git/SKILL.md +232 -0
- package/.gemini/extensions/bigpowers/skills/harden-vps/SKILL.md +292 -0
- package/.gemini/extensions/bigpowers/skills/hook-commits/SKILL.md +95 -0
- package/.gemini/extensions/bigpowers/skills/inspect-quality/SKILL.md +107 -0
- package/.gemini/extensions/bigpowers/skills/investigate-bug/SKILL.md +128 -0
- package/.gemini/extensions/bigpowers/skills/kickoff-branch/SKILL.md +144 -0
- package/.gemini/extensions/bigpowers/skills/maintain-wiki/SKILL.md +65 -0
- package/.gemini/extensions/bigpowers/skills/map-codebase/SKILL.md +72 -0
- package/.gemini/extensions/bigpowers/skills/migrate-spec/SKILL.md +909 -0
- package/.gemini/extensions/bigpowers/skills/model-domain/SKILL.md +233 -0
- package/.gemini/extensions/bigpowers/skills/orchestrate-project/SKILL.md +175 -0
- package/.gemini/extensions/bigpowers/skills/organize-workspace/SKILL.md +165 -0
- package/.gemini/extensions/bigpowers/skills/plan-refactor/SKILL.md +88 -0
- package/.gemini/extensions/bigpowers/skills/plan-release/SKILL.md +146 -0
- package/.gemini/extensions/bigpowers/skills/plan-tests/SKILL.md +76 -0
- package/.gemini/extensions/bigpowers/skills/plan-work/SKILL.md +273 -0
- package/.gemini/extensions/bigpowers/skills/publish-package/SKILL.md +339 -0
- package/.gemini/extensions/bigpowers/skills/quick-fix/SKILL.md +115 -0
- package/.gemini/extensions/bigpowers/skills/release-branch/SKILL.md +303 -0
- package/.gemini/extensions/bigpowers/skills/request-review/SKILL.md +114 -0
- package/.gemini/extensions/bigpowers/skills/research-first/SKILL.md +88 -0
- package/.gemini/extensions/bigpowers/skills/reset-baseline/SKILL.md +22 -0
- package/.gemini/extensions/bigpowers/skills/respond-review/SKILL.md +72 -0
- package/.gemini/extensions/bigpowers/skills/run-benchmark/SKILL.md +86 -0
- package/.gemini/extensions/bigpowers/skills/run-evals/SKILL.md +81 -0
- package/.gemini/extensions/bigpowers/skills/run-planning/SKILL.md +102 -0
- package/.gemini/extensions/bigpowers/skills/scope-work/SKILL.md +64 -0
- package/.gemini/extensions/bigpowers/skills/search-skills/SKILL.md +74 -0
- package/.gemini/extensions/bigpowers/skills/security-review/SKILL.md +385 -0
- package/.gemini/extensions/bigpowers/skills/seed-conventions/SKILL.md +313 -0
- package/.gemini/extensions/bigpowers/skills/session-state/SKILL.md +147 -0
- package/.gemini/extensions/bigpowers/skills/setup-environment/SKILL.md +40 -0
- package/.gemini/extensions/bigpowers/skills/simple-english/SKILL.md +347 -0
- package/.gemini/extensions/bigpowers/skills/simulate-agents/SKILL.md +27 -0
- package/.gemini/extensions/bigpowers/skills/slice-tasks/SKILL.md +69 -0
- package/.gemini/extensions/bigpowers/skills/smoke-test/SKILL.md +262 -0
- package/.gemini/extensions/bigpowers/skills/spike-prototype/SKILL.md +96 -0
- package/.gemini/extensions/bigpowers/skills/stocktake-skills/SKILL.md +75 -0
- package/.gemini/extensions/bigpowers/skills/survey-context/SKILL.md +136 -0
- package/.gemini/extensions/bigpowers/skills/terse-mode/SKILL.md +43 -0
- package/.gemini/extensions/bigpowers/skills/trace-requirement/SKILL.md +70 -0
- package/.gemini/extensions/bigpowers/skills/using-bigpowers/SKILL.md +112 -0
- package/.gemini/extensions/bigpowers/skills/validate-contracts/SKILL.md +287 -0
- package/.gemini/extensions/bigpowers/skills/validate-fix/SKILL.md +148 -0
- package/.gemini/extensions/bigpowers/skills/verify-work/SKILL.md +192 -0
- package/.gemini/extensions/bigpowers/skills/visual-dashboard/SKILL.md +51 -0
- package/.gemini/extensions/bigpowers/skills/wire-ci/SKILL.md +382 -0
- package/.gemini/extensions/bigpowers/skills/wire-observability/SKILL.md +98 -0
- package/.gemini/extensions/bigpowers/skills/write-document/SKILL.md +282 -0
- package/.pi/package.json +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
- package/scripts/test-install-helpers.js +31 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dispatch-agents
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: "Dispatch multiple subagents in parallel on independent tasks. No waiting between them β all run concurrently. Use when tasks are truly decoupled and speed matters. Distinct from delegate-task (concurrent here, no inter-task review gate)."
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# story: e09s04
|
|
9
|
+
# story: e45s38
|
|
10
|
+
<!-- story: e45s11 -->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# story: e45s30
|
|
14
|
+
|
|
15
|
+
# Dispatch Agents
|
|
16
|
+
> **HARD GATE** β **HARD GATE** β Agent work must be parallelizable and have explicit synchronization points. Do NOT dispatch work that has hidden dependencies between agents.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Run multiple subagents in parallel on independent tasks. Use when tasks are genuinely decoupled β no agent needs the output of another to start.
|
|
20
|
+
|
|
21
|
+
**Distinct from `delegate-task`:** This skill maximizes throughput via concurrency. There is no sequential review gate between tasks. Use `delegate-task` instead when a single task needs careful two-stage oversight before proceeding.
|
|
22
|
+
|
|
23
|
+
## When to use
|
|
24
|
+
|
|
25
|
+
- Tasks that can run simultaneously without shared state
|
|
26
|
+
- Large plans that can be broken into parallel workstreams
|
|
27
|
+
- Exploration: gather information from multiple parts of the codebase at once
|
|
28
|
+
|
|
29
|
+
## When NOT to use
|
|
30
|
+
|
|
31
|
+
- Task B depends on Task A's output
|
|
32
|
+
- You need to review Task A before Task B can start safely
|
|
33
|
+
- The tasks share a file and concurrent edits would conflict
|
|
34
|
+
|
|
35
|
+
## Process
|
|
36
|
+
|
|
37
|
+
### 1. Confirm independence
|
|
38
|
+
|
|
39
|
+
Before dispatching, verify each task pair is truly independent:
|
|
40
|
+
- No shared files being written
|
|
41
|
+
- No shared state (DB migrations, config files)
|
|
42
|
+
- No ordering dependency between outcomes
|
|
43
|
+
|
|
44
|
+
If any two tasks conflict, sequence them with `delegate-task` or `execute-plan` instead.
|
|
45
|
+
|
|
46
|
+
## Subagent depth tiers (e45s30)
|
|
47
|
+
|
|
48
|
+
Map `effort:` frontmatter and story `risk:` to prompt depth β do not send `minimal_decisive` agents a `full_maturity` brief.
|
|
49
|
+
|
|
50
|
+
| Tier | When | Brief shape | Token budget |
|
|
51
|
+
|------|------|-------------|----------------|
|
|
52
|
+
| `full_maturity` | `effort: heavy`, `risk: P0`, security-sensitive diffs | Full `task_brief` + CONVENTIONS excerpts + threat model if present | Full envelope |
|
|
53
|
+
| `standard` | `effort: standard`, `risk: P1`β`P2` | Standard `task_brief` fields below | Default |
|
|
54
|
+
| `minimal_decisive` | `effort: light`, `risk: P3`, read-only exploration | `goal` + `verify` + `in_scope` only | β€15 lines |
|
|
55
|
+
|
|
56
|
+
Record `depth: <tier>` in the Agent tool description when dispatching.
|
|
57
|
+
|
|
58
|
+
### 2. Write typed task briefs (Orca message protocol)
|
|
59
|
+
|
|
60
|
+
Before writing briefs, read `specs/state.yaml` if it exists β each agent gets only the decisions relevant to its task, nothing else.
|
|
61
|
+
|
|
62
|
+
Every inter-agent message uses a **typed envelope** β no freeform prose between waves:
|
|
63
|
+
|
|
64
|
+
| `type` | When | Required fields |
|
|
65
|
+
|--------|------|-----------------|
|
|
66
|
+
| `task_brief` | Dispatch | `task_id`, `goal`, `in_scope`, `out_of_bounds`, `verify`, `prior_decisions` |
|
|
67
|
+
| `checkpoint` | Mid-wave progress | `task_id`, `status` (`running`\|`blocked`), `comment` (one line) |
|
|
68
|
+
| `result` | Agent return | `task_id`, `exit` (`pass`\|`fail`), `summary`, `verify_output` |
|
|
69
|
+
| `circuit_open` | 3 consecutive failures | `task_id`, `failures` (3), `escalate_to` (`user`) |
|
|
70
|
+
|
|
71
|
+
Example `task_brief` (each agent starts cold β brief size directly controls token cost and hallucination risk):
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
type: task_brief
|
|
75
|
+
task_id: agent-1
|
|
76
|
+
goal: [one sentence β what success looks like]
|
|
77
|
+
in_scope: [explicit file or module list]
|
|
78
|
+
out_of_bounds: [what NOT to touch]
|
|
79
|
+
verify: [runnable command]
|
|
80
|
+
prior_decisions: [relevant entries from specs/state.yaml β omit if none]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Emit **`checkpoint`** comments when an agent is slow or blocked β one line, no stack traces. Parent reads checkpoints before spawning follow-ups.
|
|
84
|
+
|
|
85
|
+
Do not include the full conversation, full file contents, or decisions unrelated to this agent's task.
|
|
86
|
+
|
|
87
|
+
### 3. Circuit breaker + iterative retrieval (max 3 cycles)
|
|
88
|
+
|
|
89
|
+
Track **consecutive failures per `task_id`**. On the **3rd consecutive `result.exit: fail`** for the same task, emit `type: circuit_open` and **stop dispatching** that task β escalate to user with the three failure summaries. Reset counter on any `pass`.
|
|
90
|
+
|
|
91
|
+
After each wave completes:
|
|
92
|
+
1. **Dispatch** β run parallel agents with typed `task_brief` envelopes.
|
|
93
|
+
2. **Evaluate** β read `result` messages; list gaps vs goal; honor open circuits.
|
|
94
|
+
3. **Refine** β tighten briefs or spawn follow-up agents (max **3 cycles** total).
|
|
95
|
+
|
|
96
|
+
Stop when gaps empty, circuit opens, or cycle 3 reached β escalate to user. If agents go silent without returning, invoke `diagnose-stall` before spawning another wave.
|
|
97
|
+
|
|
98
|
+
### 4. Dispatch in parallel
|
|
99
|
+
|
|
100
|
+
Spawn all agents in a single message using multiple Agent tool calls. Each agent gets its own complete brief.
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Agent 1: brief for task A
|
|
104
|
+
Agent 2: brief for task B
|
|
105
|
+
Agent 3: brief for task C
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 5. Collect and review results
|
|
109
|
+
|
|
110
|
+
When all agents return: review each result, run verify commands, check diffs for scope violations.
|
|
111
|
+
|
|
112
|
+
### 6. Integrate
|
|
113
|
+
|
|
114
|
+
Merge accepted results. Resolve conflicts manually; note in summary.
|
|
115
|
+
|
|
116
|
+
Report: which tasks succeeded, which need revision, overall verify status.
|
|
117
|
+
|
|
118
|
+
## Verify
|
|
119
|
+
β verify: `test -f skills/dispatch-agents/SKILL.md && test -f scripts/lib/completeness-critic.sh`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: edit-document
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: "Edit and improve documents by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, restructure, or improve any document β including specs/ files, articles, READMEs, or technical writing."
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Edit Document
|
|
9
|
+
|
|
10
|
+
**Distinct from `write-document`:** Use this skill when the document already exists and needs restructuring, clarity, or prose improvements. Use `write-document` to create a document from scratch.
|
|
11
|
+
|
|
12
|
+
> **HARD GATE** β Document edits must preserve intent and accuracy. Do NOT remove or contradict existing content without understanding why it was written. Check git history for context.
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. First, divide the document into sections based on its headings. Think about the main points made in each section.
|
|
17
|
+
|
|
18
|
+
Consider that information is a directed acyclic graph, and that pieces of information can depend on other pieces of information. Make sure that the order of the sections and their contents respects these dependencies.
|
|
19
|
+
|
|
20
|
+
Confirm the sections with the user.
|
|
21
|
+
|
|
22
|
+
2. For each section:
|
|
23
|
+
|
|
24
|
+
2a. Rewrite the section to improve clarity, coherence, and flow. Use maximum 240 characters per paragraph.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: elaborate-spec
|
|
3
|
+
model: opus
|
|
4
|
+
description: "Refine a rough idea into a clear, detailed specification through dialogue. Does not produce code. Use when user has a vague idea, wants to think through a feature before planning, or needs to turn \"I want X\" into a concrete spec."
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Elaborate Spec
|
|
9
|
+
|
|
10
|
+
Turn a rough idea into a clear specification through focused dialogue. No code is written during this skill β the output is shared understanding and a refined problem statement.
|
|
11
|
+
|
|
12
|
+
> **HARD GATE** β Do NOT proceed with planning or implementation until the problem space is clearly understood. Success criteria, actors, and scope must be explicit before drafting a plan.
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### 1. Listen first
|
|
17
|
+
|
|
18
|
+
Let the user describe their idea in their own words. Do not interrupt or redirect. Take notes on:
|
|
19
|
+
- The core problem they're trying to solve
|
|
20
|
+
- Who is affected (actors)
|
|
21
|
+
- What success looks like to them
|
|
22
|
+
- Any constraints they've already identified
|
|
23
|
+
|
|
24
|
+
### 2. Ask clarifying questions
|
|
25
|
+
|
|
26
|
+
Ask one question at a time. Work through these areas:
|
|
27
|
+
|
|
28
|
+
**Problem clarity**
|
|
29
|
+
- What is the current behavior (or lack of behavior) that prompted this?
|
|
30
|
+
- Who experiences this problem? How often?
|
|
31
|
+
- What's the cost of not solving it?
|
|
32
|
+
|
|
33
|
+
**Solution boundaries**
|
|
34
|
+
- What is explicitly IN scope?
|
|
35
|
+
- What is explicitly OUT of scope?
|
|
36
|
+
- Are there existing solutions (internal or external) this replaces or integrates with?
|
|
37
|
+
|
|
38
|
+
**Success criteria**
|
|
39
|
+
- How will you know this is done?
|
|
40
|
+
- What does the happy path look like end-to-end?
|
|
41
|
+
- What are the key failure modes to handle?
|
|
42
|
+
|
|
43
|
+
**Constraints**
|
|
44
|
+
- Any performance requirements?
|
|
45
|
+
- Any compatibility constraints (existing APIs, data formats)?
|
|
46
|
+
- Any non-negotiable implementation decisions already made?
|
|
47
|
+
|
|
48
|
+
### 2.5. Multiple Interpretations (HARD GATE)
|
|
49
|
+
|
|
50
|
+
> **HARD GATE** β If the request admits β₯2 valid interpretations, do NOT guess. You must list them and ask the user to choose before proceeding. Proceeding with unresolved ambiguity is a failure of integrity.
|
|
51
|
+
|
|
52
|
+
Present the options clearly:
|
|
53
|
+
> "I see two ways to read this:
|
|
54
|
+
> 1. [Interpretation A] β my recommendation because [reason]
|
|
55
|
+
> 2. [Interpretation B]
|
|
56
|
+
> Which is closer to what you mean?"
|
|
57
|
+
|
|
58
|
+
### 3. Surface hidden assumptions
|
|
59
|
+
|
|
60
|
+
Once the user has answered the main questions, probe for assumptions:
|
|
61
|
+
- "You mentioned X β does that mean Y is also true?"
|
|
62
|
+
- "What happens when Z fails?"
|
|
63
|
+
- "Is this for internal users, external users, or both?"
|
|
64
|
+
|
|
65
|
+
### 4. Synthesize and confirm
|
|
66
|
+
|
|
67
|
+
Summarize your understanding in 3β5 bullet points aligned with [countable-story-format.md](../../docs/countable-story-format.md):
|
|
68
|
+
- The problem (feeds into Β§1 Business narrative)
|
|
69
|
+
- The solution and main flow (feeds into Β§5)
|
|
70
|
+
- The key constraints and alternative flows (feeds into Β§6)
|
|
71
|
+
- The success criteria (feeds into Β§17 Gherkin)
|
|
72
|
+
- What's out of scope (feeds into Β§18)
|
|
73
|
+
|
|
74
|
+
Ask: "Is this an accurate summary? Anything missing or wrong?"
|
|
75
|
+
|
|
76
|
+
### 5. Write specs/planning-context.yaml
|
|
77
|
+
|
|
78
|
+
After the user confirms the summary in step 4, persist the key decisions:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
# specs/planning-context.yaml β written by elaborate-spec; consumed by scope-work and slice-tasks
|
|
82
|
+
feature_name: "<from step 1>"
|
|
83
|
+
problem_statement: "<one paragraph>"
|
|
84
|
+
constraints:
|
|
85
|
+
- "<constraint 1>"
|
|
86
|
+
out_of_scope:
|
|
87
|
+
- "<excluded item 1>"
|
|
88
|
+
key_decisions:
|
|
89
|
+
- decision: "<what was decided>"
|
|
90
|
+
rationale: "<why>"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If `specs/planning-context.yaml` already exists, ask: `"Planning context from a prior session exists. Update it? [Y/n]"`. Overwrite on Y; leave unchanged on N.
|
|
94
|
+
|
|
95
|
+
### 6. Suggest next skill
|
|
96
|
+
|
|
97
|
+
Once the spec is clear, recommend the next step:
|
|
98
|
+
- If domain model needs work β `model-domain`
|
|
99
|
+
- If ready to plan β `plan-release` (creates epic capsules with `epic.yaml` + story `.md` + `-tasks.yaml`) then `plan-work` per story
|
|
100
|
+
- If a spike is needed first β `spike-prototype`
|
|
101
|
+
- If architecture decisions are needed β `deepen-architecture` or `grill-me`
|
|
102
|
+
- If the plan depends on a specific library or API β `grill-me` in docs mode
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enforce-first
|
|
3
|
+
model: haiku
|
|
4
|
+
description: "Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md Β§Tests) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or \"test quality\"."
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Enforce FIRST
|
|
9
|
+
> **HARD GATE** β **HARD GATE** β Before shipping, ALL enforcement checks must pass: lint, typecheck, tests, coverage gates. Do NOT disable or skip checks to get to green.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Apply the F.I.R.S.T rubric per CONVENTIONS.md Β§Tests to evaluate and improve tests.
|
|
13
|
+
|
|
14
|
+
This skill is typically invoked internally by `develop-tdd` during the test-writing phase. It can also be run standalone on an existing test suite.
|
|
15
|
+
|
|
16
|
+
## Modes
|
|
17
|
+
|
|
18
|
+
- Default: full F.I.R.S.T audit (all 5 criteria)
|
|
19
|
+
- --quick: Check Fast, Independent, and Self-Validating criteria only (per CONVENTIONS.md Β§Tests). Used by build-epic step 6 as a mechanical gate after audit-code. Skips Repeatable and Timely which require contextual judgment.
|
|
20
|
+
|
|
21
|
+
## The F.I.R.S.T Rubric
|
|
22
|
+
|
|
23
|
+
See CONVENTIONS.md Β§Tests for the canonical F.I.R.S.T rubric definition, checklists, and fix patterns.
|
|
24
|
+
|
|
25
|
+
Mechanical self-check (runs before reporting audit complete):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
grep -q '## Tests (F.I.R.S.T' CONVENTIONS.md
|
|
29
|
+
grep -qE 'Fast|Independent|Repeatable|Self-Validating|Timely' CONVENTIONS.md
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Each criterion must be explicitly addressed in the audit report with pass/fail per test file reviewed.
|
|
33
|
+
|
|
34
|
+
## Applying the rubric
|
|
35
|
+
|
|
36
|
+
For each failing criterion:
|
|
37
|
+
1. Identify which tests violate it
|
|
38
|
+
2. Describe the fix
|
|
39
|
+
3. Apply the fix
|
|
40
|
+
4. Re-run the suite to confirm it still passes
|
|
41
|
+
|
|
42
|
+
Report: "F.I.R.S.T audit complete. X criteria passed, Y fixed."
|
|
43
|
+
|
|
44
|
+
## Verify
|
|
45
|
+
|
|
46
|
+
β verify: `grep -q '## Tests (F.I.R.S.T' CONVENTIONS.md && grep -qE 'Self-Validating|Repeatable' skills/enforce-first/SKILL.md && echo OK`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: evolve-skill
|
|
3
|
+
model: opus
|
|
4
|
+
description: "Benchmark-gated skill evolution β consume bigpowers-benchmark report, propose plan-work change, edit skill via craft-skill, re-run benchmark, record ADR. Use when a skill underperforms on benchmark or stocktake finds systemic gap."
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# story: e23s03
|
|
9
|
+
|
|
10
|
+
# story: e09s01
|
|
11
|
+
# story: e09s05
|
|
12
|
+
|
|
13
|
+
# Evolve Skill
|
|
14
|
+
|
|
15
|
+
> **HARD GATE** β No skill change ships without benchmark score β₯ pre-change baseline. Learning is measured and versioned β never implicit.
|
|
16
|
+
|
|
17
|
+
## Loop
|
|
18
|
+
|
|
19
|
+
1. **Regression gate** β Run `bash scripts/run-verification-gates.sh` to catch mechanical regressions (compliance, sync pipeline, size budget) before spending time on benchmark evals. If golden suite fails, fix regressions first β they are pre-requisites for any capability improvement.
|
|
20
|
+
2. **Establish baseline** β Run `run-benchmark <skill> --baseline`. If no definition exists at `specs/benchmarks/<skill>.yaml`, create one following `specs/benchmarks/SCHEMA.md` first. Save report path in `state.yaml`. If `specs/benchmarks/reports/BASELINE-<skill>.yaml` already exists, skip this step.
|
|
21
|
+
|
|
22
|
+
3. **Identify gap** β Read the baseline report (`specs/benchmarks/reports/BASELINE-<skill>.yaml`). Find scenarios with `result: FAIL` or low `pass_at_k`. This is the measurable gap.
|
|
23
|
+
|
|
24
|
+
4. **`plan-work`** β Write a minimal change proposal targeting the failing scenarios. Include verify commands.
|
|
25
|
+
|
|
26
|
+
5. **Edit** via `craft-skill` / direct SKILL.md edit; run `bash scripts/sync-skills.sh`.
|
|
27
|
+
|
|
28
|
+
6. **Re-run benchmark** β `run-benchmark <skill>`. Compare new `pass_at_k` against baseline.
|
|
29
|
+
- **IMPROVED or STABLE** β advance to step 6.
|
|
30
|
+
- **REGRESSION** (`new pass_at_k < baseline`) β revert the change and loop back to step 3.
|
|
31
|
+
|
|
32
|
+
7. **Record decision** β Write `specs/adr/NNNN-evolve-<skill>.md` with before/after `pass_at_k` scores. Update `session-state`.
|
|
33
|
+
|
|
34
|
+
## Verify
|
|
35
|
+
|
|
36
|
+
β verify: `test -d specs/benchmarks && test -f skills/run-benchmark/SKILL.md`
|
|
37
|
+
|
|
38
|
+
See [REFERENCE.md](REFERENCE.md) for ADR template.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<!-- story: e31s07 -->
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
# Evolve Skill β ADR snippet
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## ADR-XXXX: Evolve <skill-name>
|
|
49
|
+
|
|
50
|
+
**Status:** Accepted
|
|
51
|
+
**Benchmark:** before X% / after Y%
|
|
52
|
+
**Change:** one-sentence summary
|
|
53
|
+
**Evidence:** path/to/benchmark-report.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Benchmark repo: `bigpowers-benchmark` β resolve the local clone on this machine; clone it from wherever your fork lives if absent. Never assume a hard-coded absolute path or a specific owner.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execute-plan
|
|
3
|
+
model: haiku
|
|
4
|
+
description: "Batch-execute tasks from the active epic capsule sequentially, with a human checkpoint after each step. Use when user has an approved plan and wants step-by-step oversight."
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Execute Plan
|
|
9
|
+
|
|
10
|
+
Execute tasks from the **active epic** (`specs/epics/eNN-slug/epic.yaml` story `tasks[]`) one at a time, showing evidence after each step before proceeding.
|
|
11
|
+
|
|
12
|
+
> **HARD GATE** β Do NOT proceed if on `main` or `master`. Run `kickoff-branch` first.
|
|
13
|
+
>
|
|
14
|
+
> **HARD GATE** β Active epic must exist with runnable `verify` on each task. If missing, run `plan-release` then `plan-work` or `build-epic`.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### 1. Read the plan
|
|
19
|
+
|
|
20
|
+
Read `specs/state.yaml` (`active_epic`, `active_story`) and the matching `specs/epics/*/epic.yaml`. Parse `depends-on` in task descriptions for execution waves.
|
|
21
|
+
|
|
22
|
+
> **CONTEXT ISOLATION** β Spawn each skill with a **fresh context window**. Pass decisions only through `specs/state.yaml` `handoff` β never rely on prior chat history.
|
|
23
|
+
|
|
24
|
+
Confirm with the user: step count, skip/reorder, stop-after step.
|
|
25
|
+
|
|
26
|
+
### 2. Execute step by step
|
|
27
|
+
|
|
28
|
+
For each task in the active story:
|
|
29
|
+
|
|
30
|
+
**a. Announce** β task `desc` and `verify` command.
|
|
31
|
+
|
|
32
|
+
**b. Execute** β code or `delegate-task` / `dispatch-agents` for waves.
|
|
33
|
+
|
|
34
|
+
**c. Run verify** β must be green before advancing.
|
|
35
|
+
|
|
36
|
+
**d. Log** β non-obvious decisions in `specs/state.yaml` under `decisions[]` or `handoff` block.
|
|
37
|
+
|
|
38
|
+
**e. Checkpoint** β ask to proceed unless autonomous mode requested.
|
|
39
|
+
|
|
40
|
+
**f. Story UAT** β after last task, run manual verification script from story notes or `verify-work`.
|
|
41
|
+
|
|
42
|
+
On verify failure: fix and re-run; never advance on red.
|
|
43
|
+
|
|
44
|
+
Update `specs/execution-status.yaml` when a story/epic completes (`bash scripts/sync-status-from-epics.sh` or direct edit).
|
|
45
|
+
|
|
46
|
+
### 3. Blockers
|
|
47
|
+
|
|
48
|
+
Report blocker; ask skip/adapt/stop; update epic capsule if plan changes.
|
|
49
|
+
|
|
50
|
+
### 4. Final report
|
|
51
|
+
|
|
52
|
+
Suggest: `verify-work` β `run-evals` β `audit-code` β `simulate-agents` β `commit-message` β `release-branch`
|
|
53
|
+
|
|
54
|
+
## Rules
|
|
55
|
+
|
|
56
|
+
- **Loop until behavioral correctness is verified**: if a verify command passes but the observed behavior is still wrong, return to step 1 and run the execution cycle again.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<!-- story: e02s03 -->
|
|
61
|
+
<!-- story: e05s02 -->
|
|
62
|
+
<!-- story: e08s01 -->
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: extract-design
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: "Extract a Google DESIGN.md file from an HTML prototype (claude.ai/design or any styled page) using Puppeteer, producing machine-readable tokens and AI-generated prose. Use when the user has an HTML prototype and wants a DESIGN.md to anchor their project's visual identity, or when seed-conventions has just scaffolded a new project."
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Extract DESIGN.md from HTML
|
|
9
|
+
|
|
10
|
+
> **HARD GATE** β Do NOT write DESIGN.md without Puppeteer dual-pass extraction. Tokens from static HTML (Cheerio, regex, string scanning) are invalid β they miss cascade, custom properties, and Tailwind resolution.
|
|
11
|
+
>
|
|
12
|
+
> **HARD GATE** β Do NOT claim certainty where evidence is thin. Low-confidence color roles, component classifications, and prose assertions MUST be flagged with `<!-- AGENT NOTE: uncertain β validate during grill-me. Evidence: [what was observed] -->`.
|
|
13
|
+
>
|
|
14
|
+
> **HARD GATE** β Do NOT ship DESIGN.md without running `npx @google/design.md lint`. Unvalidated output is unverified output. If lint is unavailable (offline), flag prominently in terminal and in DESIGN.md prose.
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# First run β extract from HTML prototype
|
|
20
|
+
node extract-design/scripts/extract.js --source ./prototype.html
|
|
21
|
+
|
|
22
|
+
# From a published URL
|
|
23
|
+
node extract-design/scripts/extract.js --source https://my-prototype.example.com
|
|
24
|
+
|
|
25
|
+
# With a custom name
|
|
26
|
+
node extract-design/scripts/extract.js --source ./proto.html --name "My Design System"
|
|
27
|
+
|
|
28
|
+
# Update β re-extract from new HTML, diff against existing
|
|
29
|
+
node extract-design/scripts/extract.js --source ./proto-v2.html
|
|
30
|
+
|
|
31
|
+
# Lint-only β validate existing DESIGN.md without re-extraction
|
|
32
|
+
node extract-design/scripts/extract.js --lint-only
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Flow
|
|
36
|
+
|
|
37
|
+
1. **Launch Puppeteer** β dual-pass (light + dark) with retry + timeout. CI flags: `--headless=new --no-sandbox --disable-gpu --disable-dbus --use-gl=angle --use-angle=swiftshader`.
|
|
38
|
+
2. **Collect styles** β `page.evaluate()` collects computed styles from every element. Returns raw JSON to Node.js. Browser = sensor; Node = brain.
|
|
39
|
+
3. **Classify tokens** β modular pipeline: colors (Material 3 roles), typography (scale detection), spacing (tolerance GCD), rounded (clustering), components (visual signature + pseudo-state variants).
|
|
40
|
+
4. **Generate prose** β AI heuristics produce all 8 DESIGN.md sections. Overview and Do's/Don'ts flagged with agent notes.
|
|
41
|
+
5. **Write + validate** β serialize to `specs/tech-architecture/DESIGN_LATEST.md`, run `npx @google/design.md lint`, report to terminal.
|
|
42
|
+
6. **Handoff** β writes `handoff.next_skill: grill-me` to `specs/state.yaml` with uncertain decisions context.
|
|
43
|
+
|
|
44
|
+
## Inputs
|
|
45
|
+
|
|
46
|
+
| Parameter | Required | Description |
|
|
47
|
+
|-----------|----------|-------------|
|
|
48
|
+
| `--source <file\|url>` | First run: yes. Update: optional | HTML prototype path or URL |
|
|
49
|
+
| `--name <string>` | No | Design system name (defaults to `<title>` or directory name) |
|
|
50
|
+
| `--lint-only` | No | Validate existing DESIGN.md without re-extraction |
|
|
51
|
+
|
|
52
|
+
## Output
|
|
53
|
+
|
|
54
|
+
- `specs/tech-architecture/DESIGN_LATEST.md` β replaces `DESIGN_PLAN_LATEST.md` as the canonical design artifact
|
|
55
|
+
- Terminal summary: token counts, component count, lint result, uncertain decisions
|
|
56
|
+
- Structured JSON log to stderr: extraction events, timing, counts
|
|
57
|
+
- `specs/state.yaml` β `handoff.next_skill: grill-me` with context
|
|
58
|
+
|
|
59
|
+
## Error Tiers
|
|
60
|
+
|
|
61
|
+
| Tier | Condition | Response |
|
|
62
|
+
|------|-----------|----------|
|
|
63
|
+
| Fatal | No Chrome, page load timeout after retries | Exit non-zero, suggest fixes |
|
|
64
|
+
| Degraded | Zero colors, zero typography, SPA shell | Write DESIGN.md with degradation warning |
|
|
65
|
+
| Warned | Lint errors, uncertain decisions | Write DESIGN.md, flag in terminal, hand off to grill-me |
|
|
66
|
+
|
|
67
|
+
## Dependencies
|
|
68
|
+
|
|
69
|
+
- **Puppeteer** (Chrome binary) β wrapped behind `BrowserExtractor` interface for testability
|
|
70
|
+
- **`@google/design.md`** (soft, via `npx`) β wrapped behind `DesignValidator` interface. Warns and skips if offline.
|
|
71
|
+
|
|
72
|
+
## verify
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
node extract-design/tests/test-extraction.js
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
See [REFERENCE.md](REFERENCE.md) for extraction algorithms and heuristics.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
# Extract Design β Reference
|
|
83
|
+
|
|
84
|
+
## Extraction Algorithms
|
|
85
|
+
|
|
86
|
+
### Color Classification
|
|
87
|
+
1. Collect unique computed `background-color`, `color`, `border-color` from every DOM element.
|
|
88
|
+
2. Count frequency and context (text vs. bg vs. border vs. button).
|
|
89
|
+
3. Classify using Material 3 roles: surface = largest-area bg, on-surface = most-used text, tertiary = highest-saturation on CTAs, error = reddish.
|
|
90
|
+
4. Surface container levels: luminance-ordered. Hard-cap at 3 unless data supports 5.
|
|
91
|
+
5. Low-confidence β `<!-- AGENT NOTE -->` in Colors prose.
|
|
92
|
+
|
|
93
|
+
### Typography Classification
|
|
94
|
+
1. Collect unique (fontFamily, fontSize, fontWeight, lineHeight, letterSpacing) tuples.
|
|
95
|
+
2. Cluster by fontSize (Β±2px) β type scale.
|
|
96
|
+
3. Detect heading hierarchy from HTML tag + computed size.
|
|
97
|
+
4. Name levels: display-lg, headline-lg/md/sm, title-lg, body-lg/md/sm, label-lg/md/sm.
|
|
98
|
+
5. Parse `<link>` and `@font-face`; warn if computed font differs from declared.
|
|
99
|
+
|
|
100
|
+
### Spacing Classification
|
|
101
|
+
1. Collect unique padding, margin, gap values. Filter: ignore values < 3 occurrences.
|
|
102
|
+
2. Compute tolerance-based GCD (0.5px tolerance).
|
|
103
|
+
3. Declare base unit. Detect half-step if gcd/2 values present β₯3 times.
|
|
104
|
+
4. Map: unitΓ1 β sm, Γ2 β md, Γ4 β lg, Γ8 β xl.
|
|
105
|
+
|
|
106
|
+
### Rounded Classification
|
|
107
|
+
1. Collect unique border-radius values. Cluster (1px tolerance).
|
|
108
|
+
2. Name: none (0), sm (smallest), md (median), lg (large), xl (largest), full (9999px).
|
|
109
|
+
|
|
110
|
+
### Component Detection
|
|
111
|
+
- Button: w<300px, h<64px, bg+radius set, short text. cursor:pointer is bonus.
|
|
112
|
+
- Card: bg+radius+padding set, larger area.
|
|
113
|
+
- Input: `<input>` or `<textarea>` tag.
|
|
114
|
+
- Pseudo-state variants: force :hover, :active, :focus for high-confidence components.
|
|
115
|
+
|
|
116
|
+
### Prose Generation
|
|
117
|
+
Generates all 8 DESIGN.md sections. Overview and Do's/Don'ts flagged with `<!-- AGENT NOTE: Generated from visual analysis. Grill-me should validate. -->`.
|
|
118
|
+
|
|
119
|
+
## Material 3 Token Conventions
|
|
120
|
+
Colors: primary, on-primary, secondary, tertiary, error, surface, on-surface, surface-container-*, outline, background, on-background.
|
|
121
|
+
Typography: display-lg/md/sm, headline-lg/md/sm, title-lg/md/sm, body-lg/md/sm, label-lg/md/sm.
|
|
122
|
+
Rounded: none, xs, sm, md, lg, xl, full.
|
|
123
|
+
|
|
124
|
+
## CI Compatibility
|
|
125
|
+
Chrome flags: `--headless=new --no-sandbox --disable-gpu --disable-dbus --use-gl=angle --use-angle=swiftshader`
|
|
126
|
+
|
|
127
|
+
## Defensive Code
|
|
128
|
+
Retry with backoff (3 attempts, 1s/2s/4s), Timeout (30s page load, 10s pseudo-state), Graceful degradation (Tier 2 on empty extraction).
|
|
129
|
+
|
|
130
|
+
## Known Risks
|
|
131
|
+
- DESIGN.md spec is alpha. Skill pins to current spec.
|
|
132
|
+
- Puppeteer is heavy (~300MB Chrome). Document requirement clearly.
|
|
133
|
+
- Prose quality depends on AI heuristics. grill-me is the validation gate.
|