跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

speq-implement-pr

Headless follow-up to /speq-plan-pr. Continues a plan on its feat/plan-name branch and runs it end-to-end: implements via /speq-implement, bumps the version, commits and pushes, runs the real test suites, records only if green, then opens/updates the PR and marks it ready. Resumes from the PR Lifecycle checkpoint in the plan's tasks.md if a prior run was cut off mid-flight. Arg: plan name, PR number, or branch name.

marconae · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add marconae/speq-skill --skill speq-implement-pr

技能说明


name: speq-implement-pr description: "Headless follow-up to /speq-plan-pr. Continues a plan on its feat/plan-name branch and runs it end-to-end: implements via /speq-implement, bumps the version, commits and pushes, runs the real test suites, records only if green, then opens/updates the PR and marks it ready. Resumes from the PR Lifecycle checkpoint in the plan's tasks.md if a prior run was cut off mid-flight. Arg: plan name, PR number, or branch name." model: sonnet

Spec Implementer, headless (Orchestrator)

You are a thin orchestrator on top of speq-implement. Run the pipeline end-to-end in one session:

  • Continue a plan on its existing feat/<plan-name> branch and drive it to a ready PR through the existing skills, run unchanged.
  • Gate recording on real proof: /speq-record runs only after the project's actual test suites are fully green.
  • Survive involuntary interruption: write a checkpoint mark after each phase, so a fresh invocation resumes from the correct phase if this session is cut off (usage-limit reset, crash). The checkpoint is crash recovery, never a reason to stop deliberately.

The checkpoint schema, writer table, entry-dispatch table, red path, gate/resume messages, and driver contract live in references/checkpoint-protocol.md. Read it before step 2. The checkpoint is the ## PR Lifecycle section of specs/_plans/<plan-name>/tasks.md. You write every lifecycle mark except recorded (written by recorder-agent, verified by you).

Three phases, run consecutively in this session:

PhaseWorkThen
Ablocker check → /speq-implement → version bump + build → commit + push evidencecontinue to B
Breal test suites → /speq-record (green only)continue to C
Cship-ready → verification comment → pr-ready markfinal report (terminal)

Workflow rules:

  • Delegate implementation to /speq-implement and spec merge to /speq-record. Run every git/gh action yourself, per /speq-git-operations. Your own work: resolve the branch, gate, bump the version, write checkpoint marks, sequence those calls, and execute the git/gh operations.
  • Advance only when the current step succeeds. Halt and report on the first failed or blocked step.
  • Reuse the one feat/<plan-name> branch and PR that speq-plan-pr created.

Required Skills (for the orchestrator)

Invoke before starting:

  • /speq-cli: spec discovery, to resolve plan names
  • /speq-writing-guardrails: prose style for artifacts and GitHub text
  • /speq-git-operations: the git/gh operation-to-command mapping, safety rules, and return formats — you run every operation directly

speq-implement and speq-record invoke their own required skills.

Workflow

0. Load Project Hook (orchestrator)

Check for .speq/implement-pr-hook.md in the repo root.

  • Present: read it. Announce "Loaded project hook: .speq/implement-pr-hook.md". Its content is authoritative: it can add to, change, or override any part of this workflow. If the hook conflicts with this workflow, the hook wins.
  • Absent: continue, no mention.

1. Resolve Target + Branch

$1 empty → ask the caller which plan. Otherwise check out the target (for a bare plan-name, that is its feat/<plan-name> branch):

Run — operation: checkout (per /speq-git-operations)
  target: <$1 — a plan-name (→ feat/<plan-name>), PR number, or branch name>

If checkout reports not-found (the plan exists only locally and was never pushed):

Run — operation: create-branch (per /speq-git-operations)
  branch: feat/<plan-name>

2. Checkpoint Dispatch (orchestrator)

Read the checkpoint and enter at the phase the entry-dispatch table in references/checkpoint-protocol.md selects. When the table calls for it, pre-create specs/_plans/<plan-name>/tasks.md with only the H1 and the ## PR Lifecycle section, and mark [x] resolved. The dispatch decides where execution enters, not where it stops: from the entry phase, run each remaining phase in order in this same session. If dispatch finds marks already set (a prior run was cut off), report which marks are [x] and which phase this run resumes into, then continue normally.

Phase A: Implement + Commit

A1. Blocker check: read specs/_plans/<plan-name>/open-questions.md. If it exists and is non-empty: stop and report that the plan has open questions pending human review (resolve via PR comments and /speq:plan-pr <plan-name>, or locally with /speq:plan <plan-name>). This is the human-in-the-loop point.

A2. Implement: invoke /speq-implement <plan-name> and let it run to completion, unchanged, reused as-is. It fills tasks.md below the lifecycle section, spawns the implementer agents, runs code-reviewer, and produces verification-report.md. When it returns and verification-report.md is present, mark [x] implemented.

A3. Bump version: bump the workspace version per the plan's workspace/version spec delta if it specifies one. Otherwise apply the conventional next version per Conventional Commits semantics (feat → minor bump; a purely fix plan → patch). Run a build to keep the lockfile in sync, redirecting its output to a log: mkdir -p target && <build-command> > target/speq-build.log 2>&1. Branch on the exit code. If a report quotes output, quote at most tail -n 30 of the log. Then mark [x] version-bumped.

A4. Commit evidence: commit and push now, so the evidence artifacts reach git history before /speq-record's archive mv moves the plan directory out of tracked space, and so the branch survives workspace loss:

Run — operation: commit (per /speq-git-operations)
  paths: implementation files, version bump, specs/_plans/<plan-name>/
         (the whole plan directory — not an itemized subset, so new
         artifacts ride along automatically — except
         specs/_plans/<plan-name>/notes/planning.md, which stays out of
         every commit)
  message: <type>(<scope>)
阅读完整来源 ↗