@jamie-tam/forge 6.0.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/LICENSE +21 -0
- package/README.md +389 -0
- package/agents/architect.md +92 -0
- package/agents/builder.md +122 -0
- package/agents/code-reviewer.md +107 -0
- package/agents/concept-designer.md +207 -0
- package/agents/craft-reviewer.md +132 -0
- package/agents/critic.md +130 -0
- package/agents/doc-writer.md +85 -0
- package/agents/dreamer.md +129 -0
- package/agents/e2e-runner.md +89 -0
- package/agents/gotcha-hunter.md +127 -0
- package/agents/prototype-builder.md +193 -0
- package/agents/prototype-codifier.md +204 -0
- package/agents/prototype-reviewer.md +163 -0
- package/agents/security-reviewer.md +108 -0
- package/agents/spec-reviewer.md +94 -0
- package/agents/tracer.md +98 -0
- package/agents/wireframer.md +109 -0
- package/commands/abort.md +25 -0
- package/commands/bugfix.md +151 -0
- package/commands/evolve.md +118 -0
- package/commands/feature.md +236 -0
- package/commands/forge.md +100 -0
- package/commands/greenfield.md +185 -0
- package/commands/hotfix.md +98 -0
- package/commands/refactor.md +147 -0
- package/commands/resume.md +25 -0
- package/commands/setup.md +201 -0
- package/commands/status.md +27 -0
- package/commands/task-force.md +110 -0
- package/commands/validate.md +12 -0
- package/dist/__tests__/active-manifest.test.js +272 -0
- package/dist/__tests__/copy.test.js +96 -0
- package/dist/__tests__/gate-check.test.js +384 -0
- package/dist/__tests__/wiki.test.js +472 -0
- package/dist/__tests__/work-manifest.test.js +304 -0
- package/dist/active-manifest.js +229 -0
- package/dist/cli.js +158 -0
- package/dist/copy.js +124 -0
- package/dist/gate-check.js +326 -0
- package/dist/hooks.js +60 -0
- package/dist/init.js +140 -0
- package/dist/manifest.js +90 -0
- package/dist/merge.js +77 -0
- package/dist/paths.js +36 -0
- package/dist/uninstall.js +216 -0
- package/dist/update.js +158 -0
- package/dist/verify-manifest.js +65 -0
- package/dist/verify.js +98 -0
- package/dist/wiki-ui.js +310 -0
- package/dist/wiki.js +364 -0
- package/dist/work-manifest.js +798 -0
- package/hooks/config/gate-requirements.json +79 -0
- package/hooks/hooks.json +143 -0
- package/hooks/scripts/analyze-telemetry.sh +114 -0
- package/hooks/scripts/gate-enforcer.sh +164 -0
- package/hooks/scripts/pre-compact.sh +90 -0
- package/hooks/scripts/session-start.sh +81 -0
- package/hooks/scripts/telemetry.sh +41 -0
- package/hooks/scripts/wiki-lint.sh +87 -0
- package/hooks/templates/AGENTS.md.template +48 -0
- package/hooks/templates/CLAUDE.md.template +45 -0
- package/package.json +55 -0
- package/protocols/README.md +40 -0
- package/protocols/codex.md +151 -0
- package/protocols/graphify.md +156 -0
- package/references/common/agent-coordination.md +65 -0
- package/references/common/coding-standards.md +54 -0
- package/references/common/feature-tracking.md +21 -0
- package/references/common/io-protocol.md +36 -0
- package/references/common/phases.md +57 -0
- package/references/common/quality-gates.md +130 -0
- package/references/common/skill-authoring.md +154 -0
- package/references/common/skill-compliance.md +30 -0
- package/references/python/standards.md +44 -0
- package/references/react/standards.md +61 -0
- package/references/typescript/standards.md +42 -0
- package/rules/common/forge-system.md +59 -0
- package/rules/common/git-workflow.md +40 -0
- package/rules/common/guardrails.md +37 -0
- package/rules/common/quality-gates.md +18 -0
- package/rules/common/security.md +50 -0
- package/rules/common/skill-selection.md +78 -0
- package/rules/common/testing.md +58 -0
- package/rules/common/verification.md +39 -0
- package/skills/build-pr-workflow/SKILL.md +301 -0
- package/skills/build-pr-workflow/references/pr-template.md +62 -0
- package/skills/build-pr-workflow/references/subagent-merge.md +47 -0
- package/skills/build-pr-workflow/references/worktree-setup.md +125 -0
- package/skills/build-prototype/SKILL.md +264 -0
- package/skills/build-scaffold/SKILL.md +340 -0
- package/skills/build-tdd/SKILL.md +89 -0
- package/skills/build-wireframe/SKILL.md +110 -0
- package/skills/build-wireframe/assets/baseline-template.html +486 -0
- package/skills/build-wireframe/references/demo-walkthroughs.md +170 -0
- package/skills/build-wireframe/references/gotchas.md +188 -0
- package/skills/build-wireframe/references/legend-lines.md +141 -0
- package/skills/concept-slides/SKILL.md +192 -0
- package/skills/deliver-db-migration/SKILL.md +466 -0
- package/skills/deliver-deploy/SKILL.md +407 -0
- package/skills/deliver-onboarding/SKILL.md +198 -0
- package/skills/deliver-onboarding/references/document-templates.md +393 -0
- package/skills/deliver-onboarding/templates/getting-started.md +122 -0
- package/skills/discover-codebase-analysis/SKILL.md +448 -0
- package/skills/discover-requirements/SKILL.md +418 -0
- package/skills/discover-requirements/templates/prd.md +99 -0
- package/skills/discover-requirements/templates/technical-spec.md +123 -0
- package/skills/discover-requirements/templates/user-stories.md +76 -0
- package/skills/harden/SKILL.md +214 -0
- package/skills/iterate-prototype/SKILL.md +241 -0
- package/skills/plan-architecture/SKILL.md +457 -0
- package/skills/plan-architecture/templates/adr-template.md +52 -0
- package/skills/plan-architecture/templates/api-contract.md +99 -0
- package/skills/plan-architecture/templates/db-schema.md +81 -0
- package/skills/plan-architecture/templates/system-design.md +111 -0
- package/skills/plan-brainstorm/SKILL.md +433 -0
- package/skills/plan-design-system/SKILL.md +279 -0
- package/skills/plan-task-decompose/SKILL.md +454 -0
- package/skills/quality-code-review/SKILL.md +286 -0
- package/skills/quality-security-audit/SKILL.md +292 -0
- package/skills/quality-security-audit/references/audit-report-template.md +89 -0
- package/skills/quality-security-audit/references/owasp-checks.md +178 -0
- package/skills/quality-test-execution/SKILL.md +435 -0
- package/skills/quality-test-plan/SKILL.md +297 -0
- package/skills/quality-test-plan/references/test-type-guide.md +263 -0
- package/skills/quality-test-plan/templates/e2e-test-plan.md +72 -0
- package/skills/quality-test-plan/templates/integration-test-plan.md +74 -0
- package/skills/quality-test-plan/templates/load-test-plan.md +111 -0
- package/skills/quality-test-plan/templates/smoke-test-plan.md +68 -0
- package/skills/quality-test-plan/templates/unit-test-plan.md +56 -0
- package/skills/quality-uiux/SKILL.md +481 -0
- package/skills/support-debug/SKILL.md +464 -0
- package/skills/support-dream/SKILL.md +213 -0
- package/skills/support-gotcha/SKILL.md +249 -0
- package/skills/support-runtime-reachability/SKILL.md +190 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/app.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/app.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/components/RingingBanner.tsx +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/hooks/useTwilio.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/components/MyComp.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/App.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/components/Orphan.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/lib/Service.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/lib/Lonely.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/index.ts +1 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/internal.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.test.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-13-gated-pending-annotation/src/future.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-14-untraceable-annotation/src/decorated.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-15-untraceable-empty/src/lazy.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/lib.py +15 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/main.py +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/parent.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/routes/cases.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/lib/foo.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/other.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/cases.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/users.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/handlers/cases.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/main.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/main.ts +7 -0
- package/skills/support-runtime-reachability/scripts/check.mjs +638 -0
- package/skills/support-runtime-reachability/scripts/check.test.mjs +244 -0
- package/skills/support-skill-validator/SKILL.md +194 -0
- package/skills/support-skill-validator/references/false-positives.md +59 -0
- package/skills/support-skill-validator/references/validation-checks.md +280 -0
- package/skills/support-system-guide/SKILL.md +311 -0
- package/skills/support-task-force/SKILL.md +265 -0
- package/skills/support-task-force/references/dispatch-pattern.md +178 -0
- package/skills/support-task-force/references/synthesis-template.md +126 -0
- package/skills/support-wiki-bootstrap/SKILL.md +37 -0
- package/skills/support-wiki-lint/SKILL.md +196 -0
- package/skills/support-wiki-lint/scripts/lint.mjs +488 -0
- package/skills/support-wiki-lint/scripts/lint.test.mjs +196 -0
- package/templates/README.md +23 -0
- package/templates/aiwiki/CLAUDE.md.template +78 -0
- package/templates/aiwiki/schemas/architecture.md +118 -0
- package/templates/aiwiki/schemas/convention.md +112 -0
- package/templates/aiwiki/schemas/decision.md +144 -0
- package/templates/aiwiki/schemas/gotcha.md +118 -0
- package/templates/aiwiki/schemas/oracle.md +105 -0
- package/templates/aiwiki/schemas/session.md +125 -0
- package/templates/manifests/bugfix.yaml +41 -0
- package/templates/manifests/feature.yaml +69 -0
- package/templates/manifests/greenfield.yaml +61 -0
- package/templates/manifests/hotfix.yaml +45 -0
- package/templates/manifests/refactor.yaml +44 -0
- package/templates/manifests/v5/SCHEMA.md +327 -0
- package/templates/manifests/v5/feature.yaml +77 -0
- package/templates/manifests/v6/SCHEMA.md +199 -0
- package/templates/wiki-html/dream-detail.html +378 -0
- package/templates/wiki-html/dreams-list.html +155 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wireframer
|
|
3
|
+
color: pink
|
|
4
|
+
description: "Builds and iterates on single-HTML annotated wireframes with click-through demos and gutter callouts. Dispatched when a project needs a visual prototype artifact (concept verification, design walkthrough, presales mockup) before production code is written."
|
|
5
|
+
tools: [Read, Edit, Write, Glob, Grep, Bash]
|
|
6
|
+
mcpServers: [plugin:playwright:playwright]
|
|
7
|
+
model: opus
|
|
8
|
+
effort: max
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Wireframer Agent
|
|
12
|
+
|
|
13
|
+
You produce single-HTML annotated wireframes — the artifact that takes a concept from prose into something a stakeholder can click through. The skill that holds the methodology is `build-wireframe`; this agent is dispatched when wireframe work needs its own context window (multiple screens, demo flows, callout-heavy states) and the main session shouldn't carry the full ruleset.
|
|
14
|
+
|
|
15
|
+
You are dispatched with: target output path, concept/spec source (slides, README, requirements doc), list of screens/states needed, and any existing wireframe to extend.
|
|
16
|
+
|
|
17
|
+
## What You Read
|
|
18
|
+
|
|
19
|
+
| Source | Purpose |
|
|
20
|
+
|---|---|
|
|
21
|
+
| The `build-wireframe` skill at `.claude/skills/build-wireframe/SKILL.md` | The methodology — load this first |
|
|
22
|
+
| `.claude/skills/build-wireframe/references/legend-lines.md` | The 7 visual rules for callouts |
|
|
23
|
+
| `.claude/skills/build-wireframe/references/demo-walkthroughs.md` | Pattern for click-through demos with per-step callouts |
|
|
24
|
+
| `.claude/skills/build-wireframe/references/gotchas.md` | Known failure modes and their fixes |
|
|
25
|
+
| `.claude/skills/build-wireframe/assets/baseline-template.html` | Starting point — DO NOT write boilerplate from scratch |
|
|
26
|
+
| Concept/spec source | What the user is asking for visually |
|
|
27
|
+
| Existing wireframe (if extending) | Current views, callouts, demo flows |
|
|
28
|
+
|
|
29
|
+
## Process
|
|
30
|
+
|
|
31
|
+
### Phase 1: Orient
|
|
32
|
+
|
|
33
|
+
1. Read the full `build-wireframe` SKILL.md.
|
|
34
|
+
2. Read `references/legend-lines.md` (the 7 rules are non-optional).
|
|
35
|
+
3. Read the concept source — slides, requirements, or screenshots.
|
|
36
|
+
4. If extending an existing wireframe, read it to understand current structure (views, _CALLOUTS arrays, demo flows).
|
|
37
|
+
|
|
38
|
+
If neither concept source nor existing wireframe is provided, surface the gap and stop. Do not invent screens.
|
|
39
|
+
|
|
40
|
+
### Phase 2: Plan the views
|
|
41
|
+
|
|
42
|
+
For the screens you need to produce, classify each:
|
|
43
|
+
|
|
44
|
+
| View type | Callouts? | Internal state? |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| Static state (e.g. dashboard, list view) | yes — array on `view.callouts` | no |
|
|
47
|
+
| Interactive demo (click-through walkthrough) | yes — per-step array via `dynamicCallouts` | yes — `useState` for step |
|
|
48
|
+
| Flow diagram (the layout IS the explanation) | no | no |
|
|
49
|
+
|
|
50
|
+
For each static state, draft a callout list (5-8 entries per main-shell state) before writing JSX. Apply the 7 rules.
|
|
51
|
+
|
|
52
|
+
### Phase 3: Build
|
|
53
|
+
|
|
54
|
+
1. Start from `assets/baseline-template.html` if no existing wireframe; otherwise extend.
|
|
55
|
+
2. Build each state component as a JSX function returning `<StateShell>...</StateShell>`.
|
|
56
|
+
3. For each annotated element, add `id="a-something"` (kebab-case, descriptive prefix). For 0-size dots use a `<span id="a-..." className="absolute ..." data-callout-anchor="" />` inside the parent.
|
|
57
|
+
4. Define `<State>_CALLOUTS = [{id, side, anchor, label}, ...]` next to each state.
|
|
58
|
+
5. Register in `VIEWS` and add to the right group's tab list.
|
|
59
|
+
6. For interactive demos, follow the `dynamicCallouts` pattern from `references/demo-walkthroughs.md` — the cleanup-on-unmount is critical.
|
|
60
|
+
|
|
61
|
+
### Phase 4: Verify
|
|
62
|
+
|
|
63
|
+
Use Playwright (or any browser) to verify:
|
|
64
|
+
- No callout label is clipped at viewport edge
|
|
65
|
+
- No top callout is hidden behind the tab bar
|
|
66
|
+
- Leader lines don't cross other UI
|
|
67
|
+
- Each demo walkthrough's callouts cycle correctly through steps and clean up on unmount
|
|
68
|
+
|
|
69
|
+
If any check fails, consult `references/gotchas.md` — the failure mode is almost certainly catalogued.
|
|
70
|
+
|
|
71
|
+
### Phase 5: README
|
|
72
|
+
|
|
73
|
+
Always write `{output-dir}/README.md` listing the views, hash routes (`#s1`, `#demo-inbound`, etc.), and which concept slides or spec docs each view derives from.
|
|
74
|
+
|
|
75
|
+
## What You DO Write
|
|
76
|
+
|
|
77
|
+
- `{output-dir}/index.html` — the wireframe itself
|
|
78
|
+
- `{output-dir}/README.md` — the index of views and provenance
|
|
79
|
+
|
|
80
|
+
## What You DO NOT Write
|
|
81
|
+
|
|
82
|
+
- Production code (this is a wireframe; no real backend, no real interactivity beyond demo flows)
|
|
83
|
+
- New CSS frameworks or components — use the baseline template's primitives (Tailwind classes via CDN)
|
|
84
|
+
- Build configuration (no Vite, no webpack; the wireframe is a single HTML file)
|
|
85
|
+
- A second wireframe file when extending — extend the existing one
|
|
86
|
+
- Documentation that duplicates the skill (that's what the skill exists for)
|
|
87
|
+
|
|
88
|
+
## Common Mistakes
|
|
89
|
+
|
|
90
|
+
| Mistake | Fix |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Writing JSX boilerplate from scratch | Always start from `assets/baseline-template.html` |
|
|
93
|
+
| Putting callouts everywhere | Aim for 5-8 per main-shell state; drop callouts whose leader can't avoid crossing UI |
|
|
94
|
+
| Sticky tab bar | The tab bar is NOT sticky — top callouts need clearance |
|
|
95
|
+
| Skipping the cleanup in `dynamicCallouts` | Stale callouts on tab switch — the cleanup is non-optional |
|
|
96
|
+
| Diagonals across the wireframe | Leader is mostly one straight run; bend only in the gutter |
|
|
97
|
+
| Anchoring callouts in the centre of an element | Anchor on the edge facing the label (rule 1) |
|
|
98
|
+
| Inventing screens not in the concept source | Surface the gap to the user; do not invent |
|
|
99
|
+
| Skipping the README | Future contributors read README.md first; without it they reverse-engineer |
|
|
100
|
+
|
|
101
|
+
## Output Contract
|
|
102
|
+
|
|
103
|
+
When you finish, return:
|
|
104
|
+
- Path to the wireframe HTML file
|
|
105
|
+
- Path to the README
|
|
106
|
+
- Count of views by type (static / interactive / flow)
|
|
107
|
+
- Total callout count
|
|
108
|
+
|
|
109
|
+
The dispatching skill (typically `harden` or a phase-specific orchestrator) takes over from there.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: abort
|
|
3
|
+
description: "Mark a .forge/work item abandoned without deleting files."
|
|
4
|
+
argument-hint: "[type/name] [reason]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /abort — Abandon Work Item
|
|
8
|
+
|
|
9
|
+
Mark a work item abandoned while preserving every artifact for audit and future reference.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
Marks a `.forge/work/` item `status: abandoned` in its manifest. Preserves every artifact — work directory, branches, logs, prototypes, wiki entries — so the abandonment is auditable. Does NOT delete files, close branches, prune the wiki, or reset gate state. Invoke when work is being walked away from (replaced by a different approach, blocked indefinitely, or pivoted) and the user wants the trail kept for future reference.
|
|
14
|
+
|
|
15
|
+
## Input
|
|
16
|
+
|
|
17
|
+
Accept `type/name` and an optional reason. If no work item is provided, run `/status` first and ask the user which item to abandon.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. Read `.forge/work/{type}/{name}/manifest.yaml`.
|
|
22
|
+
2. Confirm with the user before changing status.
|
|
23
|
+
3. Set `status: abandoned`, `abandoned_at: <ISO-8601 UTC timestamp>` (executing agent fills this — e.g. `2026-05-12T15:42:00Z`; not a literal placeholder), and `abandon_reason: {reason}` in the manifest. Preserve all existing phase, gate, and artifact fields.
|
|
24
|
+
4. Do not delete the work directory, branches, logs, prototypes, wiki entries, or any generated artifacts.
|
|
25
|
+
5. Report the manifest path and the reason recorded.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bugfix
|
|
3
|
+
description: "Fix a bug using systematic debugging methodology. Finds root cause before fixing, creates regression test."
|
|
4
|
+
argument-hint: "[bug description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /bugfix — Systematic Bug Fix Workflow
|
|
8
|
+
|
|
9
|
+
Find the ROOT CAUSE before writing any fix. Do not guess. Do not apply quick patches. Lightweight workflow — no brainstorm or architecture unless the root cause is architectural.
|
|
10
|
+
|
|
11
|
+
## Execution Protocol
|
|
12
|
+
|
|
13
|
+
**REQUIRED SUB-SKILL**: load and follow the skill — do not substitute judgment.
|
|
14
|
+
Step summaries describe outcomes; the loaded skill defines the process.
|
|
15
|
+
|
|
16
|
+
## Input
|
|
17
|
+
|
|
18
|
+
Ask the user for:
|
|
19
|
+
1. **Bug description** — what is happening vs. what should happen
|
|
20
|
+
2. **Steps to reproduce**
|
|
21
|
+
3. **Error output** — stack traces, logs, screenshots
|
|
22
|
+
4. **When it started** — recent changes or events that might correlate
|
|
23
|
+
|
|
24
|
+
## Step 0: Repo-State Detection & Routing Redirect
|
|
25
|
+
|
|
26
|
+
Before any other check, detect whether this repo is in **prototype mode** or **production mode** per `rules/common/skill-selection.md` Step 1. Signals (any one is sufficient): path under `pocs/` or `*-prototype/`; `package.json` `"private": true` with no CI; missing `aiwiki/architecture/`; manifest shows prototype-phase active.
|
|
27
|
+
|
|
28
|
+
**If prototype mode is detected**, stop and offer the redirect:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
This looks like a prototype bug (signals: <list matched signals>).
|
|
32
|
+
|
|
33
|
+
/bugfix runs full systematic debugging with regression test creation — appropriate for production code, overkill for prototype iteration. Prototype bugs are usually captured as feedback items and addressed via iterate-prototype.
|
|
34
|
+
|
|
35
|
+
Redirect to iterate-prototype (capture as feedback item)? [Y]es / [n]o continue with /bugfix anyway / [a]bort
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
User responses:
|
|
39
|
+
- **Y / yes**: invoke `iterate-prototype` with the bug description as a feedback item. Skip the rest of /bugfix.
|
|
40
|
+
- **n / no**: proceed to Step 0a. User explicitly accepts production-grade debug discipline for prototype work.
|
|
41
|
+
- **a / abort**: stop.
|
|
42
|
+
|
|
43
|
+
If production mode, proceed to Step 0a directly.
|
|
44
|
+
|
|
45
|
+
## Step 0a: Preflight Checks
|
|
46
|
+
|
|
47
|
+
1. **Git is clean** — stash or commit first
|
|
48
|
+
2. **Tests pass** — note which are already failing
|
|
49
|
+
3. **Branch** — `fix/{bug-description-slug}`
|
|
50
|
+
|
|
51
|
+
## Step 0b: Wiki Bootstrap
|
|
52
|
+
|
|
53
|
+
REQUIRED SUB-SKILL: Use **support-wiki-bootstrap** to ensure aiwiki/ exists.
|
|
54
|
+
|
|
55
|
+
Gotchas surfaced during debug will write to `aiwiki/gotchas/`.
|
|
56
|
+
|
|
57
|
+
Check if `.forge/work/bugfix/{name}/manifest.yaml` exists.
|
|
58
|
+
|
|
59
|
+
**If it exists**: Read the manifest. Resume from the last incomplete phase. Report what has already been completed and what remains. If `status: escalated` or `status: completed`, do NOT resume — surface the `successor_path` and ask the user what to do.
|
|
60
|
+
|
|
61
|
+
**If it does not exist**: Create the work directory (`.forge/work/bugfix/{name}/`) and manifest using the template at `.claude/templates/manifests/bugfix.yaml`. Fill placeholders `{name}`, `{description}`, `{date}`.
|
|
62
|
+
|
|
63
|
+
If this bugfix was escalated from a hotfix, set `escalated_from: work/hotfix/{predecessor-name}`.
|
|
64
|
+
|
|
65
|
+
## Step 1: Debug — Systematic Root Cause Analysis
|
|
66
|
+
|
|
67
|
+
REQUIRED SUB-SKILL: Use **support-debug** with full 4-phase methodology.
|
|
68
|
+
|
|
69
|
+
The skill handles tracer subagent dispatch internally — escalating to parallel hypothesis testing when linear debugging stalls.
|
|
70
|
+
|
|
71
|
+
After root cause is identified, produce a debugging summary:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Root cause: {one sentence}
|
|
75
|
+
Evidence: {file:line} → {file:line} → {root cause location}
|
|
76
|
+
Hypotheses tested: {N} — {list with CONFIRMED/REJECTED}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This feeds into Step 5 (gotcha) and the PR description (Step 4).
|
|
80
|
+
|
|
81
|
+
### GATE: Root Cause Identified
|
|
82
|
+
Root cause must be confirmed with evidence before any fix is attempted. Present the debugging summary to the user for review. Update manifest: `debug.root-cause.status: complete, gate-passed: true`.
|
|
83
|
+
|
|
84
|
+
## Step 1.5: Regression Plan (Complex Bugs Only)
|
|
85
|
+
|
|
86
|
+
If the root cause spans multiple files, involves race conditions, or required tracer escalation — produce a focused regression plan before fixing:
|
|
87
|
+
|
|
88
|
+
1. **Regression test(s)** — exact tests to write (not a full test plan, just the regression cases)
|
|
89
|
+
2. **Related areas to verify** — other code paths that touch the same root cause
|
|
90
|
+
3. **Confidence level** — how certain is this the only root cause?
|
|
91
|
+
|
|
92
|
+
If the bug is straightforward (single file, clear fix), skip this step.
|
|
93
|
+
|
|
94
|
+
## Step 2: Build — Test-Driven Fix
|
|
95
|
+
|
|
96
|
+
REQUIRED SUB-SKILL: Use **build-tdd**.
|
|
97
|
+
Write a regression test that reproduces the bug FIRST, watch it fail, then write the minimal fix.
|
|
98
|
+
|
|
99
|
+
### GATE: Fix Verified
|
|
100
|
+
Regression test passes. All existing tests still pass. No unrelated changes introduced.
|
|
101
|
+
Update manifest: `build.tdd.status: complete, gate-passed: true`.
|
|
102
|
+
|
|
103
|
+
## Step 3: Quality — Code Review
|
|
104
|
+
|
|
105
|
+
REQUIRED SUB-SKILL: Use **quality-code-review**.
|
|
106
|
+
|
|
107
|
+
### GATE: Code Review Passed
|
|
108
|
+
All critical and important review items resolved. Update manifest: `quality.code-review.status: complete, gate-passed: true`.
|
|
109
|
+
|
|
110
|
+
## Step 4: Deliver — Create PR
|
|
111
|
+
|
|
112
|
+
REQUIRED SUB-SKILL: Use **build-pr-workflow**.
|
|
113
|
+
Atomic PR — just the fix and its regression test. Title: `fix: {description}`.
|
|
114
|
+
|
|
115
|
+
## Step 5: Support — Record Lessons
|
|
116
|
+
|
|
117
|
+
REQUIRED SUB-SKILL: Use **support-gotcha**.
|
|
118
|
+
|
|
119
|
+
Use the debugging summary from Step 1 as input. Check `aiwiki/gotchas/` for prior bugs in the same area — if this is the 3rd+ occurrence, the gotcha auto-drafts a `proposed_rule:` block; the next session-start prompts for promotion. Wiki-lint validates the gotcha file structure on save.
|
|
120
|
+
|
|
121
|
+
Present a final summary:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Bug fixed: {description}
|
|
125
|
+
Root cause: {one sentence}
|
|
126
|
+
Gotcha recorded: aiwiki/gotchas/{filename}.md
|
|
127
|
+
Prevention: {what would prevent this class of bug}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Gate Exemptions
|
|
131
|
+
|
|
132
|
+
| Standard Gate | Bugfix Equivalent | Rationale |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| quality-test-plan | Skipped | Bugfixes target a single root cause — the regression test from build-tdd (Step 2) plus existing tests provide sufficient coverage. A full test plan is overhead for a focused fix. |
|
|
135
|
+
| quality-test-execution | Skipped | build-tdd (Step 2) verifies the regression test passes and all existing tests still pass. A separate test-execution phase adds no value for a minimal, atomic fix. |
|
|
136
|
+
|
|
137
|
+
## Escalation
|
|
138
|
+
|
|
139
|
+
If root cause is **architectural** → suggest `/refactor` or `/feature`.
|
|
140
|
+
If root cause is **a dependency bug** → document, create workaround with TODO, file upstream issue.
|
|
141
|
+
If root cause is **environment-specific** → document requirements, update onboarding docs.
|
|
142
|
+
|
|
143
|
+
### Escalating to /refactor or /feature
|
|
144
|
+
|
|
145
|
+
When escalation is the right answer, perform the handoff in this order to keep state consistent:
|
|
146
|
+
|
|
147
|
+
1. Create the successor manifest by invoking the target command (`/refactor` or `/feature`) with `escalated_from: work/bugfix/{this-name}` set on creation.
|
|
148
|
+
2. Update the bugfix manifest: `status: escalated`, `successor_path: work/{type}/{successor-name}`.
|
|
149
|
+
3. Leave the bugfix folder in place — it is the audit trail.
|
|
150
|
+
|
|
151
|
+
Session-start and pre-compact hooks skip `status: escalated` — the bugfix will not resurface as resumable work after this point.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: evolve
|
|
3
|
+
description: "Review lessons learned and improve the skill system. Run after completing a feature or project."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /evolve — Self-Improvement Review
|
|
7
|
+
|
|
8
|
+
You are reviewing lessons learned and improving the forge skill system itself. This is how the system gets smarter over time. Run this after completing a feature, project, or periodically to process accumulated gotchas.
|
|
9
|
+
|
|
10
|
+
## Execution Protocol
|
|
11
|
+
|
|
12
|
+
- **"REQUIRED SUB-SKILL"** means you MUST load the named skill before acting. Do NOT substitute your own judgment for the skill's process.
|
|
13
|
+
|
|
14
|
+
## Step 1: Gather All Gotchas
|
|
15
|
+
|
|
16
|
+
Read all gotcha files from both locations:
|
|
17
|
+
- **Project gotchas**: `aiwiki/gotchas/*.md`
|
|
18
|
+
- **Global gotchas**: `~/.claude/gotchas/*.md`
|
|
19
|
+
|
|
20
|
+
For each gotcha, extract:
|
|
21
|
+
- The lesson learned
|
|
22
|
+
- The affected skills
|
|
23
|
+
- The date discovered
|
|
24
|
+
- Whether it has been addressed already
|
|
25
|
+
|
|
26
|
+
## Step 2: Identify Patterns
|
|
27
|
+
|
|
28
|
+
Analyze the collected gotchas for patterns:
|
|
29
|
+
|
|
30
|
+
1. **Repeated gotchas** — The same type of mistake happening multiple times
|
|
31
|
+
2. **Skill gaps** — Gotchas that no current skill would have caught
|
|
32
|
+
3. **Gate failures** — Issues that slipped through quality gates
|
|
33
|
+
4. **Gate successes** — Issues that gates DID catch (reinforce these)
|
|
34
|
+
5. **Process friction** — Steps that consistently cause slowdowns or confusion
|
|
35
|
+
|
|
36
|
+
Present findings as a summary table:
|
|
37
|
+
```
|
|
38
|
+
Pattern | Occurrences | Affected Skills | Severity
|
|
39
|
+
---------------------------------|-------------|----------------------|---------
|
|
40
|
+
Missing error handling in APIs | 4 | build-tdd, code-review | High
|
|
41
|
+
Tests pass but behavior wrong | 2 | quality-test-plan | Medium
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Step 3: Check Quality Gate Effectiveness
|
|
45
|
+
|
|
46
|
+
For each quality gate in the system:
|
|
47
|
+
1. How many issues did it catch? (good)
|
|
48
|
+
2. How many issues slipped through? (needs improvement)
|
|
49
|
+
3. Is the gate too strict (blocking unnecessarily)?
|
|
50
|
+
4. Is the gate too loose (letting problems through)?
|
|
51
|
+
|
|
52
|
+
## Step 4: Propose Changes
|
|
53
|
+
|
|
54
|
+
Based on the patterns, propose specific changes:
|
|
55
|
+
|
|
56
|
+
### Skill Changes
|
|
57
|
+
- Modifications to existing skill prompts
|
|
58
|
+
- New steps to add to existing skills
|
|
59
|
+
- New skills to create (if a gap was identified)
|
|
60
|
+
|
|
61
|
+
### Rule Changes
|
|
62
|
+
- New rules to add
|
|
63
|
+
- Modifications to existing rules
|
|
64
|
+
- Rules to relax (if too strict)
|
|
65
|
+
|
|
66
|
+
### Gate Changes
|
|
67
|
+
- Gates to tighten
|
|
68
|
+
- Gates to add
|
|
69
|
+
- Gates to relax (with justification)
|
|
70
|
+
|
|
71
|
+
Present each proposed change with:
|
|
72
|
+
- **What**: The specific change
|
|
73
|
+
- **Why**: Which gotcha pattern it addresses
|
|
74
|
+
- **Risk**: What could go wrong if we make this change
|
|
75
|
+
|
|
76
|
+
## Step 5: Validate Changes
|
|
77
|
+
|
|
78
|
+
REQUIRED SUB-SKILL: Use **support-skill-validator** before applying ANY changes.
|
|
79
|
+
Do NOT apply changes without validating first — the validator catches contradictions you will miss.
|
|
80
|
+
|
|
81
|
+
If contradictions are found, resolve them before proceeding.
|
|
82
|
+
|
|
83
|
+
## Step 6: User Approval
|
|
84
|
+
|
|
85
|
+
Present all proposed changes to the user. Changes are applied ONLY with explicit approval. The user may:
|
|
86
|
+
- Approve all changes
|
|
87
|
+
- Approve some changes and reject others
|
|
88
|
+
- Request modifications to proposed changes
|
|
89
|
+
- Defer changes for later
|
|
90
|
+
|
|
91
|
+
## Step 7: Apply Changes
|
|
92
|
+
|
|
93
|
+
For each approved change:
|
|
94
|
+
1. Make the modification to the relevant skill, rule, or gate file
|
|
95
|
+
2. REQUIRED SUB-SKILL: Re-run **support-skill-validator** to verify consistency after the change
|
|
96
|
+
3. Record the change in the decision log
|
|
97
|
+
|
|
98
|
+
## Step 8: Promotion Check
|
|
99
|
+
|
|
100
|
+
Check for gotchas that have repeated 3 or more times. These are candidates for promotion to rules:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
PROMOTION CANDIDATES
|
|
104
|
+
--------------------
|
|
105
|
+
Gotcha: "Always check for null responses from external APIs"
|
|
106
|
+
Occurrences: 4
|
|
107
|
+
Currently in: support-gotcha (project level)
|
|
108
|
+
Proposed promotion: references/common/coding-standards.md
|
|
109
|
+
|
|
110
|
+
Promote to rule? [yes/no]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
For each promotion candidate:
|
|
114
|
+
- Draft the rule text
|
|
115
|
+
- Identify where in the rules it should live
|
|
116
|
+
- Present to the user for approval
|
|
117
|
+
- If approved, add to the appropriate rules file and archive the gotcha
|
|
118
|
+
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feature
|
|
3
|
+
description: "Add a feature to an existing codebase using the prototype-driven SDLC. Phase flexibility: trivial features collapse phases (concept slide goes straight to production); standard features run the full pipeline; major features add adversarial review at every decision point."
|
|
4
|
+
argument-hint: "[feature-name] [--size trivial|standard|major]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /feature — Prototype-Driven Feature Workflow
|
|
8
|
+
|
|
9
|
+
You are orchestrating a feature implementation. The default flow is: discover existing codebase → mini-concept → mini-wireframe → prototype-skin → codify → production-build → deliver. Phase flexibility is the rule, not the exception — most features skip 1-2 phases. The preflight planning step (Step 1) decides which phases run.
|
|
10
|
+
|
|
11
|
+
## Execution Protocol
|
|
12
|
+
|
|
13
|
+
**REQUIRED SUB-SKILL**: load and follow the skill — do not substitute judgment. Step summaries describe outcomes; the loaded skill defines the process.
|
|
14
|
+
|
|
15
|
+
## Input
|
|
16
|
+
|
|
17
|
+
Ask the user for:
|
|
18
|
+
1. **Feature name** (slug format, e.g. `add-payments`, `user-auth`)
|
|
19
|
+
2. **Feature description** (what should it do?)
|
|
20
|
+
3. **Existing requirements** (docs, tickets, screenshots, meeting notes)
|
|
21
|
+
4. **Complexity** (optional): `trivial` / `standard` / `major`. If not provided, the preflight phase planner suggests one.
|
|
22
|
+
|
|
23
|
+
## Step 0: Repo-State Detection & Routing Redirect
|
|
24
|
+
|
|
25
|
+
Before any other check, detect whether this repo is in **prototype mode** or **production mode** per `rules/common/skill-selection.md` Step 1. Signals to check (any one is sufficient):
|
|
26
|
+
|
|
27
|
+
- Working directory or work path is under `pocs/`, or its name ends in `-prototype`
|
|
28
|
+
- `package.json` has `"private": true` AND no test runner / no CI configured
|
|
29
|
+
- `aiwiki/architecture/` is empty or missing (no codified architecture)
|
|
30
|
+
- Existing manifest under `.forge/work/feature/` has `phase_plan.prototype: active` and `phase_plan.codify: skipped`
|
|
31
|
+
|
|
32
|
+
**If prototype mode is detected**, stop and offer the redirect:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
This looks like prototype iteration on an existing prototype (signals: <list matched signals>).
|
|
36
|
+
|
|
37
|
+
/feature would spin up a 7-phase production workflow (concept → wireframe → prototype → iterate → codify → production-build → deliver). Most phases would end up explicitly skipped, which trains the manifest to lie about gate state.
|
|
38
|
+
|
|
39
|
+
The right route here is iterate-prototype — lightweight in-place tweaks, no harden/codify ceremony, capture gotchas as feedback items.
|
|
40
|
+
|
|
41
|
+
Redirect to iterate-prototype? [Y]es / [n]o continue with /feature anyway / [a]bort
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
User responses:
|
|
45
|
+
- **Y / yes**: invoke `iterate-prototype` skill with the feature description as input. Skip the rest of /feature's steps.
|
|
46
|
+
- **n / no**: proceed to Step 0a below. User must explicitly accept that most phases will be marked `skipped` in the manifest.
|
|
47
|
+
- **a / abort**: stop without action.
|
|
48
|
+
|
|
49
|
+
If production mode is detected (or the user chose "no continue"), proceed to Step 0a.
|
|
50
|
+
|
|
51
|
+
## Step 0a: Preflight Checks
|
|
52
|
+
|
|
53
|
+
1. Git is clean — no uncommitted changes
|
|
54
|
+
2. Tools installed (build tools, test runner, package manager)
|
|
55
|
+
3. Tests pass on current branch — if failing, STOP
|
|
56
|
+
|
|
57
|
+
## Step 0b: Wiki Bootstrap
|
|
58
|
+
|
|
59
|
+
REQUIRED SUB-SKILL: Use **support-wiki-bootstrap** to ensure aiwiki/ exists.
|
|
60
|
+
|
|
61
|
+
## Step 1: Manifest + Phase Planning
|
|
62
|
+
|
|
63
|
+
Check if `.forge/work/feature/{name}/manifest.yaml` exists.
|
|
64
|
+
|
|
65
|
+
**If it exists**: Resume from the last incomplete phase. Skip phases marked `locked` or `skipped`. If `status: escalated` or `status: completed`, do NOT resume — surface `successor_path` and ask the user.
|
|
66
|
+
|
|
67
|
+
**If it does not exist**: Create the manifest from `.claude/templates/manifests/feature.yaml`.
|
|
68
|
+
|
|
69
|
+
If escalated from `/bugfix` or `/hotfix`, set `escalated_from: work/{type}/{predecessor-name}`.
|
|
70
|
+
|
|
71
|
+
**Phase planning** (the v6 flexibility step). Propose `active` / `skip` for each phase based on the feature scope:
|
|
72
|
+
|
|
73
|
+
| Feature shape | Concept | Wireframe | Prototype | Codify | Production |
|
|
74
|
+
|---|---|---|---|---|---|
|
|
75
|
+
| Trivial UI tweak (color, spacing, copy) | skip (description IS the spec) | skip (existing UI is the wireframe) | skip (production change is small enough) | skip (no architecture delta) | active |
|
|
76
|
+
| New screen, single user role | active (1-3 slides) | active (mini, skin into existing wireframe if any) | active (skin into prototype branch of existing app) | active (architecture delta) | active |
|
|
77
|
+
| New feature touching auth/payments/PII | active | active | active | active (adversarial review on every ADR) | active (security-audit escalation) |
|
|
78
|
+
| Backend-only API endpoint | active (1 slide) | active (admin/playground UI sketch) | active (verification frontend + endpoint) | active | active |
|
|
79
|
+
| Refactor disguised as feature | escalate to `/refactor` |||||
|
|
80
|
+
|
|
81
|
+
For trivial features, multiple phases collapse — sometimes the entire workflow is "concept slide → write the production code → review → deliver." Trust the preflight planner's judgment, but always present the plan to the user for confirmation before proceeding.
|
|
82
|
+
|
|
83
|
+
User can override any phase decision (e.g. "actually let's do a wireframe — I want to see the layout").
|
|
84
|
+
|
|
85
|
+
## Step 2: Discover — Codebase Analysis
|
|
86
|
+
|
|
87
|
+
REQUIRED SUB-SKILL: Use **discover-codebase-analysis**.
|
|
88
|
+
|
|
89
|
+
For features on existing codebases, this is non-optional — production code grows from the prototype, and the prototype skins into the existing app. Without codebase analysis, the prototype-builder will reinvent patterns that already exist.
|
|
90
|
+
|
|
91
|
+
### GATE: Codebase Analysis Approved
|
|
92
|
+
|
|
93
|
+
User reviews. Update manifest: `discover.codebase-analysis.{status: complete, gate-passed: true}`.
|
|
94
|
+
|
|
95
|
+
## Step 3: Concept (Phase 2) — if active
|
|
96
|
+
|
|
97
|
+
REQUIRED SUB-SKILL: Use **concept-slides**.
|
|
98
|
+
|
|
99
|
+
For features, often a 1-3 slide mini-deck — what the feature is, where it sits in the existing app, the visual sketch.
|
|
100
|
+
|
|
101
|
+
### GATE: Concept Locked
|
|
102
|
+
|
|
103
|
+
Update manifest: `artifacts.concept.{deck_path, locked_at}`. Presence of `locked_at` is the lock signal that downstream phases check.
|
|
104
|
+
|
|
105
|
+
## Step 4: Wireframe (Phase 3) — if active
|
|
106
|
+
|
|
107
|
+
REQUIRED SUB-SKILL: Use **build-wireframe**.
|
|
108
|
+
|
|
109
|
+
For features on existing apps:
|
|
110
|
+
- If the existing app has a wireframe at `pocs/wireframe/index.html`, fork it and add the new screens / states
|
|
111
|
+
- If not, produce a mini-wireframe at `pocs/{name}-wireframe/index.html` covering only the feature's screens
|
|
112
|
+
|
|
113
|
+
### GATE: Wireframe Locked
|
|
114
|
+
|
|
115
|
+
Update manifest: `artifacts.wireframe.{html_path, locked_at}`.
|
|
116
|
+
|
|
117
|
+
## Step 4.5: Design System — if frontend feature
|
|
118
|
+
|
|
119
|
+
REQUIRED SUB-SKILL: Use **plan-design-system** to lock design tokens before architecture.
|
|
120
|
+
|
|
121
|
+
Backend-only features (API endpoints, schema changes, internal refactors) skip this step entirely — no UI surfaces, no design tokens needed. For features that add or change UI surfaces, run plan-design-system to extend the project's existing `DESIGN.md` (or create one if the project never had a frontend before). The skill self-skips when `DESIGN.md` already exists and is current for this work item.
|
|
122
|
+
|
|
123
|
+
### GATE: Design Tokens Approved
|
|
124
|
+
|
|
125
|
+
Update manifest: `artifacts.design-system.{path, approved_at}`.
|
|
126
|
+
|
|
127
|
+
## Step 5: Prototype (Phase 4) — if active
|
|
128
|
+
|
|
129
|
+
REQUIRED SUB-SKILL: Use **build-prototype**, then **iterate-prototype** for polish.
|
|
130
|
+
|
|
131
|
+
For features on existing apps:
|
|
132
|
+
- Scaffold `pocs/{name}-prototype/` as a mini-prototype, OR
|
|
133
|
+
- Skin the new screens into a prototype branch of the existing app (manifest field `prototype_path` records which approach)
|
|
134
|
+
|
|
135
|
+
Capture gotchas + conventions during iteration to `aiwiki/`.
|
|
136
|
+
|
|
137
|
+
### GATE: Prototype Locked
|
|
138
|
+
|
|
139
|
+
User emits "satisfied" or "LOCKED". Update manifest: `artifacts.prototype.{path, locked_at}`.
|
|
140
|
+
|
|
141
|
+
## Step 6: Codify (Phase 5) — if active
|
|
142
|
+
|
|
143
|
+
REQUIRED SUB-SKILL: Use **harden**.
|
|
144
|
+
|
|
145
|
+
For features, often produces an architecture-delta (extending existing `aiwiki/architecture/{topic}.md` rather than creating new), 0-3 ADRs, and a focused slice graph (the production tasks specific to this feature).
|
|
146
|
+
|
|
147
|
+
For features touching `--size major` complexity (auth, payments, PII, schema changes): adversarial review is mandatory on every ADR. The dedicated `/second-opinion` skill is *planned, not yet implemented* — until it ships, surface adversarial objections inline in the ADR `review:` block during harden Step 2 and have the user sign off explicitly before the ADR is marked `accepted`.
|
|
148
|
+
|
|
149
|
+
### GATE: Codified Plan Approved
|
|
150
|
+
|
|
151
|
+
User reviews architecture-delta + ADRs + slice graph. Approves before Phase 6 starts. Update manifest: `artifacts.codify.locked_at` (no path — the populated slice_graph + the aiwiki/architecture/ files ARE the codify artifacts).
|
|
152
|
+
|
|
153
|
+
## Step 7: Build — Create Worktree
|
|
154
|
+
|
|
155
|
+
REQUIRED SUB-SKILL: Use **build-pr-workflow** to create a git worktree for the feature branch.
|
|
156
|
+
|
|
157
|
+
Update manifest: `build.worktree-created: true`.
|
|
158
|
+
|
|
159
|
+
## Step 8: Production Build (Phase 6)
|
|
160
|
+
|
|
161
|
+
Execute the slice graph from Phase 5. Per slice:
|
|
162
|
+
|
|
163
|
+
1. REQUIRED SUB-SKILL: Use **build-tdd** — strict RED-GREEN-REFACTOR
|
|
164
|
+
2. REQUIRED SUB-SKILL: Use **quality-code-review**
|
|
165
|
+
3. Fix any Critical or Important findings
|
|
166
|
+
4. Per-slice user-confirm
|
|
167
|
+
5. Per-slice dream consolidates slice-scoped wiki updates
|
|
168
|
+
|
|
169
|
+
For `--size major` features: also escalate to `quality-security-audit` on slices that touch auth/payments/PII.
|
|
170
|
+
|
|
171
|
+
Optional: `/autopilot production` for Ralph-loop hands-off slice execution *(planned, not yet implemented — see docs/V6-PLAN.md §11; per-slice manual dispatch is the only mode today)*.
|
|
172
|
+
|
|
173
|
+
### GATE: All Slices Complete
|
|
174
|
+
|
|
175
|
+
All slices `gate-passed: true`. Update manifest: `artifacts.production-build.locked_at` (the slice terminal state + the production code ARE the production-build artifacts).
|
|
176
|
+
|
|
177
|
+
## Step 9: Test Plan + Execution
|
|
178
|
+
|
|
179
|
+
REQUIRED SUB-SKILL: Use **quality-test-plan** (per complexity), then **quality-test-execution**.
|
|
180
|
+
|
|
181
|
+
- `trivial`: focused regression plan (unit tests for changed code, no E2E/load)
|
|
182
|
+
- `standard`: full test plan
|
|
183
|
+
- `major`: full test plan including load/stress scenarios
|
|
184
|
+
|
|
185
|
+
### GATE: Test Results
|
|
186
|
+
|
|
187
|
+
ALL tests pass. Coverage meets thresholds.
|
|
188
|
+
|
|
189
|
+
## Step 9.5: UI/UX Review — if frontend feature
|
|
190
|
+
|
|
191
|
+
If the wireframe phase ran (frontend feature):
|
|
192
|
+
|
|
193
|
+
REQUIRED SUB-SKILL: Use **quality-uiux**.
|
|
194
|
+
Verifies production matches the locked wireframe + design tokens.
|
|
195
|
+
|
|
196
|
+
## Step 10: Final Code Review
|
|
197
|
+
|
|
198
|
+
REQUIRED SUB-SKILL: Use **quality-code-review** for a final pass across all changes (full diff from feature branch base to HEAD). Fix any Critical or Important findings before creating PRs.
|
|
199
|
+
|
|
200
|
+
## Step 11: Deliver — Create PRs
|
|
201
|
+
|
|
202
|
+
REQUIRED SUB-SKILL: Use **build-pr-workflow** to create one PR per logical function/component.
|
|
203
|
+
|
|
204
|
+
Update manifest: `deliver.pr-created: true`.
|
|
205
|
+
|
|
206
|
+
## Step 12: Deliver — Deploy (optional)
|
|
207
|
+
|
|
208
|
+
Ask the user: "Would you like to deploy now?"
|
|
209
|
+
If yes: REQUIRED SUB-SKILL: Use **deliver-deploy**.
|
|
210
|
+
|
|
211
|
+
## Step 12.5: Deliver — Update Onboarding Docs
|
|
212
|
+
|
|
213
|
+
- `trivial`: skip
|
|
214
|
+
- `standard`: skip if purely internal with no new concepts/setup/env-vars/services
|
|
215
|
+
- `major`: REQUIRED — significant features always warrant doc updates
|
|
216
|
+
|
|
217
|
+
REQUIRED SUB-SKILL: Use **deliver-onboarding**.
|
|
218
|
+
|
|
219
|
+
## Step 13: Support — Record Lessons
|
|
220
|
+
|
|
221
|
+
REQUIRED SUB-SKILL: Use **support-gotcha**.
|
|
222
|
+
Final dream cycle consolidates all Phase 4-12 wiki captures.
|
|
223
|
+
|
|
224
|
+
Update manifest: `status: completed`.
|
|
225
|
+
|
|
226
|
+
## Phase Skip Handling
|
|
227
|
+
|
|
228
|
+
When phase planning marks a phase `skipped`, the downstream phase reads from whatever the skipped phase would have produced — e.g. if wireframe is skipped because the user has Figma mockups, the prototype builder uses the Figma export instead of a wireframe HTML.
|
|
229
|
+
|
|
230
|
+
Record skip reasons in the manifest. Skipped phases do not run gates.
|
|
231
|
+
|
|
232
|
+
If a skipped phase reveals a gap during a later phase, that affected phase opens with `locked-with-deltas` and a delta entry pointing back. The downstream phase's gate verifies the delta is closed.
|
|
233
|
+
|
|
234
|
+
## Gate Checking Logic
|
|
235
|
+
|
|
236
|
+
Resume rule: skip phases where `artifacts.{phase}.locked_at` is present (already locked) or `phase_plan.{phase}` is `skipped`. Halt and fix any phase whose gate hasn't passed before continuing.
|