Skip to content

🐛 Require AC + Dependencies headings in plan prompt (closes #96)#98

Merged
monkut merged 3 commits into
mainfrom
feature/96-plan-validator-contract
Apr 28, 2026
Merged

🐛 Require AC + Dependencies headings in plan prompt (closes #96)#98
monkut merged 3 commits into
mainfrom
feature/96-plan-validator-contract

Conversation

@monkut

@monkut monkut commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the contract gap between askcc plan and askcc develop reported in #96: plan could succeed without writing ## Acceptance Criteria / ## Dependencies headings, leaving develop's validate_issue_readiness to fail immediately.

Why

PLAN_AGENT_PROMPT items 1 and 2 used "replace any existing X" wording, which is ambiguous when no existing X is present. Item 2 explicitly handled the empty case ("If none, include the heading with 'None identified.'"); item 1 did not. A reasonable agent interpretation was "if no existing section, do nothing," leaving the body in a state develop rejects.

Changes

askcc/definitions.pyPLAN_AGENT_PROMPT issue-description-update section:

  • Reworded items 1 and 2 to state the heading MUST be present, not just "replaced if found". Item 1 now also instructs renaming non-canonical headings (## Tasks, ## Requirements) to ## Acceptance Criteria.
  • Added a new ## Post-Update Verification step: after editing, the agent re-reads the body and confirms both required headings are present (with a checklist item under AC), re-editing if either check fails. This converts the contract from "agent should remember to do it" to "agent verifies it before stopping."

Verification

  • uv run pytest — 225 passed
  • uv run poe check (ruff) — clean
  • uv run poe typecheck (pyright) — 0 errors

Test plan

  • Re-run askcc plan against a fresh issue with no ## Acceptance Criteria / ## Dependencies sections; confirm the resulting body passes validate_issue_readiness.
  • Re-run askcc plan against an issue with a ## Tasks heading; confirm the agent renames it to ## Acceptance Criteria rather than leaving it.
  • Re-run askcc plan against an issue that already has <!-- draft --> AC / Dependencies sections; confirm replacement still works.

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.

1 participant