Appearance
Planning Workflows
Commands that set up the project, capture decisions, and author plans.
np:new-project
Greenfield init with archive-aware detection. The run has five internal stages, labelled Phase -1 through Phase 3.
These
Phase Nlabels are stages of thenew-projectworkflow run, not milestones. Elsewhere in the CLI "phase" is a synonym for a milestone (/np:plan-phase <N>plans milestoneM<N>); thenew-projectstage numbering is a separate, workflow-internal sequence.
- Phase -1 — Detect & Archive. Checks whether
.nubos-pilot/PROJECT.mdalready exists. If it does, the workflow surfaces completion status (complete | incomplete | no-project) plus a blocker list and asks the user via the askuser gateway:Archive and start fresh(moves the project intoarchive/<slug>-<YYYYMMDD>/) |Close project first, then ask(chains into/np:close-project) |Abort. On an incomplete project the workflow demands a second confirmation before passing--forceto the archiver. By defaultlearnings/andsolutions/are carried over so the new project inherits prior knowledge; opt out with--no-carry-over. - Phase 0 — Workspace Scan. Deterministic inventory probe (
workspace-scan --summary). - Phase 1 — Bootstrap Interview. Five-question structural ask.
- Phase 2 — Project Discovery. Chains into
/np:discuss-project --bootstrap(obligatory). - Phase 3 — Additional Milestones. Proposes M002, M003 … from Discovery.
The five Phase 1 questions:
project_namecore_value— one sentence that must hold true even if everything else failsprimary_constraints— comma-separated (e.g. "Node 22; markdown-first")first_milestone_name— e.g. "Auth & Basic UI"first_milestone_goal— one sentence
Writes:
.nubos-pilot/PROJECT.md.nubos-pilot/REQUIREMENTS.md.nubos-pilot/RULES.md— project-wide always-follow rules (Always-Follow / Forbidden / Dependencies / Security / Logging / Style / Out-of-Scope). Every agent reads this before action; precedence isRULES.md(global) >M<NNN>-CONTEXT.md(phase-locked) >S<NNN>-PLAN.md(slice-scoped) > defaults..nubos-pilot/roadmap.yaml(schema_version: 2, first milestoneM001with emptyslices: []).nubos-pilot/STATE.md(milestone =M001, milestone_number = 1).nubos-pilot/milestones/M001/M001-CONTEXT.md.nubos-pilot/milestones/M001/M001-ROADMAP.md.nubos-pilot/milestones/M001/M001-META.json.nubos-pilot/milestones/M001/slices/(empty subdirectory)
Chains automatically into /np:discuss-project and, when the workspace has source files, suggests /np:scan-codebase before planning.
np:new-milestone
Appends a new milestone M<NNN> to an existing project. Three-question interview: milestone_name, milestone_goal, create_req_prefix. Auto-numbers from the highest existing milestone in roadmap.yaml. Scaffolds milestones/M<NNN>/ with fresh CONTEXT/ROADMAP/META files and an empty slices/ subdirectory. Never touches PROJECT.md.
np:archive-project
Verbs: status (read-only — emits project-exists + completion JSON), do (move into archive/<slug>-<YYYYMMDD>/, suffix -2, -3, … on same-day collision), list (newest-first manifest list), read --name <archive-name> --rel <relative-path> (path-traversal-safe file read from a single archive). Flags on do: --force (archive even if computeCompletionStatus reports blockers; manifest records forced: true), --carry-over <a,b> (default learnings,solutions — copies originals into the archive AND keeps them top-level for the next project), --no-carry-over.
What gets moved into the archive (ARCHIVED_ITEMS in lib/archive.cjs): PROJECT.md, REQUIREMENTS.md, RULES.md, ROADMAP.md, STATE.md, roadmap.yaml, plus directories milestones/, codebase/, messages/, threads/, handoffs/, todos/, reports/, knowledge/, session/. What stays top-level: config.json (workspace config), archive/ itself, .tmp/, state/ (knowledge index), worktrees/, memory/ (vector store). Active worktrees abort the archive unless --force is set. Each archive contains an ARCHIVE.json manifest with archived_at, project_name, completion_status, milestones_count, blockers_at_archive, moved, carried_over, forced.
np:propose-milestones
Re-plans the not-yet-done milestone pipeline against the current PROJECT.md and REQUIREMENTS.md. Where /np:new-project creates the initial scaffold and /np:new-milestone appends a single milestone by hand, this workflow re-examines the whole open pipeline and proposes an updated sequence as add / update / remove operations. The user reviews each operation; the subcommand applies the accepted ones atomically inside one file-lock on roadmap.yaml.
Strict invariants:
- Never writes
PROJECT.md(D-29; enforced by the subcommand's_writeFileguard). - Never modifies completed milestones (
status: done | complete | completed); raisesmilestone-completed-untouchable. - Never modifies milestones that already have slices unless
confirm_force_modify: trueis passed; raisesmilestone-has-slices. - Never touches
M<NNN>-CONTEXT.mdof existing milestones (onlynameandgoalinroadmap.yamlchange; CONTEXT.md is the user's/np:discuss-phasework and stays preserved). - Refuses to run while
PROJECT.mdstill has_TBDplaceholders.
Operation semantics:
addtakes the same path asnp:new-milestone --apply: appends toroadmap.yaml, createsM<NNN>/with TBD CONTEXT/ROADMAP/META and an emptyslices/.updatemutatesnameand/orgoalof an existing entry inroadmap.yaml.removedrops the entry fromroadmap.yamland movesM<NNN>/to.nubos-pilot/archive/milestones/M<NNN>-<YYYY-MM-DD>/(never hard-deletes).
bash
/np:propose-milestones
/np:propose-milestones --apply <answers.json>Both add and remove auto-renumber as M<next> (next = max(existing) + 1) for added items.
np:discuss-project
Project-level context interview. Populates the PROJECT.md decision log sections. Runs once per project; the output guides every downstream milestone.
np:discuss-phase <N>
Milestone-level decision interview. "Phase" in the command name = milestone M<N>. Adaptive question flow over gray areas; writes M<NNN>-CONTEXT.md with:
- Locked decisions (
D-01,D-02, …) — non-negotiable; every downstream task must honor them. - Deferred ideas — explicitly parked for a later milestone.
- Claude's discretion — Claude picks and documents the choice in the task action.
Guard: if M<NNN>-CONTEXT.md already exists, prompts Overwrite / Append-update / Abort.
np:research-phase <N>
Milestone-level technical research. Spawns np-researcher (tier=sonnet). Produces M<NNN>-RESEARCH.md with stack, patterns, pitfalls, security domain, sources.
When WebFetch + Context7 are both unavailable, the researcher enters the Offline-Confirm Protocol: asks the user whether to proceed with local-only sources, and if yes, writes a ## Research Coverage annotation documenting what was local-only.
np:architect-phase <N> (optional)
Optional ADR step between /np:research-phase and /np:plan-phase. Spawns np-architect (tier=sonnet) which reads M<NNN>-RESEARCH.md + M<NNN>-CONTEXT.md + RULES.md + .nubos-pilot/codebase/INDEX.md and emits exactly one file: M<NNN>-ARCHITECTURE.md with module boundaries, a data-flow sketch, and 3–7 ADR-style decisions (D-arch-N).
Run when the milestone introduces structural change (new module, new boundary, new data flow), when CONTEXT marks architecture_review: required, or when RESEARCH flags ≥ 3 [ASSUMED] claims in the architecture-patterns dimension. Skip it for additive-only milestones; the planner handles those without an architecture pass.
bash
/np:architect-phase 1Output is read by the planner as an extension of CONTEXT — locked. If a proposed decision would violate M<NNN>-CONTEXT.md or RULES.md, the agent emits ## CONTEXT CONFLICT and stops without writing the file; resolve via /np:discuss-phase <N> re-open.
np:plan-phase <N>
The planner + plan-checker + scaffolder pipeline. Input: milestone number N.
- Init — reads
roadmap.yaml, milestone dir state, prior CONTEXT + RESEARCH. - Gate 1 — if
M<NNN>-CONTEXT.mdmissing:Run /np:discuss-phase first / Continue / Abort. - Gate 2 — if RESEARCH missing and flag says required:
Run /np:research-phase first / Skip / Abort(or auto-dispatch with--research). - Gate 3 — if any slice already has
S<NNN>-PLAN.md:Overwrite / Repromote / Abort. - Verification loop (max 2 iterations):
- spawn
np-planner(tier=opus) — writesM<NNN>-ROADMAP.md+ per sliceS<NNN>-{ASSESSMENT,PLAN,UAT}.md - spawn
np-plan-checker(tier=opus) — returns YAML verdict - on
issues_found: planner re-runs in revision mode with findings - every iteration appends to
M<NNN>-PLAN-REVIEW.md(byte-level append-only)
- spawn
- Scaffold —
scaffold-all-taskswalks every slice'sS<NNN>-PLAN.md, extracts<task>blocks, createstasks/T<NNNN>/T<NNNN>-PLAN.md+T<NNNN>-SUMMARY.md. - Commit — single
docs(M<NNN>): milestone plan ready for execute.
Flags:
--research— auto-dispatch/np:research-phase <N>before planning if RESEARCH.md is missing.--repromote— skip gates + planner; just re-scaffold task files from existing slice plans.
np:agent-skills
Prints the agent_skills config for a given subagent (the additional skill files it should load). Used by other workflows when building the spawn prompt.
Task XML format (planner output)
Each <task> block inside a S<NNN>-PLAN.md MUST carry four attributes on the opening tag:
<task id="M001-S001-T0001" depends_on="" wave="1" tier="sonnet">
<name>Seed login form</name>
<files>src/auth/LoginForm.tsx</files>
<action>…</action>
<verify><automated>npm test -- LoginForm</automated></verify>
<done>Form renders and test passes.</done>
</task>id— full-idM<NNN>-S<NNN>-T<NNNN>matching the enclosing slice.depends_on— comma-separated full-ids of earlier-slice tasks, or empty. Never same-slice (intra-slice tasks are parallel by contract).wave— integer equal to the slice number.tier—haiku | sonnet | opus.
The scaffolder reads only these opening-tag attributes. If any one is missing, the task is silently dropped from the task files.
