Skip to content

docs(openspec): plan #2916 One function decides draft readiness - #3170

Merged
dan-petty merged 4 commits into
mainfrom
feat/2916-one-function-decides-when-any-draft
Nov 2, 2026
Merged

dan-petty merged 4 commits into
mainfrom
feat/2916-one-function-decides-when-any-draft

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Plans #2916

Three rules mark a draft pull request ready: the stage row (ready_to_mark), the implement job (mark_ready after its watch) and devops pr ready (the check blockers). None reads the task groups, so a partial implement pull request can pass all three (#2801).

This plan adds one function, draft_readiness, for four kinds: stage plan, implement, agent and person. The stage row, the implement job and devops pr ready ask it. devops pr check-readiness adds its refusal as a blocker that names the unticked group. The kind comes from the record of the item. extra_checks is the seam for the evaluator of #2867. The plan deletes ready_to_mark, StageDraft and _ready_check_blockers.

Change: openspec/changes/2916-one-function-decides-when-any-draft/

🤖 Generated with Claude Code

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

Copy link
Copy Markdown
Owner

Review of the plan for #2916.

CI: 17 of 18 checks pass; Semantic PR title fails. Premise: holds (the three decision points exist on origin/main ac16675); the plan has gaps in the spec delta and in the design of the new function.

  1. The PR title is malformed and the required check fails. The title is docs(openspec): plan #2916 feat(roadmap): one function decides draft.... The job log says: Unknown scope "openspec): plan #2916 feat(roadmap" ... has more than 60 characters. The title embeds the issue title and is cut with .... Fix: docs(openspec): plan #2916 one function decides draft readiness (summary under 60 characters).
  2. The PR body is cut in the middle of a word: it ends An optional list of extra c and then goes to the Change: line. CONTRIBUTING.md section 4 says the body is the commit message. Fix: rewrite the body as complete sentences, and end it with Plans #2916 and the Change: line.
  3. The spec delta conflicts with an existing requirement. openspec/specs/roadmap-stage/spec.md:407 ("One function decides, and one function marks") says ready_to_mark SHALL be the only function that decides, and its scenario "The decision is replaced" replaces ready_to_mark in a test. The plan makes ready_to_mark a call of draft_readiness (proposal "What Changes", task 2.2) but only ADDs requirements to pr-merge-readiness. Fix: add a MODIFIED block for that requirement in specs/roadmap-stage/spec.md (the whole requirement text, with draft_readiness as the decider), and name the capability under Modified Capabilities. Also check that task 2.2 keeps the test at tests/roadmap/test_roadmap_stage_ready.py:342, which monkeypatches ready_to_mark.
  4. check-readiness cannot get the kind or the recorded item with the planned design. assess_merge_readiness (src/devops_cli/github/merge_readiness.py:506) takes the REST payload of the pull request and has no kind and no item. BlockerKind (line 75) has no readiness member. Nothing in design.md says how the command finds the kind (stage plan, implement, agent, person) or the unticked group of a PR. Task 4.2 hides this in one line. Fix: state the source of the kind and of the tick state (for example the stage.pr / implement.pr record keys, and tasks.md read from the PR head through the existing "base's change directory" read), add the new BlockerKind member to the design, and add a scenario for a PR that has no recorded item.
  5. The input of the function cannot decide the STAGE_PLAN kind. Today ready_to_mark returns draft.checks.is_passing (src/devops_cli/roadmap/stage_ready.py:64), and the issue says "complete" and "all checks pass". The planned signature draft_readiness(pull, kind, item, extra_checks=()) carries no check runs. The spec scenario "A complete plan pull request is ready" says "whose checks pass", but the function has no way to read them. Fix: say where the check verdict enters (a field of the input, or a default extra check).
  6. devops pr ready is left out. Issue feat(roadmap): one function decides when any draft pull request is ready #2916 says "The stage row, the implement Job and devops pr ready call it", and src/devops_cli/commands/pr.py:1230 defines ready. The proposal lists the stage row, the implement job and check-readiness, but not pr ready. Either add a task, or record in design.md why pr ready stays out (the issue lists it as a caller).
  7. Kinds agent and person: "when its author says so" has no mechanism (no label, no comment marker, no flag). Scenario 3 (wait) cannot be tested without it. Fix: name the signal in the design.
  8. Existing Tool Considered: "about 120 tokens to write and about 40 tokens per fix cycle" is not credible for a function, two call sites, a blocker, messages and four test files; the issue itself says about 200 tokens and 50 per cycle. "One development session" is not an elapsed time. Fix: give tokens to build, keep and fix, and hours (rule 3).
  9. Feasibility is written as tool-call logs (list_files, read_file, search_code), not as commands a reader can run again. The line numbers I checked are right (mark_ready 127, ready_to_mark 64, implement_run.py:683, stage_ready.py:114, pr.py:1472, pr_plans.py:332). The last bullet is a plan to run, not evidence. Fix: quote command output (for example git grep -n mark_ready origin/main -- src).
  10. Task 1.2 mixes the order: it says "Write the failing table test first" and "verify ... passes" in the implementation task, while 1.1 is a bare filename with a verify clause. Fix: put the test content in 1.1 (the 8-row table from the issue: four kinds, two states each), and keep 1.2 for the code only. The tuicr bullet under ## Workflow follow-up is a plain bullet that openspec/config.yaml allows for a code change; it is not a defect.

Related issues: #2867 (the evaluator that plugs into the seam; open, plan says it is the user of extra_checks); #2908 (parent tracker; open); #3049 (the implement job reviews its own diff before mark_ready; open, touches implement_run.py near line 683, so expect a merge conflict or an ordering decision); #2585 (check-readiness warns when a PR body passes 1,000 characters; open, touches check_readiness in commands/pr.py).

Verdict: hold until the title and body are fixed (the required check fails) and the roadmap-stage MODIFIED delta (finding 3) and the kind/item source for check-readiness (finding 4) are in the plan.


Generated by Claude Code

@dan-petty dan-petty changed the title docs(openspec): plan #2916 feat(roadmap): one function decides draft... docs(openspec): plan #2916 One function decides draft readiness Nov 2, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 2, 2026 17:49
@dan-petty
dan-petty self-requested a review as a code owner November 2, 2026 17:49
@dan-petty
dan-petty merged commit ec6416d into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the feat/2916-one-function-decides-when-any-draft branch November 2, 2026 17:50
dan-petty added a commit that referenced this pull request Nov 7, 2026
Plans #3253

A plan can drop a requirement line that the issue states outside its
acceptance-criteria list: a named caller, a path, a command or a design
decision. #3253 adds an extraction of those lines to the plan context,
with stable `REQ-` IDs. The reply gains a `coverage` list that maps each
ID to a group or to `pending-person` with a reason. The plan check
refuses a plan that leaves an ID out and names the missing caller in the
problem. It also refuses a scenario whose `when` names only a person's
intent. `tasks.md` renders each ID in the `## Criteria` section, and the
plan reader reads it back. The planner prompt names the `coverage` key
and the IDs, and a replay case from #3170 joins the golden set with a
`coverage` gate.

Change: `openspec/changes/3253-map-all-issue-requirements-to-a/`

---------

Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com>
Co-authored-by: Daniel Petty <[email protected]>
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