agentleFS
paulingrampaulingram/claude-skills/skills/project-principles/SKILL.md

project-principles

Skill2 starsChanged 7 months agoMITView on GitHub

A project's codified principles -- rules outliving any one run. Verbs -- extract (at intake, user-confirmed first), add ('codify this'), show, check (verdicts before any design, contract, diff or options). Options tagged fits / violates P-xx; escalation-pending.md only when all violate. Engine scripts/principles/.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Run scripts/principles/cli.py default-set --workspace <ws> so the register is never empty: the reuse-first ladder lands as PROPOSED …

    line 43
  2. Very specific:

    Every architect brief and every backend / frontend / integration / data-eng spawn brief carries the confirmed principles, exactly as …

    line 73
  3. Very specific:

    Before a design, an interface contract, a diff or a set of options is presented to the user or handed to the next lane, the producing agent …

    line 83
  4. Very specific:

    When the work offers alternatives — a design with two viable shapes, an API that could live in either service, a migration done two ways — …

    line 103
  5. Distinctive:

    Every architect and teammate brief carries the confirmed principles block.

    line 139
  6. Very specific:

    Every design / contract / diff / option set presented has a sidecar with a verdict for EVERY confirmed principle.

    line 140

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
SKILL.md

project-principles

A project's principles are the rules that hold across runs. Before this skill they lived in whichever agent happened to remember them, were re-derived in every lane, and were silently dropped the moment a brief did not mention them. This skill gives them a register with two twins — the machine twin <workspace>/.architect-team/principles.json and the human twin <workspace>/docs/PROJECT_PRINCIPLES.md rendered from it — and four cheap verbs any lane calls. It is deliberately small: a register, a binding rule, a check.

The engine is scripts/principles/principles.py with the CLI scripts/principles/cli.py; the Layer-3 tool is hooks/vao/principles.py (verify-principles-respected). The field reference is references/principles-schema.md. The human twin is NEVER hand-edited — every change, by a human or an agent, goes through the CLI, which re-renders it.

Precedence (the one rule above the others)

The user's explicit instruction in this run > confirmed principles > CT6 defaults.

A confirmed principle binds every agent in the run. The user's explicit instruction in THIS run outranks it — the deviation is recorded, never argued. CT6's own defaults (the reuse-first ladder, the testing disciplines) sit below both: they fill the gaps a project's principles leave, they never override one.

The four verbs

VerbWhenWhat happensUser round-trip
extractintake (Phase −1 / B0 / M0 / D0 / U0), once per projectcandidates from the project's documents; the user confirmsONE AskUserQuestion
addthe user says "codify this" / "from now on always ..."add writes a user-stated, confirmed principlenone — saying it IS the confirmation
showany lane needing the binding list; every spawn briefthe confirmed list (brief is the spawn-brief form)none
checkbefore a design / contract / diff / option set is PRESENTEDa principles-verdicts/v1 sidecar + verify-principles-respectednone, except the hard stop

extract — at intake, confirmed before anything binds

  1. Run scripts/principles/cli.py default-set --workspace <ws> so the register is never empty: the reuse-first ladder lands as PROPOSED P-R1..P-R4.
  2. Find the project's own rule-bearing documents (CONTRIBUTING, ARCHITECTURE, docs/*CONVENTIONS*, ADRs, the README's standards section) and run scripts/principles/cli.py extract-candidates <file> on each. The heuristic is deterministic — modal sentences (must / never / always / shall / should / only) and list items under principle / standard / convention / rule / guideline headings — and it WRITES NOTHING. Each candidate carries the verbatim quote and its line number.
  3. Read the document around every candidate. The heuristic finds sentences; YOU judge which are principles (a durable rule of the project) and which are instructions, examples or prose. Draft one statement per real principle with its scope and keep the verbatim quote as its source.
  4. ONE AskUserQuestion domain gate listing the drafted statements (and the P-R* defaults): confirm all / confirm some / none. The question quotes each source. Nothing becomes confirmed silently — a candidate the user did not confirm stays proposed, and a proposed principle does not bind.
  5. propose each confirmed-by-user candidate with --statement "<the drafted rule>" --scope <scope> --source extracted --file <path> --quote "<verbatim>", then confirm <id> it. Record what the user said in the run's clarifications log.

add — "codify this"

scripts/principles/cli.py add --statement "<their rule>" --scope <scope> --quote "<their words>". The principle is confirmed immediately: the user stating it is the confirmation, so no second question is asked. Repeat it back in one line.

show — and the binding rule

Every architect brief and every backend / frontend / integration / data-eng spawn brief carries the confirmed principles, exactly as appearance_mode is carried: the orchestrator runs scripts/principles/cli.py brief --workspace <ws> and pastes the block verbatim under a Confirmed project principles heading. A brief without the block is incomplete; (none confirmed) is written out, never omitted. A teammate that finds a principle missing from its brief asks the Lead rather than guessing.

check — before anything is presented

Before a design, an interface contract, a diff or a set of options is presented to the user or handed to the next lane, the producing agent writes a principles-verdicts/v1 sidecar beside the artifact — one verdict per confirmed principle (respected / violated / not-applicable), each violated with why and where — and runs:

$(command -v python3 || command -v python) "${CLAUDE_PLUGIN_ROOT}/hooks/vao/principles.py" --workspace "<ws>" --verdicts "<sidecar>" --json

Exit 0 is valid, 2 is a gap list to act on, 3 is an unreadable input (scripts/principles/cli.py check --verdicts <sidecar> --workspace <ws> runs the same validation from the engine CLI; the hooks/vao_tools.py verify-principles-respected subcommand is the Layer-3 facade for it). The review-gate evidence cites the verdict in the optional principles_review field (hooks/review_evidence_schema.py: pass must cite the verdict path; fail blocks; n/a with a note when the workspace has no confirmed principles).

The option-tagging rule

When the work offers alternatives — a design with two viable shapes, an API that could live in either service, a migration done two ways — every option is tagged in the sidecar's options[]: fits: true or fits: false with violates: ["P-xx"] and a one-line why. An option is not "the cleaner one"; it fits the confirmed principles or it names which one it breaks.

The autonomous-run rule

In an autonomous run (auto_mode: true) the agent chooses a FITTING option and continues — it does not stop to ask when an option respects every principle (docs/ETHOS.md principle 5, default to action). It stops ONLY when every option violates a confirmed principle: then it writes escalation-pending.md naming the options and the principle each breaks, and asks which to relax. The tool makes this mechanical: chosen-option-violates and chosen-option-missing are gaps, all-options-violate is the hard stop. When the user chose (auto_mode: false), a violating choice is theirs to make and is reported as a warning, not a gap.

A knowing violation in a design or diff is a gap (principle-violated) unless the verdict quotes the user's explicit instruction in this run in user_override — the precedence rule, recorded rather than remembered.

The soft cap and retirement

The register's soft_cap is 15. Confirming a 16th principle SUCCEEDS and emits principles-cap-exceeded in the verb's output, the check's warnings and the rendered markdown. Fifteen rules a team can hold in its head; thirty is a policy manual nobody consults. When the warning appears, propose merges or retirements to the user. retire P-xx --reason "<why>" is the only removal — a retired principle keeps its id and its reason, is listed by id in the markdown, and stops binding; it is never deleted from the JSON.

Hard rules (non-negotiable)

  • Nothing becomes confirmed without the user: extract confirms through one AskUserQuestion; add confirms because the user stated it; default-set only proposes.
  • Every architect and teammate brief carries the confirmed principles block.
  • Every design / contract / diff / option set presented has a sidecar with a verdict for EVERY confirmed principle; a violated verdict has why + where.
  • An autonomous run never picks a violating option while a fitting one exists, and never picks silently when all violate — it escalates.
  • <workspace>/docs/PROJECT_PRINCIPLES.md is changed only through the engine CLI.
  • The user's explicit instruction in this run outranks a confirmed principle; the deviation is recorded in user_override, never argued and never hidden.

Honest boundary

The tool proves every confirmed principle was CONSIDERED and a verdict RECORDED with a cause. It cannot prove a judgment is right: a wrong respected passes verify-principles-respected. Catching that is the independent reviewer's job (docs/ETHOS.md principle 2 — the producer is never its own checker); the verdict sidecar is the input they read, not a substitute for reading the design. The extraction heuristic finds sentences, not principles — the judgment is the agent's and the confirmation is the user's.

Relationship to other skills

  • skills/reuse-first-design — the source of the default P-R1..P-R4 set; a project's own principles sit above it in precedence.
  • skills/contract-first-parallelism — the interface contract is one of the four check subjects (kind: contract).
  • skills/common-pipeline-conventions — the spawn-brief manifest this skill's block rides in, beside appearance_mode and deploy_mandate.
  • skills/verified-agent-output — verify-principles-respected is a Layer-3 tool (one of the 26); principles_review is its review-gate field.

Reference index

SectionReference fileLoaded
the two schemas (principles.json register, principles-verdicts/v1 sidecar)skills/project-principles/references/principles-schema.mdon demand — before writing a sidecar or editing the register through the CLI

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.