sdd-mcp-server 3.4.0 → 3.5.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/README.md +75 -40
- package/dist/adapters/cli/SDDToolAdapter.js +3 -3
- package/dist/adapters/cli/SDDToolAdapter.js.map +1 -1
- package/dist/application/services/staticSteering.js +2 -4
- package/dist/application/services/staticSteering.js.map +1 -1
- package/dist/cli/install-skills.d.ts +10 -32
- package/dist/cli/install-skills.js +213 -176
- package/dist/cli/install-skills.js.map +1 -1
- package/dist/cli/install-target.d.ts +127 -0
- package/dist/cli/install-target.js +127 -0
- package/dist/cli/install-target.js.map +1 -0
- package/dist/cli/migrate-steering.js +13 -13
- package/dist/cli/migrate-steering.js.map +1 -1
- package/dist/cli/sdd-mcp-cli.d.ts +1 -1
- package/dist/cli/sdd-mcp-cli.js +14 -10
- package/dist/cli/sdd-mcp-cli.js.map +1 -1
- package/dist/cli/tool-support/antigravity.d.ts +6 -1
- package/dist/cli/tool-support/antigravity.js +55 -12
- package/dist/cli/tool-support/antigravity.js.map +1 -1
- package/dist/cli/tool-support/claude-code.d.ts +5 -0
- package/dist/cli/tool-support/claude-code.js +93 -0
- package/dist/cli/tool-support/claude-code.js.map +1 -0
- package/dist/cli/tool-support/codex.d.ts +18 -1
- package/dist/cli/tool-support/codex.js +161 -36
- package/dist/cli/tool-support/codex.js.map +1 -1
- package/dist/cli/tool-support/index.d.ts +2 -2
- package/dist/cli/tool-support/root-guidance.d.ts +9 -0
- package/dist/cli/tool-support/root-guidance.js +40 -0
- package/dist/cli/tool-support/root-guidance.js.map +1 -0
- package/dist/cli/tool-support/target-agent-renderer.d.ts +11 -0
- package/dist/cli/tool-support/target-agent-renderer.js +52 -0
- package/dist/cli/tool-support/target-agent-renderer.js.map +1 -0
- package/dist/cli/tool-support/target-installer.d.ts +40 -0
- package/dist/cli/tool-support/target-installer.js +116 -0
- package/dist/cli/tool-support/target-installer.js.map +1 -0
- package/dist/cli/utils/gitignore-manager.d.ts +5 -0
- package/dist/cli/utils/gitignore-manager.js +85 -0
- package/dist/cli/utils/gitignore-manager.js.map +1 -0
- package/dist/cli/utils/preserving-writer.d.ts +13 -0
- package/dist/cli/utils/preserving-writer.js +106 -0
- package/dist/cli/utils/preserving-writer.js.map +1 -0
- package/dist/hooks/HookLoader.js +9 -1
- package/dist/hooks/HookLoader.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/shared/BaseManager.d.ts +10 -1
- package/dist/shared/BaseManager.js +34 -5
- package/dist/shared/BaseManager.js.map +1 -1
- package/dist/skills/SkillManager.d.ts +3 -1
- package/dist/skills/SkillManager.js +15 -3
- package/dist/skills/SkillManager.js.map +1 -1
- package/package.json +1 -1
- package/sdd-entry.js +2 -2
- package/skills/sdd-design/SKILL.md +4 -0
- package/skills/sdd-implement/SKILL.md +4 -0
- package/skills/sdd-requirements/SKILL.md +4 -0
- package/skills/sdd-review/SKILL.md +4 -0
- package/skills/sdd-security-check/SKILL.md +4 -0
- package/skills/sdd-steering/SKILL.md +4 -0
- package/skills/sdd-steering-custom/SKILL.md +4 -0
- package/skills/sdd-tasks/SKILL.md +4 -0
- package/skills/sdd-test-gen/SKILL.md +4 -0
- package/skills/simple-task/SKILL.md +4 -0
- package/templates/CLAUDE.md +2 -36
- package/templates/codex-AGENTS.md +1 -2
- package/templates/codex-hook-runner.js +85 -0
- package/dist/utils/sddPaths.d.ts +0 -69
- package/dist/utils/sddPaths.js +0 -138
- package/dist/utils/sddPaths.js.map +0 -1
|
@@ -15,12 +15,19 @@ export interface ComponentDescriptor {
|
|
|
15
15
|
export interface InstallResult {
|
|
16
16
|
/** Successfully installed components */
|
|
17
17
|
installed: string[];
|
|
18
|
+
/** Existing components preserved without modification */
|
|
19
|
+
skipped?: string[];
|
|
18
20
|
/** Failed installations with error details */
|
|
19
21
|
failed: Array<{
|
|
20
22
|
name: string;
|
|
21
23
|
error: string;
|
|
24
|
+
path?: string;
|
|
22
25
|
}>;
|
|
23
26
|
}
|
|
27
|
+
interface DirectoryCopyResult {
|
|
28
|
+
copied: boolean;
|
|
29
|
+
skipped: boolean;
|
|
30
|
+
}
|
|
24
31
|
/**
|
|
25
32
|
* Parsed component metadata from YAML frontmatter
|
|
26
33
|
*/
|
|
@@ -120,7 +127,8 @@ export declare abstract class BaseManager<T extends ComponentDescriptor> {
|
|
|
120
127
|
* @param source - Source directory
|
|
121
128
|
* @param destination - Destination directory
|
|
122
129
|
*/
|
|
123
|
-
protected copyDirectory(source: string, destination: string): Promise<
|
|
130
|
+
protected copyDirectory(source: string, destination: string): Promise<DirectoryCopyResult>;
|
|
131
|
+
private recordDirectoryCopy;
|
|
124
132
|
/**
|
|
125
133
|
* Check if a path exists
|
|
126
134
|
* @param filePath - Path to check
|
|
@@ -128,3 +136,4 @@ export declare abstract class BaseManager<T extends ComponentDescriptor> {
|
|
|
128
136
|
*/
|
|
129
137
|
protected pathExists(filePath: string): Promise<boolean>;
|
|
130
138
|
}
|
|
139
|
+
export {};
|
|
@@ -132,6 +132,7 @@ export class BaseManager {
|
|
|
132
132
|
async installComponents(targetPath) {
|
|
133
133
|
const result = {
|
|
134
134
|
installed: [],
|
|
135
|
+
skipped: [],
|
|
135
136
|
failed: [],
|
|
136
137
|
};
|
|
137
138
|
// Create target directory
|
|
@@ -147,8 +148,8 @@ export class BaseManager {
|
|
|
147
148
|
const sourceDir = path.join(this.config.componentPath, componentName);
|
|
148
149
|
const destDir = path.join(targetPath, componentName);
|
|
149
150
|
try {
|
|
150
|
-
await this.copyDirectory(sourceDir, destDir);
|
|
151
|
-
|
|
151
|
+
const copyResult = await this.copyDirectory(sourceDir, destDir);
|
|
152
|
+
this.recordDirectoryCopy(result, componentName, copyResult);
|
|
152
153
|
}
|
|
153
154
|
catch (error) {
|
|
154
155
|
result.failed.push({
|
|
@@ -168,10 +169,14 @@ export class BaseManager {
|
|
|
168
169
|
const sourceFile = path.join(this.config.componentPath, entry.name);
|
|
169
170
|
const destFile = path.join(targetPath, entry.name);
|
|
170
171
|
try {
|
|
171
|
-
await fs.promises.copyFile(sourceFile, destFile);
|
|
172
|
+
await fs.promises.copyFile(sourceFile, destFile, fs.constants.COPYFILE_EXCL);
|
|
172
173
|
result.installed.push(componentName);
|
|
173
174
|
}
|
|
174
175
|
catch (error) {
|
|
176
|
+
if (isAlreadyExists(error)) {
|
|
177
|
+
result.skipped?.push(componentName);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
175
180
|
result.failed.push({
|
|
176
181
|
name: componentName,
|
|
177
182
|
error: error instanceof Error ? error.message : String(error),
|
|
@@ -245,16 +250,37 @@ export class BaseManager {
|
|
|
245
250
|
async copyDirectory(source, destination) {
|
|
246
251
|
await fs.promises.mkdir(destination, { recursive: true });
|
|
247
252
|
const entries = await fs.promises.readdir(source, { withFileTypes: true });
|
|
253
|
+
let copied = false;
|
|
254
|
+
let skipped = false;
|
|
248
255
|
for (const entry of entries) {
|
|
249
256
|
const sourcePath = path.join(source, entry.name);
|
|
250
257
|
const destPath = path.join(destination, entry.name);
|
|
251
258
|
if (entry.isDirectory()) {
|
|
252
|
-
await this.copyDirectory(sourcePath, destPath);
|
|
259
|
+
const childResult = await this.copyDirectory(sourcePath, destPath);
|
|
260
|
+
copied ||= childResult.copied;
|
|
261
|
+
skipped ||= childResult.skipped;
|
|
253
262
|
}
|
|
254
263
|
else {
|
|
255
|
-
|
|
264
|
+
try {
|
|
265
|
+
await fs.promises.copyFile(sourcePath, destPath, fs.constants.COPYFILE_EXCL);
|
|
266
|
+
copied = true;
|
|
267
|
+
}
|
|
268
|
+
catch (error) {
|
|
269
|
+
if (!isAlreadyExists(error))
|
|
270
|
+
throw error;
|
|
271
|
+
skipped = true;
|
|
272
|
+
}
|
|
256
273
|
}
|
|
257
274
|
}
|
|
275
|
+
return { copied, skipped };
|
|
276
|
+
}
|
|
277
|
+
recordDirectoryCopy(result, componentName, copyResult) {
|
|
278
|
+
if (copyResult.copied || !copyResult.skipped) {
|
|
279
|
+
result.installed.push(componentName);
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
result.skipped?.push(componentName);
|
|
283
|
+
}
|
|
258
284
|
}
|
|
259
285
|
/**
|
|
260
286
|
* Check if a path exists
|
|
@@ -271,4 +297,7 @@ export class BaseManager {
|
|
|
271
297
|
}
|
|
272
298
|
}
|
|
273
299
|
}
|
|
300
|
+
function isAlreadyExists(error) {
|
|
301
|
+
return typeof error === 'object' && error !== null && 'code' in error && error.code === 'EEXIST';
|
|
302
|
+
}
|
|
274
303
|
//# sourceMappingURL=BaseManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseManager.js","sourceRoot":"","sources":["../../src/shared/BaseManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseManager.js","sourceRoot":"","sources":["../../src/shared/BaseManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AA4D7B;;;;;;;GAOG;AACH,MAAM,OAAgB,WAAW;IACZ,MAAM,CAAgB;IAEzC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG;YACZ,GAAG,MAAM;YACT,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,KAAK;SAC7C,CAAC;IACJ,CAAC;IAWD;;;;OAIG;IACO,gBAAgB,CAAC,SAAiB;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAC7D,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc;QAClB,MAAM,UAAU,GAAQ,EAAE,CAAC;QAE3B,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAA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C,aAAa,CAAC,CAAC;oBAC7E,MAAM,GAAG,IAAI,CAAC;gBAChB,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;wBAAE,MAAM,KAAK,CAAC;oBACzC,OAAO,GAAG,IAAI,CAAC;gBACjB,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;IAEO,mBAAmB,CACzB,MAAqB,EACrB,aAAqB,EACrB,UAA+B;QAE/B,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YAC7C,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,UAAU,CAAC,QAAgB;QACzC,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AACnG,CAAC"}
|
|
@@ -15,6 +15,8 @@ export interface SkillDescriptor {
|
|
|
15
15
|
export interface InstallResult {
|
|
16
16
|
/** Successfully installed skills */
|
|
17
17
|
installed: string[];
|
|
18
|
+
/** Existing skills preserved without modification */
|
|
19
|
+
skipped?: string[];
|
|
18
20
|
/** Failed installations with error details */
|
|
19
21
|
failed: Array<{
|
|
20
22
|
name: string;
|
|
@@ -33,7 +35,7 @@ export interface SkillMetadata {
|
|
|
33
35
|
* Manages SDD skills - discovery, listing, and installation
|
|
34
36
|
*
|
|
35
37
|
* Skills are markdown files in the skills directory that provide
|
|
36
|
-
* guidance for
|
|
38
|
+
* guidance for supported AI-agent interactions.
|
|
37
39
|
*/
|
|
38
40
|
export declare class SkillManager {
|
|
39
41
|
private readonly skillsPath;
|
|
@@ -4,7 +4,7 @@ import * as path from 'path';
|
|
|
4
4
|
* Manages SDD skills - discovery, listing, and installation
|
|
5
5
|
*
|
|
6
6
|
* Skills are markdown files in the skills directory that provide
|
|
7
|
-
* guidance for
|
|
7
|
+
* guidance for supported AI-agent interactions.
|
|
8
8
|
*/
|
|
9
9
|
export class SkillManager {
|
|
10
10
|
skillsPath;
|
|
@@ -70,6 +70,7 @@ export class SkillManager {
|
|
|
70
70
|
async installSkills(targetPath) {
|
|
71
71
|
const result = {
|
|
72
72
|
installed: [],
|
|
73
|
+
skipped: [],
|
|
73
74
|
failed: [],
|
|
74
75
|
};
|
|
75
76
|
// Create target directory
|
|
@@ -87,14 +88,22 @@ export class SkillManager {
|
|
|
87
88
|
await fs.promises.mkdir(destDir, { recursive: true });
|
|
88
89
|
// Copy all files in the skill directory
|
|
89
90
|
const files = await fs.promises.readdir(sourceDir, { withFileTypes: true });
|
|
91
|
+
let copiedFile = false;
|
|
90
92
|
for (const file of files) {
|
|
91
93
|
if (!file.isDirectory()) {
|
|
92
94
|
const sourceFile = path.join(sourceDir, file.name);
|
|
93
95
|
const destFile = path.join(destDir, file.name);
|
|
94
|
-
|
|
96
|
+
try {
|
|
97
|
+
await fs.promises.copyFile(sourceFile, destFile, fs.constants.COPYFILE_EXCL);
|
|
98
|
+
copiedFile = true;
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
if (!isAlreadyExists(error))
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
95
104
|
}
|
|
96
105
|
}
|
|
97
|
-
result.installed.push(skillName);
|
|
106
|
+
(copiedFile ? result.installed : result.skipped ??= []).push(skillName);
|
|
98
107
|
}
|
|
99
108
|
catch (error) {
|
|
100
109
|
result.failed.push({
|
|
@@ -135,4 +144,7 @@ export class SkillManager {
|
|
|
135
144
|
return metadata;
|
|
136
145
|
}
|
|
137
146
|
}
|
|
147
|
+
function isAlreadyExists(error) {
|
|
148
|
+
return typeof error === 'object' && error !== null && 'code' in error && error.code === 'EEXIST';
|
|
149
|
+
}
|
|
138
150
|
//# sourceMappingURL=SkillManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillManager.js","sourceRoot":"","sources":["../../src/skills/SkillManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SkillManager.js","sourceRoot":"","sources":["../../src/skills/SkillManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAmC7B;;;;;GAKG;AACH,MAAM,OAAO,YAAY;IACN,UAAU,CAAS;IAEpC;;;OAGG;IACH,YAAY,UAAkB;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU;QACd,MAAM,MAAM,GAAsB,EAAE,CAAC;QAErC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YAEpF,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;oBACxB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC;oBAC5B,MAAM,WAAW,GAAG,IAAI,CAA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AAC;YACrC,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;gBACnB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;gBAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBAChD,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACxB,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AACnG,CAAC"}
|
package/package.json
CHANGED
package/sdd-entry.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - MCP server mode (default)
|
|
8
8
|
*
|
|
9
9
|
* Usage:
|
|
10
|
-
* npx sdd-mcp-server install --list # CLI: List
|
|
11
|
-
* npx sdd-mcp-server install # CLI: Install
|
|
10
|
+
* npx sdd-mcp-server install --list # CLI: List target-native components
|
|
11
|
+
* npx sdd-mcp-server install # CLI: Install target-native components
|
|
12
12
|
* npx sdd-mcp-server # MCP: Start MCP server
|
|
13
13
|
*/
|
|
14
14
|
|
|
@@ -275,3 +275,7 @@ Apply these steering documents during design:
|
|
|
275
275
|
- [ ] Security considerations are addressed
|
|
276
276
|
- [ ] Testing approach is specified
|
|
277
277
|
- [ ] Linus-style review passed
|
|
278
|
+
|
|
279
|
+
## Specialist Delegation
|
|
280
|
+
|
|
281
|
+
When the host supports subagents, delegate this phase to the `architect` role with a compact handoff containing only the approved requirements, relevant project context, constraints, and required design decisions. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
@@ -296,3 +296,7 @@ Apply these steering documents during implementation:
|
|
|
296
296
|
| **Magic Numbers** | Unexplained numeric literals | Use named constants |
|
|
297
297
|
| **Deep Nesting** | Multiple levels of if/loops | Extract methods, early returns |
|
|
298
298
|
| **Long Methods** | Methods doing too much | Split into smaller methods |
|
|
299
|
+
|
|
300
|
+
## Specialist Delegation
|
|
301
|
+
|
|
302
|
+
When the host supports subagents, delegate implementation slices to the `implementer` role with a compact handoff containing only the approved task, acceptance criteria, relevant interfaces, and focused test command. Wait for the specialist and then integrate its result before advancing task status. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
@@ -145,3 +145,7 @@ Apply these steering documents during requirements generation:
|
|
|
145
145
|
- **KISS**: Keep requirements simple and unambiguous
|
|
146
146
|
- **YAGNI**: Only specify what's actually needed now
|
|
147
147
|
- **Single Responsibility**: Each requirement addresses one concern
|
|
148
|
+
|
|
149
|
+
## Specialist Delegation
|
|
150
|
+
|
|
151
|
+
When the host supports subagents, delegate this phase to the `planner` role with a compact handoff containing only the feature goal, approved context, constraints, and required deliverable. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
@@ -55,6 +55,10 @@ Before reviewing:
|
|
|
55
55
|
- [ ] Type mismatches or unsafe casts
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
## Specialist Delegation
|
|
59
|
+
|
|
60
|
+
When the host supports subagents, delegate the focused review to the `reviewer` role with a compact handoff containing only the diff or scope, approved requirements, project conventions, and verification evidence. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
61
|
+
|
|
58
62
|
#### Simplicity Assessment
|
|
59
63
|
|
|
60
64
|
Ask these questions:
|
|
@@ -191,3 +191,7 @@ When checking implementation against spec:
|
|
|
191
191
|
1. Verify security NFRs from requirements.md are met
|
|
192
192
|
2. Check security considerations from design.md are implemented
|
|
193
193
|
3. Ensure security-related tasks in tasks.md are complete
|
|
194
|
+
|
|
195
|
+
## Specialist Delegation
|
|
196
|
+
|
|
197
|
+
When the host supports subagents, delegate the audit to the `security-auditor` role with a compact handoff containing only the review scope, threat context, security requirements, and relevant diff. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
@@ -223,3 +223,7 @@ This skill generates documents manually. For automated analysis, the `sdd-init`
|
|
|
223
223
|
- Keep them updated as the project evolves
|
|
224
224
|
- Use custom steering for domain-specific rules
|
|
225
225
|
- Reference from AGENTS.md or CLAUDE.md in project root
|
|
226
|
+
|
|
227
|
+
## Specialist Delegation
|
|
228
|
+
|
|
229
|
+
When the host supports subagents, delegate this phase to the `planner` role with a compact handoff containing only the project facts, conventions, constraints, and requested steering scope. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
@@ -209,3 +209,7 @@ Custom steering documents are managed manually. After creating:
|
|
|
209
209
|
- [ ] Guidelines are actionable
|
|
210
210
|
- [ ] Examples show good and bad practices
|
|
211
211
|
- [ ] Checklist for verification included
|
|
212
|
+
|
|
213
|
+
## Specialist Delegation
|
|
214
|
+
|
|
215
|
+
When the host supports subagents, delegate this phase to the `planner` role with a compact handoff containing only the specialized domain, file scope, project constraints, and requested steering outcome. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
@@ -258,3 +258,7 @@ Apply these steering documents during task breakdown:
|
|
|
258
258
|
| **Big Tasks** | Hard to track progress | Break into S/M sizes |
|
|
259
259
|
| **No Dependencies** | Blocked work | Map dependencies explicitly |
|
|
260
260
|
| **Vague Criteria** | Unclear completion | Specific, measurable criteria |
|
|
261
|
+
|
|
262
|
+
## Specialist Delegation
|
|
263
|
+
|
|
264
|
+
When the host supports subagents, delegate this phase to the `planner` role with a compact handoff containing only the approved design, constraints, dependencies, and required task format. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
@@ -107,6 +107,10 @@ describe('UserService', () => {
|
|
|
107
107
|
});
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
+
## Specialist Delegation
|
|
111
|
+
|
|
112
|
+
When the host supports subagents, delegate test design and generation to the `tdd-guide` role with a compact handoff containing only the behavior contract, affected code, existing test conventions, and edge cases. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
|
113
|
+
|
|
110
114
|
### Step 4: Test Categories to Generate
|
|
111
115
|
|
|
112
116
|
#### Unit Tests
|
|
@@ -146,3 +146,7 @@ Claude:
|
|
|
146
146
|
5. Implement: Button component + logout handler
|
|
147
147
|
6. Test: Verify all tests pass
|
|
148
148
|
```
|
|
149
|
+
|
|
150
|
+
## Specialist Delegation
|
|
151
|
+
|
|
152
|
+
When the host supports subagents, delegate the implementation to the `implementer` role with a compact handoff containing only the requested change, affected files, constraints, and focused verification. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -18,41 +18,7 @@ Each phase requires human approval before proceeding.
|
|
|
18
18
|
|
|
19
19
|
## Installed Components
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
On-demand guidance invoked via slash commands:
|
|
23
|
-
|
|
24
|
-
| Skill | Purpose |
|
|
25
|
-
|-------|---------|
|
|
26
|
-
| `/simple-task` | Quick implementation with best practices |
|
|
27
|
-
| `/sdd-requirements` | EARS-formatted requirements generation |
|
|
28
|
-
| `/sdd-design` | Architecture design with quality principles |
|
|
29
|
-
| `/sdd-tasks` | TDD task breakdown with test pyramid |
|
|
30
|
-
| `/sdd-implement` | Implementation guidelines (SOLID, security, TDD) |
|
|
31
|
-
| `/sdd-steering` | Create/update project steering documents |
|
|
32
|
-
| `/sdd-steering-custom` | Custom steering for specialized contexts |
|
|
33
|
-
| `/sdd-commit` | Commit message and PR guidelines |
|
|
34
|
-
| `/sdd-review` | Code review skill |
|
|
35
|
-
| `/sdd-security-check` | Security audit skill |
|
|
36
|
-
| `/sdd-test-gen` | Test generation skill |
|
|
37
|
-
|
|
38
|
-
### Rules (`.claude/rules/`)
|
|
39
|
-
Always-active coding standards: coding style, error handling, git workflow, SDD workflow, security, testing.
|
|
40
|
-
|
|
41
|
-
### Contexts (`.claude/contexts/`)
|
|
42
|
-
Switchable modes: dev, planning, research, review, security audit.
|
|
43
|
-
|
|
44
|
-
### Agents (`.claude/agents/`)
|
|
45
|
-
Specialized roles: architect, implementer, planner, reviewer, security auditor, TDD guide.
|
|
46
|
-
|
|
47
|
-
### Hooks (`.claude/hooks/`)
|
|
48
|
-
Lifecycle events: session start/end, pre/post tool use.
|
|
49
|
-
|
|
50
|
-
### Steering (`.spec/steering/`)
|
|
51
|
-
Project-specific context documents. Edit these to describe your project:
|
|
52
|
-
|
|
53
|
-
- `product.md` — Product context and business objectives
|
|
54
|
-
- `tech.md` — Technology stack and decisions
|
|
55
|
-
- `structure.md` — File organization and patterns
|
|
21
|
+
The installer appends only the components selected for this target and their effective paths.
|
|
56
22
|
|
|
57
23
|
## MCP Tools
|
|
58
24
|
|
|
@@ -69,7 +35,7 @@ Project-specific context documents. Edit these to describe your project:
|
|
|
69
35
|
|
|
70
36
|
## Workflow
|
|
71
37
|
|
|
72
|
-
1. **Setup**: `npx sdd-mcp-server install --
|
|
38
|
+
1. **Setup**: `npx sdd-mcp-server install --profile full --target claude-code` (already done)
|
|
73
39
|
2. **Steering** (optional): `/sdd-steering` to generate project-specific docs
|
|
74
40
|
3. **Specify**: `sdd-init` → `/sdd-requirements` → `/sdd-design` → `/sdd-tasks` (approve each phase)
|
|
75
41
|
4. **Implement**: `/sdd-implement` or `sdd-spec-impl`
|
|
@@ -18,5 +18,4 @@ Each phase builds on the previous and requires review before proceeding.
|
|
|
18
18
|
|
|
19
19
|
## Installed Components
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Native Codex installs use `.agents/` and `.codex/`; compatibility integrations may reference other effective paths below. Read the referenced files for full details.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { execFileSync } from 'node:child_process';
|
|
6
|
+
|
|
7
|
+
const event = process.argv[2];
|
|
8
|
+
|
|
9
|
+
function findProjectRoot() {
|
|
10
|
+
try {
|
|
11
|
+
const root = execFileSync('git', ['rev-parse', '--show-toplevel'], {
|
|
12
|
+
cwd: process.cwd(),
|
|
13
|
+
encoding: 'utf8',
|
|
14
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
15
|
+
}).trim();
|
|
16
|
+
if (root) return root;
|
|
17
|
+
} catch {
|
|
18
|
+
// Fall back for projects that are not Git repositories.
|
|
19
|
+
}
|
|
20
|
+
return process.cwd();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const projectRoot = findProjectRoot();
|
|
24
|
+
|
|
25
|
+
function sessionStart() {
|
|
26
|
+
const specsRoot = path.resolve(projectRoot, '.spec/specs');
|
|
27
|
+
let entries;
|
|
28
|
+
try {
|
|
29
|
+
entries = fs.readdirSync(specsRoot, { withFileTypes: true });
|
|
30
|
+
} catch {
|
|
31
|
+
return { continue: true };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const states = [];
|
|
35
|
+
for (const entry of entries) {
|
|
36
|
+
if (!entry.isDirectory() || states.length >= 12) continue;
|
|
37
|
+
try {
|
|
38
|
+
const spec = JSON.parse(
|
|
39
|
+
fs.readFileSync(path.join(specsRoot, entry.name, 'spec.json'), 'utf8'),
|
|
40
|
+
);
|
|
41
|
+
const feature = String(spec.feature_name || spec.feature || entry.name).slice(0, 100);
|
|
42
|
+
const phase = String(spec.phase || 'unknown').slice(0, 100);
|
|
43
|
+
states.push(`${feature}: ${phase}`);
|
|
44
|
+
} catch {
|
|
45
|
+
// Ignore unreadable and malformed specs; hooks must never block a session.
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (states.length === 0) return { continue: true };
|
|
50
|
+
return {
|
|
51
|
+
continue: true,
|
|
52
|
+
hookSpecificOutput: {
|
|
53
|
+
hookEventName: 'SessionStart',
|
|
54
|
+
additionalContext: `SDD workflow state:\n${states.map(state => `- ${state}`).join('\n')}`,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function stop() {
|
|
60
|
+
try {
|
|
61
|
+
const status = execFileSync('git', ['status', '--short'], {
|
|
62
|
+
cwd: projectRoot,
|
|
63
|
+
encoding: 'utf8',
|
|
64
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
65
|
+
}).trim();
|
|
66
|
+
if (!status) return { continue: true };
|
|
67
|
+
const count = status.split(/\r?\n/).length;
|
|
68
|
+
return {
|
|
69
|
+
continue: true,
|
|
70
|
+
systemMessage: `Repository has ${count} uncommitted change${count === 1 ? '' : 's'}; review them before ending the task.`,
|
|
71
|
+
};
|
|
72
|
+
} catch {
|
|
73
|
+
return { continue: true };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
let output = { continue: true };
|
|
78
|
+
try {
|
|
79
|
+
if (event === 'session-start') output = sessionStart();
|
|
80
|
+
if (event === 'stop') output = stop();
|
|
81
|
+
} catch {
|
|
82
|
+
output = { continue: true };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
process.stdout.write(`${JSON.stringify(output)}\n`);
|
package/dist/utils/sddPaths.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SDD directory names
|
|
3
|
-
* .spec is the new standard (v2.1.0+)
|
|
4
|
-
* .kiro is legacy (for backwards compatibility)
|
|
5
|
-
*/
|
|
6
|
-
export declare const SDD_DIR = ".spec";
|
|
7
|
-
export declare const SDD_DIR_LEGACY = ".kiro";
|
|
8
|
-
/**
|
|
9
|
-
* Get the SDD root directory for a project
|
|
10
|
-
* Prefers .spec, falls back to .kiro for legacy projects
|
|
11
|
-
*
|
|
12
|
-
* @param projectPath - Project root path
|
|
13
|
-
* @returns SDD root directory path (.spec or .kiro)
|
|
14
|
-
*/
|
|
15
|
-
export declare function getSddRoot(projectPath: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* Get the SDD directory name for a project
|
|
18
|
-
* Returns the actual directory name used (.spec or .kiro)
|
|
19
|
-
*
|
|
20
|
-
* @param projectPath - Project root path
|
|
21
|
-
* @returns Directory name (.spec or .kiro)
|
|
22
|
-
*/
|
|
23
|
-
export declare function getSddDirName(projectPath: string): string;
|
|
24
|
-
/**
|
|
25
|
-
* Get the specs directory path
|
|
26
|
-
* @param projectPath - Project root path
|
|
27
|
-
* @returns Specs directory path
|
|
28
|
-
*/
|
|
29
|
-
export declare function getSpecsPath(projectPath: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* Get the steering directory path
|
|
32
|
-
* @param projectPath - Project root path
|
|
33
|
-
* @returns Steering directory path
|
|
34
|
-
*/
|
|
35
|
-
export declare function getSteeringPath(projectPath: string): string;
|
|
36
|
-
/**
|
|
37
|
-
* Get a feature's spec directory path
|
|
38
|
-
* @param projectPath - Project root path
|
|
39
|
-
* @param featureName - Feature name
|
|
40
|
-
* @returns Feature spec directory path
|
|
41
|
-
*/
|
|
42
|
-
export declare function getFeatureSpecPath(projectPath: string, featureName: string): string;
|
|
43
|
-
/**
|
|
44
|
-
* Get the spec.json file path for a feature
|
|
45
|
-
* @param projectPath - Project root path
|
|
46
|
-
* @param featureName - Feature name
|
|
47
|
-
* @returns spec.json file path
|
|
48
|
-
*/
|
|
49
|
-
export declare function getSpecJsonPath(projectPath: string, featureName: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Check if this is a legacy project (using .kiro instead of .spec)
|
|
52
|
-
* @param projectPath - Project root path
|
|
53
|
-
* @returns true if project uses .kiro
|
|
54
|
-
*/
|
|
55
|
-
export declare function isLegacyProject(projectPath: string): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Get the appropriate SDD directory for new projects
|
|
58
|
-
* Always returns .spec for new projects
|
|
59
|
-
*
|
|
60
|
-
* @param projectPath - Project root path
|
|
61
|
-
* @returns Path to create SDD directory (.spec)
|
|
62
|
-
*/
|
|
63
|
-
export declare function getNewSddRoot(projectPath: string): string;
|
|
64
|
-
/**
|
|
65
|
-
* Create all required SDD directories for a new project
|
|
66
|
-
* @param projectPath - Project root path
|
|
67
|
-
* @returns Created paths
|
|
68
|
-
*/
|
|
69
|
-
export declare function createSddDirectories(projectPath: string): string[];
|