agentleFS
MetaMindTeamMetaMindTeam/ssot-kit/CLAUDE.md

ssot-kit

CLAUDE.md1 starsChanged 4 months agoApache-2.0View on GitHub

Template for a new project with spec-driven development. Replace the <...> placeholders. Canon: /spec/standards/spec_driven_standard.md. **<PROJECT_NAME>** — <one sentence: what the product is, for whom>. Stack: <backend> · <frontend> · <DB> · <extra stores: vector/object/cache>. Mission / feature filter: <the primary outcome by which features are cut>. This project is spec-driven. The source of truth is the /spec directory, not the code. The full canon is /spec/standards/spec_driven_standard.md. Below is the operational digest. Write for your next self, not a reader. Max…

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write for your next self, not a reader.

    line 26
  2. Distinctive:

    No abstractions or "for-later" hooks without a requirement.

    line 33
  3. Very specific:

    Read the last 3–5 entries of CHANGELOG.md.

    line 38
  4. Very specific:

    Check active tasks (in_progress).

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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

CLAUDE.md

Template for a new project with spec-driven development. Replace the <...> placeholders. Canon: /spec/standards/spec_driven_standard.md.

Project

<PROJECT_NAME> — <one sentence: what the product is, for whom>.

Stack: <backend> · <frontend> · <DB> · <extra stores: vector/object/cache>.

Mission / feature filter: <the primary outcome by which features are cut>.

Working principle (read first)

This project is spec-driven. The source of truth is the /spec directory, not the code.

  1. Spec is authoritative, code is derivative. Spec–code mismatch → we fix the spec first, then the code.
  2. No code without an approved spec. Implementation only after the spec is in approved status with a DoD.
  3. Session resumes from disk. State lives in files (/spec, CHANGELOG.md, tasks), not in context.

The full canon is /spec/standards/spec_driven_standard.md. Below is the operational digest.

Output density (loop-aware)

Write for your next self, not a reader. Max meaning per line: facts, decisions, state — no preambles, restatements, praise, hedging. Skimmable prose is context the loop pays for twice (to write, to re-read). Dense over polite.

Minimal code (YAGNI)

Least correct code, most direct path. Before writing: does it exist (reuse)? is it needed at all? No abstractions or "for-later" hooks without a requirement. Three plain lines beat a premature abstraction; one clear call beats three duplicated blocks. Smallest correct diff wins.

Session start

  1. Read the last 3–5 entries of CHANGELOG.md.
  2. Check active tasks (in_progress).
  3. Load the spec of the task you're working on (/spec/features/<slug>/spec.yaml).
  4. Unfinished task → continue it, don't start a new one.

Before any action

  • Classify the request: question or command. A question ≠ a command to execute.
  • Code — only on an explicit trigger and an approved spec.
  • Architectural decision (3+ components / data model) → the six filters + pre-mortem (see canon §4.5, §6).
  • Feature triage: KILL / KEEP / FREEZE before design.

TDD (mandatory)

🔴 failing test against an acceptance criterion from the spec → 🟢 minimal code → 🔵 refactor on green.

Definition of Done

  • Tests written BEFORE the code, all green, coverage ≥ <80%>
  • Lint / format / typecheck green
  • openapi.yaml updated, if the API is touched
  • Migration applies; secondary-store reindexing described, if data is touched
  • Acceptance of all spec flows met
  • CHANGELOG.md updated; ADR recorded on an architectural decision

Architecture rules (canon §4)

  • Layers: HTTP → Application → Domain → Infrastructure. Dependencies inward only.
  • The domain knows nothing of the DB and HTTP. The transport layer is thin.
  • OpenAPI is the source of truth for the API. Version /api/v1 from day one.
  • The source of truth is the relational DB. Vector/cache/search are rebuildable projections.
  • Files go in object storage; the DB holds metadata + key + checksum.
  • Tenant isolation by workspace_id on every data query.
  • Permission checks in the application layer per /spec/domain/roles.yaml, not in the controller/UI.
  • Secrets only in env / a secret manager. Never in the repo/logs/specs.

Migrations (canon §5)

  • Code-first, applied on deploy. A manual migrate on prod is forbidden.
  • downgrade on prod is forbidden — recovery is a restore from backup.
  • Removing schema is expand/contract across two releases. Don't drop what the code still reads.

Defaults that are forbidden

  • Interpreting a question as a command — forbidden.
  • Refactoring without a request — forbidden.
  • Changing an interface without auditing all callers — forbidden.
  • Deletion without a regression check — forbidden.
  • Push / deploy / irreversible external actions — only on confirmation.

Finishing a task

Prepend to CHANGELOG.md:

## YYYY-MM-DD HH:MM
**Task:** short description
**Changes:**
- `path` — what changed
**Result:** completed | partial | blocked
---

Report the result → propose the next step. Don't chain the next task without confirmation. Critical things (failing tests, a broken deploy, a blocker) — raise immediately.

Delegating to sub-agents

Sub-agent prompt: 5 sections — identity, specific task (input→output→where to write), stop conditions (don't touch canon/changelog, no git/deploy, don't step outside scope), output format, validation criteria.

Sources and facts

A claim about system state = a source citation (file:line, SHA, command output, test). Without a citation — mark it as a hypothesis: "presumably X (not verified)."

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.