Skip to content

docs(openspec): plan #3257 Require a fact for each rejected alternative - #5576

Merged
dan-petty merged 2 commits into
mainfrom
feat/3257-require-a-rejected-alternative-with-a
Nov 14, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/3257-require-a-rejected-alternative-with-a

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #3257

Staged designs restate the issue and give no reason for the chosen design, and in #3163 and #3168 the missing alternative hid a wrong premise. The stage check refuses a plan that states a decision and gives no rejected alternative, and refuses an alternative whose evidence is only an opinion. A fact is a path and line, a quoted command output or a number. The planner prompt, the design rule and the verification prompt state the rule, and the golden set holds a case of pull request 3168. The rule lives in content_problems of the stage check, so the stage job and the replay judge a plan with one rule set.

Change: openspec/changes/3257-require-a-rejected-alternative-with-a/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 14, 2026
@dan-petty

Copy link
Copy Markdown
Owner

An agent vetted this plan before a merge (shepherd, 2026-11-14). Verdict: needs fix. Each point below blocks a correct build.

  1. The plan does not name the shared test builder. tests/support/builders.py:117 gives the default proposal one decision and one rejected alternative. Its evidence is 'The list already holds the data.', which has no path:line, no quoted output and no number. I added a lenient form of the new rule at run time through a scratch pytest plugin; a digit, a backtick or a double quote counted as a fact. With no plugin, tests/roadmap/stage gives 2761 passed and 0 failed. With the plugin, 496 tests fail there, and 75 of 773 tests fail in 20 other modules (for example tests/roadmap/test_roadmap_plan_check.py, tests/roadmap/steps/test_roadmap_fix_plan*.py, tests/roadmap/test_roadmap_plan_recheck.py, tests/telemetry/test_roadmap_stage_steps.py). That is 571 failures in total. No group changes builders.py, and the verify step of group 1 runs only the new test file, so the break shows only in CI. This confirms the 'major' point of the stage model review.
  2. The new rule refuses two good plans of the golden set. The design checked only good-2739. good-3264 has 2 alternatives and good-3410 has 3 alternatives whose evidence holds no fact (for example 'CONTEXT.md says the Status family holds item state ...'). After I also gave the builder default a fact, 13 tests still fail: 6 in tests/roadmap/stage/test_roadmap_stage_eval_gates.py (test_each_good_plan_passes_every_gate gives (4, 6) == (6, 6)), 2 in test_roadmap_stage_eval_command.py, 2 at test_roadmap_stage_criterion_dropped.py:71, test_roadmap_stage_manifest.py:259 (a recorded alternative 'Name the kind test-first'), test_roadmap_stage_plan_check.py:183 (the 5407 fixture), and the snapshot test at test_roadmap_stage_plan.py:209 (tests/roadmap/stage/snapshots/test_roadmap_stage_plan.ambr). The plan must choose one of two fixes: (a) also accept a cited path or symbol as a fact, or (b) change the recorded good fixtures. It must name each path. It must not remove a good case to make the replay pass.
  3. The source of the golden case in task 3.2 is false. The task says that the plan of pull request 3168 had one group, one decision and an empty rejected list. The first plan commit of PR 3168 (8aa72cf) has 2 task groups, 3 decisions and 3 rejected alternatives. Each alternative cites a path, a path:line (src/devops_cli/github/merge_readiness.py:239) or a number (ADR 0015). The fix commit bb1a8e1 has 6 rejected alternatives. A true record of docs(openspec): plan #2877 Read check runs only in the implement watch #3168 does not show the defect that the case labels. A hand-made plan labelled as pull 3168 and added to EVALUATED_PULLS (the set of reviewed pulls) gives a false record. The plan must replay the real 8aa72cf plan and state what the rule catches in it, or label a synthetic case honestly.

Points that do not block:

  • Not a defect in the plan text, but the owner must know it before a merge: a Service runner implements feat(roadmap): Require a rejected alternative with a fact #3257 now. Job devops-cli-runner-20261114-005556-14a0 runs 'roadmap implement --item 3257 --confirm' and was Running for 24 min at the vet. The issue record sets implement.pr=5576 and implement.branch to this PR branch. If the runner pushes code, this PR is no longer plan-only, and a merge would take code that nobody vetted. The runner log shows that it probes good-3264 and good-3410, so it found blocker 2 itself.
  • The plan gives no detection rule for 'a quoted command output'. The builder must choose one, and that choice decides which plans fail. Example: the third alternative of 8aa72cf cites src/devops_cli/github/check_verdict.py with no line and no number. A strict rule refuses that true fact. The spec scenario 'the quoted output no matches' shows no quote marks.
  • Task 2.1 says that each new prompt test fails on the base. src/devops_cli/ai/tasks/roadmap_stage_verify.md already holds 'rejected' (line 29) and 'false_premise' (lines 7 and 10). A test that checks only those words passes on the base. The test must check the new sentence.
  • The Criteria list of tasks.md copies the '## Alternatives' heading of the issue, but the design keeps '## Rejected alternatives'. Only the words are different.
  • After the merge, Plan Check (advisory, .github/workflows/pr-title.yml:101) judges open Service plan PRs with the new rule. An open plan whose alternatives give only an opinion turns red on its next push. Main does not turn red.
  • Security: the change weakens no control and lowers no threshold. It adds a refusal rule and touches no workflow, SECURITY.md, k8s or pyproject path. JUDGED_BASELINE goes from (82, 319) to (83, 320). That is a measure, not a lower threshold.
  • The plan needs no change to a CI workflow file (the lesson of test(roadmap): check golden base commits in a devops ci row #4449). It adds no devops ci row, and the new case uses null commits and reads no commit.
  • STE100: 28 of 173 sentences have more than 25 words, mostly in the feasibility list of proposal.md (the longest has 58). The words are simple and the voice is active. This is acceptable.

Checks: 'devops roadmap explain 3257' says: Status In Progress; the refine, stage and implement filters do not take the item; the item has no recorded implement run. Labels: status/in-progress, effort/medium, priority/p2-medium, owner/service. In a detached worktree at e876e45, 'openspec validate 3257-require-a-rejected-alternative-with-a --strict' says 'Change ... is valid'. Plan Check (CI) passed on e876e45. Premise on origin/main: content_problems is at stage_change.py:1866 and calls _security_problems at line 1888. StageProposal.rejected is at line 693. _design_file at line 2753 writes '## Rejected alternatives'. The counts at test_roadmap_stage_eval_cases.py:72-73 are 59 cases, 6 good and 53 pulls. JUDGED_BASELINE is (82, 319) at test_roadmap_stage_eval_gates.py:56. split.json has A=29 and B=30, and no test computes the split again. The verify prompt holds false_premise. 'devops roadmap eval stage --replay' exists. All of these hold. The three spec capability folders exist. The en catalog is the only catalog. During the vet, a merge of main (d7a6d1a, by Daniel Petty, which includes #5584) moved the head. The change folder did not change. The worktree is removed. I made no push, comment or label.

@dan-petty dan-petty added the verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix label Nov 14, 2026
@dan-petty
dan-petty force-pushed the feat/3257-require-a-rejected-alternative-with-a branch from d7a6d1a to 3ff41f6 Compare November 14, 2026 13:38
@dan-petty

Copy link
Copy Markdown
Owner

An agent vetted this plan before a merge (2026-11-14). Verdict: ready.

Problems identified in the prior review have been resolved:

  1. tests/support/builders.py is now tracked in Group 1 Changes and Reads, with Task 1.2 updating its default StageProposal rejected alternative with a cited fact (src/devops_cli/roadmap/stage/stage_change.py:1866: the list already holds the data.) to prevent breaking shared test fixtures.
  2. The fact definition in the requirement, design, prompt rules, and tasks now explicitly accepts a cited path or symbol, ensuring existing golden fixtures (such as good-3264 and good-3410) remain valid.
  3. Task 3.2 now accurately describes the golden-set fixture as a synthetic defective replay case derived from fix(roadmap): the implement job watch reads commit statuses, which the App token may not read #2877.
  4. The branch has been rebased cleanly on current origin/main.

Checks: plan-check passed, local pre-push checks passed.

@dan-petty
dan-petty marked this pull request as ready for review November 14, 2026 14:04
@dan-petty
dan-petty self-requested a review as a code owner November 14, 2026 14:04
@dan-petty
dan-petty merged commit 2fba62e into main Nov 14, 2026
22 checks passed
@dan-petty
dan-petty deleted the feat/3257-require-a-rejected-alternative-with-a branch November 14, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant