agentleFS
KylianmgtKylianmgt/spec-first-skills/skills/pr-per-story/SKILL.md

pr-per-story

Skill0 starsChanged 37 days agoMITView on GitHub

Finish a feature by running the spec's verification command, iterating on failures, and opening a pull request whose description is generated from the spec. Use when implementation work is complete and ready for review, the user says the feature is done or asks for a PR. Never merges.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Every feature ends in a pull request: a bounded diff, traceable to its spec, merged by a human.

    line 8
  2. Very specific:

    A PR already exists for this branch: update it (push, gh pr edit) instead of opening a duplicate.

    line 68
  3. Distinctive:

    Never merge, enable auto-merge, approve your own PR, or delete the branch.

    line 73
  4. Distinctive:

    Never check an acceptance-criteria box you did not verify in this session.

    line 74
  5. Distinctive:

    Never weaken, skip, or delete a failing test to make verification pass.

    line 75
  6. Distinctive:

    Never force-push over commits you did not create.

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PR Per Feature (User Story): Verified Diff, Human Merge

Every feature ends in a pull request: a bounded diff, traceable to its spec, merged by a human. This skill closes the loop.

Workflow

  1. Re-read the spec (specs/<slug>.md). The PR is judged against the spec, not against the chat history. If no spec exists, write down the acceptance criteria you are about to claim and confirm them with the user first.
  2. Run the spec's verification command exactly as written, then walk the acceptance criteria one by one.
  3. Iterate on failures, best effort, honestly reported. Fix, re-run, repeat. If it still fails after a handful of focused attempts, or the fix would change the spec's scope, stop and report exactly what fails and why. A red check reported honestly beats a green check achieved by weakening the test.
  4. Review your own diff before pushing: git diff <base>...HEAD --stat, then the full diff. Remove debug output, stray files, and unrelated reformatting. Everything left in the diff must trace back to the spec.
  5. Push the feature branch and open the PR (from the feature worktree, see the worktree-story skill):

    git push -u origin feature/<slug>
    gh pr create --title "<feature title>" --body-file <body file>
  6. Generate the PR description FROM the spec, in this shape:

    ## What
    One paragraph, the change, taken from the spec's Scope.
    
    ## Why
    Taken from the spec's Context.
    
    ## Acceptance criteria
    - [x] Each criterion from the spec, checked only if verified
          in this session
    - [ ] Unmet criteria stay unchecked, with a one-line note
    
    ## Test evidence
    The verification command and a summary of its real output
    (pass/fail counts, not just "tests pass").
    
    Spec: specs/<slug>.md
  7. Stop. Post the PR URL and the verification summary, then hand off. Merging is the human's decision, always.

Edge cases

  • No remote or no gh CLI: push the branch and print the compare URL, or output the PR title and body as text the user can paste.
  • Verification command itself is broken (fails before testing anything): fixing the harness is in scope only if the spec says so, otherwise report it and stop.
  • Out-of-scope changes crept into the diff: split them out before opening the PR, even if they are improvements.
  • A PR already exists for this branch: update it (push, gh pr edit) instead of opening a duplicate.

Boundaries

  • Never merge, enable auto-merge, approve your own PR, or delete the branch.
  • Never check an acceptance-criteria box you did not verify in this session.
  • Never weaken, skip, or delete a failing test to make verification pass.
  • Never force-push over commits you did not create.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.