incitaciones 0.2.0 → 0.3.1
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 +68 -0
- package/content/distilled/create-issues/SKILL.md +10 -0
- package/content/distilled/implement-documentation/SKILL.md +29 -0
- package/content/distilled/implement-documentation/references/anti-patterns.md +35 -0
- package/content/distilled/implement-documentation/references/diataxis-implementation.md +31 -0
- package/content/distilled/implement-documentation/references/templates.md +115 -0
- package/content/distilled/implement-documentation/references/tooling-comparison.md +46 -0
- package/content/distilled/implement-documentation/references/versioning.md +31 -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 +98 -0
- package/content/distilled/renew/SKILL.md +164 -0
- package/content/distilled/research-documentation/SKILL.md +29 -0
- package/content/distilled/research-documentation/references/checklist.md +58 -0
- package/content/distilled/research-documentation/references/llm-readiness.md +43 -0
- package/content/distilled/research-documentation/references/metrics.md +42 -0
- package/content/distilled/research-documentation/references/report-template.md +42 -0
- package/content/distilled/review-documentation/SKILL.md +49 -0
- package/content/distilled/review-documentation/references/ai-readiness-criteria.md +38 -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 +458 -11
- 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 +74 -0
- package/pi-package/skills/create-issues/SKILL.md +10 -0
- package/pi-package/skills/implement-documentation/SKILL.md +18 -57
- package/pi-package/skills/implement-documentation/references/anti-patterns.md +35 -0
- package/pi-package/skills/implement-documentation/references/diataxis-implementation.md +31 -0
- package/pi-package/skills/implement-documentation/references/templates.md +115 -0
- package/pi-package/skills/implement-documentation/references/tooling-comparison.md +46 -0
- package/pi-package/skills/implement-documentation/references/versioning.md +31 -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 +104 -0
- package/pi-package/skills/renew/SKILL.md +170 -0
- package/pi-package/skills/research-documentation/SKILL.md +19 -69
- package/pi-package/skills/research-documentation/references/checklist.md +58 -0
- package/pi-package/skills/research-documentation/references/llm-readiness.md +43 -0
- package/pi-package/skills/research-documentation/references/metrics.md +42 -0
- package/pi-package/skills/research-documentation/references/report-template.md +42 -0
- package/pi-package/skills/review-documentation/SKILL.md +45 -40
- package/pi-package/skills/review-documentation/references/ai-readiness-criteria.md +38 -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
- package/content/distilled/implement-documentation.md +0 -68
- package/content/distilled/research-documentation.md +0 -79
- package/content/distilled/review-documentation.md +0 -44
|
@@ -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
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Status
|
|
2
|
+
|
|
3
|
+
Show the state of the current workspace.
|
|
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 `context.md` doesn't exist, delegate to **check** mode and stop.
|
|
16
|
+
|
|
17
|
+
3. Read `context.md` and extract: repo, branch, path, beads-epic.
|
|
18
|
+
|
|
19
|
+
4. Show `env.md` info:
|
|
20
|
+
```bash
|
|
21
|
+
date -r ~/.whisper/repos/"${repo_url}"/env.md "+%Y-%m-%d %H:%M" 2>/dev/null
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
5. Show the branch epic's tree if beads is available:
|
|
25
|
+
```bash
|
|
26
|
+
bd children <beads-epic> --pretty 2>/dev/null
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
6. Show plan status: is `plan.md` a stub or does it have real content?
|
|
30
|
+
|
|
31
|
+
7. Show all active branch slots for this repo (most recently modified first):
|
|
32
|
+
```bash
|
|
33
|
+
ls -t ~/.whisper/repos/"${repo_url}"/branches/ 2>/dev/null
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Output format
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
── Whisper: <repo> ──
|
|
40
|
+
Branch: <branch> (branches/<slug>/)
|
|
41
|
+
Plan: [exists | stub]
|
|
42
|
+
Epic: <id> — <n> issues (<open> open) [or: none linked yet]
|
|
43
|
+
|
|
44
|
+
Active branch slots:
|
|
45
|
+
<ls output>
|
|
46
|
+
|
|
47
|
+
Epic tree:
|
|
48
|
+
<bd children --pretty output, or "none">
|
|
49
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
const repoRoot = path.resolve(__dirname, "..");
|
|
9
|
+
const manifestPath = path.join(repoRoot, "content", "manifest.json");
|
|
10
|
+
const outRoot = path.join(repoRoot, "pi-package");
|
|
11
|
+
const skillsOut = path.join(outRoot, "skills");
|
|
12
|
+
const promptsOut = path.join(outRoot, "prompts");
|
|
13
|
+
|
|
14
|
+
function escapeYamlDoubleQuoted(value) {
|
|
15
|
+
return String(value).replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function ensureDir(dir) {
|
|
19
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function resetDir(dir) {
|
|
23
|
+
if (fs.existsSync(dir)) {
|
|
24
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
25
|
+
fs.rmSync(path.join(dir, entry.name), { recursive: true, force: true, maxRetries: 3, retryDelay: 50 });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function readText(filePath) {
|
|
32
|
+
return fs.readFileSync(filePath, "utf8");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function generateSkill(prompt) {
|
|
36
|
+
const distilledPath = path.join(repoRoot, prompt.distilled);
|
|
37
|
+
const skillDir = path.join(skillsOut, prompt.name);
|
|
38
|
+
ensureDir(skillDir);
|
|
39
|
+
|
|
40
|
+
const frontmatter = [
|
|
41
|
+
"---",
|
|
42
|
+
`name: ${prompt.name}`,
|
|
43
|
+
`description: \"${escapeYamlDoubleQuoted(prompt.description || `Incitaciones prompt: ${prompt.name}`)}\"`,
|
|
44
|
+
"metadata:",
|
|
45
|
+
' installed-from: "incitaciones"',
|
|
46
|
+
"---",
|
|
47
|
+
"",
|
|
48
|
+
].join("\n");
|
|
49
|
+
|
|
50
|
+
fs.writeFileSync(path.join(skillDir, "SKILL.md"), frontmatter + readText(distilledPath), "utf8");
|
|
51
|
+
|
|
52
|
+
if (distilledPath.endsWith(`${path.sep}SKILL.md`)) {
|
|
53
|
+
const srcDir = path.dirname(distilledPath);
|
|
54
|
+
for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
|
|
55
|
+
if (entry.name === "SKILL.md") continue;
|
|
56
|
+
const src = path.join(srcDir, entry.name);
|
|
57
|
+
const dst = path.join(skillDir, entry.name);
|
|
58
|
+
if (entry.isDirectory()) {
|
|
59
|
+
fs.cpSync(src, dst, { recursive: true });
|
|
60
|
+
} else {
|
|
61
|
+
fs.copyFileSync(src, dst);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function generatePromptTemplate(prompt) {
|
|
68
|
+
const description = prompt.description || `Incitaciones prompt: ${prompt.name}`;
|
|
69
|
+
const template = [
|
|
70
|
+
"---",
|
|
71
|
+
`description: \"${escapeYamlDoubleQuoted(`Shortcut for the ${prompt.name} skill. ${description}`)}\"`,
|
|
72
|
+
"---",
|
|
73
|
+
"<!-- installed-from: incitaciones -->",
|
|
74
|
+
"",
|
|
75
|
+
`Use the installed \`${prompt.name}\` skill for this task.`,
|
|
76
|
+
"",
|
|
77
|
+
`If the skill is not automatically loaded, invoke \`/skill:${prompt.name}\` and follow it.`,
|
|
78
|
+
"",
|
|
79
|
+
"User context: $@",
|
|
80
|
+
"",
|
|
81
|
+
].join("\n");
|
|
82
|
+
|
|
83
|
+
fs.writeFileSync(path.join(promptsOut, `${prompt.name}.md`), template, "utf8");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function main() {
|
|
87
|
+
const manifest = JSON.parse(readText(manifestPath));
|
|
88
|
+
resetDir(outRoot);
|
|
89
|
+
ensureDir(skillsOut);
|
|
90
|
+
ensureDir(promptsOut);
|
|
91
|
+
|
|
92
|
+
for (const prompt of manifest.prompts) {
|
|
93
|
+
generateSkill(prompt);
|
|
94
|
+
generatePromptTemplate(prompt);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const readme = [
|
|
98
|
+
"# Generated pi package resources",
|
|
99
|
+
"",
|
|
100
|
+
"This directory is generated by `node scripts/generate-pi-resources.mjs`.",
|
|
101
|
+
"The generated files are committed so `pi install .` works from a clean checkout.",
|
|
102
|
+
"Refresh them with `just generate-pi-resources` after changing distilled content or manifest entries.",
|
|
103
|
+
"Do not edit files here by hand.",
|
|
104
|
+
"",
|
|
105
|
+
"- `skills/` contains pi-compatible Agent Skills",
|
|
106
|
+
"- `prompts/` contains pi prompt templates",
|
|
107
|
+
"",
|
|
108
|
+
"## Install from npm",
|
|
109
|
+
"",
|
|
110
|
+
"```bash",
|
|
111
|
+
"pi install npm:incitaciones",
|
|
112
|
+
"```",
|
|
113
|
+
"",
|
|
114
|
+
"This package is published as [`incitaciones` on npm](https://www.npmjs.com/package/incitaciones).",
|
|
115
|
+
"",
|
|
116
|
+
].join("\n");
|
|
117
|
+
fs.writeFileSync(path.join(outRoot, "README.md"), readme, "utf8");
|
|
118
|
+
|
|
119
|
+
console.log(`Generated pi resources for ${manifest.prompts.length} prompts in ${path.relative(repoRoot, outRoot)}/`);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
main();
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Implement Documentation Topic
|
|
2
|
-
|
|
3
|
-
Write a high-signal documentation topic using the Unified Frameworks for Technical Information Architecture.
|
|
4
|
-
|
|
5
|
-
## CRITICAL RULES
|
|
6
|
-
|
|
7
|
-
1. ✅ **DO:** Establish context and prerequisites in the first two sentences (EPPO).
|
|
8
|
-
2. ✅ **DO:** Lead with the answer or primary assertion in the TL;DR and first paragraph (Pyramid Principle).
|
|
9
|
-
3. ✅ **DO:** Use explicit, semantic block labels (descriptive headers) for every 2-3 paragraphs (Info Mapping).
|
|
10
|
-
4. ✅ **DO:** Provide a clear "fail-state" or troubleshooting section (Minimalism).
|
|
11
|
-
5. ❌ **DO NOT:** Mix intents (e.g., no deep theory in a How-to guide). If theory is *required* for a task, use a **Note:** or **Deep Dive:** sidebar to maintain quadrant purity.
|
|
12
|
-
6. ❌ **DO NOT:** Use "Next" or "Previous" as the only navigational cues (EPPO).
|
|
13
|
-
|
|
14
|
-
## Implementation Workflow
|
|
15
|
-
|
|
16
|
-
### Step 1: Quadrant Check
|
|
17
|
-
|
|
18
|
-
Identify the Diátaxis quadrant and follow its rhetorical rules:
|
|
19
|
-
- **Tutorial:** Action-oriented, safe environment. Use the **Martini Glass** narrative pattern: Author-driven stem (guided context) → Reader-driven bowl (open exploration).
|
|
20
|
-
- **How-to:** Task-focused, assumes baseline competence, minimal theory.
|
|
21
|
-
- **Reference:** Fact-based, scannable tables, no narrative filler.
|
|
22
|
-
- **Explanation:** Theoretical, discusses "Why," maps concepts.
|
|
23
|
-
|
|
24
|
-
### Step 2: EPPO Initialization
|
|
25
|
-
|
|
26
|
-
Every topic must stand alone. Start with:
|
|
27
|
-
- **Title:** Clear, task- or concept-focused.
|
|
28
|
-
- **Context Block:** "This topic covers [X]. You should already understand [Y] and have [Z] installed."
|
|
29
|
-
|
|
30
|
-
### Step 3: Information Mapping
|
|
31
|
-
|
|
32
|
-
Structure the body content:
|
|
33
|
-
- **Chunking:** Break large blocks into units of <7 items.
|
|
34
|
-
- **Labeling:** Use headers that describe the *result* or *content* (e.g., "Configuring the API" not just "Configuration").
|
|
35
|
-
- **Tables/Lists:** Convert complex comparisons or steps into visual structures.
|
|
36
|
-
|
|
37
|
-
### Step 4: AI-First Polish
|
|
38
|
-
|
|
39
|
-
- **Semantic Headers:** Ensure headers are descriptive for RAG indexing.
|
|
40
|
-
- **Compressed Summary:** Provide a 1-2 sentence "tl;dr" at the top for LLM ingestion.
|
|
41
|
-
|
|
42
|
-
## Template (How-to Guide)
|
|
43
|
-
|
|
44
|
-
```markdown
|
|
45
|
-
# [Task-Focused Title]
|
|
46
|
-
|
|
47
|
-
**TL;DR:** [1-sentence summary for human/AI]
|
|
48
|
-
|
|
49
|
-
## Context & Prerequisites
|
|
50
|
-
This guide explains how to [Goal]. Before starting, ensure you have:
|
|
51
|
-
- [Prerequisite 1]
|
|
52
|
-
- [Prerequisite 2]
|
|
53
|
-
|
|
54
|
-
## [Action Step 1: Specific Result]
|
|
55
|
-
[Chunked instructions]
|
|
56
|
-
|
|
57
|
-
## [Action Step 2: Specific Result]
|
|
58
|
-
[Chunked instructions]
|
|
59
|
-
|
|
60
|
-
## Troubleshooting: Common Fail-States
|
|
61
|
-
| Symptom | Cause | Fix |
|
|
62
|
-
| :--- | :--- | :--- |
|
|
63
|
-
| [Error] | [Reason] | [Solution] |
|
|
64
|
-
|
|
65
|
-
## Further Exploration
|
|
66
|
-
- [Lateral Link 1] (Subject affinity)
|
|
67
|
-
- [Lateral Link 2] (Subject affinity)
|
|
68
|
-
```
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Research Documentation Architecture
|
|
2
|
-
|
|
3
|
-
Audit the existing documentation or plan a new suite using the Unified Frameworks for Technical Information Architecture.
|
|
4
|
-
|
|
5
|
-
## CRITICAL RULES
|
|
6
|
-
|
|
7
|
-
1. ✅ **DO:** Categorize every document into exactly one Diátaxis quadrant.
|
|
8
|
-
2. ✅ **DO:** Identify "Frankenbooks" (documents with mixed intent/quadrants).
|
|
9
|
-
3. ✅ **DO:** Map the "Snowflake" progression from Core Assertion to granular topics.
|
|
10
|
-
4. ✅ **DO:** Verify EPPO compliance (Does each page establish its own context?).
|
|
11
|
-
5. ❌ **DO NOT:** Start writing content yet; focus on architecture and gaps.
|
|
12
|
-
6. ❌ **DO NOT:** Suggest stylistic changes (focus on structural integrity).
|
|
13
|
-
|
|
14
|
-
## Process
|
|
15
|
-
|
|
16
|
-
### Step 1: Define the Scope
|
|
17
|
-
|
|
18
|
-
[User will provide a path to a documentation directory or a project description.]
|
|
19
|
-
- Identify the primary audience (Novice vs. Expert).
|
|
20
|
-
- State the "Core Assertion" (The single-sentence value proposition).
|
|
21
|
-
- **Legacy Conflict Resolution:** If existing documentation contains multiple, conflicting "hooks," identify the most impactful one or propose a synthesis for the new architecture.
|
|
22
|
-
|
|
23
|
-
### Step 2: Audit Existing Content (if applicable)
|
|
24
|
-
|
|
25
|
-
For each file in the directory, determine:
|
|
26
|
-
- **Quadrant:** (Tutorial | How-to | Reference | Explanation).
|
|
27
|
-
- **EPPO Status:** (Pass/Fail) Does it have standalone utility and context?
|
|
28
|
-
- **Cognitive Load:** Are there "walls of words" or missing labels?
|
|
29
|
-
|
|
30
|
-
### Step 3: Map the Snowflake Outline
|
|
31
|
-
|
|
32
|
-
Expand the Core Assertion into a structural map:
|
|
33
|
-
1. **Core Assertion:** [1 sentence]
|
|
34
|
-
2. **Macro-Expansion:** [1 paragraph user journey]
|
|
35
|
-
3. **Component List:** [The "characters" of the system]
|
|
36
|
-
4. **Topic Matrix:** A list of proposed EPPO topics categorized by quadrant.
|
|
37
|
-
|
|
38
|
-
### Step 4: Identify Gaps and Friction
|
|
39
|
-
|
|
40
|
-
- **Quadrant Imbalance:** e.g., "Too much reference, not enough tutorials."
|
|
41
|
-
- **Structural Plot-holes:** Where does the user journey break?
|
|
42
|
-
- **AI-Readiness Gaps:** Missing `llms.txt`, poor semantic labeling.
|
|
43
|
-
|
|
44
|
-
### Step 5: Final Research Report
|
|
45
|
-
|
|
46
|
-
Output the audit/plan using the following template:
|
|
47
|
-
|
|
48
|
-
```markdown
|
|
49
|
-
# Documentation Research: [Project Name]
|
|
50
|
-
|
|
51
|
-
## 1. Executive Summary & Core Assertion
|
|
52
|
-
**Core Assertion:** [The one-sentence hook]
|
|
53
|
-
**Status:** [Summary of current architecture health]
|
|
54
|
-
|
|
55
|
-
## 2. Diátaxis Matrix
|
|
56
|
-
| Quadrant | Existing Topics | Proposed/Missing Topics |
|
|
57
|
-
| :--- | :--- | :--- |
|
|
58
|
-
| **Tutorial** | | |
|
|
59
|
-
| **How-to** | | |
|
|
60
|
-
| **Reference** | | |
|
|
61
|
-
| **Explanation** | | |
|
|
62
|
-
|
|
63
|
-
## 3. Snowflake Structural Map
|
|
64
|
-
- **Macro-Journey:** [Description]
|
|
65
|
-
- **Key Components:** [List]
|
|
66
|
-
|
|
67
|
-
## 4. EPPO & Cognitive Audit
|
|
68
|
-
- **Frankenbooks Found:** [List of files with mixed intent]
|
|
69
|
-
- **Context Gaps:** [Topics needing better orientation]
|
|
70
|
-
|
|
71
|
-
## 5. AI-Readiness Assessment
|
|
72
|
-
- [ ] `llms.txt` present?
|
|
73
|
-
- [ ] Explicit semantic labeling for RAG?
|
|
74
|
-
- [ ] MCP endpoints identified?
|
|
75
|
-
|
|
76
|
-
## 6. Recommended Next Steps
|
|
77
|
-
1. [Actionable structural change]
|
|
78
|
-
2. [Actionable topic creation]
|
|
79
|
-
```
|