@nolto/cli 0.11.0 → 0.13.0
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/README.md +81 -8
- package/dist/index.js +735 -262
- package/dist/skill/roadmap-progress/SKILL.md +19 -2
- package/dist/skill/roadmap-progress/references/issue-cli.md +46 -0
- package/dist/skill/roadmap-progress/references/schema.md +8 -5
- package/dist/skill/roadmap-progress/scripts/roadmap.mjs +14 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,18 +79,61 @@ paths, and sends an idempotent full upsert to the bound project. A legacy
|
|
|
79
79
|
`.roadmap/roadmap.json` is migrated by `nolto sync` when no canonical roadmap
|
|
80
80
|
exists; `nolto watch` only warns and never migrates.
|
|
81
81
|
|
|
82
|
+
Optional task-only `issues` is an array of unique uppercase keys matching `^[A-Z][A-Z0-9]{1,9}-[1-9][0-9]{0,8}$` (for example `NOLTO-12`); empty arrays are allowed.
|
|
83
|
+
|
|
84
|
+
Timestamp fields (`updatedAt`, `startedAt`, and `completedAt`) must be RFC 3339 with a timezone offset (`2026-09-02T10:00:00+09:00` or `2026-09-02T01:00:00Z`); offset-less and date-only values are rejected. `dependsOn` items must be unique strings matching `^[a-z0-9][a-z0-9._-]*$`, and names, titles, and IDs must be actual strings.
|
|
85
|
+
|
|
86
|
+
The shared proxy rejects a sync request body over 10 MB with HTTP `413`. Free
|
|
87
|
+
plan documents are already limited to 2 MB per roadmap before that shared cap.
|
|
88
|
+
|
|
82
89
|
`watch` uses the repository registry maintained by `nolto init`. Missing registered
|
|
83
90
|
repositories are skipped with a warning.
|
|
84
91
|
The CLI warns when an installed `roadmap-progress` skill version differs from the
|
|
85
92
|
CLI version; run `nolto init` in that repository to refresh it.
|
|
86
93
|
|
|
87
|
-
Use `nolto diff [slug]` before pushing to
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
Use `nolto diff [slug]` before pushing to compare task status changes, added or
|
|
95
|
+
removed tasks and phases, and roadmap `updatedAt`, `currentTaskId`, and `summary`.
|
|
96
|
+
It does not compare `title`, `note`, `plan`, `dependsOn`, `issues`, project metadata, or
|
|
97
|
+
ordering; use `git diff` for those. It exits with code 1 when differences are
|
|
98
|
+
found and does not change either side. `nolto pull [slug]` downloads all server
|
|
99
|
+
roadmaps, or one named roadmap, and intentionally overwrites the corresponding
|
|
100
|
+
local files after validation. It never deletes local-only roadmaps. Add `--merge`
|
|
101
|
+
to preserve valid local changes using a deterministic structural merge, and review
|
|
102
|
+
the result with `git diff` before committing.
|
|
103
|
+
|
|
104
|
+
After roadmap sync, the CLI reads the latest 300 commits, extracts uppercase issue keys (for example `NOLTO-50`), and sends commit links. Subjects ending in `(#123)` or starting with `Merge pull request #123` also produce PR links. No issue key means no upload. Requests contain at most 500 links and 20 keys per link; longer sets are split without dropping associations. Titles and authors are capped at 500 characters. Repeated syncs are deduplicated on the server.
|
|
105
|
+
|
|
106
|
+
This requires `roadmap:sync` token permission and the project's `git_links` scope. Ingestion errors are warnings and do not fail roadmap sync. Disable with `nolto sync --no-git-links` or `NOLTO_GIT_LINKS=0` (also applies to watch). Watch collects at startup and on roadmap/plan changes, not on Git-only changes. Missing Git or a non-worktree is skipped. Counts distinguish newly linked rows, existing links, and unresolved keys (skipped). The log reads `git links: linked N (existing M, skipped K)`. JSON output includes `gitLinks: { linked, existing, skipped } | null`.
|
|
107
|
+
|
|
108
|
+
### Issues
|
|
109
|
+
|
|
110
|
+
All commands accept global `--project <id>`, `--json`, `--token <value>` and `--base-url <url>`.
|
|
111
|
+
Project priority: flag → NOLTO_PROJECT → nearest ancestor nolto.json → config defaultProjectId. Git is not required. An invalid nolto.json remains an error.
|
|
112
|
+
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.
|
|
113
|
+
|
|
114
|
+
| Command | Options |
|
|
115
|
+
|---|---|
|
|
116
|
+
| `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>` |
|
|
117
|
+
| `issue view <ref>` | Global options |
|
|
118
|
+
| `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>` |
|
|
119
|
+
| `issue update <ref>` | Same field options as create, subject optional; `--no-due`, `--no-parent`, `-m/--comment`; no phase/roadmap options |
|
|
120
|
+
| `issue comment <ref>` | `-m/--comment <text>` or `--body-file <path-or-dash>` |
|
|
121
|
+
| `issue close <ref>` | `--status <closed-name-or-UUID>`, `-m/--comment <text>` |
|
|
122
|
+
|
|
123
|
+
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.
|
|
124
|
+
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
`--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.
|
|
128
|
+
|
|
129
|
+
| Exit | Meaning |
|
|
130
|
+
|---|---|
|
|
131
|
+
| 0 | Success |
|
|
132
|
+
| 2 | Invalid input, recognized API 404, HTTP 422 (details shown), or local roadmap failure after creation |
|
|
133
|
+
| 3 | HTTP 401/403; token_scope/token_project includes a token settings hint |
|
|
134
|
+
| 4 | HTTP 402/429 (quota/rate limit). Token writes: 60/minute; wait Retry-After seconds before retrying. |
|
|
135
|
+
| 5 | Network/generic HTTP errors, including a 404 without an API error string |
|
|
136
|
+
|
|
94
137
|
|
|
95
138
|
## Merging roadmap conflicts
|
|
96
139
|
|
|
@@ -109,6 +152,32 @@ again for an existing repository. Git invokes the underlying command as:
|
|
|
109
152
|
nolto merge-file <ours> <theirs> --base <ancestor>
|
|
110
153
|
```
|
|
111
154
|
|
|
155
|
+
### Silent resolution rules
|
|
156
|
+
|
|
157
|
+
The merge driver emits no conflict markers and exits `0` unless the merged
|
|
158
|
+
output fails validation, in which case it exits `1`. Resolution is deterministic:
|
|
159
|
+
|
|
160
|
+
- For fields changed on both sides, the side with the newer `updatedAt` wins.
|
|
161
|
+
- `currentTaskId` comes from the newer side while it still points to an
|
|
162
|
+
`in-progress` task; otherwise the older side's value is used if it still
|
|
163
|
+
points to an `in-progress` task, and it is omitted when neither does.
|
|
164
|
+
- Task status priority is `done` (with `completedAt`) > `blocked` >
|
|
165
|
+
`in-progress` > `todo`.
|
|
166
|
+
- `startedAt` keeps the earliest value, `completedAt` keeps the latest value,
|
|
167
|
+
and `dependsOn` and `issues` are deduplicated unions (ours order, then new theirs entries).
|
|
168
|
+
- A deletion is honored only when both sides deleted the item.
|
|
169
|
+
- Phase order is ours first, followed by phases found only in theirs; phase
|
|
170
|
+
status is re-derived from the merged tasks.
|
|
171
|
+
|
|
172
|
+
Full diff coverage and interactive conflict display are tracked in
|
|
173
|
+
[#475](https://github.com/uruca-kk/nolto/issues/475).
|
|
174
|
+
|
|
175
|
+
### Legacy roadmap schema v1
|
|
176
|
+
|
|
177
|
+
Schema v1 remains accepted with a warning and has no sunset date. The next
|
|
178
|
+
`roadmap-progress` mutation upgrades it to v2 automatically. This compatibility
|
|
179
|
+
policy remains in place through CLI 1.0 and will be reconsidered then.
|
|
180
|
+
|
|
112
181
|
The result is written to `<ours>` as required by Git. Use
|
|
113
182
|
`nolto pull --merge [slug]` when the server has changes that should be combined
|
|
114
183
|
with a valid local roadmap before syncing.
|
|
@@ -149,6 +218,8 @@ Precedence: CLI flags > environment variables > `nolto.json` > config file > def
|
|
|
149
218
|
|
|
150
219
|
## JSON Output
|
|
151
220
|
|
|
221
|
+
`nolto issue … --json` returns the original API response; `create --phase` adds local `roadmap: { file, taskId }` metadata. `whoami` includes `tokenScopes` / `tokenProject` when token introspection succeeds.
|
|
222
|
+
|
|
152
223
|
Use the global `--json` option for machine-readable command output:
|
|
153
224
|
|
|
154
225
|
```bash
|
|
@@ -171,13 +242,15 @@ Errors are written to stderr:
|
|
|
171
242
|
|
|
172
243
|
## Exit Codes
|
|
173
244
|
|
|
245
|
+
Issue validation and API 404 with an error string exit 2; 422 includes details. Token scope/project denial exits 3 with a token-settings URL and whoami hint. A create/phase failure explicitly reports the already-created key.
|
|
246
|
+
|
|
174
247
|
| Code | Meaning |
|
|
175
248
|
|---|---|
|
|
176
249
|
| 0 | Success |
|
|
177
250
|
| 1 | Roadmap differences found (`nolto diff`) or unexpected command failure |
|
|
178
251
|
| 2 | Local input or file validation error |
|
|
179
252
|
| 3 | Authentication or authorization error |
|
|
180
|
-
| 4 | Rate limit response |
|
|
253
|
+
| 4 | Rate limit response, or plan / quota limit (HTTP 402). API token writes: 60/minute; server message and Retry-After are displayed. |
|
|
181
254
|
| 5 | Network, DNS, or server error |
|
|
182
255
|
|
|
183
256
|
## License
|