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