thoth-agents 0.3.6 → 0.3.8

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.
Files changed (34) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +8 -5
  3. package/dist/{chunk-HIXSRHEG.js → chunk-3WNTCPVK.js} +1 -1
  4. package/dist/cli/index.js +2 -2
  5. package/dist/cli/tui/index.js +1 -1
  6. package/package.json +1 -1
  7. package/plugin/.claude-plugin/plugin.json +1 -1
  8. package/plugin/.codex-plugin/plugin.json +1 -1
  9. package/plugin/skills/plan-reviewer/SKILL.md +5 -1
  10. package/plugin/skills/thoth-archive/SKILL.md +7 -3
  11. package/plugin/skills/thoth-constitution/SKILL.md +7 -4
  12. package/plugin/skills/thoth-init/SKILL.md +10 -5
  13. package/plugin/skills/thoth-init/scripts/init.mjs +0 -59
  14. package/plugin/skills/thoth-sdd/SKILL.md +17 -13
  15. package/plugin/skills/thoth-sdd/references/phases/checklist.md +3 -0
  16. package/plugin/skills/thoth-sdd/references/phases/plan.md +8 -4
  17. package/plugin/skills/thoth-sdd/references/phases/specify.md +3 -1
  18. package/plugin/skills/thoth-sdd/references/phases/tasks.md +10 -3
  19. package/plugin/skills/thoth-sdd/references/phases/verify.md +4 -3
  20. package/plugin/skills/thoth-sdd/templates/plan.md +14 -6
  21. package/plugin/skills/thoth-sdd/templates/tasks.md +20 -7
  22. package/skills/plan-reviewer/SKILL.md +5 -1
  23. package/skills/thoth-archive/SKILL.md +7 -3
  24. package/skills/thoth-constitution/SKILL.md +7 -4
  25. package/skills/thoth-init/SKILL.md +10 -5
  26. package/skills/thoth-init/scripts/init.mjs +0 -59
  27. package/skills/thoth-sdd/SKILL.md +17 -13
  28. package/skills/thoth-sdd/references/phases/checklist.md +3 -0
  29. package/skills/thoth-sdd/references/phases/plan.md +8 -4
  30. package/skills/thoth-sdd/references/phases/specify.md +3 -1
  31. package/skills/thoth-sdd/references/phases/tasks.md +10 -3
  32. package/skills/thoth-sdd/references/phases/verify.md +4 -3
  33. package/skills/thoth-sdd/templates/plan.md +14 -6
  34. package/skills/thoth-sdd/templates/tasks.md +20 -7
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "thoth-agents",
11
11
  "description": "Adaptive root orchestration, six specialist subagents, and a runtime-autonomous Spec Kit-compatible SDD bundle.",
12
- "version": "0.3.6",
12
+ "version": "0.3.8",
13
13
  "author": {
14
14
  "name": "thoth-agents maintainers"
15
15
  },
package/README.md CHANGED
@@ -67,8 +67,9 @@ The installer materializes the five packaged thoth-owned workflow skills under
67
67
  canonical repositories, and thoth-mem completes its own provider setup. The
68
68
  `/thoth-init` command only initializes or synchronizes the minimum `openspec/`
69
69
  governance structure. It never installs skills, agents, plugins, harness
70
- configuration, or dependencies, and it preserves existing constitutions and
71
- templates.
70
+ configuration, dependencies, or workflow templates. SDD phases read templates
71
+ directly from the globally installed `thoth-sdd` skill; any legacy project
72
+ `openspec/templates/` tree remains untouched.
72
73
 
73
74
  ### Codex
74
75
 
@@ -90,8 +91,10 @@ Restart Codex, then initialize each target repository's SDD governance:
90
91
  $thoth-init
91
92
  ```
92
93
 
93
- The plugin contributes skills and MCP configuration. `$thoth-init` creates only
94
- missing `openspec/` governance files; it does not pretend to install agents.
94
+ The plugin contributes skills, their workflow templates, and MCP configuration.
95
+ `$thoth-init` creates only missing `openspec/` governance files; SDD phases read
96
+ templates from the plugin's installed `thoth-sdd` skill instead of copying them
97
+ into the repository.
95
98
 
96
99
  Review `/plugins` and `/hooks` after installation. Codex trust and
97
100
  higher-precedence instructions remain in force.
@@ -124,7 +127,7 @@ Claude discovers the packaged orchestrator, six namespaced subagents, and five
124
127
  thoth-owned skills from the plugin. The CLI installs the external skills into
125
128
  Claude's global skill root and requires thoth-mem's own setup result to be
126
129
  complete. Init creates only the missing project governance files; it never edits
127
- Claude's manager-owned plugin cache.
130
+ Claude's manager-owned plugin cache or copies workflow templates out of it.
128
131
 
129
132
  See [Installation](docs/installation.md), [Codex Install](docs/codex-install.md),
130
133
  and [Claude Code Install](docs/claude-code-install.md) for scopes, verification,
@@ -2486,7 +2486,7 @@ function getNpxCommand(args, options = {}) {
2486
2486
  }
2487
2487
  return {
2488
2488
  command: options.commandShell ?? process.env.ComSpec ?? "cmd.exe",
2489
- args: ["/d", "/s", "/c", "npx.cmd", ...args]
2489
+ args: ["/d", "/s", "/c", ["npx", ...args].join(" ")]
2490
2490
  };
2491
2491
  }
2492
2492
 
package/dist/cli/index.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  listOperationHarnesses,
45
45
  normalizeEffortSelection,
46
46
  syncOpenCodeOwnedSkills
47
- } from "../chunk-HIXSRHEG.js";
47
+ } from "../chunk-3WNTCPVK.js";
48
48
  import {
49
49
  ALL_AGENT_NAMES,
50
50
  detectCurrentConfig,
@@ -88,7 +88,7 @@ function getCodexCommand(args, options = {}) {
88
88
  }
89
89
  return {
90
90
  command: options.commandShell ?? process.env.ComSpec ?? "cmd.exe",
91
- args: ["/d", "/s", "/c", "codex.cmd", ...args]
91
+ args: ["/d", "/s", "/c", "codex", ...args]
92
92
  };
93
93
  }
94
94
  function defaultCommandExecutor(command, args, options) {
@@ -2,7 +2,7 @@ import {
2
2
  defaultTuiOperations,
3
3
  effortChoicesForModel,
4
4
  listOperationHarnesses
5
- } from "../../chunk-HIXSRHEG.js";
5
+ } from "../../chunk-3WNTCPVK.js";
6
6
  import "../../chunk-F2K4CS5J.js";
7
7
 
8
8
  // src/cli/tui/index.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-agents",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "Adaptive multi-harness orchestration with seven roles, runtime-autonomous Spec Kit-compatible SDD routes, and external provider boundaries.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-agents",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "Adaptive multi-harness agent pack with seven roles and a runtime-autonomous Spec Kit-compatible SDD bundle for Claude Code.",
5
5
  "author": {
6
6
  "name": "thoth-agents"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-agents",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "Bundled Spec Kit-compatible SDD skills and MCP configuration; the seven-role global Codex layer requires thoth-agents CLI setup.",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./codex.mcp.json"
@@ -26,10 +26,14 @@ Oracle review; mandatory final Oracle verify still applies.
26
26
 
27
27
  ## Ownership and inputs
28
28
 
29
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`. Every bundled
30
+ asset path in this contract is anchored to that installed skill root rather than
31
+ the project or current working directory.
32
+
29
33
  Root coordinates the phase and dispatches Oracle. Oracle remains read-only: it
30
34
  must not edit source, SDD artifacts, or coordination state. Root persists the
31
35
  returned review at `openspec/changes/<change>/plan-review.md` using
32
- `templates/plan-review.md`.
36
+ `<skill-dir>/templates/plan-review.md`.
33
37
 
34
38
  Review these canonical inputs:
35
39
 
@@ -6,16 +6,20 @@ description: Close a passing artifact-backed thoth-agents change by transactiona
6
6
  # Thoth Archive
7
7
 
8
8
  Archive is the required terminal transition for Accelerated and Full routes.
9
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`, and resolve
10
+ `<skills-root>` as its parent directory. Bundled paths below are anchored to
11
+ those installed roots rather than the project or current working directory.
9
12
 
10
13
  1. Confirm every task is `[x]`, `verify-report.md` records independent oracle
11
14
  `PASS`, its compliance matrix covers every FR and buildable SC, every outcome
12
15
  SC has observed PASS evidence or an explicit residual RISK, and no unresolved
13
16
  CRITICAL issue remains.
14
- 2. Prepare `archive-report.md` from the bundled template with status `READY`,
17
+ 2. Prepare `archive-report.md` from
18
+ `<skills-root>/thoth-sdd/templates/archive-report.md` with status `READY`,
15
19
  verification lineage, completed scope, deviations, residual warnings, and
16
20
  the pending canonical-sync line.
17
- 3. Run the thoth-sdd validator through `closeout`.
18
- 4. Run `scripts/archive.mjs --change <path> --date YYYY-MM-DD --json`.
21
+ 3. Run `node "<skills-root>/thoth-sdd/scripts/validate.mjs"` through `closeout`.
22
+ 4. Run `node "<skill-dir>/scripts/archive.mjs" --change <path> --date YYYY-MM-DD --json`.
19
23
  5. Return the dated archive path, updated capability specifications, and audit
20
24
  summary.
21
25
 
@@ -6,6 +6,9 @@ description: Create or explicitly amend the project constitution, choose its gov
6
6
  # Thoth Constitution
7
7
 
8
8
  The canonical project constitution is `openspec/memory/constitution.md`.
9
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`. Every bundled
10
+ validator or template path below is anchored to that installed skill root rather
11
+ than the project or current working directory.
9
12
 
10
13
  ## Routine SDD
11
14
 
@@ -36,10 +39,10 @@ a confirmed durable governance change.
36
39
  6. Remove unexplained placeholders and deferred TODOs, then run:
37
40
 
38
41
  ```bash
39
- node skills/thoth-constitution/scripts/validate.mjs \
42
+ node "<skill-dir>/scripts/validate.mjs" \
40
43
  --constitution openspec/memory/constitution.md --json
41
44
  ```
42
45
 
43
- Initialization copies `templates/constitution.md` only when the project has no
44
- constitution, resolves its date placeholders, and never overwrites a
45
- project-owned constitution.
46
+ Initialization copies `<skill-dir>/templates/constitution.md` only when the
47
+ project has no constitution, resolves its date placeholders, and never
48
+ overwrites a project-owned constitution.
@@ -19,13 +19,18 @@ target structure before changing it, then ensures these minimum paths exist:
19
19
  - `openspec/changes/archive/`
20
20
  - `openspec/specs/`
21
21
  - `openspec/memory/`
22
- - `openspec/templates/`
23
22
  - `openspec/.thoth-agents.json`
24
23
 
25
- Missing constitution and SDD template files are copied from the installed
26
- bundle. Existing constitution and template files remain byte-for-byte intact;
27
- the thoth-managed manifest may be normalized to the current contract. Inspect
28
- the JSON `created`, `managed`, and `preserved` arrays when reporting the result.
24
+ The missing constitution is copied from the installed sibling
25
+ `thoth-constitution` skill. An existing constitution remains byte-for-byte
26
+ intact, while the thoth-managed manifest may be normalized to the current
27
+ contract. Any legacy `openspec/templates/` tree is outside the managed graph and
28
+ remains untouched. Inspect the JSON `created`, `managed`, and `preserved` arrays
29
+ when reporting the result.
30
+
31
+ The initializer never creates, copies, validates, reads, or synchronizes SDD
32
+ workflow templates. Those assets remain in the installed `thoth-sdd` skill and
33
+ are consumed directly from that bundle by the workflow phase contracts.
29
34
 
30
35
  This operation is offline, idempotent, and harness-neutral. Every write stays
31
36
  inside `openspec/`. It never installs or synchronizes skills, agents, plugins,
@@ -1,11 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import {
4
- cpSync,
5
4
  existsSync,
6
5
  lstatSync,
7
6
  mkdirSync,
8
- readdirSync,
9
7
  readFileSync,
10
8
  writeFileSync,
11
9
  } from 'node:fs';
@@ -21,7 +19,6 @@ const OPEN_SPEC_DIRECTORIES = [
21
19
  join('openspec', 'changes', 'archive'),
22
20
  join('openspec', 'specs'),
23
21
  join('openspec', 'memory'),
24
- join('openspec', 'templates'),
25
22
  ];
26
23
 
27
24
  function parseArgs(argv) {
@@ -52,37 +49,6 @@ function assertRegularFile(path, label) {
52
49
  }
53
50
  }
54
51
 
55
- function collectFiles(sourceRoot, targetRoot) {
56
- if (!existsSync(sourceRoot)) {
57
- throw new Error(`Bundled SDD template directory is missing: ${sourceRoot}`);
58
- }
59
- assertDirectory(sourceRoot, 'Bundled template directory');
60
- const entries = [];
61
-
62
- function visit(source, target) {
63
- for (const entry of readdirSync(source, { withFileTypes: true })) {
64
- const sourcePath = join(source, entry.name);
65
- const targetPath = join(target, entry.name);
66
- if (entry.isSymbolicLink()) {
67
- throw new Error(
68
- `Bundled templates cannot contain symlinks: ${sourcePath}`,
69
- );
70
- }
71
- if (entry.isDirectory()) {
72
- entries.push({ kind: 'directory', target: targetPath });
73
- visit(sourcePath, targetPath);
74
- } else if (entry.isFile()) {
75
- entries.push({ kind: 'file', source: sourcePath, target: targetPath });
76
- } else {
77
- throw new Error(`Unsupported bundled template entry: ${sourcePath}`);
78
- }
79
- }
80
- }
81
-
82
- visit(sourceRoot, targetRoot);
83
- return entries;
84
- }
85
-
86
52
  function preflight(project) {
87
53
  assertDirectory(project, 'Project root');
88
54
  if (!existsSync(project)) {
@@ -104,20 +70,9 @@ function preflight(project) {
104
70
  );
105
71
  }
106
72
 
107
- const templates = collectFiles(
108
- join(BUNDLE_ROOT, 'thoth-sdd', 'templates'),
109
- join(project, 'openspec', 'templates'),
110
- );
111
73
  for (const directory of OPEN_SPEC_DIRECTORIES) {
112
74
  assertDirectory(join(project, directory), 'OpenSpec path');
113
75
  }
114
- for (const entry of templates) {
115
- if (entry.kind === 'directory') {
116
- assertDirectory(entry.target, 'OpenSpec template path');
117
- } else {
118
- assertRegularFile(entry.target, 'OpenSpec template path');
119
- }
120
- }
121
76
 
122
77
  const constitutionTarget = join(
123
78
  project,
@@ -133,7 +88,6 @@ function preflight(project) {
133
88
  constitutionSource,
134
89
  constitutionTarget,
135
90
  manifestTarget,
136
- templates,
137
91
  };
138
92
  }
139
93
 
@@ -143,15 +97,6 @@ function createDirectory(target, report) {
143
97
  report.created.push(target);
144
98
  }
145
99
 
146
- function copyPreservingExisting(source, target, report) {
147
- if (existsSync(target)) {
148
- report.preserved.push(target);
149
- return;
150
- }
151
- cpSync(source, target, { errorOnExist: true });
152
- report.created.push(target);
153
- }
154
-
155
100
  function writePreservingExisting(target, content, report) {
156
101
  if (existsSync(target)) {
157
102
  report.preserved.push(target);
@@ -179,10 +124,6 @@ function synchronizeOpenSpec(project, assets, report) {
179
124
  for (const directory of OPEN_SPEC_DIRECTORIES) {
180
125
  createDirectory(join(project, directory), report);
181
126
  }
182
- for (const entry of assets.templates) {
183
- if (entry.kind === 'directory') createDirectory(entry.target, report);
184
- else copyPreservingExisting(entry.source, entry.target, report);
185
- }
186
127
 
187
128
  const today = new Date().toISOString().slice(0, 10);
188
129
  writePreservingExisting(
@@ -37,6 +37,10 @@ Accelerated the minimum recommendation but does not force it.
37
37
 
38
38
  ## Progressive loading
39
39
 
40
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`, and resolve
41
+ `<skills-root>` as its parent directory. Every bundled path below is anchored to
42
+ one of those installed roots, never to the project or current working directory.
43
+
40
44
  Use only installed local contracts during the pipeline. Never invoke the
41
45
  thoth-agents CLI, `npx skills add`, or a network fetch to advance an SDD phase.
42
46
  If a required contract or external skill is missing, stop and report an
@@ -46,24 +50,24 @@ Read only the current phase contract:
46
50
 
47
51
  | Phase | Contract |
48
52
  | --- | --- |
49
- | explore | `references/phases/explore.md` |
50
- | specify | `references/phases/specify.md` |
51
- | clarify | `references/phases/clarify.md` |
52
- | plan | `references/phases/plan.md` |
53
- | checklist | `references/phases/checklist.md` |
54
- | tasks | `references/phases/tasks.md` |
55
- | plan-review | bundled `plan-reviewer` skill |
56
- | implement | `references/phases/implement.md` |
57
- | verify | `references/phases/verify.md` |
58
- | converge | `references/phases/converge.md` |
59
- | archive | bundled `thoth-archive` skill |
53
+ | explore | `<skill-dir>/references/phases/explore.md` |
54
+ | specify | `<skill-dir>/references/phases/specify.md` |
55
+ | clarify | `<skill-dir>/references/phases/clarify.md` |
56
+ | plan | `<skill-dir>/references/phases/plan.md` |
57
+ | checklist | `<skill-dir>/references/phases/checklist.md` |
58
+ | tasks | `<skill-dir>/references/phases/tasks.md` |
59
+ | plan-review | `<skills-root>/plan-reviewer/SKILL.md` |
60
+ | implement | `<skill-dir>/references/phases/implement.md` |
61
+ | verify | `<skill-dir>/references/phases/verify.md` |
62
+ | converge | `<skill-dir>/references/phases/converge.md` |
63
+ | archive | `<skills-root>/thoth-archive/SKILL.md` |
60
64
 
61
65
  ## Validation gates
62
66
 
63
- Run the validator from this skill directory:
67
+ Run the validator from its installed absolute path:
64
68
 
65
69
  ```text
66
- node scripts/validate.mjs --change openspec/changes/<feature> --route <accelerated|full> --through <specify|plan|tasks|checklist|ready|closeout> --json
70
+ node "<skill-dir>/scripts/validate.mjs" --change openspec/changes/<feature> --route <accelerated|full> --through <specify|plan|tasks|checklist|ready|closeout> --json
67
71
  ```
68
72
 
69
73
  - **Accelerated**: `specify`, then `ready` after the fast-forward planning pass,
@@ -5,6 +5,9 @@
5
5
  **Activation**: high contract/failure risk, compliance sensitivity, or
6
6
  ambiguity-prone scope
7
7
 
8
+ When activated, start from `<skill-dir>/templates/checklist.md`, where
9
+ `<skill-dir>` is the directory containing the installed `thoth-sdd/SKILL.md`.
10
+
8
11
  Record the concrete activation reason. Use sequential `CHK###` items to audit
9
12
  the requirements—not implementation—across the base taxonomy: Completeness,
10
13
  Clarity, Consistency, Measurability, and Coverage.
@@ -3,10 +3,14 @@
3
3
  **Owner**: root<br>
4
4
  **Output**: `openspec/changes/<feature>/plan.md`
5
5
 
6
- Start from `templates/plan.md`. Read active constitution principles and record
7
- evidence-backed pre-design and post-design Constitution Checks. Routine SDD does
8
- not amend the constitution or run its lifecycle validator; activate
9
- `thoth-constitution` only when an explicit constitution amendment is in scope.
6
+ Start from `<skill-dir>/templates/plan.md`, where `<skill-dir>` is the directory
7
+ containing the installed `thoth-sdd/SKILL.md`. Read active constitution
8
+ principles and record evidence-backed pre-design and post-design Constitution
9
+ Checks. Extract the exact active numbered principle headings once, then reuse
10
+ that same ordered name set in both checks; only status and evidence may differ.
11
+ Routine SDD does not amend the constitution or run its lifecycle validator;
12
+ activate `thoth-constitution` only when an explicit constitution amendment is
13
+ in scope.
10
14
 
11
15
  Map each technical choice to FR/SC or a confirmed repository constraint. Name
12
16
  affected components, interfaces, exact paths, migrations, risks, rollback, and
@@ -3,7 +3,9 @@
3
3
  **Owner**: root<br>
4
4
  **Output**: `openspec/changes/<feature>/spec.md`
5
5
 
6
- Start from `templates/spec.md` and remain implementation-neutral.
6
+ Start from `<skill-dir>/templates/spec.md`, where `<skill-dir>` is the directory
7
+ containing the installed `thoth-sdd/SKILL.md`, and remain
8
+ implementation-neutral.
7
9
 
8
10
  - Record **Why**, **Impact**, and affected kebab-case capability slugs (or
9
11
  `None`).
@@ -3,15 +3,22 @@
3
3
  **Owner**: root<br>
4
4
  **Output**: `openspec/changes/<feature>/tasks.md`
5
5
 
6
+ Start from `<skill-dir>/templates/tasks.md`, where `<skill-dir>` is the directory
7
+ containing the installed `thoth-sdd/SKILL.md`.
8
+
6
9
  Every executable line uses exactly:
7
10
 
8
11
  ```text
9
12
  - [ ] T### [P?] [US#?] description with FR-###/SC-### coverage in `exact/path` | Verify: observable outcome
10
13
  ```
11
14
 
12
- IDs are unique and sequential. `[US#]` links story work; omit it only for shared
13
- setup or closeout. Cover every FR and **buildable** SC. Outcome SCs remain
14
- verification targets but do not justify artificial implementation tasks.
15
+ IDs start at `T001` and remain unique and sequential across the entire file;
16
+ never reset numbering per story or section. `[P]`, when present, precedes
17
+ `[US#]`; omit `[US#]` only for shared setup or closeout. Before `| Verify:`, use
18
+ exactly one backtick span containing one literal repository-relative path and no
19
+ placeholder, glob, absolute path, URI, home path, or repository escape. Cover
20
+ every FR and **buildable** SC. Outcome SCs remain verification targets but do
21
+ not justify artificial implementation tasks.
15
22
 
16
23
  Order test-first work before its implementation, group tasks by independently
17
24
  deliverable story, identify the MVP, and state dependencies. `[P]` is permitted
@@ -17,6 +17,7 @@ task.
17
17
  Return `pass` or `fail`, compliance matrix, commands/results, stable findings,
18
18
  critical issues, warnings, and remediation anchors. For Direct, return the
19
19
  verdict in-session. For Accelerated and Full, root persists oracle's exact result
20
- using `templates/verify-report.md`. Fail routes to converge (straight back to
21
- implement for Direct); PASS permits closeout and archive for artifact-backed
22
- routes.
20
+ using `<skill-dir>/templates/verify-report.md`, where `<skill-dir>` is the
21
+ directory containing the installed `thoth-sdd/SKILL.md`. Fail routes to converge
22
+ (straight back to implement for Direct); PASS permits closeout and archive for
23
+ artifact-backed routes.
@@ -6,11 +6,17 @@
6
6
 
7
7
  ## Constitution Check (pre-design)
8
8
 
9
- Repeat every active Constitution principle by its exact heading. Each entry must
10
- use one status and concrete evidence; placeholders are invalid in a completed
11
- plan.
9
+ Read `openspec/memory/constitution.md` and extract every active numbered
10
+ principle heading. Build one ordered name set and reuse it unchanged in both
11
+ Constitution Checks: do not add, remove, abbreviate, or rename a heading between
12
+ the pre-design and post-design lists.
12
13
 
13
- - **[Exact principle heading]**: PASS | JUSTIFIED EXCEPTION | FAIL — [concrete evidence]
14
+ Each entry must use the canonical form
15
+ `- **<exact principle heading>**: <PASS | JUSTIFIED EXCEPTION | FAIL> — <concrete evidence>`.
16
+ Placeholders are invalid, and any `FAIL` blocks task generation. Replace the
17
+ anchor below; do not append entries beside an example list.
18
+
19
+ <!-- PRE-DESIGN-CONSTITUTION-ENTRIES -->
14
20
 
15
21
  ## Design
16
22
 
@@ -33,6 +39,8 @@ plan.
33
39
 
34
40
  ## Constitution Check (post-design)
35
41
 
36
- Repeat the same active principles used by the pre-design check.
42
+ Reuse the exact ordered principle names from the pre-design check and provide
43
+ fresh evidence about the completed design. Replace the anchor below; the two
44
+ checks must differ only in status/evidence, never in principle coverage.
37
45
 
38
- - **[Exact principle heading]**: PASS | JUSTIFIED EXCEPTION | FAIL — [concrete design evidence]
46
+ <!-- POST-DESIGN-CONSTITUTION-ENTRIES -->
@@ -1,5 +1,20 @@
1
1
  # Tasks: [Feature name]
2
2
 
3
+ ## Authoring contract
4
+
5
+ Replace every HTML anchor below with real content; do not append new tasks next
6
+ to retained examples. Across the entire file, task identifiers start at `T001`
7
+ and increase by exactly one without resetting for a new story or section.
8
+
9
+ The canonical task form is:
10
+ ``- [ ] T001 [P] [US1] Description with FR-###/SC-### coverage in `path/to/file` | Verify: observable outcome``
11
+
12
+ `[P]` is optional and must precede the optional `[US#]` tag. Before
13
+ `| Verify:`, each task must contain exactly one backtick span, reserved for one
14
+ literal repository-relative path. Do not use placeholders, globs, absolute or
15
+ home-relative paths, repository escapes, URIs, or extra backticks. Every task
16
+ must end with a concrete `Verify` outcome.
17
+
3
18
  ## MVP scope
4
19
 
5
20
  [Name the first independently testable story and its completion evidence.]
@@ -10,20 +25,18 @@
10
25
 
11
26
  ## Story US1
12
27
 
13
- - [ ] T001 [US1] Add the failing behavior test for FR-001 and buildable SC-001 in `[exact/test/path]` | Verify: the focused test fails for the missing behavior
14
- - [ ] T002 [US1] Implement FR-001 and buildable SC-001 in `[exact/source/path]` | Verify: the focused test passes
15
- - [ ] T003 [P] [US1] Update independent documentation for FR-001 in `[exact/doc/path]` | Verify: the documented contract matches the tested behavior
28
+ <!-- STORY-US1-TASKS -->
16
29
 
17
30
  Outcome SCs remain verification targets; do not manufacture implementation tasks
18
31
  for them.
19
32
 
20
33
  ## Parallel execution
21
34
 
22
- [Keep exactly one form below. Use `[P]` only when mutable paths cannot overlap.]
35
+ [Replace the anchor with exactly one form: concrete task pairings covering every
36
+ `[P]` task, or `- None: <evidence-backed reason>`. Never keep both forms.]
23
37
 
24
- - T003 may run with T001 because `[exact/doc/path]` and `[exact/test/path]` do not overlap.
25
- - None: [reason no tasks can safely overlap]
38
+ <!-- PARALLEL-EXECUTION-EVIDENCE -->
26
39
 
27
40
  ## Final verification
28
41
 
29
- - [ ] T004 [US1] Map FR-001 and buildable SC-001 evidence in `[verify-report path]` | Verify: oracle records a passing verdict with executed evidence
42
+ <!-- FINAL-VERIFICATION-TASKS -->
@@ -26,10 +26,14 @@ Oracle review; mandatory final Oracle verify still applies.
26
26
 
27
27
  ## Ownership and inputs
28
28
 
29
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`. Every bundled
30
+ asset path in this contract is anchored to that installed skill root rather than
31
+ the project or current working directory.
32
+
29
33
  Root coordinates the phase and dispatches Oracle. Oracle remains read-only: it
30
34
  must not edit source, SDD artifacts, or coordination state. Root persists the
31
35
  returned review at `openspec/changes/<change>/plan-review.md` using
32
- `templates/plan-review.md`.
36
+ `<skill-dir>/templates/plan-review.md`.
33
37
 
34
38
  Review these canonical inputs:
35
39
 
@@ -6,16 +6,20 @@ description: Close a passing artifact-backed thoth-agents change by transactiona
6
6
  # Thoth Archive
7
7
 
8
8
  Archive is the required terminal transition for Accelerated and Full routes.
9
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`, and resolve
10
+ `<skills-root>` as its parent directory. Bundled paths below are anchored to
11
+ those installed roots rather than the project or current working directory.
9
12
 
10
13
  1. Confirm every task is `[x]`, `verify-report.md` records independent oracle
11
14
  `PASS`, its compliance matrix covers every FR and buildable SC, every outcome
12
15
  SC has observed PASS evidence or an explicit residual RISK, and no unresolved
13
16
  CRITICAL issue remains.
14
- 2. Prepare `archive-report.md` from the bundled template with status `READY`,
17
+ 2. Prepare `archive-report.md` from
18
+ `<skills-root>/thoth-sdd/templates/archive-report.md` with status `READY`,
15
19
  verification lineage, completed scope, deviations, residual warnings, and
16
20
  the pending canonical-sync line.
17
- 3. Run the thoth-sdd validator through `closeout`.
18
- 4. Run `scripts/archive.mjs --change <path> --date YYYY-MM-DD --json`.
21
+ 3. Run `node "<skills-root>/thoth-sdd/scripts/validate.mjs"` through `closeout`.
22
+ 4. Run `node "<skill-dir>/scripts/archive.mjs" --change <path> --date YYYY-MM-DD --json`.
19
23
  5. Return the dated archive path, updated capability specifications, and audit
20
24
  summary.
21
25
 
@@ -6,6 +6,9 @@ description: Create or explicitly amend the project constitution, choose its gov
6
6
  # Thoth Constitution
7
7
 
8
8
  The canonical project constitution is `openspec/memory/constitution.md`.
9
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`. Every bundled
10
+ validator or template path below is anchored to that installed skill root rather
11
+ than the project or current working directory.
9
12
 
10
13
  ## Routine SDD
11
14
 
@@ -36,10 +39,10 @@ a confirmed durable governance change.
36
39
  6. Remove unexplained placeholders and deferred TODOs, then run:
37
40
 
38
41
  ```bash
39
- node skills/thoth-constitution/scripts/validate.mjs \
42
+ node "<skill-dir>/scripts/validate.mjs" \
40
43
  --constitution openspec/memory/constitution.md --json
41
44
  ```
42
45
 
43
- Initialization copies `templates/constitution.md` only when the project has no
44
- constitution, resolves its date placeholders, and never overwrites a
45
- project-owned constitution.
46
+ Initialization copies `<skill-dir>/templates/constitution.md` only when the
47
+ project has no constitution, resolves its date placeholders, and never
48
+ overwrites a project-owned constitution.
@@ -19,13 +19,18 @@ target structure before changing it, then ensures these minimum paths exist:
19
19
  - `openspec/changes/archive/`
20
20
  - `openspec/specs/`
21
21
  - `openspec/memory/`
22
- - `openspec/templates/`
23
22
  - `openspec/.thoth-agents.json`
24
23
 
25
- Missing constitution and SDD template files are copied from the installed
26
- bundle. Existing constitution and template files remain byte-for-byte intact;
27
- the thoth-managed manifest may be normalized to the current contract. Inspect
28
- the JSON `created`, `managed`, and `preserved` arrays when reporting the result.
24
+ The missing constitution is copied from the installed sibling
25
+ `thoth-constitution` skill. An existing constitution remains byte-for-byte
26
+ intact, while the thoth-managed manifest may be normalized to the current
27
+ contract. Any legacy `openspec/templates/` tree is outside the managed graph and
28
+ remains untouched. Inspect the JSON `created`, `managed`, and `preserved` arrays
29
+ when reporting the result.
30
+
31
+ The initializer never creates, copies, validates, reads, or synchronizes SDD
32
+ workflow templates. Those assets remain in the installed `thoth-sdd` skill and
33
+ are consumed directly from that bundle by the workflow phase contracts.
29
34
 
30
35
  This operation is offline, idempotent, and harness-neutral. Every write stays
31
36
  inside `openspec/`. It never installs or synchronizes skills, agents, plugins,
@@ -1,11 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import {
4
- cpSync,
5
4
  existsSync,
6
5
  lstatSync,
7
6
  mkdirSync,
8
- readdirSync,
9
7
  readFileSync,
10
8
  writeFileSync,
11
9
  } from 'node:fs';
@@ -21,7 +19,6 @@ const OPEN_SPEC_DIRECTORIES = [
21
19
  join('openspec', 'changes', 'archive'),
22
20
  join('openspec', 'specs'),
23
21
  join('openspec', 'memory'),
24
- join('openspec', 'templates'),
25
22
  ];
26
23
 
27
24
  function parseArgs(argv) {
@@ -52,37 +49,6 @@ function assertRegularFile(path, label) {
52
49
  }
53
50
  }
54
51
 
55
- function collectFiles(sourceRoot, targetRoot) {
56
- if (!existsSync(sourceRoot)) {
57
- throw new Error(`Bundled SDD template directory is missing: ${sourceRoot}`);
58
- }
59
- assertDirectory(sourceRoot, 'Bundled template directory');
60
- const entries = [];
61
-
62
- function visit(source, target) {
63
- for (const entry of readdirSync(source, { withFileTypes: true })) {
64
- const sourcePath = join(source, entry.name);
65
- const targetPath = join(target, entry.name);
66
- if (entry.isSymbolicLink()) {
67
- throw new Error(
68
- `Bundled templates cannot contain symlinks: ${sourcePath}`,
69
- );
70
- }
71
- if (entry.isDirectory()) {
72
- entries.push({ kind: 'directory', target: targetPath });
73
- visit(sourcePath, targetPath);
74
- } else if (entry.isFile()) {
75
- entries.push({ kind: 'file', source: sourcePath, target: targetPath });
76
- } else {
77
- throw new Error(`Unsupported bundled template entry: ${sourcePath}`);
78
- }
79
- }
80
- }
81
-
82
- visit(sourceRoot, targetRoot);
83
- return entries;
84
- }
85
-
86
52
  function preflight(project) {
87
53
  assertDirectory(project, 'Project root');
88
54
  if (!existsSync(project)) {
@@ -104,20 +70,9 @@ function preflight(project) {
104
70
  );
105
71
  }
106
72
 
107
- const templates = collectFiles(
108
- join(BUNDLE_ROOT, 'thoth-sdd', 'templates'),
109
- join(project, 'openspec', 'templates'),
110
- );
111
73
  for (const directory of OPEN_SPEC_DIRECTORIES) {
112
74
  assertDirectory(join(project, directory), 'OpenSpec path');
113
75
  }
114
- for (const entry of templates) {
115
- if (entry.kind === 'directory') {
116
- assertDirectory(entry.target, 'OpenSpec template path');
117
- } else {
118
- assertRegularFile(entry.target, 'OpenSpec template path');
119
- }
120
- }
121
76
 
122
77
  const constitutionTarget = join(
123
78
  project,
@@ -133,7 +88,6 @@ function preflight(project) {
133
88
  constitutionSource,
134
89
  constitutionTarget,
135
90
  manifestTarget,
136
- templates,
137
91
  };
138
92
  }
139
93
 
@@ -143,15 +97,6 @@ function createDirectory(target, report) {
143
97
  report.created.push(target);
144
98
  }
145
99
 
146
- function copyPreservingExisting(source, target, report) {
147
- if (existsSync(target)) {
148
- report.preserved.push(target);
149
- return;
150
- }
151
- cpSync(source, target, { errorOnExist: true });
152
- report.created.push(target);
153
- }
154
-
155
100
  function writePreservingExisting(target, content, report) {
156
101
  if (existsSync(target)) {
157
102
  report.preserved.push(target);
@@ -179,10 +124,6 @@ function synchronizeOpenSpec(project, assets, report) {
179
124
  for (const directory of OPEN_SPEC_DIRECTORIES) {
180
125
  createDirectory(join(project, directory), report);
181
126
  }
182
- for (const entry of assets.templates) {
183
- if (entry.kind === 'directory') createDirectory(entry.target, report);
184
- else copyPreservingExisting(entry.source, entry.target, report);
185
- }
186
127
 
187
128
  const today = new Date().toISOString().slice(0, 10);
188
129
  writePreservingExisting(
@@ -37,6 +37,10 @@ Accelerated the minimum recommendation but does not force it.
37
37
 
38
38
  ## Progressive loading
39
39
 
40
+ Resolve `<skill-dir>` as the directory containing this `SKILL.md`, and resolve
41
+ `<skills-root>` as its parent directory. Every bundled path below is anchored to
42
+ one of those installed roots, never to the project or current working directory.
43
+
40
44
  Use only installed local contracts during the pipeline. Never invoke the
41
45
  thoth-agents CLI, `npx skills add`, or a network fetch to advance an SDD phase.
42
46
  If a required contract or external skill is missing, stop and report an
@@ -46,24 +50,24 @@ Read only the current phase contract:
46
50
 
47
51
  | Phase | Contract |
48
52
  | --- | --- |
49
- | explore | `references/phases/explore.md` |
50
- | specify | `references/phases/specify.md` |
51
- | clarify | `references/phases/clarify.md` |
52
- | plan | `references/phases/plan.md` |
53
- | checklist | `references/phases/checklist.md` |
54
- | tasks | `references/phases/tasks.md` |
55
- | plan-review | bundled `plan-reviewer` skill |
56
- | implement | `references/phases/implement.md` |
57
- | verify | `references/phases/verify.md` |
58
- | converge | `references/phases/converge.md` |
59
- | archive | bundled `thoth-archive` skill |
53
+ | explore | `<skill-dir>/references/phases/explore.md` |
54
+ | specify | `<skill-dir>/references/phases/specify.md` |
55
+ | clarify | `<skill-dir>/references/phases/clarify.md` |
56
+ | plan | `<skill-dir>/references/phases/plan.md` |
57
+ | checklist | `<skill-dir>/references/phases/checklist.md` |
58
+ | tasks | `<skill-dir>/references/phases/tasks.md` |
59
+ | plan-review | `<skills-root>/plan-reviewer/SKILL.md` |
60
+ | implement | `<skill-dir>/references/phases/implement.md` |
61
+ | verify | `<skill-dir>/references/phases/verify.md` |
62
+ | converge | `<skill-dir>/references/phases/converge.md` |
63
+ | archive | `<skills-root>/thoth-archive/SKILL.md` |
60
64
 
61
65
  ## Validation gates
62
66
 
63
- Run the validator from this skill directory:
67
+ Run the validator from its installed absolute path:
64
68
 
65
69
  ```text
66
- node scripts/validate.mjs --change openspec/changes/<feature> --route <accelerated|full> --through <specify|plan|tasks|checklist|ready|closeout> --json
70
+ node "<skill-dir>/scripts/validate.mjs" --change openspec/changes/<feature> --route <accelerated|full> --through <specify|plan|tasks|checklist|ready|closeout> --json
67
71
  ```
68
72
 
69
73
  - **Accelerated**: `specify`, then `ready` after the fast-forward planning pass,
@@ -5,6 +5,9 @@
5
5
  **Activation**: high contract/failure risk, compliance sensitivity, or
6
6
  ambiguity-prone scope
7
7
 
8
+ When activated, start from `<skill-dir>/templates/checklist.md`, where
9
+ `<skill-dir>` is the directory containing the installed `thoth-sdd/SKILL.md`.
10
+
8
11
  Record the concrete activation reason. Use sequential `CHK###` items to audit
9
12
  the requirements—not implementation—across the base taxonomy: Completeness,
10
13
  Clarity, Consistency, Measurability, and Coverage.
@@ -3,10 +3,14 @@
3
3
  **Owner**: root<br>
4
4
  **Output**: `openspec/changes/<feature>/plan.md`
5
5
 
6
- Start from `templates/plan.md`. Read active constitution principles and record
7
- evidence-backed pre-design and post-design Constitution Checks. Routine SDD does
8
- not amend the constitution or run its lifecycle validator; activate
9
- `thoth-constitution` only when an explicit constitution amendment is in scope.
6
+ Start from `<skill-dir>/templates/plan.md`, where `<skill-dir>` is the directory
7
+ containing the installed `thoth-sdd/SKILL.md`. Read active constitution
8
+ principles and record evidence-backed pre-design and post-design Constitution
9
+ Checks. Extract the exact active numbered principle headings once, then reuse
10
+ that same ordered name set in both checks; only status and evidence may differ.
11
+ Routine SDD does not amend the constitution or run its lifecycle validator;
12
+ activate `thoth-constitution` only when an explicit constitution amendment is
13
+ in scope.
10
14
 
11
15
  Map each technical choice to FR/SC or a confirmed repository constraint. Name
12
16
  affected components, interfaces, exact paths, migrations, risks, rollback, and
@@ -3,7 +3,9 @@
3
3
  **Owner**: root<br>
4
4
  **Output**: `openspec/changes/<feature>/spec.md`
5
5
 
6
- Start from `templates/spec.md` and remain implementation-neutral.
6
+ Start from `<skill-dir>/templates/spec.md`, where `<skill-dir>` is the directory
7
+ containing the installed `thoth-sdd/SKILL.md`, and remain
8
+ implementation-neutral.
7
9
 
8
10
  - Record **Why**, **Impact**, and affected kebab-case capability slugs (or
9
11
  `None`).
@@ -3,15 +3,22 @@
3
3
  **Owner**: root<br>
4
4
  **Output**: `openspec/changes/<feature>/tasks.md`
5
5
 
6
+ Start from `<skill-dir>/templates/tasks.md`, where `<skill-dir>` is the directory
7
+ containing the installed `thoth-sdd/SKILL.md`.
8
+
6
9
  Every executable line uses exactly:
7
10
 
8
11
  ```text
9
12
  - [ ] T### [P?] [US#?] description with FR-###/SC-### coverage in `exact/path` | Verify: observable outcome
10
13
  ```
11
14
 
12
- IDs are unique and sequential. `[US#]` links story work; omit it only for shared
13
- setup or closeout. Cover every FR and **buildable** SC. Outcome SCs remain
14
- verification targets but do not justify artificial implementation tasks.
15
+ IDs start at `T001` and remain unique and sequential across the entire file;
16
+ never reset numbering per story or section. `[P]`, when present, precedes
17
+ `[US#]`; omit `[US#]` only for shared setup or closeout. Before `| Verify:`, use
18
+ exactly one backtick span containing one literal repository-relative path and no
19
+ placeholder, glob, absolute path, URI, home path, or repository escape. Cover
20
+ every FR and **buildable** SC. Outcome SCs remain verification targets but do
21
+ not justify artificial implementation tasks.
15
22
 
16
23
  Order test-first work before its implementation, group tasks by independently
17
24
  deliverable story, identify the MVP, and state dependencies. `[P]` is permitted
@@ -17,6 +17,7 @@ task.
17
17
  Return `pass` or `fail`, compliance matrix, commands/results, stable findings,
18
18
  critical issues, warnings, and remediation anchors. For Direct, return the
19
19
  verdict in-session. For Accelerated and Full, root persists oracle's exact result
20
- using `templates/verify-report.md`. Fail routes to converge (straight back to
21
- implement for Direct); PASS permits closeout and archive for artifact-backed
22
- routes.
20
+ using `<skill-dir>/templates/verify-report.md`, where `<skill-dir>` is the
21
+ directory containing the installed `thoth-sdd/SKILL.md`. Fail routes to converge
22
+ (straight back to implement for Direct); PASS permits closeout and archive for
23
+ artifact-backed routes.
@@ -6,11 +6,17 @@
6
6
 
7
7
  ## Constitution Check (pre-design)
8
8
 
9
- Repeat every active Constitution principle by its exact heading. Each entry must
10
- use one status and concrete evidence; placeholders are invalid in a completed
11
- plan.
9
+ Read `openspec/memory/constitution.md` and extract every active numbered
10
+ principle heading. Build one ordered name set and reuse it unchanged in both
11
+ Constitution Checks: do not add, remove, abbreviate, or rename a heading between
12
+ the pre-design and post-design lists.
12
13
 
13
- - **[Exact principle heading]**: PASS | JUSTIFIED EXCEPTION | FAIL — [concrete evidence]
14
+ Each entry must use the canonical form
15
+ `- **<exact principle heading>**: <PASS | JUSTIFIED EXCEPTION | FAIL> — <concrete evidence>`.
16
+ Placeholders are invalid, and any `FAIL` blocks task generation. Replace the
17
+ anchor below; do not append entries beside an example list.
18
+
19
+ <!-- PRE-DESIGN-CONSTITUTION-ENTRIES -->
14
20
 
15
21
  ## Design
16
22
 
@@ -33,6 +39,8 @@ plan.
33
39
 
34
40
  ## Constitution Check (post-design)
35
41
 
36
- Repeat the same active principles used by the pre-design check.
42
+ Reuse the exact ordered principle names from the pre-design check and provide
43
+ fresh evidence about the completed design. Replace the anchor below; the two
44
+ checks must differ only in status/evidence, never in principle coverage.
37
45
 
38
- - **[Exact principle heading]**: PASS | JUSTIFIED EXCEPTION | FAIL — [concrete design evidence]
46
+ <!-- POST-DESIGN-CONSTITUTION-ENTRIES -->
@@ -1,5 +1,20 @@
1
1
  # Tasks: [Feature name]
2
2
 
3
+ ## Authoring contract
4
+
5
+ Replace every HTML anchor below with real content; do not append new tasks next
6
+ to retained examples. Across the entire file, task identifiers start at `T001`
7
+ and increase by exactly one without resetting for a new story or section.
8
+
9
+ The canonical task form is:
10
+ ``- [ ] T001 [P] [US1] Description with FR-###/SC-### coverage in `path/to/file` | Verify: observable outcome``
11
+
12
+ `[P]` is optional and must precede the optional `[US#]` tag. Before
13
+ `| Verify:`, each task must contain exactly one backtick span, reserved for one
14
+ literal repository-relative path. Do not use placeholders, globs, absolute or
15
+ home-relative paths, repository escapes, URIs, or extra backticks. Every task
16
+ must end with a concrete `Verify` outcome.
17
+
3
18
  ## MVP scope
4
19
 
5
20
  [Name the first independently testable story and its completion evidence.]
@@ -10,20 +25,18 @@
10
25
 
11
26
  ## Story US1
12
27
 
13
- - [ ] T001 [US1] Add the failing behavior test for FR-001 and buildable SC-001 in `[exact/test/path]` | Verify: the focused test fails for the missing behavior
14
- - [ ] T002 [US1] Implement FR-001 and buildable SC-001 in `[exact/source/path]` | Verify: the focused test passes
15
- - [ ] T003 [P] [US1] Update independent documentation for FR-001 in `[exact/doc/path]` | Verify: the documented contract matches the tested behavior
28
+ <!-- STORY-US1-TASKS -->
16
29
 
17
30
  Outcome SCs remain verification targets; do not manufacture implementation tasks
18
31
  for them.
19
32
 
20
33
  ## Parallel execution
21
34
 
22
- [Keep exactly one form below. Use `[P]` only when mutable paths cannot overlap.]
35
+ [Replace the anchor with exactly one form: concrete task pairings covering every
36
+ `[P]` task, or `- None: <evidence-backed reason>`. Never keep both forms.]
23
37
 
24
- - T003 may run with T001 because `[exact/doc/path]` and `[exact/test/path]` do not overlap.
25
- - None: [reason no tasks can safely overlap]
38
+ <!-- PARALLEL-EXECUTION-EVIDENCE -->
26
39
 
27
40
  ## Final verification
28
41
 
29
- - [ ] T004 [US1] Map FR-001 and buildable SC-001 evidence in `[verify-report path]` | Verify: oracle records a passing verdict with executed evidence
42
+ <!-- FINAL-VERIFICATION-TASKS -->