You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Single source of truth for AI rules across agents, AGENTS.md, extensions, skills, Cratis AI corpus and other harnesses #30
woksin (2026-10-23, via SPEC): "setup and rules should live in ONE place, not copied into agent definitions, prompts, skills or per-harness files. Please research this before choosing."
Rules are copied today into agent definitions (agent/agents/*.md), the global and profile AGENTS.md, extensions and guards, skills, the Cratis AI corpus (.cratis/ai, installed with cratis ai install/update) and other harnesses' files (Claude Code, Copilot, Codex). The copies drift. Agent types then behave differently under the same policy, as in #29.
Research questions
Where do rules drift today? An inventory of the duplicates, with examples of drift.
Which mechanism gives one source of truth with per-repo and per-task overrides that every agent type honours equally? Options:
generated agent files;
runtime injection by an extension;
enforcement by hooks or tools instead of prose;
layered config.
How does it fit the Cratis AI corpus distribution and other harnesses?
Deliverable
A decision document, the method documented in the pi-setup README, and the migration, in slices. #29 (the pi-phase execution policy) is the first concrete case.
Research done; the decision is proposed and awaits woksin's open questions.
Key finding: subagents never see AGENTS.md. pi-subagents creates them with noContextFiles, so every rule reaches them only through copies in the agent files: 8 agents × 8 profile directories = 64 copies. Those copies already disagree on priority-high, the scripting rule (missing from the default profile's implementer) and the execution exceptions.
Decision: AGENTS.md becomes the only prose source, with sections tagged by audience. One policy extension delivers the subagent sections at runtime. Mechanical rules go into tools and guards (pi-phase decides admission). Agent files keep only their role. Profiles become overlays. Cratis rules stay in the Cratis AI corpus and are referenced, not copied.
Precedence: user > parent brief > repo > global, with a fixed safety floor.
Corpus, first moves: reference the corpus PR/label/merge rules and codescene.md instead of copying them; settle three conflicts upstream; move the Cratis CI/release operations rules to corpus github-actions.md; add a neutral phase-runner hook.
Activity
woksin commentedon Oct 23, 2026
Research done; the decision is proposed and awaits woksin's open questions.
noContextFiles, so every rule reaches them only through copies in the agent files: 8 agents × 8 profile directories = 64 copies. Those copies already disagree on priority-high, the scripting rule (missing from the default profile's implementer) and the execution exceptions.policyextension delivers the subagent sections at runtime. Mechanical rules go into tools and guards (pi-phase decides admission). Agent files keep only their role. Profiles become overlays. Cratis rules stay in the Cratis AI corpus and are referenced, not copied.