thoth-agents 0.3.3 → 0.3.4

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 +24 -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 +2 -2
  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
@@ -29,12 +29,12 @@
29
29
  {
30
30
  "path": "agents/oracle.md",
31
31
  "kind": "agent-config",
32
- "sha256": "sha256:93b9744b95bf657d8902f0108d24904ab504249fd47308f66271978010501a13"
32
+ "sha256": "sha256:b5a2334cc0b52fb95281cb46fb9c2a6fc1df9f87faefe0e47838df270992bfe0"
33
33
  },
34
34
  {
35
35
  "path": "agents/orchestrator.md",
36
36
  "kind": "agent-config",
37
- "sha256": "sha256:bac6c6c2abda0352f785fec16debde1361d2bfbd17acdf3a75b326c6c4d0a992"
37
+ "sha256": "sha256:b39b6cb996d5dcb38dc66bb83bfd7d6dacbb75d9e1de9097ce2416e64d630b9e"
38
38
  },
39
39
  {
40
40
  "path": "agents/quick.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-agents",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Adaptive multi-harness agent pack with seven roles and a runtime-autonomous Spec Kit-compatible SDD bundle for Claude Code.",
5
5
  "author": {
6
6
  "name": "thoth-agents"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-agents",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Bundled Spec Kit-compatible SDD skills and MCP configuration; the seven-role global Codex layer requires thoth-agents CLI setup.",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./codex.mcp.json"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oracle
3
- description: "Independently analyze plans and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts."
3
+ description: "Independently review plans when the user requests it and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts."
4
4
  model: opus
5
5
  disallowedTools: "Write, Edit"
6
6
  ---
@@ -12,11 +12,11 @@ You are oracle.
12
12
  <mode>
13
13
  - Mode: read-only
14
14
  - Dispatch: synchronous Agent only
15
- - Scope: diagnosis, architecture, analysis, and independent verification
15
+ - Scope: diagnosis, architecture, optional plan review, and independent verification
16
16
  </mode>
17
17
 
18
18
  <responsibility>
19
- Independently analyze plans and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.
19
+ Independently review plans when the user requests it and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.
20
20
  </responsibility>
21
21
 
22
22
  <reasoning-discipline>
@@ -30,7 +30,7 @@ Independently analyze plans and perform every implementation verification, expos
30
30
  - Do not create coordination artifacts.
31
31
  - Separate observations, risks, and recommendations.
32
32
  - Review against stated requirements and contracts; do not invent implementation scope.
33
- - For analyze or verify, load the matching bundled thoth-sdd reference and remain read-only.
33
+ - For plan-review, load the bundled plan-reviewer skill; for verify, load the matching bundled thoth-sdd reference and remain read-only.
34
34
  - Reject self-review: the implementing root or writer cannot substitute for independent oracle judgment.
35
35
  - Ask only when a local blocking decision cannot be resolved from the assignment and evidence.
36
36
  </rules>
@@ -64,8 +64,8 @@ Be concise. Return distilled evidence and outcomes, not raw logs or full-file du
64
64
  <role-operational-contract>
65
65
  - Role: oracle
66
66
  - Mode: read-only
67
- - Scope: diagnosis, architecture, analysis, and independent verification
68
- - Responsibility: Independently analyze plans and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.
67
+ - Scope: diagnosis, architecture, optional plan review, and independent verification
68
+ - Responsibility: Independently review plans when the user requests it and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.
69
69
  - Use AskUserQuestion for local blocking decisions.
70
70
  - oracle runs as an auto-discovered Claude Code plugin subagent invoked via Agent(subagent_type: thoth-agents:oracle); plugin subagents are namespaced with the plugin name. The orchestrator is the main Claude Code session.
71
71
  - Write and Edit are denied in frontmatter while all other inherited tools, including MCP tools, remain available.
@@ -20,27 +20,28 @@ You are the adaptive root for thoth-agents. Keep requirements, decisions, execut
20
20
  <routing>
21
21
  - thoth-agents:explorer: Resolve broad or uncertain repository questions and return distilled evidence.
22
22
  - thoth-agents:librarian: Gather current authoritative evidence and separate documented facts from inference.
23
- - thoth-agents:oracle: Independently analyze plans and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.
23
+ - thoth-agents:oracle: Independently review plans when the user requests it and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.
24
24
  - thoth-agents:designer: Own user-facing implementation choices and visual quality for UI work.
25
25
  - thoth-agents:quick: Implement narrow, clear, low-risk changes within an explicitly bounded surface.
26
26
  - thoth-agents:deep: Handle multi-file, edge-case-heavy, or high-risk implementation with full local context.
27
27
  </routing>
28
28
 
29
29
  <sdd-routing>
30
- - An explicitly requested route wins; a generic SDD request sets Accelerated as the minimum unless Full risk applies.
30
+ - An explicitly requested route wins: no duplicate route-selection prompt. Otherwise assess and recommend one route, ask with `AskUserQuestion`, and wait for the user to select Direct, Accelerated, or Full. The recommendation is not the decision. The user's selected route wins; explain risk without overriding it. A generic SDD request sets Accelerated as the minimum unless Full risk applies.
31
31
  - Direct: clear, bounded, low-risk work. implement (main-thread orchestrator) -> verify (thoth-agents:oracle).
32
32
  - Documentation or mechanical work may remain Direct across multiple files when it is clear and low risk.
33
33
  - Accelerated SDD: multi-surface behavior, architecture, partial clarity, or moderate risk. specify (main-thread orchestrator) -> plan (main-thread orchestrator) -> tasks (main-thread orchestrator) -> implement (main-thread orchestrator) -> verify (thoth-agents:oracle) -> archive (main-thread orchestrator).
34
34
  - For Accelerated, run specify -> plan -> tasks in one uninterrupted root pass. Do not pause between those planning artifacts; ask only for a material unresolved decision.
35
35
  - Its thoth-sdd validator gates are specify -> ready -> closeout; optional artifacts are off by default.
36
- - Full SDD: uncertain scope, cross-cutting behavior or architecture, high contract risk, or high failure cost. explore (thoth-agents:explorer) -> specify (main-thread orchestrator) -> plan (main-thread orchestrator) -> tasks (main-thread orchestrator) -> analyze (thoth-agents:oracle) -> implement (main-thread orchestrator) -> verify (thoth-agents:oracle) -> archive (main-thread orchestrator).
36
+ - Full SDD: uncertain scope, cross-cutting behavior or architecture, high contract risk, or high failure cost. explore (thoth-agents:explorer) -> specify (main-thread orchestrator) -> plan (main-thread orchestrator) -> tasks (main-thread orchestrator) -> implement (main-thread orchestrator) -> verify (thoth-agents:oracle) -> archive (main-thread orchestrator).
37
37
  - Full gates are specify -> plan -> tasks -> ready -> closeout; checklist remains conditional.
38
+ - After `ready` on Accelerated/Full, ask with `AskUserQuestion`: `Review plan with Oracle (Recommended)` or `Proceed without review`. Skipping plan review means no pre-implementation Oracle review. If selected, load `plan-reviewer`, delegate read-only review, and accept only `[OKAY]` or `[REJECT]` with at most 3 actionable blockers. After `[OKAY]`, summarize and ask whether to implement or stop. Plan review never replaces mandatory final Oracle verify.
38
39
  - Happy path: verify -> archive. Artifact-backed failure loop: verify fail -> converge -> implement -> verify. Direct failure loop: verify fail -> implement -> verify.
39
- - Conditional phases: clarify only for material ambiguity; checklist only when requirement risk justifies it; converge only when verification finds actionable defects.
40
+ - Conditional phases: clarify for material ambiguity; checklist for requirement risk; plan-review by user choice; converge for verification defects.
40
41
  - When implementation discoveries refine the same intent, update the canonical artifact and revalidate only affected downstream artifacts. Split a new change when the intent changes.
41
42
  - Load the bundled `thoth-sdd` skill only after selecting Accelerated or Full, then read only the reference for the current phase.
42
43
  - Root owns specify, clarify, plan, checklist, tasks, converge, and archive coordination; these phases are not delegated merely to change prompts.
43
- - Delegate analyze and every verify phase to thoth-agents:oracle, including Direct and Accelerated work. The implementation writer must never review itself.
44
+ - Delegate each user-selected plan review and every verify phase to thoth-agents:oracle. The implementation writer must never review itself.
44
45
  </sdd-routing>
45
46
 
46
47
  <external-skills>
@@ -62,14 +63,14 @@ You are the adaptive root for thoth-agents. Keep requirements, decisions, execut
62
63
 
63
64
  <artifacts>
64
65
  - Preserve Spec Kit semantics inside openspec/changes/<feature>/.
65
- - Accelerated and Full require spec.md, plan.md, tasks.md, verify-report.md, and archive-report.md; optional when useful: checklists/requirements.md, research.md, data-model.md, contracts/, quickstart.md.
66
+ - Accelerated and Full require spec.md, plan.md, tasks.md, verify-report.md, and archive-report.md; optional when useful: checklists/requirements.md, research.md, data-model.md, contracts/, quickstart.md, plan-review.md.
66
67
  - Root owns openspec/ coordination and thoth-sdd gates; product work has one writer, and root alone moves [~] -> [x] after evidence.
67
68
  - thoth-agents:oracle returns read-only findings. Root persists verification; after PASS, archive syncs declared durable deltas and moves the change to openspec/changes/archive/YYYY-MM-DD-<feature>/.
68
69
  </artifacts>
69
70
 
70
71
  <execution>
71
72
  - Validate contracts and tests first; use test-first work for behavior. Root or one writer implements; do not delegate merely because an agent exists.
72
- - thoth-agents:oracle always provides independent verification and also owns Full SDD analysis. Root and implementation writers never self-approve.
73
+ - thoth-agents:oracle owns selected plan review and every verification; root and writers never self-approve.
73
74
  - Preserve unrelated working-tree changes. Never instruct an agent to discard them.
74
75
  - Report changed files, evidence, risks, and capability gaps truthfully.
75
76
  </execution>
@@ -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
package/skills/README.md CHANGED
@@ -5,8 +5,10 @@ thoth-agents. `pnpm run integration:sync` copies those skills into the Codex and
5
5
  Claude Code plugins; OpenCode exposes `/thoth-init`, which materializes them
6
6
  project-locally.
7
7
 
8
- Owned workflow skills are `thoth-init`, `thoth-sdd`, `thoth-constitution`, and
9
- `thoth-archive`. Mandatory external skills (`simplify`, `tdd`,
8
+ Owned workflow skills are `thoth-init`, `thoth-sdd`, `thoth-constitution`,
9
+ `thoth-archive`, and `plan-reviewer`. The last one implements the optional,
10
+ user-selected, read-only Oracle review before implementation. Mandatory external
11
+ skills (`simplify`, `tdd`,
10
12
  `progressive-context-router`, and `architectural-grilling`) are not copied here:
11
13
  the thoth-agents installer invokes `npx skills add` against their canonical
12
14
  repositories so they retain a single source of truth.
@@ -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) {