一键导入
worker-implement
Implement assigned vertical slice following TDD layers
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement assigned vertical slice following TDD layers
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Install Pasture binaries (pastured, pasture, pasture-release) from GitHub Releases, go install, or Nix
Pasture protocol reference documentation — 12-phase workflow, agent roles, constraints, and coding standards. Read when you need to understand the full workflow or look up conventions.
Create handoff document and transfer to supervisor
Create PROPOSAL-N task with full technical plan
Ratify proposal, mark old proposals pasture:superseded
Spawn 3 axis-specific reviewers (A/B/C)
| name | worker-implement |
| description | Implement assigned vertical slice following TDD layers |
Command: pasture:worker:implement — Implement assigned vertical slice following TDD layers
-> Full workflow in PROCESS.md <- Phase 9
[wimpl-plan-backwards]
[wimpl-vertical-ownership]
[wimpl-import-production]
[wimpl-verify-production]
[wimpl-inject-deps]
new[wimpl-validate-input]
[frag--validation-cases]
You have a Beads task ID for a vertical slice and are ready to implement end-to-end.
Given Beads task when starting then identify production code path first
bd show <task-id>
# Look for: "productionCodePath": "cli-command subcommand" or "api-endpoint"
Trace backwards through call stack:
End: User runs production command
↓ Entry: CLI command.action(...) or API endpoint handler
↓ Service: createXService({ deps }).method(...)
↓ Types: InputType → OutputType
Identify what you own in each layer:
bd show <task-id>
bd update <task-id> --status=in_progress
Layer 1: Types (your slice only)
Layer 2: Tests FIRST (import production code)
C-validation-cases): definition of done plus correct/incorrect behaviours.import "myproject/cmd/feature"import "myproject/internal/testhelpers/feature"Layer 3: Implementation + Wiring
NewService(ServiceDeps{ FS: fs, Logger: logger })// TODO: Wire serviceFollow:
For every request (not only fix-intent ones), the URE/UAT captured concrete validation cases — the definition of done plus the correct/incorrect behaviours that must pass or must fail. Per [frag--validation-cases] and C-validation-cases:
There is no request-type axis or enum gating this — what a request needs is recognized from the REQUEST/URD, not classified.
Stage only the files belonging to your slice, by name:
git add cmd/feature/list.go pkg/feature/service.go pkg/feature/types.go
git agent-commit -m "feat(feature): add list subcommand"
Never use git add ., git add -A, or git commit -am ... —
they sweep peer-worker WIP into your commit.
Never use destructive git operations (git reset --hard,
git checkout HEAD -- <path>, git stash pop, git stash apply,
git clean -fd, git branch -D) on the shared worktree. A
PreToolUse hook blocks these for worker agents; if you find peer
work in your way, post bd comments add and wait for supervisor
coordination instead. See Shared-Worktree Git Discipline in
/pasture:worker for the full rationale and the escape hatch.
git add . / git add -A)reset --hard, checkout HEAD -- <path>, stash pop/apply, clean -fd, branch -D) used on the shared worktreeIf your Beads task is a FOLLOWUP_SLICE-N, the implementation procedure is identical. Additionally:
bd show <task-id> — these are user-DEFER'd UAT items you must resolveYour slice is not finished when the first pass lands. Code review iterates review → fix → re-review up to the review-effort budget chosen at Phase 8 until a fix-free clean round confirms 0 BLOCKER + 0 IMPORTANT + 0 MINOR within budget. Stay available to fix findings of every severity — IMPORTANT and MINOR must reach 0 too, not just BLOCKER. If the budget is exhausted before a clean round, the outstanding findings are surfaced to the user at a gate (not proceeded-past silently). Do not treat "tests pass once" as wave completion.
/pasture:worker-complete/pasture:worker-blocked