canon-ai 3.0.0 → 3.1.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/CHANGELOG.md CHANGED
@@ -4,6 +4,27 @@
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [3.1.1] — 2026-09-07
8
+
9
+ ### Fixed
10
+
11
+ - **`--reroute` and `canon task reset-code-review` re-scaffold `review.md` after archiving it.** Both commands moved the filled review to `review-prior-<n>.md` and left nothing behind, so the code-review foreman was told to "fill the existing template structure" with no template on disk, and a foreman that failed to write the file left the phase with no artifact to inspect. The archive step now writes a fresh scaffold from the project's `review.md` override under `tasks/_templates/` when it keeps one, otherwise from `.canon/templates/review.md`, rendered exactly as `canon task new` would. The pristine-scaffold check that skips archiving now also recognizes a rendered scaffold (task id substituted), so a repeat reroute no longer archives a blank file.
12
+ - **The code-review foreman no longer ends its turn with the lenses still running.** It now spawns the Claude lenses in the foreground and does not end the turn before `review.md` and the verdict are written.
13
+ - **`canon init` and `canon upgrade` refuse to write through symlinks.** Every destination file and its parent directories are checked before anything is written; a symlink anywhere on the path, including a dangling one, aborts with the path named. `--force` does not bypass this. Replace the symlink with a regular file or directory first.
14
+ - **Ctrl-C and `canon stop` wait for agent processes to actually die before cleaning up.** The orchestrator forwards the signal to every agent process group, waits up to three seconds, SIGKILLs any group still alive, and allows up to one more second for reaping before removing runtime markers and exiting. Repeated signals do not skip this, and an agent stream finishing mid-shutdown no longer resumes phase logic.
15
+ - **`canon watch` follow mode no longer garbles or re-reads log output.** It reads only newly appended bytes in bounded chunks and decodes UTF-8 incrementally, so multibyte characters split across reads render correctly. A replaced or truncated log restarts tailing from the beginning.
16
+ - **The docs reference checker accepts compound line citations with whitespace after the comma.** `` `file.ts:12, 40-52` `` and `#L12, L40` forms now parse, including range, approximate (`~`), and GitHub-anchor variants. The shipped template matches. ([#15](https://github.com/tstraub89/canon-ai/issues/15))
17
+
18
+ ## [3.1.0] — 2026-09-05
19
+
20
+ ### Changed
21
+
22
+ - **`canon update` installs stable releases from the npm registry.** It resolves the latest release tag on GitHub as before, confirms that version is published to npm, then installs `canon-ai@<version>` from the registry; a project-local install is pinned to the exact version. A tagged release that has not reached npm yet refuses with a retry note and the `--ref v<version>` GitHub fallback. `--channel main`, `--ref`, and `CANON_UPSTREAM_REPO` fork overrides still install from GitHub, since those builds are not on the registry.
23
+
24
+ ### Removed
25
+
26
+ - **No install scripts in the published package.** The `postinstall` hook installer only ever set up canon-ai's own contributor pre-commit hook and did nothing in adopter repos, but it triggered npm's install-scripts warning on every install. Contributors run `npm run hooks` once after cloning instead.
27
+
7
28
  ## [3.0.0] — 2026-09-04
8
29
 
9
30
  ### Changed
package/README.md CHANGED
@@ -98,7 +98,7 @@ npm install -g --install-links github:tstraub89/canon-ai
98
98
 
99
99
  > When installing from GitHub, `--install-links` is required because npm otherwise symlinks the global install to its git cache rather than copying the committed `dist/`, which leaves the `canon` bin pointing at a transient path and command-not-found after the install reports success. The flag packs+installs as a regular dependency, which is what you want for a stable global CLI.
100
100
 
101
- > **Updating.** Once installed, use `canon update` rather than re-running `npm install` by hand — it resolves the exact install this binary is running from, pins to the latest tagged release by default (or a labeled development commit via `--channel main` / `--ref <ref|sha>`), and records what it installed in `provenance.json` under `.canon` for future tooling to read.
101
+ > **Updating.** Once installed, use `canon update` rather than re-running `npm install` by hand — it resolves the exact install this binary is running from and installs the latest release from the npm registry by default. Use `--channel main` or `--ref <ref|sha>` for a GitHub development commit; each update records what it installed in `provenance.json` under `.canon` for future tooling to read. A project-local update pins the exact version (`--save-exact`); a global update has no manifest to pin.
102
102
 
103
103
  ### Set up in a repo
104
104
 
@@ -238,7 +238,7 @@ Run canon on repositories where you would be comfortable running your test suite
238
238
 
239
239
  | Command | What it does |
240
240
  |---|---|
241
- | `canon init` | Install canon into the current repo |
241
+ | `canon init` | Install canon into the current repo. Refuses symlinks at destination files or parent directories; replace them with regular files/directories first. |
242
242
  | `canon doctor` | Verify environment and canon setup — Node/git versions, Claude Code (≥ 2.1.72) and Codex CLI presence, codex project trust, recommended-permission coverage in `.claude/settings.json`, and that any local settings file is gitignored. |
243
243
  | `canon task new <id> "Title"` | Scaffold a new task from templates |
244
244
  | `canon task list` | Show all tasks and their pipeline phase |
@@ -253,8 +253,8 @@ Run canon on repositories where you would be comfortable running your test suite
253
253
  | `canon run <id> --ship` | After PR approval: squash-merge, delete branch, tear down worktree, archive the task, pull base branch. Don't merge the PR manually first. |
254
254
  | `canon run <id> --dry-run` | Print each planned phase and exit without spawning any agent |
255
255
  | `canon stop <id>` | Stop a detached canon run (SIGTERM → SIGKILL after 10s). Waits up to 30s — override via `CANON_STOP_WAIT_MS` — for the orchestrator's first heartbeat to verify the PID before signaling. |
256
- | `canon upgrade` | Sync vendored canon-owned files to match the installed version. It does not touch adopter-owned `AGENTS.md` or `CLAUDE.md`. Refuses to overwrite canon-owned targets that are locally modified, untracked but present, or whose git state cannot be verified unless `--force` is set. Use `--check` (or `--dry-run`) to preview, `--no-stage` to skip the auto-`git add`. |
257
- | `canon update` | Update the canon-ai package itself. Targets the install's own root (never the invocation directory) and pins to the latest final release by default; refuses rather than installing an unpinned branch. `--channel main` / `--ref <ref\|sha>` pin a labeled development commit instead. Writes `provenance.json` in `.canon` after a successful install — recorded for future tooling, nothing reads it yet. |
256
+ | `canon upgrade` | Sync vendored canon-owned files to match the installed version. It does not touch adopter-owned `AGENTS.md` or `CLAUDE.md`. Refuses to overwrite canon-owned targets that are locally modified, untracked but present, or whose git state cannot be verified unless `--force` is set. Symlinks at destination files or parent directories are refused even with `--force`; replace them with regular files/directories first. Use `--check` (or `--dry-run`) to preview, `--no-stage` to skip the auto-`git add`. |
257
+ | `canon update` | Update the canon-ai package itself. Targets the install's own root (never the invocation directory) and installs the latest final release from npm by default. `--channel main` / `--ref <ref\|sha>` install a pinned GitHub development commit instead. Writes `provenance.json` in `.canon` after a successful install — recorded for future tooling, nothing reads it yet. |
258
258
 
259
259
  Full `canon task` subcommand reference is in `docs/pipeline-orchestrator.md`.
260
260