thoth-agents 0.1.0
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 +21 -0
- package/README.md +339 -0
- package/dist/agents/deep.d.ts +2 -0
- package/dist/agents/designer.d.ts +2 -0
- package/dist/agents/explorer.d.ts +2 -0
- package/dist/agents/index.d.ts +8 -0
- package/dist/agents/librarian.d.ts +2 -0
- package/dist/agents/oracle.d.ts +2 -0
- package/dist/agents/orchestrator.d.ts +15 -0
- package/dist/agents/prompt-dialects.d.ts +28 -0
- package/dist/agents/prompt-sections.d.ts +47 -0
- package/dist/agents/prompt-utils.d.ts +25 -0
- package/dist/agents/quick.d.ts +2 -0
- package/dist/cli/codex-config-io.d.ts +31 -0
- package/dist/cli/codex-install.d.ts +41 -0
- package/dist/cli/codex-paths.d.ts +29 -0
- package/dist/cli/config-io.d.ts +22 -0
- package/dist/cli/config-manager.d.ts +4 -0
- package/dist/cli/custom-skills.d.ts +48 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +4579 -0
- package/dist/cli/install.d.ts +3 -0
- package/dist/cli/model-key-normalization.d.ts +1 -0
- package/dist/cli/paths.d.ts +21 -0
- package/dist/cli/providers.d.ts +120 -0
- package/dist/cli/skill-manifest.d.ts +32 -0
- package/dist/cli/skills.d.ts +26 -0
- package/dist/cli/system.d.ts +6 -0
- package/dist/cli/types.d.ts +58 -0
- package/dist/config/constants.d.ts +17 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/loader.d.ts +33 -0
- package/dist/config/schema.d.ts +279 -0
- package/dist/config/utils.d.ts +10 -0
- package/dist/delegation/project-id.d.ts +10 -0
- package/dist/delegation/types.d.ts +39 -0
- package/dist/harness/adapters/codex-surfaces.d.ts +219 -0
- package/dist/harness/adapters/codex.d.ts +8 -0
- package/dist/harness/adapters/opencode.d.ts +10 -0
- package/dist/harness/codex-plugin-paths.d.ts +1 -0
- package/dist/harness/core/agent-pack.d.ts +88 -0
- package/dist/harness/core/memory-governance.d.ts +33 -0
- package/dist/harness/core/sdd.d.ts +100 -0
- package/dist/harness/core/skills.d.ts +183 -0
- package/dist/harness/generate-codex-plugin.d.ts +9 -0
- package/dist/harness/registry.d.ts +6 -0
- package/dist/harness/types.d.ts +85 -0
- package/dist/harness/writers/codex-plugin-package.d.ts +26 -0
- package/dist/harness/writers/codex-toml.d.ts +10 -0
- package/dist/harness/writers/skill-layout.d.ts +15 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +7 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +28 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +11 -0
- package/dist/hooks/auto-update-checker/index.d.ts +18 -0
- package/dist/hooks/auto-update-checker/types.d.ts +23 -0
- package/dist/hooks/chat-headers.d.ts +16 -0
- package/dist/hooks/delegate-task-retry/guidance.d.ts +2 -0
- package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
- package/dist/hooks/delegate-task-retry/index.d.ts +4 -0
- package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
- package/dist/hooks/foreground-fallback/index.d.ts +73 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
- package/dist/hooks/json-error-recovery/index.d.ts +1 -0
- package/dist/hooks/phase-reminder/index.d.ts +26 -0
- package/dist/hooks/post-read-nudge/index.d.ts +18 -0
- package/dist/hooks/skill-sync.d.ts +10 -0
- package/dist/hooks/thoth-mem/index.d.ts +46 -0
- package/dist/hooks/thoth-mem/protocol.d.ts +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6509 -0
- package/dist/mcp/context7.d.ts +7 -0
- package/dist/mcp/exa.d.ts +6 -0
- package/dist/mcp/grep-app.d.ts +7 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/thoth.d.ts +3 -0
- package/dist/mcp/types.d.ts +12 -0
- package/dist/sdd/artifact-governance/artifact-loader.d.ts +55 -0
- package/dist/sdd/artifact-governance/index.d.ts +6 -0
- package/dist/sdd/artifact-governance/tasks-validator.d.ts +17 -0
- package/dist/sdd/artifact-governance/types.d.ts +52 -0
- package/dist/thoth/client.d.ts +14 -0
- package/dist/thoth/index.d.ts +2 -0
- package/dist/tools/ast-grep/cli.d.ts +15 -0
- package/dist/tools/ast-grep/constants.d.ts +25 -0
- package/dist/tools/ast-grep/downloader.d.ts +5 -0
- package/dist/tools/ast-grep/index.d.ts +10 -0
- package/dist/tools/ast-grep/tools.d.ts +3 -0
- package/dist/tools/ast-grep/types.d.ts +30 -0
- package/dist/tools/ast-grep/utils.d.ts +4 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/lsp/client.d.ts +42 -0
- package/dist/tools/lsp/config-store.d.ts +29 -0
- package/dist/tools/lsp/config.d.ts +4 -0
- package/dist/tools/lsp/constants.d.ts +25 -0
- package/dist/tools/lsp/index.d.ts +4 -0
- package/dist/tools/lsp/tools.d.ts +5 -0
- package/dist/tools/lsp/types.d.ts +35 -0
- package/dist/tools/lsp/utils.d.ts +34 -0
- package/dist/utils/agent-variant.d.ts +47 -0
- package/dist/utils/env.d.ts +1 -0
- package/dist/utils/file-io.d.ts +3 -0
- package/dist/utils/frontmatter-yaml.d.ts +4 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/internal-initiator.d.ts +6 -0
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/polling.d.ts +21 -0
- package/dist/utils/subprocess.d.ts +24 -0
- package/dist/utils/tmux-session-manager.d.ts +63 -0
- package/dist/utils/tmux.d.ts +32 -0
- package/dist/utils/zip-extractor.d.ts +1 -0
- package/package.json +81 -0
- package/src/skills/_shared/openspec-convention.md +131 -0
- package/src/skills/_shared/persistence-contract.md +162 -0
- package/src/skills/_shared/thoth-mem-convention.md +124 -0
- package/src/skills/executing-plans/SKILL.md +245 -0
- package/src/skills/plan-reviewer/SKILL.md +115 -0
- package/src/skills/requirements-interview/SKILL.md +212 -0
- package/src/skills/sdd-apply/SKILL.md +89 -0
- package/src/skills/sdd-archive/SKILL.md +87 -0
- package/src/skills/sdd-design/SKILL.md +92 -0
- package/src/skills/sdd-init/SKILL.md +148 -0
- package/src/skills/sdd-propose/SKILL.md +89 -0
- package/src/skills/sdd-spec/SKILL.md +93 -0
- package/src/skills/sdd-tasks/SKILL.md +142 -0
- package/src/skills/sdd-verify/SKILL.md +99 -0
- package/src/skills/thoth-mem-agents/SKILL.md +355 -0
- package/thoth-agents.schema.json +470 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-archive
|
|
3
|
+
description: Merge completed deltas into main specs and archive the change.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Archive Skill
|
|
7
|
+
|
|
8
|
+
Close the SDD loop by promoting verified change specs into main specs and
|
|
9
|
+
recording an audit trail.
|
|
10
|
+
|
|
11
|
+
## Shared Conventions
|
|
12
|
+
|
|
13
|
+
- [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
|
|
14
|
+
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
15
|
+
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
16
|
+
|
|
17
|
+
## Persistence Mode
|
|
18
|
+
|
|
19
|
+
The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
|
|
20
|
+
`hybrid`). Follow the persistence contract for read/write rules per mode.
|
|
21
|
+
|
|
22
|
+
- `thoth-mem`: persist to thoth-mem only — do NOT create or modify
|
|
23
|
+
`openspec/` files.
|
|
24
|
+
- `openspec`: write files only — do NOT call thoth-mem save tools.
|
|
25
|
+
- `hybrid`: persist to both (default).
|
|
26
|
+
|
|
27
|
+
## When to Use
|
|
28
|
+
|
|
29
|
+
- The change has an acceptable verification report and is ready to close
|
|
30
|
+
- An archive attempt must be retried after an interrupted move or merge
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
- `change-name`
|
|
35
|
+
- `pipeline-type` (`accelerated` or `full`)
|
|
36
|
+
- Tasks artifact
|
|
37
|
+
- Verify report artifact
|
|
38
|
+
- Spec artifact (full pipeline only)
|
|
39
|
+
- Design artifact (full pipeline only)
|
|
40
|
+
- Proposal artifact (always — used for audit trail)
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
1. Read the shared conventions.
|
|
45
|
+
2. Recover artifacts through the retrieval protocol in
|
|
46
|
+
the persistence contract:
|
|
47
|
+
- **Always**: recover `proposal`, `tasks`, and `verify-report`
|
|
48
|
+
- **Full pipeline only**: recover `spec` and `design`
|
|
49
|
+
3. Refuse to archive if the verification report still contains unresolved
|
|
50
|
+
critical failures.
|
|
51
|
+
4. If the selected mode includes OpenSpec and the pipeline is full, merge
|
|
52
|
+
every change spec from
|
|
53
|
+
`openspec/changes/{change-name}/specs/{domain}/spec.md` into
|
|
54
|
+
`openspec/specs/{domain}/spec.md`. In accelerated pipeline, skip the
|
|
55
|
+
spec merge (no delta specs exist).
|
|
56
|
+
5. If the selected mode includes OpenSpec, move the completed change directory
|
|
57
|
+
to `openspec/changes/archive/YYYY-MM-DD-{change-name}/`.
|
|
58
|
+
6. Create an audit trail report summarizing merged domains, archive location,
|
|
59
|
+
verification lineage, and any mode-based skips.
|
|
60
|
+
7. In `thoth-mem` mode, do not create or move `openspec/` artifacts; record the
|
|
61
|
+
archive result only in the audit trail.
|
|
62
|
+
8. If the selected mode includes thoth-mem, persist the audit trail with:
|
|
63
|
+
|
|
64
|
+
Use the memory tool binding for `mem_save` with the canonical SDD topic key
|
|
65
|
+
and required metadata fields: `title`, `topic_key`, `type`, `project`,
|
|
66
|
+
`scope`, and `content`.
|
|
67
|
+
|
|
68
|
+
## Output Format
|
|
69
|
+
|
|
70
|
+
Return:
|
|
71
|
+
|
|
72
|
+
- `Change`
|
|
73
|
+
- `Archive Path`: `openspec/changes/archive/YYYY-MM-DD-{change-name}/`
|
|
74
|
+
- `Topic Key`: `sdd/{change-name}/archive-report`
|
|
75
|
+
- `Merged Specs`: list of domains updated in `openspec/specs/`
|
|
76
|
+
- `Audit Summary`: concise bullets
|
|
77
|
+
- `Status`: archived or blocked
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- Archive only after verification is acceptable.
|
|
82
|
+
- In full pipeline, merge delta specs before moving the change folder.
|
|
83
|
+
In accelerated pipeline, skip the spec merge (no delta specs exist).
|
|
84
|
+
- Preserve canonical spec structure and untouched requirements.
|
|
85
|
+
- Persist the final audit trail through thoth-mem when the selected mode
|
|
86
|
+
includes it.
|
|
87
|
+
- Use the retrieval protocol in the persistence contract for every dependency.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-design
|
|
3
|
+
description: Create `design.md` with architecture decisions and file changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Design Skill
|
|
7
|
+
|
|
8
|
+
Create the technical design that explains how the approved spec will be built.
|
|
9
|
+
|
|
10
|
+
## Shared Conventions
|
|
11
|
+
|
|
12
|
+
- [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
|
|
13
|
+
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
14
|
+
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
15
|
+
|
|
16
|
+
## Persistence Mode
|
|
17
|
+
|
|
18
|
+
The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
|
|
19
|
+
`hybrid`). Follow the persistence contract for read/write rules per mode.
|
|
20
|
+
|
|
21
|
+
- `thoth-mem`: persist to thoth-mem only — do NOT create or modify
|
|
22
|
+
`openspec/` files.
|
|
23
|
+
- `openspec`: write files only — do NOT call thoth-mem save tools.
|
|
24
|
+
- `hybrid`: persist to both (default).
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- Proposal and specs exist and implementation planning needs technical depth
|
|
29
|
+
- A prior design needs to be revised after spec changes
|
|
30
|
+
|
|
31
|
+
## Prerequisites
|
|
32
|
+
|
|
33
|
+
- `change-name`
|
|
34
|
+
- Proposal artifact
|
|
35
|
+
- Spec artifact
|
|
36
|
+
- Access to the repository code that will change
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
1. Read the shared conventions.
|
|
41
|
+
2. Recover `sdd/{change-name}/proposal` and `sdd/{change-name}/spec` using the
|
|
42
|
+
retrieval protocol in
|
|
43
|
+
the persistence contract.
|
|
44
|
+
3. If revising work, recover `sdd/{change-name}/design` with the same
|
|
45
|
+
mode-aware retrieval rules.
|
|
46
|
+
4. Read the actual code paths affected by the change before deciding on an
|
|
47
|
+
approach.
|
|
48
|
+
5. If the selected mode includes OpenSpec, write
|
|
49
|
+
`openspec/changes/{change-name}/design.md` using this structure. In
|
|
50
|
+
`thoth-mem` mode, produce the same content without creating the file:
|
|
51
|
+
|
|
52
|
+
```md
|
|
53
|
+
# Design: {Change Title}
|
|
54
|
+
|
|
55
|
+
## Technical Approach
|
|
56
|
+
## Architecture Decisions
|
|
57
|
+
### Decision: {Title}
|
|
58
|
+
**Choice**:
|
|
59
|
+
**Alternatives considered**:
|
|
60
|
+
**Rationale**:
|
|
61
|
+
## Data Flow
|
|
62
|
+
## File Changes
|
|
63
|
+
## Interfaces / Contracts
|
|
64
|
+
## Testing Strategy
|
|
65
|
+
## Migration / Rollout
|
|
66
|
+
## Open Questions
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
6. If the selected mode includes thoth-mem, persist the design with:
|
|
70
|
+
|
|
71
|
+
Use the memory tool binding for `mem_save` with the canonical SDD topic key
|
|
72
|
+
and required metadata fields: `title`, `topic_key`, `type`, `project`,
|
|
73
|
+
`scope`, and `content`.
|
|
74
|
+
|
|
75
|
+
## Output Format
|
|
76
|
+
|
|
77
|
+
Return:
|
|
78
|
+
|
|
79
|
+
- `Change`
|
|
80
|
+
- `Artifact`: `openspec/changes/{change-name}/design.md`
|
|
81
|
+
- `Topic Key`: `sdd/{change-name}/design`
|
|
82
|
+
- `Key Decisions`: concise bullet list
|
|
83
|
+
- `Files Planned`: created, modified, deleted paths
|
|
84
|
+
- `Next Step`: `sdd-tasks`
|
|
85
|
+
|
|
86
|
+
## Rules
|
|
87
|
+
|
|
88
|
+
- Base the design on the actual codebase, not generic assumptions.
|
|
89
|
+
- Every architecture decision must include rationale.
|
|
90
|
+
- Use concrete file paths and interfaces.
|
|
91
|
+
- Keep implementation details aligned with the spec and repository patterns.
|
|
92
|
+
- Retrieve full dependencies with the protocol in the persistence contract.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-init
|
|
3
|
+
description: Bootstrap OpenSpec structure and SDD context for a project.
|
|
4
|
+
metadata:
|
|
5
|
+
author: gentleman-programming
|
|
6
|
+
version: "1.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# SDD Init Skill
|
|
10
|
+
|
|
11
|
+
Initialize SDD for a project by detecting local conventions, creating the
|
|
12
|
+
minimal OpenSpec structure when needed, and persisting startup context.
|
|
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
|
+
## Persistence Mode
|
|
21
|
+
|
|
22
|
+
The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
|
|
23
|
+
`hybrid`). Follow the persistence contract for read/write rules per mode.
|
|
24
|
+
|
|
25
|
+
- `thoth-mem`: persist initialization context to thoth-mem only — do NOT create
|
|
26
|
+
or modify `openspec/` files.
|
|
27
|
+
- `openspec`: create or update OpenSpec structure only — do NOT call thoth-mem
|
|
28
|
+
save tools.
|
|
29
|
+
- `hybrid`: do both (default).
|
|
30
|
+
|
|
31
|
+
## When to Use
|
|
32
|
+
|
|
33
|
+
- SDD is needed but `openspec/` is not initialized
|
|
34
|
+
- A new project needs initial OpenSpec conventions
|
|
35
|
+
- The team wants detected stack/context captured before `sdd-propose`
|
|
36
|
+
|
|
37
|
+
## Prerequisites
|
|
38
|
+
|
|
39
|
+
- Project root path
|
|
40
|
+
- Project name
|
|
41
|
+
- Selected persistence mode (default: `hybrid`)
|
|
42
|
+
|
|
43
|
+
## Workflow
|
|
44
|
+
|
|
45
|
+
1. Read the shared conventions before initializing.
|
|
46
|
+
2. Detect project stack and conventions from repository files:
|
|
47
|
+
- Stack indicators: `package.json`, `go.mod`, `pyproject.toml`,
|
|
48
|
+
`requirements.txt`, `Cargo.toml`, `pom.xml`, `build.gradle`,
|
|
49
|
+
`composer.json`.
|
|
50
|
+
- Testing indicators: `vitest.config.*`, `jest.config.*`,
|
|
51
|
+
`playwright.config.*`, `pytest.ini`, `tox.ini`, `go test` conventions,
|
|
52
|
+
`Cargo.toml` test crates.
|
|
53
|
+
- Style indicators: `biome.json`, `.eslintrc*`, `eslint.config.*`,
|
|
54
|
+
`.prettierrc*`, `ruff.toml`, `.golangci.*`, `rustfmt.toml`.
|
|
55
|
+
- CI indicators: `.github/workflows/*`, `.gitlab-ci.yml`,
|
|
56
|
+
`azure-pipelines.yml`, `.circleci/config.yml`.
|
|
57
|
+
- Architecture hints: common layout markers such as `apps/`, `packages/`,
|
|
58
|
+
`services/`, `src/`, `cmd/`, `internal/`.
|
|
59
|
+
3. Build concise config context (max 10 lines) using detected values. Use
|
|
60
|
+
`unknown` for missing signals.
|
|
61
|
+
4. If the selected mode includes OpenSpec (`openspec` or `hybrid`), check
|
|
62
|
+
whether these already exist:
|
|
63
|
+
- `openspec/config.yaml`
|
|
64
|
+
- `openspec/specs/`
|
|
65
|
+
- `openspec/changes/`
|
|
66
|
+
5. If all required OpenSpec paths already exist, report what exists and ask the
|
|
67
|
+
orchestrator whether `config.yaml` should be updated. Do not overwrite by
|
|
68
|
+
default.
|
|
69
|
+
6. If any required OpenSpec path is missing and mode includes OpenSpec, create
|
|
70
|
+
only the minimum structure:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
openspec/
|
|
74
|
+
├── config.yaml
|
|
75
|
+
├── specs/
|
|
76
|
+
└── changes/
|
|
77
|
+
└── archive/
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
7. Generate `openspec/config.yaml` dynamically with this shape:
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
schema: spec-driven
|
|
84
|
+
|
|
85
|
+
context: |
|
|
86
|
+
Tech stack: {detected}
|
|
87
|
+
Architecture: {detected}
|
|
88
|
+
Testing: {detected}
|
|
89
|
+
Style: {detected}
|
|
90
|
+
|
|
91
|
+
rules:
|
|
92
|
+
proposal:
|
|
93
|
+
- Include rollback plan for risky changes
|
|
94
|
+
- Identify affected modules/packages
|
|
95
|
+
specs:
|
|
96
|
+
- Use Given/When/Then format for scenarios
|
|
97
|
+
- Use RFC 2119 keywords (MUST, SHALL, SHOULD, MAY)
|
|
98
|
+
design:
|
|
99
|
+
- Include sequence diagrams for complex flows
|
|
100
|
+
- Document architecture decisions with rationale
|
|
101
|
+
tasks:
|
|
102
|
+
- Group tasks by phase (infrastructure, implementation, testing)
|
|
103
|
+
- Use hierarchical numbering (1.1, 1.2, etc.)
|
|
104
|
+
- Keep tasks small enough to complete in one session
|
|
105
|
+
apply:
|
|
106
|
+
- Follow existing code patterns and conventions
|
|
107
|
+
tdd: false
|
|
108
|
+
test_command: ''
|
|
109
|
+
verify:
|
|
110
|
+
test_command: ''
|
|
111
|
+
build_command: ''
|
|
112
|
+
coverage_threshold: 0
|
|
113
|
+
archive:
|
|
114
|
+
- Warn before merging destructive deltas
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
8. Never create placeholder SDD artifacts (`proposal.md`, `design.md`,
|
|
118
|
+
`tasks.md`, or spec files) during initialization.
|
|
119
|
+
9. If the selected mode includes thoth-mem (`thoth-mem` or `hybrid`), persist
|
|
120
|
+
the detected context and initialization status with:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
Use the memory tool binding for `mem_save` with the canonical topic key and
|
|
124
|
+
required metadata fields: `title`, `topic_key`, `type`, `project`,
|
|
125
|
+
`scope`, and `content`.
|
|
126
|
+
|
|
127
|
+
10. In `hybrid` mode, initialization is complete only when both OpenSpec setup
|
|
128
|
+
and thoth-mem persistence succeed.
|
|
129
|
+
|
|
130
|
+
## Output Format
|
|
131
|
+
|
|
132
|
+
Return:
|
|
133
|
+
|
|
134
|
+
- `Project`
|
|
135
|
+
- `Mode`
|
|
136
|
+
- `Detected Context`: stack, architecture, testing, style, CI
|
|
137
|
+
- `OpenSpec Status`: initialized, already initialized, or skipped by mode
|
|
138
|
+
- `Created Paths`: list of directories/files created (if any)
|
|
139
|
+
- `Topic Key`: `sdd-init/{project-name}` when mode includes thoth-mem
|
|
140
|
+
- `Next Step`: usually `sdd-propose`
|
|
141
|
+
|
|
142
|
+
## Rules
|
|
143
|
+
|
|
144
|
+
- Be idempotent: if OpenSpec already exists, report and ask before updates.
|
|
145
|
+
- In `thoth-mem` mode, never create `openspec/` directories or files.
|
|
146
|
+
- Keep `config.yaml` context concise (max 10 lines).
|
|
147
|
+
- Detect and include CI, test, and style conventions in the context summary.
|
|
148
|
+
- Never create placeholder spec/change files during init.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-propose
|
|
3
|
+
description: Create or update `proposal.md` for an OpenSpec change.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Propose Skill
|
|
7
|
+
|
|
8
|
+
Create the proposal artifact for a change and persist it with thoth-mem.
|
|
9
|
+
|
|
10
|
+
## Shared Conventions
|
|
11
|
+
|
|
12
|
+
- [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
|
|
13
|
+
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
14
|
+
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
15
|
+
|
|
16
|
+
## Persistence Mode
|
|
17
|
+
|
|
18
|
+
The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
|
|
19
|
+
`hybrid`). Follow the persistence contract for read/write rules per mode.
|
|
20
|
+
|
|
21
|
+
- `thoth-mem`: persist to thoth-mem only — do NOT create or modify
|
|
22
|
+
`openspec/` files.
|
|
23
|
+
- `openspec`: write files only — do NOT call thoth-mem save tools.
|
|
24
|
+
- `hybrid`: persist to both (default).
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- A change needs its first `proposal.md`
|
|
29
|
+
- An existing proposal must be refined after new requirements
|
|
30
|
+
|
|
31
|
+
## Prerequisites
|
|
32
|
+
|
|
33
|
+
- A `change-name`
|
|
34
|
+
- User intent, problem statement, or prior exploration notes
|
|
35
|
+
- Project name for thoth-mem persistence
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
|
|
39
|
+
1. Read the shared conventions before drafting.
|
|
40
|
+
2. If the change already exists, recover the latest proposal using the
|
|
41
|
+
retrieval protocol from the persistence contract.
|
|
42
|
+
3. Review relevant main specs under the active OpenSpec path to avoid
|
|
43
|
+
proposing contradictions.
|
|
44
|
+
4. If the selected mode includes OpenSpec, write
|
|
45
|
+
`openspec/changes/{change-name}/proposal.md` using this shape. In
|
|
46
|
+
`thoth-mem` mode, produce the same content without creating the file:
|
|
47
|
+
|
|
48
|
+
```md
|
|
49
|
+
# Proposal: {Change Title}
|
|
50
|
+
|
|
51
|
+
## Intent
|
|
52
|
+
## Scope
|
|
53
|
+
### In Scope
|
|
54
|
+
### Out of Scope
|
|
55
|
+
## Approach
|
|
56
|
+
## Affected Areas
|
|
57
|
+
## Risks
|
|
58
|
+
## Rollback Plan
|
|
59
|
+
## Success Criteria
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
5. If the selected mode includes thoth-mem, persist the full proposal with:
|
|
63
|
+
|
|
64
|
+
Use the memory tool binding for `mem_save` with the canonical SDD topic key
|
|
65
|
+
and required metadata fields: `title`, `topic_key`, `type`, `project`,
|
|
66
|
+
`scope`, and `content`.
|
|
67
|
+
|
|
68
|
+
6. In `hybrid` mode, both the filesystem artifact and thoth-mem save must
|
|
69
|
+
succeed.
|
|
70
|
+
|
|
71
|
+
## Output Format
|
|
72
|
+
|
|
73
|
+
Return a short report with:
|
|
74
|
+
|
|
75
|
+
- `Change`: change name
|
|
76
|
+
- `Artifact`: `openspec/changes/{change-name}/proposal.md`
|
|
77
|
+
- `Topic Key`: `sdd/{change-name}/proposal`
|
|
78
|
+
- `Summary`: 2-4 bullets covering intent, scope, and major risks
|
|
79
|
+
- `Next Step`: `sdd-spec` (full pipeline) or `sdd-tasks` (accelerated pipeline)
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
- Use canonical OpenSpec filenames only.
|
|
84
|
+
- Keep the proposal focused on why, scope, and success criteria.
|
|
85
|
+
- Always include rollback guidance and explicit out-of-scope items.
|
|
86
|
+
- Never reference engram.
|
|
87
|
+
- Never rely on compact search output alone when the mode uses thoth-mem.
|
|
88
|
+
Follow the 3-layer recall protocol: `search(mode: "compact")` →
|
|
89
|
+
`timeline` → `get_observation` to retrieve the full artifact body.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-spec
|
|
3
|
+
description: Write OpenSpec delta specs with RFC 2119 language and GWT scenarios.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Spec Skill
|
|
7
|
+
|
|
8
|
+
Write or update the change specifications for one or more affected domains.
|
|
9
|
+
|
|
10
|
+
## Shared Conventions
|
|
11
|
+
|
|
12
|
+
- [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
|
|
13
|
+
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
14
|
+
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
15
|
+
|
|
16
|
+
## Persistence Mode
|
|
17
|
+
|
|
18
|
+
The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
|
|
19
|
+
`hybrid`). Follow the persistence contract for read/write rules per mode.
|
|
20
|
+
|
|
21
|
+
- `thoth-mem`: persist to thoth-mem only — do NOT create or modify
|
|
22
|
+
`openspec/` files.
|
|
23
|
+
- `openspec`: write files only — do NOT call thoth-mem save tools.
|
|
24
|
+
- `hybrid`: persist to both (default).
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- A proposal is approved and must be converted into testable requirements
|
|
29
|
+
- Existing change specs need to be expanded or corrected
|
|
30
|
+
|
|
31
|
+
## Prerequisites
|
|
32
|
+
|
|
33
|
+
- `change-name`
|
|
34
|
+
- The proposal artifact must exist
|
|
35
|
+
- Access to any current main specs for impacted domains
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
|
|
39
|
+
1. Read the shared conventions.
|
|
40
|
+
2. Recover the proposal using the retrieval protocol in
|
|
41
|
+
the persistence contract.
|
|
42
|
+
3. If the change already has spec work, recover `sdd/{change-name}/spec` with
|
|
43
|
+
the same mode-aware retrieval rules before editing.
|
|
44
|
+
4. Read `openspec/specs/{domain}/spec.md` for each affected domain to determine
|
|
45
|
+
whether you are writing a delta spec or a brand-new spec.
|
|
46
|
+
5. If the selected mode includes OpenSpec, write canonical change artifacts
|
|
47
|
+
under `openspec/changes/{change-name}/specs/{domain}/spec.md`. In
|
|
48
|
+
`thoth-mem` mode, produce the same canonical content without creating files.
|
|
49
|
+
6. Use this structure in every spec file:
|
|
50
|
+
|
|
51
|
+
```md
|
|
52
|
+
# Delta for {Domain}
|
|
53
|
+
|
|
54
|
+
## ADDED Requirements
|
|
55
|
+
### Requirement: {Name}
|
|
56
|
+
The system MUST ...
|
|
57
|
+
|
|
58
|
+
#### Scenario: {Name}
|
|
59
|
+
- GIVEN ...
|
|
60
|
+
- WHEN ...
|
|
61
|
+
- THEN ...
|
|
62
|
+
|
|
63
|
+
## MODIFIED Requirements
|
|
64
|
+
## REMOVED Requirements
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
For a brand-new domain, write a full spec instead of a delta.
|
|
68
|
+
|
|
69
|
+
7. If the selected mode includes thoth-mem, persist the complete spec payload
|
|
70
|
+
with:
|
|
71
|
+
|
|
72
|
+
Use the memory tool binding for `mem_save` with the canonical SDD topic key
|
|
73
|
+
and required metadata fields: `title`, `topic_key`, `type`, `project`,
|
|
74
|
+
`scope`, and `content`.
|
|
75
|
+
|
|
76
|
+
## Output Format
|
|
77
|
+
|
|
78
|
+
Return:
|
|
79
|
+
|
|
80
|
+
- `Change`
|
|
81
|
+
- `Artifacts`: list of domain spec paths written
|
|
82
|
+
- `Topic Key`: `sdd/{change-name}/spec`
|
|
83
|
+
- `Coverage Summary`: requirements and scenarios added or modified
|
|
84
|
+
- `Next Step`: usually `sdd-design`
|
|
85
|
+
|
|
86
|
+
## Rules
|
|
87
|
+
|
|
88
|
+
- Every requirement must use RFC 2119 keywords.
|
|
89
|
+
- Every requirement must have at least one Given/When/Then scenario.
|
|
90
|
+
- Specs describe behavior, not implementation details.
|
|
91
|
+
- Keep domain boundaries explicit.
|
|
92
|
+
- Use the retrieval protocol from the persistence contract for every SDD
|
|
93
|
+
dependency.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-tasks
|
|
3
|
+
description: Generate phased `tasks.md` checklists from specs and design.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Tasks Skill
|
|
7
|
+
|
|
8
|
+
Translate the approved spec and design into an implementation checklist.
|
|
9
|
+
|
|
10
|
+
## Shared Conventions
|
|
11
|
+
|
|
12
|
+
- [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
|
|
13
|
+
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
14
|
+
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
15
|
+
|
|
16
|
+
## Persistence Mode
|
|
17
|
+
|
|
18
|
+
The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
|
|
19
|
+
`hybrid`). Follow the persistence contract for read/write rules per mode.
|
|
20
|
+
|
|
21
|
+
- `thoth-mem`: persist to thoth-mem only — do NOT create or modify
|
|
22
|
+
`openspec/` files.
|
|
23
|
+
- `openspec`: write files only — do NOT call thoth-mem save tools.
|
|
24
|
+
- `hybrid`: persist to both (default).
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- **Full pipeline**: proposal, spec, and design are ready for execution planning
|
|
29
|
+
- **Accelerated pipeline**: proposal is ready and spec/design are intentionally skipped
|
|
30
|
+
- A task plan must be refreshed after scope changes
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
- `change-name`
|
|
35
|
+
- `pipeline-type` (`accelerated` or `full`)
|
|
36
|
+
- Proposal artifact
|
|
37
|
+
- Spec artifact (full pipeline only)
|
|
38
|
+
- Design artifact (full pipeline only)
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
1. Read the shared conventions.
|
|
43
|
+
2. Recover artifacts via the retrieval protocol in
|
|
44
|
+
the persistence contract:
|
|
45
|
+
- **Always**: recover `proposal`
|
|
46
|
+
- **Full pipeline only**: recover `spec` and `design`
|
|
47
|
+
- In accelerated pipeline, derive task structure directly from the proposal.
|
|
48
|
+
3. If a task plan already exists, recover `sdd/{change-name}/tasks` with the
|
|
49
|
+
same mode-aware retrieval rules before rewriting it.
|
|
50
|
+
4. **Validate existing-file references**: For every task that modifies an existing file (not creates a new one), verify the file actually exists on disk before including it in the task list. If a referenced "existing" file is not found, flag it as a design defect in an `> ⚠️ Warning` block at the top of the tasks artifact, and omit the task or add a note.
|
|
51
|
+
5. **Codebase discovery (required when design artifact is absent or lacks file paths)**:
|
|
52
|
+
Before generating tasks, actively explore the repository to gather the concrete data needed for accurate Verification blocks:
|
|
53
|
+
1. Read the project's build manifest or task runner config (e.g., `package.json`, `Makefile`, `Cargo.toml`, `.csproj`, `pyproject.toml`) to discover available commands for testing, building, linting, and type-checking. Use the exact commands the project defines in `Run:` fields — never invent commands that don't exist in the project.
|
|
54
|
+
2. Explore the directory structure of affected areas to confirm actual file paths and module layout.
|
|
55
|
+
3. Check for existing test files (e.g., `*.test.ts`, `*.spec.ts`) to reference in Verification commands.
|
|
56
|
+
4. Use the proposal's "Affected Areas" and "Approach" as navigation hints, not as authoritative file paths.
|
|
57
|
+
|
|
58
|
+
This exploration is mandatory in accelerated pipeline. In full pipeline, prefer paths from the design artifact's `File Changes` section but still validate commands from `package.json`.
|
|
59
|
+
6. Build a phased checklist for `openspec/changes/{change-name}/tasks.md`. In
|
|
60
|
+
`thoth-mem` mode, produce the same canonical checklist content without
|
|
61
|
+
creating the file.
|
|
62
|
+
5. Use hierarchical numbering and Markdown checkboxes with per-task verification:
|
|
63
|
+
|
|
64
|
+
```md
|
|
65
|
+
# Tasks: {Change Title}
|
|
66
|
+
|
|
67
|
+
## Phase 1: Foundation
|
|
68
|
+
- [ ] 1.1 Set up project structure — `src/config/`
|
|
69
|
+
**Verification**:
|
|
70
|
+
- Run: `pnpm run typecheck`
|
|
71
|
+
- Expected: No TypeScript errors in config files
|
|
72
|
+
|
|
73
|
+
## Phase 2: Core Implementation
|
|
74
|
+
- [ ] 2.1 Implement core logic — `src/core/handler.ts`
|
|
75
|
+
**Verification**:
|
|
76
|
+
- Run: `pnpm test -- -t "core handler"`
|
|
77
|
+
- Expected: All handler tests pass
|
|
78
|
+
|
|
79
|
+
## Phase 3: Integration
|
|
80
|
+
- [ ] 3.1 Integrate with API — `src/api/client.ts`
|
|
81
|
+
**Verification**:
|
|
82
|
+
- Run: `pnpm run lint src/api/`
|
|
83
|
+
- Expected: No linting errors in API module
|
|
84
|
+
|
|
85
|
+
## Phase 4: Integration & Release
|
|
86
|
+
- [ ] 4.1 Run full integration test suite and validate release artifacts — all modules
|
|
87
|
+
**Verification**:
|
|
88
|
+
- Run: `pnpm test`
|
|
89
|
+
- Expected: All tests pass with 100% coverage
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Recognized task states:
|
|
93
|
+
|
|
94
|
+
- `- [ ]` pending
|
|
95
|
+
- `- [~]` in progress
|
|
96
|
+
- `- [x]` completed
|
|
97
|
+
- `- [-]` skipped — always append a reason: `- [-] 1.2 Task name — skipped: reason here`
|
|
98
|
+
|
|
99
|
+
7. Reference concrete file paths and specific spec scenarios in the tasks.
|
|
100
|
+
8. If the selected mode includes thoth-mem, persist the full checklist with:
|
|
101
|
+
|
|
102
|
+
Use the memory tool binding for `mem_save` with the canonical SDD topic key
|
|
103
|
+
and required metadata fields: `title`, `topic_key`, `type`, `project`,
|
|
104
|
+
`scope`, and `content`.
|
|
105
|
+
|
|
106
|
+
9. After `tasks.md` is generated, the workflow proceeds to an optional oracle
|
|
107
|
+
plan review via the `plan-reviewer` skill. This is managed outside the scope
|
|
108
|
+
of this skill.
|
|
109
|
+
10. The artifact governance validator may run **after** `sdd-tasks` as a
|
|
110
|
+
report-only handoff. It captures placement guidance for the future
|
|
111
|
+
pre-`sdd-apply` entrypoint, but it does not enforce execution or overlap
|
|
112
|
+
with plan review.
|
|
113
|
+
11. The orchestrator handles the `[OKAY]` / `[REJECT]` review loop and any
|
|
114
|
+
necessary fixes before proceeding to execution.
|
|
115
|
+
|
|
116
|
+
## Output Format
|
|
117
|
+
|
|
118
|
+
Return:
|
|
119
|
+
|
|
120
|
+
- `Change`
|
|
121
|
+
- `Artifact`: `openspec/changes/{change-name}/tasks.md`
|
|
122
|
+
- `Topic Key`: `sdd/{change-name}/tasks`
|
|
123
|
+
- `Phase Summary`: task counts per phase
|
|
124
|
+
- `Execution Order`: one short paragraph
|
|
125
|
+
- `Next Step`: `sdd-apply`
|
|
126
|
+
|
|
127
|
+
## Rules
|
|
128
|
+
|
|
129
|
+
- Tasks must be small, actionable, and verifiable.
|
|
130
|
+
- Order tasks by dependency.
|
|
131
|
+
- Include testing and verification work explicitly.
|
|
132
|
+
- Do not create vague tasks such as "implement feature".
|
|
133
|
+
- The governance validator is advisory only at this stage; it documents
|
|
134
|
+
handoff placement and report findings, but it does not block task generation
|
|
135
|
+
or replace execution planning.
|
|
136
|
+
- **Every task MUST include a `Verification` sub-block** with:
|
|
137
|
+
- `Run:` — the exact command(s) to verify this task (e.g., `pnpm test`, `pnpm run typecheck`, `pnpm run lint`)
|
|
138
|
+
- `Expected:` — the specific observable outcome that confirms success
|
|
139
|
+
- Tasks without a `Verification` block will be rejected by the plan-reviewer.
|
|
140
|
+
- Do NOT group verification into a single "Phase 4: Verification" — each task gets its own.
|
|
141
|
+
- Retrieve all dependencies through the mode-aware protocol in the persistence
|
|
142
|
+
contract.
|