@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.
Files changed (81) hide show
  1. package/README.md +46 -0
  2. package/bundles/antigravity-plugin/agents/preflight.md +4 -0
  3. package/bundles/antigravity-plugin/plugin.json +1 -1
  4. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
  5. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
  6. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
  7. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
  8. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
  9. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
  10. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
  11. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
  12. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
  13. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
  14. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
  15. package/bundles/antigravity-plugin/scripts/caddis_fleet.py +28 -6
  16. package/bundles/antigravity-plugin/scripts/caddis_guide.json +2418 -0
  17. package/bundles/antigravity-plugin/scripts/caddis_handoff.py +370 -0
  18. package/bundles/antigravity-plugin/scripts/caddis_heartbeat.py +339 -0
  19. package/bundles/antigravity-plugin/scripts/caddis_hub_collect.py +60 -9
  20. package/bundles/antigravity-plugin/scripts/caddis_routing.py +36 -0
  21. package/bundles/antigravity-plugin/scripts/caddis_todo.py +101 -12
  22. package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +46 -0
  23. package/bundles/antigravity-plugin/scripts/schemas/hub-plans.schema.json +27 -0
  24. package/bundles/antigravity-plugin/session_end_agy.py +26 -1
  25. package/bundles/antigravity-plugin/skills/coordinate/SKILL.md +5 -3
  26. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +47 -19
  27. package/bundles/antigravity-plugin/skills/fleet-open/SKILL.md +1 -1
  28. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +77 -6
  29. package/bundles/antigravity-plugin/skills/implement/SKILL.md +67 -5
  30. package/bundles/antigravity-plugin/warm_start_agy.py +29 -1
  31. package/bundles/manifest.json +2 -2
  32. package/dist/allowed-urls.txt +3 -2
  33. package/dist/cli.js +545 -274
  34. package/dist/export/assets/export-B7BBDg5I.js +150 -0
  35. package/dist/export/assets/export-HxTgj3z2.css +1 -0
  36. package/dist/export/assets/mark-anim-DZa95SHo.webp +0 -0
  37. package/dist/export/assets/mark-still-CcPgBc_-.png +0 -0
  38. package/dist/export/fonts/ibm-plex-mono-400.6d569bb7.woff2 +0 -0
  39. package/dist/export/fonts/ibm-plex-mono-700.9f478677.woff2 +0 -0
  40. package/dist/export/fonts/ibm-plex-sans-400.17fc1ce7.woff2 +0 -0
  41. package/dist/export/fonts/ibm-plex-sans-500.dcc69acf.woff2 +0 -0
  42. package/dist/export/fonts/ibm-plex-sans-600.d4dad061.woff2 +0 -0
  43. package/dist/export/fonts/ibm-plex-sans-700.40d9a530.woff2 +0 -0
  44. package/dist/export/index.html +2 -2
  45. package/dist/export/licenses/{OFL-MapleMono.txt → OFL-IBMPlexMono.txt} +4 -4
  46. package/dist/{ui/licenses/OFL-MapleMono.txt → export/licenses/OFL-IBMPlexSans.txt} +4 -4
  47. package/dist/ui/assets/{Activity-BgqFFOv1.js → Activity-DZKPMOeV.js} +1 -1
  48. package/dist/ui/assets/Guide-5ZFfL6sl.js +9 -0
  49. package/dist/ui/assets/Guide-Dnsb-TRd.css +1 -0
  50. package/dist/ui/assets/RoadmapTab-DPsiSmIF.js +31 -0
  51. package/dist/ui/assets/index-DGlNAmeA.css +1 -0
  52. package/dist/ui/assets/index-xl156OCN.js +231 -0
  53. package/dist/ui/assets/mark-anim-DZa95SHo.webp +0 -0
  54. package/dist/ui/assets/mark-still-CcPgBc_-.png +0 -0
  55. package/dist/ui/fonts/ibm-plex-mono-400.6d569bb7.woff2 +0 -0
  56. package/dist/ui/fonts/ibm-plex-mono-700.9f478677.woff2 +0 -0
  57. package/dist/ui/fonts/ibm-plex-sans-400.17fc1ce7.woff2 +0 -0
  58. package/dist/ui/fonts/ibm-plex-sans-500.dcc69acf.woff2 +0 -0
  59. package/dist/ui/fonts/ibm-plex-sans-600.d4dad061.woff2 +0 -0
  60. package/dist/ui/fonts/ibm-plex-sans-700.40d9a530.woff2 +0 -0
  61. package/dist/ui/index.html +2 -2
  62. package/dist/{export/licenses/OFL-Atkinson.txt → ui/licenses/OFL-IBMPlexMono.txt} +3 -3
  63. package/dist/ui/licenses/{OFL-Atkinson.txt → OFL-IBMPlexSans.txt} +3 -3
  64. package/package.json +4 -1
  65. package/dist/export/assets/export-Dro73_I7.js +0 -150
  66. package/dist/export/assets/export-N0paGhbL.css +0 -1
  67. package/dist/export/assets/mark-small-CwCIyjyC.svg +0 -8
  68. package/dist/export/fonts/atkinson-400.849ae6f0.woff2 +0 -0
  69. package/dist/export/fonts/atkinson-700.3a9cc18a.woff2 +0 -0
  70. package/dist/export/fonts/maple-mono-400.071799fd.woff2 +0 -0
  71. package/dist/export/fonts/maple-mono-700.1e17b237.woff2 +0 -0
  72. package/dist/ui/assets/Guide-Df0Kg8wI.js +0 -9
  73. package/dist/ui/assets/Guide-zcVFGUxR.css +0 -1
  74. package/dist/ui/assets/RoadmapTab-CV7WCGBL.js +0 -31
  75. package/dist/ui/assets/index-DEge93wH.css +0 -1
  76. package/dist/ui/assets/index-DQbpiY2a.js +0 -221
  77. package/dist/ui/assets/mark-small-CwCIyjyC.svg +0 -8
  78. package/dist/ui/fonts/atkinson-400.849ae6f0.woff2 +0 -0
  79. package/dist/ui/fonts/atkinson-700.3a9cc18a.woff2 +0 -0
  80. package/dist/ui/fonts/maple-mono-400.071799fd.woff2 +0 -0
  81. package/dist/ui/fonts/maple-mono-700.1e17b237.woff2 +0 -0
package/README.md CHANGED
@@ -132,6 +132,52 @@ caddis update --extras # add extras to an existing install
132
132
  The first run. Detects, shows exactly what it is about to run, asks, then installs. `--yes` skips
133
133
  the prompt for CI.
134
134
 
135
+ ### `caddis hub`
136
+
137
+ A local web page (127.0.0.1 only) with your repos, PRs, plans and live sessions. `caddis hub start`
138
+ starts it in the background; `caddis hub stop` stops it.
139
+
140
+ **Logins that last.** Run `caddis hub open` to get a one-time login code and open the hub. Your session lasts 7 days without use and 30 days at most, and it survives a hub restart.
141
+
142
+ **Timeline first, Board second.** Roadmaps and plans open on the Timeline view by default, with the Board view as the second option. Click any phase tile on the Timeline to open the phase panel and read its Tracker status, PR links and plan section text.
143
+
144
+ **Guide Poster and Details.** The Guide page has a `Poster` tab (with `Workflow` and `Mind map` views, plus a `Print` button for a two-page A3 landscape wall poster) and a `Details` tab. Every item on the poster links to its entry in Details.
145
+
146
+ **Sessions from more than one agent.** Claude Code sessions come from `claude agents --json`. agy
147
+ (Antigravity) sessions come from the caddis agy hooks: each agy turn writes a status file, and the
148
+ hub lists that session with an `agy` chip. A turn that starts sets `working`. A turn that ends sets
149
+ `waiting` (waiting for you, after 45 s). A session that has not written for 10 minutes shows as
150
+ `idle`, unless it waits and its agy process still runs. The hub drops a session when its process
151
+ stops or when it has not written for 24 hours. Headless runs (`CADDIS_HEADLESS`) write nothing.
152
+
153
+ Any other agent can show its sessions the same way. Write one JSON file per session to
154
+ `~/.caddis/sessions/<session-id>.json` (`CADDIS_HOME` replaces the home folder). Write a temp file
155
+ in that folder, then rename it over the target:
156
+
157
+ ```json
158
+ {
159
+ "session_id": "c0ffee-1234",
160
+ "harness": "my-agent",
161
+ "caddis_version": "1.3.200",
162
+ "pid": 4242,
163
+ "started": 1793000000.0,
164
+ "last_seen": 1793000300.0,
165
+ "status": "waiting",
166
+ "status_since": 1793000300.0,
167
+ "cwd": "/work/shop",
168
+ "repo_path": "/work/shop",
169
+ "waiting_for": "input needed"
170
+ }
171
+ ```
172
+
173
+ - Times are Unix seconds. `status` is `working` or `waiting`; the hub ignores a file without one.
174
+ - `pid` is the agent's own process, or `null` when it is not known. With a pid, the hub drops the
175
+ session when that process stops. Without one, only the times count.
176
+ - `harness` names the agent. The hub skips `claude`, because Claude Code sessions come from
177
+ `claude agents`.
178
+ - `cwd` puts the session under its repo. `waiting_for` is a short reason; it is shown when waiting.
179
+ - The first six keys are the session heartbeat that `caddis doctor` already reads. Do not remove them.
180
+
135
181
  ### Removing caddis
136
182
 
137
183
  **There is no `caddis remove`.** This CLI installs and updates; it never uninstalls. Removal goes
@@ -23,6 +23,10 @@ For the plan (or the named phase) check each claim against the codebase:
23
23
  its own? Flag any phase that leaves a judgment call open, names a file/symbol vaguely, omits exact
24
24
  data bindings, or has a non-literal exit gate. (Supports the planner→coder handoff.)
25
25
 
26
+ **One size check, always reported as `severity: warning` (category `conventions`), never a blocker:** a phase
27
+ over 12 files or over 6 cards or tasks, an agy card over 6 files (unless the phase says
28
+ `**Programme phase:** yes`), and a `**Model:**` line that names no effort (`<model>, effort <low|medium|high>`).
29
+
26
30
  ## Method
27
31
  - Read the plan. For each claim, run the cheapest check that confirms or refutes it (Glob/Grep/Read).
28
32
  - Don't trust the plan's prose — verify against files. A claim you can't verify is a finding, not a pass.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "caddis",
3
- "version": "1.3.171",
3
+ "version": "1.3.173",
4
4
  "description": "caddis — agent-agnostic dev harness as an Antigravity (agy) plugin: TDD skills + commands, single-sourced with the Claude Code plugin."
5
5
  }
@@ -24,6 +24,13 @@ except ModuleNotFoundError as exc:
24
24
  sys.path.insert(0, str(Path(__file__).resolve().parent))
25
25
  sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "claude-harness" / "scripts"))
26
26
  import caddis_exit
27
+ try:
28
+ import caddis_routing # SESSION_DEFAULTS: the model and effort each start line names
29
+ except ModuleNotFoundError as exc:
30
+ if exc.name != "caddis_routing":
31
+ raise
32
+ sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "claude-harness" / "scripts"))
33
+ import caddis_routing
27
34
 
28
35
  ACK_FIELDS = ("name", "role", "machine", "folder", "relay", "tasks", "mode", "owns-watchers", "worktrees")
29
36
  NO_ACK = "no ack"
@@ -198,8 +205,21 @@ def start_line(ack: Ack, stamp: datetime) -> str:
198
205
  claude named for the role at the sheet's hour, with `/caddis:fleet-open <role>` as the first prompt.
199
206
 
200
207
  No permission or Remote Control flags: every start reads `defaultMode` and `remoteControlAtStartup` from the
201
- owner's settings (owner, 16 Oct). caddis starts no process; the owner does (`claude --bg` decided against)."""
202
- return f'cd "{ack.folder}"; claude --name {new_name(ack.role, stamp)} "/caddis:fleet-open {ack.role}"'
208
+ owner's settings (owner, 16 Oct). caddis starts no process; the owner does (`claude --bg` decided against).
209
+ `--model` and `--effort` come from `caddis_routing.session_start` (the role's SESSION_DEFAULTS row)."""
210
+ return (f'cd "{ack.folder}"; claude {_model_flags(ack.role)} --name {new_name(ack.role, stamp)} '
211
+ f'"/caddis:fleet-open {ack.role}"')
212
+
213
+
214
+ def _model_flags(role: str) -> str:
215
+ model, effort = caddis_routing.session_start(role)
216
+ return f"--model {model} --effort {effort}"
217
+
218
+
219
+ def model_line(role: str) -> str:
220
+ """The first line of every resume block: the model and effort the next session starts on."""
221
+ model, effort = caddis_routing.session_start(role)
222
+ return f"Model for next session: {model}, effort {effort}\n"
203
223
 
204
224
 
205
225
  def render_sheet(acks: list[Ack], coordinator: str, stamp: datetime) -> str:
@@ -477,8 +497,8 @@ def render_resume(session: str, session_id: str, workstream: str, prompt: str, r
477
497
  name = new_name(role, stamp)
478
498
  if announce_script is not None:
479
499
  prompt = f"{prompt}\n{announce_text(announce_script, name, folder)}"
480
- start = f"Start line:\nclaude --name {name} {shell_arg(prompt)}"
481
- return (f"=== RESUME ===\nSession: {session} ({session_id})\nWorkstream: {workstream}\n"
500
+ start = f"Start line:\nclaude {_model_flags(role)} --name {name} {shell_arg(prompt)}"
501
+ return (f"{model_line(role)}=== RESUME ===\nSession: {session} ({session_id})\nWorkstream: {workstream}\n"
482
502
  f"{_fenced(shown)}\n{start}\n")
483
503
 
484
504
 
@@ -486,7 +506,7 @@ def render_coordinator_resume(session: str, session_id: str, workstream: str) ->
486
506
  """The resume block for the repo's coordinator: three lines to type, no prompt and no start line.
487
507
 
488
508
  `/caddis:coordinate start` reads the coordinator's relay and tasks itself, so a pasted prompt would only race it."""
489
- return (f"=== RESUME ===\nSession: {session} ({session_id})\nWorkstream: {workstream}\n"
509
+ return (f"{model_line('coordinator')}=== RESUME ===\nSession: {session} ({session_id})\nWorkstream: {workstream}\n"
490
510
  "This session is the repo's coordinator. To resume, type these three lines in this window, one at a time:\n"
491
511
  "/clear\n/rename coordinator\n/caddis:coordinate start\n"
492
512
  f"Do not paste a resume prompt; /caddis:coordinate start reads .caddis/relay/{workstream}.md "
@@ -592,7 +612,9 @@ def main(argv: list[str] | None = None) -> int:
592
612
  p.add_argument("--name", required=True, help="the relay's workstream name")
593
613
  p.add_argument("--session-id", required=True)
594
614
  p.add_argument("--root", default=".", type=Path)
595
- p.add_argument("--role", help="role for the new session's name (default: the session name's role, else the relay name)")
615
+ p.add_argument("--role", help="role for the new session's name and its SESSION_DEFAULTS model and effort, e.g. "
616
+ "plan-writer for plan or design work (default: the session name's role, else the relay name; "
617
+ "a role with no Claude row starts as the orchestrator)")
596
618
  p.add_argument("--fleet", action="store_true", help="fleet close: print no start line (the restart sheet has it)")
597
619
  p.add_argument("--coordinator", action="store_true",
598
620
  help="this session holds the repo's coordinator lock: print the three restart lines, no prompt")