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

sw-implement

Use when the user wants to implement, build, execute, start or continue a Superwiki task or its plan, or invokes sw-implement, with or without a task id.

mhmtsrfglu · 已有静态检查记录

安装与使用

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

npx skills add mhmtsrfglu/superwiki --skill sw-implement

技能说明


name: sw-implement description: Use when the user wants to implement, build, execute, start or continue a Superwiki task or its plan, or invokes sw-implement, with or without a task id.

sw-implement

Runs one task. You keep the task's status true and judge the result. The work is done by subagents that start from a clean context, on the models set in sw-config: an implementer, and a reviewer when the task asks for one. You do not read the code or the plan: their reports are your input. Before the task is closed you verify it yourself, with a command run for every "Done when" item.

That split is what keeps a task cheap. A long session sends its whole context again on every step; work done in a fresh context does not carry yours, and yours stays small because the work never enters it.

Run commands from the project root. <skill-dir> is the directory this SKILL.md is in.

Steps

  1. Pick the task. Id given: use it. Otherwise node docs/.sw/sw.mjs ready and let the user choose; tasks already in progress come first.

  2. Gate: node docs/.sw/sw.mjs check <ID>.

    check saysDo
    can start: no open deps: ...stop. Tell the user which tasks block it and offer to run the first blocker instead; do not run it unasked. Do not start the task anyway, and do not edit deps to get past this
    can start: n/a, status is in-progressthis is a continuation; skip step 3
    can start: n/a, status is done or cancelledstop and ask what the user wants
    plan: ... (draft, not approved)stop; the plan needs the user's approval (sw-plan)
    plan: nonefine for a small task, by the rule below this table. Also fine when the task's "Notes" hold an Approach (sw-plan-implement, ...) note: sw-plan-implement chose the medium route. For anything else, recommend sw-plan first and let the user choose
    review: required (...)remember it for step 7
    can finish: no and summary: noneexpected before the work: the summary is written in step 8

    The rule for a small task, word for word as sw-plan-implement and sw-plan state it:

    A task is small when its task file alone shows all four: one area, meaning its work belongs to the configured area its id prefix names and to no other (areas in docs/.sw/config.json; with one configured area, every task is in one area); three "Done when" items or fewer, as the done when: line of node docs/.sw/sw.mjs check <ID> counts them; nothing left open in its "Notes"; and the files that change, named in the task file, three or fewer. A task whose file does not show how many files change is medium at least, never small.

  3. Mark it started before any work. The status lives in the task file, under docs/. When the host's plan mode, a memory tool or a rule of the host keeps this session from writing under docs/ or from running the shell, stop here, before the status changes: name the obstacle to the user, ask them to lift it (leave plan mode, allow the writes, give the session a shell), and wait; do not do the task's work in the meantime. Then:

    • in the frontmatter of docs/tasks/<ID>.md, status: in-progress and started: today;
    • in docs/log.md, a new entry ## [date] task | <ID> started, in the layout its last entries use;
    • node docs/.sw/sw.mjs index, so the task list in index.md shows it.
  4. Checks that need the environment. A check needs the environment when it starts a service, needs a running stack or changes data. Keep one list of them, each allowed or not allowed; it holds for the implementer, the reviewer and your own summary.

    • With a plan: each hit of grep -n 'needs:' docs/plans/<ID>-plan.md is such a check. Ask the user which may run; without a yes a check is not allowed.
    • Without a plan the list starts empty; step 6 fills it.
    • The question is asked also when the plan's approval was waived: a waiver of approval says nothing about checks. Only a standing answer in the user's first message ("the dev server may run", "none may run") replaces it, here and in step 6; a first message that gives none leaves the question to ask.
  5. Dispatch the implementer: the first row under "Dispatching".

  6. Judge the report. Its Requirements: list must name every requirement of the task by the id every role derives from position: D1 to D<n> for the "Done when" items, n from the done when: line of step 2's check, and N1 to N<m> for the top-level bullets of "Notes", in order. Compare it with the task file.

    • n/a is for a note that asks for nothing: a record or a piece of evidence, or a line the skills write about the task's course, which is an Approach (sw-plan-implement, ...) note (its work is the requirements it orders) or a Route:, Split or Changed line. An answer the user gave, or one assumed for them, asks for something when it bears on a "Done when" item of the task: it is met when the work follows it, shown by that item's check; an answer that bears on none of them asks for nothing. A note that asks for something and comes back n/a is not met.
    • met needs evidence: a command or test and its result. You do not re-run it here; step 8 runs a command for every item.
    • An item marked "(test)" also needs a red: line in the report: the run in which its test failed before the code. Keep each such line, from the first report and from each fix round's, for step 8. A line that is missing or says none is no reason for a new implementer; the summary marks that item unverified.
    • built, not verified: the item's only check needs the environment and was not allowed. Ask the user once, in one question, whether each such check not yet answered may run, and add the answers to the list. Then go on either way, with no new implementer: the reviewer and your summary run what is allowed, and a check that cannot run leaves its item unverified in the summary and the task in-progress.
阅读完整来源 ↗