@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,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge
|
|
3
|
+
description: "Discovery command — show installed forge capabilities, current project state, in-flight work, and the most useful next action. Run this when you're new to a forge-enabled project, or any time you want a one-screen overview."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /forge — Discovery
|
|
7
|
+
|
|
8
|
+
Give the user a single-screen orientation to forge in this project. Five sections, in order. Keep each section terse — drill-downs go to skills (`support-system-guide` for routing) or rules (`.claude/rules/common/forge-system.md` for system structure).
|
|
9
|
+
|
|
10
|
+
## Section 1 — Installed capabilities
|
|
11
|
+
|
|
12
|
+
Count what's installed under `.claude/` and report one line:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
echo "Installed: $(ls .claude/skills 2>/dev/null | wc -l | tr -d ' ') skills · $(ls .claude/commands 2>/dev/null | wc -l | tr -d ' ') commands · $(ls .claude/agents 2>/dev/null | wc -l | tr -d ' ') agents · $(find .claude/rules -name '*.md' 2>/dev/null | wc -l | tr -d ' ') rules"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If `.claude/` doesn't exist: say "forge not installed in this project — run `npx @jamie-tam/forge init` from the project root."
|
|
19
|
+
|
|
20
|
+
## Section 2 — Project profile
|
|
21
|
+
|
|
22
|
+
Read the `## Project Profile` block from `CLAUDE.md` and present its yaml compactly. Detect two states:
|
|
23
|
+
|
|
24
|
+
- **Unfilled** — the block still contains `{detected ...}` placeholders → say "Profile not filled — run `/setup`."
|
|
25
|
+
- **Filled** — show the yaml as-is.
|
|
26
|
+
|
|
27
|
+
## Section 3 — Active work
|
|
28
|
+
|
|
29
|
+
Glob `.forge/work/*/*/manifest.yaml`. Exclude items whose top-level `status` is `completed`, `abandoned`, or `escalated`. For each remaining item, infer the current phase from the first phase or gate that is not complete/locked/skipped/not-applicable. Print a compact table:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
| Type | Name | Phase | Manifest |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| feature | add-payments | quality.test-execution | .forge/work/feature/add-payments/manifest.yaml |
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If nothing's in flight: say "No work items in flight."
|
|
38
|
+
|
|
39
|
+
## Section 4 — Suggested next
|
|
40
|
+
|
|
41
|
+
Pick **one** suggestion based on the state observed in sections 2 and 3. Use this priority order (first match wins):
|
|
42
|
+
|
|
43
|
+
| State | Suggested next |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `.claude/` missing | `npx @jamie-tam/forge init` |
|
|
46
|
+
| Profile has `{detected ...}` placeholders | `/setup` |
|
|
47
|
+
| One in-flight item | `/resume {type}/{name}` (cite the matching item) |
|
|
48
|
+
| Multiple in-flight items, all recent | `/status` (then user picks) |
|
|
49
|
+
| Stale in-flight items (manifest `mtime` older than 30 days AND no commit on `{branch}` in 30 days — check via `git log -1 --since='30 days ago' {branch}`) | Surface them: "Item X has been idle since {date} — consider `/abort {type}/{name}` or `/resume`." |
|
|
50
|
+
| Profile filled, no work items, `pocs/` exists | `/greenfield` (resume the prototype-driven flow) |
|
|
51
|
+
| Profile filled, no work items, no `pocs/` | `/feature <name>` or `/greenfield <name>` — ask the user which |
|
|
52
|
+
|
|
53
|
+
Present the suggestion as one line: **Suggested next:** `<command>` — `<brief rationale>`.
|
|
54
|
+
|
|
55
|
+
## Section 5 — Commands at a glance
|
|
56
|
+
|
|
57
|
+
Print this catalog verbatim. The user can scroll back to it without re-running anything.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Workflow commands
|
|
61
|
+
/feature <name> full feature lifecycle (discover → plan → build → quality → deliver)
|
|
62
|
+
/greenfield <name> new project from zero (prototype-driven by default)
|
|
63
|
+
/bugfix <name> systematic debugging + fix
|
|
64
|
+
/refactor <name> restructure without new functionality
|
|
65
|
+
/hotfix <name> emergency production fix (expedited gates)
|
|
66
|
+
|
|
67
|
+
State commands
|
|
68
|
+
/status list in-flight work
|
|
69
|
+
/resume <name> continue an in-flight item
|
|
70
|
+
/abort <name> cancel an in-flight item
|
|
71
|
+
|
|
72
|
+
System commands
|
|
73
|
+
/setup detect stack, fill project profile, scaffold .forge/ + aiwiki/
|
|
74
|
+
/validate check skill/rule consistency
|
|
75
|
+
/evolve improve the forge harness itself
|
|
76
|
+
/task-force <list> parallel agents for a punch list of ad-hoc tasks
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
End with one drill-down line: **For routing a specific intent or unsure which command to use, invoke the `support-system-guide` skill. For system structure (skills, agents, .forge/ layout), see `.claude/rules/common/forge-system.md`.**
|
|
80
|
+
|
|
81
|
+
## When to use
|
|
82
|
+
|
|
83
|
+
- User invokes `/forge` explicitly
|
|
84
|
+
- User asks "what's in this project?", "show me forge", or "what can forge do here?"
|
|
85
|
+
- Periodic check-in — useful at the start of a session to see if anything is in flight before starting new work
|
|
86
|
+
|
|
87
|
+
## Do NOT
|
|
88
|
+
|
|
89
|
+
- Do NOT invoke this on every session start — `support-system-guide` is the auto-triggering orientation skill. `/forge` is the explicit on-demand version.
|
|
90
|
+
- Do NOT duplicate the long skill/group descriptions inline — drill-downs to `support-system-guide` keep this command compact.
|
|
91
|
+
- Do NOT modify anything. This is a read-only discovery command.
|
|
92
|
+
|
|
93
|
+
## I/O Contract
|
|
94
|
+
|
|
95
|
+
| Field | Value |
|
|
96
|
+
|---|---|
|
|
97
|
+
| **Requires** | `.claude/` (skills, commands, agents, rules); `CLAUDE.md` for profile read; `.forge/work/*/*/manifest.yaml` for active work (optional) |
|
|
98
|
+
| **Produces** | Console output only — no files written |
|
|
99
|
+
| **Updates manifest** | None |
|
|
100
|
+
| **Feeds into** | User's choice of next command |
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: greenfield
|
|
3
|
+
description: "Start a new project from scratch using the prototype-driven SDLC: concept slides → wireframe → prototype (iterate) → codify → production build. The full pipeline; phases skip only when explicitly justified."
|
|
4
|
+
argument-hint: "[project-name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /greenfield — New Project From Scratch
|
|
8
|
+
|
|
9
|
+
You are orchestrating a complete new project build using the prototype-driven workflow. This is for projects that do not yet have a codebase. The default flow is the full pipeline: discover → concept → wireframe → prototype (iterate) → codify → production build → deliver. Phases skip only when explicitly justified — for greenfield, all phases are usually active.
|
|
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. **Project name**
|
|
19
|
+
2. **Project description** (what does it do, who is it for?)
|
|
20
|
+
3. **Tech stack hints** (frontend product, backend service, library, CLI — affects what the prototype's verification frontend looks like)
|
|
21
|
+
4. **Any existing requirements** (docs, mockups, meeting notes, screenshots)
|
|
22
|
+
|
|
23
|
+
## Step 0: Preflight Checks
|
|
24
|
+
|
|
25
|
+
1. **Target directory** is clean or empty
|
|
26
|
+
2. **Required tools** available (Node, package manager, git, optionally Docker)
|
|
27
|
+
3. **User has confirmed** the project scope
|
|
28
|
+
|
|
29
|
+
## Step 0a: Wiki Bootstrap
|
|
30
|
+
|
|
31
|
+
REQUIRED SUB-SKILL: Use **support-wiki-bootstrap** to ensure aiwiki/ exists.
|
|
32
|
+
|
|
33
|
+
## Step 1: Manifest + Phase Planning
|
|
34
|
+
|
|
35
|
+
Check if `.forge/work/greenfield/{project-name}/manifest.yaml` exists.
|
|
36
|
+
|
|
37
|
+
**If it exists**: Resume from the last incomplete phase. Skip phases marked `locked` or `skipped`. If `status: escalated` or `status: completed`, do NOT resume.
|
|
38
|
+
|
|
39
|
+
**If it does not exist**: Create `.forge/work/greenfield/{project-name}/` and the manifest from `.claude/templates/manifests/greenfield.yaml`. Fill placeholders.
|
|
40
|
+
|
|
41
|
+
**Phase planning** (the v6 flexibility step). Propose `active` / `skip` for each phase based on the project type:
|
|
42
|
+
|
|
43
|
+
| Project type | Concept | Wireframe | Prototype | Codify | Production |
|
|
44
|
+
|---|---|---|---|---|---|
|
|
45
|
+
| Frontend product (web/mobile UI) | active | active | active | active | active |
|
|
46
|
+
| Backend service / API | active | active (verification UI) | active (frontend = verification surface) | active | active |
|
|
47
|
+
| Library / SDK | active | active (doc site sketch) | active (consumer-test app) | active | active |
|
|
48
|
+
| CLI tool | active | active (terminal-frame mock) | active (working CLI) | active | active |
|
|
49
|
+
|
|
50
|
+
For greenfield, every phase is typically active. Surface the proposed plan to the user; user can override (e.g. "skip wireframe — I have detailed mockups already" → mark wireframe as `skipped` with reason).
|
|
51
|
+
|
|
52
|
+
## Step 2: Discover — Requirements (optional)
|
|
53
|
+
|
|
54
|
+
If the user provided detailed requirements upfront, this step extracts and structures them. If they're starting from a brief paragraph, this step is folded into Step 3 concept slides.
|
|
55
|
+
|
|
56
|
+
REQUIRED SUB-SKILL: Use **discover-requirements** (only if user has substantive existing requirements docs).
|
|
57
|
+
|
|
58
|
+
## Step 3: Concept (Phase 2)
|
|
59
|
+
|
|
60
|
+
REQUIRED SUB-SKILL: Use **concept-slides**.
|
|
61
|
+
|
|
62
|
+
Produces a low-fidelity marp deck at `decks/{project-name}/slides.md` with hook, 3-5 sub-concepts with sketches, user journey, and out-of-scope. 8-15 slides for full products. The user iterates 1-3 cycles.
|
|
63
|
+
|
|
64
|
+
### GATE: Concept Locked
|
|
65
|
+
|
|
66
|
+
User reviews the rendered deck (HTML), gives feedback, locks when satisfied. Update manifest: `artifacts.concept.{deck_path, locked_at}`.
|
|
67
|
+
|
|
68
|
+
## Step 4: Wireframe (Phase 3)
|
|
69
|
+
|
|
70
|
+
REQUIRED SUB-SKILL: Use **build-wireframe**.
|
|
71
|
+
|
|
72
|
+
Produces `pocs/{project-name}-wireframe/index.html` — single-HTML annotated wireframe with click-through demos and gutter callouts. Backend-heavy products still get a wireframe; the frontend is the verification surface during development.
|
|
73
|
+
|
|
74
|
+
### GATE: Wireframe Locked
|
|
75
|
+
|
|
76
|
+
User clicks through the rendered HTML, gives feedback, locks when satisfied. Update manifest: `artifacts.wireframe.{html_path, locked_at}`.
|
|
77
|
+
|
|
78
|
+
## Step 4.5: Design System
|
|
79
|
+
|
|
80
|
+
REQUIRED SUB-SKILL: Use **plan-design-system** to lock design tokens before architecture.
|
|
81
|
+
|
|
82
|
+
Backend-only / CLI projects without a frontend skip this step entirely (no design tokens needed). For all other projects, the design tokens captured here feed scaffold, every frontend task spec, and the UI/UX review. The skill self-skips when `DESIGN.md` already exists and is current for this work item.
|
|
83
|
+
|
|
84
|
+
### GATE: Design Tokens Approved
|
|
85
|
+
|
|
86
|
+
User approves the design tokens written to `DESIGN.md`. Update manifest: `artifacts.design-system.{path, approved_at}`.
|
|
87
|
+
|
|
88
|
+
## Step 5: Prototype (Phase 4)
|
|
89
|
+
|
|
90
|
+
REQUIRED SUB-SKILL: Use **build-prototype** for initial scaffold, then **iterate-prototype** for the polish loop.
|
|
91
|
+
|
|
92
|
+
Scaffolds `pocs/{project-name}-prototype/` — Vite + React + TS + Tailwind v4 + Zustand v5 + lucide-react + Biome. Multi-instance prototype-builder for multi-track wireframes. User runs `npm run dev`, gives feedback in `pocs/{project-name}-prototype/.forge/feedback.md`.
|
|
93
|
+
|
|
94
|
+
During iteration: gotchas + conventions get captured to `aiwiki/gotchas/` and `aiwiki/conventions/` (Phase 5 inputs). Wiki-lint validates each write.
|
|
95
|
+
|
|
96
|
+
### GATE: Prototype Locked
|
|
97
|
+
|
|
98
|
+
User emits "satisfied" or "LOCKED" after click-through verification. Update manifest: `artifacts.prototype.{path, locked_at}`.
|
|
99
|
+
|
|
100
|
+
Optional: `/autopilot prototype` for hands-off polish loop *(planned, not yet implemented — see docs/V6-PLAN.md §11; manual `[iterate-prototype]` runs are the only mode today)*.
|
|
101
|
+
|
|
102
|
+
## Step 6: Codify (Phase 5)
|
|
103
|
+
|
|
104
|
+
REQUIRED SUB-SKILL: Use **harden**.
|
|
105
|
+
|
|
106
|
+
Codifies the locked prototype into production-ready plans:
|
|
107
|
+
- `aiwiki/architecture/{topic}.md` — one or more focused architecture files
|
|
108
|
+
- `aiwiki/decisions/{nnnn}-{slug}.md` — ADRs (adversarial review via `/second-opinion` is *planned, not yet implemented* — until that ships, surface objections inline in the ADR `review:` block during harden Step 2)
|
|
109
|
+
- `aiwiki/conventions/` — production-surface conventions
|
|
110
|
+
- `aiwiki/gotchas/` — Phase 4 gotchas with production addenda
|
|
111
|
+
- Slice graph + `tasks.md` in manifest
|
|
112
|
+
- `aiwiki/sessions/` entry indexing everything produced
|
|
113
|
+
|
|
114
|
+
Triggers a focused dream after writes; user reviews dream output in `aiwiki/proposed/` before phase closes.
|
|
115
|
+
|
|
116
|
+
### GATE: Codified Plan Approved
|
|
117
|
+
|
|
118
|
+
User reviews ALL outputs as a unit (architecture + ADRs + slice graph + dream proposal). Approves before Phase 6 starts. Update manifest: `artifacts.codify.locked_at` (no path — the populated slice_graph + aiwiki/architecture/ files ARE the codify artifacts).
|
|
119
|
+
|
|
120
|
+
## Step 7: Production Build (Phase 6)
|
|
121
|
+
|
|
122
|
+
Execute the slice graph from Phase 5. Per slice, in dependency order:
|
|
123
|
+
|
|
124
|
+
1. REQUIRED SUB-SKILL: Use **build-tdd** — strict RED-GREEN-REFACTOR
|
|
125
|
+
2. REQUIRED SUB-SKILL: Use **quality-code-review**
|
|
126
|
+
3. Fix any Critical or Important findings
|
|
127
|
+
4. Per-slice user-confirm
|
|
128
|
+
|
|
129
|
+
Per-slice dream fires after slice close — consolidates gotchas and slice-scoped wiki updates.
|
|
130
|
+
|
|
131
|
+
Optional: `/autopilot production` runs slices via Ralph loop until all gates green *(planned, not yet implemented — see docs/V6-PLAN.md §11; per-slice manual dispatch is the only mode today)*.
|
|
132
|
+
|
|
133
|
+
### GATE: All Slices Complete
|
|
134
|
+
|
|
135
|
+
All slices have `gate-passed: true` for build-tdd, code-review, runtime-reach. Update manifest: `artifacts.production-build.locked_at` (slice terminal state + production code ARE the production-build artifacts).
|
|
136
|
+
|
|
137
|
+
## Step 8: Test Plan + Execution
|
|
138
|
+
|
|
139
|
+
REQUIRED SUB-SKILL: Use **quality-test-plan**, then **quality-test-execution**.
|
|
140
|
+
|
|
141
|
+
### GATE: Test Results
|
|
142
|
+
|
|
143
|
+
ALL tests pass. Coverage meets thresholds (minimum 80%, 100% for critical paths).
|
|
144
|
+
|
|
145
|
+
## Step 8.5: UI/UX Review (if applicable)
|
|
146
|
+
|
|
147
|
+
If the project has a frontend (per Phase 1 phase planning):
|
|
148
|
+
|
|
149
|
+
REQUIRED SUB-SKILL: Use **quality-uiux**.
|
|
150
|
+
Validates production implementation matches the locked wireframe + design tokens.
|
|
151
|
+
|
|
152
|
+
## Step 9: Final Code Review
|
|
153
|
+
|
|
154
|
+
REQUIRED SUB-SKILL: Use **quality-code-review** for a final pass across all production code (full diff). Fix any Critical or Important findings before deployment.
|
|
155
|
+
|
|
156
|
+
## Step 10: Deliver (Phase 7)
|
|
157
|
+
|
|
158
|
+
REQUIRED SUB-SKILL: Use **build-pr-workflow**.
|
|
159
|
+
Optionally: **deliver-deploy** (if deploying), **deliver-onboarding** (always for greenfield).
|
|
160
|
+
|
|
161
|
+
## Step 11: Support — Record Lessons
|
|
162
|
+
|
|
163
|
+
REQUIRED SUB-SKILL: Use **support-gotcha**.
|
|
164
|
+
Final dream cycle consolidates all Phase 4-7 captures into the curated wiki state.
|
|
165
|
+
|
|
166
|
+
Update manifest: `status: completed`.
|
|
167
|
+
|
|
168
|
+
## Phase Skip Handling
|
|
169
|
+
|
|
170
|
+
When the user opts to skip a phase during Step 1 phase planning, set the phase_plan entry to `skipped` (object form to capture the reason):
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
phase_plan:
|
|
174
|
+
wireframe:
|
|
175
|
+
status: skipped
|
|
176
|
+
reason: "User has detailed Figma mockups; converting directly to prototype"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Skipped phases do not run gates. The downstream phase reads from whatever artifact the skipped phase would have produced (e.g. user-provided mockups instead of a wireframe).
|
|
180
|
+
|
|
181
|
+
If a skipped phase reveals a gap during a later phase, surface the gap to the user and decide together whether to re-open the skipped phase (changing `phase_plan.{phase}` from `skipped` back to `active`) or carry deltas explicitly in the next phase's outputs. The flow does not auto-rewind.
|
|
182
|
+
|
|
183
|
+
## Gate Checking Logic
|
|
184
|
+
|
|
185
|
+
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.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hotfix
|
|
3
|
+
description: "Emergency production fix. Compressed workflow that gets the fix out fast, then follows up properly."
|
|
4
|
+
argument-hint: "[what is broken]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /hotfix — Emergency Production Fix
|
|
8
|
+
|
|
9
|
+
You are handling a production emergency. Speed matters, but correctness matters more. Get the fix out, then follow up properly.
|
|
10
|
+
|
|
11
|
+
**Skipped steps**: brainstorm, architecture, full test plan — deferred to follow-up ticket.
|
|
12
|
+
|
|
13
|
+
## Execution Protocol
|
|
14
|
+
|
|
15
|
+
**REQUIRED SUB-SKILL**: load and follow the skill — even in an emergency, do not substitute judgment.
|
|
16
|
+
Step summaries describe outcomes; the loaded skill defines the process.
|
|
17
|
+
|
|
18
|
+
## Input
|
|
19
|
+
|
|
20
|
+
Ask the user for:
|
|
21
|
+
1. **What is broken** — impact, error messages, affected systems
|
|
22
|
+
2. **Severity** — system down? Data loss? Degraded? Cosmetic?
|
|
23
|
+
3. **When it started** — correlate with recent deploys
|
|
24
|
+
4. **Rollback option** — can we rollback as immediate mitigation?
|
|
25
|
+
|
|
26
|
+
## Step 0: Triage
|
|
27
|
+
|
|
28
|
+
Before writing any code:
|
|
29
|
+
1. **Assess rollback** — if correlated with recent deploy, recommend rollback while investigating
|
|
30
|
+
2. **Assess blast radius** — users affected, degradability
|
|
31
|
+
3. **Communicate** — recommend notifying stakeholders
|
|
32
|
+
|
|
33
|
+
## Step 0.5: Create or Resume Manifest
|
|
34
|
+
|
|
35
|
+
Derive a name slug from the problem description (e.g., `payment-500-errors`).
|
|
36
|
+
|
|
37
|
+
Check if `.forge/work/hotfix/{name}/manifest.yaml` exists.
|
|
38
|
+
|
|
39
|
+
**If it exists**: Read the manifest. Resume from the last incomplete phase. If `status: completed` or `status: escalated`, do NOT resume.
|
|
40
|
+
|
|
41
|
+
**If it does not exist**: Create the work directory (`.forge/work/hotfix/{name}/`) and manifest using the template at `.claude/templates/manifests/hotfix.yaml`. Fill placeholders `{name}`, `{description}`, `{date}`.
|
|
42
|
+
|
|
43
|
+
## Step 1: Debug — Compressed Root Cause Analysis
|
|
44
|
+
|
|
45
|
+
REQUIRED SUB-SKILL: Use **support-debug** in compressed mode.
|
|
46
|
+
Focus on immediate fix. If root cause not identifiable quickly, recommend **rollback**.
|
|
47
|
+
|
|
48
|
+
## Step 2: Build — Minimal Fix with Test
|
|
49
|
+
|
|
50
|
+
REQUIRED SUB-SKILL: Use **build-tdd** (minimal scope).
|
|
51
|
+
Reproduce with a test, write the smallest fix, verify. Do not refactor.
|
|
52
|
+
|
|
53
|
+
## Step 3: Quality — Smoke Tests Only
|
|
54
|
+
|
|
55
|
+
REQUIRED SUB-SKILL: Use **quality-test-execution** (smoke tests ONLY).
|
|
56
|
+
Bar: existing tests pass + regression test + smoke tests. Full suite deferred to follow-up.
|
|
57
|
+
|
|
58
|
+
## Step 4: Quality — Quick Code Review
|
|
59
|
+
|
|
60
|
+
REQUIRED SUB-SKILL: Use **quality-code-review** (critical-pass only).
|
|
61
|
+
Catches injection, secrets, auth bypass. Full review deferred to follow-up.
|
|
62
|
+
|
|
63
|
+
## Step 5: Deliver — Deploy
|
|
64
|
+
|
|
65
|
+
REQUIRED SUB-SKILL: Use **deliver-deploy**.
|
|
66
|
+
|
|
67
|
+
## Step 6: Follow-Up (Critical)
|
|
68
|
+
|
|
69
|
+
### 6a: Record Gotcha
|
|
70
|
+
REQUIRED SUB-SKILL: Use **support-gotcha**.
|
|
71
|
+
|
|
72
|
+
Tag the gotcha with `severity: hotfix-workaround`. This tag is surfaced at session start by the forge session hook — it will remind you (or your teammates) about unresolved workarounds until a follow-up resolves them.
|
|
73
|
+
|
|
74
|
+
### 6b: Record Follow-Up
|
|
75
|
+
Document what needs to happen next. This is NOT optional — the hotfix cannot be marked complete without it.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Follow-up label: {short description, e.g., "payment-null-check-proper-fix"}
|
|
79
|
+
What was deferred: root cause deep dive, comprehensive test coverage, monitoring improvements, architectural review (if band-aid fix)
|
|
80
|
+
Resolved: false
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Store in the gotcha file alongside the `hotfix-workaround` tag. When the follow-up is completed (via `/bugfix` or `/feature`):
|
|
84
|
+
- Update `resolved: true` in the gotcha file to clear the session start warning.
|
|
85
|
+
- Set `successor_path: work/{type}/{follow-up-name}` on the hotfix manifest.
|
|
86
|
+
- Leave `status: completed` on the hotfix manifest (not `escalated` — the hotfix deploy itself was complete).
|
|
87
|
+
|
|
88
|
+
## Explicit Gate Exemptions
|
|
89
|
+
|
|
90
|
+
| Standard Gate | Hotfix Scope |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Full brainstorm | Skipped |
|
|
93
|
+
| Full architecture | Skipped |
|
|
94
|
+
| Full test plan | Smoke + regression only |
|
|
95
|
+
| Full code review | Critical pass only |
|
|
96
|
+
| Zero test failures (all types) | Existing + smoke pass |
|
|
97
|
+
|
|
98
|
+
Every skipped gate MUST be addressed in the follow-up ticket (Step 6b).
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor
|
|
3
|
+
description: "Refactor existing code to improve quality, maintainability, or performance. Ensures no behavior changes via comprehensive testing."
|
|
4
|
+
argument-hint: "[what to refactor]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /refactor — Disciplined Refactoring Workflow
|
|
8
|
+
|
|
9
|
+
You are refactoring existing code. The cardinal rule: **behavior must not change**. Tests are your proof that behavior is preserved. If the scope grows to include new behavior, escalate to `/feature`.
|
|
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. **What to refactor** — which code, module, or pattern
|
|
20
|
+
2. **Why** — tech debt, performance, readability, testability
|
|
21
|
+
3. **Constraints** — areas that must NOT be touched, deadlines
|
|
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 (any one is sufficient): path under `pocs/` or `*-prototype/`; `package.json` `"private": true` with no CI; missing `aiwiki/architecture/`; manifest shows prototype-phase active.
|
|
26
|
+
|
|
27
|
+
**If prototype mode is detected**, stop and offer the redirect:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
This looks like prototype iteration, not refactoring of production code (signals: <list matched signals>).
|
|
31
|
+
|
|
32
|
+
/refactor enforces no-behavior-change with coverage baseline + comprehensive tests as the safety net — appropriate for production code that has those tests, overkill for prototype work where mocks ARE the verification surface.
|
|
33
|
+
|
|
34
|
+
Redirect to iterate-prototype? [Y]es / [n]o continue with /refactor anyway / [a]bort
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
User responses:
|
|
38
|
+
- **Y / yes**: invoke `iterate-prototype` with the refactor description as input. Skip the rest of /refactor.
|
|
39
|
+
- **n / no**: proceed to Step 0a. User confirms there IS production-grade test coverage to refactor against.
|
|
40
|
+
- **a / abort**: stop.
|
|
41
|
+
|
|
42
|
+
If production mode, proceed to Step 0a directly.
|
|
43
|
+
|
|
44
|
+
## Step 0a: Preflight Checks
|
|
45
|
+
|
|
46
|
+
1. **Git is clean** — no uncommitted changes
|
|
47
|
+
2. **ALL tests pass** — the test suite is your safety net
|
|
48
|
+
3. **Test coverage baseline** — record current coverage; refactoring must not reduce it
|
|
49
|
+
4. **Branch** — `refactor/{description-slug}`
|
|
50
|
+
|
|
51
|
+
## Step 0b: Wiki Bootstrap
|
|
52
|
+
|
|
53
|
+
REQUIRED SUB-SKILL: Use **support-wiki-bootstrap** to ensure aiwiki/ exists.
|
|
54
|
+
|
|
55
|
+
Refactor decisions and any newly-discovered conventions write to `aiwiki/`.
|
|
56
|
+
|
|
57
|
+
Check if `.forge/work/refactor/{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.
|
|
60
|
+
|
|
61
|
+
**If it does not exist**: Create the work directory (`.forge/work/refactor/{name}/`) and manifest using the template at `.claude/templates/manifests/refactor.yaml`. Fill placeholders `{name}`, `{description}`, `{date}`. Record coverage baseline in `coverage-baseline`.
|
|
62
|
+
|
|
63
|
+
If this refactor was escalated from a bugfix, set `escalated_from: work/bugfix/{predecessor-name}`.
|
|
64
|
+
|
|
65
|
+
## Step 1: Discover — Codebase Analysis
|
|
66
|
+
|
|
67
|
+
REQUIRED SUB-SKILL: Use **discover-codebase-analysis**.
|
|
68
|
+
|
|
69
|
+
### GATE: Codebase Analysis
|
|
70
|
+
Present the analysis to the user. User must approve before planning begins. Update manifest: `discover.codebase-analysis.status: complete, gate-passed: true`.
|
|
71
|
+
|
|
72
|
+
## Step 2: Plan — Brainstorm Refactoring Approach
|
|
73
|
+
|
|
74
|
+
REQUIRED SUB-SKILL: Use **plan-brainstorm** (scoped to refactoring).
|
|
75
|
+
|
|
76
|
+
### GATE: Brainstorm Approval
|
|
77
|
+
User must explicitly approve the refactoring approach. Update manifest: `plan.brainstorm.status: complete, gate-passed: true`.
|
|
78
|
+
|
|
79
|
+
## Step 3: Plan — Task Decomposition
|
|
80
|
+
|
|
81
|
+
REQUIRED SUB-SKILL: Use **plan-task-decompose**.
|
|
82
|
+
|
|
83
|
+
### GATE: Task Plan Review
|
|
84
|
+
User approves the task breakdown. Update manifest: `plan.task-decompose.status: complete, gate-passed: true`.
|
|
85
|
+
|
|
86
|
+
## Step 4: Build — Implement Refactoring (Phase Loop)
|
|
87
|
+
|
|
88
|
+
Execute tasks phase by phase from the task plan. Phases run sequentially. Tasks within a phase run in parallel when `execution.mode` is `subagent`.
|
|
89
|
+
|
|
90
|
+
For each phase, run full test suite first to confirm baseline passes, then for each task:
|
|
91
|
+
|
|
92
|
+
1. REQUIRED SUB-SKILL: Use **build-tdd** — write characterization tests first if missing, then refactor, then verify. For subagent execution mode, run with `isolation: "worktree"` so phase tasks parallelize cleanly.
|
|
93
|
+
2. REQUIRED SUB-SKILL: Use **quality-code-review** — fix any Critical or Important findings before the task closes.
|
|
94
|
+
3. Commit: `refactor: {what was improved}` (inline mode) or merge the worktree (`git merge --no-ff`) into the refactor branch (subagent mode).
|
|
95
|
+
|
|
96
|
+
After every phase completes, re-run the full test suite on the merged result before moving to the next phase.
|
|
97
|
+
|
|
98
|
+
**If ANY test breaks and you cannot immediately see why, REVERT.** Do not fix the test to match new behavior — that means you changed behavior.
|
|
99
|
+
|
|
100
|
+
### GATE: Implementation Complete
|
|
101
|
+
All phases complete. All per-task code reviews passed. All tests pass on merged result. Coverage equals or exceeds baseline.
|
|
102
|
+
Update manifest: mark all tasks in `build.tasks` as complete.
|
|
103
|
+
|
|
104
|
+
## Step 5: Quality — Test Execution
|
|
105
|
+
|
|
106
|
+
REQUIRED SUB-SKILL: Use **quality-test-execution**.
|
|
107
|
+
Coverage must be equal or higher than baseline.
|
|
108
|
+
|
|
109
|
+
### GATE: Test Results
|
|
110
|
+
All tests pass. Coverage equals or exceeds baseline recorded in Step 0. Fix failures before proceeding.
|
|
111
|
+
Update manifest: `quality.test-execution.status: complete, gate-passed: true`.
|
|
112
|
+
|
|
113
|
+
## Step 5.5: Quality — Refactoring Assessment
|
|
114
|
+
|
|
115
|
+
Produce a before/after summary of what the refactoring improved.
|
|
116
|
+
|
|
117
|
+
**Quantitative** (from `git diff --stat`):
|
|
118
|
+
- Files changed, lines added/removed
|
|
119
|
+
- Functions/methods before vs after
|
|
120
|
+
|
|
121
|
+
**Qualitative** — assess which of these improved, stayed the same, or got worse (tradeoffs):
|
|
122
|
+
- Readability, simplicity, consistency
|
|
123
|
+
- Maintainability, testability, debuggability
|
|
124
|
+
- Predictability, correctness
|
|
125
|
+
|
|
126
|
+
Present the assessment to the user. This feeds into the PR description.
|
|
127
|
+
Update manifest: `quality.assessment.status: complete, gate-passed: true`.
|
|
128
|
+
|
|
129
|
+
### GATE: Refactoring Assessment
|
|
130
|
+
User has reviewed the before/after assessment. Assessment feeds into the PR description.
|
|
131
|
+
|
|
132
|
+
## Step 6: Deliver — Create PR
|
|
133
|
+
|
|
134
|
+
REQUIRED SUB-SKILL: Use **build-pr-workflow**.
|
|
135
|
+
Keep the PR focused — refactoring only, no feature work mixed in.
|
|
136
|
+
|
|
137
|
+
## Step 7: Support — Record Lessons
|
|
138
|
+
|
|
139
|
+
REQUIRED SUB-SKILL: Use **support-gotcha**.
|
|
140
|
+
|
|
141
|
+
## Gate Exemptions
|
|
142
|
+
|
|
143
|
+
| Standard Gate | Refactor Equivalent | Rationale |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| quality-test-plan | Skipped | Refactoring preserves behavior — the existing test suite IS the test plan. Characterization tests are added in Step 4 via build-tdd when coverage gaps exist. |
|
|
146
|
+
| requirements → brainstorm | Compressed (discover → brainstorm) | No new requirements — scope is existing code quality. |
|
|
147
|
+
| architecture phase | Skipped | Refactoring operates within existing architecture. If architecture changes are needed, escalate to `/feature`. |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resume
|
|
3
|
+
description: "Resume a paused .forge/work item from its current phase."
|
|
4
|
+
argument-hint: "[type/name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /resume — Resume Work Item
|
|
8
|
+
|
|
9
|
+
Resume a paused work item without restarting completed phases.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
Resumes an existing in-flight work item by reading its manifest and re-entering its owning command (`/feature`, `/greenfield`, `/bugfix`, `/hotfix`, `/refactor`) at the first unfinished phase. Does NOT create new work items, modify gate state, re-run already-passed gates, or abort/escalate work. Invoke after a session break, after a manifest update, or whenever the user wants to continue paused work.
|
|
14
|
+
|
|
15
|
+
## Input
|
|
16
|
+
|
|
17
|
+
Accept `type/name` when provided, such as `feature/add-payments`. If omitted, run `/status` first and ask the user which in-flight item to resume.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. Read `.forge/work/{type}/{name}/manifest.yaml`.
|
|
22
|
+
2. If `status` is `completed`, `abandoned`, or `escalated`, do not resume. Surface the status and any `successor_path`.
|
|
23
|
+
3. Identify the last completed phase and the first incomplete phase using the same gate-skip rules as the owning command.
|
|
24
|
+
4. Invoke the owning command (`/feature`, `/greenfield`, `/bugfix`, `/hotfix`, or `/refactor`) with the work item name and instruct it to resume from the manifest.
|
|
25
|
+
5. Do not recreate manifests, delete files, or rerun phases whose gates already passed.
|