Skip to content

Slice 2: deploy model-matrix config and meta-prompt pack to hero repos via uf init (model-matrix) #889

Closed

Description

@jflowers

Outcome

Hero repos scaffolded or refreshed by uf init receive the model-matrix configuration surface built in #887: the tracked .uf/model-matrix.yaml, the .uf/schemas/model-matrix/ registry, and the meta-prompt pack from #888 — with tool-owned asset handling, drift tests, and scaffold parity tests covering them, so every hero repo gets the same content-agent model-selection capability this meta repo has.

This is slice 2 of the model-matrix work. Slice 1 (#887) deliberately kept repo-local scope but could not avoid a few forced scaffold touches (mirror sync of uf-workflow/index.ts, the new lib module mirror, one tool-owned-asset enum line, one gitignoreBlock line). Everything else was deferred here to keep that change reviewable.

Background — scaffold mechanics that govern this work

  • internal/scaffold/assets/ mirrors .opencode/ plugin/lib files and .uf/ config. TestEmbeddedAssets_MatchSource (internal/scaffold/scaffold_test.go ~lines 90–158) enforces byte-identity between every non-skipped embedded asset and its canonical source at the repo root (it skips devcontainer/, specify/, uf/sibling-repos.yaml, and opencode/uf/packs/*-custom.md; custom packs are user-owned by design).
  • internal/scaffold/scaffold.go (~lines 730–758) holds an explicit tool-owned asset allowlist enum — currently each lib file by exact name and uf/{review-matrix.yaml, reviewer-capabilities.yaml, sibling-repos.yaml} plus uf/schemas/<name>/ prefixes. New tracked assets need entries there for correct re-init behavior (user edits to tool-owned files are refreshed; custom files are preserved).
  • alwaysDeployedPacks (~line 769+) lists packs every hero repo gets regardless of language detection (default, default-custom, severity, content, content-custom, ...). The meta-prompt pack needs an entry here; a meta-prompt-custom.md initial-deployment template should follow the existing *-custom.md pattern.
  • The gitignoreBlock (internal/scaffold/scaffold.go ~line 1390s, marker # Unbound Force — managed by uf init) already gained the .uf/model-matrix.override.yaml line in slice 1.
  • Useful precedent for init-survival behavior: issues Added review agents survive uf init in review-matrix.yaml but not reviewer-capabilities.yaml #884/docs: reviewer-capabilities.yaml survives plain uf init re-runs (reviewer-capabilities-init-survival) #886 (reviewer-capabilities vs review-matrix re-run behavior).

Acceptance criteria

  1. uf init on a fresh hero repo deploys .uf/model-matrix.yaml, .uf/schemas/model-matrix/, meta-prompt.md, and a meta-prompt-custom.md template.
  2. Re-running uf init preserves user edits to custom files and correctly refreshes tool-owned matrix files (enum entries in place).
  3. Drift tests and scaffold tests are updated and green; make check passes end to end.
  4. Scaffold/deployment behavior documented in the appropriate docs (configuration / scaffold docs) with a CHANGELOG entry.

Constraints

Activity

  1. self-assigned this
    on Oct 31, 2026
  2. added
    enhancement
    on Oct 31, 2026
  3. jflowers commented on Nov 1, 2026

    @jflowers
    ContributorAuthor

    Divisor Triage: VALID — enhancement (objective)

    Classification. The Divisor review panel assesses this issue as a valid, actionable enhancement. All six review personas (adversary, architect, curator, guard, sre, testing) independently reach VALID.

    Evidence.

    • All four acceptance criteria produce objective evidence: fresh-init file presence (.uf/model-matrix.yaml, .uf/schemas/model-matrix/, meta-prompt.md, meta-prompt-custom.md), re-run preserve/refresh behavior for user-owned vs tool-owned files, green drift/scaffold tests with make check passing end to end, and docs plus a CHANGELOG entry.
    • The slice sequencing is recorded in the shipped slice-1 change: model-matrix-delegation SC-FR-007 defers the meta-prompt pack and classifier deployment to slice 2 (this issue), so this is the anticipated follow-up rather than scope creep.
    • The cited scaffold mechanics match the repository: the tool-owned asset allowlist in internal/scaffold/scaffold.go, the alwaysDeployedPacks list, the managed gitignore line landed in slice 1, and the TestEmbeddedAssets_MatchSource custom-pack exemption.
    • The deployment-only constraint respects the Content-agent model selection via .uf/model-matrix.yaml (model-matrix-delegation) #887 semantics boundary, and the gatekeeping constraints hold (drift coverage grows, *-custom.md exemption preserved).

    Similar issues. #899 tracks the documentation for this same deployment work, filed per this repo's documentation gate for user-facing changes. It is a companion, not a duplicate.

    Design items for the OpenSpec change (non-blocking).

    1. meta-prompt.md currently self-describes as a repo-local governance pack that "ships no -custom.md companion" (the determinism.md precedent). Acceptance criterion 1's alwaysDeployedPacks entry plus meta-prompt-custom.md template reverses both stances; the change should revise the pack's self-description in the same increment so deployed copies do not carry stale posture statements.
    2. Slice-1 design D10 records that a deployed repo's tracked .uf/model-matrix.yaml becomes team-owned config that diverges from the template by design, while acceptance criterion 2 specifies tool-owned refresh semantics. The change needs an explicit re-init clobber-vs-preserve decision for team-edited matrices, following the Added review agents survive uf init in review-matrix.yaml but not reviewer-capabilities.yaml #884/docs: reviewer-capabilities.yaml survives plain uf init re-runs (reviewer-capabilities-init-survival) #886 precedent.
    3. SC-FR-007 deferred both the model-matrix-classifier.md subagent file and the meta-prompt pack to this slice, but the acceptance criteria cover only the pack. Include the classifier deployment in scope or record an explicit re-deferral with new tracking.
    4. The background's enum citation is partially stale: slice 1 already registers uf/model-matrix.yaml as tool-owned (isToolOwned, scaffold.go ~line 685) and uf/schemas/ is tool-owned via prefix (~line 644); the ~730–758 block is isDivisorAsset, a different filter. The remaining registration work is the alwaysDeployedPacks entry plus the pack mirrors and custom template.

    Next steps. Route this through its own OpenSpec change with this issue as the originating issue, and address the four design items above in the proposal.

    This triage was performed by the Divisor review panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions