repoctl
This skill records repository policy for Codex. Use repoctl as the authority for graph,
ownership, affected analysis, task routing, and final hand-off verification, but keep repoctl out of
the inner coding loop unless the graph or boundaries are changing.
When this fires
- The user asks which projects are affected, which checks to run, or why CI picked a matrix.
- A change touches
repo.yaml, project.yaml, workspaces, task wiring, generated-code policy,
proto ownership, CI routing, templates, skills, or cross-project dependencies.
- A todo batch or goal is complete and needs final repoctl-scoped verification.
- Before using broad package-manager commands in a large repo when project routing is unclear.
If the repository has no repo.yaml, do not guess the graph. Run repoctl init --dry-run only when
the user is asking to adopt repoctl; otherwise inspect the existing repo layout manually.
Verification budget
- Choose the smallest repoctl surface that answers the current question.
- Keep repoctl out of the inner coding loop for source-only edits, formatting, lint fixes, and test
fixes.
- Run repoctl validation once at the end of a todo batch or goal.
- Do not recompute affected projects after source-only edits unless task-routing inputs changed.
- Use at most one affected dry-run when task selection is unclear or expensive.
- Do not run per-project/per-task dry-run matrices.
- Run
repoctl skills check only when agent instructions, skills, skill sources, or sync behavior
changed.
- If unrelated branch changes widen
repoctl affected, state that and switch to explicit
project-scoped verification.
What to produce
- A short statement of the relevant project(s), owners, and changed surfaces.
- The exact repoctl commands used, with
--format json when the result feeds automation.
- A scoped final verification recommendation; broader gates belong to shared policy, templates,
graph code, or structural changes.
- Any heavyweight gate skipped and why it was not relevant.
Reference Commands
Treat these as reference commands, not a mandatory sequence.
Validate graph inputs:
repoctl graph validate --format human
Run before editing only when graph inputs may change: repo.yaml, project.yaml, workspaces,
task wiring, generated-code policy, proto ownership, CI routing, templates, skills, or
cross-project dependency boundaries. Also run once at hand-off for structural changes.
Explain an owned project:
repoctl explain <project-name>
Use before changing a project manifest, dependency, task, proto ownership, IaC root, deploy
environment, or AI editable area.
Compute impact or select verification:
repoctl affected --base origin/main --head HEAD --tasks check,test,build --format human
Run once per todo batch when impact, CI routing, PR readiness, or verification selection matters.
Use the merge-base or PR base that matches the review target. If origin/main is not the target
branch, name the actual base explicitly in the hand-off.
Inspect changed code shape at hand-off:
repoctl inspect size --scope changed --base origin/main --head HEAD --fail-on warning
Run this for Rust, TypeScript/TSX, or Python source changes before review. Use --scope affected
when a change fans out across an owned project, and --scope all when shared thresholds,
excludes, templates, skills, or graph/inspection logic change. Treat oversized files, functions,
and nested blocks as refactoring findings unless an explicit inspection.code_size override with
a concrete reason applies.
Dry-run only when routing is unclear:
repoctl run check --affected --dry-run
Use no more than one affected dry-run to confirm an expensive or ambiguous task selection. Do not
expand this into a per-project/per-task dry-run matrix.
Generate agent context only when it helps:
repoctl context <project-name> --format json
Use context packs for multi-file edits or unfamiliar ownership. Do not treat context as a
replacement for reading the source files that will be changed.
Quality bar
- Do not hand-edit generated state to silence repoctl diagnostics.
- Do not substitute package-manager commands for repoctl affected analysis when the question is impact.
- Do not skip
repoctl inspect size for Rust, TypeScript/TSX, or Python source changes; explain any
code-size findings, configured overrides, or intentionally broader scope in the hand-off.
- Do broaden to repo-wide checks when
repo.yaml, templates, skills, root CI, or graph validation
logic changes.
- Do not run per-project/per-task dry-run matrices.
- Final responses should name skipped heavyweight gates and why they were not relevant.
Hand-off
Report the graph status when relevant, affected projects, selected commands, and any owner or
boundary concerns. If diagnostics remain, stop and show the concrete diagnostic rather than claiming
the repo is ready.
1---2name: repoctl3description: Use repoctl as the source of truth for monorepo graph, affected, CI, context, and task workflows.4---56# repoctl78This skill records repository policy for Codex. Use repoctl as the authority for graph,9ownership, affected analysis, task routing, and final hand-off verification, but keep repoctl out of10the inner coding loop unless the graph or boundaries are changing.1112## When this fires1314- The user asks which projects are affected, which checks to run, or why CI picked a matrix.15- A change touches `repo.yaml`, `project.yaml`, workspaces, task wiring, generated-code policy,16 proto ownership, CI routing, templates, skills, or cross-project dependencies.17- A todo batch or goal is complete and needs final repoctl-scoped verification.18- Before using broad package-manager commands in a large repo when project routing is unclear.1920If the repository has no `repo.yaml`, do not guess the graph. Run `repoctl init --dry-run` only when21the user is asking to adopt repoctl; otherwise inspect the existing repo layout manually.2223## Verification budget2425- Choose the smallest repoctl surface that answers the current question.26- Keep repoctl out of the inner coding loop for source-only edits, formatting, lint fixes, and test27 fixes.28- Run repoctl validation once at the end of a todo batch or goal.29- Do not recompute affected projects after source-only edits unless task-routing inputs changed.30- Use at most one affected dry-run when task selection is unclear or expensive.31- Do not run per-project/per-task dry-run matrices.32- Run `repoctl skills check` only when agent instructions, skills, skill sources, or sync behavior33 changed.34- If unrelated branch changes widen `repoctl affected`, state that and switch to explicit35 project-scoped verification.3637## What to produce3839- A short statement of the relevant project(s), owners, and changed surfaces.40- The exact repoctl commands used, with `--format json` when the result feeds automation.41- A scoped final verification recommendation; broader gates belong to shared policy, templates,42 graph code, or structural changes.43- Any heavyweight gate skipped and why it was not relevant.4445## Reference Commands4647Treat these as reference commands, not a mandatory sequence.4849- **Validate graph inputs**:5051 ```bash52 repoctl graph validate --format human53 ```5455 Run before editing only when graph inputs may change: `repo.yaml`, `project.yaml`, workspaces,56 task wiring, generated-code policy, proto ownership, CI routing, templates, skills, or57 cross-project dependency boundaries. Also run once at hand-off for structural changes.5859- **Explain an owned project**:6061 ```bash62 repoctl explain <project-name>63 ```6465 Use before changing a project manifest, dependency, task, proto ownership, IaC root, deploy66 environment, or AI editable area.6768- **Compute impact or select verification**:6970 ```bash71 repoctl affected --base origin/main --head HEAD --tasks check,test,build --format human72 ```7374 Run once per todo batch when impact, CI routing, PR readiness, or verification selection matters.75 Use the merge-base or PR base that matches the review target. If `origin/main` is not the target76 branch, name the actual base explicitly in the hand-off.7778- **Inspect changed code shape at hand-off**:7980 ```bash81 repoctl inspect size --scope changed --base origin/main --head HEAD --fail-on warning82 ```8384 Run this for Rust, TypeScript/TSX, or Python source changes before review. Use `--scope affected`85 when a change fans out across an owned project, and `--scope all` when shared thresholds,86 excludes, templates, skills, or graph/inspection logic change. Treat oversized files, functions,87 and nested blocks as refactoring findings unless an explicit `inspection.code_size` override with88 a concrete reason applies.8990- **Dry-run only when routing is unclear**:9192 ```bash93 repoctl run check --affected --dry-run94 ```9596 Use no more than one affected dry-run to confirm an expensive or ambiguous task selection. Do not97 expand this into a per-project/per-task dry-run matrix.9899- **Generate agent context only when it helps**:100101 ```bash102 repoctl context <project-name> --format json103 ```104105 Use context packs for multi-file edits or unfamiliar ownership. Do not treat context as a106 replacement for reading the source files that will be changed.107108## Quality bar109110- Do not hand-edit generated state to silence repoctl diagnostics.111- Do not substitute package-manager commands for repoctl affected analysis when the question is impact.112- Do not skip `repoctl inspect size` for Rust, TypeScript/TSX, or Python source changes; explain any113 code-size findings, configured overrides, or intentionally broader scope in the hand-off.114- Do broaden to repo-wide checks when `repo.yaml`, templates, skills, root CI, or graph validation115 logic changes.116- Do not run per-project/per-task dry-run matrices.117- Final responses should name skipped heavyweight gates and why they were not relevant.118119## Hand-off120121Report the graph status when relevant, affected projects, selected commands, and any owner or122boundary concerns. If diagnostics remain, stop and show the concrete diagnostic rather than claiming123the repo is ready.124