forgedock 1.0.21 → 1.0.22
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 +134 -80
- package/bin/demo.mjs +386 -0
- package/bin/forgedock.mjs +357 -30
- package/bin/init-detect.mjs +95 -0
- package/bin/runner.mjs +780 -0
- package/commands/cleanup.md +85 -39
- package/commands/deploy-info.md +6 -2
- package/commands/forge-stats.md +1 -1
- package/commands/optimize.md +1 -1
- package/commands/orchestrate.md +320 -26
- package/commands/quality-gate.md +91 -49
- package/commands/review-pr-agents.md +62 -38
- package/commands/review-pr.md +33 -2
- package/commands/scope.md +11 -3
- package/commands/security-audit.md +24 -16
- package/commands/sync-ecosystem.md +2 -2
- package/commands/work-on/build/architect.md +47 -3
- package/commands/work-on/build/context.md +36 -5
- package/commands/work-on/build/validate.md +16 -7
- package/commands/work-on/close.md +129 -1
- package/commands/work-on/investigate.md +24 -1
- package/commands/work-on.md +226 -8
- package/docs/site/annotations-explained.md +55 -0
- package/docs/site/command-learning-path.md +104 -0
- package/docs/site/command-reference.md +3 -0
- package/docs/site/getting-started.md +36 -14
- package/docs/site/troubleshooting.md +208 -0
- package/docs/spec/forge-protocol-v1.md +768 -0
- package/examples/forgedock-demo/README.md +113 -0
- package/examples/forgedock-demo/bootstrap.sh +125 -0
- package/examples/forgedock-demo/issues/01-bug-delete-missing-auth.md +37 -0
- package/examples/forgedock-demo/issues/02-feature-filter-notes.md +37 -0
- package/examples/forgedock-demo/issues/03-refactor-router-table.md +33 -0
- package/examples/forgedock-demo/issues/04-perf-index-lookup.md +35 -0
- package/examples/forgedock-demo/issues/05-docs-api-reference.md +39 -0
- package/examples/forgedock-demo/labels.json +21 -0
- package/examples/forgedock-demo/package.json +16 -0
- package/examples/forgedock-demo/scripts/smoke.js +61 -0
- package/examples/forgedock-demo/src/auth.js +28 -0
- package/examples/forgedock-demo/src/db.js +66 -0
- package/examples/forgedock-demo/src/routes/notes.js +64 -0
- package/examples/forgedock-demo/src/server.js +79 -0
- package/package.json +5 -1
- package/templates/forge.yaml.minimal +44 -0
package/README.md
CHANGED
|
@@ -26,25 +26,17 @@
|
|
|
26
26
|
|
|
27
27
|
<br />
|
|
28
28
|
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
AI coding agents forget everything between sessions. They re-investigate the same bugs, miss context from past PRs, and make mistakes that were already caught and fixed last week. There's no institutional memory.
|
|
29
|
+
## What ForgeDock Does
|
|
32
30
|
|
|
33
|
-
ForgeDock
|
|
34
|
-
|
|
35
|
-
---
|
|
31
|
+
ForgeDock runs the full issue lifecycle inside Claude Code — **investigate, architect, build, quality-gate, review, and merge** — autonomously. You open an issue, run `/work-on #42`, and click merge. Every stage writes structured context back to GitHub, so the next agent starts smart, not blind.
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
```
|
|
34
|
+
You: /work-on #42
|
|
35
|
+
ForgeDock: Investigate → Architect → Build → Quality Gate → Review → open PR
|
|
36
|
+
You: click merge
|
|
37
|
+
```
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| | ForgeDock | Plain Claude Code | Cursor / Windsurf | Devin / Sweep |
|
|
42
|
-
|---|---|---|---|---|
|
|
43
|
-
| Memory across sessions | Structured annotations on GitHub | CLAUDE.md + manual notes | Per-project context | Proprietary cloud state |
|
|
44
|
-
| Autonomous pipeline | Full lifecycle: investigate → merge | Manual, step by step | Autocomplete + chat | Autonomous but opaque |
|
|
45
|
-
| Review quality | 9 domain-specialist agents | You review everything | Basic suggestions | Varies |
|
|
46
|
-
| Infrastructure needed | None — just `npx forgedock` | None | IDE-specific | Cloud service |
|
|
47
|
-
| Codebase visibility | Everything stays on GitHub | Local | Local + cloud sync | Cloud-only |
|
|
39
|
+
No new runtime, no separate process, no cloud service — just prompt-engineered command specs that run inside the Claude Code you already use.
|
|
48
40
|
|
|
49
41
|
---
|
|
50
42
|
|
|
@@ -61,35 +53,30 @@ ForgeDock is **not another AI coding agent.** It's a set of prompt-engineered co
|
|
|
61
53
|
|
|
62
54
|
> **Cost note:** ForgeDock itself is free and open-source. It orchestrates Claude Code sessions, so you pay your normal Anthropic API usage. A typical `/work-on` run on a straightforward bug uses roughly the same tokens as a 15–20 minute manual Claude Code session.
|
|
63
55
|
|
|
64
|
-
|
|
65
|
-
<summary><strong>See a real pipeline run</strong></summary>
|
|
56
|
+
---
|
|
66
57
|
|
|
67
|
-
|
|
58
|
+
## How It Works
|
|
68
59
|
|
|
69
60
|
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Installer parses frontmatter, writes minimal stubs.
|
|
75
|
-
|
|
76
|
-
FORGE:CONTEXT → Issue #577: install() had overly broad catch{} — fixed to
|
|
77
|
-
check err.code === 'ENOENT'. Issue #587: Windows writes
|
|
78
|
-
regular files, not symlinks — keep both paths working.
|
|
79
|
-
|
|
80
|
-
FORGE:ARCHITECT → 3 new functions in bin/forgedock.mjs: parseFrontmatter(),
|
|
81
|
-
generateStubContent(), updated install() flow.
|
|
82
|
-
|
|
83
|
-
FORGE:BUILDER → Branch feat/stub-install-pattern-619, 1 file changed.
|
|
84
|
-
|
|
85
|
-
FORGE:REVIEW → Auto-merged to staging.
|
|
86
|
-
|
|
87
|
-
FORGE:TRAJECTORY → Full audit trail recorded.
|
|
61
|
+
Issue → Investigate → Architect → Build → Quality Gate → Review → Merge
|
|
62
|
+
↓ ↓ ↓ ↓ ↓
|
|
63
|
+
writes to reads from reads from reads from writes to
|
|
64
|
+
GitHub GitHub GitHub GitHub GitHub
|
|
88
65
|
```
|
|
89
66
|
|
|
90
|
-
|
|
67
|
+
Each stage writes a structured annotation (`<!-- FORGE:INVESTIGATOR -->`, `<!-- FORGE:CONTRACT -->`, etc.) to the GitHub issue or PR. Each downstream stage reads what came before. The `gh` CLI is the query interface.
|
|
91
68
|
|
|
92
|
-
|
|
69
|
+
| Stage | What it does |
|
|
70
|
+
|---|---|
|
|
71
|
+
| **Investigate** | Traces root cause via `git blame`, related issues/PRs. Writes verdict, affected files, severity. |
|
|
72
|
+
| **Context** | Surfaces historical bugs and known pitfalls from the same module. Institutional memory. |
|
|
73
|
+
| **Architect** | Produces ordered implementation plan with exact file/function/line targets. |
|
|
74
|
+
| **Build** | Writes code, creates branch, makes commits. Follows the architect's plan. |
|
|
75
|
+
| **Quality Gate** | 14+ domain-specific checks (security, auth, DB, concurrency, etc.) |
|
|
76
|
+
| **Review** | 9 specialist agents review the PR diff with confidence-rated findings. |
|
|
77
|
+
| **Close** | Records full audit trail as `FORGE:TRAJECTORY`. |
|
|
78
|
+
|
|
79
|
+
Labels track workflow state (`workflow:investigating`, `workflow:building`, `workflow:in-review`, `workflow:merged`). The pipeline resumes from whatever state GitHub says it's in — restart-safe by design.
|
|
93
80
|
|
|
94
81
|
---
|
|
95
82
|
|
|
@@ -109,9 +96,14 @@ npx forgedock
|
|
|
109
96
|
|
|
110
97
|
# Generate config for your repo
|
|
111
98
|
npx forgedock init
|
|
99
|
+
|
|
100
|
+
# Verify everything is wired up correctly
|
|
101
|
+
npx forgedock doctor
|
|
112
102
|
```
|
|
113
103
|
|
|
114
|
-
This symlinks 25+ pipeline commands into `~/.claude/commands/` and generates a `forge.yaml` config in your project root. That's it — open Claude Code and run `/work-on #42`.
|
|
104
|
+
This symlinks 25+ pipeline commands into `~/.claude/commands/` and generates a `forge.yaml` config in your project root. `npx forgedock doctor` runs an installation health check — command symlinks, `forge.yaml`, required tools (`gh`, `yq`, Claude Code), GitHub workflow labels, and Playwright MCP — printing a clear pass/fail/warn line with a fix hint for each, and exiting non-zero if anything is broken. Run it any time your setup feels off. That's it — open Claude Code and run `/work-on #42`.
|
|
105
|
+
|
|
106
|
+
**Try it risk-free:** Follow the [5-minute Getting Started walkthrough](docs/site/getting-started.md) to install, configure, and run your first pipeline end-to-end. New to the commands? Start with the [Command Reference](docs/site/command-reference.md) for a guided tour of what each one does.
|
|
115
107
|
|
|
116
108
|
<details>
|
|
117
109
|
<summary><strong>Other install methods & commands</strong></summary>
|
|
@@ -129,6 +121,22 @@ npx forgedock uninstall # Remove all ForgeDock commands from ~/.claude/comman
|
|
|
129
121
|
npx forgedock help # Show all available commands
|
|
130
122
|
```
|
|
131
123
|
|
|
124
|
+
**Standalone runner** (run pipelines outside Claude Code — CI/CD, headless batch):
|
|
125
|
+
```bash
|
|
126
|
+
# Preview the assembled prompt + tool plan (no API key needed)
|
|
127
|
+
npx forgedock run work-on 42 --dry-run
|
|
128
|
+
|
|
129
|
+
# Execute headlessly via the Anthropic API directly
|
|
130
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
131
|
+
npm install @anthropic-ai/sdk # optional dependency — only needed for live runs
|
|
132
|
+
npx forgedock run work-on 42
|
|
133
|
+
```
|
|
134
|
+
`forgedock run` loads the same `commands/*.md` specs and drives an Anthropic
|
|
135
|
+
tool-use loop directly, so the pipeline no longer depends on the Claude Code
|
|
136
|
+
agent loop. Claude Code remains the recommended interactive experience; the
|
|
137
|
+
runner adds CI/CD and non-Claude-Code paths. Flags: `--dry-run`, `--model <id>`,
|
|
138
|
+
`--max-iterations <n>`.
|
|
139
|
+
|
|
132
140
|
**AI-powered setup** (inside Claude Code):
|
|
133
141
|
```
|
|
134
142
|
/forgedock-init # Guided config walkthrough — scans your repo, queries GitHub, auto-fills forge.yaml
|
|
@@ -136,57 +144,49 @@ npx forgedock help # Show all available commands
|
|
|
136
144
|
|
|
137
145
|
</details>
|
|
138
146
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
## Global Command Namespace
|
|
147
|
+
<details>
|
|
148
|
+
<summary><strong>See a real pipeline run</strong></summary>
|
|
142
149
|
|
|
143
|
-
|
|
150
|
+
Here's what a real run looks like on [issue #619](https://github.com/RapierCraftStudios/ForgeDock/issues/619) — a performance bug where command specs were burning ~200K tokens in context:
|
|
144
151
|
|
|
145
152
|
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
work-on.md → /path/to/forgedock/commands/work-on.md
|
|
149
|
-
review-pr.md → /path/to/forgedock/commands/review-pr.md
|
|
150
|
-
...
|
|
151
|
-
```
|
|
153
|
+
FORGE:INVESTIGATOR → CONFIRMED. All 27 command spec files (848KB) load into
|
|
154
|
+
context at session start via symlinks. ~200K tokens wasted.
|
|
152
155
|
|
|
153
|
-
|
|
156
|
+
FORGE:CONTRACT → Replace symlink-based install with stub-file pattern.
|
|
157
|
+
Installer parses frontmatter, writes minimal stubs.
|
|
154
158
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
FORGE:CONTEXT → Issue #577: install() had overly broad catch{} — fixed to
|
|
160
|
+
check err.code === 'ENOENT'. Issue #587: Windows writes
|
|
161
|
+
regular files, not symlinks — keep both paths working.
|
|
162
|
+
|
|
163
|
+
FORGE:ARCHITECT → 3 new functions in bin/forgedock.mjs: parseFrontmatter(),
|
|
164
|
+
generateStubContent(), updated install() flow.
|
|
165
|
+
|
|
166
|
+
FORGE:BUILDER → Branch feat/stub-install-pattern-619, 1 file changed.
|
|
167
|
+
|
|
168
|
+
FORGE:REVIEW → Auto-merged to staging.
|
|
169
|
+
|
|
170
|
+
FORGE:TRAJECTORY → Full audit trail recorded.
|
|
160
171
|
```
|
|
161
172
|
|
|
162
|
-
|
|
173
|
+
The context phase surfaced two historical bugs (#577, #587) in the same module — preventing the builder from repeating known mistakes. [View the full issue →](https://github.com/RapierCraftStudios/ForgeDock/issues/619)
|
|
163
174
|
|
|
164
|
-
|
|
175
|
+
</details>
|
|
165
176
|
|
|
166
177
|
---
|
|
167
178
|
|
|
168
|
-
##
|
|
179
|
+
## Where to Start
|
|
169
180
|
|
|
170
|
-
|
|
171
|
-
Issue → Investigate → Architect → Build → Quality Gate → Review → Merge
|
|
172
|
-
↓ ↓ ↓ ↓ ↓
|
|
173
|
-
writes to reads from reads from reads from writes to
|
|
174
|
-
GitHub GitHub GitHub GitHub GitHub
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Each stage writes a structured annotation (`<!-- FORGE:INVESTIGATOR -->`, `<!-- FORGE:CONTRACT -->`, etc.) to the GitHub issue or PR. Each downstream stage reads what came before. The `gh` CLI is the query interface.
|
|
181
|
+
ForgeDock installs 25+ commands, but **you only need three to start.** They cover the entire issue-to-merge loop:
|
|
178
182
|
|
|
179
|
-
|
|
|
183
|
+
| Command | What it does |
|
|
180
184
|
|---|---|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
|
|
|
184
|
-
| **Build** | Writes code, creates branch, makes commits. Follows the architect's plan. |
|
|
185
|
-
| **Quality Gate** | 14+ domain-specific checks (security, auth, DB, concurrency, etc.) |
|
|
186
|
-
| **Review** | 9 specialist agents review the PR diff with confidence-rated findings. |
|
|
187
|
-
| **Close** | Records full audit trail as `FORGE:TRAJECTORY`. |
|
|
185
|
+
| `/issue` | Describe what you want — get a pipeline-ready issue |
|
|
186
|
+
| **`/work-on #N`** | Investigate, build, review, and merge it automatically |
|
|
187
|
+
| `/review-pr` | Review a PR with domain-specialist agents |
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
Everything else is additive — add commands as your workflow grows: **Team Workflows** (`/orchestrate`, `/milestone`) when you run work in parallel, **Operations** (`/rollback`, `/incident-response`) when production needs it, and **Pipeline Tuning** (`/autopilot`, `/pipeline-health`) once it's routine. See the [Command Learning Path](docs/site/command-learning-path.md) for the full tiered guide.
|
|
190
190
|
|
|
191
191
|
---
|
|
192
192
|
|
|
@@ -213,13 +213,52 @@ Labels track workflow state (`workflow:investigating`, `workflow:building`, `wor
|
|
|
213
213
|
|
|
214
214
|
---
|
|
215
215
|
|
|
216
|
-
##
|
|
216
|
+
## Global Command Namespace
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
ForgeDock owns the **global** `~/.claude/commands/` namespace. When `npx forgedock` runs, it symlinks all pipeline commands there and writes a `.symlink-source` sentinel file so other installers can detect the owner:
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
~/.claude/commands/
|
|
222
|
+
.symlink-source ← sentinel: "ForgeDock owns this namespace"
|
|
223
|
+
work-on.md → /path/to/forgedock/commands/work-on.md
|
|
224
|
+
review-pr.md → /path/to/forgedock/commands/review-pr.md
|
|
225
|
+
...
|
|
220
226
|
```
|
|
221
227
|
|
|
222
|
-
|
|
228
|
+
**Project-specific commands** should install to the **project-local** `.claude/commands/` directory instead:
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
your-project/
|
|
232
|
+
.claude/
|
|
233
|
+
commands/
|
|
234
|
+
my-custom-command.md ← project-local — Claude Code merges these in
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Claude Code merges global (`~/.claude/commands/`) and project-local (`.claude/commands/`) automatically. Project-local commands win on name collisions.
|
|
238
|
+
|
|
239
|
+
If another tool runs its own install script that targets `~/.claude/commands/`, it will silently repoint ForgeDock's symlinks to its own source path — breaking all ForgeDock commands globally. The `.symlink-source` sentinel is a machine-readable warning to other installers; ForgeDock also emits a per-command warning during `npx forgedock install` when it detects a collision.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Why ForgeDock
|
|
244
|
+
|
|
245
|
+
AI coding agents forget everything between sessions. They re-investigate the same bugs, miss context from past PRs, and make mistakes that were already caught and fixed last week. There's no institutional memory.
|
|
246
|
+
|
|
247
|
+
ForgeDock fixes this by using **GitHub itself** as the memory layer. Every pipeline stage writes structured `FORGE:` annotations to issues and PRs. Every downstream agent reads them. When a new session starts — even after Claude's context resets — the agent queries GitHub and picks up exactly where the last one left off.
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## How Is This Different
|
|
252
|
+
|
|
253
|
+
ForgeDock is **not another AI coding agent.** It's a set of prompt-engineered command specs (`.md` files) that run inside Claude Code. No new runtime, no separate process, no vendor lock-in beyond what you already use.
|
|
254
|
+
|
|
255
|
+
| | ForgeDock | Plain Claude Code | Cursor / Windsurf | Devin / Sweep |
|
|
256
|
+
|---|---|---|---|---|
|
|
257
|
+
| Memory across sessions | Structured annotations on GitHub | CLAUDE.md + manual notes | Per-project context | Proprietary cloud state |
|
|
258
|
+
| Autonomous pipeline | Full lifecycle: investigate → merge | Manual, step by step | Autocomplete + chat | Autonomous but opaque |
|
|
259
|
+
| Review quality | 9 domain-specialist agents | You review everything | Basic suggestions | Varies |
|
|
260
|
+
| Infrastructure needed | None — just `npx forgedock` | None | IDE-specific | Cloud service |
|
|
261
|
+
| Codebase visibility | Everything stays on GitHub | Local | Local + cloud sync | Cloud-only |
|
|
223
262
|
|
|
224
263
|
---
|
|
225
264
|
|
|
@@ -237,14 +276,29 @@ Removes all ForgeDock command symlinks from `~/.claude/commands/`. Your `forge.y
|
|
|
237
276
|
|
|
238
277
|
---
|
|
239
278
|
|
|
279
|
+
## Uninstall
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
npx forgedock uninstall
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Removes all ForgeDock command symlinks from `~/.claude/commands/`. Your `forge.yaml` config and any `FORGE:` annotations on GitHub issues/PRs are left untouched.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
240
289
|
## Documentation
|
|
241
290
|
|
|
291
|
+
- [Try ForgeDock Risk-Free](examples/forgedock-demo/) — a tiny demo repo with 5 pre-written issues; clone, `npx forgedock`, `/work-on 1`, and watch a full pipeline run without touching your real code
|
|
242
292
|
- [Getting Started in 5 Minutes](docs/site/getting-started.md) — install, configure, first pipeline run
|
|
243
293
|
- [How the Knowledge Graph Works](docs/site/how-it-works.md) — FORGE annotations, context relay, compaction resilience
|
|
294
|
+
- [What Are Those FORGE Comments?](docs/site/annotations-explained.md) — 2-minute newcomer explainer for the annotations on your issues
|
|
244
295
|
- [ForgeDock vs. Manual Workflows](docs/site/vs-manual-workflows.md) — structured pipelines vs. ad-hoc prompting
|
|
245
296
|
- [ForgeDock vs. DeepWiki, AGENTS.md, and Cursor Memories](docs/comparison.md) — structural differences between context tools
|
|
246
297
|
- [FORGE Annotation Protocol](docs/site/forge-annotation-protocol.md) — open standard spec for AI context passing
|
|
298
|
+
- [FORGE Annotation Protocol v1.0 (formal spec)](docs/spec/forge-protocol-v1.md) — standalone, versioned, CC-BY-4.0 specification you can implement in any agent pipeline
|
|
299
|
+
- [Command Learning Path](docs/site/command-learning-path.md) — which commands to learn first, tiered by when you need them
|
|
247
300
|
- [Command Reference](docs/site/command-reference.md) — all 25+ commands with usage and examples
|
|
301
|
+
- [Troubleshooting & Recovery Guide](docs/site/troubleshooting.md) — symptom, cause, and fix for the most common pipeline failures
|
|
248
302
|
|
|
249
303
|
---
|
|
250
304
|
|