SuperAPI AI Directory

nuke-implement

Agents & models

View repository

Updated 10-15 17:23

About this skill

Nuke Implement

The missing rung between nuke-code and the spec pipeline. Family positioning: code is how the session implements with its own hands · implement is how it delegates implementation to subagents · fix executes an existing spec · verify repairs work someone else already did. Use it when the task is clear enough to state but you want cheap workers typing while the session orchestrates — the cheap-implementer profile as a one-command skill, no spec required.

Core principle, unchanged from the family: weak generation + strong verification + a fix loop. The implementers are presumed cheap; validators sit one tier above; every caught defect returns as an exact finding.

Arguments

[mode] — light (default) | full | plan (preflight, print, STOP). <task> — the task text, or a path to a task/brief file. --yes — skip the preflight confirmation gate.

Modes

Tier vocabulary and platform mechanics: references/model-tiers.md.

light (default) full
Implementers worker, ≤3 files each top
Validator (per cycle + final) — one tier above the implementers session top (equal tier but fresh, per the ceiling rule in references/model-tiers.md)
Fix cycles cap 3 cap 5
Cost stance lean: smallest wave that covers the touched files costs do not matter

Mandates

  1. The contract is written before any agent spawns. Preflight distills the task into 2–5 falsifiable done-criteria plus non-goals (nuke-code's THINK contract). No resolvable contract → ask the user; implementers never receive a vague ask, because a cheap model amplifies vagueness into invention.
  2. Implementers never validate their own work. Validation is always a fresh agent one tier above (full: equal tier, fresh, max effort).
  3. Mandatory skill loading. Every implementer loads the mapped skills for its file types (file-type → skill map, references/stack-adapters.md) before writing; the nuke-lean charter is part of every implementer prompt — delegated code grows guards and wrappers fastest.
  4. Evidence before claims. Gate output verbatim; every done-criterion verdicted with file:line + a quoted line.
  5. No git add / git commit / git stash. No .bak files. Working tree left for review.
  6. Escalate instead of stretching. More than 5 done-criteria, contradictory requirements, or >~10 files → STOP and recommend nuke-spec (spec → fix). A hard design call → nuke-think before dispatch. Never claim success past a dirty state.

Artifacts

run_dir = .nuke/<YYYY-MM-DD>-<HHmmss>-implement-<slug>/ — fresh per run; on collision append -2, -3, ….

File Role
plan.md Contract (done-criteria, non-goals), touched files, batches, gates, skill map, tiers
implement.md Per-batch results, validator verdicts per cycle, gate outputs, final verdict

Pipeline

Phase 0 preflight (contract → plan → confirm) → Phase 1 implementation wave → Phase 2 validation → Phase 3 fix loop (cap 3/5) → Phase 4 verdict (STOP)

Phase 0 — Preflight

Read references/preflight.md and follow its plan-then-apply gate. Implement specifics:

  1. Contract (Mandate 1): done-criteria, non-goals, constraints from the repo's instruction files — read now, not recalled. A brief file given as the task is consumed as-is when its criteria are falsifiable.
  2. Shape the work: read the files the task will touch (orchestrator-level skim: exports, structure — not full contents into context); decide the file plan and cut it into batches of disjoint files sized to the implementer tier (light: ≤3 files each — the same budget nuke-split enforces on specs).
  3. Resolve the per-prefix gates table and the file-type → skill map (references/stack-adapters.md); run the matching gates once for a baseline — a red baseline is recorded, and later phases prove no NEW failures.
  4. Print the plan block (contract, batches, tiers, estimate ≈ 3–8 agents) and WAIT. plan → STOP. --yes → skip confirmation. On confirmation: create run_dir, write plan.md.

Phase 1 — Implementation wave

One implementer per batch, parallel (disjoint files by construction). Each receives: the contract verbatim · its batch's files and only those · write ownership of its batch · the mandatory skill list plus the nuke-lean charter (Mandate 3) · the repo conventions from plan.md · return format: files changed with line refs, deviations from the contract, anything it could not do — escalated, never improvised.

Phase 2 — Validation

One fresh validator at the mode's tier (Mandate 2) receives the contract, the diff, and repo access — never the implementers' reasoning. Charter: verdict every done-criterion (met | partial | unmet, file:line + quoted line each), then hunt what the wave introduced — regressions, broken callers of changed contracts, duplication, slop, type escapes, convention drift — via the four charter bundles of references/lens-catalog.md over the diff and its blast radius. Findings use the family schema; a finding missing a field is invalid. In parallel, run the matching gate rows, output captured.

Phase 3 — Fix loop

Every failed gate, partial/unmet criterion, and finding of any severity → fix subagents (worker) with exact findings and disjoint write ownership → fresh revalidation at the validator tier. Cap per mode. Cap hit or unfixable → stop and report honestly.

Phase 4 — Verdict (STOP)

Verdict first: "DONE — / done-criteria met (validator-verified), gates pass, working tree ready for review (nothing committed)" — or the honest list: unmet criteria, open findings by severity, failing gates verbatim, cycles used, where it stopped. Always: the contract, batches × cycles, gate outputs, run stats; calibration line appended to .nuke/calibration.log (format in references/preflight.md). Recommend nuke-verify with the contract as intent when the user wants an independent second pass. STOP.

Orchestration notes

  • Implementers parallel on disjoint batches; the validator runs only after the whole wave returns; fixers within a cycle parallel on disjoint files — never two agents writing one file.
  • Tiers per references/model-tiers.md; platforms without per-agent overrides → every role inherits the session model; the ceiling-collapse rule applies to full mode.
  • Preflight gate via AskUserQuestion (run / switch mode / narrow scope) on Claude Code; print-and-wait elsewhere.