thoth-agents 0.3.3 → 0.3.5

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.
Files changed (32) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +28 -14
  3. package/dist/{chunk-YUCGIJPP.js → chunk-6GQYMWWT.js} +1 -1
  4. package/dist/{chunk-XO74DXBZ.js → chunk-F2K4CS5J.js} +32 -23
  5. package/dist/{chunk-UQOCEMU3.js → chunk-W5GCMYA3.js} +59 -20
  6. package/dist/cli/index.js +3 -3
  7. package/dist/cli/skills.d.ts +2 -0
  8. package/dist/cli/tui/index.js +10 -9
  9. package/dist/harness/core/agent-pack.d.ts +3 -3
  10. package/dist/harness/core/sdd.d.ts +30 -23
  11. package/dist/index.js +2 -2
  12. package/package.json +1 -1
  13. package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +2 -2
  14. package/plugin/.claude-plugin/plugin.json +1 -1
  15. package/plugin/.codex-plugin/plugin.json +1 -1
  16. package/plugin/agents/oracle.md +6 -6
  17. package/plugin/agents/orchestrator.md +8 -7
  18. package/plugin/skills/plan-reviewer/SKILL.md +107 -0
  19. package/plugin/skills/plan-reviewer/templates/plan-review.md +65 -0
  20. package/plugin/skills/thoth-constitution/templates/constitution.md +2 -2
  21. package/plugin/skills/thoth-init/SKILL.md +1 -1
  22. package/plugin/skills/thoth-init/scripts/init.mjs +1 -0
  23. package/plugin/skills/thoth-sdd/SKILL.md +21 -15
  24. package/skills/README.md +4 -2
  25. package/skills/plan-reviewer/SKILL.md +107 -0
  26. package/skills/plan-reviewer/templates/plan-review.md +65 -0
  27. package/skills/thoth-constitution/templates/constitution.md +2 -2
  28. package/skills/thoth-init/SKILL.md +1 -1
  29. package/skills/thoth-init/scripts/init.mjs +1 -0
  30. package/skills/thoth-sdd/SKILL.md +21 -15
  31. package/plugin/skills/thoth-sdd/references/phases/analyze.md +0 -21
  32. package/skills/thoth-sdd/references/phases/analyze.md +0 -21
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: plan-reviewer
3
+ description: Review a ready Accelerated or Full SDD artifact set for execution blockers after the user chooses the optional Oracle plan review. Use only for the pre-implementation plan-review phase; return exact [OKAY] or [REJECT] semantics while keeping final verification separate.
4
+ metadata:
5
+ author: thoth-agents
6
+ version: '1.0'
7
+ ---
8
+
9
+ # Plan Reviewer
10
+
11
+ Review whether an accepted SDD plan can be implemented safely as written. Focus
12
+ on true execution blockers, not stylistic preferences or redesign ideas.
13
+
14
+ ## Activation
15
+
16
+ Use this skill only after all of these conditions hold:
17
+
18
+ - The selected route is Accelerated or Full.
19
+ - The route's `ready` validator gate has passed.
20
+ - The user chose `Review plan with Oracle (Recommended)` instead of
21
+ `Proceed without review`.
22
+
23
+ Do not activate automatically, and do not use it for Direct work. The user may
24
+ proceed without this review. Skipping it means there is no pre-implementation
25
+ Oracle review; mandatory final Oracle verify still applies.
26
+
27
+ ## Ownership and inputs
28
+
29
+ Root coordinates the phase and dispatches Oracle. Oracle remains read-only: it
30
+ must not edit source, SDD artifacts, or coordination state. Root persists the
31
+ returned review at `openspec/changes/<change>/plan-review.md` using
32
+ `templates/plan-review.md`.
33
+
34
+ Review these canonical inputs:
35
+
36
+ - `spec.md`
37
+ - `plan.md`
38
+ - `tasks.md`
39
+ - an active requirements checklist, when present
40
+ - `openspec/memory/constitution.md`, when governance applies
41
+
42
+ OpenSpec is the only SDD artifact store. Do not mirror `plan-review.md` or its
43
+ payload into provider memory.
44
+
45
+ ## Review method
46
+
47
+ Judge the artifact set on five dimensions:
48
+
49
+ 1. Completeness: every in-scope requirement and success criterion maps to work.
50
+ 2. Correctness: named files, symbols, commands, and public contracts are real or
51
+ explicitly created by the plan.
52
+ 3. Coherence: artifacts agree on scope, sequencing, dependencies, and ownership.
53
+ 4. Buildability: a competent implementer can execute without guessing about
54
+ critical paths or hidden prerequisites.
55
+ 5. Outcome coverage: verification tasks can demonstrate the requested result.
56
+
57
+ Respect TDD ordering and the repository constitution when they apply. Report
58
+ non-blocking cautions separately so they do not become artificial gates.
59
+
60
+ ## Decision contract
61
+
62
+ Default to `[OKAY]`. Return `[REJECT]` only when execution is genuinely blocked.
63
+ A rejection contains at most 3 actionable blockers. For each blocker, state why
64
+ it blocks execution and the smallest concrete repair. Preserve the exact
65
+ `[OKAY]` and `[REJECT]` tokens across every harness.
66
+
67
+ After `[REJECT]`, Root repairs the canonical artifacts and offers the user the
68
+ review-or-proceed choice again. Do not silently approve a changed plan.
69
+
70
+ ## Freshness and persistence
71
+
72
+ Root computes SHA-256 digests for every reviewed artifact and records them in
73
+ the persisted review. Treat a stored approval as fresh only while every recorded
74
+ digest matches. A stale review has no gate value; rerun it only if the user still
75
+ chooses review.
76
+
77
+ The persisted artifact records the status, Oracle role, timestamp, route,
78
+ comments, non-blocking notes, blockers, any explicit override, and source
79
+ digests. Oracle returns this payload; Root is the only writer that persists it.
80
+
81
+ ## Handoff
82
+
83
+ After `[OKAY]`, Root summarizes the approved plan and must ask whether to implement or stop.
84
+ Approval is not implementation authorization. Choosing
85
+ `Proceed without review` at the earlier choice does authorize implementation.
86
+
87
+ Plan review never replaces mandatory final Oracle verify. Every route still
88
+ requires independent post-implementation verification by a non-writer.
89
+
90
+ ## Output
91
+
92
+ For an executable plan:
93
+
94
+ ```text
95
+ [OKAY]
96
+ - Brief evidence that the plan is complete, coherent, and executable.
97
+ - Optional non-blocking cautions.
98
+ ```
99
+
100
+ For a blocked plan:
101
+
102
+ ```text
103
+ [REJECT]
104
+ 1. <blocker, impact, and smallest repair>
105
+ 2. <optional blocker>
106
+ 3. <optional blocker>
107
+ ```
@@ -0,0 +1,65 @@
1
+ ---
2
+ schema: thoth-agents/sdd-plan-review/v1
3
+ artifact: plan-review
4
+ change: <change-name>
5
+ gate: oracle-review
6
+ status: "[OKAY|REJECT]"
7
+ reviewer_role: oracle
8
+ reviewed_at: <ISO-8601 timestamp>
9
+ pipeline: <accelerated|full>
10
+ persistence_mode: openspec
11
+ override:
12
+ occurred: false
13
+ at: null
14
+ surface: null
15
+ context: null
16
+ reviewed_artifacts:
17
+ - role: spec
18
+ path: openspec/changes/<change-name>/spec.md
19
+ required: true
20
+ sha256: sha256:<digest>
21
+ - role: plan
22
+ path: openspec/changes/<change-name>/plan.md
23
+ required: true
24
+ sha256: sha256:<digest>
25
+ - role: tasks
26
+ path: openspec/changes/<change-name>/tasks.md
27
+ required: true
28
+ sha256: sha256:<digest>
29
+ ---
30
+
31
+ # Plan Review: <change title>
32
+
33
+ **Status**: [OKAY|REJECT]
34
+
35
+ ## Oracle Result
36
+
37
+ <[OKAY] or [REJECT]>
38
+
39
+ ## Comments
40
+
41
+ - <coverage and executability evidence>
42
+
43
+ ## Non-Blocking Notes
44
+
45
+ - None.
46
+
47
+ ## Blockers
48
+
49
+ - None, or at most 3 actionable blockers with the smallest repair.
50
+
51
+ ## User Override Context
52
+
53
+ None.
54
+
55
+ ## Source SHA-256
56
+
57
+ - `openspec/changes/<change-name>/spec.md`: `sha256:<digest>`
58
+ - `openspec/changes/<change-name>/plan.md`: `sha256:<digest>`
59
+ - `openspec/changes/<change-name>/tasks.md`: `sha256:<digest>`
60
+ - Add every active checklist and constitution source reviewed by Oracle.
61
+
62
+ ## Recovery Decision
63
+
64
+ This result satisfies only optional plan review while all source digests remain
65
+ unchanged. It does not authorize implementation or satisfy final Oracle verify.
@@ -24,6 +24,7 @@ infrastructure without a current requirement is prohibited.
24
24
 
25
25
  Delivery MUST use the smallest coherent design that satisfies accepted
26
26
  requirements. Non-goals MUST be named, and scope cannot expand silently.
27
+ SDD route selection MUST remain user-owned after an evidence-based recommendation.
27
28
 
28
29
  ### III. Testable contracts
29
30
 
@@ -32,8 +33,7 @@ changes MUST use test-first execution at an agreed public seam when practical.
32
33
 
33
34
  ### IV. Independent assurance
34
35
 
35
- The implementation writer cannot approve its own work. Analyze and verify MUST
36
- be performed by an independent read-only reviewer.
36
+ The implementation writer cannot approve its own work. Pre-implementation plan review is optional and user-selected. When selected, it uses an independent read-only reviewer. Every final verify MUST use an independent read-only reviewer.
37
37
 
38
38
  ### V. Traceable delivery
39
39
 
@@ -13,7 +13,7 @@ script by absolute path:
13
13
  node "<skill-dir>/scripts/init.mjs" --project <project-root> --harness <opencode|codex|claude> --json
14
14
  ```
15
15
 
16
- - OpenCode materializes the four thoth-owned workflow skills under
16
+ - OpenCode materializes the five thoth-owned workflow skills under
17
17
  `.agents/skills/`.
18
18
  - Codex init creates project governance only. Codex plugin manifests cannot
19
19
  install custom agents or global instructions; first run the mandatory
@@ -20,6 +20,7 @@ const OWNED_SKILL_NAMES = [
20
20
  'thoth-sdd',
21
21
  'thoth-constitution',
22
22
  'thoth-archive',
23
+ 'plan-reviewer',
23
24
  ];
24
25
 
25
26
  function parseArgs(argv) {
@@ -5,32 +5,35 @@ description: Run thoth-agents Direct, Accelerated, or Full specification-driven
5
5
 
6
6
  # Thoth SDD
7
7
 
8
- Select the lightest route that preserves correctness:
8
+ Assess the work, recommend the lightest route that preserves correctness, and
9
+ let the user select:
9
10
 
10
11
  - **Direct**: `implement -> verify`
11
12
  - **Accelerated**: `specify -> plan -> tasks -> implement -> verify -> archive`
12
- - **Full**: `explore -> specify -> plan -> tasks -> analyze -> implement -> verify -> archive`
13
+ - **Full**: `explore -> specify -> plan -> tasks -> implement -> verify -> archive`
13
14
 
14
- Conditional phases are `clarify`, `checklist`, and `converge`. Direct creates no
15
+ Conditional phases are `clarify`, `checklist`, `plan-review`, and `converge`. Direct creates no
15
16
  SDD artifacts and may cover multiple documentation or mechanical files when the
16
17
  intent is clear and risk is low.
17
18
 
18
19
  Accelerated is a **fast-forward** route: root writes `spec.md`, `plan.md`, and
19
- `tasks.md` in one uninterrupted pass, validates structure without a routine user
20
- pause, and creates optional artifacts only for a concrete risk. Full uses
21
- phase-by-phase gates because uncertainty or failure cost justifies them.
20
+ `tasks.md` in one uninterrupted pass and creates optional artifacts only for a
21
+ concrete risk. After `ready`, both artifact-backed routes pause once to offer
22
+ `Review plan with Oracle (Recommended)` or `Proceed without review`. Full uses
23
+ separate planning gates because uncertainty or failure cost justifies them.
22
24
 
23
- An explicitly named route wins. A generic request to “use SDD” sets Accelerated
24
- as the minimum; it does not force Full. User input is requested only for a
25
- material decision that evidence and safe assumptions cannot resolve.
25
+ An explicitly named route counts as the user's selection. Otherwise assess and
26
+ recommend Direct, Accelerated, or Full, then wait for the user to choose; the
27
+ recommendation is not the decision. A generic request to “use SDD” makes
28
+ Accelerated the minimum recommendation but does not force it.
26
29
 
27
30
  ## Ownership
28
31
 
29
32
  - Root owns sequential coordination artifacts, gate execution, and archive.
30
33
  - Explorer owns Full-route repository discovery.
31
34
  - Designer, quick, deep, or root may implement according to scope.
32
- - Oracle always owns `analyze` and **every** `verify`. The implementation writer
33
- never approves its own work.
35
+ - Oracle owns `plan-review` when the user selects it and **every** `verify`. The
36
+ implementation writer never approves its own work.
34
37
 
35
38
  ## Progressive loading
36
39
 
@@ -49,7 +52,7 @@ Read only the current phase contract:
49
52
  | plan | `references/phases/plan.md` |
50
53
  | checklist | `references/phases/checklist.md` |
51
54
  | tasks | `references/phases/tasks.md` |
52
- | analyze | `references/phases/analyze.md` |
55
+ | plan-review | bundled `plan-reviewer` skill |
53
56
  | implement | `references/phases/implement.md` |
54
57
  | verify | `references/phases/verify.md` |
55
58
  | converge | `references/phases/converge.md` |
@@ -66,12 +69,15 @@ node scripts/validate.mjs --change openspec/changes/<feature> --route <accelerat
66
69
  - **Accelerated**: `specify`, then `ready` after the fast-forward planning pass,
67
70
  then `closeout` after independent verification and an archive report marked
68
71
  `READY`.
69
- - **Full**: `specify`, `plan`, `tasks`, then `ready` before oracle analysis, and
70
- `closeout` after independent verification.
72
+ - **Full**: `specify`, `plan`, `tasks`, then `ready` before the optional review
73
+ choice or implementation, and `closeout` after independent verification.
71
74
  - **Checklist**: run only when activated; the later `ready` gate includes it if
72
75
  present.
73
76
 
74
- `ready` validates the artifacts needed before analysis/implementation.
77
+ `ready` validates the artifacts needed before the user chooses
78
+ `Review plan with Oracle (Recommended)` or `Proceed without review`. Review
79
+ approval remains separate from implementation confirmation and never satisfies
80
+ final verification.
75
81
  `closeout` additionally requires completed tasks, independent oracle PASS,
76
82
  complete FR/buildable-SC evidence, an observed PASS or explicit residual RISK
77
83
  for every outcome SC, and an archive report ready for the transactional archive
@@ -1,21 +0,0 @@
1
- # Analyze contract
2
-
3
- **Owner**: oracle (read-only, independent)<br>
4
- **Applies to**: Full
5
-
6
- Review `spec.md`, `plan.md`, `tasks.md`, the constitution, and any activated
7
- checklist across three separate dimensions:
8
-
9
- - **Completeness**: all accepted scope, FRs, buildable SCs, stories, failures,
10
- and constraints have downstream coverage.
11
- - **Correctness**: requirements and technical choices are testable, feasible,
12
- and consistent with repository evidence and the constitution.
13
- - **Coherence**: spec, plan, tasks, dependencies, and verification seams do not
14
- contradict or duplicate one another.
15
-
16
- Buildable SCs require tasks; outcome SCs require measurable validation intent,
17
- not fake implementation tasks. Report stable finding IDs with
18
- CRITICAL/HIGH/MEDIUM/LOW severity, coverage percentages, checklist status, and a
19
- `ready` or `blocked` verdict. Any CRITICAL finding, constitution violation, or
20
- FR/buildable SC with zero task coverage blocks implementation. Never edit
21
- artifacts; root owns remediation.
@@ -1,21 +0,0 @@
1
- # Analyze contract
2
-
3
- **Owner**: oracle (read-only, independent)<br>
4
- **Applies to**: Full
5
-
6
- Review `spec.md`, `plan.md`, `tasks.md`, the constitution, and any activated
7
- checklist across three separate dimensions:
8
-
9
- - **Completeness**: all accepted scope, FRs, buildable SCs, stories, failures,
10
- and constraints have downstream coverage.
11
- - **Correctness**: requirements and technical choices are testable, feasible,
12
- and consistent with repository evidence and the constitution.
13
- - **Coherence**: spec, plan, tasks, dependencies, and verification seams do not
14
- contradict or duplicate one another.
15
-
16
- Buildable SCs require tasks; outcome SCs require measurable validation intent,
17
- not fake implementation tasks. Report stable finding IDs with
18
- CRITICAL/HIGH/MEDIUM/LOW severity, coverage percentages, checklist status, and a
19
- `ready` or `blocked` verdict. Any CRITICAL finding, constitution violation, or
20
- FR/buildable SC with zero task coverage blocks implementation. Never edit
21
- artifacts; root owns remediation.