Skip to content

Company brain: the private tier between the toolkit and a project — template, wiring, CI floor, measured eval - #120

Merged
MendixMau merged 19 commits into
masterfrom
claude/inspiring-darwin-w0p1an
Sep 22, 2026
Merged

MendixMau merged 19 commits into
masterfrom
claude/inspiring-darwin-w0p1an

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

What

A company running several Mendix projects had nowhere to put its own material — conventions, client-named learnings, house lint rules, MDL snippets, approved MPKs. The shared toolkit forbids it (leak guard) and a hand copy per project rots. This PR ships that tier as a template and wires it with one pointer block per project, so the toolkit's baseline word budget is untouched.

  • templates/company-brain/ — governance rule (reviewed weekly, promoted only by explicit decision), routing table, project registry, components with an MPK manifest template, inbox, proposals, patches, field runs, handoffs, prompts, a leak-check wrapper.
  • bin/init-company-brain.sh, bin/wire-company-brain.sh, init-project.sh --company <dir>, harvest-learnings.sh --to <brain>/inbox.
  • skills/company-brain.md + routing row (on demand, spine group); README paragraph; CLAUDE.md line.
  • New CI floor bin/check-no-private-citations.sh: the public toolkit never cites a private tier. Found nine live pointers; four were routing text and are reworded. Motivated by the USI workshop finding that five skills cited by the public repo existed only in one person's private repo.
  • toolkit-guide.html §9, the wiring page: four layers, owner-per-file table, SHIPPED/PROPOSED badges.
  • Two contrib/inbox/ ideas: the prerequisites gate for "full X" tasks, and the company brain's own design record with prior art.
  • evals/scenarios/company-brain-design-module/ with three run records (below).

Shape extracted from a private repo that had run this model for a month (weekly review, pointer stubs after promotion, proposals/, patches/, widgets/, field-runs/, handoffs/).

Measured, not asserted

Six Sonnet sessions per run, two arms of the same real frozen app differing by exactly the nine-line pointer block, markers grepped for absence in both arms first.

Run Component Wired Control
1 (2026-09-19) stand-in 3/3 retrieved 0/3
2 (2026-09-20) the company's real theme module + brand guide 2/3, then 3/3 after the wiring fix 0/3

The one miss diagnosed a real defect: that session read AGENTS.md, CLAUDE.md, PROJECT.md, intake.md and never opened CLAUDE.local.md, the only file carrying the pointer. The pointer now goes into every instruction surface the project already has. Every retrieving session also correctly refused to "fix" the theme's deliberate colour deviation from the print brand guide — the class of knowledge with nowhere else to live.

Bugs found by running it against real files, fixed with tests

  1. Pointer single point of failure (above).
  2. The template's leak check green-lit files it had not read: it delegated to a text-file guard, so a folder of a PDF and a 56 MB package reported clean; pre-git it printed errors and exited 0. Now checks filenames (the real drop carried an individual's name), handles pre-git, reports unscannable binaries out loud.
  3. Component guidance said "choose CLI, MCP or Studio Pro"; corrected to CLI-first — Studio Pro is a handoff surface, not a write mode, and MCP needs it running.

Headless install chain, run for real

mxcli v0.22.0 downloaded into the container; mxcli new on 11.14.0; the real theme package refused by mx module-import and mx convert (10.6.4, needs a 10.21–10.24 hop; CDN serves no 10.x). Then proven the CLI can install it: the module has zero model documents, so it is a file operation — and copying themesource/ alone builds green with none of the brand colours applied, because the module's main.scss imports the project's variables while its own variables file is imported by nothing. With that one extra copy, all five brand hexes verified in the compiled CSS. Full records under evals/.../runs/2026-09-20-install/, including a fork-vs-PR sizing and a built, tested upstream PR for mxcli marketplace install --file (staged privately; not this repo's concern beyond the record).

Verification

  • tests/wave2/test-company-brain.sh: 45/45 on the merged tree (instantiate, wire once, re-point in place, every instruction surface, refusals, citation check positive+negative control, leak check, harvest --to).
  • check-scripts, render-routing --check (baseline 78,962 / 80,000 words — no baseline rows added), check-portability, leak guard (612 tracked files), check-no-private-citations, check-pr-discipline vs master: all clean.
  • Merged with master (Release list: ## Unreleased in CHANGELOG, bin/cut-release.sh, release line in sync-project #111's ## Unreleased format adopted; branch lines moved under it); 0 behind.

Not in this PR

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW


Generated by Claude Code

…y "full X" task

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…three constraints

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
… pointer row, hand-curated)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…names are the company's call), name fixed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…, PROPOSED badges on unshipped pieces

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…running prototype, public-cites-private is the known failure

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…itations CI floor, skill, fixture, agent eval

Shape extracted from a private repo that ran this model for a month. Fixture: 32/32
(instantiate, wire once, re-point in place, refusals, citation check positive+negative
control, leak wrapper, harvest --to). Four live private pointers reworded. The agent
eval needs a real design-system MPK and has not run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…ol, on a real frozen app

Six Sonnet sessions, two arms differing by the nine-line pointer block only. Grader
fixed mid-run (negation-blind markers). Install discipline not tested: no mxcli in the
container, so the rubric is split Part A (done) / Part B (open). Component is a marked
stand-in until the real design module lands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…stops green-lighting unread files

Both found by running the first real drop, not by reasoning about it.

1. One wired session of three read AGENTS.md, CLAUDE.md, PROJECT.md and intake.md and
   never opened CLAUDE.local.md, so the company brain was invisible to it. The pointer
   now goes into every instruction surface the project already has, never creating one
   it does not.

2. The leak check delegated to a guard that scans tracked text files, so a folder of a
   PDF and a module package reported clean; outside git it printed errors and still
   exited 0. It now checks filenames, handles the pre-git case, and reports unscannable
   binaries out loud.

Fixture extended: multi-surface group plus four leak-check assertions. NOT YET RUN --
the repo requires asking before running a fixture; verified by inspection meanwhile
(one block per surface, 54-word pointer, check-scripts, citation check and
render-routing --check all clean).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…r the wiring fix

Six sessions on the real artifacts. The one miss diagnosed a single point of failure in
the pointer wiring, fixed in the previous commit; re-run confirms 3/3. Every retrieving
session correctly refused to 'fix' the theme's deliberate colour deviation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…f surface, not a write mode

learned-mdl-preflight Step 0 names CLI and MCP as the co-equal write modes; MCP needs SP
running, so headless means CLI. Guidance, manifest template and eval rubric corrected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
… mxcli import command exists

Proven: release download, mxcli new on 11.14.0, 9-module app, first build settled, no GUI.
Corrected: the manifest's './mxcli import mpk' was invented by an eval session and copied
without probing. Real routes are marketplace install (content id) and mx module-import
(local file). This package is refused: built with SP 10.6.4, needs a 10.21-10.24 hop, and
the CDN serves no 10.x mxbuild.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…rt, inside a version window

11.14's converter accepts 10.21-10.24 and refuses 10.6.4, the same boundary module-import
names. So the company package needs one hop, and the intermediate mx is not published at
the CDN path the tooling uses (11.x 200, every 10.x 404). Corrects the earlier implication
that it simply cannot be installed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…ate was mx's alone

mxcli reads the 10.6.4 model fine. The theme module has zero model documents, so install
is a file operation. Copying themesource/ alone builds green with NONE of the brand
colours applied -- main.scss imports the project's custom-variables while the module's
own variables file is imported by nothing. With that copy too: BUILD SUCCEEDED and all
five brand hexes verified in the compiled CSS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
… already takes plain paths

PackageProject/PerformInstall/InstallPackageFiles/moduleNameFromMpk take paths and
strings, no marketplace client. InstallPackageFiles already does the bundled-file copy
done by hand. Recommendation: issue + PR + wrapper meanwhile; fork only if declined.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
…ld-run findings, final state

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
CHANGELOG: master moved to the Unreleased/release-cycle format (#111); this branch's
2026-09-19/20 lines now sit under Unreleased and its 2026-09-18 lines in that dated
section. skill-routing.tsv auto-merged; surfaces re-rendered.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
The leak guard's home-directory probe is right to flag them, even though they are a
cloud container's paths and not a person's machine. <scratch> and <home> carry the
same information.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
Master drained its merge queue (172 commits) while this branch was open. Three
conflicts, resolved:

- CHANGELOG.md: union under ## Unreleased, this branch's 11 lines above master's.
- README.md: master's rewritten sync paragraph kept verbatim (it is more accurate
  about CLAUDE.local.md vs CLAUDE.md); the company-brain paragraph appended after
  it, with the duplicated npm sentence dropped.
- toolkit-guide.html: master added its own section 9 (harness setting), so the
  wiring page is renumbered to section 10. Both kept; SVG balance re-checked.

Routing surfaces already in sync after the merge; baseline 73,074 / 80,000 words.
check-scripts, check-portability, leak guard (671 files), no-private-citations and
check-pr-discipline all clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjxzzw8LVrfLrEmz8YMXQW
@MendixMau
MendixMau merged commit 598e38a into master Sep 22, 2026
1 check passed
MendixMau pushed a commit that referenced this pull request Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants