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/commands/work-on.md
CHANGED
|
@@ -11,8 +11,21 @@ argument-hint: [issue number or "next" to pick highest priority]
|
|
|
11
11
|
|
|
12
12
|
Orchestrator for the full issue lifecycle: investigate → decompose (if needed) → build → review → merge → close. GitHub issues are the persistent context layer — read existing comments before starting, write structured reports back, use `workflow:*` labels to track state.
|
|
13
13
|
|
|
14
|
-
**Agent model policy**:
|
|
14
|
+
**Agent model policy**: `model: "sonnet"` (standard tier). Fallback: `model: "opus"` if rate-limited. Feature gate: pass `effort` in Task/Skill spawns only on Claude Code >= 2.1.154.
|
|
15
15
|
**NEVER use plan mode (EnterPlanMode).**
|
|
16
|
+
**NEVER use the Agent tool** — this spec uses `Skill(...)` for sub-phase dispatch. The Agent tool spawns opaque subprocesses that bypass phase protocols, skip FORGE annotations, and cannot be constrained by allowed-tools. Always use `Skill(skill="...", args="...")` for sub-phase invocations.
|
|
17
|
+
|
|
18
|
+
<!-- FORGE:SPEC_LOADED — work-on.md loaded and active. Agent is bound by this spec. -->
|
|
19
|
+
|
|
20
|
+
## HARD RULES — READ BEFORE ANYTHING ELSE
|
|
21
|
+
|
|
22
|
+
1. **Every sub-phase MUST be invoked via `Skill(...)`.** You do NOT implement inline. You invoke `Skill(skill="work-on/investigate", ...)`, `Skill(skill="work-on/build", ...)`, etc. The Skill tool invocation is what triggers label updates, FORGE annotations, and structured output. Without it, the phase has no paper trail.
|
|
23
|
+
|
|
24
|
+
2. **Write to GitHub after EVERY phase.** Every FORGE annotation (HEARTBEAT, INVESTIGATOR, CONTRACT, BUILDER, etc.) must be posted before the next phase starts. A phase that completes without a GitHub write is effectively invisible to the stall detector and future sessions.
|
|
25
|
+
|
|
26
|
+
3. **Follow the Universal Phase Dispatcher.** The phase sequence table is the SINGLE source of truth for transitions. Do NOT skip phases, do NOT reorder phases, do NOT treat intermediate completions as terminal. Only the terminal states listed in the Dispatcher allow stopping.
|
|
27
|
+
|
|
28
|
+
4. **PRs NEVER target `main`.** Target `staging` (fast lane) or `milestone/{slug}` (feature lane). A PR to main is a pipeline violation regardless of what the issue description says.
|
|
16
29
|
|
|
17
30
|
### Compaction Resilience
|
|
18
31
|
|
|
@@ -58,6 +71,44 @@ Orchestrator for the full issue lifecycle: investigate → decompose (if needed)
|
|
|
58
71
|
|
|
59
72
|
---
|
|
60
73
|
|
|
74
|
+
## Spawn-Decision Policy
|
|
75
|
+
|
|
76
|
+
<!-- FORGE:SPAWN_POLICY — Canonical spawn-decision table. Sibling specs (orchestrate.md, review-pr.md) link to this section. Sub-issues #1276–#1279 reference this table. -->
|
|
77
|
+
|
|
78
|
+
**Default: run inline.** Every skill, phase, and sub-agent runs inline in the current context unless one of the three criteria below explicitly applies. A sub-agent buys exactly two things — parallelism and context isolation. If neither is needed, forking is waste.
|
|
79
|
+
|
|
80
|
+
### Spawn-Decision Table
|
|
81
|
+
|
|
82
|
+
| Row | Criterion | Fork? | Example |
|
|
83
|
+
|-----|-----------|-------|---------|
|
|
84
|
+
| a | **Parallel fan-out** — two or more independent work units can execute concurrently and the total wall time saving justifies the fork overhead | YES — spawn one sub-agent per work unit | `/orchestrate` dispatching multiple `/work-on` agents; `review-pr` spawning domain-specific reviewers in parallel |
|
|
85
|
+
| b | **Fresh-context isolation** — the work unit is a structured review or audit whose value depends on seeing the artefact without the builder's accumulated context bias, AND the review result is load-bearing for the merge decision | YES — spawn a dedicated sub-agent | Phase 5C review-fork when build context is large (see Row c for the quantitative threshold) |
|
|
86
|
+
| c | **Parent context near overflow** — the parent agent has made ≥20 Skill invocations OR the build changed ≥10 files, meaning delegating review inline risks a mid-review token overflow | YES — spawn a fresh sub-agent for review | Phase 5C: `Skill(skill="work-on/review", …)` instead of direct `review-pr` invocation |
|
|
87
|
+
|
|
88
|
+
**If none of the three rows match: run inline.** Do not fork for convenience, narrative clarity, or to avoid reading a large file. Context cost of a fork (spawning, context reconstruction, result aggregation) is paid every time, even when parallelism or isolation adds no value.
|
|
89
|
+
|
|
90
|
+
### Depth Budget
|
|
91
|
+
|
|
92
|
+
**Available depth**: 5 levels (since Claude Code v2.1.172).
|
|
93
|
+
|
|
94
|
+
**Target depth for a standard run**: ≤ 3.
|
|
95
|
+
|
|
96
|
+
| Depth | Agent | Notes |
|
|
97
|
+
|-------|-------|-------|
|
|
98
|
+
| 1 | `/orchestrate` | Top-level dispatcher — never implements directly |
|
|
99
|
+
| 2 | `/work-on` | Issue pipeline — runs build phases inline |
|
|
100
|
+
| 3 | Parallel reviewers (Row a/b/c fork) | Domain review agents spawned by Phase 5C |
|
|
101
|
+
|
|
102
|
+
**Build phases (3A–3M) run inline at depth 2** — they are sequential sub-phases of `/work-on`, not independent agents. Forking the build into a sub-agent (depth 3) is a violation of Row a/b/c unless the build itself fans out independently scoped work units.
|
|
103
|
+
|
|
104
|
+
**Depth 4–5 are reserved** for exceptional cases (e.g. an orchestrate agent that itself spawns an orchestrate agent for a sub-milestone). Agents that reach depth 4 MUST log a justification comment on the relevant issue.
|
|
105
|
+
|
|
106
|
+
### Phase 5C Cross-Reference
|
|
107
|
+
|
|
108
|
+
The existing Phase 5C context-budget check (≥10 changed files OR ≥20 Skill invocations → spawn `work-on/review` sub-agent) is an instance of **Row (c)** above. The quantitative thresholds are not changed — only their framing: they are now a specific application of the spawn-decision table, not a standalone ad-hoc rule.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
61
112
|
## Pipeline Rules
|
|
62
113
|
|
|
63
114
|
- **NEVER merge to main.** PRs target `staging` (fast lane) or `milestone/{slug}` (feature lane).
|
|
@@ -193,7 +244,7 @@ gh api repos/{GH_REPO}/issues/{NUMBER}/comments --jq '.[] | {id: .id, author: .u
|
|
|
193
244
|
|
|
194
245
|
**Check**: state (closed → STOP), terminal labels (`workflow:merged`/`workflow:invalid` → STOP), existing agent comments (`FORGE:INVESTIGATOR`, `FORGE:DECOMPOSED`, `FORGE:CONTRACT`, `FORGE:BUILDER`, `FORGE:TRAJECTORY`, `FORGE:DECISION_RECORD`), parent tracker status, sub-issue status.
|
|
195
246
|
|
|
196
|
-
**Determine resume point**: No comments → Phase 1. Investigation exists + ready-to-build → Phase 3. Builder + no PR → Phase 4. Builder + PR open → Phase 5. PR merged + issue open → Phase 6.
|
|
247
|
+
**Determine resume point**: No comments → Phase 1. Investigation exists + ready-to-build → Phase 3. Builder:COMPLETE + no PR → Phase 4. Builder without :COMPLETE (partial/interrupted build) + no PR → Phase 3 (partial-build cleanup). Builder + PR open → Phase 5. PR merged + issue open → Phase 6.
|
|
197
248
|
|
|
198
249
|
### 0B.5: Read Phase Checkpoint (MANDATORY — executes before any phase-skip decision)
|
|
199
250
|
|
|
@@ -225,6 +276,35 @@ fi
|
|
|
225
276
|
|
|
226
277
|
**Classify lane**: Milestone → feature lane (`milestone/{slug}`). No milestone → fast lane (`staging`).
|
|
227
278
|
|
|
279
|
+
**Batch issue detection**: <!-- Added: forge#1333 --> If the issue body contains `<!-- FORGE:BATCH_MEMBERS -->`, this is a P3 batch issue. Set `IS_BATCH=true` and extract the member issue list:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
IS_BATCH=0
|
|
283
|
+
BATCH_MEMBERS=()
|
|
284
|
+
|
|
285
|
+
BATCH_MEMBERS_BLOCK=$(gh issue view {NUMBER} {GH_FLAG} --json body --jq '.body' \
|
|
286
|
+
| sed -n '/<!-- FORGE:BATCH_MEMBERS -->/,/<!-- \/FORGE:BATCH_MEMBERS -->/p' 2>/dev/null || true)
|
|
287
|
+
|
|
288
|
+
if [ -n "$BATCH_MEMBERS_BLOCK" ]; then
|
|
289
|
+
IS_BATCH=1
|
|
290
|
+
# Extract member issue numbers (- [ ] #NNN: title lines)
|
|
291
|
+
BATCH_MEMBERS=($(echo "$BATCH_MEMBERS_BLOCK" | grep -oP '(?<=- \[ \] #)\d+' || true))
|
|
292
|
+
echo "Batch issue detected — member issues: ${BATCH_MEMBERS[*]}"
|
|
293
|
+
fi
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Batch issue pipeline rules** (when `IS_BATCH=true`):
|
|
297
|
+
- Build phases execute exactly as normal (the batch issue body IS the spec for what to fix)
|
|
298
|
+
- After successful merge, auto-close all member issues with a cross-reference:
|
|
299
|
+
```bash
|
|
300
|
+
for MEMBER in "${BATCH_MEMBERS[@]}"; do
|
|
301
|
+
gh issue close "$MEMBER" {GH_FLAG} \
|
|
302
|
+
--comment "Resolved as part of batch PR #{PR_NUMBER} (#{ISSUE_NUMBER}). See batch issue for details."
|
|
303
|
+
gh issue edit "$MEMBER" {GH_FLAG} --add-label "workflow:merged" 2>/dev/null || true
|
|
304
|
+
done
|
|
305
|
+
```
|
|
306
|
+
- Member issues are closed in Phase 6 (after PR merge) — NOT before
|
|
307
|
+
|
|
228
308
|
**Source branch for review-findings**: Parse `**Code branch**: \`{branch}\`` from body. Branch from there, not main.
|
|
229
309
|
|
|
230
310
|
**Script resolution** — Use the following `resolve_script()` function whenever calling a pipeline script. It enforces the 4-level precedence hierarchy (see `devdocs/project/architecture.md → Script Precedence`):
|
|
@@ -673,6 +753,31 @@ case "$TIER" in
|
|
|
673
753
|
esac
|
|
674
754
|
```
|
|
675
755
|
|
|
756
|
+
**Marker gate — Phase 1 exit** (see Marker Gate table in Universal Phase Dispatcher): <!-- forge#1419, forge#1418 -->
|
|
757
|
+
```bash
|
|
758
|
+
INV_MARKER=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
759
|
+
--jq '[.[] | select(.body | contains("INVESTIGATION:COMPLETE"))] | length')
|
|
760
|
+
if [ "${INV_MARKER:-0}" -eq 0 ]; then
|
|
761
|
+
echo "MARKER GATE FAIL: INVESTIGATION:COMPLETE absent — re-invoking work-on/investigate once"
|
|
762
|
+
Skill(skill="work-on/investigate", args="{NUMBER} --repo {GH_REPO} --gh-flag {GH_FLAG}")
|
|
763
|
+
INV_MARKER=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
764
|
+
--jq '[.[] | select(.body | contains("INVESTIGATION:COMPLETE"))] | length')
|
|
765
|
+
if [ "${INV_MARKER:-0}" -eq 0 ]; then
|
|
766
|
+
gh issue comment {NUMBER} {GH_FLAG} --body "<!-- FORGE:GATE_FAILURE -->
|
|
767
|
+
## Marker Gate Failure — Phase 1 (Investigation)
|
|
768
|
+
|
|
769
|
+
**Expected marker**: \`INVESTIGATION:COMPLETE\` inside a \`FORGE:INVESTIGATOR\` comment
|
|
770
|
+
**Status**: Absent after subcommand re-invocation. Human review required.
|
|
771
|
+
|
|
772
|
+
The router re-invoked \`work-on/investigate\` once but the marker was still not posted.
|
|
773
|
+
Inspect the subcommand output above for errors. <!-- forge#1418 -->"
|
|
774
|
+
gh issue edit {NUMBER} {GH_FLAG} --add-label "needs-human" \
|
|
775
|
+
--remove-label "workflow:investigating" 2>/dev/null || true
|
|
776
|
+
exit 1
|
|
777
|
+
fi
|
|
778
|
+
fi
|
|
779
|
+
```
|
|
780
|
+
|
|
676
781
|
Write machine-readable phase checkpoint (MUST execute immediately after label transition, before continuing):
|
|
677
782
|
```bash
|
|
678
783
|
CHECKPOINT_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
@@ -835,7 +940,19 @@ esac
|
|
|
835
940
|
|
|
836
941
|
<!-- FORGE:PHASE_COMPLETE — Entering Phase 3 (Build). See Universal Phase Dispatcher: sub-phases 3A–3M execute in sequence. No sub-phase completion is terminal. -->
|
|
837
942
|
|
|
838
|
-
**
|
|
943
|
+
**Canonical path**: Sub-phases 3A–3M run **inline** in the current context window for STANDARD and fast-lane issues. This is the single authoritative build topology. `work-on/build.md` and `work-on-monolithic.md` ([BENCHMARK]) describe the same inline model with different levels of detail; they are not separate competing paths. `Skill()` sub-agent spawns for build sub-phases are only permitted under the Spawn-Decision Table Row (c) exception (≥20 Skill invocations or ≥10 files changed before the build). <!-- Added: forge#1276 -->
|
|
944
|
+
|
|
945
|
+
**Skip if**: `<!-- FORGE:BUILDER:COMPLETE -->` is present in a BUILDER comment. <!-- Added: forge#1305 — require completion marker, not mere presence of BUILDER annotation -->
|
|
946
|
+
|
|
947
|
+
**Partial build detection**: If `<!-- FORGE:BUILDER -->` exists BUT `<!-- FORGE:BUILDER:COMPLETE -->` is ABSENT → the build was interrupted after implement.md Phase I6 (comment posted) but before validate.md Phase V5 (commit). Delete the partial comment and restart Phase 3 from the top: <!-- Added: forge#1305 -->
|
|
948
|
+
```bash
|
|
949
|
+
PARTIAL_ID=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
950
|
+
--jq '[.[] | select(.body | contains("FORGE:BUILDER") and (contains("FORGE:BUILDER:COMPLETE") | not))] | last | .id // ""')
|
|
951
|
+
if [ -n "$PARTIAL_ID" ]; then
|
|
952
|
+
gh api repos/{GH_REPO}/issues/comments/$PARTIAL_ID -X DELETE
|
|
953
|
+
echo "Deleted partial FORGE:BUILDER comment (no FORGE:BUILDER:COMPLETE) — restarting build"
|
|
954
|
+
fi
|
|
955
|
+
```
|
|
839
956
|
|
|
840
957
|
**CRITICAL: You MUST execute ALL sub-phases 3A–3M in order. Sub-phases 3C.5 (context) and 3C.6 (architect) are skipped ONLY for TRIVIAL tasks and Investigation tasks — see Phase 3B for classification. For STANDARD and COMPLEX tasks they post mandatory `FORGE:CONTEXT` and `FORGE:ARCHITECT` comments that Phase 3F reads as its primary input. Skipping them without a TRIVIAL/Investigation classification degrades build quality and causes review findings. After each sub-phase, continue to the next — no sub-phase is terminal.**
|
|
841
958
|
|
|
@@ -857,9 +974,9 @@ gh issue view {NUMBER} {GH_FLAG} --json number,title,body,labels,state,milestone
|
|
|
857
974
|
gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
858
975
|
--jq '.[] | select(.body | contains("FORGE:INVESTIGATOR")) | .body'
|
|
859
976
|
|
|
860
|
-
# Check if build already completed
|
|
977
|
+
# Check if build already completed (require FORGE:BUILDER:COMPLETE — not just FORGE:BUILDER)
|
|
861
978
|
gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
862
|
-
--jq '.[] | select(.body | contains("FORGE:BUILDER")) | .body'
|
|
979
|
+
--jq '.[] | select(.body | contains("FORGE:BUILDER:COMPLETE")) | .body'
|
|
863
980
|
|
|
864
981
|
# Check for existing COMPLEXITY_BAND from a prior run (resume path)
|
|
865
982
|
EXISTING_FAST_PATH=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
@@ -1181,6 +1298,14 @@ esac
|
|
|
1181
1298
|
**Determine source branch**:
|
|
1182
1299
|
- Review-finding → parse `**Code branch**: \`{branch}\`` from issue body; branch from `origin/{branch}`
|
|
1183
1300
|
- **Milestone review-finding hybrid lane** (Code branch matches `milestone/*`): High-risk lane. NEVER use `git merge` to resolve conflicts — use `git rebase` or `git cherry-pick` only. If conflicts can't be resolved without merge, post comment, add `needs-human`, STOP.
|
|
1301
|
+
- **Missing ref fallback**: After parsing, verify the Code branch still exists on remote. If not (e.g., the source PR's head branch was deleted post-merge before a corrected stamp took effect), fall back to `PR_BASE` (the lane default) and note the fallback:
|
|
1302
|
+
```bash
|
|
1303
|
+
SOURCE_BRANCH="{CODE_BRANCH_FROM_ISSUE_BODY}"
|
|
1304
|
+
if ! git ls-remote --exit-code origin "$SOURCE_BRANCH" >/dev/null 2>&1; then
|
|
1305
|
+
echo "WARNING: Code branch '$SOURCE_BRANCH' not found on remote — falling back to PR_BASE '$PR_BASE'"
|
|
1306
|
+
SOURCE_BRANCH="$PR_BASE"
|
|
1307
|
+
fi
|
|
1308
|
+
```
|
|
1184
1309
|
- Feature lane (has milestone) → branch from `origin/{PR_BASE}` (PR_BASE now set above)
|
|
1185
1310
|
- Fast lane (no milestone) → branch from `origin/{PR_BASE}` (PR_BASE = `{STAGING_BRANCH}`)
|
|
1186
1311
|
|
|
@@ -1289,6 +1414,11 @@ if iteration == max_iterations AND not PASS:
|
|
|
1289
1414
|
|
|
1290
1415
|
All tool commands are read from `forge.yaml → verification.commands`. When a key is absent, the step logs `SKIPPED — not configured in verification.commands` and continues rather than silently passing.
|
|
1291
1416
|
|
|
1417
|
+
**Track skipped checks** — initialize before any check runs:
|
|
1418
|
+
```bash
|
|
1419
|
+
VERIFICATION_SKIPPED_CHECKS=""
|
|
1420
|
+
```
|
|
1421
|
+
|
|
1292
1422
|
**Python**:
|
|
1293
1423
|
```bash
|
|
1294
1424
|
cd {WORKTREE_PATH}
|
|
@@ -1298,6 +1428,7 @@ if [ -n "$PYTHON_FORMAT" ]; then
|
|
|
1298
1428
|
eval "$PYTHON_FORMAT" 2>&1
|
|
1299
1429
|
else
|
|
1300
1430
|
echo "SKIPPED — python.format not configured in verification.commands"
|
|
1431
|
+
VERIFICATION_SKIPPED_CHECKS="${VERIFICATION_SKIPPED_CHECKS:+$VERIFICATION_SKIPPED_CHECKS, }python.format"
|
|
1301
1432
|
fi
|
|
1302
1433
|
|
|
1303
1434
|
# Compile check always runs (no config needed — catches syntax errors)
|
|
@@ -1317,6 +1448,7 @@ if [ -n "$TS_FORMAT" ]; then
|
|
|
1317
1448
|
eval "$TS_FORMAT" 2>&1
|
|
1318
1449
|
else
|
|
1319
1450
|
echo "SKIPPED — typescript.format not configured in verification.commands"
|
|
1451
|
+
VERIFICATION_SKIPPED_CHECKS="${VERIFICATION_SKIPPED_CHECKS:+$VERIFICATION_SKIPPED_CHECKS, }typescript.format"
|
|
1320
1452
|
fi
|
|
1321
1453
|
|
|
1322
1454
|
if [ -n "$TS_TYPECHECK" ]; then
|
|
@@ -1327,6 +1459,7 @@ elif [ -n "$TS_BUILD" ]; then
|
|
|
1327
1459
|
TS_EXIT=$?
|
|
1328
1460
|
else
|
|
1329
1461
|
echo "SKIPPED — typescript.typecheck and typescript.build not configured in verification.commands"
|
|
1462
|
+
VERIFICATION_SKIPPED_CHECKS="${VERIFICATION_SKIPPED_CHECKS:+$VERIFICATION_SKIPPED_CHECKS, }typescript.typecheck/build"
|
|
1330
1463
|
TS_EXIT=0
|
|
1331
1464
|
fi
|
|
1332
1465
|
```
|
|
@@ -1468,12 +1601,21 @@ Check off completed items, mark phases complete, add PR references.
|
|
|
1468
1601
|
|
|
1469
1602
|
### 3M: Post implementation comment
|
|
1470
1603
|
```bash
|
|
1604
|
+
# Compute verification status from VERIFICATION_SKIPPED_CHECKS (set in Phase 3H)
|
|
1605
|
+
if [ -z "$VERIFICATION_SKIPPED_CHECKS" ]; then
|
|
1606
|
+
VERIFICATION_STATUS="✅ All configured verification commands passed"
|
|
1607
|
+
else
|
|
1608
|
+
VERIFICATION_STATUS="⚠ Verification NOT run: ${VERIFICATION_SKIPPED_CHECKS} — verification.commands not configured for these checks"
|
|
1609
|
+
fi
|
|
1610
|
+
|
|
1471
1611
|
gh issue comment {NUMBER} {GH_FLAG} --body "<!-- FORGE:BUILDER -->
|
|
1472
1612
|
## Implementation Complete
|
|
1473
1613
|
|
|
1474
1614
|
**Branch**: \`{BRANCH}\`
|
|
1475
1615
|
**Commits**: {COMMIT_SHA(S)}
|
|
1476
1616
|
**Files changed**: {COUNT}
|
|
1617
|
+
**Verification Status**: ${VERIFICATION_STATUS}
|
|
1618
|
+
**Cost (build phase)**: ${PHASE_COST_USD:-unavailable} (best-effort — session telemetry; omit if unavailable)
|
|
1477
1619
|
|
|
1478
1620
|
### Approach
|
|
1479
1621
|
{what was built, key decisions}
|
|
@@ -1502,6 +1644,31 @@ gh issue comment {NUMBER} {GH_FLAG} --body "<!-- FORGE:CHECKPOINT -->
|
|
|
1502
1644
|
\`\`\`"
|
|
1503
1645
|
```
|
|
1504
1646
|
|
|
1647
|
+
**Marker gate — Phase 3 exit** (see Marker Gate table in Universal Phase Dispatcher): <!-- forge#1419, forge#1418 -->
|
|
1648
|
+
```bash
|
|
1649
|
+
BUILD_MARKER=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
1650
|
+
--jq '[.[] | select(.body | contains("FORGE:BUILDER:COMPLETE"))] | length')
|
|
1651
|
+
if [ "${BUILD_MARKER:-0}" -eq 0 ]; then
|
|
1652
|
+
echo "MARKER GATE FAIL: FORGE:BUILDER:COMPLETE absent — re-invoking work-on/build once"
|
|
1653
|
+
Skill(skill="work-on/build", args="{NUMBER} --repo {GH_REPO} --gh-flag {GH_FLAG} --worktree {WORKTREE_PATH} --branch {BRANCH} --base {PR_BASE}")
|
|
1654
|
+
BUILD_MARKER=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
1655
|
+
--jq '[.[] | select(.body | contains("FORGE:BUILDER:COMPLETE"))] | length')
|
|
1656
|
+
if [ "${BUILD_MARKER:-0}" -eq 0 ]; then
|
|
1657
|
+
gh issue comment {NUMBER} {GH_FLAG} --body "<!-- FORGE:GATE_FAILURE -->
|
|
1658
|
+
## Marker Gate Failure — Phase 3 (Build)
|
|
1659
|
+
|
|
1660
|
+
**Expected marker**: \`FORGE:BUILDER:COMPLETE\` inside a \`FORGE:BUILDER\` comment
|
|
1661
|
+
**Status**: Absent after subcommand re-invocation. Human review required.
|
|
1662
|
+
|
|
1663
|
+
The router re-invoked \`work-on/build\` once but the marker was still not posted.
|
|
1664
|
+
Inspect the subcommand output above for errors. <!-- forge#1418 -->"
|
|
1665
|
+
gh issue edit {NUMBER} {GH_FLAG} --add-label "needs-human" \
|
|
1666
|
+
--remove-label "workflow:building" 2>/dev/null || true
|
|
1667
|
+
exit 1
|
|
1668
|
+
fi
|
|
1669
|
+
fi
|
|
1670
|
+
```
|
|
1671
|
+
|
|
1505
1672
|
---
|
|
1506
1673
|
|
|
1507
1674
|
## Phase 4: PR Creation
|
|
@@ -1639,7 +1806,7 @@ PR #${PR_NUMBER} created targeting \`{PR_BASE}\`. Invoking /review-pr with --aut
|
|
|
1639
1806
|
|
|
1640
1807
|
**Context budget check** (run before invoking review-pr): <!-- Added: forge#93 -->
|
|
1641
1808
|
|
|
1642
|
-
Large-context sessions that accumulated significant build history cause review-pr to hit the token limit mid-review. Check the accumulated context before delegating:
|
|
1809
|
+
Large-context sessions that accumulated significant build history cause review-pr to hit the token limit mid-review. This check is an instance of **Spawn-Decision Policy Row (c)** (parent context near overflow) — see the [Spawn-Decision Table](#spawn-decision-table) for the general policy. Check the accumulated context before delegating:
|
|
1643
1810
|
|
|
1644
1811
|
- If the build changed **≥10 files** OR this agent has made **≥20 Skill invocations** since it started: invoke `work-on/review` as a fresh sub-agent (via `Skill(skill="work-on/review", args="...")`) rather than calling review-pr directly. The sub-agent starts with a clean context window.
|
|
1645
1812
|
- Otherwise (small build, few skill calls): invoke review-pr directly as below.
|
|
@@ -1651,9 +1818,39 @@ Skill(skill="review-pr", args="{PR_NUMBER} --auto-merge --issue {NUMBER} --base
|
|
|
1651
1818
|
```
|
|
1652
1819
|
|
|
1653
1820
|
**Sub-agent invocation** (large builds — ≥10 changed files OR ≥20 Skill invocations):
|
|
1821
|
+
|
|
1822
|
+
Before spawning, build a distilled hot-copy of the key annotations the review sub-agent would otherwise re-fetch from GitHub. This reduces gh round-trips in the child without replacing the durable FORGE annotation record. <!-- Added: forge#1277 -->
|
|
1823
|
+
|
|
1824
|
+
```bash
|
|
1825
|
+
# Hot-copy: extract CONTRACT and ARCHITECT annotation bodies for inline injection
|
|
1826
|
+
HOT_CONTRACT=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
1827
|
+
--jq '[.[] | select(.body | contains("<!-- FORGE:CONTRACT -->"))] | last | .body // ""' 2>/dev/null \
|
|
1828
|
+
| head -60) # Scope: first 60 lines — captures Proposed Approach + Deliverables table
|
|
1829
|
+
|
|
1830
|
+
HOT_ARCHITECT=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
1831
|
+
--jq '[.[] | select(.body | contains("<!-- FORGE:ARCHITECT -->"))] | last | .body // ""' 2>/dev/null \
|
|
1832
|
+
| head -40) # Scope: first 40 lines — captures Affected Paths + Implementation Order
|
|
1833
|
+
|
|
1834
|
+
# Build inline context block (omit sections where annotation was not found)
|
|
1835
|
+
HOT_COPY_BLOCK=""
|
|
1836
|
+
if [ -n "$HOT_CONTRACT" ]; then
|
|
1837
|
+
HOT_COPY_BLOCK="${HOT_COPY_BLOCK}
|
|
1838
|
+
**HOT COPY — FORGE:CONTRACT** (do not re-fetch; durable record is on the issue):
|
|
1839
|
+
${HOT_CONTRACT}"
|
|
1840
|
+
fi
|
|
1841
|
+
if [ -n "$HOT_ARCHITECT" ]; then
|
|
1842
|
+
HOT_COPY_BLOCK="${HOT_COPY_BLOCK}
|
|
1843
|
+
|
|
1844
|
+
**HOT COPY — FORGE:ARCHITECT** (do not re-fetch; durable record is on the issue):
|
|
1845
|
+
${HOT_ARCHITECT}"
|
|
1846
|
+
fi
|
|
1654
1847
|
```
|
|
1655
|
-
|
|
1848
|
+
|
|
1656
1849
|
```
|
|
1850
|
+
Skill(skill="work-on/review", args="{NUMBER} --repo {GH_REPO} --gh-flag {GH_FLAG} --worktree {WORKTREE_PATH} --branch {BRANCH} --base {PR_BASE}", context="{HOT_COPY_BLOCK}")
|
|
1851
|
+
```
|
|
1852
|
+
|
|
1853
|
+
The `{HOT_COPY_BLOCK}` is an optimization that avoids the child re-discovering context already held by the parent. The FORGE annotations on GitHub remain the durable, compaction-safe record. If the hot-copy block is empty (annotations not yet posted), the sub-agent falls back to reading them from GitHub as before.
|
|
1657
1854
|
|
|
1658
1855
|
Review-pr handles: full domain-agent review → post findings as separate issues → merge PR. It does NOT close the issue or clean up the worktree — those run in Phase 6.
|
|
1659
1856
|
|
|
@@ -1887,6 +2084,13 @@ This check is **audit-only** — it annotates the trajectory for visibility. It
|
|
|
1887
2084
|
Post `<!-- FORGE:TRAJECTORY -->` comment with phase-by-phase results table:
|
|
1888
2085
|
|
|
1889
2086
|
```bash
|
|
2087
|
+
# Compute verification row from VERIFICATION_SKIPPED_CHECKS (set in Phase 3H)
|
|
2088
|
+
if [ -z "$VERIFICATION_SKIPPED_CHECKS" ]; then
|
|
2089
|
+
VERIFICATION_ROW="✅ Ran"
|
|
2090
|
+
else
|
|
2091
|
+
VERIFICATION_ROW="⚠ Skipped — verification.commands not configured for: ${VERIFICATION_SKIPPED_CHECKS}"
|
|
2092
|
+
fi
|
|
2093
|
+
|
|
1890
2094
|
gh issue comment {NUMBER} {GH_FLAG} --body "<!-- FORGE:TRAJECTORY -->
|
|
1891
2095
|
## Pipeline Trajectory — #{NUMBER}
|
|
1892
2096
|
|
|
@@ -1897,6 +2101,7 @@ gh issue comment {NUMBER} {GH_FLAG} --body "<!-- FORGE:TRAJECTORY -->
|
|
|
1897
2101
|
| Phase 2: Decomposition | ⏭ Skipped | {reason} |
|
|
1898
2102
|
| Phase 3: Build | ✅ Complete | Branch: \`{BRANCH}\` |
|
|
1899
2103
|
| Phase 3G: Quality Gate | ✅ Gate passed | {iterations} iterations |
|
|
2104
|
+
| Phase 3H: Verification | ${VERIFICATION_ROW} | |
|
|
1900
2105
|
| Phase 4–5: Review + PR | {REVIEW_ROW} | PR #{PR_NUMBER} → \`{PR_BASE}\` |
|
|
1901
2106
|
| Phase 6: Close | ✅ Complete | Issue closed |
|
|
1902
2107
|
|
|
@@ -1947,6 +2152,40 @@ AGENTS_RUN=$(echo "$REVIEW_SUMMARY" | grep -oE '[0-9]+ agents' | grep -oE '[0-9]
|
|
|
1947
2152
|
AGENTS_RUN="${AGENTS_RUN:-0}"
|
|
1948
2153
|
```
|
|
1949
2154
|
|
|
2155
|
+
**Capture best-effort cost signal** from session telemetry before posting GDR. This is best-effort — if the signal is unavailable, the cost block is omitted rather than blocking the pipeline or fabricating a number. Field names align with `bin/runner.mjs` usage accounting from #1295 so downstream tooling shares one schema:
|
|
2156
|
+
```bash
|
|
2157
|
+
# Best-effort: read per-stage usage from FORGE:BUILDER/FORGE:CONTEXT/FORGE:ARCHITECT phase annotations
|
|
2158
|
+
# Source: session telemetry when available (e.g. OTEL_LOG_TOOL_DETAILS, Claude Code usage reporting).
|
|
2159
|
+
# If unavailable, set COST_BLOCK to null — the field is omitted from the GDR rather than fabricated.
|
|
2160
|
+
COST_INVESTIGATION=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
2161
|
+
--jq '[.[] | select(.body | contains("FORGE:INVESTIGATOR")) | .body] | last // ""' 2>/dev/null \
|
|
2162
|
+
| grep -oP '(?<=cost_usd: )\S+' | head -1 || echo "")
|
|
2163
|
+
COST_BUILD=$(gh api repos/{GH_REPO}/issues/{NUMBER}/comments \
|
|
2164
|
+
--jq '[.[] | select(.body | contains("FORGE:BUILDER")) | .body] | last // ""' 2>/dev/null \
|
|
2165
|
+
| grep -oP '(?<=cost_usd: )\S+' | head -1 || echo "")
|
|
2166
|
+
COST_REVIEW=$(gh api repos/{GH_REPO}/issues/{PR_NUMBER}/comments \
|
|
2167
|
+
--jq '[.[] | select(.body | contains("FORGE:REVIEWER")) | .body] | last // ""' 2>/dev/null \
|
|
2168
|
+
| grep -oP '(?<=cost_usd: )\S+' | head -1 || echo "")
|
|
2169
|
+
|
|
2170
|
+
# Build cost block JSON only if at least one stage value is present; otherwise null
|
|
2171
|
+
if [ -n "$COST_INVESTIGATION" ] || [ -n "$COST_BUILD" ] || [ -n "$COST_REVIEW" ]; then
|
|
2172
|
+
COST_INV_JSON="${COST_INVESTIGATION:-null}"
|
|
2173
|
+
COST_BUILD_JSON="${COST_BUILD:-null}"
|
|
2174
|
+
COST_REVIEW_JSON="${COST_REVIEW:-null}"
|
|
2175
|
+
COST_BLOCK="\"cost\": {
|
|
2176
|
+
\"stages\": {
|
|
2177
|
+
\"investigation\": $COST_INV_JSON,
|
|
2178
|
+
\"build\": $COST_BUILD_JSON,
|
|
2179
|
+
\"review\": $COST_REVIEW_JSON
|
|
2180
|
+
},
|
|
2181
|
+
\"total_usd\": null,
|
|
2182
|
+
\"source\": \"session-telemetry\"
|
|
2183
|
+
},"
|
|
2184
|
+
else
|
|
2185
|
+
COST_BLOCK=""
|
|
2186
|
+
fi
|
|
2187
|
+
```
|
|
2188
|
+
|
|
1950
2189
|
**Post GDR to PR** (not to issue — PR comment survives as permanent artifact on the merged diff):
|
|
1951
2190
|
```bash
|
|
1952
2191
|
if [ "$GDR_EXISTS" != "true" ] && [ -n "{PR_NUMBER}" ]; then
|
|
@@ -1973,6 +2212,7 @@ if [ "$GDR_EXISTS" != "true" ] && [ -n "{PR_NUMBER}" ]; then
|
|
|
1973
2212
|
\"confidence\": \"{CONFIDENCE}\",
|
|
1974
2213
|
\"task_type\": \"{TASK_TYPE}\"
|
|
1975
2214
|
},
|
|
2215
|
+
${COST_BLOCK}
|
|
1976
2216
|
\"context\": {
|
|
1977
2217
|
\"historical_edges_referenced\": ${REVIEW_FINDING_COUNT},
|
|
1978
2218
|
\"forge_annotations_read\": [\"FORGE:INVESTIGATOR\", \"FORGE:CONTRACT\", \"FORGE:CONTEXT\", \"FORGE:ARCHITECT\", \"FORGE:BUILDER\"]
|
package/docs/BRAND.md
CHANGED
|
@@ -6,7 +6,10 @@ Status of reserved and blocked brand handles across platforms.
|
|
|
6
6
|
|
|
7
7
|
| Domain | Status |
|
|
8
8
|
|--------|--------|
|
|
9
|
-
| `forgedock.dev` | **
|
|
9
|
+
| `forgedock.dev` | **Not owned** — owner-confirmed 2026-07-05 as NOT controlled by RapierCraft Studios; live content is an unrelated third-party product. Retired from ForgeDock branding — do not use anywhere. |
|
|
10
|
+
| `forgedock.io` | **Owned** — owner-confirmed 2026-07-05 as registered to RapierCraft Studios. Canonical ForgeDock domain. Currently a Porkbun parked page; a site/holding page is pending deploy — do not link publicly until the site is live. |
|
|
11
|
+
|
|
12
|
+
> **Rule**: No public ForgeDock surface (npm homepage, repo description, plugin manifests, docs) may point at a domain until its live content is verified as controlled by RapierCraft Studios.
|
|
10
13
|
|
|
11
14
|
## npm
|
|
12
15
|
|
|
@@ -25,9 +28,16 @@ No action needed. The package name was claimed on first publish.
|
|
|
25
28
|
The bare `forgedock` org slug cannot be used for the ForgeDock GitHub App name — GitHub
|
|
26
29
|
slugifies App display names and rejects collisions with existing user/org accounts.
|
|
27
30
|
|
|
28
|
-
**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
**Canonical public App**: **App ID 4051319** (Client ID `Iv23ligZAftI2QDt5CUa`), owner-confirmed
|
|
32
|
+
2026-07-05. Currently owned by the personal `@RapierCraft` account — **to be transferred to the
|
|
33
|
+
`RapierCraftStudios` org** (a public/commercial App should not live on a personal account). Its
|
|
34
|
+
public listing still needs a real description and a homepage that resolves publicly.
|
|
35
|
+
|
|
36
|
+
Superseded / legacy Apps — do **not** present as the public identity:
|
|
37
|
+
- **3978349** — earlier dev App (registered under RapierCraftStudios, `public: false`); superseded by 4051319.
|
|
38
|
+
- **3731547** (`rapiercraft-forge`) — placeholder description "test"; authored the early public merged PRs but is legacy, its listing being wound down.
|
|
39
|
+
|
|
40
|
+
Recommended slug when finalizing the org-owned App: `forgedock-ai` (the bare `forgedock` slug is blocked, per above).
|
|
31
41
|
|
|
32
42
|
## Social Handles
|
|
33
43
|
|
|
@@ -45,7 +55,8 @@ Social handle registration is an operational task. Reserve handles before public
|
|
|
45
55
|
|
|
46
56
|
| Platform | Action |
|
|
47
57
|
|----------|--------|
|
|
48
|
-
| Domain |
|
|
58
|
+
| Domain (forgedock.dev) | Not owned (owner-confirmed 2026-07-05) — retired from branding |
|
|
59
|
+
| Domain (forgedock.io) | Owned — canonical; site deploy pending before public linking |
|
|
49
60
|
| npm | Done |
|
|
50
61
|
| GitHub org slug | Blocked — use variant for App slug |
|
|
51
62
|
| Social handles | Reserve before L1 public launch |
|
package/docs/CI.md
CHANGED
|
@@ -20,7 +20,7 @@ The `forgedock-review.yml` workflow template triggers on every pull request (ope
|
|
|
20
20
|
## Prerequisites
|
|
21
21
|
|
|
22
22
|
1. **Anthropic API key** — Claude Code runs against the Anthropic API. Get one at [console.anthropic.com](https://console.anthropic.com).
|
|
23
|
-
2. **ForgeDock installed** — The workflow installs ForgeDock automatically via `npx forgedock install
|
|
23
|
+
2. **ForgeDock installed** — The workflow installs ForgeDock automatically via `npx forgedock install --global` (CI uses global install so commands are available system-wide in the runner).
|
|
24
24
|
3. **GitHub Actions enabled** — Standard for all public repos; enabled by default for private repos.
|
|
25
25
|
|
|
26
26
|
---
|
|
@@ -47,7 +47,7 @@ mkdir -p .github/workflows
|
|
|
47
47
|
cp "$(npx forgedock which-dir)/templates/workflows/forgedock-review.yml" .github/workflows/forgedock-review.yml
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Or copy it manually — the file is in `~/.claude/commands/../templates/workflows/forgedock-review.yml` after running `npx forgedock install`.
|
|
50
|
+
Or copy it manually — the file is in `~/.claude/commands/../templates/workflows/forgedock-review.yml` after running `npx forgedock install --global`.
|
|
51
51
|
|
|
52
52
|
### 3. Commit and push
|
|
53
53
|
|
package/docs/CODEX.md
CHANGED
|
@@ -8,7 +8,7 @@ Shared source:
|
|
|
8
8
|
- `commands/**/*.md` remains the workflow spec for both runtimes
|
|
9
9
|
|
|
10
10
|
Claude wrapper:
|
|
11
|
-
- `install.sh` symlinks command files into `~/.claude/commands
|
|
11
|
+
- `install.sh` symlinks command files into the current project directory by default; pass `--global` to install into `~/.claude/commands/` for all projects
|
|
12
12
|
|
|
13
13
|
Codex wrapper:
|
|
14
14
|
- `install-codex.sh` generates namespaced skills in `~/.codex/skills`
|
|
@@ -84,6 +84,41 @@ trust_level = "trusted"
|
|
|
84
84
|
|
|
85
85
|
The installer does not modify global trust settings automatically.
|
|
86
86
|
|
|
87
|
+
## Conformance Verification
|
|
88
|
+
|
|
89
|
+
The Codex adapter produces and consumes the same FORGE annotation wire format as the Claude Code path. `scripts/conformance-check.mjs` validates annotation output from any producer (Claude Code, Codex, Cursor, or fixtures) against the FORGE Annotation Protocol v1.0 (`docs/spec/forge-protocol-v1.md`).
|
|
90
|
+
|
|
91
|
+
### Running the check
|
|
92
|
+
|
|
93
|
+
Pipe real or fixture-captured Codex-adapter-produced FORGE comments into the script:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Validate a fixture file containing FORGE annotation blocks
|
|
97
|
+
node scripts/conformance-check.mjs docs/spec/fixtures/codex-adapter-annotations.md
|
|
98
|
+
|
|
99
|
+
# Validate live annotations from a merged PR (replace 1234 with the PR number)
|
|
100
|
+
gh api repos/RapierCraftStudios/ForgeDock/issues/1234/comments \
|
|
101
|
+
--jq '[.[].body]' \
|
|
102
|
+
| node scripts/conformance-check.mjs -
|
|
103
|
+
|
|
104
|
+
# Validate all comments on recent merged PRs (last 10)
|
|
105
|
+
gh pr list -R RapierCraftStudios/ForgeDock --state merged --limit 10 --json number \
|
|
106
|
+
--jq '.[].number' | while read pr; do
|
|
107
|
+
gh api "repos/RapierCraftStudios/ForgeDock/issues/$pr/comments" \
|
|
108
|
+
--jq '[.[].body]'
|
|
109
|
+
done | node scripts/conformance-check.mjs -
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Exit code 0 = all annotations conform. Exit code 1 = violations found (see output for details). Unrecognized annotation types are tolerated per spec §7.2 (WARN, not FAIL). An annotation explicitly marked `:PARTIAL` is also reported as a WARN, not a failure — only a fully missing/interrupted completion sentinel fails the exit code. (The reference `validate()` in `@forgedock/protocol` still reports `valid: false` for PARTIAL annotations per §3.2 — that strict signal is for library consumers deciding whether data is safe to treat as complete, not for this CLI's pass/fail gate.)
|
|
113
|
+
|
|
114
|
+
### Re-running when the adapter changes
|
|
115
|
+
|
|
116
|
+
Run the conformance check any time `.agents/skills/` adapter files are modified or after a new release of the spec. Conformance gaps found must be documented as follow-up GitHub issues (findings become issues per repo convention), not silently patched inline.
|
|
117
|
+
|
|
118
|
+
### Verified implementation claim
|
|
119
|
+
|
|
120
|
+
The Codex adapter path (`.agents/skills/*/SKILL.md` + `commands/*.md`) is a proven second implementation of the FORGE Annotation Protocol. Both the Claude Code path and the Codex adapter path produce annotations that pass `scripts/conformance-check.mjs`. See `docs/spec/forge-protocol-v1.md` Section 11 for the vendor-neutrality acknowledgement.
|
|
121
|
+
|
|
87
122
|
## Usage Notes
|
|
88
123
|
|
|
89
124
|
- Use the installed `forge` skill as the overview/router entrypoint.
|