@nolto/cli 0.18.0 → 0.19.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.
@@ -1,90 +1,34 @@
1
1
  ---
2
2
  name: roadmap-progress
3
- description: Maintain a project's server roadmap through the Nolto CLI and its external cache as work starts, completes, becomes blocked, or is replanned. Use when Codex or Claude plans project phases and tasks, begins or finishes an implementation task, reports project progress, records a blocker, or needs to keep the Roadmap Viewer current. Do not mark work done without verification. Attach plan documents to tasks with the plan command.
3
+ description: Maintain the Nolto server roadmap through the CLI as work starts, completes, becomes blocked, or is replanned. Verify before marking done; attach plans with the plan command.
4
4
  ---
5
5
 
6
6
  # Roadmap Progress
7
7
 
8
- Keep the Nolto server roadmap synchronized with verified repository work. The server is the source of truth; the CLI keeps an external JSON cache for reading and structural edits.
8
+ The server is the source of truth; the CLI keeps an external JSON cache for reading and structural edits.
9
+ Use `nolto roadmap --help` and `nolto roadmap <cmd> --help` for commands and options.
9
10
 
10
- コミット件名に課題キー(例: NOLTO-50)を含めると、`nolto sync` がコミット / PR を課題に紐づけます(Git 連携スコープが必要)。
11
+ ## Workflow
11
12
 
12
- ## Resolve the roadmap
13
+ - Resolve: use the requested slug and `nolto roadmap path [slug]`. If `nolto.json` is missing, run `nolto init`; never invent project scope. Migrate legacy repo files with `nolto roadmap migrate`.
14
+ - Status: run `nolto roadmap status [slug]`; report completed/total tasks, current work, blockers, and the next todo whose dependencies are done.
15
+ - Start: run `nolto roadmap start <task-id> [--slug slug] [--note text]` before implementation. Sync dirty structural edits before task PATCH commands.
16
+ - Done: only after verification succeeds, run `nolto roadmap done <task-id> [--slug slug] [--note text]`. Otherwise keep in progress or block.
17
+ - Block: run `nolto roadmap block <task-id> [--slug slug] --note text`; describe the blocker and what will unblock it.
18
+ - Replan: read `nolto roadmap schema` before structural changes. Edit the JSON from `path`, preserve IDs, then run `nolto roadmap validate [slug]` and `nolto roadmap sync [slug]`.
19
+ On 409, save unsynced edits, `nolto roadmap pull [slug]`, review and reapply changes. Use `--force` only after saving needed edits.
20
+ - Plan / summary: use `nolto roadmap plan <task-id> [--slug slug] --path <repo-relative-md>` and `nolto roadmap summary [slug] --text text`; do not edit state, notes, plan links, or summary directly.
13
21
 
14
- 1. Use the roadmap slug named by the user when provided. Run `nolto roadmap path [slug]` to get the absolute cache JSON path. With multiple cached roadmaps, select a slug; task commands use `--slug <slug>`.
15
- 2. If `nolto.json` is missing, guide the user to `nolto init`. Do not invent project scope.
16
- 3. If legacy repo-local roadmaps remain, guide the user to `nolto roadmap migrate`. It preserves the source files and prints cleanup instructions.
17
- 4. Read [references/schema.md](references/schema.md) before creating phases or tasks, changing IDs, or repairing validation errors.
22
+ ## Issues
18
23
 
19
- ## Choose the workflow
20
-
21
- ### Report status
22
-
23
- Read without modifying. Summarize overall completed/total tasks, current task, blocked tasks, and the next actionable todo whose dependencies are done. Run the bundled CLI `status` command when practical.
24
-
25
- ### Start work
26
-
27
- Before implementation, run `roadmap.mjs start <task-id> [--note text] [--summary text]`. The CLI sends a task PATCH. The server manages task timestamps, phase status, and the calling user's current task.
28
-
29
- ### Complete work
30
-
31
- Run relevant verification first. Only after verification succeeds, run `roadmap.mjs done <task-id> [--note text] [--summary text]`. If verification fails, keep the task in progress or use `block` with a concrete note.
32
-
33
- ### Record a blocker
34
-
35
- Run `roadmap.mjs block <task-id> --note text [--summary text]`. State the dependency or decision preventing progress and what will unblock it.
36
-
37
- ### Replan
38
-
39
- Edit the JSON returned by `nolto roadmap path [slug]` for structural changes: add, remove, rename, or reorder phases and tasks, or change `dependsOn` and `issues`. Preserve task IDs. Run `nolto roadmap validate [slug]`, then `nolto roadmap sync [slug]`.
40
-
41
- On a 409 conflict, save unsynced edits, use `nolto roadmap pull [slug]` to refresh, and review the affected tasks before reapplying changes. Pull protects dirty caches; use `--force` only after saving the edits you need.
42
-
43
- ### Attach a plan or update the summary
44
-
45
- Run `roadmap.mjs plan <task-id> --path <repo-relative-md>` to PATCH the link and sync the plan document. Run `roadmap.mjs summary [slug] --text text` to update the summary and sync it with PUT. Do not directly edit state, notes, plan links, or summary for these workflows.
46
-
47
- ### Work with issues
48
-
49
- When issue work is authorized, first search for duplicates with `nolto issue list --q "<keyword>" --closed include`.
50
- Create with `nolto issue create --subject "…"`. Add the returned key to the task’s `issues` in the cache, then validate and sync using the Replan workflow. The legacy `issue create --phase` option still edits repository files; do not use it for the external cache.
51
- After implementing and verifying a fix, record the transition and explanation with `nolto issue update <key> --status <name> -m "…"`; use `nolto issue comment <key> -m "…"` for a separate progress note.
52
- Close verified work with `nolto issue close <key> -m "…"`.
53
- If linking fails after issue creation, repair the existing key in the cache; do not create another issue.
54
- On HTTP 429, wait the `Retry-After` seconds and retry once only.
55
- A 403 `token_scope` / `token_project` requires a suitably scoped token from the user; inspect `nolto whoami` and request access rather than retrying the same operation.
56
- See [references/issue-cli.md](references/issue-cli.md) for commands, options, examples and exit codes.
57
-
58
- ## Use the bundled CLI
59
-
60
- Resolve the script relative to this `SKILL.md`. Common repository installs are:
61
-
62
- - Codex: `node .agents/skills/roadmap-progress/scripts/roadmap.mjs ...`
63
- - Claude Code: `node .claude/skills/roadmap-progress/scripts/roadmap.mjs ...`
64
-
65
- Supported commands:
66
-
67
- ```text
68
- roadmap.mjs path [slug]
69
- roadmap.mjs status [slug] [--fresh]
70
- roadmap.mjs validate [slug]
71
- roadmap.mjs start <task-id> [--slug slug] [--note text] [--summary text]
72
- roadmap.mjs done <task-id> [--slug slug] [--note text] [--summary text]
73
- roadmap.mjs block <task-id> [--slug slug] --note text [--summary text]
74
- roadmap.mjs todo <task-id> [--slug slug] [--note text]
75
- roadmap.mjs summary [slug] --text text
76
- roadmap.mjs plan <task-id> [--slug slug] --path <repo-relative-md>
77
- roadmap.mjs events [slug] [--since revision] [--limit number]
78
- ```
79
-
80
- The wrapper invokes `nolto roadmap`; install `@nolto/cli` if `nolto` is unavailable. `--file` is no longer supported. Task changes use PATCH; structural edits and summaries use PUT. Dirty structural changes must be synced before a task PATCH. `--summary` on start/done/block runs a separate summary command only after the task command succeeds.
24
+ When issue work is authorized, search for duplicates before creating with `nolto issue list --q "<keyword>" --closed include`.
25
+ Add the returned issue key to the task's `issues` in the cache, then validate and sync; do not use the legacy `issue create --phase` workflow for the cache.
26
+ See `nolto issue --help` for details. Commit subjects containing issue keys let `nolto sync` link commits / PRs (Git integration scope required).
81
27
 
82
28
  ## Guardrails
83
29
 
84
30
  - Verify the work before changing issue status. Decide roadmap task completion and issue closure separately.
85
-
86
31
  - `issues` items must be issue keys like `NOLTO-12`, unique; put them on tasks only.
87
-
88
32
  - `schemaVersion` is 3. Legacy v1/v2 files still validate; `nolto roadmap migrate` upgrades repository files into the cache. Never edit `schemaVersion` by hand.
89
33
  - The roadmap commands write to Nolto. `nolto issue` writes to Nolto when issue work is authorized; `nolto roadmap sync` / `nolto watch` publishes structural cache edits.
90
34
  - Use only `todo`, `in-progress`, `done`, and `blocked`. Convert legacy `in_progress` when touching that entry.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Roadmap Progress"
3
- short_description: "Keep local project roadmaps accurate and current"
3
+ short_description: "Keep the Nolto server roadmap current through the CLI"
4
4
  default_prompt: "Use $roadmap-progress to update this project roadmap after completing the current task."
@@ -2,27 +2,7 @@
2
2
  import { spawnSync } from "node:child_process";
3
3
 
4
4
  const args = process.argv.slice(2);
5
- if (args.some(arg => arg === "--file" || arg.startsWith("--file="))) {
6
- console.error("roadmap-progress: --file is no longer supported; roadmaps live in the nolto cache (nolto roadmap path)");
7
- process.exit(1);
8
- }
9
5
  if (!args.length) args.push("status");
10
- let summary;
11
- if (["start", "done", "block"].includes(args[0])) {
12
- for (let i = 1; i < args.length; i++) {
13
- if (args[i] === "--summary") {
14
- if (args[i + 1] === undefined || args[i + 1].startsWith("--")) {
15
- console.error("roadmap-progress: --summary requires text");
16
- process.exit(1);
17
- }
18
- summary = args[i + 1];
19
- args.splice(i--, 2);
20
- } else if (args[i].startsWith("--summary=")) {
21
- summary = args[i].slice("--summary=".length);
22
- args.splice(i--, 1);
23
- }
24
- }
25
- }
26
6
  function run(mapped) {
27
7
  const child = spawnSync(process.env.NOLTO_BIN || "nolto", ["roadmap", ...mapped], { stdio: "inherit" });
28
8
  if (child.error) {
@@ -32,15 +12,4 @@ function run(mapped) {
32
12
  }
33
13
  return child.status ?? 1;
34
14
  }
35
- let code = run(args);
36
- if (code === 0 && summary !== undefined) {
37
- const mapped = ["summary"];
38
- const slugIndex = args.indexOf("--slug");
39
- const slugOption = args.find(arg => arg.startsWith("--slug="));
40
- if (slugIndex !== -1) mapped.push(args[slugIndex + 1]);
41
- else if (slugOption) mapped.push(slugOption.slice("--slug=".length));
42
- mapped.push("--text", summary);
43
- if (args.includes("--json")) mapped.push("--json");
44
- code = run(mapped);
45
- }
46
- process.exitCode = code;
15
+ process.exitCode = run(args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolto/cli",
3
- "version": "0.18.0",
3
+ "version": "0.19.1",
4
4
  "description": "CLI for syncing repository roadmaps with Nolto.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,46 +0,0 @@
1
- # Issue CLI reference
2
-
3
- All commands accept global `--project <id>`, `--json`, `--token <value>` and `--base-url <url>`.
4
- Project priority: flag → NOLTO_PROJECT → nearest ancestor nolto.json → config defaultProjectId. Git is not required. An invalid nolto.json remains an error.
5
- References accept a key (NOLTO-12) or number (12). Only the number is sent: a different key prefix does not protect against acting on the same number in the selected project.
6
-
7
- | Command | Options |
8
- |---|---|
9
- | `issue list` | `--status <names...>`, `--assignee me/none/UUID`, `--closed exclude/include/only`, `--q`, `--sort updated/due/priority/number/created/assignee/status/type/subject`, `--order asc/desc`, `--page`, `--type`, `--priority high/normal/low`, `--category`, `--parent <ref-or-none>` |
10
- | `issue view <ref>` | Global options |
11
- | `issue create` | Required `--subject`; `--body` or `--body-file` (`-` for stdin); `--type`, `--status`, `--priority`, `--assignee`, `--due YYYY-MM-DD`, `--category <names...>`, `--parent <ref>`, `--phase <task-id>`, `--roadmap <slug>` |
12
- | `issue update <ref>` | Same field options as create, subject optional; `--no-due`, `--no-parent`, `-m/--comment`; no phase/roadmap options |
13
- | `issue comment <ref>` | `-m/--comment <text>` or `--body-file <path-or-dash>` |
14
- | `issue close <ref>` | `--status <closed-name-or-UUID>`, `-m/--comment <text>` |
15
-
16
- Status/type/category accept case-insensitive exact names or UUIDs from the project's settings. Unknown or ambiguous names list candidates. Create with `--type` and no body uses that type's body template. Update never inserts a template automatically. Close chooses the first closed status by sortOrder unless overridden; it fails if no matching closed status exists. `--assignee me` on writes resolves /api/me/profile; none clears the assignee.
17
-
18
- List output is one line per issue plus `n / total (page p)`. View includes body and comments with API-token provenance. Writes print the issue key and URL. `--json` preserves API responses: list `{ issues, total, page, pageSize }`, view the full bundle, create `{ issue }`, update/close `{ issue, comment }`, comment `{ comment }`. Successful create with phase additionally returns `roadmap: { file, taskId }`. Human template creation adds `body: from template`. `whoami` adds scopes (null displayed as full) and project binding; JSON uses tokenScopes/tokenProject when introspection succeeds. Introspection failure is non-fatal and retains the old output.
19
-
20
- `--phase` refers to a **task ID**, not a phase ID. It adds the issue key to task.issues in the selected local roadmap, avoids duplicates, upgrades legacy schema v1 to v2 on change and refreshes updatedAt with a local timezone offset. Run `nolto sync` afterward. If multiple roadmaps exist, use --roadmap (without .json). A local failure occurs after issue creation: the error includes the created key; repair the link instead of repeating create.
21
-
22
- | Exit | Meaning |
23
- |---|---|
24
- | 0 | Success |
25
- | 2 | Invalid input, recognized API 404, HTTP 422 (details shown), or local roadmap failure after creation |
26
- | 3 | HTTP 401/403; token_scope/token_project includes a token settings hint |
27
- | 4 | HTTP 402/429 (quota/rate limit). API token writes: 60/minute. On 429, wait Retry-After seconds before retrying. |
28
- | 5 | Network/generic HTTP errors, including a 404 without an API error string |
29
-
30
- Examples:
31
-
32
- ```bash
33
- nolto issue list --q "login" --closed include
34
- nolto issue create --subject "Fix login" --type Bug --phase r4.t2 --roadmap release
35
- nolto sync
36
- ```
37
-
38
- ```bash
39
- nolto issue update NOLTO-12 --assignee me --status "In Progress" -m "Reproduced and implementing"
40
- nolto issue comment NOLTO-12 --body-file notes.md
41
- ```
42
-
43
- ```bash
44
- nolto issue close NOLTO-12 -m "Verified: regression tests pass"
45
- nolto issue view NOLTO-12 --json
46
- ```