agentleFS
stevehansenstevehansen/eidet/.claude/skills/canon/SKILL.md

canon

Skill4 starsChanged 54 days agoMITView on GitHub

Prime on Eidet's Canon before changing it — the propose/review/approve loop over Term (P1) and Domain (P2) pages, CanonDraft in its own canondrafts/* collection, CanonService's damper matrix and claim-before-mint protocol, ICanonMintPort as the sole write edge into canon:* memories, fingerprints, rejection cooldowns, and the canon:* guard that keeps curated pages out of dedup/consolidation. Use when the task touches a Canon draft or page, a draft source, the Web UI Canon panel, or /api/eidet/canon/*. Not for parked open work (see looseends), not for the live Portal view (see portal).

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Canon — priming

Canonical spec: docs/domains/canon.md — read it for the damper matrix, all invariants, key files, and gotchas. Terms of record: UBIQUITOUS_LANGUAGE.md § Canon (and Approve vs Promote, Canon draft vs Loose End).

A draft is not a memory until an Operator approves it. Only Term pages ship today, from two deterministic zero-LLM sources (entity aggregation, UBIQUITOUS_LANGUAGE.md seed). REST/Web UI only — no MCP surface.

Core invariants (get these right)

  • Approve is the only write path into canon:*, always via ICanonMintPort → StoreAsync. That's the enforcement point for the zero-LLM write path once syntheses come from a model.
  • Secret-scan draft prose at creation and gate again at approve — source prose can echo a member's secret.
  • The draft id (canondrafts/{repo}/{kind}/{slug}) is the damper anchor — one doc per slug, refreshed in place; identical fingerprint ⇒ regeneration does nothing.
  • Reopening a rejected draft needs both an elapsed cooldown and a changed fingerprint. Never disturb a draft in Approving.
  • Claim before mint (Pending → Approving), release to a clean Pending on failure (on CancellationToken.None), and stay idempotent — the loose-end resolve pattern.
  • Dedup and consolidation must never touch a canon:* page — both filter on CanonTags.IsCanonPage.
  • Strip canon:* from inherited member tags so a page never re-tags itself by another page's tag.
  • Provenance follows the anti-laundering rule over surviving members — approval doesn't confer trust.
  • A forgotten member degrades to a placeholder, never a throw; DerivedFrom keeps the full snapshot.

Key files / reuse

  • src/Eidet.Core/Canon/CanonService.cs — the loop, the damper, the claim protocol.
  • src/Eidet.Core/Canon/ICanonDraftSource.cs — add a source here; the service never changes.
  • src/Eidet.Core/Canon/MemoryServiceCanonAdapter.cs — the mint edge.
  • src/Eidet.Core/Canon/{CanonFingerprint,CanonTags,CanonSlug}.cs — reuse, don't re-derive.
  • tests/Eidet.Core.Tests/Canon/TestDoubles.cs — the in-memory doubles.

Gotchas

  • IsStale is hardcoded false (live drift detection is P2) — don't trust the flag.
  • Superseded is vestigial for slug-keyed drafts; Approving never appears in REST responses.
  • RegenerateDraftsAsync takes the repo path, not a normalized id — a normalized id silently disables file-backed sources like the UL parser.
  • The UL source skips "Example dialogue"/"Flagged ambiguities" and any row without a bolded term cell.
  • The entity source excludes Observations and requires several distinct citing memories.

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.