thoth-agents 0.2.11 → 0.3.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/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +21 -0
- package/README.md +301 -311
- package/dist/agents/configured-role-prompt.d.ts +9 -0
- package/dist/agents/prompt-sections.d.ts +8 -4
- package/dist/agents/prompt-utils.d.ts +0 -4
- package/dist/{chunk-ASKXWU6E.js → chunk-2MZ5C2RN.js} +1078 -1725
- package/dist/chunk-XO74DXBZ.js +1781 -0
- package/dist/{chunk-6BNAV534.js → chunk-YUCGIJPP.js} +12 -30
- package/dist/cli/claude-code-install.d.ts +24 -26
- package/dist/cli/claude-code-paths.d.ts +0 -28
- package/dist/cli/codex-install.d.ts +2 -2
- package/dist/cli/codex-paths.d.ts +0 -2
- package/dist/cli/index.js +279 -119
- package/dist/cli/install.d.ts +5 -1
- package/dist/cli/model-catalog/cache.d.ts +1 -1
- package/dist/cli/operations/claude-code.d.ts +6 -3
- package/dist/cli/operations/codex.d.ts +2 -1
- package/dist/cli/operations/opencode.d.ts +2 -1
- package/dist/cli/operations/types.d.ts +9 -1
- package/dist/cli/package-root.d.ts +1 -0
- package/dist/cli/providers.d.ts +6 -116
- package/dist/cli/skills.d.ts +19 -32
- package/dist/cli/thoth-mem-install.d.ts +45 -0
- package/dist/cli/tui/components/StatusView.d.ts +12 -1
- package/dist/cli/tui/index.js +256 -142
- package/dist/cli/tui/operations.d.ts +4 -3
- package/dist/cli/types.d.ts +0 -10
- package/dist/config/constants.d.ts +20 -16
- package/dist/config/index.d.ts +0 -1
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/schema.d.ts +2 -38
- package/dist/config/utils.d.ts +1 -2
- package/dist/harness/adapters/codex-surfaces.d.ts +3 -3
- package/dist/harness/core/agent-pack.d.ts +37 -29
- package/dist/harness/core/memory-governance.d.ts +24 -48
- package/dist/harness/core/sdd.d.ts +364 -131
- package/dist/harness/generate-integration-packages.d.ts +20 -0
- package/dist/harness/opencode-init-command.d.ts +11 -0
- package/dist/harness/types.d.ts +14 -1
- package/dist/harness/writers/claude-code-subagent.d.ts +3 -1
- package/dist/hooks/index.d.ts +0 -5
- package/dist/index.js +562 -1314
- package/dist/mcp/index.d.ts +1 -2
- package/package.json +17 -12
- package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +50 -0
- package/plugin/.claude-plugin/plugin.json +8 -0
- package/plugin/.codex-plugin/.thoth-agents-plugin-assets.json +16 -0
- package/plugin/.codex-plugin/plugin.json +7 -0
- package/plugin/.mcp.json +19 -0
- package/plugin/agents/deep.md +89 -0
- package/plugin/agents/designer.md +89 -0
- package/plugin/agents/explorer.md +90 -0
- package/plugin/agents/librarian.md +90 -0
- package/plugin/agents/oracle.md +92 -0
- package/plugin/agents/orchestrator.md +128 -0
- package/plugin/agents/quick.md +89 -0
- package/plugin/codex.mcp.json +17 -0
- package/plugin/settings.json +3 -0
- package/plugin/skills/thoth-archive/SKILL.md +40 -0
- package/plugin/skills/thoth-archive/scripts/archive.mjs +748 -0
- package/plugin/skills/thoth-constitution/SKILL.md +45 -0
- package/plugin/skills/thoth-constitution/scripts/validate.mjs +167 -0
- package/plugin/skills/thoth-constitution/templates/constitution.md +54 -0
- package/plugin/skills/thoth-init/SKILL.md +30 -0
- package/plugin/skills/thoth-init/scripts/init.mjs +141 -0
- package/plugin/skills/thoth-sdd/SKILL.md +83 -0
- package/plugin/skills/thoth-sdd/references/phases/analyze.md +21 -0
- package/plugin/skills/thoth-sdd/references/phases/checklist.md +20 -0
- package/plugin/skills/thoth-sdd/references/phases/clarify.md +15 -0
- package/plugin/skills/thoth-sdd/references/phases/converge.md +14 -0
- package/plugin/skills/thoth-sdd/references/phases/explore.md +10 -0
- package/plugin/skills/thoth-sdd/references/phases/implement.md +19 -0
- package/plugin/skills/thoth-sdd/references/phases/plan.md +15 -0
- package/plugin/skills/thoth-sdd/references/phases/specify.md +21 -0
- package/plugin/skills/thoth-sdd/references/phases/tasks.md +20 -0
- package/plugin/skills/thoth-sdd/references/phases/verify.md +22 -0
- package/plugin/skills/thoth-sdd/scripts/validate.mjs +1117 -0
- package/plugin/skills/thoth-sdd/templates/archive-report.md +25 -0
- package/plugin/skills/thoth-sdd/templates/checklist.md +27 -0
- package/plugin/skills/thoth-sdd/templates/plan.md +38 -0
- package/plugin/skills/thoth-sdd/templates/spec.md +54 -0
- package/plugin/skills/thoth-sdd/templates/tasks.md +29 -0
- package/plugin/skills/thoth-sdd/templates/verify-report.md +28 -0
- package/skills/README.md +12 -0
- package/skills/thoth-archive/SKILL.md +40 -0
- package/skills/thoth-archive/scripts/archive.mjs +748 -0
- package/skills/thoth-constitution/SKILL.md +45 -0
- package/skills/thoth-constitution/scripts/validate.mjs +167 -0
- package/skills/thoth-constitution/templates/constitution.md +54 -0
- package/skills/thoth-init/SKILL.md +30 -0
- package/skills/thoth-init/scripts/init.mjs +141 -0
- package/skills/thoth-sdd/SKILL.md +83 -0
- package/skills/thoth-sdd/references/phases/analyze.md +21 -0
- package/skills/thoth-sdd/references/phases/checklist.md +20 -0
- package/skills/thoth-sdd/references/phases/clarify.md +15 -0
- package/skills/thoth-sdd/references/phases/converge.md +14 -0
- package/skills/thoth-sdd/references/phases/explore.md +10 -0
- package/skills/thoth-sdd/references/phases/implement.md +19 -0
- package/skills/thoth-sdd/references/phases/plan.md +15 -0
- package/skills/thoth-sdd/references/phases/specify.md +21 -0
- package/skills/thoth-sdd/references/phases/tasks.md +20 -0
- package/skills/thoth-sdd/references/phases/verify.md +22 -0
- package/skills/thoth-sdd/scripts/validate.mjs +1117 -0
- package/skills/thoth-sdd/templates/archive-report.md +25 -0
- package/skills/thoth-sdd/templates/checklist.md +27 -0
- package/skills/thoth-sdd/templates/plan.md +38 -0
- package/skills/thoth-sdd/templates/spec.md +54 -0
- package/skills/thoth-sdd/templates/tasks.md +29 -0
- package/skills/thoth-sdd/templates/verify-report.md +28 -0
- package/thoth-agents.schema.json +0 -39
- package/dist/chunk-OZE7JVGS.js +0 -2344
- package/dist/cli/custom-skills.d.ts +0 -49
- package/dist/cli/skill-manifest.d.ts +0 -32
- package/dist/harness/core/skills.d.ts +0 -211
- package/dist/harness/generate-codex-plugin.d.ts +0 -9
- package/dist/harness/writers/claude-code-skill-layout.d.ts +0 -16
- package/dist/harness/writers/fs-skill-collect.d.ts +0 -7
- package/dist/harness/writers/skill-layout.d.ts +0 -16
- package/dist/hooks/chat-headers.d.ts +0 -16
- package/dist/hooks/phase-reminder/index.d.ts +0 -28
- package/dist/hooks/post-read-nudge/index.d.ts +0 -18
- package/dist/hooks/skill-sync.d.ts +0 -10
- package/dist/hooks/thoth-mem/index.d.ts +0 -46
- package/dist/hooks/thoth-mem/protocol.d.ts +0 -7
- package/dist/mcp/thoth.d.ts +0 -3
- package/dist/sdd/artifact-governance/artifact-loader.d.ts +0 -130
- package/dist/sdd/artifact-governance/index.d.ts +0 -6
- package/dist/sdd/artifact-governance/tasks-validator.d.ts +0 -17
- package/dist/sdd/artifact-governance/types.d.ts +0 -52
- package/dist/thoth/client.d.ts +0 -14
- package/dist/thoth/index.d.ts +0 -2
- package/src/skills/_shared/openspec-convention.md +0 -350
- package/src/skills/_shared/persistence-contract.md +0 -163
- package/src/skills/_shared/thoth-mem-convention.md +0 -123
- package/src/skills/executing-plans/SKILL.md +0 -288
- package/src/skills/plan-reviewer/SKILL.md +0 -219
- package/src/skills/requirements-interview/SKILL.md +0 -233
- package/src/skills/sdd-apply/SKILL.md +0 -89
- package/src/skills/sdd-archive/SKILL.md +0 -92
- package/src/skills/sdd-clarify/SKILL.md +0 -105
- package/src/skills/sdd-constitution/SKILL.md +0 -107
- package/src/skills/sdd-design/SKILL.md +0 -155
- package/src/skills/sdd-init/SKILL.md +0 -233
- package/src/skills/sdd-propose/SKILL.md +0 -101
- package/src/skills/sdd-spec/SKILL.md +0 -136
- package/src/skills/sdd-tasks/SKILL.md +0 -232
- package/src/skills/sdd-verify/SKILL.md +0 -131
- package/src/skills/thoth-mem-agents/SKILL.md +0 -210
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# thoth-mem Convention
|
|
2
|
-
|
|
3
|
-
## Harness Scope
|
|
4
|
-
|
|
5
|
-
This convention defines harness-neutral thoth-mem semantics for SDD artifacts.
|
|
6
|
-
Use the thoth-mem MCP surface as the portable vocabulary:
|
|
7
|
-
`mem_recall`, `mem_save`, `mem_context`, `mem_get`, `mem_project`, and
|
|
8
|
-
`mem_session`.
|
|
9
|
-
|
|
10
|
-
If a needed operation is unavailable in the active runtime, report the
|
|
11
|
-
unsupported capability and do not pretend persistence/recovery succeeded.
|
|
12
|
-
|
|
13
|
-
Governance that a harness cannot hard-enforce remains instruction-level:
|
|
14
|
-
role ownership, parent session/project scoping, prompt-save prohibitions, and
|
|
15
|
-
SDD namespace protection.
|
|
16
|
-
|
|
17
|
-
Root-owned delegation handoffs follow the same rule: handoff bodies stay in
|
|
18
|
-
root-owned summary/checkpoint memory when available; subagent prompts carry only
|
|
19
|
-
task instructions plus parent-scoped recovery instructions.
|
|
20
|
-
|
|
21
|
-
## Mode Scope
|
|
22
|
-
|
|
23
|
-
This convention applies only when the artifact store mode includes thoth-mem:
|
|
24
|
-
`thoth-mem` and `hybrid`.
|
|
25
|
-
|
|
26
|
-
- In `openspec` mode, skip thoth-mem saves.
|
|
27
|
-
- In `openspec` mode, skip thoth-mem recovery and use filesystem artifacts.
|
|
28
|
-
|
|
29
|
-
## Tool Names
|
|
30
|
-
|
|
31
|
-
Use callable names exposed by the active runtime, mapped to the six-tool MCP
|
|
32
|
-
surface above.
|
|
33
|
-
|
|
34
|
-
## Topic Key Format
|
|
35
|
-
|
|
36
|
-
All SDD artifacts use this deterministic pattern:
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
sdd/{change-name}/{artifact}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Supported artifact names:
|
|
43
|
-
|
|
44
|
-
- `proposal`
|
|
45
|
-
- `spec`
|
|
46
|
-
- `design`
|
|
47
|
-
- `design-brief`
|
|
48
|
-
- `tasks`
|
|
49
|
-
- `plan-review`
|
|
50
|
-
- `apply-progress`
|
|
51
|
-
- `verify-report`
|
|
52
|
-
- `archive-report`
|
|
53
|
-
- `state`
|
|
54
|
-
|
|
55
|
-
Use the same value for `title` and `topic_key` unless there is a strong reason
|
|
56
|
-
not to.
|
|
57
|
-
|
|
58
|
-
## State Artifact Format
|
|
59
|
-
|
|
60
|
-
The orchestrator semantic role persists a lightweight state checkpoint after
|
|
61
|
-
each SDD phase transition to enable recovery:
|
|
62
|
-
|
|
63
|
-
```yaml
|
|
64
|
-
change: {change-name}
|
|
65
|
-
phase: {last-completed-phase}
|
|
66
|
-
mode: {thoth-mem|openspec|hybrid|none}
|
|
67
|
-
pipeline: {accelerated|full}
|
|
68
|
-
artifacts:
|
|
69
|
-
proposal: true
|
|
70
|
-
spec: false # always false in accelerated pipeline
|
|
71
|
-
design: false # always false in accelerated pipeline
|
|
72
|
-
tasks: false
|
|
73
|
-
plan-review: false
|
|
74
|
-
apply-progress: false
|
|
75
|
-
verify-report: false
|
|
76
|
-
archive-report: false
|
|
77
|
-
last_updated: {ISO 8601 timestamp}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Persist with `mem_save` using canonical SDD topic keys and required metadata:
|
|
81
|
-
`title`, `topic_key`, `type`, `project`, `scope`, and `content`.
|
|
82
|
-
|
|
83
|
-
Recovery path for state artifacts:
|
|
84
|
-
`mem_recall(mode="compact", query="topic_key:sdd/{change-name}/state")` ->
|
|
85
|
-
`mem_recall(mode="context", query="topic_key:sdd/{change-name}/state")` when needed ->
|
|
86
|
-
`mem_get(id=...)` (or `mem_get(include_timeline=true)` when chronology matters) ->
|
|
87
|
-
parse YAML -> restore phase state.
|
|
88
|
-
|
|
89
|
-
## Recall Funnel Protocol
|
|
90
|
-
|
|
91
|
-
For delegated handoffs, subagents may use recall only when dispatch includes
|
|
92
|
-
both parent `session_id` and `project`.
|
|
93
|
-
|
|
94
|
-
1. `mem_recall(mode="compact")` with exact topic-key query for token-efficient
|
|
95
|
-
IDs and ranking.
|
|
96
|
-
2. `mem_recall(mode="context")` to expand strongest hits into retrieved text.
|
|
97
|
-
3. `mem_get(id=...)` to retrieve full artifact content; use
|
|
98
|
-
`mem_get(include_timeline=true)` when chronology matters.
|
|
99
|
-
|
|
100
|
-
Use HyDE/fused hybrid recall (sentence + chunk vectors, FTS, KG enrichment) for
|
|
101
|
-
semantic or ambiguous searches; set `mem_recall` `limit` from 1 to 20; narrow
|
|
102
|
-
with `topic_key`, `type`, `time_from`, `time_to`, `scope`, `project`, and
|
|
103
|
-
`session_id` filters. Use `mem_get` with `kind="observation"|"prompt"`,
|
|
104
|
-
`include_timeline=true` plus `before`/`after`, and `offset`/`max_length` for
|
|
105
|
-
large content. Use `mem_context(recall_query=...)` or bounded
|
|
106
|
-
`mem_project(action="graph"|"topics"|"topic")` for supplemental project
|
|
107
|
-
context; `mem_project(action="graph")` relations are `HAS_TYPE`, `IN_PROJECT`,
|
|
108
|
-
`HAS_TOPIC_KEY`, `HAS_WHAT`, `HAS_WHY`, `HAS_WHERE`, and `HAS_LEARNED`.
|
|
109
|
-
Supplemental context does not replace the recall funnel.
|
|
110
|
-
|
|
111
|
-
## Save Contract
|
|
112
|
-
|
|
113
|
-
**CRITICAL:** The orchestrator must persist the `state` artifact after each SDD
|
|
114
|
-
phase transition for recovery.
|
|
115
|
-
|
|
116
|
-
Persist SDD artifacts with stable deterministic topic keys so repeated saves
|
|
117
|
-
upsert instead of duplicating. For `sdd-apply`, save `apply-progress` and
|
|
118
|
-
re-save updated `tasks` after checkbox changes.
|
|
119
|
-
|
|
120
|
-
Write-capable subagents may call `mem_save` only when dispatch explicitly
|
|
121
|
-
permits delegated durable implementation observations or deterministic SDD
|
|
122
|
-
artifact writes under parent session/project. General observations stay outside
|
|
123
|
-
`sdd/*`; deterministic SDD artifacts keep `sdd/{change-name}/{artifact}`.
|
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: executing-plans
|
|
3
|
-
description: Execute SDD task lists with real-time progress tracking, sub-agent dispatch, and verification checkpoints.
|
|
4
|
-
metadata:
|
|
5
|
-
author: thoth-agents
|
|
6
|
-
version: '1.0'
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Executing Plans Skill
|
|
10
|
-
|
|
11
|
-
Use this skill to execute an existing SDD task list end to end while keeping
|
|
12
|
-
task progress durable, ordered, and verifiable.
|
|
13
|
-
|
|
14
|
-
## Shared Conventions
|
|
15
|
-
|
|
16
|
-
- [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
|
|
17
|
-
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
18
|
-
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
19
|
-
|
|
20
|
-
## Progress Tracking Invariants
|
|
21
|
-
|
|
22
|
-
The orchestrator owns task progress tracking.
|
|
23
|
-
|
|
24
|
-
- The orchestrator marks `- [ ]` to `- [~]` before dispatching execution work.
|
|
25
|
-
- The orchestrator marks `- [~]` to `- [x]` only after successful results are
|
|
26
|
-
received and verified.
|
|
27
|
-
- The orchestrator marks `- [-]` with a clear reason when a task is skipped or
|
|
28
|
-
fails after escalation.
|
|
29
|
-
- Sub-agents execute assigned work and return structured results. They do not
|
|
30
|
-
own checkbox updates.
|
|
31
|
-
- Same-agent execution batches are allowed when consecutive ready tasks share
|
|
32
|
-
dependencies, scope, and verification context.
|
|
33
|
-
- For a same-agent batch, keep checkbox state per task: mark each batched task
|
|
34
|
-
`- [~]` before dispatch, and later mark each task `- [x]` or `- [-]` only
|
|
35
|
-
from task-specific evidence in the returned result.
|
|
36
|
-
- Never proceed without updating the current task state first.
|
|
37
|
-
- Re-read the canonical tasks artifact after each edit to confirm persistence.
|
|
38
|
-
- Persistence mode determines target stores: `openspec` → file only,
|
|
39
|
-
`thoth-mem` → memory only, `hybrid` → both. Never skip a store that the
|
|
40
|
-
active mode requires.
|
|
41
|
-
- The artifact governance validator is outside this skill's responsibility.
|
|
42
|
-
If present, it is a report-only checkpoint after `sdd-tasks` and before a
|
|
43
|
-
future `sdd-apply` entrypoint; it does not change checkbox state or task
|
|
44
|
-
ownership.
|
|
45
|
-
- `openspec/` files are coordination artifacts, not source code. The
|
|
46
|
-
orchestrator may read and edit them directly for progress tracking and state
|
|
47
|
-
management only when the active mode includes openspec artifacts.
|
|
48
|
-
- Keep visible task state on the active progress tracking surface while
|
|
49
|
-
preserving the canonical task artifact. Use the visible progress surface
|
|
50
|
-
when available, plus the same canonical `tasks.md` and/or thoth-mem artifacts.
|
|
51
|
-
- Task state updates are NOT optional and NOT deferred — they happen in
|
|
52
|
-
real-time as execution proceeds.
|
|
53
|
-
- Every state transition (pending→in-progress, in-progress→completed,
|
|
54
|
-
in-progress→skipped) MUST be persisted BEFORE moving on.
|
|
55
|
-
- Real-time tracking is a hard invariant, not a best practice. Deferred updates
|
|
56
|
-
are a protocol violation, and batch dispatches must still record each task's
|
|
57
|
-
state transition before and after the delegated work.
|
|
58
|
-
|
|
59
|
-
## When to Use
|
|
60
|
-
|
|
61
|
-
- Executing an SDD task list
|
|
62
|
-
- Resuming work from a previous session
|
|
63
|
-
- Multi-task implementation with an existing change already defined
|
|
64
|
-
|
|
65
|
-
## Workflow
|
|
66
|
-
|
|
67
|
-
### Phase 1: Load
|
|
68
|
-
|
|
69
|
-
1. Determine the artifact store mode from config before reading or writing any
|
|
70
|
-
SDD artifacts.
|
|
71
|
-
2. Load task artifacts using mode-aware retrieval:
|
|
72
|
-
- `openspec`/`hybrid`: scan `openspec/changes/` for active changes and read
|
|
73
|
-
`tasks.md`.
|
|
74
|
-
- `thoth-mem`: recover tasks via the recall funnel
|
|
75
|
-
(`mem_recall(mode="compact")` -> `mem_recall(mode="context")` ->
|
|
76
|
-
`mem_get(...)`) using topic key `sdd/{change-name}/tasks`; use
|
|
77
|
-
`mem_get(include_timeline=true)` when task chronology matters.
|
|
78
|
-
3. Find the first unchecked task in state `- [ ]` or `- [~]`.
|
|
79
|
-
4. Build a mental model of the plan: total tasks, remaining work,
|
|
80
|
-
parallelizable work, and dependency order.
|
|
81
|
-
5. Load remaining SDD context using mode-aware retrieval in
|
|
82
|
-
[../_shared/persistence-contract.md](../_shared/persistence-contract.md).
|
|
83
|
-
|
|
84
|
-
### Phase 2: Execute Ready Work
|
|
85
|
-
|
|
86
|
-
#### A. Mark In-Progress
|
|
87
|
-
|
|
88
|
-
Before dispatching a task or same-agent batch:
|
|
89
|
-
|
|
90
|
-
1. Select the next ready task, or the next consecutive ready tasks that target
|
|
91
|
-
the same execution agent and can safely be handled in one dispatch.
|
|
92
|
-
- **`[P]` parallel batch (toggle-gated)**: when `rules.tasks.parallel_markers`
|
|
93
|
-
is enabled, consume contiguous `[P]`-marked tasks WITHIN the same phase that
|
|
94
|
-
target the same execution role as one explicit parallel batch (an upgrade of
|
|
95
|
-
the implicit same-agent grouping, not a cross-role scheduler). For
|
|
96
|
-
`[P]` tasks that touch overlapping files, recommend worktree isolation per
|
|
97
|
-
concurrent writer (or serialize them) to avoid write conflicts; a harness
|
|
98
|
-
without concurrent dispatch treats the `[P]` batch as an annotated
|
|
99
|
-
sequential batch and reports the capability gap.
|
|
100
|
-
- **Back-compat fallback**: when `parallel_markers` is off OR no `[P]` markers
|
|
101
|
-
are present, fall back to today's implicit consecutive + same-agent grouping
|
|
102
|
-
unchanged.
|
|
103
|
-
2. Edit the canonical tasks artifact and change each selected task from
|
|
104
|
-
`- [ ]` to `- [~]`.
|
|
105
|
-
3. If the mode is `thoth-mem` or `hybrid`, re-persist the updated tasks
|
|
106
|
-
artifact with topic key `sdd/{change-name}/tasks`.
|
|
107
|
-
4. Re-read `tasks.md` after the edit to confirm the change persisted.
|
|
108
|
-
|
|
109
|
-
#### B. Dispatch
|
|
110
|
-
|
|
111
|
-
Choose the semantic execution role based on task type. Preserve the role
|
|
112
|
-
boundary even when the active harness uses different invocation syntax:
|
|
113
|
-
|
|
114
|
-
| Need | Semantic role |
|
|
115
|
-
| --- | --- |
|
|
116
|
-
| Broad codebase discovery | explorer |
|
|
117
|
-
| External docs or APIs | librarian |
|
|
118
|
-
| Architecture or debugging | oracle |
|
|
119
|
-
| UI or UX work | designer |
|
|
120
|
-
| Simple, precise changes | quick |
|
|
121
|
-
| Complex, multi-file changes | deep |
|
|
122
|
-
|
|
123
|
-
Prefer one dispatch for consecutive ready tasks assigned to the same execution
|
|
124
|
-
role, especially repeated UI/UX work for designer, repeated narrow edits for
|
|
125
|
-
quick, or related implementation tasks for deep.
|
|
126
|
-
|
|
127
|
-
Every dispatch prompt MUST include these 6 parts:
|
|
128
|
-
|
|
129
|
-
1. `TASKS` — exact task number(s) and title(s)
|
|
130
|
-
2. `CONTEXT` — relevant proposal, spec, design, and prior-task state
|
|
131
|
-
3. `REQUIREMENTS` — concrete outcomes and constraints
|
|
132
|
-
4. `BOUNDARIES` — files, scope limits, and non-goals
|
|
133
|
-
5. `VERIFICATION` — checks the sub-agent must run or report
|
|
134
|
-
6. `RETURN ENVELOPE` — the exact structured response contract in this skill
|
|
135
|
-
|
|
136
|
-
`BOUNDARIES` must not contradict accepted proposal or spec scope. Use it to
|
|
137
|
-
limit the current assigned task, not to redefine the approved change scope.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
#### B.1 Traceability Fields (optional, back-compatible)
|
|
141
|
-
|
|
142
|
-
When a task carries the optional `sdd-tasks` traceability fields, SURFACE them
|
|
143
|
-
during dispatch:
|
|
144
|
-
|
|
145
|
-
- `[USN-<n>]` story id and `Priority:` (P1/P2/P3) — include in the dispatch
|
|
146
|
-
`CONTEXT`/`TASKS` so the executing agent knows the story grouping and priority.
|
|
147
|
-
- `Independent Test:` — pass into the dispatch `VERIFICATION` as the in-isolation
|
|
148
|
-
acceptance check for that task.
|
|
149
|
-
- `Spec:` trace tag — include as the requirement the task implements.
|
|
150
|
-
|
|
151
|
-
These fields are OPTIONAL. A legacy `tasks.md` whose tasks lack `[USN]`,
|
|
152
|
-
priority, `Independent Test`, or `Spec:` MUST still execute without error: treat
|
|
153
|
-
the absent fields as optional and proceed using the task title and
|
|
154
|
-
`Verification` block alone. Never fail or block a task solely because a
|
|
155
|
-
traceability field is missing.
|
|
156
|
-
|
|
157
|
-
#### C. Receive and Verify
|
|
158
|
-
|
|
159
|
-
Read the sub-agent return envelope and respond by status:
|
|
160
|
-
|
|
161
|
-
- `completed`: inspect the reported file changes, run verification checks, and
|
|
162
|
-
confirm every task's acceptance criteria were actually met.
|
|
163
|
-
- `failed`: assess the blocker, decide whether to retry with sharper guidance,
|
|
164
|
-
switch agents, or escalate.
|
|
165
|
-
- `partial`: assess what is already done, preserve that context, and dispatch a
|
|
166
|
-
focused follow-up for the remainder.
|
|
167
|
-
|
|
168
|
-
#### D. Mark Complete
|
|
169
|
-
|
|
170
|
-
After verified completion:
|
|
171
|
-
|
|
172
|
-
1. Edit the canonical tasks artifact and change each verified task from
|
|
173
|
-
`- [~]` to `- [x]`. If a batched result only completed some tasks, update
|
|
174
|
-
only those tasks and keep the rest in progress, skipped, or retryable based
|
|
175
|
-
on evidence.
|
|
176
|
-
2. If the mode is `thoth-mem` or `hybrid`, re-persist the updated tasks
|
|
177
|
-
artifact under `sdd/{change-name}/tasks`.
|
|
178
|
-
3. Persist a progress checkpoint under `sdd/{change-name}/apply-progress` when
|
|
179
|
-
the mode includes thoth-mem.
|
|
180
|
-
4. Re-read `tasks.md` after the edit to confirm the completed state persisted.
|
|
181
|
-
|
|
182
|
-
#### E. Auto-Continue
|
|
183
|
-
|
|
184
|
-
Immediately proceed to the next task.
|
|
185
|
-
|
|
186
|
-
Do not ask the user whether execution should continue unless one of these is
|
|
187
|
-
true:
|
|
188
|
-
|
|
189
|
-
- the work is truly blocked
|
|
190
|
-
- a critical failure prevents safe continuation
|
|
191
|
-
- the current task or batch has failed 3 consecutive times
|
|
192
|
-
|
|
193
|
-
### Phase 3: Between Tasks
|
|
194
|
-
|
|
195
|
-
Between every task or same-agent batch:
|
|
196
|
-
|
|
197
|
-
1. Re-read `tasks.md` because later tasks may depend on earlier outputs.
|
|
198
|
-
2. Re-check that assumptions still hold.
|
|
199
|
-
3. If a prior task introduced breakage, fix that before starting the next task.
|
|
200
|
-
|
|
201
|
-
### Phase 4: Escalation Policy
|
|
202
|
-
|
|
203
|
-
- Attempt 1: re-dispatch the same task with explicit fix instructions and the
|
|
204
|
-
missing evidence called out.
|
|
205
|
-
- Attempt 2: switch to a different agent or fix directly when appropriate.
|
|
206
|
-
- Attempt 3: make one final targeted attempt with narrowed scope.
|
|
207
|
-
- "Narrowed scope" means a narrower recovery attempt for the assigned task
|
|
208
|
-
only. It must not redefine accepted proposal or spec scope for the change.
|
|
209
|
-
- After 3 consecutive failures, mark the task `- [-]` with a clear reason and
|
|
210
|
-
escalate to the user.
|
|
211
|
-
|
|
212
|
-
### Phase 5: Completion
|
|
213
|
-
|
|
214
|
-
After the task list is complete:
|
|
215
|
-
|
|
216
|
-
1. Run final verification using the project's configured instructions and the
|
|
217
|
-
smallest sufficient checks: typecheck, tests, lint, and build when
|
|
218
|
-
appropriate.
|
|
219
|
-
2. Report a completion summary with evidence.
|
|
220
|
-
3. If the work is SDD-backed, hand off to the bounded verify-loop rather
|
|
221
|
-
than a single verify shot: dispatch `sdd-verify` as an iterative gate and
|
|
222
|
-
branch on its verdict — `fail` triggers a targeted fix scoped by the
|
|
223
|
-
report's remediation anchors and a re-verify; `pass with warnings` and a
|
|
224
|
-
bound-exhausting `fail` escalate to the user; a clean `pass` proceeds to
|
|
225
|
-
archive. The loop is capped by the 3-round bound defined in the
|
|
226
|
-
orchestrator SDD wording (the canonical source of the round number).
|
|
227
|
-
|
|
228
|
-
## Return Envelope Contract
|
|
229
|
-
|
|
230
|
-
Every execution sub-agent MUST return this exact structure:
|
|
231
|
-
|
|
232
|
-
```markdown
|
|
233
|
-
## Task Result
|
|
234
|
-
|
|
235
|
-
**Status**: completed | failed | partial
|
|
236
|
-
**Tasks**: {task number(s) and name(s)}
|
|
237
|
-
|
|
238
|
-
### What was done
|
|
239
|
-
- {concrete change 1}
|
|
240
|
-
- {concrete change 2}
|
|
241
|
-
|
|
242
|
-
### Per-task outcome
|
|
243
|
-
- `{task number}` — completed | failed | partial: {task-specific evidence}
|
|
244
|
-
|
|
245
|
-
### Files changed
|
|
246
|
-
- `path/to/file.ts` — {what changed}
|
|
247
|
-
|
|
248
|
-
### Verification
|
|
249
|
-
- {check 1}: passed | failed
|
|
250
|
-
- {check 2}: passed | failed
|
|
251
|
-
|
|
252
|
-
### Issues (if any)
|
|
253
|
-
- {issue description} — {severity: critical | important | minor}
|
|
254
|
-
|
|
255
|
-
### Failure reason (if failed)
|
|
256
|
-
{Why it failed, what was attempted, what blocked progress}
|
|
257
|
-
|
|
258
|
-
### Skip reason (if skipped)
|
|
259
|
-
{Why it was skipped, what prerequisite is missing}
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Treat missing sections or vague summaries as incomplete execution results.
|
|
263
|
-
|
|
264
|
-
## Recovery Protocol
|
|
265
|
-
|
|
266
|
-
To resume safely:
|
|
267
|
-
|
|
268
|
-
1. Determine the artifact store mode from config.
|
|
269
|
-
2. Recover task state using mode-aware retrieval:
|
|
270
|
-
- `openspec`: read `openspec/changes/{change-name}/tasks.md`.
|
|
271
|
-
- `thoth-mem`: recover `sdd/{change-name}/tasks` and
|
|
272
|
-
`sdd/{change-name}/apply-progress` via the recall funnel
|
|
273
|
-
(`mem_recall(mode="compact")` -> `mem_recall(mode="context")` ->
|
|
274
|
-
`mem_get(...)`); use `mem_get(include_timeline=true)` when task chronology
|
|
275
|
-
matters.
|
|
276
|
-
- `hybrid`: do both recovery paths and prefer thoth-mem as the source of
|
|
277
|
-
truth if state diverges.
|
|
278
|
-
3. Resume from the first task marked `- [ ]` or `- [~]`.
|
|
279
|
-
|
|
280
|
-
## Guardrails
|
|
281
|
-
|
|
282
|
-
- Do not execute tasks out of dependency order.
|
|
283
|
-
- Do not mark a task complete without verification evidence.
|
|
284
|
-
- Do not skip SDD context recovery.
|
|
285
|
-
- Do not modify task-list structure; only update checkbox state and explicit skip
|
|
286
|
-
reasons.
|
|
287
|
-
- Do not continue past a blocked task without escalation.
|
|
288
|
-
- Do not claim completion without evidence.
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plan-reviewer
|
|
3
|
-
description: Review SDD task plans for execution blockers and return [OKAY] or [REJECT].
|
|
4
|
-
metadata:
|
|
5
|
-
author: thoth-agents
|
|
6
|
-
version: '1.0'
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Plan Reviewer Skill
|
|
10
|
-
|
|
11
|
-
Verify that an SDD task plan is executable, references valid files, and is safe
|
|
12
|
-
to hand to implementation.
|
|
13
|
-
|
|
14
|
-
## Shared Conventions
|
|
15
|
-
|
|
16
|
-
- [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
|
|
17
|
-
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
18
|
-
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
19
|
-
|
|
20
|
-
## Purpose
|
|
21
|
-
|
|
22
|
-
Review the tasks artifact for true execution blockers. Retrieve it according to
|
|
23
|
-
the persistence mode: read `openspec/changes/{change-name}/tasks.md` for
|
|
24
|
-
openspec/hybrid modes, use the thoth-mem recall funnel
|
|
25
|
-
(`mem_recall(mode="compact")` -> `mem_recall(mode="context")` ->
|
|
26
|
-
`mem_get(...)`) for thoth-mem/hybrid modes, or read from inline context for none
|
|
27
|
-
mode.
|
|
28
|
-
|
|
29
|
-
The artifact governance validator is not part of this review. Plan-reviewer is
|
|
30
|
-
only the pre-execution approval gate for the task plan; it does not run the
|
|
31
|
-
validator, enforce its findings, or manage the future pre-`sdd-apply` handoff.
|
|
32
|
-
Plan-reviewer remains read-only: it returns the durable review payload, while the
|
|
33
|
-
orchestrator or `quick` persistence helper writes `plan-review.md` and/or
|
|
34
|
-
`sdd/{change-name}/plan-review` when the selected persistence mode requires it.
|
|
35
|
-
Invoke the semantic oracle role through the available role dispatch surface.
|
|
36
|
-
|
|
37
|
-
Focus on whether the plan can be executed as written, not whether you would have
|
|
38
|
-
designed it differently.
|
|
39
|
-
|
|
40
|
-
## Inputs
|
|
41
|
-
|
|
42
|
-
- `change-name`
|
|
43
|
-
- `pipeline-type` (`accelerated` or `full`)
|
|
44
|
-
- `persistence-mode` (`thoth-mem`, `openspec`, `hybrid`, or `none`)
|
|
45
|
-
- Tasks artifact (retrieved per persistence mode: filesystem for openspec/hybrid,
|
|
46
|
-
thoth-mem for thoth-mem/hybrid, inline for none)
|
|
47
|
-
- **Full pipeline**: related spec and design artifacts when needed for dependency checks
|
|
48
|
-
- **Accelerated pipeline**: proposal artifact when needed for dependency checks
|
|
49
|
-
|
|
50
|
-
## Task State Awareness
|
|
51
|
-
|
|
52
|
-
Recognize these checklist states in `tasks.md`:
|
|
53
|
-
|
|
54
|
-
- `- [ ]` pending
|
|
55
|
-
- `- [~]` in progress
|
|
56
|
-
- `- [x]` completed
|
|
57
|
-
- `- [-]` skipped with reason
|
|
58
|
-
|
|
59
|
-
Review executability of the remaining work. If a task is marked `- [-]`, ensure
|
|
60
|
-
the skip reason is explicit and does not hide a blocker.
|
|
61
|
-
|
|
62
|
-
## Review Checklist
|
|
63
|
-
|
|
64
|
-
Check only what affects executability:
|
|
65
|
-
|
|
66
|
-
1. Referenced file paths exist when they are supposed to already exist.
|
|
67
|
-
2. New-file tasks use exact intended paths.
|
|
68
|
-
3. Tasks reference exact file paths instead of vague areas.
|
|
69
|
-
4. Each task includes a `Verification` section.
|
|
70
|
-
5. Each `Verification` section includes both:
|
|
71
|
-
- `Run:`
|
|
72
|
-
- `Expected:`
|
|
73
|
-
6. Dependency order is valid.
|
|
74
|
-
7. The sequence is workable without hidden prerequisite steps.
|
|
75
|
-
8. In-scope success criteria from the accepted proposal/spec are represented by
|
|
76
|
-
executable tasks.
|
|
77
|
-
9. Deferred or unresolved affected areas from the accepted proposal/spec have
|
|
78
|
-
required discovery, coordination, follow-up tasks, or an explicit execution
|
|
79
|
-
warning.
|
|
80
|
-
10. Task boundaries or non-goals do not contradict accepted proposal/spec
|
|
81
|
-
scope.
|
|
82
|
-
|
|
83
|
-
## Cross-Artifact Consistency Analysis
|
|
84
|
-
|
|
85
|
-
In addition to the executability review above, perform cross-artifact
|
|
86
|
-
consistency analysis across proposal <-> spec <-> design <-> tasks. This is NOT
|
|
87
|
-
a new pipeline phase; it rides inside this plan-review gate. All checks below
|
|
88
|
-
are gated by the corresponding `openspec/config.yaml rules:` sections; a section
|
|
89
|
-
that disables enforcement downgrades its block to a report.
|
|
90
|
-
|
|
91
|
-
### Severity model
|
|
92
|
-
|
|
93
|
-
Every consistency finding carries one severity:
|
|
94
|
-
|
|
95
|
-
- `CRITICAL` — a spec requirement with no mapping in tasks, an orphan task with
|
|
96
|
-
no spec/proposal basis, scope drift contradicting the accepted proposal, or a
|
|
97
|
-
direct contradiction between artifacts.
|
|
98
|
-
- `HIGH` / `MEDIUM` / `LOW` — weaker inconsistencies, ambiguity, or
|
|
99
|
-
presentation issues that are worth reporting but are not on their own
|
|
100
|
-
blocking.
|
|
101
|
-
|
|
102
|
-
Detect and report at least: requirements present in the spec but absent from
|
|
103
|
-
design or tasks; tasks with no spec basis; scope drift from the proposal; and
|
|
104
|
-
contradictory statements between artifacts.
|
|
105
|
-
|
|
106
|
-
### Requirement-coverage percentage
|
|
107
|
-
|
|
108
|
-
Compute and REPORT a requirement-coverage percentage in the review output
|
|
109
|
-
(gated by `rules.consistency.require_coverage_percentage`):
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
coverage % = (distinct spec requirements named by >=1 task `Spec:` tag)
|
|
113
|
-
/ (total `### Requirement:` headings across all delta specs)
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Parse `Spec:` trace tags from `tasks.md` and `### Requirement:` headings from
|
|
117
|
-
`openspec/changes/{change}/specs/*/spec.md`. Example: 8 of 10 requirements
|
|
118
|
-
covered -> report `80%`. When no `Spec:` tags are present (legacy tasks), report
|
|
119
|
-
coverage against what is present rather than failing.
|
|
120
|
-
|
|
121
|
-
### [NEEDS CLARIFICATION] cap enforcement
|
|
122
|
-
|
|
123
|
-
Flag any spec file containing more than `rules.clarification.max_markers_per_spec`
|
|
124
|
-
(default 3) `[NEEDS CLARIFICATION: ...]` markers. Exactly 3 is within the cap
|
|
125
|
-
and is NOT flagged; 4 or more is flagged as carrying too much unresolved
|
|
126
|
-
ambiguity to proceed cleanly.
|
|
127
|
-
|
|
128
|
-
### Constitution Check
|
|
129
|
-
|
|
130
|
-
Evaluate the design and plan against EACH principle in
|
|
131
|
-
`openspec/memory/constitution.md` (delegate-first coordination, read-only role
|
|
132
|
-
boundaries, governed persistence, multi-harness parity, evidence-led
|
|
133
|
-
verification). Report the specific violated principle(s). Gated by
|
|
134
|
-
`rules.constitution.enforce_check`; when disabled, note the skip in the output
|
|
135
|
-
and do not block.
|
|
136
|
-
|
|
137
|
-
### TDD ordering check
|
|
138
|
-
|
|
139
|
-
When `rules.tasks.tdd` is enabled, verify that within each phase every
|
|
140
|
-
implementation task that has a corresponding test task is PRECEDED by that test
|
|
141
|
-
task. Report a TDD-ordering finding for any implementation task that precedes
|
|
142
|
-
its test task. When `tasks.tdd` is disabled, impose no ordering constraint.
|
|
143
|
-
|
|
144
|
-
## Blocking Consistency and Constitution Gate
|
|
145
|
-
|
|
146
|
-
- Any `CRITICAL` consistency finding OR any Constitution violation BLOCKS
|
|
147
|
-
advancement past plan review (gated by `rules.consistency.enforce_block` and
|
|
148
|
-
`rules.constitution.enforce_check` respectively).
|
|
149
|
-
- Non-CRITICAL findings are reported but do not block on their own.
|
|
150
|
-
- The block is overridable ONLY through an explicit user decision delivered via
|
|
151
|
-
the harness blocking-input surface (the AskUserQuestion-equivalent primitive).
|
|
152
|
-
The override MUST be logged with the finding identity / violated principle and
|
|
153
|
-
the user's choice before advancement proceeds. If the harness lacks a
|
|
154
|
-
blocking-input primitive, report an unsupported-capability limitation rather
|
|
155
|
-
than silently downgrading the block.
|
|
156
|
-
- Express a blocking outcome through the existing `[REJECT]` token (or a listed
|
|
157
|
-
CRITICAL finding); a clean analysis adds no friction and proceeds via `[OKAY]`.
|
|
158
|
-
|
|
159
|
-
See `_shared/openspec-convention.md` (Consistency Severity and Coverage Model,
|
|
160
|
-
Constitution Governance, Clarification Discipline) for the canonical, harness-
|
|
161
|
-
agnostic definitions these checks implement.
|
|
162
|
-
|
|
163
|
-
## Decision Rules
|
|
164
|
-
|
|
165
|
-
- Default to `[OKAY]`.
|
|
166
|
-
- Use `[REJECT]` only for true blockers.
|
|
167
|
-
- A rejection may list at most 3 issues.
|
|
168
|
-
- Do not reject for style preferences or optional improvements.
|
|
169
|
-
- Preserve the exact `[OKAY]` and `[REJECT]` tokens across every runtime; they
|
|
170
|
-
are portable review semantics, not runtime-specific syntax.
|
|
171
|
-
|
|
172
|
-
## Output Format
|
|
173
|
-
|
|
174
|
-
Return the status token plus enough structured payload for durable persistence at
|
|
175
|
-
`openspec/changes/{change-name}/plan-review.md` and topic key
|
|
176
|
-
`sdd/{change-name}/plan-review` when the selected store includes those targets.
|
|
177
|
-
The persisted payload must preserve status, reviewer role, timestamp, pipeline,
|
|
178
|
-
persistence mode, comments, non-blocking notes, blockers, user override context
|
|
179
|
-
when applicable, and reviewed artifact freshness data. Use SHA-256 freshness
|
|
180
|
-
digests over reviewed artifact content when the coordinator asks for a concrete
|
|
181
|
-
manifest. Missing, stale, rejected, or unparsable saved evidence fails closed on
|
|
182
|
-
recovery. A fresh `[OKAY]` satisfies only plan-review; it is not implementation
|
|
183
|
-
confirmation.
|
|
184
|
-
|
|
185
|
-
If the plan is executable:
|
|
186
|
-
|
|
187
|
-
```text
|
|
188
|
-
[OKAY]
|
|
189
|
-
- Brief confirmation that the plan is executable.
|
|
190
|
-
- Optional note on any non-blocking caution.
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
If the plan has blockers:
|
|
194
|
-
|
|
195
|
-
```text
|
|
196
|
-
[REJECT]
|
|
197
|
-
1. <blocking issue>
|
|
198
|
-
2. <blocking issue>
|
|
199
|
-
3. <blocking issue>
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
For each rejected issue, include:
|
|
203
|
-
|
|
204
|
-
- why it blocks execution
|
|
205
|
-
- the smallest concrete fix
|
|
206
|
-
|
|
207
|
-
## Anti-Patterns
|
|
208
|
-
|
|
209
|
-
- No nitpicking.
|
|
210
|
-
- No style opinions.
|
|
211
|
-
- No design questioning.
|
|
212
|
-
- No architecture redesign.
|
|
213
|
-
- No expanding the scope of review beyond blockers.
|
|
214
|
-
- Do not return more than 3 rejection issues.
|
|
215
|
-
|
|
216
|
-
## Review Standard
|
|
217
|
-
|
|
218
|
-
Approve when a competent implementer can execute the plan without guessing about
|
|
219
|
-
critical paths, missing files, or missing verification instructions.
|