# [Project name] Constitution

Version: 0.1
Status: Draft
Effective: [date]
Licence: adapted from the VenturePilot constitution by Catherine Ives-Yim (ives-yim.org.uk/writing/venturepilot-constitution/),
CC BY 4.0. Keep this line, or credit the source in your own words, when you reuse the structure.

## Position in the tree

Constitutions form a tree: one at the root (usually the organisation's), with a constitution for each product, and for
each component where the risk, team or regulator genuinely differs. Each has exactly one parent. If this is the only
constitution you have, write "none (root)" for the parent and leave the rest blank.

- **Parent:** [name, version and location of the constitution directly above this one, or "none (root)"]
- **Inherits:** every rule in the parent and its ancestors. This Constitution may add rules or tighten inherited ones;
  it may never relax them. Where this Constitution is silent, the parent applies.
- **Children:** [constitutions that name this one as their parent, with their locations, or "none"]
- **Shared standards adopted by reference:** [company standards this Constitution applies, for example a CRA or data
  protection standard, with version. Standards are not constitutions and sit outside the tree.]
- **Scope:** [the repositories, folders, systems and teams this Constitution governs]
- **Reading path for agents:** [every constitution from the root down to this one, in order, plus the standards above.
  List them in this folder's AGENTS.md or equivalent; some tools load only the nearest instruction file.]

## Preamble

This Constitution defines the rules that [project] does not break. It has authority over the [plan, requirements,
architecture decisions, prompts, agent behaviour and implementation].

Where a rule in this Constitution conflicts with its parent, the parent wins unless this rule is stricter. Where another
document conflicts with this Constitution, that document must be corrected, this Constitution must
first be amended under the Amendment article, or, for an article that permits it, a recorded exception must be granted
under the Governance article.

Operating principle (optional, one line): [the rule everything else serves]

Each article has a principle, a violation test, a named check and an owner. Violation tests are examples, not a complete
definition: the named checks must cover every requirement in the article. An agent or engineer who finds a conflict
between documents must stop and report it rather than choose.

## How to write an article

- Start from what must never happen: the expensive, embarrassing or illegal failures.
- Write the violation test before you are happy with the principle. If you cannot say what a breach looks like in the
  code, the data or the behaviour, the principle is not finished.
- Name where the check runs (CI, database policy, runtime permission, review) and who owns it.
- Keep architecture in the architecture decisions and features in the requirements. The constitution is the part that
  outranks them: state what must hold ("recoverable from tested backups"), not today's choice of tool.
- If the system acts on anyone's behalf, define an external action by its effect, bind approval to the exact payload
  and recipient, and decide what happens when an attempt's outcome is unknown, before a retry sends it twice.

## Article 1: [Name]

**Principle:** [What must remain true, in one or two sentences.]

**Violation test:** [What a breach looks like, stated so it can be answered yes or no.]

**Check:** [Where it is enforced: test, CI gate, database policy, permission, review package.] **Owner:** [role]

## Article 2: [Name]

**Principle:**

**Violation test:**

**Check:** **Owner:**

<!-- Common articles worth considering:
     data isolation between customers or tenants; human approval for anything that leaves the system;
     least privilege for agents, services and runtimes; replaceable providers behind your own interfaces;
     auditable decisions; cost and budget limits enforced before spending; security, privacy and untrusted input;
     testing and observability; reputation or safety of the people the system acts for. -->

## Article [n]: Governance, enforcement and breach response

**Principle:** [Role] interprets this Constitution, resolves conflicts that have been stopped on, and approves
amendments. [Deputy role] may act in their absence for interpretation and breach response, not for amendment.

Every article has at least one named check and an owner. Agents, jobs and people may submit evidence but may not
accept their own work. [Role or deterministic tool] may change completion or release status only on verified evidence,
or under a valid exception where this Constitution permits one.

On a detected breach of articles [list the no-exception ones]: stop the affected work, block release, contain any
external effect, record the incident, and re-verify before resuming. Breaches of other articles block completion of
the affected work until resolved or excepted.

Articles [list] admit no exceptions; they change only by amendment. No exception granted here can relax a rule this
Constitution inherits; that exception, if allowed at all, comes from the owner of the constitution where the rule lives.
For others, [role] may grant a narrow, written, expiring exception naming the
article, scope, reason, compensating control and expiry date.

An authorised operator can pause automated work, revoke outstanding approvals and credentials, and cancel queued
external actions, and the system remains recoverable from that state.

This Constitution is reviewed at [phase gates / before launch / after any severe violation].

**Violation test:** An article with no named check or owner, self-certified completion, work continuing after a breach
of a no-exception article, an exception to a no-exception article or granted without authority, an exception without
an expiry, or no tested pause-and-revoke path, is a violation.

## Article [n+1]: Amendment

**Principle:** This Constitution changes only through a recorded amendment approved by [role], identifying the
affected articles, rationale, consequences, version increment and effective date. Work made non-compliant by an
amendment is listed and brought into compliance as tracked work. An amendment lists the child constitutions it affects,
and their owners bring them into line; a child is amended when its parent changes in a way it contradicts. An amendment does not excuse a breach recorded before
it took effect. Previous versions remain in version control.

**Violation test:** A design or implementation silently contradicts an article, or this document changes without an
amendment record and version increment, is a violation.

## Authority order

When documents conflict, apply this order:

1. This Constitution and, above it, its parent and ancestors (stricter rule wins)
2. Accepted architecture decisions
3. Requirements
4. Contracts (data, API, security, agent capabilities)
5. Plans and roadmap
6. Individual work items

## Amendment record

| Version | Approved by | Effective | Parent version | Articles | Change | Rationale | Compliance work and children affected |
|---|---|---|---|---|---|---|---|
| 0.1 | [role] | [date] | [parent name and version, or root] | All | Initial draft | [why] | [none / list] |
