Skip to content

docs: capability-driven delegation model selection (model-matrix-delegation) #893

Closed

Description

@jflowers

What changed (user-visible)

uf_delegate_command — the tool /uf.unleash and
/uf.run-pipeline-plan use to delegate work to content agents —
now selects the child session's model by capability instead of
always replaying the parent session's model:

  • Config pair: tracked .uf/model-matrix.yaml declares
    capability-named profiles, a packs: mapping (UF convention pack
    → capability), defaults: by task kind, agents: pins, and
    classifier: structure — model strings optional everywhere. A
    gitignored .uf/model-matrix.override.yaml carries per-developer
    model identities via a fail-closed whitelist
    (profiles.*.model, profiles.*.variant, classifier.llm.*
    only). Mirrors the review-matrix trio (tracked config + override
    • JSON Schema registry).
  • Capability profiles: spec-authoring, code-writing,
    content-writing, mechanical.
  • Classifier cascade (for implement and unknown task kinds):
    hidden subagent engine → LLM engine (temperature: 0, JSON
    response format, {env:VAR} apiKey interpolation, endpoint
    config only in the override) → static fallback. Confidence-gated,
    cached by input hash; failure never blocks delegation.
  • Precedence chain: explicit model → explicit profile →
    explicit pack (validated) → agents: pin → static defaults:
    by task kind → classifier → host model.
  • Selection audit trail: every delegation records
    selection_source (explicit-model, explicit-profile,
    explicit-pack, agent-pin, default-kind, classifier-agent,
    classifier-llm, host) plus the resolved pack/capability/model
    and classifier confidence.
  • Meta-prompt pack: new .opencode/uf/packs/meta-prompt.md
    (MP-NNN) codifying spec/plan/tasks/command authoring conventions.
  • Zero-config unchanged: with no matrix present, delegation
    behaves exactly as today (host model).

Documentation in the change PR

  • docs/configuration.md — new "Delegation Model Matrix" section
    documenting the config pair: capability profiles, the packs
    mapping, defaults, agents pins, the classifier (agent + LLM
    engines, confidence threshold), the precedence chain, the
    override whitelist, and the gitignore semantics (task 7.1).
  • AGENTS.md — structural updates: the config pair and
    schemas/model-matrix/ registry in the project-structure tree,
    .opencode/agents/ count 16 → 17 (model-matrix-classifier,
    hidden), the shared-library line naming model-matrix.ts, and a
    Convention Packs entry for meta-prompt.md (task 7.4).
  • CHANGELOG.md — Unreleased → Added entry with the plugin-suite
    coverage result and constitution-alignment outcome in its footer
    (task 7.2).

This issue tracks the user-facing documentation work for the
change so the feature PR can close it.

Website cross-reference

Per the org constitution v1.4.0 Cross-Repo Documentation rule, a
cross-repo documentation issue is filed against
unbound-force/website covering the model matrix (config pair,
capability profiles, precedence chain, classifier engines, override
whitelist, credential story) and recording the tutorial
disposition (configuration reference, citable from existing
delegation docs, no new tutorial) — task 7.5, tracked separately
in that repo.

Related

The feature PR closes this issue alongside #887 and #888.

Metadata

Metadata

Assignees

Labels

docs

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions