# Project Constitution

> Generated by Aperant Framework from codebase scan. Edit freely — this is YOUR project's source of truth.

## Project

**{{PROJECT_NAME}}**

{{PROJECT_DESCRIPTION}}

## Technology Stack

{{TECH_STACK}}

## Discovered Conventions

{{DISCOVERED_CONVENTIONS}}

## Architecture

{{ARCHITECTURE_SUMMARY}}

## Quality Standards

- **Autonomy level:** {{AUTONOMY_LEVEL_NAME}} ({{AUTONOMY_LEVEL}})
- **Priority:** {{PRIORITY}}
- QA threshold: {{QA_THRESHOLD}}/10 for approval
- Proof required for UI changes: {{REQUIRE_PROOF}}
- Test infrastructure: {{TEST_STATUS}}

## Custom Conventions

> Add conventions the scan couldn't detect:

{{CUSTOM_CONVENTIONS}}

## Aperant Framework Guardrails

The Aperant Framework gives every adopter project the following invariants. You can rely on them in plans, agent prompts, and your own automation:

- **Append-only event log (R10):** Every task lifecycle transition is appended as a JSON line to `.aperant/events/{YYYY-MM-DD}.jsonl`. This is the durable audit trail; treat it as read-only history.
- **Outputs allowlist (R11):** Subtask outputs are constrained to a per-task allowlist declared in `implementation_plan.json`. Writes outside the allowlist are rejected by `apt-tools`.
- **Config write guard (R13):** `apt-tools` will refuse to mutate `.aperant/config.json` outside an explicit `state` mutation path. If you need to change config, do it through `apt-tools state` or `/apt:setup`, not by hand-editing the JSON.
- **Atomic JSON writes (R3):** Every `.aperant/*.json` write goes through tmp-file + rename. Partial writes are not observable by other agents.
- **Per-agent team-status (R2 + R4):** `.aperant/team-status/{agent-id}.json` is the canonical liveness record (gitignored, ephemeral, TTL-expired, PID + incarnation guard).

> Template note: changes to this footer section only affect NEW adopter projects at `apt-tools init` time; existing installations do not auto-update. If you need to back-port the latest guardrail descriptions to a project that was initialized earlier, copy them in by hand from `packages/framework/templates/agents-brownfield.md` in the framework source.
