@caddis/cli 0.4.92 → 0.4.94
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 +4 -0
- package/bundles/antigravity-plugin/agents/debug.md +2 -0
- package/bundles/antigravity-plugin/guard_agy.py +6 -2
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/repo_freshness.py +71 -6
- package/bundles/antigravity-plugin/repo_hygiene.py +516 -0
- 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_checkout_guard.py +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_finished.py +537 -0
- package/bundles/antigravity-plugin/scripts/caddis_fleet.py +26 -9
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +65 -12
- package/bundles/antigravity-plugin/scripts/caddis_own_cleanup.py +23 -248
- package/bundles/antigravity-plugin/scripts/caddis_preload_review.py +554 -0
- package/bundles/antigravity-plugin/scripts/caddis_repo_tidy.py +240 -0
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +9 -3
- package/bundles/antigravity-plugin/scripts/caddis_run.py +160 -0
- package/bundles/antigravity-plugin/scripts/caddis_spawn.py +17 -1
- package/bundles/antigravity-plugin/scripts/caddis_tidy.py +12 -0
- package/bundles/antigravity-plugin/scripts/caddis_upstream_check.py +108 -10
- package/bundles/antigravity-plugin/scripts/caddis_worktree_root.py +111 -2
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +132 -11
- package/bundles/antigravity-plugin/skills/_registry.md +7 -5
- package/bundles/antigravity-plugin/skills/adopt-app/SKILL.md +2 -5
- package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +232 -40
- package/bundles/antigravity-plugin/skills/brainstorming/builder-check-prompt.md +25 -0
- package/bundles/antigravity-plugin/skills/cloud-phases/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/dashboard-perf-sweep/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/db-diagram/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/explainer-doc/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +7 -1
- package/bundles/antigravity-plugin/skills/fleet-close/SKILL.md +4 -1
- package/bundles/antigravity-plugin/skills/graph-email/SKILL.md +15 -0
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +9 -2
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +7 -0
- package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +1 -3
- package/bundles/antigravity-plugin/skills/port-to-github/SKILL.md +2 -5
- package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/preload-review/SKILL.md +69 -0
- package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +4 -0
- package/bundles/antigravity-plugin/skills/roadmap/assets/plan-resume-prompt.md +6 -5
- package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/spawn-session/SKILL.md +5 -0
- package/bundles/antigravity-plugin/skills/tdd/SKILL.md +2 -1
- package/bundles/antigravity-plugin/skills/tech-explainer/SKILL.md +2 -6
- package/bundles/antigravity-plugin/skills/usage-review/SKILL.md +2 -0
- package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +19 -2
- package/bundles/antigravity-plugin/skills/warm-editorial-ui/SKILL.md +1 -1
- package/bundles/antigravity-plugin-extras/plugin.json +1 -1
- package/bundles/antigravity-plugin-extras/skills/_registry.md +3 -2
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/SKILL.md +1 -2
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/SKILL.md +1 -2
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/SKILL.md +1 -1
- package/bundles/antigravity-plugin-extras/skills/graph-email/SKILL.md +53 -0
- package/bundles/antigravity-plugin-extras/skills/graph-email/email.toml.example +44 -0
- package/bundles/antigravity-plugin-extras/skills/graph-email/scripts/send_email.py +432 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/SKILL.md +2 -4
- package/bundles/antigravity-plugin-extras/skills/runner-move/SKILL.md +2 -4
- package/bundles/antigravity-plugin-extras/skills/setup-project-ai/SKILL.md +1 -1
- package/bundles/antigravity-plugin-extras/skills/understand-anything/SKILL.md +2 -5
- package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/SKILL.md +1 -1
- package/bundles/codex/.codex/skills/data/db-diagram/SKILL.md +1 -1
- package/bundles/codex/.codex/skills/devops/adopt-app/SKILL.md +2 -5
- package/bundles/codex/.codex/skills/devops/port-to-github/SKILL.md +2 -5
- package/bundles/codex/.codex/skills/devops/using-git-worktrees/SKILL.md +19 -2
- package/bundles/codex/.codex/skills/docs/explainer-doc/SKILL.md +1 -1
- package/bundles/codex/.codex/skills/docs/tech-explainer/SKILL.md +2 -6
- package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/SKILL.md +1 -1
- package/bundles/codex/.codex/skills/media/particle-art/SKILL.md +1 -3
- package/bundles/codex/.codex/skills/workflow/brainstorming/SKILL.md +232 -40
- package/bundles/codex/.codex/skills/workflow/brainstorming/builder-check-prompt.md +25 -0
- package/bundles/codex/.codex/skills/workflow/roadmap/SKILL.md +4 -0
- package/bundles/codex/.codex/skills/workflow/roadmap/assets/plan-resume-prompt.md +6 -5
- package/bundles/manifest.json +3 -3
- package/dist/export/assets/export-CMtV-slT.css +1 -0
- package/dist/export/index.html +2 -2
- package/dist/ui/assets/{Activity-DZKPMOeV.js → Activity-BDjet2xd.js} +1 -1
- package/dist/ui/assets/Guide-Czn5sK0f.js +9 -0
- package/dist/ui/assets/Guide-D-Zy4cUT.css +1 -0
- package/dist/ui/assets/{RoadmapTab-DPsiSmIF.js → RoadmapTab-Bd8geyQx.js} +1 -1
- package/dist/ui/assets/index-Bd0Z4jR8.css +1 -0
- package/dist/ui/assets/{index-xl156OCN.js → index-CmngQ8Mk.js} +12 -12
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/export/assets/export-HxTgj3z2.css +0 -1
- package/dist/ui/assets/Guide-5ZFfL6sl.js +0 -9
- package/dist/ui/assets/Guide-Dnsb-TRd.css +0 -1
- package/dist/ui/assets/index-DGlNAmeA.css +0 -1
- /package/dist/export/assets/{export-B7BBDg5I.js → export-DtlDFN4L.js} +0 -0
package/README.md
CHANGED
|
@@ -143,6 +143,10 @@ starts it in the background; `caddis hub stop` stops it.
|
|
|
143
143
|
|
|
144
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
145
|
|
|
146
|
+
**Guide Wall poster.** A third tab, `Wall poster` (`#/guide/wall`), shows one A4 landscape sheet: the daily commands in order, a card per stage (plan, build, review, ship, continuity, knowledge, setup), and the agents. The `Print` button prints exactly that sheet on one page. It is built from the same installed guide data as the other tabs, so a new command, agent or count appears by itself after `caddis update` and a hub restart. The text shrinks (to 60% at most) when the guide grows, so nothing is cut off. Each line is the first clause of the description; the Details tab has the full text.
|
|
147
|
+
|
|
148
|
+
**Guide Map.** A fourth tab, `Map` (`#/guide/map`), lays out the whole plugin: the daily loop (plan, build, review, ship) with its commands, the support lanes (continuity, knowledge, setup), the hooks as a timeline in the order a session fires them, the agents with their model and a `writes files` marker, the skills by family, and the runtimes that receive caddis. Every name links to its entry in Details. A filter box dims what does not match, and `Print` prints the map on A3 landscape. Nothing on the map is written by hand: it is built from the installed guide data, so a new command, agent, skill or hook appears by itself after `caddis update` and a hub restart.
|
|
149
|
+
|
|
146
150
|
**Sessions from more than one agent.** Claude Code sessions come from `claude agents --json`. agy
|
|
147
151
|
(Antigravity) sessions come from the caddis agy hooks: each agy turn writes a status file, and the
|
|
148
152
|
hub lists that session with an `agy` chip. A turn that starts sets `working`. A turn that ends sets
|
|
@@ -8,6 +8,8 @@ hypothesis second, fix last** — never guess-and-check. You diagnose and return
|
|
|
8
8
|
makes the edits. Keep its context clean: return the conclusion, not your whole investigation.
|
|
9
9
|
|
|
10
10
|
## Method
|
|
11
|
+
If the superpowers plugin is on, follow its `systematic-debugging` skill: no fix proposal before the root cause is proven.
|
|
12
|
+
|
|
11
13
|
### 1. Gather evidence (before touching anything)
|
|
12
14
|
- Read the full error / stack trace / failing output.
|
|
13
15
|
- Reproduce: run the failing test or trigger the bug. Record a baseline — run the suite and note
|
|
@@ -260,6 +260,8 @@ def classify_read(file_path: str) -> tuple[str, str]:
|
|
|
260
260
|
return "deny", "reads a secret env file"
|
|
261
261
|
if base in _SECRET_BASENAMES or any(base.endswith(s) for s in _SECRET_SUFFIXES):
|
|
262
262
|
return "deny", f"reads a credential/key file ({base})"
|
|
263
|
+
if base == "keys.env": # ~/.caddis/keys.env holds provider API keys: scripts read it, an agent must not
|
|
264
|
+
return "deny", "reads the caddis provider keys file (keys.env)"
|
|
263
265
|
return "allow", ""
|
|
264
266
|
|
|
265
267
|
|
|
@@ -968,10 +970,12 @@ _NO_WINDOW_KW = {"creationflags": 0x08000000} if os.name == "nt" else {}
|
|
|
968
970
|
|
|
969
971
|
def _is_ref(name: str, cwd: str) -> bool:
|
|
970
972
|
"""True when `name` resolves as a commit in the repo at `cwd`. Git cannot run (missing, hung): True, so the
|
|
971
|
-
caller asks. Called only when `name` is also a path, so most checkouts never pay for the git call.
|
|
973
|
+
caller asks. Called only when `name` is also a path, so most checkouts never pay for the git call. The wait is
|
|
974
|
+
10 s: at 5 s a slow windows-latest runner timed out, `git checkout <file>` counted as a branch switch, and the
|
|
975
|
+
guard tests flaked (.caddis/kb/ci-speed-and-test-rules.md § 23). The outer hook timeout is 30 s."""
|
|
972
976
|
try:
|
|
973
977
|
r = subprocess.run(["git", "-C", cwd, "rev-parse", "--verify", "--quiet", f"{name}^{{commit}}"],
|
|
974
|
-
capture_output=True, text=True, timeout=
|
|
978
|
+
capture_output=True, text=True, timeout=10, stdin=subprocess.DEVNULL,
|
|
975
979
|
**_NO_WINDOW_KW)
|
|
976
980
|
except (OSError, subprocess.SubprocessError):
|
|
977
981
|
return True
|
|
@@ -22,8 +22,10 @@ IT ONLY PRINTS. It never switches, stashes, resets, commits or creates anything
|
|
|
22
22
|
throttle stamp inside .git/. A SessionStart hook cannot ask a question, and these checkouts
|
|
23
23
|
are shared with other live sessions — acting without an answer could take work with it.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
ONE LINE WHEN THERE IS NOTHING TO SAY (owner, 4 Nov 2026: silence was read as 'the hook did not run').
|
|
26
|
+
Inside a git repo on a branch it always prints the one hygiene summary line from repo_hygiene.py (branch,
|
|
27
|
+
behind, ahead, uncommitted, stale worktrees, branch PR states, pre-push gate), `[OK]` when all is level.
|
|
28
|
+
Detail lines follow only for non-zero counts. Outside a repo or on a detached HEAD it still prints nothing.
|
|
27
29
|
|
|
28
30
|
Ported into caddis 2026-09-12 from a personal hook that existed on one machine only
|
|
29
31
|
(~/.claude/hooks/repo-freshness.sh), so agy gets it too and it is versioned and tested.
|
|
@@ -38,6 +40,7 @@ import signal
|
|
|
38
40
|
import subprocess
|
|
39
41
|
import sys
|
|
40
42
|
import time
|
|
43
|
+
from pathlib import Path
|
|
41
44
|
|
|
42
45
|
try:
|
|
43
46
|
_cfg_scripts = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "scripts")
|
|
@@ -50,6 +53,18 @@ except Exception: # pragma: no cover — defensive; a hook must never crash a s
|
|
|
50
53
|
def artifact_root(root):
|
|
51
54
|
return os.path.join(str(root), ARTIFACT_DIRS[0])
|
|
52
55
|
|
|
56
|
+
# The hygiene summary (plan repo-hygiene-report, D2). It sits beside this file in every layout: the Claude/Codex
|
|
57
|
+
# plugin's hooks/ folder, the agy flat bundle and the source tree. Fail open: when it cannot be imported, the old
|
|
58
|
+
# freshness line is kept and one skipped line says why.
|
|
59
|
+
try:
|
|
60
|
+
_here = os.path.dirname(os.path.abspath(__file__))
|
|
61
|
+
if _here not in sys.path:
|
|
62
|
+
sys.path.insert(0, _here)
|
|
63
|
+
import repo_hygiene
|
|
64
|
+
except Exception: # noqa: BLE001 - any import failure falls back to the old line (a test blocks the import)
|
|
65
|
+
repo_hygiene = None
|
|
66
|
+
SKIP_HYGIENE = "[HARNESS] skipped: repo hygiene - repo_hygiene.py not found beside repo_freshness.py"
|
|
67
|
+
|
|
53
68
|
# A narrow Windows console (cp1252) must not raise on a branch name with any Unicode in it.
|
|
54
69
|
_reconfig = getattr(sys.stdout, "reconfigure", None)
|
|
55
70
|
if _reconfig:
|
|
@@ -378,6 +393,33 @@ def _budget_s() -> float:
|
|
|
378
393
|
return value if math.isfinite(value) and value > 0 else TOTAL_BUDGET_S
|
|
379
394
|
|
|
380
395
|
|
|
396
|
+
def _missing_gate_note(cwd: str, top: str) -> str:
|
|
397
|
+
"""One line when a caddis repo (it has an artifact folder) has NO pre-push hook, else "".
|
|
398
|
+
|
|
399
|
+
`.git/hooks` is not versioned, so a fresh clone, a re-clone or a new machine starts without the gate and nothing
|
|
400
|
+
says so (parking-lot: pre-push-gate-missing-in-most-fleet-apps). Report only: installing a hook is a change
|
|
401
|
+
the user did not ask for. A hook that exists but is not ours is the user's choice and gets no note. With
|
|
402
|
+
`core.hooksPath` set the hooks live elsewhere, so the hook cannot be judged. In a linked worktree the hooks
|
|
403
|
+
are in the COMMON git dir."""
|
|
404
|
+
if not os.path.isdir(artifact_root(top)):
|
|
405
|
+
return ""
|
|
406
|
+
if _git(cwd, "config", "--get", "core.hooksPath")[1]:
|
|
407
|
+
return ""
|
|
408
|
+
common = _git(cwd, "rev-parse", "--git-common-dir")[1]
|
|
409
|
+
if not common:
|
|
410
|
+
return ""
|
|
411
|
+
if not os.path.isabs(common):
|
|
412
|
+
common = os.path.join(cwd, common)
|
|
413
|
+
if os.path.exists(os.path.join(common, "hooks", "pre-push")):
|
|
414
|
+
return ""
|
|
415
|
+
installer = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "scripts",
|
|
416
|
+
"setup_project_ai.py")
|
|
417
|
+
how = (f'python "{installer}" "{top}" --hooks-only' if os.path.isfile(installer)
|
|
418
|
+
else "run /caddis:setup-project-ai")
|
|
419
|
+
return ("[HARNESS] This repo has no pre-push gate (hooks/pre-push is missing), so a push runs no local "
|
|
420
|
+
f"checks and CI is the first gate. Install it: {how}")
|
|
421
|
+
|
|
422
|
+
|
|
381
423
|
def report(cwd: str, own_session_id: str = "") -> list[str]:
|
|
382
424
|
"""The lines to print. Empty when there is nothing worth saying."""
|
|
383
425
|
global _deadline
|
|
@@ -399,6 +441,15 @@ def _report(cwd: str, own_session_id: str = "") -> list[str]:
|
|
|
399
441
|
# the "could not fetch" note would be pure noise — common for scratch and local-only repos.
|
|
400
442
|
has_origin = "origin" in _git(cwd, "remote")[1].split()
|
|
401
443
|
git_dir = _git(cwd, "rev-parse", "--absolute-git-dir")[1] or os.path.join(cwd, ".git")
|
|
444
|
+
# The repo top level, so a session started in a subfolder still finds `.caddis/session-state`.
|
|
445
|
+
top = _git(cwd, "rev-parse", "--show-toplevel")[1] or cwd
|
|
446
|
+
# gh and orca start now, in threads, so their wait overlaps the fetch and the git calls below (D8).
|
|
447
|
+
jobs = None
|
|
448
|
+
if repo_hygiene is not None:
|
|
449
|
+
try:
|
|
450
|
+
jobs = repo_hygiene.start_jobs(Path(top), _git, _remaining, want_prs=has_origin)
|
|
451
|
+
except Exception: # noqa: BLE001 - fail open: report_lines then starts them itself
|
|
452
|
+
jobs = None
|
|
402
453
|
if has_origin and _fetch_is_due(git_dir):
|
|
403
454
|
fetched = _fetch(cwd)
|
|
404
455
|
if fetched:
|
|
@@ -410,8 +461,6 @@ def _report(cwd: str, own_session_id: str = "") -> list[str]:
|
|
|
410
461
|
lines.append("[HARNESS] could not fetch origin - the figures below may be stale.")
|
|
411
462
|
|
|
412
463
|
ref = _default_ref(cwd) if has_origin else ""
|
|
413
|
-
# The repo top level, so a session started in a subfolder still finds `.caddis/session-state`.
|
|
414
|
-
top = _git(cwd, "rev-parse", "--show-toplevel")[1] or cwd
|
|
415
464
|
entries = _status_entries(top)
|
|
416
465
|
dirty = len(entries)
|
|
417
466
|
dirty_paths = {_norm_path(p) for paths in entries for p in paths if _norm_path(p)}
|
|
@@ -419,8 +468,22 @@ def _report(cwd: str, own_session_id: str = "") -> list[str]:
|
|
|
419
468
|
ahead = _count(cwd, f"{ref}..HEAD") if ref else 0
|
|
420
469
|
default_branch = ref.split("/", 1)[-1] if ref else ""
|
|
421
470
|
|
|
422
|
-
|
|
423
|
-
|
|
471
|
+
gate_note = _missing_gate_note(cwd, top)
|
|
472
|
+
summary = None
|
|
473
|
+
if repo_hygiene is not None:
|
|
474
|
+
# The summary line first: it carries branch, behind, ahead and uncommitted once, so no count is repeated.
|
|
475
|
+
fresh = {"branch": branch, "ref": ref, "behind": behind, "ahead": ahead, "dirty": dirty,
|
|
476
|
+
"gate_missing": bool(gate_note)}
|
|
477
|
+
try:
|
|
478
|
+
summary = repo_hygiene.report_lines(Path(top), fresh, _git, _remaining, jobs=jobs)
|
|
479
|
+
except Exception: # noqa: BLE001 - fail open: a broken report must not cost the freshness lines
|
|
480
|
+
lines.insert(0, "[HARNESS] skipped: repo hygiene - the report failed")
|
|
481
|
+
else:
|
|
482
|
+
lines.insert(0, SKIP_HYGIENE)
|
|
483
|
+
if summary is not None:
|
|
484
|
+
lines[0:0] = summary
|
|
485
|
+
elif ref and (branch != default_branch or behind or dirty):
|
|
486
|
+
# No summary line: the old branch line carries branch and counts. With no remote, the dirty warning is all.
|
|
424
487
|
lines.append(f"[HARNESS] branch '{branch}' | {behind} behind {ref} | {ahead} ahead "
|
|
425
488
|
f"| {dirty} uncommitted")
|
|
426
489
|
if dirty:
|
|
@@ -439,6 +502,8 @@ def _report(cwd: str, own_session_id: str = "") -> list[str]:
|
|
|
439
502
|
if ahead:
|
|
440
503
|
lines.append(f"[HARNESS] {ahead} local commit(s) are not on {ref}. Do not reset or "
|
|
441
504
|
f"re-branch without checking them: git log --oneline {ref}..HEAD")
|
|
505
|
+
if gate_note:
|
|
506
|
+
lines.append(gate_note)
|
|
442
507
|
return lines
|
|
443
508
|
|
|
444
509
|
|