# Project Rules

Rules govern *how* work is done in this project. They are procedural and relatively
stable. They are not a record of what happened (that is `memory/`) or the substantive
materials to reason with (that is `kb/`).

## Scope of Agent Authority
- You may create and edit files in `analysis/`, `writing/`, and `outputs/`.
- You may read but not modify files in `data/raw/`.
- Ask before modifying files in `kb/` or `memory/`.

## File and Folder Conventions
- Follow the existing directory structure.
- Name new scripts with a numeric prefix (e.g. `01_clean_data.py`).
- Save intermediate outputs to `data/interim/` with a date prefix.

## Verification Requirements
- Save interim outputs before finalizing any analysis.
- After coding tasks, inspect a random sample of at least 20 records.
- Report class-level precision and recall, not aggregate accuracy alone.
- Compare new results against prior versions when they exist.
- Flag ambiguity rather than forcing a conclusion.

## Documentation Requirements
- Update `memory/CURRENT.md` after any significant direction change.
- Log major decisions in `memory/DECISIONS.md` with date and rationale.
- Document new variables in the relevant codebook under `kb/codebooks/`.
- If LLMs are used for coding or extraction, store the current promptbook under
  `kb/codebooks/` and log major prompt revisions in `memory/PROMPTLOG.md`.

## What to Do When Uncertain
- State the uncertainty explicitly.
- Propose two or three options with brief rationale.
- Do not proceed with a default assumption silently.
