forgedock 1.0.9 → 1.0.11
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 +84 -0
- package/bin/forgedock.mjs +537 -5627
- package/bin/init-detect.mjs +1 -1
- package/bin/init-enrich-api.mjs +20 -2
- package/bin/tui.mjs +60 -43
- package/commands/forgedock-init.md +498 -317
- package/commands/work-on.md +19 -0
- package/docs/CONFIG.md +37 -0
- package/docs/FORGE-PROTOCOL.md +740 -0
- package/docs/anthropic-devrel-outreach.md +197 -0
- package/docs/articles/devto-how-i-built-an-ai-agent-that-never-forgets.md +165 -0
- package/docs/demo.tape +113 -0
- package/docs/distribution-submissions.md +181 -0
- package/docs/launch/reddit-r-claudeai.md +83 -0
- package/docs/launch/reddit-r-devops.md +80 -0
- package/docs/launch/reddit-r-localllama.md +86 -0
- package/docs/launch/reddit-r-programming.md +81 -0
- package/docs/launch/reddit-r-sideproject.md +84 -0
- package/docs/launch/show-hn.md +84 -0
- package/docs/site/command-reference.md +423 -0
- package/docs/site/forge-annotation-protocol.md +266 -0
- package/docs/site/getting-started.md +168 -0
- package/docs/site/how-it-works.md +191 -0
- package/docs/site/index.md +59 -0
- package/docs/site/vs-manual-workflows.md +167 -0
- package/docs/twitter-launch-thread.md +303 -0
- package/docs/youtube-demo-script.md +297 -0
- package/package.json +1 -1
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ForgeDock Complete Command Reference"
|
|
3
|
+
description: "Complete reference for all ForgeDock slash commands for Claude Code. Usage, options, and examples for all 25+ commands covering the full AI development pipeline."
|
|
4
|
+
keywords: ["claude code slash commands", "claude code extensions", "claude code commands list", "forgedock commands", "ai development pipeline commands"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Complete Command Reference
|
|
8
|
+
|
|
9
|
+
ForgeDock installs 25+ slash commands into Claude Code. Each command is a detailed prompt spec that guides an AI agent through a specific phase of the development pipeline.
|
|
10
|
+
|
|
11
|
+
Install all commands with:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx forgedock
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
After installation, every command is available as `/command-name` in any Claude Code session.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Core Pipeline Commands
|
|
22
|
+
|
|
23
|
+
These are the commands you use most. They cover the full lifecycle from issue to merged PR.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### `/work-on`
|
|
28
|
+
|
|
29
|
+
**The main pipeline orchestrator.**
|
|
30
|
+
|
|
31
|
+
Runs the complete investigate → build → review → merge → close pipeline for a single GitHub issue.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
/work-on 42 # Work on issue #42
|
|
35
|
+
/work-on next # Pick the highest-priority open issue
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**What it does**:
|
|
39
|
+
1. Reads the issue and all existing FORGE annotations
|
|
40
|
+
2. Determines the current pipeline phase (resumes if interrupted)
|
|
41
|
+
3. Investigates root cause with git blame and historical context
|
|
42
|
+
4. Architects the implementation plan
|
|
43
|
+
5. Builds the fix in an isolated git worktree
|
|
44
|
+
6. Runs a 14-category quality gate
|
|
45
|
+
7. Creates a PR and invokes `/review-pr --auto-merge`
|
|
46
|
+
8. Closes the issue and cleans up the worktree
|
|
47
|
+
|
|
48
|
+
**Branch naming**: `fix/{slug}-{number}` (bugs) or `feat/{slug}-{number}` (features)
|
|
49
|
+
|
|
50
|
+
**PR target**: `staging` (fast lane) or `milestone/{slug}` (feature lane, based on issue milestone)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### `/review-pr`
|
|
55
|
+
|
|
56
|
+
**Context-aware PR reviewer.**
|
|
57
|
+
|
|
58
|
+
Analyzes what a PR touches and spawns domain-specific review agents.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
/review-pr 123 # Review PR #123
|
|
62
|
+
/review-pr 123 --auto-merge # Review and merge if all agents approve
|
|
63
|
+
/review-pr staging # Review staging branch vs. main
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**What it does**:
|
|
67
|
+
- Reads the PR diff and all associated FORGE annotations
|
|
68
|
+
- Spawns up to 9 domain agents (security, logic, frontend, backend, database, infrastructure, docs, tests, dependencies)
|
|
69
|
+
- Each agent posts a structured review with severity-rated findings
|
|
70
|
+
- Critical and HIGH findings become separate GitHub issues
|
|
71
|
+
- With `--auto-merge`: merges the PR if no blocking findings
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### `/quality-gate`
|
|
76
|
+
|
|
77
|
+
**Pre-commit quality checker.**
|
|
78
|
+
|
|
79
|
+
Catches the defects a reviewer would flag — before the commit is made.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
/quality-gate # Check current staged changes
|
|
83
|
+
/quality-gate --worktree /path # Check a specific worktree
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**14+ check categories**:
|
|
87
|
+
- Security (hardcoded credentials, injection risks)
|
|
88
|
+
- SQL safety (injection, unsafe queries)
|
|
89
|
+
- Auth model (missing auth checks, privilege escalation paths)
|
|
90
|
+
- Env var completeness (new vars not in .env.example)
|
|
91
|
+
- Frontend proxy wiring (direct backend calls from client code)
|
|
92
|
+
- Import validity (imports from non-existent modules)
|
|
93
|
+
- Type safety (type invariant violations)
|
|
94
|
+
- Deploy config (missing env vars in deploy chain)
|
|
95
|
+
- And more...
|
|
96
|
+
|
|
97
|
+
*Invoked automatically by `/work-on` — can also be run manually before committing.*
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### `/orchestrate`
|
|
102
|
+
|
|
103
|
+
**Parallel multi-issue pipeline.**
|
|
104
|
+
|
|
105
|
+
Spawns sub-agents that each run the full `/work-on` pipeline in parallel.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
/orchestrate milestone launch-campaign # All issues in a milestone
|
|
109
|
+
/orchestrate #42 #43 #44 # Specific issues
|
|
110
|
+
/orchestrate next 5 # Top 5 priority issues
|
|
111
|
+
/orchestrate fast-lane # All staging-lane issues
|
|
112
|
+
/orchestrate P0 # All P0 issues
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Each sub-agent gets its own git worktree and GitHub issue thread. No interference between parallel agents.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### `/autopilot`
|
|
120
|
+
|
|
121
|
+
**Self-improvement cycle.**
|
|
122
|
+
|
|
123
|
+
Runs recon, triage, and optionally fixes top-priority issues automatically.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
/autopilot # Recon + triage only
|
|
127
|
+
/autopilot --fix # Recon + triage + fix top issues
|
|
128
|
+
/autopilot --fix --limit 5 # Fix top 5 issues
|
|
129
|
+
/autopilot --recon-only # Recon only, no triage
|
|
130
|
+
/autopilot --dry-run # Show what would be done
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Investigation & Validation
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### `/validate`
|
|
140
|
+
|
|
141
|
+
**Pre-build issue validation.**
|
|
142
|
+
|
|
143
|
+
Independently verifies whether a reported issue is actually a real problem before any code changes.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
/validate 42 # Validate issue #42
|
|
147
|
+
/validate "login button broken" # Validate by description
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Returns: CONFIRMED, PARTIAL, or INVALID with evidence.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### `/audit`
|
|
155
|
+
|
|
156
|
+
**Production issue tracer.**
|
|
157
|
+
|
|
158
|
+
Traces a production failure end-to-end through GitHub artifacts (commits, PRs, issues) and files an improvement issue.
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
/audit "payments 500 errors started after deploy"
|
|
162
|
+
/audit --issue 42 # Trace based on existing issue
|
|
163
|
+
/audit --pr 123 # Trace based on PR
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### `/security-audit`
|
|
169
|
+
|
|
170
|
+
**Periodic security posture audit.**
|
|
171
|
+
|
|
172
|
+
Runs a 4-phase security checklist against repo files (not just diffs). Creates GitHub issues for confirmed findings.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
/security-audit # All 4 phases
|
|
176
|
+
/security-audit --phase 1 # Specific phase
|
|
177
|
+
/security-audit --dry-run # Show findings without creating issues
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### `/qa-sweep`
|
|
183
|
+
|
|
184
|
+
**Full platform QA sweep.**
|
|
185
|
+
|
|
186
|
+
Auto-discovers pages and tests UI elements via browser automation. Creates GitHub issues for all findings.
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
/qa-sweep all # Full sweep
|
|
190
|
+
/qa-sweep dashboard # Dashboard area only
|
|
191
|
+
/qa-sweep page /settings # Specific route
|
|
192
|
+
/qa-sweep journey # Critical user journeys
|
|
193
|
+
/qa-sweep a11y # Accessibility only
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Issue & Milestone Management
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
### `/issue`
|
|
203
|
+
|
|
204
|
+
**Structured issue creator.**
|
|
205
|
+
|
|
206
|
+
Creates a well-structured GitHub issue with all sections the pipeline needs (Problem, Affected Files, Expected Behavior, Acceptance Criteria).
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
/issue "The login button is misaligned on mobile Safari"
|
|
210
|
+
/issue "Add dark mode support to the dashboard"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### `/milestone`
|
|
216
|
+
|
|
217
|
+
**Milestone manager.**
|
|
218
|
+
|
|
219
|
+
Creates, manages, and ships milestones — the top-level planning layer for feature development.
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
/milestone create "Q3 Auth Improvements" # Create a new milestone
|
|
223
|
+
/milestone status # Current milestone status
|
|
224
|
+
/milestone ship q3-auth # Ship a milestone
|
|
225
|
+
/milestone sync q3-auth # Sync issues to board
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### `/cleanup`
|
|
231
|
+
|
|
232
|
+
**Repository hygiene sweep.**
|
|
233
|
+
|
|
234
|
+
Cleans up stale labels, missing workflow state, project board gaps, dangling worktrees, and orphaned branches.
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
/cleanup labels # Fix stale labels
|
|
238
|
+
/cleanup branches # Prune merged branches
|
|
239
|
+
/cleanup milestones # Archive shipped milestones
|
|
240
|
+
/cleanup board # Fix project board gaps
|
|
241
|
+
/cleanup orphans # Remove dangling worktrees
|
|
242
|
+
/cleanup all # Everything
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Observability & Analytics
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
### `/analytics`
|
|
252
|
+
|
|
253
|
+
**Production analytics audit.**
|
|
254
|
+
|
|
255
|
+
Pulls analytics from multiple sources (GSC, Bing Webmaster, Clarity, Umami, Cloudflare, Stripe, GA4) and generates actionable GitHub issues.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
/analytics # Full analytics audit
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Trigger phrases: "check analytics", "look at prod analytics", "what's happening on the site", "check revenue".
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### `/pipeline-health`
|
|
266
|
+
|
|
267
|
+
**Pipeline performance analyzer.**
|
|
268
|
+
|
|
269
|
+
Measures pipeline performance, correlates with prompt changes, and proposes improvements.
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
/pipeline-health # All repos
|
|
273
|
+
/pipeline-health my-app # Specific repo
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### `/forge-stats`
|
|
279
|
+
|
|
280
|
+
**Command size tracker.**
|
|
281
|
+
|
|
282
|
+
Tracks command file sizes, detects bloat, and compares against baselines.
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
/forge-stats # Current sizes
|
|
286
|
+
/forge-stats diff # Changes since baseline
|
|
287
|
+
/forge-stats baseline # Set current as baseline
|
|
288
|
+
/forge-stats full # Full report
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
### `/geo-audit`
|
|
294
|
+
|
|
295
|
+
**GEO (Generative Engine Optimization) audit.**
|
|
296
|
+
|
|
297
|
+
Checks AI referral traffic and page compliance for AI search engines. Creates improvement issues.
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
/geo-audit # Full GEO audit
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
### `/audit-agents`
|
|
306
|
+
|
|
307
|
+
**Agent output analyzer.**
|
|
308
|
+
|
|
309
|
+
Audits agent outputs from an orchestration run — timeline analysis, stall detection, idle time breakdown.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
/audit-agents latest # Most recent run
|
|
313
|
+
/audit-agents {session-id} # Specific session
|
|
314
|
+
/audit-agents {agent-id} # Specific agent
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Operations & Deploy
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
### `/deploy-info`
|
|
324
|
+
|
|
325
|
+
**Pre-deploy diff.**
|
|
326
|
+
|
|
327
|
+
Shows what will deploy next — diff between staging and main with issue/PR summary, risk assessment, and deploy checklist.
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
/deploy-info # staging vs. main
|
|
331
|
+
/deploy-info staging # Explicit staging
|
|
332
|
+
/deploy-info milestone/q3-auth # Milestone branch
|
|
333
|
+
/deploy-info compare my-branch # Custom comparison
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
### `/rollback`
|
|
339
|
+
|
|
340
|
+
**Revert PR creator.**
|
|
341
|
+
|
|
342
|
+
Creates a revert PR to roll back a shipped feature or fix that caused a production incident.
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
/rollback 123 # Revert PR #123
|
|
346
|
+
/rollback last # Revert most recent deploy
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
### `/incident-response`
|
|
352
|
+
|
|
353
|
+
**P0 incident coordinator.**
|
|
354
|
+
|
|
355
|
+
Coordinates P0 incident response — hotfix validation, timeline reconstruction, and post-incident analysis.
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
/incident-response 42 # Respond to issue #42
|
|
359
|
+
/incident-response active # Current active incident
|
|
360
|
+
/incident-response postmortem 42 # Post-incident analysis
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Configuration & Setup
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
### `/forgedock-init`
|
|
370
|
+
|
|
371
|
+
**Config generator.**
|
|
372
|
+
|
|
373
|
+
AI-powered `forge.yaml` generator — scans codebase, queries GitHub, and fills all sections interactively.
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
/forgedock-init # Generate forge.yaml
|
|
377
|
+
/forgedock-init --force # Overwrite existing
|
|
378
|
+
/forgedock-init --section review # Regenerate one section
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
### `/sync-ecosystem`
|
|
384
|
+
|
|
385
|
+
**Cross-repo sync.**
|
|
386
|
+
|
|
387
|
+
Detects API changes, syncs satellite repos, and publishes releases.
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
/sync-ecosystem check # Check for changes
|
|
391
|
+
/sync-ecosystem auto # Auto-sync
|
|
392
|
+
/sync-ecosystem status # Current sync status
|
|
393
|
+
/sync-ecosystem publish # Publish release
|
|
394
|
+
/sync-ecosystem {pr-number} # Sync from PR
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Sub-Phase Commands
|
|
400
|
+
|
|
401
|
+
These are invoked automatically by `/work-on` but can also be run standalone.
|
|
402
|
+
|
|
403
|
+
| Command | Phase | Purpose |
|
|
404
|
+
|---------|-------|---------|
|
|
405
|
+
| `/work-on/investigate` | Phase 1 | Investigation only |
|
|
406
|
+
| `/work-on/build` | Phase 3 | Build only (requires investigation) |
|
|
407
|
+
| `/work-on/build/context` | Phase 3C.5 | Context gathering only |
|
|
408
|
+
| `/work-on/build/architect` | Phase 3C.6 | Architecture planning only |
|
|
409
|
+
| `/work-on/build/implement` | Phase 3F | Implementation only |
|
|
410
|
+
| `/work-on/build/validate` | Phase 3G | Quality gate only |
|
|
411
|
+
| `/work-on/review` | Phase 5 | Review only |
|
|
412
|
+
| `/work-on/close` | Phase 6 | Close & cleanup only |
|
|
413
|
+
| `/work-on/decompose` | Phase 2 | Decompose into sub-issues |
|
|
414
|
+
| `/review-pr-staging` | Staging | Review staging branch before deploy |
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## Next Steps
|
|
419
|
+
|
|
420
|
+
- [Getting Started with ForgeDock in 5 Minutes](./getting-started.md) — install and run your first pipeline
|
|
421
|
+
- [How ForgeDock's Knowledge Graph Works](./how-it-works.md) — understand how commands share context
|
|
422
|
+
- [ForgeDock vs. Manual Claude Code Workflows](./vs-manual-workflows.md) — why structured commands beat ad-hoc prompting
|
|
423
|
+
- [The FORGE Annotation Protocol](./forge-annotation-protocol.md) — the protocol used by all pipeline commands
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "The FORGE Annotation Protocol"
|
|
3
|
+
description: "Technical specification for FORGE annotations — the open machine-readable comment protocol for AI agent context passing. Adopt it in your own agent pipelines."
|
|
4
|
+
keywords: ["ai agent context protocol", "ai agent communication", "forge annotations", "llm agent memory protocol", "ai pipeline protocol", "structured agent context"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# The FORGE Annotation Protocol
|
|
8
|
+
|
|
9
|
+
FORGE annotations are machine-readable HTML comment blocks embedded in GitHub issue and PR comments. They form a **lightweight, open protocol** for AI agents to pass structured context to each other across sessions.
|
|
10
|
+
|
|
11
|
+
Any AI pipeline can adopt FORGE annotations. The format is GitHub-native, human-readable, and requires no infrastructure beyond the `gh` CLI.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## The Problem FORGE Solves
|
|
16
|
+
|
|
17
|
+
AI agents are stateless. When a session ends, every agent starts fresh — with no knowledge of what previous agents found, decided, or built.
|
|
18
|
+
|
|
19
|
+
The naive solution is to re-derive everything from scratch every time. This is:
|
|
20
|
+
|
|
21
|
+
- **Slow** — repeating investigation work already done
|
|
22
|
+
- **Inconsistent** — different agents may reach different conclusions about the same code
|
|
23
|
+
- **Lossy** — nuance from investigation doesn't always survive into implementation
|
|
24
|
+
|
|
25
|
+
FORGE solves this by making agent outputs **persistent**, **structured**, and **queryable** — written to GitHub where they stay forever and can be read by any downstream agent or human.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Protocol Overview
|
|
30
|
+
|
|
31
|
+
A FORGE annotation is a GitHub comment that begins with an HTML comment tag identifying the agent that wrote it:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<!-- FORGE:{AGENT_TYPE} -->
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The comment may also contain a completion marker:
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<!-- {AGENT_TYPE}:COMPLETE -->
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The completion marker is checked by downstream pipeline phases to determine whether the annotation represents a fully-written result or a partial/interrupted one.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Defined Annotation Types
|
|
48
|
+
|
|
49
|
+
### `FORGE:INVESTIGATOR`
|
|
50
|
+
|
|
51
|
+
Posted by the investigation agent after analyzing an issue.
|
|
52
|
+
|
|
53
|
+
**Contents**:
|
|
54
|
+
- Verdict: CONFIRMED | PARTIAL | INVALID
|
|
55
|
+
- Confidence: HIGH | MEDIUM | LOW
|
|
56
|
+
- Severity: CRITICAL | HIGH | MEDIUM | LOW
|
|
57
|
+
- Root Cause with file:line references
|
|
58
|
+
- Complete Affected Files list
|
|
59
|
+
- Evidence (function names, behavior observed)
|
|
60
|
+
- Decomposition Assessment (YES/NO with rationale)
|
|
61
|
+
|
|
62
|
+
**Completion marker**: `<!-- INVESTIGATION:COMPLETE -->`
|
|
63
|
+
|
|
64
|
+
**Read by**: Builder, Architect, Context Gatherer
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
<!-- FORGE:INVESTIGATOR -->
|
|
68
|
+
## Investigation Report
|
|
69
|
+
|
|
70
|
+
**Verdict**: CONFIRMED
|
|
71
|
+
**Confidence**: HIGH
|
|
72
|
+
**Root Cause**: `services/payments/validator.py:142` — billing profile lookup
|
|
73
|
+
does not guard against None for free-tier users.
|
|
74
|
+
|
|
75
|
+
...
|
|
76
|
+
|
|
77
|
+
<!-- INVESTIGATION:COMPLETE -->
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### `FORGE:CONTRACT`
|
|
83
|
+
|
|
84
|
+
Posted by the contract agent, establishing the build scope.
|
|
85
|
+
|
|
86
|
+
**Contents**:
|
|
87
|
+
- Task Type (Bug Fix | Feature | Refactor | Maintenance)
|
|
88
|
+
- Proposed Approach
|
|
89
|
+
- Deliverables table: file | change description | why
|
|
90
|
+
- Acceptance Criteria (checkboxes)
|
|
91
|
+
- Quality Considerations
|
|
92
|
+
- Out of Scope
|
|
93
|
+
|
|
94
|
+
**Read by**: Builder, Reviewer
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### `FORGE:ARCHITECT`
|
|
99
|
+
|
|
100
|
+
Posted by the architecture agent with an implementation plan.
|
|
101
|
+
|
|
102
|
+
**Contents**:
|
|
103
|
+
- Affected Paths table: file | function | change required | why
|
|
104
|
+
- Implementation Order (numbered, with rationale)
|
|
105
|
+
- Consistency Checks (invariants all paths must satisfy)
|
|
106
|
+
- Risk Assessment table: risk | severity | mitigation
|
|
107
|
+
- Files to Read Before Coding
|
|
108
|
+
|
|
109
|
+
**Completion marker**: `<!-- FORGE:ARCHITECT:COMPLETE -->`
|
|
110
|
+
|
|
111
|
+
**Read by**: Builder (follows the implementation order exactly)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### `FORGE:CONTEXT`
|
|
116
|
+
|
|
117
|
+
Posted by the context gathering agent with institutional memory.
|
|
118
|
+
|
|
119
|
+
**Contents**:
|
|
120
|
+
- Known Pitfalls for This Area (from past review findings)
|
|
121
|
+
- Historical Findings on These Files
|
|
122
|
+
- Past Bugs in This Module
|
|
123
|
+
- Related Code Paths (callers/importers of changed functions)
|
|
124
|
+
- Patterns That Cause Bugs Here
|
|
125
|
+
- Successful Similar Implementations
|
|
126
|
+
|
|
127
|
+
**Completion marker**: `<!-- FORGE:CONTEXT:COMPLETE -->`
|
|
128
|
+
|
|
129
|
+
**Read by**: Builder (read before touching any code)
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### `FORGE:BUILDER`
|
|
134
|
+
|
|
135
|
+
Posted by the implementation agent after completing a build.
|
|
136
|
+
|
|
137
|
+
**Contents**:
|
|
138
|
+
- Branch name
|
|
139
|
+
- Commit SHAs
|
|
140
|
+
- Files changed count
|
|
141
|
+
- Approach summary (key decisions)
|
|
142
|
+
- Changes (bulleted file-by-file list)
|
|
143
|
+
- Acceptance Criteria Status (from CONTRACT, marked pass/fail)
|
|
144
|
+
- Testing Checklist
|
|
145
|
+
|
|
146
|
+
**Completion marker**: `<!-- FORGE:BUILDER:COMPLETE -->`
|
|
147
|
+
|
|
148
|
+
**Read by**: Review orchestrator, Phase 6 close agent
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### `FORGE:REVIEWER`
|
|
153
|
+
|
|
154
|
+
Posted by domain review agents on the PR.
|
|
155
|
+
|
|
156
|
+
**Contents**:
|
|
157
|
+
- Agent type (e.g., SECURITY, LOGIC, FRONTEND, DATABASE)
|
|
158
|
+
- Verdict: APPROVED | CHANGES_REQUESTED | COMMENTED
|
|
159
|
+
- Findings (severity: CRITICAL | HIGH | MEDIUM | LOW)
|
|
160
|
+
- Each finding: description, affected line, suggested fix, prevention rule
|
|
161
|
+
|
|
162
|
+
**Read by**: Review orchestrator (determines merge eligibility), future context agents
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### `FORGE:TRAJECTORY`
|
|
167
|
+
|
|
168
|
+
Posted as the final annotation on a closed issue. Serves as a permanent audit trail.
|
|
169
|
+
|
|
170
|
+
**Contents**:
|
|
171
|
+
- Phase-by-phase results table
|
|
172
|
+
- Key decisions made during the pipeline
|
|
173
|
+
- Anomalies detected
|
|
174
|
+
- Pipeline completion timestamp
|
|
175
|
+
|
|
176
|
+
**Read by**: `pipeline-health` command for performance analysis, future context agents for pattern mining
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Partial Annotation Detection
|
|
181
|
+
|
|
182
|
+
If a pipeline phase is interrupted mid-run (session ends, compaction, error), the annotation may be present but incomplete — missing its completion marker.
|
|
183
|
+
|
|
184
|
+
The canonical detection pattern:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Check for FORGE:INVESTIGATOR without INVESTIGATION:COMPLETE
|
|
188
|
+
gh api repos/{owner}/{repo}/issues/{number}/comments \
|
|
189
|
+
--jq '.[] | select(
|
|
190
|
+
.body | contains("FORGE:INVESTIGATOR") and
|
|
191
|
+
(contains("INVESTIGATION:COMPLETE") | not)
|
|
192
|
+
) | .id'
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
If a partial annotation is found, the pipeline deletes it and re-runs the phase from scratch. This ensures downstream agents never read incomplete context.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Querying FORGE State with the `gh` CLI
|
|
200
|
+
|
|
201
|
+
FORGE annotations are queryable using standard `gh` CLI JSON filtering:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Get the investigation report for issue #42
|
|
205
|
+
gh api repos/{owner}/{repo}/issues/42/comments \
|
|
206
|
+
--jq '.[] | select(.body | contains("FORGE:INVESTIGATOR")) | .body'
|
|
207
|
+
|
|
208
|
+
# Check current workflow phase
|
|
209
|
+
gh issue view 42 -R {owner}/{repo} --json labels \
|
|
210
|
+
--jq '[.labels[].name | select(startswith("workflow:"))]'
|
|
211
|
+
|
|
212
|
+
# Find all issues currently in-review
|
|
213
|
+
gh issue list -R {owner}/{repo} \
|
|
214
|
+
--label "workflow:in-review" \
|
|
215
|
+
--json number,title
|
|
216
|
+
|
|
217
|
+
# Check if build is complete (FORGE:BUILDER exists)
|
|
218
|
+
gh api repos/{owner}/{repo}/issues/42/comments \
|
|
219
|
+
--jq '.[] | select(.body | contains("FORGE:BUILDER:COMPLETE")) | .id'
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Adopting FORGE in Your Own Pipeline
|
|
225
|
+
|
|
226
|
+
FORGE is an open format. You don't need ForgeDock to use it.
|
|
227
|
+
|
|
228
|
+
**Minimum viable adoption**:
|
|
229
|
+
|
|
230
|
+
1. Pick annotation types relevant to your pipeline (INVESTIGATOR + BUILDER is a good start)
|
|
231
|
+
2. Write your agent prompts to post annotated comments after each phase
|
|
232
|
+
3. Write your downstream agent prompts to read those comments before starting
|
|
233
|
+
|
|
234
|
+
The protocol is intentionally minimal — it's just structured text in GitHub comments. Any agent that can run `gh issue comment` and `gh api` can participate.
|
|
235
|
+
|
|
236
|
+
**Extending the protocol**:
|
|
237
|
+
|
|
238
|
+
You can define your own annotation types by following the naming convention:
|
|
239
|
+
|
|
240
|
+
```html
|
|
241
|
+
<!-- FORGE:YOUR_CUSTOM_AGENT -->
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The only constraint: use a unique name that won't conflict with existing types. Custom types are invisible to ForgeDock agents, which only read the types they know about.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Why GitHub Comments (Not a Database)
|
|
249
|
+
|
|
250
|
+
FORGE deliberately uses GitHub comments rather than a dedicated database or vector store because:
|
|
251
|
+
|
|
252
|
+
1. **Zero infrastructure** — no service to deploy, no schema to maintain
|
|
253
|
+
2. **Human-readable** — engineers can read the full context without tooling
|
|
254
|
+
3. **Durable** — GitHub issues are permanent; comments survive repo migrations
|
|
255
|
+
4. **Queryable** — the `gh` CLI provides a complete query interface
|
|
256
|
+
5. **Universal** — any agent that can use `gh` can participate in the pipeline
|
|
257
|
+
|
|
258
|
+
The tradeoff is that querying is text-based (not semantic). For most pipeline coordination use cases, exact-match on annotation type markers is sufficient.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Next Steps
|
|
263
|
+
|
|
264
|
+
- [How ForgeDock's Knowledge Graph Works](./how-it-works.md) — see FORGE annotations in the full pipeline context
|
|
265
|
+
- [Complete Command Reference](./command-reference.md) — commands that read and write FORGE annotations
|
|
266
|
+
- [Getting Started with ForgeDock in 5 Minutes](./getting-started.md) — see FORGE annotations appear live on your issues
|