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
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": "https://github.com/CodeWithJuber/forgekit",
"license": "MIT",
"keywords": ["codex", "mcp", "ai-coding", "agents-md", "cognitive-substrate"],
"skills": "skills",
"skills": "global/tools",
"mcpServers": ".mcp.json",
"interface": {
"displayName": "Forge",
Expand Down
22 changes: 22 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# forgekit — contributor instructions

## Stack
- Node.js >=20, pure ESM (`"type": "module"`), zero runtime dependencies.
- Linter/formatter: Biome 2.5.2 (dev dependency).
- Types: TypeScript via JSDoc annotations — no `.ts` files, checked by `tsc`.

## Commands
- Install: `npm ci`
- Test: `npm test` (node:test, 471+ tests)
- Lint + format: `npx biome check` (or `npm run check`)
- Typecheck: `npm run typecheck`
- Build pages: `npm run pages:build`

## Rules
- **Zero runtime dependencies** — CI enforces this. Everything uses Node.js built-ins.
- ESM only — use `import`, never `require`.
- Match existing patterns: dynamic `await import()` for optional modules, brand
tokens from `src/brand.js` (never hardcode "Forge"/"forge"), `BRAND.root` for
package root paths.
- Run `npm test && npx biome check && npm run typecheck` before committing.
- Version lives in `package.json` — `scripts/bump.mjs` keeps all manifests in sync.
28 changes: 15 additions & 13 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,10 @@ every tool. This is where that brain is headed.
Direction, not promises — shaped by the two field reports this project is grounded in
(the SDLC pain-point map and the ecosystem landscape). Open a Discussion to weigh in.

## Now (`master`, v0.6.0)
Cross-tool config for nine agents (Claude Code, Codex, Cursor, Gemini, Aider, Copilot,
Windsurf, Zed, Continue) plus MCP config for Roo & VS Code, verification layer
(`forge verify`), security gate (`forge scan`), portable memory (`forge brain`), cost
governor (`forge cost`, `--stages` for measured factors), spec-as-contract drift
(`forge spec`), goal-drift check (`forge anchor`), the cognitive-substrate pre-action
gate (`forge substrate`, `forge impact`) — **plus the whole Substrate v2 surface**:
`forge ledger` (proof-carrying team memory), `forge reuse` (verified-code cache),
`forge context` (budgeted assembly + completeness gate), `forge diagnose` (doom-loop),
`forge imagine [--run]` (consequence simulation + sandboxed dry-run), `forge uicheck`
v2 (fingerprints + design gate), and `forge dash`. The full paper and evidence bundle
live in [docs/cognitive-substrate/](./docs/cognitive-substrate/). See
[CHANGELOG.md](./CHANGELOG.md).
## Now (`master`, v0.8.0)
Everything from 0.7.0 plus branding layer (`forge brand`), model-tier exports
(`forgekit/model-tiers`), and the Codex plugin manifest — same toolkit, two plugin
surfaces (Claude Code + Codex). See [CHANGELOG.md](./CHANGELOG.md).

## Shipped — Substrate v2 (all phases P0–P8, v0.5.0)
The plan lives in [docs/plans/substrate-v2/](./docs/plans/substrate-v2/00-overview.md)
Expand All @@ -29,6 +20,17 @@ protocol** (ADR-0006) — every stored thing is a claim that carries its evidenc
confidence only from independent oracles, and merges across teammates conflict-free
(git-native CRDT ledger).

## Shipped — 0.7.0
- **Zero-config provider auto-detection** — `autoDetectProvider()` probes env vars
for OpenRouter, LiteLLM (local + hosted gateway), OpenAI, Anthropic, and Gemini;
`forge init` reports what it found, no manual config needed.
- **Hosted LiteLLM gateway** — `emitGatewayConfig()` writes a guard that injects
`LITELLM_GATEWAY_URL` + key so every model call routes through the team proxy.
- **15 MCP tools** — the cortex MCP server (`src/cortex_mcp.js`) now exposes
read-path tools for ledger, brain, atlas, recall, cost, substrate, and dashboard.
- **Cost dashboard** — `forge dash` serves a local HTML dashboard showing model spend,
event timeline, and ledger health from `.forge/` data.

## Shipped — 0.6.0
- **Embeddings tier** — optional vector backend (`src/embed.js`, ADR-0005 dependency
tier, stdlib fallback kept): `FORGE_EMBED=cmd:<command>` or
Expand Down
4 changes: 2 additions & 2 deletions landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,9 @@ <h1>One brain for<br />every coding <em>agent</em>.</h1>
>
</div>
<div class="hero-meta">
<span class="chip"><b>438</b> tests</span>
<span class="chip"><b>471</b> tests</span>
<span class="chip"><b>0</b> runtime dependencies</span>
<span class="chip"><b>9</b> tools, one config</span>
<span class="chip"><b>14</b> tools, one config</span>
<span class="chip">MIT · Node ≥ 20</span>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"hooks",
".claude-plugin",
".codex-plugin",
"skills",
".mcp.json",
"bin",
"brand.json",
Expand Down
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>forgekit status — live repository data</title><meta name="description" content="One config for every AI coding agent — a cross-tool config layer plus a cognitive substrate (memory, blast-radius, guardrails) for Claude Code, Codex, Cursor, Gemini, Aider, and more."><meta name="theme-color" content="#171310"><style>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>forgekit status — live repository data</title><meta name="description" content="One brain for every AI coding agent — the cognitive substrate every frozen model is missing (proof-carrying memory, impact foresight, enforced guardrails), authored once and delivered as native config to Claude Code, Codex, Cursor, Gemini, Aider, and more."><meta name="theme-color" content="#171310"><style>
:root{--ink:#171310;--surface:#201a15;--surface-2:#272019;--line:#372c22;--faint:#7d7263;--muted:#a99e90;--ember:#f26430;--fg:#f2ede7;--r-s:6px;--r-m:12px;--r-pill:999px;--shadow:0 24px 64px rgba(23,19,16,.56);--mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;--sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(960px 400px at 85% -10%,rgba(242,100,48,.16),transparent 70%),var(--ink);color:var(--fg);font:16px/1.65 var(--sans);-webkit-font-smoothing:antialiased}
Expand Down Expand Up @@ -39,7 +39,7 @@
code{font:500 13px var(--mono);background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-s);padding:0 8px}
footer{padding:32px 0;color:var(--faint);font-size:14px}
@media(max-width:800px){.grid{grid-template-columns:1fr}}
</style></head><body><div class="wrap"><header class="nav"><a class="brand" href="../">forge<em>kit</em></a><nav class="links" aria-label="Primary"><a href="../">Landing</a><a href="#quickstart">Quickstart</a><a href="#changes">Latest</a><a href="#sources">Data Sources</a><a href="https://github.com/CodeWithJuber/forgekit">GitHub ↗</a></nav></header><main id="top"><section class="hero" style="border-bottom:0;padding-bottom:0"><p class="eyebrow">@codewithjuber/forgekit · v0.6.0 · Node &gt;=20</p><h1>Live status, straight from the repository.</h1><p class="lead">One config for every AI coding agent — a cross-tool config layer plus a cognitive substrate (memory, blast-radius, guardrails) for Claude Code, Codex, Cursor, Gemini, Aider, and more.</p><p><a class="btn primary" href="#quickstart">Install in 60 seconds</a> <a class="btn" href="https://github.com/CodeWithJuber/forgekit#readme">Read the docs</a></p><div class="meta"><span class="chip">MIT license</span><span class="chip">0 runtime dependencies</span><span class="chip">claude/whitepaper-implementation-plan-x8f7bh @ 26b76cd</span><span class="chip">live GitHub stats disabled</span></div></section><div class="grid" aria-label="Measured outcomes"><article class="cell"><div class="metric"><em>0.43 ms</em></div><strong>blast-radius lookup</strong><p class="muted">Measured from this repo's benchmark report, not a marketing placeholder.</p><p class="src">reports/benchmarks.md</p></article><article class="cell"><div class="metric"><em>118 ms</em></div><strong>pre-action gate</strong><p class="muted">Assumptions, routing, reuse, context, impact, scope, and anchoring.</p><p class="src">reports/benchmarks.md</p></article><article class="cell"><div class="metric"><em>62.1%</em></div><strong>cost saved vs always-premium</strong><p class="muted">Documented from the white-paper prototype and exposed by Forge cost reports.</p><p class="src">whitepaper prototype</p></article></div><section id="quickstart"><h2>Quickstart</h2><div class="terminal">npm install -g @codewithjuber/forgekit
</style></head><body><div class="wrap"><header class="nav"><a class="brand" href="../">forge<em>kit</em></a><nav class="links" aria-label="Primary"><a href="../">Landing</a><a href="#quickstart">Quickstart</a><a href="#changes">Latest</a><a href="#sources">Data Sources</a><a href="https://github.com/CodeWithJuber/forgekit">GitHub ↗</a></nav></header><main id="top"><section class="hero" style="border-bottom:0;padding-bottom:0"><p class="eyebrow">@codewithjuber/forgekit · v0.8.0 · Node &gt;=20</p><h1>Live status, straight from the repository.</h1><p class="lead">One brain for every AI coding agent — the cognitive substrate every frozen model is missing (proof-carrying memory, impact foresight, enforced guardrails), authored once and delivered as native config to Claude Code, Codex, Cursor, Gemini, Aider, and more.</p><p><a class="btn primary" href="#quickstart">Install in 60 seconds</a> <a class="btn" href="https://github.com/CodeWithJuber/forgekit#readme">Read the docs</a></p><div class="meta"><span class="chip">MIT license</span><span class="chip">0 runtime dependencies</span><span class="chip">claude/forge-work-system-setup-p26ka5 @ 26586e2</span><span class="chip">live GitHub stats disabled</span></div></section><div class="grid" aria-label="Measured outcomes"><article class="cell"><div class="metric"><em>0.43 ms</em></div><strong>blast-radius lookup</strong><p class="muted">Measured from this repo's benchmark report, not a marketing placeholder.</p><p class="src">reports/benchmarks.md</p></article><article class="cell"><div class="metric"><em>118 ms</em></div><strong>pre-action gate</strong><p class="muted">Assumptions, routing, reuse, context, impact, scope, and anchoring.</p><p class="src">reports/benchmarks.md</p></article><article class="cell"><div class="metric"><em>62.1%</em></div><strong>cost saved</strong><p class="muted">Documented from the white-paper prototype and exposed by Forge cost reports.</p><p class="src">whitepaper prototype</p></article></div><section id="quickstart"><h2>Quickstart</h2><div class="terminal">npm install -g @codewithjuber/forgekit
forge init
forge doctor
forge substrate "Change auth validation and update tests"</div></section><section id="changes"><h2>Latest repo changes</h2><div class="card"><ul class="list"><li>Optional embeddings tier (src/embed.js, ADR-0005; ROADMAP &quot;Next&quot;): set</li><li>forge uicheck visual &lt;file-or-url&gt; — the Playwright visual loop</li><li>Ledger read-path flip (P2). Reads are now a merged view (legacy ∪ ledger) via the</li></ul><p class="muted">Benchmark sections indexed: 3 · benchmarks file updated 2026-07-07.</p></div></section><section id="sources"><h2>Data Sources</h2><div class="card"><p class="muted">No mock data is used. This page is regenerated from repository files during CI (generated 2026-07-07T21:15:58.111Z from 26b76cd). Enable <code>BUILD_PAGES_LIVE=1</code> to refresh public GitHub counters with ETag/Last-Modified caching.</p><ul class="list"><li>package.json</li><li>README.md</li><li>CHANGELOG.md</li><li>reports/benchmarks.md</li><li>https://api.github.com/repos/CodeWithJuber/forgekit (optional, no auth, only when BUILD_PAGES_LIVE=1)</li></ul></div></section></main><footer>WCAG-minded semantic HTML, keyboard focus, responsive 320px–1920px+, and reduced-motion-safe. Same design tokens as the landing page — <code>forge uicheck design</code> gates both.</footer></div></body></html>
forge substrate "Change auth validation and update tests"</div></section><section id="changes"><h2>Latest repo changes</h2><div class="card"><ul class="list"></ul><p class="muted">Benchmark sections indexed: 3 · benchmarks file updated 2026-07-08.</p></div></section><section id="sources"><h2>Data Sources</h2><div class="card"><p class="muted">No mock data is used. This page is regenerated from repository files during CI (generated 2026-07-08T18:42:41.820Z from 26586e2). Enable <code>BUILD_PAGES_LIVE=1</code> to refresh public GitHub counters with ETag/Last-Modified caching.</p><ul class="list"><li>package.json</li><li>README.md</li><li>CHANGELOG.md</li><li>reports/benchmarks.md</li><li>https://api.github.com/repos/CodeWithJuber/forgekit (optional, no auth, only when BUILD_PAGES_LIVE=1)</li></ul></div></section></main><footer>WCAG-minded semantic HTML, keyboard focus, responsive 320px–1920px+, and reduced-motion-safe. Same design tokens as the landing page — <code>forge uicheck design</code> gates both.</footer></div></body></html>
56 changes: 0 additions & 56 deletions skills/cognitive-substrate/SKILL.md

This file was deleted.

17 changes: 0 additions & 17 deletions skills/cognitive-substrate/references/capability-map.md

This file was deleted.

37 changes: 30 additions & 7 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,40 @@ const COMMANDS = {
brand: "print the active brand token map",
};

const GROUPS = {
Core: ["init", "sync", "doctor", "catalog"],
Memory: ["cortex", "recall", "remember", "brain", "ledger", "reuse"],
Substrate: [
"substrate",
"preflight",
"route",
"impact",
"scope",
"context",
"anchor",
"diagnose",
"imagine",
"lean",
],
Quality: ["verify", "scan", "spec", "taste", "uicheck", "harden"],
Config: ["config", "cost", "dash", "brand", "atlas"],
};

const printVersion = () => console.log(`${BRAND.brand} (${BRAND.pkg}) v${BRAND.version}`);

function printHelp() {
printVersion();
console.log(`\n${BRAND.tagline}\n`);
console.log(`Usage: ${BRAND.cli} <command> [options]\n`);
console.log("Commands:");
for (const [name, desc] of Object.entries(COMMANDS)) {
console.log(` ${name.padEnd(8)} ${desc}`);
for (const [group, cmds] of Object.entries(GROUPS)) {
console.log(`${group}:`);
for (const name of cmds) {
if (COMMANDS[name]) console.log(` ${name.padEnd(12)} ${COMMANDS[name]}`);
}
console.log();
}
console.log(`\nRun \`${BRAND.cli} <command> --help\` for details.`);
console.log(`Start here: \`${BRAND.cli} catalog\``);
console.log(`Run \`${BRAND.cli} <command> --help\` for details.`);
}

async function run(argv) {
Expand Down Expand Up @@ -139,7 +162,7 @@ async function run(argv) {
console.log(`${BRAND.brand} sync — one source → every tool\n`);
for (const r of report) {
console.log(
` ${r.action.padEnd(16)} ${String(r.target).padEnd(22)} ${r.tool}${r.note ? " · " + r.note : ""}`,
` ${r.action.padEnd(16)} ${String(r.target).padEnd(22)} ${r.tool}${r.note ? ` · ${r.note}` : ""}`,
);
}
for (const w of warnings) console.warn(` ! ${w}`);
Expand All @@ -158,7 +181,7 @@ async function run(argv) {
const icon = { ok: "✓", warn: "!", fail: "✗" };
console.log(`${BRAND.brand} doctor\n`);
for (const r of results) console.log(` ${icon[r.status]} ${r.label.padEnd(16)} ${r.note}`);
console.log(`\n${failed === 0 ? "all clear" : failed + " problem(s)"}`);
console.log(`\n${failed === 0 ? "all clear" : `${failed} problem(s)`}`);
if (failed) process.exitCode = 1;
return;
}
Expand Down Expand Up @@ -596,7 +619,7 @@ async function run(argv) {
if (r.findings?.length) {
for (const f of r.findings) console.log(` [${f.sev}] ${f.msg}`);
} else if (r.raw) {
console.log(" " + r.raw.trim().split("\n").slice(-6).join("\n "));
console.log(` ${r.raw.trim().split("\n").slice(-6).join("\n ")}`);
} else {
console.log(" no obvious red flags");
}
Expand Down
Loading
Loading