@caddis/cli 0.4.53 → 0.4.55
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 +184 -0
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_budget.py +283 -0
- package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +5 -1
- package/bundles/antigravity-plugin/scripts/caddis_fleet.py +439 -0
- package/bundles/antigravity-plugin/scripts/caddis_gate.py +29 -0
- package/bundles/antigravity-plugin/scripts/caddis_lanes.py +127 -10
- package/bundles/antigravity-plugin/scripts/caddis_notify.py +5 -1
- package/bundles/antigravity-plugin/scripts/caddis_roadmap.py +56 -3
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_page.py +676 -0
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +39 -6
- package/bundles/antigravity-plugin/scripts/caddis_routing.py +4 -4
- package/bundles/antigravity-plugin/skills/_registry.md +2 -0
- package/bundles/antigravity-plugin/skills/catchup/SKILL.md +4 -0
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +6 -0
- package/bundles/antigravity-plugin/skills/fleet-close/SKILL.md +167 -0
- package/bundles/antigravity-plugin/skills/fleet-open/SKILL.md +110 -0
- package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +2 -1
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +101 -1
- package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +3 -2
- package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +20 -6
- package/bundles/antigravity-plugin/skills/refactoring/SKILL.md +2 -1
- package/bundles/antigravity-plugin/skills/review-pr/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +1 -0
- package/bundles/antigravity-plugin/skills/ship/SKILL.md +2 -2
- package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +9 -5
- package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +3 -2
- package/bundles/codex/.codex/skills/coding/refactoring/SKILL.md +2 -1
- package/bundles/codex/.codex/skills/devops/gh-cli/SKILL.md +2 -1
- package/bundles/codex/.codex/skills/workflow/roadmap/SKILL.md +1 -0
- package/bundles/manifest.json +2 -2
- package/package.json +1 -1
|
@@ -82,12 +82,12 @@ Run `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" review-tier --range <
|
|
|
82
82
|
|
|
83
83
|
Watch the PR's checks job-by-job until completion:
|
|
84
84
|
- Gitea lane: poll the run for the PR's head SHA via the API (`deploy-local` skill procedure).
|
|
85
|
-
- GitHub lane:
|
|
85
|
+
- GitHub lane: wait for PR checks outside the Claude session via `ci-watch`:
|
|
86
86
|
```bash
|
|
87
|
-
gh pr view <pr> --json headRefOid # write down headRefOid as <watched-sha>
|
|
88
87
|
python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_lanes.py" ci-watch --pr <pr>
|
|
89
88
|
```
|
|
90
|
-
|
|
89
|
+
`RESULT: pass` means every check of the PR's head commit is complete and green (cancelled, failed or unfinished is never a pass). `HEAD:` names that commit: it is the `<watched-sha>`; merge with `--match-head-commit <watched-sha>`.
|
|
90
|
+
Exit codes: **0** pass → continue; **1** fail → read `FAILING:` and the gh output, classify the cause, apply the minimum source fix, and re-push (stop before merging); **3** could not tell (also: gh finished but a check is still unfinished, the head's checks could not be read, or the head moved during the watch — `FAILING:` says which) → run `ci-watch` again; if it stays 3, stop and report, do not merge.
|
|
91
91
|
Fallback when `caddis_lanes.py` is not available: watch in-session with `gh pr checks <pr> --watch` / `gh run watch` (`gh-cli` skill).
|
|
92
92
|
- If any check fails (red check): report the failure, classify the cause, and **stop before merging**.
|
|
93
93
|
Do not merge a failing PR. Apply the minimum source fix and re-push.
|
|
@@ -98,6 +98,14 @@ Small work that does not meet a trigger skips its block.
|
|
|
98
98
|
|
|
99
99
|
**Trigger: Always, when the repo deploys on push.** No merge while a push run on the default branch is in progress. Check `gh run list --branch <default> --event push --status in_progress`; if a run is listed, wait for it. `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_merge_chain.py"` does this check.
|
|
100
100
|
|
|
101
|
+
**Trigger: Two or more reviewed, green PRs wait to merge on one repo.** Each separate merge costs update-branch, CI and deploy, and puts every other open PR behind the default branch (measured on one fleet repo, 10 Oct 2026: about 15 to 20 minutes per PR, about 2 hours for six). Combine them:
|
|
102
|
+
1. Merge their branches into one release branch made from `origin/<default>`. Resolve overlaps once.
|
|
103
|
+
2. Run the full gates once, in an environment that matches CI's install.
|
|
104
|
+
3. Open ONE release PR that links each component PR (their review and test evidence stays on them).
|
|
105
|
+
4. After it merges, close each component PR with a link to the release PR.
|
|
106
|
+
|
|
107
|
+
Keep separate: work that needs its own owner approval, a schema or DDL change that may need its own revert, and docs-only PRs. Still one merge at a time, never while a push run on the default branch is in progress. Tell any peer session that merges to the same repo.
|
|
108
|
+
|
|
101
109
|
## Step 7 — Merge to default branch
|
|
102
110
|
|
|
103
111
|
Once all required checks are **green**, there are no merge conflicts, and review requirements are satisfied:
|
|
@@ -105,13 +113,13 @@ Once all required checks are **green**, there are no merge conflicts, and review
|
|
|
105
113
|
```bash
|
|
106
114
|
gh pr view <pr> --json headRefOid,mergeStateStatus
|
|
107
115
|
```
|
|
108
|
-
Merge only when `headRefOid` equals `<watched-sha
|
|
116
|
+
Merge only when `headRefOid` equals `<watched-sha>` (the `HEAD:` line of the `ci-watch` run that printed `RESULT: pass`) and `mergeStateStatus` is `CLEAN` (or `HAS_HOOKS`/`UNSTABLE` only if the repo's own rules allow it; else stop and report). If the head moved, run `ci-watch` again.
|
|
109
117
|
- Use the repo's configured **merge strategy** — read it from repo settings (Gitea repo settings API /
|
|
110
118
|
`gh repo view --json squashMergeAllowed,mergeCommitAllowed,rebaseMergeAllowed`) and `AGENTS.md`;
|
|
111
119
|
an explicit argument wins. Options: **squash**, **merge-commit**, rebase-merge. **Don't assume** —
|
|
112
120
|
if detection is inconclusive, use merge-commit (never silently squash someone's history without evidence).
|
|
113
121
|
- Execute merge:
|
|
114
|
-
- GitHub: `gh pr merge <pr> --<strategy>` (e.g. `gh pr merge <pr> --squash
|
|
122
|
+
- GitHub: `gh pr merge <pr> --<strategy> --match-head-commit <watched-sha>` (e.g. `gh pr merge <pr> --squash --match-head-commit <watched-sha>`; the full SHA). GitHub refuses the merge if the head moved.
|
|
115
123
|
- Gitea: call the Gitea PR merge API with the chosen strategy.
|
|
116
124
|
- Record the merge SHA.
|
|
117
125
|
|
|
@@ -131,11 +139,17 @@ If the default branch triggers an automated deployment pipeline:
|
|
|
131
139
|
## Step 9 — Close feature-branch lifecycle (Clean up)
|
|
132
140
|
|
|
133
141
|
**Only after** the merge is complete and deployment (if any) is validated green:
|
|
142
|
+
- Run `git status --short`. If it shows changes you did not make, do not switch, stash, reset or commit:
|
|
143
|
+
leave them, report them, and stop cleanup here (a shared checkout often holds a peer's edits).
|
|
144
|
+
- Fetch and prune: `git fetch --prune`.
|
|
134
145
|
- Switch to the default branch: `git switch <default-branch>`.
|
|
135
146
|
- Fast-forward to the merge commit: `git pull --ff-only origin <default-branch>`.
|
|
136
147
|
- Delete the **local** feature branch: `git branch -d <branch>` (use `-D` only if squashed after verifying tree contents match).
|
|
137
148
|
- Delete the **remote** feature branch: `git push origin --delete <branch>` (if not deleted by forge).
|
|
138
149
|
- Drop the temporary `backup/<branch>-preship` ref if one was created in Step 4.
|
|
150
|
+
- If the repo has a roadmap (`.caddis/roadmaps/`), re-render its page, because the merge changed a Tracker on origin:
|
|
151
|
+
`python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_roadmap.py" render --all` (best effort; a failure is a note, not a
|
|
152
|
+
stop). The page is `~/.caddis/roadmap-pages/<repo>/<slug>.html`.
|
|
139
153
|
|
|
140
154
|
If deploy validation failed: **skip cleanup** entirely and report why — never delete a branch whose
|
|
141
155
|
work may need re-work.
|
|
@@ -154,7 +168,7 @@ Cleanup: remote branch deleted / local branch deleted / backup ref dropped
|
|
|
154
168
|
|
|
155
169
|
- Never merge a PR whose required checks are red or absent.
|
|
156
170
|
- Never delete a feature branch before its merge is confirmed and any deploy validated.
|
|
157
|
-
- Never `git add -A`
|
|
171
|
+
- Never `git add -A`, `git add .` or `git add <dir>`, even after reading `git status`: stage named files only (the guard denies the first two).
|
|
158
172
|
- Never force-push without a `backup/*-preship` recovery ref; force pushes are `--force-with-lease` only.
|
|
159
173
|
- Never edit a workflow file (`.gitea/workflows/`, `.github/workflows/`) to make a gate pass — fix the source.
|
|
160
174
|
- Local-only lane: refuse + point at `/ship`. On the default branch: stop + point at `/ship`.
|
|
@@ -64,7 +64,7 @@ not know to look:
|
|
|
64
64
|
to attribute. It manufactures confidence. Worse than no check.
|
|
65
65
|
- **A wall-clock assertion.** A timing threshold on a shared runner measures load, not the code.
|
|
66
66
|
Assert ordering instead.
|
|
67
|
-
- **Staged directories.** `git add -A` / `git add .` sweeps in files nobody reviewed.
|
|
67
|
+
- **Staged directories.** `git add -A` / `git add .` / `git add <dir>` sweeps in files nobody reviewed.
|
|
68
68
|
- **CI shell assumptions.** The runner may be Windows PowerShell 5.1, where a native command's
|
|
69
69
|
stderr becomes a terminating error under `$ErrorActionPreference='Stop'`, and where `Should -Be`
|
|
70
70
|
(Pester 4 syntax) fails on a Pester 3 runner.
|
|
@@ -70,6 +70,7 @@ process tree on timeout.
|
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
python scripts/caddis_roadmap.py status --roadmap <slug> [--json] # "<done> of <total> done; next <id>; ..."
|
|
73
|
+
python scripts/caddis_roadmap.py render --roadmap <slug> | --all [--out <html>] # page: ~/.caddis/roadmap-pages/<repo>/<slug>.html; hub of every repo: ~/.caddis/roadmap-pages/index.html
|
|
73
74
|
python scripts/caddis_roadmap.py next --roadmap <slug> [--json] # exit 0 found, 1 nothing ready (reasons)
|
|
74
75
|
python scripts/caddis_roadmap.py check --roadmap <slug> # parse errors, unknown refs or types
|
|
75
76
|
python scripts/caddis_roadmap.py set --roadmap <slug> --id S1 --col Status|Owner|Target --value <v> [--by-owner] [--reason "<r>"]
|
|
@@ -36,7 +36,7 @@ names, branch, and service identifiers — never assume.
|
|
|
36
36
|
- Tests: run only if the user says they're needed or a gate explicitly requires them
|
|
37
37
|
- Fix any failures before proceeding. Do not commit broken code.
|
|
38
38
|
|
|
39
|
-
**2. STAGE + COMMIT** — Stage only the intended files (never `git add -A`
|
|
39
|
+
**2. STAGE + COMMIT** — Stage only the intended files, by name (never `git add -A`, `git add .` or a folder):
|
|
40
40
|
```
|
|
41
41
|
git status --short # confirm what's staged
|
|
42
42
|
git add <specific files>
|
|
@@ -119,7 +119,7 @@ Small work that does not meet a trigger skips its block.
|
|
|
119
119
|
|
|
120
120
|
## Rules
|
|
121
121
|
- Never push before preflight gates are green.
|
|
122
|
-
- Never
|
|
122
|
+
- Never `git add -A`, `git add .` or `git add <dir>`, even after reading `git status`: stage named files only (the guard denies the first two).
|
|
123
123
|
- Do not edit a workflow file (`.gitea/workflows/` or `.github/workflows/`) to make a failing gate
|
|
124
124
|
pass — fix the source.
|
|
125
125
|
- Gitea lane: tag-triggered runs after `release_metadata` are expected; verify `deploy_prod` is
|
|
@@ -71,8 +71,9 @@ an explicit argument wins. Options: **squash**, **merge-commit**, **rebase-merge
|
|
|
71
71
|
if detection is inconclusive, say so and use merge-commit (never silently squash someone's history).
|
|
72
72
|
|
|
73
73
|
Then merge:
|
|
74
|
-
- GitHub: `gh pr merge <pr>` with `--squash` (squash), `--merge`
|
|
75
|
-
-
|
|
74
|
+
- GitHub: `gh pr merge <pr> --match-head-commit <head-sha>` (the full SHA) with `--squash` (squash), `--merge`
|
|
75
|
+
(merge-commit) or `--rebase` (rebase-merge). GitHub refuses the merge if the head moved.
|
|
76
|
+
- Gitea: call the Gitea PR merge API with the chosen strategy and `head_commit_id: <head-sha>`.
|
|
76
77
|
|
|
77
78
|
Record the merge SHA.
|
|
78
79
|
|
|
@@ -99,8 +100,11 @@ attempt a silent re-deploy — and **skip cleanup** (Step 6).
|
|
|
99
100
|
## Step 6 — Branch cleanup — only after a confirmed-green deploy
|
|
100
101
|
|
|
101
102
|
**Only after** Step 5 is green:
|
|
102
|
-
-
|
|
103
|
-
|
|
103
|
+
- Run `git status --short`. If it shows changes you did not make, do not switch, stash, reset or commit:
|
|
104
|
+
leave them, report them, and stop cleanup here.
|
|
105
|
+
- `git fetch --prune`, then switch to the default branch and fast-forward it to the merge commit.
|
|
106
|
+
- Delete the **remote** feature branch; delete the **local** feature branch (for a squash merge, compare
|
|
107
|
+
the branch tree with the merged tree first, not ancestry).
|
|
104
108
|
- Drop the `backup/<branch>-preship` ref `/ship-pr` created.
|
|
105
109
|
|
|
106
110
|
If deploy validation failed: **skip cleanup** entirely and say so — never delete a branch whose
|
|
@@ -119,7 +123,7 @@ Cleanup: remote branch ✗ deleted / local ✗ deleted / backup ref droppe
|
|
|
119
123
|
## Rules
|
|
120
124
|
- Never merge without: green required checks **and** the explicit human deploy-confirm.
|
|
121
125
|
- Never delete a branch before its deploy is validated green.
|
|
122
|
-
- Never `git add -A`
|
|
126
|
+
- Never `git add -A`, `git add .` or `git add <dir>`, even after reading `git status`: stage named files only (the guard denies the first two). Never edit a workflow file to make a gate pass.
|
|
123
127
|
- Local-only lane: no PR, no merge — refuse and point at `/ship`.
|
|
124
128
|
|
|
125
129
|
## Skill reference
|
|
@@ -126,7 +126,8 @@ scope-guard check when present:
|
|
|
126
126
|
```bash
|
|
127
127
|
python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_lanes.py" ci-watch --pr <pr>
|
|
128
128
|
```
|
|
129
|
-
|
|
129
|
+
`RESULT: pass` means every check of the PR's head commit is complete and green; `HEAD:` names that commit.
|
|
130
|
+
Exit codes: **0** pass → continue; **1** fail → read `FAILING:` and the gh output, classify, apply the minimum source fix, then re-push (through Step 4's safety if history must change); **3** could not tell (also: a check still unfinished, or the head's checks unreadable) → run `ci-watch` again; if it stays 3, stop and report, do not merge.
|
|
130
131
|
Fallback when `caddis_lanes.py` is not available: watch in-session with `gh pr checks <pr> --watch` / `gh run watch` (`gh-cli` skill).
|
|
131
132
|
On a red check, classify the failure and apply the minimum **source** fix, then re-push (through
|
|
132
133
|
Step 4's safety if history must change).
|
|
@@ -145,7 +146,7 @@ human-confirmed door.
|
|
|
145
146
|
|
|
146
147
|
## Rules
|
|
147
148
|
- **Never merges, never deploys** — no merge action exists in this command, by design.
|
|
148
|
-
- Never `git add -A`
|
|
149
|
+
- Never `git add -A`, `git add .` or `git add <dir>`, even after reading `git status`: stage named files only (the guard denies the first two).
|
|
149
150
|
- Never force-push without a `backup/*-preship` recovery ref; force pushes are `--force-with-lease` only.
|
|
150
151
|
- Never edit a workflow file (`.gitea/workflows/`, `.github/workflows/`) to make a gate pass — fix the source.
|
|
151
152
|
- Local-only lane: refuse + point at `/ship`. On the default branch: stop + point at `/ship`.
|
|
@@ -167,7 +167,8 @@ gh alias set review 'pr list --search "review-requested:@me"'
|
|
|
167
167
|
|
|
168
168
|
```bash
|
|
169
169
|
gh issue develop 42 --branch fix/issue-42
|
|
170
|
-
git add .
|
|
170
|
+
git add src/auth/login.py tests/test_login.py # named files only, never `git add .`
|
|
171
|
+
git commit -m "fix: resolve login bug" && git push -u origin HEAD
|
|
171
172
|
gh pr create --title "fix: resolve login bug" --body "Closes #42"
|
|
172
173
|
gh pr checks --watch
|
|
173
174
|
gh pr merge --squash --delete-branch
|
|
@@ -70,6 +70,7 @@ process tree on timeout.
|
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
python scripts/caddis_roadmap.py status --roadmap <slug> [--json] # "<done> of <total> done; next <id>; ..."
|
|
73
|
+
python scripts/caddis_roadmap.py render --roadmap <slug> | --all [--out <html>] # page: ~/.caddis/roadmap-pages/<repo>/<slug>.html; hub of every repo: ~/.caddis/roadmap-pages/index.html
|
|
73
74
|
python scripts/caddis_roadmap.py next --roadmap <slug> [--json] # exit 0 found, 1 nothing ready (reasons)
|
|
74
75
|
python scripts/caddis_roadmap.py check --roadmap <slug> # parse errors, unknown refs or types
|
|
75
76
|
python scripts/caddis_roadmap.py set --roadmap <slug> --id S1 --col Status|Owner|Target --value <v> [--by-owner] [--reason "<r>"]
|
package/bundles/manifest.json
CHANGED
package/package.json
CHANGED