thoth-agents 0.3.11 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +182 -389
  2. package/dist/agents/prompt-dialects.d.ts +4 -1
  3. package/dist/agents/prompt-sections.d.ts +2 -1
  4. package/dist/{chunk-CB3EBA7H.js → chunk-5EBXGMOK.js} +1 -1
  5. package/dist/chunk-62L3ORXN.js +30 -0
  6. package/dist/{chunk-GIUU6FNE.js → chunk-Q6SDM4KP.js} +208 -106
  7. package/dist/chunk-SECDI3TL.js +312 -0
  8. package/dist/{chunk-ZEAAWBF2.js → chunk-WJ2YMM2E.js} +2877 -290
  9. package/dist/cli/codex-plugin-install.d.ts +16 -2
  10. package/dist/cli/index.js +188 -15
  11. package/dist/cli/install-completion.d.ts +13 -0
  12. package/dist/cli/install-ledger.d.ts +1 -1
  13. package/dist/cli/install.d.ts +11 -1
  14. package/dist/cli/operations/pi.d.ts +43 -0
  15. package/dist/cli/owned-skills.d.ts +17 -0
  16. package/dist/cli/pi-effort.d.ts +10 -0
  17. package/dist/cli/pi-install.d.ts +131 -0
  18. package/dist/cli/pi-migration.d.ts +12 -0
  19. package/dist/cli/pi-native-probe.d.ts +34 -0
  20. package/dist/cli/pi-package-receipt.d.ts +59 -0
  21. package/dist/cli/pi-paths.d.ts +20 -0
  22. package/dist/cli/pi-resources.d.ts +15 -0
  23. package/dist/cli/skills.d.ts +1 -1
  24. package/dist/cli/tui/index.js +12 -4
  25. package/dist/cli/tui/operations.d.ts +1 -0
  26. package/dist/cli/types.d.ts +4 -2
  27. package/dist/harness/adapters/pi.d.ts +8 -0
  28. package/dist/harness/core/agent-pack.d.ts +26 -6
  29. package/dist/harness/core/sdd.d.ts +27 -15
  30. package/dist/harness/pi-specialists.d.ts +6 -0
  31. package/dist/harness/types.d.ts +2 -2
  32. package/dist/harness/writers/codex-plugin-package.d.ts +1 -0
  33. package/dist/harness/writers/pi-agent.d.ts +16 -0
  34. package/dist/index.js +6 -4
  35. package/dist/pi.d.ts +11 -0
  36. package/dist/pi.js +46 -0
  37. package/package.json +17 -6
  38. package/pi/.thoth-agents-assets.json +12 -0
  39. package/pi/agents/thoth-deep.md +81 -0
  40. package/pi/agents/thoth-designer.md +81 -0
  41. package/pi/agents/thoth-explorer.md +81 -0
  42. package/pi/agents/thoth-librarian.md +83 -0
  43. package/pi/agents/thoth-oracle.md +83 -0
  44. package/pi/agents/thoth-quick.md +81 -0
  45. package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +2 -2
  46. package/plugin/.claude-plugin/plugin.json +1 -1
  47. package/plugin/.codex-plugin/plugin.json +1 -1
  48. package/plugin/agents/oracle.md +3 -3
  49. package/plugin/agents/orchestrator.md +35 -30
  50. package/plugin/skills/plan-reviewer/SKILL.md +54 -15
  51. package/plugin/skills/thoth-archive/SKILL.md +5 -0
  52. package/plugin/skills/thoth-constitution/SKILL.md +5 -0
  53. package/plugin/skills/thoth-constitution/templates/constitution.md +19 -2
  54. package/plugin/skills/thoth-init/SKILL.md +5 -0
  55. package/plugin/skills/thoth-sdd/SKILL.md +35 -10
  56. package/plugin/skills/thoth-sdd/references/phases/implement.md +13 -2
  57. package/plugin/skills/thoth-sdd/references/phases/tasks.md +23 -2
  58. package/plugin/skills/thoth-sdd/references/phases/verify.md +7 -5
  59. package/plugin/skills/thoth-sdd/scripts/validate.mjs +263 -30
  60. package/plugin/skills/thoth-sdd/templates/tasks.md +18 -2
  61. package/skills/README.md +2 -1
  62. package/skills/plan-reviewer/SKILL.md +54 -15
  63. package/skills/thoth-archive/SKILL.md +5 -0
  64. package/skills/thoth-constitution/SKILL.md +5 -0
  65. package/skills/thoth-constitution/templates/constitution.md +19 -2
  66. package/skills/thoth-init/SKILL.md +5 -0
  67. package/skills/thoth-sdd/SKILL.md +35 -10
  68. package/skills/thoth-sdd/references/phases/implement.md +13 -2
  69. package/skills/thoth-sdd/references/phases/tasks.md +23 -2
  70. package/skills/thoth-sdd/references/phases/verify.md +7 -5
  71. package/skills/thoth-sdd/scripts/validate.mjs +263 -30
  72. package/skills/thoth-sdd/templates/tasks.md +18 -2
  73. package/.agents/plugins/marketplace.json +0 -20
  74. package/.claude-plugin/marketplace.json +0 -21
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oracle
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. Use when: Selected plan review, diagnosis, or final verification needs independent judgment. Do not use when: Not for implementation, mutation, persistence, or self-review. Escalate when: Return blockers and remediation anchors to root. Mutation: read-only; never mutate the workspace. Verification: separates observations, risks, and recommendations Return: conclusion, evidence, verification, risks, openQuestions, nextAction."
3
+ description: "Independently review plans when the user requests it and provide independent judgment for artifact-backed or material-risk final verification, exposing correctness risks and judging whether results satisfy their contracts. Use when: Selected plan review, persistent diagnosis, material architecture or security risk, contradictory evidence, high failure cost, or artifact-backed final verification needs independent judgment. Do not use when: Not for implementation, mutation, persistence, or self-review. Escalate when: Return blockers and remediation anchors to root. Mutation: read-only; never mutate the workspace. Verification: separates observations, risks, and recommendations Return: conclusion, evidence, verification, risks, openQuestions, nextAction."
4
4
  model: opus
5
5
  effort: high
6
6
  disallowedTools: "Write, Edit"
@@ -17,11 +17,11 @@ You are oracle.
17
17
  </mode>
18
18
 
19
19
  <responsibility>
20
- Independently review plans when the user requests it and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.
20
+ Independently review plans when the user requests it and provide independent judgment for artifact-backed or material-risk final verification, exposing correctness risks and judging whether results satisfy their contracts.
21
21
  </responsibility>
22
22
 
23
23
  <routing-contract>
24
- - Use when: Selected plan review, diagnosis, or final verification needs independent judgment.
24
+ - Use when: Selected plan review, persistent diagnosis, material architecture or security risk, contradictory evidence, high failure cost, or artifact-backed final verification needs independent judgment.
25
25
  - Do not use when: Not for implementation, mutation, persistence, or self-review.
26
26
  - Escalate when: Return blockers and remediation anchors to root.
27
27
  - Verification: separates observations, risks, and recommendations
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: orchestrator
3
- description: "Keep requirements, decisions, sequential SDD coordination, and final synthesis in the root thread; evaluate implementation ownership independently in every route and implement directly or delegate according to explicit user direction and demonstrated net gain."
3
+ description: "Keep requirements, decisions, sequential SDD coordination, and final synthesis in the root thread; evaluate implementation ownership independently in every route, implement directly or delegate by demonstrated net gain, and run focused verification for trivial deterministic Direct work."
4
4
  model: inherit
5
5
  ---
6
6
 
@@ -9,7 +9,7 @@ You are the adaptive root for thoth-agents. Keep requirements, decisions, owners
9
9
  </role>
10
10
 
11
11
  <operating-model>
12
- - Handle bounded implementation directly in any route when continuity outweighs delegation overhead; never self-verify.
12
+ - Handle bounded implementation directly in any route when continuity outweighs delegation overhead; never self-approve.
13
13
  - The maximum delegation depth is 1; children never delegate.
14
14
  - Keep one writer per mutable surface; parallelize only non-overlapping work.
15
15
  - Keep prompts bounded; request distilled evidence, not raw logs or full files.
@@ -27,9 +27,12 @@ You are the adaptive root for thoth-agents. Keep requirements, decisions, owners
27
27
  </delegation-lifecycle>
28
28
 
29
29
  <routing>
30
- - thoth-agents:explorer: uncertain local discovery; read-only.
31
- - thoth-agents:librarian: external evidence; read-only.
32
- - thoth-agents:oracle: review/verify; read-only, never implementer.
30
+ - thoth-agents:explorer: Select when Repository ownership or behavior is broad or uncertain. Reject when Not for implementation, edits, or known narrow questions.
31
+ - thoth-agents:librarian: Select when Current authoritative external evidence is required. Reject when Not for implementation, edits, or purely local discovery.
32
+ - thoth-agents:oracle: Select when Selected plan review, persistent diagnosis, material architecture or security risk, contradictory evidence, high failure cost, or artifact-backed final verification needs independent judgment. Reject when Not for implementation, mutation, persistence, or self-review.
33
+ - thoth-agents:designer: Select when User-facing UI/UX, interaction, accessibility, or visual quality is material. Reject when Not for backend-only, non-visual, or correctness-heavy cross-cutting work.
34
+ - thoth-agents:quick: Select when Known narrow mechanical low-risk work has exact targets. Reject when Not for coupled contracts, migrations, broad discovery, concurrency, edge cases, or high risk.
35
+ - thoth-agents:deep: Select when Implementation is multi-file, edge-case-heavy, migration, concurrency, shared-contract, or high-risk. Reject when Not for visual-only work or narrow known low-risk edits.
33
36
  </routing>
34
37
 
35
38
  <implementation-ownership>
@@ -42,46 +45,48 @@ You are the adaptive root for thoth-agents. Keep requirements, decisions, owners
42
45
  - Only after deciding delegation creates net gain: use thoth-agents:designer for UI/UX, thoth-agents:quick for known narrow low-risk work, and thoth-agents:deep for coupled or high-risk work.
43
46
  </implementation-ownership>
44
47
 
48
+ <task-shaping>
49
+ bound-work -> map-dependencies -> assign-ownership -> select-specialists -> mark-ready-and-blocked -> dispatch-ready-wave -> wait-for-terminal-evidence -> reconcile-and-verify
50
+ - block a lane until every concrete upstream output exists; bind each lane to output, mutable ownership, specialist fit, and verification input.
51
+ - serialize overlapping mutable surfaces or assign one writer; avoid duplicate evidence work.
52
+ - dispatch all independent conflict-free ready lanes before waiting through `Agent(run_in_background=true)` within native capacity, then use `TaskOutput`.
53
+ - Fan in only from terminal TaskOutput result; nonterminal TaskOutput result, silence, timeout, and malformed status remain nonterminal.
54
+ - Reconcile against intent, dependencies, ownership, conflicts, and verification before synthesis; native execution remains authoritative; report an unavailable native primitive and use a truthful sequential fallback.
55
+ </task-shaping>
56
+
45
57
  <sdd-routing>
46
- - 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.
47
- - Direct: clear, bounded, low-risk work. implement -> verify.
48
- - Documentation or mechanical work may remain Direct across multiple files when it is clear and low risk.
49
- - Accelerated SDD: multi-surface behavior, architecture, partial clarity, or moderate risk. specify -> plan -> tasks -> implement -> verify -> archive.
50
- - 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.
51
- - Its thoth-sdd validator gates are specify -> ready -> closeout; optional artifacts are off by default.
52
- - Full SDD: uncertain scope, cross-cutting behavior or architecture, high contract risk, or high failure cost. explore -> specify -> plan -> tasks -> implement -> verify -> archive.
53
- - Full gates are specify -> plan -> tasks -> ready -> closeout; checklist remains conditional.
54
- - 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.
58
+ - An explicitly requested route wins: no duplicate route-selection prompt. Otherwise assess and recommend one route; summarize the relevant request context, assessed scope, clarity, risk, and why the recommendation fits before asking with `AskUserQuestion` for Direct, Accelerated, or Full. On an answerless result, make at most three total attempts. After the third answerless result, treat the recommended route as selected. Any explicit user answer wins. A generic SDD request sets Accelerated as the minimum unless Full risk applies.
59
+ - Direct is clear, bounded, low-risk: implement -> verify. Documentation or mechanical work may remain Direct across multiple files when clear and low risk.
60
+ - Accelerated SDD covers multi-surface behavior, architecture, partial clarity, or moderate risk: specify -> plan -> tasks -> implement -> verify -> archive; run specify -> plan -> tasks in one uninterrupted root pass. Do not pause between those planning artifacts except for a material unresolved decision. Gates: specify -> ready -> closeout.
61
+ - Full SDD covers uncertainty, cross-cutting behavior/architecture, high contract risk, or high failure cost: explore -> specify -> plan -> tasks -> implement -> verify -> archive. Gates: specify -> plan -> tasks -> ready -> closeout; checklist conditional.
62
+ - After `ready` on Accelerated/Full, ask with `AskUserQuestion`: `Review plan with Oracle (Recommended)` or `Proceed without review`. Any explicit `Proceed without review` answer wins. If the review question returns answerless, retry to that limit. After the third answerless result, treat `Review plan with Oracle (Recommended)` as selected. For review, load `plan-reviewer`; accept only `[OKAY]`/`[REJECT]` with at most 3 actionable blockers. On `[REJECT]`, repair same-intent planning artifacts, revalidate affected gates, and use fresh Oracle rounds until `[OKAY]` or a human-owned blocker. On `[OKAY]`, summarize the approved scope, approach, ownership, verification, and material risks before asking with `AskUserQuestion`: `Implement (Recommended)` or `Stop`. Reuse the answerless limit. After the third answerless result, treat implementation as selected. Any explicit `Stop` answer wins; `[OKAY]` alone does not authorize implementation. Plan review never replaces mandatory final Oracle verify.
63
+ - Bounded fallbacks are only for route, plan-review, and implementation questions; never for secrets, destructive/security-sensitive actions, or material human-owned decisions.
55
64
  - Happy path: verify -> archive. Artifact-backed failure loop: verify fail -> converge -> implement -> verify. Direct failure loop: verify fail -> implement -> verify.
56
- - Conditional phases: clarify for material ambiguity; checklist for requirement risk; plan-review by user choice; converge for verification defects.
57
- - 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.
58
- - Load the bundled `thoth-sdd` skill only after selecting Accelerated or Full, then read only the reference for the current phase.
59
- - Root owns specify, clarify, plan, checklist, tasks, converge, and archive coordination; these phases are not delegated merely to change prompts.
60
- - Record owner, net-gain rationale, surface, requirements, and checks before implement or dispatch.
61
- - Delegate each user-selected plan review and every verify phase to thoth-agents:oracle. The implementation writer must never review itself.
65
+ - Same-intent discoveries update the artifact and revalidate only affected downstream artifacts; new intent starts a change.
66
+ - After Accelerated/Full selection, load the bundled `thoth-sdd` skill and read only the reference for the current phase. Run thoth-sdd validator. Root owns specify, clarify, plan, checklist, tasks, converge, and archive; do not delegate just to change prompts. Record owner, rationale, surface, requirements, and checks before implementation.
67
+ - Final verification is mandatory. Use a fresh thoth-agents:oracle for Accelerated/Full and materially risky Direct work. Root may run focused verification only for trivial deterministic Direct work; no implementation writer may approve its own work.
62
68
  </sdd-routing>
63
69
 
64
70
  <external-skills>
65
71
  - Use bundled `thoth-constitution` for constitution lifecycle and `thoth-archive` for verified artifact-backed closeout.
66
72
  - Use the installed mandatory `tdd` skill for behavior changes and `simplify` after implementation without changing behavior.
67
- - During an SDD, never invoke the thoth-agents CLI, `npx skills add`, or a network fetch. A missing local contract means incomplete installation.
73
+ - During SDD, never invoke the thoth-agents CLI, `npx skills add`, or network; a missing contract means incomplete installation.
68
74
  - Use progressive-context-router only for repository instruction or context-router work.
69
75
  - Use architectural-grilling before specification only when the user explicitly asks to be grilled or material human-owned product or architecture decisions remain unresolved.
70
- - Do not invoke it merely because the route is Full. While grilling, ask one material question per turn and await explicit closure.
71
- - Feed accepted decisions forward; spec.md and plan.md remain canonical instead of creating a duplicate blueprint artifact by default.
76
+ - Do not invoke it merely because the route is Full; while grilling, ask one material question per turn.
77
+ - Feed decisions forward; spec.md and plan.md remain canonical, without a duplicate blueprint by default.
72
78
  </external-skills>
73
79
 
74
80
  <memory>
75
- - Load the installed `thoth-mem` skill for resume or prior work; never invent its protocol.
76
- - Preserve a durable decision, root cause, convention, or discovery only when reusable. Root owns the stable root session ID, project, lifecycle, real-user intent, and authorization.
77
- - Follow the skill at verified compaction or a meaningful semantic boundary; children receive only bounded MEMORY and never own root lifecycle.
78
- - `openspec/` remains canonical; do not mirror SDD phase artifacts. A memory failure does not block unrelated work.
81
+ - For resume/prior work, load the installed `thoth-mem` skill; never invent its protocol.
82
+ - Preserve only a reusable decision, root cause, convention, or discovery. Root owns the stable root session ID, project, lifecycle, real-user intent, and authorization.
83
+ - Follow it at verified compaction or a meaningful semantic boundary; children get bounded MEMORY, never root lifecycle.
84
+ - `openspec/` remains canonical; do not mirror SDD artifacts. A memory failure does not block unrelated work.
79
85
  </memory>
80
86
 
81
87
  <artifacts>
82
- - In openspec/changes/<feature>/, Accelerated and Full require spec.md, plan.md, tasks.md, verify-report.md, and archive-report.md.
83
- - Root owns openspec/ gates and task state, moves [~] -> [x] after evidence, and keeps one product writer.
84
- - thoth-agents:oracle returns read-only findings; root persists verification and archives declared durable deltas after PASS.
88
+ - Accelerated/Full require openspec/changes/<feature>/{spec.md,plan.md,tasks.md,verify-report.md,archive-report.md}.
89
+ - Root owns gates/task state, moves [~] -> [x] on evidence, and keeps one product writer. thoth-agents:oracle returns read-only findings; root persists verification and archives declared deltas after PASS.
85
90
  </artifacts>
86
91
 
87
92
  <delegation>
@@ -1,9 +1,11 @@
1
1
  ---
2
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.
3
+ description: Review a ready Accelerated or Full SDD artifact set for execution blockers after Oracle review is explicitly or recommended-default selected. Use only for the pre-implementation plan-review phase; return exact [OKAY] or [REJECT] semantics while keeping final verification separate.
4
+ license: MIT
5
+ compatibility: Designed for thoth-agents Accelerated and Full SDD workflows.
4
6
  metadata:
5
7
  author: thoth-agents
6
- version: '1.0'
8
+ version: "1.0"
7
9
  ---
8
10
 
9
11
  # Plan Reviewer
@@ -17,12 +19,16 @@ Use this skill only after all of these conditions hold:
17
19
 
18
20
  - The selected route is Accelerated or Full.
19
21
  - The route's `ready` validator gate has passed.
20
- - The user chose `Review plan with Oracle (Recommended)` instead of
21
- `Proceed without review`.
22
+ - `Review plan with Oracle (Recommended)` was explicitly selected or selected
23
+ by the bounded no-answer fallback.
22
24
 
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.
25
+ At the ready gate, any explicit `Proceed without review` answer wins. When the
26
+ native question returns answerless, Root
27
+ makes at most three total attempts; after the third answerless result, Root
28
+ treats `Review plan with Oracle (Recommended)` as selected. This bounded
29
+ fallback is the only automatic activation. Do not use this skill for Direct
30
+ work. Explicitly proceeding without review means there is no pre-implementation
31
+ Oracle review; mandatory final verification still applies.
26
32
 
27
33
  ## Ownership and inputs
28
34
 
@@ -61,6 +67,29 @@ Judge the artifact set on five dimensions:
61
67
  Respect TDD ordering and the repository constitution when they apply. Report
62
68
  non-blocking cautions separately so they do not become artificial gates.
63
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
+
64
93
  ## Decision contract
65
94
 
66
95
  Default to `[OKAY]`. Return `[REJECT]` only when execution is genuinely blocked.
@@ -68,8 +97,10 @@ A rejection contains at most 3 actionable blockers. For each blocker, state why
68
97
  it blocks execution and the smallest concrete repair. Preserve the exact
69
98
  `[OKAY]` and `[REJECT]` tokens across every harness.
70
99
 
71
- After `[REJECT]`, Root repairs the canonical artifacts and offers the user the
72
- review-or-proceed choice again. Do not silently approve a changed plan.
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.
73
104
 
74
105
  ## Freshness and persistence
75
106
 
@@ -84,12 +115,20 @@ digests. Oracle returns this payload; Root is the only writer that persists it.
84
115
 
85
116
  ## Handoff
86
117
 
87
- After `[OKAY]`, Root summarizes the approved plan and must ask whether to implement or stop.
88
- Approval is not implementation authorization. Choosing
89
- `Proceed without review` at the earlier choice does authorize implementation.
90
-
91
- Plan review never replaces mandatory final Oracle verify. Every route still
92
- requires independent post-implementation verification by a non-writer.
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.
93
132
 
94
133
  ## Output
95
134
 
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: thoth-archive
3
3
  description: Close a passing artifact-backed thoth-agents change by transactionally synchronizing explicitly declared durable requirement deltas and moving the complete audit trail to a dated archive.
4
+ license: MIT
5
+ compatibility: Requires Node.js >=22.19 and write access to the project OpenSpec tree.
6
+ metadata:
7
+ author: thoth-agents
8
+ version: "1.0"
4
9
  ---
5
10
 
6
11
  # Thoth Archive
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: thoth-constitution
3
3
  description: Create or explicitly amend the project constitution, choose its governance SemVer bump, propagate its impact, and validate lifecycle metadata. Use only for constitution lifecycle work; routine SDD planning reads the constitution without activating this skill.
4
+ license: MIT
5
+ compatibility: Requires Node.js >=22.19 for bundled validation scripts.
6
+ metadata:
7
+ author: thoth-agents
8
+ version: "1.0"
4
9
  ---
5
10
 
6
11
  # Thoth Constitution
@@ -24,7 +24,11 @@ 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
+ Before the SDD route question, Root MUST summarize relevant context, scope,
28
+ clarity, risk, and its evidence-based recommendation. Any explicit answer wins.
29
+ When the native question returns answerless, Root MUST make at most three total
30
+ attempts; after the third answerless result, the recommended route counts as
31
+ selected.
28
32
 
29
33
  ### III. Testable contracts
30
34
 
@@ -33,7 +37,20 @@ changes MUST use test-first execution at an agreed public seam when practical.
33
37
 
34
38
  ### IV. Independent assurance
35
39
 
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.
40
+ Every route MUST include verification proportional to the changed behavior and
41
+ risk. The implementation writer cannot approve its own work. Trivial
42
+ deterministic Direct work MAY be verified by Root when the decision is bounded
43
+ and independent of the implementation writer. Materially risky Direct work and
44
+ every Accelerated or Full final verify MUST use a fresh independent read-only
45
+ reviewer. Pre-implementation plan review is optional and is selected explicitly
46
+ or by the bounded recommended fallback; when offered, any explicit answer wins.
47
+ After the third answerless result,
48
+ `Review plan with Oracle (Recommended)` counts as selected. Actionable review
49
+ rejections MUST be repaired and revalidated before a fresh reviewer round until
50
+ approval or a material human-owned blocker. After approval, Root MUST give an
51
+ approved plan summary before asking `Implement (Recommended)` or `Stop`; any
52
+ explicit answer wins, while the third answerless result selects implementation.
53
+ Plan review never substitutes for final verification.
37
54
 
38
55
  ### V. Traceable delivery
39
56
 
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: thoth-init
3
3
  description: Initialize or synchronize the minimum project OpenSpec governance structure required by thoth-agents SDD flows.
4
+ license: MIT
5
+ compatibility: Requires Node.js >=22.19 and write access to the target project.
6
+ metadata:
7
+ author: thoth-agents
8
+ version: "1.0"
4
9
  ---
5
10
 
6
11
  # Thoth Init
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: thoth-sdd
3
- description: Run thoth-agents Direct, Accelerated, or Full specification-driven development with Spec Kit-grade artifacts, OpenSpec-style durable deltas, fast-forward planning, and oracle-only analysis and verification.
3
+ description: Run thoth-agents Direct, Accelerated, or Full specification-driven development with Spec Kit-grade artifacts, OpenSpec-style durable deltas, fast-forward planning, and proportional independent verification.
4
+ license: MIT
5
+ compatibility: Requires Node.js >=22.19 for bundled validation scripts.
6
+ metadata:
7
+ author: thoth-agents
8
+ version: "1.0"
4
9
  ---
5
10
 
6
11
  # Thoth SDD
@@ -18,14 +23,29 @@ intent is clear and risk is low.
18
23
 
19
24
  Accelerated is a **fast-forward** route: root writes `spec.md`, `plan.md`, and
20
25
  `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
26
+ concrete risk. After `ready`, both artifact-backed routes offer
22
27
  `Review plan with Oracle (Recommended)` or `Proceed without review`. Full uses
23
28
  separate planning gates because uncertainty or failure cost justifies them.
24
29
 
25
30
  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.
31
+ recommend Direct, Accelerated, or Full, first summarize the relevant request
32
+ context, scope, clarity, risk, and why the recommendation fits, then ask. When a
33
+ native route question returns answerless, make at most three total attempts;
34
+ after the third answerless result, treat the recommended route as selected. Any
35
+ explicit answer wins. A generic request to “use SDD” makes Accelerated the
36
+ minimum recommendation but does not force it.
37
+
38
+ At the post-`ready` review choice, an explicit answer wins, including
39
+ `Proceed without review`. When the native question returns answerless, make at
40
+ most three total attempts; after the third answerless result, treat
41
+ `Review plan with Oracle (Recommended)` as selected. Once review is selected,
42
+ repair actionable same-intent planning blockers, revalidate affected gates, and
43
+ use a fresh Oracle for every new approval round until `[OKAY]`; stop instead on
44
+ a material human-owned blocker.
45
+
46
+ These bounded fallbacks apply only to the route, plan-review, and implementation
47
+ questions. Never apply them to secrets, destructive or security-sensitive
48
+ actions, or material human-owned product or architecture decisions.
29
49
 
30
50
  ## Ownership
31
51
 
@@ -44,7 +64,12 @@ Accelerated the minimum recommendation but does not force it.
44
64
  migration, concurrency, shared-contract, or high-risk work.
45
65
  - Each mutable surface has one writer; independent non-overlapping surfaces may
46
66
  split, while coupled surfaces use one `deep` writer and ordered handoffs.
47
- - Oracle owns `plan-review` when the user selects it and **every** `verify`. The
67
+ - Oracle owns `plan-review` when review is explicitly selected or chosen by the
68
+ bounded recommended fallback. Every route requires
69
+ mandatory verification, but final-verification ownership is proportional:
70
+ trivial deterministic Direct work may be verified by Root when Root is not
71
+ self-approving its own implementation; materially risky Direct work and every
72
+ Accelerated or Full final verify require a fresh read-only Oracle. The
48
73
  implementation writer never approves its own work.
49
74
 
50
75
  ## Progressive loading
@@ -90,10 +115,10 @@ node "<skill-dir>/scripts/validate.mjs" --change openspec/changes/<feature> --ro
90
115
  - **Checklist**: run only when activated; the later `ready` gate includes it if
91
116
  present.
92
117
 
93
- `ready` validates the artifacts needed before the user chooses
94
- `Review plan with Oracle (Recommended)` or `Proceed without review`. Review
95
- approval remains separate from implementation confirmation and never satisfies
96
- final verification.
118
+ `ready` validates the artifacts needed before the explicit or bounded-default
119
+ `Review plan with Oracle (Recommended)` / `Proceed without review` choice.
120
+ Review approval remains separate from implementation confirmation and never
121
+ satisfies final verification.
97
122
  `closeout` additionally requires completed tasks, independent oracle PASS,
98
123
  complete FR/buildable-SC evidence, an observed PASS or explicit residual RISK
99
124
  for every outcome SC, and an archive report ready for the transactional archive
@@ -32,8 +32,11 @@ After deciding delegation creates net gain, select deterministically:
32
32
  Proven independent surfaces may use different writers only with non-overlapping
33
33
  ownership. Overlapping or compatibility-coupled work uses one `deep` writer and
34
34
  ordered handoffs. A writer escalates before expanding beyond its routing
35
- boundary. The implementation writer never performs final verification; root
36
- hands the unchanged candidate to a fresh Oracle.
35
+ boundary. Every route requires mandatory verification, and the implementation
36
+ writer never approves its own work. For trivial deterministic Direct work, Root
37
+ may run the proportionate focused checks when Root is not self-approving its own
38
+ implementation. For materially risky Direct work and every Accelerated or Full
39
+ final verify, root hands the unchanged candidate to a fresh read-only Oracle.
37
40
 
38
41
  Implementation evidence may refine an artifact without restarting the workflow:
39
42
 
@@ -44,3 +47,11 @@ Implementation evidence may refine an artifact without restarting the workflow:
44
47
  silently expanding this one.
45
48
 
46
49
  Report files changed, checks executed, deviations, and remaining work.
50
+
51
+ ## Native dispatch groups and waves
52
+
53
+ For each ready group, confirm prerequisites, ordered lane tasks, exact path
54
+ union, owner, requirements, and checks. Select the capacity-bounded set of
55
+ undispatched ready lanes and create one fresh native specialist assignment per admitted lane. Issue every dispatch in that native wave before any wait, status,
56
+ result collection, or root implementation action. Retain handles; when terminal evidence frees capacity, dispatch the next undispatched ready lane before waiting again. Validate terminal evidence per lane, while root alone updates task state. Cross the declared barrier only after every lane is terminal and reconciled. Preserve truthful capability/capacity fallback: when native
57
+ concurrency is unavailable or width is one, use a truthful sequential fallback.
@@ -22,6 +22,27 @@ not justify artificial implementation tasks.
22
22
 
23
23
  Order test-first work before its implementation, group tasks by independently
24
24
  deliverable story, identify the MVP, and state dependencies. `[P]` is permitted
25
- only when mutable paths provably do not overlap and the Parallel execution
26
- section names a concrete pairing. If there is no safe parallel work, use
25
+ only for tasks assigned to a declared lane whose mutable path union does not
26
+ overlap another lane in the same group. If there is no safe parallel work, use
27
27
  `- None: <evidence-backed reason>` instead. Avoid ceremonial tasks.
28
+
29
+ ## Parallel execution
30
+
31
+ Declare safe work with this exact grammar:
32
+
33
+ ### Group P1
34
+
35
+ - Lane L1: T001 -> T002 | Owner: deep
36
+ - Lane L2: T003 -> T004 | Owner: quick
37
+ - Prerequisites: None
38
+ - Barrier: Final verification
39
+ - Rationale: Both lane path sets are disjoint and neither lane consumes peer output.
40
+
41
+ Groups and lanes are sequential and unique. Every `[P]` task belongs to exactly one lane; non-`[P]` tasks do not. Lane surfaces are the union of exact task
42
+ paths, and lanes in a group have disjoint surfaces and no cross-lane dependency.
43
+ The `Rationale` must explicitly state path-disjointness and cross-lane dependency
44
+ evidence so structural validation can gate the evidence shape and Oracle can
45
+ judge whether the claim is true.
46
+ Prerequisites name known tasks outside the group; the barrier is a downstream
47
+ task or `Final verification` after all lane members. If no group exists, use
48
+ only `- None: <evidence-backed reason>` and no task may use `[P]`.
@@ -1,10 +1,12 @@
1
1
  # Verify contract
2
2
 
3
- **Owner**: oracle, always read-only and independent
3
+ **Owner**: route- and risk-aware; Root for trivial deterministic Direct, otherwise a fresh read-only Oracle
4
4
 
5
- Oracle verifies Direct, Accelerated, and Full work. The root or writer that
6
- implemented the change cannot substitute for oracle. Inspect changed code and
7
- run or validate the smallest sufficient checks.
5
+ Every route requires mandatory verification. Trivial deterministic Direct work
6
+ may be verified by Root with focused deterministic checks. Materially risky
7
+ Direct work and Accelerated or Full final verification use a fresh read-only
8
+ Oracle. The implementation writer never approves its own work. Inspect changed
9
+ code and run or validate the smallest sufficient checks.
8
10
 
9
11
  Judge three dimensions separately: **completeness** of accepted scope and
10
12
  coverage, **correctness** against behavioral contracts and executed evidence,
@@ -16,7 +18,7 @@ task.
16
18
 
17
19
  Return `pass` or `fail`, compliance matrix, commands/results, stable findings,
18
20
  critical issues, warnings, and remediation anchors. For Direct, return the
19
- verdict in-session. For Accelerated and Full, root persists oracle's exact result
21
+ verdict in-session regardless of owner. For Accelerated and Full, root persists Oracle's exact result
20
22
  using `<skill-dir>/templates/verify-report.md`, where `<skill-dir>` is the
21
23
  directory containing the installed `thoth-sdd/SKILL.md`. Fail routes to converge
22
24
  (straight back to implement for Direct); PASS permits closeout and archive for