@swarmcraftai/cli 0.7.1 → 0.8.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/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to the SwarmCraft CLI are documented in this file.
4
4
 
5
+ ## 0.8.0
6
+
7
+ - Adds account-independent one-shot execution for selected local plans, phases, and task packets, with a preview before execution.
8
+ - Executes ordered packets with explicit prerequisites, request limits, recoverable checkpoints, and resume support.
9
+ - Records required or explicitly skipped checking and review stages, and pauses when human review is required.
10
+ - Adds scoped upgrades for existing packets and refreshes planning guidance to hand approved work to local execution while preserving unrelated files.
11
+
12
+ ## 0.7.2
13
+
14
+ - Simplifies the npm README and consolidates detailed workflow and provider guidance into their owning references.
15
+ - Command behaviour and help are unchanged from 0.7.1.
16
+
5
17
  ## 0.7.1
6
18
 
7
19
  - Adds account-independent project guidance and packet upgrades with preview, saved-provider preservation, conflict reporting, and recoverable writes.
package/README.md CHANGED
@@ -7,7 +7,7 @@ The CLI brings SwarmCraft workflows to your terminal. Use it to prepare a local
7
7
  ## Prerequisites
8
8
 
9
9
  - Node.js 20.19 or newer, npm, and Git.
10
- - A SwarmCraft account and a project with tasks ready to implement.
10
+ - For board-driven runs: a SwarmCraft account and a project with tasks ready to implement.
11
11
  - A local Git repository with unrelated changes committed or stashed.
12
12
  - Codex CLI, GitHub Copilot CLI, or Claude Code CLI installed and configured, or SwarmCraft Managed AI credits.
13
13
 
@@ -87,6 +87,20 @@ swarmcraft init --project <project-id> --workspace . --agent-provider codex
87
87
 
88
88
  `init` writes guidance and task files for review and leaves those changes uncommitted. Commit or otherwise resolve them before starting a run that requires a clean workspace. Updates preserve your edits to generated guidance and report conflicts that need attention.
89
89
 
90
+ ## Update repository guidance
91
+
92
+ For an existing project repository, preview the update before applying it:
93
+
94
+ ```bash
95
+ swarmcraft upgrade --workspace . --check
96
+ swarmcraft upgrade --workspace .
97
+ ```
98
+
99
+ This works offline, preserves your saved provider and local edits, and reports conflicts.
100
+ Review `git diff` before committing. Use `init` for first-time project setup and
101
+ `swarmcraft operate upgrade --help` for an Operate repository.
102
+ See the [project upgrade walkthrough](https://swarmcraft.ai/docs/build-and-ship/deliver-with-the-one-shot-cli).
103
+
90
104
  ## Choose an agent
91
105
 
92
106
  - **Claude Code subscription:** use `--agent-provider claude` after local Claude sign-in.
@@ -114,6 +128,11 @@ If a run reached its request limit, raise the total ceiling when resuming:
114
128
  swarmcraft resume --run <run-id> --workspace . --max-agent-requests 200
115
129
  ```
116
130
 
131
+ An already seeded repository and its packet skills remain usable with your own
132
+ assistant without an ongoing SwarmCraft account. Packet work and review can finish
133
+ locally. Hosted one-shot orchestration and Managed AI still require sign-in; optional
134
+ board syncing is provided by the SwarmCraft extension when connected.
135
+
117
136
  ## Other workflows
118
137
 
119
138
  For local operational work, initialize Work, Automate, and Formalise skills:
@@ -150,83 +169,37 @@ Support bundles redact credentials; Discovery bundles exclude source and package
150
169
 
151
170
  See the [one-shot walkthrough](https://swarmcraft.ai/docs/build-and-ship/deliver-with-the-one-shot-cli), [troubleshooting guide](https://swarmcraft.ai/docs/help-and-reference/troubleshoot-swarmcraft), or [contact support](https://swarmcraft.ai/login?next=%2Fapp%2Fsupport).
152
171
 
153
- ### Claude Code subscription runs
154
-
155
- Select `--agent-provider claude` for bootstrap, Operate, or one-shot. Install the
156
- standalone Claude Code CLI, run `claude auth login`, and confirm subscription
157
- usage in `/status`. The VS Code extension alone does not install the terminal
158
- command. SwarmCraft checks the effective `claude.ai` login without retaining
159
- its output and rejects provider credential flags on this subscription path.
160
-
161
- One-shot invokes `/swarmcraft-do` and `/swarmcraft-check` with `dontAsk`:
162
- configure the necessary tool permissions in Claude before running; unapproved
163
- tools are denied. The default never enables permission bypass or API-only bare
164
- mode. Claude keeps ownership of login storage and sandbox settings. Use
165
- `--max-agent-requests` to bound invocations; subscription limits still apply.
166
- Cost telemetry remains unknown unless an explicit adapter supplies it; required
167
- cost telemetry fails when absent. Dollar estimates are not subscription bills.
168
- After correcting login, permissions, or a usage limit, resume the recorded run.
169
- Live subscription/platform verification is tracked in the implementation plan.
170
-
171
- `swarmcraft operate rebuild --workspace <path> [--json]` explicitly refreshes the
172
- knowledge index and derived status. It runs local structural and Git-policy inspection,
173
- preserves unrelated staged work, and neither commits nor contacts the API. `operate status`
174
- and `operate validate` remain read-only. A registered private source can be unavailable in
175
- this clone without being an unresolved source identity.
176
-
177
- `swarmcraft operate import --workspace <path> --source-id source.guidance --title "Reference guidance" --timezone Australia/Brisbane --input <file>`
178
- registers evidence locally and preserves a dated original snapshot. Add `--group <label>`
179
- for a confirmed, non-sensitive grouping. Omit `--input` to register an operator statement;
180
- retain the statement in knowledge. Use `--rebuild` without `--input` to regenerate a
181
- registered source's derivative after checking the original digest. New source versions
182
- require new IDs. Markdown/text and DOCX main-body text are supported; other formats
183
- remain registered with retrieval pending. No import command commits or uploads files.
172
+ ## Execute a local plan
184
173
 
185
- `swarmcraft operate handbook --workspace <path> --notes knowledge.review --title "Operations handbook" --timezone Australia/Brisbane`
186
- creates a dated Markdown snapshot from explicitly selected reviewed notes. Optional
187
- `--formats html,pdf` detects Pandoc and, for PDF, WeasyPrint. Format failures are recorded
188
- in the edition manifest; completed Markdown remains available. Explicitly reviewed images
189
- use `--reviewed-assets <comma-separated-repository-paths>`. Provisional notes require
190
- `--include-provisional` and remain visibly labelled. Editions preserve earlier runs.
174
+ Local one-shot needs no SwarmCraft account or hosted project. Use V4 packets with
175
+ `recommendedOrder` and explicit UUID `dependsOn` arrays (`[]` for no prerequisites).
176
+ The plan must link packets beneath `Packet links:` under stable phase anchors.
177
+ Preview the selected work before execution:
191
178
 
192
- Exports remain ignored. `--track` declares approval to track this particular handbook;
193
- it does not change ignore rules or commit anything. Review exact edition-file exceptions
194
- before staging. Inspection only permits declared outputs whose bytes match their manifest,
195
- not arbitrary exports beside them. Source notes remain the maintained originals.
196
-
197
- ### Update an existing Operate repository
198
-
199
- Run `swarmcraft operate upgrade --workspace <path> --check` to check compatibility without changes. Run `swarmcraft operate upgrade --workspace <path>` to apply a supported update. Both commands work locally without sign-in or activity reporting.
200
-
201
- Finish your current Work checkpoint first. The upgrade requires clean tracked files and index, creates a pre-upgrade Git commit, validates the migration and managed-file reconciliation, then creates a separate upgrade commit. Nothing is pushed. Ignored and untracked files remain untouched; destination collisions stop the update. Custom skills, unsupported source catalogues and nonempty old rules tables require review before migration.
202
-
203
- Rerun the command after an interruption to recover unchanged upgrade writes and retry. Recovery stops if later edits or Git history changes would be overwritten. A folder without an Operate locator needs first-time adoption rather than migration. See [Use Operate](https://swarmcraft.ai/docs/start-here/use-operate) for the editor workflow.
204
-
205
- For source intake, `operate import --purpose workflow` preserves and registers an original without extracting it. Use `--purpose derived` for a searchable copy; when purpose is unclear, the Import skill selects workflow. To create a searchable copy later, use `--rebuild --purpose derived` with the same source ID and its verified original. Omitting `--purpose` retains the CLI's earlier derived-source behaviour.
206
-
207
- An already seeded repository and its packet skills remain usable with your own
208
- assistant without an ongoing SwarmCraft account. Packet work and review can finish
209
- locally. Hosted one-shot orchestration and Managed AI still require sign-in; optional
210
- board syncing is provided by the SwarmCraft extension when connected.
211
-
212
- ## Upgrade an existing project repository
213
-
214
- With CLI 0.7.1 or later, preview and apply workflow upgrades locally:
215
-
216
- ```sh
217
- swarmcraft upgrade --workspace . --check
218
- swarmcraft upgrade --workspace .
179
+ ```bash
180
+ swarmcraft one-shot --workspace . --plan docs/plans/migration-plan.md --agent-provider claude --preview
181
+ swarmcraft one-shot --workspace . --plan docs/plans/migration-plan.md --agent-provider claude --checking off --reviewing off --commit-policy done
219
182
  ```
220
183
 
221
- No account or API is needed. Upgrade keeps the repo's saved provider, updates unchanged
222
- managed guidance, and preserves owner files and edited managed files. It migrates
223
- unfinished and provisional packet metadata while retaining progress; completed packets
224
- stay unchanged unless you pass `--include-completed`. Server-derived project context
225
- is preserved offline. Review the result and `git diff` before committing. `--json`
226
- returns a structured summary; exit 2 means preserved conflicts, and exit 1 means a
227
- blocker or failure. Rerun after resolving the reported issue; do not regenerate packets.
228
-
229
- Use `init` for initial project setup and `operate upgrade` for Operate repositories.
230
- `init` still requires project access and can update board packet links. Learn exact
231
- requirements, defaults and side effects with `swarmcraft help init` or
232
- `swarmcraft upgrade --help`; help itself never authenticates or executes a workflow.
184
+ Use repeatable `--phase <anchor>` to narrow the plan, or repeatable `--packet <path>`
185
+ for direct work. Local selectors cannot combine with hosted project/task selectors,
186
+ delegation or Managed AI. Local defaults keep checking and reviewing on. Explicit
187
+ `off` records skipped-stage policy without ticking unchecked items or claiming
188
+ human approval; implementation validation still applies. Commit or stash existing
189
+ changes first; local execution does not accept dirty-worktree overrides.
190
+
191
+ The run freezes scope, prerequisites and policy. `resume --workspace . --run <id>`
192
+ continues checkpoints without rereading the plan into a new task list. After
193
+ inspecting intentional packet edits (including human review), use
194
+ `--accept-packet-changes`; interrupted agent stages additionally require
195
+ `--retry-interrupted`. Identity, order and prerequisites cannot change on resume.
196
+ Start a new reviewed run when plan scope changes. Local exit codes are 0 for
197
+ complete scope, 2 for a workflow/budget stop or pending review, and 1 for errors.
198
+ Optional board connection can happen later through the extension.
199
+
200
+ To prepare selected legacy packets, preview
201
+ `swarmcraft upgrade --workspace . --ordered-packets --packet <path> --check`,
202
+ then repeat without `--check` to apply. Repeat `--packet` for the selected scope.
203
+ Numeric filename prefixes supply missing order; unresolved order blocks migration.
204
+ Declare reviewed `dependsOn` UUIDs explicitly afterward. The migration does not
205
+ assume legacy tasks are independent and does not rename files.