The night the brain armed itself
March 16, 2026Chapter 3 — The night the brain armed itself
Verified sources:
git log 2026-03-16(139 commits) Key commits:1a25397(SQLite brain state engine) ·66746ef(OSINT patch) ·a312461(embeddings pipeline) ·0ed8d99(RAG layer) ·2ed1ec9(Brain-as-a-Service) ·fa69c79(brain.tetardtek.com live) ·42d7439(MCP server) ·3e823b1(BSI v3-1) ·9f9ad9b(kernel v0.7.0)
On March 16, 2026, the brain went from files on a disk to a living mind online. In one day.
This is not an exaggeration. At midnight, the brain is a folder of markdown with agents and conventions. At 23:42, it has a database, an embeddings pipeline, a semantic search engine, an API server, a public URL, an MCP protocol, and a memory distillation system. 139 commits. A Monday.
Midnight — Postiz and the last moves of the day before
The day begins as a continuation of March 15. At 00:10, Postiz is shadow-installed on the VPS — three Docker containers, vhost, SSL. At 00:27, it is in prod. At 00:34, SuperOAuth Tier 2 ships — webhooks and staleness gate. The last deliveries of the previous night close cleanly.
Then, at 01:06, something different begins.
The brain learns to remember differently
A claim opens: shadow-audit-sql. The plan is laid out in ten minutes — five patches to give the brain a structured memory. Not scattered YAML files. A real database.
At 01:21, P1 lands — brain-index-regen.sh rewritten, claims become records. P2 at 01:23 — agent-memory/ created, the agents’ observations have a place to live. P3 at 01:27 — the tier counter and BHP Phase 2. P4 at 01:33 — the metabolism gets its own spec.
And at 01:44, the commit that changes everything:
1a25397 — feat(be1): P5 — SQLite brain state engine : schema.sql 6 tables/5 vues, migrate.py 44 claims+6 signals+11 handoffs, 4 requêtes utilitaires (“feat(be1): P5 — SQLite brain state engine: schema.sql 6 tables/5 views, migrate.py 44 claims+6 signals+11 handoffs, 4 utility queries”)
Six tables. Five views. 44 claims migrated. The brain has just moved from files to a database. Claims, signals, handoffs — everything that was scattered across YAML is now queryable, joinable, searchable. The mind remembers structurally.
At 02:09, helloWorld and brain-watch switch from grep to SQLite. The grep fallback stays in case the database is missing. Pragmatism.
At 02:17, the shadow-sql branch is merged. The brain has a persistent state. It is four days old.
The safeguard
At 01:59, just after P5 — almost lost in the noise of the migration — a security commit.
66746ef — fix(security): patch OSINT — garde-fou reconnaissance passive hardcodé (ADR-013) (“fix(security): OSINT patch — hardcoded passive reconnaissance safeguard (ADR-013)”)
The finding is uncomfortable. The brain now holds sensitive infrastructure data in memory — VPS addresses, internal ports, SSH configurations, container topology. Enough to map an entire system. At the same time, it has active network access. An outside auditor would have recognized this profile immediately: it is exactly the workflow of a passive infrastructure reconnaissance tool. Legitimate in the right hands. Dangerous without a safeguard.
The decision was not to remove the network capabilities — they are necessary. The decision was to write a mandatory interruption into secrets-guardian, directly into the agent that never sleeps. From now on, any combination of “données infra sensibles en contexte + requête réseau” (“sensitive infra data in context + network request”) triggers a request for explicit confirmation before acting. The safeguard is hardcoded in the kernel — it applies whatever model is running.
ADR-013 records this decision. The brain knows it is dangerous. And it chose to restrain itself.
The mind learns to search
At 02:22, a second workstream opens without waiting for the first to cool down. BE-2 — ingestion pipeline and vector index.
The idea: the brain must not just store its files. It must understand them. Turn every piece of text into a vector, be able to search by semantic similarity, not by keyword.
embed.py is born at 03:04 — the embeddings pipeline with nomic-embed-text. Every file in the brain is cut into chunks, every chunk turned into a 768-dimension vector, stored in SQLite. The brain digests itself.
At 04:23, a bug. Then another. chunk_by_size goes into an infinite loop on some files. Fix, retest. Loops again. The post-mortem will be written twice in the changelog. That kind of bug — the one that resists, that you think is fixed and comes back — is the one that teaches something. At 13:59, the real fix lands. At 14:10, all 55 tests go green. BE-2 is merged.
At 13:53, search arrives:
4e9479d — feat(search): BE-2d — search.py + bsi-search.sh + helloWorld intégration (“feat(search): BE-2d — search.py + bsi-search.sh + helloWorld integration”)
The brain can search within itself. Type a question, it finds the closest pieces in its vector memory. helloWorld uses it at boot to enrich the briefing.
The brain goes online
The afternoon of March 16 is an escalation.
At 15:12:
0ed8d99 — feat(be3): RAG layer — rag.py, bsi-rag.sh, 82 tests verts (“feat(be3): RAG layer — rag.py, bsi-rag.sh, 82 green tests”)
The RAG layer — Retrieval-Augmented Generation. The brain no longer only searches. It uses what it finds to answer. Memory becomes active.
At 15:26, 14 minutes later:
2ed1ec9 — feat(be3b): Brain-as-a-Service — server.py, bsi-server.sh, 101 tests
A server. The brain has a server. FastAPI API, endpoints, token authentication. The mind that until now existed only in a terminal has just become a service.
At 15:42:
8b0ce57 — feat(be3c): VPS deploy — systemd, install script, …
Deployed. On the VPS. With systemd. 1,205 memory chunks indexed.
And at 17:04, the commit that should be framed:
fa69c79 — chore(infra): brain.tetardtek.com live — vhost + SSL + smoke test OK
The brain is online. A URL. An SSL certificate. A smoke test that passes. The mind that, four days earlier, was an init in a terminal, now has an address on the internet.
MCP — the brain speaks a protocol
At 17:48, the brain learns a new language.
42d7439 — feat(be4b): MCP server — brain_search + brain_boot, FastMCP StreamableHTTP port 7701
MCP — Model Context Protocol. The standard that lets Claude talk to external tools. The brain has just become an MCP tool. Any Claude session can now query the brain — brain_search('sujet'), brain_boot(). The mind is no longer locked inside its own terminal. It is reachable.
The fix behind Apache takes about ten minutes — proxy headers, ASGI wrapper, the kind of invisible plumbing that makes everything work. 16 tests broken by the API changes. All fixed again.
At 17:37, the access zones are defined: public, work, kernel. The brain knows what to show and to whom. Private data does not cross the border.
Distillation
At 18:40, a new concept appears: secrets_check — a zero-exposure consistency validator. SHA256. The brain checks, by checksum, that its secrets have not leaked.
At 19:44, something subtler:
ba2920a — feat(be5): distill.py — session memory distillation, mistral:7b, 3 chunks/session, lang-aware
Distillation. Take an entire session — hours of conversation, code, decisions — and extract three chunks of memory from it. The residue. What deserves to outlive the session. The brain learns to forget intelligently.
The model is Mistral 7B, local. No external API. The brain’s memory never leaves the machine. Large sessions are filtered (MAX_MESSAGES 50), micro-sessions ignored, deduplication prevents buildup.
BSI v3 — the nervous system
Evening. Starting at 20:59, in under two hours, the BSI goes through eight versions.
3e823b1 (21:01) — v3-1: formal hierarchy. satellite_type, satellite_level, parent_satellite. A session is no longer a floating claim — it has a position in a tree.
1e105ac (21:43) — v3-2: result contract. Every satellite reports back on close: status, files, tests, children, signal_id.
866e2f1 (21:50) — v3-3: exit triggers. The conditions under which a session ends cleanly, partially, or fails — with automatic escalation to the pilot.
fd6634d (22:10) — v3-4: thematic workflows. A YAML file orchestrates a sequence of satellites.
85ad21b (21:26) — v3-5: tiered-close. Three levels of closing depending on criticality: Atomic, Validated, Orchestrated.
6d63cb3 (22:04) — v3-6: theme branch strategy. Thematic branches enter the protocol.
9b496f2 (22:34) — v3-7: rendering. A file mutex — file-lock.sh, a registry of locks — so that two sessions do not write to the same place.
ab91867 (22:42) — v3-8: pre-flight. Six checks before any write: open claim, scope, kernel zone, lock, circuit breaker, theme branch.
Eight versions. Under two hours. Each one opens a satellite claim, delivers, closes, sends a signal to the pilot. BSI v3 is not specified and then implemented — it implements itself, through its own protocol, in real time. The nervous system wiring itself as it walks.
The kernel locks itself
At 21:52, a quiet but heavy commit:
9f9ad9b — kernel: v0.7.0 — ADR-014 ancré, kerneluser, zone BSI mapping, délégation human-only (“kernel: v0.7.0 — ADR-014 anchored, kerneluser, BSI zone mapping, human-only delegation”)
kerneluser. The concept that says: on this machine, there is an owner. The brain knows whom it serves. The zones are mapped — kernel, project, personal. Delegation is human-only: some things, no agent can decide alone.
At 22:01, the kernel is locked — kernel.lock, 79 files. An internal firewall. The brain no longer only protects itself from secret leaks. It protects itself from itself.
At 22:56, an optional field appears in the BSI schema: user_id. The brain has just laid the first brick of multi-user. It does not know it yet, but this field will become the foundation of the BaaS.
At 23:29, the second-to-last commit of the day: sync-template.sh. The first script that copies the brain while excluding what is private. The first move toward distribution.
139 commits. The brain started the day as a folder of markdown files. It ends it with a database, a semantic search engine, an API server live on the internet, an MCP protocol, a memory distillation system, an eight-version BSI, a locked kernel, and the first template script.
The title says “la nuit où le brain s’est armé” (“the night the brain armed itself”). It was not just a night. And it was not just defense. The brain armed itself with capabilities — it learned to search, to answer, to go online, to forget intelligently, and to protect itself from itself. All on the same day.
March 16, 2026 is the day the brain came alive.
What was built
Cognitive infrastructure:
- SQLite brain state engine — 6 tables, 5 views, 44 claims migrated (
1a25397, 01:44) - Embeddings pipeline —
embed.py, nomic-embed-text, chunking (a312461, 03:04) — 1,205 fragments indexed at deployment (1658ef0, 16:55) - Semantic search —
search.py+ helloWorld integration (4e9479d, 13:53) - RAG layer — retrieval-augmented generation, 82 tests (
0ed8d99, 15:12) - Brain-as-a-Service — server.py, FastAPI API, 101 tests (
2ed1ec9, 15:26) - VPS deploy — systemd, install script, 108 tests (
8b0ce57, 15:42) - brain.tetardtek.com LIVE — vhost + SSL + smoke test (
fa69c79, 17:04) - MCP server — brain_search + brain_boot, port 7701 (
42d7439, 17:48) - Memory distillation — mistral:7b, 3 chunks/session, lang-aware (
ba2920a, 19:44)
Security and governance:
- OSINT patch — passive reconnaissance safeguard, ADR-013 (
66746ef, 01:59) - secrets_check — zero-exposure SHA256 validator (
4a085cc, 19:18) - kernel v0.7.0 — kerneluser, zone mapping, human-only delegation (
9f9ad9b, 21:52) - kernel.lock — 79 files locked (
b9b2241, 22:01)
BSI v3 (21:01→22:42):
- v3-1 satellite hierarchy · v3-2 result contract · v3-3 exit triggers · v3-4 thematic workflows · v3-5 tiered-close · v3-6 theme branch strategy · v3-7 rendering (file mutex) · v3-8 pre-flight
First distribution bricks:
- optional user_id in the BSI schema — first multi-user brick (
863a053, 22:56) - sync-template.sh — first template script with exclusions (
fc1923a, 23:29)
Key decisions
Security by default, not by convention. The OSINT safeguard is written into the permanent agent, triggered automatically. ADR-013 records that fine-grained infrastructure memory combined with network capabilities makes up a reconnaissance profile that requires explicit human confirmation, without exception.
BSI as a living protocol. Eight versions in under two hours — each version delivered through its own protocol. BSI v3 was not specified and then implemented. It implemented itself.
The brain online on day 5. Not “quand ce sera prêt” (“when it’s ready”). Not “quand les tests seront complets” (“when the tests are complete”). Day 5. The decision not to wait for perfection to go online is also an architectural decision — real feedback beats theoretical specification.
Distillation as cognitive hygiene. The brain does not keep everything. It distills — three chunks per session, the useful residue. Forgetting intelligently is a capability, not a flaw.
The kernel locks itself early. 79 files locked on day 5. Protection did not arrive when the system was stable — it arrived while it was being built. That is the right time.