@imix-js/taproot 0.2.1 → 0.4.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/adapters/index.d.ts +12 -1
- package/dist/adapters/index.js +164 -32
- package/dist/adapters/index.js.map +1 -1
- package/dist/commands/dod.d.ts +1 -0
- package/dist/commands/dod.js +24 -2
- package/dist/commands/dod.js.map +1 -1
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.js +72 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.js +22 -5
- package/dist/commands/update.js.map +1 -1
- package/dist/core/configuration.js +43 -0
- package/dist/core/configuration.js.map +1 -1
- package/dist/core/dod-runner.d.ts +4 -2
- package/dist/core/dod-runner.js +38 -1
- package/dist/core/dod-runner.js.map +1 -1
- package/dist/core/dor-runner.js +12 -1
- package/dist/core/dor-runner.js.map +1 -1
- package/dist/core/test-cache.d.ts +39 -0
- package/dist/core/test-cache.js +187 -0
- package/dist/core/test-cache.js.map +1 -0
- package/dist/validators/types.d.ts +7 -0
- package/docs/agents.md +11 -0
- package/docs/cli.md +8 -2
- package/docs/configuration.md +78 -1
- package/docs/patterns.md +43 -0
- package/package.json +2 -1
- package/skills/backlog.md +76 -0
- package/skills/behaviour.md +2 -0
- package/skills/browse.md +84 -0
- package/skills/bug.md +13 -0
- package/skills/commit.md +14 -1
- package/skills/grill-me.md +1 -0
- package/skills/guide.md +5 -2
- package/skills/implement.md +47 -2
- package/skills/review-all.md +1 -1
- package/skills/review.md +1 -0
- package/skills/status.md +3 -2
package/skills/commit.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Skill: commit
|
|
2
2
|
|
|
3
|
+
## Autonomous mode
|
|
4
|
+
|
|
5
|
+
Before following any steps, check whether autonomous mode is active:
|
|
6
|
+
- `TAPROOT_AUTONOMOUS=1` is set in the environment, **or**
|
|
7
|
+
- `--autonomous` was passed as an argument to this skill invocation, **or**
|
|
8
|
+
- `.taproot/settings.yaml` contains `autonomous: true`
|
|
9
|
+
|
|
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
|
+
|
|
3
12
|
## Description
|
|
4
13
|
|
|
5
14
|
Execute the full commit procedure: classify the commit type, run the appropriate gate proactively, resolve all conditions before staging, and commit. Handles implementation, declaration, requirement, and plain commits. Invoke this skill whenever you are about to commit, or when the user says "commit", "let's commit", "commit that", or similar.
|
|
@@ -20,7 +29,11 @@ Execute the full commit procedure: classify the commit type, run the appropriate
|
|
|
20
29
|
|
|
21
30
|
To identify impl.md ownership, run `grep -rl "<filename>" taproot/` for each candidate source file.
|
|
22
31
|
|
|
23
|
-
3. If nothing is staged yet, announce: "Nothing staged yet. Here's what's changed: [list].
|
|
32
|
+
3. If nothing is staged yet, announce: "Nothing staged yet. Here's what's changed: [list]."
|
|
33
|
+
|
|
34
|
+
**Interactive mode:** ask "Should I stage these and proceed with the commit?" and wait for confirmation before proceeding.
|
|
35
|
+
|
|
36
|
+
**Autonomous mode:** stage all relevant files and proceed directly without waiting for confirmation.
|
|
24
37
|
|
|
25
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.
|
|
26
39
|
|
package/skills/grill-me.md
CHANGED
|
@@ -46,6 +46,7 @@ Based on Matt Pocock's `grill-me` skill (MIT licensed, https://github.com/mattpo
|
|
|
46
46
|
**What's next?**
|
|
47
47
|
[A] `/tr-ineed "<clarified requirement>"` — route the sharpened requirement into the hierarchy
|
|
48
48
|
[B] `/tr-behaviour <path>/` — write the spec now that the design is clear
|
|
49
|
+
[C] `/tr-backlog <deferred question>` — capture an unresolved question for later without routing it now
|
|
49
50
|
|
|
50
51
|
## Output
|
|
51
52
|
|
package/skills/guide.md
CHANGED
|
@@ -56,6 +56,8 @@ ineed → intent → behaviour → implement → trace → status
|
|
|
56
56
|
| `/tr-status` | Generate a health dashboard for the hierarchy |
|
|
57
57
|
| `/tr-review` | Stress-test a spec with adversarial questions |
|
|
58
58
|
| `/tr-review-all` | Run review across an entire subtree |
|
|
59
|
+
| `/tr-browse` | Read a hierarchy document section by section in the terminal — with inline editing via `[M] Modify` |
|
|
60
|
+
| `/tr-backlog` | Capture an idea or finding instantly mid-session; called with no args opens triage to discard, keep, or promote items |
|
|
59
61
|
| `/tr-grill-me` | Interview the user relentlessly to sharpen a plan or design |
|
|
60
62
|
| `/tr-research` | Research a domain or technical subject before speccing — local resources, web search, expert grilling |
|
|
61
63
|
| `/tr-sweep` | Apply a uniform task to a filtered set of hierarchy files — enumerate, confirm, then call `taproot apply` |
|
|
@@ -77,7 +79,7 @@ ineed → intent → behaviour → implement → trace → status
|
|
|
77
79
|
| `taproot dod [impl-path]` | Run Definition of Done checks; mark impl complete if all pass |
|
|
78
80
|
| `taproot commithook` | Pre-commit gate: classifies staged files and runs DoR or DoD as appropriate |
|
|
79
81
|
| `taproot update` | Refresh agent adapters, skills, and cross-link sections across the hierarchy |
|
|
80
|
-
| `taproot init` | Initialize Taproot in a project |
|
|
82
|
+
| `taproot init [--template webapp\|book-authoring\|cli-tool]` | Initialize Taproot in a project; optionally copy a starter hierarchy |
|
|
81
83
|
|
|
82
84
|
### Rule of Thumb
|
|
83
85
|
|
|
@@ -92,7 +94,7 @@ ineed → intent → behaviour → implement → trace → status
|
|
|
92
94
|
|
|
93
95
|
- **If `taproot/OVERVIEW.md` exists**: "Your project has an overview at `taproot/OVERVIEW.md` — read it for a summary of current intents and their status."
|
|
94
96
|
- **If intents exist but no OVERVIEW.md**: "Your project has existing intents. Run `taproot overview` to generate a summary, or use `/tr-status` for a full health report."
|
|
95
|
-
- **If no intents exist yet** (empty or missing `taproot/`): "This looks like a new project.
|
|
97
|
+
- **If no intents exist yet** (empty or missing `taproot/`): "This looks like a new project. You can start from a template (`taproot init --template webapp|book-authoring|cli-tool`) for a pre-populated hierarchy, or describe your problem to `/tr-ineed`, or jump straight to `/tr-intent` if you already know what you want to build."
|
|
96
98
|
|
|
97
99
|
4. Close with context-aware guidance:
|
|
98
100
|
|
|
@@ -103,6 +105,7 @@ ineed → intent → behaviour → implement → trace → status
|
|
|
103
105
|
**What's next?**
|
|
104
106
|
[A] `/tr-ineed` — capture your first (or next) requirement
|
|
105
107
|
[B] `/tr-status` — see the current project health at a glance
|
|
108
|
+
[C] `/tr-backlog` — triage captured ideas (only if `.taproot/backlog.md` is non-empty)
|
|
106
109
|
|
|
107
110
|
## Output
|
|
108
111
|
|
package/skills/implement.md
CHANGED
|
@@ -9,6 +9,15 @@ Implement a behaviour spec: write the code, write the tests, create the `impl.md
|
|
|
9
9
|
- `path` (required): Path to the behaviour folder containing `usecase.md` to implement.
|
|
10
10
|
- `name` (optional): Slug for the implementation folder (e.g., `rest-api`, `background-job`). If omitted, derive from the implementation approach chosen.
|
|
11
11
|
|
|
12
|
+
## Autonomous mode
|
|
13
|
+
|
|
14
|
+
Before following any steps, check whether autonomous mode is active:
|
|
15
|
+
- `TAPROOT_AUTONOMOUS=1` is set in the environment, **or**
|
|
16
|
+
- `--autonomous` was passed as an argument to this skill invocation, **or**
|
|
17
|
+
- `.taproot/settings.yaml` contains `autonomous: true`
|
|
18
|
+
|
|
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
|
+
|
|
12
21
|
## Steps
|
|
13
22
|
|
|
14
23
|
1. Read `<path>/usecase.md` thoroughly. Understand:
|
|
@@ -38,7 +47,9 @@ Implement a behaviour spec: write the code, write the tests, create the `impl.md
|
|
|
38
47
|
- Any design decisions that need to be made (with options and recommendation)
|
|
39
48
|
- The implementation folder slug and path
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
**Autonomous mode:** form the plan internally, record it in the `impl.md` Design Decisions section, and proceed directly to step 5 without pausing for approval.
|
|
51
|
+
|
|
52
|
+
**Interactive mode:** present the plan. Do not proceed to writing code until the user approves.
|
|
42
53
|
|
|
43
54
|
5. Create the implementation folder `<path>/<impl-slug>/` and write `impl.md`:
|
|
44
55
|
- **Behaviour**: relative path to `../usecase.md`
|
|
@@ -56,7 +67,34 @@ Implement a behaviour spec: write the code, write the tests, create the `impl.md
|
|
|
56
67
|
- If the behaviour `**State:**` is `specified`, advance it to `implemented` and update `**Last reviewed:**` to today.
|
|
57
68
|
- Write the updated `usecase.md`. Stage it together with `impl.md` for the declaration commit.
|
|
58
69
|
|
|
59
|
-
|
|
70
|
+
5b. **Write `discussion.md`** — draft a `discussion.md` in the implementation folder capturing the deliberation behind the design decisions. This complements `impl.md` (which records conclusions) with the reasoning process:
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
# Discussion: <title matching impl.md>
|
|
74
|
+
|
|
75
|
+
## Session
|
|
76
|
+
- **Date:** YYYY-MM-DD
|
|
77
|
+
- **Skill:** tr-implement
|
|
78
|
+
|
|
79
|
+
## Pivotal Questions
|
|
80
|
+
<The 1–3 questions or exchanges that most shaped the design>
|
|
81
|
+
|
|
82
|
+
## Alternatives Considered
|
|
83
|
+
- **<Option A>** — rejected because <reason>
|
|
84
|
+
- **<Option B>** — rejected because <reason>
|
|
85
|
+
|
|
86
|
+
## Decision
|
|
87
|
+
<One paragraph: the chosen approach and why — the deliberation behind impl.md's Design Decisions>
|
|
88
|
+
|
|
89
|
+
## Open Questions
|
|
90
|
+
- <Unresolved items deferred to a future session, or "None">
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**When to skip:** If the session involved only trivial edits (typo fix, formatting, minor wording change) with no design choices or alternatives explored, omit `discussion.md`. A file with no substantive content is worse than no file.
|
|
94
|
+
|
|
95
|
+
Stage `discussion.md` alongside `impl.md` in the declaration commit.
|
|
96
|
+
|
|
97
|
+
6. **Declaration commit** — commit `impl.md`, `discussion.md` (if written), and any `usecase.md` link-section update together (no source files):
|
|
60
98
|
|
|
61
99
|
Before committing:
|
|
62
100
|
- 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.
|
|
@@ -72,8 +110,15 @@ Implement a behaviour spec: write the code, write the tests, create the `impl.md
|
|
|
72
110
|
b. Write the tests — each test should be traceable to a specific UseCase step, postcondition, error condition, or alternate flow trigger. Name tests descriptively.
|
|
73
111
|
c. Verify the tests pass
|
|
74
112
|
|
|
113
|
+
**Autonomous mode — if tests fail:** record the full test output in `impl.md` under a `## Notes` entry headed `Autonomous execution — test failure`, set `**State:** needs-rework`, and stop. Do not attempt to fix tests autonomously without context from the developer.
|
|
114
|
+
|
|
75
115
|
8. Run `taproot dod <impl-path>` to evaluate the Definition of Done. For agent-driven conditions (`check-if-affected`, `document-current`): reason about each, apply any needed changes, then record your resolution with `taproot dod <impl-path> --resolve "<condition>" --note "<reasoning>"`. Re-run until all conditions pass. `taproot dod` marks `impl.md` state `complete` when all pass.
|
|
76
116
|
|
|
117
|
+
**Autonomous mode — DoD self-resolution:**
|
|
118
|
+
- For every `check-if-affected-by`, `check-if-affected`, `check:`, and `document-current` condition: reason through it by reading the spec and source, then record the resolution with `--resolve` and `--note` without prompting.
|
|
119
|
+
- For any `check:` condition where the answer cannot be determined from the code and spec alone: write a `<!-- autonomous: pending-review -->` comment in `## DoD Resolutions` alongside the unresolved condition entry, with the question text. Continue evaluating remaining conditions. After all conditions are processed, if any remain marked pending-review, set `**State:** in-progress` and commit — the developer will complete them on return.
|
|
120
|
+
- For `run:` conditions that exit non-zero: record the output in `impl.md`, mark `needs-rework`, and stop.
|
|
121
|
+
|
|
77
122
|
9. **Implementation commit** — commit source files and `impl.md` together:
|
|
78
123
|
|
|
79
124
|
Before staging:
|
package/skills/review-all.md
CHANGED
|
@@ -73,7 +73,7 @@ Run a comprehensive review of an entire subtree — an intent and all its descen
|
|
|
73
73
|
**What's next?**
|
|
74
74
|
[A] `/tr-refine <highest-priority-path>` — fix the top-priority finding
|
|
75
75
|
[B] `/tr-plan` — surface the next implementable behaviour
|
|
76
|
-
[C] `/tr-
|
|
76
|
+
[C] `/tr-backlog <finding>` — capture a deferred finding before routing it to the hierarchy
|
|
77
77
|
|
|
78
78
|
## Output
|
|
79
79
|
|
package/skills/review.md
CHANGED
|
@@ -60,6 +60,7 @@ Stress-test a single Taproot artifact — an `intent.md`, `usecase.md`, or `impl
|
|
|
60
60
|
**What's next?**
|
|
61
61
|
[A] `/tr-refine <path>` — apply the findings to the spec
|
|
62
62
|
[B] `/tr-implement <path>/` — spec is clean; proceed to implementation
|
|
63
|
+
[C] `/tr-backlog <finding>` — capture an out-of-scope issue for later without routing it now
|
|
63
64
|
|
|
64
65
|
## Output
|
|
65
66
|
|
package/skills/status.md
CHANGED
|
@@ -78,12 +78,13 @@ Generated: <date>
|
|
|
78
78
|
[B] `/tr-refine taproot/<intent>/<behaviour>/` — add missing tests
|
|
79
79
|
[C] `/tr-plan` — pick a different next item
|
|
80
80
|
|
|
81
|
-
- **If no specific items were found** (healthy project):
|
|
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
84
|
[A] `/tr-plan` — pick the next behaviour to implement
|
|
85
|
-
[B] `/tr-ineed` —
|
|
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/backlog.md` is non-empty)
|
|
87
88
|
|
|
88
89
|
## Output
|
|
89
90
|
|