forge-workflow 0.1.0-beta.4 → 0.1.0-beta.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/AGENTS.md +18 -7
- package/CHANGELOG.md +79 -1
- package/CLAUDE.md +0 -12
- package/CODING_STANDARDS.md +72 -0
- package/README.md +6 -2
- package/bin/forge-cmd.js +20 -0
- package/bin/forge.js +28 -375
- package/docs/INDEX.md +1 -1
- package/docs/guides/BEADS_GITHUB_SYNC.md +2 -31
- package/docs/guides/MIGRATION.md +4 -4
- package/docs/guides/SETUP.md +16 -16
- package/docs/reference/COMMANDS.md +8 -5
- package/docs/reference/FORGE_KERNEL_STORAGE_MODEL.md +4 -0
- package/docs/reference/INSIGHTS_RECAP.md +9 -20
- package/docs/reference/INSTALL.md +4 -0
- package/docs/reference/LEGACY_CLAIM_REPAIR.md +112 -0
- package/docs/reference/RELEASE.md +5 -3
- package/docs/reference/TOOLCHAIN.md +8 -0
- package/docs/reference/github-accounts.md +134 -0
- package/docs/reference/protected-state-surfaces.md +4 -4
- package/docs/reference/shepherd.md +114 -35
- package/lefthook.yml +12 -0
- package/lib/activation/ensure-forge-home.js +33 -15
- package/lib/adapters/pr-state-adapter.js +359 -144
- package/lib/audit-evidence.js +71 -110
- package/lib/base-remote.js +138 -0
- package/lib/beta5-compatibility-evidence.js +1093 -0
- package/lib/bun-lockfile-proof.js +413 -0
- package/lib/bun-workflow-pins.js +461 -0
- package/lib/capabilities/index.js +9 -0
- package/lib/capabilities/model.js +141 -0
- package/lib/capabilities/probes.js +347 -0
- package/lib/capped-jsonl-log.js +236 -0
- package/lib/codex-skills.js +2 -2
- package/lib/commands/_manifest.js +1 -0
- package/lib/commands/_registry.js +50 -20
- package/lib/commands/clean.js +252 -32
- package/lib/commands/dev.js +4 -33
- package/lib/commands/doctor.js +37 -6
- package/lib/commands/gate.js +197 -27
- package/lib/commands/github.js +215 -0
- package/lib/commands/hooks.js +276 -30
- package/lib/commands/insights.js +8 -3
- package/lib/commands/memory.js +66 -2
- package/lib/commands/merge.js +1265 -58
- package/lib/commands/plan.js +33 -2
- package/lib/commands/pr.js +3 -1
- package/lib/commands/preflight.js +21 -4
- package/lib/commands/prime.js +21 -8
- package/lib/commands/push.js +146 -54
- package/lib/commands/recall.js +127 -49
- package/lib/commands/recap.js +6 -1
- package/lib/commands/release.js +39 -3
- package/lib/commands/remember.js +28 -4
- package/lib/commands/serve.js +26 -9
- package/lib/commands/setup.js +323 -98
- package/lib/commands/shepherd.js +591 -73
- package/lib/commands/ship.js +36 -91
- package/lib/commands/skill.js +127 -11
- package/lib/commands/status.js +17 -1
- package/lib/commands/team.js +47 -8
- package/lib/commands/test.js +187 -38
- package/lib/commands/validate.js +65 -21
- package/lib/commands/worktree.js +359 -45
- package/lib/core/runtime-graph.js +1 -1
- package/lib/doc-assertions.js +297 -0
- package/lib/existing-tdd-gate.js +253 -0
- package/lib/fixtures/beta5-corpus/v1/README.md +9 -0
- package/lib/fixtures/beta5-corpus/v1/contract/command-contract.json +26 -0
- package/lib/fixtures/beta5-corpus/v1/contract/package-contract.json +13 -0
- package/lib/fixtures/beta5-corpus/v1/contract/workflow-stage-matrix.json +8 -0
- package/lib/fixtures/beta5-corpus/v1/manifest.json +25 -0
- package/lib/fixtures/beta5-corpus/v1/state/comments.jsonl +1 -0
- package/lib/fixtures/beta5-corpus/v1/state/config.yaml +6 -0
- package/lib/fixtures/beta5-corpus/v1/state/dependencies.jsonl +1 -0
- package/lib/fixtures/beta5-corpus/v1/state/issues.jsonl +2 -0
- package/lib/fixtures/beta5-corpus/v1/state/kernel.sql +20 -0
- package/lib/forge-context.js +1 -4
- package/lib/forge-issues.js +134 -32
- package/lib/gate-events.js +98 -10
- package/lib/git-defaults.js +56 -0
- package/lib/github-context.js +308 -0
- package/lib/global-flags.js +1 -0
- package/lib/harness-capability-matrix.js +3 -3
- package/lib/hook-renderer.js +122 -5
- package/lib/insights.js +96 -80
- package/lib/issue-render.js +19 -0
- package/lib/kernel/backing-issue.js +14 -2
- package/lib/kernel/broker.js +739 -31
- package/lib/kernel/claim-reconciler.js +238 -0
- package/lib/kernel/cli-broker-factory.js +12 -1
- package/lib/kernel/close-on-merge.js +154 -0
- package/lib/kernel/fs-class.js +42 -25
- package/lib/kernel/lease-enforcer.js +9 -4
- package/lib/kernel/legacy-claim-repair.js +442 -0
- package/lib/kernel/live-claim-projection.js +26 -0
- package/lib/kernel/migrations.js +118 -3
- package/lib/kernel/readiness-model.js +184 -12
- package/lib/kernel/schema.js +49 -1
- package/lib/kernel/sqlite-driver.js +3435 -172
- package/lib/kernel/taxonomy-validator.js +4 -1
- package/lib/kernel/windows-private-acl.js +239 -0
- package/lib/lefthook-wiring.js +21 -1
- package/lib/memory/hygiene.js +191 -0
- package/lib/memory/router.js +110 -28
- package/lib/memory/usage-evidence.js +4 -0
- package/lib/memory-digest.js +106 -15
- package/lib/memory-recall-events.js +145 -0
- package/lib/memory-recall.js +71 -10
- package/lib/merge-rules.js +143 -21
- package/lib/npm-publish-workflow.js +465 -0
- package/lib/orientation.js +68 -43
- package/lib/package-root.js +2 -0
- package/lib/plugin-catalog.js +14 -4
- package/lib/pr-bundle.js +5 -6
- package/lib/pr-monitor/auto-actions.js +169 -28
- package/lib/pr-monitor/differ.js +110 -4
- package/lib/pr-monitor/events.js +0 -0
- package/lib/pr-monitor/flow-monitor.js +1424 -0
- package/lib/pr-monitor/gather.js +251 -44
- package/lib/pr-monitor/journal.js +18 -39
- package/lib/pr-monitor/monitor.js +117 -10
- package/lib/pr-monitor/process-identity.js +117 -0
- package/lib/pr-monitor/reconcile-executor.js +1129 -470
- package/lib/pr-monitor/reconcile.js +0 -0
- package/lib/pr-monitor/render-summary.js +293 -0
- package/lib/pr-monitor/review-preflight.js +269 -0
- package/lib/pr-monitor/shepherd-lease.js +38 -20
- package/lib/pr-monitor/verdict.js +438 -0
- package/lib/pr-monitor/watch-lifecycle.js +145 -27
- package/lib/pr-monitor/watch-owner.js +1414 -0
- package/lib/pr-monitor/watch.js +129 -58
- package/lib/pr-pull.js +33 -14
- package/lib/pr-shepherd.js +51 -11
- package/lib/preflight/gates.js +65 -18
- package/lib/preflight/runner.js +5 -0
- package/lib/project-memory.js +178 -4
- package/lib/protected-state-authority.js +1100 -0
- package/lib/protected-state-surfaces.js +243 -45
- package/lib/release-readiness.js +53 -7
- package/lib/review-adapter.js +65 -0
- package/lib/shell-utils.js +1 -1
- package/lib/skills-sync.js +71 -35
- package/lib/smart-merge.js +28 -4
- package/lib/symlink-utils.js +74 -26
- package/lib/upgrade-safety.js +39 -0
- package/lib/using-forge.js +19 -6
- package/lib/validation/risk-manifest.js +339 -0
- package/lib/workflow/enforce-stage.js +44 -0
- package/lib/workflow/plan-authority.js +225 -0
- package/package.json +12 -9
- package/scripts/commitlint.js +13 -15
- package/scripts/doc-asserting-tests.js +158 -0
- package/scripts/generate-risk-manifest.js +91 -0
- package/scripts/github-context-bridge.sh +10 -0
- package/scripts/legacy-claim-repair.js +145 -0
- package/scripts/lib/behavioral-eval-runner.js +310 -0
- package/scripts/lib/behavioral-eval-runtime.js +457 -0
- package/scripts/lib/eval-evidence.js +328 -0
- package/scripts/lib/eval-runner.js +81 -41
- package/scripts/lib/immutable-eval-corpus.js +309 -0
- package/scripts/lib/promotion-evidence-loader.js +94 -0
- package/scripts/lib/promotion-scorecard.js +314 -0
- package/scripts/npm-release-receipt.js +134 -0
- package/scripts/process-tree.js +773 -0
- package/scripts/protected-state-check.js +479 -31
- package/scripts/run-command-eval.js +29 -1
- package/scripts/sync-agent-skills.js +333 -34
- package/scripts/sync-d20-audit.js +172 -0
- package/scripts/test-full-suite.js +935 -37
- package/scripts/test-profile.js +13 -3
- package/scripts/test.js +271 -57
- package/skills/coverage.json +1 -0
- package/skills/review/SKILL.md +6 -11
- package/skills/review/evals/scorecard.json +4 -4
- package/skills/rollback/SKILL.md +4 -11
- package/skills/rollback/evals/scorecard.json +3 -3
- package/skills/setup/SKILL.md +18 -0
- package/skills/setup/evals/scorecard.json +3 -3
- package/skills/shepherd/SKILL.md +39 -16
- package/skills/shepherd/evals/scorecard.json +4 -4
- package/skills/ship/SKILL.md +4 -12
- package/skills/ship/evals/scorecard.json +3 -3
- package/skills/validate/SKILL.md +3 -0
- package/skills/validate/evals/scorecard.json +1 -1
- package/skills/worktree/SKILL.md +6 -1
- package/skills/worktree/evals/scorecard.json +2 -2
- package/lib/beads-setup.js +0 -538
- package/lib/beads-sync-scaffold.js +0 -189
- package/lib/pat-setup.js +0 -207
- package/lib/pr-monitor/render-sticky.js +0 -206
- package/lib/pr-monitor/upsert-sticky.js +0 -169
- package/scripts/beads-context.sh +0 -577
- package/scripts/beads-migrate-to-dolt.sh +0 -7
- package/scripts/beads-upgrade-smoke.sh +0 -284
- package/scripts/lib/beads-migrate-to-dolt.mjs +0 -503
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"static": {
|
|
5
5
|
"token_cost": {
|
|
6
6
|
"desc_chars": 1021,
|
|
7
|
-
"body_lines":
|
|
8
|
-
"score":
|
|
7
|
+
"body_lines": 92,
|
|
8
|
+
"score": 41
|
|
9
9
|
},
|
|
10
10
|
"caps": {
|
|
11
11
|
"desc_within": true,
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"variance": null,
|
|
38
38
|
"note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
|
|
39
39
|
},
|
|
40
|
-
"composite":
|
|
40
|
+
"composite": 82
|
|
41
41
|
}
|
package/skills/shepherd/SKILL.md
CHANGED
|
@@ -6,8 +6,8 @@ description: >
|
|
|
6
6
|
open PR, converges CI check state into kernel verdicts, re-runs flaky required
|
|
7
7
|
checks, reaps orphan watchers, and self-retires when no PRs remain; one-shot
|
|
8
8
|
passes (forge shepherd <pr>) exist for a single bounded check. Use when a PR was
|
|
9
|
-
just opened or shipped; when a session starts with open PRs (
|
|
10
|
-
|
|
9
|
+
just opened or shipped; when a session starts with open PRs (Forge automatically
|
|
10
|
+
wakes the singleton; the lease makes a duplicate start a safe no-op);
|
|
11
11
|
when the user asks "why isn't my PR merging", "what's
|
|
12
12
|
blocking the PR", "is the PR ready", "did a check fail / go red"; when asked to
|
|
13
13
|
"keep watching / keep an eye on / babysit my PRs"; or to read PR verdicts
|
|
@@ -27,22 +27,25 @@ Forge owns your open PRs. A singleton daemon converges every open PR toward merg
|
|
|
27
27
|
`shepherd` is the PR-ownership utility, not a workflow stage. It has two modes over the **single `forge shepherd` verb**:
|
|
28
28
|
|
|
29
29
|
- **Daemon (default ownership):** `forge shepherd daemon` is a machine-wide singleton for this repo. It heartbeats and converges the whole PR world every ~60s — self-registering hand-opened PRs, restarting killed watchers, reaping verified orphans, converging CI check state into kernel verdicts, retiring merged/closed PRs — then self-retires (releases the lease, kills its children, exits) once no PRs remain open. You do NOT poll by hand; the daemon does.
|
|
30
|
-
- **One-shot
|
|
30
|
+
- **One-shot convergence:** `forge shepherd <pr>` runs the local review preflight, reads one PR's current-head state, takes at most one idempotent Tier-A action, persists bounded deltas/receipts, and exits. Use it for a point-in-time question or one bounded convergence attempt on a single PR.
|
|
31
31
|
|
|
32
32
|
## Which mode? (decision rule)
|
|
33
33
|
|
|
34
34
|
- User asks about **one PR, right now** ("is #212 ready?", "why is this blocked?") → **one-shot** (`forge shepherd <pr> --pull`).
|
|
35
35
|
- Anything **ongoing** — "keep", "until it merges", "watch", "babysit", multiple PRs, or a session that starts with PRs already open → **ensure the daemon is running**.
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Automatic attachment
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Forge wakes the singleton after a successful supported session start, every
|
|
40
|
+
successful push, and every successful non-dry-run ship. Push does not require a
|
|
41
|
+
locally resolved PR number; the daemon enumerates all open and draft PRs itself.
|
|
42
|
+
Ordinary commands do not launch it.
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
The daemon is a **repo singleton** guarded by an O_EXCL lease, so no liveness
|
|
45
|
+
check is needed first. Forge prefers a supplied harness background shell; its
|
|
46
|
+
bare-CLI detached fallback launches from the stable common repository root, not
|
|
47
|
+
the current disposable worktree. Agents never launch a detached spawn directly.
|
|
48
|
+
(A `forge prime` daemon-liveness line remains the separate W-S5 follow-up.)
|
|
46
49
|
|
|
47
50
|
## Reading verdicts (the common case)
|
|
48
51
|
|
|
@@ -54,12 +57,22 @@ forge shepherd events <pr> --since <seq> # only the new events since sequence
|
|
|
54
57
|
|
|
55
58
|
`--pull` is strictly read-only (dry-run pass: no rerun, no rebase, no merge, no thread resolution). It returns one bounded, actionable-only payload — `blockers[]`, classified `requiredChecks`, failed-check log `failures[]` (matrix-deduped), and every unresolved `reviewThreads[]` — so you get "everything blocking this PR + what to fix" in one call. Passing checks and satisfied policy are omitted.
|
|
56
59
|
|
|
60
|
+
A plain `forge shepherd <pr>` also returns a consolidated `localPreflight`, at
|
|
61
|
+
most 128 `deltas`, `receiptIds`, and one explicit `handoff`. The preflight probes
|
|
62
|
+
CodeRabbit and runs strict lint, Sonar parity, structural drift, and affected
|
|
63
|
+
tests. An unavailable or unauthenticated CodeRabbit CLI is reported as
|
|
64
|
+
`UNAVAILABLE`/`INCOMPLETE`, never as a fabricated pass; deterministic failures or
|
|
65
|
+
actual review findings make the remote decision read-only for that pass. A
|
|
66
|
+
checkout that is not the exact PR head is `NOT_APPLICABLE`, never reviewed as if
|
|
67
|
+
it were authoritative.
|
|
68
|
+
|
|
57
69
|
### Verdict vocabulary (collapsed, W-S1)
|
|
58
70
|
|
|
59
71
|
| Verdict | Meaning |
|
|
60
72
|
| --- | --- |
|
|
61
73
|
| `MERGE_READY` | Required checks green, branch up to date — hand off to a human to merge. |
|
|
62
74
|
| `PENDING` | A Tier-A action was taken, or checks are still running — await the next tick/pass. |
|
|
75
|
+
| `INCOMPLETE` | Exact-head local review or durable convergence evidence is unavailable — fail closed and retry after evidence is restored. |
|
|
63
76
|
| `BLOCKED` | Something actionable blocks merge (failing/missing/skipped required check, conflict, behind, unresolved threads, changes requested). Read `blockers[]`. |
|
|
64
77
|
| `CI_DEAD_HEAD` | The head has no required checks running (e.g. an auto-update authored by `GITHUB_TOKEN` never re-triggered CI). Recovery is an **escalation, not an autonomous Tier-A rerun**: it needs a maintainer-provided `FORGE_PR_TOKEN` (contents + pull-requests + checks) to re-author the push so CI re-triggers. |
|
|
65
78
|
| `ESCALATE` | A Tier-C condition (conflict, unreadable required set, persistent failure, oscillation, budget exhaustion). Context is posted to the PR. |
|
|
@@ -69,8 +82,8 @@ forge shepherd events <pr> --since <seq> # only the new events since sequence
|
|
|
69
82
|
|
|
70
83
|
| Situation | Command |
|
|
71
84
|
| --- | --- |
|
|
72
|
-
| PR just opened / shipped |
|
|
73
|
-
| Session starts
|
|
85
|
+
| PR just opened / shipped | automatic singleton wake; read with `forge shepherd <pr> --pull` |
|
|
86
|
+
| Session starts with open PRs | automatic singleton wake |
|
|
74
87
|
| "Why isn't my PR merging / what's blocking it" | `forge shepherd <pr> --pull` |
|
|
75
88
|
| "Is the PR ready?" | `forge shepherd <pr> --pull` (read `MERGE_READY`) |
|
|
76
89
|
| "A check failed / went red" | `forge shepherd <pr> --pull --json` (read `failures[]`) |
|
|
@@ -95,12 +108,22 @@ forge shepherd events <pr> --since <seq> # only the new events since sequence
|
|
|
95
108
|
## Kill-switches
|
|
96
109
|
|
|
97
110
|
```bash
|
|
98
|
-
FORGE_SHEPHERD_DISABLE=1
|
|
99
|
-
forge gate disable rail.auto_shepherd
|
|
111
|
+
FORGE_SHEPHERD_DISABLE=1 # env: makes automatic firing inert
|
|
112
|
+
forge gate disable rail.auto_shepherd # config gate honored by every automatic seam
|
|
100
113
|
```
|
|
101
114
|
|
|
102
|
-
|
|
115
|
+
CI/test (`NODE_ENV=test`, `BUN_ENV=test`, `CI`, `GITHUB_ACTIONS`, or
|
|
116
|
+
`GITLAB_CI`), dry-run, uninitialized repositories, and disabled paths return
|
|
117
|
+
before lease, Kernel-state, or process work. All leave the manual
|
|
118
|
+
`forge shepherd` surface usable; they only stop automatic daemon fire.
|
|
103
119
|
|
|
104
120
|
## State
|
|
105
121
|
|
|
106
|
-
|
|
122
|
+
Public Memory is the durable monitor authority and public Flow reducers restore
|
|
123
|
+
its bounded event and watcher-process checkpoints after restart. The per-PR
|
|
124
|
+
journal under `.forge/pr-monitor/<repo>-<pr>/` remains a compatibility delivery
|
|
125
|
+
surface for `events --since`, not authority. Merged/closed evidence produces one
|
|
126
|
+
idempotent terminal MonitorReceipt; conflicting or incomplete replay fails
|
|
127
|
+
closed. For 0.1 no receipt grants continuing lease authority: live ownership is
|
|
128
|
+
re-probed at consequential boundaries, and canonical LeaseReceipt epoch/scope
|
|
129
|
+
plus the same-actor/session ABA fix remain explicitly deferred.
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"fixtures": "present",
|
|
4
4
|
"static": {
|
|
5
5
|
"token_cost": {
|
|
6
|
-
"desc_chars":
|
|
7
|
-
"body_lines":
|
|
8
|
-
"score":
|
|
6
|
+
"desc_chars": 987,
|
|
7
|
+
"body_lines": 109,
|
|
8
|
+
"score": 41
|
|
9
9
|
},
|
|
10
10
|
"caps": {
|
|
11
11
|
"desc_within": true,
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"variance": null,
|
|
38
38
|
"note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
|
|
39
39
|
},
|
|
40
|
-
"composite":
|
|
40
|
+
"composite": 82
|
|
41
41
|
}
|
package/skills/ship/SKILL.md
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ship
|
|
3
|
+
invocation: user
|
|
3
4
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
want a PR on the board. Triggers: "ship it", "ship this branch", "open the PR", "push and
|
|
8
|
-
open a PR", "gh pr create", "checks passed, now cut the PR". Runs branch-freshness +
|
|
9
|
-
parallel-PR merge-sim checks, force-with-lease push, records the ship->review handoff, then
|
|
10
|
-
stops. One stage only; not for: the whole plan->dev->validate->ship->review pipeline or
|
|
11
|
-
drive-to-done (smith); type-check/lint/tests/security first (validate); addressing PR
|
|
12
|
-
comments or resolving Greptile/SonarCloud/CodeRabbit threads on an existing PR (review);
|
|
13
|
-
babysitting an open PR toward merge (shepherd); post-merge CI health check + closing issues
|
|
14
|
-
(verify); reverting an already-shipped change (rollback). If the PR already exists, this is
|
|
15
|
-
not the skill.
|
|
5
|
+
Push a validated feature branch and open its PR from the project's template, then stop for
|
|
6
|
+
manual merge. Use only when the user asks to ship or open the PR after validation; never
|
|
7
|
+
merges, auto-merges, reviews an existing PR, or replaces end-to-end Smith.
|
|
16
8
|
allowed-tools: Bash, Read, Edit, Grep, Glob
|
|
17
9
|
next: review
|
|
18
10
|
terminal: false
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"fixtures": "present",
|
|
4
4
|
"static": {
|
|
5
5
|
"token_cost": {
|
|
6
|
-
"desc_chars":
|
|
6
|
+
"desc_chars": 254,
|
|
7
7
|
"body_lines": 237,
|
|
8
|
-
"score":
|
|
8
|
+
"score": 64
|
|
9
9
|
},
|
|
10
10
|
"caps": {
|
|
11
11
|
"desc_within": true,
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"variance": null,
|
|
38
38
|
"note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
|
|
39
39
|
},
|
|
40
|
-
"composite":
|
|
40
|
+
"composite": 89
|
|
41
41
|
}
|
package/skills/validate/SKILL.md
CHANGED
|
@@ -105,6 +105,9 @@ bun run lint # or: npm run lint, eslint ., etc.
|
|
|
105
105
|
- Best practices compliance
|
|
106
106
|
|
|
107
107
|
### Step 3: Code Review (if available)
|
|
108
|
+
|
|
109
|
+
Read `CODING_STANDARDS.md` from the repository root before invoking the reviewer so the review applies the repository's diff-level contract.
|
|
110
|
+
|
|
108
111
|
```bash
|
|
109
112
|
/code-review:code-review
|
|
110
113
|
```
|
package/skills/worktree/SKILL.md
CHANGED
|
@@ -71,7 +71,12 @@ forge clean # remove worktrees whose branches merged; FF th
|
|
|
71
71
|
forge clean --dry-run # show what would be removed, change nothing
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
`forge clean` is **squash-aware** — it detects branches that merged via squash, not just fast-forward merges.
|
|
74
|
+
`forge clean` is **squash-aware** — it detects branches that merged via squash, not just fast-forward merges. Removing a merged worktree also closes the kernel issue the branch was linked to, citing the merge as evidence.
|
|
75
|
+
|
|
76
|
+
Two things it will never touch, because closing an issue is irreversible (`done` is terminal):
|
|
77
|
+
|
|
78
|
+
- **A branch with no commits of its own.** A freshly created worktree points at a default-branch commit, which git alone reads as "merged". That is unstarted work — it is kept, and its issue stays open.
|
|
79
|
+
- **A worktree it skipped.** Uncommitted changes hold a worktree back, and a held-back worktree never has its issue closed.
|
|
75
80
|
|
|
76
81
|
### `forge clean` footguns
|
|
77
82
|
|