Harness-agnostic version of `/implement`. Drives a single workshop ticket through the SWE→Tester loop in ONE conversation, with the role prompts bundled as `age
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-implement-universal-820c884a73bd ,按照其中的说明把「implement-universal」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This is the harness-agnostic twin of /implement. It is functionally identical, but instead of dispatching subagents via Claude Code's Task tool, it instructs you to adopt two distinct roles in sequence:
agents/software-engineer.md and execute it end-to-end.agents/tester.md and execute it as a fresh reviewer of the SWE phase's output.Use this skill when running in any harness that does NOT have Claude Code's subagent dispatch (Cursor, Windsurf, generic MCP clients, plain Anthropic SDK loops, etc.). If you are running inside Claude Code, prefer /implement — the subagent isolation gives you a more independent Tester verdict.
new feature branch → SWE role implements (+ AC walk on glue tickets) → role switch → Tester role verifies (logic tickets only) → orchestrator moves file to tasks/done/ → orchestrator commits directly with `git commit -m` → report to human
After the report, the session ends. The human reviews the commit, talks the workshop audience through what happened, optionally amends or pushes, then re-invokes for the next ticket.
You are the orchestrator for steps 1–3, 6, and 7. For steps 4 and 5 you adopt the bundled roles. The orchestrator is a MANAGER — it does NOT write code, run make targets, or read changed files for review on its own behalf. That work happens inside the role phases.
Without subagent isolation, the SWE and Tester phases share one conversation history. That means:
The role files (agents/software-engineer.md, agents/tester.md) are the contract. Re-read each one at the start of its phase so you reset to the right mindset; do not skim from memory.
The Makefile exposes three end-to-end targets that double as smoke tests. Most tickets name one of them in their Acceptance Criteria as the verification target:
make test-research-workflow — exercises the Deep Research MCP server end-to-end on the dataset seed. Default smoke test for any research-side ticket (#001–#010, #013).make test-writing-workflow — exercises the LinkedIn Writer MCP server end-to-end on the dataset guideline + prebuilt research. Default smoke test for any writing-side ticket (#011, #014–#019).make test-end-to-end — runs research + writing back-to-back on a dataset sample. Use for cross-cutting tickets (#020 Okahu/Monocle tracing, #024 README, anything that integrates both servers).When a ticket does not explicitly name a target, infer the right one from the affected server. Bootstrap tickets (make run-research-server / make run-writing-server) are the exception — those boot-and-kill checks are not smoke tests.
/implement-universal is single-shot per ticket. After step 7, end the session. Do not auto-pick the next ticket.git commit -m. Hand-craft a one-line commit message from the ticket title (feat: {Title} (#NNN) or docs: {Title} (#NNN) for README tickets)./implement-universal again per ticket.make eval-online is BANNED. It hits production and burns budget. Never run it — not in the SWE phase, not in the Tester phase, not for any ticket. Allowed eval targets are make eval-dev and make eval-test. If a ticket explicitly names eval-online, push back to the human before proceeding.$ARGUMENTS may be:
| Form | Example | Resolution |
|---|---|---|
| Numeric (1–3 digits) | 1, 04, 024 | Zero-pad to 3 digits, glob implement_yourself/tasks/0NN-*.groomed.md. Exactly one match expected. |
| Slug | register-research-tool-shells | Glob implement_yourself/tasks/*-{slug}.groomed.md. |
| Path | implement_yourself/tasks/003-implement-analyze-youtube-video.groomed.md | Use as-is after verifying it exists. |
The literal next | next | List implement_yourself/tasks/*.groomed.md (excluding done/), sort, take the lowest-numbered. |
| Empty | (none) | Ask the human: "Which task? (e.g. 1, 004, next, or a slug.)" Wait for the response. |
If the resolved file is already under tasks/done/, refuse: "Ticket {NNN-slug} is already shipped. Did you mean /implement-universal next?"
If multiple files match (rare with the slug case), list them and ask the human to disambiguate.
Once resolved:
Tags:, Depends on:, Blocks: block). The Status: line is no longer flipped — tasks/done/ membership is the only "done" signal — so don't trust or update it.Depends on: (excluding None), check that the dependency is in tasks/done/. If a dependency is still pending, warn the human but proceed if they confirm — workshop attendees may sometimes intentionally take tickets out of order.docs and whose Scope only writes/edits markdown documentation. Tester is HARD-OFF — never enter the Tester phase on a docs ticket. AC walk is also dropped; verification = ls + non-empty check by the orchestrator."Resolved to {NNN-slug} — {Title}. {1-sentence scope summary}. Verification target:
{make target}. Archetype: {docs|glue|logic} — {Tester off, fast-path file existence check | Tester off, orchestrator spot-checks SWE AC walk | starting the SWE→Tester loop in single-context mode}."
Proceed without blocking.
main)The branch name is the fixed default implementing/from-scratch — it is not derived from the ticket filename. Every ticket reuses the same long-lived branch, so commits stack on top of each other (typical workshop flow: 24+ commits on one branch by the end). Ticket #001 creates the branch; tickets #002 onward detect they're already on implementing/from-scratch and reuse it. If the human pre-checked out their own branch (e.g. implementing/from-my-idea) before invoking /implement-universal, respect that — the "not on main" path below covers it.
First, detect the current branch:
CURRENT=$(git rev-parse --abbrev-ref HEAD)
git status --short
Then branch on the value:
CURRENT == main — create and check out the default branch:
git checkout -b implementing/from-scratch
CURRENT != main — do not create a new branch. Stay on the current branch and reuse it. Log to the human:
"Already on
{CURRENT}(notmain). Reusing this branch — the new commit will land on top of any existing work." This covers tickets #002 onward (already onimplementing/from-scratch) and the "human pre-checked out a custom branch" case.
Edge cases (apply only to the main path):
git checkout -b will fail. Prompt the human "Branch implementing/from-scratch already exists. Reuse it (r) or recreate (d)?" — default to reuse (git checkout implementing/from-scratch).main: surface git status --short and ask whether to stash, commit on main first, or abort. Do not silently git stash.This step is the orchestrator's responsibility. Do NOT defer it to the SWE phase.
Use your harness's task-tracking tool (TaskCreate in Claude Code, or an equivalent visible checklist) to make progress inspectable. If your harness has no task tool, write a plain markdown checklist in the chat.
Logic ticket (4 items):
[SWE phase] implement {NNN-slug} (in_progress immediately)[Tester phase] verify {NNN-slug} — blocked by SWE[Done] move ticket to tasks/done/ — blocked by Tester[Commit] git commit on implementing/from-scratch — blocked by DoneGlue/bootstrap ticket (3 items — Tester phase is skipped):
[SWE phase] implement + AC walk {NNN-slug} (in_progress immediately)[Done] spot-check + move ticket to tasks/done/ — blocked by SWE[Commit] git commit on implementing/from-scratch — blocked by DoneDocs ticket (3 items — Tester HARD-OFF, no AC walk):
[SWE phase] write docs {NNN-slug} (in_progress immediately)[Done] confirm file(s) exist + move ticket to tasks/done/ — blocked by SWE[Commit] git commit on implementing/from-scratch — blocked by DoneNo parallel branches. Mark items complete as each phase finishes.
Adopt the SWE role. Open implement_yourself/.agents/skills/implement-universal/agents/software-engineer.md (or, if that path resolves through a .claude/skills/ symlink, the equivalent path under your harness) and read it end-to-end. That file is your role definition for this phase — it overrides any default coding instinct.
Then execute the SWE workflow it describes against this ticket:
{repo-root}/implement_yourself/implement_yourself/tasks/{NNN-slug}.groomed.mdMakefile, pyproject.toml, .python-version, .env.example, scripts/, src/writing/profiles/*.md, LICENSE, AGENTS.md, CLAUDE.md, and any file already inside tasks/done/. The ticket's "Out of scope" section may list more.make format-fix && make lint-fix until clean. Then run the e2e smoke-test Make target named in the ticket and copy the output into the hand-off — the Tester phase will trust this excerpt and not re-run the target.make eval-online is BANNED. Never run it.Produce a SWE hand-off message in this conversation that follows the format in software-engineer.md for the matching archetype:
DO NOT commit. DO NOT move files to tasks/done/. The orchestrator handles both in step 7.
When the SWE hand-off is complete, mark the [SWE phase] task complete and proceed.
Skip this step on glue/bootstrap tickets — the SWE's AC walk + the orchestrator's spot-check is the verification.
HARD-OFF on docs tickets. Never enter the Tester phase on a docs ticket. Docs tickets get a fast-path: SWE writes the file → orchestrator confirms ls returns a real path with non-empty content → commit.
For logic tickets, switch roles. This is the most fragile transition in single-context mode — do it deliberately:
implement_yourself/.agents/skills/implement-universal/agents/tester.md and read it end-to-end. Do not skim from memory — the rubric matters.Produce a QA Report in the format tester.md specifies, ending in VERDICT: PASS or VERDICT: FAIL.
Anti-rubber-stamp safeguard for single-context mode. Before you write VERDICT: PASS, ask yourself: "If a stranger handed me this SWE hand-off, would I find the evidence sufficient — or am I leaning on what I remember implementing?" If the answer is the latter, run the verification command yourself (ls, cat, uv run python -c "...") and quote its output in the report. Memory is not evidence.
When the QA report is complete, mark the [Tester phase] task complete and proceed to step 6.
For docs tickets the spot-check is just a file existence + non-empty check. Skip the full AC re-read.
ls -la implement_yourself/path/to/README.md # confirm exists
wc -l implement_yourself/path/to/README.md # confirm non-empty (>10 lines)
If both succeed, accept and proceed to step 7. If the file is missing or empty, re-enter the SWE phase with the gap. Don't second-guess content quality — that's what the human review of the commit is for.
Spot-check before accepting — re-read the ticket's Acceptance Criteria. The verifier is the Tester phase output on logic tickets and the SWE phase's hand-off AC walk on glue/bootstrap tickets.
For each criterion marked PASS, confirm:
ls/cat excerpt).Common rubber-stamp red flags (REJECT and re-run the appropriate phase with the gap as feedback):
make test-..." without a corresponding entry in the SWE hand-off.)ls/cat excerpt.budget_exceeded payload.Outcomes:
[Tester phase] complete (logic tickets) and proceed to step 7.agents/software-engineer.md to reset, then apply the fixes, re-run make format-fix && make lint-fix, re-run the e2e target, and produce a new hand-off. Then re-run step 5 (logic tickets) or re-spot-check the AC walk (glue tickets).If the Tester phase FAILs the same ticket three times without a PASS, stop the pipeline:
[Tester phase] as still in_progress in the TaskList.USER ACTION REQUIRED with:
/implement-universal."Once verification is PASS and you've spot-checked the evidence:
tasks/done/mkdir -p implement_yourself/tasks/done
git mv implement_yourself/tasks/{NNN-slug}.groomed.md implement_yourself/tasks/done/{NNN-slug}.groomed.md
If git mv fails because the file isn't tracked yet, fall back to mv — the commit step picks it up via git add.
[Done] complete in the TaskListgit commitPick the type from the ticket archetype:
feat: — implementation tickets (logic, MCP tools, server bootstraps, prompt/resource registration, skill files).docs: — README-only tickets (#009, #019, #024) or any ticket whose Tags contain docs.Subject template: <type>: {Title} (#NNN).
git add -A
git commit -m "feat: {Title} (#NNN)" # or docs: ... for README tickets
If the commit fails (pre-commit hook, signing gate, etc.), surface the error to the human and stop. Do not retry with --no-verify or -c commit.gpgsign=false — those require explicit human authorization.
After the commit lands:
git log --oneline -1.git status --short (working tree should be clean).Mark [Commit] complete in the TaskList.
Print a single markdown block:
## /implement-universal complete — {NNN-slug}: {Title}
**Branch:** `{current branch — `implementing/from-scratch` by default}` ({N} commits ahead of `main`).
**Mode:** single-context (no subagent isolation).
**Archetype:** {logic | glue/bootstrap | docs}. {Tester phase ran | Tester phase skipped — verified via SWE AC walk + orchestrator spot-check | Tester HARD-OFF — verified via `ls` + `wc -l`}.
**Files changed** ({N}): `path/to/a.py`, `path/to/b.py`, …
**E2E command:** `make {target}` — passed (per SWE excerpt).
**Format/lint:** `make format-fix && make lint-fix` — passed.
**Acceptance criteria:**
- [x] AC1 — evidence: `…`
- [x] AC2 — evidence: `…`
- …
**Ticket moved to:** `implement_yourself/tasks/done/{NNN-slug}.groomed.md`.
**Commit:** `{shortsha} {commit subject}`.
**Working tree is clean.** Review the commit (`git show HEAD`), talk the audience through it, optionally amend or push, then run `/implement-universal next` to pick up the following ticket.
End the session. Do not invoke /implement-universal recursively. Do not pick the next ticket. Do not push — pushing is the human's call.
make format-fix && make lint-fix itself; the orchestrator does not police that.Depends on: ticket is still pending but does not block.tasks/done/ is sacred. The orchestrator is the only writer. The SWE and Tester phases are forbidden from touching tasks/done/.implement_yourself/. All paths are rooted there. If invoked from a different cwd, cd into implement_yourself/ before reading role files.git checkout, git add, git commit, git push, or git rm./implement-universal stops at the local commit. Pushing the branch and opening a PR is the human's manual step.