@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.
- package/README.md +73 -59
- package/agents/dreamer.md +5 -6
- package/agents/gotcha-hunter.md +1 -1
- package/agents/prototype-codifier.md +2 -2
- package/commands/{forge.md → discover.md} +11 -9
- package/commands/feature.md +50 -8
- package/commands/{evolve.md → forge-evolve.md} +3 -3
- package/commands/greenfield.md +5 -5
- package/commands/note.md +64 -0
- package/commands/{task-force.md → parallel.md} +15 -15
- package/commands/resume.md +2 -2
- package/commands/setup.md +18 -17
- package/commands/status.md +2 -2
- package/dist/__tests__/hooks.test.js +334 -0
- package/dist/__tests__/init.test.js +110 -0
- package/dist/__tests__/work-manifest.test.js +48 -14
- package/dist/cli.js +0 -0
- package/dist/hooks.js +88 -6
- package/dist/init.js +39 -1
- package/dist/uninstall.js +11 -5
- package/dist/work-manifest.js +63 -24
- package/hooks/hooks.json +14 -1
- package/hooks/scripts/pre-compact.sh +3 -6
- package/hooks/scripts/session-start.sh +1 -1
- package/hooks/templates/CLAUDE.md.template +6 -3
- package/package.json +1 -1
- package/references/common/phases.md +8 -6
- package/references/common/skill-authoring.md +1 -1
- package/rules/common/forge-system.md +42 -4
- package/skills/build-prototype/SKILL.md +4 -4
- package/skills/build-tdd/SKILL.md +14 -0
- package/skills/concept-slides/SKILL.md +11 -11
- package/skills/deliver-deploy/SKILL.md +1 -1
- package/skills/harden/SKILL.md +6 -6
- package/skills/quality-test-execution/SKILL.md +26 -1
- package/skills/quality-test-plan/SKILL.md +21 -1
- package/skills/support-debug/SKILL.md +1 -1
- package/skills/support-dream/SKILL.md +5 -5
- package/skills/support-gotcha/SKILL.md +3 -3
- package/skills/{support-task-force → support-parallel}/SKILL.md +22 -22
- package/skills/{support-task-force → support-parallel}/references/dispatch-pattern.md +10 -10
- package/skills/{support-task-force → support-parallel}/references/synthesis-template.md +10 -10
- package/skills/support-skill-validator/SKILL.md +5 -5
- package/skills/support-skill-validator/references/validation-checks.md +1 -1
- package/skills/support-system-guide/SKILL.md +4 -3
- package/skills/support-wiki-lint/scripts/lint.mjs +52 -0
- package/templates/README.md +1 -1
- package/templates/aiwiki/schemas/session.md +15 -14
- package/templates/manifests/bugfix.yaml +1 -1
- package/templates/manifests/feature.yaml +1 -1
- package/templates/manifests/greenfield.yaml +1 -1
- package/templates/manifests/hotfix.yaml +1 -1
- package/templates/manifests/refactor.yaml +1 -1
- package/templates/manifests/v5/SCHEMA.md +14 -17
- package/templates/manifests/v5/feature.yaml +1 -1
- package/templates/manifests/v6/SCHEMA.md +14 -10
- package/commands/abort.md +0 -25
- package/dist/__tests__/active-manifest.test.js +0 -272
- package/dist/__tests__/gate-check.test.js +0 -384
- package/dist/active-manifest.js +0 -229
- 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
- **
|
|
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**
|
|
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** —
|
|
47
|
-
- **Skills** —
|
|
48
|
-
- **Commands** —
|
|
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 (
|
|
149
|
-
--------------------- -----------------------
|
|
150
|
-
/
|
|
151
|
-
/setup build-wireframe [Phase 2]
|
|
152
|
-
/feature build-prototype [Phase 3]
|
|
153
|
-
/greenfield iterate-prototype [Phase 4]
|
|
154
|
-
/bugfix harden [Phase 5]
|
|
155
|
-
/refactor build-scaffold
|
|
156
|
-
/hotfix build-tdd [Phase 6]
|
|
157
|
-
/
|
|
158
|
-
/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
| `/
|
|
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
|
|
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
|
-
| `/
|
|
199
|
-
| `/
|
|
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 (
|
|
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
|
-
+--
|
|
286
|
+
+-- Preflight 0: Repo-state detection
|
|
274
287
|
| Prototype mode? → offer redirect to iterate-prototype
|
|
275
288
|
| Production mode? → proceed
|
|
276
|
-
+--
|
|
277
|
-
+--
|
|
278
|
-
+--
|
|
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
|
|
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
|
|
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 (
|
|
297
|
-
|
|
|
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
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
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
|
|
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)
|
package/agents/gotcha-hunter.md
CHANGED
|
@@ -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
|
|
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 (
|
|
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:
|
|
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
|
-
# /
|
|
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
|
|
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} —
|
|
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
|
-
|
|
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
|
|
76
|
-
/
|
|
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 `/
|
|
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. `/
|
|
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
|
|
package/commands/feature.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
package/commands/greenfield.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
package/commands/note.md
ADDED
|
@@ -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.
|