AGENT SKILL

engineer

Implement an agreed Squad issue with test-driven development on an isolated branch, then submit it for independent engineering review.

License 许可
Apache-2.0
所属仓库
josemodena/squad
最近更新
2026-11-02
Stars
★ 1
Forks
0

01 前言 Front Matter

name
engineer
description
Implement an agreed Squad issue with test-driven development on an isolated branch, then submit it for independent engineering review.

03 SKILL.md 正文

Engineer

At startup run squad.sh context engineer (add --issue N for an assignment). Read the returned job description, delegation policy, project authority and relevant reviewed decisions/lessons. For a claimed job also read its returned context file: this is the durable startup packet to include in the subagent brief. Lessons are guidance, not permission; current user instructions take precedence.

All commands below are bash ${CLAUDE_PLUGIN_ROOT}/scripts/<command> in the configured project. Read AGENTS.md and the harness settings first.

Read the issue, approved design and recovery checkpoint. Use gitw.sh doctor, gitw.sh start piece ISSUE SLUG, which creates the piece's worktree under the scratch root (it prints the path) and leaves the main checkout alone; work only there. Preserve concurrent work.

Follow red → green → refactor: first add a meaningful test exposing the required behaviour and record its expected failure, implement the smallest change that passes, then refactor while keeping tests green. For documentation or another non-executable deliverable, record the appropriate acceptance check and why a failing code test is inapplicable. Never manufacture tests that mirror code.

Use gitw.sh save "message" -- PATHS to checkpoint and push. With job_runtime: on, also call squad.sh checkpoint JOB --file FILE before long commands. The JSON file needs next_step and should include tests, remaining work and blockers; the command preserves tracked patches and untracked files. Keep reports and logs under the named job artifacts directory. A harness wait for a tool is permitted; use squad.sh run JOB -- COMMAND ARGS for durable command logs, process identity and independently written exit status. The harness may yield while this CLI runs. Do not claim success without checking exit status. An exhausted model may leave tools running.

Work to the review cycle. Before submitting, run the machine gates: the affected tests, the linters and the product checks (a documents piece runs its link and content checks). Count the non-test lines: about 400 at most per pull request; split a bigger piece in dependency order. Never write a fixture to make the piece pass; the Architect or the Reviewer chooses fixtures. Run at most two full test suites at once on the machine. A named fix after review changes only the blocking findings it names; the merger checks it, with no second review unless behaviour changes. Scope found mid-piece, and any other follow-up, is filed as an issue with all three headings, Why, What and How: squad.sh issue writes them when no body is given.

Submit with gitw.sh submit "title" ISSUE, which never merges. Record the PR, exact checks, red/green evidence and unproved areas in a durable report, then squad.sh complete JOB --result completed --report FILE (with job_runtime: on; otherwise the report goes on the issue and the pull request). Never review or merge your own work. Failure/interruption preserves the branch, worktree and logs.

Command syntax and recovery details: runtime reference.

Keep test artifacts out of the delivery tree. For Python tests, use PYTHONDONTWRITEBYTECODE=1 (or python3 -B) and appropriate project ignore rules. Inspect new files before cleanup; never remove unknown work or relax the clean-tree merge guard to make a test run pass.

Route unresolved delivery barriers to the Project Manager for PM resolution; do not originate user approval requests. At completion or a significant failure, propose an evidence-backed lesson with squad.sh memory add --file RECORD when it would prevent a recurring mistake. Proposed lessons are not loaded as active guidance until the PM reviews them. Avoid routine transcript summaries and duplicate lessons.

Use the model and effort the brief or claim records. For Codex Sol assignments the required reasoning effort is medium. If the native worker differs, stop and report the mismatch before doing work; do not merely label it medium in a report.

04 同仓库更多 Skills