ns-autonomous
Original:🇺🇸 English
Translated
(NS) Autonomous execution engine — plans depth, resolves doubts from docs/specs, multi-agent work in an isolated worktree. Use for a local/pasted plan or "run this autonomously" without GitLab. Also Phase 2 under ns-execution-gitlab-issue (do not run standalone then). Not for single-step edits (ns-coder) or GitLab issues directly (ns-execution-gitlab-issue).
4installs
Sourcenextstage-brasil/skills
Added on
NPX Install
npx skill4agent add nextstage-brasil/skills ns-autonomousTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Code Autonomous
Harness-aware execution engine: decides planning depth, resolves doubts, dispatches multi-agent work, and closes the loop with a review gate — either as a standalone pipeline or as another skill's execution engine.
Workflow mode (mandatory)
Fixed workflow — named skill handoffs or harness project bridges (). Review gate: . MUST when available (else ); no platform Task persona substitutes. (MUST when available → ) must complete its full per-task cycle including the same review gate before a unit is considered done.
../../ns-harness/references/subagent-dispatch.md../ns-reviewer/references/review-gate-workflow.mdreviewer-agentns-reviewerC2coder-agentns-coderIsolation invariant (non-negotiable)
This skill never writes application code on the main product checkout, and never commits to / (or any base/), unless the human has explicitly instructed "do not create a new branch / work in place on the current branch" for this run.
mainmasterSOURCE_BRANCH- Standalone and Engine mode both require an isolated +
WORK_BRANCHbefore any implementation edit.WORKTREE_ROOT - If worktree creation fails, or CWD/branch is still the main checkout / base branch → stop. Do not "continue on main to unlock the plan".
- Sandbox restrictions (, Cursor agent runtime paths under
Operation not permitted) are not permission to violate this invariant..cursor/
Session boot
See . Complete Session boot (blocking) there before any other step in this skill.
../../ns-harness/references/session-boot.mdAfter session boot — Engine and Standalone
Engine mode: caller may have already completed Session boot in Phase 0 — re-read only if context is missing.
Standalone: you own Session boot before step 1 of the standalone pipeline.
session-boot.mdRouting (read first)
Entry priority table: . Standalone triggers: .
../../ns-harness/references/code-skill-routing.mdreferences/entry-triggers.md- Origin is a GitLab issue (or issue reference) → entry priority 1 — follow
ISSUE_URLend to end; this skill only runs as its Phase 2 engine (Engine mode below). Do not run the standalone pipeline, do not touch GitLab state, do not create a worktree.ns-execution-gitlab-issue - Standalone autonomous (local plan file, pasted text/plan, ad-hoc "implement this autonomously" without an issue) → entry priority 3 — run the standalone pipeline: own worktree, own state, own review loop.
See for Engine-mode I/O and anti-cycle rules with .
references/routing.mdns-execution-gitlab-issueEngine mode (invoked by ns-execution-gitlab-issue
)
ns-execution-gitlab-issueInputs (already resolved by the caller — this skill never creates them): issue payload, , , .
WORKTREE_ROOTWORK_BRANCHSOURCE_BRANCH- Planning-depth self-decision — evaluate the issue payload and decide single work unit vs. light +
requirements.md+tasks/task-NNN-*.mdunderexecution-plan.md. Seedocs/versions/{version_san}/.references/planning-decision.md - Doubt protocol — self-ask, docs-first lookup, self-answer non-destructive doubts, escalate destructive ones as a structured event to the caller instead of mutating GitLab state; pause dependent units until resumed. See .
references/doubt-resolution.md - Multi-agent dispatch — parse work units (or the single unit) and MUST dispatch when available (else
coder-agent) workers, parallel only across units with no DAG edge and disjoint file scopes, sequential otherwise. Every subagent works insidens-coder, never the main checkout. SeeWORKTREE_ROOTandreferences/multi-agent-dispatch.md.../../ns-harness/references/subagent-dispatch.md - Checkpoint commits — one commit per completed sequential unit or per completed parallel batch, inside the worktree; the caller squashes at delivery.
- Fix-loop entry point — when re-invoked after a verdict, treat the reviewer findings as a new work unit (or units) and repeat step 3 for those only.
Rejected - Return to caller: unit statuses, files changed, any open destructive doubt, and (first invocation only) a plan-based hint — the caller applies
estimate_secondsonly when the issue estimate is empty and the value is ≥ 60 (seeset_issue_estimate).../ns-execution-gitlab-issue/references/time-tracking.md
Standalone pipeline (non-GitLab origin)
Same internals as Engine mode, but this skill owns the whole run:
- Resolve the descriptor — local plan path or pasted text. No MCP calls.
- Infer (fix/feat), allocate
change_kind, create{version_san}.docs/versions/{version_san}/ - Create its own worktree: + branch
.worktrees/{version_san}/from the resolved base branch, followingwork/{version_san}. Path is under the repo root, never under../../ns-harness/references/worktree-setup.md. On failure → abort (do not fall back to the main checkout) — see.cursor/.references/standalone-pipeline.md - Planning-depth self-decision, doubt protocol (destructive doubt → chat-only gate, no GitLab actions available), multi-agent dispatch — identical logic to Engine mode.
- Internal review loop — : MUST invoke
../ns-reviewer/references/review-gate-workflow.mdwhen available (elsereviewer-agent) (version-closure mode) only; max 3 rounds;ns-reviewerrequires score ≥9/10 (ideal 10); fix units onApproved(Criticals or score ≤8), then mandatory re-review; stop onRejectedor rounds exhausted.Blocked - Report per Final report fields plus
review-gate-workflow.md, worktree path, commit(s), and follow-ups. No GitLab board, no MR — unless{version_san}exists and the human explicitly asked for one (out of scope for v1; standalone stays local-only otherwise).docs/context/gitlab-sync-config.md
See for the full flow.
references/standalone-pipeline.mdStop and ask the human
| Condition | Action |
|---|---|
| Destructive doubt (Engine mode) | Return escalation event to caller — no chat pause here |
| Destructive doubt (standalone) | Stop in chat, ask, resume with the answer as context |
Worktree conflict for the same | Stop unless explicit resume |
| Abort — report path attempted; never fall back to main checkout or |
Still on | Abort — isolation missing; do not implement |
| Human explicitly said "do not create a new branch / work in place" | Only then may edit the current branch; still never invent a |
| Base branch for standalone worktree unresolved | Stop — ask once |
Review | Stop, report as blocked — do not fabricate success |
| Engine mode invoked with a GitLab origin but no worktree/branch given | Stop — this is a caller contract violation, not a doubt |
Related skills
| Skill | Role |
|---|---|
| GitLab flow owner — calls this skill for Phase 2 |
| Subagent implementation via |
| Review gate via |
| Artifact layout, worktree mechanics, discovery |
References
| File | When |
|---|---|
| Issue vs. standalone; Engine-mode I/O and anti-cycle with |
| Priority 3 standalone entry phrases |
| Self-evaluation heuristic: single unit vs. requirements+tasks+plan |
| Self-ask, docs-first lookup, destructive criteria, escalation shape |
| DAG + disjoint-scope parallel rule, subagent prompt, checkpoint commits |
| Full non-GitLab flow: version alloc, own worktree, review loop |
Forbidden
- Review substitutes (,
senior-tech-lead-reviewer,bugbot, or any non-security-reviewgate) — harnessns-revieweris allowed; seereviewer-agent../ns-reviewer/references/review-gate-workflow.md - Reporting success without a passing verdict or explicit blocked state
ns-reviewer - Skipping re-review after a fix before closure
Rejected