bigpowers 2.7.3 → 2.7.4
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/.pi/package.json +1 -1
- package/.pi/prompts/commit-message.md +2 -1
- package/.pi/prompts/release-branch.md +41 -2
- package/.pi/prompts/session-state.md +15 -16
- package/.pi/prompts/stocktake-skills.md +5 -4
- package/.pi/skills/commit-message/SKILL.md +2 -1
- package/.pi/skills/release-branch/SKILL.md +41 -2
- package/.pi/skills/session-state/SKILL.md +15 -16
- package/.pi/skills/stocktake-skills/SKILL.md +5 -4
- package/CHANGELOG.md +7 -0
- package/SKILL-INDEX.md +1 -1
- package/commit-message/SKILL.md +2 -1
- package/package.json +1 -1
- package/release-branch/SKILL.md +41 -2
- package/session-state/SKILL.md +15 -16
- package/skills-lock.json +4 -4
- package/stocktake-skills/SKILL.md +5 -4
package/.pi/package.json
CHANGED
|
@@ -25,7 +25,8 @@ description: Reviews working-tree changes, then drafts a Conventional Commits ti
|
|
|
25
25
|
3. **Classify for semantic release** — `fix` → patch, `feat` → minor, **breaking** → major.
|
|
26
26
|
4. **Write the message** — `type(optional-scope)!: description` (see [REFERENCE.md](REFERENCE.md#message-format)). Use `!` or a `BREAKING CHANGE:` footer when behavior contracts change.
|
|
27
27
|
5. **Note defensive-code categories touched** — from CONVENTIONS.md: Rate limit | Retry with backoff | Circuit breaker | Timeout | Graceful degradation
|
|
28
|
-
6. **
|
|
28
|
+
6. **Note fix-ratio contribution** — Each `fix:` commit counts toward `metrics.commit_ratio.fix` in `specs/state.yaml`. After `release-branch`, `session-state` recalculates the ratio automatically. A high fix rate (>30%) triggers a deploy + smoke-test suggestion.
|
|
29
|
+
7. **Deliver** — Output:
|
|
29
30
|
- Proposed **full commit message** (title + optional body + footers).
|
|
30
31
|
- **Release bump** this commit would drive: `patch` | `minor` | `major` | `none`.
|
|
31
32
|
- Optional `git add …` and `git commit -m` instructions; do **not** run destructive git commands unless the user asked.
|
|
@@ -19,11 +19,13 @@ Read `specs/state.yaml` key `workflow_mode` first (`team-pr` | `solo-git`). Fall
|
|
|
19
19
|
|
|
20
20
|
| Mode | When | Ship path |
|
|
21
21
|
|------|------|-----------|
|
|
22
|
-
| **solo-local** | `workflow_mode: solo-git` (or `profiles/solo-git.md` present as fallback) | `
|
|
22
|
+
| **solo-local** | `workflow_mode: solo-git` (or `profiles/solo-git.md` present as fallback) | Auto-detect: if `scripts/land-branch.sh` exists → use it; else → fallback (see Step 5) |
|
|
23
23
|
| **team-pr** | `workflow_mode: team-pr` (default) | `gh pr create` → `gh pr merge --squash` |
|
|
24
24
|
|
|
25
25
|
If unsure and working alone, prefer **solo-local**.
|
|
26
26
|
|
|
27
|
+
> **Auto-detect note:** The solo-local path first checks if `scripts/land-branch.sh` exists and is executable. If present, the script handles the full squash-merge workflow. If absent, the built-in fallback sequence runs instead.
|
|
28
|
+
|
|
27
29
|
## Process
|
|
28
30
|
|
|
29
31
|
### 1. Final verification
|
|
@@ -49,11 +51,42 @@ Options: **Release (solo-local)** / **Open PR** / **Keep branch** / **Discard**
|
|
|
49
51
|
|
|
50
52
|
### 5. Solo-local integrate
|
|
51
53
|
|
|
52
|
-
Run `commit-message` to produce the squash commit subject
|
|
54
|
+
Run `commit-message` to produce the squash commit subject. Then auto-detect the integration path:
|
|
55
|
+
|
|
56
|
+
**Path A — `scripts/land-branch.sh` exists (happy path):**
|
|
53
57
|
```bash
|
|
54
58
|
bash scripts/land-branch.sh <task-slug> "feat(scope): description"
|
|
55
59
|
```
|
|
56
60
|
|
|
61
|
+
**Path B — `scripts/land-branch.sh` missing (fallback):**
|
|
62
|
+
```bash
|
|
63
|
+
# Fallback: manual squash-merge when land-branch.sh is absent
|
|
64
|
+
FEATURE_BRANCH=<task-slug>
|
|
65
|
+
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo main)
|
|
66
|
+
|
|
67
|
+
# Ensure we're on the feature branch
|
|
68
|
+
if [ "$(git branch --show-current)" != "$FEATURE_BRANCH" ]; then
|
|
69
|
+
git checkout "$FEATURE_BRANCH"
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
# Checkout default branch and update
|
|
73
|
+
git checkout "$DEFAULT_BRANCH"
|
|
74
|
+
git pull --rebase origin "$DEFAULT_BRANCH" 2>/dev/null || git pull origin "$DEFAULT_BRANCH"
|
|
75
|
+
|
|
76
|
+
# Squash-merge the feature branch
|
|
77
|
+
git merge --no-ff "$FEATURE_BRANCH" -m "<conventional-commit-message>"
|
|
78
|
+
|
|
79
|
+
# Push
|
|
80
|
+
git push origin "$DEFAULT_BRANCH"
|
|
81
|
+
|
|
82
|
+
# Clean up local feature branch
|
|
83
|
+
git branch -d "$FEATURE_BRANCH"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Report which path was taken.** Print exactly:
|
|
87
|
+
- `"used land-branch.sh"` if Path A
|
|
88
|
+
- `"used fallback merge (land-branch.sh not found)"` if Path B
|
|
89
|
+
|
|
57
90
|
### 6. Create PR (team-pr only)
|
|
58
91
|
|
|
59
92
|
See [REFERENCE.md](REFERENCE.md) for the full PR body template and gh commands.
|
|
@@ -94,6 +127,12 @@ git checkout main && git status && pwd
|
|
|
94
127
|
|
|
95
128
|
Report: "Branch released. Integrate mode: <solo-local|team-pr>. cwd: $(pwd) on $(git branch --show-current)."
|
|
96
129
|
|
|
130
|
+
## Solo-local fallback detail
|
|
131
|
+
|
|
132
|
+
The fallback sequence (Path B above) handles the "remote has moved" case with `git pull --rebase`. Use when `scripts/land-branch.sh` is absent.
|
|
133
|
+
|
|
134
|
+
**Acceptance:** When fallback runs, main is updated, feature branch is deleted locally, and output states `"used fallback merge (land-branch.sh not found)"`.
|
|
135
|
+
|
|
97
136
|
## Handoff
|
|
98
137
|
|
|
99
138
|
Gate: READY -> next: survey-context
|
|
@@ -69,30 +69,19 @@ Whenever a significant decision is made or a milestone is reached:
|
|
|
69
69
|
|
|
70
70
|
## State Write-Lock Protocol
|
|
71
71
|
|
|
72
|
-
> **HARD GATE** —
|
|
72
|
+
> **HARD GATE** — Lock `specs/state.yaml.lock` before writes; stale (>60s) may be force-released.
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
2. If it exists, read the agent ID and timestamp inside.
|
|
78
|
-
3. If the lock is stale (>60s old), remove it and proceed.
|
|
79
|
-
4. If the lock is fresh (<60s), wait 2s and retry (max 15 attempts = 30s).
|
|
80
|
-
5. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to `specs/state.yaml.lock`.
|
|
81
|
-
|
|
82
|
-
### Release
|
|
83
|
-
|
|
84
|
-
1. After the write to `state.yaml` or `execution-status.yaml` completes:
|
|
85
|
-
2. `rm specs/state.yaml.lock`
|
|
86
|
-
|
|
87
|
-
### Lock format (`specs/state.yaml.lock`)
|
|
74
|
+
1. Check lock exists. If fresh (<60s), wait 2s retry (max 15). Stale → remove.
|
|
75
|
+
2. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to lock.
|
|
76
|
+
3. After write, `rm specs/state.yaml.lock`.
|
|
88
77
|
|
|
78
|
+
Lock format:
|
|
89
79
|
```yaml
|
|
90
80
|
agent_id: session-state
|
|
91
81
|
acquired_at: "2026-06-11T14:30:00Z"
|
|
92
82
|
```
|
|
93
83
|
|
|
94
84
|
|
|
95
|
-
|
|
96
85
|
## Operations
|
|
97
86
|
|
|
98
87
|
### show-state (absorbed)
|
|
@@ -139,6 +128,16 @@ handoff:
|
|
|
139
128
|
next_skill: survey-context
|
|
140
129
|
```
|
|
141
130
|
|
|
131
|
+
## Tracking commit ratio
|
|
132
|
+
|
|
133
|
+
After `release-branch` lands, compute fix-to-feature ratio via:
|
|
134
|
+
```bash
|
|
135
|
+
FEAT_COUNT=$(git log main --oneline --grep="^feat" | wc -l | tr -d ' ')
|
|
136
|
+
FIX_COUNT=$(git log main --oneline --grep="^fix" | wc -l | tr -d ' ')
|
|
137
|
+
FIX_PCT=$((FIX_COUNT * 100 / (FEAT_COUNT + FIX_COUNT)))
|
|
138
|
+
```
|
|
139
|
+
Update `specs/state.yaml` `metrics.commit_ratio` with counts. If `fix_pct > 30%`, emit: `"High fix rate (N%) — deploy + smoke-test recommended"`.
|
|
140
|
+
|
|
142
141
|
## Anti-Patterns
|
|
143
142
|
|
|
144
143
|
- **Duplicate Plan**: Don't copy `release-plan.yaml` or epic shards into `state.yaml`.
|
|
@@ -14,13 +14,14 @@ Audit SKILL.md catalog for drift, stale triggers, missing HARD GATEs, and INDEX
|
|
|
14
14
|
| Mode | Scope |
|
|
15
15
|
|------|-------|
|
|
16
16
|
| **Quick Scan** | Skills changed since last tag or in current diff |
|
|
17
|
-
| **Full** | All
|
|
17
|
+
| **Full** | All 62 skills per SKILL-INDEX.md + catalog audit |
|
|
18
18
|
|
|
19
19
|
## Process
|
|
20
20
|
|
|
21
|
-
1. Run
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
21
|
+
1. Run `bash scripts/audit-catalog.sh` to verify pi/skills ↔ source SKILL.md sync. Mismatch is a critical finding.
|
|
22
|
+
2. Run mode; for each skill check: exists, verb-noun, <300 lines total, HARD GATE present, INDEX row matches.
|
|
23
|
+
3. Write `specs/STOCKTAKE-<date>.md` with findings table (skill, issue, severity).
|
|
24
|
+
4. Critical findings → `plan-work` story; cosmetic → `evolve-skill` candidate.
|
|
24
25
|
|
|
25
26
|
## Verify
|
|
26
27
|
|
|
@@ -27,7 +27,8 @@ model: haiku
|
|
|
27
27
|
3. **Classify for semantic release** — `fix` → patch, `feat` → minor, **breaking** → major.
|
|
28
28
|
4. **Write the message** — `type(optional-scope)!: description` (see [REFERENCE.md](REFERENCE.md#message-format)). Use `!` or a `BREAKING CHANGE:` footer when behavior contracts change.
|
|
29
29
|
5. **Note defensive-code categories touched** — from CONVENTIONS.md: Rate limit | Retry with backoff | Circuit breaker | Timeout | Graceful degradation
|
|
30
|
-
6. **
|
|
30
|
+
6. **Note fix-ratio contribution** — Each `fix:` commit counts toward `metrics.commit_ratio.fix` in `specs/state.yaml`. After `release-branch`, `session-state` recalculates the ratio automatically. A high fix rate (>30%) triggers a deploy + smoke-test suggestion.
|
|
31
|
+
7. **Deliver** — Output:
|
|
31
32
|
- Proposed **full commit message** (title + optional body + footers).
|
|
32
33
|
- **Release bump** this commit would drive: `patch` | `minor` | `major` | `none`.
|
|
33
34
|
- Optional `git add …` and `git commit -m` instructions; do **not** run destructive git commands unless the user asked.
|
|
@@ -21,11 +21,13 @@ Read `specs/state.yaml` key `workflow_mode` first (`team-pr` | `solo-git`). Fall
|
|
|
21
21
|
|
|
22
22
|
| Mode | When | Ship path |
|
|
23
23
|
|------|------|-----------|
|
|
24
|
-
| **solo-local** | `workflow_mode: solo-git` (or `profiles/solo-git.md` present as fallback) | `
|
|
24
|
+
| **solo-local** | `workflow_mode: solo-git` (or `profiles/solo-git.md` present as fallback) | Auto-detect: if `scripts/land-branch.sh` exists → use it; else → fallback (see Step 5) |
|
|
25
25
|
| **team-pr** | `workflow_mode: team-pr` (default) | `gh pr create` → `gh pr merge --squash` |
|
|
26
26
|
|
|
27
27
|
If unsure and working alone, prefer **solo-local**.
|
|
28
28
|
|
|
29
|
+
> **Auto-detect note:** The solo-local path first checks if `scripts/land-branch.sh` exists and is executable. If present, the script handles the full squash-merge workflow. If absent, the built-in fallback sequence runs instead.
|
|
30
|
+
|
|
29
31
|
## Process
|
|
30
32
|
|
|
31
33
|
### 1. Final verification
|
|
@@ -51,11 +53,42 @@ Options: **Release (solo-local)** / **Open PR** / **Keep branch** / **Discard**
|
|
|
51
53
|
|
|
52
54
|
### 5. Solo-local integrate
|
|
53
55
|
|
|
54
|
-
Run `commit-message` to produce the squash commit subject
|
|
56
|
+
Run `commit-message` to produce the squash commit subject. Then auto-detect the integration path:
|
|
57
|
+
|
|
58
|
+
**Path A — `scripts/land-branch.sh` exists (happy path):**
|
|
55
59
|
```bash
|
|
56
60
|
bash scripts/land-branch.sh <task-slug> "feat(scope): description"
|
|
57
61
|
```
|
|
58
62
|
|
|
63
|
+
**Path B — `scripts/land-branch.sh` missing (fallback):**
|
|
64
|
+
```bash
|
|
65
|
+
# Fallback: manual squash-merge when land-branch.sh is absent
|
|
66
|
+
FEATURE_BRANCH=<task-slug>
|
|
67
|
+
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo main)
|
|
68
|
+
|
|
69
|
+
# Ensure we're on the feature branch
|
|
70
|
+
if [ "$(git branch --show-current)" != "$FEATURE_BRANCH" ]; then
|
|
71
|
+
git checkout "$FEATURE_BRANCH"
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
# Checkout default branch and update
|
|
75
|
+
git checkout "$DEFAULT_BRANCH"
|
|
76
|
+
git pull --rebase origin "$DEFAULT_BRANCH" 2>/dev/null || git pull origin "$DEFAULT_BRANCH"
|
|
77
|
+
|
|
78
|
+
# Squash-merge the feature branch
|
|
79
|
+
git merge --no-ff "$FEATURE_BRANCH" -m "<conventional-commit-message>"
|
|
80
|
+
|
|
81
|
+
# Push
|
|
82
|
+
git push origin "$DEFAULT_BRANCH"
|
|
83
|
+
|
|
84
|
+
# Clean up local feature branch
|
|
85
|
+
git branch -d "$FEATURE_BRANCH"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Report which path was taken.** Print exactly:
|
|
89
|
+
- `"used land-branch.sh"` if Path A
|
|
90
|
+
- `"used fallback merge (land-branch.sh not found)"` if Path B
|
|
91
|
+
|
|
59
92
|
### 6. Create PR (team-pr only)
|
|
60
93
|
|
|
61
94
|
See [REFERENCE.md](REFERENCE.md) for the full PR body template and gh commands.
|
|
@@ -96,6 +129,12 @@ git checkout main && git status && pwd
|
|
|
96
129
|
|
|
97
130
|
Report: "Branch released. Integrate mode: <solo-local|team-pr>. cwd: $(pwd) on $(git branch --show-current)."
|
|
98
131
|
|
|
132
|
+
## Solo-local fallback detail
|
|
133
|
+
|
|
134
|
+
The fallback sequence (Path B above) handles the "remote has moved" case with `git pull --rebase`. Use when `scripts/land-branch.sh` is absent.
|
|
135
|
+
|
|
136
|
+
**Acceptance:** When fallback runs, main is updated, feature branch is deleted locally, and output states `"used fallback merge (land-branch.sh not found)"`.
|
|
137
|
+
|
|
99
138
|
## Handoff
|
|
100
139
|
|
|
101
140
|
Gate: READY -> next: survey-context
|
|
@@ -71,30 +71,19 @@ Whenever a significant decision is made or a milestone is reached:
|
|
|
71
71
|
|
|
72
72
|
## State Write-Lock Protocol
|
|
73
73
|
|
|
74
|
-
> **HARD GATE** —
|
|
74
|
+
> **HARD GATE** — Lock `specs/state.yaml.lock` before writes; stale (>60s) may be force-released.
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
2. If it exists, read the agent ID and timestamp inside.
|
|
80
|
-
3. If the lock is stale (>60s old), remove it and proceed.
|
|
81
|
-
4. If the lock is fresh (<60s), wait 2s and retry (max 15 attempts = 30s).
|
|
82
|
-
5. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to `specs/state.yaml.lock`.
|
|
83
|
-
|
|
84
|
-
### Release
|
|
85
|
-
|
|
86
|
-
1. After the write to `state.yaml` or `execution-status.yaml` completes:
|
|
87
|
-
2. `rm specs/state.yaml.lock`
|
|
88
|
-
|
|
89
|
-
### Lock format (`specs/state.yaml.lock`)
|
|
76
|
+
1. Check lock exists. If fresh (<60s), wait 2s retry (max 15). Stale → remove.
|
|
77
|
+
2. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to lock.
|
|
78
|
+
3. After write, `rm specs/state.yaml.lock`.
|
|
90
79
|
|
|
80
|
+
Lock format:
|
|
91
81
|
```yaml
|
|
92
82
|
agent_id: session-state
|
|
93
83
|
acquired_at: "2026-06-11T14:30:00Z"
|
|
94
84
|
```
|
|
95
85
|
|
|
96
86
|
|
|
97
|
-
|
|
98
87
|
## Operations
|
|
99
88
|
|
|
100
89
|
### show-state (absorbed)
|
|
@@ -141,6 +130,16 @@ handoff:
|
|
|
141
130
|
next_skill: survey-context
|
|
142
131
|
```
|
|
143
132
|
|
|
133
|
+
## Tracking commit ratio
|
|
134
|
+
|
|
135
|
+
After `release-branch` lands, compute fix-to-feature ratio via:
|
|
136
|
+
```bash
|
|
137
|
+
FEAT_COUNT=$(git log main --oneline --grep="^feat" | wc -l | tr -d ' ')
|
|
138
|
+
FIX_COUNT=$(git log main --oneline --grep="^fix" | wc -l | tr -d ' ')
|
|
139
|
+
FIX_PCT=$((FIX_COUNT * 100 / (FEAT_COUNT + FIX_COUNT)))
|
|
140
|
+
```
|
|
141
|
+
Update `specs/state.yaml` `metrics.commit_ratio` with counts. If `fix_pct > 30%`, emit: `"High fix rate (N%) — deploy + smoke-test recommended"`.
|
|
142
|
+
|
|
144
143
|
## Anti-Patterns
|
|
145
144
|
|
|
146
145
|
- **Duplicate Plan**: Don't copy `release-plan.yaml` or epic shards into `state.yaml`.
|
|
@@ -16,13 +16,14 @@ Audit SKILL.md catalog for drift, stale triggers, missing HARD GATEs, and INDEX
|
|
|
16
16
|
| Mode | Scope |
|
|
17
17
|
|------|-------|
|
|
18
18
|
| **Quick Scan** | Skills changed since last tag or in current diff |
|
|
19
|
-
| **Full** | All
|
|
19
|
+
| **Full** | All 62 skills per SKILL-INDEX.md + catalog audit |
|
|
20
20
|
|
|
21
21
|
## Process
|
|
22
22
|
|
|
23
|
-
1. Run
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
23
|
+
1. Run `bash scripts/audit-catalog.sh` to verify pi/skills ↔ source SKILL.md sync. Mismatch is a critical finding.
|
|
24
|
+
2. Run mode; for each skill check: exists, verb-noun, <300 lines total, HARD GATE present, INDEX row matches.
|
|
25
|
+
3. Write `specs/STOCKTAKE-<date>.md` with findings table (skill, issue, severity).
|
|
26
|
+
4. Critical findings → `plan-work` story; cosmetic → `evolve-skill` candidate.
|
|
26
27
|
|
|
27
28
|
## Verify
|
|
28
29
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.7.4](https://github.com/danielvm-git/bigpowers/compare/v2.7.3...v2.7.4) (2026-06-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **skills:** apply e14 changes at source level, fix doctrine checks ([daad805](https://github.com/danielvm-git/bigpowers/commit/daad8054a15d55b433ea1d39b1bd2650ceb9a62a)), closes [hi#fix-rate](https://github.com/hi/issues/fix-rate)
|
|
7
|
+
|
|
1
8
|
## [2.7.3](https://github.com/danielvm-git/bigpowers/compare/v2.7.2...v2.7.3) (2026-06-20)
|
|
2
9
|
|
|
3
10
|
|
package/SKILL-INDEX.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> **DO NOT EDIT** — This file is auto-generated by `scripts/generate-skill-index.sh`.
|
|
4
4
|
> Edit `SKILL.md` source files or `skills-lock.json` instead. Run `bash scripts/sync-skills.sh` to regenerate.
|
|
5
5
|
|
|
6
|
-
**Generated:** 2026-06-20T19:
|
|
6
|
+
**Generated:** 2026-06-20T19:29:29Z
|
|
7
7
|
**Skills:** 62
|
|
8
8
|
|
|
9
9
|
---
|
package/commit-message/SKILL.md
CHANGED
|
@@ -26,7 +26,8 @@ description: Reviews working-tree changes, then drafts a Conventional Commits ti
|
|
|
26
26
|
3. **Classify for semantic release** — `fix` → patch, `feat` → minor, **breaking** → major.
|
|
27
27
|
4. **Write the message** — `type(optional-scope)!: description` (see [REFERENCE.md](REFERENCE.md#message-format)). Use `!` or a `BREAKING CHANGE:` footer when behavior contracts change.
|
|
28
28
|
5. **Note defensive-code categories touched** — from CONVENTIONS.md: Rate limit | Retry with backoff | Circuit breaker | Timeout | Graceful degradation
|
|
29
|
-
6. **
|
|
29
|
+
6. **Note fix-ratio contribution** — Each `fix:` commit counts toward `metrics.commit_ratio.fix` in `specs/state.yaml`. After `release-branch`, `session-state` recalculates the ratio automatically. A high fix rate (>30%) triggers a deploy + smoke-test suggestion.
|
|
30
|
+
7. **Deliver** — Output:
|
|
30
31
|
- Proposed **full commit message** (title + optional body + footers).
|
|
31
32
|
- **Release bump** this commit would drive: `patch` | `minor` | `major` | `none`.
|
|
32
33
|
- Optional `git add …` and `git commit -m` instructions; do **not** run destructive git commands unless the user asked.
|
package/package.json
CHANGED
package/release-branch/SKILL.md
CHANGED
|
@@ -20,11 +20,13 @@ Read `specs/state.yaml` key `workflow_mode` first (`team-pr` | `solo-git`). Fall
|
|
|
20
20
|
|
|
21
21
|
| Mode | When | Ship path |
|
|
22
22
|
|------|------|-----------|
|
|
23
|
-
| **solo-local** | `workflow_mode: solo-git` (or `profiles/solo-git.md` present as fallback) | `
|
|
23
|
+
| **solo-local** | `workflow_mode: solo-git` (or `profiles/solo-git.md` present as fallback) | Auto-detect: if `scripts/land-branch.sh` exists → use it; else → fallback (see Step 5) |
|
|
24
24
|
| **team-pr** | `workflow_mode: team-pr` (default) | `gh pr create` → `gh pr merge --squash` |
|
|
25
25
|
|
|
26
26
|
If unsure and working alone, prefer **solo-local**.
|
|
27
27
|
|
|
28
|
+
> **Auto-detect note:** The solo-local path first checks if `scripts/land-branch.sh` exists and is executable. If present, the script handles the full squash-merge workflow. If absent, the built-in fallback sequence runs instead.
|
|
29
|
+
|
|
28
30
|
## Process
|
|
29
31
|
|
|
30
32
|
### 1. Final verification
|
|
@@ -50,11 +52,42 @@ Options: **Release (solo-local)** / **Open PR** / **Keep branch** / **Discard**
|
|
|
50
52
|
|
|
51
53
|
### 5. Solo-local integrate
|
|
52
54
|
|
|
53
|
-
Run `commit-message` to produce the squash commit subject
|
|
55
|
+
Run `commit-message` to produce the squash commit subject. Then auto-detect the integration path:
|
|
56
|
+
|
|
57
|
+
**Path A — `scripts/land-branch.sh` exists (happy path):**
|
|
54
58
|
```bash
|
|
55
59
|
bash scripts/land-branch.sh <task-slug> "feat(scope): description"
|
|
56
60
|
```
|
|
57
61
|
|
|
62
|
+
**Path B — `scripts/land-branch.sh` missing (fallback):**
|
|
63
|
+
```bash
|
|
64
|
+
# Fallback: manual squash-merge when land-branch.sh is absent
|
|
65
|
+
FEATURE_BRANCH=<task-slug>
|
|
66
|
+
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo main)
|
|
67
|
+
|
|
68
|
+
# Ensure we're on the feature branch
|
|
69
|
+
if [ "$(git branch --show-current)" != "$FEATURE_BRANCH" ]; then
|
|
70
|
+
git checkout "$FEATURE_BRANCH"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Checkout default branch and update
|
|
74
|
+
git checkout "$DEFAULT_BRANCH"
|
|
75
|
+
git pull --rebase origin "$DEFAULT_BRANCH" 2>/dev/null || git pull origin "$DEFAULT_BRANCH"
|
|
76
|
+
|
|
77
|
+
# Squash-merge the feature branch
|
|
78
|
+
git merge --no-ff "$FEATURE_BRANCH" -m "<conventional-commit-message>"
|
|
79
|
+
|
|
80
|
+
# Push
|
|
81
|
+
git push origin "$DEFAULT_BRANCH"
|
|
82
|
+
|
|
83
|
+
# Clean up local feature branch
|
|
84
|
+
git branch -d "$FEATURE_BRANCH"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Report which path was taken.** Print exactly:
|
|
88
|
+
- `"used land-branch.sh"` if Path A
|
|
89
|
+
- `"used fallback merge (land-branch.sh not found)"` if Path B
|
|
90
|
+
|
|
58
91
|
### 6. Create PR (team-pr only)
|
|
59
92
|
|
|
60
93
|
See [REFERENCE.md](REFERENCE.md) for the full PR body template and gh commands.
|
|
@@ -95,6 +128,12 @@ git checkout main && git status && pwd
|
|
|
95
128
|
|
|
96
129
|
Report: "Branch released. Integrate mode: <solo-local|team-pr>. cwd: $(pwd) on $(git branch --show-current)."
|
|
97
130
|
|
|
131
|
+
## Solo-local fallback detail
|
|
132
|
+
|
|
133
|
+
The fallback sequence (Path B above) handles the "remote has moved" case with `git pull --rebase`. Use when `scripts/land-branch.sh` is absent.
|
|
134
|
+
|
|
135
|
+
**Acceptance:** When fallback runs, main is updated, feature branch is deleted locally, and output states `"used fallback merge (land-branch.sh not found)"`.
|
|
136
|
+
|
|
98
137
|
## Handoff
|
|
99
138
|
|
|
100
139
|
Gate: READY -> next: survey-context
|
package/session-state/SKILL.md
CHANGED
|
@@ -70,30 +70,19 @@ Whenever a significant decision is made or a milestone is reached:
|
|
|
70
70
|
|
|
71
71
|
## State Write-Lock Protocol
|
|
72
72
|
|
|
73
|
-
> **HARD GATE** —
|
|
73
|
+
> **HARD GATE** — Lock `specs/state.yaml.lock` before writes; stale (>60s) may be force-released.
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
2. If it exists, read the agent ID and timestamp inside.
|
|
79
|
-
3. If the lock is stale (>60s old), remove it and proceed.
|
|
80
|
-
4. If the lock is fresh (<60s), wait 2s and retry (max 15 attempts = 30s).
|
|
81
|
-
5. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to `specs/state.yaml.lock`.
|
|
82
|
-
|
|
83
|
-
### Release
|
|
84
|
-
|
|
85
|
-
1. After the write to `state.yaml` or `execution-status.yaml` completes:
|
|
86
|
-
2. `rm specs/state.yaml.lock`
|
|
87
|
-
|
|
88
|
-
### Lock format (`specs/state.yaml.lock`)
|
|
75
|
+
1. Check lock exists. If fresh (<60s), wait 2s retry (max 15). Stale → remove.
|
|
76
|
+
2. Write `agent_id: <name>\nacquired_at: <ISO-8601>` to lock.
|
|
77
|
+
3. After write, `rm specs/state.yaml.lock`.
|
|
89
78
|
|
|
79
|
+
Lock format:
|
|
90
80
|
```yaml
|
|
91
81
|
agent_id: session-state
|
|
92
82
|
acquired_at: "2026-06-11T14:30:00Z"
|
|
93
83
|
```
|
|
94
84
|
|
|
95
85
|
|
|
96
|
-
|
|
97
86
|
## Operations
|
|
98
87
|
|
|
99
88
|
### show-state (absorbed)
|
|
@@ -140,6 +129,16 @@ handoff:
|
|
|
140
129
|
next_skill: survey-context
|
|
141
130
|
```
|
|
142
131
|
|
|
132
|
+
## Tracking commit ratio
|
|
133
|
+
|
|
134
|
+
After `release-branch` lands, compute fix-to-feature ratio via:
|
|
135
|
+
```bash
|
|
136
|
+
FEAT_COUNT=$(git log main --oneline --grep="^feat" | wc -l | tr -d ' ')
|
|
137
|
+
FIX_COUNT=$(git log main --oneline --grep="^fix" | wc -l | tr -d ' ')
|
|
138
|
+
FIX_PCT=$((FIX_COUNT * 100 / (FEAT_COUNT + FIX_COUNT)))
|
|
139
|
+
```
|
|
140
|
+
Update `specs/state.yaml` `metrics.commit_ratio` with counts. If `fix_pct > 30%`, emit: `"High fix rate (N%) — deploy + smoke-test recommended"`.
|
|
141
|
+
|
|
143
142
|
## Anti-Patterns
|
|
144
143
|
|
|
145
144
|
- **Duplicate Plan**: Don't copy `release-plan.yaml` or epic shards into `state.yaml`.
|
package/skills-lock.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"commit-message": {
|
|
30
30
|
"description": "Reviews working-tree changes, then drafts a Conventional Commits title/body and states the semantic-release version bump a single such commit would imply. Also notes which defensive-code categories were touched. Use when the user wants to commit recent work, prepare a Conventional Commits message, or asks for semantic-release / semver-consistent messaging before git commit.",
|
|
31
|
-
"sha256": "
|
|
31
|
+
"sha256": "aeb104cdbd19b73e",
|
|
32
32
|
"path": "commit-message/SKILL.md"
|
|
33
33
|
},
|
|
34
34
|
"compose-workflow": {
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
},
|
|
189
189
|
"release-branch": {
|
|
190
190
|
"description": "Make the merge/PR/keep/discard decision for a feature branch, verify coverage gates, create the PR with gh, and clean up the worktree. Use when a feature is done and ready to ship, or when user says \"release\", \"merge\", or \"open a PR\".",
|
|
191
|
-
"sha256": "
|
|
191
|
+
"sha256": "70fc37ac4e22143d",
|
|
192
192
|
"path": "release-branch/SKILL.md"
|
|
193
193
|
},
|
|
194
194
|
"request-review": {
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
},
|
|
239
239
|
"session-state": {
|
|
240
240
|
"description": "Track implementation decisions and progress in specs/state.yaml to prevent context rot. Use at the start of a session to load context, and whenever a significant decision is made or a milestone is reached.",
|
|
241
|
-
"sha256": "
|
|
241
|
+
"sha256": "5ac473ace06c72b1",
|
|
242
242
|
"path": "session-state/SKILL.md"
|
|
243
243
|
},
|
|
244
244
|
"setup-environment": {
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
},
|
|
264
264
|
"stocktake-skills": {
|
|
265
265
|
"description": "Sequential subagent batch audit of the bigpowers skill catalog — Quick Scan (changed only) or Full (all skills). Use during sustain phase, before a major release, or when catalog drift is suspected.",
|
|
266
|
-
"sha256": "
|
|
266
|
+
"sha256": "84a4cba67602028f",
|
|
267
267
|
"path": "stocktake-skills/SKILL.md"
|
|
268
268
|
},
|
|
269
269
|
"survey-context": {
|
|
@@ -15,13 +15,14 @@ Audit SKILL.md catalog for drift, stale triggers, missing HARD GATEs, and INDEX
|
|
|
15
15
|
| Mode | Scope |
|
|
16
16
|
|------|-------|
|
|
17
17
|
| **Quick Scan** | Skills changed since last tag or in current diff |
|
|
18
|
-
| **Full** | All
|
|
18
|
+
| **Full** | All 62 skills per SKILL-INDEX.md + catalog audit |
|
|
19
19
|
|
|
20
20
|
## Process
|
|
21
21
|
|
|
22
|
-
1. Run
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
22
|
+
1. Run `bash scripts/audit-catalog.sh` to verify pi/skills ↔ source SKILL.md sync. Mismatch is a critical finding.
|
|
23
|
+
2. Run mode; for each skill check: exists, verb-noun, <300 lines total, HARD GATE present, INDEX row matches.
|
|
24
|
+
3. Write `specs/STOCKTAKE-<date>.md` with findings table (skill, issue, severity).
|
|
25
|
+
4. Critical findings → `plan-work` story; cosmetic → `evolve-skill` candidate.
|
|
25
26
|
|
|
26
27
|
## Verify
|
|
27
28
|
|