Agentic Repo Environment
Improve the repository environment for coding-agent discovery, execution, verification, and
learning. Treat effective AGENTS.md instructions as routing, not proof of agent readiness.
Select mode and authority
- Bootstrap a new or young repository. Inspect available evidence, conduct a bounded
owner interview for scaffold-changing choices, recommend one minimum profile, and
materialize accepted or safely reversible environment paths.
- Retrofit an existing repository. Trace grounded task scenarios, improve the
environment, and preserve supported behavior, compatibility, baseline failures, and
unrelated work.
- Renew after an accepted execution correction, escaped defect, repeated intervention,
stale route, or measured burden. Qualify the learning, trial the smallest reusable change,
and record its disposition.
- Treat assessment or recommendation requests as read-only diagnosis,
even when they ask whether the repository is agent-ready.
An explicit Bootstrap, Retrofit, Renew, or agent-ready request authorizes
behavior-preserving repository knowledge changes and fixed verification wiring. It does not
authorize new product behavior, domain meaning, application or service architecture,
production-code redesign, supported-command semantics, external settings, secrets,
production actions, deletion of a pre-existing path, commits, pushes, deployment, or release
acceptance. Promotion criteria do not grant execution permission; use existing explicit task
authorization or adopted policy without asking again for authority already granted.
For read-only assessment, use the common spine through diagnosis, then report
task-path evidence, material gaps, repair owners, next actions, and verification
criteria without changes. Distinguish demonstrated defects from missing evidence;
no change or an unresolved result can be justified. Reuse sufficient diagnosis
within lifecycle work rather than requiring a separate assessment.
Own the repository environment
- Information architecture: effective instruction precedence, task-to-authority
placement, consumption rules, and freshness across current intent, domain and architecture
knowledge, executable contracts, observed implementation, derived views, and history. Keep
plausible competing authorities visible until resolved.
- Execution environment: accepted runtime setup and one stable agent-facing path per
recurring setup, development, focused-check, broader-verification, build, diagnosis, or
maintenance intent.
- Evidence and control environment: fixed verification wiring, hooks, non-deployment CI,
permissions, and automation bounded by resource budgets, pause paths, retries, cleanup,
stop conditions, and accountable review capacity. Enable unattended operation only after
its artifact, command, and evidence loop are stable. Enforce hard rules or label them advisory.
- Learning environment: repository-level intake, trial, promotion, supersession,
rollback, and reopening paths for accepted corrections.
Recommend repository placement without choosing product, domain, application, service,
deployment, or data architecture. Route missing semantic or structural decisions to their owners.
Bootstrap through evidence and recommendations
Inspect the repository, product evidence, constraints, and existing answers before asking
questions. Ask only about choices that change maintained scaffolding: target work classes,
the first representative slice, fixed runtime and delivery constraints, the evidence
contract, autonomy, information owners, and renewal policy.
Classify each scaffold-changing choice as:
- accepted;
- recommended reversible default, with rationale and reversal path;
- consequentially unresolved, blocking only dependent slices; or
- deferred, because the walking skeleton does not need it.
Recommend one minimum profile instead of an unranked menu. Without an accountable response,
return a conditional recommendation and do not materialize a consequential unresolved
choice.
Design logical information architecture before a file tree. Materialize only owners with
real content or an accepted need. Establish one walking skeleton from clean setup through
representative work, focused feedback, broader evidence, and useful failure output. Establish
renewal intake when repeated agent work, recurring intervention, or an accepted automation
goal justifies it. Otherwise defer the interface with an activation signal; do not block
Bootstrap or create governance artifacts merely to prepare for hypothetical learning.
Read references/bootstrap.md only for Bootstrap decisions and
its walking skeleton; use existing owners and systems when renewal intake is justified.
Retrofit grounded task journeys
Start from recent changes, repeated work, maintained responsibilities, or measured friction.
Trace each scenario from the effective instruction route through minimum sufficient
authority, command selection, focused feedback, broader evidence, and handoff. Existing
artifacts and green commands prove presence, not task fitness.
Change only surfaces that displace observed friction. Preserve accepted meaning while
improving document function, concern separation, retrieval, freshness, commands,
diagnostics, and fixed evidence wiring. Finish with a demonstrated material improvement or
an evidence-backed no-op; an AGENTS.md edit alone is not completion.
Renew from accepted corrections
Bind the smallest sufficient episode evidence: task and revision, effective context, material
actions, diff, checks, external evaluation, correction, and relevant intervention cost. Bound
missing evidence. A raw failure, model reflection, or unaccepted preference is not a learning
label; recover diagnosis or acceptance before treating it as a reusable correction.
Keep local transcripts, session IDs, and raw review logs in an existing private or ignored
evidence surface. Maintained owners carry accepted decisions and reusable guidance with
self-contained rationale and accessible evidence; do not archive episodes in specifications.
For each candidate:
- Confirm the correction. Establish what changed the result and who accepted that
meaning.
- Assign the mechanism. Distinguish context, authority, procedure, runtime, feedback,
permission, architecture, task-local implementation, model variance, and product
ambiguity.
- Test learnability. Retain only a supported, reusable, stable enough, encodable, and
verifiable correction.
- Select the lowest durable owner. Prefer removing the cause or adding an executable
control over a tool affordance, route, repo skill, prose rule, or historical note.
- Trial a qualified candidate. Replay the source episode, exercise an appropriate
held-out or contrast case, and protect an existing guardrail before promotion.
- Dispose and consolidate. Promote, retain as a trial, keep task-local, route,
quarantine, reject, supersede, or roll back. Replace obsolete paths instead of growing
instructions and controls monotonically.
- Observe. Record the validity limit and reopening or reversal signal.
Scale evidence to the mechanism and consequence; a local route repair may use direct checks.
Automate collection and trials only when repetition justifies them. A changed instruction,
selector, check, judge, or gate must not be its own sole proof. Increase independence with risk.
Read references/renewal.md only for Renew qualification, trials,
promotion, and dispositions. An evidence-backed non-promotion outcome completes evaluation
without requiring an environment change or a passing promotion trial.
Compose without losing lifecycle ownership
For authorized lifecycle work, resolve missing specialist decisions, then resume the
active mode; a route is not completion. Read-only diagnosis ends with its owned result.
- Use
technical-writing for document function, domain-modeling for semantic conflict,
architecture-surface-mapping for an unfamiliar path, and software-system-design
for unresolved application structure.
- Use
software-failure-diagnosis for an unexplained mechanism and software-verification
for an unfixed claim, method, oracle, scope, or independent verdict.
- Route behavior changes to
scoped-change-implementation; production-code structure to
behavior-preserving-refactoring or its design owner; supported command semantics to
software-contract-evolution; and repo skill authoring to skill-creator.
- Use
platform-capability-design only for a supported shared product.
Execute the common spine
- Establish scope and authority. Inspect Git state, effective instructions, accepted constraints, and existing systems of record. Preserve unrelated work.
- Bind representative evidence. Select diagnostic task paths, accepted Bootstrap workflows, grounded Retrofit scenarios, or the Renew episode.
Trace its information, runtime, command, evidence, and control owners; preserve baseline failures and reuse sufficient current evidence.
Expand inspection when an unresolved mechanism, dependency, or guardrail can change the repair or its verification.
Bootstrap still needs the complete representative setup-to-verification path; narrow Renew episodes need no fresh repo-wide inventory.
- Diagnose the earliest gap. Separate an environment defect from missing product,
domain, architecture, compatibility, or release authority.
- Obtain owned decisions. Resolve mechanical routing and behavior-preserving changes
directly. Route only blocked slices.
- Implement the smallest coherent change. Keep local and CI paths on one
implementation. Do not add empty templates, duplicate truth, a generic control plane or
memory service, speculative controls, or one-off repo skills.
- Verify the delta. Repeat affected consumer paths and reuse unaffected evidence;
prose-only edits need runtime checks only for changed claims or executable inputs,
suspect evidence, required gates, or explicitly fresh verification. Preserve known
failures. For a running-system outcome, identify the actual target and exercise its
consumer path within existing authority. Use a fresh context for changed instruction
or retrieval behavior when available; otherwise record not run.
- Consolidate and report. Redirect or deprecate superseded paths. Delete a pre-existing
path only with explicit exact-target authority and applicable compatibility evidence.
When replacing a tracked or supported path, also prove replacement use and consumer coverage.
Read references/setup-checklist.md when several surfaces
need one durable implementation, review, or handoff record.
Strengthen verification proportionately
Classify focused and broader evidence as present, absent, not applicable, or
disputed. Presence, test count, coverage, or a green gate does not prove adequacy.
Before changing test selection, broader-gate composition, CI enforcement, or permissions,
freeze pre-change claims, exercised and omitted scope, skips, and exit semantics. Preserve a
pre/post scope delta. Use a fixed negative control or independent evidence; the changed
control cannot certify itself.
Quality gates
- Bootstrap produces an accepted or safely reversible walking skeleton; renewal intake is
usable when justified, otherwise explicitly deferred with an activation signal.
- Retrofit demonstrates a material task-path improvement or an evidence-backed no-op while
preserving behavior and baseline failure identity.
- Renew evaluation ends with an evidence-backed disposition, including no environment change.
Promotion requires an accepted correction and passing replay, contrast, and guardrail evidence.
Failed or unavailable evidence prevents promotion, not an honest rejection or deferral.
- Each sampled path reaches minimum sufficient authority and risk-matched evidence.
Unresolved meaning, untested partitions, and unavailable independent evidence remain
visible.
- Added files, checks, dependencies, and automation displace demonstrated burden. Superseded
instructions and controls do not accumulate silently.
Completion
Report the mode, authority, decision frontier or episode, representative paths, changed owners,
stable commands, exact evidence and before-and-after limits, preserved behavior, and dispositions.
Name path consolidation, blocked slices, and the next renewal or reopening signal. Bootstrap
remains incomplete while its accepted runtime or a required official path is unavailable or failing.
1---2name: agentic-repo-environment3description: Diagnose, bootstrap, retrofit, or renew the repository-local environment for reliable coding-agent work. Use read-only diagnosis for task-path gaps, Bootstrap for minimum working paths, Retrofit for observed friction, and Renew for accepted corrections that may generalize. Route product meaning, architecture decisions, command compatibility, and release authority to their owners.4---56# Agentic Repo Environment78Improve the repository environment for coding-agent discovery, execution, verification, and9learning. Treat effective `AGENTS.md` instructions as routing, not proof of agent readiness.1011## Select mode and authority1213- **Bootstrap** a new or young repository. Inspect available evidence, conduct a bounded14 owner interview for scaffold-changing choices, recommend one minimum profile, and15 materialize accepted or safely reversible environment paths.16- **Retrofit** an existing repository. Trace grounded task scenarios, improve the17 environment, and preserve supported behavior, compatibility, baseline failures, and18 unrelated work.19- **Renew** after an accepted execution correction, escaped defect, repeated intervention,20 stale route, or measured burden. Qualify the learning, trial the smallest reusable change,21 and record its disposition.22- Treat assessment or recommendation requests as read-only diagnosis,23 even when they ask whether the repository is agent-ready.2425An explicit Bootstrap, Retrofit, Renew, or agent-ready request authorizes26behavior-preserving repository knowledge changes and fixed verification wiring. It does not27authorize new product behavior, domain meaning, application or service architecture,28production-code redesign, supported-command semantics, external settings, secrets,29production actions, deletion of a pre-existing path, commits, pushes, deployment, or release30acceptance. Promotion criteria do not grant execution permission; use existing explicit task31authorization or adopted policy without asking again for authority already granted.3233For read-only assessment, use the common spine through diagnosis, then report34task-path evidence, material gaps, repair owners, next actions, and verification35criteria without changes. Distinguish demonstrated defects from missing evidence;36no change or an unresolved result can be justified. Reuse sufficient diagnosis37within lifecycle work rather than requiring a separate assessment.3839## Own the repository environment4041- **Information architecture:** effective instruction precedence, task-to-authority42 placement, consumption rules, and freshness across current intent, domain and architecture43 knowledge, executable contracts, observed implementation, derived views, and history. Keep44 plausible competing authorities visible until resolved.45- **Execution environment:** accepted runtime setup and one stable agent-facing path per46 recurring setup, development, focused-check, broader-verification, build, diagnosis, or47 maintenance intent.48- **Evidence and control environment:** fixed verification wiring, hooks, non-deployment CI,49 permissions, and automation bounded by resource budgets, pause paths, retries, cleanup,50 stop conditions, and accountable review capacity. Enable unattended operation only after51 its artifact, command, and evidence loop are stable. Enforce hard rules or label them advisory.52- **Learning environment:** repository-level intake, trial, promotion, supersession,53 rollback, and reopening paths for accepted corrections.5455Recommend repository placement without choosing product, domain, application, service,56deployment, or data architecture. Route missing semantic or structural decisions to their owners.5758## Bootstrap through evidence and recommendations5960Inspect the repository, product evidence, constraints, and existing answers before asking61questions. Ask only about choices that change maintained scaffolding: target work classes,62the first representative slice, fixed runtime and delivery constraints, the evidence63contract, autonomy, information owners, and renewal policy.6465Classify each scaffold-changing choice as:6667- **accepted**;68- **recommended reversible default**, with rationale and reversal path;69- **consequentially unresolved**, blocking only dependent slices; or70- **deferred**, because the walking skeleton does not need it.7172Recommend one minimum profile instead of an unranked menu. Without an accountable response,73return a conditional recommendation and do not materialize a consequential unresolved74choice.7576Design logical information architecture before a file tree. Materialize only owners with77real content or an accepted need. Establish one walking skeleton from clean setup through78representative work, focused feedback, broader evidence, and useful failure output. Establish79renewal intake when repeated agent work, recurring intervention, or an accepted automation80goal justifies it. Otherwise defer the interface with an activation signal; do not block81Bootstrap or create governance artifacts merely to prepare for hypothetical learning.8283Read [references/bootstrap.md](references/bootstrap.md) only for Bootstrap decisions and84its walking skeleton; use existing owners and systems when renewal intake is justified.8586## Retrofit grounded task journeys8788Start from recent changes, repeated work, maintained responsibilities, or measured friction.89Trace each scenario from the effective instruction route through minimum sufficient90authority, command selection, focused feedback, broader evidence, and handoff. Existing91artifacts and green commands prove presence, not task fitness.9293Change only surfaces that displace observed friction. Preserve accepted meaning while94improving document function, concern separation, retrieval, freshness, commands,95diagnostics, and fixed evidence wiring. Finish with a demonstrated material improvement or96an evidence-backed no-op; an `AGENTS.md` edit alone is not completion.9798## Renew from accepted corrections99100Bind the smallest sufficient episode evidence: task and revision, effective context, material101actions, diff, checks, external evaluation, correction, and relevant intervention cost. Bound102missing evidence. A raw failure, model reflection, or unaccepted preference is not a learning103label; recover diagnosis or acceptance before treating it as a reusable correction.104105Keep local transcripts, session IDs, and raw review logs in an existing private or ignored106evidence surface. Maintained owners carry accepted decisions and reusable guidance with107self-contained rationale and accessible evidence; do not archive episodes in specifications.108109For each candidate:1101111. **Confirm the correction.** Establish what changed the result and who accepted that112 meaning.1132. **Assign the mechanism.** Distinguish context, authority, procedure, runtime, feedback,114 permission, architecture, task-local implementation, model variance, and product115 ambiguity.1163. **Test learnability.** Retain only a supported, reusable, stable enough, encodable, and117 verifiable correction.1184. **Select the lowest durable owner.** Prefer removing the cause or adding an executable119 control over a tool affordance, route, repo skill, prose rule, or historical note.1205. **Trial a qualified candidate.** Replay the source episode, exercise an appropriate121 held-out or contrast case, and protect an existing guardrail before promotion.1226. **Dispose and consolidate.** Promote, retain as a trial, keep task-local, route,123 quarantine, reject, supersede, or roll back. Replace obsolete paths instead of growing124 instructions and controls monotonically.1257. **Observe.** Record the validity limit and reopening or reversal signal.126127Scale evidence to the mechanism and consequence; a local route repair may use direct checks.128Automate collection and trials only when repetition justifies them. A changed instruction,129selector, check, judge, or gate must not be its own sole proof. Increase independence with risk.130131Read [references/renewal.md](references/renewal.md) only for Renew qualification, trials,132promotion, and dispositions. An evidence-backed non-promotion outcome completes evaluation133without requiring an environment change or a passing promotion trial.134135## Compose without losing lifecycle ownership136137For authorized lifecycle work, resolve missing specialist decisions, then resume the138active mode; a route is not completion. Read-only diagnosis ends with its owned result.139140- Use `technical-writing` for document function, `domain-modeling` for semantic conflict,141 `architecture-surface-mapping` for an unfamiliar path, and `software-system-design`142 for unresolved application structure.143- Use `software-failure-diagnosis` for an unexplained mechanism and `software-verification`144 for an unfixed claim, method, oracle, scope, or independent verdict.145- Route behavior changes to `scoped-change-implementation`; production-code structure to146 `behavior-preserving-refactoring` or its design owner; supported command semantics to147 `software-contract-evolution`; and repo skill authoring to `skill-creator`.148- Use `platform-capability-design` only for a supported shared product.149150## Execute the common spine1511521. **Establish scope and authority.** Inspect Git state, effective instructions, accepted constraints, and existing systems of record. Preserve unrelated work.1532. **Bind representative evidence.** Select diagnostic task paths, accepted Bootstrap workflows, grounded Retrofit scenarios, or the Renew episode.154 Trace its information, runtime, command, evidence, and control owners; preserve baseline failures and reuse sufficient current evidence.155 Expand inspection when an unresolved mechanism, dependency, or guardrail can change the repair or its verification.156 Bootstrap still needs the complete representative setup-to-verification path; narrow Renew episodes need no fresh repo-wide inventory.1573. **Diagnose the earliest gap.** Separate an environment defect from missing product,158 domain, architecture, compatibility, or release authority.1594. **Obtain owned decisions.** Resolve mechanical routing and behavior-preserving changes160 directly. Route only blocked slices.1615. **Implement the smallest coherent change.** Keep local and CI paths on one162 implementation. Do not add empty templates, duplicate truth, a generic control plane or163 memory service, speculative controls, or one-off repo skills.1646. **Verify the delta.** Repeat affected consumer paths and reuse unaffected evidence;165 prose-only edits need runtime checks only for changed claims or executable inputs,166 suspect evidence, required gates, or explicitly fresh verification. Preserve known167 failures. For a running-system outcome, identify the actual target and exercise its168 consumer path within existing authority. Use a fresh context for changed instruction169 or retrieval behavior when available; otherwise record **not run**.1707. **Consolidate and report.** Redirect or deprecate superseded paths. Delete a pre-existing171 path only with explicit exact-target authority and applicable compatibility evidence.172 When replacing a tracked or supported path, also prove replacement use and consumer coverage.173174Read [references/setup-checklist.md](references/setup-checklist.md) when several surfaces175need one durable implementation, review, or handoff record.176177## Strengthen verification proportionately178179Classify focused and broader evidence as **present**, **absent**, **not applicable**, or180**disputed**. Presence, test count, coverage, or a green gate does not prove adequacy.181182Before changing test selection, broader-gate composition, CI enforcement, or permissions,183freeze pre-change claims, exercised and omitted scope, skips, and exit semantics. Preserve a184pre/post scope delta. Use a fixed negative control or independent evidence; the changed185control cannot certify itself.186187## Quality gates188189- Bootstrap produces an accepted or safely reversible walking skeleton; renewal intake is190 usable when justified, otherwise explicitly deferred with an activation signal.191- Retrofit demonstrates a material task-path improvement or an evidence-backed no-op while192 preserving behavior and baseline failure identity.193- Renew evaluation ends with an evidence-backed disposition, including no environment change.194 Promotion requires an accepted correction and passing replay, contrast, and guardrail evidence.195 Failed or unavailable evidence prevents promotion, not an honest rejection or deferral.196- Each sampled path reaches minimum sufficient authority and risk-matched evidence.197 Unresolved meaning, untested partitions, and unavailable independent evidence remain198 visible.199- Added files, checks, dependencies, and automation displace demonstrated burden. Superseded200 instructions and controls do not accumulate silently.201202## Completion203204Report the mode, authority, decision frontier or episode, representative paths, changed owners,205stable commands, exact evidence and before-and-after limits, preserved behavior, and dispositions.206Name path consolidation, blocked slices, and the next renewal or reopening signal. Bootstrap207remains incomplete while its accepted runtime or a required official path is unavailable or failing.