@caddis/cli 0.4.56 → 0.4.57
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/bundles/antigravity-plugin/guard_agy.py +700 -68
- package/bundles/antigravity-plugin/hooks.json +2 -1
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +63 -12
- package/bundles/antigravity-plugin/scripts/caddis_gate.py +21 -0
- package/bundles/antigravity-plugin/scripts/caddis_lanes.py +35 -0
- package/bundles/antigravity-plugin/scripts/caddis_merge_chain.py +67 -22
- package/bundles/antigravity-plugin/scripts/caddis_review.py +59 -9
- package/bundles/antigravity-plugin/scripts/caddis_roadmap.py +120 -24
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_page.py +80 -7
- package/bundles/antigravity-plugin/scripts/oss_review.py +300 -79
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +4 -0
- package/bundles/antigravity-plugin/session_end_agy.py +13 -10
- package/bundles/antigravity-plugin/skills/cloud-phases/SKILL.md +53 -8
- package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +11 -8
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +9 -5
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +18 -11
- package/bundles/antigravity-plugin/skills/mmr/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +44 -4
- package/bundles/antigravity-plugin/skills/review-pr/SKILL.md +13 -4
- package/bundles/antigravity-plugin/skills/ship/SKILL.md +26 -7
- package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +31 -0
- package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +42 -4
- package/bundles/antigravity-plugin/warm_start_agy.py +26 -15
- package/bundles/antigravity-plugin-extras/plugin.json +1 -1
- package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +5 -5
- package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +1 -1
- package/bundles/codex/.codex/skills/devops/gh-cli/SKILL.md +9 -5
- package/bundles/manifest.json +3 -3
- package/package.json +1 -1
|
@@ -245,23 +245,32 @@ def _hook_note(feature, exc, root=None):
|
|
|
245
245
|
|
|
246
246
|
|
|
247
247
|
|
|
248
|
-
def
|
|
249
|
-
""
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
248
|
+
def _safe_conversation(conversation):
|
|
249
|
+
return "".join(c for c in str(conversation) if c.isalnum() or c in "-_")[:64]
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def _injected_markers(root, conversation):
|
|
253
|
+
"""Where the "relay already injected" marker for this conversation may be: (repo marker, temp marker).
|
|
254
|
+
|
|
255
|
+
The repo marker lives in `.caddis/.relay-injected/`. The temp marker lives in the user's temp
|
|
256
|
+
folder, keyed by the repo path, for a repo that has no `.caddis/` (the hook must not create one).
|
|
257
|
+
"""
|
|
258
|
+
safe = _safe_conversation(conversation)
|
|
259
|
+
if not safe:
|
|
260
|
+
return None, None
|
|
261
|
+
import hashlib
|
|
262
|
+
import tempfile
|
|
263
|
+
repo_marker = os.path.join(str(root), ".caddis", ".relay-injected", safe)
|
|
264
|
+
key = hashlib.sha1(os.path.normcase(os.path.abspath(str(root))).encode("utf-8", "replace")).hexdigest()[:16]
|
|
265
|
+
temp_marker = os.path.join(tempfile.gettempdir(), "caddis-relay-injected", key + "-" + safe)
|
|
266
|
+
return repo_marker, temp_marker
|
|
257
267
|
|
|
258
268
|
|
|
259
269
|
def _already_injected(root, conversation):
|
|
260
270
|
"""True when this conversation has had its relay injected before. Fail-open: on any
|
|
261
271
|
error return False, because a duplicate relay is a smaller harm than none at all."""
|
|
262
272
|
try:
|
|
263
|
-
|
|
264
|
-
return bool(marker) and os.path.isfile(marker)
|
|
273
|
+
return any(m and os.path.isfile(m) for m in _injected_markers(root, conversation))
|
|
265
274
|
except Exception:
|
|
266
275
|
return False
|
|
267
276
|
|
|
@@ -269,13 +278,15 @@ def _already_injected(root, conversation):
|
|
|
269
278
|
def _mark_injected(root, conversation):
|
|
270
279
|
"""Record that this conversation received its relay. Never raises.
|
|
271
280
|
|
|
272
|
-
|
|
273
|
-
|
|
281
|
+
The marker goes in `.caddis/` when the repo already has it, else in the user's temp folder:
|
|
282
|
+
this hook never creates `.caddis/` in a repo that did not opt in. A failure here means the
|
|
283
|
+
next truncation may re-inject, which is the fail-open direction we want.
|
|
274
284
|
"""
|
|
275
285
|
try:
|
|
276
|
-
|
|
277
|
-
if not
|
|
286
|
+
repo_marker, temp_marker = _injected_markers(root, conversation)
|
|
287
|
+
if not repo_marker:
|
|
278
288
|
return
|
|
289
|
+
marker = repo_marker if os.path.isdir(os.path.join(str(root), ".caddis")) else temp_marker
|
|
279
290
|
os.makedirs(os.path.dirname(marker), exist_ok=True)
|
|
280
291
|
with open(marker, "w", encoding="utf-8") as fh:
|
|
281
292
|
fh.write("")
|
|
@@ -128,7 +128,7 @@ Spec Input
|
|
|
128
128
|
2. Categorise every item by effort (H = hours, D = days) and value (high / medium / low)
|
|
129
129
|
3. Items that are **≤ 1 hour AND high-value** become quick wins (H1, H2, H3…)
|
|
130
130
|
4. Implement quick wins in a single session
|
|
131
|
-
5. Run
|
|
131
|
+
5. Run the tests of the touched files in the foreground (each command under 10 minutes) — all must pass. CI runs the full suite
|
|
132
132
|
6. Commit: `feat: H1–H3 quick wins — <summary>`
|
|
133
133
|
|
|
134
134
|
**Decision Gate:**
|
|
@@ -266,10 +266,10 @@ Score each identified risk:
|
|
|
266
266
|
2. Provide the phase prompt:
|
|
267
267
|
```
|
|
268
268
|
Read .caddis/plans/<feature>.md and implement Phase N.
|
|
269
|
-
Run
|
|
269
|
+
Run the tests of the files you changed, in the foreground, each command under 10 minutes. They must pass before commit. CI runs the full suite.
|
|
270
270
|
```
|
|
271
271
|
3. Implement Agent reads the plan, executes numbered steps
|
|
272
|
-
4. After implementation: run full
|
|
272
|
+
4. After implementation: run the tests of the touched files in the foreground (each command under 10 minutes). CI runs the full suite
|
|
273
273
|
5. If tests pass → commit: `feat(<scope>): phase N — <summary>`
|
|
274
274
|
6. If tests fail → fix within the same session before committing
|
|
275
275
|
|
|
@@ -340,7 +340,7 @@ The plan document should contain **copy-paste prompts** for each phase. This rem
|
|
|
340
340
|
- Acceptance criteria
|
|
341
341
|
3. **Write fix-up plan** — Place in `.caddis/plans/<feature>-fixup.md`
|
|
342
342
|
4. **Execute** — Implement Agent works through issues sequentially
|
|
343
|
-
5. **Verify** — Run
|
|
343
|
+
5. **Verify** — Run the tests of the touched files (foreground, each command under 10 minutes) + visual inspection. CI runs the full suite
|
|
344
344
|
6. **Commit** — `fix(<scope>): post-track cross-component polish`
|
|
345
345
|
|
|
346
346
|
**Example from practice:**
|
|
@@ -610,7 +610,7 @@ Every stage that produces code changes should result in a commit:
|
|
|
610
610
|
A well-orchestrated session should produce:
|
|
611
611
|
|
|
612
612
|
- [ ] **Traceability** — Every spec requirement maps to a plan step, which maps to a commit
|
|
613
|
-
- [ ] **Green tests** —
|
|
613
|
+
- [ ] **Green tests** — Touched-file tests pass before every commit; CI runs the full suite on every PR
|
|
614
614
|
- [ ] **Clean plan** — Fidelity audit: 0 gaps
|
|
615
615
|
- [ ] **Managed risks** — No showstoppers unresolved
|
|
616
616
|
- [ ] **Minimal rework** — Debug pass finds cosmetic issues, not fundamental errors
|
|
@@ -95,7 +95,7 @@ smaller chunks; don't just raise `--max-diff-chars` without knowing the endpoint
|
|
|
95
95
|
|
|
96
96
|
## Three rules: one attempt, one review
|
|
97
97
|
1. **Think before you send.** Before a task goes to any coder, write its edge cases and check the facts it depends on (one query or one file read).
|
|
98
|
-
2. **Run it before review.** The coder runs the
|
|
98
|
+
2. **Run it before review.** The coder runs only the tests of the files it touched, in the foreground, each command under 10 minutes (split into parts if needed). Name the exact commands in the task. Never start the full suite in the background and never wait on a monitor for it: CI runs the full suite on every PR. Then run the change once on real data.
|
|
99
99
|
3. **Review by tier.** Run `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" review-tier --range <base>...HEAD` (add `--plan <plan> --phase <N>` inside a plan; no `TIER:` line means tier 2).
|
|
100
100
|
Tier 0: gates only. Tier 1-small: your self-check only. Tier 1: one review by another vendor; stop at
|
|
101
101
|
the first CLEAN. Tier 2: two reviewers of two other vendors, in one round. Fix blocking findings only;
|
|
@@ -73,7 +73,10 @@ gh pr diff 55
|
|
|
73
73
|
gh pr checkout 55
|
|
74
74
|
gh pr review 55 --approve --body "LGTM!"
|
|
75
75
|
gh pr review 55 --request-changes --body "Please fix error handling"
|
|
76
|
-
|
|
76
|
+
# merge only on ci-watch RESULT: pass, only its HEAD:, with no default-branch run in progress
|
|
77
|
+
python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_lanes.py" ci-watch --pr 55
|
|
78
|
+
gh run list --branch main --json status # no in_progress or queued run (main = the default branch)
|
|
79
|
+
gh pr merge 55 --squash --delete-branch --match-head-commit <watched head>
|
|
77
80
|
|
|
78
81
|
# Manage
|
|
79
82
|
gh pr ready 55 # Mark draft as ready
|
|
@@ -170,8 +173,9 @@ gh issue develop 42 --branch fix/issue-42
|
|
|
170
173
|
git add src/auth/login.py tests/test_login.py # named files only, never `git add .`
|
|
171
174
|
git commit -m "fix: resolve login bug" -- src/auth/login.py tests/test_login.py && git push -u origin HEAD
|
|
172
175
|
gh pr create --title "fix: resolve login bug" --body "Closes #42"
|
|
173
|
-
|
|
174
|
-
gh
|
|
176
|
+
python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_lanes.py" ci-watch --pr <n> # RESULT: pass, HEAD: <watched head>
|
|
177
|
+
gh run list --branch main --json status # wait while a default-branch run is in progress
|
|
178
|
+
gh pr merge <n> --squash --delete-branch --match-head-commit <watched head>
|
|
175
179
|
```
|
|
176
180
|
|
|
177
181
|
### Release Workflow
|
|
@@ -189,8 +193,8 @@ gh release upload v1.3.0 ./dist/*.tar.gz
|
|
|
189
193
|
| Create repo | `gh repo create name --public` |
|
|
190
194
|
| Create issue | `gh issue create --title "..." --labels bug` |
|
|
191
195
|
| Create PR | `gh pr create --title "..." --reviewer user` |
|
|
192
|
-
| Merge PR | `gh pr merge 55 --squash --delete-branch`
|
|
196
|
+
| Merge PR | `gh pr merge 55 --squash --delete-branch --match-head-commit <watched head>`, only after ci-watch `RESULT: pass` |
|
|
193
197
|
| Create release | `gh release create v1.0.0 --generate-notes` |
|
|
194
|
-
| Watch CI | `gh run watch`
|
|
198
|
+
| Watch CI | `caddis_lanes.py ci-watch --pr 55` (fallback: `gh run watch`) |
|
|
195
199
|
| Set secret | `echo "val" \| gh secret set KEY` |
|
|
196
200
|
| API call | `gh api /repos/o/r --jq '.description'` |
|
package/bundles/manifest.json
CHANGED
package/package.json
CHANGED