forgedock 1.0.22 → 1.1.2
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 +255 -211
- package/bin/batch-runner.mjs +339 -0
- package/bin/cinema.mjs +320 -0
- package/bin/demo.mjs +92 -7
- package/bin/engine/phases.mjs +168 -0
- package/bin/engine/projector.mjs +32 -0
- package/bin/engine/reconcile.mjs +11 -0
- package/bin/engine/runlog.mjs +79 -0
- package/bin/engine/state.mjs +32 -0
- package/bin/engine-cli.mjs +222 -0
- package/bin/engine.mjs +138 -0
- package/bin/forgedock.mjs +896 -1540
- package/bin/hooks/interactive-engine.mjs +509 -0
- package/bin/hooks/pre-tool-use.mjs +498 -0
- package/bin/hooks/subagent-stop-enforce.mjs +197 -0
- package/bin/journey.mjs +841 -0
- package/bin/registry.mjs +139 -0
- package/bin/report.mjs +447 -0
- package/bin/runner.mjs +136 -20
- package/bin/settings-hook.mjs +346 -0
- package/bin/tui.mjs +6 -3
- package/commands/adopt.md +4 -1
- package/commands/analytics.md +4 -1
- package/commands/audit-agents.md +110 -27
- package/commands/audit.md +20 -1
- package/commands/autopilot.md +84 -12
- package/commands/changelog.md +2 -1
- package/commands/ci-audit.md +2 -1
- package/commands/cleanup.md +161 -1
- package/commands/compat-audit.md +2 -1
- package/commands/deploy-info.md +63 -4
- package/commands/design-bench.md +6 -1
- package/commands/design-render-critique-loop.md +2 -1
- package/commands/design.md +1 -0
- package/commands/diagnose.md +2 -1
- package/commands/explain.md +2 -1
- package/commands/forge-stats.md +122 -2
- package/commands/forgedock-init.md +1 -1
- package/commands/geo-audit.md +3 -0
- package/commands/incident-response.md +2 -1
- package/commands/issue.md +24 -3
- package/commands/milestone.md +77 -12
- package/commands/optimize.md +2 -1
- package/commands/orchestrate/config.md +67 -0
- package/commands/orchestrate/phase-1-resolve.md +159 -0
- package/commands/orchestrate/phase-2-triage.md +126 -0
- package/commands/orchestrate/phase-2.5-synthesis.md +156 -0
- package/commands/orchestrate/phase-3-dependency.md +591 -0
- package/commands/orchestrate/phase-4-execution.md +962 -0
- package/commands/orchestrate/phase-5-cleanup.md +47 -0
- package/commands/orchestrate/phase-6-report.md +198 -0
- package/commands/orchestrate/safety.md +62 -0
- package/commands/orchestrate.md +25 -2027
- package/commands/pipeline-health/config.md +34 -0
- package/commands/pipeline-health/phase-1-context.md +180 -0
- package/commands/pipeline-health/phase-2-metrics.md +1729 -0
- package/commands/pipeline-health/phase-3-analyze.md +204 -0
- package/commands/pipeline-health/phase-4-proposals.md +117 -0
- package/commands/pipeline-health/phase-5-report.md +284 -0
- package/commands/pipeline-health/phase-6-summary.md +52 -0
- package/commands/pipeline-health.md +25 -2401
- package/commands/pipeline-resume.md +24 -1
- package/commands/pipeline-status.md +65 -0
- package/commands/qa-sweep.md +4 -1
- package/commands/quality-gate.md +326 -42
- package/commands/replay.md +2 -1
- package/commands/review-pr-agents/api.md +135 -0
- package/commands/review-pr-agents/auth.md +137 -0
- package/commands/review-pr-agents/billing.md +101 -0
- package/commands/review-pr-agents/concurrency.md +145 -0
- package/commands/review-pr-agents/database.md +103 -0
- package/commands/review-pr-agents/frontend.md +89 -0
- package/commands/review-pr-agents/infra.md +385 -0
- package/commands/review-pr-agents/protocols.md +185 -0
- package/commands/review-pr-agents/scraper.md +185 -0
- package/commands/review-pr-agents/security.md +406 -0
- package/commands/review-pr-agents.md +45 -1722
- package/commands/review-pr-staging.md +196 -40
- package/commands/review-pr.md +612 -56
- package/commands/rollback.md +2 -1
- package/commands/scope.md +2 -1
- package/commands/security-audit.md +2 -1
- package/commands/signal-planner.md +623 -0
- package/commands/sync-ecosystem.md +1 -0
- package/commands/test-gate.md +17 -1
- package/commands/validate.md +2 -1
- package/commands/work-on/build/architect.md +28 -0
- package/commands/work-on/build/context.md +2 -0
- package/commands/work-on/build/implement.md +19 -5
- package/commands/work-on/build/validate.md +62 -6
- package/commands/work-on/build.md +187 -30
- package/commands/work-on/close.md +132 -5
- package/commands/work-on/decompose.md +19 -1
- package/commands/work-on/investigate.md +117 -2
- package/commands/work-on/review.md +48 -4
- package/commands/work-on-monolithic.md +8 -2
- package/commands/work-on.md +247 -7
- package/docs/BRAND.md +16 -5
- package/docs/CI.md +2 -2
- package/docs/CODEX.md +36 -1
- package/docs/CONFIG.md +44 -42
- package/docs/FORGE-PROTOCOL.md +15 -1064
- package/docs/anthropic-devrel-outreach.md +2 -2
- package/docs/articles/command-decomposition-token-savings.md +214 -0
- package/docs/articles/model-release-playbook.md +131 -0
- package/docs/articles/per-repo-adaptive-scripts-token-savings.md +27 -25
- package/docs/claude-breakpoints.json +75 -5
- package/docs/design/abc-benchmark.md +1 -1
- package/docs/design/design-spec-schema.md +1 -1
- package/docs/design/divergent-generation.md +1 -1
- package/docs/design/eval-gate-runbook.md +178 -0
- package/docs/design/show-hn-draft.md +26 -1
- package/docs/design/token-cost-baseline-1298.md +59 -0
- package/docs/eval/README.md +117 -0
- package/docs/eval/corpus/seed-v1.json +6 -0
- package/docs/eval/published/claude-sonnet-4-6-2026-07-04.json +33 -0
- package/docs/site/annotations-explained.md +24 -0
- package/docs/site/command-learning-path.md +51 -14
- package/docs/site/command-reference.md +339 -113
- package/docs/site/for-companies.md +95 -0
- package/docs/site/forge-annotation-protocol.md +12 -256
- package/docs/site/getting-started.md +58 -12
- package/docs/site/github-is-the-memory.md +113 -0
- package/docs/site/how-it-works.md +3 -13
- package/docs/site/index.md +10 -2
- package/docs/spec/eval-run-result.md +147 -0
- package/docs/spec/forge-protocol-v1.md +441 -18
- package/docs/spec/label-state-machine.md +55 -0
- package/docs/spec/review-protocol.md +158 -0
- package/docs/spec-graph-schema.md +28 -0
- package/docs/superpowers/plans/2026-07-03-cinematic-onboarding-tui.md +2339 -0
- package/docs/superpowers/plans/2026-07-03-durable-execution-engine.md +1223 -0
- package/docs/superpowers/specs/2026-07-03-cinematic-onboarding-tui-design.md +157 -0
- package/docs/superpowers/specs/2026-07-03-durable-execution-engine-design.md +194 -0
- package/docs/superpowers/specs/2026-07-04-economic-self-governance-design.md +181 -0
- package/docs/superpowers/specs/2026-07-04-provenance-trail-design.md +189 -0
- package/examples/forgedock-demo/README.md +41 -22
- package/examples/forgedock-demo/issues/06-bug-tags-type-validation.md +43 -0
- package/examples/forgedock-demo/issues/07-bug-negative-offset-pagination.md +42 -0
- package/examples/forgedock-demo/issues/08-bug-patch-mass-assignment.md +49 -0
- package/examples/forgedock-demo/issues/09-bug-count-injection.md +47 -0
- package/examples/forgedock-demo/issues/10-feature-sort-param.md +39 -0
- package/examples/forgedock-demo/issues/11-feature-patch-tags.md +37 -0
- package/examples/forgedock-demo/issues/12-feature-bulk-create.md +42 -0
- package/examples/forgedock-demo/issues/13-feature-archive-notes.md +46 -0
- package/examples/forgedock-demo/issues/14-refactor-extract-title-validation.md +41 -0
- package/examples/forgedock-demo/issues/15-refactor-protected-route-flag.md +43 -0
- package/examples/forgedock-demo/issues/16-refactor-extract-store.md +45 -0
- package/examples/forgedock-demo/issues/17-perf-tags-dedup-set.md +35 -0
- package/examples/forgedock-demo/issues/18-perf-remove-redundant-sort.md +37 -0
- package/examples/forgedock-demo/issues/19-docs-api-reference-full.md +53 -0
- package/examples/forgedock-demo/issues/20-docs-intentional-flaw-convention.md +46 -0
- package/examples/forgedock-demo/scripts/smoke.js +18 -1
- package/examples/forgedock-demo/src/db.js +36 -11
- package/examples/forgedock-demo/src/routes/notes.js +106 -9
- package/examples/forgedock-demo/src/server.js +4 -1
- package/package.json +12 -4
- package/packages/protocol/LICENSE +21 -0
- package/packages/protocol/src/cli.js +135 -0
- package/packages/protocol/src/emit.js +146 -0
- package/packages/protocol/src/index.js +43 -0
- package/packages/protocol/src/parse.js +229 -0
- package/packages/protocol/src/types.js +171 -0
- package/packages/protocol/src/validate.js +122 -0
- package/scripts/bench-topology-cost.mjs +372 -0
- package/scripts/check-command-docs-drift.sh +198 -0
- package/scripts/check-protocol-restatements.sh +176 -0
- package/scripts/check-registry/README.md +72 -0
- package/scripts/check-registry/manifest.json +6 -0
- package/scripts/code-index.sh +454 -0
- package/scripts/conformance-check.mjs +168 -0
- package/scripts/doctor-pipeline-state.sh +484 -0
- package/scripts/eval-gate-baseline.json +17 -0
- package/scripts/eval-gate-scorecard.mjs +242 -0
- package/scripts/eval-scorecard-aggregator.mjs +252 -0
- package/scripts/flaky-quarantine.sh +241 -0
- package/scripts/forge-annotation.sh +567 -0
- package/scripts/issue-dedup.sh +236 -0
- package/scripts/validate-annotation-node.mjs +233 -0
- package/scripts/verify-env-vars.sh +18 -2
- package/scripts/verify-host-headers.sh +4 -4
- package/scripts/verify-route-registration.sh +2 -2
- package/scripts/worktree-lifecycle.sh +202 -0
- package/templates/devdocs/agent/using-forgedock.md +14 -0
package/docs/site/index.md
CHANGED
|
@@ -12,6 +12,12 @@ No more coordinating between agent sessions. No more lost context. No more start
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## The core idea
|
|
16
|
+
|
|
17
|
+
**[GitHub Is Already Your Agents' Memory](./github-is-the-memory.md)** — Why agents re-derive everything from scratch every session, why sidecar stores duplicate what GitHub already records, and how FORGE annotations make the existing citation graph machine-readable. This is the canonical explanation of why ForgeDock works the way it does.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
15
21
|
## Get Started
|
|
16
22
|
|
|
17
23
|
**New to ForgeDock?** Start here:
|
|
@@ -25,11 +31,13 @@ No more coordinating between agent sessions. No more lost context. No more start
|
|
|
25
31
|
|
|
26
32
|
| Page | What You'll Learn |
|
|
27
33
|
|------|-------------------|
|
|
34
|
+
| [GitHub Is Already Your Agents' Memory](./github-is-the-memory.md) | The memory problem, FORGE annotations, the knowledge graph argument, and the open protocol |
|
|
28
35
|
| [Getting Started](./getting-started.md) | Install ForgeDock, configure forge.yaml, run `/work-on` on your first issue |
|
|
29
36
|
| [How It Works](./how-it-works.md) | FORGE annotations, the pipeline relay, compaction resilience, workflow labels |
|
|
30
37
|
| [ForgeDock vs. Manual Workflows](./vs-manual-workflows.md) | Why structured pipelines beat ad-hoc Claude Code sessions |
|
|
31
38
|
| [FORGE Annotation Protocol](./forge-annotation-protocol.md) | Technical spec — annotation types, completion markers, querying |
|
|
32
39
|
| [Command Reference](./command-reference.md) | All 25+ commands with usage, options, and examples |
|
|
40
|
+
| [For Companies](./for-companies.md) | AGPL vs. commercial license, fleet layer, design-partner program, procurement facts |
|
|
33
41
|
|
|
34
42
|
---
|
|
35
43
|
|
|
@@ -37,7 +45,7 @@ No more coordinating between agent sessions. No more lost context. No more start
|
|
|
37
45
|
|
|
38
46
|
- [GitHub Repository](https://github.com/RapierCraftStudios/ForgeDock)
|
|
39
47
|
- [npm Package](https://www.npmjs.com/package/forgedock)
|
|
40
|
-
- [Configuration Reference](
|
|
48
|
+
- [Configuration Reference](https://github.com/RapierCraftStudios/ForgeDock/blob/main/docs/CONFIG.md)
|
|
41
49
|
- [Report an Issue](https://github.com/RapierCraftStudios/ForgeDock/issues/new)
|
|
42
50
|
|
|
43
51
|
---
|
|
@@ -48,7 +56,7 @@ No more coordinating between agent sessions. No more lost context. No more start
|
|
|
48
56
|
npx forgedock
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
59
|
+
Installs commands into the current project (project-scoped by default). Add `--global` to install into `~/.claude/commands/` for all projects on this machine.
|
|
52
60
|
|
|
53
61
|
**Requirements**: Claude Code, Node.js 18+, `gh` CLI authenticated with GitHub.
|
|
54
62
|
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Eval Run-Result JSON Schema
|
|
2
|
+
|
|
3
|
+
**Spec version**: 1.0.0
|
|
4
|
+
**Stable since**: issue #1285
|
|
5
|
+
|
|
6
|
+
This document defines the machine-readable JSON shapes consumed and produced by
|
|
7
|
+
the ForgeDock pipeline eval harness:
|
|
8
|
+
|
|
9
|
+
- **Per-run result** — one object per issue, written by the batch driver
|
|
10
|
+
(`bin/batch-runner.mjs`) after each headless `/work-on` run.
|
|
11
|
+
- **Scorecard** — aggregate computed by `scripts/eval-scorecard-aggregator.mjs`
|
|
12
|
+
from an array of per-run results; consumed by the CI regression gate
|
|
13
|
+
(`scripts/eval-gate-scorecard.mjs`, issue #1286) and the publishing pipeline.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Per-Run Result
|
|
18
|
+
|
|
19
|
+
Each headless run of a single corpus issue produces one JSON object:
|
|
20
|
+
|
|
21
|
+
```jsonc
|
|
22
|
+
{
|
|
23
|
+
// Required fields
|
|
24
|
+
"issue": 1234, // integer — GitHub issue number
|
|
25
|
+
"status": "success", // "success" | "failure" | "incomplete" | "error"
|
|
26
|
+
"wallClockMs": 42000, // integer — wall-clock duration of the run (ms)
|
|
27
|
+
"interventionCount": 0, // integer — number of human interventions (see below)
|
|
28
|
+
|
|
29
|
+
// Optional fields (nullable — do NOT block on missing upstream data)
|
|
30
|
+
"cost": null, // null | number — token/USD cost; null until #1255 lands
|
|
31
|
+
"iterations": 23, // integer — tool-use loop iteration count
|
|
32
|
+
"stopReason": "end_turn", // string — Anthropic stop_reason or "max_iterations"
|
|
33
|
+
"error": null, // null | string — error message when status === "error"
|
|
34
|
+
"specVersion": "1.0.21", // string — forgedock package version at run time
|
|
35
|
+
"model": "claude-sonnet-4-5", // string — model used for the run
|
|
36
|
+
"runAt": "2026-07-04T00:00:00.000Z" // ISO-8601 timestamp
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### `status` values
|
|
41
|
+
|
|
42
|
+
| Value | Meaning |
|
|
43
|
+
|--------------|------------------------------------------------------------------------------|
|
|
44
|
+
| `success` | Run completed; the issue reached `workflow:merged` or equivalent terminal state |
|
|
45
|
+
| `failure` | Run completed but the issue did not reach a terminal success state |
|
|
46
|
+
| `incomplete` | Run stopped due to `max_tokens` or `max_iterations` — result is unreliable |
|
|
47
|
+
| `error` | The runner threw an unhandled exception (network, API, crash) |
|
|
48
|
+
|
|
49
|
+
### `interventionCount` definition
|
|
50
|
+
|
|
51
|
+
A human intervention is counted when **any** of the following occur during a run:
|
|
52
|
+
|
|
53
|
+
1. The `needs-human` label is applied to the issue by the pipeline.
|
|
54
|
+
2. A manual `gh` command is executed outside the automated runner loop.
|
|
55
|
+
3. A FORGE annotation comment is posted by a human (not the bot account) during the run window.
|
|
56
|
+
|
|
57
|
+
Runs where no human interaction occurs have `interventionCount: 0`.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Batch Driver Output File
|
|
62
|
+
|
|
63
|
+
`bin/batch-runner.mjs` writes a JSON object containing the per-run array plus
|
|
64
|
+
top-level metadata:
|
|
65
|
+
|
|
66
|
+
```jsonc
|
|
67
|
+
{
|
|
68
|
+
"corpus_version": "v1", // string | null — corpus version label
|
|
69
|
+
"spec_version": "1.0.21", // string | null — forgedock version at run time
|
|
70
|
+
"model": "claude-sonnet-4-5", // string | null — model used
|
|
71
|
+
"generated_at": "2026-07-04T00:00:00.000Z",
|
|
72
|
+
"runs": [ ...PerRunResult ]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Corpus File
|
|
79
|
+
|
|
80
|
+
The batch driver accepts a corpus file (JSON) listing issues to run:
|
|
81
|
+
|
|
82
|
+
```jsonc
|
|
83
|
+
{
|
|
84
|
+
"corpus_version": "v1", // string — semver or label for the corpus snapshot
|
|
85
|
+
"run_id": "run-2026-07-04-1", // string — optional unique run identifier
|
|
86
|
+
"run_mode": "full", // "full" | "subset" — passed through to scorecard
|
|
87
|
+
"spec_sha": "abc123", // string | null — git SHA of commands/ at run time
|
|
88
|
+
"issues": [1001, 1002, 1003] // integer[] — GitHub issue numbers
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Scorecard
|
|
95
|
+
|
|
96
|
+
`scripts/eval-scorecard-aggregator.mjs` reads the batch driver output and emits
|
|
97
|
+
a scorecard in the format consumed by `scripts/eval-gate-scorecard.mjs` (#1286):
|
|
98
|
+
|
|
99
|
+
```jsonc
|
|
100
|
+
{
|
|
101
|
+
"schema_version": "1", // string — always "1" (schema identifier)
|
|
102
|
+
"run_id": "run-2026-07-04-1", // string | null — from corpus metadata
|
|
103
|
+
"generated_at": "2026-07-04T00:00:00.000Z",
|
|
104
|
+
"corpus_size": 20, // integer — from corpus metadata (defaults to issues_run)
|
|
105
|
+
"issues_run": 20, // integer — total runs in the input
|
|
106
|
+
"successful_runs": 17, // integer — runs with status === "success"
|
|
107
|
+
"failed_runs": 2, // integer — runs with status === "failure"
|
|
108
|
+
"success_rate_pct": 85, // number [0,100] — successful_runs / issues_run * 100 (2dp)
|
|
109
|
+
"mean_wall_clock_ms": 38200, // number | null — arithmetic mean wall-clock
|
|
110
|
+
"median_wall_clock_ms": 35000, // number | null — median wall-clock
|
|
111
|
+
"total_intervention_count": 1, // integer — sum of interventionCount across all runs
|
|
112
|
+
"cost": null, // null | number — sum of per-run cost; null if any run has cost: null
|
|
113
|
+
"run_mode": "full", // "full" | "subset"
|
|
114
|
+
"spec_sha": "abc123" // string | null — git SHA of commands/ at run time
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Important**: `incomplete` and `error` status runs count against `success_rate_pct`
|
|
119
|
+
(they reduce `issues_run` denominator's numerator). This ensures the gate catches
|
|
120
|
+
hangs and crashes, not just logic failures.
|
|
121
|
+
|
|
122
|
+
### Methodology rules (enforced by the scorecard aggregator)
|
|
123
|
+
|
|
124
|
+
1. **Minimum sample size**: fewer than `MIN_RUNS` (currently **5**) scoreable
|
|
125
|
+
(`success` or `failure`) runs causes the aggregator to exit non-zero rather
|
|
126
|
+
than emit a misleading rate. Mirrors `bench-scorecard.mjs`'s `MIN_RUNS` rule.
|
|
127
|
+
2. **Malformed input**: missing required fields (`issue`, `status`,
|
|
128
|
+
`wallClockMs`, `interventionCount`) or non-integer/non-string values cause
|
|
129
|
+
exit code 1 (validation error).
|
|
130
|
+
3. **Cost is nullable**: if any run has `cost: null`, the scorecard's
|
|
131
|
+
`cost` is `null`. The field becomes numeric only when every run reports a
|
|
132
|
+
real cost value (post-#1255).
|
|
133
|
+
4. **Rate consistency**: `success_rate_pct` is always computed as
|
|
134
|
+
`round(successful_runs / issues_run * 100, 2)`. The CI gate (#1286) validates
|
|
135
|
+
this computed value matches the reported value.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Stability contract
|
|
140
|
+
|
|
141
|
+
- Field names are stable. New **optional** fields may be added at any time
|
|
142
|
+
without a version bump.
|
|
143
|
+
- Removing or renaming a field is a breaking change and requires a spec version
|
|
144
|
+
bump and a GitHub issue.
|
|
145
|
+
- Consumers **must** treat unknown fields as ignorable (forward-compatibility).
|
|
146
|
+
- The CI gate sub-issue (#1286) and publishing sub-issue (#1287) may depend on
|
|
147
|
+
this schema without waiting for upstream changes.
|