@caddis/cli 0.4.91 → 0.4.93
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/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_checkout_guard.py +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_fleet.py +26 -9
- package/bundles/antigravity-plugin/scripts/caddis_gate.py +8 -8
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +58 -6
- package/bundles/antigravity-plugin/scripts/caddis_lanes.py +17 -17
- package/bundles/antigravity-plugin/scripts/caddis_preload_review.py +554 -0
- package/bundles/antigravity-plugin/scripts/caddis_review.py +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +25 -39
- package/bundles/antigravity-plugin/scripts/caddis_routing.py +1 -1
- 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_spend.py +121 -138
- package/bundles/antigravity-plugin/scripts/caddis_upstream_check.py +108 -10
- package/bundles/antigravity-plugin/scripts/oss_review.py +15 -13
- package/bundles/antigravity-plugin/scripts/roadmap-recheck.ps1 +4 -2
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +6 -0
- package/bundles/antigravity-plugin/scripts/schemas/hub-spend.schema.json +6 -0
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +65 -1
- package/bundles/antigravity-plugin/skills/_registry.md +3 -1
- 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/cross-review/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +8 -2
- 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 +10 -6
- package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +1 -3
- package/bundles/antigravity-plugin/skills/preload-review/SKILL.md +69 -0
- package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +10 -6
- package/bundles/antigravity-plugin/skills/roadmap/assets/plan-resume-prompt.md +7 -6
- 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/usage-review/SKILL.md +2 -0
- package/bundles/antigravity-plugin-extras/plugin.json +1 -1
- package/bundles/antigravity-plugin-extras/skills/_registry.md +1 -0
- 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/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 +10 -6
- package/bundles/codex/.codex/skills/workflow/roadmap/assets/plan-resume-prompt.md +7 -6
- 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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc
CHANGED
|
Binary file
|
|
@@ -37,7 +37,7 @@ except ModuleNotFoundError as exc:
|
|
|
37
37
|
# and they are not another session's edit. Patterns are fnmatch on the path inside the artifact folder; `*` crosses `/`.
|
|
38
38
|
GENERATED_DIRS = ("relay/", "session-state/", "context-window/", ".relay-injected/")
|
|
39
39
|
GENERATED_PATTERNS = (
|
|
40
|
-
"relay.md", "usage-log.jsonl*", "agent-log.jsonl*", ".last-usage-review", "session-state.md",
|
|
40
|
+
"relay.md", "usage-log.jsonl*", "agent-log.jsonl*", ".last-usage-review", ".last-preload-review", "session-state.md",
|
|
41
41
|
"context-window.json*", ".session-state-*.tmp", "hook-errors.jsonl", "memory.jsonl", "reviews/*.html",
|
|
42
42
|
"*.lock", "*.bak",
|
|
43
43
|
)
|
|
@@ -32,6 +32,14 @@ except ModuleNotFoundError as exc:
|
|
|
32
32
|
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "claude-harness" / "scripts"))
|
|
33
33
|
import caddis_routing
|
|
34
34
|
|
|
35
|
+
try:
|
|
36
|
+
import caddis_run # stable_command: text a later session reads never names a versioned plugin path
|
|
37
|
+
except ModuleNotFoundError as exc:
|
|
38
|
+
if exc.name != "caddis_run":
|
|
39
|
+
raise
|
|
40
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
41
|
+
import caddis_run
|
|
42
|
+
|
|
35
43
|
ACK_FIELDS = ("name", "role", "machine", "folder", "relay", "tasks", "mode", "owns-watchers", "worktrees")
|
|
36
44
|
NO_ACK = "no ack"
|
|
37
45
|
NO_NEW_SESSION = ("keeps-running", "nothing", NO_ACK)
|
|
@@ -136,6 +144,8 @@ def parse_ack(text: str) -> Ack:
|
|
|
136
144
|
after = rest[fence:]
|
|
137
145
|
body = after.split("\n", 1)[1] if "\n" in after else ""
|
|
138
146
|
prompt, inline = _split_prompt(body)
|
|
147
|
+
if caddis_run.VERSIONED_PATH.search(prompt):
|
|
148
|
+
raise AckError(f"the resume prompt: {caddis_run.VERSIONED_PATH_HELP}")
|
|
139
149
|
return Ack(
|
|
140
150
|
name=fields["name"], role=fields["role"], machine=fields["machine"], folder=fields["folder"],
|
|
141
151
|
relay=fields["relay"], tasks=fields["tasks"], mode=mode, owns_watchers=watchers == "yes",
|
|
@@ -309,6 +319,8 @@ def check_sheet(sheet_text: str, roster_text: str) -> list[str]:
|
|
|
309
319
|
errors.append(f"{role}: the resume prompt does not load {tasks}")
|
|
310
320
|
if "is now" not in prompt:
|
|
311
321
|
errors.append(f"{role}: the resume prompt does not greet peers with `is now`")
|
|
322
|
+
if caddis_run.VERSIONED_PATH.search(prompt):
|
|
323
|
+
errors.append(f"{role}: the resume prompt {caddis_run.VERSIONED_PATH_HELP}")
|
|
312
324
|
if _is_shared(r.get("Folder", ""), counts) and "origin/main" not in prompt:
|
|
313
325
|
errors.append(f"{role}: shared checkout, but the resume prompt does not say origin/main")
|
|
314
326
|
return errors
|
|
@@ -458,6 +470,8 @@ def resume_prompt(relay_text: str) -> str:
|
|
|
458
470
|
prompt = "\n".join(body).strip("\n")
|
|
459
471
|
if not prompt.strip():
|
|
460
472
|
raise ResumeError("## Resume prompt fenced block is empty")
|
|
473
|
+
if caddis_run.VERSIONED_PATH.search(prompt):
|
|
474
|
+
raise ResumeError(f"## Resume prompt: {caddis_run.VERSIONED_PATH_HELP}")
|
|
461
475
|
return prompt
|
|
462
476
|
|
|
463
477
|
|
|
@@ -471,12 +485,15 @@ def shell_arg(text: str) -> str:
|
|
|
471
485
|
ANNOUNCE_ID = "<your session id>"
|
|
472
486
|
|
|
473
487
|
|
|
474
|
-
def announce_text(
|
|
488
|
+
def announce_text(name: str, folder: str) -> str:
|
|
475
489
|
"""The sentence the start line adds, so the resumed session names itself and tells its live peers once.
|
|
476
490
|
|
|
477
|
-
A new session cannot expand `${CLAUDE_PLUGIN_ROOT}`,
|
|
478
|
-
|
|
479
|
-
|
|
491
|
+
A new session cannot expand `${CLAUDE_PLUGIN_ROOT}`, and an expanded path holds the plugin version, which is gone
|
|
492
|
+
after an update. So the command is the stable launcher (`caddis_run.py`, never a versioned path). It holds no
|
|
493
|
+
double quote (`shell_arg` turns each into a typographic one), so the launcher path is NOT quoted here: a home
|
|
494
|
+
folder with a space needs the quotes, which the owner's machine does not have. A peer without a name (`-`) is
|
|
495
|
+
not messaged."""
|
|
496
|
+
py = f"python {caddis_run.launcher_path().as_posix()} caddis_fleet.py"
|
|
480
497
|
return (f"Then announce yourself once. Run `{py} whoami --session-id {ANNOUNCE_ID} --name {name} --root .` and "
|
|
481
498
|
f"`{py} peers --session-id {ANNOUNCE_ID} --root .` (your session id is printed at session start). "
|
|
482
499
|
f"Send each peer that has a name (not `-`) one SendMessage: "
|
|
@@ -485,11 +502,11 @@ def announce_text(script: Path, name: str, folder: str) -> str:
|
|
|
485
502
|
|
|
486
503
|
|
|
487
504
|
def render_resume(session: str, session_id: str, workstream: str, prompt: str, role: str, stamp: datetime,
|
|
488
|
-
fleet_mode: bool = False,
|
|
505
|
+
fleet_mode: bool = False, announce: bool = False, folder: str = "",
|
|
489
506
|
root: Path | None = None) -> str:
|
|
490
507
|
"""The last output of `/caddis:handoff`. In a fleet close the restart sheet holds the only start line.
|
|
491
508
|
|
|
492
|
-
With `
|
|
509
|
+
With `announce`, the start line (not the fenced block, which stays the relay's text) ends with the
|
|
493
510
|
whoami + announce sentence: the start line is what the new session receives with its name.
|
|
494
511
|
With `root`, the block names the repo and the start line first changes to it, because the relay's paths are
|
|
495
512
|
repo-relative. `;`, as in the restart sheet: Windows PowerShell 5.1 has no `&&`."""
|
|
@@ -500,8 +517,8 @@ def render_resume(session: str, session_id: str, workstream: str, prompt: str, r
|
|
|
500
517
|
start = "Start line: from the restart sheet"
|
|
501
518
|
else:
|
|
502
519
|
name = new_name(role, stamp)
|
|
503
|
-
if
|
|
504
|
-
prompt = f"{prompt}\n{announce_text(
|
|
520
|
+
if announce:
|
|
521
|
+
prompt = f"{prompt}\n{announce_text(name, folder)}"
|
|
505
522
|
start = f"Start line:\n{cd}claude {_model_flags(role)} --name {name} {shell_arg(prompt)}"
|
|
506
523
|
return (f"{model_line(role)}=== RESUME ===\nSession: {session} ({session_id})\nWorkstream: {workstream}\n"
|
|
507
524
|
f"{repo}{_fenced(shown)}\n{start}\n")
|
|
@@ -580,7 +597,7 @@ def _resume_block_cli(args: argparse.Namespace) -> int:
|
|
|
580
597
|
sys.stderr.write(f"resume-block failed: bad role {role!r}\n")
|
|
581
598
|
return caddis_exit.BLOCKED
|
|
582
599
|
print(render_resume(session, args.session_id, args.name, prompt, role, datetime.now(), args.fleet,
|
|
583
|
-
|
|
600
|
+
True, root.name, root), end="")
|
|
584
601
|
return caddis_exit.CLEAN
|
|
585
602
|
|
|
586
603
|
|
|
@@ -90,7 +90,7 @@ def launch_command(block: str) -> str:
|
|
|
90
90
|
"""The literal command for a non-claude lane, if the phase names one.
|
|
91
91
|
|
|
92
92
|
Also matches a caddis_lanes.py run command, a direct codex/agy command, and an agy command
|
|
93
|
-
wrapped in the spend
|
|
93
|
+
wrapped in the spend wrapper (`python .../caddis_spend.py run --caller X -- agy ...`).
|
|
94
94
|
"""
|
|
95
95
|
m = re.search(
|
|
96
96
|
r'`((?:claude-(?:glm|oss|deepseek)\b|' + _LANES_RUN + r'\b|' + _SPEND_RUN
|
|
@@ -101,13 +101,13 @@ def launch_command(block: str) -> str:
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
_LANES_RUN = r'python\s+"?\$\{CLAUDE_PLUGIN_ROOT\}/scripts/caddis_lanes\.py"?\s+run'
|
|
104
|
-
# Every agy lane goes through
|
|
104
|
+
# Every agy lane goes through `caddis_spend.py run` (usage log, timeout, depth guard; no EUR cap). Any path that ends in
|
|
105
105
|
# scripts/caddis_spend.py: `${CLAUDE_PLUGIN_ROOT}/...`, an expanded plugin-cache path (the codex bundle
|
|
106
106
|
# rewrites the variable), or the bare repo-relative `scripts/caddis_spend.py` - which gate_lane accepts
|
|
107
107
|
# only in the caddis source repo, because in an app repo that path is a file the agent can write.
|
|
108
108
|
_SPEND_RUN = r'python3?\s+"?[^"\s`]*scripts/caddis_spend\.py"?\s+run'
|
|
109
109
|
_SPEND_PATH = re.compile(r'python3?\s+"?([^"\s`]*scripts/caddis_spend\.py)"?\s+run')
|
|
110
|
-
# Shell control characters outside the quoted prompt would chain a second,
|
|
110
|
+
# Shell control characters outside the quoted prompt would chain a second, unwrapped command.
|
|
111
111
|
_SHELL_CHAIN = re.compile(r"[;&|`\n]|\$\(")
|
|
112
112
|
|
|
113
113
|
|
|
@@ -155,7 +155,7 @@ def gate_lane(plan: Path, phase: int) -> int:
|
|
|
155
155
|
return EXIT_MALFORMED
|
|
156
156
|
if re.match(r"agy\b", cmd):
|
|
157
157
|
sys.stderr.write(
|
|
158
|
-
f"[caddis-gate] phase {phase}'s agy command is not wrapped in
|
|
158
|
+
f"[caddis-gate] phase {phase}'s agy command is not wrapped in caddis_spend.py run: {cmd}\n"
|
|
159
159
|
" agy lanes must go through caddis_spend.py run --caller <name> -- agy ... Refusing to run it.\n")
|
|
160
160
|
return EXIT_MALFORMED
|
|
161
161
|
inner = cmd
|
|
@@ -163,7 +163,7 @@ def gate_lane(plan: Path, phase: int) -> int:
|
|
|
163
163
|
wrapped = re.match(_SPEND_RUN + r'\s+--caller\s+\S+\s+--\s+(agy\b.*)$', cmd, re.S)
|
|
164
164
|
if not wrapped:
|
|
165
165
|
sys.stderr.write(
|
|
166
|
-
f"[caddis-gate] phase {phase}'s
|
|
166
|
+
f"[caddis-gate] phase {phase}'s caddis_spend command is malformed: {cmd}\n"
|
|
167
167
|
" Expected: caddis_spend.py run --caller <name> -- agy ... Refusing to run it.\n")
|
|
168
168
|
return EXIT_MALFORMED
|
|
169
169
|
inner = wrapped.group(1)
|
|
@@ -173,13 +173,13 @@ def gate_lane(plan: Path, phase: int) -> int:
|
|
|
173
173
|
or "${" in inner):
|
|
174
174
|
sys.stderr.write(
|
|
175
175
|
f"[caddis-gate] phase {phase}'s agy command chains another command: {cmd}\n"
|
|
176
|
-
" A second command after the wrapped agy would run outside
|
|
176
|
+
" A second command after the wrapped agy would run outside caddis_spend.py run. Refusing to run it.\n")
|
|
177
177
|
return EXIT_MALFORMED
|
|
178
178
|
formats = re.findall(r"--output-format(?:\s+|=)(\S+)", _QUOTED.sub('""', inner))
|
|
179
179
|
if formats != ["json"]:
|
|
180
180
|
sys.stderr.write(
|
|
181
181
|
f"[caddis-gate] phase {phase}'s agy command must have exactly one --output-format json: {cmd}\n"
|
|
182
|
-
" Without JSON output the
|
|
182
|
+
" Without JSON output the usage log cannot read the token counts. Refusing to run it.\n")
|
|
183
183
|
return EXIT_MALFORMED
|
|
184
184
|
path = _SPEND_PATH.match(cmd).group(1)
|
|
185
185
|
norm = path.replace("\\", "/")
|
|
@@ -608,7 +608,7 @@ _STEERING_FILENAMES = {"conftest.py", "pytest.ini", "pyproject.toml", "setup.cfg
|
|
|
608
608
|
def is_review_steering_file(path: str) -> bool:
|
|
609
609
|
"""True for config that steers reviews, merges or tests: never tier 0, and never a 0-reviewer "1-small".
|
|
610
610
|
|
|
611
|
-
`.caddis/*.toml` (review/implement routing, merge-chain checks
|
|
611
|
+
`.caddis/*.toml` (review/implement routing, merge-chain checks), any `conftest.py`, the pytest and
|
|
612
612
|
packaging config, and `.github/workflows/**`. A fix diff that changes these can turn a gate off, so it is reviewed.
|
|
613
613
|
"""
|
|
614
614
|
norm = path.replace("\\", "/").lower().removeprefix("./")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"generated": "2026-11-
|
|
3
|
+
"version": "1.3.176",
|
|
4
|
+
"generated": "2026-11-03 23:28 UTC",
|
|
5
5
|
"commands": [
|
|
6
6
|
{
|
|
7
7
|
"name": "add-rules",
|
|
@@ -338,7 +338,6 @@
|
|
|
338
338
|
]
|
|
339
339
|
],
|
|
340
340
|
"scripts": [
|
|
341
|
-
"caddis_gate.py",
|
|
342
341
|
"caddis_lanes.py",
|
|
343
342
|
"caddis_routing.py",
|
|
344
343
|
"caddis_spend.py",
|
|
@@ -499,6 +498,16 @@
|
|
|
499
498
|
"stage": "knowledge",
|
|
500
499
|
"daily": false
|
|
501
500
|
},
|
|
501
|
+
{
|
|
502
|
+
"name": "graph-email",
|
|
503
|
+
"description": "Send a Markdown file as an email through Microsoft Graph or SMTP, as set in ~/.caddis/email.toml. Default recipient is the owner.",
|
|
504
|
+
"hint": "<file.md> [subject words] [--to address] [--attach file]",
|
|
505
|
+
"steps": [],
|
|
506
|
+
"scripts": [],
|
|
507
|
+
"noArgs": false,
|
|
508
|
+
"stage": "ship",
|
|
509
|
+
"daily": false
|
|
510
|
+
},
|
|
502
511
|
{
|
|
503
512
|
"name": "handoff",
|
|
504
513
|
"description": "End-of-session handoff — capture exact state so the next session resumes with zero re-discovery",
|
|
@@ -935,6 +944,43 @@
|
|
|
935
944
|
"stage": "plan",
|
|
936
945
|
"daily": false
|
|
937
946
|
},
|
|
947
|
+
{
|
|
948
|
+
"name": "preload-review",
|
|
949
|
+
"description": "Show what loads before the first prompt in every repo (rules, memory index, skills, MCP names) and list what to shorten",
|
|
950
|
+
"hint": "[--root PATH]",
|
|
951
|
+
"steps": [
|
|
952
|
+
[
|
|
953
|
+
"1",
|
|
954
|
+
"find the script"
|
|
955
|
+
],
|
|
956
|
+
[
|
|
957
|
+
"2",
|
|
958
|
+
"run it"
|
|
959
|
+
],
|
|
960
|
+
[
|
|
961
|
+
"3",
|
|
962
|
+
"show the output"
|
|
963
|
+
],
|
|
964
|
+
[
|
|
965
|
+
"4",
|
|
966
|
+
"point to /context"
|
|
967
|
+
],
|
|
968
|
+
[
|
|
969
|
+
"5",
|
|
970
|
+
"offer actions only"
|
|
971
|
+
],
|
|
972
|
+
[
|
|
973
|
+
"6",
|
|
974
|
+
"record the review"
|
|
975
|
+
]
|
|
976
|
+
],
|
|
977
|
+
"scripts": [
|
|
978
|
+
"caddis_preload_review.py"
|
|
979
|
+
],
|
|
980
|
+
"noArgs": false,
|
|
981
|
+
"stage": "setup",
|
|
982
|
+
"daily": false
|
|
983
|
+
},
|
|
938
984
|
{
|
|
939
985
|
"name": "rca",
|
|
940
986
|
"description": "Record a root cause in one step — .caddis/rca/<date>-<slug>.md — or close one with the fixing commit",
|
|
@@ -1765,6 +1811,12 @@
|
|
|
1765
1811
|
"description": "Create well-structured conventional commit messages following Conventional Commits standard. Use when committing changes, preparing PRs, or generating changelogs.",
|
|
1766
1812
|
"core": true
|
|
1767
1813
|
},
|
|
1814
|
+
{
|
|
1815
|
+
"name": "graph-email",
|
|
1816
|
+
"category": "devops",
|
|
1817
|
+
"description": "Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note.",
|
|
1818
|
+
"core": false
|
|
1819
|
+
},
|
|
1768
1820
|
{
|
|
1769
1821
|
"name": "monorepo",
|
|
1770
1822
|
"category": "devops",
|
|
@@ -2218,7 +2270,7 @@
|
|
|
2218
2270
|
{
|
|
2219
2271
|
"name": "brainstorming",
|
|
2220
2272
|
"category": "workflow",
|
|
2221
|
-
"description": "
|
|
2273
|
+
"description": "Use before any creative work: new features, components or behavior changes, or planning anything new. Finds what the user wants first.",
|
|
2222
2274
|
"core": true
|
|
2223
2275
|
},
|
|
2224
2276
|
{
|
|
@@ -2409,9 +2461,9 @@
|
|
|
2409
2461
|
]
|
|
2410
2462
|
},
|
|
2411
2463
|
"counts": {
|
|
2412
|
-
"commands":
|
|
2464
|
+
"commands": 41,
|
|
2413
2465
|
"agents": 12,
|
|
2414
|
-
"skills":
|
|
2466
|
+
"skills": 134,
|
|
2415
2467
|
"core": 50,
|
|
2416
2468
|
"hooks": 17
|
|
2417
2469
|
}
|
|
@@ -127,9 +127,8 @@ BUDGET_PATTERNS: dict[str, tuple[str, ...]] = {
|
|
|
127
127
|
r"Quota exceeded\. Check your plan",
|
|
128
128
|
r"workspace is out of credits",
|
|
129
129
|
),
|
|
130
|
-
# caddis_spend
|
|
131
|
-
"agy": (r"RESOURCE_EXHAUSTED.*quota", r"Individual quota reached", r"(?m)^caddis_spend:
|
|
132
|
-
r"(?m)^caddis_spend: could not lock"),
|
|
130
|
+
# caddis_spend could not lock its usage log (another launch holds it): the chain moves on, like a provider quota.
|
|
131
|
+
"agy": (r"RESOURCE_EXHAUSTED.*quota", r"Individual quota reached", r"(?m)^caddis_spend: could not lock"),
|
|
133
132
|
}
|
|
134
133
|
CONFIG_PATTERNS: dict[str, tuple[str, ...]] = {
|
|
135
134
|
"claude": (),
|
|
@@ -147,8 +146,7 @@ CONFIG_PATTERNS: dict[str, tuple[str, ...]] = {
|
|
|
147
146
|
r"Model metadata for .* not found",
|
|
148
147
|
),
|
|
149
148
|
"agy": (r"invalid model selection", r"is not recognized as a known model",
|
|
150
|
-
r"(?m)^caddis_spend:
|
|
151
|
-
r"(?m)^caddis_spend: could not check the spend cap"),
|
|
149
|
+
r"(?m)^caddis_spend: could not write the spend log"),
|
|
152
150
|
}
|
|
153
151
|
LOAD_WORDING = (
|
|
154
152
|
r"(?i)\bcpu\s+burner",
|
|
@@ -613,7 +611,7 @@ def _windows_process_names(pids: list[int]) -> dict[int, str]:
|
|
|
613
611
|
|
|
614
612
|
|
|
615
613
|
def _refused_run(returncode: int, message: str) -> LaneRun:
|
|
616
|
-
"""A lane that never started: the spend
|
|
614
|
+
"""A lane that never started: the spend log could not be locked or written. pid 0, no time spent."""
|
|
617
615
|
return LaneRun(returncode=returncode, output=message + "\n", timed_out=False, duration_s=0.0,
|
|
618
616
|
pid=0, started=time.time())
|
|
619
617
|
|
|
@@ -631,23 +629,18 @@ def run_lane(
|
|
|
631
629
|
probe=default_probe,
|
|
632
630
|
spend_caller: str = "lane",
|
|
633
631
|
) -> LaneRun:
|
|
634
|
-
# Every agy launch is
|
|
635
|
-
# agy through here too, so each call is
|
|
636
|
-
# (
|
|
632
|
+
# Every agy launch is written to the usage log first (caddis_spend; there is no cap). ci_watch reaches
|
|
633
|
+
# agy through here too, so each call is logged exactly once. A log that cannot be locked or written
|
|
634
|
+
# refuses the lane (the spend would go unseen) and never crashes the unattended chain.
|
|
637
635
|
spend_id = None
|
|
638
636
|
if Path(argv[0]).stem.lower() == "agy":
|
|
639
637
|
spend_home = Path.home()
|
|
640
638
|
try:
|
|
641
639
|
spend_id = caddis_spend.reserve(spend_home, spend_caller, datetime.now(timezone.utc))
|
|
642
|
-
except caddis_spend.NotConfigured:
|
|
643
|
-
return _refused_run(3, caddis_spend.NOT_CONFIGURED_MESSAGE)
|
|
644
640
|
except TimeoutError as exc:
|
|
645
641
|
return _refused_run(3, str(exc))
|
|
646
|
-
except Exception as exc: #
|
|
647
|
-
return _refused_run(3, f"caddis_spend: could not
|
|
648
|
-
if spend_id is None:
|
|
649
|
-
return _refused_run(1, "caddis_spend: over cap: agy refused ("
|
|
650
|
-
+ caddis_spend.status_line(spend_home, datetime.now(timezone.utc)) + ")")
|
|
642
|
+
except Exception as exc: # a file error on the log: refuse, never crash
|
|
643
|
+
return _refused_run(3, f"caddis_spend: could not write the spend log: {exc!r}")
|
|
651
644
|
argv = caddis_spend.hidden_argv(argv, env) # agy's tool consoles open on a hidden desktop, not on screen
|
|
652
645
|
job_name = f"Local\\caddis-governor-{os.getpid()}-{secrets.token_hex(8)}" if sys.platform == "win32" else None
|
|
653
646
|
full = governed_argv(argv, job_name)
|
|
@@ -781,8 +774,15 @@ def run_lane(
|
|
|
781
774
|
try:
|
|
782
775
|
caddis_spend.settle(spend_home, spend_id, counts, datetime.now(timezone.utc),
|
|
783
776
|
duration_s=clock() - monotonic_started)
|
|
784
|
-
except Exception as exc: # the pending
|
|
777
|
+
except Exception as exc: # the pending line stays unsettled; never lose the lane's result
|
|
785
778
|
output += f"\ncaddis_spend: could not settle {spend_id}: {exc!r}\n"
|
|
779
|
+
try: # advice only: at or above the advise level the lane's output says so; nothing is refused
|
|
780
|
+
committed = caddis_spend.committed_last_24h(spend_home, datetime.now(timezone.utc))
|
|
781
|
+
level = caddis_spend.advise_eur()
|
|
782
|
+
if committed >= level:
|
|
783
|
+
output += "\n" + caddis_spend.advisory_line(committed, level) + "\n"
|
|
784
|
+
except Exception:
|
|
785
|
+
pass
|
|
786
786
|
return LaneRun(
|
|
787
787
|
returncode=proc.returncode,
|
|
788
788
|
output=output,
|