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.
- package/.claude-plugin/marketplace.json +1 -1
- package/README.md +28 -14
- package/dist/{chunk-YUCGIJPP.js → chunk-6GQYMWWT.js} +1 -1
- package/dist/{chunk-XO74DXBZ.js → chunk-F2K4CS5J.js} +32 -23
- package/dist/{chunk-UQOCEMU3.js → chunk-W5GCMYA3.js} +59 -20
- package/dist/cli/index.js +3 -3
- package/dist/cli/skills.d.ts +2 -0
- package/dist/cli/tui/index.js +10 -9
- package/dist/harness/core/agent-pack.d.ts +3 -3
- package/dist/harness/core/sdd.d.ts +30 -23
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/agents/oracle.md +6 -6
- package/plugin/agents/orchestrator.md +8 -7
- package/plugin/skills/plan-reviewer/SKILL.md +107 -0
- package/plugin/skills/plan-reviewer/templates/plan-review.md +65 -0
- package/plugin/skills/thoth-constitution/templates/constitution.md +2 -2
- package/plugin/skills/thoth-init/SKILL.md +1 -1
- package/plugin/skills/thoth-init/scripts/init.mjs +1 -0
- package/plugin/skills/thoth-sdd/SKILL.md +21 -15
- package/skills/README.md +4 -2
- package/skills/plan-reviewer/SKILL.md +107 -0
- package/skills/plan-reviewer/templates/plan-review.md +65 -0
- package/skills/thoth-constitution/templates/constitution.md +2 -2
- package/skills/thoth-init/SKILL.md +1 -1
- package/skills/thoth-init/scripts/init.mjs +1 -0
- package/skills/thoth-sdd/SKILL.md +21 -15
- package/plugin/skills/thoth-sdd/references/phases/analyze.md +0 -21
- package/skills/thoth-sdd/references/phases/analyze.md +0 -21
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{
|
|
10
10
|
"name": "thoth-agents",
|
|
11
11
|
"description": "Adaptive root orchestration, six specialist subagents, and a runtime-autonomous Spec Kit-compatible SDD bundle.",
|
|
12
|
-
"version": "0.3.
|
|
12
|
+
"version": "0.3.5",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "thoth-agents maintainers"
|
|
15
15
|
},
|
package/README.md
CHANGED
|
@@ -23,7 +23,10 @@ parallelism creates a net gain.
|
|
|
23
23
|
The plugin ships the seven-role contract and thoth-owned SDD
|
|
24
24
|
contracts that combine Spec Kit-grade traceability with OpenSpec-style durable
|
|
25
25
|
deltas. Accelerated planning fast-forwards without routine pauses; structural
|
|
26
|
-
`ready`/`closeout` gates and independent oracle review retain rigor.
|
|
26
|
+
`ready`/`closeout` gates and independent oracle review retain rigor. Root
|
|
27
|
+
recommends Direct, Accelerated, or Full and the user selects the route. After
|
|
28
|
+
`ready`, artifact-backed routes offer optional Oracle plan review or proceeding
|
|
29
|
+
without it; every final verification remains mandatory. During
|
|
27
30
|
installation, the CLI obtains four mandatory external skills
|
|
28
31
|
from their canonical repositories with `npx skills add` and invokes the official
|
|
29
32
|
provider-owned thoth-mem setup for the selected harness. During an SDD, agents
|
|
@@ -58,10 +61,12 @@ Restart OpenCode and initialize the current repository:
|
|
|
58
61
|
/thoth-init
|
|
59
62
|
```
|
|
60
63
|
|
|
61
|
-
This copies the
|
|
64
|
+
This copies the five thoth-owned workflow skills into `.agents/skills/` and
|
|
62
65
|
creates missing `openspec/` governance files. The external skills are already in
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
one of the OpenCode global discovery roots managed here,
|
|
67
|
+
`~/.config/opencode/skills/` or `~/.agents/skills/`, and thoth-mem has completed
|
|
68
|
+
its own provider setup from the CLI step. Existing project-owned files are
|
|
69
|
+
preserved.
|
|
65
70
|
|
|
66
71
|
### Codex
|
|
67
72
|
|
|
@@ -113,7 +118,7 @@ Restart Claude Code or run `/reload-plugins`, then initialize the repository:
|
|
|
113
118
|
/thoth-agents:thoth-init
|
|
114
119
|
```
|
|
115
120
|
|
|
116
|
-
Claude discovers the packaged orchestrator, six namespaced subagents, and
|
|
121
|
+
Claude discovers the packaged orchestrator, six namespaced subagents, and five
|
|
117
122
|
thoth-owned skills from the plugin. The CLI installs the external skills into
|
|
118
123
|
Claude's global skill root and requires thoth-mem's own setup result to be
|
|
119
124
|
complete. Init creates only the missing project governance files; it never edits
|
|
@@ -141,8 +146,8 @@ correctness-critical work.
|
|
|
141
146
|
<br>
|
|
142
147
|
<i>Adaptive root and final synthesis.</i>
|
|
143
148
|
<br><br>
|
|
144
|
-
Keeps task ownership and synthesis,
|
|
145
|
-
artifacts, and implements bounded work directly.
|
|
149
|
+
Keeps task ownership and synthesis, recommends a route for the user's
|
|
150
|
+
selection, coordinates SDD artifacts, and implements bounded work directly.
|
|
146
151
|
<br><br>
|
|
147
152
|
<b>Mode:</b> <code>adaptive-root</code>
|
|
148
153
|
</td>
|
|
@@ -195,7 +200,7 @@ correctness-critical work.
|
|
|
195
200
|
<br>
|
|
196
201
|
<i>Independent analysis and verification.</i>
|
|
197
202
|
<br><br>
|
|
198
|
-
|
|
203
|
+
Reviews plans when the user requests it and independently verifies every
|
|
199
204
|
implementation.
|
|
200
205
|
<br><br>
|
|
201
206
|
<b>Mode:</b> <code>read-only</code>
|
|
@@ -267,29 +272,33 @@ Accelerated work.
|
|
|
267
272
|
```text
|
|
268
273
|
Direct: implement -> verify
|
|
269
274
|
Accelerated: specify -> plan -> tasks -> implement -> verify -> archive
|
|
270
|
-
Full: explore -> specify -> plan -> tasks ->
|
|
275
|
+
Full: explore -> specify -> plan -> tasks -> implement -> verify -> archive
|
|
271
276
|
```
|
|
272
277
|
|
|
273
278
|
| Route | Use when | Artifacts |
|
|
274
279
|
| --- | --- | --- |
|
|
275
280
|
| Direct | Clear, bounded, low-risk work, including multi-file documentation/mechanical edits | None; oracle returns its verdict in-session. |
|
|
276
281
|
| Accelerated | Generic SDD request, partial clarity, moderate risk, multi-surface behavior, or architecture | Canonical artifacts with fast-forward specification/planning/tasks. |
|
|
277
|
-
| Full | Material uncertainty, cross-cutting behavior/architecture, high contract risk, or high failure cost | Accelerated artifacts plus exploration and
|
|
282
|
+
| Full | Material uncertainty, cross-cutting behavior/architecture, high contract risk, or high failure cost | Accelerated artifacts plus exploration and separate planning gates. |
|
|
278
283
|
|
|
279
284
|
The root loads only the current phase contract from the bundled `thoth-sdd`
|
|
280
285
|
skill. It owns specification, clarification, planning, requirements checklists,
|
|
281
286
|
task decomposition, convergence, report persistence, and archive. `explorer`
|
|
282
|
-
owns Full discovery; `oracle`
|
|
287
|
+
owns Full discovery; `oracle` owns user-selected plan review and every `verify`.
|
|
283
288
|
|
|
284
|
-
An explicitly named route
|
|
285
|
-
|
|
286
|
-
|
|
289
|
+
An explicitly named route is the user's selection and wins. Otherwise root
|
|
290
|
+
recommends one of all three routes and waits for the user's choice. A generic
|
|
291
|
+
request to use SDD sets Accelerated as the minimum recommendation. Accelerated
|
|
292
|
+
writes `spec.md -> plan.md -> tasks.md` in one uninterrupted root pass and does
|
|
293
|
+
not pause for routine approval between those planning phases.
|
|
287
294
|
|
|
288
295
|
Conditional phases remain deliberately narrow:
|
|
289
296
|
|
|
290
297
|
- `clarify` runs only for a material ambiguity and updates canonical `spec.md`;
|
|
291
298
|
- `checklist` audits high-risk requirement quality with `CHK###` taxonomy and a
|
|
292
299
|
separate revalidation pass;
|
|
300
|
+
- `plan-review` is offered after `ready` on Accelerated and Full; the user chooses
|
|
301
|
+
`Review plan with Oracle (Recommended)` or `Proceed without review`;
|
|
293
302
|
- `converge` appends tasks only after failed artifact-backed verification; and
|
|
294
303
|
- `architectural-grilling` runs before specification only when explicitly
|
|
295
304
|
requested or a material human-owned decision remains unresolved.
|
|
@@ -314,6 +323,7 @@ Every harness package includes the workflow contracts owned by thoth-agents:
|
|
|
314
323
|
| `thoth-sdd` | Route rules, phase contracts, templates, and structural validator. |
|
|
315
324
|
| `thoth-constitution` | Explicit governance SemVer lifecycle; routine plans only read principles. |
|
|
316
325
|
| `thoth-archive` | Passing closeout, transactional durable-spec sync, audit report, and dated move. |
|
|
326
|
+
| `plan-reviewer` | Optional read-only Oracle plan review with exact `[OKAY]`/`[REJECT]` results and freshness evidence. |
|
|
317
327
|
|
|
318
328
|
The installer obtains these mandatory external skills from their single source
|
|
319
329
|
of truth:
|
|
@@ -379,6 +389,10 @@ npx thoth-agents@latest install --agent=claude
|
|
|
379
389
|
npx thoth-agents@latest model --harness=codex --role=deep --model=gpt-5.6-sol
|
|
380
390
|
```
|
|
381
391
|
|
|
392
|
+
In the interactive `Configure models` flow, `Apply` is always available. When
|
|
393
|
+
no role is dirty, it reapplies every currently displayed role value; after an
|
|
394
|
+
edit, preview and apply remain limited to the dirty roles.
|
|
395
|
+
|
|
382
396
|
It does not bypass native marketplace trust or edit manager-owned caches
|
|
383
397
|
directly; Codex and Claude own their native manager mutations.
|
|
384
398
|
|
|
@@ -797,7 +797,7 @@ var AGENT_ROLES = [
|
|
|
797
797
|
"keeps requirements, decisions, and final synthesis in the root thread"
|
|
798
798
|
],
|
|
799
799
|
verification: [
|
|
800
|
-
"delegates
|
|
800
|
+
"delegates selected plan-review and every verify phase to oracle; plan review stays optional and final verification stays mandatory",
|
|
801
801
|
"consolidates summarized evidence returned by child agents"
|
|
802
802
|
]
|
|
803
803
|
},
|
|
@@ -832,8 +832,8 @@ var AGENT_ROLES = [
|
|
|
832
832
|
mode: "read-only",
|
|
833
833
|
dispatch: "synchronous-task-only",
|
|
834
834
|
canMutateWorkspace: false,
|
|
835
|
-
scope: "diagnosis, architecture,
|
|
836
|
-
responsibility: "Independently
|
|
835
|
+
scope: "diagnosis, architecture, optional plan review, and independent verification",
|
|
836
|
+
responsibility: "Independently review plans when the user requests it and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.",
|
|
837
837
|
toolGovernance: [
|
|
838
838
|
"performs read-only analysis and independent review and is never the implementer of the work it judges",
|
|
839
839
|
"does not implement, persist artifacts, or delegate further"
|
|
@@ -1017,16 +1017,17 @@ var SDD_PHASES = [
|
|
|
1017
1017
|
reason: "Produce dependency-ordered implementation slices with verification."
|
|
1018
1018
|
},
|
|
1019
1019
|
{
|
|
1020
|
-
id: "
|
|
1020
|
+
id: "plan-review",
|
|
1021
1021
|
order: 6,
|
|
1022
|
-
availableFor: ["full"],
|
|
1023
|
-
requiredFor: [
|
|
1024
|
-
activation: "
|
|
1025
|
-
prerequisites: ["
|
|
1026
|
-
producesArtifact:
|
|
1022
|
+
availableFor: ["accelerated", "full"],
|
|
1023
|
+
requiredFor: [],
|
|
1024
|
+
activation: "conditional",
|
|
1025
|
+
prerequisites: ["tasks"],
|
|
1026
|
+
producesArtifact: true,
|
|
1027
1027
|
defaultAgentRole: "oracle",
|
|
1028
1028
|
eligibleAgentRoles: ["oracle"],
|
|
1029
|
-
reason: "
|
|
1029
|
+
reason: "Offer independent blocker-only plan review when the user selects it after planning passes ready.",
|
|
1030
|
+
condition: "Activate only after ready when the user chooses Review plan with Oracle (Recommended)."
|
|
1030
1031
|
},
|
|
1031
1032
|
{
|
|
1032
1033
|
id: "implement",
|
|
@@ -1034,7 +1035,7 @@ var SDD_PHASES = [
|
|
|
1034
1035
|
availableFor: ["direct", "accelerated", "full"],
|
|
1035
1036
|
requiredFor: ["direct", "accelerated", "full"],
|
|
1036
1037
|
activation: "required",
|
|
1037
|
-
prerequisites: ["tasks"
|
|
1038
|
+
prerequisites: ["tasks"],
|
|
1038
1039
|
producesArtifact: false,
|
|
1039
1040
|
defaultAgentRole: "orchestrator",
|
|
1040
1041
|
eligibleAgentRoles: ["orchestrator", "designer", "quick", "deep"],
|
|
@@ -1135,6 +1136,13 @@ var SDD_ARTIFACT_GRAPH = [
|
|
|
1135
1136
|
consumes: ["spec", "plan"],
|
|
1136
1137
|
requiredFor: []
|
|
1137
1138
|
},
|
|
1139
|
+
{
|
|
1140
|
+
id: "plan-review",
|
|
1141
|
+
path: "plan-review.md",
|
|
1142
|
+
producedBy: "plan-review",
|
|
1143
|
+
consumes: ["spec", "plan", "tasks"],
|
|
1144
|
+
requiredFor: []
|
|
1145
|
+
},
|
|
1138
1146
|
{
|
|
1139
1147
|
id: "verify-report",
|
|
1140
1148
|
path: "verify-report.md",
|
|
@@ -1164,7 +1172,7 @@ var SDD_ROUTE_EXECUTION_POLICIES = [
|
|
|
1164
1172
|
planningMode: "fast-forward",
|
|
1165
1173
|
validationGates: ["specify", "ready", "closeout"],
|
|
1166
1174
|
optionalArtifactsByDefault: false,
|
|
1167
|
-
routineUserPauses:
|
|
1175
|
+
routineUserPauses: true,
|
|
1168
1176
|
artifactRevisionPolicy: "revalidate-affected-downstream"
|
|
1169
1177
|
},
|
|
1170
1178
|
{
|
|
@@ -1172,7 +1180,7 @@ var SDD_ROUTE_EXECUTION_POLICIES = [
|
|
|
1172
1180
|
planningMode: "gated",
|
|
1173
1181
|
validationGates: ["specify", "plan", "tasks", "ready", "closeout"],
|
|
1174
1182
|
optionalArtifactsByDefault: false,
|
|
1175
|
-
routineUserPauses:
|
|
1183
|
+
routineUserPauses: true,
|
|
1176
1184
|
artifactRevisionPolicy: "revalidate-affected-downstream"
|
|
1177
1185
|
}
|
|
1178
1186
|
];
|
|
@@ -1184,25 +1192,25 @@ var SDD_WORKFLOW_CONTRACT = {
|
|
|
1184
1192
|
validationGates: [...policy.validationGates]
|
|
1185
1193
|
})),
|
|
1186
1194
|
routingRules: [
|
|
1187
|
-
"
|
|
1195
|
+
"The root recommends direct, accelerated, or full from risk evidence, but the user selects the route; an explicitly requested route already counts as selection.",
|
|
1188
1196
|
"Direct work is the default for clear, bounded, low-risk changes; documentation and mechanical work may remain direct across multiple files.",
|
|
1189
1197
|
"Accelerated SDD is used for multi-surface behavior, architecture, partial clarity, moderate risk, or broad non-behavioral coordination.",
|
|
1190
|
-
"Accelerated planning fast-forwards specify, plan, and tasks
|
|
1198
|
+
"Accelerated planning fast-forwards specify, plan, and tasks without pauses between those artifacts, then offers the user optional oracle plan review after ready.",
|
|
1191
1199
|
"Full SDD is used for unresolved scope, cross-cutting behavior or architecture, high contract risk, or high failure cost.",
|
|
1192
1200
|
"Use architectural-grilling before specification only when the user explicitly requests it or material product or architecture decisions remain human-owned and unresolved; never require it merely because the route is Full.",
|
|
1193
|
-
"
|
|
1201
|
+
"Route selection and the post-ready plan-review choice are explicit user decisions; other input is requested only when a material unresolved decision changes the result."
|
|
1194
1202
|
],
|
|
1195
1203
|
artifactRules: [
|
|
1196
1204
|
"Spec Kit artifact semantics are preserved inside the governed openspec store.",
|
|
1197
1205
|
"Accelerated and full routes require spec.md, plan.md, tasks.md, verify-report.md, and archive-report.md.",
|
|
1198
|
-
"Research, data model, contracts, quickstart,
|
|
1206
|
+
"Research, data model, contracts, quickstart, requirements checklist, and plan-review.md are optional and created only when useful or selected.",
|
|
1199
1207
|
"The adaptive root writes coordination artifacts after loading the matching bundled phase contract; implementation ownership stays with the root or one writer role.",
|
|
1200
1208
|
"After oracle PASS, archive transactionally synchronizes only explicitly declared durable ADDED, MODIFIED, REMOVED, and RENAMED requirement deltas into openspec/specs; INTERNAL requirements and undeclared prose never update permanent specifications.",
|
|
1201
1209
|
"Archive stages and backs up writes so handled failures roll back within the active process; forced process or operating-system termination is not crash-atomic."
|
|
1202
1210
|
],
|
|
1203
1211
|
verificationRules: [
|
|
1204
1212
|
"Every route delegates focused verification to read-only oracle; the implementation writer never verifies its own work.",
|
|
1205
|
-
"
|
|
1213
|
+
"Accelerated and Full offer read-only oracle plan review after ready; it runs only when the user selects it and never replaces final verification.",
|
|
1206
1214
|
"Accelerated and full verification persists verify-report.md with a pass or fail verdict and requirement compliance matrix.",
|
|
1207
1215
|
"An artifact-backed fail verdict routes through append-only convergence, implementation, and verification again; direct work returns straight to implementation.",
|
|
1208
1216
|
"A pass verdict is required before accelerated or full work can archive."
|
|
@@ -1383,7 +1391,7 @@ ${renderRoleDirectory()}
|
|
|
1383
1391
|
</routing>
|
|
1384
1392
|
|
|
1385
1393
|
<sdd-routing>
|
|
1386
|
-
- An explicitly requested route wins;
|
|
1394
|
+
- An explicitly requested route wins: no duplicate route-selection prompt. Otherwise assess and recommend one route, ask with \`{{userQuestionTool}}\`, 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.
|
|
1387
1395
|
- Direct: clear, bounded, low-risk work. ${renderSddRoute("direct")}.
|
|
1388
1396
|
- Documentation or mechanical work may remain Direct across multiple files when it is clear and low risk.
|
|
1389
1397
|
- Accelerated SDD: multi-surface behavior, architecture, partial clarity, or moderate risk. ${renderSddRoute("accelerated")}.
|
|
@@ -1391,12 +1399,13 @@ ${renderRoleDirectory()}
|
|
|
1391
1399
|
- Its thoth-sdd validator gates are ${accelerated.validationGates.join(" -> ")}; optional artifacts are off by default.
|
|
1392
1400
|
- Full SDD: uncertain scope, cross-cutting behavior or architecture, high contract risk, or high failure cost. ${renderSddRoute("full")}.
|
|
1393
1401
|
- Full gates are ${full.validationGates.join(" -> ")}; checklist remains conditional.
|
|
1402
|
+
- After \`ready\` on Accelerated/Full, ask with \`{{userQuestionTool}}\`: \`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.
|
|
1394
1403
|
- Happy path: verify -> archive. Artifact-backed failure loop: verify fail -> converge -> implement -> verify. Direct failure loop: verify fail -> implement -> verify.
|
|
1395
|
-
- Conditional phases: clarify
|
|
1404
|
+
- Conditional phases: clarify for material ambiguity; checklist for requirement risk; plan-review by user choice; converge for verification defects.
|
|
1396
1405
|
- 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.
|
|
1397
1406
|
- Load the bundled \`thoth-sdd\` skill only after selecting Accelerated or Full, then read only the reference for the current phase.
|
|
1398
1407
|
- Root owns specify, clarify, plan, checklist, tasks, converge, and archive coordination; these phases are not delegated merely to change prompts.
|
|
1399
|
-
- Delegate
|
|
1408
|
+
- Delegate each user-selected plan review and every verify phase to ${roleTemplate("oracle")}. The implementation writer must never review itself.
|
|
1400
1409
|
</sdd-routing>
|
|
1401
1410
|
|
|
1402
1411
|
<external-skills>
|
|
@@ -1425,7 +1434,7 @@ ${renderRoleDirectory()}
|
|
|
1425
1434
|
|
|
1426
1435
|
<execution>
|
|
1427
1436
|
- Validate contracts and tests first; use test-first work for behavior. Root or one writer implements; do not delegate merely because an agent exists.
|
|
1428
|
-
- ${roleTemplate("oracle")}
|
|
1437
|
+
- ${roleTemplate("oracle")} owns selected plan review and every verification; root and writers never self-approve.
|
|
1429
1438
|
- Preserve unrelated working-tree changes. Never instruct an agent to discard them.
|
|
1430
1439
|
- Report changed files, evidence, risks, and capability gaps truthfully.
|
|
1431
1440
|
</execution>
|
|
@@ -1452,7 +1461,7 @@ var ROLE_SPECIFIC_RULES = {
|
|
|
1452
1461
|
oracle: [
|
|
1453
1462
|
"Separate observations, risks, and recommendations.",
|
|
1454
1463
|
"Review against stated requirements and contracts; do not invent implementation scope.",
|
|
1455
|
-
"For
|
|
1464
|
+
"For plan-review, load the bundled plan-reviewer skill; for verify, load the matching bundled thoth-sdd reference and remain read-only.",
|
|
1456
1465
|
"Reject self-review: the implementing root or writer cannot substitute for independent oracle judgment."
|
|
1457
1466
|
],
|
|
1458
1467
|
designer: [
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
updateOpenCodeMainConfig,
|
|
32
32
|
writeConfig,
|
|
33
33
|
writeLiteConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-F2K4CS5J.js";
|
|
35
35
|
|
|
36
36
|
// src/cli/codex-paths.ts
|
|
37
37
|
import { homedir } from "os";
|
|
@@ -2496,10 +2496,13 @@ var SKILLS_CLI_AGENT = {
|
|
|
2496
2496
|
codex: "codex",
|
|
2497
2497
|
claude: "claude-code"
|
|
2498
2498
|
};
|
|
2499
|
-
var
|
|
2500
|
-
opencode: [
|
|
2501
|
-
|
|
2502
|
-
|
|
2499
|
+
var GLOBAL_SKILL_ROOTS = {
|
|
2500
|
+
opencode: [
|
|
2501
|
+
[".config", "opencode", "skills"],
|
|
2502
|
+
[".agents", "skills"]
|
|
2503
|
+
],
|
|
2504
|
+
codex: [[".agents", "skills"]],
|
|
2505
|
+
claude: [[".claude", "skills"]]
|
|
2503
2506
|
};
|
|
2504
2507
|
var REQUIRED_SKILLS = [
|
|
2505
2508
|
{
|
|
@@ -2527,16 +2530,22 @@ var REQUIRED_SKILLS = [
|
|
|
2527
2530
|
description: "Conditional product and architecture decision interview"
|
|
2528
2531
|
}
|
|
2529
2532
|
];
|
|
2530
|
-
function
|
|
2531
|
-
return
|
|
2532
|
-
homeDir,
|
|
2533
|
-
...GLOBAL_SKILL_ROOT[harness],
|
|
2534
|
-
skill.skillName,
|
|
2535
|
-
"SKILL.md"
|
|
2533
|
+
function getRequiredSkillPaths(skill, harness, homeDir = homedir2()) {
|
|
2534
|
+
return GLOBAL_SKILL_ROOTS[harness].map(
|
|
2535
|
+
(root) => join3(homeDir, ...root, skill.skillName, "SKILL.md")
|
|
2536
2536
|
);
|
|
2537
2537
|
}
|
|
2538
|
-
function
|
|
2539
|
-
|
|
2538
|
+
function getRequiredSkillPath(skill, harness, homeDir = homedir2()) {
|
|
2539
|
+
const [primaryPath] = getRequiredSkillPaths(skill, harness, homeDir);
|
|
2540
|
+
if (!primaryPath) {
|
|
2541
|
+
throw new Error(`No global skill root is configured for ${harness}.`);
|
|
2542
|
+
}
|
|
2543
|
+
return primaryPath;
|
|
2544
|
+
}
|
|
2545
|
+
function getInstalledRequiredSkillPath(skill, harness, homeDir = homedir2()) {
|
|
2546
|
+
return getRequiredSkillPaths(skill, harness, homeDir).find(
|
|
2547
|
+
(path) => existsSync6(path)
|
|
2548
|
+
);
|
|
2540
2549
|
}
|
|
2541
2550
|
function getRequiredSkillInstallCommand(skill, harness, options = {}) {
|
|
2542
2551
|
return getNpxCommand(
|
|
@@ -2557,8 +2566,18 @@ function getRequiredSkillInstallCommand(skill, harness, options = {}) {
|
|
|
2557
2566
|
}
|
|
2558
2567
|
function installRequiredSkill(skill, harness, options = {}) {
|
|
2559
2568
|
const skillPath = getRequiredSkillPath(skill, harness, options.homeDir);
|
|
2560
|
-
|
|
2561
|
-
|
|
2569
|
+
const installedPath = getInstalledRequiredSkillPath(
|
|
2570
|
+
skill,
|
|
2571
|
+
harness,
|
|
2572
|
+
options.homeDir
|
|
2573
|
+
);
|
|
2574
|
+
if (installedPath) {
|
|
2575
|
+
return {
|
|
2576
|
+
skill,
|
|
2577
|
+
harness,
|
|
2578
|
+
status: "already-installed",
|
|
2579
|
+
skillPath: installedPath
|
|
2580
|
+
};
|
|
2562
2581
|
}
|
|
2563
2582
|
const { command, args } = getRequiredSkillInstallCommand(
|
|
2564
2583
|
skill,
|
|
@@ -2568,10 +2587,25 @@ function installRequiredSkill(skill, harness, options = {}) {
|
|
|
2568
2587
|
try {
|
|
2569
2588
|
const result = spawnSync2(command, args, { stdio: "inherit" });
|
|
2570
2589
|
if (result.status === 0) {
|
|
2571
|
-
return {
|
|
2590
|
+
return {
|
|
2591
|
+
skill,
|
|
2592
|
+
harness,
|
|
2593
|
+
status: "installed",
|
|
2594
|
+
skillPath: getInstalledRequiredSkillPath(skill, harness, options.homeDir) ?? skillPath
|
|
2595
|
+
};
|
|
2572
2596
|
}
|
|
2573
|
-
|
|
2574
|
-
|
|
2597
|
+
const recoveredPath = getInstalledRequiredSkillPath(
|
|
2598
|
+
skill,
|
|
2599
|
+
harness,
|
|
2600
|
+
options.homeDir
|
|
2601
|
+
);
|
|
2602
|
+
if (recoveredPath) {
|
|
2603
|
+
return {
|
|
2604
|
+
skill,
|
|
2605
|
+
harness,
|
|
2606
|
+
status: "already-installed",
|
|
2607
|
+
skillPath: recoveredPath
|
|
2608
|
+
};
|
|
2575
2609
|
}
|
|
2576
2610
|
return { skill, harness, status: "failed", skillPath, error: result.error };
|
|
2577
2611
|
} catch (error) {
|
|
@@ -4015,8 +4049,13 @@ function homeDirFromContext(context2) {
|
|
|
4015
4049
|
function openCodeSkillTargets(context2) {
|
|
4016
4050
|
const homeDir = homeDirFromContext(context2);
|
|
4017
4051
|
const requiredTargets = REQUIRED_SKILLS.map((skill) => {
|
|
4018
|
-
const
|
|
4019
|
-
|
|
4052
|
+
const installedPath = getInstalledRequiredSkillPath(
|
|
4053
|
+
skill,
|
|
4054
|
+
"opencode",
|
|
4055
|
+
homeDir
|
|
4056
|
+
);
|
|
4057
|
+
const path = installedPath ?? getRequiredSkillPath(skill, "opencode", homeDir);
|
|
4058
|
+
const installed = installedPath !== void 0;
|
|
4020
4059
|
return {
|
|
4021
4060
|
kind: "skill",
|
|
4022
4061
|
path,
|
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getOpenCodeVersion,
|
|
5
5
|
isOpenCodeInstalled,
|
|
6
6
|
opencodeAdapter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-6GQYMWWT.js";
|
|
8
8
|
import {
|
|
9
9
|
CODEX_ROLE_NAMES,
|
|
10
10
|
REQUIRED_SKILLS,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
installRequiredSkill,
|
|
44
44
|
listOperationHarnesses,
|
|
45
45
|
normalizeEffortSelection
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-W5GCMYA3.js";
|
|
47
47
|
import {
|
|
48
48
|
ALL_AGENT_NAMES,
|
|
49
49
|
detectCurrentConfig,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
getExistingLiteConfigPath,
|
|
54
54
|
updateOpenCodeMainConfig,
|
|
55
55
|
writeLiteConfig
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-F2K4CS5J.js";
|
|
57
57
|
|
|
58
58
|
// src/cli/index.ts
|
|
59
59
|
import { pathToFileURL } from "url";
|
package/dist/cli/skills.d.ts
CHANGED
|
@@ -19,7 +19,9 @@ interface InstallRequiredSkillOptions extends NpxCommandOptions {
|
|
|
19
19
|
homeDir?: string;
|
|
20
20
|
}
|
|
21
21
|
export declare const REQUIRED_SKILLS: readonly RequiredSkill[];
|
|
22
|
+
export declare function getRequiredSkillPaths(skill: RequiredSkill, harness: SkillInstallHarness, homeDir?: string): string[];
|
|
22
23
|
export declare function getRequiredSkillPath(skill: RequiredSkill, harness: SkillInstallHarness, homeDir?: string): string;
|
|
24
|
+
export declare function getInstalledRequiredSkillPath(skill: RequiredSkill, harness: SkillInstallHarness, homeDir?: string): string | undefined;
|
|
23
25
|
export declare function isRequiredSkillInstalled(skill: RequiredSkill, harness: SkillInstallHarness, options?: InstallRequiredSkillOptions): boolean;
|
|
24
26
|
export declare function getRequiredSkillInstallCommand(skill: RequiredSkill, harness: SkillInstallHarness, options?: NpxCommandOptions): NpxCommand;
|
|
25
27
|
/** Install one mandatory skill into the selected harness's global skill root. */
|
package/dist/cli/tui/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
defaultTuiOperations,
|
|
3
3
|
effortChoicesForModel,
|
|
4
4
|
listOperationHarnesses
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-W5GCMYA3.js";
|
|
6
|
+
import "../../chunk-F2K4CS5J.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/tui/index.tsx
|
|
9
9
|
import { render } from "ink";
|
|
@@ -765,10 +765,10 @@ function normalizeSelection(current, items) {
|
|
|
765
765
|
if (items.length === 0) return 0;
|
|
766
766
|
return Math.min(current, items.length - 1);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
return rows.filter((role) => role.dirty).map((role) => {
|
|
768
|
+
function rolesForModelPlan(rows, includeUnchanged = false) {
|
|
769
|
+
return rows.filter((role) => includeUnchanged || role.dirty).map((role) => {
|
|
770
770
|
const effortChanged = role.effort?.kind !== role.currentEffort.kind || role.effort?.kind === "effort" && role.currentEffort.kind === "effort" && role.effort.value !== role.currentEffort.value;
|
|
771
|
-
const includeEffort = effortChanged || role.effort?.kind === "effort";
|
|
771
|
+
const includeEffort = includeUnchanged || effortChanged || role.effort?.kind === "effort";
|
|
772
772
|
return {
|
|
773
773
|
role: role.role,
|
|
774
774
|
model: role.model,
|
|
@@ -899,8 +899,9 @@ function App({
|
|
|
899
899
|
(option) => option.id === modelChoiceSelection.id
|
|
900
900
|
);
|
|
901
901
|
const choiceSelected = selectedModelIndex < 0 ? 0 : selectedModelIndex;
|
|
902
|
-
const dirtyRoles =
|
|
903
|
-
const
|
|
902
|
+
const dirtyRoles = rolesForModelPlan(modelRows);
|
|
903
|
+
const rolesToApply = dirtyRoles.length > 0 ? dirtyRoles : rolesForModelPlan(modelRows, true);
|
|
904
|
+
const modelActions = dirtyRoles.length > 0 ? ["Preview changes", "Apply", "Back"] : ["Apply", "Back"];
|
|
904
905
|
const modelMenuItems = [
|
|
905
906
|
...modelRows.map((role) => ({
|
|
906
907
|
id: role.role,
|
|
@@ -989,7 +990,7 @@ function App({
|
|
|
989
990
|
setView("effortChoice");
|
|
990
991
|
}
|
|
991
992
|
function previewModelChanges(applyImmediately) {
|
|
992
|
-
const nextPlan = operations.modelPlan(modelHarness,
|
|
993
|
+
const nextPlan = operations.modelPlan(modelHarness, rolesToApply);
|
|
993
994
|
setPlan(nextPlan);
|
|
994
995
|
setPreviewAction(applyImmediately ? "apply" : "cancel");
|
|
995
996
|
setPreviewBackView("modelRoles");
|
|
@@ -1237,7 +1238,7 @@ function App({
|
|
|
1237
1238
|
const action = modelActions[modelSelected - modelRows.length];
|
|
1238
1239
|
if (action === "Back") setView("manageHarness");
|
|
1239
1240
|
if (action === "Preview changes") previewModelChanges(false);
|
|
1240
|
-
if (action === "Apply
|
|
1241
|
+
if (action === "Apply") previewModelChanges(true);
|
|
1241
1242
|
}
|
|
1242
1243
|
return;
|
|
1243
1244
|
}
|
|
@@ -32,7 +32,7 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
32
32
|
readonly scope: "requirements, SDD coordination, routing, bounded direct work, decisions, and synthesis";
|
|
33
33
|
readonly responsibility: "Keep the task coherent, own sequential specification, planning, task, convergence, and archive coordination, act directly when work is clear and bounded, and delegate only for net gain.";
|
|
34
34
|
readonly toolGovernance: ["may inspect and edit bounded direct work, but every verification is delegated to oracle", "loads the matching thoth-sdd phase contract on demand instead of carrying every phase protocol in its prompt", "owns governed coordination writes under openspec/ and uses append-only tasks.md updates during convergence", "delegates independent or specialist work only when it produces a net gain", "keeps requirements, decisions, and final synthesis in the root thread"];
|
|
35
|
-
readonly verification: ["delegates
|
|
35
|
+
readonly verification: ["delegates selected plan-review and every verify phase to oracle; plan review stays optional and final verification stays mandatory", "consolidates summarized evidence returned by child agents"];
|
|
36
36
|
}, {
|
|
37
37
|
readonly name: "explorer";
|
|
38
38
|
readonly mode: "read-only";
|
|
@@ -56,8 +56,8 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
56
56
|
readonly mode: "read-only";
|
|
57
57
|
readonly dispatch: "synchronous-task-only";
|
|
58
58
|
readonly canMutateWorkspace: false;
|
|
59
|
-
readonly scope: "diagnosis, architecture,
|
|
60
|
-
readonly responsibility: "Independently
|
|
59
|
+
readonly scope: "diagnosis, architecture, optional plan review, and independent verification";
|
|
60
|
+
readonly responsibility: "Independently review plans when the user requests it and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.";
|
|
61
61
|
readonly toolGovernance: ["performs read-only analysis and independent review and is never the implementer of the work it judges", "does not implement, persist artifacts, or delegate further"];
|
|
62
62
|
readonly verification: ["separates observations, risks, and recommendations"];
|
|
63
63
|
}, {
|