ns-coder
Original:🇺🇸 English
Translated
(NS) Ad-hoc coding worker — bug fixes, small refactors, scripts, migrations — without full SDD. Entry priority 5: use for "just implement this", "quick fix", or concrete coding without execution-handoff (also C2 under ns-autonomous). Do NOT use for GitLab ISSUE_URL (ns-execution-gitlab-issue), multi-day/version scope (ns-spec-driven), diagnosis-only (ns-investigator), or when execution-handoff.md exists. Do NOT generate requirements/tasks/handoff.
4installs
Sourcenextstage-brasil/skills
Added on
NPX Install
npx skill4agent add nextstage-brasil/skills ns-coderTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Code Coder
Central execution worker for ad-hoc diffs (and under ). Not front door — host picks entry per .
C2ns-autonomous../../ns-harness/references/code-skill-routing.mdWorkflow mode (mandatory)
Fixed workflow, not loose checklist. Steps in order; handoffs = named skills or harness bridges ( / per ). No platform Task personas or improvised review.
coder-agentreviewer-agent../../ns-harness/references/subagent-dispatch.mdCanonical review gate: — steps 7–9 ad-hoc / C2 only. Review only via then (MUST bridge when available; else skill direct); max 3 rounds; Critical fix requires re-review mandatory; no success without pass or blocked. After Approved: Living specs (8) if match, then Final report (9).
../ns-reviewer/references/review-gate-workflow.mdreviewer-agentns-reviewerException — SDD handoff mode: caller / (or dispatch says SDD task mode): skip review gate + living specs. Parent owns review at version closure. See When invoked under execution-handoff.
run-implementationexecution-handoff.mdRouting (read first)
| Signal | Redirect |
|---|---|
GitLab | Stop — |
| Multi-day / version / SDD scope | |
| Obscure bug, root cause unclear | |
| Ad-hoc diff ready | |
Entry priority 5 (default). Harness table: . Trigger phrases: .
../../ns-harness/references/code-skill-routing.mdreferences/entry-triggers.mdWhen to use (entry)
- Bug fixes / hotfixes outside planned version
- Isolated component, hook, service, or utility
- Small refactors (≤ 1 file or tight group)
- Scripts, migrations, seeds outside version lifecycle
- "Just implement this" without
execution-handoff.md
When invoked as C2 (engine mode)
ns-autonomousns-execution-gitlab-issueISSUE_URLAWhen invoked under execution-handoff (SDD task mode)
Parent (classic SDD) or dispatch SDD handoff / execution-handoff:
run-implementation- Scope: classic = one batch (same-layer consecutive , prefer 4–7, hard max 7; size 1 = single task) per
pending. Partitioned slice = that slice's tasks. Parent owns handoff file updates.references/run-implementation.md - Read each task card (header through Validation criteria); open on demand (ambiguity or
Detailed description) —blocked.../ns-spec-driven/references/task-schema.md - Implement + unit/integration only. No E2E.
- Forbidden: /
reviewer-agent, living-spec consolidator,ns-reviewerverdict line.Code Review: - Report to parent per task: files changed, tests run, blockers, tokens (split or ). Parent marks rows and runs Step 5 review once all tasks done.
~N - Session boot: cold start this agent = full boot per ; same agent continuing = no full re-read unless
session-boot.md/ harness rules changed.agents.local.md
Session boot
See . Complete Session boot (blocking) before any other step — cold start only; mid-session skip if already booted and files unchanged. Never tool-Read .
../../ns-harness/references/session-boot.mdAGENTS.mdSession inputs
| Variable | Required |
|---|---|
| Yes |
| Infer when possible: frontend, backend, infra, tests, fullstack |
Scope isolation
Operate only inside the repo + harness docs.
Boot (mandatory)
Session boot () — one rule for ad-hoc, C2, SDD handoff:
../../ns-harness/references/session-boot.md| Agent state | Action |
|---|---|
| Cold start (this agent/subagent just started) | Full Session boot (steps 1–6). Bridge may have done local + architecture/project rules — finish layer rules + context |
| Same agent continuing; steps 1–6 done; files unchanged | Do not re-read rule corpus |
| Re-boot |
Then:
- Obey orders (already in context) — no invented paths
AGENTS.md - and
git statusgit diff - Read target files before writing
Success: orders + project rules + task scope. Invented paths or SDD artifacts (except handoff updates when parent owns them) = failure.
AGENTS.mdImplementation rules
- Diff-first — only required lines; no unrelated formatting
- Prefer editing existing files over new files
- Large change gate: >1 file simultaneously, >20 lines in one file, or public contract change: one-line plan, wait for approval
- No commits unless human explicitly asks — when committing, see
../../ns-harness/references/agent-git-identity.md - No SDD version artifacts — no ,
task-NNN.md,requirements.md, orexecution-handoff.mdwrites. Conditional living-spec updates underdocs/versions/viadocs/specs/allowed (see Living specs).ns-living-spec - No gratuitous comments unless requested
- Tests per Docker + testing; container/commands in
AGENTS.mdarchitecture-rules.md - Under /
execution-handoff.md: unit/integration only — no E2E (human at version end); no review gate (parent Step 5)run-implementation
Complement delegation
spec-drivengitlabdepends.agents/skills/| Signal | Skill | When |
|---|---|---|
| | Before large UI diff (step 4–5) or when task is primarily visual |
| Security headers, CSP/CORS, dep CVE sweep, a11y/Web Interface Guidelines audit | | On explicit request, or after frontend work before review when hygiene was in scope |
README / | | On explicit request or version/doc closure — not every ad-hoc fix |
MR/SOLID review stays only. Missing complement: continue with harness rules; recommend install once per session ().
ns-reviewer../ns-spec-driven/references/skill-integrations.mdPer-task cycle
SDD handoff mode: one dispatch may cover a batch; still stop after step 6; report per task to parent; skip 7–9.
- Understand task
- Load rules — obey already booted; Session boot again only if cold start this agent or files changed
AGENTS.md - Explore (grep/head large fixtures — no full test dumps)
- Identify minimal diff
- Apply (or plan if large-change gate)
- Run tests if in scope (see Pre-review)
- Review loop — MUST when available (else
reviewer-agent);ns-reviewer../ns-reviewer/references/review-gate-workflow.md - Living specs (conditional) — see below
- Final report — mandatory fields; never skip verdict or round count
Pre-review (before step 7)
- Tests covering changed files per and
AGENTS.md.../../ns-harness/references/docker-and-testing.md - Diff removes exports/constants/env flags/public symbols: search remaining call sites; resolve before review.
Review loop (mandatory ad-hoc / C2; skip SDD handoff)
After step 6, run before done — except SDD handoff (return to parent; no review).
../ns-reviewer/references/review-gate-workflow.md- MUST invoke when available (else
reviewer-agent) on working-tree diff (ns-reviewer) — reviewer bridge/skill begins Session boot at cold start then reviewer workflow; nogit diff, no version-closure path. Ad-hoc diff only.ISSUE_URL - Max 3 rounds. Score gate from : pass ≥9/10, ideal 10/10.
ns-reviewer- Pass: zero Critical Issues and overall score ≥ 9/10: proceed step 8.
- Fail (Criticals or score ≤ 8) with rounds left: apply minimal diff that clears Criticals and lifts quality to ≥9 (/
reviewer-agentread-only — this skill applies fixes), re-run tests if in scope, then mandatory re-review vians-reviewer(MUST when available; elsereviewer-agent).ns-reviewer - Rounds exhausted still failing gate: stop, report blocked. List unresolved Criticals and/or last score. No success. Skip step 8 (living specs).
- Fixes within original task scope. Critical (or score-blocking Warning) needs changes outside scope (public contract, cross-product, multi-day): stop, escalate per Stop conditions.
- Suggestions (P2) alone do not block when score already ≥9: carry into final report as follow-ups.
Living specs (step 8, conditional)
Only after (not as C2). Invoke in ad-hoc mode when all true:
Code Review: Approvedns-living-spec- exists
docs/specs/ - Diff behavioral (API, schema, UX, or domain behavior) — skip cosmetic / rename-only / pure refactor
- Skill available (installed via )
depends
Pass: mode , , approved . Read consolidator , follow it. No invent or write under .
ad-hoc{task_description}git diffSKILL.md{version_san}docs/versions/Skip (note reason in final report) when any condition fails, review not Approved, or consolidator reports skipped.
Final report (step 9)
No success language until gate passes or blocked (). SDD handoff: report implement status to parent; no line — version closure owns verdict.
review-gate-workflow.mdCode Review:Every ad-hoc / C2 closure response must include:
| Field | Value |
|---|---|
| Active skill | |
| Reviewer skill | |
| Review round | Last round executed: |
| Score | Last overall score from reviewer |
| Verdict | Exact line: |
| Living specs | |
Then: what changed, follow-ups, blocked Criticals if applicable.
Stop conditions
| Condition | Action |
|---|---|
| Large change gate | Plan + wait |
| Public contract change | Stop, explain, ask |
| Task needs multi-day SDD planning | Redirect to |
Related skills
- — mandatory review loop after implementation (Review loop)
ns-reviewer - — conditional ad-hoc living-spec update after Approved (Living specs)
ns-living-spec - — blocked by unclear bug
ns-investigator - — autonomous multi-agent execution (GitLab issue or local plan); GitLab issue use
ns-autonomousinsteadns-execution-gitlab-issue - — UI/design work (Complement delegation)
ns-frontend-design - — security/CSP/a11y hygiene pass (Complement delegation)
ns-best-practices - — README /
ns-docs-writerguides on request (Complement delegation)docs/
Forbidden
- SDD version artifact generation (, handoff, requirements/tasks)
docs/versions/ - Living-spec consolidator before , or when
Code Review: Approvedmissingdocs/specs/ - Out-of-repo access without scope
- Commits without explicit request
- Refactors outside task scope
- Review substitutes — Cursor Task subagents (,
senior-tech-lead-reviewer,bugbot) or any review not viasecurity-review/reviewer-agentns-reviewer. HarnessSKILL.mdallowed.reviewer-agent - Skipping re-review — success after fix when previous verdict was
ns-revieweror score < 9 without new passing round (ad-hoc / C2)Rejected - Success without verdict — ad-hoc / C2 closure without mandatory Final report fields and parseable line
Code Review: - Per-task / mid-batch review under handoff — /
reviewer-agentduringns-reviewertask or batch (parent owns Step 5)run-implementation