@caddis/cli 0.4.87 → 0.4.89
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 +46 -0
- package/bundles/antigravity-plugin/agents/preflight.md +4 -0
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/caddis_fleet.py +28 -6
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +2418 -0
- package/bundles/antigravity-plugin/scripts/caddis_handoff.py +370 -0
- package/bundles/antigravity-plugin/scripts/caddis_heartbeat.py +339 -0
- package/bundles/antigravity-plugin/scripts/caddis_hub_collect.py +60 -9
- package/bundles/antigravity-plugin/scripts/caddis_routing.py +36 -0
- package/bundles/antigravity-plugin/scripts/caddis_todo.py +101 -12
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +46 -0
- package/bundles/antigravity-plugin/scripts/schemas/hub-plans.schema.json +27 -0
- package/bundles/antigravity-plugin/session_end_agy.py +26 -1
- package/bundles/antigravity-plugin/skills/coordinate/SKILL.md +5 -3
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +47 -19
- package/bundles/antigravity-plugin/skills/fleet-open/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +77 -6
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +67 -5
- package/bundles/antigravity-plugin/warm_start_agy.py +29 -1
- package/bundles/manifest.json +2 -2
- package/dist/allowed-urls.txt +3 -2
- package/dist/cli.js +545 -274
- package/dist/export/assets/export-B7BBDg5I.js +150 -0
- package/dist/export/assets/export-HxTgj3z2.css +1 -0
- package/dist/export/assets/mark-anim-DZa95SHo.webp +0 -0
- package/dist/export/assets/mark-still-CcPgBc_-.png +0 -0
- package/dist/export/fonts/ibm-plex-mono-400.6d569bb7.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-mono-700.9f478677.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-400.17fc1ce7.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-500.dcc69acf.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-600.d4dad061.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-700.40d9a530.woff2 +0 -0
- package/dist/export/index.html +2 -2
- package/dist/export/licenses/{OFL-MapleMono.txt → OFL-IBMPlexMono.txt} +4 -4
- package/dist/{ui/licenses/OFL-MapleMono.txt → export/licenses/OFL-IBMPlexSans.txt} +4 -4
- package/dist/ui/assets/{Activity-BgqFFOv1.js → Activity-DZKPMOeV.js} +1 -1
- package/dist/ui/assets/Guide-5ZFfL6sl.js +9 -0
- package/dist/ui/assets/Guide-Dnsb-TRd.css +1 -0
- package/dist/ui/assets/RoadmapTab-DPsiSmIF.js +31 -0
- package/dist/ui/assets/index-DGlNAmeA.css +1 -0
- package/dist/ui/assets/index-xl156OCN.js +231 -0
- package/dist/ui/assets/mark-anim-DZa95SHo.webp +0 -0
- package/dist/ui/assets/mark-still-CcPgBc_-.png +0 -0
- package/dist/ui/fonts/ibm-plex-mono-400.6d569bb7.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-mono-700.9f478677.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-400.17fc1ce7.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-500.dcc69acf.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-600.d4dad061.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-700.40d9a530.woff2 +0 -0
- package/dist/ui/index.html +2 -2
- package/dist/{export/licenses/OFL-Atkinson.txt → ui/licenses/OFL-IBMPlexMono.txt} +3 -3
- package/dist/ui/licenses/{OFL-Atkinson.txt → OFL-IBMPlexSans.txt} +3 -3
- package/package.json +4 -1
- package/dist/export/assets/export-Dro73_I7.js +0 -150
- package/dist/export/assets/export-N0paGhbL.css +0 -1
- package/dist/export/assets/mark-small-CwCIyjyC.svg +0 -8
- package/dist/export/fonts/atkinson-400.849ae6f0.woff2 +0 -0
- package/dist/export/fonts/atkinson-700.3a9cc18a.woff2 +0 -0
- package/dist/export/fonts/maple-mono-400.071799fd.woff2 +0 -0
- package/dist/export/fonts/maple-mono-700.1e17b237.woff2 +0 -0
- package/dist/ui/assets/Guide-Df0Kg8wI.js +0 -9
- package/dist/ui/assets/Guide-zcVFGUxR.css +0 -1
- package/dist/ui/assets/RoadmapTab-CV7WCGBL.js +0 -31
- package/dist/ui/assets/index-DEge93wH.css +0 -1
- package/dist/ui/assets/index-DQbpiY2a.js +0 -221
- package/dist/ui/assets/mark-small-CwCIyjyC.svg +0 -8
- package/dist/ui/fonts/atkinson-400.849ae6f0.woff2 +0 -0
- package/dist/ui/fonts/atkinson-700.3a9cc18a.woff2 +0 -0
- package/dist/ui/fonts/maple-mono-400.071799fd.woff2 +0 -0
- package/dist/ui/fonts/maple-mono-700.1e17b237.woff2 +0 -0
|
@@ -61,9 +61,18 @@ Measured 24-25 Oct 2026: about 60% of usage was cache re-reads in long Opus main
|
|
|
61
61
|
and 95-154 turns per session were started by background events. Each turn re-reads the whole conversation.
|
|
62
62
|
- **Small context.** Ask each subagent for a reply under about 200 words. Full reports go to files; read a
|
|
63
63
|
file only for the part you need. Never paste or tail a large output.
|
|
64
|
-
- **
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
- **Context rule.** Above 200k: checkpoint at the next card end when 2 or more cards are left; else finish
|
|
65
|
+
the phase and run the full handoff. At 280k: checkpoint at the first moment no agent or background command
|
|
66
|
+
runs. The checkpoint is the "Checkpoint" section of `/caddis:handoff`; the context_size hook prints its
|
|
67
|
+
exact command at 200k and at 280k. At each phase end, write the full handoff yourself (see "At every halt"
|
|
68
|
+
below). **Headless (`CADDIS_HEADLESS` set): never checkpoint** (the script refuses). At 280k, start no new
|
|
69
|
+
card, commit only finished cards, write `BLOCKED context <n>` and your state (cards done, commits, next
|
|
70
|
+
card) in the review file, and end with the JSON block.
|
|
71
|
+
- **Model.** Take the model and effort from the session table:
|
|
72
|
+
`python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_routing.py" session --role orchestrator` prints `<model> <effort>`
|
|
73
|
+
(source checkout: `claude-harness/scripts/caddis_routing.py`). Opus stays for plans, designs and
|
|
74
|
+
critical-code subagents (`plan-writer`, `critical-phase`).
|
|
75
|
+
- **Escalation.** Escalate to Opus through a SMALL subagent (by-reference brief, reply ≤ 10 lines), never `/model opus` mid-session (the prompt cache is per model, so a switch at 200k re-writes the whole cache), when: a card fails again after its one fix card; a measurement fails a rule (isolate the cause first, then give the owner options); a plan amendment changes the design, not only facts; a risk-high phase reaches review. A fresh Opus session only to write a new plan or a redesign.
|
|
67
76
|
- **One phase review.** Run `/caddis:cross-review --range <base>..HEAD` (one other vendor; agy Argon by default).
|
|
68
77
|
Never use a Claude reviewer subagent. Exception: every other-vendor provider failed. Then say so in the review file.
|
|
69
78
|
- **Mechanical tasks** (literal tests, moves, deletes, renames) go to agy through
|
|
@@ -71,6 +80,58 @@ and 95-154 turns per session were started by background events. Each turn re-rea
|
|
|
71
80
|
- **Fewer wake-ups.** Run one `ci-watch` per PR head. When it times out on a queued run, watch that run once
|
|
72
81
|
with `ci-watch --run <id>`; do not start a new PR watch. Write no "still waiting" turns.
|
|
73
82
|
|
|
83
|
+
## Waves
|
|
84
|
+
|
|
85
|
+
A wave runs up to 3 phases at the same time. Pick it at run time; the plan has no wave marker. In a wave,
|
|
86
|
+
the orchestrator's context holds its own briefs, each child's reply and the gate output it runs. It does
|
|
87
|
+
not hold the child's work. So these rules keep briefs and replies small:
|
|
88
|
+
1. **Brief by reference:** "read <plan>, Card rules, then Phase N card B". Never paste card text into a
|
|
89
|
+
prompt.
|
|
90
|
+
2. **Reply at most 10 lines:** status, commit, the gate's result line, the report path. The full report goes
|
|
91
|
+
to a file outside every worktree (the orchestrator scratchpad `wave-<id>/p<N>.md`, or the lane packet in
|
|
92
|
+
`.caddis/orchestrator/lane-runs/`). An untracked file in a worktree blocks `git worktree remove`.
|
|
93
|
+
3. **Wave:** at most 3 phases with disjoint `Files:`, started together, one worktree each (the default cap
|
|
94
|
+
is 3 lanes, and there are 3 CI runners). A child gets ONE card per dispatch. The size rule (6 files per
|
|
95
|
+
agy card; 12 files and 6 cards per phase) applies per phase and per card, not per wave.
|
|
96
|
+
4. **Safe point:** no child runs, and each finished child is recorded (Tracker Notes or relay). Checkpoint
|
|
97
|
+
and `/clear` only at a safe point. After the 200k warning: the next safe point after a card end (normally
|
|
98
|
+
the wave end). At 280k: start no new card, wait for the running children (each only up to its time
|
|
99
|
+
limit, rule 10), then checkpoint. Never `/clear` while a child runs.
|
|
100
|
+
5. **Children never write the relay** and never run a handoff or a checkpoint: only the orchestrator writes
|
|
101
|
+
the relay. The script refuses a headless child; the brief says it for an Agent-tool subagent. So
|
|
102
|
+
`put --expected-hash` has one writer per workstream. A child at its own limit returns
|
|
103
|
+
`BLOCKED: <cards done, commits, next card>`. The context_size hook does not measure subagents (it reads
|
|
104
|
+
the main thread only); a headless child session gets the headless 280k text.
|
|
105
|
+
6. **Worktrees:** make each from the feature-branch head at `$CADDIS_WORKTREE_ROOT/<repo>/<plan>-p<N>`,
|
|
106
|
+
else `<parent of the main checkout>/.worktrees/<repo>/<plan>-p<N>` (or use `caddis_lanes.py run`, which
|
|
107
|
+
makes and records its own). Record it with
|
|
108
|
+
`python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_created.py" record --path <path> --kind worktree --purpose "wave <id> phase <N>"`,
|
|
109
|
+
and remove it after the merge. Every child shell command starts in its own worktree.
|
|
110
|
+
7. **Merge:** one member at a time into the feature branch. Run the whole test folder after each merge, and
|
|
111
|
+
the phase gates. A conflict stops that member only.
|
|
112
|
+
8. **Cost:** wave cost is the sum of its members, each on the cheapest fitting model from the session table
|
|
113
|
+
(`caddis_routing.py session`). Before the wave, `caddis_spend.py status` headroom must cover the members
|
|
114
|
+
× the per-call reserve. Exit 75 means "not run", not "failed".
|
|
115
|
+
9. **No plan-time marker.** Pick the wave from the CURRENT `Files:` lists: at most 3 phases, disjoint, one
|
|
116
|
+
worktree each. Safety comes from this run-time check and the whole test folder after each merge, not
|
|
117
|
+
from the plan: phases often touch files outside their `Files:`. A plan adds only an optional
|
|
118
|
+
`**Depends on:** Phase <x>` line, when a phase does NOT need the phase before it.
|
|
119
|
+
10. **Child time limit and orphans.** Every brief states a time limit: 20 minutes for a card (the same as the
|
|
120
|
+
agy `--print-timeout`), 10 minutes for a read-only child. At the limit plus 2 minutes with no reply, stop
|
|
121
|
+
the child (`TaskStop`) and run the orphan check in its worktree: `git status --short` and
|
|
122
|
+
`git log <feature-head>..HEAD --oneline`. Then:
|
|
123
|
+
- (a) A commit exists and the card gate passes in that worktree: keep it; the card is done.
|
|
124
|
+
- (b) A commit exists and the gate fails, or the tree is dirty with no commit: write
|
|
125
|
+
`BLOCKED: orphan <worktree> <branch> <state>` in the Tracker Notes. Do NOT delete the worktree.
|
|
126
|
+
Re-dispatch the card ONCE from a fresh worktree off the feature head.
|
|
127
|
+
- (c) Nothing changed: re-dispatch the card once, the same way.
|
|
128
|
+
A second failure of the same card stops the wave, and the orchestrator asks the owner. The 10-line reply
|
|
129
|
+
cap stays: on a failure, read the child's full report FILE (rule 2), not a longer reply. A child that
|
|
130
|
+
dies leaves its worktree. The orchestrator removes it after the merge, or the owner decides; the child
|
|
131
|
+
never does.
|
|
132
|
+
|
|
133
|
+
A headless session (`CADDIS_HEADLESS` set) never starts a wave: it is a wave member at most.
|
|
134
|
+
|
|
74
135
|
## Three rules: one attempt, one review
|
|
75
136
|
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).
|
|
76
137
|
2. **Run it before review.** The coder runs only the tests of the files it touched, in the foreground, each command under 10 minutes (split into parts if needed). Name the exact commands in the task. Never start the full suite in the background and never wait on a monitor for it: CI runs the full suite on every PR. Then run the change once on real data.
|
|
@@ -284,9 +345,10 @@ report — do not redo completed work.
|
|
|
284
345
|
violated), **stop there**: leave later phases untouched, record the blocker in the review file, mark the
|
|
285
346
|
Tracker row `blocked`, and report honestly with `"tests":"failed"` — never fake completion.
|
|
286
347
|
|
|
287
|
-
**3b. Halt only at a boundary.** Implement phase after phase, committing each. Stop for exactly
|
|
348
|
+
**3b. Halt only at a boundary.** Implement phase after phase, committing each. Stop for exactly five
|
|
288
349
|
reasons — a **milestone boundary**, a phase marked `Session: fresh`, **after** a `risk: high` phase,
|
|
289
|
-
|
|
350
|
+
a **failed/blocked** phase, or (interactive only) **the checkpoint after the 200k warning** at a card end
|
|
351
|
+
(the context rule above). A lane change is not one of them: you spawn the lane yourself (Step 1).
|
|
290
352
|
|
|
291
353
|
The `risk: high` halt is deliberately *after*, not before. Execute and commit the phase normally; the
|
|
292
354
|
halt exists to stop the **next** phase building on it before a human has looked, so the blast radius
|
|
@@ -10,7 +10,11 @@ On that turn only, the workspace's relay doc is injected as an ephemeral step so
|
|
|
10
10
|
resumes with zero re-discovery. Every later invocation emits nothing (re-injecting the relay on every
|
|
11
11
|
turn would burn context and drown the conversation).
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Every invocation (not only the first) also marks the session `working` in its status file
|
|
14
|
+
`~/.caddis/sessions/<conversationId>.json`, which the caddis hub reads (scripts/caddis_heartbeat.py).
|
|
15
|
+
|
|
16
|
+
Stdlib-only. The relay logic is self-contained; only the optional helpers (no_window, hook_log,
|
|
17
|
+
caddis_heartbeat, repo_freshness) are imported, from the bundle's scripts/ or the source tree.
|
|
14
18
|
|
|
15
19
|
agy PreInvocation stdin (camelCase protojson):
|
|
16
20
|
{"invocationNum": 1, "initialNumSteps": N, "conversationId": "…", "workspacePaths": ["…"], …}
|
|
@@ -293,6 +297,28 @@ def _mark_injected(root, conversation):
|
|
|
293
297
|
except Exception as _exc:
|
|
294
298
|
_hook_note("agy relay injection marker", _exc, root)
|
|
295
299
|
|
|
300
|
+
|
|
301
|
+
def _status_beat(data, status):
|
|
302
|
+
"""Write this agy session's status for the caddis hub (~/.caddis/sessions/). Never raises, never prints.
|
|
303
|
+
|
|
304
|
+
caddis_heartbeat.py ships under scripts/ in the agy bundle; in the source repo it is in
|
|
305
|
+
claude-harness/scripts/. Headless runs (review and lane runs) write nothing.
|
|
306
|
+
"""
|
|
307
|
+
try:
|
|
308
|
+
if str(os.environ.get("CADDIS_HEADLESS", "")).strip():
|
|
309
|
+
return
|
|
310
|
+
_here = os.path.dirname(os.path.abspath(__file__))
|
|
311
|
+
for _cand in (os.path.join(_here, "scripts"),
|
|
312
|
+
os.path.join(os.path.dirname(_here), "scripts")):
|
|
313
|
+
if os.path.isfile(os.path.join(_cand, "caddis_heartbeat.py")):
|
|
314
|
+
if _cand not in sys.path:
|
|
315
|
+
sys.path.insert(0, _cand)
|
|
316
|
+
break
|
|
317
|
+
import caddis_heartbeat as _hb # noqa: E402
|
|
318
|
+
_hb.agy_beat(data, status, plugin_root=_here) # the bundle's plugin.json sits beside the hook
|
|
319
|
+
except Exception as _exc:
|
|
320
|
+
_hook_note("agy session status", _exc)
|
|
321
|
+
|
|
296
322
|
def _workspace_roots(data):
|
|
297
323
|
"""Every workspace root in the payload, as a list. Empty when the payload has none.
|
|
298
324
|
|
|
@@ -325,6 +351,8 @@ def main() -> None:
|
|
|
325
351
|
return
|
|
326
352
|
if not isinstance(data, dict):
|
|
327
353
|
return
|
|
354
|
+
# Every invocation: the session is working (the hub's session list). Before the first-turn gate.
|
|
355
|
+
_status_beat(data, "working")
|
|
328
356
|
# SessionStart equivalent: the FIRST invocation only (agy 0-indexes invocationNum, so the
|
|
329
357
|
# first turn is 0, not 1). Anything else (or an unparseable invocationNum) injects nothing.
|
|
330
358
|
try:
|
package/bundles/manifest.json
CHANGED
package/dist/allowed-urls.txt
CHANGED
|
@@ -11,8 +11,9 @@ http://www.w3.org/XML/1998/namespace
|
|
|
11
11
|
https://reactjs.org/docs/error-decoder.html?invariant=
|
|
12
12
|
|
|
13
13
|
# Licence texts in licenses/
|
|
14
|
-
https://github.com/
|
|
15
|
-
|
|
14
|
+
https://github.com/IBM/plex
|
|
15
|
+
http://scripts.sil.org/OFL
|
|
16
|
+
https://scripts.sil.org/OFL
|
|
16
17
|
https://openfontlicense.org
|
|
17
18
|
|
|
18
19
|
# A PR link is built from `--github` and a number at run time. The bundle holds only the template.
|