nubos-pilot 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nubos-pilot",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "AI-driven planning and execution tool for code projects",
5
5
  "homepage": "https://github.com/Nubos-AI/nubos-pilot",
6
6
  "repository": {
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  command: np:plan-phase
3
3
  description: Creates PLAN.md for a phase with a 2-iteration planner ↔ plan-checker verification loop.
4
+ argument-hint: <phase-number> [--research]
4
5
  ---
5
6
 
6
7
  # np:plan-phase
@@ -17,6 +18,27 @@ promotion triggers fire per Plan 05-04).
17
18
 
18
19
  ## Initialize
19
20
 
21
+ ### Parse Arguments
22
+
23
+ Positional: `<phase-number>`. Flags: `--research` (auto-run `/np:research-phase`
24
+ when RESEARCH.md is missing, instead of prompting via Gate 2).
25
+
26
+ ```bash
27
+ PHASE=""
28
+ RESEARCH_FLAG=0
29
+ for arg in "$@"; do
30
+ case "$arg" in
31
+ --research) RESEARCH_FLAG=1 ;;
32
+ --*) echo "Unknown flag: $arg" >&2; exit 2 ;;
33
+ *) [[ -z "$PHASE" ]] && PHASE="$arg" ;;
34
+ esac
35
+ done
36
+ if [[ -z "$PHASE" ]]; then
37
+ echo "Usage: /np:plan-phase <phase-number> [--research]" >&2
38
+ exit 2
39
+ fi
40
+ ```
41
+
20
42
  ```bash
21
43
  INIT=$(node np-tools.cjs init plan-phase init "$PHASE")
22
44
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
@@ -68,7 +90,21 @@ esac
68
90
 
69
91
  ### Gate 2 — Missing RESEARCH.md
70
92
 
71
- If `has_research == false` AND workflow config requires it:
93
+ If `has_research == false` AND workflow config requires it.
94
+
95
+ **When `--research` flag is set:** skip the interactive prompt. The
96
+ orchestrator MUST first dispatch `/np:research-phase $PHASE`, wait for it to
97
+ commit RESEARCH.md, then re-run the **Initialize** block above to refresh
98
+ `has_research` before continuing. No Gate 2 question is shown.
99
+
100
+ ```bash
101
+ if [[ "$has_research" == "false" && "$RESEARCH_FLAG" == "1" ]]; then
102
+ echo "research-auto: dispatching /np:research-phase $PHASE before planning" >&2
103
+ exit 42
104
+ fi
105
+ ```
106
+
107
+ Otherwise (flag not set), prompt the user:
72
108
 
73
109
  ```bash
74
110
  CHOICE=$(node np-tools.cjs askuser --json '{
@@ -87,6 +123,10 @@ case "$CHOICE" in
87
123
  esac
88
124
  ```
89
125
 
126
+ **Exit code 42 contract:** when the orchestrator sees exit 42, it MUST run
127
+ `/np:research-phase $PHASE` and then re-enter `/np:plan-phase $PHASE`
128
+ (without the `--research` flag — `has_research` will now be `true`).
129
+
90
130
  ### Gate 3 — PLAN.md already exists
91
131
 
92
132
  If `has_plan == true`:
@@ -342,10 +382,13 @@ PLAN.md + `tasks/` are gone, PLAN-REVIEW.md preserved. Exit 1.
342
382
  Return to the orchestrator:
343
383
 
344
384
  ```
345
- status: passed | committed-with-warnings | aborted | manual-edit
385
+ status: passed | committed-with-warnings | aborted | manual-edit | research-dispatched
346
386
  iterations: 1 | 2 | 3
347
387
  plan_path: <absolute path to PLAN.md, or null on abort>
348
388
  review_path: <absolute path to PLAN-REVIEW.md>
349
389
  promoted: true | false
350
390
  triggers: [parallelism, mixed-tiers, non-linear-deps]
351
391
  ```
392
+
393
+ `research-dispatched` (exit 42) signals the orchestrator to run
394
+ `/np:research-phase $PHASE` and re-enter `/np:plan-phase $PHASE` afterwards.