thoth-agents 0.3.11 → 0.3.12
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/README.md +119 -33
- package/dist/{chunk-CB3EBA7H.js → chunk-5UBJB5QO.js} +1 -1
- package/dist/{chunk-GIUU6FNE.js → chunk-DX4U3AD3.js} +95 -50
- package/dist/{chunk-ZEAAWBF2.js → chunk-VPVBYBPU.js} +575 -98
- package/dist/cli/codex-plugin-install.d.ts +16 -2
- package/dist/cli/index.js +7 -5
- package/dist/cli/tui/index.js +2 -2
- package/dist/harness/core/agent-pack.d.ts +26 -6
- package/dist/harness/core/sdd.d.ts +27 -15
- package/dist/harness/writers/codex-plugin-package.d.ts +1 -0
- package/dist/index.js +2 -2
- package/package.json +4 -4
- 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 +3 -3
- package/plugin/agents/orchestrator.md +35 -30
- package/plugin/skills/plan-reviewer/SKILL.md +54 -15
- package/plugin/skills/thoth-archive/SKILL.md +5 -0
- package/plugin/skills/thoth-constitution/SKILL.md +5 -0
- package/plugin/skills/thoth-constitution/templates/constitution.md +19 -2
- package/plugin/skills/thoth-init/SKILL.md +5 -0
- package/plugin/skills/thoth-sdd/SKILL.md +35 -10
- package/plugin/skills/thoth-sdd/references/phases/implement.md +13 -2
- package/plugin/skills/thoth-sdd/references/phases/tasks.md +23 -2
- package/plugin/skills/thoth-sdd/references/phases/verify.md +7 -5
- package/plugin/skills/thoth-sdd/scripts/validate.mjs +263 -30
- package/plugin/skills/thoth-sdd/templates/tasks.md +18 -2
- package/skills/README.md +2 -1
- package/skills/plan-reviewer/SKILL.md +54 -15
- package/skills/thoth-archive/SKILL.md +5 -0
- package/skills/thoth-constitution/SKILL.md +5 -0
- package/skills/thoth-constitution/templates/constitution.md +19 -2
- package/skills/thoth-init/SKILL.md +5 -0
- package/skills/thoth-sdd/SKILL.md +35 -10
- package/skills/thoth-sdd/references/phases/implement.md +13 -2
- package/skills/thoth-sdd/references/phases/tasks.md +23 -2
- package/skills/thoth-sdd/references/phases/verify.md +7 -5
- package/skills/thoth-sdd/scripts/validate.mjs +263 -30
- package/skills/thoth-sdd/templates/tasks.md +18 -2
- package/.agents/plugins/marketplace.json +0 -20
- package/.claude-plugin/marketplace.json +0 -21
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export type CodexPluginSetupAction = 'register-marketplace' | 'install-plugin';
|
|
2
|
+
export type CodexPluginCleanupAction = 'remove-legacy-plugin' | 'remove-legacy-marketplace' | 'remove-legacy-root';
|
|
3
|
+
export interface CodexLegacyCleanupRoot {
|
|
4
|
+
kind: 'cache' | 'snapshot';
|
|
5
|
+
marketplaceName: string;
|
|
6
|
+
path: string;
|
|
7
|
+
realPath: string;
|
|
8
|
+
relativePath: string;
|
|
9
|
+
}
|
|
2
10
|
export interface CodexCommandResult {
|
|
3
11
|
exitCode: number;
|
|
4
12
|
stdout: string;
|
|
@@ -17,22 +25,28 @@ export interface CodexCommandInvocation {
|
|
|
17
25
|
}
|
|
18
26
|
export type CodexCommandExecutor = (command: string, args: readonly string[], options: CodexCommandOptions) => CodexCommandResult;
|
|
19
27
|
export interface CodexPluginInstallConfig {
|
|
28
|
+
codexHome?: string;
|
|
20
29
|
dryRun?: boolean;
|
|
30
|
+
expectedVersion: string;
|
|
31
|
+
homeDir?: string;
|
|
21
32
|
projectRoot: string;
|
|
22
33
|
commandExecutor?: CodexCommandExecutor;
|
|
23
34
|
}
|
|
24
35
|
export interface CodexPluginSetupPlanItem {
|
|
25
|
-
action: CodexPluginSetupAction;
|
|
36
|
+
action: CodexPluginSetupAction | CodexPluginCleanupAction;
|
|
26
37
|
targetPath: string;
|
|
27
38
|
description: string;
|
|
28
|
-
command
|
|
39
|
+
command?: {
|
|
29
40
|
executable: 'codex';
|
|
30
41
|
args: string[];
|
|
31
42
|
cwd: string;
|
|
32
43
|
};
|
|
44
|
+
cleanupRoot?: CodexLegacyCleanupRoot;
|
|
33
45
|
}
|
|
34
46
|
export interface CodexPluginSetupPlan {
|
|
47
|
+
codexHome: string;
|
|
35
48
|
dryRun: boolean;
|
|
49
|
+
expectedVersion: string;
|
|
36
50
|
items: CodexPluginSetupPlanItem[];
|
|
37
51
|
diagnostics: string[];
|
|
38
52
|
ready: boolean;
|
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-5UBJB5QO.js";
|
|
8
8
|
import {
|
|
9
9
|
CODEX_ROLE_NAMES,
|
|
10
10
|
REQUIRED_SKILLS,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
listOperationHarnesses,
|
|
48
48
|
normalizeEffortSelection,
|
|
49
49
|
syncOpenCodeOwnedSkills
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-VPVBYBPU.js";
|
|
51
51
|
import {
|
|
52
52
|
ALL_AGENT_NAMES,
|
|
53
53
|
detectCurrentConfig,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
resolveExecutingPackageVersion,
|
|
59
59
|
updateOpenCodeMainConfig,
|
|
60
60
|
writeLiteConfig
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-DX4U3AD3.js";
|
|
62
62
|
|
|
63
63
|
// src/cli/index.ts
|
|
64
64
|
import { pathToFileURL } from "url";
|
|
@@ -378,6 +378,8 @@ async function install(args, dependencies = {}) {
|
|
|
378
378
|
const projectRoot = cwd();
|
|
379
379
|
const pluginPlan = buildCodexPluginSetupPlan({
|
|
380
380
|
dryRun: config.dryRun,
|
|
381
|
+
expectedVersion: packageVersion.version,
|
|
382
|
+
homeDir: dependencies.homeDir,
|
|
381
383
|
projectRoot
|
|
382
384
|
});
|
|
383
385
|
console.log(formatCodexPluginSetupPlan(pluginPlan));
|
|
@@ -416,7 +418,7 @@ async function install(args, dependencies = {}) {
|
|
|
416
418
|
return 1;
|
|
417
419
|
}
|
|
418
420
|
printSuccess(
|
|
419
|
-
config.dryRun ? "Codex dry-run complete; no files written" : "Codex plugin installed as thoth-agents@thoth-
|
|
421
|
+
config.dryRun ? "Codex dry-run complete; no files written" : "Codex plugin installed as thoth-agents@thoth-plugins and agent-pack setup complete (restart Codex to activate)"
|
|
420
422
|
);
|
|
421
423
|
return 0;
|
|
422
424
|
}
|
|
@@ -449,7 +451,7 @@ async function install(args, dependencies = {}) {
|
|
|
449
451
|
return 1;
|
|
450
452
|
}
|
|
451
453
|
printSuccess(
|
|
452
|
-
config.dryRun ? "Claude Code dry-run complete; no files written" : "Claude Code plugin installed as thoth-agents@thoth-
|
|
454
|
+
config.dryRun ? "Claude Code dry-run complete; no files written" : "Claude Code plugin installed as thoth-agents@thoth-plugins through the native manager (restart Claude Code or run /reload-plugins to activate)"
|
|
453
455
|
);
|
|
454
456
|
return 0;
|
|
455
457
|
}
|
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-VPVBYBPU.js";
|
|
6
|
+
import "../../chunk-DX4U3AD3.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/tui/index.tsx
|
|
9
9
|
import { render } from "ink";
|
|
@@ -19,8 +19,28 @@ export interface OrchestrationPolicy {
|
|
|
19
19
|
maxDelegationDepth: number;
|
|
20
20
|
singleWriter: boolean;
|
|
21
21
|
implementationOwnership: ImplementationOwnershipPolicy;
|
|
22
|
+
taskShaping: TaskShapingPolicy;
|
|
23
|
+
specialistDirectory: SpecialistDecision[];
|
|
22
24
|
rules: string[];
|
|
23
25
|
}
|
|
26
|
+
export type TaskShapingStep = 'bound-work' | 'map-dependencies' | 'assign-ownership' | 'select-specialists' | 'mark-ready-and-blocked' | 'dispatch-ready-wave' | 'wait-for-terminal-evidence' | 'reconcile-and-verify';
|
|
27
|
+
export interface TaskShapingPolicy {
|
|
28
|
+
steps: TaskShapingStep[];
|
|
29
|
+
nativeAuthority: boolean;
|
|
30
|
+
boundedWidth: boolean;
|
|
31
|
+
decisions: {
|
|
32
|
+
dependency: string;
|
|
33
|
+
ownershipConflict: string;
|
|
34
|
+
readyWave: string;
|
|
35
|
+
terminalEvidence: string;
|
|
36
|
+
degradation: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface SpecialistDecision {
|
|
40
|
+
role: Exclude<AgentRoleName, 'orchestrator'>;
|
|
41
|
+
selectWhen: string;
|
|
42
|
+
rejectWhen: string;
|
|
43
|
+
}
|
|
24
44
|
export type ImplementationOwner = 'orchestrator' | 'designer' | 'quick' | 'deep';
|
|
25
45
|
export interface ImplementationOwnershipPolicy {
|
|
26
46
|
eligibleOwners: ImplementationOwner[];
|
|
@@ -43,12 +63,12 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
43
63
|
readonly dispatch: "root-coordinator";
|
|
44
64
|
readonly canMutateWorkspace: true;
|
|
45
65
|
readonly scope: "requirements, SDD coordination, routing, bounded implementation, decisions, and synthesis";
|
|
46
|
-
readonly responsibility: "Keep requirements, decisions, sequential SDD coordination, and final synthesis in the root thread; evaluate implementation ownership independently in every route
|
|
66
|
+
readonly responsibility: "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.";
|
|
47
67
|
readonly useWhen: ["Coordinate requirements, governed artifacts, routing, and synthesis.", "Implement an accepted mutable surface in any route when accumulated context and continuity outweigh delegation overhead."];
|
|
48
|
-
readonly doNotUseWhen: ["Not for independent plan review or final verification."];
|
|
68
|
+
readonly doNotUseWhen: ["Not for independent plan review or Oracle-required final verification."];
|
|
49
69
|
readonly escalateWhen: ["Delegate implementation when specialization, context isolation, or independent bounded work creates a demonstrated net gain; then select designer, quick, or deep by task shape."];
|
|
50
|
-
readonly toolGovernance: ["may inspect and edit the accepted bounded implementation surface in every route
|
|
51
|
-
readonly verification: ["
|
|
70
|
+
readonly toolGovernance: ["may inspect and edit the accepted bounded implementation surface in every route and may verify trivial deterministic Direct work without self-approval", "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"];
|
|
71
|
+
readonly verification: ["runs focused checks for trivial deterministic Direct work while final verification remains mandatory", "delegates selected plan review plus Accelerated, Full, and material-risk Direct final verification to a fresh oracle", "consolidates summarized evidence returned by child agents"];
|
|
52
72
|
}, {
|
|
53
73
|
readonly name: "explorer";
|
|
54
74
|
readonly mode: "read-only";
|
|
@@ -79,8 +99,8 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
79
99
|
readonly dispatch: "synchronous-task-only";
|
|
80
100
|
readonly canMutateWorkspace: false;
|
|
81
101
|
readonly scope: "diagnosis, architecture, optional plan review, and independent verification";
|
|
82
|
-
readonly responsibility: "Independently review plans when the user requests it and
|
|
83
|
-
readonly useWhen: ["Selected plan review, diagnosis, or final verification needs independent judgment."];
|
|
102
|
+
readonly responsibility: "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.";
|
|
103
|
+
readonly useWhen: ["Selected plan review, persistent diagnosis, material architecture or security risk, contradictory evidence, high failure cost, or artifact-backed final verification needs independent judgment."];
|
|
84
104
|
readonly doNotUseWhen: ["Not for implementation, mutation, persistence, or self-review."];
|
|
85
105
|
readonly escalateWhen: ["Return blockers and remediation anchors to root."];
|
|
86
106
|
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"];
|
|
@@ -5,6 +5,14 @@ export type SddIntent = 'documentation' | 'mechanical' | 'behavior' | 'architect
|
|
|
5
5
|
export type SddScope = 'local' | 'multi-file' | 'cross-cutting';
|
|
6
6
|
export type SddClarity = 'clear' | 'partial' | 'uncertain';
|
|
7
7
|
export type SddRisk = 'low' | 'medium' | 'high';
|
|
8
|
+
export type SddFinalVerificationRisk = 'trivial-deterministic' | 'architecture' | 'security' | 'cross-cutting-regression' | 'persistent-diagnosis' | 'contradictory-evidence' | 'high-failure-cost' | 'material-uncertainty';
|
|
9
|
+
export type SddFinalVerificationOwner = 'orchestrator' | 'oracle';
|
|
10
|
+
export interface SddFinalVerificationDecision {
|
|
11
|
+
verificationRequired: true;
|
|
12
|
+
owner: SddFinalVerificationOwner;
|
|
13
|
+
oracleRequired: boolean;
|
|
14
|
+
freshOracleRequired: boolean;
|
|
15
|
+
}
|
|
8
16
|
export type SddPlanningMode = 'none' | 'fast-forward' | 'gated';
|
|
9
17
|
export type SddValidationGate = 'specify' | 'plan' | 'tasks' | 'checklist' | 'ready' | 'closeout';
|
|
10
18
|
export type SddArtifactRevisionPolicy = 'none' | 'revalidate-affected-downstream';
|
|
@@ -24,7 +32,7 @@ export interface SddRoutingDecision {
|
|
|
24
32
|
}
|
|
25
33
|
export type SddPhaseId = 'explore' | 'specify' | 'clarify' | 'plan' | 'checklist' | 'tasks' | 'plan-review' | 'implement' | 'verify' | 'converge' | 'archive';
|
|
26
34
|
export type SddPhaseActivation = 'required' | 'conditional';
|
|
27
|
-
export type SddPhaseOwner = AgentRoleName | 'adaptive-implementation';
|
|
35
|
+
export type SddPhaseOwner = AgentRoleName | 'adaptive-implementation' | 'adaptive-verification';
|
|
28
36
|
export interface SddPhaseContract {
|
|
29
37
|
id: SddPhaseId;
|
|
30
38
|
order: number;
|
|
@@ -161,8 +169,8 @@ export declare const SDD_PHASES: readonly [{
|
|
|
161
169
|
readonly producesArtifact: true;
|
|
162
170
|
readonly defaultAgentRole: "oracle";
|
|
163
171
|
readonly eligibleAgentRoles: ["oracle"];
|
|
164
|
-
readonly reason: "Offer independent blocker-only plan review
|
|
165
|
-
readonly condition: "Activate
|
|
172
|
+
readonly reason: "Offer independent blocker-only plan review after explicit or bounded recommended-default selection once planning passes ready.";
|
|
173
|
+
readonly condition: "Activate after ready when review is selected explicitly or by the bounded recommended default after three answerless attempts.";
|
|
166
174
|
}, {
|
|
167
175
|
readonly id: "implement";
|
|
168
176
|
readonly order: 7;
|
|
@@ -182,9 +190,9 @@ export declare const SDD_PHASES: readonly [{
|
|
|
182
190
|
readonly activation: "required";
|
|
183
191
|
readonly prerequisites: ["implement"];
|
|
184
192
|
readonly producesArtifact: true;
|
|
185
|
-
readonly defaultAgentRole: "
|
|
186
|
-
readonly eligibleAgentRoles: ["oracle"];
|
|
187
|
-
readonly reason: "
|
|
193
|
+
readonly defaultAgentRole: "adaptive-verification";
|
|
194
|
+
readonly eligibleAgentRoles: ["orchestrator", "oracle"];
|
|
195
|
+
readonly reason: "Keep verification mandatory while selecting root for trivial deterministic Direct checks and a fresh Oracle for material-risk Direct or artifact-backed judgment.";
|
|
188
196
|
}, {
|
|
189
197
|
readonly id: "converge";
|
|
190
198
|
readonly order: 9;
|
|
@@ -357,17 +365,17 @@ export declare const SDD_PHASE_PROTOCOLS: readonly [{
|
|
|
357
365
|
readonly outputSchema: ["tasks.md path", "requirement coverage", "dependency order"];
|
|
358
366
|
readonly doneWhen: ["Every FR and buildable SC has executable task coverage and every task has a verification step."];
|
|
359
367
|
readonly blockingConditions: ["A task requires an unresolved requirement, architecture choice, or hidden prerequisite."];
|
|
360
|
-
readonly handoff: ["After ready, pass spec.md, plan.md, tasks.md, dependencies, and verification commands to the
|
|
368
|
+
readonly handoff: ["After ready, pass spec.md, plan.md, tasks.md, dependencies, and verification commands to the explicitly or bounded-default selected plan-review path, or implement when the user explicitly proceeds without review."];
|
|
361
369
|
}, {
|
|
362
370
|
readonly id: "plan-review";
|
|
363
|
-
readonly objective: "Perform the
|
|
364
|
-
readonly requiredInputs: ["spec.md", "plan.md", "tasks.md", "Optional active requirements checklist", "Project constitution", "
|
|
365
|
-
readonly instructions: ["Load the bundled plan-reviewer skill and review executability, completeness, correctness, and coherence without redesigning the plan.", "Require task coverage for every FR and buildable SC; assess outcome SC as measurable verification targets without manufacturing implementation tasks.", "Return exact [OKAY] or [REJECT] semantics, default to [OKAY], and report at most three true blockers with the smallest fixes.", "Provide the reviewed artifact set so root can persist plan-review.md with SHA-256 freshness evidence; Oracle never writes it.", "Keep plan-review approval separate from implementation confirmation and mandatory final verify."];
|
|
371
|
+
readonly objective: "Perform the explicitly or recommended-default selected read-only blocker review before Accelerated or Full implementation.";
|
|
372
|
+
readonly requiredInputs: ["spec.md", "plan.md", "tasks.md", "Optional active requirements checklist", "Project constitution", "Review selection after the ready gate, from an explicit answer or the bounded recommended fallback"];
|
|
373
|
+
readonly instructions: ["At the ready gate, make at most three total attempts when the native review question returns answerless; after the third answerless result, treat Review plan with Oracle (Recommended) as selected, while any explicit Proceed without review answer wins.", "Load the bundled plan-reviewer skill and review executability, completeness, correctness, and coherence without redesigning the plan.", "Require task coverage for every FR and buildable SC; assess outcome SC as measurable verification targets without manufacturing implementation tasks.", "For every declared parallel group, independently assess semantic independence, each lane path union and owner, real cross-lane data flow, prerequisites and barrier, and whether native capacity supports dispatch-before-wait waves with refill; require a truthful sequential fallback when concurrency is unavailable or unproven.", "Return exact [OKAY] or [REJECT] semantics, default to [OKAY], and report at most three true blockers with the smallest fixes.", "After [REJECT], root must repair actionable same-intent planning artifacts, revalidate affected gates, and start a fresh Oracle approval round until [OKAY]; stop instead on a material human-owned blocker.", "Provide the reviewed artifact set so root can persist plan-review.md with SHA-256 freshness evidence; Oracle never writes it.", "Keep plan-review approval separate from implementation confirmation and mandatory final verify."];
|
|
366
374
|
readonly allowedWrites: ["None; Oracle is read-only. Root persists plan-review.md when review runs."];
|
|
367
|
-
readonly outputSchema: ["status: [OKAY] or [REJECT]", "zero to three blocker findings with smallest fixes", "non-blocking cautions", "requirement coverage percentage", "constitution alignment", "reviewed artifact freshness manifest input"];
|
|
375
|
+
readonly outputSchema: ["status: [OKAY] or [REJECT]", "zero to three blocker findings with smallest fixes", "non-blocking cautions", "requirement coverage percentage", "parallel executability disposition when tasks declare groups or an evidence-backed None reason", "constitution alignment", "reviewed artifact freshness manifest input"];
|
|
368
376
|
readonly doneWhen: ["Oracle has returned an exact status and every true blocker has a concrete remediation anchor."];
|
|
369
377
|
readonly blockingConditions: ["[REJECT] blocks the review path until root repairs planning blockers, the user explicitly proceeds without review, or an explicit override is recorded."];
|
|
370
|
-
readonly handoff: ["On [OKAY], root persists review evidence
|
|
378
|
+
readonly handoff: ["On [OKAY], root persists review evidence and summarizes the approved scope, approach, ownership, verification, and material risks before asking Implement (Recommended) or Stop.", "For an answerless implementation question, root makes at most three total attempts; after the third answerless result, implementation counts as selected, while any explicit Stop answer wins.", "[OKAY] alone does not authorize implementation before that explicit choice or bounded fallback resolves.", "A plan-review result never satisfies mandatory final verify."];
|
|
371
379
|
}, {
|
|
372
380
|
readonly id: "implement";
|
|
373
381
|
readonly objective: "Execute the accepted task slice with one writer and focused verification.";
|
|
@@ -377,12 +385,12 @@ export declare const SDD_PHASE_PROTOCOLS: readonly [{
|
|
|
377
385
|
readonly outputSchema: ["status: completed | partial | failed", "per-task outcome", "files changed", "executed verification and results", "deviations, issues, and remaining work"];
|
|
378
386
|
readonly doneWhen: ["The assigned task slice is complete and its focused checks pass with concrete evidence."];
|
|
379
387
|
readonly blockingConditions: ["A task needs scope expansion, a material unresolved decision, or fails repeatedly without a safe bounded recovery."];
|
|
380
|
-
readonly handoff: ["Pass changed files, per-task evidence, deviations, and verification results
|
|
388
|
+
readonly handoff: ["Pass changed files, per-task evidence, deviations, and verification results into the route- and risk-aware final-verification decision."];
|
|
381
389
|
}, {
|
|
382
390
|
readonly id: "verify";
|
|
383
391
|
readonly objective: "Judge the implementation against accepted requirements using executed evidence.";
|
|
384
392
|
readonly requiredInputs: ["Implemented change or task results", "spec.md, plan.md, and tasks.md for artifact-backed routes", "Changed files and project verification commands"];
|
|
385
|
-
readonly instructions: ["
|
|
393
|
+
readonly instructions: ["Trivial deterministic Direct work may use root-owned focused verification; materially risky Direct plus Accelerated and Full final verification use a fresh independent Oracle, and no implementation writer self-approves.", "Run or inspect the smallest sufficient executed checks; static confidence alone is not evidence.", "Judge completeness, correctness, and coherence independently so a passing test cannot hide missing or contradictory scope.", "Build a compliance matrix from every accepted requirement to code and executed checks.", "Record every outcome SC as PASS with concrete observed evidence or RISK with an explicit residual-risk entry.", "For accelerated and full routes, the root persists the read-only oracle result as verify-report.md."];
|
|
386
394
|
readonly allowedWrites: ["Root persistence only: openspec/changes/<feature>/verify-report.md for accelerated and full routes"];
|
|
387
395
|
readonly outputSchema: ["verdict: pass | fail", "compliance matrix", "executed checks and results", "critical issues with remediation anchors", "warnings and residual risks"];
|
|
388
396
|
readonly doneWhen: ["Every accepted requirement is represented in the compliance matrix and the verdict matches the evidence."];
|
|
@@ -419,7 +427,11 @@ export declare function getSddPhaseProtocol(id: SddPhaseId): SddPhaseProtocol;
|
|
|
419
427
|
export declare function getSddPhaseProtocolsForRole(role: AgentRoleName): SddPhaseProtocol[];
|
|
420
428
|
export declare function renderSddPhaseDispatchEnvelope(input: SddPhaseDispatchInput): string;
|
|
421
429
|
export declare function renderSddPhaseDispatchTemplate(): string;
|
|
422
|
-
export declare function
|
|
430
|
+
export declare function getSddFinalVerificationDecision({ route, risk, }: {
|
|
431
|
+
route: SddRoute;
|
|
432
|
+
risk: SddFinalVerificationRisk;
|
|
433
|
+
}): SddFinalVerificationDecision;
|
|
434
|
+
export declare function getSddPhaseOwner(route: SddRoute, phaseId: SddPhaseId, verificationRisk?: SddFinalVerificationRisk): SddPhaseOwner;
|
|
423
435
|
export declare function getRequiredSddPhaseOrder(route: SddRoute): SddPhaseId[];
|
|
424
436
|
export declare function canEnterSddPhase({ route, completed, target, }: {
|
|
425
437
|
route: SddRoute;
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
renderOpenCodeAgentConfigs,
|
|
4
4
|
spawn,
|
|
5
5
|
spawnSync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5UBJB5QO.js";
|
|
7
7
|
import {
|
|
8
8
|
POLL_INTERVAL_BACKGROUND_MS,
|
|
9
9
|
context7,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
grep_app,
|
|
13
13
|
loadPluginConfig,
|
|
14
14
|
stripJsonComments
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DX4U3AD3.js";
|
|
16
16
|
|
|
17
17
|
// src/index.ts
|
|
18
18
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thoth-agents",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "Adaptive multi-harness orchestration with seven roles, runtime-autonomous Spec Kit-compatible SDD routes, and external provider boundaries.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,8 +36,6 @@
|
|
|
36
36
|
"dist",
|
|
37
37
|
"skills",
|
|
38
38
|
"plugin",
|
|
39
|
-
".agents/plugins/marketplace.json",
|
|
40
|
-
".claude-plugin/marketplace.json",
|
|
41
39
|
"thoth-agents.schema.json",
|
|
42
40
|
"README.md",
|
|
43
41
|
"LICENSE"
|
|
@@ -47,6 +45,7 @@
|
|
|
47
45
|
"generate-schema": "tsx scripts/generate-schema.ts",
|
|
48
46
|
"integration:sync": "tsx src/harness/generate-integration-packages.ts",
|
|
49
47
|
"integration:verify": "vitest run src/harness/generate-integration-packages.test.ts src/harness/integration-lifecycle.test.ts",
|
|
48
|
+
"setup:codex:local": "pnpm run build && tsx scripts/setup-codex-local.ts",
|
|
50
49
|
"release:notes": "tsx scripts/generate-release-notes.ts",
|
|
51
50
|
"typecheck": "tsc --noEmit",
|
|
52
51
|
"test": "vitest run",
|
|
@@ -56,7 +55,8 @@
|
|
|
56
55
|
"check:ci": "biome check .",
|
|
57
56
|
"dev": "pnpm run build && opencode",
|
|
58
57
|
"prepublishOnly": "pnpm run build && pnpm run integration:verify",
|
|
59
|
-
"version": "pnpm run integration:sync && pnpm run integration:verify && git add -- plugin
|
|
58
|
+
"version": "pnpm run integration:sync && pnpm run integration:verify && git add -- plugin",
|
|
59
|
+
"release:marketplace": "node scripts/publish-marketplace.mjs",
|
|
60
60
|
"release:patch": "npm version patch --ignore-scripts=false && git push --follow-tags",
|
|
61
61
|
"release:minor": "npm version minor --ignore-scripts=false && git push --follow-tags",
|
|
62
62
|
"release:major": "npm version major --ignore-scripts=false && git push --follow-tags"
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
{
|
|
30
30
|
"path": "agents/oracle.md",
|
|
31
31
|
"kind": "agent-config",
|
|
32
|
-
"sha256": "sha256:
|
|
32
|
+
"sha256": "sha256:212c8598b510200386c133e37fdc5a6caf9156d89f70dbf4e4a2cb68653cf93f"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "agents/orchestrator.md",
|
|
36
36
|
"kind": "agent-config",
|
|
37
|
-
"sha256": "sha256:
|
|
37
|
+
"sha256": "sha256:fe44e6849122ceb54a4e31962ce9e48db1b3f36ff5302b4a317695e12a2099ba"
|
|
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
|
+
"version": "0.3.12",
|
|
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"
|
package/plugin/agents/oracle.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oracle
|
|
3
|
-
description: "Independently review plans when the user requests it and
|
|
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
|
|
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
|
|
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-
|
|
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
|
|
31
|
-
- thoth-agents:librarian: external evidence
|
|
32
|
-
- thoth-agents:oracle: review
|
|
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,
|
|
47
|
-
- Direct
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
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
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
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
|
|
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
|
|
71
|
-
- Feed
|
|
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
|
-
-
|
|
76
|
-
- Preserve a
|
|
77
|
-
- Follow
|
|
78
|
-
- `openspec/` remains canonical; do not mirror SDD
|
|
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
|
-
-
|
|
83
|
-
- Root owns
|
|
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>
|