thoth-agents 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/{chunk-TKIDBRM3.js → chunk-CB3EBA7H.js} +4 -1
- package/dist/{chunk-M2WF46BP.js → chunk-GIUU6FNE.js} +305 -194
- package/dist/{chunk-JBG7XMIG.js → chunk-ZEAAWBF2.js} +28 -83
- package/dist/cli/index.js +3 -3
- 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 +38 -3
- package/dist/harness/core/sdd.d.ts +8 -7
- package/dist/index.js +2 -2
- package/package.json +1 -1
- 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 +10 -30
- package/plugin/agents/orchestrator.md +22 -14
- package/plugin/agents/quick.md +10 -31
- package/plugin/skills/thoth-archive/scripts/archive.mjs +30 -10
- package/plugin/skills/thoth-sdd/SKILL.md +13 -1
- package/plugin/skills/thoth-sdd/references/phases/implement.md +33 -6
- package/skills/thoth-archive/scripts/archive.mjs +30 -10
- package/skills/thoth-sdd/SKILL.md +13 -1
- package/skills/thoth-sdd/references/phases/implement.md +33 -6
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
# Implement contract
|
|
2
2
|
|
|
3
|
-
**Owner**: root, designer
|
|
3
|
+
**Owner**: adaptive root, `designer`, `quick`, or `deep` in every route; exactly
|
|
4
|
+
one writer per mutable surface
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
SDD routes govern artifacts and gates, not implementation ownership. Before
|
|
7
|
+
implementation or dispatch, root records the decided owner, task-shape/net-gain
|
|
8
|
+
rationale, exact paths, accepted FR/buildable-SC scope, non-goals, and
|
|
9
|
+
verification commands. Route, file count, or cheaper model price alone is not an
|
|
10
|
+
ownership rationale.
|
|
11
|
+
|
|
12
|
+
Root may retain implementation when short or sequential work, shared mutable
|
|
13
|
+
state, accumulated context, rediscovery, or coordination overhead outweighs
|
|
14
|
+
delegation benefit. Delegate when specialization, context isolation, independent
|
|
15
|
+
bounded work, quality, latency, or total cost creates demonstrated net gain. If
|
|
16
|
+
root owns the surface, do not dispatch a writer. If a specialist owns it, send a
|
|
17
|
+
bounded handoff with the exact surface, requirements, and checks.
|
|
18
|
+
|
|
19
|
+
Root marks selected artifact-backed tasks `[~]`; Direct or no-artifact work has
|
|
20
|
+
no task state. Use the mandatory `tdd` skill for behavior changes and work in
|
|
21
|
+
vertical red/green slices. Child writers never edit task state; root marks `[x]`
|
|
22
|
+
only after checking task-specific evidence.
|
|
23
|
+
|
|
24
|
+
After deciding delegation creates net gain, select deterministically:
|
|
25
|
+
|
|
26
|
+
- `designer` for user-facing UI/UX, interaction, accessibility, responsive, or
|
|
27
|
+
visual-quality work;
|
|
28
|
+
- `quick` for a known narrow mechanical low-risk surface with exact targets;
|
|
29
|
+
- `deep` for coupled multi-file, shared-contract, migration, concurrency,
|
|
30
|
+
edge-case-heavy, or high-risk work.
|
|
31
|
+
|
|
32
|
+
Proven independent surfaces may use different writers only with non-overlapping
|
|
33
|
+
ownership. Overlapping or compatibility-coupled work uses one `deep` writer and
|
|
34
|
+
ordered handoffs. A writer escalates before expanding beyond its routing
|
|
35
|
+
boundary. The implementation writer never performs final verification; root
|
|
36
|
+
hands the unchanged candidate to a fresh Oracle.
|
|
10
37
|
|
|
11
38
|
Implementation evidence may refine an artifact without restarting the workflow:
|
|
12
39
|
|
|
@@ -300,16 +300,36 @@ function parseStoryScenarios(spec) {
|
|
|
300
300
|
const covers =
|
|
301
301
|
/^\*\*Covers\*\*:\s*(.+)$/im.exec(story)?.[1].match(/\bFR-\d{3}\b/g) ??
|
|
302
302
|
[];
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
303
|
+
const acceptanceMarker = /^\*\*Acceptance scenarios\*\*:\s*$/im.exec(story);
|
|
304
|
+
const acceptance = acceptanceMarker
|
|
305
|
+
? story.slice((acceptanceMarker.index ?? 0) + acceptanceMarker[0].length)
|
|
306
|
+
: '';
|
|
307
|
+
const scenarioStarts = [
|
|
308
|
+
...acceptance.matchAll(/^\d+\.\s+\*\*Given\*\*/gim),
|
|
309
|
+
];
|
|
310
|
+
const scenarios = scenarioStarts.map((scenarioStart, scenarioIndex) => {
|
|
311
|
+
const start = scenarioStart.index ?? 0;
|
|
312
|
+
const end = scenarioStarts[scenarioIndex + 1]?.index ?? acceptance.length;
|
|
313
|
+
const normalized = acceptance
|
|
314
|
+
.slice(start, end)
|
|
315
|
+
.replace(/\s+/g, ' ')
|
|
316
|
+
.trim();
|
|
317
|
+
const scenario =
|
|
318
|
+
/^\d+\.\s+\*\*Given\*\*\s+(.+?),\s+\*\*When\*\*\s+(.+?),\s+\*\*Then\*\*\s+(.+?)\.?\s*$/i.exec(
|
|
319
|
+
normalized,
|
|
320
|
+
);
|
|
321
|
+
if (!scenario) {
|
|
322
|
+
throw new Error(
|
|
323
|
+
`US${storyMatch[1]} acceptance scenario ${scenarioIndex + 1} must use Given, When, and Then`,
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
title: `US${storyMatch[1]} - ${storyMatch[2].trim()} ${scenarioIndex + 1}`,
|
|
328
|
+
given: scenario[1].trim(),
|
|
329
|
+
when: scenario[2].trim(),
|
|
330
|
+
result: scenario[3].trim(),
|
|
331
|
+
};
|
|
332
|
+
});
|
|
313
333
|
|
|
314
334
|
for (const requirementId of covers) {
|
|
315
335
|
const current = scenariosByRequirement.get(requirementId) ?? [];
|
|
@@ -31,7 +31,19 @@ Accelerated the minimum recommendation but does not force it.
|
|
|
31
31
|
|
|
32
32
|
- Root owns sequential coordination artifacts, gate execution, and archive.
|
|
33
33
|
- Explorer owns Full-route repository discovery.
|
|
34
|
-
-
|
|
34
|
+
- SDD routes govern artifacts and gates, not implementation ownership. Root,
|
|
35
|
+
`designer`, `quick`, or `deep` may implement in Direct, Accelerated, or Full.
|
|
36
|
+
- Root decides ownership from explicit safe user direction and demonstrated net
|
|
37
|
+
gain. Delegation benefits include specialization, context isolation,
|
|
38
|
+
independent bounded work, quality, latency, or total cost; root continuity
|
|
39
|
+
benefits include short or sequential work, shared mutable state, accumulated
|
|
40
|
+
context, rediscovery, and coordination overhead. Route, file count, or cheaper
|
|
41
|
+
model price alone never selects an owner.
|
|
42
|
+
- Only after deciding to delegate implementation, select `designer` for UI/UX,
|
|
43
|
+
`quick` for known narrow low-risk work, or `deep` for coupled, edge-case-heavy,
|
|
44
|
+
migration, concurrency, shared-contract, or high-risk work.
|
|
45
|
+
- Each mutable surface has one writer; independent non-overlapping surfaces may
|
|
46
|
+
split, while coupled surfaces use one `deep` writer and ordered handoffs.
|
|
35
47
|
- Oracle owns `plan-review` when the user selects it and **every** `verify`. The
|
|
36
48
|
implementation writer never approves its own work.
|
|
37
49
|
|
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
# Implement contract
|
|
2
2
|
|
|
3
|
-
**Owner**: root, designer
|
|
3
|
+
**Owner**: adaptive root, `designer`, `quick`, or `deep` in every route; exactly
|
|
4
|
+
one writer per mutable surface
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
SDD routes govern artifacts and gates, not implementation ownership. Before
|
|
7
|
+
implementation or dispatch, root records the decided owner, task-shape/net-gain
|
|
8
|
+
rationale, exact paths, accepted FR/buildable-SC scope, non-goals, and
|
|
9
|
+
verification commands. Route, file count, or cheaper model price alone is not an
|
|
10
|
+
ownership rationale.
|
|
11
|
+
|
|
12
|
+
Root may retain implementation when short or sequential work, shared mutable
|
|
13
|
+
state, accumulated context, rediscovery, or coordination overhead outweighs
|
|
14
|
+
delegation benefit. Delegate when specialization, context isolation, independent
|
|
15
|
+
bounded work, quality, latency, or total cost creates demonstrated net gain. If
|
|
16
|
+
root owns the surface, do not dispatch a writer. If a specialist owns it, send a
|
|
17
|
+
bounded handoff with the exact surface, requirements, and checks.
|
|
18
|
+
|
|
19
|
+
Root marks selected artifact-backed tasks `[~]`; Direct or no-artifact work has
|
|
20
|
+
no task state. Use the mandatory `tdd` skill for behavior changes and work in
|
|
21
|
+
vertical red/green slices. Child writers never edit task state; root marks `[x]`
|
|
22
|
+
only after checking task-specific evidence.
|
|
23
|
+
|
|
24
|
+
After deciding delegation creates net gain, select deterministically:
|
|
25
|
+
|
|
26
|
+
- `designer` for user-facing UI/UX, interaction, accessibility, responsive, or
|
|
27
|
+
visual-quality work;
|
|
28
|
+
- `quick` for a known narrow mechanical low-risk surface with exact targets;
|
|
29
|
+
- `deep` for coupled multi-file, shared-contract, migration, concurrency,
|
|
30
|
+
edge-case-heavy, or high-risk work.
|
|
31
|
+
|
|
32
|
+
Proven independent surfaces may use different writers only with non-overlapping
|
|
33
|
+
ownership. Overlapping or compatibility-coupled work uses one `deep` writer and
|
|
34
|
+
ordered handoffs. A writer escalates before expanding beyond its routing
|
|
35
|
+
boundary. The implementation writer never performs final verification; root
|
|
36
|
+
hands the unchanged candidate to a fresh Oracle.
|
|
10
37
|
|
|
11
38
|
Implementation evidence may refine an artifact without restarting the workflow:
|
|
12
39
|
|