Problem
Several repo-wide instruction rules are stated near-verbatim in two or more places. Each copy is independently editable, so they drift. There is no declared ownership layer saying which surface is authoritative for which class of rule.
Surfaced by the Codex context-consumption review (2026-07-26, develop @ 0abc3d237), §"Duplication, staleness, contradiction". That report recommends a change titled "Establish rule ownership" but no ticket tracked it.
Verified instances
1. Hook-rename rule stated twice
AGENTS.md:28 — "Renaming a hook script under src/autoskillit/hooks/ must update HOOK_REGISTRY in hook_registry.py AND add the old basename to RETIRED_SCRIPT_BASENAMES in the same commit. test_no_retired_name_has_a_live_file will fail otherwise."
src/autoskillit/hooks/AGENTS.md:37 — "adding the old basename to RETIRED_SCRIPT_BASENAMES in the same commit."
Both confirmed present at those lines.
2. "Package tables are an index, not required reading" stated twice
AGENTS.md §5
src/autoskillit/core/types/_type_constants.py:187 (inside CODEX_INTAKE_DISCIPLINE_DIGEST)
Notable because ~19% of Codex sessions enumerate the instruction surface anyway — two statements of the same prohibition have not moved the rate. Tracked separately as #4365; this ticket covers only the duplication.
3. task test-check written as a literal where skills read it from config
AGENTS.md:71 states the test command as a literal string. Skills resolve it from config. A change to the configured command leaves the AGENTS.md literal stale with nothing failing.
Proposed direction
Declare an ownership layer and enforce it:
- Root
AGENTS.md states repo-wide invariants once.
- Skills state procedure.
- Per-package
AGENTS.md files state file-level detail only.
Concretely: move the hook-rename rule to root and leave a pointer (not a restatement) in hooks/AGENTS.md.
Why this is worth a ticket rather than a drive-by edit
The failure mode is silent. A duplicated rule that drifts produces two surfaces giving different instructions, and nothing in CI compares them. Consider whether a guard test can assert that a rule's canonical text appears exactly once across instruction surfaces — otherwise this recurs the moment someone edits one copy.
Acceptance
- Each duplicated rule above has exactly one authoritative statement; other surfaces point to it rather than restating it.
- The ownership layer is written down somewhere a future contributor will find it.
- Ideally: a test that fails when a rule is restated rather than referenced.
Source
Codex context-consumption report, 2026-07-26 — §"Duplication, staleness, contradiction" and §"Establish rule ownership" (Effort: S).
Requirements
REQ-OWN-001: The repository must declare which documentation surface (root AGENTS.md, skills, per-package AGENTS.md) is authoritative for each class of instruction rule.
REQ-OWN-002: The ownership-layer declaration must be written in a location a future contributor will discover when editing instruction surfaces.
REQ-DUP-001: The hook-rename rule must exist as a single authoritative statement, with src/autoskillit/hooks/AGENTS.md pointing to it rather than restating it.
REQ-DUP-002: The "package tables are an index, not required reading" statement must exist as a single authoritative statement, with CODEX_INTAKE_DISCIPLINE_DIGEST in src/autoskillit/core/types/_type_constants.py pointing to it rather than restating it.
REQ-DUP-003: The root AGENTS.md must not hardcode the test-check command as a literal string that a skill independently resolves from config; the reference must either derive from the configured value or be mechanically kept in sync with it.
REQ-GRD-001: A test must fail when a designated canonical rule's text is restated, rather than referenced, on a non-authoritative instruction surface.
Problem
Several repo-wide instruction rules are stated near-verbatim in two or more places. Each copy is independently editable, so they drift. There is no declared ownership layer saying which surface is authoritative for which class of rule.
Surfaced by the Codex context-consumption review (2026-07-26,
develop @ 0abc3d237), §"Duplication, staleness, contradiction". That report recommends a change titled "Establish rule ownership" but no ticket tracked it.Verified instances
1. Hook-rename rule stated twice
AGENTS.md:28— "Renaming a hook script undersrc/autoskillit/hooks/must updateHOOK_REGISTRYinhook_registry.pyAND add the old basename toRETIRED_SCRIPT_BASENAMESin the same commit.test_no_retired_name_has_a_live_filewill fail otherwise."src/autoskillit/hooks/AGENTS.md:37— "adding the old basename toRETIRED_SCRIPT_BASENAMESin the same commit."Both confirmed present at those lines.
2. "Package tables are an index, not required reading" stated twice
AGENTS.md§5src/autoskillit/core/types/_type_constants.py:187(insideCODEX_INTAKE_DISCIPLINE_DIGEST)Notable because ~19% of Codex sessions enumerate the instruction surface anyway — two statements of the same prohibition have not moved the rate. Tracked separately as #4365; this ticket covers only the duplication.
3.
task test-checkwritten as a literal where skills read it from configAGENTS.md:71states the test command as a literal string. Skills resolve it from config. A change to the configured command leaves the AGENTS.md literal stale with nothing failing.Proposed direction
Declare an ownership layer and enforce it:
AGENTS.mdstates repo-wide invariants once.AGENTS.mdfiles state file-level detail only.Concretely: move the hook-rename rule to root and leave a pointer (not a restatement) in
hooks/AGENTS.md.Why this is worth a ticket rather than a drive-by edit
The failure mode is silent. A duplicated rule that drifts produces two surfaces giving different instructions, and nothing in CI compares them. Consider whether a guard test can assert that a rule's canonical text appears exactly once across instruction surfaces — otherwise this recurs the moment someone edits one copy.
Acceptance
Source
Codex context-consumption report, 2026-07-26 — §"Duplication, staleness, contradiction" and §"Establish rule ownership" (Effort: S).
Requirements
REQ-OWN-001: The repository must declare which documentation surface (root
AGENTS.md, skills, per-packageAGENTS.md) is authoritative for each class of instruction rule.REQ-OWN-002: The ownership-layer declaration must be written in a location a future contributor will discover when editing instruction surfaces.
REQ-DUP-001: The hook-rename rule must exist as a single authoritative statement, with
src/autoskillit/hooks/AGENTS.mdpointing to it rather than restating it.REQ-DUP-002: The "package tables are an index, not required reading" statement must exist as a single authoritative statement, with
CODEX_INTAKE_DISCIPLINE_DIGESTinsrc/autoskillit/core/types/_type_constants.pypointing to it rather than restating it.REQ-DUP-003: The root
AGENTS.mdmust not hardcode the test-check command as a literal string that a skill independently resolves from config; the reference must either derive from the configured value or be mechanically kept in sync with it.REQ-GRD-001: A test must fail when a designated canonical rule's text is restated, rather than referenced, on a non-authoritative instruction surface.