@applica-software-guru/sdd-core 1.0.1 → 1.3.3
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/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/prompt/apply-prompt-generator.d.ts.map +1 -1
- package/dist/prompt/apply-prompt-generator.js +7 -26
- package/dist/prompt/apply-prompt-generator.js.map +1 -1
- package/dist/prompt/prompt-generator.d.ts.map +1 -1
- package/dist/prompt/prompt-generator.js +7 -11
- package/dist/prompt/prompt-generator.js.map +1 -1
- package/dist/scaffold/init.d.ts +1 -1
- package/dist/scaffold/init.d.ts.map +1 -1
- package/dist/scaffold/init.js +10 -29
- package/dist/scaffold/init.js.map +1 -1
- package/dist/scaffold/skill-adapters.d.ts +39 -0
- package/dist/scaffold/skill-adapters.d.ts.map +1 -0
- package/dist/scaffold/skill-adapters.js +224 -0
- package/dist/scaffold/skill-adapters.js.map +1 -0
- package/dist/scaffold/templates.d.ts +5 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +203 -55
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/sdd.d.ts +6 -3
- package/dist/sdd.d.ts.map +1 -1
- package/dist/sdd.js +26 -18
- package/dist/sdd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +17 -8
- package/src/prompt/apply-prompt-generator.ts +7 -31
- package/src/prompt/prompt-generator.ts +8 -18
- package/src/scaffold/init.ts +17 -38
- package/src/scaffold/skill-adapters.ts +322 -0
- package/src/scaffold/templates.ts +207 -54
- package/src/sdd.ts +47 -32
- package/tests/integration.test.ts +94 -51
- package/dist/delta/hasher.d.ts +0 -2
- package/dist/delta/hasher.d.ts.map +0 -1
- package/dist/delta/hasher.js +0 -8
- package/dist/delta/hasher.js.map +0 -1
- package/dist/lock/lock-manager.d.ts +0 -6
- package/dist/lock/lock-manager.d.ts.map +0 -1
- package/dist/lock/lock-manager.js +0 -39
- package/dist/lock/lock-manager.js.map +0 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface ProjectInfo {
|
|
2
2
|
description: string;
|
|
3
3
|
}
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const SKILL_MD_TEMPLATE = "---\nname: sdd\ndescription: >\n Story Driven Development workflow. Use when working in a project\n with .sdd/config.yaml, or when the user mentions SDD, sdd sync,\n story driven development, or spec-driven development.\nlicense: MIT\ncompatibility: Requires sdd CLI (npm i -g @applica-software-guru/sdd)\nallowed-tools: Bash(sdd:*) Read Glob Grep\nmetadata:\n author: applica-software-guru\n version: \"1.0\"\n---\n\n# SDD \u2014 Story Driven Development\n\n## Detection\n\nThis project uses SDD if `.sdd/config.yaml` exists in the project root.\n\n## Workflow\n\nFollow this loop every time you work on an SDD project:\n\n1. Run `sdd bug open` \u2014 check if there are open bugs to fix first\n2. If there are open bugs, fix the code/docs, then run `sdd mark-bug-resolved`\n3. Run `sdd cr pending` \u2014 check if there are change requests to process\n4. If there are pending CRs, apply them to the docs, then run `sdd mark-cr-applied`\n5. Run `sdd sync` to see what needs to be implemented\n6. Read the documentation files listed in the sync output\n7. Implement what each file describes, writing code inside `code/`\n8. After implementing, mark files as synced:\n\n```\nsdd mark-synced product/features/auth.md\n```\n\nOr mark all pending files at once:\n\n```\nsdd mark-synced\n```\n\n9. **Commit immediately after mark-synced** \u2014 this is mandatory:\n\n```\ngit add -A && git commit -m \"sdd sync: <brief description of what was implemented>\"\n```\n\nDo NOT skip this step. Every mark-synced must be followed by a git commit.\n\n### Removing a feature\n\nIf a documentation file has `status: deleted`, it means that feature should be removed.\nDelete the related code in `code/`, then run `sdd mark-synced <file>` (the doc file will be removed automatically), then commit.\n\n## Available commands\n\n- `sdd status` \u2014 See all documentation files and their state (new/changed/deleted/synced)\n- `sdd diff` \u2014 See what changed since last sync\n- `sdd sync` \u2014 Get the sync prompt for pending files (includes git diff for changed files)\n- `sdd validate` \u2014 Check for broken references and issues\n- `sdd mark-synced [files...]` \u2014 Mark specific files (or all) as synced\n- `sdd cr list` \u2014 List all change requests with their status\n- `sdd cr pending` \u2014 Show draft change requests to process\n- `sdd mark-cr-applied [files...]` \u2014 Mark change requests as applied\n- `sdd bug list` \u2014 List all bugs with their status\n- `sdd bug open` \u2014 Show open bugs to fix\n- `sdd mark-bug-resolved [files...]` \u2014 Mark bugs as resolved\n\n## Rules\n\n1. **Always commit after mark-synced** \u2014 run `git add -A && git commit -m \"sdd sync: ...\"` immediately after `sdd mark-synced`. Never leave synced files uncommitted.\n2. Before running `sdd sync`, check for open bugs with `sdd bug open` and pending change requests with `sdd cr pending`\n3. If there are pending CRs, apply them to the docs first, then mark them with `sdd mark-cr-applied`\n4. Only implement what the sync prompt asks for\n5. All generated code goes inside `code/`\n6. Respect all constraints in `## Agent Notes` sections (if present)\n7. Do not edit files inside `.sdd/` manually\n\n## Project structure\n\n- `product/` \u2014 What to build (vision, users, features)\n- `system/` \u2014 How to build it (entities, architecture, tech stack, interfaces)\n- `code/` \u2014 All generated source code goes here\n- `change-requests/` \u2014 Change requests to the documentation\n- `bugs/` \u2014 Bug reports\n- `.sdd/` \u2014 Project config and sync state (do not edit)\n\n## References\n\nFor detailed information on specific topics, see:\n\n- [File format and status lifecycle](references/file-format.md)\n- [Change Requests workflow](references/change-requests.md)\n- [Bug workflow](references/bugs.md)\n";
|
|
5
|
+
export declare const SKILL_UI_MD_TEMPLATE = "---\nname: sdd-ui\ndescription: >\n UI Component Editor workflow. Use when the user wants to implement a React component\n from a screenshot in an SDD project, iterating visually with live preview.\nlicense: MIT\ncompatibility: >\n Requires sdd CLI (npm i -g @applica-software-guru/sdd).\n Requires Playwright MCP configured in Claude Code\n (e.g. @playwright/mcp or @executeautomation/playwright-mcp).\nallowed-tools: Bash(sdd:*) Read Glob Grep Edit Write mcp__playwright__screenshot mcp__playwright__navigate mcp__playwright__click\nmetadata:\n author: applica-software-guru\n version: \"1.1\"\n---\n\n# SDD UI \u2014 Visual Component Editor\n\n## Purpose\n\nUse this workflow when implementing a React component from a screenshot reference in an SDD project.\nThe split-panel editor shows the spec screenshot on the left and the live component on the right,\nso you can iterate visually until they match.\n\n## Prerequisites\n\n- `sdd` CLI installed globally\n- Playwright MCP configured in Claude Code settings\n - e.g. `@playwright/mcp` or `@executeautomation/playwright-mcp`\n - If not configured, inform the user and stop \u2014 visual feedback won't work without it\n\n## Workflow\n\n### Step 1 \u2014 Read the spec\n\nRead the SDD feature file to understand what the component should look like and do.\nLook for any screenshot paths referenced in the feature doc.\n\n### Step 2 \u2014 Launch the editor\n\n```bash\n# Single screenshot \u2014 detached (recommended when run by an agent)\nsdd ui launch-editor LoginForm \\\n --screenshot product/features/auth/login.png \\\n --detach\n\n# Multiple screenshots (e.g. desktop + mobile)\nsdd ui launch-editor LoginForm \\\n --screenshot product/features/auth/login-desktop.png \\\n --screenshot product/features/auth/login-mobile.png \\\n --detach\n```\n\nThe command will:\n- Scaffold `code/components/LoginForm.tsx` if it doesn't exist\n- Print the exact component file path to edit\n- Start the editor at `http://localhost:5174`\n\nWith `--detach` the process runs in background and the terminal is immediately free.\nWithout `--detach` it runs in foreground (use Ctrl+C to stop).\n\nWith multiple screenshots, the left panel shows a tab per screenshot.\nWith a single screenshot, no tab bar is shown.\n\n### Step 3 \u2014 Implement the component\n\nEdit the file printed by `sdd ui launch-editor` (e.g. `code/components/LoginForm.tsx`).\n\nWrite a React component that matches the screenshot. Use standard HTML/CSS or inline styles \u2014\nno external UI library unless the project already uses one.\n\nVite HMR will update the right panel automatically on every save.\n\n### Step 4 \u2014 Visual check with Playwright\n\nAfter each save, screenshot the live preview and compare it with the spec:\n\n```\nmcp__playwright__navigate http://localhost:5174\nmcp__playwright__screenshot\n```\n\nThe left panel already shows the spec screenshot for direct comparison.\nNote differences in layout, spacing, typography, colors, and component structure.\n\n### Step 5 \u2014 Iterate\n\nEdit component \u2192 Playwright screenshot \u2192 compare \u2192 repeat until the preview matches the spec.\n\n### Step 6 \u2014 Finalize\n\n```bash\nsdd ui stop\nsdd mark-synced product/features/auth/login.md\ngit add -A && git commit -m \"sdd sync: implement LoginForm component\"\n```\n\n## Notes\n\n- The component file is permanent \u2014 it lives in `code/components/` and is part of your project\n- Port `5174` by default (not `5173`) to avoid conflicts with the user's app dev server\n- If the component needs props, scaffold it with hardcoded sample data for the preview\n\n## Troubleshooting\n\n**Playwright MCP not configured:**\nStop and ask the user to add it to their Claude Code MCP settings before continuing.\n\n**Component import fails in preview:**\nCheck that the component file has a valid default export and no TypeScript errors.\n\n**Port already in use:**\n`sdd ui launch-editor LoginForm --screenshot login.png --port 5175`\n";
|
|
6
|
+
export declare const FILE_FORMAT_REFERENCE = "# File Format and Status Lifecycle\n\n## YAML Frontmatter\n\nEvery `.md` file in `product/` and `system/` must start with this YAML frontmatter:\n\n```yaml\n---\ntitle: \"File title\"\nstatus: new\nauthor: \"\"\nlast-modified: \"2025-01-01T00:00:00.000Z\"\nversion: \"1.0\"\n---\n```\n\n## Status values\n\n- **`new`** \u2014 new file, needs to be implemented\n- **`changed`** \u2014 modified since last sync, code needs updating\n- **`deleted`** \u2014 feature to be removed, agent should delete related code\n- **`synced`** \u2014 already implemented, up to date\n\n## Version\n\nPatch-bump on each edit: 1.0 \u2192 1.1 \u2192 1.2\n\n## Last-modified\n\nISO 8601 datetime, updated on each edit.\n\n## How sync works\n\n`sdd sync` generates a structured prompt for the agent based on pending files:\n\n- **`new` files**: the agent reads the full documentation and implements it from scratch\n- **`changed` files**: SDD uses `git diff` to compute what changed in the documentation since the last commit, and includes the diff in the sync prompt \u2014 this way the agent sees exactly what was modified and can update only the affected code\n- **`deleted` files**: the agent removes the related code\n\nThis is why **committing after every mark-synced is mandatory** \u2014 the git history is what SDD uses to detect changes.\n\n## UX and screenshots\n\nWhen a feature has UX mockups or screenshots, place them next to the feature doc:\n\n- **Simple feature** (no screenshots): `product/features/auth.md`\n- **Feature with screenshots**: use a folder with `index.md`:\n\n```\nproduct/features/auth/\n index.md \u2190 feature doc\n login.png \u2190 screenshot\n register.png \u2190 screenshot\n```\n\nReference images in the markdown with relative paths:\n\n```markdown\n## UX\n\n\n\n```\n\nBoth formats work \u2014 use a folder only when you have screenshots or multiple files for a feature.\n";
|
|
7
|
+
export declare const CHANGE_REQUESTS_REFERENCE = "# Change Requests\n\nChange Requests (CRs) are markdown files in `change-requests/` that describe modifications to the documentation.\n\n## CR format\n\n```yaml\n---\ntitle: \"Add authentication feature\"\nstatus: draft\nauthor: \"user\"\ncreated-at: \"2025-01-01T00:00:00.000Z\"\n---\n```\n\n- **status**: `draft` (pending) or `applied` (already processed)\n\n## CR workflow\n\n1. Check for pending CRs: `sdd cr pending`\n2. Read each pending CR and apply the described changes to the documentation files (marking them as `new`, `changed`, or `deleted`)\n3. After applying a CR to the docs, mark it: `sdd mark-cr-applied change-requests/CR-001.md`\n4. Then run `sdd sync` to implement the code changes\n\n## CR commands\n\n- `sdd cr list` \u2014 See all change requests and their status\n- `sdd cr pending` \u2014 Show only draft CRs to process\n- `sdd mark-cr-applied [files...]` \u2014 Mark CRs as applied after updating the docs\n";
|
|
8
|
+
export declare const BUGS_REFERENCE = "# Bugs\n\nBugs are markdown files in `bugs/` that describe problems found in the codebase.\n\n## Bug format\n\n```yaml\n---\ntitle: \"Login fails with empty password\"\nstatus: open\nauthor: \"user\"\ncreated-at: \"2025-01-01T00:00:00.000Z\"\n---\n```\n\n- **status**: `open` (needs fixing) or `resolved` (already fixed)\n\n## Bug workflow\n\n1. Check for open bugs: `sdd bug open`\n2. Read each open bug and fix the code and/or documentation\n3. After fixing a bug, mark it: `sdd mark-bug-resolved bugs/BUG-001.md`\n4. Commit the fix\n\n## Bug commands\n\n- `sdd bug list` \u2014 See all bugs and their status\n- `sdd bug open` \u2014 Show only open bugs to fix\n- `sdd mark-bug-resolved [files...]` \u2014 Mark bugs as resolved after fixing\n";
|
|
5
9
|
export declare const EMPTY_LOCK_TEMPLATE: () => string;
|
|
6
10
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,ovHAgG7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,q6HAiHhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,47DAiEjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,26BA6BrC,CAAC;AAEF,eAAO,MAAM,cAAc,6uBA6B1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,cAG/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EMPTY_LOCK_TEMPLATE = exports.
|
|
3
|
+
exports.EMPTY_LOCK_TEMPLATE = exports.BUGS_REFERENCE = exports.CHANGE_REQUESTS_REFERENCE = exports.FILE_FORMAT_REFERENCE = exports.SKILL_UI_MD_TEMPLATE = exports.SKILL_MD_TEMPLATE = void 0;
|
|
4
4
|
const now = () => new Date().toISOString();
|
|
5
5
|
function mdTemplate(title, content) {
|
|
6
6
|
return `---
|
|
@@ -14,13 +14,30 @@ version: "1.0"
|
|
|
14
14
|
${content}
|
|
15
15
|
`;
|
|
16
16
|
}
|
|
17
|
-
exports.
|
|
17
|
+
exports.SKILL_MD_TEMPLATE = `---
|
|
18
|
+
name: sdd
|
|
19
|
+
description: >
|
|
20
|
+
Story Driven Development workflow. Use when working in a project
|
|
21
|
+
with .sdd/config.yaml, or when the user mentions SDD, sdd sync,
|
|
22
|
+
story driven development, or spec-driven development.
|
|
23
|
+
license: MIT
|
|
24
|
+
compatibility: Requires sdd CLI (npm i -g @applica-software-guru/sdd)
|
|
25
|
+
allowed-tools: Bash(sdd:*) Read Glob Grep
|
|
26
|
+
metadata:
|
|
27
|
+
author: applica-software-guru
|
|
28
|
+
version: "1.0"
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# SDD — Story Driven Development
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
|
|
33
|
+
## Detection
|
|
34
|
+
|
|
35
|
+
This project uses SDD if \`.sdd/config.yaml\` exists in the project root.
|
|
21
36
|
|
|
22
37
|
## Workflow
|
|
23
38
|
|
|
39
|
+
Follow this loop every time you work on an SDD project:
|
|
40
|
+
|
|
24
41
|
1. Run \`sdd bug open\` — check if there are open bugs to fix first
|
|
25
42
|
2. If there are open bugs, fix the code/docs, then run \`sdd mark-bug-resolved\`
|
|
26
43
|
3. Run \`sdd cr pending\` — check if there are change requests to process
|
|
@@ -77,7 +94,140 @@ Delete the related code in \`code/\`, then run \`sdd mark-synced <file>\` (the d
|
|
|
77
94
|
6. Respect all constraints in \`## Agent Notes\` sections (if present)
|
|
78
95
|
7. Do not edit files inside \`.sdd/\` manually
|
|
79
96
|
|
|
80
|
-
##
|
|
97
|
+
## Project structure
|
|
98
|
+
|
|
99
|
+
- \`product/\` — What to build (vision, users, features)
|
|
100
|
+
- \`system/\` — How to build it (entities, architecture, tech stack, interfaces)
|
|
101
|
+
- \`code/\` — All generated source code goes here
|
|
102
|
+
- \`change-requests/\` — Change requests to the documentation
|
|
103
|
+
- \`bugs/\` — Bug reports
|
|
104
|
+
- \`.sdd/\` — Project config and sync state (do not edit)
|
|
105
|
+
|
|
106
|
+
## References
|
|
107
|
+
|
|
108
|
+
For detailed information on specific topics, see:
|
|
109
|
+
|
|
110
|
+
- [File format and status lifecycle](references/file-format.md)
|
|
111
|
+
- [Change Requests workflow](references/change-requests.md)
|
|
112
|
+
- [Bug workflow](references/bugs.md)
|
|
113
|
+
`;
|
|
114
|
+
exports.SKILL_UI_MD_TEMPLATE = `---
|
|
115
|
+
name: sdd-ui
|
|
116
|
+
description: >
|
|
117
|
+
UI Component Editor workflow. Use when the user wants to implement a React component
|
|
118
|
+
from a screenshot in an SDD project, iterating visually with live preview.
|
|
119
|
+
license: MIT
|
|
120
|
+
compatibility: >
|
|
121
|
+
Requires sdd CLI (npm i -g @applica-software-guru/sdd).
|
|
122
|
+
Requires Playwright MCP configured in Claude Code
|
|
123
|
+
(e.g. @playwright/mcp or @executeautomation/playwright-mcp).
|
|
124
|
+
allowed-tools: Bash(sdd:*) Read Glob Grep Edit Write mcp__playwright__screenshot mcp__playwright__navigate mcp__playwright__click
|
|
125
|
+
metadata:
|
|
126
|
+
author: applica-software-guru
|
|
127
|
+
version: "1.1"
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
# SDD UI — Visual Component Editor
|
|
131
|
+
|
|
132
|
+
## Purpose
|
|
133
|
+
|
|
134
|
+
Use this workflow when implementing a React component from a screenshot reference in an SDD project.
|
|
135
|
+
The split-panel editor shows the spec screenshot on the left and the live component on the right,
|
|
136
|
+
so you can iterate visually until they match.
|
|
137
|
+
|
|
138
|
+
## Prerequisites
|
|
139
|
+
|
|
140
|
+
- \`sdd\` CLI installed globally
|
|
141
|
+
- Playwright MCP configured in Claude Code settings
|
|
142
|
+
- e.g. \`@playwright/mcp\` or \`@executeautomation/playwright-mcp\`
|
|
143
|
+
- If not configured, inform the user and stop — visual feedback won't work without it
|
|
144
|
+
|
|
145
|
+
## Workflow
|
|
146
|
+
|
|
147
|
+
### Step 1 — Read the spec
|
|
148
|
+
|
|
149
|
+
Read the SDD feature file to understand what the component should look like and do.
|
|
150
|
+
Look for any screenshot paths referenced in the feature doc.
|
|
151
|
+
|
|
152
|
+
### Step 2 — Launch the editor
|
|
153
|
+
|
|
154
|
+
\`\`\`bash
|
|
155
|
+
# Single screenshot — detached (recommended when run by an agent)
|
|
156
|
+
sdd ui launch-editor LoginForm \\
|
|
157
|
+
--screenshot product/features/auth/login.png \\
|
|
158
|
+
--detach
|
|
159
|
+
|
|
160
|
+
# Multiple screenshots (e.g. desktop + mobile)
|
|
161
|
+
sdd ui launch-editor LoginForm \\
|
|
162
|
+
--screenshot product/features/auth/login-desktop.png \\
|
|
163
|
+
--screenshot product/features/auth/login-mobile.png \\
|
|
164
|
+
--detach
|
|
165
|
+
\`\`\`
|
|
166
|
+
|
|
167
|
+
The command will:
|
|
168
|
+
- Scaffold \`code/components/LoginForm.tsx\` if it doesn't exist
|
|
169
|
+
- Print the exact component file path to edit
|
|
170
|
+
- Start the editor at \`http://localhost:5174\`
|
|
171
|
+
|
|
172
|
+
With \`--detach\` the process runs in background and the terminal is immediately free.
|
|
173
|
+
Without \`--detach\` it runs in foreground (use Ctrl+C to stop).
|
|
174
|
+
|
|
175
|
+
With multiple screenshots, the left panel shows a tab per screenshot.
|
|
176
|
+
With a single screenshot, no tab bar is shown.
|
|
177
|
+
|
|
178
|
+
### Step 3 — Implement the component
|
|
179
|
+
|
|
180
|
+
Edit the file printed by \`sdd ui launch-editor\` (e.g. \`code/components/LoginForm.tsx\`).
|
|
181
|
+
|
|
182
|
+
Write a React component that matches the screenshot. Use standard HTML/CSS or inline styles —
|
|
183
|
+
no external UI library unless the project already uses one.
|
|
184
|
+
|
|
185
|
+
Vite HMR will update the right panel automatically on every save.
|
|
186
|
+
|
|
187
|
+
### Step 4 — Visual check with Playwright
|
|
188
|
+
|
|
189
|
+
After each save, screenshot the live preview and compare it with the spec:
|
|
190
|
+
|
|
191
|
+
\`\`\`
|
|
192
|
+
mcp__playwright__navigate http://localhost:5174
|
|
193
|
+
mcp__playwright__screenshot
|
|
194
|
+
\`\`\`
|
|
195
|
+
|
|
196
|
+
The left panel already shows the spec screenshot for direct comparison.
|
|
197
|
+
Note differences in layout, spacing, typography, colors, and component structure.
|
|
198
|
+
|
|
199
|
+
### Step 5 — Iterate
|
|
200
|
+
|
|
201
|
+
Edit component → Playwright screenshot → compare → repeat until the preview matches the spec.
|
|
202
|
+
|
|
203
|
+
### Step 6 — Finalize
|
|
204
|
+
|
|
205
|
+
\`\`\`bash
|
|
206
|
+
sdd ui stop
|
|
207
|
+
sdd mark-synced product/features/auth/login.md
|
|
208
|
+
git add -A && git commit -m "sdd sync: implement LoginForm component"
|
|
209
|
+
\`\`\`
|
|
210
|
+
|
|
211
|
+
## Notes
|
|
212
|
+
|
|
213
|
+
- The component file is permanent — it lives in \`code/components/\` and is part of your project
|
|
214
|
+
- Port \`5174\` by default (not \`5173\`) to avoid conflicts with the user's app dev server
|
|
215
|
+
- If the component needs props, scaffold it with hardcoded sample data for the preview
|
|
216
|
+
|
|
217
|
+
## Troubleshooting
|
|
218
|
+
|
|
219
|
+
**Playwright MCP not configured:**
|
|
220
|
+
Stop and ask the user to add it to their Claude Code MCP settings before continuing.
|
|
221
|
+
|
|
222
|
+
**Component import fails in preview:**
|
|
223
|
+
Check that the component file has a valid default export and no TypeScript errors.
|
|
224
|
+
|
|
225
|
+
**Port already in use:**
|
|
226
|
+
\`sdd ui launch-editor LoginForm --screenshot login.png --port 5175\`
|
|
227
|
+
`;
|
|
228
|
+
exports.FILE_FORMAT_REFERENCE = `# File Format and Status Lifecycle
|
|
229
|
+
|
|
230
|
+
## YAML Frontmatter
|
|
81
231
|
|
|
82
232
|
Every \`.md\` file in \`product/\` and \`system/\` must start with this YAML frontmatter:
|
|
83
233
|
|
|
@@ -91,13 +241,20 @@ version: "1.0"
|
|
|
91
241
|
---
|
|
92
242
|
\`\`\`
|
|
93
243
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
|
|
244
|
+
## Status values
|
|
245
|
+
|
|
246
|
+
- **\`new\`** — new file, needs to be implemented
|
|
247
|
+
- **\`changed\`** — modified since last sync, code needs updating
|
|
248
|
+
- **\`deleted\`** — feature to be removed, agent should delete related code
|
|
249
|
+
- **\`synced\`** — already implemented, up to date
|
|
250
|
+
|
|
251
|
+
## Version
|
|
252
|
+
|
|
253
|
+
Patch-bump on each edit: 1.0 → 1.1 → 1.2
|
|
254
|
+
|
|
255
|
+
## Last-modified
|
|
256
|
+
|
|
257
|
+
ISO 8601 datetime, updated on each edit.
|
|
101
258
|
|
|
102
259
|
## How sync works
|
|
103
260
|
|
|
@@ -109,11 +266,36 @@ version: "1.0"
|
|
|
109
266
|
|
|
110
267
|
This is why **committing after every mark-synced is mandatory** — the git history is what SDD uses to detect changes.
|
|
111
268
|
|
|
112
|
-
##
|
|
269
|
+
## UX and screenshots
|
|
270
|
+
|
|
271
|
+
When a feature has UX mockups or screenshots, place them next to the feature doc:
|
|
272
|
+
|
|
273
|
+
- **Simple feature** (no screenshots): \`product/features/auth.md\`
|
|
274
|
+
- **Feature with screenshots**: use a folder with \`index.md\`:
|
|
275
|
+
|
|
276
|
+
\`\`\`
|
|
277
|
+
product/features/auth/
|
|
278
|
+
index.md ← feature doc
|
|
279
|
+
login.png ← screenshot
|
|
280
|
+
register.png ← screenshot
|
|
281
|
+
\`\`\`
|
|
282
|
+
|
|
283
|
+
Reference images in the markdown with relative paths:
|
|
284
|
+
|
|
285
|
+
\`\`\`markdown
|
|
286
|
+
## UX
|
|
287
|
+
|
|
288
|
+

|
|
289
|
+

|
|
290
|
+
\`\`\`
|
|
291
|
+
|
|
292
|
+
Both formats work — use a folder only when you have screenshots or multiple files for a feature.
|
|
293
|
+
`;
|
|
294
|
+
exports.CHANGE_REQUESTS_REFERENCE = `# Change Requests
|
|
113
295
|
|
|
114
296
|
Change Requests (CRs) are markdown files in \`change-requests/\` that describe modifications to the documentation.
|
|
115
297
|
|
|
116
|
-
|
|
298
|
+
## CR format
|
|
117
299
|
|
|
118
300
|
\`\`\`yaml
|
|
119
301
|
---
|
|
@@ -126,24 +308,24 @@ created-at: "2025-01-01T00:00:00.000Z"
|
|
|
126
308
|
|
|
127
309
|
- **status**: \`draft\` (pending) or \`applied\` (already processed)
|
|
128
310
|
|
|
129
|
-
|
|
311
|
+
## CR workflow
|
|
130
312
|
|
|
131
313
|
1. Check for pending CRs: \`sdd cr pending\`
|
|
132
314
|
2. Read each pending CR and apply the described changes to the documentation files (marking them as \`new\`, \`changed\`, or \`deleted\`)
|
|
133
315
|
3. After applying a CR to the docs, mark it: \`sdd mark-cr-applied change-requests/CR-001.md\`
|
|
134
316
|
4. Then run \`sdd sync\` to implement the code changes
|
|
135
317
|
|
|
136
|
-
|
|
318
|
+
## CR commands
|
|
137
319
|
|
|
138
320
|
- \`sdd cr list\` — See all change requests and their status
|
|
139
321
|
- \`sdd cr pending\` — Show only draft CRs to process
|
|
140
322
|
- \`sdd mark-cr-applied [files...]\` — Mark CRs as applied after updating the docs
|
|
141
|
-
|
|
142
|
-
|
|
323
|
+
`;
|
|
324
|
+
exports.BUGS_REFERENCE = `# Bugs
|
|
143
325
|
|
|
144
326
|
Bugs are markdown files in \`bugs/\` that describe problems found in the codebase.
|
|
145
327
|
|
|
146
|
-
|
|
328
|
+
## Bug format
|
|
147
329
|
|
|
148
330
|
\`\`\`yaml
|
|
149
331
|
---
|
|
@@ -156,52 +338,18 @@ created-at: "2025-01-01T00:00:00.000Z"
|
|
|
156
338
|
|
|
157
339
|
- **status**: \`open\` (needs fixing) or \`resolved\` (already fixed)
|
|
158
340
|
|
|
159
|
-
|
|
341
|
+
## Bug workflow
|
|
160
342
|
|
|
161
343
|
1. Check for open bugs: \`sdd bug open\`
|
|
162
344
|
2. Read each open bug and fix the code and/or documentation
|
|
163
345
|
3. After fixing a bug, mark it: \`sdd mark-bug-resolved bugs/BUG-001.md\`
|
|
164
346
|
4. Commit the fix
|
|
165
347
|
|
|
166
|
-
|
|
348
|
+
## Bug commands
|
|
167
349
|
|
|
168
350
|
- \`sdd bug list\` — See all bugs and their status
|
|
169
351
|
- \`sdd bug open\` — Show only open bugs to fix
|
|
170
352
|
- \`sdd mark-bug-resolved [files...]\` — Mark bugs as resolved after fixing
|
|
171
|
-
|
|
172
|
-
## UX and screenshots
|
|
173
|
-
|
|
174
|
-
When a feature has UX mockups or screenshots, place them next to the feature doc:
|
|
175
|
-
|
|
176
|
-
- **Simple feature** (no screenshots): \`product/features/auth.md\`
|
|
177
|
-
- **Feature with screenshots**: use a folder with \`index.md\`:
|
|
178
|
-
|
|
179
|
-
\`\`\`
|
|
180
|
-
product/features/auth/
|
|
181
|
-
index.md ← feature doc
|
|
182
|
-
login.png ← screenshot
|
|
183
|
-
register.png ← screenshot
|
|
184
|
-
\`\`\`
|
|
185
|
-
|
|
186
|
-
Reference images in the markdown with relative paths:
|
|
187
|
-
|
|
188
|
-
\`\`\`markdown
|
|
189
|
-
## UX
|
|
190
|
-
|
|
191
|
-

|
|
192
|
-

|
|
193
|
-
\`\`\`
|
|
194
|
-
|
|
195
|
-
Both formats work — use a folder only when you have screenshots or multiple files for a feature.
|
|
196
|
-
|
|
197
|
-
## Project structure
|
|
198
|
-
|
|
199
|
-
- \`product/\` — What to build (vision, users, features)
|
|
200
|
-
- \`system/\` — How to build it (entities, architecture, tech stack, interfaces)
|
|
201
|
-
- \`code/\` — All generated source code goes here
|
|
202
|
-
- \`change-requests/\` — Change requests to the documentation
|
|
203
|
-
- \`bugs/\` — Bug reports
|
|
204
|
-
- \`.sdd/\` — Project config and sync state (do not edit)
|
|
205
353
|
`;
|
|
206
354
|
const EMPTY_LOCK_TEMPLATE = () => `synced-at: "${new Date().toISOString()}"
|
|
207
355
|
files: {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":";;;AAAA,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAE3C,SAAS,UAAU,CAAC,KAAa,EAAE,OAAe;IAChD,OAAO;UACC,KAAK;;;kBAGG,GAAG,EAAE;;;;EAIrB,OAAO;CACR,CAAC;AACF,CAAC;AAMY,QAAA,iBAAiB,GAAG
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":";;;AAAA,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAE3C,SAAS,UAAU,CAAC,KAAa,EAAE,OAAe;IAChD,OAAO;UACC,KAAK;;;kBAGG,GAAG,EAAE;;;;EAIrB,OAAO;CACR,CAAC;AACF,CAAC;AAMY,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGhC,CAAC;AAEW,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiHnC,CAAC;AAEW,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEpC,CAAC;AAEW,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BxC,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B7B,CAAC;AAEK,MAAM,mBAAmB,GAC9B,GAAG,EAAE,CAAC,eAAe,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;CAE9C,CAAC;AAHW,QAAA,mBAAmB,uBAG9B"}
|
package/dist/sdd.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import type { StoryStatus, ValidationResult, SDDConfig, ChangeRequest, Bug } from
|
|
2
|
-
import type { ProjectInfo } from
|
|
1
|
+
import type { StoryStatus, ValidationResult, SDDConfig, ChangeRequest, Bug } from "./types.js";
|
|
2
|
+
import type { ProjectInfo } from "./scaffold/templates.js";
|
|
3
|
+
import { type SyncAdaptersOptions, type SyncAdaptersResult } from "./scaffold/skill-adapters.js";
|
|
3
4
|
export declare class SDD {
|
|
4
5
|
private root;
|
|
5
6
|
constructor(options: {
|
|
6
7
|
root: string;
|
|
7
8
|
});
|
|
8
9
|
init(info?: ProjectInfo): Promise<string[]>;
|
|
10
|
+
syncAdapters(options?: SyncAdaptersOptions): Promise<SyncAdaptersResult>;
|
|
11
|
+
supportedAdapters(): string[];
|
|
9
12
|
config(): Promise<SDDConfig>;
|
|
10
13
|
status(): Promise<StoryStatus>;
|
|
11
|
-
pending(): Promise<import(
|
|
14
|
+
pending(): Promise<import("./types.js").StoryFile[]>;
|
|
12
15
|
sync(): Promise<string>;
|
|
13
16
|
applyPrompt(): Promise<string | null>;
|
|
14
17
|
validate(): Promise<ValidationResult>;
|
package/dist/sdd.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdd.d.ts","sourceRoot":"","sources":["../src/sdd.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAU/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"sdd.d.ts","sourceRoot":"","sources":["../src/sdd.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAU/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAC;AAEtC,qBAAa,GAAG;IACd,OAAO,CAAC,IAAI,CAAS;gBAET,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAI/B,IAAI,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAI3C,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAK9E,iBAAiB,IAAI,MAAM,EAAE;IAIvB,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC;IAK5B,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC;IAc9B,OAAO,IAAI,OAAO,CAAC,OAAO,YAAY,EAAE,SAAS,EAAE,CAAC;IAMpD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAKvB,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAUrC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAMrC,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IA6B/C,cAAc,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAK1C,qBAAqB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAKjD,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAmBlD,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAKtB,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAK1B,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAmB1D,OAAO,CAAC,iBAAiB;CAK1B"}
|
package/dist/sdd.js
CHANGED
|
@@ -12,6 +12,7 @@ const init_js_1 = require("./scaffold/init.js");
|
|
|
12
12
|
const config_manager_js_1 = require("./config/config-manager.js");
|
|
13
13
|
const cr_parser_js_1 = require("./parser/cr-parser.js");
|
|
14
14
|
const bug_parser_js_1 = require("./parser/bug-parser.js");
|
|
15
|
+
const skill_adapters_js_1 = require("./scaffold/skill-adapters.js");
|
|
15
16
|
class SDD {
|
|
16
17
|
root;
|
|
17
18
|
constructor(options) {
|
|
@@ -20,6 +21,13 @@ class SDD {
|
|
|
20
21
|
async init(info) {
|
|
21
22
|
return (0, init_js_1.initProject)(this.root, info);
|
|
22
23
|
}
|
|
24
|
+
async syncAdapters(options) {
|
|
25
|
+
this.ensureInitialized();
|
|
26
|
+
return (0, skill_adapters_js_1.syncSkillAdapters)(this.root, options);
|
|
27
|
+
}
|
|
28
|
+
supportedAdapters() {
|
|
29
|
+
return (0, skill_adapters_js_1.listSupportedAdapters)();
|
|
30
|
+
}
|
|
23
31
|
async config() {
|
|
24
32
|
this.ensureInitialized();
|
|
25
33
|
return (0, config_manager_js_1.readConfig)(this.root);
|
|
@@ -32,14 +40,14 @@ class SDD {
|
|
|
32
40
|
relativePath: f.relativePath,
|
|
33
41
|
status: f.frontmatter.status,
|
|
34
42
|
version: f.frontmatter.version,
|
|
35
|
-
lastModified: f.frontmatter[
|
|
43
|
+
lastModified: f.frontmatter["last-modified"],
|
|
36
44
|
})),
|
|
37
45
|
};
|
|
38
46
|
}
|
|
39
47
|
async pending() {
|
|
40
48
|
this.ensureInitialized();
|
|
41
49
|
const files = await (0, story_parser_js_1.parseAllStoryFiles)(this.root);
|
|
42
|
-
return files.filter((f) => f.frontmatter.status !==
|
|
50
|
+
return files.filter((f) => f.frontmatter.status !== "synced");
|
|
43
51
|
}
|
|
44
52
|
async sync() {
|
|
45
53
|
const pending = await this.pending();
|
|
@@ -65,22 +73,22 @@ class SDD {
|
|
|
65
73
|
const marked = [];
|
|
66
74
|
for (const file of files) {
|
|
67
75
|
const { status } = file.frontmatter;
|
|
68
|
-
if (status ===
|
|
76
|
+
if (status === "synced")
|
|
69
77
|
continue;
|
|
70
78
|
if (paths && paths.length > 0 && !paths.includes(file.relativePath))
|
|
71
79
|
continue;
|
|
72
80
|
const absPath = (0, node_path_1.resolve)(this.root, file.relativePath);
|
|
73
|
-
if (status ===
|
|
81
|
+
if (status === "deleted") {
|
|
74
82
|
// File marked for deletion — remove it
|
|
75
|
-
const { unlink } = await import(
|
|
83
|
+
const { unlink } = await import("node:fs/promises");
|
|
76
84
|
await unlink(absPath);
|
|
77
85
|
marked.push(`${file.relativePath} (removed)`);
|
|
78
86
|
}
|
|
79
87
|
else {
|
|
80
88
|
// new or changed → synced
|
|
81
|
-
const content = await (0, promises_1.readFile)(absPath,
|
|
82
|
-
const updated = content.replace(/^status:\s*(new|changed)/m,
|
|
83
|
-
await (0, promises_1.writeFile)(absPath, updated,
|
|
89
|
+
const content = await (0, promises_1.readFile)(absPath, "utf-8");
|
|
90
|
+
const updated = content.replace(/^status:\s*(new|changed)/m, "status: synced");
|
|
91
|
+
await (0, promises_1.writeFile)(absPath, updated, "utf-8");
|
|
84
92
|
marked.push(file.relativePath);
|
|
85
93
|
}
|
|
86
94
|
}
|
|
@@ -92,21 +100,21 @@ class SDD {
|
|
|
92
100
|
}
|
|
93
101
|
async pendingChangeRequests() {
|
|
94
102
|
const all = await this.changeRequests();
|
|
95
|
-
return all.filter((cr) => cr.frontmatter.status ===
|
|
103
|
+
return all.filter((cr) => cr.frontmatter.status === "draft");
|
|
96
104
|
}
|
|
97
105
|
async markCRApplied(paths) {
|
|
98
106
|
this.ensureInitialized();
|
|
99
107
|
const all = await this.changeRequests();
|
|
100
108
|
const marked = [];
|
|
101
109
|
for (const cr of all) {
|
|
102
|
-
if (cr.frontmatter.status ===
|
|
110
|
+
if (cr.frontmatter.status === "applied")
|
|
103
111
|
continue;
|
|
104
112
|
if (paths && paths.length > 0 && !paths.includes(cr.relativePath))
|
|
105
113
|
continue;
|
|
106
114
|
const absPath = (0, node_path_1.resolve)(this.root, cr.relativePath);
|
|
107
|
-
const content = await (0, promises_1.readFile)(absPath,
|
|
108
|
-
const updated = content.replace(/^status:\s*draft/m,
|
|
109
|
-
await (0, promises_1.writeFile)(absPath, updated,
|
|
115
|
+
const content = await (0, promises_1.readFile)(absPath, "utf-8");
|
|
116
|
+
const updated = content.replace(/^status:\s*draft/m, "status: applied");
|
|
117
|
+
await (0, promises_1.writeFile)(absPath, updated, "utf-8");
|
|
110
118
|
marked.push(cr.relativePath);
|
|
111
119
|
}
|
|
112
120
|
return marked;
|
|
@@ -117,21 +125,21 @@ class SDD {
|
|
|
117
125
|
}
|
|
118
126
|
async openBugs() {
|
|
119
127
|
const all = await this.bugs();
|
|
120
|
-
return all.filter((b) => b.frontmatter.status ===
|
|
128
|
+
return all.filter((b) => b.frontmatter.status === "open");
|
|
121
129
|
}
|
|
122
130
|
async markBugResolved(paths) {
|
|
123
131
|
this.ensureInitialized();
|
|
124
132
|
const all = await this.bugs();
|
|
125
133
|
const marked = [];
|
|
126
134
|
for (const bug of all) {
|
|
127
|
-
if (bug.frontmatter.status ===
|
|
135
|
+
if (bug.frontmatter.status === "resolved")
|
|
128
136
|
continue;
|
|
129
137
|
if (paths && paths.length > 0 && !paths.includes(bug.relativePath))
|
|
130
138
|
continue;
|
|
131
139
|
const absPath = (0, node_path_1.resolve)(this.root, bug.relativePath);
|
|
132
|
-
const content = await (0, promises_1.readFile)(absPath,
|
|
133
|
-
const updated = content.replace(/^status:\s*open/m,
|
|
134
|
-
await (0, promises_1.writeFile)(absPath, updated,
|
|
140
|
+
const content = await (0, promises_1.readFile)(absPath, "utf-8");
|
|
141
|
+
const updated = content.replace(/^status:\s*open/m, "status: resolved");
|
|
142
|
+
await (0, promises_1.writeFile)(absPath, updated, "utf-8");
|
|
135
143
|
marked.push(bug.relativePath);
|
|
136
144
|
}
|
|
137
145
|
return marked;
|
package/dist/sdd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdd.js","sourceRoot":"","sources":["../src/sdd.ts"],"names":[],"mappings":";;;AAAA,+CAAuD;AACvD,yCAAoC;AAEpC,2CAAyD;AACzD,8DAA8D;AAC9D,sEAA8D;AAC9D,kFAAyE;AACzE,0DAAmD;AACnD,gDAAiD;AACj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A0B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF;AA9JD,kBA8JC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SDD } from
|
|
1
|
+
export { SDD } from "./sdd.js";
|
|
2
2
|
export type {
|
|
3
3
|
StoryFrontmatter,
|
|
4
4
|
StoryFile,
|
|
@@ -16,10 +16,19 @@ export type {
|
|
|
16
16
|
Bug,
|
|
17
17
|
BugFrontmatter,
|
|
18
18
|
BugStatus,
|
|
19
|
-
} from
|
|
20
|
-
export { SDDError, LockFileNotFoundError, ParseError, ProjectNotInitializedError } from
|
|
21
|
-
export type { ProjectInfo } from
|
|
22
|
-
export { isSDDProject, readConfig, writeConfig } from
|
|
23
|
-
export { runAgent } from
|
|
24
|
-
export type { AgentRunnerOptions } from
|
|
25
|
-
export { DEFAULT_AGENTS, resolveAgentCommand } from
|
|
19
|
+
} from "./types.js";
|
|
20
|
+
export { SDDError, LockFileNotFoundError, ParseError, ProjectNotInitializedError } from "./errors.js";
|
|
21
|
+
export type { ProjectInfo } from "./scaffold/templates.js";
|
|
22
|
+
export { isSDDProject, readConfig, writeConfig } from "./config/config-manager.js";
|
|
23
|
+
export { runAgent } from "./agent/agent-runner.js";
|
|
24
|
+
export type { AgentRunnerOptions } from "./agent/agent-runner.js";
|
|
25
|
+
export { DEFAULT_AGENTS, resolveAgentCommand } from "./agent/agent-defaults.js";
|
|
26
|
+
export { listSupportedAdapters, SKILL_ADAPTERS, syncSkillAdapters } from "./scaffold/skill-adapters.js";
|
|
27
|
+
export type {
|
|
28
|
+
AdapterMode,
|
|
29
|
+
SkillAdapterDefinition,
|
|
30
|
+
SyncAdaptersOptions,
|
|
31
|
+
AdapterFileAction,
|
|
32
|
+
AdapterFileChange,
|
|
33
|
+
SyncAdaptersResult,
|
|
34
|
+
} from "./scaffold/skill-adapters.js";
|