@warpgogol/forge 9.6.1 → 9.6.3
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/CHANGELOG.md +48 -0
- package/CONTRIBUTING.md +19 -25
- package/README.md +42 -18
- package/README.uk.md +60 -36
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +58 -5
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +95 -8
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-cut.js +27 -6
- package/dist/os/flow/handlers/flow-cut.js.map +1 -1
- package/dist/src/migration-adapters/ignored-files.d.ts +14 -0
- package/dist/src/migration-adapters/ignored-files.d.ts.map +1 -1
- package/dist/src/migration-adapters/ignored-files.js +62 -0
- package/dist/src/migration-adapters/ignored-files.js.map +1 -1
- package/dist/src/migration-adapters/index.d.ts +3 -3
- package/dist/src/migration-adapters/index.d.ts.map +1 -1
- package/dist/src/migration-adapters/index.js +2 -2
- package/dist/src/migration-adapters/index.js.map +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.d.ts.map +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js +9 -7
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js.map +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.d.ts.map +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js +9 -7
- package/dist/src/migration-adapters/phaser-pnpm/index.js.map +1 -1
- package/dist/src/migration-adapters/types.d.ts +19 -1
- package/dist/src/migration-adapters/types.d.ts.map +1 -1
- package/dist/src/migration-adapters/types.js +19 -0
- package/dist/src/migration-adapters/types.js.map +1 -1
- package/dist/src/onboarding/scaffold-project.d.ts.map +1 -1
- package/dist/src/onboarding/scaffold-project.js +21 -2
- package/dist/src/onboarding/scaffold-project.js.map +1 -1
- package/dist/src/validators/skill-doc-sync.d.ts +76 -0
- package/dist/src/validators/skill-doc-sync.d.ts.map +1 -0
- package/dist/src/validators/skill-doc-sync.js +333 -0
- package/dist/src/validators/skill-doc-sync.js.map +1 -0
- package/docs/concepts/governance-model.md +9 -1
- package/docs/concepts/verification-model.md +31 -0
- package/docs/concepts/why-forge.md +1 -1
- package/docs/evidence/release-9.6.2.md +31 -0
- package/docs/grants/devin-startups.md +25 -0
- package/docs/guides/existing-project.md +15 -3
- package/docs/guides/skills.md +27 -8
- package/docs/guides/upgrading.md +6 -2
- package/docs/guides/verification-and-evidence.md +45 -0
- package/docs/integrations/devin.md +63 -0
- package/docs/reference/cli.md +13 -2
- package/docs/reference/fleet-measurement.md +52 -0
- package/docs/reference/forge-yaml.md +1 -1
- package/docs/reference/programmatic-api.md +62 -33
- package/os/core/core.module.ts +70 -11
- package/os/core/handlers/package-health.test.ts +104 -23
- package/os/core/handlers/package-health.ts +133 -19
- package/os/flow/handlers/flow-cut.ts +27 -6
- package/os/flow/tests/flow-cut.rerun.test.ts +54 -4
- package/package.json +3 -2
- package/profiles/forge-shell.yaml +1 -0
- package/profiles/godot-game.yaml +1 -0
- package/profiles/phaser-game.yaml +1 -0
- package/profiles/site-workshop.yaml +1 -0
- package/profiles/system.yaml +1 -0
- package/profiles/typescript.yaml +1 -0
- package/skills/meta/forge-bootstrap/SKILL.md +18 -12
- package/src/migration-adapters/ignored-files.ts +64 -0
- package/src/migration-adapters/index.ts +19 -3
- package/src/migration-adapters/node-typescript-pnpm/index.ts +21 -5
- package/src/migration-adapters/phaser-pnpm/index.ts +21 -5
- package/src/migration-adapters/types.ts +36 -1
- package/src/onboarding/scaffold-project.ts +19 -2
- package/src/tests/migration-adapters.test.ts +73 -5
- package/src/tests/skill-doc-sync.test.ts +233 -0
- package/src/validators/skill-doc-sync.ts +449 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Release evidence — @warpgogol/forge 9.6.2
|
|
2
|
+
|
|
3
|
+
What was verified, where the artifacts live, and what this evidence does and does not prove. All links point at public artifacts in [syrokomskyi/forge](https://github.com/syrokomskyi/forge) and the npm registry.
|
|
4
|
+
|
|
5
|
+
## Pipeline trail
|
|
6
|
+
|
|
7
|
+
| Stage | Artifact | What it proves |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Authoring | commits on `develop` in the upstream monorepo, squashed into the export commit | the change set exists and has authorship history |
|
|
10
|
+
| Commit gate | scoped lint / typecheck / tests run by `ecosystem.commit` per changed file | the touched files passed their package gates before integrating |
|
|
11
|
+
| Integration gate | `flow.integrate` run — heavyweight suite (build, tests, correctness, registry integrity) | the merge met the platform bar, not just the package bar |
|
|
12
|
+
| Release cut | `flow.cut` produced repo tag `v6.464.2` and package tag `forge@9.6.2` | version bump was machine-derived, not hand-edited |
|
|
13
|
+
| Push + extract | `flow.push` → export repo `syrokomskyi/forge` | the public tree is machine-generated, not hand-maintained |
|
|
14
|
+
| Public CI | [GitHub Actions run for the release commit](https://github.com/syrokomskyi/forge/actions) — `ci` job: install, build, lint, typecheck, vitest | the published code compiles, lints, types and tests green in a clean environment |
|
|
15
|
+
| Publish | [publish job](https://github.com/syrokomskyi/forge/actions) — `npm publish --provenance --access public` → `+ @warpgogol/forge@9.6.2` | the registry artifact was produced by CI from the tagged commit, not from a workstation |
|
|
16
|
+
| Provenance | Sigstore transparency log entry for the publish (linked from the job log) | third-party attestation binds the artifact to the workflow run |
|
|
17
|
+
| Registry | [`@warpgogol/forge` on npm](https://www.npmjs.com/package/@warpgogol/forge) — the `latest` dist-tag serves `9.6.2` | the artifact is publicly installable |
|
|
18
|
+
|
|
19
|
+
## What this proves — and what it does not
|
|
20
|
+
|
|
21
|
+
Proves: every transition (author → gate → integrate → release → extract → CI → publish) produced a verifiable artifact, and the npm tarball was built by CI from the tagged commit.
|
|
22
|
+
|
|
23
|
+
Does not prove: that a specific human or a specific AI agent authored any particular line. "Authored by an AI agent" is a process claim about the upstream session — the public evidence shows the gates and outputs, not the keystrokes.
|
|
24
|
+
|
|
25
|
+
## How to spot-check
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm view @warpgogol/forge@9.6.2 dist.tarball # tarball URL + integrity hash
|
|
29
|
+
npm view @warpgogol/forge version # should print 9.6.2
|
|
30
|
+
gh run list --repo syrokomskyi/forge --limit 5 # latest green CI + publish jobs
|
|
31
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Forge × Devin for Startups — proposal brief
|
|
2
|
+
|
|
3
|
+
Working draft for the [Devin for Startups](https://devin.ai/startups) application. Public so the claims stay checkable against the repository.
|
|
4
|
+
|
|
5
|
+
| Section | Content |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| **Startup** | Warpgogol — operating engineering studio based in Germany. Forge is our open-source infrastructure product (Apache-2.0, [`@warpgogol/forge`](https://www.npmjs.com/package/@warpgogol/forge) on npm). |
|
|
8
|
+
| **Problem** | Autonomous agents lose project decisions and self-certify their output. There is no independent check between "the agent says done" and "the change is accepted." |
|
|
9
|
+
| **Solution** | Repository-native contracts — `forge.yaml`, generated `AGENTS.md`, portable skills — plus deterministic validators that run in CI outside the agent's reasoning. |
|
|
10
|
+
| **Traction** | Published npm package (v9.6.x) with provenance-signed releases, public CI on every release, documented use across our own production fleet of repositories ([fleet measurement](../reference/fleet-measurement.md)). Note: the fleet is internal usage — evidence of a working tool, not of independent market adoption. |
|
|
11
|
+
| **Devin use case** | Devin as the implementation agent on Forge-governed projects: Forge holds the contract and skills, Devin writes code, Forge validators gate acceptance independently of the agent's self-assessment. See [the integration guide](../integrations/devin.md). |
|
|
12
|
+
| **Milestones** | (1) Reference experiment published — reproducible scenario where a Forge validator catches a contract violation Devin's self-assessment accepted ([protocol](../integrations/devin.md#reference-experiment-planned)). (2) Comparative measurement — same task class, Devin with vs. without Forge. (3) Public results + case study. |
|
|
13
|
+
| **Success metrics** | Verified completion rate, contract violations caught pre-merge, cost per accepted task, manual review effort per PR. |
|
|
14
|
+
| **Limits** | No completed public Devin experiment yet — the integration is verified against Devin's published conventions, the end-to-end demonstration is a funded milestone, not a finished result. |
|
|
15
|
+
|
|
16
|
+
## What the grant pays for
|
|
17
|
+
|
|
18
|
+
- Devin seat/credits for the reference experiment and the comparative study above.
|
|
19
|
+
- CI compute for the validation matrix (Devin × task class × contract presence).
|
|
20
|
+
- Maintainer time writing the reproducible scenarios and publishing the evidence.
|
|
21
|
+
|
|
22
|
+
## What we are not asking the grant to fund
|
|
23
|
+
|
|
24
|
+
- Core Forge development — it is already shipping.
|
|
25
|
+
- Marketing claims — results get published as artifacts (tasks, diffs, validator logs, cost data) or not at all.
|
|
@@ -18,7 +18,7 @@ Transplanting an existing codebase into Forge is an interactive, AI-guided proce
|
|
|
18
18
|
The skill will:
|
|
19
19
|
- Ask for the path to your existing codebase
|
|
20
20
|
- Detect the stack automatically (Phaser, Godot, TypeScript, etc.)
|
|
21
|
-
- Migrate all files (
|
|
21
|
+
- Migrate all files, asking first which git-ignored categories to transfer — secrets (`.env`, `*.key`, `*.pem`) are opt-in only and never copied without explicit approval
|
|
22
22
|
- Optionally transfer git history
|
|
23
23
|
- Verify the build
|
|
24
24
|
|
|
@@ -30,9 +30,21 @@ Transplanting an existing codebase into Forge is an interactive, AI-guided proce
|
|
|
30
30
|
|
|
31
31
|
## What happens during transplant
|
|
32
32
|
|
|
33
|
-
- Your existing files are
|
|
34
|
-
- Hidden files (`.env`, `.gitignore`) are preserved
|
|
33
|
+
- Your existing files are copied into the Forge project structure (the source directory is not modified)
|
|
34
|
+
- Hidden files (`.env`, `.gitignore`) are preserved only when you approve them — git-ignored and secret-looking files transfer on explicit opt-in
|
|
35
35
|
- Git history is optionally transferred
|
|
36
36
|
- The matching stack profile is detected from marker files (`phaser.config.*`, `project.godot`, etc.) <!-- pkg-health-12: code/config path, not a command -->
|
|
37
37
|
- `AGENTS.md` is generated from `forge.yaml`
|
|
38
38
|
- Skills are deployed to `.agents/skills/`
|
|
39
|
+
|
|
40
|
+
## Safety checklist
|
|
41
|
+
|
|
42
|
+
Before transplanting:
|
|
43
|
+
|
|
44
|
+
- **Commit or stash all work in the source project** — a clean source tree makes the post-transplant diff reviewable and recovery trivial.
|
|
45
|
+
- **Keep a backup of the source directory** until the transplanted project verifies green (`forge doctor` + your build). The transplant moves files; the backup is the rollback.
|
|
46
|
+
- **Audit secrets before migrating.** The migration adapter blocks git-ignored and secret-looking files (`.env`, `*.key`, `*.pem`, certificates) unless you explicitly allow them during onboarding — confirm any secret you approve lands only in git-ignored paths of the target, and rotate any credential that had ever been committed to history.
|
|
47
|
+
- **Review the diff before your first commit** — `git status` and `git diff` show exactly what the skill added (`forge.yaml`, `AGENTS.md`, `.agents/skills/`, profile config) versus what it left untouched.
|
|
48
|
+
- **Prefer skipping git history** for projects with secrets in past commits — history transfer is optional, not required.
|
|
49
|
+
|
|
50
|
+
Recovery: if verification fails, restore from the backup and re-run the bootstrap. The skill does not modify anything outside the target project directory — optional global tooling (RTK token optimization) is offered only with your explicit consent and backs up any config it touches.
|
package/docs/guides/skills.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skills
|
|
2
2
|
|
|
3
|
-
Forge ships
|
|
3
|
+
Forge ships <!-- forge:skills-count -->41 skills (34 fo + 4 shared + 3 meta)<!-- /forge:skills-count --> — the `fo-` skills are Forge's portable skill set, shared skills are cross-cutting, and meta skills author other skills. The `skills/` tree also carries support material that is not itself a skill — reference documents under `skills/_shared/` (e.g. the agent operating model that skills include by reference) and the `skills/shared/knowledge/` data directory.
|
|
4
4
|
|
|
5
5
|
## How skills work
|
|
6
6
|
|
|
@@ -20,15 +20,31 @@ The AI agent reads skill descriptions and invokes skills based on the user's req
|
|
|
20
20
|
|
|
21
21
|
## Built-in skills
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
<!-- forge:skills-inventory -->
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
25
|
+
**41 skills** — 34 fo, 4 shared, 3 meta.
|
|
26
|
+
|
|
27
|
+
- **fo (34):** `fo-add-tests`, `fo-architecture`, `fo-compass-annotate`, `fo-design-summit`, `fo-doc-audit`, `fo-doctor`, `fo-explore`, `fo-extract-dna`, `fo-fix`, `fo-handoff`, `fo-harvest`, `fo-idea`, `fo-idea-audit`, `fo-idea-create-adr`, `fo-idea-create-rfc`, `fo-idea-enhance`, `fo-idea-i-just-want-to-see-the-plan`, `fo-idea-i-just-want-to-see-the-result`, `fo-idea-implement`, `fo-idea-plan`, `fo-idea-status`, `fo-knowledge-distill`, `fo-memory-sync`, `fo-outbox`, `fo-qa`, `fo-reproduce`, `fo-review`, `fo-session-retro`, `fo-session-save`, `fo-spec-ingest`, `fo-step-commit`, `fo-system-dispatch`, `fo-task-run`, `fo-triage`
|
|
28
|
+
- **shared (4):** `grilling`, `my-preferences`, `windows-ai-tooling`, `writing-great-skills`
|
|
29
|
+
- **meta (3):** `forge-bootstrap`, `port-to-forge`, `skill-create`
|
|
30
|
+
|
|
31
|
+
<!-- /forge:skills-inventory -->
|
|
32
|
+
|
|
33
|
+
### How they're organized
|
|
34
|
+
|
|
35
|
+
Skill categories:
|
|
36
|
+
|
|
37
|
+
- **Idea pipeline** — `fo-idea`, `fo-idea-audit`, `fo-idea-create-rfc`, `fo-idea-create-adr`, `fo-idea-plan`, `fo-idea-enhance`, `fo-idea-implement`, `fo-idea-status`, plus the two shortcut skills `fo-idea-i-just-want-to-see-the-plan` / `-result`
|
|
38
|
+
- **Review** — `fo-review`, `fo-fix`, `fo-architecture`, `fo-design-summit`
|
|
39
|
+
- **Architecture & DNA** — `fo-extract-dna`, `fo-compass-annotate`
|
|
40
|
+
- **Session & memory** — `fo-session-retro`, `fo-session-save`, `fo-handoff`, `fo-memory-sync`
|
|
29
41
|
- **Knowledge** — `fo-knowledge-distill`
|
|
30
|
-
- **Testing** — `fo-add-tests`
|
|
31
|
-
- **
|
|
42
|
+
- **Testing & triage** — `fo-add-tests`, `fo-reproduce`, `fo-triage`, `fo-qa`
|
|
43
|
+
- **Exploration & specs** — `fo-explore`, `fo-spec-ingest`
|
|
44
|
+
- **System dispatch** — `fo-system-dispatch`, `fo-task-run`, `fo-outbox`
|
|
45
|
+
- **Process helpers** — `fo-step-commit`, `fo-doc-audit`, `fo-harvest`, `fo-doctor`
|
|
46
|
+
- **Shared** — `grilling` (stress-test plans before implementation), `my-preferences`, `windows-ai-tooling`, `writing-great-skills`
|
|
47
|
+
- **Meta** — `forge-bootstrap`, `port-to-forge`, `skill-create`
|
|
32
48
|
|
|
33
49
|
## Project-local skill packs
|
|
34
50
|
|
|
@@ -51,6 +67,9 @@ pnpm exec forge skill.validate
|
|
|
51
67
|
# List all skills (pack skills annotated with pack:<prefix>)
|
|
52
68
|
pnpm exec forge skill.list
|
|
53
69
|
|
|
70
|
+
# Re-render marked skill regions in docs / fail on stale skill-count claims
|
|
71
|
+
forge skill.doc-sync [--write]
|
|
72
|
+
|
|
54
73
|
# Validate pack manifests
|
|
55
74
|
pnpm exec forge plugin.validate
|
|
56
75
|
```
|
package/docs/guides/upgrading.md
CHANGED
|
@@ -19,7 +19,9 @@ pnpm exec forge doctor
|
|
|
19
19
|
- Updates binding defaults in `forge.yaml` (without overwriting operator-set values)
|
|
20
20
|
- Updates `forge.syncedVersion` to track the last synced version
|
|
21
21
|
- Is idempotent — running it twice produces the same result
|
|
22
|
-
-
|
|
22
|
+
- Reconciles forge-managed artifacts: synced skill dirs get a `.forge-managed` manifest; a stale dir (one whose skill no longer ships upstream) is pruned **only** when its on-disk contents exactly match the recorded manifest. Consumer-owned dirs are never deleted — dirs without a marker, with a corrupt marker, or containing extra files are kept and reported (RFC-1154)
|
|
23
|
+
- Injects a delimited forge-managed block into `.prettierignore` for consumers that use prettier
|
|
24
|
+
- Merges, never overwrites, editable generated guides: content below `<!-- forge:custom -->` in `AGENTS.md` is preserved verbatim (RFC-1153)
|
|
23
25
|
|
|
24
26
|
## Preview changes
|
|
25
27
|
|
|
@@ -27,9 +29,11 @@ pnpm exec forge doctor
|
|
|
27
29
|
pnpm exec forge upgrade --dry-run
|
|
28
30
|
```
|
|
29
31
|
|
|
32
|
+
`--dry-run` also reports `nestedAgentsPlanned` / `nestedAgentsPreserved` / `nestedAgentsSkipped` for nested `AGENTS.md` guides.
|
|
33
|
+
|
|
30
34
|
## What upgrade does NOT do
|
|
31
35
|
|
|
32
36
|
- Does not overwrite operator-set bindings
|
|
33
|
-
- Does not delete files
|
|
37
|
+
- Does not delete consumer-owned files — only byte-identical stale forge-managed dirs are pruned (above)
|
|
34
38
|
- Does not modify RFCs, ADRs, or source code
|
|
35
39
|
- Does not run tests or builds
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Verification & evidence — scenario guide
|
|
2
|
+
|
|
3
|
+
Six Forge mechanisms produce evidence about agent work. Each entry follows the same shape: input → operation → output → the human decision it supports. For the guarantee boundaries behind these, read [The verification model](../concepts/verification-model.md).
|
|
4
|
+
|
|
5
|
+
## Session audit — did the agent do what it claims?
|
|
6
|
+
|
|
7
|
+
- **Input:** saved session transcripts under `docs/sessions/*.md` (and `archive/`).
|
|
8
|
+
- **Operation:** `forge session.audit [--session <id>] [--check] [--relabel] [--deep] [--window <n>]` runs deterministic Stage-A detectors: AUDIT-10 circumvention, AUDIT-11 blocker deception, AUDIT-12 generated-file edits, AUDIT-13 denied retry, AUDIT-14 false completion claims; AUDIT-01/02 report coverage caveats.
|
|
9
|
+
- **Output:** one `docs/sessions/audit/<id>.audit.yaml` sidecar per session; `forge session.audit.report` aggregates per-rule frequency and verdict distribution into `docs/metrics/session-audit.generated.yaml`.
|
|
10
|
+
- **Human decision:** an AUDIT-14 finding is a signal to re-review that session's diff — a detector, not a verdict. Expect false positives on unusual-but-legitimate sessions; the point is that "the agent says it's done" stops being the only evidence.
|
|
11
|
+
|
|
12
|
+
## Trajectory memory — reuse procedures that worked
|
|
13
|
+
|
|
14
|
+
- **Input:** GREEN-verified sessions only — admission happens at extraction, so non-green sessions produce nothing.
|
|
15
|
+
- **Operation:** `forge trajectory.index` extracts procedure units into `docs/.index/trajectory/units.yaml`; `forge trajectory.recall --task "<desc>" [--paths <glob>] [--k <n>]` returns top-k units by situation similarity for a new task.
|
|
16
|
+
- **Output:** ranked procedure candidates, journaled to `docs/.index/trajectory/recalls.jsonl`.
|
|
17
|
+
- **Human decision:** after applying a recalled procedure, record the outcome — `forge trajectory.outcome.record --recall <id> --helped|--hurt [--note <text>]` — so `utilityScore` re-ranking and `producerTrust` decay stale knowledge instead of trusting it forever.
|
|
18
|
+
|
|
19
|
+
## Context assembly — a bounded, cited context slate
|
|
20
|
+
|
|
21
|
+
- **Input:** `docs/.index/context/index.yaml`, rebuilt by `forge context.index.build` — a pure-projection unit catalog (session-block, knowledge-entry, friction, remediation, rfc-header, adr-header, skill-manifest, handoff, decision); dropping the directory and rebuilding is the supported reset.
|
|
22
|
+
- **Operation:** `forge context.assemble --task "<desc>" [--budget <tokens>] [--paths <glob>] [--auto-index] [--format markdown]` ranks units by lexical overlap + recency + kind weight + path overlap.
|
|
23
|
+
- **Output:** a budgeted slate where every unit cites its source and ranking reasons. `forge context.slate.eval` scores recall@budget against the `docs/context-devset/` task→requiredUnits pairs — the completeness metric and the regression gate for ranker changes.
|
|
24
|
+
- **Human decision:** read the slate before delegating; a missing unit means the index lacks that source kind, not that the ranker failed.
|
|
25
|
+
|
|
26
|
+
## Gate probes — prove the gate still fires
|
|
27
|
+
|
|
28
|
+
- **Input:** declared probe fixtures bound to a rule or contract; `forge gate.probe.catalog` lists per-contract coverage, unprobed error-severity rules (PROBE-03), and stale fixture bindings (PROBE-05).
|
|
29
|
+
- **Operation:** `forge gate.probe --rule <id> | --contract <id> | --all | --list` injects the declared violation at its real workspace path — backup → invoke the check → restore.
|
|
30
|
+
- **Output:** pass/fail per probe: the gate fired on its real scan path, or it silently stopped protecting the rule.
|
|
31
|
+
- **Human decision:** a failed probe means the gate is dead code — fix the wiring before trusting that check's green.
|
|
32
|
+
|
|
33
|
+
## Conformance — producer→consumer contracts
|
|
34
|
+
|
|
35
|
+
- **Input:** a declared contract surface between a producer and a consumer.
|
|
36
|
+
- **Operation:** `forge conformance.run` executes the consumer's conformance validator against the producer artifact; `forge conformance.validate` checks the declaration itself.
|
|
37
|
+
- **Output:** a conformance report — the contract satisfied, or a named violation.
|
|
38
|
+
- **Human decision:** a unit test checks intent inside one codebase; conformance checks the boundary two codebases agreed on. A red report blocks the consumer's release of that surface.
|
|
39
|
+
|
|
40
|
+
## Agent operating model — the shared behavior contract
|
|
41
|
+
|
|
42
|
+
- **Input:** `skills/_shared/agent-operating-model.md`, shipped as a shared skill and synced to consumers by `forge upgrade`.
|
|
43
|
+
- **Operation:** instructs agents on work modes (EXPLORE / ROUTINE / GOVERNED), authority boundaries (the operator owns intent and significant decisions; the agent owns implementation inside them and escalates rather than guesses at a boundary), a proportionate verification portfolio (rigor scales to risk — tests are one tool, not a mandatory-TDD rule), and separated completion vocabulary.
|
|
44
|
+
- **Output:** behavioral **instructions** — the model tells the agent to report IMPLEMENTED / VERIFIED / ACCEPTED / RELEASED separately, so a claim never outruns its evidence.
|
|
45
|
+
- **Human decision:** the model governs how the agent reports; whether the report is true is what the validators above exist to check.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Devin integration
|
|
2
|
+
|
|
3
|
+
Forge's contract is plain files in the repository — `forge.yaml`, `AGENTS.md`, `.agents/skills/<name>/SKILL.md`, RFCs — and Devin reads these formats natively. No adapter, plugin, or hosted service is required.
|
|
4
|
+
|
|
5
|
+
> **Status:** verified against Devin's published conventions — Devin CLI reads `AGENTS.md` as always-on project rules and discovers `.agents/skills/<name>/SKILL.md` under the agents skills standard. An end-to-end public example is planned; this page marks what is verified and what is not.
|
|
6
|
+
|
|
7
|
+
## Install Forge for a Devin session
|
|
8
|
+
|
|
9
|
+
Inside the repository where Devin will work:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm dlx @warpgogol/forge@latest create --in-place --profile typescript
|
|
13
|
+
# or, in an existing project: pnpm add -D @warpgogol/forge && pnpm exec forge init
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This writes `forge.yaml`, generates `AGENTS.md`, and deploys skills to `.agents/skills/`:
|
|
17
|
+
|
|
18
|
+
- **`AGENTS.md`** — loaded by Devin as always-on project rules. Keep it concise: Devin's guidance pushes heavier instruction sets into skills, which matches Forge's layout (rules in `AGENTS.md`, workflows in `.agents/skills/`).
|
|
19
|
+
- **`.agents/skills/<name>/SKILL.md`** — discovered by Devin CLI; no conversion needed.
|
|
20
|
+
- **The `forge` CLI** — invoked like any repo command: `pnpm exec forge doctor`, `pnpm exec forge rfc.validate`, etc.
|
|
21
|
+
|
|
22
|
+
**Devin CLI vs Devin Cloud.** The conventions above are verified for Devin CLI. Devin Cloud sessions run inside a prepared environment: install Forge in the environment setup (e.g. `pnpm install` in the snapshot/blueprint) so the `forge` binary and `.agents/skills/` exist before the session starts. Do not assume identical behavior until verified — Node version and package-manager availability are the usual failure points.
|
|
23
|
+
|
|
24
|
+
## One task, end to end
|
|
25
|
+
|
|
26
|
+
Example: ask Devin to change a validator without breaking an architectural contract.
|
|
27
|
+
|
|
28
|
+
1. **Devin reads** `AGENTS.md` and the relevant skills — learns the contract (which invariants the change must satisfy) and the verification commands (`forge rfc.validate`, `pnpm test`).
|
|
29
|
+
2. **Devin implements** the change and opens a PR.
|
|
30
|
+
3. **CI runs the repo's checks independently of the agent's self-assessment** — unit tests plus `forge` validators (naming, compass, RFC lifecycle).
|
|
31
|
+
4. **Green** → human review. **Red** → the finding names the violated rule; Devin fixes and reruns.
|
|
32
|
+
|
|
33
|
+
The important property: Forge's checks run outside the agent's reasoning. A PR passes because deterministic validators pass — not because the agent reports done.
|
|
34
|
+
|
|
35
|
+
## Division of responsibility
|
|
36
|
+
|
|
37
|
+
| Devin | Forge |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| Analyzes the codebase, writes code, opens PRs | Holds the project contract and instructions |
|
|
40
|
+
| Uses its own memory and skills | Provides portable, versioned skills and workflows |
|
|
41
|
+
| Verifies its own work | Adds independent deterministic checks |
|
|
42
|
+
| Decides a session is done | Reports IMPLEMENTED / VERIFIED / ACCEPTED separately — claims never outrun evidence |
|
|
43
|
+
|
|
44
|
+
## What Forge does not do
|
|
45
|
+
|
|
46
|
+
- Does not change Devin's reasoning, planning, or model.
|
|
47
|
+
- Does not guarantee semantic correctness — validators check declared conditions only.
|
|
48
|
+
- Does not enforce anything by itself. A validator that CI does not run is a report, not a gate — wire `forge` checks into CI or hooks for enforcement. See [the verification model](../concepts/verification-model.md).
|
|
49
|
+
- Does not require or provide a hosted service — everything is files in the repo.
|
|
50
|
+
|
|
51
|
+
## Reference experiment (planned)
|
|
52
|
+
|
|
53
|
+
The claim worth proving is not "Forge works" but "Forge's checks catch what the agent's self-assessment misses." The experiment we intend to publish:
|
|
54
|
+
|
|
55
|
+
1. **Setup** — a clean TypeScript repo with Forge installed; versions, commit SHA and environment pinned.
|
|
56
|
+
2. **Task** — Devin receives a change to an API module with explicit acceptance criteria and one architectural constraint.
|
|
57
|
+
3. **Violation** — one candidate change breaks the declared contract; a Forge validator must detect it independently of Devin's self-report.
|
|
58
|
+
4. **Correction** — Devin receives the validator output, fixes the code, and CI reruns green.
|
|
59
|
+
5. **Evidence** — task text, commits, diffs, validator logs, and run cost are published for independent reproduction.
|
|
60
|
+
|
|
61
|
+
Success criterion: a third party can repeat the scenario and see which contract prevented the incorrect change from being accepted. A follow-up comparison (same task class, Devin with vs. without Forge) measures accepted-change rate, contract violations, manual rework and cost per accepted task — not impressions.
|
|
62
|
+
|
|
63
|
+
Status: **planned, not yet run.** This section will link the published artifacts when the experiment lands; until then it describes the protocol, not a result. See also the [grant proposal](../grants/devin-startups.md) where this experiment is a funded milestone.
|
package/docs/reference/cli.md
CHANGED
|
@@ -16,9 +16,12 @@ forge build
|
|
|
16
16
|
```sh
|
|
17
17
|
forge skill.validate
|
|
18
18
|
forge skill.list
|
|
19
|
+
forge skill.doc-sync [--write] [--files <csv>] [--root <dir>]
|
|
19
20
|
forge agents.generate
|
|
20
21
|
```
|
|
21
22
|
|
|
23
|
+
`forge skill.doc-sync` derives skill counts and inventory tables in docs from `FORGE_SKILLS` (in the werkstatt monorepo: `werkstatt run forge.skill.doc-sync`). `--write` re-renders paired `forge:skills-count` / `forge:skills-inventory` HTML-comment marker regions in place; the default check mode fails on marked-region drift and on skill-count claims outside markers that contradict the registry (exempt intentional claims with a same-line `forge-skill-count:ok` comment). Scans `README*.md`, `AGENTS.md`, and `docs/**/*.md` minus record trees; `forge.package.health` composes the same check as PKG-HEALTH-13.
|
|
24
|
+
|
|
22
25
|
## RFC
|
|
23
26
|
|
|
24
27
|
```sh
|
|
@@ -120,6 +123,14 @@ forge session.audit.report
|
|
|
120
123
|
forge metrics.aggregate
|
|
121
124
|
```
|
|
122
125
|
|
|
126
|
+
## Codebase measurement (RFC-1581)
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
forge codebase.measure [--json] [--out <path>]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Read-only `git ls-files` measurement: categorized line counts (`code`/`tests`/`docs`/`generated`), per-language code/comment/blank lines, AST-derived class/function/method counts for the TS/JS family, and top directories by code lines. `--json` returns the full structured measure; `--out` writes a dated YAML snapshot to an explicit path (the command's only write). See [fleet measurement methodology](fleet-measurement.md).
|
|
133
|
+
|
|
123
134
|
## Docs
|
|
124
135
|
|
|
125
136
|
```sh
|
|
@@ -271,6 +282,6 @@ forge note.orphan.detect
|
|
|
271
282
|
|
|
272
283
|
## Registered command surface
|
|
273
284
|
|
|
274
|
-
Canonical registry names (
|
|
285
|
+
Canonical registry names not covered in the usage sections above (the live list is generated from the command registry — run `forge --help` for what your installed build exposes):
|
|
275
286
|
|
|
276
|
-
`audit.archive`, `file.size.lint`, `flow.publication.retire`, `flow.status`, `flow.version`, `forge.assets.check`, `forge.assets.list`, `forge.build`, `forge.conformance.run`, `forge.conformance.validate`, `forge.create`, `forge.determinism.check`, `forge.dev`, `forge.doctor`, `forge.port.scaffold`, `forge.port.validate`, `forge.profile.validate`, `forge.public-surface.validate`, `forge.release.prepare`, `forge.release.publish`, `forge.scaffold`, `forge.skill.knowledge.compact`, `forge.skill.list`, `forge.skill.validate`, `forge.validate`, `memory.compact`, `mission.archive`, `outbox.validate`, `plan.archive`, `spec.live.rebuild`, `system.map.validate`, `system.outbox.scan`, `system.task.collect`, `system.task.create`, `system.task.dispatch`, `system.task.move`, `system.task.status`, `system.versionset.record`.
|
|
287
|
+
`audit.archive`, `file.size.lint`, `flow.publication.retire`, `flow.status`, `flow.version`, `forge.assets.check`, `forge.assets.list`, `forge.build`, `forge.conformance.run`, `forge.conformance.validate`, `forge.create`, `forge.determinism.check`, `forge.dev`, `forge.doctor`, `forge.port.scaffold`, `forge.port.validate`, `forge.profile.validate`, `forge.public-surface.validate`, `forge.release.prepare`, `forge.release.publish`, `forge.scaffold`, `forge.skill.doc-sync`, `forge.skill.knowledge.compact`, `forge.skill.list`, `forge.skill.validate`, `forge.validate`, `gate.run.status`, `memory.compact`, `mission.archive`, `outbox.validate`, `plan.archive`, `spec.live.rebuild`, `system.map.validate`, `system.outbox.scan`, `system.task.collect`, `system.task.create`, `system.task.dispatch`, `system.task.move`, `system.task.status`, `system.versionset.record`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Fleet measurement methodology
|
|
2
|
+
|
|
3
|
+
The README's "Forged in production" table is produced by `forge codebase.measure` (RFC-1581) — Forge's own measurement command — run over each repository's git-tracked files at develop tip on 2026-11-13.
|
|
4
|
+
|
|
5
|
+
## What is measured
|
|
6
|
+
|
|
7
|
+
- **Scope:** `git ls-files` — tracked files only.
|
|
8
|
+
- **Classification:** every tracked line lands in exactly one category — `code`, `tests`, `docs`, or `generated`. `Total` in the README table is their sum; generated, vendored and mirrored content is classified separately, never silently merged into `code`.
|
|
9
|
+
- **Lines:** per-language code / comment / blank counts.
|
|
10
|
+
- **Symbols:** a real AST pass — the TypeScript compiler is resolved lazily from the measured workspace, so class/function/method counts come from the compiler, not regexes. Where a workspace resolves a compiler the walker cannot use, the command reports `symbolsSkipped` instead of estimating.
|
|
11
|
+
- **Exclusions:** export mirrors and deployment caches are excluded to avoid double counting the same source.
|
|
12
|
+
|
|
13
|
+
## Reproduce
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
pnpm exec forge codebase.measure --json # full structured result
|
|
17
|
+
pnpm exec forge codebase.measure --out <file.yaml> # dated YAML snapshot
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`--out` is the command's only write; without it the run is read-only.
|
|
21
|
+
|
|
22
|
+
## Worked example
|
|
23
|
+
|
|
24
|
+
`codebase.measure --json` over the werkstatt monorepo, 2026-11-14 (develop tip, trimmed to structure):
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"command": "codebase.measure",
|
|
29
|
+
"status": "ok",
|
|
30
|
+
"repo": "werkstatt",
|
|
31
|
+
"totals": {
|
|
32
|
+
"code": { "files": 6612, "code": 812595 },
|
|
33
|
+
"tests": { "files": 2710, "code": 353483 },
|
|
34
|
+
"docs": { "files": 3836, "code": 234971 },
|
|
35
|
+
"generated": { "files": 951, "code": 346409 }
|
|
36
|
+
},
|
|
37
|
+
"binaryFiles": 36,
|
|
38
|
+
"measuredAt": "2026-11-14T05:40:44.176Z"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The full result also carries `languages`, `topDirs`, `symbolsSkipped`, `exclusions`, and `nextSteps`. Numbers drift between measurement days as the fleet changes — the README table states its own measurement date.
|
|
43
|
+
|
|
44
|
+
## Limitations
|
|
45
|
+
|
|
46
|
+
- **Self-measured.** The numbers come from Forge's own instrument over private repositories — an instrument reading, not an independent audit.
|
|
47
|
+
- **Lines are not outcomes.** Scale demonstrates that Forge operates on real systems; it does not by itself prove governance quality.
|
|
48
|
+
- **Revisions move.** Repositories evolve; rerun the command for current numbers.
|
|
49
|
+
|
|
50
|
+
## Observed outcome (one concrete example)
|
|
51
|
+
|
|
52
|
+
Scale aside, do the gates catch anything? `forge gate.probe` exists to answer exactly that — it seeds a declared violation at the real workspace path and proves the gate still fires (see [the scenario guide](../guides/verification-and-evidence.md#gate-probes--prove-the-gate-still-fires)). Inside the fleet, friction records document real catches — e.g. F-0208: a refused commit left `git add` residue staged in the index, which the next gate run surfaced instead of silently inheriting. The catch came from a validator refusing, not from an agent noticing.
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
# Programmatic API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@warpgogol/forge` exposes module factories, config helpers, the skill registry, and canonical types from its package root. Modules expose `commands` and `pipelines` arrays directly — read them; you do not need a registry object.
|
|
4
|
+
|
|
5
|
+
## A complete working example
|
|
6
|
+
|
|
7
|
+
This snippet compiles against the published API surface:
|
|
4
8
|
|
|
5
9
|
```ts
|
|
6
10
|
import {
|
|
7
|
-
|
|
8
|
-
forgeRfcModule,
|
|
9
|
-
forgeAdrModule,
|
|
10
|
-
forgeNamingModule,
|
|
11
|
-
forgeCompassModule,
|
|
12
|
-
forgeWorkflowModule,
|
|
13
|
-
forgeSpecModule,
|
|
14
|
-
forgeSessionModule,
|
|
15
|
-
forgePluginModule,
|
|
16
|
-
forgeProgramModule,
|
|
11
|
+
createForgeRfcModule,
|
|
17
12
|
loadForgeConfig,
|
|
18
|
-
resolveBinding,
|
|
19
13
|
FORGE_SKILLS,
|
|
14
|
+
type ForgeLogger,
|
|
15
|
+
type ForgeRuntimeContext,
|
|
20
16
|
} from "@warpgogol/forge";
|
|
17
|
+
|
|
18
|
+
const logger: ForgeLogger = {
|
|
19
|
+
section: console.log,
|
|
20
|
+
info: console.log,
|
|
21
|
+
warn: console.warn,
|
|
22
|
+
error: console.error,
|
|
23
|
+
success: console.log,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const context: ForgeRuntimeContext = {
|
|
27
|
+
workspaceRoot: process.cwd(),
|
|
28
|
+
logger,
|
|
29
|
+
dryRun: false,
|
|
30
|
+
outputFormat: "json",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const rfcModule = await createForgeRfcModule();
|
|
34
|
+
const rfcValidate = rfcModule.commands.find((c) => c.name === "rfc.validate");
|
|
35
|
+
|
|
36
|
+
const result = await rfcValidate?.execute({ argv: [], flags: {} }, context);
|
|
37
|
+
console.log(result?.exitCode); // 0 = pass, 1 = fail
|
|
21
38
|
```
|
|
22
39
|
|
|
23
40
|
## Loading config
|
|
@@ -37,38 +54,50 @@ const cmd = resolveBinding(config, "commands.validateRfc", { id: "RFC-0001" });
|
|
|
37
54
|
|
|
38
55
|
Placeholders in binding strings are substituted with the provided values.
|
|
39
56
|
|
|
40
|
-
##
|
|
57
|
+
## Invoking commands
|
|
41
58
|
|
|
42
|
-
|
|
43
|
-
const registry = /* your ForgeModuleRegistry */;
|
|
59
|
+
Each `ForgeCommandDefinition` carries `name`, `flags`, `reads`/`writes` declarations, and `execute(input, context)`:
|
|
44
60
|
|
|
45
|
-
|
|
46
|
-
await
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
```ts
|
|
62
|
+
const result = await command.execute(
|
|
63
|
+
{ argv: ["--json"], flags: { json: true } },
|
|
64
|
+
context,
|
|
65
|
+
);
|
|
50
66
|
```
|
|
51
67
|
|
|
52
|
-
|
|
68
|
+
`ForgeCommandResult` carries `exitCode` (0/1), `summary`, optional `data`, `nextSteps`, and `timing`. Handlers must degrade cleanly when optional context ports (`commandRegistry`, `io`, `invoke`) are absent — under the standalone CLI, `io` and `invoke` are not populated.
|
|
69
|
+
|
|
70
|
+
`ForgeModuleRegistry` (`registerCommand`/`registerPipeline`) is the collection interface the standalone `forge` CLI builds internally — consumers read `module.commands` / `module.pipelines` instead of implementing it.
|
|
53
71
|
|
|
54
|
-
##
|
|
72
|
+
## Exported modules
|
|
55
73
|
|
|
56
|
-
|
|
74
|
+
Factories return `Promise<ForgeModule>`; `forgeCompassModule`, `forgeWerkstattModule` and `forgePluginModule` are exported consts.
|
|
75
|
+
|
|
76
|
+
| Module | Command surface (canonical names; the CLI also resolves the unqualified spelling) |
|
|
57
77
|
| --- | --- |
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
78
|
+
| `createForgeCoreModule` | `forge.create`, `forge.init`, `forge.scaffold`, `forge.doctor`, `forge.upgrade`, `forge.validate`, `forge.dev`, `forge.build`, `forge.skill.*`, `forge.agents.generate`, `forge.profile.validate`, `forge.port.*`, `forge.public-surface.validate`, `forge.autonomy.validate`, `forge.package.health`, `forge.release.*`, `forge.determinism.check`, `forge.assets.*`, `docs.archive`, `memory.compact`, `pinned.*`, `file.size.lint` |
|
|
79
|
+
| `createForgeRfcModule` | `rfc.list`, `rfc.create`, `rfc.validate`, `rfc.next-id`, `rfc.check`, `rfc.archive`, `rfc.acceptance.run`, `rfc.verification.*`, `rfc.implement.stamp`, `rfc.evidence.sync`, `rfc.verify.workspace`, `rfc.supersede.propose`, `rfc.index.*`, `rfc.graph`, `rfc.decision-log.generate`, `rfc.dna.trace.*`, `rfc.pipeline.status`, `rfc.command-lifecycle.validate` |
|
|
80
|
+
| `createForgeAdrModule` | `adr.list`, `adr.create`, `adr.validate`, `adr.archive`, `adr.implement.stamp` |
|
|
81
|
+
| `createForgePlanModule` | `plan.archive` |
|
|
82
|
+
| `createForgeAuditModule` | `audit.archive` |
|
|
83
|
+
| `createForgeMissionModule` | `mission.archive` |
|
|
84
|
+
| `createForgeSpecModule` | `spec.validate`, `spec.status`, `spec.materialize`, `spec.live.list`, `spec.live.show`, `spec.live.validate`, `spec.live.merge`, `spec.live.rebuild` |
|
|
85
|
+
| `createForgeProgramModule` | `program.packet.validate`, `program.packet.seal`, `program.packet.lease`, `program.packet.complete` |
|
|
66
86
|
| `forgePluginModule` | `forge.plugin.validate`, `forge.plugin.discover` |
|
|
67
|
-
| `
|
|
87
|
+
| `createForgeWorkflowModule` | `workflow.lint`, `workflow.list` |
|
|
88
|
+
| `createForgeNamingModule` | `naming.convention.lint` |
|
|
89
|
+
| `forgeCompassModule` | `compass.inventory`, `compass.validate`, `compass.summary.trim`, `compass.docs.scaffold`, `compass.docs.validate`, `compass.header.scaffold`, `compass.migrate`, `compass.invariants.generate`, `compass.audit.*` |
|
|
90
|
+
| `forgeWerkstattModule` | `werkstatt.lock.status`, `werkstatt.lock.recover`, `werkstatt.operation.validate` |
|
|
91
|
+
| `createForgeExplorationModule` | `exploration.list`, `exploration.show`, `exploration.archive` |
|
|
92
|
+
| `createForgeNotesModule` | `note.link.validate`, `note.frontmatter.validate`, `note.orphan.detect` |
|
|
93
|
+
| `createForgeFlowModule` | `flow.open`, `flow.check`, `flow.integrate`, `flow.discard`, `flow.fix`, `flow.digest`, `flow.push`, `flow.cut`, `flow.hold`, `flow.unhold`, `flow.backmerge`, `flow.install`, `flow.status`, `flow.peers`, `flow.version`, `flow.publication.retire` |
|
|
94
|
+
| `createForgeSystemModule` | `system.map.validate`, `system.outbox.scan`, `system.task.*`, `system.versionset.record`, `outbox.validate` |
|
|
95
|
+
|
|
96
|
+
Internal modules loaded by the standalone CLI (session, context, trajectory, gate, conformance, correctness, codebase, and others) are not part of the package's public export surface — drive them through the `forge` CLI rather than imports.
|
|
68
97
|
|
|
69
98
|
## FORGE_SKILLS
|
|
70
99
|
|
|
71
|
-
|
|
100
|
+
`FORGE_SKILLS` is the discovered skill registry — one `ForgeSkillEntry` (name + parsed frontmatter) per `SKILL.md` under `skills/` (`FORGE_SKILLS.length` tracks the shipped count, currently 41).
|
|
72
101
|
|
|
73
102
|
```ts
|
|
74
103
|
import { FORGE_SKILLS } from "@warpgogol/forge";
|