agentleFS
uHappyLogicuHappyLogic/cairn/CLAUDE.md

cairn

CLAUDE.md2 starsChanged 2 months agoMITView on GitHub

A plugin (cairn) for Claude Code, Antigravity, and Codex that brings a milestone's important questions up to be decided before work starts, so execution can then be handed to agents. It ships as a set of skills, a few agents, shared procedures, and the stdlib-only Python tools under tools/ (among them the open-question tool, the only writer of each milestone's open-question document once it is created) that move a project from a vague idea through discussion, planning, completion, and archival…

The file

Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this repo is

A plugin (cairn) for Claude Code, Antigravity, and Codex that brings a milestone's important questions up to be decided before work starts, so execution can then be handed to agents. It ships as a set of skills, a few agents, shared procedures, and the stdlib-only Python tools under tools/ (among them the open-question tool, the only writer of each milestone's open-question document once it is created) that move a project from a vague idea through discussion, planning, completion, and archival — one milestone at a time.

Commands

uv run scripts/build_hosts.py                           # rebuild hosts/ from core/ after any change under core/ or scripts/hosts/
uv run scripts/build_hosts.py --check                   # drift gate: fails if the committed hosts/ trees differ from a fresh build
uv run pytest                                           # Python tool suite under the pinned interpreter (.python-version)
uv run --no-project --python 3.9 --with pytest pytest   # the same suite at the 3.9 floor; run both before committing a tool change
uv run scripts/set_version.py X.Y.Z                     # bump VERSION and its three mirrors; releases go through /release-plugin instead

Repository layout

Each entry names the file that documents itself; read that file rather than expecting the detail here.

AGENTS.md                        — symlink to CLAUDE.md; never edited directly
VERSION                          — bare MAJOR.MINOR.PATCH, the single source of truth; written by set_version.py, read by build_hosts.py
.claude-plugin/marketplace.json  — the maintainer's directory marketplace pointing at ./hosts/claude; users install from the distribution repos
core/                            — the host-neutral runtime layer (skills/, agents/, shared/, tools/); cross-references use {{PLUGIN_ROOT}}, no file names a host
core/skills/<name>/SKILL.md      — one skill per directory
core/agents/*.md                 — the two dispatched subagents (complete-task, provide-alternatives-to-open-question)
core/shared/*.md                 — the shared procedures, each the single source of truth for one unit of work referenced by two or more runners
core/tools/open_questions.py     — the stdlib-only (Python 3.9+) open-question tool; run `--help` for its subcommands and contract
core/tools/define_milestone.py   — the stdlib-only (Python 3.9+) milestone-definition tool: numbers and slugs a new milestone, creates its directory with the four files (the empty open_questions.xml included), prints the commit subject and directory
scripts/hosts/<host>/            — one declarative host definition per host: settings.toml plus that host's manifest, README, CONTRIBUTING pointer, and traffic-workflow templates
scripts/build_hosts.py           — the one generic host build and validation gate (see its docstring and CONTRIBUTING.md ## Development)
scripts/set_version.py           — writes VERSION and its three mirrors (marketplace.json, pyproject.toml, uv.lock) in lockstep; touches no git
tests/                           — pytest suite of the tools under core/tools/, one flat test_<name>.py per subcommand or concern, golden fixtures under tests/fixtures/
hosts/<host>/                    — committed build output, never hand-edited; published verbatim into uHappyLogic/cairn-<host> at release
.claude/skills/release-plugin/   — maintainer-only release skill, outside core/ so no host renders it
milestones/                      — this repo's own milestones (self-dogfooding); milestones/README.md holds the Current milestone: pointer
milestones/answer_decision_principles.md — project-wide principle store read by recommend-procedure.md, written only by capture-milestone-principle-updates
.github/workflows/drift-gate.yml — CI: --check then both pytest runs in one job; actions pinned to SHAs bumped by hand
.github/workflows/traffic-badges.yml — daily traffic-badge workflow; its copies under scripts/hosts/ are kept in sync by hand (grep github-traffic-badge@)
docs/                            — workflow.md (phase narrative, how skills commit, learning loop), skill-reference.md (one entry per skill), design-claims.md, ways-of-using-cairn.md (headless chains)
README.md, CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, CHANGELOG.md, LICENSE — landing page, contributor guide (## Development is the build loop), root-only policy files, release notes written by /release-plugin

Skills and the workflow they encode

The skills form a linear pipeline; docs/skill-reference.md describes each one and docs/workflow.md the phases. Each skill's SKILL.md is its exact behaviour.

init-milestone-base-workflow        ← one-time bootstrap: git work-tree check first, then python3 ≥ 3.9, then milestones/ + milestones/README.md; commits under Workflow-bootstrap: milestones
discuss-milestone-goal              ← conversational, creates nothing
define-milestone-goal               ← creates the milestone directory with its four files
specify-milestone-starting-state    ← fills "Relevant starting state"
review-milestone-requirements       ← repeatable loop engine and sole author of <open-question> blocks; reports convergence
provide-alternatives-to-all-open-questions ← annotating pass 1: one read-only subagent per block lacking alternatives, embedded through the tool
recommend-all-open-questions        ← annotating pass 2: picks inline over the whole set, then sorts the document
discuss-open-question               ← conversation about one question; offers answer-open-question and modify-milestone-goal
answer-open-question                ← records a literal answer (Manual-answer:)
answer-open-question-with-recommendation ← records one question's embedded recommendation (Recommendation-answer:), inline
answer-all-open-questions-with-recommendation ← inline sweep in the tool's walk order, dispatching no agent, one commit per answer
answer-open-question-with-alternative ← records a named embedded alternative (Alternative-answer:); skill only
modify-milestone-goal               ← edits ## Goal and clears the picks it undermines with one non-transitive strip, committed together; surfaces the rest, never cascades
derive-tasks                        ← decomposes requirements.md into brief-level tasks; precondition: no open question
submit-task / discuss-new-task      ← ad-hoc task entry (author one brief / clarify into briefs)
complete-all-tasks / complete-task  ← orchestrator over the complete-task agent / inline single task
ask-in-milestone-context            ← read-only Q&A
finish-current-milestone            ← records completion, clears the pointer to none; capture is a conventional follow-up, never a precondition
capture-milestone-principle-updates ← on-demand harvester of one milestone's answer commits into the principle store
goto-next-milestone                 ← activates the lowest-numbered undone milestone without asking; requires the pointer to read none

Milestone file structure

Each active milestone lives at milestones/milestone_<N>_<slug>/ and contains exactly requirements.md (Goal, Relevant starting state, Decisions, Out of Scope — prose only), open_questions.xml (created empty with the milestone, then written only by the open-question tool, in its canonical form; empty means converged), TASKS_TODO.md, and TASKS_DONE.md (## headings + --- separators). milestones/README.md is the source of truth for which milestone is current. Milestones defined before the XML split (this repository's milestone_01–milestone_27) hold the three Markdown files only; there is deliberately no migration of and no compatibility with them.

Invariants to preserve when editing skills

These are the design decisions a later editor must not "fix" back. The mechanics they name live in the runtime files, the tools and their tests, and docs/; only the rationale lives here.

  • The open-question tool is the only writer of open_questions.xml once it exists, not its sole reader. The milestone-definition tool creates the empty document with its milestone directory; after that, every listing of or change to the question document is a tool call, invoked at every site as the one fixed command python3 {{PLUGIN_ROOT}}/tools/open_questions.py <subcommand> <MILESTONE_DIR> … (the resolved directory, never the file path or the pointer; free text on stdin as a quoted heredoc; never python). A user-invoked skill running inline in the conversation, or a shared procedure followed by one, that needs the whole set to reason over reads the file directly, for reasoning only; a dispatched agent never does — dispatched agents reach the question document only through the tool. That ban's placement scopes it to this one document, so it needs no carve-out for the other files an agent reads whole (the complete-task agent reads TASKS_TODO.md whole, both agents read requirements.md whole as prose). Runtime prose states the tool's contract in at most one sentence per site and never restates escaping, indentation, boundary tokens, or reconciliation mechanics. The pre-milestone-27 awk/sed/grep boundary-line idiom stays retired. There is no hand-edit exception anywhere: a stale alternative set or pick is cleared with the tool's strip / strip --recommendation and a re-run.
  • Tidy vs. record. review-milestone-requirements is the sole author of question blocks and may remove one only as cleanup of already-recorded state (a decision that covers it, or an exact duplicate); when in doubt it flags rather than deletes. Recording a decision lives only in core/shared/answer-procedure.md. This boundary is the whole reason the two stay separate.
  • Fold before remove. In the answer core the decision is folded into ## Decisions before the block is removed, so an interruption leaves the harmless superset (decision recorded, block still standing) rather than a lost decision. Do not swap the order back.
  • One reconciliation engine, strip on doubt. remove is the only reconciliation, and both of its reconciling inputs ride its one write. --option: the answer core passes the lifted option id verbatim (never derived by parsing ANSWER), and a literal answer gets one prose verdict on whether it plainly settles on one of the block's own alternatives, passing nothing otherwise. --undermined: the standing picks on other questions that a hand answer undermines, reconciled as dependents no <depends-on> tag declares, in the same write as the tagged ones, transitively and keeping their alternatives. The named set exists because a tag is the only record of what a pick assumed and a pick formed before the answer cannot declare it, so without the naming the answer sweep would record a pick formed without that answer. The naming is judged in core/shared/hand-answer-procedure.md, which both hand-answer skills follow and which composes over the answer core, never in the core itself: the core stays a pass-through recorder that gained one input and no branch, and answer-with-recommendation-procedure.md (hence the sweep and answer-open-question-with-recommendation) passes nothing. The judgment reads the recommended option's text and the pick's one-line rationale against the answer (the option can no longer be carried out, or the stated reason no longer holds) without re-forming the recommender's judgment, and it runs on every hand answer: an answer matching the answered block's own pick is no exemption, because that pick says nothing about whether the other blocks' picks were formed against this outcome. The tool resolves every named title before it changes anything, refusing an unknown title (or the answered block's own) with the document unchanged so a mistyped name never silently leaves a stale pick standing, but it accepts a named block that carries no pick and leaves it exactly as it stands, seeding no transitive strip, since over-naming a pick-less block costs nothing and must not abort the answer. Costs are asymmetric — a stripped dependent keeps its alternatives and costs one recommendation re-run, a kept stale rationale becomes a wrong recorded decision — so doubt strips, in the --option verdict and the undermined-pick judgment alike. The cascade never clears an <alternative>; there is deliberately no separate reconcile subcommand; stripped, untagged, or named dependents get no console advisory and no line in the commit body (the commit diff records them and the next recommendation pass surfaces them by construction).
  • Two annotating passes, split at enumerate vs. pick. The alternatives pass fans out one read-only subagent per bare block (in parallel where the host can, with no cap and no ordering — siblings are scope only, never assumed settled, which is what makes parallelism and outliving later decisions safe) and commits per question with no body. The recommendation pass dispatches no agents, reasons over its whole filtered set inline, writes blocks in any order, leaves standing picks untouched (idempotency is the --without-* filter plus the tool's refusal, never prose discretion), picks the best surviving option on a stale set and skips only a block no option of which survives, commits once per run with the lifted lines as body, then sorts and commits the reorder separately behind the dirty-path guard. Both passes gather once (a run only adds children, so the set never shrinks under it), have no clean-tree precondition, and leave stale <depends-on> tags alone after a refresh (a tag records what a dependent assumed; only the answer-time cascade reconciles it). The retired per-question recommendation commit, the sequential recommend-agent sweep, and its most-significant-first ranking must not be restored.
  • The two halves of the analytical core (alternatives-procedure.md, recommend-procedure.md) stay two files because their grounding genuinely diverges: only the pick half loads the principle store (a weighted advisory factor, cited when it bore, never a filter or veto) and carries the sibling-disclosure duty and the stale-set rule; the enumeration half forms no preference. Neither carries XML markup or the "what would change your mind" layer — the writing runners own the rendering, discuss-open-question owns the conversation.
  • An alternative set is distinct and covering, with no count. Step 2 of alternatives-procedure.md maps the decision space rather than shortlisting candidates: it names the axes of the underlying decision first (values taken from the decision, not from the list the wording offers; a degree is an axis; each premise the wording takes for granted is an axis valued accept or reject; every axis has a none position), builds each option as one position on every axis, and tests the result — distinct (every two options differ in substance on at least one axis) and covering (the set covers the underlying decision rather than the question's wording, not doing the thing included wherever honestly viable, postponing being one form of it and never a second option). The set is the only menu every later pick chooses from and it outlives the decisions after it, so a direction it misses is invisible downstream; the failure patterns the rule targets are near-duplicate options that differ only in wording or emphasis, an answer taking a direction no option represented (most often not doing the thing the options vary), a combination on an axis the set never laid out, and a premise every option shared. The retired "typically two to four" guideline must not be restored: a count is a shortlist size, not a completeness test — it invites padding up to its floor and trimming below what the axes require, and it hides a multi-axis question's growth instead of letting it show; the set's size follows from its axes and their viable combinations alone. The what-it-is field states the option's position on every axis, with no sentence limit and no reasons (those belong in the advantage and drawback), because distinctness and coverage are checkable only against stated positions and because that text is what lift --alternative folds into ## Decisions and capture reads back as the option. Growth is stopped upstream instead: review-milestone-requirements authors each question as one choice, so a gap holding two independent choices becomes two small sets rather than one set of their product; the one exception is choices that constrain each other, asked together as one multi-axis question because split apart each question's options would hinge on the other's outcome, and there the enumeration weighs every combination and lists only the viable ones. The step names no test for detecting a second axis — detection is the author's judgment, like its other authoring rules — and sibling-owned axes are never varied, only named as a condition in the drawback, so the split does not leak back in through the options.
  • Element rendering. The alternatives agent returns only <alternative> elements; the recommendation pass renders <applied-principle> (one per bearing principle), <depends-on question option/> (one per assumed sibling, no option-less form), and exactly one <recommendation option> as siblings, never children of one another. Citations and dependencies are kept out of the <recommendation> text so the recorded ## Decisions prose is provenance-free by construction. Indentation, escaping, and child order are the tool's; only the extraction anchors matter.
  • The answer sweep is an inline single writer that orders by the tool's walk and walks it once. It resolves <MILESTONE_DIR> once per run and passes it to both answer procedures (neither looks the milestone up itself), reads open_questions.xml and requirements.md whole once for reasoning only (that snapshot never gathers, orders, re-checks, or confirms a skip, and the live locate print and requirements.md outrank it once cascades land), then records strictly sequentially (cascades mutate shared documents), following answer-with-recommendation-procedure.md from its lift step and committing each answer before touching the next — one commit per answer is what revert-then-re-answer needs. That procedure's lift is the question's only lift: its failure is the silent skip (never a document read, never reported, since the commit diffs and the next recommendation pass cover a stripped block), and its print is held as the commit body because the block is gone afterwards. The lift lives in that procedure, composing over answer-procedure.md, so the recording core's inputs-as-given contract (shared with literal answer-open-question, which must never inherit lift behaviour) stays unchanged. The sweep records every pick as given and never judges it; a contradiction with a live ## Decisions entry noticed at fold time is held and reported once, because git does not record which decision a fold conflicts with. A tool failure after a fold stops the whole run with the tree left resumable, never rolled back, so a stranded fold cannot ride into the next commit. There is no outer re-gather loop because recording only removes; one end-of-run walk is a completeness check, and any id it prints is an anomaly, never a skipped-question advisory. New questions a decision raises are left to the next review pass.
  • answer-open-question-with-alternative is skill-only (which alternative wins is human judgment, not sweepable), its lift-then-delegate is inlined rather than extracted into a single-consumer shared file (shared means two or more runners), and its guards are the lift call's Error: line quoted verbatim.
  • answer-open-question is literal-only plus a redirect guard: the retired whole-string sentinel record the recommendation stops with a redirect (exact match, never substring); it is migration scaffolding, not a mode.
  • Answer subjects are provenance discriminators, not a harvest filter. capture-milestone-principle-updates walks all three (Manual-answer:, Alternative-answer:, Recommendation-answer:), path-scoped to open_questions.xml; overrides are the signal for new principles, accepted recommendations are evidence only (the recommender's reasoning cannot supply the guideline it lacked), agreements are never prompted. Every other commit marker stays clear of those three anchors by construction. Capture reconstructs from the answered block's removed diff lines only, keyed on the tag (element-agnostic, so no per-element ignore list starts), reverses entities itself (the one un-escaping rule left in runtime prose), composes one whole-store rewrite, gates the commit (not the write) on a single confirmation, restores its own snapshot (not HEAD) on rejection, and never reaches the commit procedure on a nothing-captured path. It is decoupled from finish: never a precondition, never invoked by it.
  • Correcting a bad answer is revert-then-re-answer, no dedicated skill: one commit = one answer makes the revert reopen the question; a principle that steered wrong is reconciled by the next capture run through its salvage ladder.
  • modify-milestone-goal edits only ## Goal, clears only the picks it undermines, and never cascades (surfaces the rest of the impact, points at review). In the same run as the goal edit it names, from its whole read of open_questions.xml, the standing picks the revision undermines by the same two tests as a hand answer, doubt stripping, and clears them with one strip --recommendation call that keeps every <alternative>, committing open_questions.xml with requirements.md under Goal-revision:; a pick formed under the old goal would otherwise reach the answer sweep as given. The clearing is not transitive — a block whose <depends-on> names a cleared block keeps its pick and its tag — because a tag records an assumed sibling outcome, which a goal revision does not settle (only the answer-time cascade reconciles tags), and so the tool needed no change. Beyond that one call it removes, adds, and rewords nothing: no decision, out-of-scope entry, task, or question block. It is offered by discuss-open-question and deliberately invisible to answer-open-question, because recording an answer and reshaping the objective are different acts.
  • finish-current-milestone always precedes goto-next-milestone; the pointer clear rides in the same milestones/README.md edit as the summary so the none-state is committed, never left dirty.
  • goto-next-milestone activates the lowest-numbered undone milestone without asking. A directory is undone when its zero-stripped number matches no ### Milestone N — Title heading under ## Milestone History; the ## Completed Milestones table is never consulted, because it is never backfilled and a missing row would re-activate a finished milestone with no prompt left to catch it. Numbers are unique and monotone (define-milestone-goal takes max-plus-one and refuses a taken number), so the pick is deterministic, and the only stops are a pointer not reading none and no undone milestone. The retired single-candidate confirmation and multiple-candidate choice prompts must not be restored, nor a target argument added: the skill heads a headless chain, where a prompt has no one to answer it, and an unwanted defined milestone is skipped by removing its directory rather than by choosing around it.
  • Committing is a property of the skill layer. Mechanics live only in core/shared/commit-procedure.md (dirty-own-path guard → path-scoped add → commit); the execution-neutral shared procedures stay commit-free. Every file-changing user-invoked skill commits exactly its own paths (never git add -A) under a function-derived <Marker>: <descriptor> subject; dispatched agents stage path-scoped but never commit; complete-all-tasks commits the index its agent staged, per task, with a nothing-staged guard, no --allow-empty; both completion runners commit subject-only under Task-completion: <Task Title>, the task's ## heading copied exactly, because one unit of work gets one subject whichever runner makes it and the heading in the subject line lets history be searched without reading commit bodies, so the retired Tasklist-completion: marker with its heading-in-body commits must not be restored; the inline answer sweep stages and commits each answer itself through the commit procedure. There is no non-committing exemption: init-milestone-base-workflow checks for a git work tree first (git is the workflow's second prerequisite, beside Python) and commits its scaffold subject-only under Workflow-bootstrap: milestones, handing its paths over unchanged so uncommitted changes already in them (a CLAUDE.md just written by /init) ride in that commit by design, so a headless chain that starts with the bootstrap leaves nothing uncommitted; the retired exemption must not be restored. Dispatch sites address agents by their namespaced registry name (cairn:<agent>), phrased descriptively, except in the Codex tree, whose dispatch prompt names the plugin's agent file instead. The old role-based commit split is retired.
  • Shell commands are written literally where a runner would shorten them. Some shells (zsh by default) do not split an unquoted variable into words, so a path list held in one variable reaches git status or git add as a single argument naming no file, and a tool command held in a variable runs as one word naming no command; the shown commands were already literal, and the failure came from a runner rewriting them. The rule is stated, shell-neutral, at the sites that provoke it. core/shared/commit-procedure.md names each path literally in both the dirty-own-path check and the git add (every path its own argument on the command line, never held in a shell variable), and the complete-task agent's staging sentence restates it in matching wording, because the agent reads no commit procedure and stages the largest path set in the workflow, where a wrong staging is silent. Every runner that calls the open-question tool more than once writes the full fixed command on every call, never through a variable, alias, or function of its own defined to stand for the command or any part of it: one clause on the tool-contract sentence of review-milestone-requirements, both annotating passes, the answer sweep, answer-procedure.md, and the provide-alternatives-to-open-question agent (which reads only its own file, so no orchestrator's clause reaches it); the sweep's clause is worded to cover the per-question calls of the procedures it follows, so answer-with-recommendation-procedure.md's single lift stays unedited. "Of its own" scopes the ban by origin, so the host-provided plugin-root reference in a rendered command falls outside it without being singled out and the clause reads the same in every host tree. The fix is a prose rule rather than a structural one such as a commit tool because the failure lies in how a runner chooses to write a command, not in any command the files show; a commit tool would add a second tool and change the contract of every committing skill, and it would still be invoked through a command line the runner writes, open to the same shortcut. The invariant is scoped to those sites, not a general ban on shell variables: the capture-milestone-principle-updates snapshot (SNAPSHOT="$(mktemp)", used quoted as "$SNAPSHOT") is outside it, because it is one quoted value that word splitting never reaches, not a path list or a tool command, so it is neither removed nor cited as a loophole; its reliance on shell state surviving between calls is a separate failure this rule does not address.
  • Success-path console reporting is terse. One fixed identifier-free status line per run (no per-item output in a loop); recommend-all-open-questions alone has two, chosen by what the run committed. Only git-absent decision-critical advisories survive alongside it (convergence verdict, untraceable requirement, anchor miss, the still-skipped questions the two annotating passes report, the answer sweep's contradiction pairs and completeness anomaly), no-op passes print one distinct line, and failure/clean-stop paths keep their full messages with the tool's Error: line quoted verbatim. The rule is authored inline in each SKILL.md's reporting step; there is no report-procedure.md.
  • Task altitude. Authoring runners (derive-tasks, submit-task, both over core/shared/task-format.md) write only what cannot be re-derived: a unique title and a 1–3 sentence brief. No Steps/Provides/Notes/Success sections ever. core/shared/complete-procedure.md derives the acceptance bar itself and records it as **Verified:** in TASKS_DONE.md, a label kept distinct so it is never read as an authoring contract. derive-tasks delegates nothing; submit-task is skill-only; complete-task is the only skill+agent pair, differing only in inline vs. isolated. Every task-list runner resolves <MILESTONE_DIR> via get-current-milestone.md.
  • Environment context comes from CLAUDE.md (AGENTS.md in the Codex tree, through the CONTEXT_FILE slot; /init once per project) for specify-milestone-starting-state, derive-tasks, and the completion procedure. The bootstrap never writes it and never writes the pointer.
  • Dispatched-agent return contracts. A FAILED from the complete-task agent promises a resumable tree (partial work continued, never redone or reverted), not an untouched one — do not restore the old promise. The alternatives orchestrator judges each return as it lands by one fixed pipeline: last-line FAILED: verdict (the only judging it does itself), the whole unedited return piped to embed --alternatives (the tool slices and validates), then exactly one repair — continue the same agent session where the host can, one fresh re-dispatch only where it cannot — before the per-question skip. This deliberately reversed the earlier discard-whole rule (eight of ten milestone-19 dispatches were lost to a grounding preamble) and the extraction moved into the tool in milestone 27; do not restore skip-only behaviour or move extraction back into prose. The pattern is scoped to that one agent: the one other dispatch site, complete-all-tasks, keeps a last-line token, and the recommendation pass and the answer sweep dispatch nothing and have no return to judge.
  • A dispatch prompt carries only what the orchestrator already holds and the agent cannot fetch itself. This holds for both dispatched agents without qualification: complete-all-tasks passes the task's ## heading text and nothing else, the alternatives orchestrator passes the question's Short Title and the resolved <MILESTONE_DIR> and nothing else, and each agent fetches the rest under that directory itself (its task section; its own block by locate and its sibling scope by list --with-question; requirements.md). The orchestrator holds no work context, so every extra slot is something it would have to gather and hold per dispatch only to hand over, and a value the agent can fetch is delivered twice when copied into the prompt (under the retired three-slot prompt the alternatives agent read its block in the prompt and again in its whole read of open_questions.xml); a fetch also gives the agent the live document rather than the orchestrator's snapshot. The retired Question block: slot and the orchestrator's per-question locate gather must not be restored, and the two list calls are the pass's whole gather. The rule constrains the prompt, not the agent's reading: what an agent may read whole is fixed per document by the invariants above.
  • Skill frontmatter. Every SKILL.md and agent carries name and an unquoted description of one clause, 25 words or fewer, no colon or semicolon, loadable by yaml.safe_load; it is a routing label, never a record — provenance, mechanics, cross-references, and trigger lists are cut outright (their home is docs/skill-reference.md). No exceptions to the cap; an agent description keeps its invocation contract as a short clause.
  • Runtime files carry no editor-facing prose and name no host. They hold only what the runner needs; host-dependent sentences name the capability, never the host (the agents' Claude-only color key is stripped by the Antigravity and Codex definitions' data, the one structural exception). No ## Rules sections: a rule lives in the step it constrains or in the opening paragraph. Rationale lives here. The tool sources follow the same rules (no bare {{, no host name even in a comment, no placeholder of their own) so each renders byte-identical into every host.
  • Host wording differences are named slots, never markers or duplicated files. A sentence or phrase that differs between hosts is a {{SLOT_NAME}} placeholder in core/, filled from every definition's [slots] table; the slot-declaration check keeps the declared name sets identical across hosts and each name used in core/, and unfilled-placeholder catches a slot a host leaves undeclared. The Claude Code and Antigravity values are their exact pre-Codex wording, so adding Codex left those two trees byte-identical, and that identity is the slot operation's end-to-end test (no pytest covers it). Codex runs both agents as its generic subagent told to read and follow the plugin's Markdown agent file, with no TOML file, registration step, or format conversion in the build, because Codex documents no way for a plugin to ship a custom agent.
  • Pre-split milestones (milestone_01–27) get no migration and no compatibility: a question skill run against a milestone with no open_questions.xml stops on the open-question tool's Error: line.

Development

The build loop, both test runs, the version bump, and the distribution repositories are documented in CONTRIBUTING.md under ## Development; the release procedure in .claude/skills/release-plugin/SKILL.md. Points not recorded there:

  • hosts/<host>/ trees are pure build output: rebuild after any change under core/ or scripts/hosts/ and commit the rebuilt trees with that change, so main always passes --check. --check is run by a maintainer or CI, never a git hook; the CI workflow has no path filter (a paths list would be a hand-maintained copy of the build's input set) and is one job, never a matrix.
  • The floor run bypasses the build tooling's requires-python = ">=3.11" on purpose; the tools need nothing from that project. Two bracketing runs replace a version matrix because stdlib availability is monotone across minors. The literal 3.9 has three homes: the README prerequisite, the bootstrap check, and the CI floor run.
  • Adding a host means adding a definition directory under scripts/hosts/; no host-specific Python exists. A host definition's [layout] must map all four core/ directories, every one inside its plugin_dir (the path from the tree root to the runtime plugin root: empty for Claude Code and Antigravity, plugins/cairn for Codex), and it must declare every wording slot.
  • set_version.py writes nothing under hosts/ (manifests are rendered from VERSION by the build). /release-plugin makes one Release: <VERSION> commit that changes only version slots and the CHANGELOG.md entry, then publishes each host tree with git commit-tree into uHappyLogic/cairn-<host>; those repositories and every traffic-data branch are never hand-edited. TRAFFIC_TOKEN is a fine-grained PAT on exactly the four repositories, kept in no local copy.
  • Outside contributions are proposal-first (see CONTRIBUTING.md): the maintainer reserves the milestone with /define-milestone-goal on main only while their own pointer reads none, without activating it; the contributor runs the pipeline on a branch (net pointer change nil), syncs by merge only, and the pull request is merged as a merge commit so the milestone commits survive for release notes and capture.

Milestone Workflow

This project uses the milestone-driven workflow. Each milestone lives at milestones/milestone_<N>_<slug>/ with requirements.md, open_questions.xml, TASKS_TODO.md, and TASKS_DONE.md. milestones/README.md is the source of truth for which milestone is current. Never advance the pointer without first running /finish-current-milestone.

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.