@imix-js/taproot 0.7.0 → 0.8.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/dist/commands/dod.d.ts +2 -0
- package/dist/commands/dod.js +59 -2
- package/dist/commands/dod.js.map +1 -1
- package/dist/commands/init.js +24 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.js +8 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/core/dod-runner.d.ts +4 -0
- package/dist/core/dod-runner.js +102 -0
- package/dist/core/dod-runner.js.map +1 -1
- package/dist/core/dor-runner.js.map +1 -1
- package/dist/validators/types.d.ts +9 -0
- package/docs/agents.md +4 -1
- package/docs/cli.md +6 -2
- package/docs/configuration.md +24 -0
- package/docs/patterns.md +32 -0
- package/package.json +1 -1
- package/skills/backlog.md +7 -7
- package/skills/commit.md +37 -1
- package/skills/discover-truths.md +25 -11
- package/skills/discover.md +1 -1
- package/skills/guide.md +5 -1
- package/skills/implement.md +1 -1
- package/skills/next.md +63 -0
- package/skills/plan-analyse.md +81 -0
- package/skills/plan-execute.md +127 -0
- package/skills/plan.md +67 -34
- package/skills/research.md +6 -4
- package/skills/review-all.md +3 -3
- package/skills/status.md +4 -4
- package/skills/sweep.md +8 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Skill: plan-execute
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Execute items from `taproot/plan.md` one at a time (step-by-step) or in sequence (batch), with optional filters to process only `spec`+`refine` items (specify mode) or only `implement` items (implement mode).
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
- `mode` (optional): `step-by-step` (default), `batch`, `specify`, or `implement` — inferred from developer's natural language request if not explicit
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. **Check for plan.** If `taproot/plan.md` does not exist, report:
|
|
14
|
+
> *"No plan found — build one first with `/tr-plan`."*
|
|
15
|
+
Stop — no skills invoked.
|
|
16
|
+
|
|
17
|
+
2. **Read `taproot/plan.md`.** Collect all items and their current status.
|
|
18
|
+
|
|
19
|
+
3. **Detect mode** from the developer's request:
|
|
20
|
+
- *"execute next item"* / *"execute plan"* / *"run next"* → **step-by-step** (default)
|
|
21
|
+
- *"execute all"* / *"run all"* / *"batch"* → **batch**
|
|
22
|
+
- *"hitl only"* / *"run human items"* / *"interactive only"* → **hitl** (filter: `hitl` items only)
|
|
23
|
+
- *"afk only"* / *"run autonomous"* / *"implement automatically"* → **afk** (filter: `afk` items only)
|
|
24
|
+
- *"bring all to specified"* / *"run spec and refine only"* / *"specify mode"* → **specify** (filter: `spec` + `refine` types only)
|
|
25
|
+
- *"implement all specified"* / *"implement all"* / *"run implement only"* → **implement** (filter: `implement` type only)
|
|
26
|
+
- No mode specified (bare `/tr-plan-execute` or ambiguous): → **show orientation** (step 3a)
|
|
27
|
+
|
|
28
|
+
**3a. Orientation** (only when no mode is specified): count pending items by execution mode and present the mode menu:
|
|
29
|
+
```
|
|
30
|
+
Plan: N items pending (X hitl · Y afk)
|
|
31
|
+
|
|
32
|
+
How would you like to proceed?
|
|
33
|
+
[A] Step-by-step — one item at a time, confirm each (default)
|
|
34
|
+
[B] Batch — confirm full list upfront, then run all
|
|
35
|
+
[C] HITL only — human-decision items only
|
|
36
|
+
[D] AFK only — autonomous items only
|
|
37
|
+
[Q] Cancel
|
|
38
|
+
```
|
|
39
|
+
Wait for developer response, then continue with the chosen mode.
|
|
40
|
+
|
|
41
|
+
4. **Filter pending items** based on mode:
|
|
42
|
+
- *step-by-step / batch*: all `pending` items
|
|
43
|
+
- *hitl*: `pending` items labelled `hitl`; `afk` items remain `pending` untouched
|
|
44
|
+
- *afk*: `pending` items labelled `afk`; `hitl` items remain `pending` untouched
|
|
45
|
+
- *specify*: `pending` items where type is `[spec]` or `[refine]`; `[implement]` items remain `pending` untouched
|
|
46
|
+
- *implement*: `pending` items where type is `[implement]`; `[spec]` and `[refine]` items remain `pending` untouched
|
|
47
|
+
|
|
48
|
+
5. **Check for pending items.** If the filtered list is empty (no pending items matching the filter):
|
|
49
|
+
- If the overall plan has no `pending` items at all: report *"Plan is complete — no pending items. Build a new plan with `/tr-plan`."*
|
|
50
|
+
- If items exist but none match the filter: report *"No [hitl | afk | spec/refine | implement] items pending."*
|
|
51
|
+
Stop — no skills invoked.
|
|
52
|
+
|
|
53
|
+
6. **In batch mode**, present the full filtered list first and wait for confirmation:
|
|
54
|
+
```
|
|
55
|
+
Executing N items:
|
|
56
|
+
1. [spec] "description"
|
|
57
|
+
2. [implement] taproot/specs/<intent>/<behaviour>/
|
|
58
|
+
...
|
|
59
|
+
[A] Begin [Q] Abort
|
|
60
|
+
```
|
|
61
|
+
If `[Q]`: stop — no changes made.
|
|
62
|
+
|
|
63
|
+
7. **For each pending item** (in plan order, respecting the filter):
|
|
64
|
+
|
|
65
|
+
**a. Present the item** (always — even in batch mode, each item is shown before its skill runs):
|
|
66
|
+
```
|
|
67
|
+
Next: [implement] taproot/specs/<intent>/<behaviour>/ — <description>
|
|
68
|
+
Skill: /tr-implement
|
|
69
|
+
[A] Proceed [S] Skip [Q] Stop
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**b. In step-by-step mode**, wait for developer response:
|
|
73
|
+
- `[A]` or affirmative: proceed to c
|
|
74
|
+
- `[S]`: mark item `skipped` in `taproot/plan.md`; move to next item
|
|
75
|
+
- `[Q]`: stop — remaining items stay `pending`
|
|
76
|
+
|
|
77
|
+
**c. Invoke the skill** based on item type:
|
|
78
|
+
- `[spec]` → `/tr-behaviour <path> "<description>"`
|
|
79
|
+
- `[implement]` → `/tr-implement <path>`
|
|
80
|
+
- `[refine]` → `/tr-refine <path>`
|
|
81
|
+
|
|
82
|
+
**d. On skill completion**: invoke `/tr-commit` to commit the output. Once the commit succeeds, mark the item `done` in `taproot/plan.md`. If the commit fails or is aborted, treat as blocked (step e).
|
|
83
|
+
|
|
84
|
+
**e. On skill failure / unresolvable blocker**: mark the item `blocked` with a one-line note in `taproot/plan.md`. Report:
|
|
85
|
+
> *"Item blocked: <reason>. Remaining items are unaffected."*
|
|
86
|
+
- *Step-by-step*: offer `[A] Continue to next · [D] Stop`
|
|
87
|
+
- *Batch*: pause and wait for developer to resolve before continuing
|
|
88
|
+
|
|
89
|
+
**f. In step-by-step mode**, after each completed item:
|
|
90
|
+
```
|
|
91
|
+
✓ Done — <description>
|
|
92
|
+
M items remaining.
|
|
93
|
+
[A] Continue to next [D] Stop for now
|
|
94
|
+
```
|
|
95
|
+
- `[A]`: continue to next item
|
|
96
|
+
- `[D]` or no items remain: report final status (see step 8)
|
|
97
|
+
|
|
98
|
+
**g. In batch mode**: mark done and proceed to next item without waiting.
|
|
99
|
+
|
|
100
|
+
8. **Report final status** when done or stopped:
|
|
101
|
+
- All items executed: *"Plan complete — all N items executed."*
|
|
102
|
+
- Stopped early: *"Stopped after N items — M items remaining."*
|
|
103
|
+
- HITL pass: *"HITL pass complete — N items done. M afk items remain pending."*
|
|
104
|
+
- AFK pass: *"AFK pass complete — N items done. M hitl items remain pending."*
|
|
105
|
+
- Specify pass: *"Specify pass complete — N items done. M implement items remain pending."*
|
|
106
|
+
- Implement pass: *"Implement pass complete — N items done. M spec/refine items remain pending."*
|
|
107
|
+
|
|
108
|
+
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next item.
|
|
109
|
+
|
|
110
|
+
**What's next?**
|
|
111
|
+
[A] Continue executing — call `/tr-plan-execute` again for remaining items
|
|
112
|
+
[B] `/tr-plan` — add more items to the plan
|
|
113
|
+
|
|
114
|
+
## Output
|
|
115
|
+
|
|
116
|
+
Updates `taproot/plan.md` in-place — replaces `pending` with `done`, `skipped`, `blocked`, or `stale` for each processed item.
|
|
117
|
+
|
|
118
|
+
## CLI Dependencies
|
|
119
|
+
|
|
120
|
+
None
|
|
121
|
+
|
|
122
|
+
## Notes
|
|
123
|
+
|
|
124
|
+
- In batch mode, the developer confirms the whole list up-front. The agent still presents each item before invoking its skill — per-item visibility is preserved.
|
|
125
|
+
- Specify and implement modes are filters, not separate modes. Filtered-out items stay `pending` (not `skipped`) so they can be processed in a later pass.
|
|
126
|
+
- A typical two-pass workflow: run specify mode to bring all specs to `specified`, then run implement mode to code them all.
|
|
127
|
+
- Autonomous execution (agent works through all items without any human confirmation) is explicitly out of scope.
|
package/skills/plan.md
CHANGED
|
@@ -1,63 +1,96 @@
|
|
|
1
|
-
# Skill: plan
|
|
1
|
+
# Skill: plan-build
|
|
2
2
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Build a persistent implementation plan (`taproot/plan.md`) from backlog items, unimplemented hierarchy behaviours, or developer-supplied items. Each item is typed (`spec`, `implement`, or `refine`) and sequenced so prerequisites come first.
|
|
6
6
|
|
|
7
7
|
## Inputs
|
|
8
8
|
|
|
9
|
-
- `
|
|
9
|
+
- `source` (optional): `backlog`, `hierarchy`, or leave blank to let the developer specify in natural language
|
|
10
10
|
|
|
11
11
|
## Steps
|
|
12
12
|
|
|
13
|
-
1. **
|
|
13
|
+
1. **Determine sources.** Read the developer's request and identify which sources to scan:
|
|
14
|
+
- **backlog** — read `taproot/backlog.md`; filter to actionable items
|
|
15
|
+
- **hierarchy** — run `node dist/cli.js coverage` to find unimplemented or in-progress behaviours
|
|
16
|
+
- **explicit** — use the items the developer named directly, without scanning
|
|
14
17
|
|
|
15
|
-
2.
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
18
|
+
2. **Collect candidates.** For each source:
|
|
19
|
+
- *backlog*: read `taproot/backlog.md`, one item per bullet/line. Skip blank lines and dated metadata lines. If `taproot/backlog.md` is absent, note *"backlog.md not found, treating as empty"* and continue.
|
|
20
|
+
- *hierarchy*: run `node dist/cli.js coverage` and collect behaviours whose state is `proposed` (→ `refine`) or have no implementation yet (→ `implement` if usecase.md is `specified`, else → `spec`).
|
|
21
|
+
- *explicit*: collect items the developer named; resolve each to a hierarchy path if one exists, or mark as `spec` if it doesn't.
|
|
19
22
|
|
|
20
|
-
3.
|
|
23
|
+
3. **Classify each candidate by type and execution mode:**
|
|
24
|
+
- Type:
|
|
25
|
+
- **`spec`** — no `usecase.md` exists yet; first action is to write one with `/tr-behaviour`
|
|
26
|
+
- **`implement`** — a `usecase.md` exists and is in `specified` state; ready to code
|
|
27
|
+
- **`refine`** — a `usecase.md` exists but is in `proposed` or `draft` state; needs `/tr-refine` before implementing
|
|
28
|
+
- Execution mode:
|
|
29
|
+
- **`hitl`** (human-in-the-loop) — requires a human decision, design choice, or external action before or during execution. Signals: open-ended design, naming decisions, external setup (accounts, secrets, infrastructure), architectural trade-offs, or vague success criteria.
|
|
30
|
+
- **`afk`** (away-from-keyboard) — agent can execute autonomously; success criteria are fully derivable from an existing spec with no open questions.
|
|
31
|
+
- Default heuristics: `spec` → `hitl`; `refine` → `hitl`; `implement` → `afk` unless the impl has known external blockers or unresolved design questions.
|
|
21
32
|
|
|
22
|
-
|
|
33
|
+
4. **Sequence candidates.** `spec` and `refine` items that are prerequisites for `implement` items appear earlier in the list. Otherwise preserve source order.
|
|
23
34
|
|
|
24
|
-
|
|
35
|
+
5. **Present the proposed plan for review:**
|
|
36
|
+
```
|
|
37
|
+
Proposed plan — N items:
|
|
38
|
+
1. hitl [spec] "description of new item"
|
|
39
|
+
2. hitl [refine] taproot/specs/<intent>/<behaviour>/usecase.md
|
|
40
|
+
3. afk [implement] taproot/specs/<intent>/<behaviour>/
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
[A] Confirm [E] Edit directly then reply A [Q] Abort
|
|
43
|
+
```
|
|
44
|
+
Wait for developer response. Do not write any files before confirmation.
|
|
45
|
+
|
|
46
|
+
6. **Handle developer choice:**
|
|
47
|
+
- **[E]**: wait for the developer to paste an edited list in the conversation, then treat it as the confirmed plan and continue to step 7.
|
|
48
|
+
- **[Q]**: stop — no files written.
|
|
49
|
+
- **[A]** or any affirmative: continue to step 7.
|
|
50
|
+
|
|
51
|
+
7. **Check for existing plan.** If `taproot/plan.md` already exists:
|
|
52
|
+
- Report: *"A plan already exists with N items."*
|
|
53
|
+
- Offer: `[A] Append new items · [R] Replace · [Q] Abort`
|
|
54
|
+
- **[A]**: append only items not already present (match by type + path/description).
|
|
55
|
+
- **[R]**: replace the file with the new plan.
|
|
56
|
+
- **[Q]**: stop — no files modified.
|
|
57
|
+
|
|
58
|
+
8. **Write `taproot/plan.md`** using this format:
|
|
59
|
+
```
|
|
60
|
+
# Taproot Plan
|
|
29
61
|
|
|
30
|
-
|
|
62
|
+
_Built: YYYY-MM-DD — N items_
|
|
63
|
+
_HITL = human decision required · AFK = agent executes autonomously_
|
|
31
64
|
|
|
32
|
-
|
|
33
|
-
> "Next recommended slice: **`<behaviour-path>`** (`<intent goal>`)"
|
|
34
|
-
> "Classification: AFK — spec is complete, no design decisions required."
|
|
35
|
-
> "To implement: `/tr-implement taproot/<behaviour-path>/`"
|
|
36
|
-
>
|
|
37
|
-
> **[Y]** Implement this **[L]** Show full list **[S]** Skip to a different behaviour
|
|
65
|
+
## Items
|
|
38
66
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
67
|
+
1. pending [spec] hitl "description of new item"
|
|
68
|
+
2. pending [implement] afk taproot/specs/<intent>/<behaviour>/
|
|
69
|
+
3. pending [refine] hitl taproot/specs/<intent>/<behaviour>/usecase.md
|
|
70
|
+
```
|
|
42
71
|
|
|
43
|
-
|
|
44
|
-
> "The next unimplemented behaviour is HITL — the spec needs clarification before an agent can proceed autonomously."
|
|
45
|
-
> "Behaviour: `<path>`"
|
|
72
|
+
Status values: `pending` · `done` · `skipped` · `blocked` · `stale`
|
|
46
73
|
|
|
47
|
-
|
|
74
|
+
9. **Remove consumed backlog items.** If any plan items were sourced from `taproot/backlog.md`, remove those lines from the file and report: *"Removed N item(s) from `taproot/backlog.md`."* Skip this step if no backlog items were used or if `taproot/backlog.md` is absent.
|
|
48
75
|
|
|
49
|
-
|
|
76
|
+
10. Confirm: *"Plan saved — N items in `taproot/plan.md`."*
|
|
77
|
+
|
|
78
|
+
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next task.
|
|
79
|
+
|
|
80
|
+
**What's next?**
|
|
81
|
+
[A] `/tr-plan-analyse` — check readiness of all items before executing
|
|
82
|
+
[B] `/tr-plan-execute` — start executing items one by one
|
|
50
83
|
|
|
51
84
|
## Output
|
|
52
85
|
|
|
53
|
-
|
|
86
|
+
`taproot/plan.md` — an ordered list of typed, status-tracked action items.
|
|
54
87
|
|
|
55
88
|
## CLI Dependencies
|
|
56
89
|
|
|
57
|
-
- `taproot
|
|
90
|
+
- `taproot coverage`
|
|
58
91
|
|
|
59
92
|
## Notes
|
|
60
93
|
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
94
|
+
- Backlog removal applies only to items sourced from `taproot/backlog.md` — explicit items and hierarchy items have no backlog entry to remove.
|
|
95
|
+
- Dependency ordering is inferred by the agent, not formally declared in the plan file.
|
|
96
|
+
- Autonomous execution of plan items is out of scope — see `/tr-plan-execute` for confirmed step-by-step execution.
|
package/skills/research.md
CHANGED
|
@@ -55,9 +55,10 @@ Research any domain or technical subject before writing a behaviour spec — by
|
|
|
55
55
|
- <insight 2>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
6. **
|
|
59
|
-
- **
|
|
60
|
-
- **
|
|
58
|
+
6. **Mode selection** — ask: `"How should I use what I've found?"`
|
|
59
|
+
- **[A] Extract my knowledge** → delegate to `/tr-grill-me` seeded with the preliminary synthesis as grilling material. Questions should reference specific findings — library names, paper conclusions, known trade-offs — not generic topic questions. Terminate when the developer says `[Done]` or after ≤3 rounds where no new information is surfacing. Incorporate the developer's answers into the synthesis.
|
|
60
|
+
- **[B] Help me think through the design** → present the key trade-offs, open questions, and competing options surfaced by the research; engage the developer in a structured design discussion; capture agreed choices and rationale in a `## Design Decisions` section appended to the synthesis.
|
|
61
|
+
- **[C] The synthesis is enough** → proceed with the gathered synthesis as-is.
|
|
61
62
|
|
|
62
63
|
7. **Present the final structured research summary:**
|
|
63
64
|
```
|
|
@@ -118,5 +119,6 @@ None — pure agent skill. Uses agent tools: file reading (local scan), web sear
|
|
|
118
119
|
- **Graceful degradation:** if both local resources and web search produce nothing, and no expert is available, announce: `"No research sources available."` Ask whether to proceed with the spec based on the stated requirement alone, or abort. Never silently produce an empty synthesis.
|
|
119
120
|
- **Slug derivation:** kebab-case the topic words, drop stop words, keep max 4 words. `"satellite tracking algorithm"` → `satellite-tracking-algorithm`. Confirm with the developer before writing.
|
|
120
121
|
- **Refresh merges, not overwrites:** when `[R]efresh` is chosen, append new citations to the References section, update Key conclusions, and add a `Last refreshed:` date — do not discard prior expert insights.
|
|
121
|
-
- **
|
|
122
|
+
- **Knowledge extraction ([A]) is domain-aware:** the grill session is seeded with what was actually found, not generic questions. If the synthesis found `satellite.js`, ask about its limitations, alternatives, and when it breaks — not `"what do you know about satellite tracking?"`. Either an expert or a well-informed practitioner can choose [A] — it is about contributing knowledge, not claiming expertise.
|
|
123
|
+
- **Design assistance ([B]) uses the research as grounding:** trade-offs, competing options, and open questions come from the actual findings — not hypothetical concerns. The `## Design Decisions` section captures what was agreed and why.
|
|
122
124
|
- `/tr-research` is the Claude Code adapter command name for this skill.
|
package/skills/review-all.md
CHANGED
|
@@ -68,7 +68,7 @@ Run a comprehensive review of an entire subtree — an intent and all its descen
|
|
|
68
68
|
|
|
69
69
|
8. **Truth discovery pass** — if `taproot/global-truths/` exists and the hierarchy has 3 or more readable `intent.md`/`usecase.md` files (excluding `global-truths/`):
|
|
70
70
|
|
|
71
|
-
Run the same scan as `/tr-discover-truths` (Phase 2–3 of that skill): collect candidates not already defined in `global-truths/` and not suppressed by `taproot/
|
|
71
|
+
Run the same scan as `/tr-discover-truths` (Phase 2–3 of that skill): collect candidates not already defined in `global-truths/` and not suppressed by `taproot/backlog.md` dismissed entries.
|
|
72
72
|
|
|
73
73
|
If candidates are found, append to the report:
|
|
74
74
|
|
|
@@ -86,7 +86,7 @@ Run a comprehensive review of an entire subtree — an intent and all its descen
|
|
|
86
86
|
|
|
87
87
|
**If [P]:** invoke `/tr-discover-truths` inline; return here when it completes.
|
|
88
88
|
|
|
89
|
-
**If [D]:** append each candidate to `taproot/
|
|
89
|
+
**If [D]:** append each candidate to `taproot/backlog.md` as `- [YYYY-MM-DD] truth candidate: <term>`.
|
|
90
90
|
|
|
91
91
|
If no candidates found (hierarchy consistent with existing truths), append to report:
|
|
92
92
|
```
|
|
@@ -100,7 +100,7 @@ Run a comprehensive review of an entire subtree — an intent and all its descen
|
|
|
100
100
|
|
|
101
101
|
**What's next?**
|
|
102
102
|
[A] `/tr-refine <highest-priority-path>` — fix the top-priority finding
|
|
103
|
-
[B] `/tr-
|
|
103
|
+
[B] `/tr-next` — surface the next implementable behaviour
|
|
104
104
|
[C] `/tr-backlog <finding>` — capture a deferred finding before routing it to the hierarchy
|
|
105
105
|
|
|
106
106
|
## Output
|
package/skills/status.md
CHANGED
|
@@ -76,15 +76,15 @@ Generated: <date>
|
|
|
76
76
|
**What's next?**
|
|
77
77
|
[A] `/tr-implement taproot/<intent>/<behaviour>/` — implement unimplemented behaviour
|
|
78
78
|
[B] `/tr-refine taproot/<intent>/<behaviour>/` — add missing tests
|
|
79
|
-
[C] `/tr-
|
|
79
|
+
[C] `/tr-next` — pick a different next item
|
|
80
80
|
|
|
81
|
-
- **If no specific items were found** (healthy project): check whether `taproot/
|
|
81
|
+
- **If no specific items were found** (healthy project): check whether `taproot/backlog.md` exists and contains items. Show the generic fallback menu:
|
|
82
82
|
|
|
83
83
|
**What's next?**
|
|
84
|
-
[A] `/tr-
|
|
84
|
+
[A] `/tr-next` — pick the next behaviour to implement
|
|
85
85
|
[B] `/tr-ineed` — route a new requirement into the hierarchy
|
|
86
86
|
[C] `/tr-review-all` — deeper semantic review of specs
|
|
87
|
-
[D] `/tr-backlog` — triage captured ideas (only if `taproot/
|
|
87
|
+
[D] `/tr-backlog` — triage captured ideas (only if `taproot/backlog.md` is non-empty)
|
|
88
88
|
|
|
89
89
|
## Output
|
|
90
90
|
|
package/skills/sweep.md
CHANGED
|
@@ -12,6 +12,11 @@ Apply a uniform task to a filtered set of hierarchy files — enumerate matching
|
|
|
12
12
|
|
|
13
13
|
## Steps
|
|
14
14
|
|
|
15
|
+
0. Check for `.taproot/sessions/sweep-status.md`. If found, present:
|
|
16
|
+
> "A previous sweep session exists (N done, M remaining, task: `<task>`). [A] Resume [R] Restart"
|
|
17
|
+
- **[A] Resume**: load the stored task description and file list; skip files already marked `[x]`; continue from the first `[ ]` file. Proceed directly to step 4.
|
|
18
|
+
- **[R] Restart**: overwrite the status file from scratch and run the full flow from step 1.
|
|
19
|
+
|
|
15
20
|
1. Read the task description and determine the target file type(s):
|
|
16
21
|
- If the developer mentions "all usecases" / "every usecase" → filter to `usecase.md` files
|
|
17
22
|
- If the developer mentions "all intents" / "every intent" → filter to `intent.md` files
|
|
@@ -44,10 +49,11 @@ Apply a uniform task to a filtered set of hierarchy files — enumerate matching
|
|
|
44
49
|
4. For each file in the confirmed list, process it in-session:
|
|
45
50
|
a. Read the file to understand its current content
|
|
46
51
|
b. Apply the task directly — edit the file in place
|
|
47
|
-
c.
|
|
52
|
+
c. Mark the file complete and output progress:
|
|
48
53
|
```
|
|
49
54
|
[x] taproot/intent-a/behaviour-b/usecase.md
|
|
50
55
|
```
|
|
56
|
+
d. Write the updated checklist (task description + full file list with current `[x]`/`[ ]` state) to `.taproot/sessions/sweep-status.md`. This persists progress so the session can be resumed if interrupted.
|
|
51
57
|
|
|
52
58
|
**For tasks requiring codebase exploration** (e.g. "add ACs from existing tests", "fill in missing fields from source code"), before processing each file:
|
|
53
59
|
- Identify **where to look**: explicit directory paths relevant to the file (e.g. `test/integration/`, `src/commands/`)
|
|
@@ -61,6 +67,7 @@ Apply a uniform task to a filtered set of hierarchy files — enumerate matching
|
|
|
61
67
|
|
|
62
68
|
5. After all files are processed, show a summary:
|
|
63
69
|
> "Sweep complete — N files processed: M modified, K skipped"
|
|
70
|
+
Delete `.taproot/sessions/sweep-status.md` (clean completion — no resume needed).
|
|
64
71
|
|
|
65
72
|
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next task.
|
|
66
73
|
|