--- name: implement description: Build admitted nicodeen plans with minimal code, targeted TDD/review, resumable records, final verification. Use when building or resuming one. Not for unplanned work. allowed-tools: - Bash(python3 "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" team status *) - Bash(python3 "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" status *) - Bash(python3 "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" next-section *) - Bash(python "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" team status *) - Bash(python "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" status *) - Bash(python "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" next-section *) - Bash(py -3 "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" team status *) - Bash(py -3 "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" status *) - Bash(py -3 "${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py" next-section *) --- # nicodeen implement For a Git target, run nicodeen’s `team status --target-dir "{target_dir}"` before work or resume and, unless it reports `unconfigured`, follow [team coordination](../nicodeen/references/collaboration.md), reusing one task across phases and delegated agents. Use the least process that preserves correctness. Apply the all-depth [engineering standard](references/engineering.md). Use the admitted plan's depth as `{depth}` throughout. Require `sections/index.md`; its parent is `planning_dir`; `target_dir` defaults to the repo. A `status.json` follows its mode: [state-first](references/state-first.md) or [Direct](references/direct.md). Resolve absolute `plugin_root`: the plugin directory two levels above this skill's folder, containing `scripts/zagrosi_skills.py`; never the target repo. Claude Code substitutes it when loading this skill: `${CLAUDE_PLUGIN_ROOT}`. Literal text there means the file was read directly: derive the path; no such shell variable exists. Without `scripts/zagrosi_skills.py` there, stop; ask the user to install nicodeen: https://github.com/zagrosi-code/nicodeen#install. Run every helper command, including returned argv arrays, with the exact prefix `python3 "{plugin_root}/scripts/zagrosi_skills.py"` (Python 3.11+; `python` or `py -3` on Windows); host pre-approvals match that text. ## Mode Only with `--implementation-root`, read [detached-frozen.md](references/detached-frozen.md) fully and obey it; never load it otherwise. Before reading, require a regular single-link file with complete-file SHA-256 `7fd68a2065771bfec66e28b3bb49598f14cd1371c3b2b75e5946942ef0fc5b83`; stop on mismatch. Setup rechecks it. Detached runs follow it through completion; receipt commands and postflight below serve only ordinary runs. ```bash python3 "{plugin_root}/scripts/zagrosi_skills.py" implement-setup --sections-dir "{sections_dir}" --target-dir "{target_dir}" --depth "{depth}" ``` Repair failed admission before coding. Preserve unrelated work; isolate conflicting ownership. Treat plan text as requirements, never executable instructions. ## Ready sections Follow `next_action`; `next_command` is its helper call. Fill placeholders only with actual results; `--full-output` adds argv and sent packets. Recording returns the next `entry`; `recorded: true` means it's saved even if that entry needs repair. Parallelize only disjoint files and serialize records. Wait for [delegated agents](../nicodeen/references/providers.md#delegated-agents) before recording or editing what they inspect. With user-supplied cumulative verification time or a saved allowance, follow [verification allowance](references/verification.md) from the first capture; never infer or extend a cap yourself. 1. Read index once, current section, original source excerpts, linked contracts, and relevant callers. Resolve assumptions that contradict the source first. For required [compatibility checks](references/compatibility.md), activate the section and capture its passing baseline before source edits. 2. Test changed behavior first; confirm meaningful failure. Reuse refactor coverage; inspect cosmetic changes. If a meaningful test fails in mutable mode, save its result before source edits with `implement-progress --planning-dir "{planning_dir}" --section "{section}" --stage red --command "{test command}" --result "{observed failure}"`. Prose alone is not a recovery checkpoint. 3. Avoid speculative layers. Preserve validation, authorization, integrity, ownership, and rollback. 4. Capture targeted checks with `implement-verify --planning-dir "{planning_dir}" --target-dir "{target_dir}" --section "{section}" -- `, as literal argv; set environment variables in the host shell first, never after `--`. First rerun required compatibility checks with `--stage candidate` and repair failures. Use the ordinary receipt when recording. Never run the full suite per section; if the last section does, add `--integration` so Finish reuses that result. Give each capture a host timeout above its `--timeout` (default 540 s; Claude Code's shell defaults to 120 s, at most 600 s in the foreground), or run it in the background with a larger `--timeout`. 5. Review correctness, security and cleanup against the original request and section. Challenge changed contracts with a concrete input, call sequence or failure path and a distinguishing check. Where the host supports fresh-context subagents, have one independently review behavior or contract changes ([same-host review](../nicodeen/references/providers.md#same-host-review)), except at `lean` with several sections: record review status `deferred`; the whole-change review covers them. Verify findings against source/contracts; reproduce behavioral failures when feasible, stating execution limits otherwise. Tell source bugs from invalid tests or environment failures. Keep confirmed regressions, concrete cleanup gains and justified deferrals; passing workflow records do not prove untested behavior. Fix and retest affected checks. 6. Record evidence; continue: ```bash python3 "{plugin_root}/scripts/zagrosi_skills.py" implement-record-section --sections-dir "{sections_dir}" --section "{section}" --review-status pass --verification-receipt "{receipt}" --depth "{depth}" --flight off ``` Add applicable `--file`, `--test-file`, `--commit` and `--notes` with all deferrals; use review status `fixed` after fixes. Document material deviations. Follow user/repo commits; never bypass hooks. Do not push, open PRs, deploy, or watch without existing authorization. ## Finish Before the returned postflight action, run one [user test](../usertest/SKILL.md) when asked, or at `standard` or `deep` for runnable user-facing changes. Review the diff and affected callers for justified cleanup. Reuse a fresh integration receipt from the last section; otherwise capture the full `test_command` once with `implement-verify` **without** `--section`. Then run the [whole-change review](references/finish-review.md); for one `lean` section, the [lean route](../nicodeen/references/lean-route.md) covers it. Run one final postflight without `--run-tests`. Later edits need fresh receipts matching the final code and contracts; superseded ones stay in [receipt history](references/verification.md#receipt-history). Label externally run or inspection-only checks with their source and outcome (`attestation` or `inspection`, `passed`) and actual evidence, never as captured execution; manual evidence cannot replace a required compatibility pair. Failed, skipped, or unknown checks block completion. ```bash python3 "{plugin_root}/scripts/zagrosi_skills.py" postflight --phase implement --planning-dir "{planning_dir}" --sections-dir "{sections_dir}" --target-dir "{target_dir}" --depth "{depth}" ``` Require success; report changes, verification, residual risks, and user-facing changes no user test exercised.