Repository navigation
Conversation
Replace the inline six-step prose algorithm for deriving the model family name in /uf.address-feedback with a single normalize_model_name tool call. Mechanical normalization belongs in an executable tool, not command prose, so all commands produce identical attribution for the same model ID. - Update the live command and scaffold asset in lockstep - Add OpenSpec artifacts for address-feedback-model- normalization (proposal, design, spec delta, tasks) - Add Dewey learnings from the review council session Assisted-by: unknown-model Generated with AI assistance (unknown-model)
jflowers
left a comment
There was a problem hiding this comment.
Review: refactor(commands): resolve model attribution via normalize_model_name
Verdict: APPROVE WITH ADVISORIES — 2 of 4 council runs succeeded and voted (divisor-adversary heavy, divisor-guard standard, both APPROVE WITH ADVISORIES); divisor-architect and divisor-curator timed out and did not vote.
The migration is correct: Phase 4.2 resolves the Assisted-by: trailer via the tested normalize_model_name tool, the live and scaffold copies are byte-identical (blob 14229266 on both), and all CI checks pass. Issue #709 criteria 1-3 are covered; criterion 4 ("no behavioral change — same model names produced") is not practically satisfied until #732 lands.
Advisories (3)
- MEDIUM — spec-record accuracy (design.md D4): the "No inline algorithm remains" scenario has no automated regression guard — drift tests verify byte parity only and pass even if the forbidden prose returns to both copies. Add a negative content clause to
command_contract_test.go(theTestCommandContractspattern), or amend D4 to record manual verification. The proposal's "zero behavioral change" claim should read "behavior pinned to the tested tool" — the tool's digit-guarded-Nstrip preservesclaude-sonnet-4where the old prose's literal reading yieldsclaude-sonnet. - MEDIUM — CHANGELOG (CHANGELOG.md:109): the entry omits the #732 interim degradation — until #732, every
/uf.address-feedbackcommit carriesAssisted-by: unknown-modelwith a user warning. Add a one-line interim note or sequence the merge after #732. - LOW — known dependency (#732): the
normalize_model_namerawModelIdparameter is hidden from consuming sessions by a plugin schema bug; the fallback path is safe. Pre-existing, disclosed in the PR body.
CI: no PR-caused or pre-existing failures. Pre-flight (ci-aware): all local tools covered by passing CI.
Dispatch artifact: .uf/artifacts/dispatch/8b66bf1a-09ce-4449-bc1d-61eccc98baa0.json
This review was generated by /uf.review-pr (AI-assisted).
| `uf.address-feedback.md` (dedup rules, consolidate | ||
| dispatch, tool policy, provenance) do not reference the | ||
| normalization prose. No clause additions are needed: the | ||
| delta spec's scenarios are enforced by existing drift |
There was a problem hiding this comment.
The "No inline algorithm remains" scenario has no automated regression guard. D4 states the delta spec's scenarios are "enforced by existing drift tests plus the existing .opencode/test/uf-workflow.test.ts tool tests," but task42CanonicalAssets and TestSCFR001_CanonicalAssetSurfaceMatchesMirrors verify only live/scaffold byte parity — both copies could carry the forbidden prose and still pass — and the plugin tests pin the tool's algorithm, not the command text. The command-contracts learning shipped in this PR (.uf/dewey/learnings/command-contracts-20261015T150710) reaches the same conclusion: the requirement "needs a negative content assertion."
Two options close the gap:
- Add a negative clause to
internal/scaffold/command_contract_test.goforuf.address-feedback.md(theTestCommandContracts_SpeckitTestReviewpattern: assert the command text must not containYYYYMMDDor "remove everything before"), which makes D4's claim true. - Amend D4 to state the content-absence scenario is manually verified (task 3.2) and record the gap.
Related: the proposal's parity claim (proposal.md:37) describes the removed prose rather than the tool. The tool's version-strip guards on a preceding digit (uf-workflow-types.ts:116-119), so .../claude-sonnet-4-20250514@default yields claude-sonnet-4 — the value Scenario 1 asserts — where the prose's literal reading yields claude-sonnet. The tool-extraction learning in this PR recommends the framing "behavior pinned to the tested tool."
| replacing the inline 6-step model-name normalization prose; | ||
| the warn-user fallback on `unknown-model` is preserved | ||
| verbatim and the scaffold mirror was synced byte-identical. | ||
| Command markdown only; no tool behavior change. Increment 2 |
There was a problem hiding this comment.
The CHANGELOG entry omits the #732 interim degradation. The entry reads "Command markdown only; no tool behavior change," but the normalize_model_name parameter schema surfaced to consuming sessions is empty (#732 — reproduced during this review: the in-session call returns {normalized: 'unknown-model', warning: 'Empty rawModelId provided'} even though the plugin source defines rawModelId at .opencode/plugins/uf-workflow/index.ts:414). Until #732 lands, every /uf.address-feedback commit carries Assisted-by: unknown-model with a user warning, which leaves issue #709's acceptance criterion 4 unsatisfied at merge time. A one-line interim note in this entry — or sequencing the merge after #732 — records the actual behavior in the durable changelog.
| cannot be determined, use the literal string | ||
| `unknown-model` and warn the user (e.g., "Could not | ||
| Where `<model>` is the normalized model family name. | ||
| Call `normalize_model_name` with your raw model |
There was a problem hiding this comment.
This instruction depends on #732 for its input. The plugin schema surfaced to consuming sessions hides the required rawModelId parameter, so until #732 is fixed every invocation returns {normalized: 'unknown-model', warning: 'Empty rawModelId provided'} and commits carry Assisted-by: unknown-model. The fallback clause below handles this safely (warn + literal unknown-model), and the PR body discloses the bug — this note records the dependency so the trailer behavior isn't mistaken for a migration defect. Pre-existing plugin framework issue, not introduced by this change.
Summary
Closes #709
Replace the inline six-step prose algorithm for deriving the model
family name in
/uf.address-feedbackwith a singlenormalize_model_nametool call, keeping mechanical normalizationout of command prose (determinism-first). The live command and the
scaffold asset are updated in lockstep, with the OpenSpec change
artifacts and review-council Dewey learnings included.
How to Test
make test— scaffold drift detection verifies the embeddedcommand asset matches the canonical
.opencode/commands/sourcemake plugin-test— TypeScript plugin suite/uf.address-feedbackon a PR with reviewer feedbackand confirm attribution resolves via the
normalize_model_nametool call instead of the inline algorithm
How to Demo
Run
/uf.address-feedback <PR>— the attribution footer resolvesvia
normalize_model_namerather than the prose normalization steps.Key Files Changed
.opencode/commands/uf.address-feedback.md— prose algorithm →tool call
internal/scaffold/assets/opencode/commands/uf.address-feedback.md— scaffold asset updated in lockstep
openspec/changes/address-feedback-model-normalization/—proposal, design, spec delta, tasks
.uf/dewey/learnings/— six review-council learningsCHANGELOG.mdKnown Issues
normalize_model_nametool'srawModelIdparameter iscurrently hidden from the model by a plugin schema bug (uf-workflow and uf-finale tools expose empty parameter schemas to the model (parameters: vs SDK args: mismatch) #732);
attribution falls back to
unknown-modeluntil it is fixed.This PR was generated by /uf.finale (AI-assisted).