pi-gauntlet 5.0.5 → 5.0.6
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/skills/using-git-worktrees/SKILL.md +22 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v5.0.6 - 2026-08-27
|
|
4
|
+
|
|
5
|
+
- using-git-worktrees: worktree creation never runs tests. Step 3 ("Verify Clean Baseline", full test suite) is replaced by "Verify Clean Base": a bare `git status --porcelain` check on the source checkout (untracked counts as dirty), run pre-creation on fresh paths; dirty -> report verbatim + ask, never test, never auto-stash. Report-only provenance note when branching off a non-default branch; Step 4 reports `Base: <ref> (clean)` instead of a test result; Step 2b's gitignore commit is pathspec-limited so proceed-with-dirt never absorbs staged changes. Rebase-time re-testing in "Keeping a Worktree Current" is unchanged. Fixes #16. Spec: `doc/specs/2026-08-27-gh-16-worktree-creation-no-tests.md`.
|
|
6
|
+
|
|
3
7
|
## v5.0.5 - 2026-08-26
|
|
4
8
|
|
|
5
9
|
- chase-bug: the reporter-facing response draft is now conditional on an **addressable** origin. Intake records a response target (GitHub issue / tracker ticket origins have one; Slack paste / free text do not - `none`), settable mid-chase by an explicit ask ("comment on gh-14"); gate 2 (`send it`) exists only where a push will happen (no write path -> ungated copy-paste block; no target -> no draft at all); unaddressable origins end in a rendered four-field verdict summary, menus reworded accordingly (`Finish with rendered summary`), gate count relaxed to "at most two chase-bug-owned human gates". Spec: `doc/specs/2026-08-26-chase-bug-conditional-response-draft.md` (partially supersedes `doc/specs/2026-08-23-gh-12-chase-bug-triage-skill.md`, response-gate scope only).
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@ BRANCH=$(git branch --show-current)
|
|
|
32
32
|
git rev-parse --show-superproject-working-tree 2>/dev/null
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
**If `GIT_DIR != GIT_COMMON` (and not a submodule):** You are already in a linked worktree. Skip to Step 3 (Verify Clean
|
|
35
|
+
**If `GIT_DIR != GIT_COMMON` (and not a submodule):** You are already in a linked worktree. Skip to Step 3 (Verify Clean Base). Do NOT create another worktree.
|
|
36
36
|
|
|
37
37
|
Report with branch state:
|
|
38
38
|
- On a branch: "Already in isolated workspace at `<path>` on branch `<name>`."
|
|
@@ -55,7 +55,7 @@ Otherwise create it. The gate is "is this real work?", not "did the user approve
|
|
|
55
55
|
|
|
56
56
|
## Step 1a — Prefer Native Worktree Tools
|
|
57
57
|
|
|
58
|
-
Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `/worktree` command, or a `--worktree` flag. If you do, use it and skip to Step 3.
|
|
58
|
+
Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `/worktree` command, or a `--worktree` flag. If you do, run the Step 3 clean-base check in the source checkout *before* invoking it, then use it and skip to Step 3.
|
|
59
59
|
|
|
60
60
|
Native tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.
|
|
61
61
|
|
|
@@ -84,14 +84,14 @@ Don't ask local-vs-global and don't invent other paths — `.worktrees/` is the
|
|
|
84
84
|
|
|
85
85
|
### 2b. Create — gitignore the home first
|
|
86
86
|
|
|
87
|
-
`.worktrees/` must be gitignored before a worktree lands inside it. Fold the check into creation:
|
|
87
|
+
Run the Step 3 clean-base check in the source checkout *before* this sequence. `.worktrees/` must be gitignored before a worktree lands inside it. Fold the check into creation:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
90
|
ROOT=$(git rev-parse --show-toplevel)
|
|
91
91
|
cd "$ROOT"
|
|
92
92
|
if ! git check-ignore -q .worktrees; then
|
|
93
93
|
echo ".worktrees/" >> .gitignore
|
|
94
|
-
git add .gitignore && git commit -m "Ignore .worktrees/"
|
|
94
|
+
git add .gitignore && git commit -m "Ignore .worktrees/" -- .gitignore
|
|
95
95
|
fi
|
|
96
96
|
git worktree add ".worktrees/$BRANCH_NAME" -b "$BRANCH_NAME"
|
|
97
97
|
cd ".worktrees/$BRANCH_NAME"
|
|
@@ -116,30 +116,32 @@ fi
|
|
|
116
116
|
|
|
117
117
|
If worktree creation fails on permissions (read-only filesystem, container sandbox without write to parent dirs): stop, announce the failure, and continue in the current directory on a feature branch.
|
|
118
118
|
|
|
119
|
-
## Step 3 — Verify Clean
|
|
119
|
+
## Step 3 — Verify Clean Base
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
cargo test # Rust
|
|
128
|
-
go test ./... # Go
|
|
129
|
-
```
|
|
121
|
+
The check: bare `git status --porcelain` — untracked files count as dirty. Never `--untracked-files=no` / `-uno`. Empty output means clean only when the command exits 0; a nonzero exit is an error to surface — stop; never treat a failed check as "clean".
|
|
122
|
+
|
|
123
|
+
**When and where it runs:**
|
|
124
|
+
|
|
125
|
+
- **Fresh creation (Steps 1a/2):** in the source checkout, **before** invoking the wrapper (Step 1a) or the `git worktree add` sequence (Step 2b) — pre-creation, the current directory *is* the source checkout, so no `$ROOT` plumbing or `git worktree list` derivation is needed. Those steps point here; this section defines the check.
|
|
126
|
+
- **Already in a worktree (Step 0):** the same check against the current worktree, on arrival at this step.
|
|
130
127
|
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
**Clean** → proceed (create the worktree if not yet created, then Step 4).
|
|
129
|
+
|
|
130
|
+
**Dirty** → report the porcelain output verbatim and ask whether to clean up first (stash/commit) or proceed. Never run tests as a fallback; never auto-stash or auto-clean. On fresh paths the ask is about base hygiene — a user who *meant* the dirt to be part of the base commits it, and creation proceeds from the new HEAD. On the Step 0 path the ask is "continue working in a dirty workspace?" — the dirt is already in the workspace, not merely beside it.
|
|
131
|
+
|
|
132
|
+
**Provenance note (report-only, never a gate).** Fresh-creation paths only — never Step 0 (an already-linked worktree was branched in some earlier invocation; there is no "created from" to compare this run). Resolve the default branch as `git symbolic-ref --short refs/remotes/origin/HEAD` with the leading `origin/` stripped; compare that short name to the source checkout's `git branch --show-current`. If they differ and the user did not name a base in the request, append one declarative line to the Step 4 report: `Note: branching from <ref>, not <default>.` — execution continues, no confirmation is awaited. If resolution fails (no remote, no `origin/HEAD`), skip the note silently. No other default-branch machinery.
|
|
133
133
|
|
|
134
134
|
## Step 4 — Report Location
|
|
135
135
|
|
|
136
136
|
```
|
|
137
137
|
Worktree ready at <full-path>
|
|
138
138
|
Branch: <branch-name>
|
|
139
|
-
|
|
139
|
+
Base: <ref> (clean)
|
|
140
140
|
Ready to implement <feature>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
When the user chose to proceed past a dirty source, the base line is `Base: <ref> (dirty - proceeded after ask)` instead. When the provenance check fired (fresh paths only), append its `Note: branching from <ref>, not <default>.` line after the base line. `<ref>` per path: fresh creation — the branch/commit the worktree was created from (the user-requested base when one was given); Step 0 — the current branch/HEAD of the existing worktree, with no provenance line.
|
|
144
|
+
|
|
143
145
|
## Detached HEAD
|
|
144
146
|
|
|
145
147
|
If `git symbolic-ref -q HEAD` returns nothing, you're on a detached HEAD. Do not create a worktree from this state — first ask the user whether to branch from the current commit or from `main`.
|
|
@@ -166,7 +168,7 @@ Re-run tests after rebasing.
|
|
|
166
168
|
| No enclosing repo | Fall back to `~/.worktrees/<project>/<branch>` |
|
|
167
169
|
| Detached HEAD | Ask before branching |
|
|
168
170
|
| Sandbox/permission failure | Work in place on a feature branch |
|
|
169
|
-
|
|
|
171
|
+
| Source checkout dirty | Report + ask |
|
|
170
172
|
|
|
171
173
|
## Red Flags — STOP
|
|
172
174
|
|
|
@@ -174,7 +176,8 @@ Re-run tests after rebasing.
|
|
|
174
176
|
- About to call `git worktree add` directly when the project ships a wrapper (use the wrapper)
|
|
175
177
|
- Created a `.worktrees/` worktree without gitignoring `.worktrees/` first
|
|
176
178
|
- Placed a worktree outside `.worktrees/` (or the project's configured path) for no reason
|
|
177
|
-
-
|
|
179
|
+
- Source checkout dirty and you proceed without asking
|
|
180
|
+
- About to run a test suite during worktree creation
|
|
178
181
|
|
|
179
182
|
## Integration
|
|
180
183
|
|