@caddis/cli 0.4.89 → 0.4.91

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.
Files changed (43) hide show
  1. package/bundles/antigravity-plugin/plugin.json +1 -1
  2. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
  3. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
  4. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
  5. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
  6. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
  7. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
  8. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
  9. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
  10. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
  11. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
  12. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
  13. package/bundles/antigravity-plugin/scripts/caddis_budget.py +26 -2
  14. package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +31 -2
  15. package/bundles/antigravity-plugin/scripts/caddis_docs_pr.py +8 -0
  16. package/bundles/antigravity-plugin/scripts/caddis_fleet.py +10 -5
  17. package/bundles/antigravity-plugin/scripts/caddis_guide.json +3 -3
  18. package/bundles/antigravity-plugin/scripts/caddis_handoff.py +73 -45
  19. package/bundles/antigravity-plugin/scripts/caddis_lanes.py +96 -14
  20. package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +136 -67
  21. package/bundles/antigravity-plugin/scripts/caddis_workstreams.py +86 -20
  22. package/bundles/antigravity-plugin/scripts/check_doc_coverage.py +17 -0
  23. package/bundles/antigravity-plugin/scripts/oss_review.py +89 -24
  24. package/bundles/antigravity-plugin/scripts/templates/coordinator.md +1 -1
  25. package/bundles/antigravity-plugin/skills/code-review/SKILL.md +2 -0
  26. package/bundles/antigravity-plugin/skills/coordinate/SKILL.md +17 -4
  27. package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +18 -5
  28. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +5 -0
  29. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +18 -4
  30. package/bundles/antigravity-plugin/skills/implement/SKILL.md +23 -2
  31. package/bundles/antigravity-plugin/skills/park/SKILL.md +1 -0
  32. package/bundles/antigravity-plugin/skills/preflight/SKILL.md +1 -0
  33. package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +2 -1
  34. package/bundles/antigravity-plugin/skills/roadmap/assets/plan-resume-prompt.md +8 -1
  35. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  36. package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +6 -5
  37. package/bundles/codex/.codex/skills/coding/code-review/SKILL.md +2 -0
  38. package/bundles/codex/.codex/skills/workflow/preflight/SKILL.md +1 -0
  39. package/bundles/codex/.codex/skills/workflow/roadmap/SKILL.md +2 -1
  40. package/bundles/codex/.codex/skills/workflow/roadmap/assets/plan-resume-prompt.md +8 -1
  41. package/bundles/manifest.json +3 -3
  42. package/dist/cli.js +12 -4
  43. package/package.json +1 -1
@@ -24,6 +24,8 @@ them into its commit, so check first, before Step 1.
24
24
  ```
25
25
  It prints `SHARED: yes <reason>` or `SHARED: no` and exits 0. It says yes when the root `AGENTS.md`
26
26
  has a line `Shared checkout: yes`, or when `git status` lists a path this session did not change.
27
+ Files that caddis writes itself (the generated index `.caddis/relay.md`, `*.jsonl` logs, locks and `.bak`
28
+ copies in `.caddis/`) never count as another session's change.
27
29
  3. **On `SHARED: no`,** do the steps below as written.
28
30
  4. **On `SHARED: yes`,** write NO tracked file in this checkout. Run:
29
31
  ```
@@ -31,6 +33,11 @@ them into its commit, so check first, before Step 1.
31
33
  ```
32
34
  It makes a new worktree from `origin/<default>` on a `docs/handoff-<utc>` branch and prints
33
35
  `WORKTREE: <path>`. That worktree is this session's only; no other session's edits can enter it.
36
+ **If the repo has no `origin` remote,** it exits 3 and prints
37
+ `no remote: commit explicit paths in place (git add <named files>; git commit)`. A docs PR needs a
38
+ remote, so skip the worktree path: name each file this session changed, `git add` those files only
39
+ (never `-A` or a directory), commit them, and leave every other dirty path alone. The tool commits nothing
40
+ itself. Then do the steps below as written, in this checkout.
34
41
  Then, in the steps below:
35
42
  - Step 1: tell the `knowledge-transfer` subagent to edit files ONLY under the `WORKTREE:` path.
36
43
  - Step 3, point 4: make the plan's Tracker edit in `<worktree>/.caddis/plans/<feature>.md`, and write
@@ -200,8 +207,11 @@ Nothing to say is the normal answer. Say nothing and move on — this must not b
200
207
  <!-- /shared:harness-friction-question -->
201
208
 
202
209
  ## Step 3 — write the resume doc (overwrite) with exactly these sections
203
- Write the relay from scratch with the current state only. Never append to the old text: git keeps the
204
- history, and the relay has a 4,000-character budget (`caddis_budget.py`).
210
+ Write the relay from scratch with the current state only. Never append to the old text. The relay has a
211
+ 4,000-character budget (`caddis_budget.py`), and `put`/`write` refuse a longer relay. `.caddis/relay/` is
212
+ git-ignored, so git keeps no history of it: before you rewrite a long relay, copy it to
213
+ `.caddis/relay/<name>.md.bak`. Keep any other note in `.caddis/relay/` under the same 4,000 characters (the
214
+ budget covers every `*.md` file there); put a longer note elsewhere, for example under `.caddis/kb/`.
205
215
 
206
216
  > **Where to write:** this session's own workstream relay, `.caddis/relay/<name>.md`, through the
207
217
  > locked script — never with a plain file edit, which would skip the conflict check. `.caddis/relay.md`
@@ -311,7 +321,9 @@ python "${CLAUDE_PLUGIN_ROOT}/scripts/session_state.py" tasks-file --session-id
311
321
  ```
312
322
  It reads the `## Tasks` table of `.caddis/session-state/<session-id>.md`, keeps the rows that are
313
323
  not `done` or `deleted`, and prints `[TASKS] <n> open task(s) -> <path>` or `[TASKS] none open`
314
- (with no open task it deletes an old `.caddis/relay/<name>.tasks.md`). When it wrote a file, the
324
+ (with no open task it deletes an old `.caddis/relay/<name>.tasks.md`). The state file is in the
325
+ folder the session started in; if that is not the work repo, add `--state-root <start folder>`
326
+ (the tasks file still goes under `--root`). A missing state file prints the path it tried. When it wrote a file, the
315
327
  relay's resume prompt must hold the sentence
316
328
  `Load every row of .caddis/relay/<name>.tasks.md with TaskCreate.`: Step 5 blocks a relay whose
317
329
  tasks file exists and is not named. If you wrote the relay before running this, rewrite it with
@@ -503,11 +515,13 @@ Model for next session: <model>, effort <effort>
503
515
  === RESUME ===
504
516
  Session: <session name> (<session id>)
505
517
  Workstream: <name>
518
+ Repo: <absolute repo root>
506
519
  <the resume prompt, in a fenced block>
507
520
  Start line:
508
- claude --model <model> --effort <effort> --name <role>-<MMDD>-<HH> '<the resume prompt on one line> <the announce sentence>'
521
+ cd "<absolute repo root>"; claude --model <model> --effort <effort> --name <role>-<MMDD>-<HH> '<the resume prompt on one line> <the announce sentence>'
509
522
  ```
510
523
  `<model>` and `<effort>` come from `caddis_routing.py session` (Rules, "Model for the next session").
524
+ The `cd` makes the relay's repo-relative paths work from any terminal folder (`;`, not `&&`: Windows PowerShell 5.1 has no `&&`).
511
525
  - **The announce sentence.** In a normal handoff the one-line start line also ends with a sentence that tells
512
526
  the new session to run `caddis_fleet.py whoami` with its new name, then `caddis_fleet.py peers`, and to send
513
527
  each named live peer in the same repo (the checkout and its worktrees) one `SendMessage`:
@@ -68,6 +68,18 @@ and 95-154 turns per session were started by background events. Each turn re-rea
68
68
  below). **Headless (`CADDIS_HEADLESS` set): never checkpoint** (the script refuses). At 280k, start no new
69
69
  card, commit only finished cards, write `BLOCKED context <n>` and your state (cards done, commits, next
70
70
  card) in the review file, and end with the JSON block.
71
+ - **Unattended runs.** The mode is on when the marker file `~/.caddis/UNATTENDED` exists and is under 16 hours
72
+ old, or when the env variable `CADDIS_UNATTENDED` is set. Do not stop and do not ask for /clear. At the WARN
73
+ card end and at FORCE, run the checkpoint, then go on with the next card. Auto-compact brings the relay back
74
+ into the session. The limit is `CADDIS_UNATTENDED_MAX_FORCE` (default 6 FORCE cycles). After that, write the
75
+ relay and stop. For overnight work, prefer `caddis_roadmap_run.py --plan <slug>`: the runner starts a fresh
76
+ session for the same batch.
77
+ **Owner rule (28 Oct):** when the owner says "unattended", "overnight" or "I will be gone", ask ALL open
78
+ questions BEFORE the run starts. Use one `AskUserQuestion` round with every open choice (merge policy, PR
79
+ handling, spend limit, pending owner gates, any other decision the plan leaves to the owner). Make each
80
+ question self-contained. Start the run only after the answers. If a question comes up DURING the run, park
81
+ the work it blocks in the relay, go on with work that does not need the answer, and never stop the whole run
82
+ for it.
71
83
  - **Model.** Take the model and effort from the session table:
72
84
  `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_routing.py" session --role orchestrator` prints `<model> <effort>`
73
85
  (source checkout: `claude-harness/scripts/caddis_routing.py`). Opus stays for plans, designs and
@@ -247,7 +259,10 @@ row, visible to any later reader without anyone having to catch it live.
247
259
  refusal). If you checked the finding and it is false, add
248
260
  `--override-review "<why the finding is false>"`. For a `MISSING` review, re-run the review
249
261
  first; add the override only if the owner accepts a phase with no vendor verdict. The reason
250
- must not be empty. The script records it in the packet.
262
+ must not be empty. The script records it in the packet. It also refuses a `PARTIAL` review
263
+ (the secret filter dropped files, so CLEAN covers only part of the diff); review the dropped
264
+ files yourself before you add an override. A lane that committed gets no review
265
+ (`COMMITTED`, `NEXT: redo`), and accept refuses any lane commit, even with an override.
251
266
  4. Allow at most **2 attempts** per phase on a non-Claude lane. An out-of-budget switch is not an
252
267
  attempt. The owner can request TAKEOVER at any time.
253
268
  5. A UI phase needs a `ui-design-reviewer` screenshot review before ACCEPT. This rule applies
@@ -350,6 +365,12 @@ reasons — a **milestone boundary**, a phase marked `Session: fresh`, **after**
350
365
  a **failed/blocked** phase, or (interactive only) **the checkpoint after the 200k warning** at a card end
351
366
  (the context rule above). A lane change is not one of them: you spawn the lane yourself (Step 1).
352
367
 
368
+ **Unattended mode** (see "Unattended runs"): the 200k-checkpoint halt and the `Session: fresh` halt do not apply
369
+ in unattended mode. Run the checkpoint, then go on. After a `risk: high` phase, run `/caddis:cross-review` by
370
+ tier (owner decision OG3 (c), `.caddis/decisions/2026-10-28-unattended-runs.md`) and go on when it has no
371
+ blocking finding. If it has one, write one fix card, then halt. A milestone boundary and a failed/blocked phase
372
+ still halt.
373
+
353
374
  The `risk: high` halt is deliberately *after*, not before. Execute and commit the phase normally; the
354
375
  halt exists to stop the **next** phase building on it before a human has looked, so the blast radius
355
376
  stays one reviewable, revertable commit. One exception: when your session prompt itself says the runner
@@ -417,7 +438,7 @@ runs `caddis_tidy.py --check` on the PR's files and stops on a plan whose Tracke
417
438
  status is not, so a skipped tidy is caught before the PR opens.
418
439
 
419
440
  **5. Write a concise review file** to `.caddis/reviews/<slug>.md`, where `<slug>` is the plan file's
420
- name without `.md`. Create `.caddis/reviews/` if needed.
441
+ name without `.md`. Create `.caddis/reviews/` if needed. Never put a review in `.caddis/parking-lot/`: park only follow-up items, one item per file, `type: parking-lot`.
421
442
  Keep it short and scannable — this is what the human reviewer reads before merging the branch:
422
443
 
423
444
  ```markdown
@@ -67,6 +67,7 @@ Park it only if it is work **we** will do later. Redirect these instead, and say
67
67
  | An interrupted task you will come back to this session | `/caddis:digress` |
68
68
  | Blocked on a person outside this repo | `.caddis/comms/` + its `register.md` |
69
69
  | A fact about the environment, not a task | the KB (`/caddis:kb`) |
70
+ | A review (findings, a verdict) | `.caddis/reviews/`, `type: review`; park only each item to do later, one per file |
70
71
 
71
72
  ### Step 2 — do not duplicate
72
73
 
@@ -302,6 +302,7 @@ Produce a structured report (see Output Format below).
302
302
  ## Output Format
303
303
 
304
304
  The report is written to the path specified by the invoking agent. Default: `.github/agent-docs/preflight-report.md`
305
+ Never write it in `.caddis/parking-lot/`: that folder holds only items to do later, one item per file, `type: parking-lot`.
305
306
 
306
307
  Apply `.github/instructions/document-frontmatter.instructions.md` when creating or updating the report. The YAML frontmatter block must be the first content in the file. New reports require `Original Author`, `Creation Date`, and `Creating Model`; revised reports must preserve those fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
307
308
 
@@ -183,7 +183,8 @@ unattended; `-Plan <slug>` runs one plain plan instead (the two are exclusive).
183
183
  and deletes the claim.
184
184
  CONTINUE with the phase already merged on origin: `rollup` when every phase is merged, then back to 1. CONTINUE
185
185
  with no new commits and nothing merged stops FAILED. `STATUS: OWNER-GATE <r>` becomes an `owner-gate` blocker,
186
- `STATUS: BLOCKED <r>` an `external` one; then back to 1. `STATUS: FAILED` stops.
186
+ `STATUS: BLOCKED <r>` an `external` one; then back to 1. `STATUS: FAILED` stops. A relay the session did not
187
+ change (the same hash as before it, whatever its status line) stops `FAILED no relay written`.
187
188
  5. Every `**Risk:** high` phase done on the branch and not yet reviewed clean (record in the runner's own folder:
188
189
  `<git common dir>/caddis-runner/roadmap-<slug>/reviewed/<plan>.json`; another runner's record does not count) is
189
190
  reviewed BEFORE step 4 writes the claim and publishes
@@ -23,6 +23,9 @@ The relay can be old. Before you act, compare it with the real state: the plan t
23
23
  pull requests and remote branches. If they disagree, trust the real state. Fix the relay and the tracker. Do not build on a
24
24
  guess.
25
25
 
26
+ If the relay ends `STATUS: BLOCKED context`, an earlier session of this batch ran out of context: go on from its Next
27
+ step; its commits are on your branch.
28
+
26
29
  ## 3. Pick the batch
27
30
 
28
31
  A batch is ONE tracker phase (the first row that is not done and not blocked), or ONE named batch that the plan or the relay
@@ -64,13 +67,17 @@ STATUS: BLOCKED <owner>
64
67
  STATUS: FAILED <reason>
65
68
  ```
66
69
 
70
+ `STATUS: BLOCKED context <n>` is a `BLOCKED` line: use it only when the context_size hook tells you to. The runner then
71
+ starts a fresh session for the same batch. Your relay must name the cards done, their commits and the next card. Do not
72
+ call PushNotification for it.
73
+
67
74
  Use `STATUS: CONTINUE` only when the next batch can start with no owner input. A missing or bad line counts as FAILED.
68
75
  An owner gate id has the form `<P>-OG<n>`: the plan's 2 to 4 capital-letter prefix (for example `PM-OG1`). Name the gate
69
76
  in the plan's decisions with that id. Any other form is a bad line.
70
77
 
71
78
  ## 6. Notify and end
72
79
 
73
- When the status is not CONTINUE, call the `PushNotification` tool as your last action. Put the plan, the status line and the
80
+ When the status is not CONTINUE and not `BLOCKED context`, call the `PushNotification` tool as your last action. Put the plan, the status line and the
74
81
  next step in the message. After the call succeeds, print the line `PUSH-SENT`. The runner looks for that marker. Without it,
75
82
  the runner sends the notification itself.
76
83
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "caddis-extras",
3
- "version": "1.3.47",
3
+ "version": "1.3.49",
4
4
  "description": "caddis-extras — the long-tail skills for the Antigravity (agy) caddis plugin; install alongside caddis for the full set."
5
5
  }
@@ -80,10 +80,10 @@ python "$TOOL" --range origin/main..HEAD # review a branch's c
80
80
  ```
81
81
  Optional flags: `--cwd <repo>`, `--base-url <url>`, `--model <id>` (override the env).
82
82
 
83
- **Diff-size ceiling.** A diff over `REVIEW_MAX_DIFF_CHARS` (default 60,000 chars) is **split into batches** on whole-file boundaries and each batch reviewed separately (verdict is CLEAN only if every batch is). Exit 4 means a *single unsplittable file* over the ceiling, or too many batches — not an ordinary large diff. Previously it was refused before any LLM call
84
- *before* any LLM call — an oversized diff has been observed to come back either an empty response, or
85
- worse, a `REVIEW: CLEAN` with zero real engagement. If you hit this, narrow `--range` or review in
86
- smaller chunks; don't just raise `--max-diff-chars` without knowing the endpoint's real limit.
83
+ **Diff-size ceiling.** A diff over `REVIEW_MAX_DIFF_CHARS` (default 60,000 chars) is **split into batches** on whole-file boundaries and each batch reviewed separately (verdict is CLEAN only if every batch is). When agy Argon is anywhere in the provider chain, each batch is also kept small enough that its **whole prompt** fits the agy command line (28,000 chars once quoted, so under about 27,000 diff chars, fewer when the diff has many `"`). A *single file* too big for agy gets its own batch: agy skips it and the next provider reviews it; with no other provider (no DeepSeek or GLM key) that is exit 3. Exit 4 means a *single unsplittable file* over the 60,000 ceiling, or too many batches — not an ordinary large diff. The ceiling exists because an oversized diff has been observed to come back either an empty response, or
84
+ worse, a `REVIEW: CLEAN` with zero real engagement. If you hit this, review that file separately or narrow `--range`; don't just raise `--max-diff-chars` without knowing the endpoint's real limit.
85
+
86
+ **Verdict and scope.** Only the last non-empty line of the reply counts, and it must be exactly `REVIEW: CLEAN` or `REVIEW: BLOCKING`; a reply that quotes the marker earlier and ends some other way has no verdict (exit 4). An explicit `--range` with no changes is exit 3 (a review of nothing is not CLEAN); the working tree with no changes is still CLEAN. When the secret filter drops some files, the output ends with `REVIEW-SCOPE: PARTIAL (<n> file(s) excluded by the secret filter: <names>)` and then the overall `REVIEW:` line. The exit code does not change, but those files were not reviewed: say so, and never report it as a full CLEAN.
87
87
 
88
88
  ## Interpret the exit code
89
89
  - **0 — REVIEW: CLEAN** → no blocking issues. Proceed.
@@ -92,7 +92,7 @@ smaller chunks; don't just raise `--max-diff-chars` without knowing the endpoint
92
92
  Fix it, then re-review only the fix diff. After 3 rounds, ask the owner (rule 3).
93
93
  - **4 — error** → no verdict parsed, a git failure, or an endpoint/parse failure. Read stderr; do not
94
94
  treat this as CLEAN — investigate.
95
- - **3 — could not run** → no reviewer is available (no agy on PATH and no API key), or every provider failed. Fix it (see Prerequisites) and re-run.
95
+ - **3 — could not run** → no reviewer is available (no agy on PATH and no API key), an explicit `--range` has no changes, or every provider failed. Fix it (see Prerequisites) and re-run.
96
96
 
97
97
  ## Three rules: one attempt, one review
98
98
  1. **Think before you send.** Before a task goes to any coder, write its edge cases and check the facts it depends on (one query or one file read).
@@ -110,6 +110,7 @@ change, so a batch does not report the others as missing.
110
110
  the main thread after reading the findings.
111
111
  - Treat exit 3/4 as blocking-unknown, never as approval (the tool is fail-closed by design).
112
112
  - Different vendor ⇒ different style; weigh its findings on merit, don't cargo-cult them.
113
+ - Save review notes in `.caddis/reviews/`, never in `.caddis/parking-lot/`: that folder holds only items to do later, one item per file, `type: parking-lot` (`/caddis:park`).
113
114
  - **Never use `find`, `Get-ChildItem -Recurse`, or any other filesystem-wide search to locate
114
115
  `oss_review.py`.** Check only the two paths above. On Git Bash under Windows, `find /` (or any
115
116
  search rooted at `/`) walks every mounted drive, not just the repo — it can hang or take minutes.
@@ -61,6 +61,8 @@ Check for:
61
61
 
62
62
  ## Review Output Format
63
63
 
64
+ In a caddis repo, save a review note in `.caddis/reviews/`, never in `.caddis/parking-lot/`: that folder holds only items to do later, one item per file, `type: parking-lot`.
65
+
64
66
  ```markdown
65
67
  ## Code Review Summary
66
68
 
@@ -302,6 +302,7 @@ Produce a structured report (see Output Format below).
302
302
  ## Output Format
303
303
 
304
304
  The report is written to the path specified by the invoking agent. Default: `.github/agent-docs/preflight-report.md`
305
+ Never write it in `.caddis/parking-lot/`: that folder holds only items to do later, one item per file, `type: parking-lot`.
305
306
 
306
307
  Apply `.github/instructions/document-frontmatter.instructions.md` when creating or updating the report. The YAML frontmatter block must be the first content in the file. New reports require `Original Author`, `Creation Date`, and `Creating Model`; revised reports must preserve those fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
307
308
 
@@ -183,7 +183,8 @@ unattended; `-Plan <slug>` runs one plain plan instead (the two are exclusive).
183
183
  and deletes the claim.
184
184
  CONTINUE with the phase already merged on origin: `rollup` when every phase is merged, then back to 1. CONTINUE
185
185
  with no new commits and nothing merged stops FAILED. `STATUS: OWNER-GATE <r>` becomes an `owner-gate` blocker,
186
- `STATUS: BLOCKED <r>` an `external` one; then back to 1. `STATUS: FAILED` stops.
186
+ `STATUS: BLOCKED <r>` an `external` one; then back to 1. `STATUS: FAILED` stops. A relay the session did not
187
+ change (the same hash as before it, whatever its status line) stops `FAILED no relay written`.
187
188
  5. Every `**Risk:** high` phase done on the branch and not yet reviewed clean (record in the runner's own folder:
188
189
  `<git common dir>/caddis-runner/roadmap-<slug>/reviewed/<plan>.json`; another runner's record does not count) is
189
190
  reviewed BEFORE step 4 writes the claim and publishes
@@ -23,6 +23,9 @@ The relay can be old. Before you act, compare it with the real state: the plan t
23
23
  pull requests and remote branches. If they disagree, trust the real state. Fix the relay and the tracker. Do not build on a
24
24
  guess.
25
25
 
26
+ If the relay ends `STATUS: BLOCKED context`, an earlier session of this batch ran out of context: go on from its Next
27
+ step; its commits are on your branch.
28
+
26
29
  ## 3. Pick the batch
27
30
 
28
31
  A batch is ONE tracker phase (the first row that is not done and not blocked), or ONE named batch that the plan or the relay
@@ -64,13 +67,17 @@ STATUS: BLOCKED <owner>
64
67
  STATUS: FAILED <reason>
65
68
  ```
66
69
 
70
+ `STATUS: BLOCKED context <n>` is a `BLOCKED` line: use it only when the context_size hook tells you to. The runner then
71
+ starts a fresh session for the same batch. Your relay must name the cards done, their commits and the next card. Do not
72
+ call PushNotification for it.
73
+
67
74
  Use `STATUS: CONTINUE` only when the next batch can start with no owner input. A missing or bad line counts as FAILED.
68
75
  An owner gate id has the form `<P>-OG<n>`: the plan's 2 to 4 capital-letter prefix (for example `PM-OG1`). Name the gate
69
76
  in the plan's decisions with that id. Any other form is a bad line.
70
77
 
71
78
  ## 6. Notify and end
72
79
 
73
- When the status is not CONTINUE, call the `PushNotification` tool as your last action. Put the plan, the status line and the
80
+ When the status is not CONTINUE and not `BLOCKED context`, call the `PushNotification` tool as your last action. Put the plan, the status line and the
74
81
  next step in the message. After the call succeeds, print the line `PUSH-SENT`. The runner looks for that marker. Without it,
75
82
  the runner sends the notification itself.
76
83
 
@@ -1,8 +1,8 @@
1
1
  {
2
- "poolVersion": "1.3.173",
2
+ "poolVersion": "1.3.175",
3
3
  "bundles": {
4
- "antigravity-plugin": "1.3.173",
5
- "antigravity-plugin-extras": "1.3.47",
4
+ "antigravity-plugin": "1.3.175",
5
+ "antigravity-plugin-extras": "1.3.49",
6
6
  "codex": "unknown"
7
7
  }
8
8
  }
package/dist/cli.js CHANGED
@@ -7043,6 +7043,7 @@ async function resolvePython() {
7043
7043
  function createCollectorSource(opts) {
7044
7044
  const now = opts.now ?? Date.now;
7045
7045
  const spawn2 = opts.spawn ?? spawnBounded;
7046
+ const log = opts.log ?? errorLine;
7046
7047
  const cache2 = /* @__PURE__ */ new Map();
7047
7048
  let spend = null;
7048
7049
  let guide = null;
@@ -7053,6 +7054,7 @@ function createCollectorSource(opts) {
7053
7054
  let updateNeeded = false;
7054
7055
  let lastRunOk = false;
7055
7056
  let running = null;
7057
+ let knownUnsupported = false;
7056
7058
  const fail2 = (message3) => {
7057
7059
  lastError = message3;
7058
7060
  lastRunOk = false;
@@ -7107,9 +7109,14 @@ function createCollectorSource(opts) {
7107
7109
  pre = found.pre;
7108
7110
  }
7109
7111
  const script = opts.scriptPath ?? defaultScriptPath();
7110
- const known = [...cache2.values()].filter((r2) => r2.error === void 0 && typeof r2.fingerprint === "string" && repos.includes(r2.path)).map((r2) => `${r2.path}=${r2.fingerprint}`);
7112
+ const known = [...cache2.values()].filter((r2) => !knownUnsupported && r2.error === void 0 && typeof r2.fingerprint === "string" && repos.includes(r2.path)).map((r2) => `${r2.path}=${r2.fingerprint}`);
7111
7113
  const args = repos.length ? known.length ? [...pre, script, "--repos", ...repos, "--known", ...known, "--json"] : [...pre, script, "--repos", ...repos, "--json"] : [...pre, script, "--repos", path17.join(os5.tmpdir(), "caddis-hub-no-repos"), "--only", "spend,guide", "--json"];
7112
- const result = await spawn2(cmd, args, { timeoutMs: RUN_TIMEOUT_MS2 });
7114
+ let result = await spawn2(cmd, args, { timeoutMs: RUN_TIMEOUT_MS2 });
7115
+ if (!result.ok && result.code === 2 && known.length && repos.length && /unrecognized arguments:.*--known/.test(result.stderr)) {
7116
+ knownUnsupported = true;
7117
+ log("caddis hub: the collector script does not know --known (old plugin); sending full runs. Update the plugin.");
7118
+ result = await spawn2(cmd, [...pre, script, "--repos", ...repos, "--json"], { timeoutMs: RUN_TIMEOUT_MS2 });
7119
+ }
7113
7120
  if (result.timedOut) return fail2(`collector timed out after ${RUN_TIMEOUT_MS2 / 1e3} s`);
7114
7121
  if (!result.ok) {
7115
7122
  const detail2 = (result.stderr || result.stdout).trim().slice(0, 500);
@@ -7151,6 +7158,7 @@ var init_collector = __esm({
7151
7158
  "use strict";
7152
7159
  init_pkg();
7153
7160
  init_which();
7161
+ init_log();
7154
7162
  init_bounded();
7155
7163
  init_spawn();
7156
7164
  COLLECTOR_SCHEMA = 1;
@@ -9421,7 +9429,6 @@ import {
9421
9429
  mkdirSync as mkdirSync9,
9422
9430
  readdirSync as readdirSync6,
9423
9431
  readFileSync as readFileSync18,
9424
- renameSync as renameSync4,
9425
9432
  rmSync as rmSync4,
9426
9433
  statSync as statSync3,
9427
9434
  writeFileSync as writeFileSync6
@@ -9619,7 +9626,7 @@ async function hubExport(args, deps = {}) {
9619
9626
  }
9620
9627
  mkdirSync9(path25.dirname(outDir), { recursive: true });
9621
9628
  if (existsSync10(outDir)) rmSync4(outDir, { recursive: true, force: true });
9622
- renameSync4(staging, outDir);
9629
+ renameWithRetry(staging, outDir);
9623
9630
  writeFileSync6(path25.join(outDir, MARKER), "written by caddis hub export\n");
9624
9631
  out(`[EXPORT] ${countFiles(outDir)} file(s) in ${outDir}`);
9625
9632
  return 0;
@@ -9634,6 +9641,7 @@ var init_export = __esm({
9634
9641
  "src/hub/export/export.ts"() {
9635
9642
  "use strict";
9636
9643
  init_pkg();
9644
+ init_config();
9637
9645
  init_spawn();
9638
9646
  init_collector();
9639
9647
  init_data();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caddis/cli",
3
- "version": "0.4.89",
3
+ "version": "0.4.91",
4
4
  "description": "Install, update and diagnose the caddis dev harness across every coding agent you use (Claude Code, agy/Antigravity, and more).",
5
5
  "keywords": [
6
6
  "caddis",