@imix-js/taproot 0.5.1 → 0.7.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 +39 -29
- 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 +69 -34
- package/dist/commands/commithook.js.map +1 -1
- package/dist/commands/init.d.ts +12 -2
- package/dist/commands/init.js +248 -46
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/truth-sign.js +32 -5
- package/dist/commands/truth-sign.js.map +1 -1
- package/dist/commands/update.js +156 -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/dor-runner.js +116 -2
- 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/impl-reader.d.ts +1 -0
- package/dist/core/impl-reader.js +8 -0
- package/dist/core/impl-reader.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.d.ts +1 -0
- package/dist/validators/structure-rules.js +15 -0
- package/dist/validators/structure-rules.js.map +1 -1
- package/docs/agents.md +2 -2
- package/docs/architecture.md +3 -3
- package/docs/cli.md +7 -7
- package/docs/configuration.md +6 -6
- package/docs/patterns.md +7 -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 +16 -4
- package/skills/define-truth.md +24 -8
- package/skills/discover-truths.md +7 -7
- package/skills/guide.md +1 -1
- package/skills/implement.md +5 -5
- package/skills/ineed.md +21 -4
- package/skills/refine.md +3 -3
- package/skills/review-all.md +2 -2
- package/skills/status.md +2 -2
package/docs/patterns.md
CHANGED
|
@@ -8,10 +8,10 @@ Reusable patterns for extending and enforcing the taproot hierarchy. Each patter
|
|
|
8
8
|
|
|
9
9
|
**Problem:** You have an architectural rule that should apply to every implementation — not just a one-time concern, but a standing requirement. Examples: every skill must include a session hygiene signal; every skill that produces output must present a **What's next?** block; every implementation must satisfy a security review checklist. Writing this rule in a README or CLAUDE.md makes it aspirational. You want it enforced automatically, at commit time, for every new implementation.
|
|
10
10
|
|
|
11
|
-
**Pattern:** Define the rule as a behaviour spec (`usecase.md`), then add a `check-if-affected-by` entry to
|
|
11
|
+
**Pattern:** Define the rule as a behaviour spec (`usecase.md`), then add a `check-if-affected-by` entry to `taproot/settings.yaml`.
|
|
12
12
|
|
|
13
13
|
```yaml
|
|
14
|
-
#
|
|
14
|
+
# taproot/settings.yaml
|
|
15
15
|
definitionOfDone:
|
|
16
16
|
- check-if-affected-by: skill-architecture/context-engineering
|
|
17
17
|
```
|
|
@@ -37,7 +37,7 @@ When the DoD runner encounters this condition, it instructs the agent to:
|
|
|
37
37
|
**How to add a new cross-cutting constraint:**
|
|
38
38
|
|
|
39
39
|
1. Write the spec — `/tr-behaviour taproot/<your-intent>/ "<rule>"` — define what compliance looks like, what non-compliance looks like, and how to resolve it
|
|
40
|
-
2. Add to
|
|
40
|
+
2. Add to `taproot/settings.yaml`:
|
|
41
41
|
```yaml
|
|
42
42
|
definitionOfDone:
|
|
43
43
|
- check-if-affected-by: <intent-slug>/<behaviour-slug>
|
|
@@ -95,11 +95,11 @@ The agent is asked: "Does this implementation require changes to `<file>`?" If y
|
|
|
95
95
|
|
|
96
96
|
**Problem:** You have a one-off question the agent should reason about at DoD (or DoR) time — something too project-specific to warrant a full behaviour spec, but important enough to enforce at every commit. Examples: "should this story be split?", "does this change affect the public API contract?", "is there a simpler approach we haven't considered?".
|
|
97
97
|
|
|
98
|
-
**Pattern:** Add a `check:` entry to `definitionOfDone` (or `definitionOfReady`) in
|
|
98
|
+
**Pattern:** Add a `check:` entry to `definitionOfDone` (or `definitionOfReady`) in `taproot/settings.yaml`.
|
|
99
99
|
|
|
100
100
|
```yaml
|
|
101
101
|
definitionOfDone:
|
|
102
|
-
- check: "does this story introduce a cross-cutting concern that warrants a new check-if-affected-by or check-if-affected entry in
|
|
102
|
+
- check: "does this story introduce a cross-cutting concern that warrants a new check-if-affected-by or check-if-affected entry in taproot/settings.yaml?"
|
|
103
103
|
- check: "does this story reveal a reusable pattern worth documenting in docs/patterns.md?"
|
|
104
104
|
```
|
|
105
105
|
|
|
@@ -114,7 +114,7 @@ The agent reads the question text, reasons whether the answer is yes, no, or not
|
|
|
114
114
|
|
|
115
115
|
| Question | Action if yes |
|
|
116
116
|
|---|---|
|
|
117
|
-
| `does this story introduce a cross-cutting concern that warrants a new check-if-affected-by or check-if-affected entry in
|
|
117
|
+
| `does this story introduce a cross-cutting concern that warrants a new check-if-affected-by or check-if-affected entry in taproot/settings.yaml?` | Agent adds the entry to `taproot/settings.yaml` |
|
|
118
118
|
| `does this story reveal a reusable pattern worth documenting in docs/patterns.md?` | Agent adds a pattern entry to `docs/patterns.md` |
|
|
119
119
|
|
|
120
120
|
---
|
|
@@ -131,7 +131,7 @@ The agent reads the question text, reasons whether the answer is yes, no, or not
|
|
|
131
131
|
Before following any steps, check whether autonomous mode is active:
|
|
132
132
|
- `TAPROOT_AUTONOMOUS=1` is set in the environment, **or**
|
|
133
133
|
- `--autonomous` was passed as an argument to this skill invocation, **or**
|
|
134
|
-
-
|
|
134
|
+
- `taproot/settings.yaml` contains `autonomous: true`
|
|
135
135
|
|
|
136
136
|
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.
|
|
137
137
|
```
|
package/docs/security.md
CHANGED
|
@@ -9,9 +9,9 @@ This document describes taproot's security model, applicable threat categories,
|
|
|
9
9
|
Taproot has two security boundaries that must be explicitly trusted:
|
|
10
10
|
|
|
11
11
|
**`settings.yaml` — Executable Configuration**
|
|
12
|
-
The `definitionOfDone` and `definitionOfReady` check entries are executed as shell commands via `spawnSync(..., { shell: true })` in `dod-runner.ts` / `dor-runner.ts`. This is an intentional design — equivalent to `package.json` scripts. The trust boundary is: whoever controls
|
|
12
|
+
The `definitionOfDone` and `definitionOfReady` check entries are executed as shell commands via `spawnSync(..., { shell: true })` in `dod-runner.ts` / `dor-runner.ts`. This is an intentional design — equivalent to `package.json` scripts. The trust boundary is: whoever controls `taproot/settings.yaml` controls what shell commands run during gate evaluation.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**`taproot/agent/skills/` — Agent Instructions**
|
|
15
15
|
Skill files (`.md`) are loaded and delivered as instructions to AI agents. Whoever controls skill content controls agent behaviour. A compromised skill file is a direct agent instruction injection vector.
|
|
16
16
|
|
|
17
17
|
Both boundaries are intentional; neither should be changed. Both must be consciously managed.
|
|
@@ -67,14 +67,14 @@ Recommended controls for taproot's own CI and for projects using taproot:
|
|
|
67
67
|
|
|
68
68
|
## Skill Security Guidelines
|
|
69
69
|
|
|
70
|
-
All skill files (
|
|
70
|
+
All skill files (`taproot/agent/skills/*.md`, `skills/*.md`) must follow these rules:
|
|
71
71
|
|
|
72
72
|
1. **No shell execution without validation** — do not instruct agents to run shell commands unless the input is validated or the command is fully static
|
|
73
73
|
2. **No hardcoded credentials or tokens** — skill files are committed to version control and distributed via npm; credentials in skills are a public disclosure
|
|
74
74
|
3. **Least-privilege for agent instructions** — request only the permissions and actions the skill genuinely needs; avoid open-ended "do whatever is needed" patterns
|
|
75
75
|
4. **No sensitive data in output** — do not instruct agents to echo or log content from `settings.yaml` commands (raw command strings, exit output)
|
|
76
76
|
|
|
77
|
-
Every change to a skill file triggers the DoD skill review condition (see
|
|
77
|
+
Every change to a skill file triggers the DoD skill review condition (see `taproot/settings.yaml`).
|
|
78
78
|
|
|
79
79
|
---
|
|
80
80
|
|
package/docs/workflows.md
CHANGED
|
@@ -144,7 +144,7 @@ After building up several specs, some domain terms and business rules will recur
|
|
|
144
144
|
/tr-discover-truths
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
The skill scans all `intent.md` and `usecase.md` files, identifies recurring terms, business rules, and conventions not yet defined in `taproot/global-truths/`, and presents them as candidates. For each candidate you choose: **promote** (routes to `/tr-ineed` → define-truth), **backlog** (saves to
|
|
147
|
+
The skill scans all `intent.md` and `usecase.md` files, identifies recurring terms, business rules, and conventions not yet defined in `taproot/global-truths/`, and presents them as candidates. For each candidate you choose: **promote** (routes to `/tr-ineed` → define-truth), **backlog** (saves to `taproot/agent/backlog.md` for later), **skip** (reappears next run), or **dismiss** (permanently suppressed).
|
|
148
148
|
|
|
149
149
|
Truth discovery also runs as a final pass inside `/tr-review-all`, appending a `## Truth Candidates` section to the review report.
|
|
150
150
|
|
package/package.json
CHANGED
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/agent/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/agent/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/agent/backlog.md`. Confirm: *"✓ Discarded #n"*. Redisplay the updated numbered list.
|
|
40
|
+
- **`P <n>` promote to /tr-ineed** — remove item n from `taproot/agent/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/agent/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/agent/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/agent/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
|
|
|
@@ -60,13 +60,25 @@ Execute the full commit procedure: classify the commit type, run the appropriate
|
|
|
60
60
|
|
|
61
61
|
3. If a `check:` condition requires action you cannot take (e.g. failing tests), report: "Cannot commit — `<condition>` is unresolved and requires: `<correction hint>`." Stop and wait.
|
|
62
62
|
|
|
63
|
-
4.
|
|
63
|
+
4. **Truth consistency check** — if `taproot/global-truths/` exists:
|
|
64
|
+
a. Collect all truth files applicable at impl level: intent-scoped truths (always), behaviour-scoped truths, and impl-scoped truths.
|
|
65
|
+
b. Read each applicable truth file. If a file is unreadable, note it and skip.
|
|
66
|
+
c. Check the staged impl.md and source changes for consistency with applicable truths:
|
|
67
|
+
- Are defined architectural patterns and project conventions being followed?
|
|
68
|
+
- Are implementation-level rules respected?
|
|
69
|
+
- Are domain terms used consistently with their definitions?
|
|
70
|
+
d. If a conflict is found, surface it before proceeding:
|
|
71
|
+
> "Truth conflict: `<excerpt>` in staged changes conflicts with `global-truths/<file>`: `<truth excerpt>`. [A] Fix the implementation | [B] Update the truth | [C] Proceed with conflict noted"
|
|
72
|
+
Wait for the developer's choice. Do not proceed to step 5 until resolved.
|
|
73
|
+
e. If no conflicts (or all resolved): run `taproot truth-sign` to record the session marker the hook validates.
|
|
74
|
+
|
|
75
|
+
5. Stage source files + all matched impl.md files and commit with a concise one-line message.
|
|
64
76
|
|
|
65
77
|
### Declaration commit
|
|
66
78
|
|
|
67
79
|
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.
|
|
68
80
|
|
|
69
|
-
2. Read
|
|
81
|
+
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:
|
|
70
82
|
```
|
|
71
83
|
condition: <name> | note: <reasoning> | resolved: <date>
|
|
72
84
|
```
|
package/skills/define-truth.md
CHANGED
|
@@ -38,9 +38,25 @@ Create or update a truth entry in `taproot/global-truths/` — a fact, business
|
|
|
38
38
|
|
|
39
39
|
Wait for the developer's choice.
|
|
40
40
|
|
|
41
|
-
### Phase 3 —
|
|
41
|
+
### Phase 3 — Name the File
|
|
42
42
|
|
|
43
|
-
4.
|
|
43
|
+
4. Propose a category-level name for the file — one that can hold multiple related truths, not the specific term being captured now:
|
|
44
|
+
|
|
45
|
+
> "What should the file be called? Pick a category name so related truths can live together:
|
|
46
|
+
>
|
|
47
|
+
> Suggested names by scope:
|
|
48
|
+
> - **intent**: `glossary` · `principles` · `ux-principles` · `domain-model` · `system-context`
|
|
49
|
+
> - **behaviour**: `principles` · `guarantees` · `rules`
|
|
50
|
+
> - **impl**: `architecture` · `tech-choices` · `patterns`
|
|
51
|
+
>
|
|
52
|
+
> (Or enter your own name — keep it generic enough to hold future truths of the same kind.)"
|
|
53
|
+
|
|
54
|
+
If a file with that name already exists at the target path, note it:
|
|
55
|
+
> "A file `<name>_<scope>.md` already exists — I'll append to it rather than create a new one."
|
|
56
|
+
|
|
57
|
+
### Phase 4 — Choose Convention
|
|
58
|
+
|
|
59
|
+
5. Ask which storage convention to use:
|
|
44
60
|
> "Which convention do you prefer?
|
|
45
61
|
> - **[S] Suffix** — `<name>_<scope>.md` in `taproot/global-truths/` (e.g. `glossary_intent.md`)
|
|
46
62
|
> - **[F] Sub-folder** — `<scope>/<name>.md` in `taproot/global-truths/` (e.g. `intent/glossary.md`)
|
|
@@ -50,25 +66,25 @@ Create or update a truth entry in `taproot/global-truths/` — a fact, business
|
|
|
50
66
|
If the project already has truth files using one convention, note it:
|
|
51
67
|
> "Your project currently uses the <suffix|sub-folder> convention — using it here keeps things consistent."
|
|
52
68
|
|
|
53
|
-
### Phase
|
|
69
|
+
### Phase 5 — Write the File
|
|
54
70
|
|
|
55
|
-
|
|
71
|
+
6. Determine the file path:
|
|
56
72
|
- **Suffix**: `taproot/global-truths/<name>_<scope>.md`
|
|
57
73
|
- **Sub-folder**: `taproot/global-truths/<scope>/<name>.md`
|
|
58
74
|
|
|
59
75
|
Create `taproot/global-truths/` if it does not exist.
|
|
60
76
|
|
|
61
|
-
|
|
77
|
+
7. If the file already exists, read it and present:
|
|
62
78
|
> "A truth file already exists at `<path>`. Here's the current content: [excerpt]. Do you want to [A] append to it, [B] replace it, or [C] cancel?"
|
|
63
79
|
Wait for the developer's choice.
|
|
64
80
|
|
|
65
|
-
|
|
81
|
+
8. Write the truth file with the confirmed content. Report:
|
|
66
82
|
> "✓ Written: `<path>` (scope: <scope>)"
|
|
67
83
|
|
|
68
|
-
|
|
84
|
+
9. **Scope ambiguity check** — if the file was placed directly in `taproot/global-truths/` with no `_<scope>` suffix and not inside a scoped sub-folder, warn:
|
|
69
85
|
> "`<filename>` has no scope signal — it defaults to intent scope (applies everywhere). Add a `_intent`, `_behaviour`, or `_impl` suffix, or move it to a scoped sub-folder, to make the scope explicit."
|
|
70
86
|
|
|
71
|
-
|
|
87
|
+
10. **Conflicting scope signals check** — if the file has both a suffix and is inside a scoped sub-folder that disagree, warn:
|
|
72
88
|
> "`<path>` has conflicting scope signals — sub-folder (`<folder-scope>`) is more restrictive than suffix (`<suffix-scope>`). The restrictive scope (`<folder-scope>`) applies. Rename or move the file to resolve."
|
|
73
89
|
|
|
74
90
|
> 💡 If this session is getting long, consider running `/compact` or starting a fresh context before the next task.
|
|
@@ -13,9 +13,9 @@ 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/agent/backlog.md` as "truth candidate: `<term>`" entries, then report the summary.
|
|
19
19
|
|
|
20
20
|
## Steps
|
|
21
21
|
|
|
@@ -31,7 +31,7 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
31
31
|
|
|
32
32
|
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
33
|
|
|
34
|
-
4. Read
|
|
34
|
+
4. Read `taproot/agent/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
35
|
|
|
36
36
|
### Phase 3 — Identify Candidates
|
|
37
37
|
|
|
@@ -89,11 +89,11 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
89
89
|
- No record written; candidate reappears on next discovery run
|
|
90
90
|
|
|
91
91
|
**Backlog [B]:**
|
|
92
|
-
- Append to
|
|
92
|
+
- Append to `taproot/agent/backlog.md`: `- [YYYY-MM-DD] truth candidate: <term>`
|
|
93
93
|
- Move to next candidate
|
|
94
94
|
|
|
95
95
|
**Dismiss [D]:**
|
|
96
|
-
- Append to
|
|
96
|
+
- Append to `taproot/agent/backlog.md`: `- [YYYY-MM-DD] reviewed — not a truth: <term>`
|
|
97
97
|
- This entry suppresses the candidate on all future discovery runs
|
|
98
98
|
- Move to next candidate
|
|
99
99
|
|
|
@@ -113,7 +113,7 @@ If any of these is true, **autonomous mode is active** — skip interactive prom
|
|
|
113
113
|
## Output
|
|
114
114
|
|
|
115
115
|
- Zero or more truth files created in `taproot/global-truths/` (via `/tr-ineed` → define-truth)
|
|
116
|
-
-
|
|
116
|
+
- `taproot/agent/backlog.md` updated with any backlogged or dismissed candidates
|
|
117
117
|
- Summary report: N promoted, N skipped, N backlogged, N dismissed
|
|
118
118
|
|
|
119
119
|
## CLI Dependencies
|
|
@@ -125,5 +125,5 @@ None.
|
|
|
125
125
|
- 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
126
|
- "Recurring" means 2 or more specs — not just repeated within a single spec.
|
|
127
127
|
- 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
|
|
128
|
+
- Dismissed entries in `taproot/agent/backlog.md` are matched by the literal string "reviewed — not a truth: `<term>`" — the suppression logic is substring-match on the candidate term.
|
|
129
129
|
- This skill is read-only on the hierarchy — it never modifies `intent.md` or `usecase.md` files directly.
|
package/skills/guide.md
CHANGED
|
@@ -107,7 +107,7 @@ ineed → intent → behaviour → implement → trace → status
|
|
|
107
107
|
**What's next?**
|
|
108
108
|
[A] `/tr-ineed` — capture your first (or next) requirement
|
|
109
109
|
[B] `/tr-status` — see the current project health at a glance
|
|
110
|
-
[C] `/tr-backlog` — triage captured ideas (only if
|
|
110
|
+
[C] `/tr-backlog` — triage captured ideas (only if `taproot/agent/backlog.md` is non-empty)
|
|
111
111
|
|
|
112
112
|
## Output
|
|
113
113
|
|
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
|
```
|
package/skills/ineed.md
CHANGED
|
@@ -10,7 +10,24 @@ Route a natural language requirement to the right place in the taproot hierarchy
|
|
|
10
10
|
|
|
11
11
|
## Steps
|
|
12
12
|
|
|
13
|
-
0. **
|
|
13
|
+
0. **Global truth check** — Before anything else, determine if the requirement is a **principle, fact, or rule to capture** rather than a feature to build or enforce.
|
|
14
|
+
|
|
15
|
+
Global truth signals:
|
|
16
|
+
- User explicitly says "as a global truth", "add this as a truth", "capture this as a principle"
|
|
17
|
+
- The requirement is a design principle or quality attribute with no concrete actor or user-visible action (e.g. "fail early", "discoverable by default", "no surprises")
|
|
18
|
+
- The requirement describes how the system *should be* rather than what it *should do*
|
|
19
|
+
|
|
20
|
+
If a global truth signal is present, **interrupt before proceeding**:
|
|
21
|
+
> "That sounds like a **global truth** — a design principle to capture in `taproot/global-truths/`, not a feature to build. Should I route it there, or is this something that should actively enforce on every implementation via a DoD gate?
|
|
22
|
+
> **[A]** Global truth → route to `/tr-define-truth`
|
|
23
|
+
> **[B]** Enforcement gate → apply `check-if-affected-by` pattern
|
|
24
|
+
> **[C]** New requirement → continue with normal routing"
|
|
25
|
+
|
|
26
|
+
- **[A]**: call `/tr-define-truth` with the principle. Stop — do not continue routing.
|
|
27
|
+
- **[B]**: proceed to pattern check below.
|
|
28
|
+
- **[C]** or no global truth signal: proceed to pattern check below.
|
|
29
|
+
|
|
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:
|
|
14
31
|
- "apply to all / every implementation / every skill / everywhere" → `check-if-affected-by`
|
|
15
32
|
- "guide agents / architecture rules / agents should follow / enforce a rule" → `check-if-affected-by`
|
|
16
33
|
- "enforce documentation / docs must stay current / keep docs accurate" → `document-current`
|
|
@@ -18,14 +35,14 @@ Route a natural language requirement to the right place in the taproot hierarchy
|
|
|
18
35
|
- "research before building / check if a library exists / look up how to implement" → research-first (`/tr-research`)
|
|
19
36
|
|
|
20
37
|
If a match is found, **interrupt before proceeding**:
|
|
21
|
-
> "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."
|
|
22
39
|
> **[A] Use this pattern now** — I'll guide you through applying it
|
|
23
40
|
> **[B] Continue as a new requirement** — route and spec it normally
|
|
24
41
|
|
|
25
|
-
- **[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.
|
|
26
43
|
- **[B]** or no match: proceed to step 1.
|
|
27
44
|
|
|
28
|
-
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.
|
|
29
46
|
|
|
30
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:
|
|
31
48
|
|
package/skills/refine.md
CHANGED
|
@@ -11,14 +11,14 @@ Update a behaviour spec (`usecase.md`) based on what was learned during or after
|
|
|
11
11
|
|
|
12
12
|
## Steps
|
|
13
13
|
|
|
14
|
-
0. **Pattern check** — If
|
|
14
|
+
0. **Pattern check** — If `taproot/agent/docs/patterns.md` exists, scan the `finding` input for semantic matches. Match signals:
|
|
15
15
|
- "applies to all / every implementation should" → `check-if-affected-by`
|
|
16
16
|
- "enforce a rule / architectural constraint" → `check-if-affected-by`
|
|
17
17
|
- "docs should stay current / keep X updated" → `document-current` or `check-if-affected: X`
|
|
18
18
|
|
|
19
19
|
If a match is found, **interrupt before reading the spec**:
|
|
20
|
-
> "Before I refine this — that finding sounds like the **`<pattern-name>`** pattern. <one-line description>. See
|
|
21
|
-
> **[A] Apply the pattern** — configure it in
|
|
20
|
+
> "Before I refine this — that finding sounds like the **`<pattern-name>`** pattern. <one-line description>. See `taproot/agent/docs/patterns.md`."
|
|
21
|
+
> **[A] Apply the pattern** — configure it in `taproot/settings.yaml` instead of editing the spec
|
|
22
22
|
> **[B] Continue refining** — the spec change is the right approach
|
|
23
23
|
|
|
24
24
|
- **[A]**: guide through applying the pattern. Do not modify `usecase.md`.
|
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
|
|
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/agent/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
|
|
89
|
+
**If [D]:** append each candidate to `taproot/agent/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
|
```
|
package/skills/status.md
CHANGED
|
@@ -78,13 +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): check whether
|
|
81
|
+
- **If no specific items were found** (healthy project): check whether `taproot/agent/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
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
|
|
87
|
+
[D] `/tr-backlog` — triage captured ideas (only if `taproot/agent/backlog.md` is non-empty)
|
|
88
88
|
|
|
89
89
|
## Output
|
|
90
90
|
|