thoth-agents 0.4.2 → 0.5.1
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/LICENSE +30 -0
- package/README.md +86 -58
- package/dist/agents/prompt-sections.d.ts +5 -3
- package/dist/agents/prompt-utils.d.ts +1 -1
- package/dist/agents/worker.d.ts +2 -0
- package/dist/{chunk-STCURXAQ.js → chunk-MRFCA3U2.js} +33 -67
- package/dist/{chunk-EFGSGPYM.js → chunk-OW6I7ZUU.js} +391 -416
- package/dist/chunk-V7HSGRMB.js +1016 -0
- package/dist/{chunk-WCLUZZHI.js → chunk-VUNYH263.js} +1580 -351
- package/dist/cli/claude-code-paths.d.ts +2 -2
- package/dist/cli/codex-install.d.ts +5 -2
- package/dist/cli/codex-paths.d.ts +2 -2
- package/dist/cli/index.js +47 -11
- package/dist/cli/operations/pi.d.ts +1 -0
- package/dist/cli/pi-effort.d.ts +1 -1
- package/dist/cli/pi-external-package.d.ts +24 -0
- package/dist/cli/pi-git-source.d.ts +1 -0
- package/dist/cli/pi-install.d.ts +92 -15
- package/dist/cli/pi-managed-write.d.ts +3 -0
- package/dist/cli/pi-model-config.d.ts +17 -0
- package/dist/cli/pi-native-probe.d.ts +2 -0
- package/dist/cli/pi-paths.d.ts +2 -0
- package/dist/cli/pi-resources.d.ts +3 -1
- package/dist/cli/pi-tool-config.d.ts +32 -0
- package/dist/cli/tui/index.js +3 -3
- package/dist/cli/types.d.ts +2 -0
- package/dist/config/constants.d.ts +4 -8
- package/dist/config/schema.d.ts +7 -36
- package/dist/harness/adapters/claude-code.d.ts +2 -4
- package/dist/harness/core/agent-pack.d.ts +52 -42
- package/dist/harness/core/memory-governance.d.ts +2 -2
- package/dist/harness/core/sdd.d.ts +159 -319
- package/dist/harness/writers/pi-agent.d.ts +3 -1
- package/dist/index.js +12 -6
- package/dist/pi/tools-panel.d.ts +51 -0
- package/dist/pi.d.ts +44 -2
- package/dist/pi.js +471 -9
- package/dist/utils/subprocess.d.ts +1 -0
- package/package.json +23 -6
- package/pi/.thoth-agents-assets.json +5 -6
- package/pi/agents/thoth-designer.md +23 -8
- package/pi/agents/thoth-explorer.md +29 -9
- package/pi/agents/thoth-librarian.md +30 -8
- package/pi/agents/thoth-oracle.md +18 -10
- package/pi/agents/thoth-worker.md +96 -0
- package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +7 -12
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/.codex-plugin/plugin.json +2 -2
- package/plugin/agents/designer.md +13 -5
- package/plugin/agents/explorer.md +16 -5
- package/plugin/agents/librarian.md +15 -4
- package/plugin/agents/oracle.md +13 -7
- package/plugin/agents/orchestrator.md +82 -91
- package/plugin/agents/worker.md +76 -0
- package/plugin/skills/plan-reviewer/SKILL.md +39 -141
- package/plugin/skills/thoth-archive/SKILL.md +50 -47
- package/plugin/skills/thoth-archive/scripts/archive.mjs +287 -654
- package/plugin/skills/thoth-constitution/SKILL.md +23 -42
- package/plugin/skills/thoth-constitution/templates/constitution.md +54 -44
- package/plugin/skills/thoth-init/SKILL.md +19 -29
- package/plugin/skills/thoth-init/scripts/init.mjs +73 -66
- package/plugin/skills/thoth-sdd/SKILL.md +164 -117
- package/plugin/skills/thoth-sdd/references/phases/checklist.md +2 -22
- package/plugin/skills/thoth-sdd/references/phases/clarify.md +14 -12
- package/plugin/skills/thoth-sdd/references/phases/converge.md +2 -13
- package/plugin/skills/thoth-sdd/references/phases/explore.md +3 -8
- package/plugin/skills/thoth-sdd/references/phases/implement.md +58 -57
- package/plugin/skills/thoth-sdd/references/phases/plan.md +2 -18
- package/plugin/skills/thoth-sdd/references/phases/specify.md +2 -33
- package/plugin/skills/thoth-sdd/references/phases/tasks.md +4 -45
- package/plugin/skills/thoth-sdd/references/phases/verify.md +4 -22
- package/plugin/skills/thoth-sdd/scripts/validate.mjs +610 -1232
- package/plugin/skills/thoth-sdd/templates/change.md +94 -0
- package/skills/README.md +11 -13
- package/skills/plan-reviewer/SKILL.md +39 -141
- package/skills/thoth-archive/SKILL.md +50 -47
- package/skills/thoth-archive/scripts/archive.mjs +287 -654
- package/skills/thoth-constitution/SKILL.md +23 -42
- package/skills/thoth-constitution/templates/constitution.md +54 -44
- package/skills/thoth-init/SKILL.md +19 -29
- package/skills/thoth-init/scripts/init.mjs +73 -66
- package/skills/thoth-sdd/SKILL.md +164 -117
- package/skills/thoth-sdd/references/phases/checklist.md +2 -22
- package/skills/thoth-sdd/references/phases/clarify.md +14 -12
- package/skills/thoth-sdd/references/phases/converge.md +2 -13
- package/skills/thoth-sdd/references/phases/explore.md +3 -8
- package/skills/thoth-sdd/references/phases/implement.md +58 -57
- package/skills/thoth-sdd/references/phases/plan.md +2 -18
- package/skills/thoth-sdd/references/phases/specify.md +2 -33
- package/skills/thoth-sdd/references/phases/tasks.md +4 -45
- package/skills/thoth-sdd/references/phases/verify.md +4 -22
- package/skills/thoth-sdd/scripts/validate.mjs +610 -1232
- package/skills/thoth-sdd/templates/change.md +94 -0
- package/thoth-agents.schema.json +9 -77
- package/dist/agents/deep.d.ts +0 -2
- package/dist/agents/quick.d.ts +0 -2
- package/dist/chunk-2U5MBLLV.js +0 -312
- package/pi/agents/thoth-deep.md +0 -81
- package/pi/agents/thoth-quick.md +0 -81
- package/plugin/agents/deep.md +0 -68
- package/plugin/agents/quick.md +0 -68
- package/plugin/skills/plan-reviewer/templates/plan-review.md +0 -65
- package/plugin/skills/thoth-sdd/templates/archive-report.md +0 -25
- package/plugin/skills/thoth-sdd/templates/checklist.md +0 -27
- package/plugin/skills/thoth-sdd/templates/plan.md +0 -46
- package/plugin/skills/thoth-sdd/templates/spec.md +0 -62
- package/plugin/skills/thoth-sdd/templates/tasks.md +0 -58
- package/plugin/skills/thoth-sdd/templates/verify-report.md +0 -28
- package/skills/plan-reviewer/templates/plan-review.md +0 -65
- package/skills/thoth-sdd/templates/archive-report.md +0 -25
- package/skills/thoth-sdd/templates/checklist.md +0 -27
- package/skills/thoth-sdd/templates/plan.md +0 -46
- package/skills/thoth-sdd/templates/spec.md +0 -62
- package/skills/thoth-sdd/templates/tasks.md +0 -58
- package/skills/thoth-sdd/templates/verify-report.md +0 -28
|
@@ -10,14 +10,12 @@ export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS: {
|
|
|
10
10
|
readonly librarian: "sonnet";
|
|
11
11
|
readonly oracle: "opus";
|
|
12
12
|
readonly designer: "sonnet";
|
|
13
|
-
readonly
|
|
14
|
-
readonly deep: "sonnet";
|
|
13
|
+
readonly worker: "sonnet";
|
|
15
14
|
};
|
|
16
15
|
export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_EFFORTS: {
|
|
17
16
|
readonly explorer: "low";
|
|
18
|
-
readonly quick: "low";
|
|
19
17
|
readonly designer: "medium";
|
|
20
|
-
readonly
|
|
18
|
+
readonly worker: "medium";
|
|
21
19
|
readonly librarian: "high";
|
|
22
20
|
readonly oracle: "high";
|
|
23
21
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type AgentRoleName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | '
|
|
1
|
+
export type AgentRoleName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'worker';
|
|
2
2
|
export type AgentMutationMode = 'adaptive-root' | 'read-only' | 'write-capable';
|
|
3
|
-
export type AgentDispatchMethod = 'root-coordinator' | 'task'
|
|
3
|
+
export type AgentDispatchMethod = 'root-coordinator' | 'task';
|
|
4
4
|
export interface AgentRoleContract {
|
|
5
5
|
name: AgentRoleName;
|
|
6
6
|
mode: AgentMutationMode;
|
|
@@ -23,7 +23,7 @@ export interface OrchestrationPolicy {
|
|
|
23
23
|
specialistDirectory: SpecialistDecision[];
|
|
24
24
|
rules: string[];
|
|
25
25
|
}
|
|
26
|
-
export type TaskShapingStep = 'bound-
|
|
26
|
+
export type TaskShapingStep = 'bound-units' | 'map-output-dependencies' | 'assign-ownership' | 'select-specialists' | 'admit-ready-units' | 'dispatch-to-native-capacity' | 'wait-for-native-terminal-event' | 'accept-results' | 'refill-capacity';
|
|
27
27
|
export interface TaskShapingPolicy {
|
|
28
28
|
steps: TaskShapingStep[];
|
|
29
29
|
nativeAuthority: boolean;
|
|
@@ -31,7 +31,13 @@ export interface TaskShapingPolicy {
|
|
|
31
31
|
decisions: {
|
|
32
32
|
dependency: string;
|
|
33
33
|
ownershipConflict: string;
|
|
34
|
-
|
|
34
|
+
unitOutcome: string;
|
|
35
|
+
unitEnvelope: string;
|
|
36
|
+
phaseSplitting: string;
|
|
37
|
+
independentDiscovery: string;
|
|
38
|
+
scopeGrowth: string;
|
|
39
|
+
readyDispatch: string;
|
|
40
|
+
refill: string;
|
|
35
41
|
terminalEvidence: string;
|
|
36
42
|
degradation: string;
|
|
37
43
|
};
|
|
@@ -41,34 +47,42 @@ export interface SpecialistDecision {
|
|
|
41
47
|
selectWhen: string;
|
|
42
48
|
rejectWhen: string;
|
|
43
49
|
}
|
|
44
|
-
export type ImplementationOwner = 'orchestrator' | 'designer' | '
|
|
50
|
+
export type ImplementationOwner = 'orchestrator' | 'designer' | 'worker';
|
|
45
51
|
export interface ImplementationOwnershipPolicy {
|
|
46
52
|
eligibleOwners: ImplementationOwner[];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
workflowIndependent: boolean;
|
|
54
|
+
defaultImplementationOwner: 'specialist';
|
|
55
|
+
rootIdentity: string;
|
|
56
|
+
defaultRule: string;
|
|
57
|
+
rootResponsibilities: string[];
|
|
58
|
+
discovery: string[];
|
|
59
|
+
directConsultation: string[];
|
|
60
|
+
directException: string[];
|
|
61
|
+
writerRouting: string[];
|
|
62
|
+
evidenceHandling: string[];
|
|
63
|
+
delegationFailure: string[];
|
|
50
64
|
userDirection: string;
|
|
51
65
|
insufficientSignals: string[];
|
|
52
66
|
}
|
|
53
67
|
export interface AgentPackContract {
|
|
54
68
|
roles: AgentRoleContract[];
|
|
55
69
|
orchestrationPolicy: OrchestrationPolicy;
|
|
56
|
-
returnContract: string[]
|
|
70
|
+
returnContract: Record<AgentRoleName, string[]>;
|
|
57
71
|
verificationProtocol: string[];
|
|
58
72
|
}
|
|
59
|
-
export declare const AGENT_ROLE_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "
|
|
73
|
+
export declare const AGENT_ROLE_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "worker"];
|
|
60
74
|
export declare const AGENT_ROLES: readonly [{
|
|
61
75
|
readonly name: "orchestrator";
|
|
62
76
|
readonly mode: "adaptive-root";
|
|
63
77
|
readonly dispatch: "root-coordinator";
|
|
64
78
|
readonly canMutateWorkspace: true;
|
|
65
|
-
readonly scope: "
|
|
66
|
-
readonly responsibility: "
|
|
67
|
-
readonly useWhen: ["Coordinate
|
|
79
|
+
readonly scope: "human agreement, SDD coordination, bounded direct exceptions, decisions, and synthesis";
|
|
80
|
+
readonly responsibility: "Coordinate goals, decisions, acceptance, and synthesis under the specialist-default implementation-ownership policy; direct work is limited to its bounded exceptions and explicit user instructions.";
|
|
81
|
+
readonly useWhen: ["Coordinate goals, constraints, decisions, governed artifacts, routing, acceptance, and synthesis.", "Retain reviewed commits and known low-risk mechanical operations; honor explicit direct-work or no-delegation instructions.", "Consult a known source for one bounded question or make a minimal authorized low-risk edit only when source, scope, and verification are known and no discovery or independent judgment is needed."];
|
|
68
82
|
readonly doNotUseWhen: ["Not for independent plan review or Oracle-required final verification."];
|
|
69
|
-
readonly escalateWhen: ["
|
|
70
|
-
readonly toolGovernance: ["may inspect and edit the accepted bounded implementation surface
|
|
71
|
-
readonly verification: ["runs focused checks for trivial deterministic
|
|
83
|
+
readonly escalateWhen: ["Reassess ownership when actual uncertainty, scope, or risk increases, not because another search is needed; never override explicit no-delegation instructions."];
|
|
84
|
+
readonly toolGovernance: ["may inspect and edit the accepted bounded implementation surface and may verify trivial deterministic work without self-approval", "loads the matching thoth-sdd phase guidance on demand instead of carrying every phase protocol in its prompt", "owns proportional understanding, classification, one ID-named substantial-change record, semantic acceptance, and active .thoth/ work evidence", "uses the bounded implementation-ownership exceptions for reviewed commits and known low-risk mechanical work", "keeps requirements, decisions, and final synthesis in the root thread"];
|
|
85
|
+
readonly verification: ["runs focused checks for trivial deterministic work while final verification remains mandatory", "delegates selected focused plan review plus artifact-backed and material-risk final verification to a fresh oracle", "consolidates summarized evidence returned by child agents"];
|
|
72
86
|
}, {
|
|
73
87
|
readonly name: "explorer";
|
|
74
88
|
readonly mode: "read-only";
|
|
@@ -76,7 +90,7 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
76
90
|
readonly canMutateWorkspace: false;
|
|
77
91
|
readonly scope: "local repository discovery";
|
|
78
92
|
readonly responsibility: "Resolve broad or uncertain repository questions and return distilled evidence.";
|
|
79
|
-
readonly useWhen: ["
|
|
93
|
+
readonly useWhen: ["Local source, effective flow, responsibility, repository ownership, or behavior is unknown or uncertain."];
|
|
80
94
|
readonly doNotUseWhen: ["Not for implementation, edits, or known narrow questions."];
|
|
81
95
|
readonly escalateWhen: ["Send external evidence to librarian and mutation scope to root."];
|
|
82
96
|
readonly toolGovernance: ["uses read, search, and code-navigation tools only", "does not mutate files or delegate further"];
|
|
@@ -96,11 +110,11 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
96
110
|
}, {
|
|
97
111
|
readonly name: "oracle";
|
|
98
112
|
readonly mode: "read-only";
|
|
99
|
-
readonly dispatch: "
|
|
113
|
+
readonly dispatch: "task";
|
|
100
114
|
readonly canMutateWorkspace: false;
|
|
101
|
-
readonly scope: "diagnosis, architecture, optional plan review, and independent verification";
|
|
102
|
-
readonly responsibility: "Independently review plans when
|
|
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."];
|
|
115
|
+
readonly scope: "diagnosis, architecture, optional focused plan review, and independent verification";
|
|
116
|
+
readonly responsibility: "Independently review plans when selected and provide independent judgment for artifact-backed or material-risk final verification, exposing correctness risks and judging whether results satisfy their contracts.";
|
|
117
|
+
readonly useWhen: ["Selected focused plan review, persistent diagnosis, material architecture or security risk, contradictory evidence, high failure cost, or artifact-backed final verification needs independent judgment."];
|
|
104
118
|
readonly doNotUseWhen: ["Not for implementation, mutation, persistence, or self-review."];
|
|
105
119
|
readonly escalateWhen: ["Return blockers and remediation anchors to root."];
|
|
106
120
|
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"];
|
|
@@ -108,42 +122,38 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
108
122
|
}, {
|
|
109
123
|
readonly name: "designer";
|
|
110
124
|
readonly mode: "write-capable";
|
|
111
|
-
readonly dispatch: "
|
|
125
|
+
readonly dispatch: "task";
|
|
112
126
|
readonly canMutateWorkspace: true;
|
|
113
127
|
readonly scope: "UI/UX decisions, implementation, and visual verification";
|
|
114
128
|
readonly responsibility: "Own user-facing implementation choices and visual quality for UI work.";
|
|
115
129
|
readonly useWhen: ["User-facing UI/UX, interaction, accessibility, or visual quality is material."];
|
|
116
130
|
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
|
|
131
|
+
readonly escalateWhen: ["Escalate coupled contracts, migrations, or high risk to worker."];
|
|
118
132
|
readonly toolGovernance: ["may edit focused UI/UX files", "owns screenshots and visual QA", "does not delegate further"];
|
|
119
133
|
readonly verification: ["includes visual verification when applicable"];
|
|
120
134
|
}, {
|
|
121
|
-
readonly name: "
|
|
122
|
-
readonly mode: "write-capable";
|
|
123
|
-
readonly dispatch: "synchronous-task-only";
|
|
124
|
-
readonly canMutateWorkspace: true;
|
|
125
|
-
readonly scope: "fast bounded implementation";
|
|
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."];
|
|
130
|
-
readonly toolGovernance: ["edits only bounded targets", "escalates when discovery or correctness risk exceeds the assignment", "does not delegate further"];
|
|
131
|
-
readonly verification: ["runs the smallest sufficient focused check"];
|
|
132
|
-
}, {
|
|
133
|
-
readonly name: "deep";
|
|
135
|
+
readonly name: "worker";
|
|
134
136
|
readonly mode: "write-capable";
|
|
135
|
-
readonly dispatch: "
|
|
137
|
+
readonly dispatch: "task";
|
|
136
138
|
readonly canMutateWorkspace: true;
|
|
137
|
-
readonly scope: "
|
|
138
|
-
readonly responsibility: "Handle multi-file, edge-case-heavy, or high-risk
|
|
139
|
-
readonly useWhen: ["
|
|
140
|
-
readonly doNotUseWhen: ["Not for visual-only work or
|
|
139
|
+
readonly scope: "bounded nonvisual implementation and verification";
|
|
140
|
+
readonly responsibility: "Handle bounded nonvisual implementation with full local context, including exact low-risk edits and correctness-critical, multi-file, edge-case-heavy, or high-risk work.";
|
|
141
|
+
readonly useWhen: ["Known bounded nonvisual implementation is ready, regardless of complexity; root direct work is limited to the bounded implementation-ownership exceptions.", "Correctness-critical work may be multi-file, edge-case-heavy, migration, concurrency, shared-contract, or high-risk."];
|
|
142
|
+
readonly doNotUseWhen: ["Not for visual-only work, reviewed commits, or work explicitly retained by the user in root."];
|
|
141
143
|
readonly escalateWhen: ["Return product or architecture choices to root."];
|
|
142
144
|
readonly toolGovernance: ["may edit implementation and tests within the assigned surface", "validates shared behavior against related code and call sites", "does not delegate further"];
|
|
143
145
|
readonly verification: ["reports focused checks and relevant edge-case evidence"];
|
|
144
146
|
}];
|
|
147
|
+
export declare function getImplementationOwnershipInstructions(policy: ImplementationOwnershipPolicy): string[];
|
|
145
148
|
export declare const ORCHESTRATION_POLICY: OrchestrationPolicy;
|
|
146
|
-
export declare const AGENT_RETURN_CONTRACT:
|
|
149
|
+
export declare const AGENT_RETURN_CONTRACT: {
|
|
150
|
+
readonly orchestrator: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
|
|
151
|
+
readonly explorer: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions"];
|
|
152
|
+
readonly librarian: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions"];
|
|
153
|
+
readonly oracle: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
|
|
154
|
+
readonly designer: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
|
|
155
|
+
readonly worker: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
|
|
156
|
+
};
|
|
147
157
|
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."];
|
|
148
158
|
export declare const AGENT_PACK_CONTRACT: AgentPackContract;
|
|
149
159
|
export declare function getAgentRole(name: AgentRoleName): AgentRoleContract;
|
|
@@ -21,8 +21,8 @@ export interface MemoryOrchestrationContract {
|
|
|
21
21
|
provider: 'thoth-mem';
|
|
22
22
|
providerOwnership: 'external';
|
|
23
23
|
installedGuidance: 'thoth-mem skill';
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
canonicalWorkStore: '.thoth/';
|
|
25
|
+
prohibitsWorkArtifactMirroring: true;
|
|
26
26
|
requiresParentAuthorization: true;
|
|
27
27
|
rootLifecycleOwner: 'orchestrator';
|
|
28
28
|
handoffOutcome: 'bounded-memory-contract';
|