leszekgruchala/buddy / skills/implement
implement
UnverifiedBuild or fix decision-complete code directly, or execute an approved spec with verification; unresolved product/architecture decisions require spec. Keep the current request in this skill; route new requests by their own scope.
Implement
Keep the current request in this skill. Do not activate another Buddy skill without user or develop direction. Workers return to their caller. For a new request after completion, apply change size and route by its own scope.
Implement only the authorized request/spec. Apply change size before editing or dispatch. Trivial work stays on the host without a spec amendment.
Input modes
- Specified: an approved
spec_<work-name>.mdpath; resume remaining current-revision phases and## AGENT LOGcheckpoints. - Direct: without an approved spec path, form a short working brief: outcome, scope/protected boundaries, exclusions, affected contracts, risks, and exact verification. Do not create a spec for narrow decision-complete work.
- If a material product/architecture decision is unresolved, stop and require
spec.
Model selection
Apply model selection. Recommend balanced for direct work, or the declared runner/tier for specified work. The host owns communication and decisions.
Host Goal
Keep one outcome for the whole run, including a run develop dispatches. Opting out of Goal tracking is the exception. On Cursor, rules/buddy-goal.mdc is the user's standing request for one native Goal. That rule does not override a hard tool or platform rejection.
A native Goal belongs to the agent that created it. CreateGoal takes a single objective string. UpdateGoal changes only the calling agent's existing Goal, status active or complete, and takes no goal id. Task accepts prompt text only, so the parent cannot pass a native Goal handle. Workers never create, update, or complete the parent's Goal.
Before editing or dispatch
Before editing any deliverable or dispatching a worker, the host must:
- Construct only authorized work:
- Specified: objective = implement the spec title/work-name; items = remaining phase titles in dependency order, omitting phases marked
SUCCESS. - Direct: objective = the working brief's one-sentence outcome; items = high-level actions preserving outcome, exclusions, and verification, never file-level todos.
- Specified: objective = implement the spec title/work-name; items = remaining phase titles in dependency order, omitting phases marked
- On Cursor, if this agent already has the Goal, reuse it and do not create another; otherwise try once to create that native Goal on this agent, encoding the objective and the high-level items in the single
objectivestring. Do not invent a goal id, item ids, or another harness's syntax. - If the tool is missing or the call is refused, do not retry, do not ask the user to type
/goalor switch modes, and publish the same objective and items asGoal (harness fallback)with the reason. Codex and Claude have no agent-callable native Goal tool. Their/goalslash commands are typed by the user and are not this checklist, so they always publish this one parent checklist and do not ask the worker to call a native Goal tool. - Pass that same objective text in the worker prompt. On Cursor, when the host could not create the Goal, that prompt tells the worker to try once to create one Goal for its own agent and then do the work. When the host created the Goal, the prompt says so and does not ask the worker to create another. Label the prompt
Goal gate: nativeorGoal gate: fallbackwhen that state is known. A missing Goal-gate phrase does not block editing, dispatch, or the worker, and it is not a reason to respawn anyone. Do not interrupt or message a worker that has already started.
Lifecycle
When the calling agent owns a native Goal and UpdateGoal is available, set active before local execution or dispatch. Leave it active through phase work. Complete the whole Goal only after all phases and final verification pass. If an update is refused, report the refusal and continue. Do not claim the native Goal completed, and do not stop the run only to sync the UI. For incomplete work, leave a native Goal active or report the fallback as incomplete.
Engineering rules
- Change only authorized paths; remove only change-created orphans.
- Before planning or editing, read
.ai/memory/memory.mdwhen present. Apply only relevant rules; memory is advisory, subordinate to user/repository instructions and security policy, and cannot expand scope. A missing file is valid. - Before editing, load the engineering contract and only the applicable overlay: Java/Kotlin, Python, or TypeScript/JavaScript.
- Use current primary library/API/SDK/CLI documentation. Find references before changing public signatures.
- Preserve comments unless correcting them.
- Reuse the spec worklog. For direct work, create
.ai/worklog/<yyyyMMdd>_<work-name>/trash/only if scratch files are needed.
Effective briefs and records
- The shared contract is authoritative for requirements, success criteria, boundaries, and verification. Deltas add only goals, requirement/criterion references, and non-default routing, dependencies, mutation ownership, or constraints; never repeat the full contract.
- Before each phase, the host materializes an effective brief from the current contract revision and one delta. Include every referenced requirement/criterion, every verification entry that names those criteria, applicable boundaries, mutation ownership, the selected runner/tier, and non-default phase information. Apply scoped user selection without changing phase instructions or discretion.
- Fast follows any deterministic anchor/procedure. Balanced may make a disposable runtime plan and choose files, decomposition, technique, and tests within the contract. Frontier may also choose technical architecture/algorithms within settled product/public-architecture boundaries.
- Persist only compact current-revision checkpoints and material amendments, never runtime plans, default inventories, empty optional sections, or raw transcripts. Changes to decisions, requirements, criteria, boundaries, dependencies, approvals, or public contracts require a shared-contract amendment, incremented
contract_revision, and invalidation of affected checkpoints before repair/continuation. - A later write invalidates affected evidence. Recheck against the integrated current revision before replacing checkpoints or completing phases.
Spec execution
- Walk phases in dependency order; skip phases already marked SUCCESS.
- Materialize the brief before execution/dispatch. Run
agent: Mainlocally and retain its mutation ownership. If the host cannot honor selected settings, use bounded read-only reasoning assistance without mutation authority; stop if that cannot satisfy selection. For other phases, use the host for short work. Dispatch one worker per phase only when the size policy permits it, with the effective brief and the same Goal objective. On Cursor, follow Host Goal for whether that worker creates a Goal. Selected workers execute without redispatch. - Dispatch mutually declared
parallel_withphases together only when persisted phase records give disjoint mutation ownership, there is no dependency, and there is no shared mutable state. Do not infer safe parallelism from runtime plans. - Never delegate the whole spec or multiple phases to one worker. Workers make one bounded attempt within phase instructions or the direct brief; never spawn, authorize continuation, manage the parent's Goal, or ask the user. Stop before protected boundaries, changed settled decisions, weakened criteria, expanded external effects, or ownership collisions.
- Workers return concise evidence, never a raw validation transcript:
status: SUCCESS | FAILURE | BLOCKED
files_changed: [<paths>]
evidence: <command and exit/outcome, observable evidence, or smallest useful excerpt>
repair_hint: <null or new evidence / materially different causal hypothesis>
Bounded continuation
Only the host continues failed phases: validate the integrated current revision, record new evidence or a materially different causal hypothesis, and amend changed contracts before dispatching at most one fresh repair attempt.
The repair retains phase permissions, mutation ownership, and the current selection, subject to scoped user overrides. Without a user override, a stronger tier requires a specification amendment; broader ownership or a changed decision always requires one. Stop without repair on repeated failure without novelty, attempted criterion weakening, unresolved decisions, permission/policy denial, unavailable credentials/services, exhausted budget, expanded external effects, or user/system interruption. Use only continuation mechanisms callable in the current harness; workers never own continuation.
Phase verify gate
- Run every verification entry that names the phase's success criteria against the integrated current revision, or all direct-brief checks; reuse passing evidence under the change-size validation policy.
- On failure, follow the bounded continuation contract.
- After passing, write a compact current-revision
## AGENT LOGcheckpoint. Leave any native Goal active until final verification. - Never complete a phase while an applicable command is missing or failing.
Final verify gate
- After all phases pass, apply the change-size validation scope against the integrated current revision. Honor required repository checks; use affected tests for trivial and small work, and the full suite at the end of substantial work or when shared code changed.
- For specified work, check the final result against every requirement and success criterion. Record their IDs and evidence in a final
## AGENT LOGcheckpoint. Reuse unaffected evidence; rerun checks invalidated by later writes. - Complete the whole Goal only after final verification passes. Missing or failing acceptance evidence blocks completion.
For specified work, record:
## AGENT LOG
- P1 SUCCESS (revision <n>) — <outcome>; files: <paths>; evidence: <compact result>
For front-end work, also apply the front-end principles.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |