@applica-software-guru/sdd-core 1.8.1 → 1.8.2

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 (57) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +3 -3
  4. package/dist/index.js.map +1 -1
  5. package/dist/parser/bug-parser.d.ts.map +1 -1
  6. package/dist/parser/bug-parser.js +2 -1
  7. package/dist/parser/bug-parser.js.map +1 -1
  8. package/dist/parser/cr-parser.d.ts.map +1 -1
  9. package/dist/parser/cr-parser.js +2 -1
  10. package/dist/parser/cr-parser.js.map +1 -1
  11. package/dist/prompt/draft-prompt-generator.d.ts +1 -1
  12. package/dist/prompt/draft-prompt-generator.d.ts.map +1 -1
  13. package/dist/prompt/draft-prompt-generator.js +19 -35
  14. package/dist/prompt/draft-prompt-generator.js.map +1 -1
  15. package/dist/remote/api-client.d.ts +2 -2
  16. package/dist/remote/api-client.d.ts.map +1 -1
  17. package/dist/remote/api-client.js +4 -4
  18. package/dist/remote/api-client.js.map +1 -1
  19. package/dist/remote/sync-engine.js +12 -8
  20. package/dist/remote/sync-engine.js.map +1 -1
  21. package/dist/scaffold/skill-adapters.d.ts +0 -9
  22. package/dist/scaffold/skill-adapters.d.ts.map +1 -1
  23. package/dist/scaffold/skill-adapters.js +17 -0
  24. package/dist/scaffold/skill-adapters.js.map +1 -1
  25. package/dist/scaffold/templates.d.ts +1 -5
  26. package/dist/scaffold/templates.d.ts.map +1 -1
  27. package/dist/scaffold/templates.generated.d.ts +7 -0
  28. package/dist/scaffold/templates.generated.d.ts.map +1 -0
  29. package/dist/scaffold/templates.generated.js +464 -0
  30. package/dist/scaffold/templates.generated.js.map +1 -0
  31. package/dist/scaffold/templates.js +8 -338
  32. package/dist/scaffold/templates.js.map +1 -1
  33. package/dist/sdd.d.ts +0 -1
  34. package/dist/sdd.d.ts.map +1 -1
  35. package/dist/sdd.js +1 -18
  36. package/dist/sdd.js.map +1 -1
  37. package/package.json +2 -1
  38. package/scripts/generate-templates.mjs +38 -0
  39. package/src/index.ts +1 -1
  40. package/src/parser/bug-parser.ts +5 -3
  41. package/src/parser/cr-parser.ts +5 -3
  42. package/src/prompt/draft-prompt-generator.ts +18 -38
  43. package/src/remote/api-client.ts +2 -2
  44. package/src/remote/sync-engine.ts +15 -15
  45. package/src/scaffold/skill-adapters.ts +18 -11
  46. package/src/scaffold/templates.generated.ts +466 -0
  47. package/src/scaffold/templates.ts +9 -342
  48. package/src/sdd.ts +1 -19
  49. package/tests/agent-defaults.test.ts +24 -0
  50. package/tests/api-client.test.ts +6 -6
  51. package/tests/draft-prompt.test.ts +78 -0
  52. package/dist/prompt/apply-prompt-generator.d.ts +0 -4
  53. package/dist/prompt/apply-prompt-generator.d.ts.map +0 -1
  54. package/dist/prompt/apply-prompt-generator.js +0 -97
  55. package/dist/prompt/apply-prompt-generator.js.map +0 -1
  56. package/src/prompt/apply-prompt-generator.ts +0 -117
  57. package/tests/apply.test.ts +0 -117
@@ -1,10 +1,6 @@
1
+ export { SKILL_MD_TEMPLATE, SKILL_UI_MD_TEMPLATE, SKILL_REMOTE_MD_TEMPLATE, FILE_FORMAT_REFERENCE, CHANGE_REQUESTS_REFERENCE, BUGS_REFERENCE, } from "./templates.generated.js";
1
2
  export interface ProjectInfo {
2
3
  description: string;
3
4
  }
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![Login screen](login.png)\n![Register screen](register.png)\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";
9
5
  export declare const EMPTY_LOCK_TEMPLATE: () => string;
10
6
  //# 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,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
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAiBlC,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,mBAAmB,cAG/B,CAAC"}
@@ -0,0 +1,7 @@
1
+ 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\n10. If remote sync is configured (remote section in `.sdd/config.yaml` and API key available), remind the user they can publish updates with:\n\n```\nsdd push\n```\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 pending 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\n8. If remote is configured, suggest `sdd push` after successful local sync + commit\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- [Remote pull/enrich/push workflow](../sdd-remote/SKILL.md)\n- [UI Component workflow](../sdd-ui/SKILL.md)\n";
2
+ 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";
3
+ export declare const SKILL_REMOTE_MD_TEMPLATE = "---\nname: sdd-remote\ndescription: >\n Remote sync workflow for Story Driven Development. Use when the user asks\n to update local state from remote changes, process remote drafts, and push\n enriched items back.\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 Remote - Pull, Enrich, Push\n\n## Purpose\n\nUse this skill to synchronize local SDD docs with remote updates, enrich draft content,\nand publish the enriched result to remote in active states.\n\n## Detection\n\nThis workflow applies when:\n\n- `.sdd/config.yaml` exists in the project root\n- The user asks to update local state from remote, pull pending CRs/bugs/docs,\n enrich drafts, or push pending remote updates\n\n## Workflow\n\nFollow this sequence in order:\n\n1. Verify remote configuration\n\n```bash\ntest -f .sdd/config.yaml && sdd remote status\n```\n\nIf remote is not configured or disconnected, run:\n\n```bash\nsdd remote init\n```\n\nThen stop and ask the user for URL/API key if needed.\n\n2. Pull remote updates (docs + CRs + bugs)\n\n```bash\nsdd pull\n```\n\nOptional scoped pulls:\n\n```bash\nsdd pull --docs-only\nsdd pull --crs-only\nsdd pull --bugs-only\n```\n\n3. Generate draft TODO list for your coding agent\n\n```bash\nsdd drafts\n```\n\nThis command lists all local draft docs, CRs, and bugs and prints a minimal TODO-style prompt.\nGive that prompt to your coding agent. If additional context is needed, the agent can fetch it directly from project files.\n\n4. Transition enriched drafts to active states\n\n```bash\nsdd mark-drafts-enriched\n```\n\nThis performs:\n\n- Document: `draft -> new`\n- Change Request: `draft -> pending`\n- Bug: `draft -> open`\n\n5. Push local pending updates to remote\n\n```bash\nsdd push\n```\n\n6. Verify final remote sync state\n\n```bash\nsdd remote status\n```\n\n## Rules\n\n1. Always check remote configuration before pull/push (`sdd remote status`)\n2. Do not use `sdd push --all` unless the user explicitly asks for a full reseed\n3. If pull reports conflicts, do not overwrite local files blindly; report conflicts and ask how to proceed\n4. Do not edit files inside `.sdd/` manually\n5. Keep status transitions explicit: enrich first, then `sdd mark-drafts-enriched`, then push\n\n## Related commands\n\n- `sdd remote init`\n- `sdd remote status`\n- `sdd pull`\n- `sdd drafts`\n- `sdd mark-drafts-enriched`\n- `sdd push`\n";
4
+ 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![Login screen](login.png)\n![Register screen](register.png)\n```\n\nBoth formats work \u2014 use a folder only when you have screenshots or multiple files for a feature.\n";
5
+ 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- **status**: `draft` (needs enrichment), `pending` (ready to process), 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 pending CRs to process\n- `sdd mark-cr-applied [files...]` \u2014 Mark CRs as applied after updating the docs\n";
6
+ 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**: `draft` (needs enrichment), `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";
7
+ //# sourceMappingURL=templates.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.generated.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,+lIAyG7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,q6HAiHhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,m+EA8GpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,47DAiEjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,uhCA8BrC,CAAC;AAEF,eAAO,MAAM,cAAc,0wBA6B1B,CAAC"}
@@ -0,0 +1,464 @@
1
+ "use strict";
2
+ // @generated — DO NOT EDIT. Source of truth: packages/skill/
3
+ // Regenerate with: node packages/core/scripts/generate-templates.mjs
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.BUGS_REFERENCE = exports.CHANGE_REQUESTS_REFERENCE = exports.FILE_FORMAT_REFERENCE = exports.SKILL_REMOTE_MD_TEMPLATE = exports.SKILL_UI_MD_TEMPLATE = exports.SKILL_MD_TEMPLATE = void 0;
6
+ exports.SKILL_MD_TEMPLATE = `---
7
+ name: sdd
8
+ description: >
9
+ Story Driven Development workflow. Use when working in a project
10
+ with .sdd/config.yaml, or when the user mentions SDD, sdd sync,
11
+ story driven development, or spec-driven development.
12
+ license: MIT
13
+ compatibility: Requires sdd CLI (npm i -g @applica-software-guru/sdd)
14
+ allowed-tools: Bash(sdd:*) Read Glob Grep
15
+ metadata:
16
+ author: applica-software-guru
17
+ version: "1.0"
18
+ ---
19
+
20
+ # SDD — Story Driven Development
21
+
22
+ ## Detection
23
+
24
+ This project uses SDD if \`.sdd/config.yaml\` exists in the project root.
25
+
26
+ ## Workflow
27
+
28
+ Follow this loop every time you work on an SDD project:
29
+
30
+ 1. Run \`sdd bug open\` — check if there are open bugs to fix first
31
+ 2. If there are open bugs, fix the code/docs, then run \`sdd mark-bug-resolved\`
32
+ 3. Run \`sdd cr pending\` — check if there are change requests to process
33
+ 4. If there are pending CRs, apply them to the docs, then run \`sdd mark-cr-applied\`
34
+ 5. Run \`sdd sync\` to see what needs to be implemented
35
+ 6. Read the documentation files listed in the sync output
36
+ 7. Implement what each file describes, writing code inside \`code/\`
37
+ 8. After implementing, mark files as synced:
38
+
39
+ \`\`\`
40
+ sdd mark-synced product/features/auth.md
41
+ \`\`\`
42
+
43
+ Or mark all pending files at once:
44
+
45
+ \`\`\`
46
+ sdd mark-synced
47
+ \`\`\`
48
+
49
+ 9. **Commit immediately after mark-synced** — this is mandatory:
50
+
51
+ \`\`\`
52
+ git add -A && git commit -m "sdd sync: <brief description of what was implemented>"
53
+ \`\`\`
54
+
55
+ Do NOT skip this step. Every mark-synced must be followed by a git commit.
56
+
57
+ 10. If remote sync is configured (remote section in \`.sdd/config.yaml\` and API key available), remind the user they can publish updates with:
58
+
59
+ \`\`\`
60
+ sdd push
61
+ \`\`\`
62
+
63
+ ### Removing a feature
64
+
65
+ If a documentation file has \`status: deleted\`, it means that feature should be removed.
66
+ Delete the related code in \`code/\`, then run \`sdd mark-synced <file>\` (the doc file will be removed automatically), then commit.
67
+
68
+ ## Available commands
69
+
70
+ - \`sdd status\` — See all documentation files and their state (new/changed/deleted/synced)
71
+ - \`sdd diff\` — See what changed since last sync
72
+ - \`sdd sync\` — Get the sync prompt for pending files (includes git diff for changed files)
73
+ - \`sdd validate\` — Check for broken references and issues
74
+ - \`sdd mark-synced [files...]\` — Mark specific files (or all) as synced
75
+ - \`sdd cr list\` — List all change requests with their status
76
+ - \`sdd cr pending\` — Show pending change requests to process
77
+ - \`sdd mark-cr-applied [files...]\` — Mark change requests as applied
78
+ - \`sdd bug list\` — List all bugs with their status
79
+ - \`sdd bug open\` — Show open bugs to fix
80
+ - \`sdd mark-bug-resolved [files...]\` — Mark bugs as resolved
81
+
82
+ ## Rules
83
+
84
+ 1. **Always commit after mark-synced** — run \`git add -A && git commit -m "sdd sync: ..."\` immediately after \`sdd mark-synced\`. Never leave synced files uncommitted.
85
+ 2. Before running \`sdd sync\`, check for open bugs with \`sdd bug open\` and pending change requests with \`sdd cr pending\`
86
+ 3. If there are pending CRs, apply them to the docs first, then mark them with \`sdd mark-cr-applied\`
87
+ 4. Only implement what the sync prompt asks for
88
+ 5. All generated code goes inside \`code/\`
89
+ 6. Respect all constraints in \`## Agent Notes\` sections (if present)
90
+ 7. Do not edit files inside \`.sdd/\` manually
91
+ 8. If remote is configured, suggest \`sdd push\` after successful local sync + commit
92
+
93
+ ## Project structure
94
+
95
+ - \`product/\` — What to build (vision, users, features)
96
+ - \`system/\` — How to build it (entities, architecture, tech stack, interfaces)
97
+ - \`code/\` — All generated source code goes here
98
+ - \`change-requests/\` — Change requests to the documentation
99
+ - \`bugs/\` — Bug reports
100
+ - \`.sdd/\` — Project config and sync state (do not edit)
101
+
102
+ ## References
103
+
104
+ For detailed information on specific topics, see:
105
+
106
+ - [File format and status lifecycle](references/file-format.md)
107
+ - [Change Requests workflow](references/change-requests.md)
108
+ - [Bug workflow](references/bugs.md)
109
+ - [Remote pull/enrich/push workflow](../sdd-remote/SKILL.md)
110
+ - [UI Component workflow](../sdd-ui/SKILL.md)
111
+ `;
112
+ exports.SKILL_UI_MD_TEMPLATE = `---
113
+ name: sdd-ui
114
+ description: >
115
+ UI Component Editor workflow. Use when the user wants to implement a React component
116
+ from a screenshot in an SDD project, iterating visually with live preview.
117
+ license: MIT
118
+ compatibility: >
119
+ Requires sdd CLI (npm i -g @applica-software-guru/sdd).
120
+ Requires Playwright MCP configured in Claude Code
121
+ (e.g. @playwright/mcp or @executeautomation/playwright-mcp).
122
+ allowed-tools: Bash(sdd:*) Read Glob Grep Edit Write mcp__playwright__screenshot mcp__playwright__navigate mcp__playwright__click
123
+ metadata:
124
+ author: applica-software-guru
125
+ version: "1.1"
126
+ ---
127
+
128
+ # SDD UI — Visual Component Editor
129
+
130
+ ## Purpose
131
+
132
+ Use this workflow when implementing a React component from a screenshot reference in an SDD project.
133
+ The split-panel editor shows the spec screenshot on the left and the live component on the right,
134
+ so you can iterate visually until they match.
135
+
136
+ ## Prerequisites
137
+
138
+ - \`sdd\` CLI installed globally
139
+ - Playwright MCP configured in Claude Code settings
140
+ - e.g. \`@playwright/mcp\` or \`@executeautomation/playwright-mcp\`
141
+ - If not configured, inform the user and stop — visual feedback won't work without it
142
+
143
+ ## Workflow
144
+
145
+ ### Step 1 — Read the spec
146
+
147
+ Read the SDD feature file to understand what the component should look like and do.
148
+ Look for any screenshot paths referenced in the feature doc.
149
+
150
+ ### Step 2 — Launch the editor
151
+
152
+ \`\`\`bash
153
+ # Single screenshot — detached (recommended when run by an agent)
154
+ sdd ui launch-editor LoginForm \\
155
+ --screenshot product/features/auth/login.png \\
156
+ --detach
157
+
158
+ # Multiple screenshots (e.g. desktop + mobile)
159
+ sdd ui launch-editor LoginForm \\
160
+ --screenshot product/features/auth/login-desktop.png \\
161
+ --screenshot product/features/auth/login-mobile.png \\
162
+ --detach
163
+ \`\`\`
164
+
165
+ The command will:
166
+ - Scaffold \`code/components/LoginForm.tsx\` if it doesn't exist
167
+ - Print the exact component file path to edit
168
+ - Start the editor at \`http://localhost:5174\`
169
+
170
+ With \`--detach\` the process runs in background and the terminal is immediately free.
171
+ Without \`--detach\` it runs in foreground (use Ctrl+C to stop).
172
+
173
+ With multiple screenshots, the left panel shows a tab per screenshot.
174
+ With a single screenshot, no tab bar is shown.
175
+
176
+ ### Step 3 — Implement the component
177
+
178
+ Edit the file printed by \`sdd ui launch-editor\` (e.g. \`code/components/LoginForm.tsx\`).
179
+
180
+ Write a React component that matches the screenshot. Use standard HTML/CSS or inline styles —
181
+ no external UI library unless the project already uses one.
182
+
183
+ Vite HMR will update the right panel automatically on every save.
184
+
185
+ ### Step 4 — Visual check with Playwright
186
+
187
+ After each save, screenshot the live preview and compare it with the spec:
188
+
189
+ \`\`\`
190
+ mcp__playwright__navigate http://localhost:5174
191
+ mcp__playwright__screenshot
192
+ \`\`\`
193
+
194
+ The left panel already shows the spec screenshot for direct comparison.
195
+ Note differences in layout, spacing, typography, colors, and component structure.
196
+
197
+ ### Step 5 — Iterate
198
+
199
+ Edit component → Playwright screenshot → compare → repeat until the preview matches the spec.
200
+
201
+ ### Step 6 — Finalize
202
+
203
+ \`\`\`bash
204
+ sdd ui stop
205
+ sdd mark-synced product/features/auth/login.md
206
+ git add -A && git commit -m "sdd sync: implement LoginForm component"
207
+ \`\`\`
208
+
209
+ ## Notes
210
+
211
+ - The component file is permanent — it lives in \`code/components/\` and is part of your project
212
+ - Port \`5174\` by default (not \`5173\`) to avoid conflicts with the user's app dev server
213
+ - If the component needs props, scaffold it with hardcoded sample data for the preview
214
+
215
+ ## Troubleshooting
216
+
217
+ **Playwright MCP not configured:**
218
+ Stop and ask the user to add it to their Claude Code MCP settings before continuing.
219
+
220
+ **Component import fails in preview:**
221
+ Check that the component file has a valid default export and no TypeScript errors.
222
+
223
+ **Port already in use:**
224
+ \`sdd ui launch-editor LoginForm --screenshot login.png --port 5175\`
225
+ `;
226
+ exports.SKILL_REMOTE_MD_TEMPLATE = `---
227
+ name: sdd-remote
228
+ description: >
229
+ Remote sync workflow for Story Driven Development. Use when the user asks
230
+ to update local state from remote changes, process remote drafts, and push
231
+ enriched items back.
232
+ license: MIT
233
+ compatibility: Requires sdd CLI (npm i -g @applica-software-guru/sdd)
234
+ allowed-tools: Bash(sdd:*) Read Glob Grep
235
+ metadata:
236
+ author: applica-software-guru
237
+ version: "1.0"
238
+ ---
239
+
240
+ # SDD Remote - Pull, Enrich, Push
241
+
242
+ ## Purpose
243
+
244
+ Use this skill to synchronize local SDD docs with remote updates, enrich draft content,
245
+ and publish the enriched result to remote in active states.
246
+
247
+ ## Detection
248
+
249
+ This workflow applies when:
250
+
251
+ - \`.sdd/config.yaml\` exists in the project root
252
+ - The user asks to update local state from remote, pull pending CRs/bugs/docs,
253
+ enrich drafts, or push pending remote updates
254
+
255
+ ## Workflow
256
+
257
+ Follow this sequence in order:
258
+
259
+ 1. Verify remote configuration
260
+
261
+ \`\`\`bash
262
+ test -f .sdd/config.yaml && sdd remote status
263
+ \`\`\`
264
+
265
+ If remote is not configured or disconnected, run:
266
+
267
+ \`\`\`bash
268
+ sdd remote init
269
+ \`\`\`
270
+
271
+ Then stop and ask the user for URL/API key if needed.
272
+
273
+ 2. Pull remote updates (docs + CRs + bugs)
274
+
275
+ \`\`\`bash
276
+ sdd pull
277
+ \`\`\`
278
+
279
+ Optional scoped pulls:
280
+
281
+ \`\`\`bash
282
+ sdd pull --docs-only
283
+ sdd pull --crs-only
284
+ sdd pull --bugs-only
285
+ \`\`\`
286
+
287
+ 3. Generate draft TODO list for your coding agent
288
+
289
+ \`\`\`bash
290
+ sdd drafts
291
+ \`\`\`
292
+
293
+ This command lists all local draft docs, CRs, and bugs and prints a minimal TODO-style prompt.
294
+ Give that prompt to your coding agent. If additional context is needed, the agent can fetch it directly from project files.
295
+
296
+ 4. Transition enriched drafts to active states
297
+
298
+ \`\`\`bash
299
+ sdd mark-drafts-enriched
300
+ \`\`\`
301
+
302
+ This performs:
303
+
304
+ - Document: \`draft -> new\`
305
+ - Change Request: \`draft -> pending\`
306
+ - Bug: \`draft -> open\`
307
+
308
+ 5. Push local pending updates to remote
309
+
310
+ \`\`\`bash
311
+ sdd push
312
+ \`\`\`
313
+
314
+ 6. Verify final remote sync state
315
+
316
+ \`\`\`bash
317
+ sdd remote status
318
+ \`\`\`
319
+
320
+ ## Rules
321
+
322
+ 1. Always check remote configuration before pull/push (\`sdd remote status\`)
323
+ 2. Do not use \`sdd push --all\` unless the user explicitly asks for a full reseed
324
+ 3. If pull reports conflicts, do not overwrite local files blindly; report conflicts and ask how to proceed
325
+ 4. Do not edit files inside \`.sdd/\` manually
326
+ 5. Keep status transitions explicit: enrich first, then \`sdd mark-drafts-enriched\`, then push
327
+
328
+ ## Related commands
329
+
330
+ - \`sdd remote init\`
331
+ - \`sdd remote status\`
332
+ - \`sdd pull\`
333
+ - \`sdd drafts\`
334
+ - \`sdd mark-drafts-enriched\`
335
+ - \`sdd push\`
336
+ `;
337
+ exports.FILE_FORMAT_REFERENCE = `# File Format and Status Lifecycle
338
+
339
+ ## YAML Frontmatter
340
+
341
+ Every \`.md\` file in \`product/\` and \`system/\` must start with this YAML frontmatter:
342
+
343
+ \`\`\`yaml
344
+ ---
345
+ title: "File title"
346
+ status: new
347
+ author: ""
348
+ last-modified: "2025-01-01T00:00:00.000Z"
349
+ version: "1.0"
350
+ ---
351
+ \`\`\`
352
+
353
+ ## Status values
354
+
355
+ - **\`new\`** — new file, needs to be implemented
356
+ - **\`changed\`** — modified since last sync, code needs updating
357
+ - **\`deleted\`** — feature to be removed, agent should delete related code
358
+ - **\`synced\`** — already implemented, up to date
359
+
360
+ ## Version
361
+
362
+ Patch-bump on each edit: 1.0 → 1.1 → 1.2
363
+
364
+ ## Last-modified
365
+
366
+ ISO 8601 datetime, updated on each edit.
367
+
368
+ ## How sync works
369
+
370
+ \`sdd sync\` generates a structured prompt for the agent based on pending files:
371
+
372
+ - **\`new\` files**: the agent reads the full documentation and implements it from scratch
373
+ - **\`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 — this way the agent sees exactly what was modified and can update only the affected code
374
+ - **\`deleted\` files**: the agent removes the related code
375
+
376
+ This is why **committing after every mark-synced is mandatory** — the git history is what SDD uses to detect changes.
377
+
378
+ ## UX and screenshots
379
+
380
+ When a feature has UX mockups or screenshots, place them next to the feature doc:
381
+
382
+ - **Simple feature** (no screenshots): \`product/features/auth.md\`
383
+ - **Feature with screenshots**: use a folder with \`index.md\`:
384
+
385
+ \`\`\`
386
+ product/features/auth/
387
+ index.md ← feature doc
388
+ login.png ← screenshot
389
+ register.png ← screenshot
390
+ \`\`\`
391
+
392
+ Reference images in the markdown with relative paths:
393
+
394
+ \`\`\`markdown
395
+ ## UX
396
+
397
+ ![Login screen](login.png)
398
+ ![Register screen](register.png)
399
+ \`\`\`
400
+
401
+ Both formats work — use a folder only when you have screenshots or multiple files for a feature.
402
+ `;
403
+ exports.CHANGE_REQUESTS_REFERENCE = `# Change Requests
404
+
405
+ Change Requests (CRs) are markdown files in \`change-requests/\` that describe modifications to the documentation.
406
+
407
+ ## CR format
408
+
409
+ \`\`\`yaml
410
+ ---
411
+ title: "Add authentication feature"
412
+ status: draft
413
+ author: "user"
414
+ created-at: "2025-01-01T00:00:00.000Z"
415
+ ---
416
+ \`\`\`
417
+
418
+ - **status**: \`draft\` (pending) or \`applied\` (already processed)
419
+ - **status**: \`draft\` (needs enrichment), \`pending\` (ready to process), or \`applied\` (already processed)
420
+
421
+ ## CR workflow
422
+
423
+ 1. Check for pending CRs: \`sdd cr pending\`
424
+ 2. Read each pending CR and apply the described changes to the documentation files (marking them as \`new\`, \`changed\`, or \`deleted\`)
425
+ 3. After applying a CR to the docs, mark it: \`sdd mark-cr-applied change-requests/CR-001.md\`
426
+ 4. Then run \`sdd sync\` to implement the code changes
427
+
428
+ ## CR commands
429
+
430
+ - \`sdd cr list\` — See all change requests and their status
431
+ - \`sdd cr pending\` — Show only pending CRs to process
432
+ - \`sdd mark-cr-applied [files...]\` — Mark CRs as applied after updating the docs
433
+ `;
434
+ exports.BUGS_REFERENCE = `# Bugs
435
+
436
+ Bugs are markdown files in \`bugs/\` that describe problems found in the codebase.
437
+
438
+ ## Bug format
439
+
440
+ \`\`\`yaml
441
+ ---
442
+ title: "Login fails with empty password"
443
+ status: open
444
+ author: "user"
445
+ created-at: "2025-01-01T00:00:00.000Z"
446
+ ---
447
+ \`\`\`
448
+
449
+ - **status**: \`draft\` (needs enrichment), \`open\` (needs fixing), or \`resolved\` (already fixed)
450
+
451
+ ## Bug workflow
452
+
453
+ 1. Check for open bugs: \`sdd bug open\`
454
+ 2. Read each open bug and fix the code and/or documentation
455
+ 3. After fixing a bug, mark it: \`sdd mark-bug-resolved bugs/BUG-001.md\`
456
+ 4. Commit the fix
457
+
458
+ ## Bug commands
459
+
460
+ - \`sdd bug list\` — See all bugs and their status
461
+ - \`sdd bug open\` — Show only open bugs to fix
462
+ - \`sdd mark-bug-resolved [files...]\` — Mark bugs as resolved after fixing
463
+ `;
464
+ //# sourceMappingURL=templates.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.generated.js","sourceRoot":"","sources":["../../src/scaffold/templates.generated.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,qEAAqE;;;AAExD,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGhC,CAAC;AAEW,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiHnC,CAAC;AAEW,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GvC,CAAC;AAEW,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEpC,CAAC;AAEW,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxC,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B7B,CAAC"}