thoth-agents 0.1.13 → 0.1.18
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 +7 -0
- package/dist/{chunk-WGFDTUZI.js → chunk-6K3ZXIMC.js} +229 -5
- package/dist/{chunk-SCM2O4TP.js → chunk-SOT5ZY53.js} +2 -2
- package/dist/cli/index.js +2 -2
- package/dist/cli/providers.d.ts +1 -0
- package/dist/cli/tui/index.js +2 -2
- package/dist/config/schema.d.ts +1 -0
- package/dist/harness/core/agent-pack.d.ts +1 -1
- package/dist/harness/core/sdd.d.ts +58 -16
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/skills/_shared/persistence-contract.md +69 -97
- package/src/skills/_shared/thoth-mem-convention.md +40 -61
- package/src/skills/executing-plans/SKILL.md +9 -3
- package/src/skills/plan-reviewer/SKILL.md +8 -0
- package/src/skills/requirements-interview/SKILL.md +21 -8
- package/src/skills/sdd-propose/SKILL.md +16 -4
- package/src/skills/sdd-tasks/SKILL.md +6 -0
- package/src/skills/thoth-mem-agents/SKILL.md +112 -300
- package/thoth-agents.schema.json +3 -0
package/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
<img src="img/team.png" alt="thoth-agents agents" width="420">
|
|
3
3
|
<p><i>Seven specialized agents, one delegate-first workflow across supported harnesses.</i></p>
|
|
4
4
|
<p><b>thoth-agents</b> - Multi-harness orchestration - Thoth-mem persistence - Bundled SDD pipeline</p>
|
|
5
|
+
<p>
|
|
6
|
+
<a href="https://github.com/EremesNG/thoth-agents/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/EremesNG/thoth-agents/ci.yml?branch=master&label=CI" alt="CI status"></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/thoth-agents"><img src="https://img.shields.io/npm/v/thoth-agents?label=npm" alt="npm version"></a>
|
|
8
|
+
<a href="https://github.com/EremesNG/thoth-agents/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/thoth-agents" alt="MIT license"></a>
|
|
9
|
+
<img src="https://img.shields.io/node/v/thoth-agents" alt="Node.js version">
|
|
10
|
+
<img src="https://img.shields.io/badge/pnpm-11.2.2-F69220?logo=pnpm&logoColor=white" alt="pnpm 11.2.2">
|
|
11
|
+
</p>
|
|
5
12
|
</div>
|
|
6
13
|
|
|
7
14
|
---
|
|
@@ -75,6 +75,7 @@ function ensureOpenCodeConfigDir() {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// src/cli/providers.ts
|
|
78
|
+
var THOTH_AGENTS_CONFIG_SCHEMA_URL = "https://unpkg.com/thoth-agents@latest/thoth-agents.schema.json";
|
|
78
79
|
var MODEL_MAPPINGS = {
|
|
79
80
|
openai: {
|
|
80
81
|
orchestrator: { model: "openai/gpt-5.4" },
|
|
@@ -118,6 +119,7 @@ var MODEL_MAPPINGS = {
|
|
|
118
119
|
};
|
|
119
120
|
function generateLiteConfig(installConfig) {
|
|
120
121
|
const config = {
|
|
122
|
+
$schema: THOTH_AGENTS_CONFIG_SCHEMA_URL,
|
|
121
123
|
preset: "openai",
|
|
122
124
|
presets: {}
|
|
123
125
|
};
|
|
@@ -464,6 +466,7 @@ var FailoverConfigSchema = z.object({
|
|
|
464
466
|
chains: FallbackChainsSchema.default({})
|
|
465
467
|
});
|
|
466
468
|
var PluginConfigSchema = z.object({
|
|
469
|
+
$schema: z.string().optional(),
|
|
467
470
|
preset: z.string().optional(),
|
|
468
471
|
setDefaultAgent: z.boolean().optional(),
|
|
469
472
|
scoringEngineVersion: z.enum(["v1", "v2-shadow", "v2"]).optional(),
|
|
@@ -643,7 +646,7 @@ var DEFAULT_MODELS = {
|
|
|
643
646
|
var POLL_INTERVAL_BACKGROUND_MS = 2e3;
|
|
644
647
|
var DEFAULT_TIMEOUT_MS = 2 * 60 * 1e3;
|
|
645
648
|
var MAX_POLL_TIME_MS = 5 * 60 * 1e3;
|
|
646
|
-
var DEFAULT_THOTH_COMMAND = ["npx", "-y", "thoth-mem"];
|
|
649
|
+
var DEFAULT_THOTH_COMMAND = ["npx", "-y", "thoth-mem", "mcp"];
|
|
647
650
|
|
|
648
651
|
// src/config/utils.ts
|
|
649
652
|
function getAgentOverride(config, name) {
|
|
@@ -746,6 +749,186 @@ var CODEX_PROMPT_DIALECT = {
|
|
|
746
749
|
}
|
|
747
750
|
};
|
|
748
751
|
|
|
752
|
+
// src/harness/core/sdd.ts
|
|
753
|
+
var SDD_PHASES = [
|
|
754
|
+
{
|
|
755
|
+
id: "requirements-interview",
|
|
756
|
+
order: 0,
|
|
757
|
+
requiredFor: ["direct", "accelerated", "full"],
|
|
758
|
+
prerequisites: [],
|
|
759
|
+
producesArtifact: false,
|
|
760
|
+
owner: "orchestrator",
|
|
761
|
+
delegationReason: "Root-owned requirements discovery, scope calibration, and route approval."
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
id: "init",
|
|
765
|
+
order: 1,
|
|
766
|
+
requiredFor: [],
|
|
767
|
+
prerequisites: ["requirements-interview"],
|
|
768
|
+
producesArtifact: true,
|
|
769
|
+
owner: "write-capable-agent",
|
|
770
|
+
artifactSkill: "sdd-init",
|
|
771
|
+
condition: "Only when OpenSpec persistence is selected and openspec/ is missing.",
|
|
772
|
+
defaultAgentRole: "quick",
|
|
773
|
+
supportingAgentRoles: ["explorer"],
|
|
774
|
+
delegationReason: "Fast mechanical bootstrap, with explorer supplying repository facts when needed."
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
id: "explore",
|
|
778
|
+
order: 2,
|
|
779
|
+
requiredFor: ["accelerated", "full"],
|
|
780
|
+
prerequisites: ["requirements-interview"],
|
|
781
|
+
producesArtifact: false,
|
|
782
|
+
owner: "read-only-agent",
|
|
783
|
+
defaultAgentRole: "explorer",
|
|
784
|
+
supportingAgentRoles: ["librarian"],
|
|
785
|
+
delegationReason: "Read-only repository discovery before artifact-producing SDD phases."
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
id: "proposal",
|
|
789
|
+
order: 3,
|
|
790
|
+
requiredFor: ["accelerated", "full"],
|
|
791
|
+
prerequisites: ["requirements-interview", "explore"],
|
|
792
|
+
producesArtifact: true,
|
|
793
|
+
owner: "write-capable-agent",
|
|
794
|
+
artifactSkill: "sdd-propose",
|
|
795
|
+
defaultAgentRole: "deep",
|
|
796
|
+
supportingAgentRoles: ["oracle"],
|
|
797
|
+
delegationReason: "Structured technical reasoning and trade-off synthesis before implementation."
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: "spec",
|
|
801
|
+
order: 4,
|
|
802
|
+
requiredFor: ["full"],
|
|
803
|
+
prerequisites: ["proposal"],
|
|
804
|
+
producesArtifact: true,
|
|
805
|
+
owner: "write-capable-agent",
|
|
806
|
+
artifactSkill: "sdd-spec",
|
|
807
|
+
defaultAgentRole: "deep",
|
|
808
|
+
supportingAgentRoles: ["oracle"],
|
|
809
|
+
delegationReason: "High-quality requirement contract work where ambiguity propagates downstream."
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
id: "design",
|
|
813
|
+
order: 5,
|
|
814
|
+
requiredFor: ["full"],
|
|
815
|
+
prerequisites: ["proposal", "spec"],
|
|
816
|
+
producesArtifact: true,
|
|
817
|
+
owner: "write-capable-agent",
|
|
818
|
+
artifactSkill: "sdd-design",
|
|
819
|
+
artifactMeaning: "technical-solution-design",
|
|
820
|
+
defaultAgentRole: "deep",
|
|
821
|
+
supportingAgentRoles: ["designer"],
|
|
822
|
+
delegationReason: "Technical architecture and file-change design; designer only supports UI/UX concerns."
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
id: "tasks",
|
|
826
|
+
order: 6,
|
|
827
|
+
requiredFor: ["accelerated", "full"],
|
|
828
|
+
prerequisites: ["proposal", "spec", "design"],
|
|
829
|
+
producesArtifact: true,
|
|
830
|
+
owner: "write-capable-agent",
|
|
831
|
+
artifactSkill: "sdd-tasks",
|
|
832
|
+
defaultAgentRole: "quick",
|
|
833
|
+
alternateAgentRoles: ["deep"],
|
|
834
|
+
delegationReason: "Mechanical conversion of settled design into dependency-ordered execution tasks."
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
id: "plan-review",
|
|
838
|
+
order: 7,
|
|
839
|
+
requiredFor: ["accelerated", "full"],
|
|
840
|
+
prerequisites: ["tasks"],
|
|
841
|
+
producesArtifact: false,
|
|
842
|
+
gate: "oracle-review",
|
|
843
|
+
owner: "oracle",
|
|
844
|
+
defaultAgentRole: "oracle",
|
|
845
|
+
delegationReason: "Independent read-only executability review of tasks before implementation."
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
id: "implementation-confirmation",
|
|
849
|
+
order: 8,
|
|
850
|
+
requiredFor: ["accelerated", "full"],
|
|
851
|
+
prerequisites: ["plan-review"],
|
|
852
|
+
producesArtifact: false,
|
|
853
|
+
gate: "user-confirmation",
|
|
854
|
+
owner: "user",
|
|
855
|
+
delegationReason: "Human approval gate after reviewed tasks and before workspace implementation."
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
id: "apply",
|
|
859
|
+
order: 9,
|
|
860
|
+
requiredFor: ["direct", "accelerated", "full"],
|
|
861
|
+
prerequisites: ["implementation-confirmation"],
|
|
862
|
+
producesArtifact: false,
|
|
863
|
+
owner: "write-capable-agent",
|
|
864
|
+
defaultAgentRole: "deep",
|
|
865
|
+
alternateAgentRoles: ["quick", "designer"],
|
|
866
|
+
delegationReason: "Correctness-heavy implementation by default; quick handles mechanical batches and designer owns UI/visual work."
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
id: "verify",
|
|
870
|
+
order: 10,
|
|
871
|
+
requiredFor: ["accelerated", "full"],
|
|
872
|
+
prerequisites: ["apply"],
|
|
873
|
+
producesArtifact: true,
|
|
874
|
+
owner: "oracle",
|
|
875
|
+
artifactSkill: "sdd-verify",
|
|
876
|
+
defaultAgentRole: "oracle",
|
|
877
|
+
persistenceAgentRole: "quick",
|
|
878
|
+
delegationReason: "Independent verification review; quick persists the report when the selected store requires writes."
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
id: "archive",
|
|
882
|
+
order: 11,
|
|
883
|
+
requiredFor: ["accelerated", "full"],
|
|
884
|
+
prerequisites: ["verify"],
|
|
885
|
+
producesArtifact: true,
|
|
886
|
+
owner: "write-capable-agent",
|
|
887
|
+
artifactSkill: "sdd-archive",
|
|
888
|
+
defaultAgentRole: "quick",
|
|
889
|
+
delegationReason: "Mechanical closeout, summary, and archive movement after verification passes."
|
|
890
|
+
}
|
|
891
|
+
];
|
|
892
|
+
var SDD_WORKFLOW_CONTRACT = {
|
|
893
|
+
phases: [...SDD_PHASES],
|
|
894
|
+
routingRules: [
|
|
895
|
+
"Requirements interview is step zero for all non-trivial work.",
|
|
896
|
+
"Scope-faithful invariant: accepted user intent/scope is preserved; unresolved affected areas remain explicit as deferred/discovery follow-up.",
|
|
897
|
+
"Direct implementation is reserved for low-complexity work.",
|
|
898
|
+
"Accelerated SDD follows explore -> proposal -> tasks before execution.",
|
|
899
|
+
"Full SDD follows explore -> proposal -> spec -> design -> tasks before execution."
|
|
900
|
+
],
|
|
901
|
+
artifactRules: [
|
|
902
|
+
"SDD delegation defaults are phase-specific: sdd-propose, sdd-spec, and sdd-design default to deep.",
|
|
903
|
+
"sdd-tasks defaults to quick with deep as fallback when the task plan is complex.",
|
|
904
|
+
"sdd-verify defaults to oracle for independent review; quick persists the report when repository or memory writes are required.",
|
|
905
|
+
"sdd-archive defaults to quick for mechanical closeout.",
|
|
906
|
+
"OpenSpec design.md is technical solution design, not UI/UX design; sdd-design itself never routes to designer.",
|
|
907
|
+
"Designer participates during apply only for user-facing UI, visual work, screenshots, or visual QA.",
|
|
908
|
+
"Full-pipeline tasks require proposal, spec, and design artifacts.",
|
|
909
|
+
"Oracle is read-only and performs plan review plus independent verification review; it does not persist artifacts."
|
|
910
|
+
],
|
|
911
|
+
verificationRules: [
|
|
912
|
+
"Plan review must complete before implementation confirmation.",
|
|
913
|
+
"User confirmation is required after plan-review approval and before apply.",
|
|
914
|
+
"Apply is followed by verify and archive for SDD pipelines."
|
|
915
|
+
]
|
|
916
|
+
};
|
|
917
|
+
function getSddWorkflowContract() {
|
|
918
|
+
return {
|
|
919
|
+
phases: SDD_WORKFLOW_CONTRACT.phases.map((phase) => ({
|
|
920
|
+
...phase,
|
|
921
|
+
requiredFor: [...phase.requiredFor],
|
|
922
|
+
prerequisites: [...phase.prerequisites],
|
|
923
|
+
alternateAgentRoles: phase.alternateAgentRoles ? [...phase.alternateAgentRoles] : void 0,
|
|
924
|
+
supportingAgentRoles: phase.supportingAgentRoles ? [...phase.supportingAgentRoles] : void 0
|
|
925
|
+
})),
|
|
926
|
+
routingRules: [...SDD_WORKFLOW_CONTRACT.routingRules],
|
|
927
|
+
artifactRules: [...SDD_WORKFLOW_CONTRACT.artifactRules],
|
|
928
|
+
verificationRules: [...SDD_WORKFLOW_CONTRACT.verificationRules]
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
|
|
749
932
|
// src/agents/prompt-sections.ts
|
|
750
933
|
function createQuestionProtocolSection() {
|
|
751
934
|
return {
|
|
@@ -802,6 +985,43 @@ function createModelFamilySection(role, model) {
|
|
|
802
985
|
function roleText(template) {
|
|
803
986
|
return { kind: "role-text", template };
|
|
804
987
|
}
|
|
988
|
+
function roleTemplate(role) {
|
|
989
|
+
return `{{role.${role}}}`;
|
|
990
|
+
}
|
|
991
|
+
function renderRoleList(roles) {
|
|
992
|
+
return roles.map(roleTemplate).join(", ");
|
|
993
|
+
}
|
|
994
|
+
function getDelegatedSddPhase(id) {
|
|
995
|
+
const phase = getSddWorkflowContract().phases.find(
|
|
996
|
+
(candidate) => candidate.id === id
|
|
997
|
+
);
|
|
998
|
+
if (!phase?.defaultAgentRole) {
|
|
999
|
+
throw new Error(`Missing SDD delegation role for ${id}`);
|
|
1000
|
+
}
|
|
1001
|
+
return phase;
|
|
1002
|
+
}
|
|
1003
|
+
function primarySddRole(id) {
|
|
1004
|
+
return roleTemplate(getDelegatedSddPhase(id).defaultAgentRole);
|
|
1005
|
+
}
|
|
1006
|
+
function alternateSddRoles(id) {
|
|
1007
|
+
const phase = getDelegatedSddPhase(id);
|
|
1008
|
+
return phase.alternateAgentRoles?.length ? renderRoleList(phase.alternateAgentRoles) : "";
|
|
1009
|
+
}
|
|
1010
|
+
function supportSddRoles(id) {
|
|
1011
|
+
const phase = getDelegatedSddPhase(id);
|
|
1012
|
+
return phase.supportingAgentRoles?.length ? renderRoleList(phase.supportingAgentRoles) : "";
|
|
1013
|
+
}
|
|
1014
|
+
function persistenceSddRole(id) {
|
|
1015
|
+
const phase = getDelegatedSddPhase(id);
|
|
1016
|
+
return phase.persistenceAgentRole ? roleTemplate(phase.persistenceAgentRole) : "";
|
|
1017
|
+
}
|
|
1018
|
+
function renderSddDelegationMatrix() {
|
|
1019
|
+
return `<sdd-delegation-matrix>
|
|
1020
|
+
- sdd-init -> ${primarySddRole("init")} (+${supportSddRoles("init")}, if openspec/ missing); sdd-explore -> ${primarySddRole("explore")} (+${supportSddRoles("explore")})
|
|
1021
|
+
- sdd-propose/sdd-spec/sdd-design -> ${primarySddRole("proposal")}; sdd-tasks -> ${primarySddRole("tasks")} (fallback: ${alternateSddRoles("tasks")})
|
|
1022
|
+
- plan-reviewer -> ${primarySddRole("plan-review")}; sdd-apply -> ${primarySddRole("apply")} (fallback: ${alternateSddRoles("apply")}); sdd-verify -> ${primarySddRole("verify")} (persistence: ${persistenceSddRole("verify")}); sdd-archive -> ${primarySddRole("archive")}
|
|
1023
|
+
</sdd-delegation-matrix>`;
|
|
1024
|
+
}
|
|
805
1025
|
function specialistSections({
|
|
806
1026
|
role,
|
|
807
1027
|
mode,
|
|
@@ -942,15 +1162,19 @@ For {{role.explorer}}/{{role.librarian}}, ask narrow fact-finding questions for
|
|
|
942
1162
|
|
|
943
1163
|
<sdd>
|
|
944
1164
|
All work always starts with requirements-interview skill.
|
|
1165
|
+
Scope-faithful invariant: accepted user intent and scope must not be silently narrowed; unresolved affected areas stay visible as deferred/discovery follow-up, not hidden as out-of-scope.
|
|
945
1166
|
|
|
946
1167
|
Routes:
|
|
947
1168
|
- Direct implementation for low-complexity work.
|
|
948
|
-
- Accelerated SDD: propose -> tasks.
|
|
949
|
-
- Full SDD: propose -> spec -> design -> tasks.
|
|
1169
|
+
- Accelerated SDD: explore -> propose -> tasks.
|
|
1170
|
+
- Full SDD: explore -> propose -> spec -> design -> tasks.
|
|
1171
|
+
|
|
1172
|
+
${renderSddDelegationMatrix()}
|
|
950
1173
|
|
|
951
1174
|
Hard gates:
|
|
952
|
-
-
|
|
953
|
-
-
|
|
1175
|
+
- Use the SDD delegation matrix as canonical phase routing.
|
|
1176
|
+
- Load the matching skill when a phase has one.
|
|
1177
|
+
- {{role.oracle}} is read-only for plan-reviewer and sdd-verify review; {{role.quick}} persists verify reports when writes are required.
|
|
954
1178
|
- Never skip artifacts or jump from requirements-interview to implementation when SDD is selected.
|
|
955
1179
|
- Before SDD execution, load \`executing-plans\`; then track progress in {{progressTool}} plus the persistent artifact.
|
|
956
1180
|
- If openspec persistence is selected and openspec/ is missing, dispatch sdd-init first.
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
renderRolePrompt,
|
|
32
32
|
writeConfig,
|
|
33
33
|
writeLiteConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6K3ZXIMC.js";
|
|
35
35
|
|
|
36
36
|
// src/harness/adapters/codex.ts
|
|
37
37
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
@@ -94,7 +94,7 @@ var AGENT_ROLES = [
|
|
|
94
94
|
responsibility: "Provide strategic technical guidance anchored to evidence and review SDD plans.",
|
|
95
95
|
toolGovernance: [
|
|
96
96
|
"read-only analysis and review",
|
|
97
|
-
"no implementation
|
|
97
|
+
"no implementation; may perform read-only SDD plan review and verification review, but does not persist artifacts",
|
|
98
98
|
"no task delegation"
|
|
99
99
|
],
|
|
100
100
|
verification: ["separates observations, risks, and recommendations"]
|
package/dist/cli/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getOperationHarness,
|
|
26
26
|
installRecommendedSkill,
|
|
27
27
|
listOperationHarnesses
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-SOT5ZY53.js";
|
|
29
29
|
import {
|
|
30
30
|
ALL_AGENT_NAMES,
|
|
31
31
|
CUSTOM_SKILLS,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
getExistingLiteConfigPath,
|
|
38
38
|
installCustomSkills,
|
|
39
39
|
writeLiteConfig
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-6K3ZXIMC.js";
|
|
41
41
|
|
|
42
42
|
// src/cli/index.ts
|
|
43
43
|
import { pathToFileURL } from "url";
|
package/dist/cli/providers.d.ts
CHANGED
package/dist/cli/tui/index.js
CHANGED
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
getOpenCodeStatus,
|
|
16
16
|
listOperationHarnesses,
|
|
17
17
|
parseRoleTomlModel
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-SOT5ZY53.js";
|
|
19
19
|
import {
|
|
20
20
|
ALL_AGENT_NAMES,
|
|
21
21
|
DEFAULT_MODELS,
|
|
22
22
|
getExistingLiteConfigPath,
|
|
23
23
|
parseConfig
|
|
24
|
-
} from "../../chunk-
|
|
24
|
+
} from "../../chunk-6K3ZXIMC.js";
|
|
25
25
|
|
|
26
26
|
// src/cli/tui/index.tsx
|
|
27
27
|
import { render } from "ink";
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -159,6 +159,7 @@ export declare const FailoverConfigSchema: z.ZodObject<{
|
|
|
159
159
|
}, z.core.$strip>;
|
|
160
160
|
export type FailoverConfig = z.infer<typeof FailoverConfigSchema>;
|
|
161
161
|
export declare const PluginConfigSchema: z.ZodObject<{
|
|
162
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
162
163
|
preset: z.ZodOptional<z.ZodString>;
|
|
163
164
|
setDefaultAgent: z.ZodOptional<z.ZodBoolean>;
|
|
164
165
|
scoringEngineVersion: z.ZodOptional<z.ZodEnum<{
|
|
@@ -51,7 +51,7 @@ export declare const AGENT_ROLES: readonly [{
|
|
|
51
51
|
readonly canMutateWorkspace: false;
|
|
52
52
|
readonly scope: "advice, diagnosis, architecture, code review, and plan review";
|
|
53
53
|
readonly responsibility: "Provide strategic technical guidance anchored to evidence and review SDD plans.";
|
|
54
|
-
readonly toolGovernance: ["read-only analysis and review", "no implementation
|
|
54
|
+
readonly toolGovernance: ["read-only analysis and review", "no implementation; may perform read-only SDD plan review and verification review, but does not persist artifacts", "no task delegation"];
|
|
55
55
|
readonly verification: ["separates observations, risks, and recommendations"];
|
|
56
56
|
}, {
|
|
57
57
|
readonly name: "designer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentRoleName } from './agent-pack';
|
|
2
2
|
export type SddPipelineType = 'direct' | 'accelerated' | 'full';
|
|
3
|
-
export type SddPhaseId = 'requirements-interview' | 'proposal' | 'spec' | 'design' | 'tasks' | 'plan-review' | 'implementation-confirmation' | 'apply' | 'verify' | 'archive';
|
|
3
|
+
export type SddPhaseId = 'requirements-interview' | 'init' | 'explore' | 'proposal' | 'spec' | 'design' | 'tasks' | 'plan-review' | 'implementation-confirmation' | 'apply' | 'verify' | 'archive';
|
|
4
4
|
export interface SddPhaseContract {
|
|
5
5
|
id: SddPhaseId;
|
|
6
6
|
order: number;
|
|
@@ -8,11 +8,15 @@ export interface SddPhaseContract {
|
|
|
8
8
|
prerequisites: SddPhaseId[];
|
|
9
9
|
producesArtifact: boolean;
|
|
10
10
|
gate?: 'oracle-review' | 'user-confirmation';
|
|
11
|
-
owner: 'orchestrator' | 'write-capable-agent' | 'oracle' | 'user';
|
|
11
|
+
owner: 'orchestrator' | 'read-only-agent' | 'write-capable-agent' | 'oracle' | 'user';
|
|
12
12
|
artifactSkill?: string;
|
|
13
13
|
artifactMeaning?: string;
|
|
14
|
+
condition?: string;
|
|
14
15
|
defaultAgentRole?: AgentRoleName;
|
|
15
16
|
alternateAgentRoles?: AgentRoleName[];
|
|
17
|
+
supportingAgentRoles?: AgentRoleName[];
|
|
18
|
+
persistenceAgentRole?: AgentRoleName;
|
|
19
|
+
delegationReason?: string;
|
|
16
20
|
}
|
|
17
21
|
export interface SddWorkflowContract {
|
|
18
22
|
phases: SddPhaseContract[];
|
|
@@ -20,7 +24,7 @@ export interface SddWorkflowContract {
|
|
|
20
24
|
artifactRules: string[];
|
|
21
25
|
verificationRules: string[];
|
|
22
26
|
}
|
|
23
|
-
export declare const FULL_SDD_PHASE_ORDER: readonly ["requirements-interview", "proposal", "spec", "design", "tasks", "plan-review", "implementation-confirmation", "apply", "verify", "archive"];
|
|
27
|
+
export declare const FULL_SDD_PHASE_ORDER: readonly ["requirements-interview", "explore", "proposal", "spec", "design", "tasks", "plan-review", "implementation-confirmation", "apply", "verify", "archive"];
|
|
24
28
|
export declare const SDD_PHASES: readonly [{
|
|
25
29
|
readonly id: "requirements-interview";
|
|
26
30
|
readonly order: 0;
|
|
@@ -28,27 +32,54 @@ export declare const SDD_PHASES: readonly [{
|
|
|
28
32
|
readonly prerequisites: [];
|
|
29
33
|
readonly producesArtifact: false;
|
|
30
34
|
readonly owner: "orchestrator";
|
|
35
|
+
readonly delegationReason: "Root-owned requirements discovery, scope calibration, and route approval.";
|
|
31
36
|
}, {
|
|
32
|
-
readonly id: "
|
|
37
|
+
readonly id: "init";
|
|
33
38
|
readonly order: 1;
|
|
39
|
+
readonly requiredFor: [];
|
|
40
|
+
readonly prerequisites: ["requirements-interview"];
|
|
41
|
+
readonly producesArtifact: true;
|
|
42
|
+
readonly owner: "write-capable-agent";
|
|
43
|
+
readonly artifactSkill: "sdd-init";
|
|
44
|
+
readonly condition: "Only when OpenSpec persistence is selected and openspec/ is missing.";
|
|
45
|
+
readonly defaultAgentRole: "quick";
|
|
46
|
+
readonly supportingAgentRoles: ["explorer"];
|
|
47
|
+
readonly delegationReason: "Fast mechanical bootstrap, with explorer supplying repository facts when needed.";
|
|
48
|
+
}, {
|
|
49
|
+
readonly id: "explore";
|
|
50
|
+
readonly order: 2;
|
|
34
51
|
readonly requiredFor: ["accelerated", "full"];
|
|
35
52
|
readonly prerequisites: ["requirements-interview"];
|
|
53
|
+
readonly producesArtifact: false;
|
|
54
|
+
readonly owner: "read-only-agent";
|
|
55
|
+
readonly defaultAgentRole: "explorer";
|
|
56
|
+
readonly supportingAgentRoles: ["librarian"];
|
|
57
|
+
readonly delegationReason: "Read-only repository discovery before artifact-producing SDD phases.";
|
|
58
|
+
}, {
|
|
59
|
+
readonly id: "proposal";
|
|
60
|
+
readonly order: 3;
|
|
61
|
+
readonly requiredFor: ["accelerated", "full"];
|
|
62
|
+
readonly prerequisites: ["requirements-interview", "explore"];
|
|
36
63
|
readonly producesArtifact: true;
|
|
37
64
|
readonly owner: "write-capable-agent";
|
|
38
65
|
readonly artifactSkill: "sdd-propose";
|
|
39
66
|
readonly defaultAgentRole: "deep";
|
|
67
|
+
readonly supportingAgentRoles: ["oracle"];
|
|
68
|
+
readonly delegationReason: "Structured technical reasoning and trade-off synthesis before implementation.";
|
|
40
69
|
}, {
|
|
41
70
|
readonly id: "spec";
|
|
42
|
-
readonly order:
|
|
71
|
+
readonly order: 4;
|
|
43
72
|
readonly requiredFor: ["full"];
|
|
44
73
|
readonly prerequisites: ["proposal"];
|
|
45
74
|
readonly producesArtifact: true;
|
|
46
75
|
readonly owner: "write-capable-agent";
|
|
47
76
|
readonly artifactSkill: "sdd-spec";
|
|
48
77
|
readonly defaultAgentRole: "deep";
|
|
78
|
+
readonly supportingAgentRoles: ["oracle"];
|
|
79
|
+
readonly delegationReason: "High-quality requirement contract work where ambiguity propagates downstream.";
|
|
49
80
|
}, {
|
|
50
81
|
readonly id: "design";
|
|
51
|
-
readonly order:
|
|
82
|
+
readonly order: 5;
|
|
52
83
|
readonly requiredFor: ["full"];
|
|
53
84
|
readonly prerequisites: ["proposal", "spec"];
|
|
54
85
|
readonly producesArtifact: true;
|
|
@@ -56,58 +87,69 @@ export declare const SDD_PHASES: readonly [{
|
|
|
56
87
|
readonly artifactSkill: "sdd-design";
|
|
57
88
|
readonly artifactMeaning: "technical-solution-design";
|
|
58
89
|
readonly defaultAgentRole: "deep";
|
|
90
|
+
readonly supportingAgentRoles: ["designer"];
|
|
91
|
+
readonly delegationReason: "Technical architecture and file-change design; designer only supports UI/UX concerns.";
|
|
59
92
|
}, {
|
|
60
93
|
readonly id: "tasks";
|
|
61
|
-
readonly order:
|
|
94
|
+
readonly order: 6;
|
|
62
95
|
readonly requiredFor: ["accelerated", "full"];
|
|
63
96
|
readonly prerequisites: ["proposal", "spec", "design"];
|
|
64
97
|
readonly producesArtifact: true;
|
|
65
98
|
readonly owner: "write-capable-agent";
|
|
66
99
|
readonly artifactSkill: "sdd-tasks";
|
|
67
|
-
readonly defaultAgentRole: "
|
|
100
|
+
readonly defaultAgentRole: "quick";
|
|
101
|
+
readonly alternateAgentRoles: ["deep"];
|
|
102
|
+
readonly delegationReason: "Mechanical conversion of settled design into dependency-ordered execution tasks.";
|
|
68
103
|
}, {
|
|
69
104
|
readonly id: "plan-review";
|
|
70
|
-
readonly order:
|
|
105
|
+
readonly order: 7;
|
|
71
106
|
readonly requiredFor: ["accelerated", "full"];
|
|
72
107
|
readonly prerequisites: ["tasks"];
|
|
73
108
|
readonly producesArtifact: false;
|
|
74
109
|
readonly gate: "oracle-review";
|
|
75
110
|
readonly owner: "oracle";
|
|
111
|
+
readonly defaultAgentRole: "oracle";
|
|
112
|
+
readonly delegationReason: "Independent read-only executability review of tasks before implementation.";
|
|
76
113
|
}, {
|
|
77
114
|
readonly id: "implementation-confirmation";
|
|
78
|
-
readonly order:
|
|
115
|
+
readonly order: 8;
|
|
79
116
|
readonly requiredFor: ["accelerated", "full"];
|
|
80
117
|
readonly prerequisites: ["plan-review"];
|
|
81
118
|
readonly producesArtifact: false;
|
|
82
119
|
readonly gate: "user-confirmation";
|
|
83
120
|
readonly owner: "user";
|
|
121
|
+
readonly delegationReason: "Human approval gate after reviewed tasks and before workspace implementation.";
|
|
84
122
|
}, {
|
|
85
123
|
readonly id: "apply";
|
|
86
|
-
readonly order:
|
|
124
|
+
readonly order: 9;
|
|
87
125
|
readonly requiredFor: ["direct", "accelerated", "full"];
|
|
88
126
|
readonly prerequisites: ["implementation-confirmation"];
|
|
89
127
|
readonly producesArtifact: false;
|
|
90
128
|
readonly owner: "write-capable-agent";
|
|
91
129
|
readonly defaultAgentRole: "deep";
|
|
92
130
|
readonly alternateAgentRoles: ["quick", "designer"];
|
|
131
|
+
readonly delegationReason: "Correctness-heavy implementation by default; quick handles mechanical batches and designer owns UI/visual work.";
|
|
93
132
|
}, {
|
|
94
133
|
readonly id: "verify";
|
|
95
|
-
readonly order:
|
|
134
|
+
readonly order: 10;
|
|
96
135
|
readonly requiredFor: ["accelerated", "full"];
|
|
97
136
|
readonly prerequisites: ["apply"];
|
|
98
137
|
readonly producesArtifact: true;
|
|
99
|
-
readonly owner: "
|
|
138
|
+
readonly owner: "oracle";
|
|
100
139
|
readonly artifactSkill: "sdd-verify";
|
|
101
|
-
readonly defaultAgentRole: "
|
|
140
|
+
readonly defaultAgentRole: "oracle";
|
|
141
|
+
readonly persistenceAgentRole: "quick";
|
|
142
|
+
readonly delegationReason: "Independent verification review; quick persists the report when the selected store requires writes.";
|
|
102
143
|
}, {
|
|
103
144
|
readonly id: "archive";
|
|
104
|
-
readonly order:
|
|
145
|
+
readonly order: 11;
|
|
105
146
|
readonly requiredFor: ["accelerated", "full"];
|
|
106
147
|
readonly prerequisites: ["verify"];
|
|
107
148
|
readonly producesArtifact: true;
|
|
108
149
|
readonly owner: "write-capable-agent";
|
|
109
150
|
readonly artifactSkill: "sdd-archive";
|
|
110
|
-
readonly defaultAgentRole: "
|
|
151
|
+
readonly defaultAgentRole: "quick";
|
|
152
|
+
readonly delegationReason: "Mechanical closeout, summary, and archive movement after verification passes.";
|
|
111
153
|
}];
|
|
112
154
|
export declare const SDD_WORKFLOW_CONTRACT: SddWorkflowContract;
|
|
113
155
|
export declare function getSddWorkflowContract(): SddWorkflowContract;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED