@jamie-tam/forge 6.0.0 → 6.1.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.
Files changed (61) hide show
  1. package/README.md +73 -59
  2. package/agents/dreamer.md +5 -6
  3. package/agents/gotcha-hunter.md +1 -1
  4. package/agents/prototype-codifier.md +2 -2
  5. package/commands/{forge.md → discover.md} +11 -9
  6. package/commands/feature.md +50 -8
  7. package/commands/{evolve.md → forge-evolve.md} +3 -3
  8. package/commands/greenfield.md +5 -5
  9. package/commands/note.md +64 -0
  10. package/commands/{task-force.md → parallel.md} +15 -15
  11. package/commands/resume.md +2 -2
  12. package/commands/setup.md +18 -17
  13. package/commands/status.md +2 -2
  14. package/dist/__tests__/hooks.test.js +334 -0
  15. package/dist/__tests__/init.test.js +110 -0
  16. package/dist/__tests__/work-manifest.test.js +48 -14
  17. package/dist/cli.js +0 -0
  18. package/dist/hooks.js +88 -6
  19. package/dist/init.js +39 -1
  20. package/dist/uninstall.js +11 -5
  21. package/dist/work-manifest.js +63 -24
  22. package/hooks/hooks.json +14 -1
  23. package/hooks/scripts/pre-compact.sh +3 -6
  24. package/hooks/scripts/session-start.sh +1 -1
  25. package/hooks/templates/CLAUDE.md.template +6 -3
  26. package/package.json +1 -1
  27. package/references/common/phases.md +8 -6
  28. package/references/common/skill-authoring.md +1 -1
  29. package/rules/common/forge-system.md +42 -4
  30. package/skills/build-prototype/SKILL.md +4 -4
  31. package/skills/build-tdd/SKILL.md +14 -0
  32. package/skills/concept-slides/SKILL.md +11 -11
  33. package/skills/deliver-deploy/SKILL.md +1 -1
  34. package/skills/harden/SKILL.md +6 -6
  35. package/skills/quality-test-execution/SKILL.md +26 -1
  36. package/skills/quality-test-plan/SKILL.md +21 -1
  37. package/skills/support-debug/SKILL.md +1 -1
  38. package/skills/support-dream/SKILL.md +5 -5
  39. package/skills/support-gotcha/SKILL.md +3 -3
  40. package/skills/{support-task-force → support-parallel}/SKILL.md +22 -22
  41. package/skills/{support-task-force → support-parallel}/references/dispatch-pattern.md +10 -10
  42. package/skills/{support-task-force → support-parallel}/references/synthesis-template.md +10 -10
  43. package/skills/support-skill-validator/SKILL.md +5 -5
  44. package/skills/support-skill-validator/references/validation-checks.md +1 -1
  45. package/skills/support-system-guide/SKILL.md +4 -3
  46. package/skills/support-wiki-lint/scripts/lint.mjs +52 -0
  47. package/templates/README.md +1 -1
  48. package/templates/aiwiki/schemas/session.md +15 -14
  49. package/templates/manifests/bugfix.yaml +1 -1
  50. package/templates/manifests/feature.yaml +1 -1
  51. package/templates/manifests/greenfield.yaml +1 -1
  52. package/templates/manifests/hotfix.yaml +1 -1
  53. package/templates/manifests/refactor.yaml +1 -1
  54. package/templates/manifests/v5/SCHEMA.md +14 -17
  55. package/templates/manifests/v5/feature.yaml +1 -1
  56. package/templates/manifests/v6/SCHEMA.md +14 -10
  57. package/commands/abort.md +0 -25
  58. package/dist/__tests__/active-manifest.test.js +0 -272
  59. package/dist/__tests__/gate-check.test.js +0 -384
  60. package/dist/active-manifest.js +0 -229
  61. package/dist/gate-check.js +0 -326
package/README.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  **A production-grade `.claude` harness for prototype-driven AI development**
4
4
 
5
- <!-- Badges -->
6
- <!-- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -->
7
- <!-- [![Claude Code](https://img.shields.io/badge/Claude%20Code-compatible-blue.svg)](#) -->
5
+ Source: [github.com/lps-ai/forge](https://github.com/lps-ai/forge) · Changelog: [CHANGELOG.md](CHANGELOG.md) · License: [MIT](LICENSE)
6
+
7
+ ---
8
+
9
+ > ⚠️ **Experimental — early access.** This npm package is still experimental and needs a lot of adjustment. It was published to npm for convenience (so `npx @jamie-tam/forge init` works), but forge is **not feature-complete and not well-tested yet**. Expect breaking changes between versions, rough edges, half-finished commands, and gaps that dogfooding hasn't surfaced. Names, command surfaces, manifest schemas, and skill boundaries are all still in motion. If you try it: pin a version, expect to update often, and please file issues at [github.com/lps-ai/forge/issues](https://github.com/lps-ai/forge/issues) — every real-world signal helps stabilize the next release.
8
10
 
9
11
  ---
10
12
 
@@ -25,10 +27,10 @@ The v6 schema (`templates/manifests/v6/SCHEMA.md`) adds `phase_plan:` at the top
25
27
 
26
28
  ## Key Features
27
29
 
28
- - **30 skills** spanning the prototype-driven pipeline plus production-grade quality gates
29
- - **13 commands** for discovery, setup, workflows, evolution, and validation
30
- - **17 specialized agents** with explicit phase-context (prototype-builder for Phase 4, builder for Phase 6, plus architects, reviewers, hunters, dreamers)
31
- - **8 common rules** tiered by phase (always-on safety floor + phase-conditional from codify onward) + **7 common references** for skill authoring, agent coordination, and workflow protocol
30
+ - **31 skills** spanning the prototype-driven pipeline plus production-grade quality gates
31
+ - **13 commands** for discovery, setup, workflows, knowledge capture, evolution, and validation
32
+ - **17 specialized agents** with explicit phase-context (prototype-builder for Phase 3-4, builder for Phase 6, plus architects, reviewers, hunters, dreamers)
33
+ - **8 common rules** auto-loaded every session (one `testing.md` is paths-conditional, loading only on test files and source code) + **8 common references** for skill authoring, agent coordination, and workflow protocol
32
34
  - **Work manifests** with `phase_plan` (preflight intent), `phases` (gate state), `slice_graph` (build decomposition), and `artifacts` (phase outputs + lock signals)
33
35
  - **`aiwiki/` typed pages** with LINT on every write + async dream consolidation
34
36
  - **Quality gates** at the prototype-to-production transition where they catch real bugs, not premature plan-phase gates
@@ -43,9 +45,9 @@ npx @jamie-tam/forge init
43
45
  ```
44
46
 
45
47
  This installs everything into your project's `.claude/` directory:
46
- - **Rules** — phase-tiered (always-on safety floor + phase-conditional standards from codify onward)
47
- - **Skills** — 30 atomic skills covering the prototype-driven pipeline + production gates
48
- - **Commands** — 8 slash commands for setup, workflows, evolution, and validation
48
+ - **Rules** — 8 common rules auto-loaded every session (one is paths-conditional) + language-specific rules layered per detected stack
49
+ - **Skills** — 31 atomic skills covering the prototype-driven pipeline + production gates
50
+ - **Commands** — 13 slash commands for discovery, setup, workflows, knowledge capture, evolution, and validation
49
51
  - **Agents** — 17 specialized subagents with MCP server access (context7, playwright)
50
52
  - **Hooks** — gate-enforcer, wiki-lint, telemetry, state preservation, session checkpoints
51
53
  - **CLAUDE.md** — project configuration template
@@ -145,41 +147,46 @@ Forge detects these tools automatically and offers integration when available. W
145
147
  ## Architecture
146
148
 
147
149
  ```
148
- Commands (workflows) Skills (prefix-grouped) Rules (phase-tiered)
149
- --------------------- ----------------------- --------------------
150
- /forge (discovery) concept-slides [Phase 1] Always-on (safety floor):
151
- /setup build-wireframe [Phase 2] common/security
152
- /feature build-prototype [Phase 3] common/guardrails
153
- /greenfield iterate-prototype [Phase 4] common/verification
154
- /bugfix harden [Phase 5] common/skill-selection
155
- /refactor build-scaffold Phase-conditional (from codify):
156
- /hotfix build-tdd [Phase 6] common/testing
157
- /evolve build-pr-workflow common/quality-gates
158
- /validate quality-code-review common/git-workflow
159
- quality-test-plan
160
- Work Manifests (v6) quality-test-execution References (load on demand)
161
- ------------------- quality-security-audit ----------------------------
162
- .forge/work/ quality-uiux common/
163
- {type}/ deliver-deploy [Phase 7] agent-coordination
164
- {name}/ deliver-db-migration io-protocol
165
- manifest.yaml deliver-onboarding skill-authoring
166
- schema_version: "6" discover-requirements skill-compliance
167
- phase_plan: {…} discover-codebase-analysis phases (canonical vocab)
168
- phases: {} plan-brainstorm coding-standards
169
- slice_graph: {} plan-architecture typescript/ python/ react/
170
- artifacts: {…} plan-design-system [extensible]
171
- plan-task-decompose
172
- aiwiki/ (knowledge layer) support-system-guide Protocols (read on demand)
173
- ------------------------- support-debug --------------------------
174
- decisions/ support-gotcha protocols/codex.md
175
- gotchas/ support-wiki-lint protocols/graphify.md
176
- conventions/ support-runtime-reachability
177
- architecture/ support-dream Hooks
178
- sessions/ support-skill-validator ------
179
- raw/ gate-enforcer
180
- proposed/ (dream queue) wiki-lint
181
- schemas/ session-start / pre-compact
182
- CLAUDE.md (usage rules) telemetry
150
+ Commands (workflows) Skills (prefix-grouped) Rules (auto-loaded)
151
+ --------------------- ----------------------- -------------------
152
+ /discover (discovery) concept-slides [Phase 1] common/forge-system
153
+ /setup build-wireframe [Phase 2] common/security
154
+ /feature build-prototype [Phase 3] common/guardrails
155
+ /greenfield iterate-prototype [Phase 4] common/verification
156
+ /bugfix harden [Phase 5] common/skill-selection
157
+ /refactor build-scaffold common/quality-gates
158
+ /hotfix build-tdd [Phase 6] common/git-workflow
159
+ /note (capture) build-pr-workflow common/testing (paths-conditional)
160
+ /parallel (parallel) quality-code-review
161
+ /status quality-test-plan
162
+ /resume quality-test-execution References (load on demand)
163
+ /forge-evolve quality-security-audit ----------------------------
164
+ /validate quality-uiux common/
165
+ deliver-deploy [Phase 7] agent-coordination
166
+ deliver-db-migration io-protocol
167
+ Work Manifests (v6) deliver-onboarding skill-authoring
168
+ ------------------- discover-requirements skill-compliance
169
+ .forge/work/ discover-codebase-analysis phases (canonical vocab)
170
+ {type}/ plan-brainstorm coding-standards
171
+ {name}/ plan-architecture quality-gates
172
+ manifest.yaml plan-design-system feature-tracking
173
+ schema_version: "6" plan-task-decompose typescript/ python/ react/
174
+ phase_plan: {…} support-system-guide [extensible]
175
+ phases: {…} support-debug
176
+ slice_graph: {…} support-gotcha Protocols (read on demand)
177
+ artifacts: {…} support-wiki-lint --------------------------
178
+ support-wiki-bootstrap protocols/codex.md
179
+ aiwiki/ (knowledge layer) support-dream protocols/graphify.md
180
+ ------------------------- support-parallel
181
+ decisions/ support-runtime-reachability Hooks
182
+ gotchas/ support-skill-validator ------
183
+ conventions/ gate-enforcer
184
+ architecture/ wiki-lint
185
+ sessions/ session-start / pre-compact
186
+ raw/ telemetry
187
+ proposed/ (dream queue)
188
+ schemas/
189
+ CLAUDE.md (usage rules)
183
190
  ```
184
191
 
185
192
  ---
@@ -188,15 +195,19 @@ aiwiki/ (knowledge layer) support-system-guide Protocols (re
188
195
 
189
196
  | Command | Description | When to Use |
190
197
  |---------|-------------|-------------|
191
- | `/forge` | One-screen orientation -- installed capabilities, active work, suggested next | Run this first if you're new, or any time you want an overview |
198
+ | `/discover` | One-screen orientation -- installed capabilities, active work, suggested next | Run this first if you're new, or any time you want an overview |
192
199
  | `/setup` | Detect project stack, install matching language rules, and fill the project profile | Right after `npx @jamie-tam/forge init` |
193
- | `/feature` | Full feature workflow with quality gates at every transition | Adding a feature to an existing codebase |
200
+ | `/feature` | Full feature workflow with quality gates at the codify-to-production transition (Phase 5+) | Adding a feature to an existing codebase |
194
201
  | `/greenfield` | New project from zero -- includes scaffolding and onboarding docs | Starting a brand-new project |
195
202
  | `/bugfix` | Systematic debug, TDD fix, code review, and PR | Something is broken and needs fixing |
196
203
  | `/refactor` | Analyze, plan approach, restructure with tests, PR | Code needs cleanup without new functionality |
197
204
  | `/hotfix` | Emergency compressed flow -- debug, minimal test, deploy | Production is down, need a fix now |
198
- | `/evolve` | Review gotchas, improve skills, validate changes | Improving the system itself after a project cycle |
199
- | `/validate` | Run 5 consistency checks across all skills, rules, and commands | After customizing skills or running `/evolve` |
205
+ | `/note` | Append an ad-hoc research note or brainstorm to `aiwiki/raw/{date}.md` | Phase 1-2 research, half-formed thoughts, anything that doesn't yet fit a typed page |
206
+ | `/parallel` | Dispatch parallel agents for a punch list of ad-hoc tasks; phase-aware sizing | Multiple independent small tasks to crunch in one pass |
207
+ | `/status` | List in-flight `.forge/work` items and their current phase | Check what's open before starting new work |
208
+ | `/resume` | Continue a paused work item from its current phase | Pick up a `.forge/work` item left mid-flow |
209
+ | `/forge-evolve` | Review gotchas, improve skills, validate changes | Improving the system itself after a project cycle |
210
+ | `/validate` | Run 5 consistency checks across all skills, rules, and commands | After customizing skills or running `/forge-evolve` |
200
211
 
201
212
  ---
202
213
 
@@ -210,7 +221,7 @@ aiwiki/ (knowledge layer) support-system-guide Protocols (re
210
221
  | `build-wireframe` | 2 | Single-HTML annotated wireframe with click-through demo and callouts; backend-heavy products get a verification-UI sketch |
211
222
  | `build-prototype` | 3 | Vite + React + TS + Tailwind v4 + Zustand v5 scaffold with parallel partition builders |
212
223
  | `iterate-prototype` | 4 | Polish loop with feedback file + 5-cycle drift checks; captures gotchas + conventions as side effects |
213
- | `harden` | 5 | Codifies the locked prototype into architecture files + ADRs (with `/second-opinion` review) + slice graph + tasks |
224
+ | `harden` | 5 | Codifies the locked prototype into architecture files + ADRs (adversarial objections surfaced inline in each ADR `review:` block) + slice graph + tasks |
214
225
 
215
226
  ### Discover & Plan (fallback for non-prototype work)
216
227
 
@@ -257,7 +268,9 @@ aiwiki/ (knowledge layer) support-system-guide Protocols (re
257
268
  | `support-debug` | Systematic 4-phase debugging with 3-fix threshold and fact-checking |
258
269
  | `support-gotcha` | Self-learning from mistakes — captures lessons to `aiwiki/gotchas/`, auto-promotes after N=3 occurrences |
259
270
  | `support-wiki-lint` | Validates `aiwiki/` page schemas + citations on every write (hook-driven); backfills `@<sha7>` citation hashes |
271
+ | `support-wiki-bootstrap` | Scaffold `aiwiki/` (typed-page subdirs, schemas, CLAUDE.md, INDEX) once before workflows write to it |
260
272
  | `support-dream` | Async wiki consolidation (merge/promote/prune) at phase-close / pre-compact / manual. Writes to `aiwiki/proposed/` for user review |
273
+ | `support-parallel` | Run parallel agents for a user-supplied punch list; phase-aware crew sizing, command-routing for command-shaped items |
261
274
  | `support-runtime-reachability` | Detects orphaned exports (code with no production caller) — the gate that catches "tests pass but feature isn't wired up" |
262
275
  | `support-skill-validator` | Validate skill consistency: conflicts, I/O gaps, overlaps, gate coverage, drift |
263
276
 
@@ -270,31 +283,32 @@ A standard-size `/feature "add auth"` on an existing prototype-driven codebase f
270
283
  ```
271
284
  User: /feature "add auth"
272
285
  |
273
- +-- Step 0: Repo-state detection
286
+ +-- Preflight 0: Repo-state detection
274
287
  | Prototype mode? → offer redirect to iterate-prototype
275
288
  | Production mode? → proceed
276
- +-- Step 0a: Preflight checks (git clean, tests pass)
277
- +-- Step 0b: aiwiki/ scaffold if missing
278
- +-- Step 1: phase_plan — preflight planner proposes per-phase
289
+ +-- Preflight 1: Preflight checks (git clean, tests pass)
290
+ +-- Preflight 2: aiwiki/ scaffold if missing
291
+ +-- Preflight 3: phase_plan — preflight planner proposes per-phase
279
292
  | active / active-light / skipped status; user confirms
280
293
  +-- Create/resume manifest (.forge/work/feature/add-auth/manifest.yaml)
281
294
  |
282
- +-- Phase 2: [concept-slides] (if active)
295
+ +-- Phase 1: [concept-slides] (if active)
283
296
  | Low-fidelity deck — what is this feature, where it sits
284
297
  | === GATE: concept locked → artifacts.concept.locked_at ===
285
298
  |
286
- +-- Phase 3: [build-wireframe] (if active)
299
+ +-- Phase 2: [build-wireframe] (if active)
287
300
  | Single-HTML mini-wireframe for the feature's screens
288
301
  | === GATE: wireframe locked → artifacts.wireframe.locked_at ===
289
302
  |
290
- +-- Phase 4: [build-prototype] + [iterate-prototype] (if active)
303
+ +-- Phase 3-4: [build-prototype] + [iterate-prototype] (if active)
291
304
  | Working prototype skin into existing app; iterate to satisfaction
292
305
  | Side effects: capture gotchas + conventions to aiwiki/
293
306
  | === GATE: prototype locked → artifacts.prototype.locked_at ===
294
307
  |
295
308
  +-- Phase 5: [harden] (if active)
296
- | Codify prototype → aiwiki/architecture/, ADRs (with /second-opinion),
297
- | slice graph in manifest. Dream consolidates phase 4 captures.
309
+ | Codify prototype → aiwiki/architecture/, ADRs (adversarial objections
310
+ | in each ADR `review:` block), slice graph in manifest.
311
+ | Dream consolidates phase 3-4 captures.
298
312
  | === GATE: codify locked + user approves dream proposal ===
299
313
  |
300
314
  +-- Phase 6: [build-pr-workflow] worktree → per-slice:
package/agents/dreamer.md CHANGED
@@ -61,11 +61,10 @@ Apply operations in this order:
61
61
  3. **Prune stale** — for each entry whose cited code no longer exists OR whose decision is superseded:
62
62
  - Mark for deletion in the manifest's `operations` (`op: prune`)
63
63
  - Do NOT write a "tombstone" file; absence in proposed/ means delete on accept
64
- 4. **Refresh session file (PreCompact only)** — for `aiwiki/sessions/{current}.md`:
65
- - Read the existing file (the hook-maintained event log)
66
- - Consolidate the event log into the schema sections (Files touched, Decisions made, Gotchas surfaced, Open questions, Next steps)
67
- - Write the refined version to `aiwiki/proposed/{dream_id}/sessions/{current}.md`
68
- - DO NOT recreate the file — it must exist (hook created it). If missing, FAIL with `SESSION_FILE_MISSING`.
64
+ 4. **Refresh session file (PreCompact only, conditional)** — for `aiwiki/sessions/{current}.md`:
65
+ - **Check first**: does `aiwiki/sessions/{current}.md` exist? Session-checkpoint hooks (SessionStart create + PostToolUse append) are currently **deferred** per `templates/aiwiki/schemas/session.md`. If the file does NOT exist, SKIP this step entirely — no failure, no fresh-write. Proceed with raw + typed page consolidation only.
66
+ - If it DOES exist: read it (the hook-maintained event log), consolidate the event log into the schema sections (Files touched, Decisions made, Gotchas surfaced, Open questions, Next steps), and write the refined version to `aiwiki/proposed/{dream_id}/sessions/{current}.md`.
67
+ - DO NOT recreate the file if missing — that would generate speculation (`templates/aiwiki/CLAUDE.md.template:76` forbids it). The skip-if-missing branch handles the deferred-hooks state cleanly.
69
68
 
70
69
  ### Phase 4: Prune & index
71
70
 
@@ -94,7 +93,7 @@ Apply operations in this order:
94
93
  - ANY file in `aiwiki/` (input store untouched)
95
94
  - ANY file in `.forge/work/` (operational state, not knowledge)
96
95
  - Tombstone files for prunes (manifest's `operations` log records the prune; absence in proposed/ means delete on accept)
97
- - A fresh `aiwiki/sessions/{current}.md` if the hook-maintained one doesn't exist (FAIL with `SESSION_FILE_MISSING` instead something is wrong upstream)
96
+ - A fresh `aiwiki/sessions/{current}.md` if it doesn't exist session-checkpoint hooks are currently deferred per `templates/aiwiki/schemas/session.md`; SKIP session-file refinement instead (no failure, no speculation-write)
98
97
  - Any file outside `aiwiki/proposed/{dream_id}/`
99
98
 
100
99
  ## Provider Mode (for `anthropic-managed` only)
@@ -98,7 +98,7 @@ If a relevant gotcha has status `promotion-pending`, note it explicitly:
98
98
  [!] PROMOTION-PENDING — {title}
99
99
  This gotcha was auto-drafted at the 3rd occurrence and is awaiting
100
100
  session-start review. The proposed rule targets {target_rule_file}.
101
- Resolve at session-start or via /evolve before promoting more lessons.
101
+ Resolve at session-start or via /forge-evolve before promoting more lessons.
102
102
  ```
103
103
 
104
104
  ### Step 5: Summary
@@ -153,7 +153,7 @@ For every production delta whose answer is non-obvious OR has tradeoffs, draft a
153
153
  Each draft has:
154
154
  - `status: proposed` (will be changed to `accepted` or dropped after review)
155
155
  - All required schema sections (Context, Decision, Alternatives if non-obvious, Consequences, Review)
156
- - The `review` block is left empty — the harden skill's step 2 fills it via adversarial review (the dedicated `/second-opinion` slash command is *planned, not yet implemented*; until it ships, harden inlines the adversarial pass and writes the resulting objections + verdict into the `review:` block before promoting the ADR to `accepted`)
156
+ - The `review` block is left empty — the harden skill's Step 2 fills it via adversarial review (run inline by Claude, or dispatched to Codex in verify mode if configured) and writes the resulting objections + verdict into the `review:` block before promoting the ADR to `accepted`
157
157
 
158
158
  DO NOT skip an ADR because the answer "feels obvious." If it's a trigger-list decision, it needs the record.
159
159
 
@@ -187,7 +187,7 @@ Nothing. You return the structured proposal. The `harden` skill writes the files
187
187
  | Generating architecture by reasoning about what production should look like | Every claim cites a prototype file; if you can't cite, the claim is premature — drop it or mark it as a delta question for the user |
188
188
  | One giant architecture.md across all subsystems | Split by topic; multiple <400 line files beat one 1500-line file |
189
189
  | Skipping ADRs for "obvious" trigger-list decisions | Trigger list is strict; if it's on the list, the ADR exists regardless of how obvious you find the answer |
190
- | Pre-filling the ADR `review` block with imagined objections | Leave it empty; the harden skill's Step 2 runs adversarial review (today inline; `/second-opinion` dedicated surface is planned) to populate it |
190
+ | Pre-filling the ADR `review` block with imagined objections | Leave it empty; the harden skill's Step 2 runs adversarial review (inline or via Codex verify mode) to populate it |
191
191
  | Slice graph with vague acceptance criteria like "implementation is complete" | Each criterion is testable: "all routes return JSON with the documented error shape", not "errors are handled" |
192
192
  | Promoting Phase 4 raw entries to typed pages | Not your job — dream consolidates raw at phase close |
193
193
  | Modifying the prototype to fix issues you noticed | The prototype is locked; if there's a real issue, surface it as a finding, do not edit |
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: forge
2
+ name: discover
3
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
4
  ---
5
5
 
6
- # /forge — Discovery
6
+ # /discover — Discovery
7
7
 
8
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
9
 
@@ -26,7 +26,7 @@ Read the `## Project Profile` block from `CLAUDE.md` and present its yaml compac
26
26
 
27
27
  ## Section 3 — Active work
28
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:
29
+ Glob `.forge/work/*/*/manifest.yaml`. Exclude items whose top-level `status` is `completed` 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
30
 
31
31
  ```markdown
32
32
  | Type | Name | Phase | Manifest |
@@ -46,7 +46,7 @@ Pick **one** suggestion based on the state observed in sections 2 and 3. Use thi
46
46
  | Profile has `{detected ...}` placeholders | `/setup` |
47
47
  | One in-flight item | `/resume {type}/{name}` (cite the matching item) |
48
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`." |
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} — `/resume` to continue, or delete `.forge/work/{type}/{name}/` to drop it." |
50
50
  | Profile filled, no work items, `pocs/` exists | `/greenfield` (resume the prototype-driven flow) |
51
51
  | Profile filled, no work items, no `pocs/` | `/feature <name>` or `/greenfield <name>` — ask the user which |
52
52
 
@@ -67,26 +67,28 @@ Workflow commands
67
67
  State commands
68
68
  /status list in-flight work
69
69
  /resume <name> continue an in-flight item
70
- /abort <name> cancel an in-flight item
70
+
71
+ Knowledge commands
72
+ /note <text> append a research note / brainstorm to aiwiki/raw/{date}.md
71
73
 
72
74
  System commands
73
75
  /setup detect stack, fill project profile, scaffold .forge/ + aiwiki/
74
76
  /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
+ /forge-evolve improve the forge harness itself
78
+ /parallel <list> parallel agents for a punch list of ad-hoc tasks
77
79
  ```
78
80
 
79
81
  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
82
 
81
83
  ## When to use
82
84
 
83
- - User invokes `/forge` explicitly
85
+ - User invokes `/discover` explicitly
84
86
  - User asks "what's in this project?", "show me forge", or "what can forge do here?"
85
87
  - Periodic check-in — useful at the start of a session to see if anything is in flight before starting new work
86
88
 
87
89
  ## Do NOT
88
90
 
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.
91
+ - Do NOT invoke this on every session start — `support-system-guide` is the auto-triggering orientation skill. `/discover` is the explicit on-demand version.
90
92
  - Do NOT duplicate the long skill/group descriptions inline — drill-downs to `support-system-guide` keep this command compact.
91
93
  - Do NOT modify anything. This is a read-only discovery command.
92
94
 
@@ -58,8 +58,48 @@ If production mode is detected (or the user chose "no continue"), proceed to Ste
58
58
 
59
59
  REQUIRED SUB-SKILL: Use **support-wiki-bootstrap** to ensure aiwiki/ exists.
60
60
 
61
+ ## Step 0c: Trivial-Scope Fast Path
62
+
63
+ Before stepping through phase planning, detect whether the work is bugfix-sized. If so, offer a single-confirmation fast path that collapses Steps 1–6 (planning, discover, concept, wireframe, design-system, prototype, codify) and jumps straight to worktree → production-build → tests → review → PR.
64
+
65
+ **Detection signals (any one is sufficient):**
66
+ - `--size trivial` flag passed
67
+ - Description matches obvious trivial patterns: "fix typo", "change copy", "tweak <colour|spacing|padding|margin>", "rename X to Y", "bump version", "update dep", "add log line"
68
+ - User has explicitly scoped to a single file path in the description
69
+
70
+ **If a trivial signal fires, offer:**
71
+
72
+ ```
73
+ This looks like trivial-scope work (signal: <list matched signals>).
74
+
75
+ Fast path: skip Steps 1–6 (phase planning + discover + concept + wireframe + design-system + prototype + codify) and jump to:
76
+
77
+ Step 7 Worktree
78
+ Step 8 Production-build (build-tdd with --size trivial → focused regression test)
79
+ Step 9 Test plan + execution (trivial: unit tests for changed code, no E2E/load)
80
+ Step 10 Final code review
81
+ Step 11 Create PR
82
+ Step 13 Gotcha capture (if anything surprising emerged)
83
+
84
+ Manifest will be created with phase_plan:
85
+ concept, wireframe, plan-design-system, prototype, iterate, codify,
86
+ discover-codebase, uiux-review, onboarding: skipped
87
+ production-build, test-plan, code-review-final, deliver, gotchas: active
88
+
89
+ Confirm fast path? [Y]es / [n]o use standard /feature flow / [a]bort
90
+ ```
91
+
92
+ User responses:
93
+ - **Y / yes**: create the manifest with the trivial `phase_plan` above, then jump directly to Step 7 (skip Steps 1–6).
94
+ - **n / no**: proceed to Step 1 with the standard flow. User must accept the planning ceremony explicitly.
95
+ - **a / abort**: stop without action.
96
+
97
+ If no trivial signal fires (or the user chose "no continue"), proceed to Step 1.
98
+
61
99
  ## Step 1: Manifest + Phase Planning
62
100
 
101
+ **Skip if Step 0c's fast path was taken** — the manifest was already created with the trivial phase_plan and the flow has jumped to Step 7.
102
+
63
103
  Check if `.forge/work/feature/{name}/manifest.yaml` exists.
64
104
 
65
105
  **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.
@@ -82,17 +122,19 @@ For trivial features, multiple phases collapse — sometimes the entire workflow
82
122
 
83
123
  User can override any phase decision (e.g. "actually let's do a wireframe — I want to see the layout").
84
124
 
85
- ## Step 2: Discover — Codebase Analysis
125
+ ## Step 2: Discover — Codebase Analysis — if active
126
+
127
+ **Skip if** `phase_plan.discover-codebase: skipped` (the Step 0c fast path or explicit user override). For trivial-scope work that touches a single file the user has already named, codebase analysis is overhead; the trivial fast path skips it deliberately.
86
128
 
87
- REQUIRED SUB-SKILL: Use **discover-codebase-analysis**.
129
+ **Otherwise:** REQUIRED SUB-SKILL: Use **discover-codebase-analysis**.
88
130
 
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.
131
+ For non-trivial 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
132
 
91
133
  ### GATE: Codebase Analysis Approved
92
134
 
93
135
  User reviews. Update manifest: `discover.codebase-analysis.{status: complete, gate-passed: true}`.
94
136
 
95
- ## Step 3: Concept (Phase 2) — if active
137
+ ## Step 3: Concept (Phase 1) — if active
96
138
 
97
139
  REQUIRED SUB-SKILL: Use **concept-slides**.
98
140
 
@@ -102,7 +144,7 @@ For features, often a 1-3 slide mini-deck — what the feature is, where it sits
102
144
 
103
145
  Update manifest: `artifacts.concept.{deck_path, locked_at}`. Presence of `locked_at` is the lock signal that downstream phases check.
104
146
 
105
- ## Step 4: Wireframe (Phase 3) — if active
147
+ ## Step 4: Wireframe (Phase 2) — if active
106
148
 
107
149
  REQUIRED SUB-SKILL: Use **build-wireframe**.
108
150
 
@@ -124,7 +166,7 @@ Backend-only features (API endpoints, schema changes, internal refactors) skip t
124
166
 
125
167
  Update manifest: `artifacts.design-system.{path, approved_at}`.
126
168
 
127
- ## Step 5: Prototype (Phase 4) — if active
169
+ ## Step 5: Prototype (Phase 3) — if active
128
170
 
129
171
  REQUIRED SUB-SKILL: Use **build-prototype**, then **iterate-prototype** for polish.
130
172
 
@@ -144,7 +186,7 @@ REQUIRED SUB-SKILL: Use **harden**.
144
186
 
145
187
  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
188
 
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`.
189
+ For features touching `--size major` complexity (auth, payments, PII, schema changes): adversarial review is mandatory on every ADR. 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`. If Codex is configured (`protocols/codex.md`), the review pass may be dispatched to Codex in verify mode.
148
190
 
149
191
  ### GATE: Codified Plan Approved
150
192
 
@@ -219,7 +261,7 @@ REQUIRED SUB-SKILL: Use **deliver-onboarding**.
219
261
  ## Step 13: Support — Record Lessons
220
262
 
221
263
  REQUIRED SUB-SKILL: Use **support-gotcha**.
222
- Final dream cycle consolidates all Phase 4-12 wiki captures.
264
+ Final dream cycle consolidates all wiki captures from the previous phases.
223
265
 
224
266
  Update manifest: `status: completed`.
225
267
 
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: evolve
3
- description: "Review lessons learned and improve the skill system. Run after completing a feature or project."
2
+ name: forge-evolve
3
+ description: "Review lessons learned from accumulated gotchas and improve the forge skill system itself. Run after completing a feature or project. Operates on the forge harness — not on user project code."
4
4
  ---
5
5
 
6
- # /evolve — Self-Improvement Review
6
+ # /forge-evolve — Self-Improvement Review
7
7
 
8
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
9
 
@@ -55,7 +55,7 @@ If the user provided detailed requirements upfront, this step extracts and struc
55
55
 
56
56
  REQUIRED SUB-SKILL: Use **discover-requirements** (only if user has substantive existing requirements docs).
57
57
 
58
- ## Step 3: Concept (Phase 2)
58
+ ## Step 3: Concept (Phase 1)
59
59
 
60
60
  REQUIRED SUB-SKILL: Use **concept-slides**.
61
61
 
@@ -65,7 +65,7 @@ Produces a low-fidelity marp deck at `decks/{project-name}/slides.md` with hook,
65
65
 
66
66
  User reviews the rendered deck (HTML), gives feedback, locks when satisfied. Update manifest: `artifacts.concept.{deck_path, locked_at}`.
67
67
 
68
- ## Step 4: Wireframe (Phase 3)
68
+ ## Step 4: Wireframe (Phase 2)
69
69
 
70
70
  REQUIRED SUB-SKILL: Use **build-wireframe**.
71
71
 
@@ -85,7 +85,7 @@ Backend-only / CLI projects without a frontend skip this step entirely (no desig
85
85
 
86
86
  User approves the design tokens written to `DESIGN.md`. Update manifest: `artifacts.design-system.{path, approved_at}`.
87
87
 
88
- ## Step 5: Prototype (Phase 4)
88
+ ## Step 5: Prototype (Phase 3)
89
89
 
90
90
  REQUIRED SUB-SKILL: Use **build-prototype** for initial scaffold, then **iterate-prototype** for the polish loop.
91
91
 
@@ -105,7 +105,7 @@ REQUIRED SUB-SKILL: Use **harden**.
105
105
 
106
106
  Codifies the locked prototype into production-ready plans:
107
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)
108
+ - `aiwiki/decisions/{nnnn}-{slug}.md` — ADRs (adversarial review runs inline at harden Step 2, surfacing objections in each ADR's `review:` block; optionally dispatched to Codex in verify mode when configured)
109
109
  - `aiwiki/conventions/` — production-surface conventions
110
110
  - `aiwiki/gotchas/` — Phase 4 gotchas with production addenda
111
111
  - Slice graph + `tasks.md` in manifest
@@ -144,7 +144,7 @@ ALL tests pass. Coverage meets thresholds (minimum 80%, 100% for critical paths)
144
144
 
145
145
  ## Step 8.5: UI/UX Review (if applicable)
146
146
 
147
- If the project has a frontend (per Phase 1 phase planning):
147
+ If the project has a frontend (per Step 1 phase planning):
148
148
 
149
149
  REQUIRED SUB-SKILL: Use **quality-uiux**.
150
150
  Validates production implementation matches the locked wireframe + design tokens.
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: note
3
+ description: "Append a one-off research note, brainstorm, or insight to aiwiki/raw/{date}.md with a timestamp. Zero schema, zero friction — capture first, dream consolidates later. Use during Phase 1-2 research, ad-hoc exploration, or any thought worth remembering that doesn't yet fit a typed page (decision/gotcha/convention)."
4
+ ---
5
+
6
+ # /note — Capture to aiwiki/raw
7
+
8
+ Append the user-supplied text to `aiwiki/raw/{YYYY-MM-DD}.md` under a timestamped header. No schema, no judgment — just capture. The wiki-lint hook fires automatically on save (no-op for raw/ since raw has no schema). `support-dream` consolidates raw entries at phase-close and PreCompact (~85% context), promoting anything that matches a typed schema to `aiwiki/proposed/{dream_id}/` for review.
9
+
10
+ ## Steps
11
+
12
+ 1. **Note text** = everything after `/note ` in the user's invocation. If the argument is empty, ask the user what they'd like to capture and wait for the reply.
13
+ 2. **Today's date** = `$(date +%Y-%m-%d)`.
14
+ 3. **Target file** = `aiwiki/raw/{date}.md`. Create the directory if needed: `mkdir -p aiwiki/raw`.
15
+ 4. **If the file doesn't exist**, start it with: `# Raw notes — {date}` followed by a blank line.
16
+ 5. **Append a section**:
17
+ - Header: `## {HH:MM} — {first ~60 chars of the note, no trailing punctuation}`
18
+ - Blank line
19
+ - The full note body
20
+ - Blank line
21
+ 6. **Confirm to the user**: "Captured to `aiwiki/raw/{date}.md`."
22
+
23
+ ## Example
24
+
25
+ User: `/note Considering Tailwind v4 — oxide engine fast but plugin ecosystem still broken in 2026; revisit in Q3`
26
+
27
+ Resulting `aiwiki/raw/2026-05-15.md`:
28
+
29
+ ```markdown
30
+ # Raw notes — 2026-05-15
31
+
32
+ ## 14:23 — Considering Tailwind v4 — oxide engine fast but plugin ecosystem
33
+
34
+ Considering Tailwind v4 — oxide engine fast but plugin ecosystem still broken in 2026; revisit in Q3
35
+ ```
36
+
37
+ ## When to use
38
+
39
+ - During **Phase 1 (concept)** or **Phase 2 (wireframe)** when research or brainstorm yields an insight worth remembering — neither phase auto-captures to aiwiki, so `/note` is the manual hook.
40
+ - During any phase when a thought doesn't yet fit a typed page (it's not yet a decision, not yet a confirmed gotcha, not yet an established convention).
41
+ - When deferring a decision: "considered X, need more info before committing."
42
+
43
+ ## When NOT to use
44
+
45
+ - The content is a **decision** → write to `aiwiki/decisions/` directly using the decision schema. Future agents read that folder for ADRs; raw notes there won't be retrieved predictably.
46
+ - The content is a **confirmed gotcha** (with reproducible failure mode) → write to `aiwiki/gotchas/` directly so gotcha-hunter can find it.
47
+ - The content is an **established convention** → write to `aiwiki/conventions/` so harden and code-reviewer can enforce it.
48
+
49
+ `/note` is for the in-between — research, hypotheses, half-formed thoughts that haven't earned a typed page yet. Dream consolidation will promote anything that matures into a typed shape.
50
+
51
+ ## I/O Contract
52
+
53
+ | Field | Value |
54
+ |---|---|
55
+ | **Requires** | `aiwiki/` directory (scaffolded by `/setup`) |
56
+ | **Produces** | New or appended `aiwiki/raw/{YYYY-MM-DD}.md` |
57
+ | **Triggers** | `wiki-lint` PostToolUse hook (no-op for raw/) |
58
+ | **Feeds into** | `support-dream` at phase-close and PreCompact — raw entries that match typed schemas get promoted to `aiwiki/proposed/{dream_id}/` for user review |
59
+
60
+ ## Do NOT
61
+
62
+ - Do NOT edit prior entries. The point is append-only history. If a note turned out wrong, append a correction with the new timestamp.
63
+ - Do NOT structure the note. Plain prose. Schema-fitting is dream's job, not yours.
64
+ - Do NOT use `/note` for things that already fit a typed schema — write the typed page directly instead.