thoth-agents 0.4.2 → 0.5.1
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/LICENSE +30 -0
- package/README.md +86 -58
- package/dist/agents/prompt-sections.d.ts +5 -3
- package/dist/agents/prompt-utils.d.ts +1 -1
- package/dist/agents/worker.d.ts +2 -0
- package/dist/{chunk-STCURXAQ.js → chunk-MRFCA3U2.js} +33 -67
- package/dist/{chunk-EFGSGPYM.js → chunk-OW6I7ZUU.js} +391 -416
- package/dist/chunk-V7HSGRMB.js +1016 -0
- package/dist/{chunk-WCLUZZHI.js → chunk-VUNYH263.js} +1580 -351
- package/dist/cli/claude-code-paths.d.ts +2 -2
- package/dist/cli/codex-install.d.ts +5 -2
- package/dist/cli/codex-paths.d.ts +2 -2
- package/dist/cli/index.js +47 -11
- package/dist/cli/operations/pi.d.ts +1 -0
- package/dist/cli/pi-effort.d.ts +1 -1
- package/dist/cli/pi-external-package.d.ts +24 -0
- package/dist/cli/pi-git-source.d.ts +1 -0
- package/dist/cli/pi-install.d.ts +92 -15
- package/dist/cli/pi-managed-write.d.ts +3 -0
- package/dist/cli/pi-model-config.d.ts +17 -0
- package/dist/cli/pi-native-probe.d.ts +2 -0
- package/dist/cli/pi-paths.d.ts +2 -0
- package/dist/cli/pi-resources.d.ts +3 -1
- package/dist/cli/pi-tool-config.d.ts +32 -0
- package/dist/cli/tui/index.js +3 -3
- package/dist/cli/types.d.ts +2 -0
- package/dist/config/constants.d.ts +4 -8
- package/dist/config/schema.d.ts +7 -36
- package/dist/harness/adapters/claude-code.d.ts +2 -4
- package/dist/harness/core/agent-pack.d.ts +52 -42
- package/dist/harness/core/memory-governance.d.ts +2 -2
- package/dist/harness/core/sdd.d.ts +159 -319
- package/dist/harness/writers/pi-agent.d.ts +3 -1
- package/dist/index.js +12 -6
- package/dist/pi/tools-panel.d.ts +51 -0
- package/dist/pi.d.ts +44 -2
- package/dist/pi.js +471 -9
- package/dist/utils/subprocess.d.ts +1 -0
- package/package.json +23 -6
- package/pi/.thoth-agents-assets.json +5 -6
- package/pi/agents/thoth-designer.md +23 -8
- package/pi/agents/thoth-explorer.md +29 -9
- package/pi/agents/thoth-librarian.md +30 -8
- package/pi/agents/thoth-oracle.md +18 -10
- package/pi/agents/thoth-worker.md +96 -0
- package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +7 -12
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/.codex-plugin/plugin.json +2 -2
- package/plugin/agents/designer.md +13 -5
- package/plugin/agents/explorer.md +16 -5
- package/plugin/agents/librarian.md +15 -4
- package/plugin/agents/oracle.md +13 -7
- package/plugin/agents/orchestrator.md +82 -91
- package/plugin/agents/worker.md +76 -0
- package/plugin/skills/plan-reviewer/SKILL.md +39 -141
- package/plugin/skills/thoth-archive/SKILL.md +50 -47
- package/plugin/skills/thoth-archive/scripts/archive.mjs +287 -654
- package/plugin/skills/thoth-constitution/SKILL.md +23 -42
- package/plugin/skills/thoth-constitution/templates/constitution.md +54 -44
- package/plugin/skills/thoth-init/SKILL.md +19 -29
- package/plugin/skills/thoth-init/scripts/init.mjs +73 -66
- package/plugin/skills/thoth-sdd/SKILL.md +164 -117
- package/plugin/skills/thoth-sdd/references/phases/checklist.md +2 -22
- package/plugin/skills/thoth-sdd/references/phases/clarify.md +14 -12
- package/plugin/skills/thoth-sdd/references/phases/converge.md +2 -13
- package/plugin/skills/thoth-sdd/references/phases/explore.md +3 -8
- package/plugin/skills/thoth-sdd/references/phases/implement.md +58 -57
- package/plugin/skills/thoth-sdd/references/phases/plan.md +2 -18
- package/plugin/skills/thoth-sdd/references/phases/specify.md +2 -33
- package/plugin/skills/thoth-sdd/references/phases/tasks.md +4 -45
- package/plugin/skills/thoth-sdd/references/phases/verify.md +4 -22
- package/plugin/skills/thoth-sdd/scripts/validate.mjs +610 -1232
- package/plugin/skills/thoth-sdd/templates/change.md +94 -0
- package/skills/README.md +11 -13
- package/skills/plan-reviewer/SKILL.md +39 -141
- package/skills/thoth-archive/SKILL.md +50 -47
- package/skills/thoth-archive/scripts/archive.mjs +287 -654
- package/skills/thoth-constitution/SKILL.md +23 -42
- package/skills/thoth-constitution/templates/constitution.md +54 -44
- package/skills/thoth-init/SKILL.md +19 -29
- package/skills/thoth-init/scripts/init.mjs +73 -66
- package/skills/thoth-sdd/SKILL.md +164 -117
- package/skills/thoth-sdd/references/phases/checklist.md +2 -22
- package/skills/thoth-sdd/references/phases/clarify.md +14 -12
- package/skills/thoth-sdd/references/phases/converge.md +2 -13
- package/skills/thoth-sdd/references/phases/explore.md +3 -8
- package/skills/thoth-sdd/references/phases/implement.md +58 -57
- package/skills/thoth-sdd/references/phases/plan.md +2 -18
- package/skills/thoth-sdd/references/phases/specify.md +2 -33
- package/skills/thoth-sdd/references/phases/tasks.md +4 -45
- package/skills/thoth-sdd/references/phases/verify.md +4 -22
- package/skills/thoth-sdd/scripts/validate.mjs +610 -1232
- package/skills/thoth-sdd/templates/change.md +94 -0
- package/thoth-agents.schema.json +9 -77
- package/dist/agents/deep.d.ts +0 -2
- package/dist/agents/quick.d.ts +0 -2
- package/dist/chunk-2U5MBLLV.js +0 -312
- package/pi/agents/thoth-deep.md +0 -81
- package/pi/agents/thoth-quick.md +0 -81
- package/plugin/agents/deep.md +0 -68
- package/plugin/agents/quick.md +0 -68
- package/plugin/skills/plan-reviewer/templates/plan-review.md +0 -65
- package/plugin/skills/thoth-sdd/templates/archive-report.md +0 -25
- package/plugin/skills/thoth-sdd/templates/checklist.md +0 -27
- package/plugin/skills/thoth-sdd/templates/plan.md +0 -46
- package/plugin/skills/thoth-sdd/templates/spec.md +0 -62
- package/plugin/skills/thoth-sdd/templates/tasks.md +0 -58
- package/plugin/skills/thoth-sdd/templates/verify-report.md +0 -28
- package/skills/plan-reviewer/templates/plan-review.md +0 -65
- package/skills/thoth-sdd/templates/archive-report.md +0 -25
- package/skills/thoth-sdd/templates/checklist.md +0 -27
- package/skills/thoth-sdd/templates/plan.md +0 -46
- package/skills/thoth-sdd/templates/spec.md +0 -62
- package/skills/thoth-sdd/templates/tasks.md +0 -58
- package/skills/thoth-sdd/templates/verify-report.md +0 -28
|
@@ -1,150 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-reviewer
|
|
3
|
-
description:
|
|
3
|
+
description: Independent blocker-only Oracle review of a ready substantial SDD plan before separate implementation authorization.
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility:
|
|
5
|
+
compatibility: Requires the installed sibling thoth-sdd skill.
|
|
6
6
|
metadata:
|
|
7
7
|
author: thoth-agents
|
|
8
|
-
version: "
|
|
8
|
+
version: "2.0"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Plan Reviewer
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- an active requirements checklist, when present
|
|
50
|
-
- `openspec/memory/constitution.md`, when governance applies
|
|
51
|
-
|
|
52
|
-
OpenSpec is the only SDD artifact store. Do not mirror `plan-review.md` or its
|
|
53
|
-
payload into provider memory.
|
|
54
|
-
|
|
55
|
-
## Review method
|
|
56
|
-
|
|
57
|
-
Judge the artifact set on five dimensions:
|
|
58
|
-
|
|
59
|
-
1. Completeness: every in-scope requirement and success criterion maps to work.
|
|
60
|
-
2. Correctness: named files, symbols, commands, and public contracts are real or
|
|
61
|
-
explicitly created by the plan.
|
|
62
|
-
3. Coherence: artifacts agree on scope, sequencing, dependencies, and ownership.
|
|
63
|
-
4. Buildability: a competent implementer can execute without guessing about
|
|
64
|
-
critical paths or hidden prerequisites.
|
|
65
|
-
5. Outcome coverage: verification tasks can demonstrate the requested result.
|
|
66
|
-
|
|
67
|
-
Respect TDD ordering and the repository constitution when they apply. Report
|
|
68
|
-
non-blocking cautions separately so they do not become artificial gates.
|
|
69
|
-
|
|
70
|
-
## Native parallel executability
|
|
71
|
-
|
|
72
|
-
Structural ready validation proves that declared parallel metadata is
|
|
73
|
-
well-formed; it does not prove semantic independence. When `tasks.md` declares
|
|
74
|
-
parallel groups, Oracle must independently assess whether the plan can execute
|
|
75
|
-
them safely:
|
|
76
|
-
|
|
77
|
-
- Confirm each lane path union is genuinely disjoint from the other lanes and
|
|
78
|
-
its selected owner fits the bounded work.
|
|
79
|
-
- Confirm cross-lane data flow does not hide a dependency and that the declared
|
|
80
|
-
prerequisites and barrier reflect the real execution order.
|
|
81
|
-
- Confirm the handoff is sufficient for native capacity-bounded waves:
|
|
82
|
-
dispatch-before-wait for every admitted lane, refill before another wait, and
|
|
83
|
-
terminal reconciliation before releasing the barrier.
|
|
84
|
-
- Require a truthful sequential fallback when native concurrency or capacity is
|
|
85
|
-
unavailable or unproven.
|
|
86
|
-
|
|
87
|
-
For an evidence-backed `None` declaration, assess whether the claimed coupling
|
|
88
|
-
really prevents a safe group. Treat a structural-but-semantically-unsafe group
|
|
89
|
-
as a blocker only when the smallest repair is required before implementation;
|
|
90
|
-
keep capacity uncertainty as a non-blocking caution when the declared fallback
|
|
91
|
-
still makes the plan executable.
|
|
92
|
-
|
|
93
|
-
## Decision contract
|
|
94
|
-
|
|
95
|
-
Default to `[OKAY]`. Return `[REJECT]` only when execution is genuinely blocked.
|
|
96
|
-
A rejection contains at most 3 actionable blockers. For each blocker, state why
|
|
97
|
-
it blocks execution and the smallest concrete repair. Preserve the exact
|
|
98
|
-
`[OKAY]` and `[REJECT]` tokens across every harness.
|
|
99
|
-
|
|
100
|
-
After `[REJECT]`, Root repairs actionable same-intent planning artifacts,
|
|
101
|
-
revalidates affected gates, and starts a fresh Oracle approval round until
|
|
102
|
-
`[OKAY]`. A material human-owned blocker stops the loop for user input. Do not
|
|
103
|
-
silently approve a changed plan or reuse an Oracle to issue a new approval.
|
|
104
|
-
|
|
105
|
-
## Freshness and persistence
|
|
106
|
-
|
|
107
|
-
Root computes SHA-256 digests for every reviewed artifact and records them in
|
|
108
|
-
the persisted review. Treat a stored approval as fresh only while every recorded
|
|
109
|
-
digest matches. A stale review has no gate value; rerun it only if the user still
|
|
110
|
-
chooses review.
|
|
111
|
-
|
|
112
|
-
The persisted artifact records the status, Oracle role, timestamp, route,
|
|
113
|
-
comments, non-blocking notes, blockers, any explicit override, and source
|
|
114
|
-
digests. Oracle returns this payload; Root is the only writer that persists it.
|
|
115
|
-
|
|
116
|
-
## Handoff
|
|
117
|
-
|
|
118
|
-
After `[OKAY]`, Root summarizes the approved scope, approach, ownership,
|
|
119
|
-
verification, and material risks before asking the native question:
|
|
120
|
-
`Implement (Recommended)` or `Stop`. Any explicit `Stop` answer wins. If the
|
|
121
|
-
implementation question returns answerless, Root makes at most three total
|
|
122
|
-
attempts; after the third answerless result, Root treats implementation as
|
|
123
|
-
selected. `[OKAY]` alone does not authorize implementation before that explicit
|
|
124
|
-
choice or bounded fallback resolves. Choosing `Proceed without review` at the
|
|
125
|
-
earlier choice does authorize implementation.
|
|
126
|
-
|
|
127
|
-
Plan review never replaces or substitutes for mandatory final verification.
|
|
128
|
-
Every route still requires post-implementation verification, but ownership is
|
|
129
|
-
proportional: trivial deterministic Direct work may be Root-verified when Root
|
|
130
|
-
is not self-approving its own implementation; materially risky Direct work and
|
|
131
|
-
every Accelerated or Full final verify require a fresh read-only Oracle.
|
|
132
|
-
|
|
133
|
-
## Output
|
|
134
|
-
|
|
135
|
-
For an executable plan:
|
|
136
|
-
|
|
137
|
-
```text
|
|
138
|
-
[OKAY]
|
|
139
|
-
- Brief evidence that the plan is complete, coherent, and executable.
|
|
140
|
-
- Optional non-blocking cautions.
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
For a blocked plan:
|
|
144
|
-
|
|
145
|
-
```text
|
|
146
|
-
[REJECT]
|
|
147
|
-
1. <blocker, impact, and smallest repair>
|
|
148
|
-
2. <optional blocker>
|
|
149
|
-
3. <optional blocker>
|
|
150
|
-
```
|
|
13
|
+
After the substantial plan passes `ready`, root first shows the user a concise
|
|
14
|
+
plan summary, then always offers Review plan with Oracle (Recommended) or
|
|
15
|
+
Proceed without review, even when implementation is already authorized. Silence is never an explicit skip; a fresh review runs only
|
|
16
|
+
when selected. Root, not Oracle, owns choices, budgets, recovery, and
|
|
17
|
+
implementation authorization. Every orchestrator choice with a meaningful
|
|
18
|
+
recommendation follows the per-question rule: repeat the same question after its
|
|
19
|
+
first and second confirmed answerless native returns without dependent work,
|
|
20
|
+
then select the recommendation after the third. Explicit answers and `Stop` win.
|
|
21
|
+
Pending, unavailable, failed, interrupted, or host-prohibited attempts do not
|
|
22
|
+
count. Report higher-priority host limits accurately; do not claim unmade returns
|
|
23
|
+
or an explicit user choice. Never invent facts or secrets; when a human-owned
|
|
24
|
+
decision is still unresolved, recommend safe deferral.
|
|
25
|
+
|
|
26
|
+
A fresh read-only Oracle reviews `.thoth/changes/<id>/<id>.md`,
|
|
27
|
+
`.thoth/constitution.md`, affected canonical `.thoth/specs/`, and focused source
|
|
28
|
+
evidence. Check grounded exploration, observable acceptance, settled
|
|
29
|
+
clarification, technical feasibility, dependencies, verification seams,
|
|
30
|
+
autonomy bounds, and native capacity. Concurrent tasks need semantic
|
|
31
|
+
independence and non-overlapping mutable ownership; unknown liveness blocks only
|
|
32
|
+
conflicting work. Do not require multiple reports, universal requirement IDs,
|
|
33
|
+
workflow manifests, evidence directories, or a scheduler. Structural `ready` is
|
|
34
|
+
necessary but not sufficient for semantic readiness.
|
|
35
|
+
|
|
36
|
+
Return `[OKAY]` with concise evidence or `[REJECT]` with at most three actual
|
|
37
|
+
execution blockers and smallest repairs; keep cautions separate. Root repairs
|
|
38
|
+
same-intent blockers in the same record, revalidates affected gates, and uses a
|
|
39
|
+
fresh Oracle for each round. A human-owned material blocker stops the round.
|
|
40
|
+
Root records both review disposition and selection provenance without inventing
|
|
41
|
+
approval. Accepted provenance is `EXPLICIT_REVIEW`, `EXPLICIT_SKIP`, or
|
|
42
|
+
`DEFAULT_REVIEW_AFTER_3`; `SKIPPED` requires explicit skip, while `OKAY` requires
|
|
43
|
+
explicit review or the third-return review default. After `[OKAY]`, root preserves
|
|
44
|
+
the separate Implement (Recommended) / Stop choice and separately offers it,
|
|
45
|
+
honoring prior explicit implementation authorization; an explicit later Stop
|
|
46
|
+
supersedes it. That choice has its own per-question budget. Review never
|
|
47
|
+
substitutes for fresh independent final Oracle verification, and Oracle never
|
|
48
|
+
writes change artifacts.
|
|
@@ -1,56 +1,59 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: thoth-archive
|
|
3
|
-
description:
|
|
3
|
+
description: Transactionally apply declared .thoth/specs deltas and archive independently verified substantial SDD changes.
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility: Requires Node.js >=22.19 and
|
|
5
|
+
compatibility: Requires Node.js >=22.19 and installed sibling thoth-sdd skill.
|
|
6
6
|
metadata:
|
|
7
7
|
author: thoth-agents
|
|
8
|
-
version: "
|
|
8
|
+
version: "2.0"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Thoth Archive
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
13
|
+
Root archives only after the implementation writer has terminated and a fresh
|
|
14
|
+
independent Oracle PASS has covered the actual change, diff, checks, and risks.
|
|
15
|
+
Structural closeout validation is not approval. The single record must have all
|
|
16
|
+
tasks complete, explicit plan-review disposition and implementation authorization,
|
|
17
|
+
every acceptance outcome's concrete PASS check/evidence, reviewed-record and
|
|
18
|
+
source digests, reviewed canonical baselines for every affected capability, and
|
|
19
|
+
`**Archive**: READY`. Each affected canonical spec is covered in that same record
|
|
20
|
+
by its SHA-256 `Source` entry or an explicit `absent` entry. Missing or stale
|
|
21
|
+
coverage blocks before canonical or archive changes. No verification or archive
|
|
22
|
+
report is required or allowed.
|
|
23
|
+
|
|
24
|
+
Plan-review selection provenance must be `EXPLICIT_REVIEW`, `EXPLICIT_SKIP`, or
|
|
25
|
+
`DEFAULT_REVIEW_AFTER_3`. A `SKIPPED` disposition requires `EXPLICIT_SKIP`; an
|
|
26
|
+
`OKAY` disposition requires explicit review or the third-answerless review
|
|
27
|
+
default. An unanswered offer never authorizes skip. The orchestrator owns the
|
|
28
|
+
choice and uses the shared per-question recommendation rule; archive validation
|
|
29
|
+
does not claim that it can authenticate the native interaction.
|
|
30
|
+
|
|
31
|
+
Run the installed sibling validator at `--through closeout`, then:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
node "<skill-dir>/scripts/archive.mjs" --change .thoth/changes/<id> --date YYYY-MM-DD --json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The shipped `--project <repository-root>` option is also accepted and checked
|
|
38
|
+
against the change location. JSON includes the stable change ID, archive path,
|
|
39
|
+
record path, and updated capabilities.
|
|
40
|
+
|
|
41
|
+
The script validates before creating the transaction, revalidates under its
|
|
42
|
+
exclusive transaction, and checks actual reviewed baselines again immediately
|
|
43
|
+
before mutation. It applies only declared ADDED/MODIFIED/REMOVED/RENAMED
|
|
44
|
+
exact-title requirements to `.thoth/specs/<capability>/spec.md`, preserving
|
|
45
|
+
unaffected requirements. It then moves the active
|
|
46
|
+
`.thoth/changes/<id>/<id>.md` record to
|
|
47
|
+
`.thoth/changes/archive/<date>-<id>/<id>.md`. The filename and identity remain
|
|
48
|
+
unchanged; the date appears only in the archive directory. Historical changes
|
|
49
|
+
are preserved.
|
|
50
|
+
|
|
51
|
+
It preflights canonical baselines and destination topology, captures displaced
|
|
52
|
+
original bytes, installs exclusively without overwriting concurrent creation,
|
|
53
|
+
verifies applied bytes, and rolls back handled failures. It rejects unsafe IDs,
|
|
54
|
+
symlink escapes, archive collisions, and unfinished transactions. Forced
|
|
55
|
+
termination is not crash-atomic; a retained
|
|
56
|
+
`.thoth/.archive-transaction/recovery.json` is a filesystem recovery aid, not
|
|
57
|
+
workflow state. Inspect real files, backups, and change/archive locations before
|
|
58
|
+
recovery; never blindly replay external effects. No installer or network access
|
|
59
|
+
is involved.
|