Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions askcc/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,19 @@
On completion:
- Run /simplify or /refactor to simplify and improve the code.
- Commit, push the feature branch, and open a PR linked to the issue.
- Update the test plan checklist in the PR description (see "Test plan update" below).
- Add an issue comment summarizing what was implemented.

Test plan update:
- After opening the PR, read the PR description with `gh pr view <number> --json body -q .body`.
- Look for a `## Test plan` section containing checklist items (`- [ ]` checkboxes).
- For each test plan task, decide whether it is satisfied by the implementation, \
the new tests you wrote, or the verification gate run (pytest/ruff/pyright).
- Check off satisfied tasks by replacing `- [ ]` with `- [x]` in the PR body.
- Leave items requiring manual/external verification (browser QA, deployment \
validation, etc.) unchecked.
- Update the PR description with `gh pr edit <number> --body "<updated body>"`.
- If no `## Test plan` section exists, skip this step silently.
"""

REVIEW_AGENT_PROMPT = (
Expand Down
28 changes: 28 additions & 0 deletions tests/test_askcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,34 @@ def test_removes_legacy_write_tests_line(self):
assert "Write tests for every new or changed behavior" not in DEVELOP_AGENT_PROMPT


class TestDevelopPromptTestPlanUpdate:
"""The develop prompt must update the PR test plan after PR creation (issue #88).

Assertions are literal-substring matches: prompt-wording changes will surface
here intentionally. Don't "fix" them away — update both the prompt and the
asserted substrings together, mirroring the TestReviewprPromptMergeGuard precedent.
"""

def test_includes_test_plan_update_section_heading(self):
assert "Test plan update:" in DEVELOP_AGENT_PROMPT

def test_includes_pr_body_read_command(self):
assert "gh pr view <number> --json body -q .body" in DEVELOP_AGENT_PROMPT

def test_includes_pr_body_edit_command(self):
assert 'gh pr edit <number> --body "<updated body>"' in DEVELOP_AGENT_PROMPT

def test_includes_manual_verification_carveout(self):
assert "manual/external verification" in DEVELOP_AGENT_PROMPT
assert "unchecked" in DEVELOP_AGENT_PROMPT

def test_includes_noop_when_no_test_plan_section(self):
assert "If no `## Test plan` section exists, skip this step" in DEVELOP_AGENT_PROMPT

def test_completion_step_references_test_plan_update(self):
assert "Update the test plan checklist in the PR description" in DEVELOP_AGENT_PROMPT


class TestReviewprPromptMergeGuard:
"""The pr-review prompt must block merging when CHANGES_REQUESTED reviews exist (issue #86)."""

Expand Down
Loading