@imix-js/taproot 0.6.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/README.md +1 -1
- package/dist/adapters/index.js +62 -35
- package/dist/adapters/index.js.map +1 -1
- package/dist/cli.js +8 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/commithook.js +7 -1
- package/dist/commands/commithook.js.map +1 -1
- 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.d.ts +4 -2
- package/dist/commands/init.js +118 -38
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/truth-sign.js +3 -1
- package/dist/commands/truth-sign.js.map +1 -1
- package/dist/commands/update.js +161 -27
- package/dist/commands/update.js.map +1 -1
- package/dist/core/config.js +9 -4
- package/dist/core/config.js.map +1 -1
- package/dist/core/configuration.d.ts +4 -3
- package/dist/core/configuration.js +7 -5
- package/dist/core/configuration.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/core/fs-walker.js +1 -1
- package/dist/core/fs-walker.js.map +1 -1
- package/dist/core/paths.d.ts +6 -0
- package/dist/core/paths.js +12 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/test-cache.js +1 -1
- package/dist/core/test-cache.js.map +1 -1
- package/dist/core/version-check.d.ts +9 -0
- package/dist/core/version-check.js +43 -0
- package/dist/core/version-check.js.map +1 -0
- package/dist/validators/structure-rules.js +1 -1
- package/dist/validators/structure-rules.js.map +1 -1
- package/dist/validators/types.d.ts +9 -0
- package/docs/agents.md +6 -3
- package/docs/architecture.md +3 -3
- package/docs/cli.md +13 -9
- package/docs/configuration.md +30 -6
- package/docs/patterns.md +39 -7
- package/docs/security.md +4 -4
- package/docs/workflows.md +1 -1
- package/package.json +1 -1
- package/skills/backlog.md +7 -7
- package/skills/behaviour.md +2 -2
- package/skills/bug.md +2 -2
- package/skills/commit.md +40 -4
- package/skills/discover-truths.md +26 -12
- package/skills/discover.md +1 -1
- package/skills/guide.md +5 -1
- package/skills/implement.md +6 -6
- package/skills/ineed.md +4 -4
- 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/refine.md +3 -3
- 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
package/skills/backlog.md
CHANGED
|
@@ -14,14 +14,14 @@ Capture ideas, findings, and deferred work mid-session with a single command —
|
|
|
14
14
|
|
|
15
15
|
1. Detect that an argument was provided.
|
|
16
16
|
2. If the argument is blank or whitespace only: warn *"Nothing to capture — provide a description."* and stop.
|
|
17
|
-
3. Create
|
|
17
|
+
3. Create `taproot/backlog.md` if absent. Append the item:
|
|
18
18
|
`- [YYYY-MM-DD] <idea>` using today's date.
|
|
19
19
|
4. Confirm in one line: *"✓ Captured: <idea>"*
|
|
20
20
|
No follow-up response required from the developer — the session continues.
|
|
21
21
|
|
|
22
22
|
### Triage mode (no argument)
|
|
23
23
|
|
|
24
|
-
1. Read
|
|
24
|
+
1. Read `taproot/backlog.md`.
|
|
25
25
|
- If absent or contains no standard items: report *"Backlog is empty. Use `/tr-backlog <idea>` to capture something."* and stop.
|
|
26
26
|
|
|
27
27
|
2. Present all standard items as a numbered list (FIFO order, oldest first):
|
|
@@ -36,8 +36,8 @@ Capture ideas, findings, and deferred work mid-session with a single command —
|
|
|
36
36
|
3. Offer: `D <n>` discard · `P <n>` promote to /tr-ineed · `A <n>` analyze · `done` finish
|
|
37
37
|
|
|
38
38
|
4. Accept commands one at a time:
|
|
39
|
-
- **`D <n>`** — remove item n from
|
|
40
|
-
- **`P <n>` promote to /tr-ineed** — remove item n from
|
|
39
|
+
- **`D <n>`** — remove item n from `taproot/backlog.md`. Confirm: *"✓ Discarded #n"*. Redisplay the updated numbered list.
|
|
40
|
+
- **`P <n>` promote to /tr-ineed** — remove item n from `taproot/backlog.md`. Invoke `/tr-ineed` with the item text. On return, redisplay the updated numbered list.
|
|
41
41
|
- **`A <n>` analyze** — produce a structured analysis of the item:
|
|
42
42
|
- A short description of what the item is or could be (2–4 sentences)
|
|
43
43
|
- A complexity signal: **simple** / **moderate** / **significant**
|
|
@@ -46,7 +46,7 @@ Capture ideas, findings, and deferred work mid-session with a single command —
|
|
|
46
46
|
- **`done`** — end triage. Items not acted on are kept implicitly.
|
|
47
47
|
|
|
48
48
|
5. After `done`: *"Triage complete — X discarded, Y promoted, Z kept."*
|
|
49
|
-
If any non-standard lines were skipped: *"Skipped N non-standard line(s) — they remain in
|
|
49
|
+
If any non-standard lines were skipped: *"Skipped N non-standard line(s) — they remain in `taproot/backlog.md`."*
|
|
50
50
|
|
|
51
51
|
If the developer exits without `done`: unprocessed items remain unchanged. If any actions were taken, show the summary; otherwise continue naturally.
|
|
52
52
|
|
|
@@ -60,7 +60,7 @@ Capture ideas, findings, and deferred work mid-session with a single command —
|
|
|
60
60
|
|
|
61
61
|
## Output
|
|
62
62
|
|
|
63
|
-
**Capture:** item written to
|
|
63
|
+
**Capture:** item written to `taproot/backlog.md`, one-line confirmation.
|
|
64
64
|
**Triage:** backlog updated in place; promoted items handed to `/tr-ineed`; completion summary shown.
|
|
65
65
|
|
|
66
66
|
## CLI Dependencies
|
|
@@ -73,4 +73,4 @@ None.
|
|
|
73
73
|
- Item format: `- [YYYY-MM-DD] <text>`. Items are presented FIFO (oldest first) during triage.
|
|
74
74
|
- Items promoted via `[P]` are removed from the backlog before `/tr-ineed` is invoked. If the developer abandons the `/tr-ineed` discovery, re-capture the item with `/tr-backlog <idea>`.
|
|
75
75
|
- This is a scratchpad, not a project management tool — no priority, labels, or status tracking.
|
|
76
|
-
- Storage is
|
|
76
|
+
- Storage is `taproot/backlog.md` — a committed markdown file inside the taproot config directory, versioned with the project.
|
package/skills/behaviour.md
CHANGED
|
@@ -15,14 +15,14 @@ Define a UseCase (observable system behaviour) under an intent or another behavi
|
|
|
15
15
|
- If `parent` contains `intent.md`: read the intent to understand the goal and success criteria.
|
|
16
16
|
- If `parent` contains `usecase.md`: read the parent behaviour — this new behaviour is a sub-behaviour.
|
|
17
17
|
|
|
18
|
-
1a. **Pattern check** — If
|
|
18
|
+
1a. **Pattern check** — If `taproot/agent/docs/patterns.md` exists, scan the behaviour description for semantic matches. Match signals:
|
|
19
19
|
- "apply to all / every implementation / every skill" → `check-if-affected-by`
|
|
20
20
|
- "enforce a rule / architectural constraint / agents should follow" → `check-if-affected-by`
|
|
21
21
|
- "keep docs current / enforce documentation quality" → `document-current`
|
|
22
22
|
- "every new feature must update X" → `check-if-affected: X`
|
|
23
23
|
|
|
24
24
|
If a match is found, **interrupt before asking clarifying questions**:
|
|
25
|
-
> "Before I write this spec — that sounds like the **`<pattern-name>`** pattern. <one-line description>. See
|
|
25
|
+
> "Before I write this spec — that sounds like the **`<pattern-name>`** pattern. <one-line description>. See `taproot/agent/docs/patterns.md`."
|
|
26
26
|
> **[A] Use this pattern now** — I'll guide you through applying it instead of writing a spec
|
|
27
27
|
> **[B] Continue writing the spec** — the spec is distinct from the pattern
|
|
28
28
|
|
package/skills/bug.md
CHANGED
|
@@ -35,10 +35,10 @@ Diagnose a defect through structured root cause analysis (5-Why) and delegate to
|
|
|
35
35
|
|
|
36
36
|
- **No (clearly one-off** — typo, isolated misconfiguration, external incident): note this and continue to step 5.
|
|
37
37
|
- **Yes**: propose prevention across one or more of:
|
|
38
|
-
- A new DoR or DoD condition to add to
|
|
38
|
+
- A new DoR or DoD condition to add to `taproot/settings.yaml`
|
|
39
39
|
- An update to `docs/architecture.md`, `docs/security.md`, or `docs/patterns.md`
|
|
40
40
|
|
|
41
|
-
If a satisfactory measure is found: present it — e.g. *"I'll add `check-if-affected-by: <gate>` to
|
|
41
|
+
If a satisfactory measure is found: present it — e.g. *"I'll add `check-if-affected-by: <gate>` to `taproot/settings.yaml`"* or *"I'll add to `docs/security.md`: `<constraint>`"* — and wait for actor confirmation.
|
|
42
42
|
- On **confirm**: apply the change, then continue to step 5.
|
|
43
43
|
- On **reject**: record the recurrence concern in the implicated impl.md `## Notes` and continue to step 5.
|
|
44
44
|
|
package/skills/commit.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Before following any steps, check whether autonomous mode is active:
|
|
6
6
|
- `TAPROOT_AUTONOMOUS=1` is set in the environment, **or**
|
|
7
7
|
- `--autonomous` was passed as an argument to this skill invocation, **or**
|
|
8
|
-
-
|
|
8
|
+
- `taproot/settings.yaml` contains `autonomous: true`
|
|
9
9
|
|
|
10
10
|
If any of these is true, **autonomous mode is active** — apply autonomous notes where they appear. If none is true, show confirmation prompts as normal.
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ Execute the full commit procedure: classify the commit type, run the appropriate
|
|
|
35
35
|
|
|
36
36
|
**Autonomous mode:** stage all relevant files and proceed directly without waiting for confirmation.
|
|
37
37
|
|
|
38
|
-
4. Read
|
|
38
|
+
4. Read `taproot/settings.yaml` to identify all configured `definitionOfDone` and `definitionOfReady` conditions. If the file does not exist or has no `definitionOfDone`/`definitionOfReady` sections, note: "No user-configured conditions — baseline hook checks only." and proceed to the appropriate sub-flow below.
|
|
39
39
|
|
|
40
40
|
5. Execute the sub-flow matching the commit type:
|
|
41
41
|
|
|
@@ -55,6 +55,20 @@ Execute the full commit procedure: classify the commit type, run the appropriate
|
|
|
55
55
|
taproot dod <impl-path> --resolve "<exact-condition-name>" --note "<reasoning>"
|
|
56
56
|
```
|
|
57
57
|
**One condition per invocation.** Do not pass multiple `--resolve` flags.
|
|
58
|
+
|
|
59
|
+
**`document-current` resolution — mandatory steps:**
|
|
60
|
+
1. Read `docs/` and `README.md` content (the actual text, not inferred state)
|
|
61
|
+
2. Read the git diff for this implementation to identify what changed
|
|
62
|
+
3. Compare: are the docs accurate and current relative to what was just implemented?
|
|
63
|
+
4. If stale sections are found: apply updates directly, then resolve
|
|
64
|
+
5. If docs are current: resolve with a note describing what you read and why no update is needed
|
|
65
|
+
|
|
66
|
+
**Prohibited resolutions for `document-current`:**
|
|
67
|
+
- "nothing in backlog → docs are fine"
|
|
68
|
+
- "impl.md says complete → docs must be current"
|
|
69
|
+
- "no related backlog items → no doc update needed"
|
|
70
|
+
- Any resolution that does not involve reading `docs/` content and comparing it to the git diff
|
|
71
|
+
|
|
58
72
|
c. Re-run `taproot dod <impl-path>` after each resolution to check remaining failures
|
|
59
73
|
d. Repeat until all conditions pass. If a condition remains `✗` after its `--resolve` invocation, stop immediately: "Cannot resolve `<condition>` — it requires: `<correction hint>`." Wait for the user to intervene.
|
|
60
74
|
|
|
@@ -72,13 +86,26 @@ Execute the full commit procedure: classify the commit type, run the appropriate
|
|
|
72
86
|
Wait for the developer's choice. Do not proceed to step 5 until resolved.
|
|
73
87
|
e. If no conflicts (or all resolved): run `taproot truth-sign` to record the session marker the hook validates.
|
|
74
88
|
|
|
75
|
-
5.
|
|
89
|
+
5. **Suggest commit tag** — derive the conventional tag from the matched impl.md paths:
|
|
90
|
+
- For each matched `impl.md`, extract the relative path between `taproot/specs/` and `/impl.md` → `<intent>/<behaviour>/<impl>`
|
|
91
|
+
- If the developer has already supplied a commit message that starts with a recognised prefix (`taproot(`, `fix:`, `feat:`, `chore:`, `refine:`, `spec:`, `build:`, `docs:`): use it as-is — do not suggest or prepend anything
|
|
92
|
+
- If all matched impl.md files share the same `<intent>/<behaviour>` prefix:
|
|
93
|
+
- Single impl: suggest `taproot(<intent>/<behaviour>/<impl>):`
|
|
94
|
+
- Multiple impls under the same behaviour: suggest `taproot(<intent>/<behaviour>):`
|
|
95
|
+
- If matched impl.md files span two or more distinct `<intent>/<behaviour>` paths:
|
|
96
|
+
- Report: *"Staged files span multiple behaviours: `<path-1>`, `<path-2>`. Suggested: commit them separately, one per behaviour, to keep commit history traceable."*
|
|
97
|
+
- Offer: `[A] Commit all together (no single tag) [B] Split — commit one behaviour at a time`
|
|
98
|
+
- `[B]`: stage only the first behaviour's files, apply its tag, commit; then repeat for the remainder
|
|
99
|
+
- If an impl.md path does not match `taproot/specs/<intent>/<behaviour>/<impl>/impl.md`, skip the tag suggestion for that file and note: *"Could not derive tag from `<path>` — path layout unexpected."*
|
|
100
|
+
- Present: `Suggested commit tag: taproot(<path>):`
|
|
101
|
+
|
|
102
|
+
6. Stage source files + all matched impl.md files and commit with the suggested tag prefix (or the developer-supplied message).
|
|
76
103
|
|
|
77
104
|
### Declaration commit
|
|
78
105
|
|
|
79
106
|
1. Verify parent `usecase.md` is in `specified`, `implemented`, or `complete` state. If it is in `draft` or `proposed` state, report: "Cannot declare implementation — parent `usecase.md` is in `<state>` state. Run `/tr-refine <usecase-path>` to complete the spec first." Stop.
|
|
80
107
|
|
|
81
|
-
2. Read
|
|
108
|
+
2. Read `taproot/settings.yaml` `definitionOfReady` entries. For each `check-if-affected-by` or `check:` condition, write an entry directly into `## DoR Resolutions` in the impl.md. There is no `taproot dor` CLI — write entries by hand:
|
|
82
109
|
```
|
|
83
110
|
condition: <name> | note: <reasoning> | resolved: <date>
|
|
84
111
|
```
|
|
@@ -124,6 +151,15 @@ Execute the full commit procedure: classify the commit type, run the appropriate
|
|
|
124
151
|
|
|
125
152
|
6. After committing, run `taproot link-commits --path <taproot-root>` if any impl.md files were staged, to update their `## Commits` sections.
|
|
126
153
|
|
|
154
|
+
7. Offer contextual What's next options based on the commit type:
|
|
155
|
+
- **[A] Continue plan** — only if `taproot/plan.md` exists and contains `pending` items: invoke `/tr-plan-execute`
|
|
156
|
+
- **[B] Implement next** — only for requirement or declaration commits: prompt `Which behaviour should I implement next?` then invoke `/tr-implement <path>`
|
|
157
|
+
- **[C] Check backlog** — open `.taproot/backlog.md` to review deferred ideas and captured findings
|
|
158
|
+
- **[D] Check coverage** — `/tr-status` to review hierarchy health
|
|
159
|
+
- **[E] Done** — no further action
|
|
160
|
+
|
|
161
|
+
Omit [A] if no plan exists or no pending items remain. Omit [B] after implementation and plain commits. Developer may ignore the prompt silently.
|
|
162
|
+
|
|
127
163
|
## Output
|
|
128
164
|
|
|
129
165
|
A clean commit where the pre-commit hook passes on the first attempt. All conditions resolved with written rationale before staging.
|
|
@@ -13,12 +13,19 @@ Scan the taproot hierarchy for implicit facts — recurring terms, business rule
|
|
|
13
13
|
Before following any steps, check whether autonomous mode is active:
|
|
14
14
|
- `TAPROOT_AUTONOMOUS=1` is set in the environment, **or**
|
|
15
15
|
- `--autonomous` was passed as an argument to this skill invocation, **or**
|
|
16
|
-
-
|
|
16
|
+
- `taproot/settings.yaml` contains `autonomous: true`
|
|
17
17
|
|
|
18
|
-
If any of these is true, **autonomous mode is active** — skip interactive prompts and defer all candidates to
|
|
18
|
+
If any of these is true, **autonomous mode is active** — skip interactive prompts and defer all candidates to `taproot/backlog.md` as "truth candidate: `<term>`" entries, then report the summary.
|
|
19
19
|
|
|
20
20
|
## Steps
|
|
21
21
|
|
|
22
|
+
### Phase 0 — Resume Check
|
|
23
|
+
|
|
24
|
+
1a. Check for `.taproot/sessions/discover-truths-status.md`. If found, present:
|
|
25
|
+
> "A previous session exists (N processed, M remaining). [A] Resume [R] Restart"
|
|
26
|
+
- **[A] Resume**: load the status file, skip already-processed candidates, and continue from the first unprocessed `[ ]` entry. Proceed directly to Phase 4 using the stored candidate list.
|
|
27
|
+
- **[R] Restart**: overwrite the status file from scratch and run the full flow from Phase 1.
|
|
28
|
+
|
|
22
29
|
### Phase 1 — Pre-flight
|
|
23
30
|
|
|
24
31
|
1. Verify `taproot/global-truths/` exists. If not, stop:
|
|
@@ -31,7 +38,7 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
31
38
|
|
|
32
39
|
3. Read all files in `taproot/global-truths/` (excluding `intent.md` and subdirectory `usecase.md` files — truth files are files that are NOT named `intent.md` or `usecase.md`). Collect defined terms and rules from them.
|
|
33
40
|
|
|
34
|
-
4. Read
|
|
41
|
+
4. Read `taproot/backlog.md` if it exists. Extract all lines matching `reviewed — not a truth: <term>` — these are permanently dismissed candidates. Build a suppression list from them.
|
|
35
42
|
|
|
36
43
|
### Phase 3 — Identify Candidates
|
|
37
44
|
|
|
@@ -59,9 +66,7 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
59
66
|
|
|
60
67
|
### Phase 4 — Present Candidates
|
|
61
68
|
|
|
62
|
-
7.
|
|
63
|
-
|
|
64
|
-
For each candidate, present:
|
|
69
|
+
7. Present candidates **one at a time**. For each candidate:
|
|
65
70
|
```
|
|
66
71
|
Candidate: `<term or rule>`
|
|
67
72
|
Category: <recurring term | business rule | implicit convention>
|
|
@@ -76,9 +81,10 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
76
81
|
|
|
77
82
|
**Autonomous mode:** defer all candidates to backlog as "truth candidate: `<term>`" and skip to Phase 5.
|
|
78
83
|
|
|
79
|
-
8. Handle each developer choice:
|
|
84
|
+
8. Handle each developer choice. **After each response**, write progress to `.taproot/sessions/discover-truths-status.md` before moving to the next candidate (format: checklist of all candidates with `[x]`/`[ ]` markers, counts of promoted/skipped/backlogged/dismissed so far):
|
|
80
85
|
|
|
81
86
|
**Promote [P]:**
|
|
87
|
+
- Mark candidate `[x promoted]` in the status file
|
|
82
88
|
- Invoke `/tr-ineed` with the candidate term, proposed scope, and evidence pre-populated as context
|
|
83
89
|
- If `/tr-ineed` routes to a location other than `define-truth`, surface the routing decision:
|
|
84
90
|
> "This candidate was routed to `<location>`. [A] Accept routing [B] Override — invoke define-truth directly"
|
|
@@ -86,22 +92,30 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
86
92
|
- After `/tr-ineed` completes (or is abandoned), return to the candidate list
|
|
87
93
|
|
|
88
94
|
**Skip [S]:**
|
|
89
|
-
-
|
|
95
|
+
- Mark candidate `[x skipped]` in the status file
|
|
96
|
+
- No record written to backlog; candidate reappears on next discovery run
|
|
90
97
|
|
|
91
98
|
**Backlog [B]:**
|
|
92
|
-
-
|
|
99
|
+
- Mark candidate `[x backlogged]` in the status file
|
|
100
|
+
- Append to `taproot/backlog.md`: `- [YYYY-MM-DD] truth candidate: <term>`
|
|
93
101
|
- Move to next candidate
|
|
94
102
|
|
|
95
103
|
**Dismiss [D]:**
|
|
96
|
-
-
|
|
104
|
+
- Mark candidate `[x dismissed]` in the status file
|
|
105
|
+
- Append to `taproot/backlog.md`: `- [YYYY-MM-DD] reviewed — not a truth: <term>`
|
|
97
106
|
- This entry suppresses the candidate on all future discovery runs
|
|
98
107
|
- Move to next candidate
|
|
99
108
|
|
|
109
|
+
**Developer ends session early:**
|
|
110
|
+
- Current state is already persisted in `.taproot/sessions/discover-truths-status.md`
|
|
111
|
+
- Developer can resume by re-invoking `/tr-discover-truths` and selecting [A] Resume
|
|
112
|
+
|
|
100
113
|
### Phase 5 — Wrap Up
|
|
101
114
|
|
|
102
115
|
9. Report:
|
|
103
116
|
> "Discovery complete — N promoted, N skipped, N backlogged, N dismissed[, N remaining]."
|
|
104
117
|
> (Include "N remaining" only if the developer ended the session early.)
|
|
118
|
+
Delete `.taproot/sessions/discover-truths-status.md` (clean completion — no resume needed).
|
|
105
119
|
|
|
106
120
|
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next task.
|
|
107
121
|
|
|
@@ -113,7 +127,7 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
113
127
|
## Output
|
|
114
128
|
|
|
115
129
|
- Zero or more truth files created in `taproot/global-truths/` (via `/tr-ineed` → define-truth)
|
|
116
|
-
-
|
|
130
|
+
- `taproot/backlog.md` updated with any backlogged or dismissed candidates
|
|
117
131
|
- Summary report: N promoted, N skipped, N backlogged, N dismissed
|
|
118
132
|
|
|
119
133
|
## CLI Dependencies
|
|
@@ -125,5 +139,5 @@ None.
|
|
|
125
139
|
- Truth files in `taproot/global-truths/` are any files that are NOT named `intent.md` or `usecase.md`. They may have any name (e.g. `glossary.md`, `pricing-rules.md`, `entity-model.md`).
|
|
126
140
|
- "Recurring" means 2 or more specs — not just repeated within a single spec.
|
|
127
141
|
- Skip generic language-level words ("the", "a", "is", "not") and taproot structural terms ("intent", "behaviour", "usecase", "implementation") — these are not domain truths.
|
|
128
|
-
- Dismissed entries in
|
|
142
|
+
- Dismissed entries in `taproot/backlog.md` are matched by the literal string "reviewed — not a truth: `<term>`" — the suppression logic is substring-match on the candidate term.
|
|
129
143
|
- This skill is read-only on the hierarchy — it never modifies `intent.md` or `usecase.md` files directly.
|
package/skills/discover.md
CHANGED
|
@@ -241,7 +241,7 @@ Reverse-engineer an existing project into a taproot hierarchy — from source co
|
|
|
241
241
|
|
|
242
242
|
**What's next?**
|
|
243
243
|
[A] `/tr-status` — see coverage gaps and health report
|
|
244
|
-
[B] `/tr-
|
|
244
|
+
[B] `/tr-next` — surface the next behaviour to implement
|
|
245
245
|
[C] `/tr-ineed` — capture requirements that surfaced during discovery but weren't formalised
|
|
246
246
|
|
|
247
247
|
## Output
|
package/skills/guide.md
CHANGED
|
@@ -62,6 +62,10 @@ ineed → intent → behaviour → implement → trace → status
|
|
|
62
62
|
| `/tr-backlog` | Capture an idea or finding instantly mid-session; called with no args opens triage to discard, keep, or promote items |
|
|
63
63
|
| `/tr-grill-me` | Interview the user relentlessly to sharpen a plan or design |
|
|
64
64
|
| `/tr-research` | Research a domain or technical subject before speccing — local resources, web search, expert grilling |
|
|
65
|
+
| `/tr-next` | Surface the next independently-implementable work item from the hierarchy |
|
|
66
|
+
| `/tr-plan` | Build a persistent implementation plan (`taproot/plan.md`) from backlog items, hierarchy gaps, or explicit items |
|
|
67
|
+
| `/tr-plan-execute` | Execute items from `taproot/plan.md` — step-by-step, batch, specify (spec+refine only), or implement (implement only) mode |
|
|
68
|
+
| `/tr-plan-analyse` | Analyse `taproot/plan.md` before execution — check readiness, flag ambiguous specs, unresolved dependencies, and missing prerequisites |
|
|
65
69
|
| `/tr-sweep` | Apply a uniform task to a filtered set of hierarchy files — enumerate, confirm, then call `taproot apply` |
|
|
66
70
|
| `/tr-commit` | Execute the full commit procedure: classify type, run proactive gates, resolve DoD/DoR conditions, stage, and commit |
|
|
67
71
|
| `/tr-refine` | Update a behaviour spec based on implementation learnings |
|
|
@@ -107,7 +111,7 @@ ineed → intent → behaviour → implement → trace → status
|
|
|
107
111
|
**What's next?**
|
|
108
112
|
[A] `/tr-ineed` — capture your first (or next) requirement
|
|
109
113
|
[B] `/tr-status` — see the current project health at a glance
|
|
110
|
-
[C] `/tr-backlog` — triage captured ideas (only if
|
|
114
|
+
[C] `/tr-backlog` — triage captured ideas (only if `taproot/backlog.md` is non-empty)
|
|
111
115
|
|
|
112
116
|
## Output
|
|
113
117
|
|
package/skills/implement.md
CHANGED
|
@@ -14,7 +14,7 @@ Implement a behaviour spec: write the code, write the tests, create the `impl.md
|
|
|
14
14
|
Before following any steps, check whether autonomous mode is active:
|
|
15
15
|
- `TAPROOT_AUTONOMOUS=1` is set in the environment, **or**
|
|
16
16
|
- `--autonomous` was passed as an argument to this skill invocation, **or**
|
|
17
|
-
-
|
|
17
|
+
- `taproot/settings.yaml` contains `autonomous: true`
|
|
18
18
|
|
|
19
19
|
If any of these is true, **autonomous mode is active** — apply the autonomous notes at each step where they appear. If none is true, autonomous mode is **inactive** — show confirmation prompts as normal.
|
|
20
20
|
|
|
@@ -36,14 +36,14 @@ If any of these is true, **autonomous mode is active** — apply the autonomous
|
|
|
36
36
|
- Read each applicable file; apply defined terms and conventions when choosing the implementation approach, naming, and design decisions
|
|
37
37
|
- If the implementation plan contradicts an applicable truth, surface the conflict before proceeding: "This implementation contradicts `global-truths/<file>`: `<excerpt>`. [A] update plan to align, [B] update the truth, [C] proceed with the conflict noted."
|
|
38
38
|
|
|
39
|
-
4. **Pattern check + plan mode.** Before proposing the plan: if
|
|
39
|
+
4. **Pattern check + plan mode.** Before proposing the plan: if `taproot/agent/docs/patterns.md` exists, scan the behaviour description and any design notes for semantic matches. Match signals:
|
|
40
40
|
- "applies to all implementations / cross-cutting concern" → `check-if-affected-by`
|
|
41
41
|
- "enforce a rule on all future work" → `check-if-affected-by`
|
|
42
42
|
- "keep a file in sync / update X on every change" → `check-if-affected: X`
|
|
43
43
|
|
|
44
44
|
If a match is found, surface it before the plan:
|
|
45
|
-
> "Before the plan — this looks like it could use the **`<pattern-name>`** pattern rather than a custom implementation. See
|
|
46
|
-
> **[A] Use the pattern** — apply it via
|
|
45
|
+
> "Before the plan — this looks like it could use the **`<pattern-name>`** pattern rather than a custom implementation. See `taproot/agent/docs/patterns.md`."
|
|
46
|
+
> **[A] Use the pattern** — apply it via `taproot/settings.yaml` instead of writing source code
|
|
47
47
|
> **[B] Continue with implementation** — the custom implementation is intentional
|
|
48
48
|
|
|
49
49
|
Then **propose the implementation plan:**
|
|
@@ -102,7 +102,7 @@ If any of these is true, **autonomous mode is active** — apply the autonomous
|
|
|
102
102
|
6. **Declaration commit** — commit `impl.md`, `discussion.md` (if written), and any `usecase.md` link-section update together (no source files):
|
|
103
103
|
|
|
104
104
|
Before committing:
|
|
105
|
-
- Read
|
|
105
|
+
- Read `taproot/settings.yaml` and note the `definitionOfReady` conditions — these are the checks the hook will run. If the file has no `definitionOfReady` section, only baseline DoR checks run.
|
|
106
106
|
- There is no standalone `taproot dor` command — DoR runs automatically via the pre-commit hook when impl.md is staged without source files (this is a **declaration commit**). Resolve any agent-driven DoR conditions (e.g. `check-if-affected-by`) in impl.md under `## DoR Resolutions` before staging.
|
|
107
107
|
|
|
108
108
|
```
|
|
@@ -146,7 +146,7 @@ If any of these is true, **autonomous mode is active** — apply the autonomous
|
|
|
146
146
|
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next task.
|
|
147
147
|
|
|
148
148
|
**What's next?**
|
|
149
|
-
[A] `/tr-
|
|
149
|
+
[A] `/tr-next` — surface the next implementable behaviour
|
|
150
150
|
[B] `/tr-status` — see full project health after this implementation
|
|
151
151
|
|
|
152
152
|
## Output
|
package/skills/ineed.md
CHANGED
|
@@ -27,7 +27,7 @@ Route a natural language requirement to the right place in the taproot hierarchy
|
|
|
27
27
|
- **[B]**: proceed to pattern check below.
|
|
28
28
|
- **[C]** or no global truth signal: proceed to pattern check below.
|
|
29
29
|
|
|
30
|
-
0a. **Pattern check** — If
|
|
30
|
+
0a. **Pattern check** — If `taproot/agent/docs/patterns.md` exists, scan the stated requirement for semantic matches against the patterns listed there. Match signals:
|
|
31
31
|
- "apply to all / every implementation / every skill / everywhere" → `check-if-affected-by`
|
|
32
32
|
- "guide agents / architecture rules / agents should follow / enforce a rule" → `check-if-affected-by`
|
|
33
33
|
- "enforce documentation / docs must stay current / keep docs accurate" → `document-current`
|
|
@@ -35,14 +35,14 @@ Route a natural language requirement to the right place in the taproot hierarchy
|
|
|
35
35
|
- "research before building / check if a library exists / look up how to implement" → research-first (`/tr-research`)
|
|
36
36
|
|
|
37
37
|
If a match is found, **interrupt before proceeding**:
|
|
38
|
-
> "Before I route this — that sounds like the **`<pattern-name>`** pattern. <one-line description>. See
|
|
38
|
+
> "Before I route this — that sounds like the **`<pattern-name>`** pattern. <one-line description>. See `taproot/agent/docs/patterns.md` for how to use it."
|
|
39
39
|
> **[A] Use this pattern now** — I'll guide you through applying it
|
|
40
40
|
> **[B] Continue as a new requirement** — route and spec it normally
|
|
41
41
|
|
|
42
|
-
- **[A]**: read the relevant section of
|
|
42
|
+
- **[A]**: read the relevant section of `taproot/agent/docs/patterns.md` and guide the user through applying the pattern directly. Do not create a new hierarchy entry.
|
|
43
43
|
- **[B]** or no match: proceed to step 1.
|
|
44
44
|
|
|
45
|
-
If multiple patterns match, list all before asking. If
|
|
45
|
+
If multiple patterns match, list all before asking. If `taproot/agent/docs/patterns.md` is absent, skip silently.
|
|
46
46
|
|
|
47
47
|
1. **Classify the requirement** — Load `taproot/OVERVIEW.md` if it exists; if not, walk `taproot/` and read each `intent.md`. Use this hierarchy map to decide which path to take:
|
|
48
48
|
|
package/skills/next.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Skill: plan
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Surface the next independently-implementable work item from the requirement hierarchy. Runs `taproot plan` to scan and classify candidates as AFK (agent can proceed autonomously) or HITL (human input required), presents the recommended next slice, and delegates to `/tr-implement` once the developer confirms.
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
- `path` (optional): Behaviour path to implement directly — skips discovery and goes straight to `/tr-implement`.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. **If a path was provided**: skip to Step 5 and invoke `/tr-implement <path>` directly.
|
|
14
|
+
|
|
15
|
+
2. Run `taproot plan` and read the output. It lists:
|
|
16
|
+
- **AFK** candidates: behaviours with `specified` state, ready to implement autonomously
|
|
17
|
+
- **HITL** candidates: behaviours with `proposed` state, needing human review first
|
|
18
|
+
- **In-progress** implementations: partially-implemented behaviours that can be resumed
|
|
19
|
+
|
|
20
|
+
3. If no candidates are found (all behaviours fully implemented), report: "Everything is implemented."
|
|
21
|
+
|
|
22
|
+
Nothing obvious next — whenever you're ready:
|
|
23
|
+
|
|
24
|
+
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next task.
|
|
25
|
+
|
|
26
|
+
**What's next?**
|
|
27
|
+
[A] `/tr-review-all` — semantic review of the full hierarchy
|
|
28
|
+
[B] `/tr-ineed` — capture a new requirement
|
|
29
|
+
|
|
30
|
+
Then stop.
|
|
31
|
+
|
|
32
|
+
4. Recommend the top AFK candidate (first in the sorted output). Present it as:
|
|
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
|
|
38
|
+
|
|
39
|
+
- **[Y]**: proceed to Step 5
|
|
40
|
+
- **[L]**: display the full `taproot plan` output, then ask the developer to pick a behaviour path, then proceed to Step 5
|
|
41
|
+
- **[S]**: ask "Which behaviour path would you like to implement?" then proceed to Step 5
|
|
42
|
+
|
|
43
|
+
5. If the top candidate is HITL (no AFK candidates exist), flag it:
|
|
44
|
+
> "The next unimplemented behaviour is HITL — the spec needs clarification before an agent can proceed autonomously."
|
|
45
|
+
> "Behaviour: `<path>`"
|
|
46
|
+
|
|
47
|
+
**Next:** `/tr-refine taproot/<path>/` — sharpen the spec, then return here
|
|
48
|
+
|
|
49
|
+
6. Invoke `/tr-implement taproot/<behaviour-path>/` with the confirmed path.
|
|
50
|
+
|
|
51
|
+
## Output
|
|
52
|
+
|
|
53
|
+
Delegates to `/tr-implement`. No files are written directly by this skill.
|
|
54
|
+
|
|
55
|
+
## CLI Dependencies
|
|
56
|
+
|
|
57
|
+
- `taproot plan`
|
|
58
|
+
|
|
59
|
+
## Notes
|
|
60
|
+
|
|
61
|
+
- AFK/HITL classification is determined by the `taproot plan` command using the behaviour's `usecase.md` state as a proxy: `specified` → AFK, `proposed` → HITL.
|
|
62
|
+
- This skill is the conversational wrapper around `taproot plan` — it adds selection, confirmation, and delegation logic that the CLI command cannot provide.
|
|
63
|
+
- `/tr-next` is the Claude Code adapter command name for this skill.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Skill: plan-analyse
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Analyse `taproot/plan.md` before execution: check each pending item for readiness, flag ambiguous specs, unresolved dependencies, and missing prerequisites, and produce a per-item report so the developer knows what needs fixing before executing.
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
None required.
|
|
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.
|
|
16
|
+
|
|
17
|
+
2. **Read `taproot/plan.md`.** Collect all items. If no `pending` items exist, report:
|
|
18
|
+
> *"No pending items to analyse."*
|
|
19
|
+
Suggest: *"Build a new plan with `/tr-plan`."* Stop.
|
|
20
|
+
|
|
21
|
+
3. **Evaluate readiness for each pending item:**
|
|
22
|
+
|
|
23
|
+
**`[spec]` items:**
|
|
24
|
+
- Is the description specific enough to write a `usecase.md`? Does it name an actor and a goal?
|
|
25
|
+
- Flag ⚠ if the description is vague, names no actor, or has no clear success outcome.
|
|
26
|
+
|
|
27
|
+
**`[implement]` items:**
|
|
28
|
+
- Does the referenced `usecase.md` exist at the given path?
|
|
29
|
+
- Is it in `specified` or `implemented` state? Flag ⚠ if it is `draft` or `proposed`.
|
|
30
|
+
- Does the spec have open questions (unresolved `?` markers, `TBD` entries, or `proposed` sub-behaviours)? Flag ⚠ if found.
|
|
31
|
+
- Flag ✗ if `usecase.md` is missing entirely.
|
|
32
|
+
|
|
33
|
+
**`[refine]` items:**
|
|
34
|
+
- Does the referenced spec exist?
|
|
35
|
+
- Is there enough context in the item description to know what to refine?
|
|
36
|
+
- Flag ⚠ if the description is too vague to guide refinement.
|
|
37
|
+
- Flag ✗ if the spec is missing.
|
|
38
|
+
|
|
39
|
+
**Dependency check (all types):**
|
|
40
|
+
- If this item depends on an earlier plan item (inferred by position: a `[spec]` or `[refine]` item for the same path appearing earlier in the list), is that predecessor `done` or `specified`?
|
|
41
|
+
- Flag ✗ if the predecessor is still `pending`.
|
|
42
|
+
|
|
43
|
+
4. **Build the readiness report:**
|
|
44
|
+
```
|
|
45
|
+
Plan Analysis — N pending items
|
|
46
|
+
|
|
47
|
+
✓ Ready (N)
|
|
48
|
+
· [implement] taproot/<intent>/<behaviour>/ — spec specified, no open questions
|
|
49
|
+
|
|
50
|
+
⚠ Needs attention (N)
|
|
51
|
+
· [implement] taproot/<intent>/<behaviour>/ — spec is 'proposed', run /tr-refine first
|
|
52
|
+
· [spec] "add login flow" — description is vague: actor and success criteria unclear
|
|
53
|
+
|
|
54
|
+
✗ Blocked (N)
|
|
55
|
+
· [implement] taproot/<intent>/<behaviour>/ — depends on item 2 which is not yet done
|
|
56
|
+
```
|
|
57
|
+
For each flagged item, append a one-line suggested action (e.g. `/tr-refine <path>`, `/tr-behaviour <path>`, "clarify actor and goal").
|
|
58
|
+
|
|
59
|
+
5. **Summarise:**
|
|
60
|
+
- If all items are ready: *"All N pending items are ready — no blockers or ambiguities found."* Offer: *"[A] Execute now → `/tr-plan-execute`"*
|
|
61
|
+
- Otherwise: *"N items ready, N need attention, N blocked. Suggested: resolve ⚠ and ✗ items before executing."*
|
|
62
|
+
|
|
63
|
+
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next task.
|
|
64
|
+
|
|
65
|
+
**What's next?**
|
|
66
|
+
[A] `/tr-plan-execute` — execute the plan (after resolving flagged items)
|
|
67
|
+
[B] `/tr-plan` — rebuild or add items to the plan
|
|
68
|
+
|
|
69
|
+
## Output
|
|
70
|
+
|
|
71
|
+
A readiness report printed in the conversation — no files modified.
|
|
72
|
+
|
|
73
|
+
## CLI Dependencies
|
|
74
|
+
|
|
75
|
+
None
|
|
76
|
+
|
|
77
|
+
## Notes
|
|
78
|
+
|
|
79
|
+
- This behaviour is read-only — it never modifies `taproot/plan.md` or any hierarchy document.
|
|
80
|
+
- Stale paths (referenced file no longer exists) are flagged inline; analysis continues for remaining items.
|
|
81
|
+
- For large plans (>10 items), group by readiness category rather than plan order.
|