From b1335103989e6062231988c6dfd59209ab8bb8ec Mon Sep 17 00:00:00 2001 From: Federico Mastrini Date: Fri, 27 Nov 2026 23:27:06 +0100 Subject: [PATCH 1/2] feat(implement-issue): end at a committed branch, leave PRs to the user implement-issue now stops once the issue is built and verified: one commit per checklist item on a local branch, left checked out, and a reply with the checklist. It no longer pushes, opens or edits pull requests, merges, or closes a parent issue. Progress for resuming lives in the branch's commits instead of a PR body. Batch mode waits for the user to merge each batch. trackers.md keeps only reading issues, blockers, children, linked PRs and assigning. The skill now needs only implement and test-driven-development. Evals reworked to match. Version 0.17.0. --- .claude-plugin/plugin.json | 2 +- README.md | 4 +- gemini-extension.json | 2 +- plugin.json | 2 +- skills/implement-issue/SKILL.md | 83 +++++++------------ skills/implement-issue/agents/openai.yaml | 2 +- .../case.yaml | 9 +- .../files/.gh-stub/state.json | 0 .../files/bin/gh | 0 .../graders/01-no-pull-request.md} | 2 +- .../graders/02-never-pushes.md | 10 +++ .../graders/03-on-the-issue-branch.md | 8 ++ .../graders/04-test-first.md} | 0 .../05-branch-changes-only-reminders.md | 7 ++ .../graders/06-reply-has-checklist.md | 7 ++ .../graders/07-reply-ends-done.md | 7 ++ .../graders/08-issue-14-is-assigned-to.md | 0 .../place-files.sh | 2 +- .../prompt.md | 0 .../graders/01-one-pull-request-opened.md | 7 -- .../graders/02-the-pull-request-body-links.md | 8 -- .../04-the-pushed-branch-changes-only.md | 7 -- .../graders/05-the-pull-request-body-has.md | 7 -- .../graders/06-the-pull-request-body-says.md | 7 -- .../graders/07-the-final-reply-links-the.md | 7 -- .../evals/gitlab-issue-opens-mr/case.yaml | 12 --- ...2-exactly-one-merge-request-exists-from.md | 7 -- .../03-the-merge-request-description-has-a.md | 7 -- .../graders/06-the-run-never-tried-to-open.md | 7 -- .../07-the-final-reply-links-the-merge.md | 7 -- .../gitlab-issue-read-with-glab/case.yaml | 11 +++ .../files/.glab-stub/state.json | 0 .../files/bin/gh | 0 .../files/bin/glab | 0 .../graders/01-no-merge-request.md} | 3 +- .../graders/02-never-pushes.md | 10 +++ .../graders/03-on-the-issue-branch.md | 8 ++ .../04-the-run-read-issue-14-through.md | 0 .../05-a-test-for-the-daysoverdue-line.md | 2 +- .../graders/06-the-run-never-tried-to-open.md | 7 ++ .../graders/07-reply-names-branch.md | 7 ++ .../graders/08-issue-14-is-assigned-to.md | 0 .../place-files.sh | 0 .../prompt.md | 0 .../go-ahead-before-merge-waits/case.yaml | 4 +- .../place-files.sh | 2 +- .../issue-contradicts-adr-stops/case.yaml | 2 +- .../place-files.sh | 2 +- .../issue-contradicts-adr-stops/prompt.md | 2 +- .../jira-issue-branch-named-by-key/case.yaml | 12 +++ .../files/.gh-stub/state.json | 0 .../files/.jira-stub/state.json | 0 .../files/bin/acli | 0 .../files/readwell/CONTRIBUTING.md | 0 .../graders/01-the-run-read-rw14-from-jira.md | 0 .../graders/02-branch-named-by-key.md | 8 ++ .../graders/03-no-pull-request.md | 9 ++ .../graders/04-never-pushes.md | 10 +++ .../05-the-run-did-not-transition-rw14s.md | 0 .../06-a-test-for-the-daysoverdue-line.md | 2 +- .../graders/07-reply-has-checklist.md | 7 ++ .../graders/08-rw14-is-assigned-to-the.md | 0 .../place-files.sh | 2 +- .../prompt.md | 0 .../evals/jira-issue-github-pr/case.yaml | 13 --- ...-exactly-one-github-pull-request-exists.md | 7 -- ...he-pull-request-body-links-httpsmillbro.md | 7 -- .../graders/04-the-pull-request-body-has-a.md | 7 -- .../07-the-final-reply-links-the-pull.md | 7 -- .../place-files.sh | 2 +- .../case.yaml | 4 +- .../graders/05-leaves-gap-to-user.md | 7 ++ .../graders/05-offers-to-file-gap.md | 7 -- .../place-files.sh | 2 +- .../place-files.sh | 2 +- .../parent-runs-first-batch-only/case.yaml | 6 +- .../graders/01-41-built-on-its-branch.md | 8 ++ .../graders/01-one-pr-closes-41.md | 8 -- .../graders/02-no-pr-for-42.md | 9 -- .../graders/02-no-pull-request.md | 9 ++ .../06-next-batch-waits-for-merge-and-go.md | 2 +- .../place-files.sh | 2 +- .../evals/plan-waits-for-go/place-files.sh | 2 +- .../branch/readwell/src/reminders.js | 0 .../branch/readwell/test/loans.test.js | 0 .../evals/resume-from-branch/case.yaml | 12 +++ .../files/.gh-stub/state.json | 15 +--- .../graders/01-no-pull-request.md | 9 ++ .../graders/02-never-pushes.md | 10 +++ .../graders/03-on-the-existing-branch.md | 8 ++ .../graders/04-first-email-fixed.md | 7 ++ .../graders/05-reply-checklist.md | 7 ++ .../place-files.sh | 4 +- .../prompt.md | 0 .../evals/resume-from-pr-checklist/case.yaml | 11 --- .../graders/02-pr-20s-body-was-updated.md | 8 -- .../graders/03-the-run-pushed-new-commits.md | 7 -- .../graders/04-pr-20s-body-ticks-the.md | 7 -- .../graders/05-the-final-reply-links-pr.md | 7 -- .../unmerged-dependency-blocks/place-files.sh | 2 +- .../vague-issue-needs-context/place-files.sh | 2 +- skills/implement-issue/references/batches.md | 30 +++---- skills/implement-issue/references/trackers.md | 60 ++------------ 103 files changed, 300 insertions(+), 357 deletions(-) rename skills/implement-issue/evals/{clear-issue-ships-test-first-pr => clear-issue-built-test-first}/case.yaml (57%) rename skills/implement-issue/evals/{clear-issue-ships-test-first-pr => clear-issue-built-test-first}/files/.gh-stub/state.json (100%) rename skills/implement-issue/evals/{clear-issue-ships-test-first-pr => clear-issue-built-test-first}/files/bin/gh (100%) rename skills/implement-issue/evals/{resume-from-pr-checklist/graders/01-no-new-pull-request-was.md => clear-issue-built-test-first/graders/01-no-pull-request.md} (67%) create mode 100644 skills/implement-issue/evals/clear-issue-built-test-first/graders/02-never-pushes.md create mode 100644 skills/implement-issue/evals/clear-issue-built-test-first/graders/03-on-the-issue-branch.md rename skills/implement-issue/evals/{clear-issue-ships-test-first-pr/graders/03-a-test-for-the-days-overdue.md => clear-issue-built-test-first/graders/04-test-first.md} (100%) create mode 100644 skills/implement-issue/evals/clear-issue-built-test-first/graders/05-branch-changes-only-reminders.md create mode 100644 skills/implement-issue/evals/clear-issue-built-test-first/graders/06-reply-has-checklist.md create mode 100644 skills/implement-issue/evals/clear-issue-built-test-first/graders/07-reply-ends-done.md rename skills/implement-issue/evals/{clear-issue-ships-test-first-pr => clear-issue-built-test-first}/graders/08-issue-14-is-assigned-to.md (100%) rename skills/implement-issue/evals/{clear-issue-ships-test-first-pr => clear-issue-built-test-first}/place-files.sh (90%) rename skills/implement-issue/evals/{clear-issue-ships-test-first-pr => clear-issue-built-test-first}/prompt.md (100%) delete mode 100644 skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/01-one-pull-request-opened.md delete mode 100644 skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/02-the-pull-request-body-links.md delete mode 100644 skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/04-the-pushed-branch-changes-only.md delete mode 100644 skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/05-the-pull-request-body-has.md delete mode 100644 skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/06-the-pull-request-body-says.md delete mode 100644 skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/07-the-final-reply-links-the.md delete mode 100644 skills/implement-issue/evals/gitlab-issue-opens-mr/case.yaml delete mode 100644 skills/implement-issue/evals/gitlab-issue-opens-mr/graders/02-exactly-one-merge-request-exists-from.md delete mode 100644 skills/implement-issue/evals/gitlab-issue-opens-mr/graders/03-the-merge-request-description-has-a.md delete mode 100644 skills/implement-issue/evals/gitlab-issue-opens-mr/graders/06-the-run-never-tried-to-open.md delete mode 100644 skills/implement-issue/evals/gitlab-issue-opens-mr/graders/07-the-final-reply-links-the-merge.md create mode 100644 skills/implement-issue/evals/gitlab-issue-read-with-glab/case.yaml rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/files/.glab-stub/state.json (100%) rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/files/bin/gh (100%) rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/files/bin/glab (100%) rename skills/implement-issue/evals/{gitlab-issue-opens-mr/graders/01-a-merge-request-was-opened-with.md => gitlab-issue-read-with-glab/graders/01-no-merge-request.md} (59%) create mode 100644 skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/02-never-pushes.md create mode 100644 skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/03-on-the-issue-branch.md rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/graders/04-the-run-read-issue-14-through.md (100%) rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/graders/05-a-test-for-the-daysoverdue-line.md (51%) create mode 100644 skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/06-the-run-never-tried-to-open.md create mode 100644 skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/07-reply-names-branch.md rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/graders/08-issue-14-is-assigned-to.md (100%) rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/place-files.sh (100%) rename skills/implement-issue/evals/{gitlab-issue-opens-mr => gitlab-issue-read-with-glab}/prompt.md (100%) create mode 100644 skills/implement-issue/evals/jira-issue-branch-named-by-key/case.yaml rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/files/.gh-stub/state.json (100%) rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/files/.jira-stub/state.json (100%) rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/files/bin/acli (100%) rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/files/readwell/CONTRIBUTING.md (100%) rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/graders/01-the-run-read-rw14-from-jira.md (100%) create mode 100644 skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/02-branch-named-by-key.md create mode 100644 skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/03-no-pull-request.md create mode 100644 skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/04-never-pushes.md rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/graders/05-the-run-did-not-transition-rw14s.md (100%) rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/graders/06-a-test-for-the-daysoverdue-line.md (51%) create mode 100644 skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/07-reply-has-checklist.md rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/graders/08-rw14-is-assigned-to-the.md (100%) rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/place-files.sh (90%) rename skills/implement-issue/evals/{jira-issue-github-pr => jira-issue-branch-named-by-key}/prompt.md (100%) delete mode 100644 skills/implement-issue/evals/jira-issue-github-pr/case.yaml delete mode 100644 skills/implement-issue/evals/jira-issue-github-pr/graders/02-exactly-one-github-pull-request-exists.md delete mode 100644 skills/implement-issue/evals/jira-issue-github-pr/graders/03-the-pull-request-body-links-httpsmillbro.md delete mode 100644 skills/implement-issue/evals/jira-issue-github-pr/graders/04-the-pull-request-body-has-a.md delete mode 100644 skills/implement-issue/evals/jira-issue-github-pr/graders/07-the-final-reply-links-the-pull.md create mode 100644 skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-leaves-gap-to-user.md delete mode 100644 skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-offers-to-file-gap.md create mode 100644 skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-41-built-on-its-branch.md delete mode 100644 skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-one-pr-closes-41.md delete mode 100644 skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pr-for-42.md create mode 100644 skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pull-request.md rename skills/implement-issue/evals/{resume-from-pr-checklist => resume-from-branch}/branch/readwell/src/reminders.js (100%) rename skills/implement-issue/evals/{resume-from-pr-checklist => resume-from-branch}/branch/readwell/test/loans.test.js (100%) create mode 100644 skills/implement-issue/evals/resume-from-branch/case.yaml rename skills/implement-issue/evals/{resume-from-pr-checklist => resume-from-branch}/files/.gh-stub/state.json (60%) create mode 100644 skills/implement-issue/evals/resume-from-branch/graders/01-no-pull-request.md create mode 100644 skills/implement-issue/evals/resume-from-branch/graders/02-never-pushes.md create mode 100644 skills/implement-issue/evals/resume-from-branch/graders/03-on-the-existing-branch.md create mode 100644 skills/implement-issue/evals/resume-from-branch/graders/04-first-email-fixed.md create mode 100644 skills/implement-issue/evals/resume-from-branch/graders/05-reply-checklist.md rename skills/implement-issue/evals/{resume-from-pr-checklist => resume-from-branch}/place-files.sh (83%) rename skills/implement-issue/evals/{resume-from-pr-checklist => resume-from-branch}/prompt.md (100%) delete mode 100644 skills/implement-issue/evals/resume-from-pr-checklist/case.yaml delete mode 100644 skills/implement-issue/evals/resume-from-pr-checklist/graders/02-pr-20s-body-was-updated.md delete mode 100644 skills/implement-issue/evals/resume-from-pr-checklist/graders/03-the-run-pushed-new-commits.md delete mode 100644 skills/implement-issue/evals/resume-from-pr-checklist/graders/04-pr-20s-body-ticks-the.md delete mode 100644 skills/implement-issue/evals/resume-from-pr-checklist/graders/05-the-final-reply-links-pr.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index fec3a04..282b68f 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "fstack", "description": "Federico Mastrini's agent skills for everyday software engineering work.", - "version": "0.16.1", + "version": "0.17.0", "author": { "name": "Federico Mastrini", "url": "https://fedemas.dev" diff --git a/README.md b/README.md index 789a7aa..8b90699 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ **A short stack of agent skills for everyday software engineering work.** [![Claude Code plugin](https://img.shields.io/badge/Claude%20Code-plugin-D97757?style=flat-square)](https://www.fedemas.dev/fstack) -[![Version](https://img.shields.io/badge/version-0.16.1-B4A7E5?style=flat-square)](.claude-plugin/plugin.json) +[![Version](https://img.shields.io/badge/version-0.17.0-B4A7E5?style=flat-square)](.claude-plugin/plugin.json) [![License: MIT](https://img.shields.io/badge/license-MIT-93D3BB?style=flat-square)](LICENSE) @@ -162,7 +162,7 @@ The skills hand work to each other, so install each one together with every skil | feature-design | domain-driven-design, ux-brainstorm, test-driven-development, pr-open, pr-babysit, resolve-merge-conflicts | | ux-brainstorm | domain-driven-design, pr-open, pr-babysit, resolve-merge-conflicts | | design-system | ux-brainstorm, domain-driven-design, pr-open, pr-babysit, resolve-merge-conflicts | -| implement-issue | implement, test-driven-development, create-issues, pr-open, pr-ship, pr-babysit, resolve-merge-conflicts | +| implement-issue | implement, test-driven-development | | create-issues | pr-open, pr-babysit, resolve-merge-conflicts | | implement | test-driven-development | | pr-ship | pr-open, pr-babysit, resolve-merge-conflicts | diff --git a/gemini-extension.json b/gemini-extension.json index 24e9d60..0840765 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,5 +1,5 @@ { "name": "fstack", - "version": "0.16.1", + "version": "0.17.0", "description": "Federico Mastrini's agent skills for everyday software engineering work." } diff --git a/plugin.json b/plugin.json index 9aeb9f7..495cbad 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "fstack", - "version": "0.16.1", + "version": "0.17.0", "description": "Federico Mastrini's agent skills for everyday software engineering work.", "author": { "name": "Federico Mastrini", diff --git a/skills/implement-issue/SKILL.md b/skills/implement-issue/SKILL.md index abf441a..b6a5843 100644 --- a/skills/implement-issue/SKILL.md +++ b/skills/implement-issue/SKILL.md @@ -1,36 +1,38 @@ --- name: implement-issue description: Use when the user asks to implement, fix, or resume issues or tickets on any tracker, one or several, or a parent issue (an epic or tracking issue) through its sub-issues, such as "implement #42", "pick up PROJ-118", "carry on with #42", "implement #12, #15 and #19", "work through the sub-issues of #40", or "start the next batch", or when another skill hands off issues to build. -compatibility: Needs git, a way to read the issue's tracker and to open pull or merge requests on the code host (a CLI such as gh, glab, acli, az, or tea, a tracker MCP server, or the REST API), the project's own test and build tooling, and the implement and test-driven-development skills from the same plugin (pr-open, to open a GitHub PR; pr-ship, when the user asks to merge a GitHub PR; create-issues, to file a parent's gaps). Uses a reviewer subagent and a question tool (AskUserQuestion or the harness's equivalent) when the harness has them, and threads or subagents to run several issues. +compatibility: Needs git, a way to read the issue's tracker (a CLI such as gh, glab, acli, az, or tea, a tracker MCP server, or the REST API), the project's own test and build tooling, and the implement and test-driven-development skills from the same plugin. Uses a reviewer subagent and a question tool (AskUserQuestion or the harness's equivalent) when the harness has them, and threads or subagents to run several issues. --- # Implement issue **Several issues, or a parent** (an epic or tracking issue whose work lives in its sub-issues): you are the planner, not a builder. Read [references/batches.md](references/batches.md) now and follow it in place of the rest of this file: each issue gets its own run of this skill, and your replies are the plan and the batch reports. One issue that isn't a parent, a child included: read on. -One issue in, one branch and one pull request out. The issue is the **contract**: its acceptance criteria say what gets built, and you decide only how. Anything it doesn't ask for (a refactor you'd like, a bug you spot, the next issue's work) goes in the PR as a follow-up, never into the diff: reviewers check the PR against the issue, and every unrequested line is one they must work out the intent of. +One issue in, one local branch of commits out. The issue is the **contract**: its acceptance criteria say what gets built, and you decide only how. Anything it doesn't ask for (a refactor you'd like, a bug you spot, the next issue's work) goes in the reply's Follow-ups, never into the diff: whoever reviews the branch checks it against the issue, and every unrequested line is one they must work out the intent of. -The **tracker** holds the issue (GitHub, GitLab, Jira, Linear, Azure Boards, …); the **code host** holds the repository and takes the **PR** (a merge request on GitLab). Often one service is both; with Jira or Linear they differ. [references/trackers.md](references/trackers.md) has each one's commands, link syntax, and pitfalls: read the parts for yours before the first call. +The run ends at the **hand-back**: the branch, committed and checked out, and the reply. Pushing it, opening a pull request, merging, and the next issue are the user's calls, made after the run. -Whatever you tell the user or write in the PR about what the code does cites its evidence: a file:line, or a command you ran and its output. A suspicion you haven't checked is either checked first or labelled as one; a confident wrong claim costs the reader more than silence. +The **tracker** holds the issue (GitHub, GitLab, Jira, Linear, Azure Boards, …); the **code host** holds the repository. Often one service is both; with Jira or Linear they differ. [references/trackers.md](references/trackers.md) has each one's commands and pitfalls: read the parts for yours before the first call. + +Whatever you tell the user about what the code does cites its evidence: a file:line, or a command you ran and its output. A suspicion you haven't checked is either checked first or labelled as one; a confident wrong claim costs the reader more than silence. Every single-issue run ends with exactly one status, as the reply's last line: `STATUS: — `. | Status | When | | --- | --- | -| `DONE` | The PR is open, every automated check in its checklist is met, and full verification matches or beats the baseline. Concerns and manual checks are listed in the reply. | +| `DONE` | Every automated checklist item has its passing test committed on the branch, and full verification matches or beats the baseline. Concerns and manual checks are listed in the reply. | | `NEEDS_CONTEXT` | A person must answer or decide: missing criteria, open questions, the issue and the code disagree, a breaking or out-of-scope change. | | `BLOCKED` | Something outside the conversation must change first: an unmerged dependency, the same failure after two attempts, tooling you can't run. | -## Progress lives in the PR +## Progress lives on the branch -A later session resumes from the PR, not from this conversation. Its body holds the **checklist** (each acceptance criterion and definition-of-done item, mapped to the check that proves it) and the **Decisions** the user made. Tick an automated item only once its test passed and the commit is pushed; a ticked box is a claim the reviewer relies on. +A later session resumes from the branch, not from this conversation. Each checklist item lands as its own commit whose subject names the criterion, so `git log` is the progress record; each decision rides in the body of the next commit as `Decision: — `. -**Resuming.** Look for this issue's open PR on the code host first: one whose branch, title, or description carries the issue reference, or one the tracker lists as linked; else a branch with the reference in its name. If there is one, check out its branch and read its body (and any comment the body points to) and `git log`; trust those over any memory of the work. Decisions recorded there are settled. Run the baseline (step 2), untick any item whose test now fails, and continue from the first unticked automated item. +**Resuming.** Look for this issue's branch: a local or remote branch with the issue reference in its name, or the head branch of an open pull request linked to the issue (trackers.md's Existing PR row). If there is one, check it out and read `git log ..HEAD` with the commit bodies; trust it over any memory of the work. Decisions recorded there are settled. Run the baseline (step 2), rerun each committed item's test, and continue from the first criterion without a passing committed test. ## 1. Find, read, and gate -**Find the tracker** from the reference, the project's docs (README, CONTRIBUTING, AGENTS.md or CLAUDE.md, the PR template), and the git remote, as trackers.md's first table shows, and reach it with the first tool that works: an authenticated CLI, its MCP server, or the API. When nothing reaches it, ask the user to paste the issue with its comments and links, and say which checks that leaves to them (blockers, status). +**Find the tracker** from the reference, the project's docs (README, CONTRIBUTING, AGENTS.md or CLAUDE.md), and the git remote, as trackers.md's first table shows, and reach it with the first tool that works: an authenticated CLI, its MCP server, or the API. When nothing reaches it, ask the user to paste the issue with its comments and links, and say which checks that leaves to them (blockers, status). Read the whole issue, with its comments: they can amend the scope, and the latest word from a maintainer wins. Read every spec, ADR, design, or doc it links, and every file it names. @@ -38,7 +40,7 @@ Stop before anything else when: - **No acceptance criteria**, or none a person could check ("make it clearer", "clean up X"): `NEEDS_CONTEXT`. Say what's missing and propose criteria you'd use, each checkable, so the author is one edit from a startable issue. Don't build on your own proposal: what gets built is the author's call. - **No way to verify**: no test runner and no observable outcome you or a person could check. `NEEDS_CONTEXT`, saying what would make it checkable. -- **Not one PR of work**: the issue is closed or done; say so and ask which issue to take. An issue that turns out to be a parent goes to [references/batches.md](references/batches.md). +- **Not one branch of work**: the issue is closed or done; say so and ask which issue to take. An issue that turns out to be a parent goes to [references/batches.md](references/batches.md). - **Someone else's**: it is assigned to anyone but the user or the account your tracker tool is signed in as. Ask whether to take it over. Done when you hold the criteria, the scope (in and out), and every linked doc and named file. @@ -77,17 +79,15 @@ Add the issue's definition-of-done items. Done when every criterion has its chec Branch from the up-to-date default branch, named the repo's way with the issue reference in it (the bare key, like `PROJ-118`, where the tracker links branches by key). Load the implement skill for the shape of the code across the whole checklist; this skill's baseline is its first check run. For each automated item, load the test-driven-development skill and follow it: this skill's baseline and checklist are its ground step and test list. Without test-driven-development: write the test, watch it fail for the reason the criterion names, make it pass, refactor on green. -After each change, run the narrowest check that covers it (the one test file, typecheck or lint on the touched files); the full suite runs at item boundaries and in step 5. - -When an item is green, commit only the files you changed, push, and tick it. After the first item, open the PR as a draft, since it's unfinished: on GitHub with the pr-open skill, its sections followed by the Checklist, Decisions, Deviations, and Follow-ups of the template below; elsewhere with that template. Then it is the progress record. Its first line is the tracker's link-and-close line from trackers.md (`Closes #42` on GitHub), so merging closes the issue where the tracker supports that. +After each change, run the narrowest check that covers it (the one test file, typecheck or lint on the touched files); the full suite runs at item boundaries and in step 5. When an item is green, commit only the files you changed, the commit subject naming the criterion. -- **Copy the pattern.** Add an abstraction (a base class, a helper module, a dependency) only when nothing existing fits, and say why in the PR. -- **Exactly the issue.** The implement skill's subtraction (deleting what the end state no longer needs in the change's path) is part of the work; list each deletion under Decisions. Other extras go in the Follow-ups list. A change the criteria don't need is a stop (below). +- **Copy the pattern.** Add an abstraction (a base class, a helper module, a dependency) only when nothing existing fits, and record why as a Decision. +- **Exactly the issue.** The implement skill's subtraction (deleting what the end state no longer needs in the change's path) is part of the work; record each deletion as a Decision. Other extras go in Follow-ups. A change the criteria don't need is a stop (below). - **Keep the checks honest.** Never skip, disable, delete, or loosen a test, lint rule, or type check to get green: no `.skip`, no `eslint-disable`, `@ts-ignore`, `# type: ignore`, or `#[allow]`, no lowered thresholds or coverage, no expected value changed to match the output, no `--no-verify`. An existing test the issue makes wrong is updated as that item's red step and listed under Deviations; anything else red is a bug in your change. ## Stop rules -A precise stop beats a PR built on a guess. When one fires, leave the branch at its last green commit, pushed, note the stop in the PR if one is open, report, and end with the status. +A precise stop beats a branch built on a guess. When one fires, leave the branch at its last green commit, report, and end with the status. | Trigger | Report | Status | | --- | --- | --- | @@ -96,53 +96,32 @@ A precise stop beats a PR built on a guess. When one fires, leave the branch at | The same failure after two different attempts | the exact error, each attempt and why it failed, your best hypothesis | `BLOCKED` | | A dependency isn't merged | the issue and its PR | `BLOCKED` | -An attempt is one hypothesis, changed and run; rerunning the same thing is not a second attempt. A small ambiguity the code settles is not a stop: decide it and record it under Decisions as ` — `. +An attempt is one hypothesis, changed and run; rerunning the same thing is not a second attempt. A small ambiguity the code settles is not a stop: decide it and record it as a Decision. ## 5. Verify 1. **Full verification.** Rerun every baseline check on the final tree; a run from earlier in the session doesn't count. Match or beat the baseline, and name any check still red. -2. **Spec review.** Read the diff from the default branch (`git diff origin/...HEAD`), not your memory of it, against each checklist item: **met** (its test seen passing), **not met**, or **manual**. Then look for **extra** (in the diff, not in the issue, beyond step 4's subtraction) and **misread** (built, but not what the criterion means). Not met or misread goes back to step 4; extra comes out. -3. **Quality review**, a separate pass after the spec review. Give a reviewer subagent the issue link, the base SHA and the diff command, and the repo's conventions files; ask for correctness bugs, missed edge cases, departures from the repo's patterns, dead code or leftover debugging, weak tests, and docs describing changed behavior that weren't updated, each with file:line and a confidence from 0 to 100, reporting only 80 and up and nothing that predates the branch. Tell it the PR body and your reasons are claims, not evidence, and that you just ran the full verification, so it reads the diff and the code around it instead of rerunning the suite. Without subagents, make the pass yourself, re-reading the diff cold. Fix confirmed findings within scope and rerun full verification; the rest become follow-ups. - -Done when full verification is at or above the baseline, every item is met or manual, and the review's in-scope findings are fixed. - -## 6. Finish - -Write the PR's final title and body: on GitHub with the pr-open skill, keeping the Checklist, Decisions, Deviations, and Follow-ups; elsewhere inside the repo's PR template if it has one (trackers.md says where each code host keeps it). Leave it a draft or mark it ready the way the user and repo open PRs; for a draft, tell the user it waits on them. Merge only when the user asked to: on GitHub, load the pr-ship skill and run it on this PR; elsewhere, use the code host's ready, checks, and merge commands from trackers.md, merging once its required checks and approvals pass, never around them. +2. **Spec review.** Read the diff from the default branch (`git diff ...HEAD`), not your memory of it, against each checklist item: **met** (its test seen passing), **not met**, or **manual**. Then look for **extra** (in the diff, not in the issue, beyond step 4's subtraction) and **misread** (built, but not what the criterion means). Not met or misread goes back to step 4; extra comes out. +3. **Quality review**, a separate pass after the spec review. Give a reviewer subagent the issue link, the base SHA and the diff command, and the repo's conventions files; ask for correctness bugs, missed edge cases, departures from the repo's patterns, dead code or leftover debugging, weak tests, and docs describing changed behavior that weren't updated, each with file:line and a confidence from 0 to 100, reporting only 80 and up and nothing that predates the branch. Tell it your commit messages and reasons are claims, not evidence, and that you just ran the full verification, so it reads the diff and the code around it instead of rerunning the suite. Without subagents, make the pass yourself, re-reading the diff cold. Fix confirmed findings within scope, commit, and rerun full verification; the rest become follow-ups. -Reply, dropping empty lines: +Done when full verification is at or above the baseline, every item is met or manual, and the review's in-scope findings are fixed and committed. -``` - — -Criteria: met · manual · not met -Verified: -Manual checks for you: -Decisions · Deviations · Follow-ups · Concerns: -STATUS: DONE — -``` +## 6. Hand back -## PR body +Reply in this shape, with Deviations and Concerns lines when there are any and empty parts dropped, and end the run there: -```md - +**#27 Search results show the shelf location** — branch `27-shelf-location`, 2 commits -## Checklist -- [x] — `` in `` -- [ ] — manual: () -- [x] Docs updated where behavior changed +- [x] Each result shows its shelf code, like `B-12` — `result shows shelf code` in `test/search.test.js` +- [x] A book with no shelf says `Not shelved` — `unshelved book says so` in `test/search.test.js` +- [ ] The lobby kiosk still fits each result on one line — manual: look at it on the kiosk (visual judgment) -## Verification -Automated: `` → (baseline: ) -Manual, not done: +Verified: `npm test` 58 passed (baseline: clean) -## Decisions - +Decisions: the shelf code comes from the copy, not the title — one title has copies on several shelves -## Deviations from the issue - +Follow-ups: the empty search state has no hint text -## Follow-ups - -``` +STATUS: DONE — every automated criterion passes; the kiosk check is yours -Manual items stay unticked until the person who did them says so: you didn't do them, and a ticked box tells the reviewer someone did. +Manual items stay unticked until the person who did them says so: you didn't do them, and a ticked box tells the reader someone did. diff --git a/skills/implement-issue/agents/openai.yaml b/skills/implement-issue/agents/openai.yaml index 8ddae2c..fb1a3c1 100644 --- a/skills/implement-issue/agents/openai.yaml +++ b/skills/implement-issue/agents/openai.yaml @@ -1,3 +1,3 @@ interface: display_name: "Implement Issue" - short_description: "Build issues test-first into checked, resumable pull requests: one issue, or several in merge-gated batches" + short_description: "Build issues test-first into checked, resumable branches: one issue, or several in merge-gated batches" diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/case.yaml b/skills/implement-issue/evals/clear-issue-built-test-first/case.yaml similarity index 57% rename from skills/implement-issue/evals/clear-issue-ships-test-first-pr/case.yaml rename to skills/implement-issue/evals/clear-issue-built-test-first/case.yaml index f69f001..5630885 100644 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/case.yaml +++ b/skills/implement-issue/evals/clear-issue-built-test-first/case.yaml @@ -1,12 +1,13 @@ schema_version: "1.1" -name: clear-issue-ships-test-first-pr +name: clear-issue-built-test-first expected_outcome: | Issue #14 has clear acceptance criteria, no dependencies, and code that matches it. The run assigns it to the account gh is signed in as, then implements it test-first on a branch named with 14: tests for the days-overdue line (7 and 14 days), for no line on the first email, and for the unchanged subject, written and seen failing before src/reminders.js changes. It touches only src/reminders.js and the tests (no change to loans.js, holds.js, or #13's reminder - time), runs the full suite (node --test), pushes, and opens one PR with Closes #14 whose checklist ticks - the automated criteria and leaves the VPS outbox check as an unticked manual check, with sections for - verification, deviations, and follow-ups. It asks no questions, and the reply ends with STATUS: DONE. + time), runs the full suite (node --test), and commits on that branch, leaving it checked out. It pushes + nothing and opens no pull request: the reply hands the branch back with the criteria checklist (the + automated criteria ticked with their tests, the VPS outbox check an unticked manual check), how the work + was verified, and ends with STATUS: DONE. It asks no questions. context: scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/files/.gh-stub/state.json b/skills/implement-issue/evals/clear-issue-built-test-first/files/.gh-stub/state.json similarity index 100% rename from skills/implement-issue/evals/clear-issue-ships-test-first-pr/files/.gh-stub/state.json rename to skills/implement-issue/evals/clear-issue-built-test-first/files/.gh-stub/state.json diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/files/bin/gh b/skills/implement-issue/evals/clear-issue-built-test-first/files/bin/gh similarity index 100% rename from skills/implement-issue/evals/clear-issue-ships-test-first-pr/files/bin/gh rename to skills/implement-issue/evals/clear-issue-built-test-first/files/bin/gh diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/graders/01-no-new-pull-request-was.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/01-no-pull-request.md similarity index 67% rename from skills/implement-issue/evals/resume-from-pr-checklist/graders/01-no-new-pull-request-was.md rename to skills/implement-issue/evals/clear-issue-built-test-first/graders/01-no-pull-request.md index 4473089..8be4722 100644 --- a/skills/implement-issue/evals/resume-from-pr-checklist/graders/01-no-new-pull-request-was.md +++ b/skills/implement-issue/evals/clear-issue-built-test-first/graders/01-no-pull-request.md @@ -6,4 +6,4 @@ match: not_contains weight: 1 --- -No new pull request was opened: the work continued on PR #20. +No pull request was opened: the run ends at the branch. diff --git a/skills/implement-issue/evals/clear-issue-built-test-first/graders/02-never-pushes.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/02-never-pushes.md new file mode 100644 index 0000000..9816e8b --- /dev/null +++ b/skills/implement-issue/evals/clear-issue-built-test-first/graders/02-never-pushes.md @@ -0,0 +1,10 @@ +--- +type: tool_used +tool: Bash +input_match: '\bgit\b[^"]*\bpush\b' +min: 0 +max: 0 +weight: 1 +--- + +The run never pushed: what happens to the branch after the run is the user's call. diff --git a/skills/implement-issue/evals/clear-issue-built-test-first/graders/03-on-the-issue-branch.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/03-on-the-issue-branch.md new file mode 100644 index 0000000..0a76440 --- /dev/null +++ b/skills/implement-issue/evals/clear-issue-built-test-first/graders/03-on-the-issue-branch.md @@ -0,0 +1,8 @@ +--- +type: regex +target: { source: file, path: readwell/.git/HEAD } +pattern: 'ref: refs/heads/.*14' +weight: 1 +--- + +The run ends with a branch whose name contains 14 checked out. diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/03-a-test-for-the-days-overdue.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/04-test-first.md similarity index 100% rename from skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/03-a-test-for-the-days-overdue.md rename to skills/implement-issue/evals/clear-issue-built-test-first/graders/04-test-first.md diff --git a/skills/implement-issue/evals/clear-issue-built-test-first/graders/05-branch-changes-only-reminders.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/05-branch-changes-only-reminders.md new file mode 100644 index 0000000..bfff075 --- /dev/null +++ b/skills/implement-issue/evals/clear-issue-built-test-first/graders/05-branch-changes-only-reminders.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The branch changes only src/reminders.js and test files, committed: src/loans.js, src/holds.js and src/db.js are untouched, and nothing about reminder times (#13) was built. diff --git a/skills/implement-issue/evals/clear-issue-built-test-first/graders/06-reply-has-checklist.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/06-reply-has-checklist.md new file mode 100644 index 0000000..b3d7acf --- /dev/null +++ b/skills/implement-issue/evals/clear-issue-built-test-first/graders/06-reply-has-checklist.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The reply names the branch and has a checklist where the automated acceptance criteria are ticked and each names its test, and the VPS outbox check after deploy is listed as a manual check left unticked. It says how the work was verified (the test command and its result). diff --git a/skills/implement-issue/evals/clear-issue-built-test-first/graders/07-reply-ends-done.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/07-reply-ends-done.md new file mode 100644 index 0000000..5dfb7e5 --- /dev/null +++ b/skills/implement-issue/evals/clear-issue-built-test-first/graders/07-reply-ends-done.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The reply ends with a line STATUS: DONE and a short reason, and does not claim to have pushed the branch or opened a pull request. diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/08-issue-14-is-assigned-to.md b/skills/implement-issue/evals/clear-issue-built-test-first/graders/08-issue-14-is-assigned-to.md similarity index 100% rename from skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/08-issue-14-is-assigned-to.md rename to skills/implement-issue/evals/clear-issue-built-test-first/graders/08-issue-14-is-assigned-to.md diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/place-files.sh b/skills/implement-issue/evals/clear-issue-built-test-first/place-files.sh similarity index 90% rename from skills/implement-issue/evals/clear-issue-ships-test-first-pr/place-files.sh rename to skills/implement-issue/evals/clear-issue-built-test-first/place-files.sh index d866604..d8a97ca 100755 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/place-files.sh +++ b/skills/implement-issue/evals/clear-issue-built-test-first/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/prompt.md b/skills/implement-issue/evals/clear-issue-built-test-first/prompt.md similarity index 100% rename from skills/implement-issue/evals/clear-issue-ships-test-first-pr/prompt.md rename to skills/implement-issue/evals/clear-issue-built-test-first/prompt.md diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/01-one-pull-request-opened.md b/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/01-one-pull-request-opened.md deleted file mode 100644 index 084da84..0000000 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/01-one-pull-request-opened.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .gh-stub/state.json } -weight: 1 ---- - -Exactly one pull request was opened, from a branch whose name contains 14. diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/02-the-pull-request-body-links.md b/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/02-the-pull-request-body-links.md deleted file mode 100644 index 8963a7e..0000000 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/02-the-pull-request-body-links.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -type: regex -target: { source: file, path: .gh-stub/state.json } -pattern: '(Closes|Fixes|Resolves) #14' -weight: 1 ---- - -The pull request body links the issue with Closes #14 (or Fixes/Resolves). diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/04-the-pushed-branch-changes-only.md b/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/04-the-pushed-branch-changes-only.md deleted file mode 100644 index 72df317..0000000 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/04-the-pushed-branch-changes-only.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: trace -weight: 1 ---- - -The pushed branch changes only src/reminders.js and test files: src/loans.js, src/holds.js and src/db.js are untouched, and nothing about reminder times (#13) was built. diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/05-the-pull-request-body-has.md b/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/05-the-pull-request-body-has.md deleted file mode 100644 index d9a2250..0000000 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/05-the-pull-request-body-has.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .gh-stub/state.json } -weight: 1 ---- - -The pull request body has a checklist where the automated acceptance criteria are ticked and each names its test, and the VPS outbox check after deploy is listed as a manual check left unticked. diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/06-the-pull-request-body-says.md b/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/06-the-pull-request-body-says.md deleted file mode 100644 index 85e9fa7..0000000 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/06-the-pull-request-body-says.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .gh-stub/state.json } -weight: 1 ---- - -The pull request body says how the work was verified (the test command and its result) and has a deviations section and a follow-ups section (either may say none). diff --git a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/07-the-final-reply-links-the.md b/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/07-the-final-reply-links-the.md deleted file mode 100644 index ed6866f..0000000 --- a/skills/implement-issue/evals/clear-issue-ships-test-first-pr/graders/07-the-final-reply-links-the.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: last_message -weight: 1 ---- - -The final reply links the pull request, lists the VPS outbox check as a manual check for a person, and ends with a line STATUS: DONE and a short reason. diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/case.yaml b/skills/implement-issue/evals/gitlab-issue-opens-mr/case.yaml deleted file mode 100644 index 689268f..0000000 --- a/skills/implement-issue/evals/gitlab-issue-opens-mr/case.yaml +++ /dev/null @@ -1,12 +0,0 @@ -schema_version: "1.1" -name: gitlab-issue-opens-mr -expected_outcome: | - readwell lives on GitLab (the git remote is gitlab.com/millbrook/readwell) and #14 is a GitLab issue with - clear criteria. The run reads it with glab (with comments), checks it has no blocking links, assigns it to - the account glab is signed in as, builds it test-first on a branch named with 14, touches only src/reminders.js and the tests, pushes, and opens one - merge request with glab whose description closes the issue the GitLab way (Closes #14) and carries the - criteria checklist: the automated criteria ticked with their tests, the VPS outbox check an unticked manual - check, plus verification, deviations, and follow-ups. It doesn't try to open a GitHub pull request. The reply - links the merge request and ends with STATUS: DONE. -context: - scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/02-exactly-one-merge-request-exists-from.md b/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/02-exactly-one-merge-request-exists-from.md deleted file mode 100644 index dd8eaa0..0000000 --- a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/02-exactly-one-merge-request-exists-from.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .glab-stub/state.json } -weight: 1 ---- - -Exactly one merge request exists, from a branch whose name contains 14, and its description closes the issue with a GitLab closing pattern (Closes #14, Fixes #14, Resolves #14, or Implements #14). diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/03-the-merge-request-description-has-a.md b/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/03-the-merge-request-description-has-a.md deleted file mode 100644 index 183b926..0000000 --- a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/03-the-merge-request-description-has-a.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .glab-stub/state.json } -weight: 1 ---- - -The merge request description has a checklist where the automated acceptance criteria are ticked and each names its test, the VPS outbox check after deploy is an unticked manual check, and it says how the work was verified. diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/06-the-run-never-tried-to-open.md b/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/06-the-run-never-tried-to-open.md deleted file mode 100644 index cc8e8d9..0000000 --- a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/06-the-run-never-tried-to-open.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: trace -weight: 1 ---- - -The run never tried to open or look up a GitHub pull request after learning the repository is on GitLab (a single failed gh probe before that is fine). diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/07-the-final-reply-links-the-merge.md b/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/07-the-final-reply-links-the-merge.md deleted file mode 100644 index 40a2137..0000000 --- a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/07-the-final-reply-links-the-merge.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: last_message -weight: 1 ---- - -The final reply links the merge request (!1 or its URL), lists the VPS check as manual, and ends with a line STATUS: DONE and a short reason. diff --git a/skills/implement-issue/evals/gitlab-issue-read-with-glab/case.yaml b/skills/implement-issue/evals/gitlab-issue-read-with-glab/case.yaml new file mode 100644 index 0000000..d6f5aac --- /dev/null +++ b/skills/implement-issue/evals/gitlab-issue-read-with-glab/case.yaml @@ -0,0 +1,11 @@ +schema_version: "1.1" +name: gitlab-issue-read-with-glab +expected_outcome: | + readwell lives on GitLab (the git remote is gitlab.com/millbrook/readwell) and #14 is a GitLab issue with + clear criteria. The run reads it with glab (with comments), checks it has no blocking links, assigns it to + the account glab is signed in as, builds it test-first on a branch named with 14, touches only + src/reminders.js and the tests, and commits there. It never reaches for GitHub, pushes nothing, and opens + no merge request. The reply names the branch, lists the VPS outbox check as manual, and ends with + STATUS: DONE. +context: + scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/files/.glab-stub/state.json b/skills/implement-issue/evals/gitlab-issue-read-with-glab/files/.glab-stub/state.json similarity index 100% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/files/.glab-stub/state.json rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/files/.glab-stub/state.json diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/files/bin/gh b/skills/implement-issue/evals/gitlab-issue-read-with-glab/files/bin/gh similarity index 100% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/files/bin/gh rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/files/bin/gh diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/files/bin/glab b/skills/implement-issue/evals/gitlab-issue-read-with-glab/files/bin/glab similarity index 100% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/files/bin/glab rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/files/bin/glab diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/01-a-merge-request-was-opened-with.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/01-no-merge-request.md similarity index 59% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/graders/01-a-merge-request-was-opened-with.md rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/01-no-merge-request.md index 3356044..059c625 100644 --- a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/01-a-merge-request-was-opened-with.md +++ b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/01-no-merge-request.md @@ -2,7 +2,8 @@ type: regex target: { source: file, path: .glab-stub/calls.log } pattern: '\["mr", "create"' +match: not_contains weight: 1 --- -A merge request was opened with glab. +No merge request was opened: the run ends at the branch. diff --git a/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/02-never-pushes.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/02-never-pushes.md new file mode 100644 index 0000000..9816e8b --- /dev/null +++ b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/02-never-pushes.md @@ -0,0 +1,10 @@ +--- +type: tool_used +tool: Bash +input_match: '\bgit\b[^"]*\bpush\b' +min: 0 +max: 0 +weight: 1 +--- + +The run never pushed: what happens to the branch after the run is the user's call. diff --git a/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/03-on-the-issue-branch.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/03-on-the-issue-branch.md new file mode 100644 index 0000000..0a76440 --- /dev/null +++ b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/03-on-the-issue-branch.md @@ -0,0 +1,8 @@ +--- +type: regex +target: { source: file, path: readwell/.git/HEAD } +pattern: 'ref: refs/heads/.*14' +weight: 1 +--- + +The run ends with a branch whose name contains 14 checked out. diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/04-the-run-read-issue-14-through.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/04-the-run-read-issue-14-through.md similarity index 100% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/graders/04-the-run-read-issue-14-through.md rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/04-the-run-read-issue-14-through.md diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/05-a-test-for-the-daysoverdue-line.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/05-a-test-for-the-daysoverdue-line.md similarity index 51% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/graders/05-a-test-for-the-daysoverdue-line.md rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/05-a-test-for-the-daysoverdue-line.md index f1a1b14..4bf2ff9 100644 --- a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/05-a-test-for-the-daysoverdue-line.md +++ b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/05-a-test-for-the-daysoverdue-line.md @@ -4,4 +4,4 @@ focus: trace weight: 1 --- -A test for the days-overdue line was written and seen failing before src/reminders.js changed, and the pushed branch changes only src/reminders.js and test files. +A test for the days-overdue line was written and seen failing before src/reminders.js changed, and the branch changes only src/reminders.js and test files. diff --git a/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/06-the-run-never-tried-to-open.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/06-the-run-never-tried-to-open.md new file mode 100644 index 0000000..47d6981 --- /dev/null +++ b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/06-the-run-never-tried-to-open.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The run never tried to look up a GitHub issue or pull request after learning the repository is on GitLab (a single failed gh probe before that is fine). diff --git a/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/07-reply-names-branch.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/07-reply-names-branch.md new file mode 100644 index 0000000..b6c5213 --- /dev/null +++ b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/07-reply-names-branch.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The final reply names the branch, lists the VPS check as manual, and ends with a line STATUS: DONE and a short reason. diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/graders/08-issue-14-is-assigned-to.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/08-issue-14-is-assigned-to.md similarity index 100% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/graders/08-issue-14-is-assigned-to.md rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/graders/08-issue-14-is-assigned-to.md diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/place-files.sh b/skills/implement-issue/evals/gitlab-issue-read-with-glab/place-files.sh similarity index 100% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/place-files.sh rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/place-files.sh diff --git a/skills/implement-issue/evals/gitlab-issue-opens-mr/prompt.md b/skills/implement-issue/evals/gitlab-issue-read-with-glab/prompt.md similarity index 100% rename from skills/implement-issue/evals/gitlab-issue-opens-mr/prompt.md rename to skills/implement-issue/evals/gitlab-issue-read-with-glab/prompt.md diff --git a/skills/implement-issue/evals/go-ahead-before-merge-waits/case.yaml b/skills/implement-issue/evals/go-ahead-before-merge-waits/case.yaml index 950332a..b12f9d1 100644 --- a/skills/implement-issue/evals/go-ahead-before-merge-waits/case.yaml +++ b/skills/implement-issue/evals/go-ahead-before-merge-waits/case.yaml @@ -4,7 +4,7 @@ expected_outcome: | Batch 1 of parent #40 was #41; its PR #50 is open and not merged. #42 is blocked by #41. The user says the PR looks good and asks for the next batch. The run checks PR #50 on the code host, finds it unmerged, and does not start #42: no runner, no branch, no PR, no code change. "Looks good" is not a request to merge, - so it does not try to merge #50 either. It replies that batch 2 (#42) waits on PR #50 being merged, and - that it can merge it if asked. + so it does not try to merge #50 either: merging is the user's call. It replies that batch 2 (#42) waits + on PR #50 being merged. context: scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/go-ahead-before-merge-waits/place-files.sh b/skills/implement-issue/evals/go-ahead-before-merge-waits/place-files.sh index 2c4dbd7..fad22be 100755 --- a/skills/implement-issue/evals/go-ahead-before-merge-waits/place-files.sh +++ b/skills/implement-issue/evals/go-ahead-before-merge-waits/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/issue-contradicts-adr-stops/case.yaml b/skills/implement-issue/evals/issue-contradicts-adr-stops/case.yaml index 041000e..7dd487c 100644 --- a/skills/implement-issue/evals/issue-contradicts-adr-stops/case.yaml +++ b/skills/implement-issue/evals/issue-contradicts-adr-stops/case.yaml @@ -3,7 +3,7 @@ name: issue-contradicts-adr-stops expected_outcome: | Issue #19 claims ADR 0003 already allows two renewals, but docs/adr/0003-one-renewal-per-loan.md says one renewal per loan (so every copy is back within six weeks), and src/loans.js cites it. The run - reads the ADR, changes no code, opens no PR, and reports the mismatch as what the issue expected, what it + reads the ADR, changes no code, commits nothing, and reports the mismatch as what the issue expected, what it found (with the file), and why it matters (building it contradicts an accepted decision, which would need superseding), ending with STATUS: NEEDS_CONTEXT. context: diff --git a/skills/implement-issue/evals/issue-contradicts-adr-stops/place-files.sh b/skills/implement-issue/evals/issue-contradicts-adr-stops/place-files.sh index d866604..d8a97ca 100755 --- a/skills/implement-issue/evals/issue-contradicts-adr-stops/place-files.sh +++ b/skills/implement-issue/evals/issue-contradicts-adr-stops/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/issue-contradicts-adr-stops/prompt.md b/skills/implement-issue/evals/issue-contradicts-adr-stops/prompt.md index dd334bd..5c9b03b 100644 --- a/skills/implement-issue/evals/issue-contradicts-adr-stops/prompt.md +++ b/skills/implement-issue/evals/issue-contradicts-adr-stops/prompt.md @@ -5,7 +5,7 @@ timeout_seconds: 600 allowed_tools: [Read, Glob, Grep, Skill, Write, Edit, Bash, Agent] --- -pick up #19 in readwell and open a PR +pick up #19 in readwell (sandbox note: GitHub is simulated here; put this sandbox's gh first on PATH with `export PATH="$PWD/bin:$PATH"` from the sandbox root before any gh command. Nobody can answer questions during this run.) diff --git a/skills/implement-issue/evals/jira-issue-branch-named-by-key/case.yaml b/skills/implement-issue/evals/jira-issue-branch-named-by-key/case.yaml new file mode 100644 index 0000000..8d6fa49 --- /dev/null +++ b/skills/implement-issue/evals/jira-issue-branch-named-by-key/case.yaml @@ -0,0 +1,12 @@ +schema_version: "1.1" +name: jira-issue-branch-named-by-key +expected_outcome: | + RW-14 is a Jira work item (millbrook.atlassian.net); readwell's code is on GitHub, and CONTRIBUTING.md says + work is tracked in Jira. RW-14 is blocked by RW-12, which is Done, and has a comment from the maintainer. The run + reads RW-14 with acli including its comment, checks RW-12 is done, and builds it test-first on a branch + whose name has the key RW-14, committed there. It assigns RW-14 to the account acli is signed in as and + leaves the Jira status alone. It pushes nothing and opens no pull request. The reply names the branch, + carries the criteria checklist (automated ticked, the VPS check an unticked manual check), and ends with + STATUS: DONE. +context: + scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/jira-issue-github-pr/files/.gh-stub/state.json b/skills/implement-issue/evals/jira-issue-branch-named-by-key/files/.gh-stub/state.json similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/files/.gh-stub/state.json rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/files/.gh-stub/state.json diff --git a/skills/implement-issue/evals/jira-issue-github-pr/files/.jira-stub/state.json b/skills/implement-issue/evals/jira-issue-branch-named-by-key/files/.jira-stub/state.json similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/files/.jira-stub/state.json rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/files/.jira-stub/state.json diff --git a/skills/implement-issue/evals/jira-issue-github-pr/files/bin/acli b/skills/implement-issue/evals/jira-issue-branch-named-by-key/files/bin/acli similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/files/bin/acli rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/files/bin/acli diff --git a/skills/implement-issue/evals/jira-issue-github-pr/files/readwell/CONTRIBUTING.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/files/readwell/CONTRIBUTING.md similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/files/readwell/CONTRIBUTING.md rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/files/readwell/CONTRIBUTING.md diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/01-the-run-read-rw14-from-jira.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/01-the-run-read-rw14-from-jira.md similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/graders/01-the-run-read-rw14-from-jira.md rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/01-the-run-read-rw14-from-jira.md diff --git a/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/02-branch-named-by-key.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/02-branch-named-by-key.md new file mode 100644 index 0000000..0a50bd4 --- /dev/null +++ b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/02-branch-named-by-key.md @@ -0,0 +1,8 @@ +--- +type: regex +target: { source: file, path: readwell/.git/HEAD } +pattern: 'ref: refs/heads/.*RW-14' +weight: 1 +--- + +The run ends with a branch whose name contains the key RW-14 checked out. diff --git a/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/03-no-pull-request.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/03-no-pull-request.md new file mode 100644 index 0000000..8be4722 --- /dev/null +++ b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/03-no-pull-request.md @@ -0,0 +1,9 @@ +--- +type: regex +target: { source: file, path: .gh-stub/calls.log } +pattern: '\["pr", "create"' +match: not_contains +weight: 1 +--- + +No pull request was opened: the run ends at the branch. diff --git a/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/04-never-pushes.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/04-never-pushes.md new file mode 100644 index 0000000..9816e8b --- /dev/null +++ b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/04-never-pushes.md @@ -0,0 +1,10 @@ +--- +type: tool_used +tool: Bash +input_match: '\bgit\b[^"]*\bpush\b' +min: 0 +max: 0 +weight: 1 +--- + +The run never pushed: what happens to the branch after the run is the user's call. diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/05-the-run-did-not-transition-rw14s.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/05-the-run-did-not-transition-rw14s.md similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/graders/05-the-run-did-not-transition-rw14s.md rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/05-the-run-did-not-transition-rw14s.md diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/06-a-test-for-the-daysoverdue-line.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/06-a-test-for-the-daysoverdue-line.md similarity index 51% rename from skills/implement-issue/evals/jira-issue-github-pr/graders/06-a-test-for-the-daysoverdue-line.md rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/06-a-test-for-the-daysoverdue-line.md index f1a1b14..4bf2ff9 100644 --- a/skills/implement-issue/evals/jira-issue-github-pr/graders/06-a-test-for-the-daysoverdue-line.md +++ b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/06-a-test-for-the-daysoverdue-line.md @@ -4,4 +4,4 @@ focus: trace weight: 1 --- -A test for the days-overdue line was written and seen failing before src/reminders.js changed, and the pushed branch changes only src/reminders.js and test files. +A test for the days-overdue line was written and seen failing before src/reminders.js changed, and the branch changes only src/reminders.js and test files. diff --git a/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/07-reply-has-checklist.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/07-reply-has-checklist.md new file mode 100644 index 0000000..f1e2574 --- /dev/null +++ b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/07-reply-has-checklist.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The final reply names the branch, has a checklist where the automated acceptance criteria are ticked and the VPS outbox check after deploy is an unticked manual check, and ends with a line STATUS: DONE and a short reason. diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/08-rw14-is-assigned-to-the.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/08-rw14-is-assigned-to-the.md similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/graders/08-rw14-is-assigned-to-the.md rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/graders/08-rw14-is-assigned-to-the.md diff --git a/skills/implement-issue/evals/jira-issue-github-pr/place-files.sh b/skills/implement-issue/evals/jira-issue-branch-named-by-key/place-files.sh similarity index 90% rename from skills/implement-issue/evals/jira-issue-github-pr/place-files.sh rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/place-files.sh index d866604..d8a97ca 100755 --- a/skills/implement-issue/evals/jira-issue-github-pr/place-files.sh +++ b/skills/implement-issue/evals/jira-issue-branch-named-by-key/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/jira-issue-github-pr/prompt.md b/skills/implement-issue/evals/jira-issue-branch-named-by-key/prompt.md similarity index 100% rename from skills/implement-issue/evals/jira-issue-github-pr/prompt.md rename to skills/implement-issue/evals/jira-issue-branch-named-by-key/prompt.md diff --git a/skills/implement-issue/evals/jira-issue-github-pr/case.yaml b/skills/implement-issue/evals/jira-issue-github-pr/case.yaml deleted file mode 100644 index 22ba9da..0000000 --- a/skills/implement-issue/evals/jira-issue-github-pr/case.yaml +++ /dev/null @@ -1,13 +0,0 @@ -schema_version: "1.1" -name: jira-issue-github-pr -expected_outcome: | - RW-14 is a Jira work item (millbrook.atlassian.net); readwell's code is on GitHub, and CONTRIBUTING.md says - work is tracked in Jira. RW-14 is blocked by RW-12, which is Done, and has a comment from the maintainer. The run - reads RW-14 with acli including its comment, checks RW-12 is done, builds it test-first on a branch whose name - has the key RW-14, and opens one GitHub pull request whose title has RW-14 and whose body links - https://millbrook.atlassian.net/browse/RW-14, with no GitHub closing keyword aimed at #14, and carries the - criteria checklist (automated ticked, the VPS check an unticked manual check). It assigns RW-14 to the - account acli is signed in as and leaves the Jira status alone. - The reply links the PR and ends with STATUS: DONE. -context: - scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/02-exactly-one-github-pull-request-exists.md b/skills/implement-issue/evals/jira-issue-github-pr/graders/02-exactly-one-github-pull-request-exists.md deleted file mode 100644 index 2c65d15..0000000 --- a/skills/implement-issue/evals/jira-issue-github-pr/graders/02-exactly-one-github-pull-request-exists.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .gh-stub/state.json } -weight: 1 ---- - -Exactly one GitHub pull request exists; its title contains RW-14 and its head branch name contains RW-14. diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/03-the-pull-request-body-links-httpsmillbro.md b/skills/implement-issue/evals/jira-issue-github-pr/graders/03-the-pull-request-body-links-httpsmillbro.md deleted file mode 100644 index 27e3ecf..0000000 --- a/skills/implement-issue/evals/jira-issue-github-pr/graders/03-the-pull-request-body-links-httpsmillbro.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .gh-stub/state.json } -weight: 1 ---- - -The pull request body links https://millbrook.atlassian.net/browse/RW-14 and contains no GitHub closing keyword aimed at a GitHub issue number (such as Closes #14 or Fixes #14). diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/04-the-pull-request-body-has-a.md b/skills/implement-issue/evals/jira-issue-github-pr/graders/04-the-pull-request-body-has-a.md deleted file mode 100644 index aa81a30..0000000 --- a/skills/implement-issue/evals/jira-issue-github-pr/graders/04-the-pull-request-body-has-a.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .gh-stub/state.json } -weight: 1 ---- - -The pull request body has a checklist where the automated acceptance criteria are ticked and each names its test, the VPS outbox check after deploy is an unticked manual check, and it says how the work was verified. diff --git a/skills/implement-issue/evals/jira-issue-github-pr/graders/07-the-final-reply-links-the-pull.md b/skills/implement-issue/evals/jira-issue-github-pr/graders/07-the-final-reply-links-the-pull.md deleted file mode 100644 index 311fc89..0000000 --- a/skills/implement-issue/evals/jira-issue-github-pr/graders/07-the-final-reply-links-the-pull.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: last_message -weight: 1 ---- - -The final reply links the pull request and ends with a line STATUS: DONE and a short reason. diff --git a/skills/implement-issue/evals/list-runner-questions-relayed/place-files.sh b/skills/implement-issue/evals/list-runner-questions-relayed/place-files.sh index d866604..d8a97ca 100755 --- a/skills/implement-issue/evals/list-runner-questions-relayed/place-files.sh +++ b/skills/implement-issue/evals/list-runner-questions-relayed/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/merged-children-parent-gap-stays-open/case.yaml b/skills/implement-issue/evals/merged-children-parent-gap-stays-open/case.yaml index 15e2434..9f5fdc0 100644 --- a/skills/implement-issue/evals/merged-children-parent-gap-stays-open/case.yaml +++ b/skills/implement-issue/evals/merged-children-parent-gap-stays-open/case.yaml @@ -4,7 +4,7 @@ expected_outcome: | Every sub-issue of parent #40 is closed with its PR merged (#43 by #39, #41 by #50, #42 by #51), so there is no batch left to run. The run checks #40's own criteria against the merged code: subject, days overdue, and the Monday digest are met, but the README has no "Reminder emails" section. It does not - close #40, starts no runner, opens no PR, and edits no file. It reports the unmet criterion and offers to - file it as a new issue (through create-issues) rather than building it. + close #40, starts no runner, opens no PR, and edits no file. It reports the unmet criterion and leaves what + happens next to the user, rather than building it or filing it. context: scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-leaves-gap-to-user.md b/skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-leaves-gap-to-user.md new file mode 100644 index 0000000..5473379 --- /dev/null +++ b/skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-leaves-gap-to-user.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The reply lists the missing README section as the open gap and leaves #40 open, without building the section or filing a new issue for it. diff --git a/skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-offers-to-file-gap.md b/skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-offers-to-file-gap.md deleted file mode 100644 index a77f118..0000000 --- a/skills/implement-issue/evals/merged-children-parent-gap-stays-open/graders/05-offers-to-file-gap.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: last_message -weight: 1 ---- - -The reply offers to file the missing README section as a new issue (for example through create-issues), leaving #40 open, instead of building it or closing #40. diff --git a/skills/implement-issue/evals/merged-children-parent-gap-stays-open/place-files.sh b/skills/implement-issue/evals/merged-children-parent-gap-stays-open/place-files.sh index 5aae620..fba2312 100755 --- a/skills/implement-issue/evals/merged-children-parent-gap-stays-open/place-files.sh +++ b/skills/implement-issue/evals/merged-children-parent-gap-stays-open/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/parent-named-as-one-issue-plans/place-files.sh b/skills/implement-issue/evals/parent-named-as-one-issue-plans/place-files.sh index 60390ab..f633b39 100755 --- a/skills/implement-issue/evals/parent-named-as-one-issue-plans/place-files.sh +++ b/skills/implement-issue/evals/parent-named-as-one-issue-plans/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/../parent-runs-first-batch-only/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/parent-runs-first-batch-only/case.yaml b/skills/implement-issue/evals/parent-runs-first-batch-only/case.yaml index 3053af9..4ec7c81 100644 --- a/skills/implement-issue/evals/parent-runs-first-batch-only/case.yaml +++ b/skills/implement-issue/evals/parent-runs-first-batch-only/case.yaml @@ -4,8 +4,8 @@ expected_outcome: | Parent #40 has three sub-issues: #43 is closed with its PR #39 merged, #41 has no blockers, and #42 is blocked by #41. Threads aren't available, so every batch is one issue: batch 1 is #41, batch 2 is #42, and #43 is reported as done. The user pre-approved the plan, so the run starts batch 1 right away: one - runner (a subagent, or inline) builds #41 with the implement-issue skill and opens one PR with Closes #41. - The run then stops: it does not start #42, does not merge, and replies with the batch report, the PR link, - and that batch 2 (#42) starts once that PR is merged and the user says go. + runner (a subagent, or inline) builds #41 with the implement-issue skill on its own branch, committed and + not pushed. The run then stops: it does not start #42, opens no PR, does not merge, and replies with the + batch report, #41's branch, and that batch 2 (#42) starts once #41's work is merged and the user says go. context: scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-41-built-on-its-branch.md b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-41-built-on-its-branch.md new file mode 100644 index 0000000..79c839d --- /dev/null +++ b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-41-built-on-its-branch.md @@ -0,0 +1,8 @@ +--- +type: regex +target: trace +pattern: '\b41-[a-z][a-z0-9-]*' +weight: 1 +--- + +#41 was built on its own branch, one whose name starts with 41 (the runner may work in its own worktree, so the main checkout can stay on main). diff --git a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-one-pr-closes-41.md b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-one-pr-closes-41.md deleted file mode 100644 index c6b2585..0000000 --- a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/01-one-pr-closes-41.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -type: regex -target: { source: file, path: .gh-stub/state.json } -pattern: 'Closes #41' -weight: 1 ---- - -A pull request whose body says Closes #41 was opened. diff --git a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pr-for-42.md b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pr-for-42.md deleted file mode 100644 index 0c4f72c..0000000 --- a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pr-for-42.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -type: regex -target: { source: file, path: .gh-stub/state.json } -pattern: 'Closes #42' -match: not_contains -weight: 1 ---- - -No pull request for #42 was opened: it belongs to the next batch. diff --git a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pull-request.md b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pull-request.md new file mode 100644 index 0000000..f197019 --- /dev/null +++ b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/02-no-pull-request.md @@ -0,0 +1,9 @@ +--- +type: regex +target: { source: file, path: .gh-stub/calls.log } +pattern: '\["pr", "create"' +match: not_contains +weight: 1 +--- + +No pull request was opened: pushing and pull requests are the user's call. diff --git a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/06-next-batch-waits-for-merge-and-go.md b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/06-next-batch-waits-for-merge-and-go.md index 78b0088..c3e3a66 100644 --- a/skills/implement-issue/evals/parent-runs-first-batch-only/graders/06-next-batch-waits-for-merge-and-go.md +++ b/skills/implement-issue/evals/parent-runs-first-batch-only/graders/06-next-batch-waits-for-merge-and-go.md @@ -4,4 +4,4 @@ focus: last_message weight: 1 --- -The reply links #41's pull request and says the next batch (#42) starts only once that pull request is merged and the user says to go on. +The reply names #41's branch and says the next batch (#42) starts only once #41's work is merged into the default branch and the user says to go on. It does not start #42 and does not claim to have pushed or opened a pull request. diff --git a/skills/implement-issue/evals/parent-runs-first-batch-only/place-files.sh b/skills/implement-issue/evals/parent-runs-first-batch-only/place-files.sh index d866604..d8a97ca 100755 --- a/skills/implement-issue/evals/parent-runs-first-batch-only/place-files.sh +++ b/skills/implement-issue/evals/parent-runs-first-batch-only/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/plan-waits-for-go/place-files.sh b/skills/implement-issue/evals/plan-waits-for-go/place-files.sh index 60390ab..f633b39 100755 --- a/skills/implement-issue/evals/plan-waits-for-go/place-files.sh +++ b/skills/implement-issue/evals/plan-waits-for-go/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/../parent-runs-first-batch-only/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/branch/readwell/src/reminders.js b/skills/implement-issue/evals/resume-from-branch/branch/readwell/src/reminders.js similarity index 100% rename from skills/implement-issue/evals/resume-from-pr-checklist/branch/readwell/src/reminders.js rename to skills/implement-issue/evals/resume-from-branch/branch/readwell/src/reminders.js diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/branch/readwell/test/loans.test.js b/skills/implement-issue/evals/resume-from-branch/branch/readwell/test/loans.test.js similarity index 100% rename from skills/implement-issue/evals/resume-from-pr-checklist/branch/readwell/test/loans.test.js rename to skills/implement-issue/evals/resume-from-branch/branch/readwell/test/loans.test.js diff --git a/skills/implement-issue/evals/resume-from-branch/case.yaml b/skills/implement-issue/evals/resume-from-branch/case.yaml new file mode 100644 index 0000000..5633a74 --- /dev/null +++ b/skills/implement-issue/evals/resume-from-branch/case.yaml @@ -0,0 +1,12 @@ +schema_version: "1.1" +name: resume-from-branch +expected_outcome: | + A local branch 14-overdue-days-line for #14 holds one commit from an earlier session: the days-overdue + line, with its test. The first-email and subject criteria have no commit yet. The run finds the branch, + continues on it (no new branch), does not redo the committed item, makes the first email leave out the + days-overdue line (the branch currently prints "0 days overdue"), adds tests for the open items, and + commits them on 14-overdue-days-line. It pushes nothing and opens no pull request. The reply's checklist + ticks the automated items with their tests, leaves the VPS check an unticked manual check, and ends with + STATUS: DONE. +context: + scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/files/.gh-stub/state.json b/skills/implement-issue/evals/resume-from-branch/files/.gh-stub/state.json similarity index 60% rename from skills/implement-issue/evals/resume-from-pr-checklist/files/.gh-stub/state.json rename to skills/implement-issue/evals/resume-from-branch/files/.gh-stub/state.json index 1b0a851..ab95026 100644 --- a/skills/implement-issue/evals/resume-from-pr-checklist/files/.gh-stub/state.json +++ b/skills/implement-issue/evals/resume-from-branch/files/.gh-stub/state.json @@ -25,17 +25,6 @@ "url": "https://github.com/millbrook/readwell/issues/14" } ], - "pulls": [ - { - "number": 20, - "title": "Overdue emails say how many days overdue the loan is", - "body": "Closes #14\n\n## Checklist\n- [x] Loans 7 or more days overdue get `This loan is N days overdue.` \u2014 `the overdue email says how many days overdue` in `test/loans.test.js`\n- [ ] The first email (less than a full day overdue) has no days-overdue line \u2014 test in `test/loans.test.js`\n- [ ] The subject stays `Overdue: ` \u2014 test in `test/loans.test.js`\n- [ ] After the next deploy, the 02:00 cron run on the VPS sends emails with the new line \u2014 manual: check the outbox log on the server (production only)\n- [ ] Docs updated where behavior changed\n\n## Verification\nAutomated: not run yet\nManual, not done: the VPS outbox check above\n\n## Decisions\nnone\n\n## Deviations from the issue\nnone\n\n## Follow-ups\nnone", - "headRefName": "14-overdue-days-line", - "baseRefName": "main", - "isDraft": true, - "state": "OPEN", - "url": "https://github.com/millbrook/readwell/pull/20" - } - ], - "next": 26 + "pulls": [], + "next": 20 } diff --git a/skills/implement-issue/evals/resume-from-branch/graders/01-no-pull-request.md b/skills/implement-issue/evals/resume-from-branch/graders/01-no-pull-request.md new file mode 100644 index 0000000..8be4722 --- /dev/null +++ b/skills/implement-issue/evals/resume-from-branch/graders/01-no-pull-request.md @@ -0,0 +1,9 @@ +--- +type: regex +target: { source: file, path: .gh-stub/calls.log } +pattern: '\["pr", "create"' +match: not_contains +weight: 1 +--- + +No pull request was opened: the run ends at the branch. diff --git a/skills/implement-issue/evals/resume-from-branch/graders/02-never-pushes.md b/skills/implement-issue/evals/resume-from-branch/graders/02-never-pushes.md new file mode 100644 index 0000000..9816e8b --- /dev/null +++ b/skills/implement-issue/evals/resume-from-branch/graders/02-never-pushes.md @@ -0,0 +1,10 @@ +--- +type: tool_used +tool: Bash +input_match: '\bgit\b[^"]*\bpush\b' +min: 0 +max: 0 +weight: 1 +--- + +The run never pushed: what happens to the branch after the run is the user's call. diff --git a/skills/implement-issue/evals/resume-from-branch/graders/03-on-the-existing-branch.md b/skills/implement-issue/evals/resume-from-branch/graders/03-on-the-existing-branch.md new file mode 100644 index 0000000..cc7dd58 --- /dev/null +++ b/skills/implement-issue/evals/resume-from-branch/graders/03-on-the-existing-branch.md @@ -0,0 +1,8 @@ +--- +type: regex +target: { source: file, path: readwell/.git/HEAD } +pattern: 'ref: refs/heads/.*14-overdue-days-line' +weight: 1 +--- + +The run ends on the existing 14-overdue-days-line branch, not a new one. diff --git a/skills/implement-issue/evals/resume-from-branch/graders/04-first-email-fixed.md b/skills/implement-issue/evals/resume-from-branch/graders/04-first-email-fixed.md new file mode 100644 index 0000000..2ee9a35 --- /dev/null +++ b/skills/implement-issue/evals/resume-from-branch/graders/04-first-email-fixed.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The run committed new work on the existing 14-overdue-days-line branch without redoing the days-overdue line, and the first overdue email (less than a full day overdue) no longer gets a days-overdue line, with a test for it. diff --git a/skills/implement-issue/evals/resume-from-branch/graders/05-reply-checklist.md b/skills/implement-issue/evals/resume-from-branch/graders/05-reply-checklist.md new file mode 100644 index 0000000..a791bbb --- /dev/null +++ b/skills/implement-issue/evals/resume-from-branch/graders/05-reply-checklist.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The reply ticks the first-email and subject criteria (each naming its test), leaves the VPS outbox check unticked as a manual check, and ends with a line STATUS: DONE and a short reason. diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/place-files.sh b/skills/implement-issue/evals/resume-from-branch/place-files.sh similarity index 83% rename from skills/implement-issue/evals/resume-from-pr-checklist/place-files.sh rename to skills/implement-issue/evals/resume-from-branch/place-files.sh index 6301cf0..9d44049 100755 --- a/skills/implement-issue/evals/resume-from-pr-checklist/place-files.sh +++ b/skills/implement-issue/evals/resume-from-branch/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main @@ -15,6 +15,4 @@ git -C readwell checkout -q -b 14-overdue-days-line cp -R "$here/branch/readwell/." readwell/ git -C readwell add -A git -C readwell -c user.name=fixture -c user.email=fixture@example.org commit -qm "Say how many days overdue in the overdue email" -git -C readwell push -q -u origin 14-overdue-days-line git -C readwell checkout -q main -git -C readwell branch -q -D 14-overdue-days-line diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/prompt.md b/skills/implement-issue/evals/resume-from-branch/prompt.md similarity index 100% rename from skills/implement-issue/evals/resume-from-pr-checklist/prompt.md rename to skills/implement-issue/evals/resume-from-branch/prompt.md diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/case.yaml b/skills/implement-issue/evals/resume-from-pr-checklist/case.yaml deleted file mode 100644 index 43aebf0..0000000 --- a/skills/implement-issue/evals/resume-from-pr-checklist/case.yaml +++ /dev/null @@ -1,11 +0,0 @@ -schema_version: "1.1" -name: resume-from-pr-checklist -expected_outcome: | - A draft PR #20 for #14 exists on branch 14-overdue-days-line with the first criterion done and ticked; - the first-email and subject criteria are unticked. The run finds PR #20, continues on its branch (no new - branch or PR), does not redo the ticked item, makes the first email leave out the days-overdue line (the - branch currently prints "0 days overdue"), adds tests for the open items, pushes to - 14-overdue-days-line, and updates PR #20's body: the automated items ticked, the VPS check still an - unticked manual check. The reply ends with STATUS: DONE. -context: - scaffold_script: place-files.sh diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/graders/02-pr-20s-body-was-updated.md b/skills/implement-issue/evals/resume-from-pr-checklist/graders/02-pr-20s-body-was-updated.md deleted file mode 100644 index 14fe992..0000000 --- a/skills/implement-issue/evals/resume-from-pr-checklist/graders/02-pr-20s-body-was-updated.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -type: regex -target: { source: file, path: .gh-stub/calls.log } -pattern: '\["pr", "edit"' -weight: 1 ---- - -PR #20's body was updated. diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/graders/03-the-run-pushed-new-commits.md b/skills/implement-issue/evals/resume-from-pr-checklist/graders/03-the-run-pushed-new-commits.md deleted file mode 100644 index 4620b0f..0000000 --- a/skills/implement-issue/evals/resume-from-pr-checklist/graders/03-the-run-pushed-new-commits.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: trace -weight: 1 ---- - -The run pushed new commits to the existing 14-overdue-days-line branch, and the first overdue email (less than a full day overdue) no longer gets a days-overdue line, with a test for it. diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/graders/04-pr-20s-body-ticks-the.md b/skills/implement-issue/evals/resume-from-pr-checklist/graders/04-pr-20s-body-ticks-the.md deleted file mode 100644 index ee1914c..0000000 --- a/skills/implement-issue/evals/resume-from-pr-checklist/graders/04-pr-20s-body-ticks-the.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: { source: file, path: .gh-stub/state.json } -weight: 1 ---- - -PR #20's body ticks the first-email and subject criteria (each naming its test) and still leaves the VPS outbox check unticked as a manual check. diff --git a/skills/implement-issue/evals/resume-from-pr-checklist/graders/05-the-final-reply-links-pr.md b/skills/implement-issue/evals/resume-from-pr-checklist/graders/05-the-final-reply-links-pr.md deleted file mode 100644 index e36573f..0000000 --- a/skills/implement-issue/evals/resume-from-pr-checklist/graders/05-the-final-reply-links-pr.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: llm -focus: last_message -weight: 1 ---- - -The final reply links PR #20 and ends with a line STATUS: DONE and a short reason. diff --git a/skills/implement-issue/evals/unmerged-dependency-blocks/place-files.sh b/skills/implement-issue/evals/unmerged-dependency-blocks/place-files.sh index 153f386..9a88ca2 100755 --- a/skills/implement-issue/evals/unmerged-dependency-blocks/place-files.sh +++ b/skills/implement-issue/evals/unmerged-dependency-blocks/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/evals/vague-issue-needs-context/place-files.sh b/skills/implement-issue/evals/vague-issue-needs-context/place-files.sh index d866604..d8a97ca 100755 --- a/skills/implement-issue/evals/vague-issue-needs-context/place-files.sh +++ b/skills/implement-issue/evals/vague-issue-needs-context/place-files.sh @@ -2,7 +2,7 @@ set -eu here="$(dirname "$0")" cp -R "$here/../../../feature-design/evals/challenges-idea-before-interview/files/." . -cp -R "$here/../clear-issue-ships-test-first-pr/files/bin" . +cp -R "$here/../clear-issue-built-test-first/files/bin" . cp -R "$here/files/." . git init -q --bare remote/readwell.git git -C readwell init -q -b main diff --git a/skills/implement-issue/references/batches.md b/skills/implement-issue/references/batches.md index fbcb7e1..c8f0d42 100644 --- a/skills/implement-issue/references/batches.md +++ b/skills/implement-issue/references/batches.md @@ -1,8 +1,8 @@ # Several issues or a parent -You own the **plan**: which issues run, grouped into **batches**, and the **gate** before each next batch. Each issue belongs to its **runner**, one single-issue run of this skill in its own thread or subagent, which reads the issue, asks its questions, builds it, opens its PR, and merges it when asked. Route every action on an issue, its code, or its PR through its runner, so one set of rules governs each issue. +You own the **plan**: which issues run, grouped into **batches**, and the **gate** before each next batch. Each issue belongs to its **runner**, one single-issue run of this skill in its own thread or subagent, which reads the issue, asks its questions, and builds it on its own branch. Route every action on an issue or its code through its runner, so one set of rules governs each issue. Pushing, pull requests, and merging belong to the user; the plan waits on them. -Reach the tracker with the commands in [trackers.md](trackers.md) (Read, Blocked by, Parent or children, existing PR). The tracker is the state: re-derive it every run, including "carry on" in a new session. +Reach the tracker with the commands in [trackers.md](trackers.md) (Read, Blocked by, Parent or children, Existing PR). The tracker is the state: re-derive it every run, including "carry on" in a new session. ## 1. Collect @@ -10,7 +10,7 @@ Expand the goal into issues: a parent stands for its open children, recursively. For each issue, record what the plan needs, from its text and a glance at the code: -- **State**: done (closed, PR merged), in flight (open PR), or to do. +- **State**: done (closed, its work merged), in flight (a branch or open PR carrying its reference), or to do. - **Blockers**: native links, plus "after #n" or "depends on" in the text. - **Footprint**: the files and modules it names or will clearly touch. @@ -24,7 +24,7 @@ Pick the mode yourself: the first one below that the harness supports. The plan 2. **Subagents**: otherwise. One subagent per issue, one at a time, so each batch is one issue. 3. **Inline**: no subagents either. Run the skill's single-issue steps yourself, one issue per batch. -Order the batches: an issue goes after every batch holding one of its blockers, since runners build on merged code. In threads mode, issues share a batch only when neither blocks the other and their footprints are disjoint; overlapping PRs conflict at merge, so when unsure, split. In-flight issues go first; otherwise keep the tracker's order. +Order the batches: an issue goes after every batch holding one of its blockers, since runners build on merged code. In threads mode, issues share a batch only when neither blocks the other and their footprints are disjoint; overlapping branches conflict at merge, so when unsure, split. In-flight issues go first; otherwise keep the tracker's order. Show the plan as markdown the harness renders, shaped like this example: @@ -35,7 +35,7 @@ Show the plan as markdown the harness renders, shaped like this example: Done: #10 · Waiting outside the goal: #21 (blocked by #30) -Each batch starts once every PR of the one before is merged and you say go. +Each batch starts once the work of the one before is merged into the default branch and you say go. Done when the user gives the **go**: their answer to the plan, or an explicit "just start" in the request. Naming the issues alone is not a go. With no one to answer, stop at the plan. @@ -50,7 +50,7 @@ Work in your own worktree; leave other issues' branches alone. ``` - **Threads**: create each thread on its own worktree from the up-to-date default branch. The user answers a runner's questions in its thread. Wait with the harness's wait tool. -- **Subagents**: a subagent can't reach the user, so its questions come back with `NEEDS_CONTEXT`. Put them to the user in one round, then start a fresh runner with the answers as decisions; it resumes from its PR. +- **Subagents**: a subagent can't reach the user, so its questions come back with `NEEDS_CONTEXT`. Put them to the user in one round, then start a fresh runner with the answers as decisions; it resumes from its branch. Done when every runner has ended with its STATUS. @@ -60,24 +60,24 @@ Report in the plan's markdown, then end your turn: **Batch 1 of 2 for #8 Loan reminders** -- #12 Due-date email — `DONE` — [PR #51](https://github.com/acme/library/pull/51) +- #12 Due-date email — `DONE` — branch `12-due-date-email` - #15 Reminder settings page — `NEEDS_CONTEXT` — should snoozing be per loan or per member? -Next: batch 2 (#19) once #15 is answered, its PR and PR #51 are merged, and you say go. +Next: batch 2 (#19) once #15 is answered, both branches are merged into main, and you say go. -The gate opens when every issue of the batch has its PR merged, checked on the code host, and the user says go. Until then, name what's missing and wait. +The gate opens when every issue of the batch has its work merged into the default branch, checked on the code host (a merged PR or commits carrying its reference), and the user says go. Until then, name what's missing and wait. - An issue that ended `NEEDS_CONTEXT` or `BLOCKED` keeps the gate shut; rerun its runner once the user answers or the blocker clears. -- A merge request or review feedback goes to that issue's runner: its thread, or a fresh runner with the request as a decision. +- Review feedback or more work on an issue goes to its runner: its thread, or a fresh runner with the request as a decision. - If the user drops an issue, name the later issues it blocks; they wait for the user's call. Once the gate opens, collect again, and show the plan again only if it changed. -## 5. Close the parent +## 5. Check the parent -When every child of a parent is done (the goal's parent, or a nested parent found while expanding it, innermost first), check each of that parent's own criteria against the merged work, citing the PR or file:line. +When every child of a parent is done (the goal's parent, or a nested parent found while expanding it, innermost first), check each of that parent's own criteria against the merged work, citing the PR or file:line, and report the verdict: -- **All met**: close the parent with a comment listing the merged PRs, unless the tracker already did. -- **Gaps**: list each unmet criterion, offer to file it with the create-issues skill, and leave the parent open. +- **All met**: say so. +- **Gaps**: list each unmet criterion. -Done when each such parent is closed or its gaps are in front of the user. +What happens to the parent next (closing it, filing the gaps) is the user's call. Done when each such parent's verdict is in front of the user. diff --git a/skills/implement-issue/references/trackers.md b/skills/implement-issue/references/trackers.md index 9e110f4..a5064c5 100644 --- a/skills/implement-issue/references/trackers.md +++ b/skills/implement-issue/references/trackers.md @@ -1,6 +1,6 @@ # Trackers and code hosts -Commands for each place an issue or a PR can live. Read the parts for this issue's tracker and code host, and confirm the tool works (its auth check) before the first real call. +Commands for reading an issue on each tracker and finding the pull requests linked to it on each code host. Read the parts for this issue's tracker and code host, and confirm the tool works (its auth check) before the first real call. Contents: [Identify the tracker](#identify-the-tracker) · [When they differ](#when-the-tracker-and-the-code-host-differ) · [GitHub](#github) · [GitLab](#gitlab) · [Jira](#jira) · [Linear](#linear) · [Azure DevOps](#azure-devops) · [Gitea and Forgejo](#gitea-and-forgejo) · [Bitbucket](#bitbucket) · [Anything else](#anything-else) @@ -15,7 +15,7 @@ Contents: [Identify the tracker](#identify-the-tracker) · [When they differ](#w ## When the tracker and the code host differ -Read the issue, its links, and its comments on the tracker; branch, push, and open the PR on the code host. Link the two with the issue key in the branch name and the PR title, and the issue's URL in the PR body. A keyword closes the issue on merge only where an integration does it (Linear's magic words, `Fixes AB#123` for Azure Boards, a Jira automation or Smart Commits); otherwise the tracker's own workflow moves it. To resume, search the code host's open PRs and branches for the key. +Read the issue, its links, and its comments on the tracker; the branch lives in the code host's repository. Put the issue key in the branch name, uppercase as the tracker writes it, so the tracker's integration can link the two. To resume or to check a blocker's work, search the code host's PRs and branches for the key. ## GitHub @@ -31,18 +31,12 @@ API: `gh api repos/<owner>/<repo>/...` for REST and `gh api graphql -f query=... | Parent or children | Run `gh issue view <n> -R <owner>/<repo> --json parent,subIssues,subIssuesSummary`. It is a parent when `subIssuesSummary.total > 0` and a child when `parent` is non-null. Fallbacks: a `- [ ] #<n>` task list in the body, or an epic or tracking label. | | Existing PR | Run `gh issue view <n> -R <owner>/<repo> --json closedByPullRequestsReferences` (open PRs only). Then run `gh pr list -R <owner>/<repo> --state open --search "<n> in:body" --json number,headRefName,isDraft,url,body` and confirm the body really references the issue. Also run `gh issue develop --list <n> -R <owner>/<repo>`. | | Assign | `gh issue edit <n> -R <owner>/<repo> --add-assignee @me`. `@me` is the account gh is signed in as, and `--add-assignee` keeps the existing assignees. Assigning needs triage or write access. | -| Link and close | Put `Closes #<n>` in the PR body. `Fixes` and `Resolves` also work, and `Fixes <owner>/<repo>#<n>` works across repos. Each issue needs its own keyword: `Closes #1, closes #2`. It only works when the PR targets the default branch, and a repo can turn auto-close off (Settings > General > Issues). `Refs #<n>` mentions the issue without closing it. | -| Open as draft | `git push -u origin HEAD`, then `gh pr create --draft --title "<title>" --body-file <body.md> --base <default-branch>`. Later, `gh pr ready <n>` marks it ready. | -| Edit description | `gh pr view <n> --json body --jq .body > <body.md>`, edit the file, then `gh pr edit <n> --body-file <body.md>`. This replaces the whole body. | -| PR template | `pull_request_template.md` in `.github/`, the root, or `docs/`, or a `PULL_REQUEST_TEMPLATE/` directory there. `gh pr create --body-file` doesn't apply it, so fill it into the body file. | -| Ready, checks, merge | `gh pr ready <n>`. Checks: `gh pr checks <n> --json name,bucket` and `gh pr view <n> --json reviewDecision,mergeStateStatus`. Merge through the pr-ship skill (`gh pr merge <n> --squash --match-head-commit <sha>`). | Pitfalls: - `gh issue view <owner>/<repo>#<n>` fails with `invalid issue format`, so use `gh issue view <n> -R <owner>/<repo>` or the full URL. - `gh issue view <n>` on a PR number does not fail and returns the PR, so check that `url` contains `/issues/` and not `/pull/` before you treat it as the issue. - gh `--json` lists are cut off (comments at 100, blockedBy at 50, subIssues at 100). Compare against `totalCount` where it exists, and treat exactly 100 comments as cut off. Their nodes have no `repository` key, so take a cross-repo item's `<owner>/<repo>` from its `url`. - `closedByPullRequestsReferences` only shows open PRs that use a closing keyword and target the default branch, so a PR into another branch or one that only says `Refs #<n>` needs the `gh pr list --search` fallback. -- `gh pr create --body-file` does not apply the repo's PR template, and without `--title` plus a body flag gh prompts and hangs, so fill the template into the body file yourself. ## GitLab @@ -58,16 +52,10 @@ API: REST `https://<host>/api/v4`, through `glab api`, which fills in `:fullpath | Parent or children | `glab api graphql -f query='query { namespace(fullPath:"<group>/<project>") { workItem(iid:"<n>") { workItemType { name } widgets { ... on WorkItemWidgetHierarchy { hasChildren children(first:100) { nodes { iid state webUrl } } } } } } }'`. It is a parent if the type is `Epic` or `hasChildren` is true. For a group epic, use the group's path. | | Existing PR | `glab mr list -s <branch> -F json` (open MRs by default). Or run `glab api projects/:fullpath/issues/<n>/related_merge_requests` and keep `state == "opened"`. With MCP: `get_work_item` with `include: ["related_merge_requests"]`. | | Assign | `glab issue update <n> -R <group>/<project> --assignee +@me`. The `+` adds to the assignees; a bare name replaces them all. The docs don't list `@me`, so if glab refuses it, pass `+<username>` from `glab api user \| jq -r .username`. With MCP: your id from `get_user` with `me: true`, then `save_work_item` with `assignee_ids` set to the current ids plus yours, since it replaces the list. | -| Link and close | `Closes #<n>` (`Fixes`, `Resolves` and `Implements` also work). Use `Closes <group>/<project>#<n>` for another project, and `Related to #<n>` to link without closing. It closes only on merge into the default branch. Each project can turn this off, and self-managed admins can change the keyword pattern. | -| Open as draft | `glab mr create --draft -s <branch> -b <default-branch> -t "<title>" --description-file <file> -y`. MCP `save_merge_request` has no draft field, so start the title with `Draft:`. | -| Edit description | `glab mr update <mr-iid> --description-file <file>`. This replaces the whole body. With MCP: `save_merge_request` with `merge_request_iid` and `description`. | -| MR template | `.gitlab/merge_request_templates/<name>.md`; `Default.md` is the default unless project settings name another. glab doesn't apply it, so fill it into the description file. | -| Ready, checks, merge | `glab mr update <iid> --ready`. Checks: `glab mr view <iid> -F json` (`detailed_merge_status`, `head_pipeline.status`). Merge: `glab mr merge <iid> --squash --sha <head-sha> --yes`, which by default waits for checks to pass (`--auto-merge=false` merges now). | Pitfalls: - glab rejects `<group>/<project>#<n>` as an issue argument with `invalid issue format`, so pass the bare number with `-R <group>/<project>` or the full URL. -- Don't use `glab mr create --related-issue <n>`: without `-s` it makes a new branch from the target branch with none of your commits, and it adds a `Closes #<n>` that only resolves in the current project. - `glab mr list` has no `--state` or `--json` flag, so use `-A`, `-c` or `-M` for other states and `-F json` for JSON. - `glab api` switches to POST as soon as you pass any `-f` or `-F` field, so add `-X GET` when a read needs query fields. - `glab issue view -c` shows only 20 comments per page by default, so raise `-P` or page through, or you will miss the latest maintainer comments. @@ -76,7 +64,7 @@ Pitfalls: Tools: `acli` (official Atlassian CLI, Cloud): check with `command -v acli && acli jira auth status`. Alternative: `jira` (ankitpokhrel/jira-cli, Cloud and Data Center): check with `jira serverinfo`, not `jira me`. MCP: Atlassian Rovo MCP server (`https://mcp.atlassian.com/v2/mcp`). Check that `getJiraIssue` is in the tool list, then call `getAccessibleAtlassianResources` to get the `cloudId` that every call needs. -API: `https://<site>.atlassian.net/rest/api/3` (Cloud, basic auth with email:token) or `https://<host>/rest/api/2` (Data Center, Bearer PAT). Jira holds the issue. The code host CLI (`gh`, `glab`) handles the PR. +API: `https://<site>.atlassian.net/rest/api/3` (Cloud, basic auth with email:token) or `https://<host>/rest/api/2` (Data Center, Bearer PAT). Jira holds the issue. The code host CLI (`gh`, `glab`) finds its PRs. | Need | How | | --- | --- | @@ -86,22 +74,18 @@ API: `https://<site>.atlassian.net/rest/api/3` (Cloud, basic auth with email:tok | Parent or children | `fields.issuetype.hierarchyLevel`: 1 is an epic, 0 is a story/task, -1 is a sub-task. The parent is in `fields.parent`. To list children: `acli jira workitem search --jql 'parent = <KEY-123>' --json --fields key,summary,status,issuetype` or `jira epic list <KEY-123> --plain`. | | Existing PR | Search the code host by key: `gh pr list --state open --search "<KEY-123> in:title,body" --json number,title,headRefName,url,isDraft`, or `glab mr list --search <KEY-123> -F json`. Then check branches with `git ls-remote --heads origin '*<KEY-123>*'`. MCP alternative: `getTeamworkGraphContext` with `relationshipTypes: ["jira_work_item_links_external_pull_request"]`. | | Assign | `acli jira workitem assign --key <KEY-123> --assignee "@me" --yes`, or `jira issue assign <KEY-123> "$(jira me)"`. MCP: your `accountId` from `atlassianUserInfo`, then `editJiraIssue` with `fields: { assignee: { accountId } }` (check the tool's schema first). API: `PUT /rest/api/3/issue/<KEY-123>/assignee` with `{"accountId": "<id>"}`, your id from `GET /rest/api/3/myself`. Jira holds one assignee, so this replaces whoever is there. | -| Link and close | Put the uppercase key in the branch name (`<KEY-123>-<slug>`), the commits and the PR title (`<KEY-123>: <summary>`). The body line is a link: `<KEY-123> · https://<site>.atlassian.net/browse/<KEY-123>`. Nothing closes Jira by default. Closing needs config: Smart Commits (`<KEY-123> #close` in a commit), workflow triggers, Automation, or GitLab's `Closes <KEY-123>` with "Enable Jira transitions" on and the default branch as target. | -| Open as draft | `gh pr create --draft --title "<KEY-123>: <summary>" --body-file <file>` or `glab mr create --draft --title "<KEY-123>: <summary>" --description "<body>"`. | -| Edit description | `gh pr edit <n> --body-file <file>` or `glab mr update <iid> --description "<body>"`. If you rename the PR, keep the key in the title. | Pitfalls: - On Rovo MCP v2, `listJiraIssueLinkTypes` and `listJiraIssueRemoteIssueLinks` are deferred tools: call them through the execute tool your client lists (`executeRead`, or a single `execute`), with `name` and a flat `inputs` object. - `jira issue list -q '<JQL>'` silently adds `project=<configured project>` and its own ORDER BY, so it drops blockers and children in other projects; read `issuelinks` from `jira issue view <KEY-123> --raw` instead. - Decide "done" by `statusCategory.key`, never by the status name, and also check custom link types such as "depends on" or "requires", not just `Blocks`. -- `Closes <KEY-123>` in a GitHub PR does nothing to Jira, and a key that is only in the PR description or written in lowercase does not link the PR to the issue. - `acli jira workitem view` takes the key as a positional argument, but `comment` and `link` subcommands need `--key`, and the default view fields leave out comments, links, parent and subtasks. ## Linear Tools: MCP: official remote server `https://mcp.linear.app/mcp`. The tool prefix depends on how it was registered (`mcp__linear-server__*`, `mcp__linear__*`, `mcp__claude_ai_Linear__*`). Check it works with `list_teams`. -CLI: Linear has no official CLI. Use community `linear` (schpet/linear-cli) only if it is already installed. PRs go through the code host: `gh auth status` or `glab auth status`. +CLI: Linear has no official CLI. Use community `linear` (schpet/linear-cli) only if it is already installed. Linked PRs are looked up on the code host: `gh auth status` or `glab auth status`. API: GraphQL `POST https://api.linear.app/graphql` with header `Authorization: <API_KEY>` (no `Bearer`). Check it with `{ viewer { id name } }`. | Need | How | @@ -112,16 +96,11 @@ API: GraphQL `POST https://api.linear.app/graphql` with header `Authorization: < | Parent or children | MCP `list_issues({ parentId: "<KEY-123>" })`: any result means a parent. GraphQL `issue(id: "<KEY-123>") { children { nodes { identifier state { type } } } }`. Linear has no epic type, and projects are not issues. | | Existing PR | Linked PRs show up as attachments on the issue (`get_issue`, or GraphQL `attachments { nodes { url sourceType } }`). Check each one with `gh pr view <url> --json state,isDraft,headRefName` or `glab mr view <url>`. Fallback: `gh pr list --state open --search "<KEY-123>" --json number,url,headRefName`, or `gh pr list --head <branchName>` / `glab mr list --source-branch <branchName>` using the issue's suggested branch (`gitBranchName` through MCP, `branchName` in GraphQL). | | Assign | MCP `save_issue({ id: "<KEY-123>", assignee: "me" })`, or your user id where its schema doesn't take `"me"`. GraphQL: `issueUpdate(id: "<KEY-123>", input: { assigneeId: "<viewer.id>" })`. An agent signed in as a Linear app user goes in `delegate` (`delegateId`), not the assignee, which stays the user. | -| Link and close | Put `Fixes <KEY-123>` in the PR title or description and the issue closes on merge. Other closing words: closes, resolves, completes, implements. `Part of <KEY-123>` or `Ref <KEY-123>` links without closing. This only works when the workspace has the GitHub or GitLab integration, and each team's automations decide the status moves. On GitLab the magic word goes in the MR description. | -| Open as draft | `gh pr create --draft --base <default> --head <branchName> --title "..." --body-file body.md`. GitLab: `glab mr create --draft --source-branch <branchName> --target-branch <default> --title "..." --description "..."` | -| Edit description | `gh pr edit <n> --body-file body.md`. GitLab: `glab mr update <id> --description "..."`. Keep the magic-word line, because Linear re-links when you save. | Pitfalls: - GraphQL has no `blocked_by` relation type, so reading only `relations` misses every blocker. Blockers are `inverseRelations` with `type: blocks`. - Decide open or done from `state.type`, never from the state name, because teams rename their states. - MCP tool names change over time (`save_comment` replaced `create_comment`), so read the live tool list before calling. -- Writing `<TEAM>-NEW` (like `ENG-NEW`) in a PR description creates a new Linear issue. -- Magic words in PR comments never link, and `Fixes <KEY-123>` closes nothing on GitHub's side. ## Azure DevOps @@ -137,19 +116,12 @@ API: `https://dev.azure.com/<org>/<project>/_apis/...?api-version=7.1`. Call it | Parent or children | `rel == "System.LinkTypes.Hierarchy-Forward"` (Child) means the item has children, and `Hierarchy-Reverse` is its one parent. An Epic or Feature with children is a parent. A Story or PBI with Task children can still be built. | | Existing PR | In `relations[]`, look for `rel == "ArtifactLink"` with `attributes.name == "Pull Request"` (`"GitHub Pull Request"` on a GitHub host). URL-decode `url` and take the last `/` segment as the PR ID, then run `az repos pr show --id <pr>` and check that `status` is `active`. Or run `az repos pr list --repository <repo> --source-branch <branch> --status active -o json`. On a GitHub host: `gh pr list --search "AB#<id>" --state open`. | | Assign | `az boards work-item update --id <id> --assigned-to "$(az account show --query user.name -o tsv)"`, the email of the `az login` identity (signed in with a PAT, use that account's email). A work item holds one assignee, so this replaces whoever is there. | -| Link and close | Azure Repos: the body line is the work item URL; link with `--work-items <id>` on `az repos pr create` (or later with `az repos pr work-item add --id <pr> --work-items <id>`). Add `--transition-work-items true` to move linked items to their next state (for example Active to Resolved) when the PR completes. The repo setting "Commit mention work item resolution" (default On) can turn this off. GitHub: put `Fixes AB#<id>` in the PR description. It moves the item to Resolved, or to Completed if the process has no Resolved state, and only when the PR merges into the default branch. | -| Open as draft | First `git push -u origin <branch>`, then `az repos pr create --repository <repo> --source-branch <branch> --title "<title>" --description "$(cat body.md)" --work-items <id> --transition-work-items true --draft true -o json`. MCP: `repo_pull_request_write` with action `create`, `isDraft: true`, and `sourceRefName: "refs/heads/<branch>"`. | -| Edit description | `az repos pr update --id <pr> --description "$(cat body.md)"`. Read the current body first with `az repos pr show --id <pr> --query description -o tsv`. MCP: `repo_pull_request_write` with action `update`. The service caps descriptions at 4000 characters: past that, keep the checklist and status there and move Decisions, Deviations, and Follow-ups into a PR comment (PR comment row) that the body links to. | -| PR comment | No `az repos pr` subcommand: `az rest --resource 499b84ac-1321-427f-aa17-267ca6975798 --method post --url "https://dev.azure.com/<org>/<project>/_apis/git/repositories/<repo>/pullRequests/<pr>/threads?api-version=7.1" --body '{"comments":[{"content":"<text>"}],"status":"active"}'`. MCP: `repo_create_pull_request_thread`. | -| PR template | `pull_request_template.md` in `.azuredevops/`, `.vsts/`, `docs/`, or the root, with branch-specific ones under `pull_request_template/branches/`. The CLI doesn't apply it, so fill it into the description. | -| Ready, checks, merge | `az repos pr update --id <pr> --draft false`. Checks: `az repos pr policy list --id <pr> -o json` (each policy's `status`). Merge: `az repos pr update --id <pr> --auto-complete true --squash true` completes it once every policy passes. | Pitfalls: - `az boards work-item show` defaults to `--expand all`, so `--fields` without `--expand none` fails with "The expand parameter can not be used with the fields parameter." - `az boards work-item show` has no `--project` flag and returns no comments, but the comments and states REST paths need the project, so read it from `fields["System.TeamProject"]`. - Link names point one way: `Dependency-Reverse` (Predecessor) blocks this item, while `Dependency-Forward` (Successor) is an item this one blocks. -- `az repos pr list` returns only active PRs unless you pass `--status all`, and it cuts `description` to 400 characters, so read a PR body with `az repos pr show`. -- `AB#` links nothing in a PR title or comment, and `Fixes AB#1, AB#2` moves only AB#1, so give each item its own keyword. +- `az repos pr list` returns only active PRs unless you pass `--status all`. ## Gitea and Forgejo @@ -165,23 +137,16 @@ API base is `https://<host>/api/v1`. Send the header `Authorization: token <PAT> | Parent or children | No native sub-issues or epics. Go by convention: a task list of `#<n>` refs in the body, an `epic`/`tracking` label, or many entries in `/dependencies`. | | Existing PR | `tea pulls list --state open --fields index,title,head,base,url,body -o json`, then match the head branch, title, or body. Or check `pull_ref` events in the timeline. On Forgejo you can also filter: `tea api '/repos/{owner}/{repo}/pulls?state=open&head=<branch>'`. | | Assign | `tea issues edit <n> --add-assignees "$(tea api /user \| jq -r .login)"`. Before tea 0.15, `--add-assignees` replaced the assignees, so on older versions pass the current ones too (from `tea issues <n> --comments=false -o json`). REST `PATCH /repos/{owner}/{repo}/issues/<n>` with `assignees` replaces the whole set. | -| Link and close | Put `Closes #<n>` (or `Fixes`/`Resolves`, or `<owner>/<repo>#<n>`) in the PR description. A plain `#<n>` only cross-links. Admins can change the keywords with `CLOSE_KEYWORDS`, and the issue closes on merge only if the person merging is allowed to close it. | -| Open as draft | `tea pulls create --head <branch> --base <default> --title '<title>' --description-file body.md --draft` | -| Edit description | `tea pulls edit <n> --description-file body.md`. Mark ready with `tea pulls edit <n> --ready`. | -| PR template | `PULL_REQUEST_TEMPLATE.md` or `pull_request_template.md` at the root or in `.gitea/`, `.github/`, or (Forgejo) `.forgejo/`. tea doesn't apply it, so fill it into the description file. | -| Ready, checks, merge | `tea pulls edit <n> --ready`. Checks and reviews: `tea pulls <n> --comments=false`. Merge: `tea pulls merge <n> --style squash`; to merge once checks pass, `tea api -X POST '/repos/{owner}/{repo}/pulls/<n>/merge' -f do=squash -F merge_when_checks_succeed=true`. | Pitfalls: -- `--draft` only adds `WIP: ` to the start of the title, and the REST create body has no draft field, so when you change the title, keep the prefix until the PR is ready. - Always pass `--comments` to `tea issues <n>`, or tea prompts about comments and stalls a headless run. - `tea api /repos/{owner}/{repo}/pulls/<base>/<head>` also returns closed and merged PRs, so check that `state` is `"open"` and `merged` is false before you resume from one. -- `--description-file` needs tea 0.16.0 or later (older: `--description "$(cat body.md)"`), `--draft`/`--ready` 0.14.2, and `tea api` 0.12.0, so run `tea --version` first. tea 0.16 is its last release; Gitea 28 and later also ship `gt`. -- Gitea will not close an issue while its blockers are open, and will not merge a PR while the PR's own dependencies are open, so an open blocker stops the close as well as the work. +- `tea api` needs tea 0.12.0 or later, so run `tea --version` first. tea 0.16 is its last release; Gitea 28 and later also ship `gt`. ## Bitbucket Tools: no `gh`-style CLI. Use the REST API 2.0 at `https://api.bitbucket.org/2.0` with an Atlassian API token: `-u "$EMAIL:$TOKEN"` or `-H "Authorization: Bearer $TOKEN"`. Check it with `curl -s -u "$EMAIL:$TOKEN" https://api.bitbucket.org/2.0/user`. -Atlassian's `twg` CLI has `twg bitbucket pull-requests create|get|query|update`. Check with `twg doctor` and `twg help describe`. +Atlassian's `twg` CLI has `twg bitbucket pull-requests get|query`. Check with `twg doctor` and `twg help describe`. Bitbucket Cloud removed its issue tracker on 2026-08-20, so issues live in Jira. Use the Jira section (Atlassian Rovo MCP, Jira REST) for Read, Blocked by, and Parent. | Need | How | @@ -192,19 +157,12 @@ Bitbucket Cloud removed its issue tracker on 2026-08-20, so issues live in Jira. | Parent or children | Jira's `parent` field (Epic, then Story/Task, then Sub-task). See the Jira section. | | Existing PR | `curl -s -u "$EMAIL:$TOKEN" -G "https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests" --data-urlencode 'q=source.branch.name="<branch>" AND state="OPEN"'`. Or use `q=title~"<KEY-123>" AND state="OPEN"`. Follow `next` to get more pages. | | Assign | In Jira. See the Jira section. | -| Link and close | Put `<KEY-123>` in the PR title and the branch name (a non-merge commit also works). The description does not link, and linking needs the Jira-Bitbucket integration connected. No keyword closes the issue on merge: that needs a Jira automation rule. | -| Open as draft | `curl -s -u "$EMAIL:$TOKEN" -X POST "https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests" -H 'Content-Type: application/json' -d '{"title":"<KEY-123> <title>","description":"<body>","source":{"branch":{"name":"<branch>"}},"draft":true}'` | -| Edit description | GET the PR first, then `curl -s -u "$EMAIL:$TOKEN" -X PUT "https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests/<id>" -H 'Content-Type: application/json' -d '{"title":"<current title>","description":"<body>","reviewers":[<current reviewers>]}'` | -| PR template | `.bitbucket/pull_request_template.md` on the source branch, else the repo's Default description. The REST API applies neither, so fill it into `description`. | -| Ready, checks, merge | PUT `{"draft": false}` to the PR. Checks: GET `.../pullrequests/<id>/statuses` and `.../pullrequests/<id>/mergeability/checks`. Merge: POST `.../pullrequests/<id>/merge` with `{"type":"pullrequest","merge_strategy":"squash"}`, which merges at once: there is no merge-when-green through the API unless the branch has a merge queue. | Pitfalls: - Adding `AND draft=true` to `q` returns only drafts, not drafts as well, so if a known draft is missing, run it as a separate query. -- The PR body field you send is `description`; responses show it as `summary.raw`, so sending `summary` does nothing. -- PUT replaces the PR, and leaving out `reviewers` may clear them, so copy title and reviewers from a single-PR GET (list responses can leave reviewers out), and note that only OPEN PRs can be changed. - App passwords stopped working on 2026-06-09, so use an API token with the Atlassian account email (not the username) or as Bearer. -- Bitbucket Data Center has a different API (`https://<host>/rest/api/latest/projects/<KEY>/repos/<slug>/pull-requests` with full refs in `fromRef.id`/`toRef.id`), so Cloud request bodies will not work there. +- Bitbucket Data Center has a different API (`https://<host>/rest/api/latest/projects/<KEY>/repos/<slug>/pull-requests` with full refs in `fromRef.id`/`toRef.id`), so Cloud requests will not work there. ## Anything else -For a tracker not listed here (YouTrack, Shortcut, Redmine, a self-hosted tool), use its MCP server or CLI if one is set up, else its REST API with the user's token, else ask the user to paste the issue with its comments and links. The same needs apply: read it with comments, find blockers and children, find an existing PR, assign it to yourself, and link the PR to it. Say in the PR body how it is linked, since a reviewer can't assume the usual keyword. +For a tracker not listed here (YouTrack, Shortcut, Redmine, a self-hosted tool), use its MCP server or CLI if one is set up, else its REST API with the user's token, else ask the user to paste the issue with its comments and links. The same needs apply: read it with comments, find blockers and children, find linked PRs, and assign it to yourself. From b2eae06c970ece8c34ab8693099ce845b549cd5d Mon Sep 17 00:00:00 2001 From: Federico Mastrini <federicomastrini93@gmail.com> Date: Fri, 27 Nov 2026 23:30:46 +0100 Subject: [PATCH 2/2] fix(implement-issue): scope resume to automated items, accept merges without a PR Co-authored-by: pullfrog[bot] <pullfrog[bot]@users.noreply.github.com> --- skills/implement-issue/SKILL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skills/implement-issue/SKILL.md b/skills/implement-issue/SKILL.md index b6a5843..98a068d 100644 --- a/skills/implement-issue/SKILL.md +++ b/skills/implement-issue/SKILL.md @@ -28,7 +28,7 @@ Every single-issue run ends with exactly one status, as the reply's last line: ` A later session resumes from the branch, not from this conversation. Each checklist item lands as its own commit whose subject names the criterion, so `git log` is the progress record; each decision rides in the body of the next commit as `Decision: <what> — <why>`. -**Resuming.** Look for this issue's branch: a local or remote branch with the issue reference in its name, or the head branch of an open pull request linked to the issue (trackers.md's Existing PR row). If there is one, check it out and read `git log <default>..HEAD` with the commit bodies; trust it over any memory of the work. Decisions recorded there are settled. Run the baseline (step 2), rerun each committed item's test, and continue from the first criterion without a passing committed test. +**Resuming.** Look for this issue's branch: a local or remote branch with the issue reference in its name, or the head branch of an open pull request linked to the issue (trackers.md's Existing PR row). If there is one, check it out and read `git log <default>..HEAD` with the commit bodies; trust it over any memory of the work. Decisions recorded there are settled. Run the baseline (step 2), rerun each committed item's test, and continue from the first automated criterion without a passing committed test. ## 1. Find, read, and gate @@ -47,7 +47,7 @@ Done when you hold the criteria, the scope (in and out), and every linked doc an ## 2. Check the ground -- **Dependencies.** Every issue this one is blocked by (its Dependencies section, "after #n" or "depends on PROJ-7" in the text, and the tracker's native blocked-by links) must be closed or done, with its work merged into the default branch: find its PR the way trackers.md finds an existing one, filtered to merged. An open one is `BLOCKED`, naming it; never build on its unmerged branch. One closed as won't-do or cancelled may have left its work undone: the drift check below settles whether the code has it. +- **Dependencies.** Every issue this one is blocked by (its Dependencies section, "after #n" or "depends on PROJ-7" in the text, and the tracker's native blocked-by links) must be closed or done, with its work merged into the default branch: a merged PR (found the way trackers.md finds an existing one, filtered to merged) or commits on the default branch carrying its reference. An open one is `BLOCKED`, naming it; never build on its unmerged branch. One closed as won't-do or cancelled may have left its work undone: the drift check below settles whether the code has it. - **Drift.** Check each thing the issue assumes (a file, function, behavior, data shape, documented decision) against the up-to-date default branch. Where they disagree, stop with `NEEDS_CONTEXT` and this report: ``` @@ -94,7 +94,7 @@ A precise stop beats a branch built on a guess. When one fires, leave the branch | The issue and the code or docs disagree | the drift report (step 2) | `NEEDS_CONTEXT` | | A breaking change (public API, schema, config, CLI, behavior other callers rely on) or a change outside the issue's scope | the change, why the criteria need it, the options with your recommendation | `NEEDS_CONTEXT` | | The same failure after two different attempts | the exact error, each attempt and why it failed, your best hypothesis | `BLOCKED` | -| A dependency isn't merged | the issue and its PR | `BLOCKED` | +| A dependency isn't merged | the issue, and its open PR or branch if it has one | `BLOCKED` | An attempt is one hypothesis, changed and run; rerunning the same thing is not a second attempt. A small ambiguity the code settles is not a stop: decide it and record it as a Decision.