incitaciones 0.2.0 → 0.3.0
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/README.md +57 -0
- package/content/distilled/close/SKILL.md +67 -0
- package/content/distilled/create-issues/SKILL.md +10 -0
- package/content/distilled/issue-review/SKILL.md +5 -4
- package/content/distilled/issue-review/references/pass-0-preflight.md +37 -0
- package/content/distilled/next/SKILL.md +54 -0
- package/content/distilled/park/SKILL.md +97 -0
- package/content/distilled/renew/SKILL.md +163 -0
- package/content/distilled/whisper/SKILL.md +83 -0
- package/content/distilled/whisper/references/check.md +33 -0
- package/content/distilled/whisper/references/decommission.md +53 -0
- package/content/distilled/whisper/references/init.md +103 -0
- package/content/distilled/whisper/references/link.md +70 -0
- package/content/distilled/whisper/references/status.md +49 -0
- package/content/manifest.json +101 -3
- package/package.json +2 -1
- package/pi-package/prompts/close.md +10 -0
- package/pi-package/prompts/next.md +10 -0
- package/pi-package/prompts/park.md +10 -0
- package/pi-package/prompts/renew.md +10 -0
- package/pi-package/prompts/whisper.md +10 -0
- package/pi-package/skills/close/SKILL.md +73 -0
- package/pi-package/skills/create-issues/SKILL.md +10 -0
- package/pi-package/skills/issue-review/SKILL.md +5 -4
- package/pi-package/skills/issue-review/references/pass-0-preflight.md +37 -0
- package/pi-package/skills/next/SKILL.md +60 -0
- package/pi-package/skills/park/SKILL.md +103 -0
- package/pi-package/skills/renew/SKILL.md +169 -0
- package/pi-package/skills/whisper/SKILL.md +89 -0
- package/pi-package/skills/whisper/references/check.md +33 -0
- package/pi-package/skills/whisper/references/decommission.md +53 -0
- package/pi-package/skills/whisper/references/init.md +103 -0
- package/pi-package/skills/whisper/references/link.md +70 -0
- package/pi-package/skills/whisper/references/status.md +49 -0
- package/scripts/generate-pi-resources.mjs +122 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: next
|
|
3
|
+
description: "Rapid session snapshot to ~/.whisper/ — no full close ceremony. Fast stash for later resumption via /renew"
|
|
4
|
+
metadata:
|
|
5
|
+
installed-from: "incitaciones"
|
|
6
|
+
---
|
|
7
|
+
---
|
|
8
|
+
name: next
|
|
9
|
+
description: "Rapid session snapshot to ~/.whisper/ — no full close ceremony. Trigger when the user says '/next', 'snap', 'quick save', 'stash session', or 'moving on'."
|
|
10
|
+
tools: Read, Write, Edit, Bash
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Next
|
|
14
|
+
|
|
15
|
+
Snapshot the current session to `~/.whisper/` and move on. Fast — no project file updates, no inbox triage, no ticket operations. Pure stash.
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
1. Get timestamp: `date +%Y-%m-%d` and `date +%H:%M`.
|
|
20
|
+
|
|
21
|
+
2. Detect repo and branch:
|
|
22
|
+
```bash
|
|
23
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
24
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
25
|
+
branch_slug=$(echo "$branch" | sed 's|/|--|g')
|
|
26
|
+
notes_path=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"/notes.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. If `~/.whisper/` doesn't exist or the branch slot doesn't exist, run `/w check` first (which will offer to init). If the user declines, skip and warn.
|
|
30
|
+
|
|
31
|
+
4. Scan the last portion of the conversation and write a 2–5 bullet snapshot:
|
|
32
|
+
- What was worked on (files, topics)
|
|
33
|
+
- Key decisions or changes made
|
|
34
|
+
- **Next:** the most logical continuation point
|
|
35
|
+
|
|
36
|
+
5. Append the snapshot to `notes.md`:
|
|
37
|
+
```
|
|
38
|
+
### YYYY-MM-DD HH:MM — snap
|
|
39
|
+
- what was worked on
|
|
40
|
+
- decisions made
|
|
41
|
+
- **Next:** continuation point
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
6. No commit, no push, no ticket operations. Just write the file.
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
✓ Snapped to ~/.whisper/repos/<repo>/branches/<slug>/notes.md
|
|
50
|
+
|
|
51
|
+
Use `/renew` later to pick this back up.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Rules
|
|
55
|
+
|
|
56
|
+
- Do NOT ask questions — summarize automatically from conversation context.
|
|
57
|
+
- Keep it brief — 2–5 bullets, not paragraphs.
|
|
58
|
+
- Do NOT commit or push anything.
|
|
59
|
+
- Do NOT update project files, inbox, or tickets.
|
|
60
|
+
- Do NOT run `/clear`.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: park
|
|
3
|
+
description: "Snapshot current work before switching context. Logs to daily journal, releases ticket claims, records to ~/.whisper/"
|
|
4
|
+
metadata:
|
|
5
|
+
installed-from: "incitaciones"
|
|
6
|
+
---
|
|
7
|
+
---
|
|
8
|
+
name: park
|
|
9
|
+
description: "Snapshot current work before switching context. Logs what was done and what's next without ending the day. Trigger when the user says '/park', 'park this', 'switching to', 'pause this', or 'context switch'."
|
|
10
|
+
tools: Read, Write, Edit, Bash
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Park
|
|
14
|
+
|
|
15
|
+
Snapshot the current session's work on a project/area before switching context. This is NOT end-of-day — just a context switch.
|
|
16
|
+
|
|
17
|
+
Uses `$JOURNAL_PATH` (defaults to `~/dev/status`) for the daily log, and `~/.whisper/` for accumulated operational knowledge.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. Get today's date and current time (`date +%Y-%m-%d`, `date +%H:%M`).
|
|
22
|
+
```bash
|
|
23
|
+
JOURNAL="${JOURNAL_PATH:-$HOME/dev/status}"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
2. Read today's log: `$JOURNAL/log/YYYY/YYYY-MM/YYYY-MM-DD.md`
|
|
27
|
+
If it doesn't exist, create it with the daily log template.
|
|
28
|
+
|
|
29
|
+
3. Review the conversation history to determine:
|
|
30
|
+
- What project/area was being worked on
|
|
31
|
+
- What was accomplished in this session
|
|
32
|
+
- What the logical next step is
|
|
33
|
+
- Any new tasks, decisions, or blockers discovered
|
|
34
|
+
|
|
35
|
+
4. Append a session entry to today's log under `## Log`:
|
|
36
|
+
```
|
|
37
|
+
### Session:HH:MM (<project/area context>)
|
|
38
|
+
- what was done
|
|
39
|
+
- decisions made
|
|
40
|
+
- **Next:** what to do when resuming
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
5. Update the relevant project/area file if needed:
|
|
44
|
+
- Mark completed tasks `[x]`
|
|
45
|
+
- Add new tasks discovered during the session
|
|
46
|
+
- Add/update `[~]` waiting items with context
|
|
47
|
+
- Update `## Notes` with any decisions
|
|
48
|
+
|
|
49
|
+
6. If there are uncommitted changes in the project's git worktree, note them in the log entry.
|
|
50
|
+
|
|
51
|
+
7. **Release any in-progress ticket claim if leaving mid-work.**
|
|
52
|
+
Check whether a ticket was claimed for this session:
|
|
53
|
+
```bash
|
|
54
|
+
BRANCH=$(git branch --show-current 2>/dev/null)
|
|
55
|
+
bd list --status in_progress --label branch:$BRANCH 2>/dev/null
|
|
56
|
+
```
|
|
57
|
+
For each in-progress ticket that is NOT complete:
|
|
58
|
+
- **If meaningful work was committed:** keep the claim and append a progress note:
|
|
59
|
+
```bash
|
|
60
|
+
bd note <id> "Session parked $(date +%H:%M). Done: <brief>. Safe to resume from: <last commit>."
|
|
61
|
+
```
|
|
62
|
+
- **If nothing was committed:** release the claim so another agent can pick it up:
|
|
63
|
+
```bash
|
|
64
|
+
bd update <id> --assignee "" --status open
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
8. **Record snapshot to `~/.whisper/`.** If `~/.whisper/` exists and a beads-epic is linked, append a note to the epic:
|
|
68
|
+
```bash
|
|
69
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
70
|
+
branch_slug=$(git rev-parse --abbrev-ref HEAD | sed 's|/|--|g')
|
|
71
|
+
context_path=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"/context.md
|
|
72
|
+
beads_epic=$(grep '^beads-epic:' "$context_path" 2>/dev/null | sed 's/^beads-epic: *//')
|
|
73
|
+
if [ -n "$beads_epic" ]; then
|
|
74
|
+
bd note "$beads_epic" "Parked $(date +%H:%M). Done: <what was accomplished>. Next: <the logical continuation>."
|
|
75
|
+
fi
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
9. Do NOT commit/push the journal repo yet — that happens at `/close`. Just write the files.
|
|
79
|
+
|
|
80
|
+
## Output format
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
---
|
|
84
|
+
**Parked: <project/area name>**
|
|
85
|
+
|
|
86
|
+
**Session summary**
|
|
87
|
+
- what was accomplished
|
|
88
|
+
|
|
89
|
+
**Next step** *(for when you /renew)*
|
|
90
|
+
- the logical continuation
|
|
91
|
+
|
|
92
|
+
**Updated**
|
|
93
|
+
- files modified in status repo (log, project file, etc.)
|
|
94
|
+
|
|
95
|
+
*Ready to switch context. Use `/renew <slug>` to pick up something else.*
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Rules
|
|
99
|
+
|
|
100
|
+
- Do NOT ask questions — summarize automatically from conversation context.
|
|
101
|
+
- Keep it brief — this is a quick snapshot, not a full report.
|
|
102
|
+
- Do NOT commit or push the journal repo.
|
|
103
|
+
- Do NOT run `/clear` — the user may continue working in this session.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: renew
|
|
3
|
+
description: "Resume work on a project or area. Loads context from journal, ~/.whisper/, and beads. Supports claiming work with file conflict detection"
|
|
4
|
+
metadata:
|
|
5
|
+
installed-from: "incitaciones"
|
|
6
|
+
---
|
|
7
|
+
---
|
|
8
|
+
name: renew
|
|
9
|
+
description: "Resume work on a specific project or area. Loads focused context for continuing where you left off. When no name is given, infers the project/area from the current repo and git branch. Trigger when the user says '/renew', '/renew <name>', 'pick up <project>', 'continue <project>', or 'back to <project>'."
|
|
10
|
+
tools: Read, Write, Edit, Glob, Bash, Grep
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Renew
|
|
14
|
+
|
|
15
|
+
Load focused context for a specific project or area to continue work.
|
|
16
|
+
|
|
17
|
+
Uses `$JOURNAL_PATH` (defaults to `~/dev/status`) for the daily log, and `~/.whisper/` for accumulated operational knowledge.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. Pull the journal repo:
|
|
22
|
+
```bash
|
|
23
|
+
JOURNAL="${JOURNAL_PATH:-$HOME/dev/status}"
|
|
24
|
+
cd "$JOURNAL" && git pull
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. Identify the target.
|
|
28
|
+
|
|
29
|
+
**If a `<slug>` is provided:** The user says `/renew <slug>`.
|
|
30
|
+
|
|
31
|
+
**If no slug is provided:** Infer from the current workspace context:
|
|
32
|
+
- Get the repo name: `basename $(git rev-parse --show-toplevel 2>/dev/null)`
|
|
33
|
+
- Get the branch name: `git branch --show-current 2>/dev/null`
|
|
34
|
+
- Extract a candidate slug from the branch (strip prefix like `ak/`, `feature/`, etc.)
|
|
35
|
+
- Use both the repo name and branch-derived slug as candidates
|
|
36
|
+
|
|
37
|
+
**Match candidates** against:
|
|
38
|
+
- `$JOURNAL/projects/*.md` — check filenames and grep for repo/branch references
|
|
39
|
+
- `$JOURNAL/areas/*.md` — same
|
|
40
|
+
- Try exact match, then partial/substring match
|
|
41
|
+
- If multiple matches found, list them and ask the user to pick
|
|
42
|
+
- If no match found, list available projects/areas and ask
|
|
43
|
+
|
|
44
|
+
3. Read the matched project or area file.
|
|
45
|
+
|
|
46
|
+
4. Read today's log (`$JOURNAL/log/YYYY/YYYY-MM/YYYY-MM-DD.md`).
|
|
47
|
+
If it doesn't exist, create it with the daily log template.
|
|
48
|
+
Scan for any earlier session entries related to this project/area today.
|
|
49
|
+
|
|
50
|
+
5. Search recent logs for context (last 3 days):
|
|
51
|
+
```bash
|
|
52
|
+
grep -rl "<slug>" "$JOURNAL"/log/YYYY/YYYY-MM/ 2>/dev/null | tail -3
|
|
53
|
+
```
|
|
54
|
+
Read any matches to understand recent session history.
|
|
55
|
+
|
|
56
|
+
6. Search inbox for related items:
|
|
57
|
+
```bash
|
|
58
|
+
grep -i "<slug>" "$JOURNAL"/inbox.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
7. **Check `~/.whisper/` for accumulated knowledge.**
|
|
62
|
+
If `~/.whisper/` exists, load context:
|
|
63
|
+
```bash
|
|
64
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
65
|
+
branch_slug=$(git rev-parse --abbrev-ref HEAD | sed 's|/|--|g')
|
|
66
|
+
whisper_dir=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"
|
|
67
|
+
```
|
|
68
|
+
- Read `context.md` if it exists (extract beads-epic, status)
|
|
69
|
+
- Read `plan.md` if it has real content
|
|
70
|
+
- Read `notes.md` if it has real content
|
|
71
|
+
- Read `env.md` at repo level for infra facts
|
|
72
|
+
- If beads is available, fetch open issues:
|
|
73
|
+
```bash
|
|
74
|
+
bd list --label branch:<branch> 2>/dev/null
|
|
75
|
+
bd list --status in_progress --label branch:<branch> 2>/dev/null
|
|
76
|
+
```
|
|
77
|
+
Surface any `in_progress` tickets prominently. The **Suggested next step** must only reference tickets NOT currently `in_progress`.
|
|
78
|
+
|
|
79
|
+
8. If the project/area has a worktree or repo path noted in its file, gather git context:
|
|
80
|
+
- `cd <worktree-path> && git branch --show-current`
|
|
81
|
+
- `git log --oneline -5`
|
|
82
|
+
- `git status --short`
|
|
83
|
+
- `git log --oneline origin/main..HEAD`
|
|
84
|
+
|
|
85
|
+
## Output format
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
---
|
|
89
|
+
**Resuming: Project/Area Name**
|
|
90
|
+
|
|
91
|
+
**Status**: brief one-line summary of where things stand
|
|
92
|
+
|
|
93
|
+
**Last session** *(from most recent log entry)*
|
|
94
|
+
- what was done last time
|
|
95
|
+
|
|
96
|
+
**Open tasks**
|
|
97
|
+
- [ ] task list from the project/area file
|
|
98
|
+
|
|
99
|
+
**Waiting**
|
|
100
|
+
- [~] any blocked items and who/what they're waiting on
|
|
101
|
+
|
|
102
|
+
**Related inbox items** *(if any)*
|
|
103
|
+
- items that mention this project
|
|
104
|
+
|
|
105
|
+
**Whisper context** *(if ~/.whisper/ exists)*
|
|
106
|
+
- Plan: summary of current plan
|
|
107
|
+
- Notes: key findings
|
|
108
|
+
- Beads issues: <n> open, <n> in_progress
|
|
109
|
+
|
|
110
|
+
**⚠ Active in flight** *(omit if none)*
|
|
111
|
+
- ◐ `<id>` — <title> [started: <date>]
|
|
112
|
+
- *(If your intended ticket is listed here, see **Claiming work** below.)*
|
|
113
|
+
|
|
114
|
+
**Workspace**
|
|
115
|
+
- Worktree: path, branch, status
|
|
116
|
+
- Commits ahead of main, uncommitted changes, etc.
|
|
117
|
+
|
|
118
|
+
**Suggested next step**
|
|
119
|
+
- what makes sense to do next — only suggest tickets NOT currently in_progress
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Then ask: *"Ready to continue, or want to adjust the plan?"*
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Claiming work
|
|
127
|
+
|
|
128
|
+
Before writing any code, claim the ticket atomically and check for file conflicts.
|
|
129
|
+
|
|
130
|
+
### Steps
|
|
131
|
+
|
|
132
|
+
1. **Claim atomically:**
|
|
133
|
+
```bash
|
|
134
|
+
bd update <ticket-id> --claim
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
2. **Check for file-level conflicts** with other in-progress tickets:
|
|
138
|
+
```bash
|
|
139
|
+
bd list --status in_progress --label branch:<branch> --json 2>/dev/null \
|
|
140
|
+
| python3 -c "
|
|
141
|
+
import json, sys
|
|
142
|
+
issues = json.loads(sys.stdin.read() or '[]')
|
|
143
|
+
for i in issues:
|
|
144
|
+
files = (i.get('metadata') or {}).get('files', [])
|
|
145
|
+
for f in files:
|
|
146
|
+
print(i['id'] + '\t' + f)
|
|
147
|
+
"
|
|
148
|
+
```
|
|
149
|
+
Cross-reference against the claimed ticket's own `metadata.files`.
|
|
150
|
+
If overlap found, surface a warning:
|
|
151
|
+
```
|
|
152
|
+
⚠ File conflict detected:
|
|
153
|
+
services/api.py is also claimed by ticket-abc (in_progress)
|
|
154
|
+
|
|
155
|
+
Options:
|
|
156
|
+
A) Gate this ticket until the blocker closes
|
|
157
|
+
B) Coordinate merge order
|
|
158
|
+
C) Proceed — accept the conflict (reconcile at merge time)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
3. **If backing off** (chose option A):
|
|
162
|
+
```bash
|
|
163
|
+
bd update <ticket-id> --assignee "" --status open
|
|
164
|
+
bd gate create <ticket-id> --type bead --await-id <blocking-id>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Metadata coverage warning
|
|
168
|
+
|
|
169
|
+
File conflict detection only works when both tickets have `metadata.files` populated (set by `create-issues` or `/w link` at ticket creation time). Tickets created before this convention was adopted have no metadata. For those tickets, **"no conflict found" means unknown, not safe**.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whisper
|
|
3
|
+
description: "Manage the ~/.whisper/ knowledge workspace: init, check, status, link plan, decommission, and knowledge routing"
|
|
4
|
+
metadata:
|
|
5
|
+
installed-from: "incitaciones"
|
|
6
|
+
---
|
|
7
|
+
---
|
|
8
|
+
name: whisper
|
|
9
|
+
description: "Manage the ~/.whisper/ knowledge workspace: init, check, status, link plan to beads, decommission, and knowledge routing. Trigger when the user says '/whisper', '/w', 'init workspace', 'check workspace', 'workspace status', 'link plan', or 'decommission worktree'."
|
|
10
|
+
tools: Read, Write, Edit, Bash
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Whisper — Accumulated Operational Knowledge
|
|
14
|
+
|
|
15
|
+
Manage `~/.whisper/` — a global, tiered knowledge directory that accumulates operational knowledge and planning context across all your work. Works with or without beads issue tracking.
|
|
16
|
+
|
|
17
|
+
## Directory Layout
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
~/.whisper/
|
|
21
|
+
rules.md ← Global agent behavior rules (bd remember equiv)
|
|
22
|
+
|
|
23
|
+
repos/
|
|
24
|
+
github.com/user/repo/
|
|
25
|
+
env.md ← Repo-wide: deploy commands, infra facts, auth quirks
|
|
26
|
+
branches/
|
|
27
|
+
branch-slug/ ← One slot per branch (/ in name → -- in slug)
|
|
28
|
+
context.md ← Branch anchor: repo, branch, beads epic ID, status
|
|
29
|
+
plan.md ← Narrative implementation plan
|
|
30
|
+
notes.md ← Free-form scratch and findings
|
|
31
|
+
agents/ ← Optional sub-agent files when work is split across agents
|
|
32
|
+
worktrees/
|
|
33
|
+
worktree-name/ ← One slot per worktree (basename of worktree path)
|
|
34
|
+
env.md ← Worktree-specific: ports, venvs, credentials, local-only setup
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Branch slug rule:** `git rev-parse --abbrev-ref HEAD | sed 's|/|--|g'`
|
|
38
|
+
|
|
39
|
+
**Worktree slot rule:** `basename $(git rev-parse --git-common-dir 2>/dev/null)` (the `.git` worktree dir name), or `basename $(pwd)` when not in a worktree.
|
|
40
|
+
|
|
41
|
+
## Knowledge Routing
|
|
42
|
+
|
|
43
|
+
When a session learns something worth keeping, route it by scope:
|
|
44
|
+
|
|
45
|
+
| Scope | Test | Destination |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| **Global** | True for every repo and every project | `~/.whisper/rules.md` — append, don't overwrite |
|
|
48
|
+
| **Repo-wide infra** | True regardless of which branch or feature you're on (deploy behavior, gateway/timeout limits, log retention, auth quirks) | `~/.whisper/repos/<host>/<repo>/env.md` — create or extend |
|
|
49
|
+
| **Branch-specific** | Only matters for the work on *this* epic/branch | `~/.whisper/repos/<host>/<repo>/branches/<slug>/notes.md`, or `bd note <epic-id>` if beads is available |
|
|
50
|
+
| **Worktree setup** | Credentials, service IDs, ports, venv/docker specifics for *this checkout* | `~/.whisper/repos/<host>/<repo>/worktrees/<name>/env.md` |
|
|
51
|
+
| **Universal agent rule** | A standing instruction for how the agent should behave, independent of any branch or repo | `bd remember` if available, else `~/.whisper/rules.md` |
|
|
52
|
+
|
|
53
|
+
**Rules:**
|
|
54
|
+
- **No secrets anywhere.** Never write tokens, keys, passwords, or PII into `~/.whisper/`.
|
|
55
|
+
- **Extend, don't duplicate.** Append to or correct an existing note rather than creating a new one that says the same thing.
|
|
56
|
+
- **Search first.** Before creating a new entry, check if one already exists for the same topic.
|
|
57
|
+
- If `bd` is not available, everything falls back to `~/.whisper/` files — there's no beads-backed alternative.
|
|
58
|
+
|
|
59
|
+
## Modes
|
|
60
|
+
|
|
61
|
+
Determine mode from how the skill is triggered:
|
|
62
|
+
|
|
63
|
+
| Trigger | Mode |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `/w init` or `~/.whisper/` does not exist | **init** |
|
|
66
|
+
| `/w` or `/w status` | **status** |
|
|
67
|
+
| `/w check` or called by `renew` | **check** |
|
|
68
|
+
| `/w link [<path>]` or "link plan" | **link** |
|
|
69
|
+
| `/w decommission` | **decommission** |
|
|
70
|
+
|
|
71
|
+
See each reference file for the full procedure:
|
|
72
|
+
|
|
73
|
+
- `references/init.md`
|
|
74
|
+
- `references/check.md`
|
|
75
|
+
- `references/status.md`
|
|
76
|
+
- `references/link.md`
|
|
77
|
+
- `references/decommission.md`
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- Never run `git worktree remove` automatically — always print the command for the user to execute.
|
|
82
|
+
- Never close beads issues during decommission — only defer. Closing is intentional.
|
|
83
|
+
- **One epic per branch, children via `--parent`, not flat siblings.**
|
|
84
|
+
- **`env.md` is shared and immutable across branch switches.** Never overwrite it during init or check — only create if absent.
|
|
85
|
+
- **Branch slug sanitization is mandatory.** Always run `sed 's|/|--|g'` on the branch name before using it as a directory path.
|
|
86
|
+
- **Worktree reuse across branches is normal, not an edge case.** Expect multiple slots to accumulate in `branches/` over time.
|
|
87
|
+
- **Legacy layout is still the common case.** Most worktrees never needed multiple branch slots — only migrate when a mismatch is detected.
|
|
88
|
+
- This skill is self-contained. Do not rely on `create-plan`, `park`, or `create-handoff` having `~/.whisper/` awareness.
|
|
89
|
+
- If `bd` is not initialized in the repo, skip beads steps gracefully and note what was skipped.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Check
|
|
2
|
+
|
|
3
|
+
Validate the workspace before starting work. Detects stale branch slots and worktree reuse. Called automatically by `renew` when `~/.whisper/` exists.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. Get repo URL and branch slug:
|
|
8
|
+
```bash
|
|
9
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
10
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
11
|
+
branch_slug=$(echo "$branch" | sed 's|/|--|g')
|
|
12
|
+
context_path=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"/context.md
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
2. **If `~/.whisper/` doesn't exist:** offer full init:
|
|
16
|
+
```
|
|
17
|
+
⚠ ~/.whisper/ not found. Run `/w init` to create the workspace.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
3. **If `context.md` exists:** output one confirmation line and return.
|
|
21
|
+
```
|
|
22
|
+
✓ Workspace active: ~/.whisper/repos/<repo>/branches/<slug>/
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
4. **If the branch directory doesn't exist:**
|
|
26
|
+
```
|
|
27
|
+
⚠ No workspace slot for branch: <branch>
|
|
28
|
+
~/.whisper/repos/<repo>/branches/<slug>/ does not exist yet.
|
|
29
|
+
|
|
30
|
+
Activate new slot? [Y/n]
|
|
31
|
+
```
|
|
32
|
+
- Y → run **init** for the current branch.
|
|
33
|
+
- N → print "Staying without a slot. Run `/w init` when ready." and stop.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Decommission
|
|
2
|
+
|
|
3
|
+
Safely wind down a worktree or branch: defer open work under the branch epic, record a final note, then print the removal command.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. Run **check** first. Confirm slot exists before decommissioning.
|
|
8
|
+
|
|
9
|
+
2. Get repo URL and branch slug:
|
|
10
|
+
```bash
|
|
11
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
12
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
13
|
+
branch_slug=$(echo "$branch" | sed 's|/|--|g')
|
|
14
|
+
branch_dir=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"
|
|
15
|
+
context_path="$branch_dir/context.md"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. Read `beads-epic:` from `context.md`.
|
|
19
|
+
|
|
20
|
+
4. If beads is available, get all open work under that epic:
|
|
21
|
+
```bash
|
|
22
|
+
bd children <epic-id> --json 2>/dev/null
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
5. If any open children found, defer them:
|
|
26
|
+
```bash
|
|
27
|
+
bd defer <id>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
6. Defer the epic itself:
|
|
31
|
+
```bash
|
|
32
|
+
bd defer <epic-id>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
7. Record the decommission as a note on the epic:
|
|
36
|
+
```bash
|
|
37
|
+
bd note <epic-id> "Decommissioned: branch <branch> on <date>. State: <summary>. Resume via: /w init on branch <branch> — bd search '<branch>' will find this epic."
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
8. Print the removal command — do NOT run it:
|
|
41
|
+
```
|
|
42
|
+
Ready to remove worktree. Run:
|
|
43
|
+
git worktree remove <path>
|
|
44
|
+
|
|
45
|
+
Deferred epic <epic-id> and <n> children. To find them later:
|
|
46
|
+
bd list --status deferred --label branch:<branch>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Rules
|
|
50
|
+
|
|
51
|
+
- Never run `git worktree remove` automatically — always print the command.
|
|
52
|
+
- Never close beads issues during decommission — only defer. Closing is intentional.
|
|
53
|
+
- Branch slots in `~/.whisper/` are not automatically removed when a branch is merged. The slot serves as an archive; the epic (found via `bd search`) can be reused if the same branch name comes back.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Init
|
|
2
|
+
|
|
3
|
+
Create `~/.whisper/` and the current workspace slot.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. Get context:
|
|
8
|
+
```bash
|
|
9
|
+
pwd
|
|
10
|
+
git rev-parse --abbrev-ref HEAD
|
|
11
|
+
basename $(git rev-parse --show-toplevel 2>/dev/null) # repo name
|
|
12
|
+
git rev-parse --git-common-dir 2>/dev/null # confirms worktree vs main
|
|
13
|
+
date +%Y-%m-%d
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. Create `~/.whisper/` if it doesn't exist:
|
|
17
|
+
```bash
|
|
18
|
+
mkdir -p ~/.whisper/repos
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
3. Compute the repo path and branch slug:
|
|
22
|
+
```bash
|
|
23
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
24
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
25
|
+
branch_slug=$(echo "$branch" | sed 's|/|--|g')
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
4. Create the repo & branch directory:
|
|
29
|
+
```bash
|
|
30
|
+
mkdir -p ~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"
|
|
31
|
+
wk_dir=$(basename "$(git rev-parse --git-common-dir 2>/dev/null || echo '.git')" | sed 's|\.git$||')
|
|
32
|
+
[ -n "$wk_dir" ] && mkdir -p ~/.whisper/repos/"${repo_url}"/worktrees/"${wk_dir}"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
5. Create `~/.whisper/rules.md` if it doesn't exist:
|
|
36
|
+
```markdown
|
|
37
|
+
# Global Agent Rules
|
|
38
|
+
|
|
39
|
+
> Standing instructions for the agent, independent of any repo or branch.
|
|
40
|
+
> Append here for rules that apply everywhere.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
6. Create the repo `env.md` if it doesn't exist:
|
|
44
|
+
```markdown
|
|
45
|
+
# Environment — <repo-name>
|
|
46
|
+
|
|
47
|
+
> Repo-wide setup knowledge. True regardless of which branch or worktree.
|
|
48
|
+
> Deploy commands, gateway limits, auth quirks that apply everywhere.
|
|
49
|
+
> Worktree-specific setup (ports, venvs, local creds) goes in worktrees/<name>/env.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
7. Create the worktree `env.md` if it doesn't exist:
|
|
53
|
+
```markdown
|
|
54
|
+
# Worktree — <worktree-name>
|
|
55
|
+
|
|
56
|
+
> Worktree-specific setup. Credentials, ports, venv/docker specifics for THIS checkout only.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
8. Create `context.md`:
|
|
60
|
+
```markdown
|
|
61
|
+
# Workspace Context — <full-branch-name>
|
|
62
|
+
|
|
63
|
+
repo: <repo-url>
|
|
64
|
+
branch: <full-branch-name>
|
|
65
|
+
worktree: <worktree-dir-name>
|
|
66
|
+
path: <absolute-path>
|
|
67
|
+
created: <YYYY-MM-DD>
|
|
68
|
+
beads-epic:
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
9. Create `plan.md` stub:
|
|
72
|
+
```markdown
|
|
73
|
+
# Plan — <full-branch-name>
|
|
74
|
+
|
|
75
|
+
> No plan yet. Write a plan here, then run `/w link` to create beads issues.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
10. Create `notes.md` stub:
|
|
79
|
+
```markdown
|
|
80
|
+
# Notes — <full-branch-name>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
11. If beads is available, find or create the branch epic:
|
|
84
|
+
```bash
|
|
85
|
+
bd search "<branch>" --status all 2>/dev/null
|
|
86
|
+
```
|
|
87
|
+
- If an epic already matches, reuse its ID and update `beads-epic:` in `context.md`.
|
|
88
|
+
- If the work is substantial enough, create one: `bd create "<branch>" --type epic --label "branch:<branch>" --silent`
|
|
89
|
+
- For a single-ticket fix, skip the epic and let the ticket ID stand in for `beads-epic:`.
|
|
90
|
+
|
|
91
|
+
12. Confirm:
|
|
92
|
+
```
|
|
93
|
+
✓ ~/.whisper/ initialized
|
|
94
|
+
|
|
95
|
+
Repo: <repo-url>
|
|
96
|
+
Branch: <branch> → branches/<slug>/
|
|
97
|
+
Epic: <id | none — will be created by /w link>
|
|
98
|
+
rules.md: [created | exists]
|
|
99
|
+
env.md: [created | exists]
|
|
100
|
+
worktree/env.md: [created | exists]
|
|
101
|
+
|
|
102
|
+
Run `/w link` after writing a plan.
|
|
103
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Link
|
|
2
|
+
|
|
3
|
+
Attach a plan file to the workspace and create beads issues for each phase, as children of the branch epic. Run this after writing or generating a plan.
|
|
4
|
+
|
|
5
|
+
This mode is self-contained — it does NOT require `create-plan` to have been used. The plan can come from anywhere: manually written, generated by any tool, or copied in.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. Run **check** first to confirm the slot exists.
|
|
10
|
+
|
|
11
|
+
2. Get repo URL and branch slug:
|
|
12
|
+
```bash
|
|
13
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
14
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
15
|
+
branch_slug=$(echo "$branch" | sed 's|/|--|g')
|
|
16
|
+
branch_dir=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"
|
|
17
|
+
context_path="$branch_dir/context.md"
|
|
18
|
+
plan_path="$branch_dir/plan.md"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
3. Determine the plan file path:
|
|
22
|
+
- If the user provided a path (`/w link path/to/plan.md`): use that.
|
|
23
|
+
- Otherwise: use `plan.md`.
|
|
24
|
+
- If neither exists: tell the user to write a plan first and stop.
|
|
25
|
+
|
|
26
|
+
4. If the source path is not `plan.md`, copy it in:
|
|
27
|
+
```bash
|
|
28
|
+
cp <source-path> "$branch_dir/plan.md"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
5. Read `plan.md` and extract phase headings.
|
|
32
|
+
|
|
33
|
+
6. Ensure the branch epic exists:
|
|
34
|
+
- If `context.md`'s `beads-epic:` is already set, use it.
|
|
35
|
+
- If blank and the plan has more than one phase: create it.
|
|
36
|
+
- If blank and the plan is a single task: skip the epic.
|
|
37
|
+
|
|
38
|
+
7. For each phase/task, create a beads issue as a child of the branch epic:
|
|
39
|
+
```bash
|
|
40
|
+
bd create "<phase-title>" --type task --parent <epic-id>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
8. Only if phases are genuinely sequential, chain dependencies:
|
|
44
|
+
```bash
|
|
45
|
+
bd dep <id-N> --blocks <id-N+1>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
9. Update `context.md` — set `beads-epic:` to the epic (or single-ticket) ID.
|
|
49
|
+
|
|
50
|
+
10. **After each successful creation**, extract the `**Files / Systems:**` bullet list from the issue description and store it as structured metadata:
|
|
51
|
+
```bash
|
|
52
|
+
bd update <id> --metadata '{"files": ["path/to/file1.py", "path/to/file2.py"]}'
|
|
53
|
+
```
|
|
54
|
+
This enables automated file-conflict detection by concurrent agents. If the Files/Systems section is empty or contains only subsystem names without concrete paths, **stop and ask for specific file paths** — a ticket without concrete paths cannot participate in conflict detection.
|
|
55
|
+
|
|
56
|
+
11. Confirm:
|
|
57
|
+
```
|
|
58
|
+
Linked plan to workspace: branches/<slug>/
|
|
59
|
+
Epic: <epic-id> — <branch>
|
|
60
|
+
Created <n> child issues:
|
|
61
|
+
<id> Phase 1: ...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Relinking
|
|
65
|
+
|
|
66
|
+
If `context.md` already has a `beads-epic:` set, ask before creating new children:
|
|
67
|
+
```
|
|
68
|
+
context.md already links epic <id> with <n> children.
|
|
69
|
+
Add new phases as more children of the same epic? [Y/n]
|
|
70
|
+
```
|