AGENT SKILL

implement-pr

Sub-skill of agile-10-implement. Open (off base/main) or update the PR for the ticket's pushed branch, linked to the Jira Story, with AC coverage + ADR-compliance sections. This skill — not implement-code — owns opening the PR. Posts the 🤖 pr marker. Not user-invoked.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
implement-pr
description
Sub-skill of agile-10-implement. Open (off base/main) or update the PR for the ticket's pushed branch, linked to the Jira Story, with AC coverage + ADR-compliance sections. This skill — not implement-code — owns opening the PR. Posts the 🤖 pr marker. Not user-invoked.
user-invocable
false

03 SKILL.md 正文

implement_pr

Host execution

Claude Code: retain the agent-dispatch and concurrency behavior defined below. Codex: use only the inline behavior stated here.

On Codex this sub-skill runs inline under agile-10-implement with concurrency=0; never spawn or assume a named agent. Perform its full gate and return its normal receipt to the caller.

Purpose

PR phase for agile-10-implement, invoked after implement-code pushed the branch. This skill owns opening the PR, off <base-branch>. Idempotent — it updates an existing open PR rather than opening a duplicate.

Autonomous — never prompt the user. This phase makes no product or design decisions: the build is done and it only describes it, so there is no critical-decision path here. Where the diff and the plan disagree, say so in the PR body and continue. This holds in concurrency=0 inline mode too, where no agent wraps this skill.

Source the body from the real diff

The build is already done; this phase only describes it. Build the body from the actual pushed diff (gh pr diff / git diff <base>...HEAD) plus the ticket's 🤖 agile:phase=plan and 🤖 agile:phase=implement comments: the plan's AC→test map → AC coverage and Testing; the diff's files → Changes; the plan's flagged decisions and the implement comment's noted deviations → ADR compliance. Where the diff diverges from the plan, say so in the body — do not paper over it.

Open or update

gh pr list --state open --head <branch> --json number,url → found: gh pr edit (refresh title/body); none: gh pr create --base <base-branch>.

Staging the body through a file? Name it for the ticket (pr-<TICKET>.md, never pr.md) — concurrent phase agents share one temp dir, so a generic name lets a sibling's overwrite publish its ticket's body under yours. Then verify what actually landed: gh pr view <N> --json body and confirm the ticket key is yours. gh reports success on the bytes it was handed, not on the ones you meant to write — a body naming another ticket is the one defect the author is structurally unable to notice.

Title: [TICKET] <Story summary>

Body sections:

  • Story — link to the Jira ticket.
  • What this PR does — 2–3 sentences from the plan's intent.
  • AC coverage — each AC → the test that covers it, confirmed against the committed tests.
  • Changes — files/modules touched and why, reconciled with the real diff; flag any addition or omission versus the plan.
  • Testing — unit / integration / manual, and the edge cases covered.
  • Test tiers — read the agile:phase=implement marker's Mode + gate receipt. Sequential: Verified locally: lint + unit + integration + fresh-DB migration. Concurrent: Verified locally: lint + unit + typecheck (stack-free, worktree). Deferred to CI: integration + e2e + fresh-DB migration (concurrent build — CI is the gate). This tells the merge train exactly which tiers CI must confirm.
  • Specs UI match — states implemented, plus any deviation and its reason (UI Stories).
  • ADR compliance — new decisions or libraries introduced, each flagged for the reviewer.
  • Checklist — ACs tested · lint/type clean · no regressions · linked to Jira · Specs UI match · ADR compliance · test tiers stated.

Label a concurrent build — when the implement marker's mode is concurrent, gh pr edit <N> --add-label integration-deferred (create the label once if the repo lacks it). That label is the machine-readable signal agile-11-merge-train reads to know integration + e2e were not run locally. Sequential PRs carry no label.

Post 🤖 agile:phase=pr with the PR URL (noting the label on a concurrent build) and return the PR number.

This phase does not transition the Story — the orchestrator transitions to In Review only after implement-review approves, and never to Done.

Marker — mandatory, exact format

Post via mcp__atlassian__addCommentToJiraIssue (contentFormat="markdown"). The comment must begin with the literal HTML comment or resume detection (which greps 🤖 <!-- agile:phase=... -->) misses it and the phase re-runs. Never delete prior markers.

🤖 <!-- agile:phase=pr --> **pr — agile-10-implement — <YYYY-MM-DD>**
<phase content>

04 同仓库更多 Skills

cedricfarinazzo
cedricfarinazzo/agile-skills

session-audit

Audit the cost and efficiency of Claude Code sessions that ran agile-skills: per-skill and per-subagent spend, a before/after delta normalised by work shipped, and ranked skill improvements. Triggers: audit this session's cost, analyze the session transcripts, compare before and after sessions, is the new version more efficient, where do the tokens go, subagent cost breakdown, find efficiency improvements.

★ 0
cedricfarinazzo
cedricfarinazzo/agile-skills

deep-it-project-review

Autonomously perform a deep, evidence-backed technical review of a software or IT project across applicable architecture, code, security, delivery, operations, and lifecycle domains without modifying project files. Triggers: deep IT project review, technical project review, architecture audit, repository assessment, assess this codebase, review this project.

★ 0
cedricfarinazzo
cedricfarinazzo/agile-skills

test-refactor

Audit one test suite at a time for dead weight, duplication, parallel-unsafety and runtime cost, or characterize behavior before a risky refactor — with production code frozen and good coverage kept, proven per module rather than assumed. Triggers: test refactor, characterize before refactor, characterization tests, clean the tests, refactor the tests, test suite audit, DRY the tests, parallelize the test suite, speed up the tests.

★ 0
cedricfarinazzo
cedricfarinazzo/agile-skills

doc-refactor

Audit every markdown file in a repo — READMEs, docs/, and agent-instruction files — for lies, drift, duplication and bloat, then ticket and ship the cleanup as a sequenced PR train, with source code frozen and every surviving claim verified against the repo rather than read. Triggers: doc refactor, refactor the docs, clean the docs, documentation audit, README audit, docs are stale, DRY the docs, audit every markdown file.

★ 0
cedricfarinazzo
cedricfarinazzo/agile-skills

deep-refactor

Audit an entire codebase for defects, waste and debt, then ticket and ship the findings as a sequenced PR train — without breaking the test contract. Triggers: deep refactor, refactor audit, clean the codebase, DRY pass, audit and fix everything.

★ 0
cedricfarinazzo
cedricfarinazzo/agile-skills

agile-sprint-drain

Drain the active sprint to a fixed point: auto-alternate agile-10-implement (build) and agile-11-merge-train (merge) until both empty (DRAINED) or blocked (STUCK). Optional concurrency=N, dispatch=session, max-merges=N. Triggers: drain the sprint, run the sprint to completion, implement and merge until done, clear the whole board, ship the sprint.

★ 0