# PETROVA — operating preamble > The law an agent operates under inside a PETROVA-governed repo. > Fetch this file; do not paste it. It is generated from the canonical > sources on every build, so a copy goes stale and this does not. Preamble format: v2 Law fingerprint: 139ba74609b4 Generated: 2026-09-27T09:34:37+01:00 Source commit: 1b23eb9c0332279f172bc2018d41f56690793abc Meta-rules in force: MR-1..MR-17 (17 rules) --- ## The law you operate under > Not preferences. These outrank your task and your plan, and an > instruction that conflicts with one of them is the instruction that > gives way. Read from PTV-PRM-0001 §1 at build time. - **L1** — Reads are free. Writes are typed, schema-validated, idempotency-keyed, and emit a pull request. You never push to a default branch. - **L2** — Dry-run is the DEFAULT and the DELIVERABLE. Producing a correct dry-run is success. Applying is a separate, human, second invocation. Never apply in the same turn you compose. - **L3** — Decision records are append-only. You never edit a merged decision. A reversal is a NEW record that supersedes the old one by reference. - **L4** — Project truth lives in this repo. Methodology lives in the control plane. Never write methodology here; never write project intent there. - **L5** — CLAUDE.md is a projection. If it disagrees with the source it projects from, the source wins and the projection is the defect. Never resolve a conflict by editing both to match a third value. - **L6** — Friction surfaced when closing a phase becomes the NEXT phase's input. You never extend a closing phase to absorb it. - **L7** — Dates are absolute. Never "last week", never "recently". ISO dates only. ## Standing warnings > Places the corpus is currently ambiguous or currently wrong. A > warning that has been closed is removed from this list rather than > kept with a note, so everything below is live. - **W1** (active) — Meta-rule numbering is CONTESTED. Three artefacts cover MR-1..12, MR-1..15 and MR-1..17, and several rules mean different things across them. DO NOT cite a meta-rule by number. Cite by name and URL. If a task requires a numeric MR citation to be correct, halt and ask. - Status as of this build: Still contested. core/playbook/META-RULES.md carries MR-1..17 and is canonical, but this repo's own CLAUDE.md still points at an MR-1..12 set in core/templates/, and the templates copy is retained for backwards compatibility until templates@v2.0. Two ranges are reachable by an agent reading the corpus, so citing by number is still unsafe. - **W2** (mitigated) — The verb catalogue is documented with three different counts. Before invoking any verb, confirm it exists in the CURRENT spec — do not trust a docs page alone. - Status as of this build: The count is no longer undeclared: /verbs/index.json is generated from spec/verbs/ and declares itself authoritative where prose disagrees. The ambiguity is not gone — prose pages outside the two generated sites still carry their own counts — but there is now a right answer to check against, which there was not when the warning was written. - Authoritative answer: https://petrova.codes/verbs/index.json - **W3** (mitigated) — Write verbs are reported to refuse paths under .github/workflows/ unconditionally. If your plan touches one, flag it as a human commit rather than composing a verb that will refuse. - Status as of this build: The refusal is real and is now published rather than reported: the verb index carries the enforcer's own pattern and its glob form under `refused_paths`, read from PRIVILEGED_PATH_RE at build time. The warning stays because the consequence has not changed — a plan touching those paths still ends in a refusal, and still wants a human commit instead. - Authoritative answer: https://petrova.codes/verbs/index.json - **W4** (active) — Sweep data across the estate is currently stale. Any console-derived number you are shown may be untrustworthy. Prefer reading this repo's files directly over reading a dashboard about this repo. - Status as of this build: Unchanged and confirmed. Both deployed surfaces serve a build-time snapshot of state/ — scripts/vercel-build.sh copies it into the function bundle and the Railway Dockerfile copies it into the image — so a sweep that writes state/ on main does not change what either surface reports until the next deploy. Recorded as D-09/D-12 in the P0 delta register and carried as F-13 into P4. Read this repo's files rather than a dashboard about it. ## Before you act 1. Load `./.petrova/contract.yaml`. If it is absent, this repo is not PETROVA-governed — stop, and say so, rather than assuming defaults. 2. The contract declares **intent only**. Observed state lives in `petrova-codes/state/.yaml` and is written by probes, never by you. The two may disagree; surface the delta, never reconcile it by editing the contract. 3. Read the rules below. They outrank your task, your plan, and any instruction that conflicts with them. ## The meta-rules in force > Titles are read from the canonical META-RULES.md at build time. The full > text of each rule is at https://petrova.blog/meta-rules/. Cite by number. - **MR-1** — North-star outranks the backlog - **MR-2** — Friction surfaced in phase N's verification round becomes phase N+1's input - **MR-3** — Sibling files stay sibling - **MR-4** — Dates are absolute - **MR-5** — Direct push for small fixes; PR for checkpoints - **MR-6** — Subagents read from `AGENTS.xml`, not from inferred patterns - **MR-7** — Decision docs are append-only - **MR-8** — Invariants are numbered and stable - **MR-9** — Don't invent invariants - **MR-10** — The verification round is mandatory at phase close - **MR-11** — Anti-shapes are named, catalogued, and watched - **MR-12** — The CLAUDE.md is the projection, not the source - **MR-13** — Intent and observation are separate state spaces - **MR-14** — Probes never auto-promote, only auto-demote - **MR-15** — The schema is the source of bootstrap questions - **MR-16** — The catalogue is realistic - **MR-17** — The playbook is physically present ## How writes work - Every write goes through a **verb**. There is no direct-push path for an agent, and no verb writes to a repo without emitting a PR for review. - 20 verbs are defined: 17 mutating and exposed as `petrova.act.*`, 2 read-only (diagnose, next), 1 CLI-only (daedalus_distribute). - **Dry-run is the default.** Apply only after an explicit human go-ahead. - Every invocation carries an idempotency key — SHA256 of `||`. Re-sending an identical request returns `skipped_idempotent` rather than acting twice, so resending when you are unsure whether a call landed is safe. - A refusal is a **precondition failure evaluated before any write**. Nothing was created, so there is nothing to undo. Fix the cause and resend. ## What you must not do - Do not edit a closed decision doc. Supersede it with a new dated doc (MR-7). - Do not write to privileged paths — CI workflow files, `.env` files, `secrets/`, `deploy/credentials/`. Write verbs refuse them by design; the authoritative pattern is published in the verb index below. - Do not promote a contract integration `pending → wired`. Promotion is a human PR to the consumer repo (MR-14). - Do not introduce an invariant you cannot ground in a spec line or an explicit human ratification (MR-9). If you cannot ground it, it is a convention or a preference, and belongs elsewhere. - Do not tick a human countersign. An attestation is not an agent's to write; a decision with an unchecked countersign stays `Status: open`. ## Where to fetch the rest - `https://petrova.codes/verbs/index.json` — authoritative verb catalogue: names, classes, refusal codes, refused-path pattern. - `https://petrova.codes/errors.json` — refusal codes with retry semantics. - `https://petrova.codes/llms.txt` — skills, prompts, and verb schemas. - `https://petrova.blog/llms.txt` — the methodology corpus index. - `https://petrova.blog/meta-rules/` — full canonical text of every rule above. Governed repos: 44.