@caddis/cli 0.4.56 → 0.4.58
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/caddis_statusline.py +45 -11
- 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_adhoc.py +69 -23
- package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +63 -12
- package/bundles/antigravity-plugin/scripts/caddis_docs_pr.py +9 -8
- package/bundles/antigravity-plugin/scripts/caddis_gate.py +21 -0
- package/bundles/antigravity-plugin/scripts/caddis_lanes.py +39 -2
- package/bundles/antigravity-plugin/scripts/caddis_merge_chain.py +67 -22
- package/bundles/antigravity-plugin/scripts/caddis_review.py +81 -11
- package/bundles/antigravity-plugin/scripts/caddis_roadmap.py +124 -29
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_page.py +80 -7
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +26 -9
- package/bundles/antigravity-plugin/scripts/caddis_spawn.py +24 -4
- package/bundles/antigravity-plugin/scripts/caddis_spend.py +120 -10
- package/bundles/antigravity-plugin/scripts/caddis_statusline.py +45 -11
- package/bundles/antigravity-plugin/scripts/caddis_worktree_close.py +14 -9
- package/bundles/antigravity-plugin/scripts/caddis_worktree_safety.py +12 -0
- package/bundles/antigravity-plugin/scripts/hook_log.py +13 -2
- package/bundles/antigravity-plugin/scripts/oss_review.py +300 -79
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +20 -6
- 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 +4 -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/skills/spawn-session/SKILL.md +3 -2
- package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +52 -175
- 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/codex/.codex/skills/devops/using-git-worktrees/SKILL.md +52 -175
- package/bundles/manifest.json +3 -3
- package/dist/cli.js +310 -46
- package/package.json +1 -1
|
@@ -5,213 +5,90 @@ description: "Use when starting feature work that needs isolation from the curre
|
|
|
5
5
|
|
|
6
6
|
# Using Git Worktrees
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
A worktree gives one branch its own folder. It shares the repository with the main checkout.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Branch in place by default.** Run `git switch -c <branch>`. Never create a sibling repository folder.
|
|
11
|
+
Use a worktree only when the checkout is not safe to move.
|
|
11
12
|
|
|
12
|
-
**
|
|
13
|
+
**Announce at start:** "I am using the using-git-worktrees skill to set up an isolated workspace."
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
## When to use a worktree
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Use a worktree when any of these is true:
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
1. The repo `AGENTS.md` says `Shared checkout: yes` (a dev service serves from it) and your change touches
|
|
20
|
+
served code. A change to `.caddis/` or `docs/` only may use a branch.
|
|
21
|
+
2. Another session or agent may be live in the checkout, or you cannot tell. Codex and agy cannot detect
|
|
22
|
+
peers. For them, "cannot tell" means not safe.
|
|
23
|
+
3. `git status` shows changes you did not make. Never stash, commit, reset or carry them.
|
|
24
|
+
4. Two or more agents edit at the same time. Each editing agent gets its own worktree. The orchestrator
|
|
25
|
+
creates and removes them. Read-only subagents share the checkout and never move HEAD.
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
If none is true, stop here and use `git switch -c`.
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
# Check in priority order
|
|
24
|
-
ls -d .worktrees 2>/dev/null # Preferred (hidden)
|
|
25
|
-
ls -d worktrees 2>/dev/null # Alternative
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**If found:** Use that directory. If both exist, `.worktrees` wins.
|
|
29
|
+
## Create the worktree
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
1. Fetch: `git fetch origin`.
|
|
32
|
+
2. Find the default branch (`main` in most repos): `git symbolic-ref --short refs/remotes/origin/HEAD`.
|
|
33
|
+
It prints `origin/main`. Use the part after `origin/` as `<default>`.
|
|
34
|
+
3. Create the worktree from `origin/<default>`, never from the local HEAD, under `%TEMP%`:
|
|
31
35
|
|
|
32
|
-
```
|
|
33
|
-
|
|
36
|
+
```powershell
|
|
37
|
+
git worktree add -b <branch> "$env:TEMP\<repo>-<short-name>" origin/<default>
|
|
34
38
|
```
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### 3. Ask User
|
|
39
|
-
|
|
40
|
-
If no directory exists and no AGENTS.md preference:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
No worktree directory found. Where should I create worktrees?
|
|
40
|
+
Do not create worktrees inside the repo (no `.worktrees/`).
|
|
41
|
+
4. State the full path of the worktree. Work only there, and do not switch branches in it.
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
|
|
43
|
+
## Install dependencies fresh
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
Install inside the worktree. Use the project's own command (`npm ci`, `python -m venv .venv` then
|
|
46
|
+
`.venv\Scripts\python -m pip install -r requirements.txt`, `cargo build`, `go mod download`). Call the
|
|
47
|
+
venv's own `python`; a bare `pip` can install into the global Python.
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
Never link `node_modules` or a venv from another folder. Tools that follow the link then change the
|
|
50
|
+
shared copy, and a careless delete can follow it too.
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
## Verify a clean baseline
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
Run the project tests. If they fail, report the failures and ask before you go on. Then report:
|
|
56
55
|
|
|
57
|
-
```bash
|
|
58
|
-
# Check if directory is ignored (respects local, global, and system gitignore)
|
|
59
|
-
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
|
|
60
56
|
```
|
|
61
|
-
|
|
62
|
-
**If NOT ignored:**
|
|
63
|
-
|
|
64
|
-
Per Jesse's rule "Fix broken things immediately":
|
|
65
|
-
1. Add appropriate line to .gitignore
|
|
66
|
-
2. Commit the change
|
|
67
|
-
3. Proceed with worktree creation
|
|
68
|
-
|
|
69
|
-
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
|
70
|
-
|
|
71
|
-
### For Global Directory (~/.config/superpowers/worktrees)
|
|
72
|
-
|
|
73
|
-
No .gitignore verification needed - outside project entirely.
|
|
74
|
-
|
|
75
|
-
## Creation Steps
|
|
76
|
-
|
|
77
|
-
### 1. Detect Project Name
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
project=$(basename "$(git rev-parse --show-toplevel)")
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 2. Create Worktree
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# Determine full path
|
|
87
|
-
case $LOCATION in
|
|
88
|
-
.worktrees|worktrees)
|
|
89
|
-
path="$LOCATION/$BRANCH_NAME"
|
|
90
|
-
;;
|
|
91
|
-
~/.config/superpowers/worktrees/*)
|
|
92
|
-
path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
|
|
93
|
-
;;
|
|
94
|
-
esac
|
|
95
|
-
|
|
96
|
-
# Create worktree with new branch
|
|
97
|
-
git worktree add "$path" -b "$BRANCH_NAME"
|
|
98
|
-
cd "$path"
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### 3. Run Project Setup
|
|
102
|
-
|
|
103
|
-
Auto-detect and run appropriate setup:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
# Node.js
|
|
107
|
-
if [ -f package.json ]; then npm install; fi
|
|
108
|
-
|
|
109
|
-
# Rust
|
|
110
|
-
if [ -f Cargo.toml ]; then cargo build; fi
|
|
111
|
-
|
|
112
|
-
# Python
|
|
113
|
-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
114
|
-
if [ -f pyproject.toml ]; then poetry install; fi
|
|
115
|
-
|
|
116
|
-
# Go
|
|
117
|
-
if [ -f go.mod ]; then go mod download; fi
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
### 4. Verify Clean Baseline
|
|
121
|
-
|
|
122
|
-
Run tests to ensure worktree starts clean:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Examples - use project-appropriate command
|
|
126
|
-
npm test
|
|
127
|
-
cargo test
|
|
128
|
-
pytest
|
|
129
|
-
go test ./...
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**If tests fail:** Report failures, ask whether to proceed or investigate.
|
|
133
|
-
|
|
134
|
-
**If tests pass:** Report ready.
|
|
135
|
-
|
|
136
|
-
### 5. Report Location
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
Worktree ready at <full-path>
|
|
57
|
+
Worktree ready at <full-path> (branch <branch>, from origin/<default>)
|
|
140
58
|
Tests passing (<N> tests, 0 failures)
|
|
141
|
-
Ready to implement <feature-name>
|
|
142
59
|
```
|
|
143
60
|
|
|
144
|
-
##
|
|
61
|
+
## Remove it when done
|
|
145
62
|
|
|
146
|
-
|
|
147
|
-
|-----------|--------|
|
|
148
|
-
| `.worktrees/` exists | Use it (verify ignored) |
|
|
149
|
-
| `worktrees/` exists | Use it (verify ignored) |
|
|
150
|
-
| Both exist | Use `.worktrees/` |
|
|
151
|
-
| Neither exists | Check AGENTS.md → Ask user |
|
|
152
|
-
| Directory not ignored | Add to .gitignore + commit |
|
|
153
|
-
| Tests fail during baseline | Report failures + ask |
|
|
154
|
-
| No package.json/Cargo.toml | Skip dependency install |
|
|
63
|
+
A worktree you create is yours to remove. Do it when the PR merges or the work stops. Remove all three:
|
|
155
64
|
|
|
156
|
-
|
|
65
|
+
1. The worktree.
|
|
66
|
+
2. The local branch.
|
|
67
|
+
3. The remote branch, but only when its work is merged, or the owner says it is abandoned. If the work
|
|
68
|
+
only paused, keep the remote branch: it can be the only copy.
|
|
157
69
|
|
|
158
|
-
|
|
70
|
+
After a squash merge, compare trees (content), not ancestry, before you delete.
|
|
159
71
|
|
|
160
|
-
-
|
|
161
|
-
|
|
72
|
+
Do not delete a worktree folder by hand or with `rm -rf`: on Windows it can follow a junction into
|
|
73
|
+
another folder. Use the `safe-cleanup` skill, or `scripts/caddis_worktree_close.py` after a merged PR.
|
|
162
74
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
- **Problem:** Creates inconsistency, violates project conventions
|
|
166
|
-
- **Fix:** Follow priority: existing > AGENTS.md > ask
|
|
167
|
-
|
|
168
|
-
### Proceeding with failing tests
|
|
169
|
-
|
|
170
|
-
- **Problem:** Can't distinguish new bugs from pre-existing issues
|
|
171
|
-
- **Fix:** Report failures, get explicit permission to proceed
|
|
172
|
-
|
|
173
|
-
### Hardcoding setup commands
|
|
174
|
-
|
|
175
|
-
- **Problem:** Breaks on projects using different tools
|
|
176
|
-
- **Fix:** Auto-detect from project files (package.json, etc.)
|
|
177
|
-
|
|
178
|
-
## Example Workflow
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
You: I'm using the using-git-worktrees skill to set up an isolated workspace.
|
|
182
|
-
|
|
183
|
-
[Check .worktrees/ - exists]
|
|
184
|
-
[Verify ignored - git check-ignore confirms .worktrees/ is ignored]
|
|
185
|
-
[Create worktree: git worktree add .worktrees/auth -b feature/auth]
|
|
186
|
-
[Run npm install]
|
|
187
|
-
[Run npm test - 47 passing]
|
|
188
|
-
|
|
189
|
-
Worktree ready at /Users/jesse/myproject/.worktrees/auth
|
|
190
|
-
Tests passing (47 tests, 0 failures)
|
|
191
|
-
Ready to implement auth feature
|
|
192
|
-
```
|
|
75
|
+
Check for leftovers with `git worktree list`.
|
|
193
76
|
|
|
194
|
-
## Red
|
|
77
|
+
## Red flags
|
|
195
78
|
|
|
196
79
|
**Never:**
|
|
197
|
-
- Create worktree
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
|
|
203
|
-
**Always:**
|
|
204
|
-
- Follow directory priority: existing > AGENTS.md > ask
|
|
205
|
-
- Verify directory is ignored for project-local
|
|
206
|
-
- Auto-detect and run project setup
|
|
207
|
-
- Verify clean test baseline
|
|
80
|
+
- Create a worktree from the local HEAD or a stale branch.
|
|
81
|
+
- Put a worktree in the repo folder or in a sibling of the repo.
|
|
82
|
+
- Link `node_modules` or a venv into a worktree.
|
|
83
|
+
- Leave a worktree, local branch or merged remote branch behind after the work ends.
|
|
84
|
+
- Use a worktree when `git switch -c` is safe.
|
|
208
85
|
|
|
209
86
|
## Integration
|
|
210
87
|
|
|
211
88
|
**Called by:**
|
|
212
|
-
- **brainstorming** (Phase 4) -
|
|
213
|
-
- Any skill
|
|
89
|
+
- **brainstorming** (Phase 4) - when the design is approved and implementation follows
|
|
90
|
+
- Any skill that needs an isolated workspace
|
|
214
91
|
|
|
215
92
|
**Pairs with:**
|
|
216
|
-
- **finishing-a-development-branch** -
|
|
217
|
-
- **executing-plans** or **subagent-driven-development** -
|
|
93
|
+
- **finishing-a-development-branch** - cleanup after the work is complete
|
|
94
|
+
- **executing-plans** or **subagent-driven-development** - the work happens in this worktree
|
|
@@ -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'` |
|