Repo Standards Router
Purpose
Select the smallest correct standards stack for a repo, based on primary app type, overlapping overlays, and risk profile.
Scope boundary
This skill is the router for repository standards composition (app-type + overlays), not the router for GitHub workflow governance.
- Owns: standards branch selection, verification gates, branch-promotion candidates.
- Does not own: ticket lifecycle execution, review/merge administration, ruleset architecture, merge queue readiness, Actions hardening.
If the request includes GitHub workflow governance controls, hand off to github-ops-tree-router after standards selection.
Hard constraints
- No broad policy rewrites in one pass.
- Maximum 8 recommendations.
- Must return explicit verification gates.
- If repository type is unclear, return
NO_CHANGE + missing evidence.
- Prefer existing classes + overlays over creating a new branch.
- For app-types with first-class versioned distribution channels, include a
version-selectability control in release recommendations.
Decision flow
- Detect
primary_type from runtime intent and repository artifacts.
- Detect
secondary_types only when overlap is clear and evidence-backed.
- Apply
core-baseline controls.
- Apply primary-type controls per the app-type classification (the
core-baseline controls above plus the per-type overlays selected in steps 5-6).
- Apply selected overlays (
security, collaboration, release, optional observability).
- Calibrate severity with
policy_profile.
- Emit actionable controls and checks.
Handoff protocol
Set handoff_required=yes when any requested control includes:
- branch protection or rulesets,
- merge queue policy,
- Actions token/pinning/OIDC/runner hardening,
- ticket/PR lifecycle administration.
Then set handoff_skill=github-ops-tree-router and include a short reason.
Output format (required)
STANDARDS_ROUTER_REPORT
primary_type: <website-static|web-app|library-sdk|infra-automation>
secondary_types: <none|comma-separated types>
overlays: <none|security,collaboration,release,observability>
policy_profile: <strict|standard|light>
confidence: <high|medium|low>
selected_branches:
- core-baseline
- <primary-type-branch>
- <overlay-branches>
handoff:
- required: <yes|no>
- handoff_skill: <none|github-ops-tree-router>
- reason: <none|why governance routing is needed>
controls:
1) priority: <P1|P2|P3>
area: <security|testing|docs|release|quality|accessibility|seo|supply-chain>
change: <specific control>
verification: <objective check>
missing_controls:
- <none or control gaps not yet covered by current branches>
skills_to_run_next:
- <none|web-regression-governance|repo-profile-governance|github-ops-tree-router|workflow-self-anneal>
decision:
- <apply|defer|NO_CHANGE>
missing_evidence:
- <none or required artifacts>
evolution_todos:
- <only if repeated gaps suggest future branch creation>
App-type branch controls (summary)
website-static: SEO/schema sync, visual regression, responsive QA, WCAG AA baseline, performance budgets; run web-regression-governance when runtime injection/DOM mutation risks exist.
web-app: component/e2e testing, auth/session hardening, dependency controls, WCAG AA; run web-regression-governance for route-level visual/DOM/runtime invariant enforcement.
library-sdk: compatibility policy, SemVer, changelog quality, consumer examples.
infra-automation: least privilege, pinned dependencies/actions, policy checks, runbooks.
Overlays (summary)
security: secrets/dependency checks, hardening and incident-readiness controls.
collaboration: contributor-facing hygiene (LICENSE, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, templates, CI).
release: SemVer/release checklist, changelog quality, rollback notes.
observability (optional): telemetry, SLO/error budget, alert ownership.
Version-selectability capability rule (required)
When overlays includes release, evaluate whether the repository's distribution channel supports exact version installation or pinning (for example package registries, extension marketplaces, container tags/digests, action tags).
If supported, add a required release control that enforces all of the following:
- Immutable per-version artifacts (no overwrite of released versions).
- Exact-version install path remains available for supported historical versions.
- Release pipeline verifies exact-version installability before marking a version active/announced.
- Update prompts use the same canonical version source used for installation.
If not supported by platform constraints, record an explicit exception and the nearest deterministic fallback.
Future branch promotion rule
Recommend adding a new branch only if all are true:
- Repeated need appears in at least 2 repositories.
- At least 3 controls are not covered by existing primary types + overlays.
- Risk is meaningful if left as ad-hoc guidance.
Cross-Team Artifact-Write Flag
When routing a repo that authors config files consumed by another team's runtime
(e.g., Codex team writing .claude/settings.json), flag the ticket for the
cross-team artifact-write contract. See
instructions/cross-team-artifact-write.instructions.md.
1---
2name: repo-standards-router
3description: "Classify a repository by app type and route it to the correct standards branch, policy profile, and verification gates."
4argument-hint: "[primary-type: website-static|web-app|library-sdk|infra-automation|auto-detect] [policy-profile: strict|standard|light] [overlays: security|collaboration|release|observability]"
5user-invocable: true
6disable-model-invocation: false
7---
8
9# Repo Standards Router
10
11## Purpose
12
13Select the smallest correct standards stack for a repo, based on primary app type, overlapping overlays, and risk profile.
14
15## Scope boundary
16
17This skill is the router for **repository standards composition** (app-type + overlays), not the router for GitHub workflow governance.
18
19- Owns: standards branch selection, verification gates, branch-promotion candidates.
20- Does not own: ticket lifecycle execution, review/merge administration, ruleset architecture, merge queue readiness, Actions hardening.
21
22If the request includes GitHub workflow governance controls, hand off to `github-ops-tree-router` after standards selection.
23
24## Hard constraints
25
261. No broad policy rewrites in one pass.
272. Maximum 8 recommendations.
283. Must return explicit verification gates.
294. If repository type is unclear, return `NO_CHANGE` + missing evidence.
305. Prefer existing classes + overlays over creating a new branch.
316. For app-types with first-class versioned distribution channels, include a `version-selectability` control in release recommendations.
32
33## Decision flow
34
351. Detect `primary_type` from runtime intent and repository artifacts.
362. Detect `secondary_types` only when overlap is clear and evidence-backed.
373. Apply `core-baseline` controls.
384. Apply primary-type controls per the app-type classification (the `core-baseline` controls above plus the per-type overlays selected in steps 5-6).
395. Apply selected overlays (`security`, `collaboration`, `release`, optional `observability`).
406. Calibrate severity with `policy_profile`.
417. Emit actionable controls and checks.
42
43## Handoff protocol
44
45Set `handoff_required=yes` when any requested control includes:
46
47- branch protection or rulesets,
48- merge queue policy,
49- Actions token/pinning/OIDC/runner hardening,
50- ticket/PR lifecycle administration.
51
52Then set `handoff_skill=github-ops-tree-router` and include a short reason.
53
54## Output format (required)
55
56```text
57STANDARDS_ROUTER_REPORT
58primary_type: <website-static|web-app|library-sdk|infra-automation>
59secondary_types: <none|comma-separated types>
60overlays: <none|security,collaboration,release,observability>
61policy_profile: <strict|standard|light>
62confidence: <high|medium|low>
63
64selected_branches:
65- core-baseline
66- <primary-type-branch>
67- <overlay-branches>
68
69handoff:
70- required: <yes|no>
71- handoff_skill: <none|github-ops-tree-router>
72- reason: <none|why governance routing is needed>
73
74controls:
751) priority: <P1|P2|P3>
76 area: <security|testing|docs|release|quality|accessibility|seo|supply-chain>
77 change: <specific control>
78 verification: <objective check>
79
80missing_controls:
81- <none or control gaps not yet covered by current branches>
82
83skills_to_run_next:
84- <none|web-regression-governance|repo-profile-governance|github-ops-tree-router|workflow-self-anneal>
85
86decision:
87- <apply|defer|NO_CHANGE>
88
89missing_evidence:
90- <none or required artifacts>
91
92evolution_todos:
93- <only if repeated gaps suggest future branch creation>
94```
95
96## App-type branch controls (summary)
97
98- `website-static`: SEO/schema sync, visual regression, responsive QA, WCAG AA baseline, performance budgets; run `web-regression-governance` when runtime injection/DOM mutation risks exist.
99- `web-app`: component/e2e testing, auth/session hardening, dependency controls, WCAG AA; run `web-regression-governance` for route-level visual/DOM/runtime invariant enforcement.
100- `library-sdk`: compatibility policy, SemVer, changelog quality, consumer examples.
101- `infra-automation`: least privilege, pinned dependencies/actions, policy checks, runbooks.
102
103## Overlays (summary)
104
105- `security`: secrets/dependency checks, hardening and incident-readiness controls.
106- `collaboration`: contributor-facing hygiene (`LICENSE`, `CONTRIBUTING`, `CODE_OF_CONDUCT`, `SECURITY`, templates, CI).
107- `release`: SemVer/release checklist, changelog quality, rollback notes.
108- `observability` (optional): telemetry, SLO/error budget, alert ownership.
109
110## Version-selectability capability rule (required)
111
112When `overlays` includes `release`, evaluate whether the repository's distribution channel supports exact version installation or pinning (for example package registries, extension marketplaces, container tags/digests, action tags).
113
114If supported, add a required release control that enforces all of the following:
115
1161. Immutable per-version artifacts (no overwrite of released versions).
1172. Exact-version install path remains available for supported historical versions.
1183. Release pipeline verifies exact-version installability before marking a version active/announced.
1194. Update prompts use the same canonical version source used for installation.
120
121If not supported by platform constraints, record an explicit exception and the nearest deterministic fallback.
122
123## Future branch promotion rule
124
125Recommend adding a new branch only if all are true:
126
1271. Repeated need appears in at least 2 repositories.
1282. At least 3 controls are not covered by existing primary types + overlays.
1293. Risk is meaningful if left as ad-hoc guidance.
130
131## Cross-Team Artifact-Write Flag
132
133When routing a repo that authors config files consumed by another team's runtime
134(e.g., Codex team writing `.claude/settings.json`), flag the ticket for the
135cross-team artifact-write contract. See
136`instructions/cross-team-artifact-write.instructions.md`.