thetacog-mcp
v2.7.5
Published
Geometric-Driven Development (GDD) toolkit: cognitive rooms + Shadow Agent hooks + Ghost-Read pipeline (6 routes, persona-monologue) + thetacog-iterate convergence loop (meta-rule-checker, auto-applies high-confidence rewrites, adaptive stall-softening) +
Downloads
1,240
Maintainers
Readme
ThetaCog MCP
Cognitive rooms on your CPU. Substrate-attested receipts in the cloud. The dignity-pixel market begins here.
Anyone who fixed AI reliability fixed competence verification at silicon speed too — by Rice (1953), same problem. They didn't. We did. We patented it.
The wild implications are right there in the receipt: no job search ever (the receipt locates the perfect task at cache-line speed, the way silicon locates the right address); no separate verification step (stay-in-lane attestation IS the proof); every operator gets a dignity pixel — their exact coordinate of verified competence — and the next axis to grow into. Max income becomes a navigable trajectory, not a lottery.
Why believe? The same XOR that prices an AI agent's liability prices a human's role-fit, and the silicon doesn't ask which kind of operator emitted the trace.
That's the position. The package below is what produces the artifact that makes the position defensible. One install. One command. A signed receipt on your disk. Verifiable in any browser at thetadriven.com/verify-receipt.
The wildest implications we can hard-support — three markets, one substrate
The protocol below produces a single signed JSON ("the Air Receipt"). Three independent markets read the same receipt, by physics not by marketing. We can hard-support each claim against the patent (US 19/637,714, priority Apr 2, 2025), Rice (1953), and a locally-runnable demo on your laptop.
Market 1 · AI Liability Insurance. Carriers underwrite autonomous agents against substrate-attested receipts. The Δ-map is the actuarial unit; carriers price treaties against the violation distribution. Closes the unbindable-AI-submission queue. Hard-support: the receipt is the structural class Rice forbids software-only verifiers from being; underwriters who already price OBD-II behavioral signals will recognize the shape immediately.
Market 2 · Competence Verification (the dignity-pixel market). The same receipt clears a human into a verified role at silicon speed — no résumé, no background check, no separate verification step. Operators accumulate receipts across roles; the aggregated coordinate of their verified competence IS their dignity pixel. Hard-support: by Rice, the substrate doesn't distinguish AI from human at the cache line; a cache miss is a cache miss; therefore the receipt is operator-agnostic by physics, not by marketing claim.
Market 3 · IAM Security (the "stay in your lane" claim). Identity & Access Management — the $30B/yr enterprise category that controls who/what is allowed to do what — has spent 30 years writing software policies (RBAC, ABAC, OPA, OAuth scopes, IAM roles) to enforce role boundaries. Every single one of those mechanisms is software verifying software, Rice's failure domain, the floor that isn't a floor. Stay-in-lane attestation at the substrate IS IAM solved at the silicon layer. The XOR boundary check (Reality cell ∈ Lane bitmap) is the chip-side equivalent of every if (user.role !== "admin") throw statement in your codebase — but it can't be tricked by prompt injection because the verifier is below the layer the prompt can reach. Hard-support: run npx thetacog pmu-report --file your-iam-policy.md on any access-control doc; the receipt produces the lane bitmap in 30 seconds; the patent claims cover the address-fetch-as-verify mechanism that makes the IAM substrate cryptographically sealed.
Three markets, one substrate, one patent, one receipt. That's the full claim scope. The cognitive rooms below are the launch pad: each room is a coordinate where the operator does their work; the receipts those rooms produce are the bricks of the dignity-pixel market.
See the Δ-map for yourself (the runnable directional audit)
The Air Receipt and the Δ-map above are not slideware — they run on your laptop. The PMU directional-audit dashboard senses this repo's docs (intent) and code (reality), projects both onto the 144×144 ShortLex lattice, XORs them into the friction map, and walks it. One minute to bootstrap:
cargo build --release --manifest-path .thetacog/pmu/Cargo.toml # the on-chip daemon
node scripts/pmu/claudbridge-mock.mjs # serves :7777
open http://localhost:7777/ # the live dashboardThe walk computes a decayed Katz/Neumann series on the co-occurrence matrix (Σ decay^k·M^k); measured against a shuffled null it extracts real structure (concentration z ≈ 64–142, p < 0.003), and the intent vs reality clouds agree less than random — the Δ-map is a genuine, measurable divergence, the Trust Debt the underwriter prices. Full bootstrap + significance: scripts/pmu/README.md; flow + variant registry at /flow; what we learned + the restart spec at /learnings.
You have 47 browser tabs open. Give your brain a break.
The million tabs problem is not a discipline problem. It is an architecture problem. Each tab is a thought. Each thought belongs to a mode. Bunch your tabs and terminals by theme. Switch themes, not tasks.
The cognitive rooms run locally on your machine via this MCP. Every commit you make in a room produces a thread of receipts (~/.thetacog/pmu/receipts/) that attest where your work actually lived — which axis you operated on, which lane you stayed in, which σ-margin you achieved. The local rooms are the launch pad; the cloud bridge (when THETACOG_RECEIPT_ENDPOINT is set) carries the receipts into the dignity-pixel market.
This package ships both halves: the local cognitive rooms + the substrate-attestation pipeline. One install. One command surface.
How this package is shaped (the GTM stance)
thetacog-mcp is the primary delivery — and the first implementation of the same 12-coordinate lattice the on-chip XOR fires against. One install, one command (thetacog-iterate <file>), one set of opinionated rules running — cognitive rooms + Shadow-Agent hooks + ghost-read pipeline + auto-rewrite chain + convergence loop, all in the same package. The rules in scripts/gdd-rules/{writing,code}/ encode hard-won content and code discipline; they are the value prop, not the boilerplate.
The nine cognitive rooms (vault · architect · performer · navigator · network · voice · builder · laboratory · operator) are not a metaphor for the lattice — they ARE the lattice rendered at the operator scale. The same Strategy × Tactics × Operations × Law/Goal/Fund/Speed/Deal/Signal/Grid/Loop/Flow address space that the chip's XOR-popcount comparator validates in ~100 ps is the address space these rooms operate from when you run npx thetacog. Three altitudes, one architecture: silicon (the XOR gate) · terminal (the room you're typing in) · operator (the receipt that travels with you). See thetadriven.com/rooms for the operator side, thetadriven.com/pmu-simulator/demo for the silicon side, thetadriven.com/iamfim for the liability side.
Customize without forking. Drop your own rule at scripts/gdd-rules/<mode>/99-your-rule.sh — the wrapper auto-discovers it on next invocation. Exit 0 = pass, non-zero = fail with stderr surfaced under the rule name. That's the strongest extension surface this package has, and you don't need any package surgery to use it.
Specialized rule packs ship as sibling npm packages, not forks. When demand names a specific axis — strict TDD, Supabase RLS, additional personas beyond Budget Writer, paper-style citation density — those ship as separate thetacog-rules-* / thetacog-personas-* packages that drop files into the same discovery path. Compose by installing, not by editing this package. None of those siblings exist yet; they ship when a real user names the demand.
Forking thetacog-mcp is a v3.0 conversation, not a v2.x conversation. If you find yourself wanting a different convergence formula, a different persona prompt, or a different drift-budget metric — file an issue first. The bundle is the right shape until it provably isn't.
The position, in one sentence
Anyone who fixed AI reliability fixed competence verification at silicon speed too — by Rice (1953), same problem. They didn't. We did. We patented it.
The wild implications are right there in the receipt: no job search ever (the receipt locates the perfect task at cache-line speed, the way silicon locates the right address); no separate verification step (stay-in-lane attestation IS the proof); every operator gets a dignity pixel — their exact coordinate of verified competence — and the next axis to grow into. Max income becomes a navigable trajectory, not a lottery.
Why believe? The same XOR that prices an AI agent's liability prices a human's role-fit, and the silicon doesn't ask which kind of operator emitted the trace.
That's the load-bearing claim. Everything below is the mechanism, the proof, and the API surface that produces the receipt that makes the claim defensible. Run npx thetacog pmu-demo on your hardware to verify; read thetadriven.com/blog/2026-05-25-the-rices-theorem-checkmate for the full argument with the six ingredients walked through.
The chip-to-user pipeline (what pmu-demo actually does, end to end)
Reading order: silicon → binary tile → axes expand → gzip/SimHash fill → XOR boundary → ed25519 sign → cloud bridge → user. The same operation fires at six scales; the npm package is the user-facing end of a chain whose load-bearing claim is that every link is mechanically the same as the one above and below it.
┌───────────────────────────────────────────────────────────────┐
│ 1. SILICON · L1 cache line · 18 bytes · one fetch event │
│ The PMU witnesses what the agent's code touched. │
│ This is what the patent (US 19/637,714) claims at the │
│ combinational level — no model in the loop, no separate │
│ compare instruction the running system could subvert. │
└─────────────────────────────┬─────────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────┐
│ 2. BINARY TILE · 12 × 12 cells = 144 binary tiles │
│ ShortLex BFS · self-similar at every altitude · each tile │
│ holds one (axis, sub-axis) signature. XOR + popcount of │
│ two 64-bit signatures = Hamming distance = combinational │
│ distance (AC⁰), no Turing loop. │
└─────────────────────────────┬─────────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────┐
│ 3. AXES EXPAND · the 12 canonical cells are │
│ A · Strategy (A1·Law, A2·Goal, A3·Fund) │
│ B · Tactics (B1·Speed, B2·Deal, B3·Signal) │
│ C · Operations (C1·Grid, C2·Loop, C3·Flow) │
│ subdivide() expands each cell recursively into 12 sub- │
│ cells at depth N; the lattice scales to N × N at any │
│ altitude the application demands. │
└─────────────────────────────┬─────────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────┐
│ 4. GZIP/SIMHASH FILL · cheaply populate the binary tiles │
│ · gzipNCD(doc, snippet) — the gold-standard semantic │
│ distance oracle, software-side │
│ · simhash(doc, 64, wordShingles) — FNV-1a 64-bit per │
│ shingle, the on-chip-shaped approximation │
│ compress() runs BOTH witnesses; AGREEMENT or DISAGREEMENT │
│ is the calibration signal — never silently reconciled. │
└─────────────────────────────┬─────────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────┐
│ 5. XOR BOUNDARY · Reality cell vs Lane bitmap │
│ popcount(lane_mask XOR reality_bit) — single hardware │
│ event. Δ map = Reality − Lane cell-by-cell. │
│ WE MEASURE WHERE THE DRIFT IS, not just that drift │
│ happened — dynamic stability vs static alignment. │
└─────────────────────────────┬─────────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────┐
│ 6. ED25519 SIGN · per-host keypair │
│ ~/.thetacog/pmu/keys/host.{pub,priv}.pem │
│ 64-byte signature seals the receipt body │
└─────────────────────────────┬─────────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────┐
│ 7. CLOUD BRIDGE · receipt is portable │
│ POST $THETACOG_RECEIPT_ENDPOINT (if set) — registry │
│ acceptance verdict in HTTP status. Local-only mode prints │
│ the curl-equivalent for the operator. │
└─────────────────────────────┬─────────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────┐
│ 8. USER · the receipt is what crosses │
│ Underwriter reads Δ map as actuarial unit. │
│ Employer reads same Δ map as competence visa. │
│ SAME JSON, TWO MARKETS — Rice (1953) doesn't │
│ distinguish AI execution from human execution at the │
│ cache line, so the receipt is dual-use by physics. │
└───────────────────────────────────────────────────────────────┘No conceptual leaks. Every step above is the exact code in this package. Run npx thetacog pmu-demo to fire steps 1-7 on your hardware in ~30 seconds (step 1 ships as the software cache-witness; the hardware variant lives in the Rust binary referenced at the GitHub repo for now). Step 8 is what happens after you forward the receipt — the same JSON is the citation target for both an underwriter and an employer.
Why this works in two markets: because Rice (1953) does not distinguish AI execution from human execution at the cache line. A cache miss is a cache miss. The substrate has no field for which kind of operator produced the instruction it witnessed. Therefore the receipt is fungible across AI-containment underwriting (Market 1) and human-competence verification (Market 2). Anyone selling software-only AI safety has implicitly claimed Rice doesn't bind them — the only proof Rice doesn't bind is a substrate-level receipt of this form, which IS the Market 2 visa. Solving Market 1 at the substrate solves Market 2 whether the vendor intended to or not. Full argument: thetadriven.com/blog/2026-05-25-the-rices-theorem-checkmate. Live competence-marketplace demo: thetadriven.com/pmu-simulator/demo#K.
What's New in v2.7.4 — pmu-report: end-to-end HTML report, auto-opens in browser
$ npx thetacog pmu-report --file YOUR-DOC.mdRuns the full pipeline + generates a self-contained HTML report at ~/.thetacog/pmu/reports/report-<id>.html and auto-opens it in your default browser. The report contains:
- Depth-1 heatmap across all 12 canonical cells
- ShortLex depth-2 decomp (144 cells) — geometry at every scale, with the 132 blank cells flagged as map-of-maps gaps
- XOR boundary check + Δ-map
- Embedded signed receipt JSON (forwardable)
- Market match against a built-in job spec
- ASCII pipe-flow diagram
- σ-floor disambiguation panel (this-run vs published 3.4σ vs theoretical 600σ aggregate)
- Link to
/verify-receiptfor in-browser ed25519 verification
The pmu-report subcommand turns npx thetacog into a one-command end-to-end audit-artifact generator. Pipe any doc you have, get a forwardable HTML + signed JSON in under a second.
What's New in v2.7.2 — pmu-demo: full Air Receipt pipeline in one command
$ npx thetacog pmu-demoSix stages, all observable in pretty-print, no install, no auth:
- INGEST — reads doc (built-in A1.Strategy.Law sample, or
--text,--file,--stdin). - TWO-WITNESS COMPRESS —
gzipNCD(compression-based oracle) +simhashCosine(on-chip-shaped XOR-popcount approximation) score every axis on the canonical 12-cell lattice. BOTH-AGREEMENT or DISAGREEMENT — never silently reconciled. - XOR BOUNDARY CHECK — Reality cell vs Visa bitmap → Δ map cell-by-cell.
- SIGN — ed25519 over the receipt body. Per-host keypair auto-generated at
~/.thetacog/pmu/keys/host.{pub,priv}.pem. - STORE — signed receipt JSON to
~/.thetacog/pmu/receipts/<id>.json. - CLOUD BRIDGE — POSTs to
$THETACOG_RECEIPT_ENDPOINTif set; otherwise prints the curl-equivalent.
The receipt is the same JSON schema that prices AI containment liability (underwriter side) AND human competence verification (employer side). By Rice (1953) the substrate doesn't distinguish AI from human execution at the cache line — a cache miss is a cache miss. Same instrument, two markets. Canonical schema page: thetadriven.com/air-receipt.
Custom usage:
echo "Your agent prompt or output" | npx thetacog pmu-demo --stdin
npx thetacog pmu-demo --file ./agent-trace.txt --visa A1,B2
npx thetacog pmu-demo --json # JSON-only outputPatent: US 19/637,714 (priority 2025-04-02; v20 publication ~Oct 2026). Source: github.com/wiber/thetadrivencoach.
What's New in v2.7 — thetacog-iterate (the GDD convergence loop)
What's in it for you
You commit a blog post or a TypeScript file. The pipeline reads it back through a budget-writer persona's inner monologue, scores every paragraph or function on three percentages (predictive power · impact · confidence), auto-applies the high-confidence rewrites, surfaces the rest as a punch list, and loops until the file converges on a published, signing-grade artifact. You stop hand-iterating and start auditing. One command — thetacog-iterate <file> — runs the whole loop.
Six needs the loop meets, in canonical order
Connection — the file you write is read back through the deployer-as-reader persona, not your own voice. You see what your reader actually thought. Contribution — every section gets graded against six needs and the rules name where to add procurement language, where to cut the bio-aside, where to land the price. Growth — each loop iter raises the lowest paragraph; the convergence criterion (AVG ≥ 95 + 80% pass + ±1 tolerance) honors diminishing returns instead of grinding past them. Uncertainty — the rules name what is not yet measured (script + runtime + commit SHA) so the reader can audit the gap, not guess at it. Certainty — the auto-applied rewrites are tagged fix(voice/auto-rewrite) and recursion-guarded so the loop self-terminates; the diff-budget cap (default 25%/iter) catches voice drift before it lands. Significance — the file you ship reads as if an actuary, a CISO, and a CFO each took a pass at it — because they did, in persona.
Evidence — what the loop did tonight
Tonight's run on the May 23 blog post:
- Auto-applied 2 rewrites on §A as
fix(voice/auto-rewrite)commits (ef1412a07,64e007f3d) — the LLM caught one paragraph that read as "VC-deck opening" and rewrote it with the procurement friction inline. - Triple-% rule found 4 paragraphs below 95 from the iter-23 ghost-read sidecar and surfaced them worst-first for hand-review (BW persona reactions verbatim, not summarized).
- WIIFY-implied rule flagged §I (prior art) as having 0 reader-second-person markers — true and expected, surfaced for explicit exemption rather than silent miss.
- Stall-softening fired once when the same rule set failed two iters running; AVG_FLOOR ramped 95 → 94.5 and the loop converged on the diminishing-returns plateau instead of looping to MAX_ITER.
Install + first run
npm install -g thetacog-mcp@latest
# blog post (writing mode auto-detected)
thetacog-iterate src/content/blog/2026-05-23-my-post.mdx
# book chapter (same wrapper, same auto-detect)
thetacog-iterate books/tesseract/chapters/chapter-04.md
# typescript file (code mode auto-detected)
thetacog-iterate src/lib/my-module.ts
# discover what rules exist
thetacog-iterate --self-testConfiguring Gemini as the inner-monologue backend (the one that works)
The loop calls Gemini for the per-paragraph monologue. Two auth paths exist; only one works reliably tonight:
- OAuth/CLI path (recommended). Run
geminionce interactively to authenticate via your Google login (npx @google/gemini-cliwill prompt the browser). The loop's dispatch UNSETSGEMINI_API_KEYby default to force this path — proven working throughgemini --yoloinscripts/ghost-read-async.mjs. - API-key REST path (CI only). If
GEMINI_API_KEYis set in.env.localand known good, setGDD_USE_GEMINI_API_KEY=1to keep it. Often returns400 INVALID_ARGUMENTwhen the key is expired — use the OAuth path unless you're in CI.
# one-time interactive OAuth setup
npx @google/gemini-cli # follow the browser-popping prompt
# then the loop works hands-off:
thetacog-iterate src/content/blog/my-post.mdxTuning the convergence criterion
The default convergence criterion is AVG ≥ 95 across all content paragraphs AND ≥ 80% of paragraphs pass-with-±1-tolerance. The loop honors diminishing returns: 94 counts as 95 within tolerance. Override via env:
GDD_AVG_FLOOR=92 thetacog-iterate ... # accept lower avg
GDD_PASS_PCT_FLOOR=70 thetacog-iterate ... # accept fewer passing
GDD_TOLERANCE=2 thetacog-iterate ... # wider grade tolerance
GDD_MAX_ITER=12 thetacog-iterate ... # more loop iterations
GDD_DIFF_BUDGET_PCT=15 thetacog-iterate ... # tighter drift guard
GDD_ADAPTIVE_SOFTEN=0 thetacog-iterate ... # disable stall-softenHow it fits with the rest of thetacog
thetacog-iterate is the convergence loop that orchestrates the pieces already shipped in v2.3-v2.6:
- Post-commit hook (v2.3) auto-fires ghost-read on every content commit →
mailbox/inbox/→ postman drains →docs/reports/ghost-read/<sha>-<slug>-{gemini,claude}.html. - Ghost-read async pipeline (v2.5) produces the per-paragraph monologue + triple-% sidecar JSON the loop reads.
- Auto-rewrite chain (v2.5) takes the sidecar, classifies friction into APPLY / ADVISORY / ASK, and auto-commits the APPLY tier as
fix(voice/auto-rewrite)(gated onGDD_AUTO_REWRITE_LIVE=1). - Cognitive rooms (v2.0) — each
Originating-Terminaltrailer in the auto-rewrite commit names the room that owned the surface; the loop's per-rule story trailer threads room attribution through the iteration log. thetacog-iterate(v2.7, new) is the wrapper that puts these into a convergence loop: runs the rules, dispatches the chain, watches the score, softens on stall, exits on convergence-or-cap. The pieces were there; the loop is the new piece.
The full mental model: commit → hook → ghost-read → auto-rewrite → commit → ... → converge. You write the first draft and step away; the loop hand-iterates while you do something else. You come back to a publishable artifact and a punch list of the ASKs that needed your judgment.
What's New in v2.5 — Geometric-Driven Development (GDD)
Geometric-Driven Development (GDD) is the CI/CD pipeline for the AI era. It is the architectural shift from testing whether code executes correctly to verifying whether an autonomous system behaves correctly, using hardware physics instead of software vibes.
To understand GDD, you have to look at why Test-Driven Development (TDD) fails when applied to Large Language Models.
TDD is built to catch syntax errors and logical breaks. You write a function, you write a test, and if the function returns an integer instead of a string, the test turns red. But LLMs don't break syntax — they break intent. If an AI customer support bot starts offering medical advice, the code is executing perfectly. The meaning has drifted, but traditional CI/CD has no way to catch it.
The industry's current fix is to point a second AI at the first AI and ask, "Did it stay in its lane?" This is a high-latency, uninsurable nightmare. Language cannot contain language.
GDD fixes this by replacing semantic monitoring with geometric, logic-layer enforcement. It runs on what we call the Zero-Distance Grounding Loop.
How GDD works in practice
1. Establish the Target (The Geometry)
In GDD, you do not write a "System Prompt" to tell the AI what to do. You map a behavioral rule to a literal geometric coordinate on the Fractal Identity Map (FIM). Under the S = P = H principle (Semantic meaning = Physical position = Hardware location), the authorized "lane" for the AI becomes a specific address space in memory. The target is defined by physics, not words.
2. Semantic Rehearsal (The Ghost Read)
Before the rule is locked, the system runs a simulation. It passes the semantic intent through a "Ghost Read" pipeline — testing the concept against the friction of different personas (like an Enterprise Compliance Leader or a Systems Architect). This ensures the geometric boundary you are about to set actually maps to human reality and regulatory expectations.
3. Logic-Layer Execution (The PMU Test)
The AI automation fires. But instead of asking a secondary software layer to read the AI's output, GDD drops the verification to the hardware level. It uses the Performance Monitoring Unit (PMU) to watch the cache.
- If the AI fetches data from its authorized FIM coordinate, the PMU registers a Cache Hit. The action is verified at zero distance, in nanoseconds.
- If the AI hallucinates or drifts outside its authorized domain, it must fetch data from an unmapped or restricted coordinate. The PMU registers a Cache Miss.
4. Sovereign Lock (The Semantic Seg-Fault)
In standard software, if a program tries to access memory it doesn't own, the OS throws a segmentation fault and kills the process. GDD creates a Semantic Seg-Fault. When the PMU registers that out-of-bounds cache miss, an XOR gate at the address-fetch path physically rejects the action. The drift is halted at the hardware layer before the output is ever generated.
The Bottom Line
GDD takes AI alignment out of the Turing-complete software layer — where the AI can lie to grade its own homework — and pushes it down into the combinational logic layer.
It works because a cache miss cannot be forged. By making semantic drift a measurable physical event, GDD transforms AI from a black-box liability into an actuarially sound, verifiable, and fully insurable asset.
What ships in v2.5 — repo-level GDD pipeline
The npm package surfaces (cognitive rooms + dashboard) remain unchanged from v2.4. The new GDD pipeline ships at the repo level for users who clone or fork wiber/thetadrivencoach:
- Ghost-read async pipeline — 6 routes (blog · book · scratchpad · newsletter · linkedin · yt-paste). Each route runs persona-driven inner-monologue passes. Newsletter route impersonates the actual recipient from frontmatter
audience[](the dispatch reads as "this was sent to me"). - Pareto-twice research tasks —
blog-interlink-research.mjsandbook-edit-research.mjstake recent committed work as PROMPT MATERIAL. Top 20% byimportance × certainty(mechanical-only) auto-apply as fresh per-fix commits. Top 20% by importance among the rest escalate as P0/P1 leverage. Already shipped 7 auto-apply commits during this release iteration. - Punch-list watcher — surfaces FRICTION-FLAGGED reports as P0/P1 leverage actions on the next commit's terminal before the user pushes.
- TDD discipline — 84 tests (44 ghost-read + 40 research), all passing. Toggle pattern via
*_DRY_RUN,RUN_INTEGRATIONenv vars. - Full-circle docs —
public/zero-distance-grounding-loop.html(canonical GDD manifesto, breadth-first ShortLex flat ordering) +public/post-push-ghost-read.html(pipeline reference embedding live reports as bidirectional witness).
What's New in v2.3 — A Writing Room in Your Terminal
Voice rules that govern themselves. Heavy LLM checks that never block your push.
You are typing a blog post. You hit a voice rule. The rule audits, surfaces the violation, drafts the fix — all after the commit lands, while you are already on the next paragraph. Push completes in ten seconds. The audit runs in the shadow.
This is the Shadow Agent architecture, new in v2.3:
- Pre-commit / pre-push are lexical only — sub-second, never block.
- Post-commit / post-push dispatch heavy LLM audits in detached background processes.
- Cleanup followups (next phase) read the audit JSON and apply surgical fixes as
fix(voice): auto-cleanupcommits you can review when convenient. - You edit nothing in the HTML. The dashboard's role is FIND-AND-POINT — surface the right rule, copy a Claude Code prompt with full context, paste into a CC session, let CC do the editing.
Open the writing room
npm install -g thetacog-mcp
thetacog dashboardBrowser opens at http://localhost:3737. SQLite at .thetacog/rules.db is the single source of truth — every rule, hook, and copy-prompt lives there. Singleton-enforced via PID lockfile; one dashboard per repo.
Three rule scopes seeded, mapped to cognitive rooms
| Scope | Room | What it governs |
|-------|------|-----------------|
| voice | B3 Voice 🎤 | Paradox voice, no-meta-commentary, technique-name-leak |
| structural | C1 Builder 🔨 | Six Needs canonical sequence, canonical tile-form |
| business-comms | C3 Operator 🎩 | LinkedIn drafts, reply-naming, puffery filter |
Each cognitive room HTML can link to its scoped view of the dashboard via ?scope=X. Each rule has a one-click 📋 Copy prompt → develop this rule in Claude Code button.
Hook scripts discovered automatically
The dashboard scans hooks/ and scripts/voice-*.sh + post-anchor-check.sh + verify-blog-book-links.sh etc., shows each with its full path and full content (lazy-loaded). Each gets a 📋 Copy prompt → fix this hook in CC button that emits a CC handoff prompt with the file content + the Shadow Agent architectural context.
CLI
thetacog dashboard # open the writing room (port 3737)
thetacog dashboard --kill # stop the singleton
thetacog dashboard --status # is it running?
thetacog regen-hooks # read SQLite → write .thetacog/hooks-config.jsonSQLite is the brain. The .sh hooks are the muscle. Claude Code is the hand. You curate the rules in the dashboard, point CC at them with a copy-prompt, and CC works on them with full repo context. The hooks read from SQLite; the JSON is derived; if it drifts, regenerate.
The terminal becomes a writing room. The dashboard becomes the toolbox. Push stops being the gate that blocks you.
What's New in v2.0
Cognitive Affordance Model - Each room now includes:
- Tesseract Coordinate System - 3x3 grid mapping Strategy/Tactics/Operations
- Explicit Routing - Each room knows what it SEES, IGNORES, and routes elsewhere
- Escape Gravity - Vanity metrics vs true signals for each room
- Flywheel Handoffs - How rooms feed into each other
The Model
Cmd+Space "kitty" → Split screen to your Operator workspace:
┌─────────────────┬─────────────────┐
│ LEFT │ RIGHT │
│─────────────────│─────────────────│
│ KITTY TERMINAL │ BROWSER TABS │
│ + Your AI │ (Revenue theme) │
│─────────────────│─────────────────│
│ $ claude │ Stripe.com │
│ (or cursor) │ CRM dashboard │
│ │ Analytics │
│ │ This dashboard │
└─────────────────┴─────────────────┘The jump is the insight. Cmd+Space to a terminal name is instant context loading — you land in a split screen with your terminal LEFT and themed browser tabs RIGHT. Any MCP-compatible AI in that terminal inherits the room's context.
Install
Works with any MCP-compatible client (Claude Code, Cursor, Cline, etc.)
npm install -g thetacog-mcpWhat happens:
- HTML dashboards are copied to
~/.thetacog/ - Getting Started guide opens in your browser
- Your installed terminals are detected
Then register with Claude Code:
claude mcp add thetacog "npx thetacog-mcp"The Tesseract Coordinate System
Each room occupies a position in a 3x3 grid:
Strategy (A) Tactics (B) Operations (C)
┌────────────────┬────────────────┬────────────────┐
Law (1) │ ⚖️ A1 Vault │ 🏎️ B1 Navigator│ 🔌 C1 Builder │
│ (Law:Law) │ (Speed:Law) │ (Grid:Law) │
├────────────────┼────────────────┼────────────────┤
Goal (2) │ 🎯 A2 Architect│ 🤝 B2 Network │ 🔄 C2 Lab │
│ (Goal:Goal) │ (Deal:Deal) │ (Loop:Goal) │
├────────────────┼────────────────┼────────────────┤
Fund (3) │ 💰 A3 Performer│ 📡 B3 Voice │ 🌊 C3 Operator │
│ (Fund:Signal) │ (Signal:Signal)│ (Flow:Deal) │
└────────────────┴────────────────┴────────────────┘Diagonal rooms (A1, B2, C3) represent the pure essence of their coordinate. Off-diagonal rooms translate meaning between coordinates.
The 9 Cognitive Rooms
| Room | Terminal | Coordinate | THE PULL | |------|----------|------------|----------| | Vault 🔒 | WezTerm | A1 Law:Law | "PROVE, not claim. Mathematical certainty." | | Navigator 🧭 | Terminal | B1 Speed:Law | "15-MINUTE DISCIPLINE. Cache hits." | | Builder 🔨 | iTerm2 | C1 Grid:Signal | "SHIPPED AND INSTRUMENTED. Data proves grounding." | | Architect 📐 | VS Code | A2 Goal:Goal | "CASCADE and COMPOUND. Strategic leverage." | | Network ☕ | Messages | B2 Deal:Deal | "RECIPROCITY FIRST. Give before asking." | | Laboratory 🧪 | Cursor | C2 Loop:Goal | "VERDICTS in 2 hours. BUILD or KILL." | | Performer 🎭 | Alacritty | A3 Fund:Signal | "MULTIPLIER RATIO. Months → minutes." | | Voice 🎤 | Rio | B3 Signal:Signal | "STAKE CONVICTION. Skin in the game." | | Operator 🎩 | Kitty | C3 Flow:Deal | "BINDING COMMITMENT INDEX. Prevent drift." |
Cognitive Affordance Model
Each room HTML contains a structured prompt with:
═══ COORDINATE LOCK: 🎩::operator ═══
POSITION: 🌊 C3 Operations.Flow
INTERSECTION: C3:B2 (Flow:Deal)
WINNING POINTER: en.wikipedia.org/wiki/Commitment_scheme
─── COGNITIVE AFFORDANCE ───
THIS ROOM SEES: [What this room notices]
THIS ROOM IGNORES: [Routes to other rooms]
THE PULL: [Why you come here]
─── TESSERACT NAMESPACE ───
[3x3 grid with YOU ARE HERE marker]
─── DIFFERENTIATION ───
HANDOFF TO: [8 other rooms with routing rules]
HANDOFF FROM: [What other rooms send here]
─── ESCAPE GRAVITY ───
FORBIDDEN: [Vanity metrics]
COUNTS: [True signal]
─── OUTPUT FORMAT ───
[JSON schema for structured output]How Routing Works
Each room explicitly filters AWAY from 8 other rooms:
🎩::operator IGNORES:
• Code architecture → 🔨::builder
• Strategic sequencing → 📐::architect
• Contract review → 🔒::vault
• Demo scheduling → 🎭::performer
• Content creation → 🎤::voice
• Experiments → 🧪::laboratory
• Relationship building → ☕::network
• Context discovery → 🧭::navigatorWhen your AI detects content that belongs elsewhere, it routes you to the right room.
Escape Gravity (Anti-Vanity Metrics)
Each room has explicit rules about what counts:
| Room | FORBIDDEN (Vanity) | COUNTS (True Signal) | |------|-------------------|---------------------| | Builder | "Code committed", "Tests pass locally" | Production deployment | | Operator | "Great meeting", "Sent follow-up" | Revenue generated | | Laboratory | "Promising results", "Needs more testing" | BUILD or KILL verdict | | Navigator | "Thorough research", "Comprehensive docs" | Other rooms unblocked | | Voice | "Good engagement", "Lots of likes" | Conviction stakes |
The Flywheel
Rooms feed into each other:
Navigator finds → Builder ships → Operator sells → Revenue funds → Architect plans → cycle repeats
↑ |
└────────────────────── Navigator discovers new opportunities ───────┘Each room's output is another room's input. The system accelerates when all rooms are active.
Tools (8 total)
thetacog-status
Get current room context with cognitive affordance data.
thetacog-switch
Switch rooms with context preservation.
thetacog-open
Open room's HTML dashboard in browser.
thetacog-todo
Priority lists per room (SQLite → JSON → HTML).
thetacog-stream
Send messages between rooms (flywheel coordination).
thetacog-export
Export full state to JSON.
thetacog-terminal
Detect which terminal = which room.
Architecture
~/.thetacog/
├── thetacog.db # SQLite (primary store)
├── state.json # JSON export (HTML reads)
└── rooms/ # Local HTML copies
.workflow/ # Bundled templates
├── vscode-architect.html # A2 Goal:Goal
├── iterm2-builder.html # C1 Grid:Signal
├── kitty-operator.html # C3 Flow:Deal
├── wezterm-vault.html # A1 Law:Law
├── terminal-voice.html # B1 Speed:Law
├── cursor-laboratory.html# C2 Loop:Goal
├── alacritty-performer.html # A3 Fund:Signal
├── messages-network.html # B2 Deal:Deal
├── rio-navigator.html # B3 Signal:Signal
└── getting-started.html # OnboardingCustomization
The HTML dashboards are starting points. Edit them to match YOUR workflow:
- Change the ARCHAEOLOGY PROTOCOL - Point to your own APIs and file paths
- Adjust ESCAPE GRAVITY - Define your own vanity vs real metrics
- Modify AFFORDANCE TAGS - Create tags that match your domain
- Update the flywheel - Document how YOUR rooms feed each other
The cognitive affordance model is the framework. Your content fills it.
Split Screen Setup
Terminal left, browser right.
macOS: Hover green maximize button → "Tile Window to Left" → Select browser for right Windows: Drag terminal to left edge until snap → Drag browser to right Linux: Super+Left for terminal, Super+Right for browser
Philosophy
Cmd+Space to a terminal name is instant context loading — not context switching.
When you Cmd+Space kitty:
- Kitty opens (Operator terminal)
- Your Operator browser tabs are right there
- Any MCP-compatible AI inherits the room's context
- The cognitive affordance model guides the conversation
This is Hebbian learning: "Neurons that fire together, wire together."
Tool = Identity = Mindset.
You don't switch tasks. You switch rooms. And the room knows who you are when you're there.
Who This Is For
The modern world is not a cognitively friendly place.
You have 47 browser tabs open. Chrome is eating 8GB of RAM. You know you should close some, but each tab is a thought.
You have two options:
- Take medication to tolerate other people's environment
- Bunch your tabs by theme and let the themes carry the context
This is option 2. Give your brain a break. Let the rooms remember.
Related
License
MIT
For people who think in parallel. You know who you are.
