Skip to content

CLI Commands

Every subcommand exposed by np-tools.cjs, mirrored from bin/np-tools/_commands.cjs (the canonical registry).

Dispatch has two layers:

  • init <workflow> — orchestrator workflows. Calls a registered handler in bin/np-tools/<name>.cjs (plan-milestone, execute-milestone, discuss-phase, new-project, …). An unknown init workflow returns unknown-init-workflow with exit code 1.
  • Top-level commands — utility and leaf commands (commit-task, checkpoint, metrics, doctor, …).

Output is JSON; payloads above 16 KB are spilled to .nubos-pilot/.tmp/init-<workflow>-<pid>-<rand>.json and the path emitted as @file:<path>.

Commands by category

Planning

CommandDescription
agent-skillsPrint agent_skills config for a given subagent
archive-projectMove current .nubos-pilot/ project to archive/<slug>-<YYYYMMDD>/ (status|do|list|read)
discuss-phaseAdaptive milestone-context interview (writes M<NNN>-CONTEXT.md)
discuss-projectAdaptive project-context interview (writes PROJECT.md decisions)
new-milestoneAppend a new milestone (M<NNN>) to an existing project
new-projectGreenfield project init (PROJECT.md + REQUIREMENTS.md + M001 milestone)
phase-metaRead roadmap.yaml phase fields as JSON (supports --field NAME and --length for arrays)
plan-lintMechanical Trust-Layer linter for PLAN.md (verify-command + parallel-race + over-specification). ADR-0019
plan-milestonePlan a milestone: scaffolds slices + tasks
propose-milestonesRe-plan all not-yet-done milestones: AI proposes add/update/remove from PROJECT.md + REQUIREMENTS.md
research-phaseMilestone-level research (WebFetch + MCP; offline fallback)
researcher-reconcileResearcher-swarm reconciliation (ADR-0018). Verbs: parse-spawn --file | prepare <N> | gate <N>. Reads per-spawn outputs, applies reasoning-trace classification, surfaces contested decisions, hard-gates on agreement_score / contested_count.
update-phase-metaUpdate roadmap.yaml phase fields (name/goal/requirements/success_criteria) via JSON patch

Execution

CommandDescription
add-testsPersist VERIFICATION Pass-cases as node:test UAT (Sentinel-preserving)
checkpointPer-task crash-safety checkpoint CRUD (start/transition/touch/show)
commit-taskAtomic per-task git commit via lib/git.cjs
execute-milestoneWave-based milestone execution — slice by slice, tasks parallel within a slice
learning-logPersist a learning to the local store (or MCP adapter when configured)
loop-audit-tool-useRecord/read the tool-use audit per spawn (Completeness Rule 9 mechanical check)
loop-evaluateRun evaluateLoop over critic outputs JSON; emit next_action + findings + routing
loop-preflightPer-task pre-flight cache lookup (ADR-0010 Step 1) — short-circuits the Researcher-Schwarm on hit
loop-run-roundDrive the per-task Nubosloop state machine — phases: preflight | post-executor | post-critics | commit | stuck
loop-state-readRead the per-task Nubosloop state from the checkpoint (round, last_action, findings)
loop-state-recordAtomically merge a partial Nubosloop state update into the task checkpoint
loop-stuckMark a task as stuck (writes loop-state + flips checkpoint status to stuck)
parkMark task status parked (lifecycle CRUD)
pause-workStamp STATE.session.stopped_at + resume_file for explicit handoff
reset-sliceDiscard in-flight task: restore working tree from HEAD, drop checkpoint, clear STATE.current_task
resume-workClassify session state (resume | orphan | clean) from STATE + checkpoints
skipMark task status skipped (lifecycle CRUD)
spawn-headlessSpawn an agent as a headless claude -p subprocess (ADR-0010 §L6); writes stdout to --output-path and returns exit code
undoRevert every task commit of a milestone or slice via git revert (no history rewrite)
undo-taskRevert a single task commit and reset task status to pending
unparkReturn a parked task to pending (lifecycle CRUD)
verify-workTwo-pass goal-backward verification (milestone-level VERIFICATION.md)
worktree-createCreate an isolated git worktree for a slice (branch np/<mid>-<sid> off current HEAD) under .nubos-pilot/worktrees/
worktree-ff-mergeFast-forward merge a slice branch back to its base (fails hard on non-FF)
worktree-listList all nubos-pilot-managed slice worktrees (np/<mid>-<sid> only) as JSON
worktree-removeRemove a slice worktree + delete its branch (--force / --keep-branch)

Review

CommandDescription
close-projectAggregate verification of every milestone; writes PROJECT-SUMMARY.md + sets project_status=completed
output-lintMechanical output-artifact linter (frontmatter + body + cross-field invariants). Verbs: check | prompt | list. Schemas in lib/schemas/. Hard-gates verify-work, validate-phase. ADR-0017

Capture

CommandDescription
add-todoCapture a pending todo to .nubos-pilot/todos/pending/ + increment STATE count
handoff-listList handoffs (JSON array); filter with --for AGENT, --milestone M<NNN>, --status STATUS, --global
handoff-readRead a single handoff by id (returns frontmatter + body as JSON)
handoff-statusUpdate a handoff status (open|read|acted|archived)
handoff-writeWrite an agent-to-agent handoff note (milestone-scoped by default, global without --milestone)
memory-addAdd a single record to vector memory (--type, --title, --body, optional --tags / --provenance / --phase / --id)
memory-indexBulk-index records into vector memory (--records JSON or --records-file JSONL). Opt-in via memory.enabled=true. ADR-0014
messages-archiveMove an inbox message to archive/; refuses request+expects_reply without prior response
messages-inboxList unread messages addressed to an agent (filterable by --kind, --since, --task)
messages-sendSend addressed inter-agent message (request|response|notify) to .nubos-pilot/messages/inbox/<to>/. ADR-0015
messages-threadPrint full reply-chain for a message id (causal order)
state-incrIncrement a whitelisted STATE.md counter (e.g. pending_todos) under withFileLock

Install

CommandDescription
doctor12-check install-integrity scan (--fix for auto-safe fixes)
scan-codebaseInitial deep codebase inventory → .nubos-pilot/codebase/ skill docs
update-docsRefresh stale module docs after code changes
workspace-scanScan a workspace and emit inventory JSON (full result or --summary shape for /np:new-project)

Utility

CommandDescription
askuserCapability-layer prompt wrapper (reads spec JSON, returns chosen label)
commitAtomic git commit wrapper with gitignore-guard
config-getRead value from .nubos-pilot/config.json by dotted key path
context-statsAggregated context-budget stats (file counts + bytes per group, knowledge-index size)
dashboardOne-shot console dashboard of milestones, slices, and tasks. Read-only; flags: --json, --no-color
detect-runtimePrint detected runtime id (claude, codex, gemini, …) — reads config.json ∨ env ∨ default
generate-slugSlugify text via lib/layout.cjs.slugify
helpList available commands
initDispatcher init payload for workflows
knowledge-indexBuild BM25-light index over .nubos-pilot/**/*.md → .nubos-pilot/state/knowledge-index.json
knowledge-searchQuery the knowledge index; returns top-N JSON hits (rel_path + lines + score + preview). Pass --task <id> inside a Nubosloop task to record Rule 9 audit evidence
knowledge-statsPrint knowledge-index size + grouping (auto-builds if missing)
lang-directivePrint workflow language directive from config.response_language (SSOT)
learning-listList learnings sorted by occurrence (most-used first)
learning-matchQuery the learnings store for cached patterns matching a free-text query
loop-metricsAggregate Nubosloop telemetry across all checkpoints (commits, stuck, route distribution)
memory-queryQuery vector memory by text; returns top-k JSON hits with score + record. Filter by --type, --phase, --tags
memory-rebuildForce full re-embed from records.jsonl; required after embedding-model change. ADR-0014
memory-statsPrint vector-memory stats (count, dim, model, schema_version, created_at)
metricsRecord JSONL metrics entry (record | now | start-timestamp | end-timestamp)
render-templateRender a shipped template by name with --vars JSON (or --vars-file PATH)
render-todoRender slice TODO.md rollup (checkbox view of task statuses) for a slice full-id
resolve-modelResolve agent/tier to model alias or id (Tier×Profile matrix)
session-aggregateAggregate session metrics under withFileLock; reads pointer .last-session unless --since overrides
session-pointer-writeAtomic write of .nubos-pilot/reports/.last-session under withFileLock (ISO-8601 UTC)
session-snapshot-readPrint last session snapshot as JSON
session-snapshot-writeCapture session snapshot (current_task + recent commits + open handoffs) for resume
statePrint the current project state snapshot
state-dirPrint project-state directory (.nubos-pilot) or a validated subdir via --subdir NAME
statsAggregated project stats — json | bar | markdown (markdown labels follow config.response_language)
template-pathPrint absolute path to a package-shipped template by name (e.g. VALIDATION, milestone/CONTEXT)
text-modePrint whether text mode is active (config.workflow.text_mode ∨ CLAUDECODE)
thread-resumeBump a thread markdown on resume (status OPEN→IN_PROGRESS, refresh last_resumed) via atomic write

The tables above are regenerated from bin/np-tools/_commands.cjs by scripts/generate-docs.cjs. To add a command, append an entry to that registry; the doc table picks it up on the next run.

Registry descriptions are one-line summaries. Where a command needs more detail, the dedicated reference or workflow page is authoritative. For example, np:doctor lists all 12 integrity checks.

User-facing workflow aliases

Three slash-commands preserve older naming for continuity. They dispatch to milestone-scoped init commands:

User-facingDelegates toNotes
/np:plan-phase <N>init plan-milestone init <N> + scaffolder"phase" = milestone in the command name
/np:execute-phase <N> [--verify-work]init execute-milestone init <N> [--verify-work] + per-task dispatchslice-by-slice, tasks parallel within slice; --verify-work chains /np:verify-work <N> on success
/np:validate-phase <N>Nyquist auditor → M<NNN>-VALIDATION.md
/np:close-projectinit close-project + askuser blocker gateproject-level aggregate verification; writes PROJECT-SUMMARY.md and flips project_status: completed
/np:architect-phase <N>spawns np-architectM<NNN>-ARCHITECTURE.mdoptional, between research and planning
/np:knowledge "<query>"wraps knowledge-index + knowledge-searchlocal full-text search over project markdown
/np:context-statswraps context-statslocalized markdown snapshot of the knowledge index