thoth-agents 0.3.10 → 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-TKIDBRM3.js → chunk-5UBJB5QO.js} +4 -1
- package/dist/{chunk-M2WF46BP.js → chunk-DX4U3AD3.js} +387 -231
- package/dist/{chunk-JBG7XMIG.js → chunk-VPVBYBPU.js} +602 -180
- 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/config/constants.d.ts +3 -3
- package/dist/harness/adapters/claude-code.d.ts +8 -0
- package/dist/harness/adapters/codex-surfaces.d.ts +2 -2
- package/dist/harness/core/agent-pack.d.ts +60 -5
- package/dist/harness/core/sdd.d.ts +32 -19
- 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 +7 -7
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/agents/deep.md +10 -31
- package/plugin/agents/designer.md +10 -31
- package/plugin/agents/explorer.md +10 -30
- package/plugin/agents/librarian.md +10 -30
- package/plugin/agents/oracle.md +11 -31
- package/plugin/agents/orchestrator.md +48 -35
- package/plugin/agents/quick.md +10 -31
- package/plugin/skills/plan-reviewer/SKILL.md +54 -15
- package/plugin/skills/thoth-archive/SKILL.md +5 -0
- package/plugin/skills/thoth-archive/scripts/archive.mjs +30 -10
- 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 +48 -11
- package/plugin/skills/thoth-sdd/references/phases/implement.md +44 -6
- 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-archive/scripts/archive.mjs +30 -10
- 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 +48 -11
- package/skills/thoth-sdd/references/phases/implement.md +44 -6
- 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";
|
|
@@ -11,11 +11,11 @@ export declare const CONFIRMED_OPENAI_SUBAGENT_PRESET: {
|
|
|
11
11
|
};
|
|
12
12
|
readonly librarian: {
|
|
13
13
|
readonly model: "gpt-5.6-luna";
|
|
14
|
-
readonly effort: "
|
|
14
|
+
readonly effort: "high";
|
|
15
15
|
};
|
|
16
16
|
readonly oracle: {
|
|
17
17
|
readonly model: "gpt-5.6-sol";
|
|
18
|
-
readonly effort: "
|
|
18
|
+
readonly effort: "high";
|
|
19
19
|
};
|
|
20
20
|
readonly designer: {
|
|
21
21
|
readonly model: "gpt-5.6-sol";
|
|
@@ -23,7 +23,7 @@ export declare const CONFIRMED_OPENAI_SUBAGENT_PRESET: {
|
|
|
23
23
|
};
|
|
24
24
|
readonly quick: {
|
|
25
25
|
readonly model: "gpt-5.6-luna";
|
|
26
|
-
readonly effort: "
|
|
26
|
+
readonly effort: "low";
|
|
27
27
|
};
|
|
28
28
|
readonly deep: {
|
|
29
29
|
readonly model: "gpt-5.6-sol";
|
|
@@ -13,6 +13,14 @@ export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS: {
|
|
|
13
13
|
readonly quick: "haiku";
|
|
14
14
|
readonly deep: "sonnet";
|
|
15
15
|
};
|
|
16
|
+
export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_EFFORTS: {
|
|
17
|
+
readonly explorer: "low";
|
|
18
|
+
readonly quick: "low";
|
|
19
|
+
readonly designer: "medium";
|
|
20
|
+
readonly deep: "medium";
|
|
21
|
+
readonly librarian: "high";
|
|
22
|
+
readonly oracle: "high";
|
|
23
|
+
};
|
|
16
24
|
/**
|
|
17
25
|
* The orchestrator system prompt body. This is the system prompt of the
|
|
18
26
|
* `orchestrator` plugin agent, which the plugin `settings.json` activates as the
|
|
@@ -170,9 +170,9 @@ export declare const CODEX_SURFACES: readonly [{
|
|
|
170
170
|
readonly id: "per-agent-runtime-permissions";
|
|
171
171
|
readonly target: "permission-control";
|
|
172
172
|
readonly status: "unsupported";
|
|
173
|
-
readonly fields: ["
|
|
173
|
+
readonly fields: ["conditional agent_type selection", "role-prefixed fallback", "per-role permission enforcement", "per-agent tool allow/deny equivalent to OpenCode permissions"];
|
|
174
174
|
readonly diagnosticCode: "codex.permission.memory.enforcement_gap";
|
|
175
|
-
readonly summary: "
|
|
175
|
+
readonly summary: "Static packages cannot guarantee active-runtime named-role selection: use collaboration.spawn_agent agent_type when exposed, otherwise the bounded role-prefixed fallback is instruction-only; per-role permission enforcement and OpenCode-style MCP/tool deny maps are not validated.";
|
|
176
176
|
readonly evidence: "Codex approvals/security docs cover sandbox and approval policies, not exact OpenCode per-agent permission maps.";
|
|
177
177
|
readonly fallback: "instruction-only";
|
|
178
178
|
}, {
|
|
@@ -8,6 +8,9 @@ export interface AgentRoleContract {
|
|
|
8
8
|
canMutateWorkspace: boolean;
|
|
9
9
|
scope: string;
|
|
10
10
|
responsibility: string;
|
|
11
|
+
useWhen: string[];
|
|
12
|
+
doNotUseWhen: string[];
|
|
13
|
+
escalateWhen: string[];
|
|
11
14
|
writeScope?: string[];
|
|
12
15
|
toolGovernance: string[];
|
|
13
16
|
verification: string[];
|
|
@@ -15,8 +18,38 @@ export interface AgentRoleContract {
|
|
|
15
18
|
export interface OrchestrationPolicy {
|
|
16
19
|
maxDelegationDepth: number;
|
|
17
20
|
singleWriter: boolean;
|
|
21
|
+
implementationOwnership: ImplementationOwnershipPolicy;
|
|
22
|
+
taskShaping: TaskShapingPolicy;
|
|
23
|
+
specialistDirectory: SpecialistDecision[];
|
|
18
24
|
rules: string[];
|
|
19
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
|
+
}
|
|
44
|
+
export type ImplementationOwner = 'orchestrator' | 'designer' | 'quick' | 'deep';
|
|
45
|
+
export interface ImplementationOwnershipPolicy {
|
|
46
|
+
eligibleOwners: ImplementationOwner[];
|
|
47
|
+
routeIndependent: boolean;
|
|
48
|
+
delegationBenefits: string[];
|
|
49
|
+
rootContinuityBenefits: string[];
|
|
50
|
+
userDirection: string;
|
|
51
|
+
insufficientSignals: string[];
|
|
52
|
+
}
|
|
20
53
|
export interface AgentPackContract {
|
|
21
54
|
roles: AgentRoleContract[];
|
|
22
55
|
orchestrationPolicy: OrchestrationPolicy;
|
|
@@ -29,10 +62,13 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
29
62
|
readonly mode: "adaptive-root";
|
|
30
63
|
readonly dispatch: "root-coordinator";
|
|
31
64
|
readonly canMutateWorkspace: true;
|
|
32
|
-
readonly scope: "requirements, SDD coordination, routing, bounded
|
|
33
|
-
readonly responsibility: "Keep
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
65
|
+
readonly scope: "requirements, SDD coordination, routing, bounded implementation, decisions, and synthesis";
|
|
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.";
|
|
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."];
|
|
68
|
+
readonly doNotUseWhen: ["Not for independent plan review or Oracle-required final verification."];
|
|
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."];
|
|
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"];
|
|
36
72
|
}, {
|
|
37
73
|
readonly name: "explorer";
|
|
38
74
|
readonly mode: "read-only";
|
|
@@ -40,6 +76,9 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
40
76
|
readonly canMutateWorkspace: false;
|
|
41
77
|
readonly scope: "local repository discovery";
|
|
42
78
|
readonly responsibility: "Resolve broad or uncertain repository questions and return distilled evidence.";
|
|
79
|
+
readonly useWhen: ["Repository ownership or behavior is broad or uncertain."];
|
|
80
|
+
readonly doNotUseWhen: ["Not for implementation, edits, or known narrow questions."];
|
|
81
|
+
readonly escalateWhen: ["Send external evidence to librarian and mutation scope to root."];
|
|
43
82
|
readonly toolGovernance: ["uses read, search, and code-navigation tools only", "does not mutate files or delegate further"];
|
|
44
83
|
readonly verification: ["reports inspected paths, confidence, and remaining gaps"];
|
|
45
84
|
}, {
|
|
@@ -49,6 +88,9 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
49
88
|
readonly canMutateWorkspace: false;
|
|
50
89
|
readonly scope: "authoritative external research with local confirmation when needed";
|
|
51
90
|
readonly responsibility: "Gather current authoritative evidence and separate documented facts from inference.";
|
|
91
|
+
readonly useWhen: ["Current authoritative external evidence is required."];
|
|
92
|
+
readonly doNotUseWhen: ["Not for implementation, edits, or purely local discovery."];
|
|
93
|
+
readonly escalateWhen: ["Report contradictory or insufficient sources to root."];
|
|
52
94
|
readonly toolGovernance: ["uses research and read-only local tools", "does not mutate files or delegate further"];
|
|
53
95
|
readonly verification: ["provides direct sources for substantive external claims"];
|
|
54
96
|
}, {
|
|
@@ -57,7 +99,10 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
57
99
|
readonly dispatch: "synchronous-task-only";
|
|
58
100
|
readonly canMutateWorkspace: false;
|
|
59
101
|
readonly scope: "diagnosis, architecture, optional plan review, and independent verification";
|
|
60
|
-
readonly responsibility: "Independently review plans when the user requests it and
|
|
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."];
|
|
104
|
+
readonly doNotUseWhen: ["Not for implementation, mutation, persistence, or self-review."];
|
|
105
|
+
readonly escalateWhen: ["Return blockers and remediation anchors to root."];
|
|
61
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"];
|
|
62
107
|
readonly verification: ["separates observations, risks, and recommendations"];
|
|
63
108
|
}, {
|
|
@@ -67,6 +112,9 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
67
112
|
readonly canMutateWorkspace: true;
|
|
68
113
|
readonly scope: "UI/UX decisions, implementation, and visual verification";
|
|
69
114
|
readonly responsibility: "Own user-facing implementation choices and visual quality for UI work.";
|
|
115
|
+
readonly useWhen: ["User-facing UI/UX, interaction, accessibility, or visual quality is material."];
|
|
116
|
+
readonly doNotUseWhen: ["Not for backend-only, non-visual, or correctness-heavy cross-cutting work."];
|
|
117
|
+
readonly escalateWhen: ["Escalate coupled contracts, migrations, or high risk to deep."];
|
|
70
118
|
readonly toolGovernance: ["may edit focused UI/UX files", "owns screenshots and visual QA", "does not delegate further"];
|
|
71
119
|
readonly verification: ["includes visual verification when applicable"];
|
|
72
120
|
}, {
|
|
@@ -76,6 +124,9 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
76
124
|
readonly canMutateWorkspace: true;
|
|
77
125
|
readonly scope: "fast bounded implementation";
|
|
78
126
|
readonly responsibility: "Implement narrow, clear, low-risk changes within an explicitly bounded surface.";
|
|
127
|
+
readonly useWhen: ["Known narrow mechanical low-risk work has exact targets."];
|
|
128
|
+
readonly doNotUseWhen: ["Not for coupled contracts, migrations, broad discovery, concurrency, edge cases, or high risk."];
|
|
129
|
+
readonly escalateWhen: ["Escalate discovery, coupling, edge cases, or higher risk to deep."];
|
|
79
130
|
readonly toolGovernance: ["edits only bounded targets", "escalates when discovery or correctness risk exceeds the assignment", "does not delegate further"];
|
|
80
131
|
readonly verification: ["runs the smallest sufficient focused check"];
|
|
81
132
|
}, {
|
|
@@ -85,6 +136,9 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
85
136
|
readonly canMutateWorkspace: true;
|
|
86
137
|
readonly scope: "correctness-critical implementation and verification";
|
|
87
138
|
readonly responsibility: "Handle multi-file, edge-case-heavy, or high-risk implementation with full local context.";
|
|
139
|
+
readonly useWhen: ["Implementation is multi-file, edge-case-heavy, migration, concurrency, shared-contract, or high-risk."];
|
|
140
|
+
readonly doNotUseWhen: ["Not for visual-only work or narrow known low-risk edits."];
|
|
141
|
+
readonly escalateWhen: ["Return product or architecture choices to root."];
|
|
88
142
|
readonly toolGovernance: ["may edit implementation and tests within the assigned surface", "validates shared behavior against related code and call sites", "does not delegate further"];
|
|
89
143
|
readonly verification: ["reports focused checks and relevant edge-case evidence"];
|
|
90
144
|
}];
|
|
@@ -93,4 +147,5 @@ export declare const AGENT_RETURN_CONTRACT: readonly ["conclusion", "evidence",
|
|
|
93
147
|
export declare const VERIFICATION_PROTOCOL: readonly ["Completion reports identify changed files and verification evidence.", "Behavior changes receive the smallest sufficient automated check or a declared manual check.", "Visual changes receive designer-owned visual QA when applicable."];
|
|
94
148
|
export declare const AGENT_PACK_CONTRACT: AgentPackContract;
|
|
95
149
|
export declare function getAgentRole(name: AgentRoleName): AgentRoleContract;
|
|
150
|
+
export declare function renderAgentRoutingDescription(role: AgentRoleContract): string;
|
|
96
151
|
export declare function getAgentPackContract(): AgentPackContract;
|
|
@@ -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,6 +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';
|
|
35
|
+
export type SddPhaseOwner = AgentRoleName | 'adaptive-implementation' | 'adaptive-verification';
|
|
27
36
|
export interface SddPhaseContract {
|
|
28
37
|
id: SddPhaseId;
|
|
29
38
|
order: number;
|
|
@@ -32,7 +41,7 @@ export interface SddPhaseContract {
|
|
|
32
41
|
activation: SddPhaseActivation;
|
|
33
42
|
prerequisites: SddPhaseId[];
|
|
34
43
|
producesArtifact: boolean;
|
|
35
|
-
defaultAgentRole:
|
|
44
|
+
defaultAgentRole: SddPhaseOwner;
|
|
36
45
|
eligibleAgentRoles: AgentRoleName[];
|
|
37
46
|
reason: string;
|
|
38
47
|
condition?: string;
|
|
@@ -160,8 +169,8 @@ export declare const SDD_PHASES: readonly [{
|
|
|
160
169
|
readonly producesArtifact: true;
|
|
161
170
|
readonly defaultAgentRole: "oracle";
|
|
162
171
|
readonly eligibleAgentRoles: ["oracle"];
|
|
163
|
-
readonly reason: "Offer independent blocker-only plan review
|
|
164
|
-
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.";
|
|
165
174
|
}, {
|
|
166
175
|
readonly id: "implement";
|
|
167
176
|
readonly order: 7;
|
|
@@ -170,9 +179,9 @@ export declare const SDD_PHASES: readonly [{
|
|
|
170
179
|
readonly activation: "required";
|
|
171
180
|
readonly prerequisites: ["tasks"];
|
|
172
181
|
readonly producesArtifact: false;
|
|
173
|
-
readonly defaultAgentRole: "
|
|
182
|
+
readonly defaultAgentRole: "adaptive-implementation";
|
|
174
183
|
readonly eligibleAgentRoles: ["orchestrator", "designer", "quick", "deep"];
|
|
175
|
-
readonly reason: "
|
|
184
|
+
readonly reason: "Choose root, designer, quick, or deep from task-shaped net gain independently from the SDD route.";
|
|
176
185
|
}, {
|
|
177
186
|
readonly id: "verify";
|
|
178
187
|
readonly order: 8;
|
|
@@ -181,9 +190,9 @@ export declare const SDD_PHASES: readonly [{
|
|
|
181
190
|
readonly activation: "required";
|
|
182
191
|
readonly prerequisites: ["implement"];
|
|
183
192
|
readonly producesArtifact: true;
|
|
184
|
-
readonly defaultAgentRole: "
|
|
185
|
-
readonly eligibleAgentRoles: ["oracle"];
|
|
186
|
-
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.";
|
|
187
196
|
}, {
|
|
188
197
|
readonly id: "converge";
|
|
189
198
|
readonly order: 9;
|
|
@@ -356,32 +365,32 @@ export declare const SDD_PHASE_PROTOCOLS: readonly [{
|
|
|
356
365
|
readonly outputSchema: ["tasks.md path", "requirement coverage", "dependency order"];
|
|
357
366
|
readonly doneWhen: ["Every FR and buildable SC has executable task coverage and every task has a verification step."];
|
|
358
367
|
readonly blockingConditions: ["A task requires an unresolved requirement, architecture choice, or hidden prerequisite."];
|
|
359
|
-
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."];
|
|
360
369
|
}, {
|
|
361
370
|
readonly id: "plan-review";
|
|
362
|
-
readonly objective: "Perform the
|
|
363
|
-
readonly requiredInputs: ["spec.md", "plan.md", "tasks.md", "Optional active requirements checklist", "Project constitution", "
|
|
364
|
-
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."];
|
|
365
374
|
readonly allowedWrites: ["None; Oracle is read-only. Root persists plan-review.md when review runs."];
|
|
366
|
-
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"];
|
|
367
376
|
readonly doneWhen: ["Oracle has returned an exact status and every true blocker has a concrete remediation anchor."];
|
|
368
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."];
|
|
369
|
-
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."];
|
|
370
379
|
}, {
|
|
371
380
|
readonly id: "implement";
|
|
372
381
|
readonly objective: "Execute the accepted task slice with one writer and focused verification.";
|
|
373
|
-
readonly requiredInputs: ["User request or assigned tasks.md slice", "Accepted spec.md and plan.md when present", "Exact implementation boundaries and verification commands"];
|
|
374
|
-
readonly instructions: ["The root marks selected artifact-backed tasks [~] before
|
|
382
|
+
readonly requiredInputs: ["User request or assigned tasks.md slice", "Accepted spec.md and plan.md when present", "Exact implementation boundaries and verification commands", "Implementation owner decision (orchestrator, designer, quick, or deep), exact mutable surface, requirement anchors, and task-shape/net-gain rationale"];
|
|
383
|
+
readonly instructions: ["The root marks selected artifact-backed tasks [~] before implementation and marks them [x] only after task-specific evidence is verified; Direct or no-artifact work has no task state.", "The SDD route governs artifacts and gates, not implementation ownership; choose root or a specialist from explicit safe user direction and demonstrated task-shaped net gain.", "When root owns implementation, retain the accepted mutable surface with no child dispatch; when a specialist owns implementation, send one bounded dispatch with the exact surface, requirements, and verification.", "Use test-first or TDD execution for behavior changes and preserve one writer per mutable surface.", "Balance specialization, context isolation, independent work, quality, latency, and total cost against sequential dependency, shared mutable state, accumulated context, rediscovery, and coordination overhead.", "Only after deciding delegation creates net gain, select designer for user-facing UI/UX, quick for known narrow low-risk work, and deep for coupled multi-file, edge-case-heavy, migration, concurrency, shared-contract, or high-risk work.", "Record the owner decision, rationale, exact mutable surface, requirement anchors, and verification before implementation or dispatch.", "Proven independent surfaces may use separate writers with non-overlapping files; overlapping or compatibility-coupled surfaces use one deep writer and ordered handoffs.", "Quick and designer must escalate before expanding into deep-risk or compatibility-coupled scope.", "Edit only the assigned implementation surface and report justified deviations from the accepted plan.", "When evidence refines the same intent, return it to root so canonical artifacts are updated and only affected downstream artifacts and gates are revalidated.", "Start a new change instead of expanding the active one when the intent changes."];
|
|
375
384
|
readonly allowedWrites: ["Assigned product and test files", "Root only: task checkbox transitions in openspec/changes/<feature>/tasks.md; child writers must not edit task state."];
|
|
376
385
|
readonly outputSchema: ["status: completed | partial | failed", "per-task outcome", "files changed", "executed verification and results", "deviations, issues, and remaining work"];
|
|
377
386
|
readonly doneWhen: ["The assigned task slice is complete and its focused checks pass with concrete evidence."];
|
|
378
387
|
readonly blockingConditions: ["A task needs scope expansion, a material unresolved decision, or fails repeatedly without a safe bounded recovery."];
|
|
379
|
-
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."];
|
|
380
389
|
}, {
|
|
381
390
|
readonly id: "verify";
|
|
382
391
|
readonly objective: "Judge the implementation against accepted requirements using executed evidence.";
|
|
383
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"];
|
|
384
|
-
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."];
|
|
385
394
|
readonly allowedWrites: ["Root persistence only: openspec/changes/<feature>/verify-report.md for accelerated and full routes"];
|
|
386
395
|
readonly outputSchema: ["verdict: pass | fail", "compliance matrix", "executed checks and results", "critical issues with remediation anchors", "warnings and residual risks"];
|
|
387
396
|
readonly doneWhen: ["Every accepted requirement is represented in the compliance matrix and the verdict matches the evidence."];
|
|
@@ -418,7 +427,11 @@ export declare function getSddPhaseProtocol(id: SddPhaseId): SddPhaseProtocol;
|
|
|
418
427
|
export declare function getSddPhaseProtocolsForRole(role: AgentRoleName): SddPhaseProtocol[];
|
|
419
428
|
export declare function renderSddPhaseDispatchEnvelope(input: SddPhaseDispatchInput): string;
|
|
420
429
|
export declare function renderSddPhaseDispatchTemplate(): string;
|
|
421
|
-
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;
|
|
422
435
|
export declare function getRequiredSddPhaseOrder(route: SddRoute): SddPhaseId[];
|
|
423
436
|
export declare function canEnterSddPhase({ route, completed, target, }: {
|
|
424
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"
|
|
@@ -9,37 +9,37 @@
|
|
|
9
9
|
{
|
|
10
10
|
"path": "agents/deep.md",
|
|
11
11
|
"kind": "agent-config",
|
|
12
|
-
"sha256": "sha256:
|
|
12
|
+
"sha256": "sha256:f00254f54d1e4226247c3acc1f97d718d200939031ee846cdcad5178f82e2311"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "agents/designer.md",
|
|
16
16
|
"kind": "agent-config",
|
|
17
|
-
"sha256": "sha256:
|
|
17
|
+
"sha256": "sha256:506bddde48c14e39ec40fd940ca0993bd468d484f8d461a14c39acf85e878a20"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "agents/explorer.md",
|
|
21
21
|
"kind": "agent-config",
|
|
22
|
-
"sha256": "sha256:
|
|
22
|
+
"sha256": "sha256:3e622eee39d16224fdb22dd29a06da154e9b21273b1da61590b675f77433e1f3"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"path": "agents/librarian.md",
|
|
26
26
|
"kind": "agent-config",
|
|
27
|
-
"sha256": "sha256:
|
|
27
|
+
"sha256": "sha256:0d95292215a64535e8eabca729f9c4778cdaa8542b2467efe5895d9f082d56cb"
|
|
28
28
|
},
|
|
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",
|
|
41
41
|
"kind": "agent-config",
|
|
42
|
-
"sha256": "sha256:
|
|
42
|
+
"sha256": "sha256:f82b9658bd19576c2ec611f28ea37115f316200cc6d7ffee10d873db8707cc80"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"path": "settings.json",
|
|
@@ -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"
|