Skip to content

Adopt provider-neutral model routing governance - #26

Merged
hindermath merged 10 commits into
masterfrom
codex/model-routing-governance-adoption-20260809
Aug 9, 2026
Merged

Adopt provider-neutral model routing governance#26
hindermath merged 10 commits into
masterfrom
codex/model-routing-governance-adoption-20260809

Conversation

@hindermath

Copy link
Copy Markdown
Owner

Summary

  • install Model Routing Governance v0.1.2 at priority 61
  • update the canonical twelve-preset profile and generated agent surfaces
  • propagate the matching maintenance, documentation, and validation package
  • refresh reproducible project statistics

Validation

  • exact twelve-preset matrix: pass
  • model-routing discovery tests in Bash and PowerShell: pass
  • specify check: pass
  • statistics check and git diff --check: pass
  • exactly one status and refresh skill: pass

No product behavior, concrete personal model selection, or implicit execution authority is included.

Copilot AI lite review requested due to automatic review settings August 9, 2026 00:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces provider-neutral “model routing governance” across the Spec Kit preset stack and generated agent surfaces, so that repositories store stable roles/policies in Git while keeping concrete model bindings local and fail-closed. It also expands Documentation Impact validation fixtures and updates maintenance tooling to pre-bind a run-owned report path.

Changes:

  • Add and propagate model-routing.json contracts + templates across presets, agents, and skills, including fail-closed routing and read-only preflight expectations.
  • Extend Documentation Impact evidence to schema 1.1 with additional required architecture/distribution/language fields and broaden fixture coverage.
  • Update maintenance tooling (TUI) to include an explicit ReportPath in process invocations and document the invariant.

Reviewed changes

Copilot reviewed 197 out of 197 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/tests/documentation-impact/fixtures/valid.json Bump fixture to schema 1.1 fields
scripts/tests/documentation-impact/fixtures/missing-architecture-fields.json New negative fixture for required arch fields
scripts/tests/documentation-impact/fixtures/legacy-valid.json New schema 1.0 legacy fixture
scripts/tests/documentation-impact/fixtures/invalid-language-partners-type.json New negative fixture for languagePartners type
scripts/tests/documentation-impact/fixtures/invalid-home-sync-type.json New negative fixture for homeSyncRequired type
scripts/tests/documentation-impact/fixtures/invalid-distribution-class.json New negative fixture for distributionClass vocabulary
scripts/test-documentation-impact.sh Bash fixture runner checks error class markers
scripts/resolve-model-routing.sh Bash wrapper delegating to PowerShell resolver
scripts/lib/maintenance-tui/tests/HomeBaseline.MaintenanceTui.Tests/Integration/VerticalSliceTests.cs Update test invocation with report path
scripts/lib/maintenance-tui/tests/HomeBaseline.MaintenanceTui.Tests/Integration/CancellationTests.cs Update test invocation with report path
scripts/lib/maintenance-tui/tests/HomeBaseline.MaintenanceTui.Tests/Contracts/EventReaderTests.cs Add duplicate-record degradation test
scripts/lib/maintenance-tui/tests/HomeBaseline.MaintenanceTui.Tests/Contracts/CommandBuilderTests.cs Assert report path is derived correctly
scripts/lib/maintenance-tui/src/HomeBaseline.MaintenanceTui/Infrastructure/MaintenanceCommandBuilder.cs Add ReportPath to invocation + derive path
scripts/lib/hg-bilingual.sh Accept linked DE/EN language-pair markdown
scripts/lib/hg-bilingual.ps1 Add language-pair detection parity in PS
scripts/config/spec-kit-preset-profiles.json New preset-profile registry + matrices
docs/man/resolve-model-routing.1.md New manpage for model routing resolver
docs/man/maintain-agentic-workspace.1.md Document pre-bound report path invariant
.specify/templates/tasks-template.md Add tasks checklist for doc-arch fields
.specify/templates/spec-template.md Expand doc-impact acceptance criteria
.specify/templates/plan-template.md Expand doc-impact plan requirements
.specify/presets/security-governance/README.md Bump version + note model-routing contract
.specify/presets/security-governance/preset.yml Bump version + provide model-routing template
.specify/presets/security-governance/model-routing.json New routing catalog for preset commands
.specify/presets/parallel-autonomous-run-governance/templates/parallel-runner-profiles-template.json Add routingRole + preflight placeholder
.specify/presets/parallel-autonomous-run-governance/templates/parallel-runner-profiles-examples.json Add routingRole fields to examples
.specify/presets/parallel-autonomous-run-governance/templates/parallel-campaign-template.json Add campaign routing role + fail-closed policy
.specify/presets/parallel-autonomous-run-governance/templates/parallel-campaign-state-template.json Persist routing role/policy + preflight state
.specify/presets/parallel-autonomous-run-governance/templates/agent-file-addendum.md Document fail-closed routing requirements
.specify/presets/parallel-autonomous-run-governance/preset.yml Bump version + provide model-routing template
.specify/presets/parallel-autonomous-run-governance/model-routing.json New routing catalog for parallel autonomous cmds
.specify/presets/parallel-autonomous-run-governance/docs/man/orchestrate-parallel-autonomous-runs.1 Update manpage safety section for routing
.specify/presets/parallel-autonomous-run-governance/docs/getting-started.md Bump referenced version + routing notes
.specify/presets/parallel-autonomous-run-governance/commands/speckit.parallel-autonomous.md Add fail-closed routing validation rules
.specify/presets/parallel-autonomous-run-governance/commands/speckit.parallel-autonomous-status.md Include routing role/preflight in status
.specify/presets/parallel-autonomous-run-governance/commands/speckit.parallel-autonomous-resume.md Add routing revalidation on resume
.specify/presets/model-routing-governance/tests/test-model-routing-discovery.sh New cross-platform discovery test wrapper
.specify/presets/model-routing-governance/tests/fixtures/codex-models.json New fixture model catalog
.specify/presets/model-routing-governance/tests/fixtures/ambiguous-models.json New fixture for ambiguous mapping
.specify/presets/model-routing-governance/templates/model-routing-profiles-template.json New template for local routing profiles
.specify/presets/model-routing-governance/templates/model-routing-policy-template.json New policy template (roles, adapters)
.specify/presets/model-routing-governance/templates/agent-file-addendum.md New routing governance addendum for agents
.specify/presets/model-routing-governance/scripts/resolve-model-routing.sh New bash wrapper for resolver
.specify/presets/model-routing-governance/model-routing.json New routing catalog for routing commands
.specify/presets/model-routing-governance/LICENSE Add license for new preset package
.specify/presets/model-routing-governance/docs/man/resolve-model-routing.1.md New manpage inside preset package
.specify/presets/model-routing-governance/commands/speckit.model-routing-status.md New command definition (read-only status)
.specify/presets/model-routing-governance/commands/speckit.model-routing-refresh.md New command definition (refresh)
.specify/presets/isaqb-architecture-governance/templates/quality-scenarios-template.md Cleanup trailing placeholder bullets
.specify/presets/isaqb-architecture-governance/templates/context-view-template.md Cleanup trailing placeholder bullets
.specify/presets/isaqb-architecture-governance/templates/building-block-view-template.md Cleanup placeholder dash
.specify/presets/isaqb-architecture-governance/README.md Bump version + note model-routing contract
.specify/presets/isaqb-architecture-governance/preset.yml Bump version + provide model-routing template
.specify/presets/isaqb-architecture-governance/model-routing.json New routing catalog for core commands
.specify/presets/intake-sequencing-governance/tests/test-intake-sequencing-validator.ps1 Update generator version reference
.specify/presets/intake-sequencing-governance/templates/intake-series-receipt-template.json Bump generator version in template
.specify/presets/intake-sequencing-governance/README.md Bump version + add model-routing note
.specify/presets/intake-sequencing-governance/preset.yml Bump version + provide model-routing template
.specify/presets/intake-sequencing-governance/model-routing.json New routing catalog for intake series cmds
.specify/presets/intake-sequencing-governance/docs/man/validate-intake-series-receipt.1 Bump version in manpage header
.specify/presets/intake-sequencing-governance/docs/man/validate-intake-series-manifest.1 Bump version in manpage header
.specify/presets/intake-sequencing-governance/docs/man/validate-intake-governance-config.1 Bump version in manpage header
.specify/presets/intake-sequencing-governance/docs/field-validation-summary.md Bump version in validation summary
.specify/presets/intake-review-governance/preset.yml Bump version + provide model-routing template
.specify/presets/intake-review-governance/model-routing.json New routing catalog for intake-review cmds
.specify/presets/intake-review-governance/docs/README.md Note model-routing contract addition
.specify/presets/intake-review-governance/docs/man/validate-intake-review-result.1 Bump version string
.specify/presets/intake-review-governance/docs/man/validate-intake-governance-config.1 Bump version string
.specify/presets/intake-authoring-governance/tests/test-intake-authoring-lifecycle.ps1 Update generator version reference
.specify/presets/intake-authoring-governance/templates/intake-authoring-receipt-template.json Bump generator version in template
.specify/presets/intake-authoring-governance/templates/field-validation-summary.md Bump version in template text
.specify/presets/intake-authoring-governance/scripts/validate-intake-authoring-receipt.sh Accept new generator version
.specify/presets/intake-authoring-governance/scripts/validate-intake-authoring-receipt.ps1 Accept new generator version
.specify/presets/intake-authoring-governance/README.md Note model-routing contract addition
.specify/presets/intake-authoring-governance/preset.yml Bump version + provide model-routing template
.specify/presets/intake-authoring-governance/model-routing.json New routing catalog for intake CRUD cmds
.specify/presets/intake-authoring-governance/docs/man/validate-intake-governance-config.1 Bump version string
.specify/presets/intake-authoring-governance/docs/man/validate-intake-authoring-receipt.1 Bump version string
.specify/presets/intake-authoring-governance/docs/man/validate-intake-authoring-artifact.1 Bump version string
.specify/presets/intake-authoring-governance/commands/speckit.intake-delete.md Remove stale version-specific wording
.specify/presets/cross-platform-governance/README.md Bump version + note model-routing contract
.specify/presets/cross-platform-governance/preset.yml Bump version + provide model-routing template
.specify/presets/cross-platform-governance/model-routing.json New routing catalog for core commands
.specify/presets/autonomous-run-governance/tests/test-model-routing.sh New routing test wrapper (pwsh prerequisite)
.specify/presets/autonomous-run-governance/tests/fixture-model-runner.ps1 New PS fixture runner
.specify/presets/autonomous-run-governance/templates/autonomous-runner-profiles-template.json New template for local runner profiles
.specify/presets/autonomous-run-governance/templates/autonomous-runbook-template.md Add routing boundaries + evidence expectations
.specify/presets/autonomous-run-governance/templates/autonomous-run-state-template.json Add routing section to run state
.specify/presets/autonomous-run-governance/templates/autonomous-run-evidence-template.md Add model-routing evidence table
.specify/presets/autonomous-run-governance/templates/agent-file-addendum.md Add routing + fail-closed guidance
.specify/presets/autonomous-run-governance/scripts/invoke-autonomous-model-phase.sh New bash entry point for routed phases
.specify/presets/autonomous-run-governance/preset.yml Bump version + add routing templates
.specify/presets/autonomous-run-governance/model-routing.json New routing catalog for autonomous cmds
.specify/presets/autonomous-run-governance/docs/man/validate-autonomous-run-state.1 Bump version string
.specify/presets/autonomous-run-governance/docs/man/validate-autonomous-gate-evidence.1 Bump version string
.specify/presets/autonomous-run-governance/commands/speckit.autonomous-stop.md Clarify stop must not start new routed phase
.specify/presets/autonomous-run-governance/commands/speckit.autonomous-status.md Include routing info in status output
.specify/presets/autonomous-run-governance/commands/speckit.autonomous-resume.md Require routing revalidation + phase restart
.specify/presets/architecture-governance/README.md Bump version + note model-routing contract
.specify/presets/architecture-governance/preset.yml Bump version + provide model-routing template
.specify/presets/architecture-governance/model-routing.json New routing catalog for core commands
.specify/presets/agent-parity-governance/templates/constitution-addendum.md Define stable roles + fail-closed expectations
.specify/presets/agent-parity-governance/templates/agent-parity-checklist-template.md Add checklist items for routing coverage
.specify/presets/agent-parity-governance/templates/agent-file-addendum.md Add routing guidance for agents
.specify/presets/agent-parity-governance/preset.yml Bump version + provide model-routing template
.specify/presets/agent-parity-governance/model-routing.json New routing catalog for core commands
.specify/presets/a11y-governance/preset.yml Bump version + provide model-routing template
.specify/presets/a11y-governance/model-routing.json New routing catalog for core commands
.opencode/commands/speckit.parallel-autonomous.md Propagate routing guidance to opencode surface
.opencode/commands/speckit.parallel-autonomous-status.md Propagate routing status fields to opencode
.opencode/commands/speckit.parallel-autonomous-resume.md Propagate routing resume rules to opencode
.opencode/commands/speckit.model-routing-status.md Add model-routing status command (opencode)
.opencode/commands/speckit.model-routing-refresh.md Add model-routing refresh command (opencode)
.opencode/commands/speckit.intake-delete.md Propagate wording update to opencode
.opencode/commands/speckit.autonomous-stop.md Propagate stop routing rule to opencode
.opencode/commands/speckit.autonomous-status.md Propagate routing fields to opencode status
.opencode/commands/speckit.autonomous-resume.md Propagate routing resume rules to opencode
.github/workflows/powershell-analysis.yml Limit expensive OS matrix to canary repos
.github/workflows/maintenance-tui.yml Limit expensive OS matrix to canary repos
.github/prompts/speckit.model-routing-status.prompt.md Add prompt stub for status agent
.github/prompts/speckit.model-routing-refresh.prompt.md Add prompt stub for refresh agent
.github/agents/speckit.parallel-autonomous.agent.md Regenerate agent doc with routing rules
.github/agents/speckit.parallel-autonomous-status.agent.md Regenerate status agent doc with routing
.github/agents/speckit.parallel-autonomous-resume.agent.md Regenerate resume agent doc with routing
.github/agents/speckit.model-routing-status.agent.md Add model-routing status agent doc
.github/agents/speckit.model-routing-refresh.agent.md Add model-routing refresh agent doc
.github/agents/speckit.intake-delete.agent.md Propagate wording update to agent doc
.github/agents/speckit.autonomous-stop.agent.md Propagate stop routing rule to agent doc
.github/agents/speckit.autonomous-status.agent.md Propagate routing fields to agent status doc
.github/agents/speckit.autonomous-resume.agent.md Propagate routing resume rules to agent doc
.claude/skills/speckit-parallel-autonomous/SKILL.md Regenerate skill with routing rules
.claude/skills/speckit-parallel-autonomous-status/SKILL.md Regenerate status skill with routing fields
.claude/skills/speckit-parallel-autonomous-resume/SKILL.md Regenerate resume skill with routing rules
.claude/skills/speckit-model-routing-status/SKILL.md Add model-routing status skill
.claude/skills/speckit-model-routing-refresh/SKILL.md Add model-routing refresh skill
.claude/skills/speckit-intake-delete/SKILL.md Propagate wording update to skill
.claude/skills/speckit-autonomous-stop/SKILL.md Propagate stop routing rule to skill
.claude/skills/speckit-autonomous-status/SKILL.md Propagate routing fields to status skill
.claude/skills/speckit-autonomous-resume/SKILL.md Propagate routing resume rules to skill
.agents/skills/speckit-parallel-autonomous/SKILL.md Regenerate skill with routing rules
.agents/skills/speckit-parallel-autonomous-status/SKILL.md Regenerate status skill with routing fields
.agents/skills/speckit-parallel-autonomous-resume/SKILL.md Regenerate resume skill with routing rules
.agents/skills/speckit-model-routing-status/SKILL.md Add model-routing status skill
.agents/skills/speckit-model-routing-refresh/SKILL.md Add model-routing refresh skill
.agents/skills/speckit-intake-delete/SKILL.md Propagate wording update to skill
.agents/skills/speckit-autonomous-stop/SKILL.md Propagate stop routing rule to skill
.agents/skills/speckit-autonomous-status/SKILL.md Propagate routing fields to status skill
.agents/skills/speckit-autonomous-resume/SKILL.md Propagate routing resume rules to skill

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/lib/hg-bilingual.sh Outdated
Copilot AI review requested due to automatic review settings August 9, 2026 00:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 199 out of 199 changed files in this pull request and generated no new comments.

Suppressed comments (11)

scripts/lib/hg-bilingual.sh:45

  • The language-pair fallback only runs for files ending in ".md" (lowercase). This script already treats both ".md" and ".MD" as Markdown, so ".MD" files will incorrectly skip the language-pair check and always WARN.
    .specify/presets/autonomous-run-governance/tests/test-model-routing.sh:11
  • This test treats a missing/invalid PowerShell 7 dependency as exit code 2 with an English-only message, but the rest of the model-routing tooling uses the bilingual BLOCKED/BLOCKIERT wording and exit code 3 for blocked prerequisites (see model-routing-governance test wrapper). Aligning the exit code and wording keeps the cross-preset contract consistent.
    scripts/test-documentation-impact.sh:18
  • The failure message prints a literal "\n" instead of a newline because the format string uses "\n". This makes the output harder to read and inconsistent with the other printf calls in this script.
    .github/agents/speckit.model-routing-status.agent.md:18
  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
or its Bash wrapper. Run `-Action Status`. Report `Aligned`, `RefreshRequired`,

.opencode/commands/speckit.model-routing-status.md:15

  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
    .claude/skills/speckit-model-routing-status/SKILL.md:20
  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
`.specify/presets/model-routing-governance/scripts/resolve-model-routing.ps1`

.agents/skills/speckit-model-routing-status/SKILL.md:20

  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
Resolve the script from the repository-maintained `.specify/scripts/` directory when it

.github/agents/speckit.model-routing-refresh.agent.md:10

  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
explicit authority. Resolve the script from repository `.specify/scripts/` first and

.opencode/commands/speckit.model-routing-refresh.md:10

  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
    .claude/skills/speckit-model-routing-refresh/SKILL.md:15
  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
active harness, enumerate models where the

.agents/skills/speckit-model-routing-refresh/SKILL.md:15

  • This instruction points to .specify/scripts/ as the preferred location, but this repository provides the model-routing entry point under scripts/resolve-model-routing.ps1 (and scripts/resolve-model-routing.sh). Pointing users to .specify/scripts/ will fail here because that directory does not contain the resolver.
explicit authority. Resolve the script from repository `.specify/scripts/` first and

Copilot AI review requested due to automatic review settings August 9, 2026 02:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 199 out of 199 changed files in this pull request and generated no new comments.

Suppressed comments (1)

scripts/lib/hg-bilingual.sh:28

  • The local variable partner is declared but never used, which makes the function harder to maintain and suggests leftover/dead code.

Copilot AI review requested due to automatic review settings August 9, 2026 02:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 199 out of 199 changed files in this pull request and generated no new comments.

Suppressed comments (2)

scripts/lib/hg-bilingual.sh:40

  • The new language-pair detection only special-cases *.en.md. Repositories in this tree already contain .DE.md/.EN.md sidecar pairs (e.g. docs/secure-development/mitgeltende-dokumente/...DE.md...EN.md), so a .DE.md file will currently look for *.DE.en.md and never find its English partner, causing a false bilingual-section-missing warning.
    scripts/lib/hg-bilingual.ps1:27
  • Invoke-HgCheckBilingual now tries to accept sidecar language pairs, but it only handles *.en.md/base .md. Existing docs in this repo use .DE.md/.EN.md naming, so .DE.md files will never find their English partner and will be reported as bilingual-section-missing even when a sidecar exists.

Copilot AI review requested due to automatic review settings August 9, 2026 02:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 199 out of 199 changed files in this pull request and generated no new comments.

Suppressed comments (1)

scripts/test-documentation-impact.sh:18

  • The failure message prints a literal "\n" because the format string uses \\n instead of a newline escape. This makes the error output harder to read and inconsistent with the other printf call below.

@hindermath
hindermath merged commit efc904c into master Aug 9, 2026
18 checks passed
@hindermath
hindermath deleted the codex/model-routing-governance-adoption-20260809 branch August 9, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants