@caddis/cli 0.4.95 → 0.4.97
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 +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_fleet.py +31 -21
- package/bundles/antigravity-plugin/scripts/caddis_gate.py +19 -2
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +2 -2
- package/bundles/antigravity-plugin/scripts/caddis_hub_collect.py +51 -10
- package/bundles/antigravity-plugin/scripts/caddis_lanes.py +154 -130
- package/bundles/antigravity-plugin/scripts/caddis_todo.py +180 -3
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +57 -0
- package/bundles/antigravity-plugin/scripts/schemas/hub-plans.schema.json +57 -0
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +13 -1
- package/bundles/antigravity-plugin/scripts/templates/coordinator.md +3 -3
- package/bundles/antigravity-plugin/skills/coordinate/SKILL.md +4 -1
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +21 -8
- package/bundles/manifest.json +2 -2
- package/dist/cli.js +214 -71
- package/dist/export/assets/{export-CMtV-slT.css → export-B5Lzo-9e.css} +1 -1
- package/dist/export/assets/{export-DtlDFN4L.js → export-PF4z_ff4.js} +29 -29
- package/dist/export/index.html +2 -2
- package/dist/ui/assets/{Activity-BDjet2xd.js → Activity-DN1XBfsH.js} +1 -1
- package/dist/ui/assets/{Guide-Czn5sK0f.js → Guide-D-lZVEKf.js} +1 -1
- package/dist/ui/assets/{RoadmapTab-Bd8geyQx.js → RoadmapTab-tqQd2sYq.js} +7 -7
- package/dist/ui/assets/{index-CmngQ8Mk.js → index-CWslZIzV.js} +44 -44
- package/dist/ui/assets/{index-Bd0Z4jR8.css → index-CwgRPpjT.css} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
|
@@ -37,6 +37,31 @@
|
|
|
37
37
|
}
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
|
+
"overlay": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": [
|
|
43
|
+
"state",
|
|
44
|
+
"reason",
|
|
45
|
+
"count"
|
|
46
|
+
],
|
|
47
|
+
"properties": {
|
|
48
|
+
"state": {
|
|
49
|
+
"enum": [
|
|
50
|
+
"on",
|
|
51
|
+
"off"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"reason": {
|
|
55
|
+
"type": [
|
|
56
|
+
"string",
|
|
57
|
+
"null"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"count": {
|
|
61
|
+
"type": "integer"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
40
65
|
"plans": {
|
|
41
66
|
"type": "array",
|
|
42
67
|
"items": {
|
|
@@ -98,6 +123,12 @@
|
|
|
98
123
|
"done",
|
|
99
124
|
"moved"
|
|
100
125
|
]
|
|
126
|
+
},
|
|
127
|
+
"source": {
|
|
128
|
+
"enum": [
|
|
129
|
+
"main",
|
|
130
|
+
"branch"
|
|
131
|
+
]
|
|
101
132
|
}
|
|
102
133
|
}
|
|
103
134
|
}
|
|
@@ -108,6 +139,32 @@
|
|
|
108
139
|
"changed_at": {
|
|
109
140
|
"type": ["integer", "null"],
|
|
110
141
|
"description": "Unix time of the last change: the commit time on origin, or the file time in the working tree. null when unknown."
|
|
142
|
+
},
|
|
143
|
+
"overlay": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": [
|
|
146
|
+
"pr",
|
|
147
|
+
"draft",
|
|
148
|
+
"head_ref",
|
|
149
|
+
"also"
|
|
150
|
+
],
|
|
151
|
+
"properties": {
|
|
152
|
+
"pr": {
|
|
153
|
+
"type": "integer"
|
|
154
|
+
},
|
|
155
|
+
"draft": {
|
|
156
|
+
"type": "boolean"
|
|
157
|
+
},
|
|
158
|
+
"head_ref": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"also": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"items": {
|
|
164
|
+
"type": "integer"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
111
168
|
}
|
|
112
169
|
}
|
|
113
170
|
},
|
|
@@ -774,6 +774,14 @@ def _is_zero(sha: str) -> bool:
|
|
|
774
774
|
return set(sha) == {"0"}
|
|
775
775
|
|
|
776
776
|
|
|
777
|
+
def is_delete_only(stdin_text: str) -> bool:
|
|
778
|
+
"""True when every pre-push stdin line deletes a remote ref (local sha all zeros): nothing is pushed to check.
|
|
779
|
+
|
|
780
|
+
False for empty stdin (unknown: the dry-run proof uses it) and for any line that is not a ref line."""
|
|
781
|
+
lines = [line.split() for line in stdin_text.splitlines() if line.strip()]
|
|
782
|
+
return bool(lines) and all(len(parts) == 4 and _is_zero(parts[1]) for parts in lines)
|
|
783
|
+
|
|
784
|
+
|
|
777
785
|
def changed_paths(stdin_text: str, root: Path) -> set | None:
|
|
778
786
|
"""The files a push changes, from git's pre-push stdin (`<local ref> <local sha> <remote ref> <remote sha>`).
|
|
779
787
|
|
|
@@ -1015,6 +1023,10 @@ def main(argv: list | None = None) -> int:
|
|
|
1015
1023
|
parser.add_argument("--root", help="repo root (default: git rev-parse --show-toplevel, else the cwd)")
|
|
1016
1024
|
parser.add_argument("--config", help="config file (default: <root>/.caddis/config.toml)")
|
|
1017
1025
|
args = parser.parse_args(argv)
|
|
1026
|
+
stdin_text = _read_stdin()
|
|
1027
|
+
if is_delete_only(stdin_text): # git push --delete: no commit is pushed, so there is nothing to check
|
|
1028
|
+
print("[caddis] delete-only push - nothing to check", flush=True)
|
|
1029
|
+
return 0
|
|
1018
1030
|
print("[caddis] pre-push quality gate", flush=True)
|
|
1019
1031
|
if tomllib is None:
|
|
1020
1032
|
print(f"[gate] this gate needs Python 3.11 or later (found {sys.version.split()[0]}) - nothing checked here, "
|
|
@@ -1053,7 +1065,7 @@ def main(argv: list | None = None) -> int:
|
|
|
1053
1065
|
budget = 30
|
|
1054
1066
|
budget = _env_number("CADDIS_GATE_BUDGET_S", float(budget), float)
|
|
1055
1067
|
jobs = _env_number("CADDIS_GATE_JOBS", 3, int)
|
|
1056
|
-
changed = changed_paths(
|
|
1068
|
+
changed = changed_paths(stdin_text, root)
|
|
1057
1069
|
return run_checks(root, checks, budget, jobs, changed=changed, start=start)
|
|
1058
1070
|
|
|
1059
1071
|
|
|
@@ -38,7 +38,7 @@ What the keys mean:
|
|
|
38
38
|
| `deploy.never_health_path` | A path that looks healthy even when the API is dead. Never used as a health check. |
|
|
39
39
|
| `deploy.render_check` | How the PR's session checks a served page: 0 console errors and one value checked against its source. |
|
|
40
40
|
| `deploy.wait` | How to wait for the deploy run. No fixed sleep. |
|
|
41
|
-
| `owner_reserved` | Changes that only the owner may approve. |
|
|
41
|
+
| `owner_reserved` | Changes that only the owner may approve. The coordinator reads each class through the critical checklist (coordinator design, section 6): for example `permission change` means an EXISTING permission changes; a new permission is routine. A class that the checklist does not name is a rule reserved by name and always goes to the owner. |
|
|
42
42
|
| `stall.busy_silent_min` | Minutes a busy session may stay silent before the coordinator asks. |
|
|
43
43
|
| `stall.ready_no_ready_msg_min` | Minutes a green PR may wait for its session's ready message. |
|
|
44
44
|
| `quiet.coordination` | Quiet hours for merges (`none`: no quiet hours). |
|
|
@@ -80,8 +80,8 @@ What the keys mean:
|
|
|
80
80
|
"wait": "gh run watch"
|
|
81
81
|
},
|
|
82
82
|
"owner_reserved": [
|
|
83
|
-
"schema change or data write on prod",
|
|
84
|
-
"permission change",
|
|
83
|
+
"schema change or data write on prod (checklist items 1 and 2)",
|
|
84
|
+
"permission change (checklist item 3: an existing permission)",
|
|
85
85
|
"any open blocking review finding",
|
|
86
86
|
"<fill: a rule the owner reserved by name; one string per rule, or delete this line>"
|
|
87
87
|
],
|
|
@@ -352,7 +352,10 @@ Stalls (design 7.4): one nudge for a busy, silent session that holds a queue ite
|
|
|
352
352
|
python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_coordinate.py" ledger record --repo <R> --what '<gate>' --decision approve --by coordinator --window <N> --reason '<why it passes>' --json
|
|
353
353
|
```
|
|
354
354
|
2. The owner-only list (design 6, plus config `owner_reserved`) goes to the owner. Never approve it
|
|
355
|
-
yourself.
|
|
355
|
+
yourself. Decide with the design 6 critical checklist, and read each config `owner_reserved` class
|
|
356
|
+
through it (for example "permission change" is item 3: an EXISTING permission changes; a new one is
|
|
357
|
+
routine). When the diff shows clearly that every item is false, the change is routine: do step 1 with
|
|
358
|
+
the checklist item in `--reason`. When you cannot tell from the diff, ask the owner. Send it with:
|
|
356
359
|
```
|
|
357
360
|
recommendation: approve | hold
|
|
358
361
|
reason: <one or two sentences>
|
|
@@ -132,7 +132,8 @@ lists each wave member's phase, worktree, branch, last commit and next card.
|
|
|
132
132
|
|
|
133
133
|
**What finish prints.** `=== CHECKPOINT CHECKLIST ===` with the same 12 rows as Step 8, in the same order.
|
|
134
134
|
Rows 5, 6, 8, 9, 10 and 12 print `skipped: checkpoint tier`. Then it prints the RESUME block (Step 9) as its
|
|
135
|
-
last output. Print that block as it is, with
|
|
135
|
+
last output. Print that block as it is, with both labelled copy blocks and their labels unchanged and nothing
|
|
136
|
+
after it, then ask the owner for `/clear`.
|
|
136
137
|
|
|
137
138
|
**When finish fails** (exit 1):
|
|
138
139
|
- `CHECKPOINT: row 3 relay failed`: the relay is NOT written. A peer changed the relay after prepare: the
|
|
@@ -511,27 +512,39 @@ python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_fleet.py" resume-block --name <name
|
|
|
511
512
|
`<name>` is the workstream name from Step 3. It reads the relay's `## Resume prompt` block verbatim, and
|
|
512
513
|
the session name (`session-state/<session-id>.name` when `whoami` wrote it, else the first 8 characters of
|
|
513
514
|
the id). It prints, and you print its output as it is, with nothing after it:
|
|
514
|
-
|
|
515
|
+
````
|
|
515
516
|
Model for next session: <model>, effort <effort>
|
|
516
517
|
=== RESUME ===
|
|
517
518
|
Session: <session name> (<session id>)
|
|
518
519
|
Workstream: <name>
|
|
519
520
|
Repo: <absolute repo root>
|
|
520
|
-
|
|
521
|
-
|
|
521
|
+
After /clear in this window, paste this:
|
|
522
|
+
```text
|
|
523
|
+
<the resume prompt on one line> <the announce sentence>
|
|
524
|
+
```
|
|
525
|
+
In a new terminal, paste this:
|
|
526
|
+
```bash
|
|
522
527
|
cd "<absolute repo root>"; claude --model <model> --effort <effort> --name <role>-<MMDD>-<HH> '<the resume prompt on one line> <the announce sentence>'
|
|
523
528
|
```
|
|
529
|
+
````
|
|
530
|
+
Print BOTH fenced blocks, each under its label line, with the label text unchanged. Never merge them, reorder
|
|
531
|
+
them, drop one, or add colour. The owner picks by what they do next:
|
|
532
|
+
- **Same window, after `/clear`:** paste only the first block (the prompt). The window already has the folder, the
|
|
533
|
+
model and the name.
|
|
534
|
+
- **New terminal:** paste the second block (the whole line). It changes to the repo, starts claude with the
|
|
535
|
+
model, effort and name, and passes the same prompt.
|
|
524
536
|
`<model>` and `<effort>` come from `caddis_routing.py session` (Rules, "Model for the next session").
|
|
525
537
|
The `cd` makes the relay's repo-relative paths work from any terminal folder (`;`, not `&&`: Windows PowerShell 5.1 has no `&&`).
|
|
526
538
|
- **The announce sentence.** In a normal handoff the one-line start line also ends with a sentence that tells
|
|
527
539
|
the new session to run `caddis_fleet.py whoami` with its new name, then `caddis_fleet.py peers`, and to send
|
|
528
540
|
each named live peer in the same repo (the checkout and its worktrees) one `SendMessage`:
|
|
529
|
-
`<name> started in <folder>: <next action>. No reply needed.`
|
|
530
|
-
session
|
|
541
|
+
`<name> started in <folder>: <next action>. No reply needed.` Both copy blocks end with this sentence, so a
|
|
542
|
+
session started from either one announces itself. The sentence names the stable launcher
|
|
531
543
|
(`~/.caddis/bin/caddis_run.py`), because a new session cannot expand `${CLAUDE_PLUGIN_ROOT}` and a versioned
|
|
532
544
|
plugin path is gone after the next update.
|
|
533
545
|
- **Fleet close.** When this handoff runs because a peer sent `FLEET CLOSE from <coordinator>`, add
|
|
534
|
-
`--fleet`. The
|
|
546
|
+
`--fleet`. The block then holds the relay's prompt in one fenced block and ends with
|
|
547
|
+
`Start line: from the restart sheet`, with no copy blocks: the restart sheet is the only
|
|
535
548
|
start line in a fleet close, and `/caddis:fleet-open` already greets the peers, so it has no announce
|
|
536
549
|
sentence. The `FLEET-ACK` reply is a separate message and does not change.
|
|
537
550
|
- **Exit 1** (no `## Resume prompt` block, or no relay) prints nothing on stdout. The handoff is not
|
|
@@ -553,7 +566,7 @@ The `cd` makes the relay's repo-relative paths work from any terminal folder (`;
|
|
|
553
566
|
`python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_routing.py" session --role <role>` prints `<model> <effort>`.
|
|
554
567
|
The role is `orchestrator` to run an approved plan and `plan-writer` to write a plan or design.
|
|
555
568
|
`resume-block` (Step 9) reads the same table: it prints `Model for next session: <model>, effort <effort>`
|
|
556
|
-
as its first line and puts `--model <model> --effort <effort>` in the
|
|
569
|
+
as its first line and puts `--model <model> --effort <effort>` in the full line (the second copy block). Pass `--role plan-writer`
|
|
557
570
|
for plan or design work. Do not print a second model line.
|
|
558
571
|
- **One next action, by priority ladder.** `## Next step` names exactly ONE action — not a menu. Pick it in
|
|
559
572
|
order: (1) interrupted mid-phase work → finish + commit it; else (2) the active plan's next not-started
|