agentleFS
ArylmeraArylmera/Geneseed/CLAUDE.md

Geneseed

CLAUDE.md1 starsChanged 2 months agoMITView on GitHub

Geneseed generates agent-harness configuration — laws, doctrines, skills, agents — from src/ and themes/, and installs it into host tools (Claude Code, OpenCode, Bob, OpenClaude). It ships as an npm package and as a plain git clone that self-updates with git pull. Start with js/README.md — the module map, and the "where do I add X" table. For what an addition costs, docs/extending.md is the standing answer. There is no npm test. Run these by hand. Quote the glob —…

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Expected values are written out, not recorded: Every table in tests/ states its answers in the file — tests/unit/text_layout.test.mjs and …

    line 69
  2. Very specific:

    After a rebuild, geneseed web restart, not a browser refresh: the daemon serves the index.html it launched with.

    line 78
  3. Very specific:

    Rule ids are permanent; numbers are positional: Every law and doctrine rule is declared ### {{LAW:<id>}} <Principle> / ### …

    line 94
  4. Very specific:

    Never rename an id; a removed one goes into RETIRED_RULE_IDS (js/build/source.mjs) so it is never reused.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Geneseed — working in this repo

Geneseed generates agent-harness configuration — laws, doctrines, skills, agents — from src/ and themes/, and installs it into host tools (Claude Code, OpenCode, Bob, OpenClaude). It ships as an npm package and as a plain git clone that self-updates with git pull.

Start with js/README.md — the module map, and the "where do I add X" table. For what an addition costs, docs/extending.md is the standing answer.


The three binaries, and how to tell them apart

bin/geneseed-cli.mjsgeneseed — the user-facing CLI. 20+ verbs, parsed from js/cli-table.json. May not spawn (transitive child_process ban; doctor's node --check is the one allow-listed exception)
bin/geneseed-hook.mjsgeneseed-hook — what the emitted settings.json invokes on every tool call. Five verbs, refuses everything else by name, ~14 ms to load
bin/build-driver.mjsgeneseed-build — the generator. Render flags (--emit/--theme/--footprint/--out/--sync-themes) and the emit targets. Also under a hard child_process ban

Proving a change

There is no npm test. Run these by hand.

npm run lint
node --test --test-reporter=tap "tests/**/*.test.mjs"

Quote the glob — node expands it, not the shell — and keep --test-reporter=tap: CI gates on the reported count, not the exit code, because node --test over a glob that matches nothing prints # tests 0 and exits 0. A gate that fails open.

node tests/shim_intact.mjs

Right after the suite: the only check that no test left the machine-wide hook shim pointing at a deleted temp directory (which silently kills every hook on the machine).

node bin/geneseed-cli.mjs doctor --all
node tests/golden.mjs

Runs all 263 emit configurations and requires each to render without crashing. Run it after anything that touches the emit path. Its --idempotent mode re-emits into the same tree and requires the second pass to change nothing; --deletion covers the prune phase. All three are self-comparisons — nothing is measured against a stored answer. --cli runs the ~320-cell CLI/hook matrix against the expectations written in each cell; run it after changing anything a verb prints. --jobs N (default: min(8, cores)) fans the cells out across processes.

node tests/mutate.mjs --verify

Answers only "does every mutation anchor still resolve", writes nothing, takes ~50 ms. Run it after any refactor that moves code — a moved anchor makes a row unappliable, which the matrix scores as a SURVIVOR. --all runs the real 33-row matrix and takes minutes; an interrupted run leaves the product tree mutated, so check git status before doing anything else.

What bites

Expected values are written out, not recorded. Every table in tests/ states its answers in the file — tests/unit/text_layout.test.mjs and tests/unit/settings_jsonc.test.mjs are the pattern. There is no snapshot directory and no --record: if a change makes a row wrong, change the row and the sentence above it explaining the rule, in the same commit, and say why in the message. A test whose expectation nobody can defend in words is a test nobody can maintain.

web/dist/ is tracked, and must be rebuilt and committed whenever web/src/ changes. It ships in files[] so an install never has to build the UI. git diff alone is not enough to check — vite content-hashes every chunk, so a new lazy chunk is an untracked file git diff cannot see. After a rebuild, geneseed web restart, not a browser refresh: the daemon serves the index.html it launched with.

Runtime dependencies must be vendored, never installed. js/vendor/<name>/, tracked source, relative import. tests/unit/dependency_policy.test.mjs gates it and docs/extending.md §4bis says why — the short version is that fixtures run from the OS temp root and cannot resolve a bare specifier, and neither can a fresh git clone. devDependencies are fine.

The hook path costs ~14 ms per tool call. Anything bin/geneseed-hook.mjs imports is paid on every tool call of every session. And a stray console.log there does not warn you — the hooks signal through stdout JSON and return 0 on every path, so a printed byte turns a blocking gate silently permissive.

Adding any tracked file fails the packaging suite until it has a row, with a written reason, in the SHIPS or WITHHELD partition of tests/unit/package_manifest.test.mjs.

Rule ids are permanent; numbers are positional. Every law and doctrine rule is declared ### {{LAW:<id>}} <Principle> / ### {{DOCTRINE:<id>}} <Principle> and cited {{LAW:<id>}} / {{DOCTRINE:<id>}} — never by number, which the doctor refuses. The render computes the number from position and renders a citation as the principle's name, so removing a rule rewires nothing. Never rename an id; a removed one goes into RETIRED_RULE_IDS (js/build/source.mjs) so it is never reused. Append anyway where you can: LAW_META, LAW_CLASS, DOCTRINE_META, exclusions and the hook ledger keys are still number-keyed (doctor-pinned) — docs/extending.md §2e.

--footprint defaults to lean. A law's lean text is the authored LEAN:else half of its block in src/laws/universal.md — amend both halves, or the amendment does not exist for most installs. A doctrine rule carries the same block in src/doctrines/<pack>.md — amend both halves there too, or the amendment does not exist for most installs either.

Counts are computed — never type one. {N_*} tokens substitute at request time, and only on kind: "concept" pages. README badges and SHIPPED.md are the hand-written exceptions, each with its own doctor arm.

Nothing propagates by itself. Editing src/ changes nothing on any machine until something re-emits, and geneseed rebuild-all is best-effort by contract.

Conventions

ESM only, .mjs, zero runtime dependencies. Docblocks in this repo carry why, not what — they are the reason a maintainer can still understand a decision, and they are worth reading before editing the code under them. When one contradicts the code, the code wins and the docblock is a bug.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.