@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: graph-email
|
|
3
|
+
description: Send a Markdown file as an email through Microsoft Graph or SMTP, as set in ~/.caddis/email.toml. Default recipient is the owner.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the `graph-email` skill to send an email.
|
|
7
|
+
|
|
8
|
+
Arguments: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
1. Read the skill `graph-email` first and follow it.
|
|
11
|
+
2. If `~/.caddis/email.toml` is missing, or `--check` fails, tell the owner what is missing and stop. Do not guess values.
|
|
12
|
+
3. The first argument is the Markdown file. If there is none, ask which file, or offer to write one in the project's `comms/` folder.
|
|
13
|
+
4. Subject: `caddis-<app-name> <subject>`. Take the app name from the project folder. If the owner gave subject words, use them.
|
|
14
|
+
5. Recipient: the owner's own address unless `--to` is given. If `--to` is any other address, confirm with the owner before sending.
|
|
15
|
+
6. Run a dry run, check the preview, then send. Report the provider, status, recipient and subject. Keep a copy of the file in `comms/`.
|
|
@@ -303,6 +303,7 @@ Read .caddis/relay/<name>.md, then the plan it points to. Continue from <phase/s
|
|
|
303
303
|
Load every row of .caddis/relay/<name>.tasks.md with TaskCreate.
|
|
304
304
|
\`\`\`
|
|
305
305
|
(Keep the `Load every row` sentence only when Step 3c wrote `.caddis/relay/<name>.tasks.md`.)
|
|
306
|
+
(A script command in the prompt is written `python "<home>/.caddis/bin/caddis_run.py" <script> ...`, never the expanded plugin path: see Rules.)
|
|
306
307
|
|
|
307
308
|
STATUS: <CONTINUE | OWNER-GATE <P>-OG<n> | BLOCKED <owner> | FAILED <reason>>
|
|
308
309
|
```
|
|
@@ -526,8 +527,9 @@ The `cd` makes the relay's repo-relative paths work from any terminal folder (`;
|
|
|
526
527
|
the new session to run `caddis_fleet.py whoami` with its new name, then `caddis_fleet.py peers`, and to send
|
|
527
528
|
each named live peer in the same repo (the checkout and its worktrees) one `SendMessage`:
|
|
528
529
|
`<name> started in <folder>: <next action>. No reply needed.` The fenced block stays the relay's text. A
|
|
529
|
-
session that pastes the block, not the start line, announces nothing. The
|
|
530
|
-
|
|
530
|
+
session that pastes the block, not the start line, announces nothing. The sentence names the stable launcher
|
|
531
|
+
(`~/.caddis/bin/caddis_run.py`), because a new session cannot expand `${CLAUDE_PLUGIN_ROOT}` and a versioned
|
|
532
|
+
plugin path is gone after the next update.
|
|
531
533
|
- **Fleet close.** When this handoff runs because a peer sent `FLEET CLOSE from <coordinator>`, add
|
|
532
534
|
`--fleet`. The Start line is then `Start line: from the restart sheet`: the restart sheet is the only
|
|
533
535
|
start line in a fleet close, and `/caddis:fleet-open` already greets the peers, so it has no announce
|
|
@@ -538,6 +540,11 @@ The `cd` makes the relay's repo-relative paths work from any terminal folder (`;
|
|
|
538
540
|
`--role <role>` to set another.
|
|
539
541
|
|
|
540
542
|
## Rules
|
|
543
|
+
- **Script commands in persisted text.** In text a later session reads (the relay, its `## Resume prompt`, the
|
|
544
|
+
tasks file), write `python "<home>/.caddis/bin/caddis_run.py" <script> ...` (`<home>` is the user's home folder, forward slashes), never the
|
|
545
|
+
expanded plugin path. An expanded `${CLAUDE_PLUGIN_ROOT}` holds the plugin version and is gone after the next update.
|
|
546
|
+
`${CLAUDE_PLUGIN_ROOT}` stays right in a command that runs now. `caddis_fleet.py resume-block` refuses a prompt that holds a
|
|
547
|
+
versioned path.
|
|
541
548
|
- **Context rule.** Above 200k: checkpoint at the next card end when 2 or more cards are left; else finish
|
|
542
549
|
the phase and run the full handoff. At 280k: checkpoint at the first moment no agent or background command
|
|
543
550
|
runs. Then ask the owner for `/clear`. Each turn re-reads the whole conversation, so a long session costs
|
|
@@ -122,8 +122,8 @@ not hold the child's work. So these rules keep briefs and replies small:
|
|
|
122
122
|
7. **Merge:** one member at a time into the feature branch. Run the whole test folder after each merge, and
|
|
123
123
|
the phase gates. A conflict stops that member only.
|
|
124
124
|
8. **Cost:** wave cost is the sum of its members, each on the cheapest fitting model from the session table
|
|
125
|
-
(`caddis_routing.py session`).
|
|
126
|
-
|
|
125
|
+
(`caddis_routing.py session`). There is no spend cap: `caddis_spend.py status` shows the agy spend; if it
|
|
126
|
+
ends with ` - ADVISORY`, tell the owner before the wave. Exit 75 means "not run", not "failed".
|
|
127
127
|
9. **No plan-time marker.** Pick the wave from the CURRENT `Files:` lists: at most 3 phases, disjoint, one
|
|
128
128
|
worktree each. Safety comes from this run-time check and the whole test folder after each merge, not
|
|
129
129
|
from the plan: phases often touch files outside their `Files:`. A plan adds only an optional
|
|
@@ -307,10 +307,11 @@ row, visible to any later reader without anyone having to catch it live.
|
|
|
307
307
|
Re-dispatch the same phase prompt to the printed lane with its direct launch command:
|
|
308
308
|
`codex exec ...` or `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spend.py" run --caller lane-pN -- agy ... -p "..."`,
|
|
309
309
|
using the same form that `/feature-plan` writes. Never start agy without the `caddis_spend.py run`
|
|
310
|
-
prefix: it
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
Each refusal also prints a `caddis_spend:` line on stderr.
|
|
310
|
+
prefix: it logs the usage, sets the time limit and guards the headless depth (there is no spend cap).
|
|
311
|
+
Its own exit codes are never agy's: **75** = headless depth at its limit or the usage log could not
|
|
312
|
+
be locked (treat like out of budget: switch lane, not an attempt); **124** = the call ran past its
|
|
313
|
+
time limit and was killed. Each refusal also prints a `caddis_spend:` line on stderr. A
|
|
314
|
+
`caddis_spend: ADVISORY:` line is advice only: the call ran; tell the owner. Any other exit code is agy's own.
|
|
314
315
|
An out-of-budget switch is not an attempt (item 4). Record the fallback in the Tracker
|
|
315
316
|
`Lane` column, for example `sonnet -> agy (claude out of budget)`.
|
|
316
317
|
If `next-lane` exits 3, stop and report that no lane is left. As a last resort, the owner can
|
|
@@ -339,6 +340,9 @@ report — do not redo completed work.
|
|
|
339
340
|
result) under `## Task progress` in the review file. Then run the phase's normal gates: VERIFY,
|
|
340
341
|
the ONE `review-tier` review by one other vendor at the end of the phase, COMMIT and the Tracker.
|
|
341
342
|
Re-check a fix only when it fixes a blocking finding and changes logic.
|
|
343
|
+
After an auto-compact, re-read this EXECUTION item and `## Task progress` before the next task. Do not
|
|
344
|
+
trust your memory of the rules. Resume at the first task with no entry there (adapted from superpowers
|
|
345
|
+
7.0.2 `subagent-driven-development`).
|
|
342
346
|
- **RED** — write the failing test(s) the phase names (`<test file>::<case>`). Run them; confirm they
|
|
343
347
|
fail for the right reason (the missing behavior, not an import error). If a phase genuinely has no
|
|
344
348
|
testable surface, say so in the review file and implement the minimal change directly.
|
|
@@ -4,9 +4,7 @@ version: 1.0.0
|
|
|
4
4
|
description: >-
|
|
5
5
|
Zero-dependency animated particle art as a React/Next.js component (spring physics, CSS-variable
|
|
6
6
|
theming, mouse interaction). Use for animated hero art or a living logo, or on "particle animation",
|
|
7
|
-
"
|
|
8
|
-
"constellation", "neural net art", "halftone animation", "ASCII art animation", or "art that reacts
|
|
9
|
-
to mouse".
|
|
7
|
+
"animated letter/logo/initials" or "morphing particles".
|
|
10
8
|
---
|
|
11
9
|
|
|
12
10
|
# Particle Art Generator
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: preload-review
|
|
3
|
+
description: Show what loads before the first prompt in every repo (rules, memory index, skills, MCP names) and list what to shorten
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /preload-review — what loads before the first prompt
|
|
7
|
+
|
|
8
|
+
Measure the size of what Claude loads before you type anything: your user rules, the enabled
|
|
9
|
+
skills, the MCP server names, and, for every repo under a root folder, the repo rules and the
|
|
10
|
+
memory index. The command reads files only. It shows estimates (characters divided by 4), not exact
|
|
11
|
+
token counts. It changes nothing unless you say yes.
|
|
12
|
+
|
|
13
|
+
## Step 1 — find the script
|
|
14
|
+
|
|
15
|
+
Resolve the script path:
|
|
16
|
+
- Plugin install: `${CLAUDE_PLUGIN_ROOT}/scripts/caddis_preload_review.py`
|
|
17
|
+
- harness (caddis) checkout: `scripts/caddis_preload_review.py`
|
|
18
|
+
|
|
19
|
+
## Step 2 — run it
|
|
20
|
+
|
|
21
|
+
Run it from the project root:
|
|
22
|
+
```
|
|
23
|
+
python "<resolved-path>" $ARGUMENTS
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- With no flags, the root folder is the parent of the current git repo. Pass `--root PATH` to scan
|
|
27
|
+
another folder.
|
|
28
|
+
- The script prints Markdown to stdout. It also has `--json`, `--limit-repo-startup N` and
|
|
29
|
+
`--limit-memory N`.
|
|
30
|
+
- The script exits 0 always. Cut candidates are advice, not a failure.
|
|
31
|
+
|
|
32
|
+
## Step 3 — show the output
|
|
33
|
+
|
|
34
|
+
Show the Markdown output as it is. Then add **one sentence** that names the largest start-up cost
|
|
35
|
+
(a repo, the skills or the user rules). Do not repeat every row in prose: the table is the output.
|
|
36
|
+
|
|
37
|
+
## Step 4 — point to /context
|
|
38
|
+
|
|
39
|
+
Tell the user to run `/context` once in a session. The script cannot see the exact MCP tool lists,
|
|
40
|
+
or skills that do not come from the plugin cache. Compare the `/context` output with the table.
|
|
41
|
+
|
|
42
|
+
## Step 5 — offer actions only
|
|
43
|
+
|
|
44
|
+
For each cut candidate, say the one action it names (run `caddis:claude-md-curator`, shorten the
|
|
45
|
+
memory index lines, move how-to text into a doc that loads on demand, or turn a plugin off).
|
|
46
|
+
|
|
47
|
+
**Never edit a rules file, a memory file or a setting without the owner's yes.** Show the change
|
|
48
|
+
first. Then ask.
|
|
49
|
+
|
|
50
|
+
## Step 6 — record the review
|
|
51
|
+
|
|
52
|
+
After the owner has read the report, run the script again with `--stamp`:
|
|
53
|
+
```
|
|
54
|
+
python "<resolved-path>" [--root PATH] --stamp
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This writes `.caddis/.last-preload-review` for the current repo: the review date and a hash of the
|
|
58
|
+
enabled plugin set. Then say that the stamp is written.
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- The stamp file is local and gitignored. It is the only file the script ever writes. Without
|
|
63
|
+
`--stamp` the script writes nothing.
|
|
64
|
+
- The SessionStart hook reads the stamp. It prints one line when the last review is more than
|
|
65
|
+
30 days old, or when the enabled plugins changed since then. It prints nothing when both are fresh.
|
|
66
|
+
- The script prints only names from `~/.claude.json` and `~/.claude/settings.json`. It never
|
|
67
|
+
prints a value, a URL, an argument or an env var from them.
|
|
68
|
+
- Nested `CLAUDE.md` and `AGENTS.md` files load only when Claude works in that folder. The report
|
|
69
|
+
lists them apart and never adds them to the start-up total.
|
|
@@ -12,6 +12,10 @@ by `caddis_merge_chain.py --docs-only`; a repo that wants a human to review them
|
|
|
12
12
|
`scripts/` below is the caddis scripts folder: `${CLAUDE_PLUGIN_ROOT}/scripts` in an installed plugin, `scripts/` in
|
|
13
13
|
the caddis source repo.
|
|
14
14
|
|
|
15
|
+
In text that a later session reads (a roadmap row's check command, a restart prompt, a relay), write a script command as
|
|
16
|
+
`python "<home>/.caddis/bin/caddis_run.py" <script> ...` (`<home>` is the user's home folder, forward slashes), never the
|
|
17
|
+
expanded plugin path: it holds the plugin version and is gone after the next update. The runner's own prompt does this.
|
|
18
|
+
|
|
15
19
|
## The folder
|
|
16
20
|
|
|
17
21
|
`.caddis/roadmaps/<slug>/` holds:
|
|
@@ -193,9 +197,9 @@ unattended; `-Plan <slug>` runs one plain plan instead (the two are exclusive).
|
|
|
193
197
|
code `BLOCKED review not run` (neither restartable); the review cost counts against the USD caps.
|
|
194
198
|
|
|
195
199
|
Stops (each one notifies and releases the lock): a STOP file (`~/.caddis/STOP` or `.local/STOP`), any cap (10 h,
|
|
196
|
-
12 sessions, 120 min and USD 25 per session, USD 150 total; per run, in memory;
|
|
197
|
-
`caddis_spend.py`
|
|
198
|
-
(`BLOCKED claim not written`, before any session),
|
|
200
|
+
12 sessions, 120 min and USD 25 per session, USD 150 total; per run, in memory; there is no agy EUR cap since
|
|
201
|
+
1 Nov 2026, only the usage log of `caddis_spend.py` and its ADVISORY line), a lock or batch claim that cannot be written
|
|
202
|
+
(`BLOCKED claim not written`, before any session), an agy usage log that cannot be locked or written, three sessions
|
|
199
203
|
with no newly merged phase, a roadmap write that fails, and the **snapshot guard**: one baseline for the whole run.
|
|
200
204
|
The Milestones and Blockers tables (every cell of every row, rows added, removed or moved), the `Runner host` line
|
|
201
205
|
and the `**Exit setup:**` line are frozen. Every origin read (each `next`, after the runner's own writes, after each session) is compared with the
|
|
@@ -250,8 +254,8 @@ the owner edits the roadmap during a merge wait, the restart stops `FAILED roadm
|
|
|
250
254
|
recovery: `roadmap-run.ps1 -Roadmap <slug> -AcceptRoadmap` (owner only, refused headless) takes the runner lock (a live
|
|
251
255
|
runner refuses it), prints the diff from the published baseline, asks you to type `accept` (or `--yes`), and accepts
|
|
252
256
|
the origin roadmap as the new baseline of the wait; the next start goes on. With `-DryRun` it prints the diff only. `--last-stop` uses `--gh-account`, else the account the run recorded
|
|
253
|
-
in its launch options. In all cases the lock must be absent or stale; for the agy engine `caddis_spend.py check` must exit 0 too (
|
|
254
|
-
|
|
257
|
+
in its launch options. In all cases the lock must be absent or stale; for the agy engine `caddis_spend.py check` must exit 0 too (it
|
|
258
|
+
always does unless the script fails; there is no spend cap). A restart after a merge writes `pending-rollup.json` in its runner
|
|
255
259
|
folder, runs the rollup first, then removes the claim and the branch, and only then the file. Every stop records
|
|
256
260
|
itself: a failed rollup, a crash or a STOP file before that is not restartable (the owner decides), and the next start
|
|
257
261
|
finds the file and does the rollup first. A merged
|
|
@@ -272,7 +276,7 @@ Sessions are cooperative (our own sessions): the runner guards against mistakes
|
|
|
272
276
|
deliberately hostile session, which runs as the same OS user and could change anything the runner can. The state
|
|
273
277
|
tripwire catches accidents in a runner's own state only. In particular, a session in another worktree of the repo can
|
|
274
278
|
delete or rewrite ANOTHER runner's claim or lock under `<git common dir>/caddis-runner/`; that is not caught while it
|
|
275
|
-
happens, and the victim runner fails closed only at its next restart (own claim missing or changed, orphaned claim). Caps are per run;
|
|
279
|
+
happens, and the victim runner fails closed only at its next restart (own claim missing or changed, orphaned claim). Caps are per run; nothing limits spend across runs (the agy usage log only advises). Each roadmap has one
|
|
276
280
|
worktree, removed when the roadmap is finished and the worktree is clean.
|
|
277
281
|
|
|
278
282
|
Owner-only rules are enforced by this tool; a direct PR that edits `roadmap.md` bypasses them; the runner stops
|
|
@@ -8,8 +8,9 @@ timestamp: {{date}}
|
|
|
8
8
|
|
|
9
9
|
You are a fresh session for the plan `{{slug}}`. Do ONE batch, then stop.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
To run a caddis script, write `{{run}} <script.py> <args>`. The launcher finds the installed caddis plugin by itself.
|
|
12
|
+
Do not look for the scripts in a plugin cache folder, and do not write such a path in the relay: it holds the plugin
|
|
13
|
+
version and is gone after the next update.
|
|
13
14
|
|
|
14
15
|
## 1. Read
|
|
15
16
|
|
|
@@ -44,8 +45,8 @@ publish a branch that does). Commit the phase there, with its tracker row set to
|
|
|
44
45
|
## 4. Work
|
|
45
46
|
|
|
46
47
|
- Do ONE batch with `/caddis:implement` discipline: tests first, the phase's exit gate, a commit per phase.
|
|
47
|
-
- agy sessions only: run `
|
|
48
|
-
the
|
|
48
|
+
- agy sessions only: run `{{run}} caddis_spend.py check` before each agy call. There is no spend cap (it
|
|
49
|
+
always exits 0); if its line ends with ` - ADVISORY`, say so in the relay for the owner.
|
|
49
50
|
- You may do everything except pass an owner gate. Never pass an owner gate. Never raise a cap. Never delete a STOP file.
|
|
50
51
|
- The runner reviews `risk: high` phases. A phase marked `**Risk:** high`: do not halt for it and do not run the
|
|
51
52
|
review yourself. When its exit gate is green, set its row `done` and end with `STATUS: CONTINUE`. The runner then
|
|
@@ -55,8 +56,8 @@ publish a branch that does). Commit the phase there, with its tracker row set to
|
|
|
55
56
|
|
|
56
57
|
## 5. Write the relay
|
|
57
58
|
|
|
58
|
-
Write the relay with `
|
|
59
|
-
the repo (for example in the temp folder). Read the current relay first with `
|
|
59
|
+
Write the relay with `{{run}} caddis_workstreams.py put --require-status {{slug}} <file>`. Write `<file>` outside
|
|
60
|
+
the repo (for example in the temp folder). Read the current relay first with `{{run}} caddis_workstreams.py read {{slug}}`;
|
|
60
61
|
keep its frontmatter shape (`type: relay`, `workstream: {{slug}}`, `branch`, `session_id`, `plan`, `generated.at`). The LAST
|
|
61
62
|
non-empty line must be exactly one of these four:
|
|
62
63
|
|
|
@@ -166,6 +166,11 @@ Then add the four things the inventory cannot derive:
|
|
|
166
166
|
**Nothing may be written from recall.** Every number comes from a command run during this capture,
|
|
167
167
|
or from a file quoted by path.
|
|
168
168
|
|
|
169
|
+
**Script commands.** The successor reads this handover after an update, so write a script command as
|
|
170
|
+
`python "<home>/.caddis/bin/caddis_run.py" <script> ...` (`<home>` is the user's home folder, forward
|
|
171
|
+
slashes), never the expanded plugin path (`${CLAUDE_PLUGIN_ROOT}` holds the plugin version).
|
|
172
|
+
`caddis_spawn.py check` refuses a versioned path.
|
|
173
|
+
|
|
169
174
|
### Then check what you wrote
|
|
170
175
|
|
|
171
176
|
```bash
|
|
@@ -29,7 +29,8 @@ test. Show it green.
|
|
|
29
29
|
layer, dispatch the **tester** subagent.
|
|
30
30
|
|
|
31
31
|
## Rules
|
|
32
|
-
-
|
|
32
|
+
- **Iron Law:** no production code without a failing test first. Code written before its test is deleted,
|
|
33
|
+
not adapted or kept as reference. The `tdd-workflow` skill has the rationalizations and red flags.
|
|
33
34
|
- Test behavior, not internals. Assert what a caller observes.
|
|
34
35
|
- Each test independent; shared setup in fixtures.
|
|
35
36
|
- Show real command output at RED and GREEN — don't claim a state you didn't run.
|
|
@@ -41,6 +41,8 @@ installed on this machine. Show every `DRIFT` line in the report under **Upstrea
|
|
|
41
41
|
line means: review the upstream diff, port what fits, then update `.github/upstream-sources.json`.
|
|
42
42
|
Say nothing for `UP-TO-DATE`, `NOT-INSTALLED` or `NO-SOURCES` (no record: not the caddis source repo).
|
|
43
43
|
The check never fails the review.
|
|
44
|
+
This local check is blind when the upstream plugin is off. `--remote` asks GitHub instead, and the weekly
|
|
45
|
+
`upstream-drift` workflow runs it and keeps one "Upstream drift: obra/superpowers" issue open.
|
|
44
46
|
|
|
45
47
|
## Step 3 — offer to apply
|
|
46
48
|
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
|-------|------|-------------|
|
|
53
53
|
| Changelog Generator | `changelog-generator/` | Create user-facing changelogs and release notes from git commit history, grouping changes and rewriting technical commits in plain language. |
|
|
54
54
|
| Deploy Local | `deploy-local/` | Local deployment loop for Gitea-hosted projects: commit on dev, push, watch the golden CI/build/deploy workflow, check prod, and fix lint/test/pipeline failures until the deploy is healthy. |
|
|
55
|
+
| Graph Email | `graph-email/` | Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note. |
|
|
55
56
|
| Monorepo | `monorepo/` | Turborepo and pnpm workspaces: turbo.json tasks, remote caching, shared packages, affected-only CI, apps/ vs packages/ layout, and pitfalls like circular deps, version drift and hoisting. |
|
|
56
57
|
| Runner Move | `runner-move/` | >- |
|
|
57
58
|
| Safe Cleanup | `safe-cleanup/` | Use BEFORE deleting a directory tree, scratchpad or git worktree, or "tidying up" generated folders, especially on Windows, where deleting through a junction or symlink destroys its target; and to verify a venv or node_modules survived. |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: graph-email
|
|
3
|
+
description: Email a Markdown file via Microsoft Graph or SMTP. Use to email a draft or note.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# graph-email
|
|
7
|
+
|
|
8
|
+
Sends one email. The provider is `graph` (Microsoft Graph `sendMail`, client credentials) or `smtp`.
|
|
9
|
+
The body is a Markdown file. The script turns it into simple HTML. It never prints a secret or a token.
|
|
10
|
+
|
|
11
|
+
## One-time setup (per machine)
|
|
12
|
+
|
|
13
|
+
1. Copy `email.toml.example` from this skill folder to `~/.caddis/email.toml`.
|
|
14
|
+
2. Set `provider`, `sender` and `env_file`. For SMTP also set the `[smtp]` table.
|
|
15
|
+
3. Put the secrets in the env file, not in the config file:
|
|
16
|
+
- graph: three keys. The default names are `ALERT_GRAPH_TENANT_ID`, `ALERT_GRAPH_CLIENT_ID`, `ALERT_GRAPH_CLIENT_SECRET`. Change the names in the `[graph]` table if your file uses other names.
|
|
17
|
+
- smtp: one key. The default name is `EMAIL_SMTP_PASSWORD`. Change it with `password_key`.
|
|
18
|
+
4. Check the setup. This sends nothing and prints no secret:
|
|
19
|
+
`python -I scripts/send_email.py --check`
|
|
20
|
+
|
|
21
|
+
Every setting can be overridden. The order is: command-line flag, then environment variable, then the config file.
|
|
22
|
+
The variables are `CADDIS_EMAIL_PROVIDER`, `CADDIS_EMAIL_SENDER`, `CADDIS_EMAIL_ENV_FILE`, `CADDIS_EMAIL_CONFIG`
|
|
23
|
+
and `CADDIS_EMAIL_SMTP_HOST`, `_PORT`, `_SECURITY`, `_USERNAME`, `_TIMEOUT`. The flags are `--provider`, `--sender`,
|
|
24
|
+
`--env-file`, `--config`, `--smtp-host`, `--smtp-port`, `--smtp-security` (`starttls`, `ssl` or `none`),
|
|
25
|
+
`--smtp-username`, `--smtp-timeout`. The old names `GRAPH_EMAIL_ENV_FILE` and `GRAPH_EMAIL_SENDER` still work.
|
|
26
|
+
Secrets can also be set as process environment variables. They win over the env file.
|
|
27
|
+
With smtp security `none`, the script refuses a username or password and exits with code 2. Use `starttls` or `ssl`.
|
|
28
|
+
For a local test relay only, set `allow_insecure_auth = true` (a boolean) in the `[smtp]` table.
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
1. Write the email as a Markdown file in the project's `comms/` folder (a copy stays in the repo).
|
|
33
|
+
- Put `<!-- email-start -->` before the greeting and `<!-- email-end -->` after the sign-off. Only that part is sent.
|
|
34
|
+
- Write plain, short sentences. No em dashes, no arrows, no emoji, no check marks.
|
|
35
|
+
2. Subject line: `caddis-<app-name> <short subject>`, for example `caddis-myapp Data request for the weekly report`.
|
|
36
|
+
3. Dry run. It sends nothing, needs no credentials and writes `<file>.preview.html`:
|
|
37
|
+
`python -I scripts/send_email.py --dry-run --to x@example.com --subject t --body-file <file.md>`
|
|
38
|
+
Read the preview, then delete it.
|
|
39
|
+
4. Send:
|
|
40
|
+
`python -I scripts/send_email.py --to <address> --subject '<subject>' --body-file <file.md> [--attach <file> ...]`
|
|
41
|
+
`--to` can repeat. Graph HTTP 202 means Graph accepted the mail. An SMTP "accepted" means the server took it.
|
|
42
|
+
Neither proves the inbox received it.
|
|
43
|
+
5. Tell the owner what was sent, to whom, and the subject.
|
|
44
|
+
|
|
45
|
+
## Rules
|
|
46
|
+
|
|
47
|
+
- **Default recipient is the owner's own address.** The owner forwards it. Send to a team only when the owner says so
|
|
48
|
+
in this request. Sending to any other address is an outward action: confirm first.
|
|
49
|
+
- Never put personal data, secrets, payment data or customer text in the body.
|
|
50
|
+
- Errors show the provider, the HTTP or SMTP status code and the error name. Do not retry in a loop.
|
|
51
|
+
- Exit codes: 0 done, 1 provider error, 2 missing or invalid setting.
|
|
52
|
+
|
|
53
|
+
Script: `scripts/send_email.py` in this skill folder (Python 3.11 or later, standard library only).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Example config for the graph-email skill. Copy to ~/.caddis/email.toml and fill in your values.
|
|
2
|
+
#
|
|
3
|
+
# Precedence for every setting: command-line flag, then environment variable, then this file.
|
|
4
|
+
# Secrets (Graph client secret, SMTP password) never go in this file. They come from the process
|
|
5
|
+
# environment or from the env file named by `env_file` below.
|
|
6
|
+
|
|
7
|
+
# Which sender to use: "graph" (Microsoft Graph sendMail) or "smtp". Default: "graph".
|
|
8
|
+
# Env var: CADDIS_EMAIL_PROVIDER. Flag: --provider.
|
|
9
|
+
provider = "graph"
|
|
10
|
+
|
|
11
|
+
# The mailbox or address the mail is sent from.
|
|
12
|
+
# Env var: CADDIS_EMAIL_SENDER. Flag: --sender.
|
|
13
|
+
sender = ""
|
|
14
|
+
|
|
15
|
+
# Path to an env file (KEY=value lines) that holds the secrets. Use a literal string
|
|
16
|
+
# (single quotes) so a Windows path needs no escaping.
|
|
17
|
+
# Env var: CADDIS_EMAIL_ENV_FILE. Flag: --env-file.
|
|
18
|
+
env_file = ""
|
|
19
|
+
|
|
20
|
+
[graph]
|
|
21
|
+
# The NAMES of the keys in the env file (or environment) that hold the values.
|
|
22
|
+
# These are the defaults. Change them only if your env file uses other names.
|
|
23
|
+
tenant_id_key = "ALERT_GRAPH_TENANT_ID"
|
|
24
|
+
client_id_key = "ALERT_GRAPH_CLIENT_ID"
|
|
25
|
+
client_secret_key = "ALERT_GRAPH_CLIENT_SECRET"
|
|
26
|
+
|
|
27
|
+
[smtp]
|
|
28
|
+
# Used when provider = "smtp".
|
|
29
|
+
# Env vars: CADDIS_EMAIL_SMTP_HOST, _PORT, _SECURITY, _USERNAME, _TIMEOUT.
|
|
30
|
+
# Flags: --smtp-host, --smtp-port, --smtp-security, --smtp-username, --smtp-timeout.
|
|
31
|
+
host = ""
|
|
32
|
+
# "starttls" (port 587), "ssl" (port 465) or "none" (port 25, no encryption).
|
|
33
|
+
security = "starttls"
|
|
34
|
+
# With security "none", the script refuses to send a username or password. Set this to true
|
|
35
|
+
# (a boolean, not a string) only for a local test relay. File only: no env var or flag.
|
|
36
|
+
# allow_insecure_auth = false
|
|
37
|
+
# Leave out `port` to use the default for the security mode.
|
|
38
|
+
# port = 587
|
|
39
|
+
# Leave empty if the server needs no login.
|
|
40
|
+
username = ""
|
|
41
|
+
# The NAME of the key that holds the password (in the environment or the env file).
|
|
42
|
+
password_key = "EMAIL_SMTP_PASSWORD"
|
|
43
|
+
# Seconds to wait for the server.
|
|
44
|
+
timeout = 30
|