Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,10 @@ as the `collide_check` MCP tool.

**Machine-owned doc surfaces (`src/docs_render.js`, `forge docs render`).** The
auto-maintenance layer that keeps tables and diagrams in sync with the code registries.
Four marker-managed blocks (commands table in README, groups and MCP-tools tables in GUIDE,
repo-map diagram in ARCHITECTURE) are regenerated from `COMMANDS`/`GROUPS`/`TOOLS`; six
Five marker-managed blocks (commands table in README, groups and MCP-tools tables in GUIDE,
repo-map diagram in ARCHITECTURE, and the Mintlify changelog page, rendered from
`CHANGELOG.md` by `src/changelog_page.js` between MDX-safe JSX-comment markers) are
regenerated from `COMMANDS`/`GROUPS`/`TOOLS`/`CHANGELOG.md`; six
"N MCP tools" count phrases are auto-corrected; and every mermaid block across all `.md`
and `.mdx` files receives the branded `%%{init` theme. Registry-derived blocks are CI-gated
errors when stale; tree-derived output is advisory.
Expand Down Expand Up @@ -675,22 +677,22 @@ from the tree it describes.
```mermaid
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','edgeLabelBackground':'#201a15','clusterBkg':'#171310','clusterBorder':'#4a3b2e','fontFamily':'ui-sans-serif, system-ui, sans-serif','fontSize':'14px'},'flowchart':{'curve':'basis','padding':10,'nodeSpacing':36,'rankSpacing':44}}}%%
flowchart LR
test["test<br/>133 files"]
src["src<br/>119 files"]
test["test<br/>134 files"]
src["src<br/>120 files"]
landing["landing<br/>61 files"]
research["research<br/>37 files"]
bench["bench<br/>6 files"]
global["global<br/>5 files"]
scripts["scripts<br/>3 files"]
docs["docs<br/>1 file"]
examples["examples<br/>1 file"]
test -- 281 --> src
test -- 284 --> src
bench -- 12 --> src
examples -- 4 --> src
scripts -- 3 --> src
test -- 3 --> global
test -- 3 --> scripts
test -- 2 --> bench
scripts --> src
src --> global
```
<!-- forge:render:repo-map:end -->
86 changes: 64 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,44 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Security

- **The claim-registry table escapes backslashes, and four patterns no longer backtrack
quadratically on long runs (CodeQL).** `scripts/claims-status.mjs` escaped `|` in table
cells but not `\`, so a trailing backslash could undo an escape (`js/incomplete-sanitization`,
high). The model-catalog tokenizer's trailing `.0` collapse and its URL trim (`js/polynomial-redos`,
high, pre-existing), the workspace-glob trim and the semantic guard's edge-punctuation trim now
use linear scans with identical results (checked against the old regexes).

### Fixed

- **`forge docs check` and `forge docs render` work on a Windows checkout.** With
`core.autocrlf`, Markdown checks out with CRLF line endings while generated blocks render
with LF, so every generated block read as stale and a render wrote LF lines into a CRLF
file. Blocks are now compared in LF and written back in the file's own line endings.

### Added

- **The docs site's changelog page is generated from `CHANGELOG.md`.** It had one hand-written
entry from July while thirty releases shipped. `forge docs render` now writes every release,
plus `[Unreleased]`, as a Mintlify `<Update>` entry with each change's headline, filter tags
and a link to its full notes (`src/changelog_page.js`, between MDX-safe JSX-comment markers).
`forge docs check` fails when the page is stale, and `scripts/bump.mjs` regenerates it in the
release commit.

### Documentation

- **The Mintlify reference pages describe the current behavior** of `forge verify` (per-package
coverage, pre/post binding, verifier events), `forge stack` (`available` runners),
`forge context` (what `COMPLETE` means, `--block`), `forge reuse` and `forge ledger`
(lossless keys, serve-time revalidation, one vote per event, archive reasons, conflicts,
`--fix --dry-run`), `forge dash` (Host check, session token) and the universal router, which
the site did not document at all. The landing page lists all ten native targets (OpenClaw was
missing).
- **Two historical `CHANGELOG.md` entries are corrected.** 1.1.2 called the project's own
second-machine re-run an independent replication (now marked as a dated correction), and 1.0.0
had lost the `\r\n` / `\n` escapes inside two code spans.

## [1.5.0] - 2026-09-26

### Changed
Expand Down Expand Up @@ -127,7 +165,7 @@ evidence behind it. Scripts that read the JSON output may need to adapt:

### Added

- `bench/universal-router/reproduce.sh` rebuilds the shipped router prior from pinned,
- **`bench/universal-router/reproduce.sh` rebuilds the shipped router prior** from pinned,
sha256-checked public inputs (`sources.json`). The refit reproduces `data/router_prior.json`
exactly: all 176 fitted values, with only `fittedAt` different (Node v22.22.2, about 7 minutes
on 4 vCPUs). `holdout_eval.mjs` is a new seeded 150/350 held-out experiment. It is not a
Expand All @@ -146,20 +184,23 @@ evidence behind it. Scripts that read the JSON output may need to adapt:

### Documentation

- A machine-readable claim/status registry (`docs/status/claims.json`, 47 claims assessed
- **A machine-readable claim/status registry** (`docs/status/claims.json`, 47 claims assessed
against `d2abfa6`), with a generated table in `docs/status/README.md`. `node
scripts/claims-status.mjs --check`, now part of the CI quality gate, fails when the registry
is invalid, the table is stale, or a `docs/cognitive-substrate/` copy has drifted from its
`research/` source.
- `docs/INTEGRATIONS.md`: for every supported tool, config emission, MCP registration,
automatic hooks and enforcement are listed separately, each marked tested, declared or not
supported. It also records which registry models have provider ids, with a date.
- Universal router docs. The run-4 held-out headline is labeled repository-reported. The
shipped prior's refit is documented as reproduced exactly in this repository. The new
held-out replay is documented, as are the modeling limits: cascade cost under-predicted by
5–22%, optimistic targets, and budgets that bound only expected cost. The dataset pin is
corrected to `SWE-bench/SWE-bench_Verified@78f471b`.
- Research corrections (2026-09-26) in the synthesis, the preprint and the white paper:
- **`docs/INTEGRATIONS.md` lists what each tool really gets.** For every supported tool,
config emission, MCP registration, automatic hooks and enforcement are listed separately,
each marked tested, declared or not supported. It also records which registry models have
provider ids, with a date.
- **Universal router docs separate what is measured from what is only reported.** The run-4
held-out headline is labeled repository-reported. The shipped prior's refit is documented as
reproduced exactly in this repository. The new held-out replay is documented, as are the
modeling limits: cascade cost under-predicted by 5–22%, optimistic targets, and budgets that
bound only expected cost. The dataset pin is corrected to
`SWE-bench/SWE-bench_Verified@78f471b`.
- **The research papers carry dated corrections (2026-09-26).** In the synthesis, the preprint
and the white paper:
- Theorem D: joint attainability, with a counterexample.
- The equality condition of the silent-miss bound.
- "A caught miss is not a completed task."
Expand All @@ -169,13 +210,13 @@ evidence behind it. Scripts that read the JSON output may need to adapt:

`research/recompute_corrections.py --theorem-checks` asserts the Theorem D checks without
data, and the recomputation also prints macro F1.
- Evidence grades are split into bibliographic verification, claim support, study design,
- **Evidence grades are split** into bibliographic verification, claim support, study design,
independent replication and transfer scope. METR's slowdown result is scoped to its
16-developer, early-2025 study, with a link to the February 2026 update.
- The Qur'anic lens labels the Arabic source text, the translation, tafsir and the author's
design analogy separately, and states what the lens does and does not establish. No Arabic
text or translation was changed.
- The research PDFs are marked as historical, pre-correction editions and recorded in
- **The Qur'anic lens labels its layers separately:** the Arabic source text, the
translation, tafsir and the author's design analogy. It states what the lens does and does
not establish. No Arabic text or translation was changed.
- **The research PDFs are marked as historical, pre-correction editions** and recorded in
`research/HISTORICAL_EDITIONS.md` (git blob, sha256, pinned commit, figure map, render
recipe). They were not re-rendered: the Qur'anic text in a fresh render could not be
verified, and the refutation paper needs a TeX toolchain.
Expand Down Expand Up @@ -475,8 +516,11 @@ evidence behind it. Scripts that read the JSON output may need to adapt:

### Added

- **The universal router's benchmark is independently replicated.** harness-bench run 4 was
re-run from the pinned public data (SWE-bench Verified `78f471b`, SWE-bench/experiments
- **The universal router's benchmark was re-run by the project on a second machine.**
_(Corrected 2026-09-26: this entry first said "independently replicated". A re-run by the
project itself is not an independent replication, and the held-out harness lives outside this
repository; see [docs/UNIVERSAL_ROUTING.md](docs/UNIVERSAL_ROUTING.md).)_ harness-bench run 4
was re-run from the pinned public data (SWE-bench Verified `78f471b`, SWE-bench/experiments
`40f164d`) on a second machine. Results:
- **Split:** the same 150/350 split.
- **Held-out test:** 217 of 218 metrics identical, with only wall-clock fit time differing.
Expand Down Expand Up @@ -636,10 +680,8 @@ evidence behind it. Scripts that read the JSON output may need to adapt:

### Fixed

- **A claim minted before the CRLF fold is migrated, not deleted.** Folding `
` into
`
` changes a claim's content address, so a claim written by an earlier version on a
- **A claim minted before the CRLF fold is migrated, not deleted.** Folding `\r\n` into
`\n` changes a claim's content address, so a claim written by an earlier version on a
Windows checkout carried the pre-fold address in its filename and failed its own address
check on load — `loadClaims` returned nothing for it, and `forge ledger verify` reported
it as an id mismatch. The read path now accepts the pre-fold address as well, so the
Expand Down
6 changes: 5 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Stack

- Node.js >=20, pure ESM (`"type": "module"`), zero runtime dependencies.
- Linter/formatter: Biome 2.5.5 (dev dependency).
- Linter/formatter: Biome 2.5.13 (dev dependency; `npx biome migrate --write` after an upgrade).
- Types: TypeScript via JSDoc annotations — no `.ts` files, checked by `tsc`.

## Commands
Expand All @@ -24,4 +24,8 @@
- Run `npm test && npx biome check && npm run typecheck && node src/cli.js docs check`
before committing — the docs check fails CI when commands/env vars/MCP tools/CHANGELOG
drift from the code, so update docs IN THE SAME CHANGE, not later.
- After editing `CHANGELOG.md` (or commands/MCP tools), run `node src/cli.js docs render`:
it regenerates the machine-owned blocks, including the Mintlify changelog page
(`mintlify/changelog/overview.mdx`), which the docs check fails on when stale. Never edit
between `forge:render` markers by hand.
- Version lives in `package.json` — `scripts/bump.mjs` keeps all manifests in sync.
4 changes: 2 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.2/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"ignoreUnknown": true,
Expand All @@ -22,7 +22,7 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"preset": "recommended",
"suspicious": {
"noAssignInExpressions": "off"
}
Expand Down
10 changes: 8 additions & 2 deletions docs/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,12 @@ generated from the same registries the check reads, into marker-managed blocks
every diagram in every tracked markdown file re-themes (deliberate bad examples
opted out with `docs-check-ignore` are left alone);
- the repo map in `ARCHITECTURE.md` — drawn from the live import graph, so it cannot
drift from the tree it describes.
drift from the tree it describes;
- the docs site's changelog page (`mintlify/changelog/overview.mdx`) — from `CHANGELOG.md`:
every release, and the `[Unreleased]` work, as one Mintlify `<Update>` entry listing each
change's headline with a link to its full notes. An MDX page cannot hold HTML comments,
so its markers are JSX comments (`{/* forge:render:changelog:begin … */}`). A release
(`scripts/bump.mjs`) regenerates it in the release commit.

```console
$ forge docs render
Expand All @@ -594,7 +599,8 @@ $ forge docs render --check
reconciler in CI: a stale registry-derived block is an **error** whose message is the
fix (`run forge docs render`), while tree-derived output (the repo map, diagram theme)
is a warning — moving a file never fails an unrelated PR, but a new command with a
stale table always does.
stale table always does. The changelog page is an error too: edit `CHANGELOG.md`, then
run `forge docs render` in the same change.

### `forge docs sync` — which prose did this diff make stale?

Expand Down
Loading
Loading