Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
7dec999
fix(ci): restore the executable bit on global/guards/run.mjs
CodeWithJuber Sep 21, 2026
1a82388
docs: re-render the ARCHITECTURE.md repo-map block
CodeWithJuber Sep 21, 2026
49da2ef
fix(secrets): linear-time detection, close credential gaps, exempt in…
CodeWithJuber Sep 21, 2026
e4f499e
fix(consensus): make the verify --deep residual dependence-aware
CodeWithJuber Sep 21, 2026
4ef95d0
fix(ledger): torn log lines, NFC key canonicalization, MCP error replies
CodeWithJuber Sep 21, 2026
563dd6d
fix(commit-gate): fail closed when the staged diff cannot be read
CodeWithJuber Sep 21, 2026
2e9de1a
fix(predictor): let the pre-edit risk advisory reach "high"; tie-safe…
CodeWithJuber Sep 21, 2026
2bfe61c
fix(route): reconcile proposer bands band-to-band, gate on confidence…
CodeWithJuber Sep 21, 2026
6ffdbc6
fix(radar): score rings with a noisy-OR so clean signals stop dilutin…
CodeWithJuber Sep 21, 2026
99dd154
fix(preflight): judge the proposer verdict-to-verdict; unresolved ent…
CodeWithJuber Sep 21, 2026
d44d60d
fix(cortex): hand the Stop payload to the detached hook (C1)
CodeWithJuber Sep 21, 2026
f29fbb0
fix(ledger)!: evidence trust — only resolved refs lift val; serving a…
CodeWithJuber Sep 21, 2026
3ec18f5
docs(research): add a stdlib script that recomputes the review correc…
CodeWithJuber Sep 21, 2026
572afd8
docs(research): restate Theorem D as a bound and fix the synthesis's …
CodeWithJuber Sep 21, 2026
1a7cf0e
docs(research): tighten the refutation's statistics and add errata
CodeWithJuber Sep 21, 2026
32623df
docs(research): mark the whitepaper's refuted claims and fix its errors
CodeWithJuber Sep 21, 2026
81d75fa
docs: stop calling the impact graph conservative or 62% a saving
CodeWithJuber Sep 21, 2026
797adbb
fix(cost): price cache tokens, dedupe log lines, drop the lower-bound…
CodeWithJuber Sep 21, 2026
34ab867
docs(route): say plainly that llm.escalateTo is advisory and nothing …
CodeWithJuber Sep 21, 2026
5eb330a
fix(cortex): redact session hook logs and gitignore .forge/sessions (B5)
CodeWithJuber Sep 21, 2026
4845f93
fix(ledger-sync): push remote ⊔ local instead of the local verified view
CodeWithJuber Sep 21, 2026
81fbe05
fix(ledger-bridge): restoring a superseded fact value leaves a live fact
CodeWithJuber Sep 21, 2026
3fd765c
fix(rank,context): count only incidents as hazard; cut a source at it…
CodeWithJuber Sep 21, 2026
bcaeac4
fix(ledger): Eq. 3 retrieval — scope inside σ, unigram rel, Unicode, …
CodeWithJuber Sep 21, 2026
df1c5a3
fix(preflight): stop reading URLs, code fences and prose as code refe…
CodeWithJuber Sep 21, 2026
9e24b92
fix(util,embed): unicode-aware slug, NaN-safe clamp01, overflow-safe …
CodeWithJuber Sep 21, 2026
0ab3d15
docs(pages): headline the held-out routing result, not the refuted 62.1%
CodeWithJuber Sep 21, 2026
ee10a14
fix(ledger): sticky lesson activation, latched dormancy, and real pru…
CodeWithJuber Sep 21, 2026
99d86ff
fix(scope): one import resolver — masked lexing, every JS/TS form, Py…
CodeWithJuber Sep 21, 2026
54ff25f
fix(atlas): resolve imports, read only code, attribute calls to scope…
CodeWithJuber Sep 21, 2026
d1c60e7
fix(route): weigh task length once and require more than one shared w…
CodeWithJuber Sep 21, 2026
9790d9a
fix(merge-impact): terminal sibling/forward relations, and one clamp0…
CodeWithJuber Sep 21, 2026
e6e06ad
fix(cortex-features): whole-word fan-out and a churn window
CodeWithJuber Sep 21, 2026
c02d9a3
research(impact-oracle): ship the repaired v2 prototype, not the refu…
CodeWithJuber Sep 21, 2026
f80323a
docs(changelog): record the impact-graph repairs and their measured n…
CodeWithJuber Sep 21, 2026
b3cab9b
style(test): drop a useless escape in a scope assertion message
CodeWithJuber Sep 21, 2026
fee13d1
fix(reuse): exact/near compare task IDENTITY; Unicode specs; 32x4 LSH…
CodeWithJuber Sep 21, 2026
fab8e69
fix: balanced extractJson, parsed gateway versions, honest intent/rou…
CodeWithJuber Sep 21, 2026
8a5d551
docs(route): describe `route calibrate` as what it is — a hand-labell…
CodeWithJuber Sep 21, 2026
74001c2
fix(atlas): a method definition is not a call to a same-named functio…
CodeWithJuber Sep 21, 2026
feccf45
docs(changelog): refresh the impact numbers after the method-definiti…
CodeWithJuber Sep 21, 2026
c1f201f
fix(anchor,lean,cortex): per-checkpoint drift, persisted goal, untrac…
CodeWithJuber Sep 21, 2026
eb4dcf3
fix(guards): parse hook JSON with node, fail closed, cover Read (B6)
CodeWithJuber Sep 21, 2026
5f0615a
fix(gate): bind completion-gate evidence so the agent cannot mint it …
CodeWithJuber Sep 21, 2026
06a2f1f
fix(guards): make the cost governor govern and harden write a real de…
CodeWithJuber Sep 21, 2026
df002b3
perf(guards): read the common hook fields in one node pass
CodeWithJuber Sep 21, 2026
d0544ee
fix(guards): widen the secret-redact prefilter to the new detectors (B2)
CodeWithJuber Sep 21, 2026
eb5f2f0
fix(guards): only git's own options may sit between `git` and a subco…
CodeWithJuber Sep 21, 2026
e934a69
test(verify): assert the signer closes the unsigned-stamp gap
CodeWithJuber Sep 21, 2026
73d904a
test(guards): pin the narrowed allowlist and the governor's output ch…
CodeWithJuber Sep 21, 2026
e4fd089
fix(ledger,uiinteract): mergeable LEDGER.md, snapshot read cache, dat…
CodeWithJuber Sep 21, 2026
2167e33
Merge branch 'fix/review-primitives' into fix/deep-review
CodeWithJuber Sep 21, 2026
c521a78
Merge branch 'fix/review-impact' into fix/deep-review
CodeWithJuber Sep 21, 2026
db8c2d6
Merge branch 'fix/review-guards' into fix/deep-review
CodeWithJuber Sep 21, 2026
da1b443
Merge branch 'fix/review-routing' into fix/deep-review
CodeWithJuber Sep 21, 2026
1b64dc5
fix(brain,mcp): stop broadcasting refuted facts; report a refused rem…
CodeWithJuber Sep 21, 2026
a85de5f
fix(doctor,readme): stop advertising a jq fallback that no longer exists
CodeWithJuber Sep 21, 2026
5f9bd0d
fix(deja,cortex): a mentioned or exit-masked test command is not a te…
CodeWithJuber Sep 21, 2026
e407cef
Merge branch 'fix/review-memory' into fix/deep-review
CodeWithJuber Sep 21, 2026
745108a
chore(integration): re-render the repo map and format one merged test
CodeWithJuber Sep 21, 2026
6ebaf67
docs(cost-eval): restore the "not a bound" correction dropped in the …
CodeWithJuber Sep 21, 2026
fec7950
fix(recall): migrate a fact off its pre-Unicode slug instead of forki…
CodeWithJuber Sep 21, 2026
2b8941c
docs(architecture): stop claiming legacy stores are the ledger read path
CodeWithJuber Sep 21, 2026
ee6385f
docs(readme): correct routing claim that an LLM vote can raise the tier
CodeWithJuber Sep 21, 2026
413e4be
feat(impact)!: walk reverse dependencies by default, wide relations o…
CodeWithJuber Sep 21, 2026
59ad964
fix(commit-gate): treat a git error on stderr as unscanned even when …
CodeWithJuber Sep 21, 2026
2fb1387
test(commit-gate): report git's actual status/stderr when the B3 fail…
CodeWithJuber Sep 21, 2026
d892bbd
test(commit-gate): delete the worktree copy too, so git must read the…
CodeWithJuber Sep 21, 2026
10ce67f
ci(security): pass .gitleaks.toml explicitly and print the findings
CodeWithJuber Sep 21, 2026
2174c42
fix(cortex): caller_fanout from the FILE when the edit has no symbol
CodeWithJuber Sep 21, 2026
b53323e
fix(security): allowlist bibliography citation keys by shape, unblock…
CodeWithJuber Sep 21, 2026
d1125f1
fix(ledger): a CRLF checkout must not fork a claim id
CodeWithJuber Sep 21, 2026
703da31
feat(diagnose,route): let a real failure consume the routing escalateTo
CodeWithJuber Sep 21, 2026
ba6d5c5
fix(bench): re-label the impact cases from ground truth and re-measure
CodeWithJuber Sep 21, 2026
a752e89
fix(ledger): accept a pre-CRLF-fold claim address on read (migration)
CodeWithJuber Sep 21, 2026
bc64f27
docs(readme): say which machine the wall-clock benchmark rows came from
CodeWithJuber Sep 21, 2026
e4c3e95
Merge branch 'fix/review-followups' into fix/deep-review
CodeWithJuber Sep 21, 2026
675984e
feat(ledger): re-address pre-CRLF-fold claims with `ledger verify --fix`
CodeWithJuber Sep 21, 2026
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
13 changes: 13 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@
]
}
]
},
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "node",
"args": [
"${CLAUDE_PROJECT_DIR}/global/guards/run.mjs",
"${CLAUDE_PROJECT_DIR}/global/guards/protect-paths.sh"
]
}
]
}
],
"PostToolUse": [
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,9 @@ jobs:
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \
| tar -xz -C /tmp gitleaks
# `detect` walks the whole git log (fetch-depth:0 above); non-zero exit on any find.
/tmp/gitleaks detect --source . --no-banner --redact --exit-code 1
# --config is EXPLICIT: the repo's .gitleaks.toml carries the allowlist for the
# synthetic fixtures and bibliography citation keys, and a scan that silently ran
# without it reported findings nobody could act on. --verbose prints each finding
# (path, line, rule; the secret itself stays redacted) so a red gate names what to fix.
/tmp/gitleaks detect --source . --config .gitleaks.toml \
--no-banner --redact --verbose --exit-code 1
14 changes: 12 additions & 2 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ paths = [
# committed, so a full-history scan always matches them — they are NOT real credentials.
'''^test/secrets\.test\.js$''',
]
# Obvious placeholder credentials used as test fixtures to exercise the secret
# redactor/scanner — sequential-hex tokens that are unmistakably fake, not real secrets.
# Matched against the whole LINE, so a pattern can name the field it exonerates instead of
# just the value — which is what lets the citation-key entry below stay narrow.
regexTarget = "line"
regexes = [
# Obvious placeholder credential used as a test fixture to exercise the secret
# redactor/scanner — a sequential-hex token that is unmistakably fake.
'''ghp_0123456789abcdef0123456789abcdef0123''',
# The same bibliography false positive as the paths above, in the literature datasets
# (research/cognitive-substrate/literature/{references,gap_map}.json): a line like
# `"citation_key": "graves2014ntm"` trips generic-api-key because the field name sits
# beside a quoted alphanumeric value. Allowlisted by SHAPE — an author+year BibTeX key —
# rather than by file, so a real credential added to either file is still caught. All 32
# keys in those files match; one that does not will be reported, which is the point.
'''"citation_key"\s*:\s*"[A-Za-z][A-Za-z0-9]*[0-9]{4}[A-Za-z0-9]*"''',
]
38 changes: 20 additions & 18 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ Mechanically: evidence and tombstones are append-only, hash-deduped logs; confid
(`val`) is a decayed Beta posterior moved only by oracles; merge is a join-semilattice
(property-tested: commutative, associative, idempotent), so ledgers converge in any
order. `forge init` emits the union-merge `.gitattributes` rule; `forge ledger merge`
folds in any other ledger tree. The legacy stores remain the read path — the ledger is
where their events converge. Surface: `forge ledger stats | verify | show | blame |
folds in any other ledger tree. The ledger is now the default and only store — legacy
files are no longer written or read (`FORGE_LEDGER_ONLY=0` is the one-release escape
hatch back to them). Surface: `forge ledger stats | verify | show | blame |
query | ratify | retract | merge | import` (`--personal` for the per-user ledger).
Decision recorded in
[`docs/adr/0006-proof-carrying-memory.md`](docs/adr/0006-proof-carrying-memory.md).
Expand Down Expand Up @@ -290,10 +291,13 @@ of text plus JSON parsing. The module reuses the adjudicate contract verbatim: o
(null → text-LLM fallback → deterministic rubric; a null never moves a verdict), zero-dependency
(the `llm.js` spawned-child pattern, key in child env as `_FORGE_JEV_KEY`), and secret-refusing
on the outgoing state. Jev answers are validated against the questions asked — a choice naming
an option we never offered is garble and fails safe. The reconciles are untouched: `BAND_FLOOR`
still floors the routing band, the assumption gate still bounds completeness to ±band, and
clarifying free-text questions stay with the deterministic rubric, because a System One model
judges but does not author prose. Provenance records which proposer answered
an option we never offered is garble and fails safe. The reconciles judge Jev like any proposer:
`reconcileRoute` compares its band with the deterministic score's band and gates on p(band);
`reconcileAssumption` compares Jev's ask/proceed verdict (mean noul vs 0.5) with the rubric's
and lets it flip the gate only at p ≥ `minConfidence` — the two completeness scales are never
blended; and clarifying free-text questions stay with the deterministic rubric, because a
System One model judges but does not author prose.
Provenance records which proposer answered
(`llm.provider: "jev"` in `forge route --json`, `assumption.provenance.provider` in preflight).

**Intent cards (`src/intent.js`).** Prompt → intent by the same exemplar k-NN math as
Expand Down Expand Up @@ -520,8 +524,8 @@ forgekit/
emit/ # one module per tool (claude, codex, cursor, gemini, aider, copilot, windsurf, zed, continue) + mcp
ledger.js # PCM core: content-addressed claims, oracle taxonomy, decayed Beta val, Eq. 3 retrieval, semilattice merge (ADR-0006)
ledger_store.js # git-native on-disk ledger (.forge/ledger/): sharded claims, append-only evidence/tombstone logs, normal-form verify
ledger_bridge.js # legacy-store bridge: cortex/recall/brain shadow-writes + idempotent `ledger import`
ledger_read.js # merged legacy∪ledger read path: cortex lesson/fact injection, `recall list`, brain's AGENTS.md index all see teammate knowledge from `ledger merge`
ledger_bridge.js # legacy-store bridge, dormant by default (ledger-only); `FORGE_LEDGER_ONLY=0` re-enables cortex/recall/brain shadow-writes + idempotent `ledger import`
ledger_read.js # ledger-only read path by default (`FORGE_LEDGER_ONLY=0` merges legacy∪ledger instead): cortex lesson/fact injection, `recall list`, brain's AGENTS.md index all see teammate knowledge from `ledger merge`
reuse.js # proof-carrying artifact cache: fingerprint (MinHash+LSH), exact→near→adapt→miss ladder, atlas revalidation
embed.js # optional embeddings tier (ADR-0005): FORGE_EMBED=cmd:<cmd>|http:<url>, swaps MinHash/Jaccard for cosine in `reuse query`/`ledger query`, disk-cached at .forge/embed-cache.jsonl, silent fallback to MinHash
context.js # budgeted context assembly + completeness gate: R(edit) set cover, compression ladder, computed missing-set
Expand Down Expand Up @@ -597,24 +601,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/>105 files"]
test["test<br/>106 files"]
src["src<br/>97 files"]
test["test<br/>113 files"]
src["src<br/>98 files"]
landing["landing<br/>61 files"]
research["research<br/>35 files"]
global["global<br/>3 files"]
research["research<br/>37 files"]
global["global<br/>5 files"]
bench["bench<br/>2 files"]
scripts["scripts<br/>2 files"]
_remember[".remember<br/>1 file"]
docs["docs<br/>1 file"]
test -- 201 --> src
examples["examples<br/>1 file"]
test -- 206 --> src
test -- 227 --> src
bench -- 7 --> src
examples -- 4 --> src
test -- 2 --> bench
test -- 2 --> global
test -- 2 --> scripts
scripts --> src
src --> global
test --> bench
test --> global
```
<!-- forge:render:repo-map:end -->
Loading
Loading