incitaciones 0.8.0 → 0.9.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/content/distilled/close/SKILL.md +11 -3
- package/content/distilled/code-review/SKILL.md +1 -1
- package/content/distilled/code-review/references/criteria.md +2 -1
- package/content/distilled/codebase-cartography/references/report-template.md +4 -3
- package/content/distilled/codebase-cartography/references/zoom-levels.md +11 -3
- package/content/distilled/context-guardian.md +3 -2
- package/content/distilled/create-issues/SKILL.md +3 -1
- package/content/distilled/create-issues/references/templates.md +1 -0
- package/content/distilled/file-headers.md +26 -0
- package/content/distilled/implement-plan/SKILL.md +2 -0
- package/content/distilled/implement-plan/references/verification-template.md +1 -0
- package/content/distilled/issue-review/SKILL.md +1 -0
- package/content/distilled/issue-review/references/pass-5-executability.md +2 -0
- package/content/distilled/modularity-diagnostician.md +1 -0
- package/content/distilled/resonant-refactor.md +2 -1
- package/content/distilled/tdd/SKILL.md +3 -2
- package/content/distilled/tdd/references/criteria.md +1 -0
- package/content/distilled/whisper/SKILL.md +47 -83
- package/content/manifest.json +28 -8
- package/package.json +1 -1
- package/pi-package/prompts/file-headers.md +10 -0
- package/pi-package/prompts/whisper.md +1 -1
- package/pi-package/skills/close/SKILL.md +11 -3
- package/pi-package/skills/code-review/SKILL.md +1 -1
- package/pi-package/skills/code-review/references/criteria.md +2 -1
- package/pi-package/skills/codebase-cartography/references/report-template.md +4 -3
- package/pi-package/skills/codebase-cartography/references/zoom-levels.md +11 -3
- package/pi-package/skills/context-guardian/SKILL.md +3 -2
- package/pi-package/skills/create-issues/SKILL.md +3 -1
- package/pi-package/skills/create-issues/references/templates.md +1 -0
- package/pi-package/skills/file-headers/SKILL.md +32 -0
- package/pi-package/skills/implement-plan/SKILL.md +2 -0
- package/pi-package/skills/implement-plan/references/verification-template.md +1 -0
- package/pi-package/skills/issue-review/SKILL.md +1 -0
- package/pi-package/skills/issue-review/references/pass-5-executability.md +2 -0
- package/pi-package/skills/modularity-diagnostician/SKILL.md +1 -0
- package/pi-package/skills/resonant-refactor/SKILL.md +2 -1
- package/pi-package/skills/tdd/SKILL.md +3 -2
- package/pi-package/skills/tdd/references/criteria.md +1 -0
- package/pi-package/skills/whisper/SKILL.md +48 -84
- package/scripts/cli.mjs +7 -2
- package/scripts/generate-pi-resources.mjs +5 -0
|
@@ -8,14 +8,22 @@ tools: Read, Write, Edit, Glob, Bash
|
|
|
8
8
|
|
|
9
9
|
End the current session: log what was done, update tasks, route durable knowledge to `~/.whisper/`, commit and push, clear context.
|
|
10
10
|
|
|
11
|
-
Uses `$JOURNAL_PATH`
|
|
11
|
+
Uses `$JOURNAL_PATH` for the daily log journal, and `~/.whisper/` for accumulated operational knowledge. Agent shells run non-interactive and never source `.bashrc`, so the environment may be missing these exports — resolve both values per step 1 (env → shell config → convention → legacy fallback).
|
|
12
12
|
|
|
13
13
|
## Steps
|
|
14
14
|
|
|
15
15
|
1. Pull the journal repo:
|
|
16
16
|
```bash
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# Non-interactive shells never source .bashrc, so $JOURNAL_PATH etc. are
|
|
18
|
+
# usually unset here. Source the config in a throwaway shell — bash itself
|
|
19
|
+
# handles comments, quotes, and nested vars ($JORNAL) — then fall back.
|
|
20
|
+
shellval() { bash -c 'source ~/.bashrc >/dev/null 2>&1; printf "%s\n" "${'"'$1'"'}"' 2>/dev/null; }
|
|
21
|
+
JOURNAL="${JOURNAL_PATH:-$(shellval JOURNAL_PATH)}"
|
|
22
|
+
[ -n "$JOURNAL" ] || JOURNAL="$(shellval JORNAL)"
|
|
23
|
+
[ -n "$JOURNAL" ] || JOURNAL="$HOME/para/areas/jornal" # JORNAL convention
|
|
24
|
+
[ -d "$JOURNAL/.git" ] || JOURNAL="$HOME/dev/status" # legacy clone; flag this fallback in the reply
|
|
25
|
+
LOG_SUBDIR="${JOURNAL_LOG_SUBDIR:-$(shellval JOURNAL_LOG_SUBDIR)}"
|
|
26
|
+
[ -n "$LOG_SUBDIR" ] || LOG_SUBDIR="areas/log"
|
|
19
27
|
cd "$JOURNAL" && git pull
|
|
20
28
|
```
|
|
21
29
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- skill: code-review, version: 1.
|
|
1
|
+
<!-- skill: code-review, version: 1.3.0, status: verified -->
|
|
2
2
|
# Iterative Code Review (Rule of 5)
|
|
3
3
|
|
|
4
4
|
Perform a multi-pass, iterative code review using Steve Yegge's Rule of 5 to achieve high-quality refinement through breadth-first exploration.
|
|
@@ -8,7 +8,7 @@ Use these criteria to categorize findings and determine when the review process
|
|
|
8
8
|
| :--- | :--- | :--- |
|
|
9
9
|
| **CRITICAL** | Blocks merge. Severe security vulnerability, data loss risk, or fundamental logic failure. | SQL Injection, plaintext passwords, unhandled exceptions in core path. |
|
|
10
10
|
| **HIGH** | Should fix before merge. Significant performance issue, major regression risk, or violation of key requirements. | Missing index on hot query, non-singular requirement, missing error states. |
|
|
11
|
-
| **MEDIUM** | Consider addressing. Minor technical debt, sub-optimal pattern, or readability issues. | Magic strings, DRY violations, lack of docstrings, magic numbers. |
|
|
11
|
+
| **MEDIUM** | Consider addressing. Minor technical debt, sub-optimal pattern, or readability issues. | Magic strings, DRY violations, lack of docstrings, missing or stale file-header Purpose (see `file-headers`), magic numbers. |
|
|
12
12
|
| **LOW** | Nice to have. Stylistic improvements, minor metadata gaps, or typos in non-critical comments. | Minor formatting, redundant comments, small consistency improvements. |
|
|
13
13
|
|
|
14
14
|
## Convergence Criteria
|
|
@@ -47,4 +47,5 @@ Use these criteria to categorize findings and determine when the review process
|
|
|
47
47
|
### Stage 5: EXCELLENCE
|
|
48
48
|
- Performance optimization?
|
|
49
49
|
- Documentation polish?
|
|
50
|
+
- File headers: every touched source file's Purpose is present, one-sentence-accurate, and not stale; Rationale reflects the current design (see `file-headers`)?
|
|
50
51
|
- Style consistency?
|
|
@@ -12,10 +12,11 @@ Structure the final output by mode. All modes share the closing sections. Keep m
|
|
|
12
12
|
|
|
13
13
|
## Mode: macro
|
|
14
14
|
|
|
15
|
-
1. **Module inventory** — table (module, path, responsibility, deps out, fan-in)
|
|
15
|
+
1. **Module inventory** — table (module, path, responsibility, weight bar, deps out, fan-in)
|
|
16
16
|
2. **Dependency matrix** — text DSM with ↑ marks for layer violations
|
|
17
17
|
3. **Module graph** — Mermaid, edges labeled with counts
|
|
18
|
-
4.
|
|
18
|
+
4. **Composition** — disk-reality breakdown by file kind (source / test / generated / vendored / config), excluded code included; distinct from the inventory weight column (analysis code, exclusions applied)
|
|
19
|
+
5. Structural observations
|
|
19
20
|
|
|
20
21
|
## Mode: meso
|
|
21
22
|
|
|
@@ -65,7 +66,7 @@ One finding block per pattern (format in `smell-signatures.md`), ordered by seve
|
|
|
65
66
|
An explicit batch request ("generate all the reports", "map every module") is a user request — Zoom Discipline's offer-don't-dump rule applies to unprompted follow-ups only.
|
|
66
67
|
|
|
67
68
|
- Enumerate targets from the module inventory. Confirm the list once when it exceeds 3 targets or the scope is ambiguous; proceed unless corrected.
|
|
68
|
-
- One markdown per target in `docs/cartography/` — each the artifact of record for its target. For each, re-verify counts immediately before writing (Zoom Discipline).
|
|
69
|
+
- One markdown per target in `docs/cartography/` — each the artifact of record for its target. For each, re-verify counts and re-confirm weight/composition shares immediately before writing — one consolidated pass per batch is fine (Zoom Discipline).
|
|
69
70
|
- Include a health report only if the batch request names health/smells.
|
|
70
71
|
- A target too large for one pass: skip it, mark it as "offered — too large for one pass" in the final summary and, when HTML export is part of the batch, in `index.html`. Do not stop the batch to ask.
|
|
71
72
|
- Superseded artifacts from older exports (old-format HTML pages, render scripts): regenerate in place, recommend deleting the superseded script/pages, and never index stale-format files.
|
|
@@ -13,13 +13,19 @@ Adapt import syntax to the language (see language rule below).
|
|
|
13
13
|
2. Inter-module imports: scan import statements crossing module boundaries. Quoting-safe scan (works in POSIX shells), e.g. JS/TS: `rg 'from ["'"'"']' --type js --type ts` or simply `rg 'import|require'`; then filter by path.
|
|
14
14
|
3. Count edges per pair of modules to get a weighted dependency list.
|
|
15
15
|
4. Determine layering for violation flags: use the repo's declared layering (README/ARCHITECTURE/docs) if present; otherwise infer it from the majority dependency direction and label that inference in the report.
|
|
16
|
+
5. **Weight & composition:** size each module by LOC (default) or file count (mixed-language repos, where LOC is not comparable across languages). Tool: `tokei` (apply the step-1 globs via `tokei -e ...`, or `cloc`); fallback: `rg --files -0 <exclusion globs> | xargs -0 wc -l`, summed per module. Two distinct metrics:
|
|
17
|
+
- **Weight** (inventory column) — analysis code only, same exclusions as all counts (step 1).
|
|
18
|
+
- **Composition** (report block) — disk reality: all code grouped by kind (source / test / generated / vendored / config), excluded code included. Classify by path/name conventions (`tests/`, `test_*.py`, `*_test.go`, `*.spec.ts` → test; step-1 exclusion-glob hits → generated/vendored; lockfiles, manifests, dotfiles → config). Works without modules too (flat/script repos): group by top-level directory or language.
|
|
19
|
+
If neither tool nor fallback works, degrade to file-count-only weight and note it in the report.
|
|
16
20
|
|
|
17
21
|
**Render:**
|
|
18
22
|
|
|
19
23
|
Module inventory table:
|
|
20
24
|
|
|
21
|
-
| Module | Path | Responsibility (one line, from evidence) | Deps out → | Fan-in |
|
|
22
|
-
| :---- | :---- | :---- | :---- | :---- |
|
|
25
|
+
| Module | Path | Responsibility (one line, from evidence) | Weight | Deps out → | Fan-in |
|
|
26
|
+
| :---- | :---- | :---- | :---- | :---- | :---- |
|
|
27
|
+
|
|
28
|
+
Weight bar: 10-cell `▓/░` bar proportional to the module's share of total weight, rounded to nearest cell, minimum 1 filled cell when weight > 0, followed by an integer percentage — e.g. `▓▓▓▓▓▓▓░░░ 67%`. Weight flags candidate targets for deeper levels; size ≠ complexity (a big cohesive module can be cheaper to map than a small hotspot).
|
|
23
29
|
|
|
24
30
|
Text dependency matrix (DSM-style). Rows depend on columns; mark `↑` for a dependency that skips a layer or points "backward" against the declared — or inferred (see collect step 4) — layering:
|
|
25
31
|
|
|
@@ -39,7 +45,7 @@ graph TD
|
|
|
39
45
|
jobs --> core
|
|
40
46
|
```
|
|
41
47
|
|
|
42
|
-
**Facts to surface:** layering violations (↑ marks), cycles, hub modules (highest fan-in/out), orphan modules (zero fan-in).
|
|
48
|
+
**Facts to surface:** layering violations (↑ marks), cycles, hub modules (highest fan-in/out), orphan modules (zero fan-in), bulk distribution (largest modules by weight; share of total).
|
|
43
49
|
|
|
44
50
|
## Meso — Module / Feature Wiring
|
|
45
51
|
|
|
@@ -97,3 +103,5 @@ RefundRequest{invoiceId, amount} → validated Amount → gateway response → L
|
|
|
97
103
|
```
|
|
98
104
|
|
|
99
105
|
**Facts to surface:** where purity ends (first I/O hop), total hops, state mutated, error paths encountered (report; do not evaluate their quality).
|
|
106
|
+
|
|
107
|
+
Decision record: macro maps encode scale as a proportional weight bar in the inventory table (treemap area-encoding, phronemophobic "Treemaps are awesome!") plus a Composition block, not as literal treemap graphics — the vendored Mermaid v9.4.3 has no treemap diagram (v11.5+ is ESM-only, CORS-blocked under `file://`) and an ASCII treemap is less diff-able than the bar column. (treemap evaluation, 2026-09-05)
|
|
@@ -12,9 +12,10 @@ You are the Gatekeeper of the Architecture. Before generating any code, always r
|
|
|
12
12
|
**Directives**:
|
|
13
13
|
1. FORBIDDEN: writing raw logic if a higher-level abstraction exists (no raw fetch() if useApi() exists, no inline error handling if handleError() exists, no raw CSS if a design system exists)
|
|
14
14
|
2. Add `// Reusing: [Name] — avoids duplicating [what]` comments when using existing abstractions
|
|
15
|
-
3.
|
|
15
|
+
3. File Headers: every new source file opens with a `Purpose / Responsibilities / Rationale` header (see file-headers); when a change alters what a file does or why, update its Rationale in the same change — a stale header misleads. If the Purpose can't be stated in one sentence, the file mixes concerns: flag it for splitting instead of writing a vague header
|
|
16
|
+
4. Refusal Protocol: if asked to violate architecture — STOP, explain the rule being violated, propose the resonant alternative instead
|
|
16
17
|
|
|
17
18
|
**Output structure for every response**:
|
|
18
19
|
1. Reuse Plan: "I will build X using [existing abstractions]. I need new code for [only what's new]."
|
|
19
20
|
2. Code (with Reusing comments)
|
|
20
|
-
3. Verification checklist: all abstractions reused? no raw logic where abstraction exists? style conventions followed?
|
|
21
|
+
3. Verification checklist: all abstractions reused? no raw logic where abstraction exists? style conventions followed? file headers present (new files) and current (changed files)?
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- skill: create-issues, version: 1.
|
|
1
|
+
<!-- skill: create-issues, version: 1.4.0, status: verified -->
|
|
2
2
|
# Tracer-Bullet Issue Creation from Plan
|
|
3
3
|
|
|
4
4
|
Break a reviewed plan into independently grabbable issues using tracer-bullet vertical slices.
|
|
@@ -45,6 +45,7 @@ You are a Technical Project Manager. Translate a plan, spec, or PRD into thin en
|
|
|
45
45
|
- end-to-end behavior description
|
|
46
46
|
- concrete file paths or subsystems when knowable
|
|
47
47
|
- binary acceptance criteria
|
|
48
|
+
- a **file-header criterion** when the slice creates source files or changes a file's contract: new files open with `Purpose / Responsibilities / Rationale`; contract-changing edits update Rationale (see `file-headers`)
|
|
48
49
|
- a **Verifiable Value Claim** where measurable: quantified **Must** gate (unit + number, no adjectives), a runnable **Meter** command, the measured **Baseline**, and the **regression suite** that must keep passing
|
|
49
50
|
- **anti-goals** whenever the ticket touches tests, lockfiles, or public interfaces (prohibit test-assertion edits, dependency additions, API breaks)
|
|
50
51
|
- explicit blocked-by field
|
|
@@ -83,6 +84,7 @@ You are a Technical Project Manager. Translate a plan, spec, or PRD into thin en
|
|
|
83
84
|
- **Workflow integrity:** TDD and Tidy First language is mandatory in every implementation issue.
|
|
84
85
|
- **No guessed IDs:** capture identifiers from actual command output.
|
|
85
86
|
- **Quantify the gate:** every measurable acceptance criterion is a number with a unit, backed by a runnable Meter command.
|
|
87
|
+
- **Self-describing files:** tickets that create source files or change a file's contract carry the file-header criterion (see `file-headers`).
|
|
86
88
|
- **Name the cheats:** add anti-goals wherever the gate could be gamed (test edits, new deps, API breaks).
|
|
87
89
|
- **Anchor staleness:** always record `base_commit` metadata at creation; never publish a ticket anchored to nothing.
|
|
88
90
|
- **Stop and ask:** if the plan only supports horizontal decomposition, propose a vertical rewrite before publishing.
|
|
@@ -43,6 +43,7 @@ Ref: [Link to plan/spec file and section]
|
|
|
43
43
|
- [ ] [Binary, observable criterion 1]
|
|
44
44
|
- [ ] [Binary, observable criterion 2]
|
|
45
45
|
- [ ] [Automated tests cover the slice end-to-end]
|
|
46
|
+
- [ ] [When the slice creates source files or changes a file's contract: file-header criterion — new files carry Purpose/Responsibilities/Rationale; changed files update Rationale (see `file-headers`)]
|
|
46
47
|
|
|
47
48
|
## Blocked by
|
|
48
49
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Full version: content/prompt-system-file-headers.md -->
|
|
2
|
+
You enforce file-header documentation on source code. Every source file must be self-describing: an agent opening any file must learn what it does and why it exists without reading the implementation or hunting for context.
|
|
3
|
+
|
|
4
|
+
**HEADER FORMAT** (adapt the comment syntax to the language — `#`, `//`, `--`, `"""docstring"""`, or a top doc comment):
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
# Purpose: <one sentence — what this file does and for whom>
|
|
8
|
+
# Responsibilities:
|
|
9
|
+
# - <bullet 1 — the cohesion contract; one concern per bullet>
|
|
10
|
+
# - <bullet N>
|
|
11
|
+
# Rationale: <latest design decision and why, with issue/PR link>
|
|
12
|
+
# <earlier rationale entries belong in the issue tracker / git history>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Rules:**
|
|
16
|
+
1. Every NEW source file opens with a complete header before any logic.
|
|
17
|
+
2. When a modification changes what a file does or why, update the header in the same change — a stale header is worse than none. Do not touch the header for behavior-preserving edits.
|
|
18
|
+
3. Purpose is one sentence. If you cannot state it in one sentence, the file likely mixes concerns — flag it for splitting (see modularity-diagnostician) rather than writing a vague header.
|
|
19
|
+
4. Rationale keeps only the latest entry. History lives in the issue tracker and git, not the file.
|
|
20
|
+
5. Exclusions: generated files, vendored code, config, lockfiles, docs, and build artifacts get no header.
|
|
21
|
+
|
|
22
|
+
**Scope — "source file" means:** files containing logic or defining structure written by this project (modules, classes, scripts, routes, components, tests). Not applicable to READMEs, org notes, or one-liner re-exports.
|
|
23
|
+
|
|
24
|
+
**Audit:** to find missing headers: `grep -rLE "(Purpose:|@purpose)" --include=<source-extensions> .` excluding vendored/generated paths. Every hit is a gap.
|
|
25
|
+
|
|
26
|
+
**Output:** when adding or updating headers, show file → header block. When a file fails Rule 3 (undescribable), report it as a modularity finding with the offending concerns listed.
|
|
@@ -11,6 +11,7 @@ Implement an approved plan using Red, Green, Refactor.
|
|
|
11
11
|
- Implement the minimum code to pass.
|
|
12
12
|
- Refactor while keeping tests green.
|
|
13
13
|
- Run the success criteria checks.
|
|
14
|
+
- Check file headers: new source files open with Purpose/Responsibilities/Rationale; files whose contract changed have a current Rationale (see `file-headers`).
|
|
14
15
|
- Update the plan with progress.
|
|
15
16
|
4. Use `references/verification-template.md` when reporting phase completion.
|
|
16
17
|
5. Use `references/common-situations.md` when the plan and reality diverge.
|
|
@@ -19,5 +20,6 @@ Implement an approved plan using Red, Green, Refactor.
|
|
|
19
20
|
|
|
20
21
|
- Never skip the red phase.
|
|
21
22
|
- Complete one phase at a time.
|
|
23
|
+
- Review file headers before declaring a phase complete: new files must carry them, and contract-changing edits must leave the Rationale current (see `file-headers`).
|
|
22
24
|
- Do not blindly follow an outdated plan if the codebase contradicts it.
|
|
23
25
|
- Wait for user confirmation before proceeding to the next phase.
|
|
@@ -5,6 +5,7 @@ Automated verification:
|
|
|
5
5
|
- [x] All tests pass
|
|
6
6
|
- [x] Type checking passes
|
|
7
7
|
- [x] Build succeeds
|
|
8
|
+
- [x] File headers current: new files carry Purpose/Responsibilities/Rationale; changed files updated Rationale (see `file-headers`)
|
|
8
9
|
|
|
9
10
|
Manual verification needed:
|
|
10
11
|
- [ ] [Manual step 1]
|
|
@@ -28,6 +28,7 @@ Treat the best issue sets as:
|
|
|
28
28
|
- minimal but sufficient dependency graphs
|
|
29
29
|
- explicit about AFK vs HITL work
|
|
30
30
|
- traceable back to stories, plans, or specs
|
|
31
|
+
- self-describing: tickets that create or reshape source files carry the file-header criterion (see `file-headers`) — undocumented files force agents to re-derive intent
|
|
31
32
|
- machine-verifiable value claims: quantified Must gate, runnable Meter, explicit anti-goals, and a `base_commit` anchor that reveals staleness
|
|
32
33
|
|
|
33
34
|
## Rules
|
|
@@ -4,6 +4,7 @@ Focus on:
|
|
|
4
4
|
- Can another developer or agent pick this up immediately?
|
|
5
5
|
- Are verification steps concrete and end-to-end?
|
|
6
6
|
- Is there a machine-checkable Must gate (quantified, unit + number) backed by a runnable Meter command?
|
|
7
|
+
- Are touched code files self-describing — Purpose/Responsibilities/Rationale header present and current (see `file-headers`)?
|
|
7
8
|
- Are priorities and labels sensible?
|
|
8
9
|
- Are HITL handoff points explicit?
|
|
9
10
|
- Is it clear what demo, test, or observable behavior proves completion?
|
|
@@ -15,6 +16,7 @@ Watch for:
|
|
|
15
16
|
- Qualitative acceptance criteria with no unit or threshold ("fast", "robust", "clean") — a Scale/Meter is missing
|
|
16
17
|
- A Meter command that cannot run at the ticket's `base_commit` (stale claim) or that no fresh agent could execute verbatim
|
|
17
18
|
- Missing anti-goals on tickets touching tests, lockfiles, or public interfaces (reward-hacking surface: nothing stops gaming the gate)
|
|
19
|
+
- Tickets that create or reshape source files with no file-header acceptance criterion — undocumented files force every implementing agent to re-derive intent
|
|
18
20
|
- No regression suite named (pass-to-pass coverage unspecified)
|
|
19
21
|
- HITL work masquerading as AFK
|
|
20
22
|
- Tickets that cannot be closed without information from another issue not listed as a blocker
|
|
@@ -23,6 +23,7 @@ Step 1 — Detect Modularity Signals: Read all files. Identify:
|
|
|
23
23
|
- High Afferent Coupling (Medium): module depended upon by many consumers — alterations trigger widespread ripple effects
|
|
24
24
|
- Temporal Coupling (Medium): files co-changing in commits despite no static dependency — reveals hidden dependencies (skip if no git/co-change data provided)
|
|
25
25
|
- Missing Boundary (Medium): related functionality spread across modules with no clear owning package
|
|
26
|
+
- Undescribable Module (Medium): a file's purpose cannot be stated in one sentence — the file-header Purpose is missing, stale, or forced to be vague (see `file-headers`). The header is the cohesion contract; needing three sentences means the module is doing three jobs
|
|
26
27
|
Note file, line range, and description for each.
|
|
27
28
|
|
|
28
29
|
Step 2 — Classify Modularity Scope: For each signal, assess:
|
|
@@ -41,5 +41,6 @@ Self-correction: on failure, attempt fix up to 3 times. If all 3 fail: run `git
|
|
|
41
41
|
- Run linter on modified files
|
|
42
42
|
- Run full test suite
|
|
43
43
|
- Add docstring to new abstraction: what it does, why it exists, parameters
|
|
44
|
+
- File headers: every touched source file has a `Purpose / Responsibilities / Rationale` header (see `file-headers`); contract-changing edits update the Rationale with this refactor's reason and issue link
|
|
44
45
|
|
|
45
|
-
**Completion Report**: files modified, verification pass/fail, linter pass/fail, tests pass/fail, abstraction documented, recommended next step.
|
|
46
|
+
**Completion Report**: files modified, verification pass/fail, linter pass/fail, tests pass/fail, abstraction documented, file headers updated, recommended next step.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- skill: tdd, version: 1.
|
|
1
|
+
<!-- skill: tdd, version: 1.2.0, status: verified -->
|
|
2
2
|
# Plan-Implement-Verify (TDD)
|
|
3
3
|
|
|
4
4
|
Implement features or fixes using a disciplined, phase-based Test-Driven Development (TDD) workflow to ensure correctness, testability, and incremental progress.
|
|
@@ -19,7 +19,7 @@ You are a TDD Practitioner. Your goal is to ensure that no code is written witho
|
|
|
19
19
|
* **Step 1: Write Failing Test (RED):** Write a test that describes the desired behavior. Run it and **confirm it fails** for the expected reason.
|
|
20
20
|
* **Step 2: Implement Minimal Code (GREEN):** Write the simplest code possible to make the test pass. Run tests to confirm they are green.
|
|
21
21
|
* **Step 3: Refactor If Needed:** Clean up the implementation while keeping tests green.
|
|
22
|
-
* **Step 4: Verify Phase Completion:** Run full automated suites (tests, type-check, lint)
|
|
22
|
+
* **Step 4: Verify Phase Completion:** Run full automated suites (tests, type-check, lint), perform manual verification, and confirm every new source file opens with a Purpose/Responsibilities/Rationale header and every file whose contract changed has a current Rationale (see `file-headers`).
|
|
23
23
|
* **Step 5: Inform User:** Present a summary of phase completion and wait for verification.
|
|
24
24
|
|
|
25
25
|
3. **Verification (CRITICAL):**
|
|
@@ -32,6 +32,7 @@ You are a TDD Practitioner. Your goal is to ensure that no code is written witho
|
|
|
32
32
|
- **One Phase at a Time:** Complete and verify a phase before starting the next.
|
|
33
33
|
- **Keep Tests Green:** Never leave the codebase in a failing state at the end of a turn.
|
|
34
34
|
- **Update Plan:** Mark phases as complete as you progress.
|
|
35
|
+
- **Self-Describing Files:** A phase is not complete if new files lack headers or contract-changing edits left headers stale (see `file-headers`).
|
|
35
36
|
|
|
36
37
|
## References
|
|
37
38
|
- **Templates:** Use `references/templates.md` for plans and phase completion summaries.
|
|
@@ -16,6 +16,7 @@ Use these criteria to evaluate the quality of a TDD session.
|
|
|
16
16
|
- [ ] Automated tests (unit, integration) cover new logic.
|
|
17
17
|
- [ ] No regressions introduced in existing functionality.
|
|
18
18
|
- [ ] Type-checking and linting are passing globally.
|
|
19
|
+
- [ ] New source files carry Purpose/Responsibilities/Rationale headers; changed files have current Rationale (see `file-headers`).
|
|
19
20
|
- [ ] Plan is updated to reflect current progress.
|
|
20
21
|
|
|
21
22
|
## When to Stop & Ask
|
|
@@ -1,97 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: whisper
|
|
3
|
-
description: "
|
|
3
|
+
description: "Deterministic knowledge workspace management: init, check, status, link plan, decommission, and knowledge routing. Delegates the mechanical steps to the turu CLI (whisper-vibes) when installed; manual fallbacks otherwise. Trigger when the user says '/whisper', '/w', 'init workspace', 'check workspace', 'workspace status', 'link plan', or 'decommission'."
|
|
4
4
|
tools: Read, Write, Edit, Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Whisper —
|
|
7
|
+
# Whisper — Deterministic Operational Knowledge
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> **This skill is a thin pointer.** The canonical, versioned copy ships with
|
|
10
|
+
> the `turu` CLI ([charly-vibes/whisper](https://github.com/charly-vibes/whisper),
|
|
11
|
+
> `cargo install whisper-vibes`) — install it with `turu skill install`.
|
|
12
|
+
> This file stays so agents without the binary have fallbacks.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
The `turu` CLI owns every mechanical step: canonical repo keys, branch slugs,
|
|
15
|
+
worktree slots, and scope routing. Same inputs, same outputs — no more
|
|
16
|
+
hand-rolled shell pipelines.
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
~/.whisper/
|
|
15
|
-
rules.md ← Global agent behavior rules (bd remember equiv)
|
|
18
|
+
## Decision procedure
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
env.md ← Repo-wide: deploy commands, infra facts, auth quirks
|
|
20
|
-
branches/
|
|
21
|
-
branch-slug/ ← One slot per branch (/ in name → -- in slug)
|
|
22
|
-
context.md ← Branch anchor: repo, branch, beads epic ID, status
|
|
23
|
-
plan.md ← Narrative implementation plan
|
|
24
|
-
notes.md ← Free-form scratch and findings
|
|
25
|
-
agents/ ← Optional sub-agent files when work is split across agents
|
|
26
|
-
worktrees/
|
|
27
|
-
worktree-name/ ← One slot per worktree (basename of worktree path)
|
|
28
|
-
env.md ← Worktree-specific: ports, venvs, credentials, local-only setup
|
|
29
|
-
```
|
|
20
|
+
1. **Is `turu` available?** Run `turu key --json`.
|
|
21
|
+
2. **If yes** — everything mechanical is a turu command:
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**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.
|
|
34
|
-
|
|
35
|
-
**Canonical repo key rule — derive it, never invent it:**
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|http://||;s|ssh://||;s|git@||;s|:|/|g;s|\.git$||')
|
|
39
|
-
[ -z "$repo_url" ] && repo_url="local/$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
`git@cv:org/repo.git` → `cv/org/repo`; `https://github.com/u/r` → `github.com/u/r`; no remote → `local/<repo-name>`. Colons always become slashes (keeps keys path-safe). The same key must come out of the same repo on every machine.
|
|
43
|
-
|
|
44
|
-
If a directory keyed some other way already exists for this repo (bare name like `genesis/`, owner-only like `charly-vibes/`, alias host with a colon like `cv:charly-vibes/`), do **not** add a fourth variant — route new knowledge into the canonical key and offer `/w consolidate` to migrate the legacy one.
|
|
45
|
-
|
|
46
|
-
## Knowledge Routing
|
|
47
|
-
|
|
48
|
-
When a session learns something worth keeping, route it by scope:
|
|
49
|
-
|
|
50
|
-
| Scope | Test | Destination |
|
|
51
|
-
|---|---|---|
|
|
52
|
-
| **Global** | True for every repo and every project | `~/.whisper/rules.md` — append, don't overwrite |
|
|
53
|
-
| **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 |
|
|
54
|
-
| **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 |
|
|
55
|
-
| **Worktree setup** | Credentials, service IDs, ports, venv/docker specifics for *this checkout* | `~/.whisper/repos/<host>/<repo>/worktrees/<name>/env.md` |
|
|
56
|
-
| **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` |
|
|
57
|
-
|
|
58
|
-
**Rules:**
|
|
59
|
-
- **No secrets anywhere.** Never write tokens, keys, passwords, or PII into `~/.whisper/`.
|
|
60
|
-
- **Extend, don't duplicate.** Append to or correct an existing note rather than creating a new one that says the same thing.
|
|
61
|
-
- **One repo, one key.** If more than one `repos/` directory belongs to the same repo, write into the canonical key and propose `/w consolidate` — never create a new variant.
|
|
62
|
-
- **Search first.** Before creating a new entry, check if one already exists for the same topic.
|
|
63
|
-
- If `bd` is not available, everything falls back to `~/.whisper/` files — there's no beads-backed alternative.
|
|
64
|
-
|
|
65
|
-
## Modes
|
|
66
|
-
|
|
67
|
-
Determine mode from how the skill is triggered:
|
|
68
|
-
|
|
69
|
-
| Trigger | Mode |
|
|
23
|
+
| Intent | Command |
|
|
70
24
|
|---|---|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
78
|
-
|
|
25
|
+
| Derive repo key / branch slug / worktree slot | `turu key --json` |
|
|
26
|
+
| Find the write destination for a scope | `turu resolve <scope> --json` |
|
|
27
|
+
| Record knowledge (extend, don't duplicate) | `turu append <scope> --text "..."` |
|
|
28
|
+
| Create the workspace layout | `turu init --json` |
|
|
29
|
+
| Inspect paths and existence | `turu status --json` |
|
|
30
|
+
| Validate / detect legacy keys | `turu check --json` · `turu doctor --json` |
|
|
31
|
+
| Refresh the AGENTS.md routing block | `turu sync --json` |
|
|
32
|
+
|
|
33
|
+
Scopes: `global` (rules.md), `repo` (env.md), `branch` (notes.md),
|
|
34
|
+
`worktree` (env.md), `group` (shared workspace for a set of repos).
|
|
35
|
+
If a `<!-- TURU:START -->` block exists in `AGENTS.md`, read the routing
|
|
36
|
+
map from there instead of re-deriving paths.
|
|
37
|
+
|
|
38
|
+
3. **If no** — use the manual fallbacks in `references/` (they remain the
|
|
39
|
+
source of truth for the shell-snippet procedures) and suggest
|
|
40
|
+
`cargo install whisper-vibes`.
|
|
41
|
+
|
|
42
|
+
## Invariants (with or without the binary)
|
|
43
|
+
|
|
44
|
+
- **No secrets anywhere.** Never write tokens, keys, passwords, or PII into
|
|
45
|
+
the workspace.
|
|
46
|
+
- **Extend, don't duplicate.** Append to or correct an existing note rather
|
|
47
|
+
than creating a new one that says the same thing.
|
|
48
|
+
- **One repo, one key.** The canonical key is a pure function of the remote
|
|
49
|
+
URL; never invent a variant.
|
|
50
|
+
- **Search first.** Before creating a new entry, check if one exists.
|
|
79
51
|
|
|
80
|
-
|
|
81
|
-
- `references/check.md`
|
|
82
|
-
- `references/status.md`
|
|
83
|
-
- `references/link.md`
|
|
84
|
-
- `references/decommission.md`
|
|
85
|
-
- `references/consolidate.md`
|
|
52
|
+
## Modes
|
|
86
53
|
|
|
87
|
-
|
|
54
|
+
`/w init` → `turu init` · `/w` or `/w status` → `turu status` ·
|
|
55
|
+
`/w check` → `turu check` · `/w link` → `subs/link-manual` (no CLI verb yet)
|
|
56
|
+
· `/w decommission` → `subs/decommission-manual` · `/w consolidate` →
|
|
57
|
+
`subs/consolidate-manual` (detection ships via `turu doctor`).
|
|
88
58
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- **`env.md` is shared and immutable across branch switches.** Never overwrite it during init or check — only create if absent.
|
|
93
|
-
- **Branch slug sanitization is mandatory.** Always run `sed 's|/|--|g'` on the branch name before using it as a directory path.
|
|
94
|
-
- **Worktree reuse across branches is normal, not an edge case.** Expect multiple slots to accumulate in `branches/` over time.
|
|
95
|
-
- **Legacy layout is still the common case.** Most worktrees never needed multiple branch slots — only migrate when a mismatch is detected.
|
|
96
|
-
- This skill is self-contained. Do not rely on `create-plan`, `park`, or `create-handoff` having `~/.whisper/` awareness.
|
|
97
|
-
- If `bd` is not initialized in the repo, skip beads steps gracefully and note what was skipped.
|
|
59
|
+
Manual procedures for each mode: `references/init.md`, `references/check.md`,
|
|
60
|
+
`references/status.md`, `references/link.md`, `references/decommission.md`,
|
|
61
|
+
`references/consolidate.md`.
|
package/content/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2026-09-
|
|
2
|
+
"version": "2026-09-15",
|
|
3
3
|
"schema_version": "1.1",
|
|
4
4
|
"prompts": [
|
|
5
5
|
{
|
|
@@ -3013,6 +3013,26 @@
|
|
|
3013
3013
|
"reviews"
|
|
3014
3014
|
]
|
|
3015
3015
|
},
|
|
3016
|
+
{
|
|
3017
|
+
"name": "file-headers",
|
|
3018
|
+
"type": "system",
|
|
3019
|
+
"title": "File Headers (Self-Describing Source Files)",
|
|
3020
|
+
"description": "Convention enforcing a Purpose/Responsibilities/Rationale header on every source file, so agents learn intent without reverse-engineering and undescribable files expose cohesion violations",
|
|
3021
|
+
"source": "content/prompt-system-file-headers.md",
|
|
3022
|
+
"distilled": "content/distilled/file-headers.md",
|
|
3023
|
+
"tags": [
|
|
3024
|
+
"documentation",
|
|
3025
|
+
"architecture",
|
|
3026
|
+
"modularity",
|
|
3027
|
+
"code-quality",
|
|
3028
|
+
"system-prompt",
|
|
3029
|
+
"rationale"
|
|
3030
|
+
],
|
|
3031
|
+
"bundles": [
|
|
3032
|
+
"refactoring",
|
|
3033
|
+
"documentation"
|
|
3034
|
+
]
|
|
3035
|
+
},
|
|
3016
3036
|
{
|
|
3017
3037
|
"name": "edge-case-discovery",
|
|
3018
3038
|
"type": "task",
|
|
@@ -3579,7 +3599,7 @@
|
|
|
3579
3599
|
"name": "whisper",
|
|
3580
3600
|
"type": "workflow",
|
|
3581
3601
|
"title": "Whisper — Accumulated Operational Knowledge",
|
|
3582
|
-
"description": "
|
|
3602
|
+
"description": "Deterministic knowledge workspace management: init, check, status, link plan, decommission, and knowledge routing. Thin pointer — delegates to the turu CLI (whisper-vibes) when installed, manual fallbacks otherwise",
|
|
3583
3603
|
"source": "content/prompt-workflow-whisper.md",
|
|
3584
3604
|
"distilled": "content/distilled/whisper/SKILL.md",
|
|
3585
3605
|
"skill_format": "progressive-disclosure",
|
|
@@ -3893,16 +3913,16 @@
|
|
|
3893
3913
|
],
|
|
3894
3914
|
"bundles": {
|
|
3895
3915
|
"essentials": {
|
|
3896
|
-
"description": "
|
|
3916
|
+
"description": "Daily-driver skills, selected by measured usage: the top 8 of the pi session skill-usage analysis (621 sessions, 43 repos, 2026-04..07) — commit, rule-of-5-universal, tdd, issue-review, debug, create-issues, create-handoff, grill-me",
|
|
3897
3917
|
"prompts": [
|
|
3898
3918
|
"commit",
|
|
3919
|
+
"rule-of-5-universal",
|
|
3920
|
+
"tdd",
|
|
3921
|
+
"issue-review",
|
|
3899
3922
|
"debug",
|
|
3900
|
-
"
|
|
3901
|
-
"code-review",
|
|
3902
|
-
"research-codebase",
|
|
3923
|
+
"create-issues",
|
|
3903
3924
|
"create-handoff",
|
|
3904
|
-
"
|
|
3905
|
-
"whisper"
|
|
3925
|
+
"grill-me"
|
|
3906
3926
|
]
|
|
3907
3927
|
},
|
|
3908
3928
|
"planning": {
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Shortcut for the file-headers skill. Convention enforcing a Purpose/Responsibilities/Rationale header on every source file, so agents learn intent without reverse-engineering and undescribable files expose cohesion violations"
|
|
3
|
+
---
|
|
4
|
+
<!-- installed-from: incitaciones -->
|
|
5
|
+
|
|
6
|
+
Use the installed `file-headers` skill for this task.
|
|
7
|
+
|
|
8
|
+
If the skill is not automatically loaded, invoke `/skill:file-headers` and follow it.
|
|
9
|
+
|
|
10
|
+
User context: $@
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Shortcut for the whisper skill.
|
|
2
|
+
description: "Shortcut for the whisper skill. Deterministic knowledge workspace management: init, check, status, link plan, decommission, and knowledge routing. Thin pointer — delegates to the turu CLI (whisper-vibes) when installed, manual fallbacks otherwise"
|
|
3
3
|
---
|
|
4
4
|
<!-- installed-from: incitaciones -->
|
|
5
5
|
|
|
@@ -14,14 +14,22 @@ tools: Read, Write, Edit, Glob, Bash
|
|
|
14
14
|
|
|
15
15
|
End the current session: log what was done, update tasks, route durable knowledge to `~/.whisper/`, commit and push, clear context.
|
|
16
16
|
|
|
17
|
-
Uses `$JOURNAL_PATH`
|
|
17
|
+
Uses `$JOURNAL_PATH` for the daily log journal, and `~/.whisper/` for accumulated operational knowledge. Agent shells run non-interactive and never source `.bashrc`, so the environment may be missing these exports — resolve both values per step 1 (env → shell config → convention → legacy fallback).
|
|
18
18
|
|
|
19
19
|
## Steps
|
|
20
20
|
|
|
21
21
|
1. Pull the journal repo:
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
# Non-interactive shells never source .bashrc, so $JOURNAL_PATH etc. are
|
|
24
|
+
# usually unset here. Source the config in a throwaway shell — bash itself
|
|
25
|
+
# handles comments, quotes, and nested vars ($JORNAL) — then fall back.
|
|
26
|
+
shellval() { bash -c 'source ~/.bashrc >/dev/null 2>&1; printf "%s\n" "${'"'$1'"'}"' 2>/dev/null; }
|
|
27
|
+
JOURNAL="${JOURNAL_PATH:-$(shellval JOURNAL_PATH)}"
|
|
28
|
+
[ -n "$JOURNAL" ] || JOURNAL="$(shellval JORNAL)"
|
|
29
|
+
[ -n "$JOURNAL" ] || JOURNAL="$HOME/para/areas/jornal" # JORNAL convention
|
|
30
|
+
[ -d "$JOURNAL/.git" ] || JOURNAL="$HOME/dev/status" # legacy clone; flag this fallback in the reply
|
|
31
|
+
LOG_SUBDIR="${JOURNAL_LOG_SUBDIR:-$(shellval JOURNAL_LOG_SUBDIR)}"
|
|
32
|
+
[ -n "$LOG_SUBDIR" ] || LOG_SUBDIR="areas/log"
|
|
25
33
|
cd "$JOURNAL" && git pull
|
|
26
34
|
```
|
|
27
35
|
|
|
@@ -4,7 +4,7 @@ description: "Multi-pass code review using Rule of 5 principle"
|
|
|
4
4
|
metadata:
|
|
5
5
|
installed-from: "incitaciones"
|
|
6
6
|
---
|
|
7
|
-
<!-- skill: code-review, version: 1.
|
|
7
|
+
<!-- skill: code-review, version: 1.3.0, status: verified -->
|
|
8
8
|
# Iterative Code Review (Rule of 5)
|
|
9
9
|
|
|
10
10
|
Perform a multi-pass, iterative code review using Steve Yegge's Rule of 5 to achieve high-quality refinement through breadth-first exploration.
|
|
@@ -8,7 +8,7 @@ Use these criteria to categorize findings and determine when the review process
|
|
|
8
8
|
| :--- | :--- | :--- |
|
|
9
9
|
| **CRITICAL** | Blocks merge. Severe security vulnerability, data loss risk, or fundamental logic failure. | SQL Injection, plaintext passwords, unhandled exceptions in core path. |
|
|
10
10
|
| **HIGH** | Should fix before merge. Significant performance issue, major regression risk, or violation of key requirements. | Missing index on hot query, non-singular requirement, missing error states. |
|
|
11
|
-
| **MEDIUM** | Consider addressing. Minor technical debt, sub-optimal pattern, or readability issues. | Magic strings, DRY violations, lack of docstrings, magic numbers. |
|
|
11
|
+
| **MEDIUM** | Consider addressing. Minor technical debt, sub-optimal pattern, or readability issues. | Magic strings, DRY violations, lack of docstrings, missing or stale file-header Purpose (see `file-headers`), magic numbers. |
|
|
12
12
|
| **LOW** | Nice to have. Stylistic improvements, minor metadata gaps, or typos in non-critical comments. | Minor formatting, redundant comments, small consistency improvements. |
|
|
13
13
|
|
|
14
14
|
## Convergence Criteria
|
|
@@ -47,4 +47,5 @@ Use these criteria to categorize findings and determine when the review process
|
|
|
47
47
|
### Stage 5: EXCELLENCE
|
|
48
48
|
- Performance optimization?
|
|
49
49
|
- Documentation polish?
|
|
50
|
+
- File headers: every touched source file's Purpose is present, one-sentence-accurate, and not stale; Rationale reflects the current design (see `file-headers`)?
|
|
50
51
|
- Style consistency?
|
|
@@ -12,10 +12,11 @@ Structure the final output by mode. All modes share the closing sections. Keep m
|
|
|
12
12
|
|
|
13
13
|
## Mode: macro
|
|
14
14
|
|
|
15
|
-
1. **Module inventory** — table (module, path, responsibility, deps out, fan-in)
|
|
15
|
+
1. **Module inventory** — table (module, path, responsibility, weight bar, deps out, fan-in)
|
|
16
16
|
2. **Dependency matrix** — text DSM with ↑ marks for layer violations
|
|
17
17
|
3. **Module graph** — Mermaid, edges labeled with counts
|
|
18
|
-
4.
|
|
18
|
+
4. **Composition** — disk-reality breakdown by file kind (source / test / generated / vendored / config), excluded code included; distinct from the inventory weight column (analysis code, exclusions applied)
|
|
19
|
+
5. Structural observations
|
|
19
20
|
|
|
20
21
|
## Mode: meso
|
|
21
22
|
|
|
@@ -65,7 +66,7 @@ One finding block per pattern (format in `smell-signatures.md`), ordered by seve
|
|
|
65
66
|
An explicit batch request ("generate all the reports", "map every module") is a user request — Zoom Discipline's offer-don't-dump rule applies to unprompted follow-ups only.
|
|
66
67
|
|
|
67
68
|
- Enumerate targets from the module inventory. Confirm the list once when it exceeds 3 targets or the scope is ambiguous; proceed unless corrected.
|
|
68
|
-
- One markdown per target in `docs/cartography/` — each the artifact of record for its target. For each, re-verify counts immediately before writing (Zoom Discipline).
|
|
69
|
+
- One markdown per target in `docs/cartography/` — each the artifact of record for its target. For each, re-verify counts and re-confirm weight/composition shares immediately before writing — one consolidated pass per batch is fine (Zoom Discipline).
|
|
69
70
|
- Include a health report only if the batch request names health/smells.
|
|
70
71
|
- A target too large for one pass: skip it, mark it as "offered — too large for one pass" in the final summary and, when HTML export is part of the batch, in `index.html`. Do not stop the batch to ask.
|
|
71
72
|
- Superseded artifacts from older exports (old-format HTML pages, render scripts): regenerate in place, recommend deleting the superseded script/pages, and never index stale-format files.
|
|
@@ -13,13 +13,19 @@ Adapt import syntax to the language (see language rule below).
|
|
|
13
13
|
2. Inter-module imports: scan import statements crossing module boundaries. Quoting-safe scan (works in POSIX shells), e.g. JS/TS: `rg 'from ["'"'"']' --type js --type ts` or simply `rg 'import|require'`; then filter by path.
|
|
14
14
|
3. Count edges per pair of modules to get a weighted dependency list.
|
|
15
15
|
4. Determine layering for violation flags: use the repo's declared layering (README/ARCHITECTURE/docs) if present; otherwise infer it from the majority dependency direction and label that inference in the report.
|
|
16
|
+
5. **Weight & composition:** size each module by LOC (default) or file count (mixed-language repos, where LOC is not comparable across languages). Tool: `tokei` (apply the step-1 globs via `tokei -e ...`, or `cloc`); fallback: `rg --files -0 <exclusion globs> | xargs -0 wc -l`, summed per module. Two distinct metrics:
|
|
17
|
+
- **Weight** (inventory column) — analysis code only, same exclusions as all counts (step 1).
|
|
18
|
+
- **Composition** (report block) — disk reality: all code grouped by kind (source / test / generated / vendored / config), excluded code included. Classify by path/name conventions (`tests/`, `test_*.py`, `*_test.go`, `*.spec.ts` → test; step-1 exclusion-glob hits → generated/vendored; lockfiles, manifests, dotfiles → config). Works without modules too (flat/script repos): group by top-level directory or language.
|
|
19
|
+
If neither tool nor fallback works, degrade to file-count-only weight and note it in the report.
|
|
16
20
|
|
|
17
21
|
**Render:**
|
|
18
22
|
|
|
19
23
|
Module inventory table:
|
|
20
24
|
|
|
21
|
-
| Module | Path | Responsibility (one line, from evidence) | Deps out → | Fan-in |
|
|
22
|
-
| :---- | :---- | :---- | :---- | :---- |
|
|
25
|
+
| Module | Path | Responsibility (one line, from evidence) | Weight | Deps out → | Fan-in |
|
|
26
|
+
| :---- | :---- | :---- | :---- | :---- | :---- |
|
|
27
|
+
|
|
28
|
+
Weight bar: 10-cell `▓/░` bar proportional to the module's share of total weight, rounded to nearest cell, minimum 1 filled cell when weight > 0, followed by an integer percentage — e.g. `▓▓▓▓▓▓▓░░░ 67%`. Weight flags candidate targets for deeper levels; size ≠ complexity (a big cohesive module can be cheaper to map than a small hotspot).
|
|
23
29
|
|
|
24
30
|
Text dependency matrix (DSM-style). Rows depend on columns; mark `↑` for a dependency that skips a layer or points "backward" against the declared — or inferred (see collect step 4) — layering:
|
|
25
31
|
|
|
@@ -39,7 +45,7 @@ graph TD
|
|
|
39
45
|
jobs --> core
|
|
40
46
|
```
|
|
41
47
|
|
|
42
|
-
**Facts to surface:** layering violations (↑ marks), cycles, hub modules (highest fan-in/out), orphan modules (zero fan-in).
|
|
48
|
+
**Facts to surface:** layering violations (↑ marks), cycles, hub modules (highest fan-in/out), orphan modules (zero fan-in), bulk distribution (largest modules by weight; share of total).
|
|
43
49
|
|
|
44
50
|
## Meso — Module / Feature Wiring
|
|
45
51
|
|
|
@@ -97,3 +103,5 @@ RefundRequest{invoiceId, amount} → validated Amount → gateway response → L
|
|
|
97
103
|
```
|
|
98
104
|
|
|
99
105
|
**Facts to surface:** where purity ends (first I/O hop), total hops, state mutated, error paths encountered (report; do not evaluate their quality).
|
|
106
|
+
|
|
107
|
+
Decision record: macro maps encode scale as a proportional weight bar in the inventory table (treemap area-encoding, phronemophobic "Treemaps are awesome!") plus a Composition block, not as literal treemap graphics — the vendored Mermaid v9.4.3 has no treemap diagram (v11.5+ is ESM-only, CORS-blocked under `file://`) and an ASCII treemap is less diff-able than the bar column. (treemap evaluation, 2026-09-05)
|
|
@@ -18,9 +18,10 @@ You are the Gatekeeper of the Architecture. Before generating any code, always r
|
|
|
18
18
|
**Directives**:
|
|
19
19
|
1. FORBIDDEN: writing raw logic if a higher-level abstraction exists (no raw fetch() if useApi() exists, no inline error handling if handleError() exists, no raw CSS if a design system exists)
|
|
20
20
|
2. Add `// Reusing: [Name] — avoids duplicating [what]` comments when using existing abstractions
|
|
21
|
-
3.
|
|
21
|
+
3. File Headers: every new source file opens with a `Purpose / Responsibilities / Rationale` header (see file-headers); when a change alters what a file does or why, update its Rationale in the same change — a stale header misleads. If the Purpose can't be stated in one sentence, the file mixes concerns: flag it for splitting instead of writing a vague header
|
|
22
|
+
4. Refusal Protocol: if asked to violate architecture — STOP, explain the rule being violated, propose the resonant alternative instead
|
|
22
23
|
|
|
23
24
|
**Output structure for every response**:
|
|
24
25
|
1. Reuse Plan: "I will build X using [existing abstractions]. I need new code for [only what's new]."
|
|
25
26
|
2. Code (with Reusing comments)
|
|
26
|
-
3. Verification checklist: all abstractions reused? no raw logic where abstraction exists? style conventions followed?
|
|
27
|
+
3. Verification checklist: all abstractions reused? no raw logic where abstraction exists? style conventions followed? file headers present (new files) and current (changed files)?
|
|
@@ -4,7 +4,7 @@ description: "Generate trackable issues from implementation plans"
|
|
|
4
4
|
metadata:
|
|
5
5
|
installed-from: "incitaciones"
|
|
6
6
|
---
|
|
7
|
-
<!-- skill: create-issues, version: 1.
|
|
7
|
+
<!-- skill: create-issues, version: 1.4.0, status: verified -->
|
|
8
8
|
# Tracer-Bullet Issue Creation from Plan
|
|
9
9
|
|
|
10
10
|
Break a reviewed plan into independently grabbable issues using tracer-bullet vertical slices.
|
|
@@ -51,6 +51,7 @@ You are a Technical Project Manager. Translate a plan, spec, or PRD into thin en
|
|
|
51
51
|
- end-to-end behavior description
|
|
52
52
|
- concrete file paths or subsystems when knowable
|
|
53
53
|
- binary acceptance criteria
|
|
54
|
+
- a **file-header criterion** when the slice creates source files or changes a file's contract: new files open with `Purpose / Responsibilities / Rationale`; contract-changing edits update Rationale (see `file-headers`)
|
|
54
55
|
- a **Verifiable Value Claim** where measurable: quantified **Must** gate (unit + number, no adjectives), a runnable **Meter** command, the measured **Baseline**, and the **regression suite** that must keep passing
|
|
55
56
|
- **anti-goals** whenever the ticket touches tests, lockfiles, or public interfaces (prohibit test-assertion edits, dependency additions, API breaks)
|
|
56
57
|
- explicit blocked-by field
|
|
@@ -89,6 +90,7 @@ You are a Technical Project Manager. Translate a plan, spec, or PRD into thin en
|
|
|
89
90
|
- **Workflow integrity:** TDD and Tidy First language is mandatory in every implementation issue.
|
|
90
91
|
- **No guessed IDs:** capture identifiers from actual command output.
|
|
91
92
|
- **Quantify the gate:** every measurable acceptance criterion is a number with a unit, backed by a runnable Meter command.
|
|
93
|
+
- **Self-describing files:** tickets that create source files or change a file's contract carry the file-header criterion (see `file-headers`).
|
|
92
94
|
- **Name the cheats:** add anti-goals wherever the gate could be gamed (test edits, new deps, API breaks).
|
|
93
95
|
- **Anchor staleness:** always record `base_commit` metadata at creation; never publish a ticket anchored to nothing.
|
|
94
96
|
- **Stop and ask:** if the plan only supports horizontal decomposition, propose a vertical rewrite before publishing.
|
|
@@ -43,6 +43,7 @@ Ref: [Link to plan/spec file and section]
|
|
|
43
43
|
- [ ] [Binary, observable criterion 1]
|
|
44
44
|
- [ ] [Binary, observable criterion 2]
|
|
45
45
|
- [ ] [Automated tests cover the slice end-to-end]
|
|
46
|
+
- [ ] [When the slice creates source files or changes a file's contract: file-header criterion — new files carry Purpose/Responsibilities/Rationale; changed files update Rationale (see `file-headers`)]
|
|
46
47
|
|
|
47
48
|
## Blocked by
|
|
48
49
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: file-headers
|
|
3
|
+
description: "Convention enforcing a Purpose/Responsibilities/Rationale header on every source file, so agents learn intent without reverse-engineering and undescribable files expose cohesion violations"
|
|
4
|
+
metadata:
|
|
5
|
+
installed-from: "incitaciones"
|
|
6
|
+
---
|
|
7
|
+
<!-- Full version: content/prompt-system-file-headers.md -->
|
|
8
|
+
You enforce file-header documentation on source code. Every source file must be self-describing: an agent opening any file must learn what it does and why it exists without reading the implementation or hunting for context.
|
|
9
|
+
|
|
10
|
+
**HEADER FORMAT** (adapt the comment syntax to the language — `#`, `//`, `--`, `"""docstring"""`, or a top doc comment):
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
# Purpose: <one sentence — what this file does and for whom>
|
|
14
|
+
# Responsibilities:
|
|
15
|
+
# - <bullet 1 — the cohesion contract; one concern per bullet>
|
|
16
|
+
# - <bullet N>
|
|
17
|
+
# Rationale: <latest design decision and why, with issue/PR link>
|
|
18
|
+
# <earlier rationale entries belong in the issue tracker / git history>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Rules:**
|
|
22
|
+
1. Every NEW source file opens with a complete header before any logic.
|
|
23
|
+
2. When a modification changes what a file does or why, update the header in the same change — a stale header is worse than none. Do not touch the header for behavior-preserving edits.
|
|
24
|
+
3. Purpose is one sentence. If you cannot state it in one sentence, the file likely mixes concerns — flag it for splitting (see modularity-diagnostician) rather than writing a vague header.
|
|
25
|
+
4. Rationale keeps only the latest entry. History lives in the issue tracker and git, not the file.
|
|
26
|
+
5. Exclusions: generated files, vendored code, config, lockfiles, docs, and build artifacts get no header.
|
|
27
|
+
|
|
28
|
+
**Scope — "source file" means:** files containing logic or defining structure written by this project (modules, classes, scripts, routes, components, tests). Not applicable to READMEs, org notes, or one-liner re-exports.
|
|
29
|
+
|
|
30
|
+
**Audit:** to find missing headers: `grep -rLE "(Purpose:|@purpose)" --include=<source-extensions> .` excluding vendored/generated paths. Every hit is a gap.
|
|
31
|
+
|
|
32
|
+
**Output:** when adding or updating headers, show file → header block. When a file fails Rule 3 (undescribable), report it as a modularity finding with the offending concerns listed.
|
|
@@ -17,6 +17,7 @@ Implement an approved plan using Red, Green, Refactor.
|
|
|
17
17
|
- Implement the minimum code to pass.
|
|
18
18
|
- Refactor while keeping tests green.
|
|
19
19
|
- Run the success criteria checks.
|
|
20
|
+
- Check file headers: new source files open with Purpose/Responsibilities/Rationale; files whose contract changed have a current Rationale (see `file-headers`).
|
|
20
21
|
- Update the plan with progress.
|
|
21
22
|
4. Use `references/verification-template.md` when reporting phase completion.
|
|
22
23
|
5. Use `references/common-situations.md` when the plan and reality diverge.
|
|
@@ -25,5 +26,6 @@ Implement an approved plan using Red, Green, Refactor.
|
|
|
25
26
|
|
|
26
27
|
- Never skip the red phase.
|
|
27
28
|
- Complete one phase at a time.
|
|
29
|
+
- Review file headers before declaring a phase complete: new files must carry them, and contract-changing edits must leave the Rationale current (see `file-headers`).
|
|
28
30
|
- Do not blindly follow an outdated plan if the codebase contradicts it.
|
|
29
31
|
- Wait for user confirmation before proceeding to the next phase.
|
|
@@ -5,6 +5,7 @@ Automated verification:
|
|
|
5
5
|
- [x] All tests pass
|
|
6
6
|
- [x] Type checking passes
|
|
7
7
|
- [x] Build succeeds
|
|
8
|
+
- [x] File headers current: new files carry Purpose/Responsibilities/Rationale; changed files updated Rationale (see `file-headers`)
|
|
8
9
|
|
|
9
10
|
Manual verification needed:
|
|
10
11
|
- [ ] [Manual step 1]
|
|
@@ -34,6 +34,7 @@ Treat the best issue sets as:
|
|
|
34
34
|
- minimal but sufficient dependency graphs
|
|
35
35
|
- explicit about AFK vs HITL work
|
|
36
36
|
- traceable back to stories, plans, or specs
|
|
37
|
+
- self-describing: tickets that create or reshape source files carry the file-header criterion (see `file-headers`) — undocumented files force agents to re-derive intent
|
|
37
38
|
- machine-verifiable value claims: quantified Must gate, runnable Meter, explicit anti-goals, and a `base_commit` anchor that reveals staleness
|
|
38
39
|
|
|
39
40
|
## Rules
|
|
@@ -4,6 +4,7 @@ Focus on:
|
|
|
4
4
|
- Can another developer or agent pick this up immediately?
|
|
5
5
|
- Are verification steps concrete and end-to-end?
|
|
6
6
|
- Is there a machine-checkable Must gate (quantified, unit + number) backed by a runnable Meter command?
|
|
7
|
+
- Are touched code files self-describing — Purpose/Responsibilities/Rationale header present and current (see `file-headers`)?
|
|
7
8
|
- Are priorities and labels sensible?
|
|
8
9
|
- Are HITL handoff points explicit?
|
|
9
10
|
- Is it clear what demo, test, or observable behavior proves completion?
|
|
@@ -15,6 +16,7 @@ Watch for:
|
|
|
15
16
|
- Qualitative acceptance criteria with no unit or threshold ("fast", "robust", "clean") — a Scale/Meter is missing
|
|
16
17
|
- A Meter command that cannot run at the ticket's `base_commit` (stale claim) or that no fresh agent could execute verbatim
|
|
17
18
|
- Missing anti-goals on tickets touching tests, lockfiles, or public interfaces (reward-hacking surface: nothing stops gaming the gate)
|
|
19
|
+
- Tickets that create or reshape source files with no file-header acceptance criterion — undocumented files force every implementing agent to re-derive intent
|
|
18
20
|
- No regression suite named (pass-to-pass coverage unspecified)
|
|
19
21
|
- HITL work masquerading as AFK
|
|
20
22
|
- Tickets that cannot be closed without information from another issue not listed as a blocker
|
|
@@ -29,6 +29,7 @@ Step 1 — Detect Modularity Signals: Read all files. Identify:
|
|
|
29
29
|
- High Afferent Coupling (Medium): module depended upon by many consumers — alterations trigger widespread ripple effects
|
|
30
30
|
- Temporal Coupling (Medium): files co-changing in commits despite no static dependency — reveals hidden dependencies (skip if no git/co-change data provided)
|
|
31
31
|
- Missing Boundary (Medium): related functionality spread across modules with no clear owning package
|
|
32
|
+
- Undescribable Module (Medium): a file's purpose cannot be stated in one sentence — the file-header Purpose is missing, stale, or forced to be vague (see `file-headers`). The header is the cohesion contract; needing three sentences means the module is doing three jobs
|
|
32
33
|
Note file, line range, and description for each.
|
|
33
34
|
|
|
34
35
|
Step 2 — Classify Modularity Scope: For each signal, assess:
|
|
@@ -47,5 +47,6 @@ Self-correction: on failure, attempt fix up to 3 times. If all 3 fail: run `git
|
|
|
47
47
|
- Run linter on modified files
|
|
48
48
|
- Run full test suite
|
|
49
49
|
- Add docstring to new abstraction: what it does, why it exists, parameters
|
|
50
|
+
- File headers: every touched source file has a `Purpose / Responsibilities / Rationale` header (see `file-headers`); contract-changing edits update the Rationale with this refactor's reason and issue link
|
|
50
51
|
|
|
51
|
-
**Completion Report**: files modified, verification pass/fail, linter pass/fail, tests pass/fail, abstraction documented, recommended next step.
|
|
52
|
+
**Completion Report**: files modified, verification pass/fail, linter pass/fail, tests pass/fail, abstraction documented, file headers updated, recommended next step.
|
|
@@ -4,7 +4,7 @@ description: "Test-driven development workflow"
|
|
|
4
4
|
metadata:
|
|
5
5
|
installed-from: "incitaciones"
|
|
6
6
|
---
|
|
7
|
-
<!-- skill: tdd, version: 1.
|
|
7
|
+
<!-- skill: tdd, version: 1.2.0, status: verified -->
|
|
8
8
|
# Plan-Implement-Verify (TDD)
|
|
9
9
|
|
|
10
10
|
Implement features or fixes using a disciplined, phase-based Test-Driven Development (TDD) workflow to ensure correctness, testability, and incremental progress.
|
|
@@ -25,7 +25,7 @@ You are a TDD Practitioner. Your goal is to ensure that no code is written witho
|
|
|
25
25
|
* **Step 1: Write Failing Test (RED):** Write a test that describes the desired behavior. Run it and **confirm it fails** for the expected reason.
|
|
26
26
|
* **Step 2: Implement Minimal Code (GREEN):** Write the simplest code possible to make the test pass. Run tests to confirm they are green.
|
|
27
27
|
* **Step 3: Refactor If Needed:** Clean up the implementation while keeping tests green.
|
|
28
|
-
* **Step 4: Verify Phase Completion:** Run full automated suites (tests, type-check, lint)
|
|
28
|
+
* **Step 4: Verify Phase Completion:** Run full automated suites (tests, type-check, lint), perform manual verification, and confirm every new source file opens with a Purpose/Responsibilities/Rationale header and every file whose contract changed has a current Rationale (see `file-headers`).
|
|
29
29
|
* **Step 5: Inform User:** Present a summary of phase completion and wait for verification.
|
|
30
30
|
|
|
31
31
|
3. **Verification (CRITICAL):**
|
|
@@ -38,6 +38,7 @@ You are a TDD Practitioner. Your goal is to ensure that no code is written witho
|
|
|
38
38
|
- **One Phase at a Time:** Complete and verify a phase before starting the next.
|
|
39
39
|
- **Keep Tests Green:** Never leave the codebase in a failing state at the end of a turn.
|
|
40
40
|
- **Update Plan:** Mark phases as complete as you progress.
|
|
41
|
+
- **Self-Describing Files:** A phase is not complete if new files lack headers or contract-changing edits left headers stale (see `file-headers`).
|
|
41
42
|
|
|
42
43
|
## References
|
|
43
44
|
- **Templates:** Use `references/templates.md` for plans and phase completion summaries.
|
|
@@ -16,6 +16,7 @@ Use these criteria to evaluate the quality of a TDD session.
|
|
|
16
16
|
- [ ] Automated tests (unit, integration) cover new logic.
|
|
17
17
|
- [ ] No regressions introduced in existing functionality.
|
|
18
18
|
- [ ] Type-checking and linting are passing globally.
|
|
19
|
+
- [ ] New source files carry Purpose/Responsibilities/Rationale headers; changed files have current Rationale (see `file-headers`).
|
|
19
20
|
- [ ] Plan is updated to reflect current progress.
|
|
20
21
|
|
|
21
22
|
## When to Stop & Ask
|
|
@@ -1,103 +1,67 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: whisper
|
|
3
|
-
description: "
|
|
3
|
+
description: "Deterministic knowledge workspace management: init, check, status, link plan, decommission, and knowledge routing. Thin pointer — delegates to the turu CLI (whisper-vibes) when installed, manual fallbacks otherwise"
|
|
4
4
|
metadata:
|
|
5
5
|
installed-from: "incitaciones"
|
|
6
6
|
---
|
|
7
7
|
---
|
|
8
8
|
name: whisper
|
|
9
|
-
description: "
|
|
9
|
+
description: "Deterministic knowledge workspace management: init, check, status, link plan, decommission, and knowledge routing. Delegates the mechanical steps to the turu CLI (whisper-vibes) when installed; manual fallbacks otherwise. Trigger when the user says '/whisper', '/w', 'init workspace', 'check workspace', 'workspace status', 'link plan', or 'decommission'."
|
|
10
10
|
tools: Read, Write, Edit, Bash
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# Whisper —
|
|
13
|
+
# Whisper — Deterministic Operational Knowledge
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
> **This skill is a thin pointer.** The canonical, versioned copy ships with
|
|
16
|
+
> the `turu` CLI ([charly-vibes/whisper](https://github.com/charly-vibes/whisper),
|
|
17
|
+
> `cargo install whisper-vibes`) — install it with `turu skill install`.
|
|
18
|
+
> This file stays so agents without the binary have fallbacks.
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
The `turu` CLI owns every mechanical step: canonical repo keys, branch slugs,
|
|
21
|
+
worktree slots, and scope routing. Same inputs, same outputs — no more
|
|
22
|
+
hand-rolled shell pipelines.
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
~/.whisper/
|
|
21
|
-
rules.md ← Global agent behavior rules (bd remember equiv)
|
|
24
|
+
## Decision procedure
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
```
|
|
26
|
+
1. **Is `turu` available?** Run `turu key --json`.
|
|
27
|
+
2. **If yes** — everything mechanical is a turu command:
|
|
36
28
|
|
|
37
|
-
|
|
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
|
-
**Canonical repo key rule — derive it, never invent it:**
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|http://||;s|ssh://||;s|git@||;s|:|/|g;s|\.git$||')
|
|
45
|
-
[ -z "$repo_url" ] && repo_url="local/$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")"
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
`git@cv:org/repo.git` → `cv/org/repo`; `https://github.com/u/r` → `github.com/u/r`; no remote → `local/<repo-name>`. Colons always become slashes (keeps keys path-safe). The same key must come out of the same repo on every machine.
|
|
49
|
-
|
|
50
|
-
If a directory keyed some other way already exists for this repo (bare name like `genesis/`, owner-only like `charly-vibes/`, alias host with a colon like `cv:charly-vibes/`), do **not** add a fourth variant — route new knowledge into the canonical key and offer `/w consolidate` to migrate the legacy one.
|
|
51
|
-
|
|
52
|
-
## Knowledge Routing
|
|
53
|
-
|
|
54
|
-
When a session learns something worth keeping, route it by scope:
|
|
55
|
-
|
|
56
|
-
| Scope | Test | Destination |
|
|
57
|
-
|---|---|---|
|
|
58
|
-
| **Global** | True for every repo and every project | `~/.whisper/rules.md` — append, don't overwrite |
|
|
59
|
-
| **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 |
|
|
60
|
-
| **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 |
|
|
61
|
-
| **Worktree setup** | Credentials, service IDs, ports, venv/docker specifics for *this checkout* | `~/.whisper/repos/<host>/<repo>/worktrees/<name>/env.md` |
|
|
62
|
-
| **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` |
|
|
63
|
-
|
|
64
|
-
**Rules:**
|
|
65
|
-
- **No secrets anywhere.** Never write tokens, keys, passwords, or PII into `~/.whisper/`.
|
|
66
|
-
- **Extend, don't duplicate.** Append to or correct an existing note rather than creating a new one that says the same thing.
|
|
67
|
-
- **One repo, one key.** If more than one `repos/` directory belongs to the same repo, write into the canonical key and propose `/w consolidate` — never create a new variant.
|
|
68
|
-
- **Search first.** Before creating a new entry, check if one already exists for the same topic.
|
|
69
|
-
- If `bd` is not available, everything falls back to `~/.whisper/` files — there's no beads-backed alternative.
|
|
70
|
-
|
|
71
|
-
## Modes
|
|
72
|
-
|
|
73
|
-
Determine mode from how the skill is triggered:
|
|
74
|
-
|
|
75
|
-
| Trigger | Mode |
|
|
29
|
+
| Intent | Command |
|
|
76
30
|
|---|---|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
84
|
-
|
|
31
|
+
| Derive repo key / branch slug / worktree slot | `turu key --json` |
|
|
32
|
+
| Find the write destination for a scope | `turu resolve <scope> --json` |
|
|
33
|
+
| Record knowledge (extend, don't duplicate) | `turu append <scope> --text "..."` |
|
|
34
|
+
| Create the workspace layout | `turu init --json` |
|
|
35
|
+
| Inspect paths and existence | `turu status --json` |
|
|
36
|
+
| Validate / detect legacy keys | `turu check --json` · `turu doctor --json` |
|
|
37
|
+
| Refresh the AGENTS.md routing block | `turu sync --json` |
|
|
38
|
+
|
|
39
|
+
Scopes: `global` (rules.md), `repo` (env.md), `branch` (notes.md),
|
|
40
|
+
`worktree` (env.md), `group` (shared workspace for a set of repos).
|
|
41
|
+
If a `<!-- TURU:START -->` block exists in `AGENTS.md`, read the routing
|
|
42
|
+
map from there instead of re-deriving paths.
|
|
43
|
+
|
|
44
|
+
3. **If no** — use the manual fallbacks in `references/` (they remain the
|
|
45
|
+
source of truth for the shell-snippet procedures) and suggest
|
|
46
|
+
`cargo install whisper-vibes`.
|
|
47
|
+
|
|
48
|
+
## Invariants (with or without the binary)
|
|
49
|
+
|
|
50
|
+
- **No secrets anywhere.** Never write tokens, keys, passwords, or PII into
|
|
51
|
+
the workspace.
|
|
52
|
+
- **Extend, don't duplicate.** Append to or correct an existing note rather
|
|
53
|
+
than creating a new one that says the same thing.
|
|
54
|
+
- **One repo, one key.** The canonical key is a pure function of the remote
|
|
55
|
+
URL; never invent a variant.
|
|
56
|
+
- **Search first.** Before creating a new entry, check if one exists.
|
|
85
57
|
|
|
86
|
-
|
|
87
|
-
- `references/check.md`
|
|
88
|
-
- `references/status.md`
|
|
89
|
-
- `references/link.md`
|
|
90
|
-
- `references/decommission.md`
|
|
91
|
-
- `references/consolidate.md`
|
|
58
|
+
## Modes
|
|
92
59
|
|
|
93
|
-
|
|
60
|
+
`/w init` → `turu init` · `/w` or `/w status` → `turu status` ·
|
|
61
|
+
`/w check` → `turu check` · `/w link` → `subs/link-manual` (no CLI verb yet)
|
|
62
|
+
· `/w decommission` → `subs/decommission-manual` · `/w consolidate` →
|
|
63
|
+
`subs/consolidate-manual` (detection ships via `turu doctor`).
|
|
94
64
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- **`env.md` is shared and immutable across branch switches.** Never overwrite it during init or check — only create if absent.
|
|
99
|
-
- **Branch slug sanitization is mandatory.** Always run `sed 's|/|--|g'` on the branch name before using it as a directory path.
|
|
100
|
-
- **Worktree reuse across branches is normal, not an edge case.** Expect multiple slots to accumulate in `branches/` over time.
|
|
101
|
-
- **Legacy layout is still the common case.** Most worktrees never needed multiple branch slots — only migrate when a mismatch is detected.
|
|
102
|
-
- This skill is self-contained. Do not rely on `create-plan`, `park`, or `create-handoff` having `~/.whisper/` awareness.
|
|
103
|
-
- If `bd` is not initialized in the repo, skip beads steps gracefully and note what was skipped.
|
|
65
|
+
Manual procedures for each mode: `references/init.md`, `references/check.md`,
|
|
66
|
+
`references/status.md`, `references/link.md`, `references/decommission.md`,
|
|
67
|
+
`references/consolidate.md`.
|
package/scripts/cli.mjs
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// Purpose: Install incitaciones skills from the manifest into agent tools (pi, Claude Code, Amp, Gemini CLI, etc.) from the command line.
|
|
3
|
+
// Responsibilities:
|
|
4
|
+
// - Resolve the manifest and bundles (npx incitaciones install [--bundle|--tool])
|
|
5
|
+
// - Copy distilled skills into each tool's expected directory layout
|
|
6
|
+
// - List available skills and show per-skill details (list, info)
|
|
7
|
+
// Rationale: standalone npm CLI (bin: scripts/cli.mjs) so installs don't require cloning the repo; manifest is the single source of truth for what ships (bd: incitaciones packaging).
|
|
8
|
+
|
|
2
9
|
/**
|
|
3
|
-
* incitaciones CLI — Install LLM agent skills across tools.
|
|
4
|
-
*
|
|
5
10
|
* Usage:
|
|
6
11
|
* npx incitaciones Install all skills (default)
|
|
7
12
|
* npx incitaciones install Install all skills
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// Purpose: Regenerate the pi-package resources (skills + prompts) from content/manifest.json for npm publishing.
|
|
3
|
+
// Responsibilities:
|
|
4
|
+
// - Reset and populate pi-package/skills and pi-package/prompts from the manifest's distilled entries
|
|
5
|
+
// - Run on v* tag pushes via .github/workflows/npm-publish.yml before publish
|
|
6
|
+
// Rationale: pi packages need a flat resource layout that differs from the repo's source+distilled duality; generating keeps the published form derived, never hand-maintained.
|
|
2
7
|
import fs from "node:fs";
|
|
3
8
|
import path from "node:path";
|
|
4
9
|
import { fileURLToPath } from "node:url";
|