Agent rules index
This page is the canonical loader for repository governance instructions. AGENTS.md stays small and mandatory, but the detailed rules live here and in the linked rule files so new sessions do not have to absorb the full policy corpus up front.
Bootstrap sequence
- Read
AGENTS.md. - Load this index.
- Load
05-non-negotiable-checklist.md. - Load
10-session-bootstrap.md(always-load; deterministic startup orchestration before enforcement). - Detect repository, branch, and worktree state.
- Reject implementation from the
devormaincheckout unless the user explicitly overrides that rule. - If GitHub hierarchy metadata is needed and
.specfact/backlog/github_hierarchy_cache.mdis missing or stale, refresh it withpython scripts/sync_github_hierarchy_cache.py. - Load additional rule files from the applicability matrix below before implementation (beyond the always-load set, which already includes this index, the checklist, and session bootstrap).
Precedence
- Direct system and developer instructions
- Explicit user override where repository governance allows it
AGENTS.mddocs/agent-rules/05-non-negotiable-checklist.md- Other
docs/agent-rules/*.mdfiles selected through this index - Change-local OpenSpec artifacts and workflow notes
Always-load rules
| Order | File | Purpose |
|---|---|---|
| 0 | INDEX.md |
Deterministic rule dispatch and precedence |
| 5 | 05-non-negotiable-checklist.md |
Invariant SHALL gates |
| 10 | 10-session-bootstrap.md |
Startup checks and stop conditions |
Applicability matrix
Task signal definitions
Use these canonical applies_when tokens in rule file frontmatter (under docs/agent-rules/*.md). They are the vocabulary AGENTS.md bootstrap and automation consume; do not invent ad-hoc strings.
| Canonical signal | Typical user intent |
|---|---|
session-bootstrap |
First-load / startup sequencing (INDEX.md, checklist, session bootstrap). |
implementation |
Code or behavior change in a worktree. |
openspec-change-selection |
Choosing, validating, or editing an OpenSpec change. |
branch-management |
Branch / worktree operations and conflicts. |
github-public-work |
Public-repo GitHub issue linkage and hierarchy. |
change-readiness |
Pre-flight metadata completeness before implementation. |
finalization |
Closing out a change, evidence, or PR. |
release |
Versioning, tagging, publish prep. |
documentation-update |
User-facing docs and README edits. |
repository-orientation |
Onboarding / where things live in the repo. |
command-lookup |
CLI usage and command discovery. |
detailed-reference |
Long-form catalogs and non-blocking reference. |
verification |
Quality gates, tests, review artifacts. |
Validation: hatch run validate-agent-rule-signals (runs scripts/validate_agent_rule_applies_when.py) checks every rule file’s applies_when list against this set. CI runs it from the Docs Review workflow when governance docs change.
| Matrix row (human summary) | Canonical signals (applies_when) |
Required rule files | Optional rule files |
|---|---|---|---|
| Any implementation request | implementation, openspec-change-selection, verification |
10-session-bootstrap.md, 40-openspec-and-tdd.md, 50-quality-gates-and-review.md |
20-repository-context.md; sibling internal wiki/ (see Internal wiki and strategic context in 40-openspec-and-tdd.md) when present |
| Code or docs changes on a branch | branch-management, implementation |
30-worktrees-and-branching.md |
80-current-guidance-catalog.md |
| Public GitHub issue work | github-public-work, change-readiness |
60-github-change-governance.md |
30-worktrees-and-branching.md |
| Release or finalization work | finalization, release, documentation-update, verification |
70-release-commit-and-docs.md, 50-quality-gates-and-review.md |
80-current-guidance-catalog.md |
| Repo orientation or command lookup | repository-orientation, command-lookup |
20-repository-context.md |
80-current-guidance-catalog.md |
Canonical rule files
05-non-negotiable-checklist.md: always-load SHALL gates10-session-bootstrap.md: startup checks, compact context loading, and stop/continue behavior20-repository-context.md: project overview, commands, architecture, and logging30-worktrees-and-branching.md: branch protection, worktree policy, and conflict avoidance40-openspec-and-tdd.md: OpenSpec selection, change validity, strict TDD order, internal wiki mirror (wiki/sources/<change-id>.md) when scope or dependencies shift, and optional sibling internal wiki context for change design50-quality-gates-and-review.md: required gates, code review JSON, clean-code enforcement, module signatures60-github-change-governance.md: cache-first GitHub metadata, dependency completeness, andin progressambiguity handling70-release-commit-and-docs.md: versioning, changelog, docs, README, and commit signing80-current-guidance-catalog.md: preserved migrated guidance not yet split into narrower documents
Preservation note
The prior long AGENTS.md content has been preserved by reference in these rule files. The goal of this migration is to reduce startup token cost without silently dropping repository instructions.