Skip to content

feat(roadmap): Add a set count to every-member plan claims #3304

Closed

Description

@dan-petty

Problem or Motivation

The plan for #3236 (PR #3248) required that the audit "passes with a confinement entry for each path-like parameter" of every tool of CONST_MCP_EXPOSURE_TABLE. A census of the published schemas finds 60 tools with a path-like parameter. The plan listed three. The tasks, if built as written, would fail on the first run of the audit, or would need a long exempt list. The plan also scoped the work to three tools that no role table holds, and the issue asked for the tools of the role tables.

A requirement or a scenario that says "every X" or "no X" makes a claim about a set. No gate asks the plan to count the set.

Proposed Solution & Architectural Design

  1. When a requirement or a Criteria line uses "every", "all" or "no" with a noun, the plan gives in Feasibility the command that counts the set and its output (the size of the set and the members that break the claim).
  2. When the count is above zero for a claim of "no", the plan either narrows the claim or names the follow-up issue for the rest under Workflow follow-up.
  3. The plan stage prompt asks for the set that the issue names (here, the tools of a role table), and not the set of the examples.

Target Subsystem

The plan stage and check_proposal of devops roadmap; openspec/config.yaml proposal rules.

Source: #3248

Scope from #3325

The same class occurs when a plan adds a guard over a set. In #3230 the issue asked that no tool publishes a free-text sink parameter (env, values, value, data) with no allowlist entry. Plan PR #3283 defined the guard and its tests, and it never evaluated the live FastMCP inventory. It omitted k8s_diff_helm.values, so the guard test would fail at implementation. The plan of #3230 now names that entry (openspec/changes/3230-decide-the-free-text-mcp-parameters/proposal.md:15).

Replace item 1 of the proposed solution with one prompt rule. The planner cannot run a command (src/devops_cli/ai/tasks/roadmap_stage_change.md:9), so the rule must not ask for a command output that nobody produced:

  • A claim about every member of a set, or a new guard over a set, gives a count from a tool of the plan run (references) or from a probe line.
  • When no tool can count the set, the plan says that the count is unverified. It makes the census command the verify of its first group, and the implementation stops when the result differs from the plan. A census of published schemas needs a running program, so references cannot give it.
  • The plan decides each member that the count finds: removed, restricted, or allowlisted with a reason. The plan check or the verification reports a member with no decision.
  • A count above zero for a claim of no members narrows the claim or names a follow-up issue (item 2 stays).
  • The set is the set that the issue names, not the set of its examples (item 3 stays).

Do not build a word gate. every and no are common in requirements. Add the rule to src/devops_cli/ai/tasks/roadmap_stage_change.md, with a case in tests/roadmap/test_roadmap_stage_prompt_rules.py. Look at the rule again when #3242 delivers a run tool, because that tool is the later route to a real census.

No open tool reconciles a CLI schema with a project guard. The earlier estimate for a check in devops roadmap stage was about 15k tokens and 1 hour, and the prompt rule costs less.

Sources: #3248, #3283

Proposed design

Problem statement

A claim about every member of a set needs a count, and no gate asks the plan for one. The plan for #3236 named three tools of a set of 60, and the guard of #3230 missed k8s_diff_helm.values. The planner cannot run a command, so the rule uses a tool of the plan run or a probe line. The change adds one prompt rule, its config rule and its test, and it adds no word gate.

Acceptance criteria

Requirement: Count of a claimed set

The stage prompt SHALL ask the plan to give a count of the set that a claim about every member covers, from the references tool or from a probe line.

Scenario: The prompt states the count rule

  • WHEN the test reads src/devops_cli/ai/tasks/roadmap_stage_change.md
  • THEN the prompt holds gives a count from a tool of the plan run or from a probe line

Requirement: Unverified count

The stage prompt SHALL ask the plan to say that the count is unverified when no tool can count the set, and to make the census command the verify of its first group.

Scenario: No tool counts the set

  • WHEN the test reads the stage prompt
  • THEN the prompt holds the count is unverified, census command and verify of the first group

Requirement: Decision for each member

The stage prompt SHALL ask the plan to decide each member that the count finds as removed, restricted, or allowlisted with a reason.

Scenario: A member has no decision

  • WHEN the test reads the stage prompt
  • THEN the prompt holds removed, restricted, or allowlisted with a reason and a member with no decision

Requirement: Narrow a claim of no members

The stage prompt SHALL ask the plan to narrow a claim of no members whose count is above zero, or to name a follow-up issue.

Scenario: The count of a claim of no members is above zero

  • WHEN the test reads the stage prompt
  • THEN the prompt holds narrows the claim and follow-up issue

Requirement: The issue's set

The stage prompt SHALL ask for the set that the issue names, and not the set of its examples.

Scenario: The issue gives examples of a larger set

  • WHEN the test reads the stage prompt
  • THEN the prompt holds the set that the issue names and not the set of its examples

Requirement: Proposal rule holds the count

The proposal rule of openspec/config.yaml SHALL hold the count rule, so the config and the prompt give one rule.

Scenario: The prompt and the config keep one phrase

  • WHEN the test reads openspec/config.yaml and the stage prompt
  • THEN both files hold gives a count from a tool of the plan run or from a probe line

Requirement: No word gate

The change MUST NOT add a word rule to check_proposal.

Scenario: A plan uses the word every in a requirement

  • WHEN check_proposal runs on a plan whose requirement text holds every and whose paths exist at the staged commit
  • THEN it returns no problem that names the word

Requirement: Spec delta for roadmap-stage

The change SHALL add one requirement to the roadmap-stage spec delta for the count rule of the stage prompt.

Scenario: The change validates

  • WHEN uv run devops openspec check runs on the change
  • THEN the change validates and its specs/roadmap-stage/spec.md holds the new requirement

Requirement: Prompt-rules test holds the rule

The test module tests/roadmap/test_roadmap_stage_prompt_rules.py SHALL assert each phrase of the new rule.

Scenario: The prompt holds every phrase of the rule

  • WHEN uv run devops ci test tests/roadmap/test_roadmap_stage_prompt_rules.py runs
  • THEN the test passes, and each phrase of the rule has an assertion in the test module

Existing Tool Considered

No check has run. No open, maintained tool covers the need. No tool reconciles a CLI schema with a project guard. No linter can count the members of a set that only a running program produces. The change builds no code that it keeps: it adds one prompt rule, one config rule and their test. A check in devops roadmap stage was estimated at about 15k tokens and 1 hour, and the prompt rule costs less.

Key questions

  • How does the plan count a set that a claim covers, when the planner cannot run a command?: The stage prompt gives the rule. A claim about every member of a set gives a count. A new guard over a set gives a count too. The count comes from a tool of the plan run (references) or from a probe line. When no tool can count the set, the plan says that the count is unverified. The plan makes the census command the verify of its first group. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, openspec/config.yaml, tests/roadmap/test_roadmap_stage_prompt_rules.py]
    • Chosen: Prompt rule with a count from a tool or a probe line. The planner cannot run a command, so a command output in the plan would be invented.
    • Rejected: Prompt rule that demands a command output. The planner cannot run a command, so the output would be unverified.
    • Rejected: A word gate in check_proposal. every and no are common in requirements, so the gate would refuse valid plans.
  • What does the plan do for each member that the count finds?: The plan decides each member: removed, restricted, or allowlisted with a reason. A member with no decision fails the plan check or the verification. (best practice) [sources: openspec/changes/3230-decide-the-free-text-mcp-parameters/proposal.md:15, src/devops_cli/ai/tasks/roadmap_stage_change.md]
  • What does the plan do when a count is above zero for a claim of no members?: The plan narrows the claim or names the follow-up issue for the rest under ## Workflow follow-up. (best practice) [sources: openspec/config.yaml, src/devops_cli/ai/tasks/roadmap_stage_change.md]
  • Which set does the plan count?: The set that the issue names, and not the set of its examples. (best practice) [sources: openspec/config.yaml, src/devops_cli/ai/tasks/roadmap_stage_change.md]
  • Does the change add a check to check_proposal?: No. The change adds no word rule to check_proposal. The census is the verify of the first group, and the implementation stops when its result differs from the plan. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_prompt_rules.py]
    • Chosen: Prompt rule only. The plan check reads text, and a word rule cannot tell a claim about a set from a common use of every.
    • Rejected: A word gate in check_proposal. It refuses valid plans and needs an exempt list.
    • Rejected: A check that runs the census. The check runs offline and reads no program, so it cannot count a runtime schema set.
  • Where does the rule live, and which test holds it?: The rule goes in src/devops_cli/ai/tasks/roadmap_stage_change.md. The same phrase goes in the proposal rule of openspec/config.yaml. The test module tests/roadmap/test_roadmap_stage_prompt_rules.py asserts it. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, openspec/config.yaml, tests/roadmap/test_roadmap_stage_prompt_rules.py]
    • Chosen: Prompt rule, config phrase and a phrase test. The prompt is the copy that the planner reads, and the test module already pins prompt phrases.
    • Rejected: A rule in openspec/config.yaml only. The planner reads the prompt, so the rule would not reach the plan.
    • Rejected: A test of a model run. The test must assert the rule offline, and a model run gives no stable result.
  • Does the change need a spec delta?: Yes. The prompt changes what the stage job plans, and the roadmap-stage spec holds the prompt rules. The change adds one ADDED requirement. (best practice) [sources: openspec/config.yaml, openspec/specs/roadmap-stage/spec.md]
    • Chosen: Add one requirement to the roadmap-stage spec. The config says a message or behavior that a consumer observes carries a delta, and the roadmap-stage spec already holds the prompt rules.
    • Rejected: Set skip_specs: true. The stage job plans different content, and the spec holds the prompt rules.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-06: none.
Tool: none found.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 2, 2026
  2. dan-petty commented on Nov 2, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It improves plan accuracy but does not block a release or fix a live defect.
    • Value: Medium. It catches a recurring class of unverified universal claims in plans.
    • Effort: Low. It adds one check rule to check_proposal and one prompt instruction.
    • Related: fix(roadmap): Refuse Feasibility claims the run did not support #3266, which asks for a different change. Both add a validation gate on plan claims in the stage job, but #3266 checks tool-call claims while this checks set-count claims.
  3. added
    priority/p2-medium
    on Nov 2, 2026
  4. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at d895bae until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • The proposal has no problem statement, no acceptance criterion with its requirement, scenario, WHEN and THEN, or no answer to the existing-tool question. State the problem, the requirements with their scenarios, and the open tool that covers the need or the cost of building it.
  5. added
    status/ready
    and removed
    status/new
    on Nov 5, 2026
  6. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at ce689f4 (see proposed design in issue body).

  7. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Tool: none found

    Lacks:

    • No open tool counts the members of a set that a plan claim such as "every path-like parameter" or "no tool publishes" covers, or flags a claim whose count is missing.
    • The spec layer the project already uses validates proposal structure only; it reads no proposal prose, so it cannot tell a claim about a set from a common use of "every" or "no", and it cannot demand a count.
    • No linter can count a set that only a running program produces (a census of published FastMCP schemas), so a static check cannot replace the census command the plan must carry as the verify of its first group.
    • The issue asks for a prompt rule plus a matching config phrase and a phrase test, not for a tool or library, so the need is a text change in roadmap_stage_change.md, openspec/config.yaml and tests/roadmap/test_roadmap_stage_prompt_rules.py.

    Searches run:

    • tool that validates specification claims "every" universal quantifier against the set of actual members
    • linter for requirement documents checking counts of sets in plans
    • OpenSpec validate proposal requirement universal claim count members
    • natural language requirement linter detect unverified universal statements
    • spec linter universal quantifier
    • check that every path-like parameter has an entry allowlist tool

    Sources:

    Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.

  8. changed the title [-]feat(roadmap): a plan claim about every member of a set cites a count of the set[/-] [+]feat(roadmap): Add a set count to every-member plan claims[/+] on Nov 6, 2026
  9. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 65 characters, and the limit is 60. The type and the scope stay.

    • Before: feat(roadmap): a plan claim about every member of a set cites a count of the set
    • After: feat(roadmap): Add a set count to every-member plan claims
    • Source of the summary: the background model
  10. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Staged: branch feat/3304-add-a-set-count-to-every, draft pull request #3963. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:

    1. Add the count rule to the stage prompt with its phrase test: 24696 tokens
    2. State the same rule in the proposal config and pin the shared phrase: 15426 tokens

    The runs of the planner and the review made 22 model request(s), and used 1552190 input tokens and 40396 output tokens. The tool calls, in order:

    1. read_spec({"capability":"roadmap-stage"})
    2. read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md"})
    3. read_file({"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py"})
    4. read_file({"path":"openspec/config.yaml"})
    5. search_code({"text":"census"})
    6. search_code({"text":"gives a count"})
    7. search_code({"text":"the set that the issue names"})
    8. search_code({"text":"counts a text in every file of the commit"})
    9. search_code({"text":"quote the probes"})
    10. search_code({"text":"Feasibility"})
    11. read_file({"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py","start_line":190,"end_line":400})
    12. read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":22,"end_line":120})
    13. search_code({"text":"yaml.compose"})
    14. read_file({"path":"tests/commands/test_openspec_scaffold.py"})
    15. references({"name":"roadmap_stage_change.md"})
    16. search_code({"text":"### Requirement: The stage prompt"})
    17. read_file({"path":"openspec/specs/roadmap-stage/spec.md","start_line":1600,"end_line":1650})
    18. read_file({"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py","start_line":470,"end_line":560})
    19. read_file({"end_line":470,"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py","start_line":390})
    20. read_file({"end_line":175,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":140})
    21. search_code({"text":"roadmap_stage_change"})
    22. search_code({"text":"STAGE_EVAL_TRIGGER_PATHS"})
    23. search_code({"text":"STAGE_EVAL_REPLAY"})
    24. read_file({"end_line":840,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":790})
    25. read_file({"end_line":475,"path":"tests/roadmap/stage/test_roadmap_stage_form.py","start_line":425})
    26. search_code({"text":"what_changes"})
    27. search_code({"text":"def what_changes_problems"})
    28. search_code({"text":"unlisted"})
    29. read_file({"end_line":40,"path":"openspec/changes/3427-refuse-a-group-verify-that-runs/design.md","start_line":1})
    30. search_code({"text":"_STAGE_EVAL_SCORE_WORDS"})
    31. read_file({"end_line":300,"path":"tests/roadmap/stage/test_roadmap_stage_kind.py","start_line":255})
    32. search_code({"text":"_SHARED"})
    33. search_code({"text":"count of a"})
    34. search_code({"text":"judges no word"})
    35. search_code({"text":"### Requirement: The plan check"})
    36. search_code({"text":"scenario"})
    37. read_file({"end_line":940,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":836})
    38. read_file({"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py"})
    39. read_spec({"capability":"roadmap-stage"})
    40. search_code({"text":"eval stage"})
    41. search_code({"text":"_SHARED"})

    Tool calls: read_file=16 (empty=0), read_spec=2 (empty=0), references=1 (empty=0), search_code=22 (empty=4)

    The stage job read the open pull requests and their files in 1 GraphQL request(s).

  11. added 2 commits that reference this issue on Nov 7, 2026
  12. added
    status/planned
    and removed
    status/ready
    on Nov 7, 2026
  13. added
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Nov 7, 2026
  14. removed
    status/in-review
    on Nov 8, 2026
  15. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-08 00:33 UTC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions