specweave 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/INSTALL.md +848 -0
  2. package/LICENSE +21 -0
  3. package/README.md +675 -0
  4. package/SPECWEAVE.md +665 -0
  5. package/bin/install-agents.sh +57 -0
  6. package/bin/install-all.sh +49 -0
  7. package/bin/install-commands.sh +56 -0
  8. package/bin/install-skills.sh +57 -0
  9. package/bin/specweave.js +81 -0
  10. package/dist/adapters/adapter-base.d.ts +50 -0
  11. package/dist/adapters/adapter-base.d.ts.map +1 -0
  12. package/dist/adapters/adapter-base.js +146 -0
  13. package/dist/adapters/adapter-base.js.map +1 -0
  14. package/dist/adapters/adapter-interface.d.ts +108 -0
  15. package/dist/adapters/adapter-interface.d.ts.map +1 -0
  16. package/dist/adapters/adapter-interface.js +9 -0
  17. package/dist/adapters/adapter-interface.js.map +1 -0
  18. package/dist/adapters/claude/adapter.d.ts +54 -0
  19. package/dist/adapters/claude/adapter.d.ts.map +1 -0
  20. package/dist/adapters/claude/adapter.js +184 -0
  21. package/dist/adapters/claude/adapter.js.map +1 -0
  22. package/dist/adapters/copilot/adapter.d.ts +42 -0
  23. package/dist/adapters/copilot/adapter.d.ts.map +1 -0
  24. package/dist/adapters/copilot/adapter.js +239 -0
  25. package/dist/adapters/copilot/adapter.js.map +1 -0
  26. package/dist/adapters/cursor/adapter.d.ts +42 -0
  27. package/dist/adapters/cursor/adapter.d.ts.map +1 -0
  28. package/dist/adapters/cursor/adapter.js +297 -0
  29. package/dist/adapters/cursor/adapter.js.map +1 -0
  30. package/dist/adapters/generic/adapter.d.ts +40 -0
  31. package/dist/adapters/generic/adapter.d.ts.map +1 -0
  32. package/dist/adapters/generic/adapter.js +155 -0
  33. package/dist/adapters/generic/adapter.js.map +1 -0
  34. package/dist/cli/commands/init.d.ts +6 -0
  35. package/dist/cli/commands/init.d.ts.map +1 -0
  36. package/dist/cli/commands/init.js +247 -0
  37. package/dist/cli/commands/init.js.map +1 -0
  38. package/dist/cli/commands/install.d.ts +7 -0
  39. package/dist/cli/commands/install.d.ts.map +1 -0
  40. package/dist/cli/commands/install.js +160 -0
  41. package/dist/cli/commands/install.js.map +1 -0
  42. package/dist/cli/commands/list.d.ts +6 -0
  43. package/dist/cli/commands/list.d.ts.map +1 -0
  44. package/dist/cli/commands/list.js +154 -0
  45. package/dist/cli/commands/list.js.map +1 -0
  46. package/package.json +90 -0
  47. package/src/adapters/README.md +312 -0
  48. package/src/adapters/adapter-base.ts +146 -0
  49. package/src/adapters/adapter-interface.ts +120 -0
  50. package/src/adapters/claude/README.md +241 -0
  51. package/src/adapters/claude/adapter.ts +157 -0
  52. package/src/adapters/copilot/.github/copilot/instructions.md +376 -0
  53. package/src/adapters/copilot/README.md +200 -0
  54. package/src/adapters/copilot/adapter.ts +210 -0
  55. package/src/adapters/cursor/.cursor/context/docs-context.md +62 -0
  56. package/src/adapters/cursor/.cursor/context/increments-context.md +71 -0
  57. package/src/adapters/cursor/.cursor/context/strategy-context.md +73 -0
  58. package/src/adapters/cursor/.cursor/context/tests-context.md +89 -0
  59. package/src/adapters/cursor/.cursorrules +325 -0
  60. package/src/adapters/cursor/README.md +243 -0
  61. package/src/adapters/cursor/adapter.ts +268 -0
  62. package/src/adapters/generic/README.md +277 -0
  63. package/src/adapters/generic/SPECWEAVE-MANUAL.md +676 -0
  64. package/src/adapters/generic/adapter.ts +159 -0
  65. package/src/adapters/registry.yaml +126 -0
  66. package/src/agents/architect/AGENT.md +416 -0
  67. package/src/agents/devops/AGENT.md +1738 -0
  68. package/src/agents/docs-writer/AGENT.md +239 -0
  69. package/src/agents/performance/AGENT.md +228 -0
  70. package/src/agents/pm/AGENT.md +751 -0
  71. package/src/agents/qa-lead/AGENT.md +150 -0
  72. package/src/agents/security/AGENT.md +179 -0
  73. package/src/agents/sre/AGENT.md +582 -0
  74. package/src/agents/sre/modules/backend-diagnostics.md +481 -0
  75. package/src/agents/sre/modules/database-diagnostics.md +509 -0
  76. package/src/agents/sre/modules/infrastructure.md +561 -0
  77. package/src/agents/sre/modules/monitoring.md +439 -0
  78. package/src/agents/sre/modules/security-incidents.md +421 -0
  79. package/src/agents/sre/modules/ui-diagnostics.md +302 -0
  80. package/src/agents/sre/playbooks/01-high-cpu-usage.md +204 -0
  81. package/src/agents/sre/playbooks/02-database-deadlock.md +241 -0
  82. package/src/agents/sre/playbooks/03-memory-leak.md +252 -0
  83. package/src/agents/sre/playbooks/04-slow-api-response.md +269 -0
  84. package/src/agents/sre/playbooks/05-ddos-attack.md +293 -0
  85. package/src/agents/sre/playbooks/06-disk-full.md +314 -0
  86. package/src/agents/sre/playbooks/07-service-down.md +333 -0
  87. package/src/agents/sre/playbooks/08-data-corruption.md +337 -0
  88. package/src/agents/sre/playbooks/09-cascade-failure.md +430 -0
  89. package/src/agents/sre/playbooks/10-rate-limit-exceeded.md +464 -0
  90. package/src/agents/sre/scripts/health-check.sh +230 -0
  91. package/src/agents/sre/scripts/log-analyzer.py +213 -0
  92. package/src/agents/sre/scripts/metrics-collector.sh +294 -0
  93. package/src/agents/sre/scripts/trace-analyzer.js +257 -0
  94. package/src/agents/sre/templates/incident-report.md +249 -0
  95. package/src/agents/sre/templates/mitigation-plan.md +375 -0
  96. package/src/agents/sre/templates/post-mortem.md +418 -0
  97. package/src/agents/sre/templates/runbook-template.md +412 -0
  98. package/src/agents/tech-lead/AGENT.md +263 -0
  99. package/src/commands/add-tasks.md +176 -0
  100. package/src/commands/close-increment.md +347 -0
  101. package/src/commands/create-increment.md +223 -0
  102. package/src/commands/create-project.md +528 -0
  103. package/src/commands/generate-docs.md +623 -0
  104. package/src/commands/list-increments.md +180 -0
  105. package/src/commands/review-docs.md +331 -0
  106. package/src/commands/start-increment.md +139 -0
  107. package/src/commands/sync-github.md +115 -0
  108. package/src/commands/validate-increment.md +800 -0
  109. package/src/hooks/README.md +252 -0
  110. package/src/hooks/docs-changed.sh +59 -0
  111. package/src/hooks/human-input-required.sh +55 -0
  112. package/src/hooks/post-task-completion.sh +57 -0
  113. package/src/hooks/pre-implementation.sh +47 -0
  114. package/src/skills/ado-sync/README.md +449 -0
  115. package/src/skills/ado-sync/SKILL.md +245 -0
  116. package/src/skills/ado-sync/test-cases/test-1.yaml +9 -0
  117. package/src/skills/ado-sync/test-cases/test-2.yaml +8 -0
  118. package/src/skills/ado-sync/test-cases/test-3.yaml +9 -0
  119. package/src/skills/bmad-method-expert/SKILL.md +628 -0
  120. package/src/skills/bmad-method-expert/scripts/analyze-project.js +318 -0
  121. package/src/skills/bmad-method-expert/scripts/check-setup.js +208 -0
  122. package/src/skills/bmad-method-expert/scripts/generate-template.js +1149 -0
  123. package/src/skills/bmad-method-expert/scripts/validate-documents.js +340 -0
  124. package/src/skills/bmad-method-expert/test-cases/test-1-placeholder.yaml +12 -0
  125. package/src/skills/bmad-method-expert/test-cases/test-2-placeholder.yaml +12 -0
  126. package/src/skills/bmad-method-expert/test-cases/test-3-placeholder.yaml +12 -0
  127. package/src/skills/brownfield-analyzer/SKILL.md +523 -0
  128. package/src/skills/brownfield-analyzer/test-cases/test-1-basic-analysis.yaml +48 -0
  129. package/src/skills/brownfield-analyzer/test-cases/test-2-placeholder.yaml +12 -0
  130. package/src/skills/brownfield-analyzer/test-cases/test-3-placeholder.yaml +12 -0
  131. package/src/skills/brownfield-onboarder/SKILL.md +625 -0
  132. package/src/skills/brownfield-onboarder/test-cases/test-1-placeholder.yaml +12 -0
  133. package/src/skills/brownfield-onboarder/test-cases/test-2-placeholder.yaml +12 -0
  134. package/src/skills/brownfield-onboarder/test-cases/test-3-placeholder.yaml +12 -0
  135. package/src/skills/calendar-system/test-cases/test-1-placeholder.yaml +12 -0
  136. package/src/skills/calendar-system/test-cases/test-2-placeholder.yaml +12 -0
  137. package/src/skills/calendar-system/test-cases/test-3-placeholder.yaml +12 -0
  138. package/src/skills/context-loader/SKILL.md +734 -0
  139. package/src/skills/context-loader/test-cases/test-1-basic-loading.yaml +39 -0
  140. package/src/skills/context-loader/test-cases/test-2-token-budget-exceeded.yaml +44 -0
  141. package/src/skills/context-loader/test-cases/test-3-section-anchors.yaml +45 -0
  142. package/src/skills/context-optimizer/SKILL.md +618 -0
  143. package/src/skills/context-optimizer/test-cases/test-1-bug-fix-narrow.yaml +97 -0
  144. package/src/skills/context-optimizer/test-cases/test-2-feature-focused.yaml +109 -0
  145. package/src/skills/context-optimizer/test-cases/test-3-architecture-broad.yaml +98 -0
  146. package/src/skills/cost-optimizer/SKILL.md +190 -0
  147. package/src/skills/cost-optimizer/test-cases/test-1-basic-comparison.yaml +75 -0
  148. package/src/skills/cost-optimizer/test-cases/test-2-budget-constraint.yaml +52 -0
  149. package/src/skills/cost-optimizer/test-cases/test-3-scale-requirement.yaml +63 -0
  150. package/src/skills/cost-optimizer/test-results/README.md +46 -0
  151. package/src/skills/design-system-architect/SKILL.md +107 -0
  152. package/src/skills/design-system-architect/test-cases/test-1-token-structure.yaml +23 -0
  153. package/src/skills/design-system-architect/test-cases/test-2-component-hierarchy.yaml +24 -0
  154. package/src/skills/design-system-architect/test-cases/test-3-accessibility-checklist.yaml +23 -0
  155. package/src/skills/diagrams-architect/SKILL.md +763 -0
  156. package/src/skills/diagrams-generator/SKILL.md +25 -0
  157. package/src/skills/diagrams-generator/test-cases/test-1.yaml +9 -0
  158. package/src/skills/diagrams-generator/test-cases/test-2.yaml +9 -0
  159. package/src/skills/diagrams-generator/test-cases/test-3.yaml +8 -0
  160. package/src/skills/docs-updater/README.md +48 -0
  161. package/src/skills/docs-updater/test-cases/test-1-placeholder.yaml +12 -0
  162. package/src/skills/docs-updater/test-cases/test-2-placeholder.yaml +12 -0
  163. package/src/skills/docs-updater/test-cases/test-3-placeholder.yaml +12 -0
  164. package/src/skills/dotnet-backend/SKILL.md +250 -0
  165. package/src/skills/e2e-playwright/README.md +506 -0
  166. package/src/skills/e2e-playwright/SKILL.md +457 -0
  167. package/src/skills/e2e-playwright/execute.js +373 -0
  168. package/src/skills/e2e-playwright/lib/utils.js +514 -0
  169. package/src/skills/e2e-playwright/package.json +33 -0
  170. package/src/skills/e2e-playwright/test-cases/TC-001-basic-navigation.yaml +54 -0
  171. package/src/skills/e2e-playwright/test-cases/TC-002-form-interaction.yaml +64 -0
  172. package/src/skills/e2e-playwright/test-cases/TC-003-specweave-integration.yaml +74 -0
  173. package/src/skills/e2e-playwright/test-cases/TC-004-accessibility-check.yaml +98 -0
  174. package/src/skills/figma-designer/SKILL.md +149 -0
  175. package/src/skills/figma-implementer/SKILL.md +148 -0
  176. package/src/skills/figma-mcp-connector/SKILL.md +136 -0
  177. package/src/skills/figma-mcp-connector/test-cases/test-1-read-file-desktop.yaml +22 -0
  178. package/src/skills/figma-mcp-connector/test-cases/test-2-read-file-framelink.yaml +21 -0
  179. package/src/skills/figma-mcp-connector/test-cases/test-3-error-handling.yaml +18 -0
  180. package/src/skills/figma-to-code/SKILL.md +128 -0
  181. package/src/skills/figma-to-code/test-cases/test-1-token-generation.yaml +29 -0
  182. package/src/skills/figma-to-code/test-cases/test-2-component-generation.yaml +27 -0
  183. package/src/skills/figma-to-code/test-cases/test-3-typescript-generation.yaml +28 -0
  184. package/src/skills/frontend/SKILL.md +177 -0
  185. package/src/skills/github-sync/SKILL.md +252 -0
  186. package/src/skills/github-sync/test-cases/test-1-placeholder.yaml +12 -0
  187. package/src/skills/github-sync/test-cases/test-2-placeholder.yaml +12 -0
  188. package/src/skills/github-sync/test-cases/test-3-placeholder.yaml +12 -0
  189. package/src/skills/hetzner-provisioner/README.md +308 -0
  190. package/src/skills/hetzner-provisioner/SKILL.md +251 -0
  191. package/src/skills/hetzner-provisioner/test-cases/test-1-basic-provision.yaml +71 -0
  192. package/src/skills/hetzner-provisioner/test-cases/test-2-postgres-provision.yaml +85 -0
  193. package/src/skills/hetzner-provisioner/test-cases/test-3-ssl-config.yaml +126 -0
  194. package/src/skills/hetzner-provisioner/test-results/README.md +259 -0
  195. package/src/skills/increment-planner/SKILL.md +889 -0
  196. package/src/skills/increment-planner/scripts/feature-utils.js +250 -0
  197. package/src/skills/increment-planner/test-cases/test-1-basic-feature.yaml +27 -0
  198. package/src/skills/increment-planner/test-cases/test-2-complex-feature.yaml +30 -0
  199. package/src/skills/increment-planner/test-cases/test-3-auto-numbering.yaml +24 -0
  200. package/src/skills/increment-quality-judge/SKILL.md +566 -0
  201. package/src/skills/increment-quality-judge/test-cases/test-1-good-spec.yaml +95 -0
  202. package/src/skills/increment-quality-judge/test-cases/test-2-poor-spec.yaml +108 -0
  203. package/src/skills/increment-quality-judge/test-cases/test-3-export-suggestions.yaml +87 -0
  204. package/src/skills/jira-sync/README.md +328 -0
  205. package/src/skills/jira-sync/SKILL.md +209 -0
  206. package/src/skills/jira-sync/test-cases/test-1.yaml +9 -0
  207. package/src/skills/jira-sync/test-cases/test-2.yaml +9 -0
  208. package/src/skills/jira-sync/test-cases/test-3.yaml +10 -0
  209. package/src/skills/nextjs/SKILL.md +176 -0
  210. package/src/skills/nodejs-backend/SKILL.md +181 -0
  211. package/src/skills/notification-system/test-cases/test-1-placeholder.yaml +12 -0
  212. package/src/skills/notification-system/test-cases/test-2-placeholder.yaml +12 -0
  213. package/src/skills/notification-system/test-cases/test-3-placeholder.yaml +12 -0
  214. package/src/skills/python-backend/SKILL.md +226 -0
  215. package/src/skills/role-orchestrator/README.md +197 -0
  216. package/src/skills/role-orchestrator/SKILL.md +1184 -0
  217. package/src/skills/role-orchestrator/test-cases/test-1-simple-product.yaml +98 -0
  218. package/src/skills/role-orchestrator/test-cases/test-2-quality-gate-failure.yaml +73 -0
  219. package/src/skills/role-orchestrator/test-cases/test-3-security-workflow.yaml +121 -0
  220. package/src/skills/role-orchestrator/test-cases/test-4-parallel-execution.yaml +145 -0
  221. package/src/skills/role-orchestrator/test-cases/test-5-feedback-loops.yaml +149 -0
  222. package/src/skills/skill-creator/LICENSE.txt +202 -0
  223. package/src/skills/skill-creator/SKILL.md +209 -0
  224. package/src/skills/skill-creator/scripts/init_skill.py +303 -0
  225. package/src/skills/skill-creator/scripts/package_skill.py +110 -0
  226. package/src/skills/skill-creator/scripts/quick_validate.py +65 -0
  227. package/src/skills/skill-creator/test-cases/test-1-placeholder.yaml +12 -0
  228. package/src/skills/skill-creator/test-cases/test-2-placeholder.yaml +12 -0
  229. package/src/skills/skill-creator/test-cases/test-3-placeholder.yaml +12 -0
  230. package/src/skills/skill-router/SKILL.md +497 -0
  231. package/src/skills/skill-router/test-cases/test-1-basic-routing.yaml +33 -0
  232. package/src/skills/skill-router/test-cases/test-2-ambiguous-request.yaml +42 -0
  233. package/src/skills/skill-router/test-cases/test-3-nested-orchestration.yaml +50 -0
  234. package/src/skills/spec-driven-brainstorming/README.md +264 -0
  235. package/src/skills/spec-driven-brainstorming/SKILL.md +439 -0
  236. package/src/skills/spec-driven-brainstorming/test-cases/TC-001-simple-idea-to-design.yaml +148 -0
  237. package/src/skills/spec-driven-brainstorming/test-cases/TC-002-complex-ultrathink-design.yaml +190 -0
  238. package/src/skills/spec-driven-brainstorming/test-cases/TC-003-unclear-requirements-socratic.yaml +233 -0
  239. package/src/skills/spec-driven-debugging/README.md +479 -0
  240. package/src/skills/spec-driven-debugging/SKILL.md +652 -0
  241. package/src/skills/spec-driven-debugging/test-cases/TC-001-simple-auth-bug.yaml +212 -0
  242. package/src/skills/spec-driven-debugging/test-cases/TC-002-race-condition-ultrathink.yaml +461 -0
  243. package/src/skills/spec-driven-debugging/test-cases/TC-003-brownfield-missing-spec.yaml +366 -0
  244. package/src/skills/spec-kit-expert/SKILL.md +1012 -0
  245. package/src/skills/spec-kit-expert/test-cases/test-1-placeholder.yaml +12 -0
  246. package/src/skills/spec-kit-expert/test-cases/test-2-placeholder.yaml +12 -0
  247. package/src/skills/spec-kit-expert/test-cases/test-3-placeholder.yaml +12 -0
  248. package/src/skills/specweave-ado-mapper/SKILL.md +501 -0
  249. package/src/skills/specweave-detector/SKILL.md +420 -0
  250. package/src/skills/specweave-detector/test-cases/test-1-basic-detection.yaml +37 -0
  251. package/src/skills/specweave-detector/test-cases/test-2-missing-config.yaml +37 -0
  252. package/src/skills/specweave-detector/test-cases/test-3-non-specweave-project.yaml +34 -0
  253. package/src/skills/specweave-jira-mapper/SKILL.md +500 -0
  254. package/src/skills/stripe-integrator/test-cases/test-1-placeholder.yaml +12 -0
  255. package/src/skills/stripe-integrator/test-cases/test-2-placeholder.yaml +12 -0
  256. package/src/skills/stripe-integrator/test-cases/test-3-placeholder.yaml +12 -0
  257. package/src/skills/task-builder/README.md +90 -0
  258. package/src/skills/task-builder/test-cases/test-1-placeholder.yaml +12 -0
  259. package/src/skills/task-builder/test-cases/test-2-placeholder.yaml +12 -0
  260. package/src/skills/task-builder/test-cases/test-3-placeholder.yaml +12 -0
  261. package/src/templates/.env.example +144 -0
  262. package/src/templates/.gitignore.template +81 -0
  263. package/src/templates/CLAUDE.md.template +383 -0
  264. package/src/templates/README.md.template +240 -0
  265. package/src/templates/config.yaml +333 -0
  266. package/src/templates/docs/README.md +124 -0
  267. package/src/templates/docs/adr-template.md +118 -0
  268. package/src/templates/docs/hld-template.md +220 -0
  269. package/src/templates/docs/lld-template.md +580 -0
  270. package/src/templates/docs/prd-template.md +132 -0
  271. package/src/templates/docs/rfc-template.md +229 -0
  272. package/src/templates/docs/runbook-template.md +298 -0
  273. package/src/templates/environments/minimal/.env.production +16 -0
  274. package/src/templates/environments/minimal/README.md +54 -0
  275. package/src/templates/environments/minimal/deploy-production.yml +52 -0
  276. package/src/templates/environments/progressive/.env.qa +28 -0
  277. package/src/templates/environments/progressive/README.md +129 -0
  278. package/src/templates/environments/progressive/deploy-production.yml +93 -0
  279. package/src/templates/environments/progressive/deploy-qa.yml +62 -0
  280. package/src/templates/environments/progressive/deploy-staging.yml +67 -0
  281. package/src/templates/environments/standard/.env.development +20 -0
  282. package/src/templates/environments/standard/.env.production +30 -0
  283. package/src/templates/environments/standard/.env.staging +23 -0
  284. package/src/templates/environments/standard/README.md +97 -0
  285. package/src/templates/environments/standard/deploy-production.yml +68 -0
  286. package/src/templates/environments/standard/deploy-staging.yml +61 -0
  287. package/src/templates/environments/standard/docker-compose.yml +43 -0
  288. package/src/templates/increment-metadata-template.yaml +138 -0
@@ -0,0 +1,210 @@
1
+ /**
2
+ * GitHub Copilot Adapter
3
+ *
4
+ * Basic automation adapter for GitHub Copilot.
5
+ * Provides workspace instructions that Copilot reads for context and suggestions.
6
+ *
7
+ * Since GitHub Copilot has limited configuration (workspace instructions only),
8
+ * this adapter focuses on clear, structured guidance that Copilot can use
9
+ * to provide better code suggestions and completions.
10
+ */
11
+
12
+ import * as path from 'path';
13
+ import * as fs from 'fs-extra';
14
+ import { AdapterBase } from '../adapter-base';
15
+ import { AdapterOptions, AdapterFile } from '../adapter-interface';
16
+
17
+ export class CopilotAdapter extends AdapterBase {
18
+ name = 'copilot';
19
+ description = 'GitHub Copilot adapter - Basic automation with workspace instructions';
20
+ automationLevel = 'basic' as const;
21
+
22
+ /**
23
+ * Detect if GitHub Copilot is available
24
+ *
25
+ * Checks for:
26
+ * - .github/copilot/instructions.md exists
27
+ * - VS Code with Copilot extension
28
+ */
29
+ async detect(): Promise<boolean> {
30
+ const hasInstructions = await this.fileExists('.github/copilot/instructions.md');
31
+ const hasGitHubDir = await this.fileExists('.github');
32
+
33
+ // Check for VS Code Copilot extension (best effort)
34
+ // This is approximate - Copilot might be installed but we can't detect reliably
35
+ return hasInstructions || hasGitHubDir;
36
+ }
37
+
38
+ /**
39
+ * Get files to install for Copilot adapter
40
+ */
41
+ getFiles(): AdapterFile[] {
42
+ return [
43
+ {
44
+ sourcePath: '.github/copilot/instructions.md',
45
+ targetPath: '.github/copilot/instructions.md',
46
+ description: 'GitHub Copilot workspace instructions'
47
+ },
48
+ {
49
+ sourcePath: 'README.md',
50
+ targetPath: '.github/copilot/README.md',
51
+ description: 'Copilot adapter documentation'
52
+ }
53
+ ];
54
+ }
55
+
56
+ /**
57
+ * Install Copilot adapter
58
+ */
59
+ async install(options: AdapterOptions): Promise<void> {
60
+ console.log('\n📦 Installing GitHub Copilot Adapter (Basic Automation)\n');
61
+
62
+ // Ensure .github/copilot directory exists
63
+ const copilotDir = path.join(options.projectPath, '.github', 'copilot');
64
+ await fs.ensureDir(copilotDir);
65
+
66
+ // Copy files
67
+ await super.install(options);
68
+
69
+ console.log('\n✨ Copilot adapter installed!');
70
+ console.log('\n📋 Files created:');
71
+ console.log(' - .github/copilot/instructions.md (workspace guidance)');
72
+ }
73
+
74
+ /**
75
+ * Post-installation instructions
76
+ */
77
+ async postInstall(options: AdapterOptions): Promise<void> {
78
+ console.log(this.getInstructions());
79
+ }
80
+
81
+ /**
82
+ * Get usage instructions for Copilot adapter
83
+ */
84
+ getInstructions(): string {
85
+ return `
86
+ ================================================================
87
+ GitHub Copilot Adapter - Basic Automation
88
+ ================================================================
89
+
90
+ Your project is now configured for GitHub Copilot!
91
+
92
+ WHAT THIS PROVIDES:
93
+
94
+ - Workspace Instructions (.github/copilot/instructions.md)
95
+ - Project overview (SpecWeave framework)
96
+ - Workflow guidance (creating increments)
97
+ - Context manifest explanation
98
+ - File structure reference
99
+
100
+ - Better Code Suggestions
101
+ - Copilot reads workspace instructions
102
+ - Suggests code following SpecWeave patterns
103
+ - Understands project structure
104
+
105
+ UNDERSTANDING THE DIFFERENCE:
106
+
107
+ Claude Code (Full Automation):
108
+ - Native skills (auto-activate)
109
+ - Native agents (separate context windows)
110
+ - Native hooks (auto-update docs)
111
+ - Slash commands
112
+
113
+ Cursor (Semi-Automation):
114
+ - Simulated skills (.cursorrules)
115
+ - Simulated agents (manual roles)
116
+ - @ context shortcuts
117
+
118
+ Copilot (Basic Automation - This Adapter):
119
+ - Workspace instructions only
120
+ - Better code suggestions
121
+ - No skills, agents, hooks, or commands
122
+ - Manual workflow with AI assistance
123
+
124
+ HOW WE BRIDGE THE GAP:
125
+
126
+ GitHub Copilot doesn't support custom commands or complex
127
+ workflows. But it DOES read workspace instructions to provide
128
+ better code suggestions.
129
+
130
+ We provide clear instructions that teach Copilot about:
131
+ - SpecWeave structure (.specweave/ folders)
132
+ - File naming conventions (spec.md, plan.md, tasks.md)
133
+ - Context manifests (what files to reference)
134
+ - Best practices (technology-agnostic specs, etc.)
135
+
136
+ Result: Copilot suggests code that fits SpecWeave patterns!
137
+
138
+ HOW TO USE SPECWEAVE WITH COPILOT:
139
+
140
+ 1. Copilot reads workspace instructions automatically
141
+ - No action needed - just open project in VS Code
142
+ - Copilot will suggest code following SpecWeave patterns
143
+
144
+ 2. Create increments manually:
145
+
146
+ mkdir -p .specweave/increments/0001-user-auth
147
+
148
+ 3. Reference context manifests:
149
+ Open context-manifest.yaml
150
+ → Copilot sees which files are relevant
151
+ → Provides better suggestions
152
+
153
+ 4. Ask Copilot Chat for guidance:
154
+ "How do I create a spec.md following SpecWeave?"
155
+ "Generate plan.md for user authentication"
156
+ "What should go in context-manifest.yaml?"
157
+
158
+ 5. Use Copilot inline suggestions:
159
+ Start typing in spec.md → Copilot suggests content
160
+ Following SpecWeave patterns from instructions.md
161
+
162
+ WORKFLOW EXAMPLE:
163
+
164
+ Creating a Feature:
165
+
166
+ 1. Create increment folder:
167
+
168
+ mkdir -p .specweave/increments/0002-payments
169
+ cd .specweave/increments/0002-payments
170
+
171
+ 2. Create spec.md:
172
+ - Open file, start typing frontmatter
173
+ - Copilot suggests SpecWeave structure
174
+ - Fill in user stories, acceptance criteria
175
+
176
+ 3. Create plan.md:
177
+ - Reference spec.md (Copilot reads it)
178
+ - Start typing "# Technical Plan"
179
+ - Copilot suggests architecture sections
180
+
181
+ 4. Create context-manifest.yaml:
182
+ - Copilot suggests relevant files to include
183
+ - Lists spec sections and architecture docs
184
+
185
+ LIMITATIONS (vs Claude Code & Cursor):
186
+
187
+ - No auto-activation or workflows
188
+ - No skills, agents, hooks
189
+ - No slash commands or @ shortcuts
190
+ - No role-based assistance (PM, Architect, etc.)
191
+ - Completely manual workflow
192
+
193
+ But Copilot still provides helpful suggestions!
194
+ - Understands SpecWeave structure from instructions
195
+ - Suggests code following project patterns
196
+
197
+ DOCUMENTATION:
198
+
199
+ - SPECWEAVE.md: Complete development guide
200
+ - .github/copilot/instructions.md: Workspace instructions
201
+ - .github/copilot/README.md: Copilot adapter guide
202
+ - .specweave/docs/: Project documentation
203
+
204
+ You're ready to build with SpecWeave on GitHub Copilot!
205
+
206
+ Note: For better automation, consider Claude Code (full) or Cursor (semi).
207
+ Copilot is best for simple projects or when already using VS Code + Copilot.
208
+ `;
209
+ }
210
+ }
@@ -0,0 +1,62 @@
1
+ # @docs - Architecture Documentation Context
2
+
3
+ This file is loaded when you type `@docs` in Cursor.
4
+
5
+ ## What This Provides
6
+
7
+ Quick access to architecture documentation:
8
+ - System design (HLD)
9
+ - ADRs (Architecture Decision Records)
10
+ - Component diagrams (C4 Model)
11
+ - Data models (ER diagrams)
12
+
13
+ ## Usage
14
+
15
+ ```
16
+ @docs show me the system architecture
17
+ @docs what ADRs exist for authentication?
18
+ @docs explain the data model
19
+ ```
20
+
21
+ ## Files Loaded
22
+
23
+ When `@docs` is used, Cursor should load:
24
+
25
+ ```
26
+ .specweave/docs/internal/architecture/
27
+ ├── system-design.md # HLD
28
+ ├── adr/ # Architecture Decision Records
29
+ │ ├── 0001-tech-stack.md
30
+ │ ├── 0002-database-choice.md
31
+ │ └── ...
32
+ ├── diagrams/ # C4 diagrams
33
+ │ ├── system-context.mmd # C4 Level 1
34
+ │ ├── system-container.mmd # C4 Level 2
35
+ │ └── {module}/ # C4 Level 3 (component)
36
+ └── data-models/ # ER diagrams
37
+ └── schema.sql
38
+ ```
39
+
40
+ ## Context Precision
41
+
42
+ **Don't load everything!**
43
+
44
+ If working on specific module (e.g., authentication):
45
+ 1. Check context-manifest.yaml
46
+ 2. Load ONLY auth-related docs:
47
+ ```
48
+ .specweave/docs/internal/architecture/auth/
49
+ ├── design.md
50
+ ├── adr/0005-auth-method.md
51
+ └── diagrams/auth-flow.mmd
52
+ ```
53
+
54
+ ## Example Workflow
55
+
56
+ User: `@docs show authentication architecture`
57
+
58
+ You:
59
+ 1. Load .specweave/docs/internal/architecture/auth/
60
+ 2. Load ADRs related to auth (ADR-0005, ADR-0012)
61
+ 3. Load auth diagrams
62
+ 4. Summarize: "Authentication uses OAuth2 (ADR-0005), JWT tokens stored in httpOnly cookies (ADR-0012). See auth-flow.mmd for sequence diagram."
@@ -0,0 +1,71 @@
1
+ # @increments - Current Increment Context
2
+
3
+ This file is loaded when you type `@increments` in Cursor.
4
+
5
+ ## What This Provides
6
+
7
+ Quick access to the current increment's:
8
+ - spec.md (WHAT and WHY)
9
+ - plan.md (HOW)
10
+ - tasks.md (implementation steps)
11
+ - context-manifest.yaml (what context to load)
12
+
13
+ ## Usage
14
+
15
+ ```
16
+ @increments show me what we're working on
17
+ @increments what's the current task?
18
+ @increments load the spec for this feature
19
+ ```
20
+
21
+ ## Files Loaded
22
+
23
+ When `@increments` is used, Cursor should load:
24
+
25
+ 1. **Current increment folder** (most recent in-progress):
26
+ ```
27
+ .specweave/increments/####-feature-name/
28
+ ├── spec.md
29
+ ├── plan.md
30
+ ├── tasks.md
31
+ └── context-manifest.yaml
32
+ ```
33
+
34
+ 2. **How to find current increment**:
35
+ ```bash
36
+ # List all increments
37
+ ls -la .specweave/increments/
38
+
39
+ # Find in-progress increments
40
+ grep -r "status: in-progress" .specweave/increments/*/spec.md
41
+ ```
42
+
43
+ 3. **Load order**:
44
+ - context-manifest.yaml (to know what else to load)
45
+ - spec.md (business requirements)
46
+ - plan.md (technical design)
47
+ - tasks.md (current task status)
48
+
49
+ ## Context Manifest Critical
50
+
51
+ **ALWAYS read context-manifest.yaml first!**
52
+
53
+ It tells you which additional files to load:
54
+ ```yaml
55
+ spec_sections:
56
+ - .specweave/docs/internal/strategy/auth/spec.md
57
+ documentation:
58
+ - .specweave/docs/internal/architecture/auth-design.md
59
+ ```
60
+
61
+ Then load ONLY those files (70%+ token savings).
62
+
63
+ ## Example Workflow
64
+
65
+ User: `@increments what's the current feature?`
66
+
67
+ You:
68
+ 1. Find most recent in-progress increment
69
+ 2. Read spec.md → See it's user authentication
70
+ 3. Read tasks.md → See we're on T003 (OAuth2 implementation)
71
+ 4. Respond: "Working on user authentication (increment 0002). Currently on task T003: Implement OAuth2 flow."
@@ -0,0 +1,73 @@
1
+ # @strategy - Business Strategy Context
2
+
3
+ This file is loaded when you type `@strategy` in Cursor.
4
+
5
+ ## What This Provides
6
+
7
+ Quick access to business strategy documentation:
8
+ - Product vision and goals
9
+ - Business requirements (technology-agnostic)
10
+ - User stories and acceptance criteria
11
+ - PRDs (Product Requirements Documents)
12
+
13
+ ## Usage
14
+
15
+ ```
16
+ @strategy what's the product vision?
17
+ @strategy show me authentication requirements
18
+ @strategy what are the success criteria?
19
+ ```
20
+
21
+ ## Files Loaded
22
+
23
+ When `@strategy` is used, Cursor should load:
24
+
25
+ ```
26
+ .specweave/docs/internal/strategy/
27
+ ├── {module}/ # Module-specific strategy
28
+ │ ├── overview.md # Product vision
29
+ │ ├── requirements.md # FR/NFR (tech-agnostic)
30
+ │ ├── user-stories.md # All user stories
31
+ │ └── success-criteria.md # KPIs, metrics
32
+ ```
33
+
34
+ ## Context Precision
35
+
36
+ **Don't load everything!**
37
+
38
+ If working on authentication module:
39
+ 1. Load ONLY auth strategy:
40
+ ```
41
+ .specweave/docs/internal/strategy/auth/
42
+ ├── overview.md
43
+ ├── requirements.md
44
+ ├── user-stories.md
45
+ └── success-criteria.md
46
+ ```
47
+
48
+ ## Technology-Agnostic Requirements
49
+
50
+ **Critical**: Strategy docs are technology-agnostic (WHAT/WHY, not HOW).
51
+
52
+ **Good (technology-agnostic)**:
53
+ ```markdown
54
+ ## FR-001: User Authentication
55
+ Users must be able to securely authenticate with their email and password.
56
+ ```
57
+
58
+ **Bad (too technical)**:
59
+ ```markdown
60
+ ## FR-001: User Authentication
61
+ Users authenticate via JWT tokens stored in httpOnly cookies with bcrypt password hashing.
62
+ ```
63
+
64
+ The technical details go in architecture docs (@docs), not strategy.
65
+
66
+ ## Example Workflow
67
+
68
+ User: `@strategy what are the authentication requirements?`
69
+
70
+ You:
71
+ 1. Load .specweave/docs/internal/strategy/auth/requirements.md
72
+ 2. Read functional and non-functional requirements
73
+ 3. Summarize: "FR-001: Email/password auth. FR-002: Social login (Google, GitHub). NFR-001: < 2s login response time. NFR-002: 99.9% uptime."
@@ -0,0 +1,89 @@
1
+ # @tests - Test Strategy Context
2
+
3
+ This file is loaded when you type `@tests` in Cursor.
4
+
5
+ ## What This Provides
6
+
7
+ Quick access to test documentation:
8
+ - Test strategy (E2E, unit, integration)
9
+ - Test coverage matrix (TC-0001 → test files)
10
+ - Test cases (YAML format for skills)
11
+ - Acceptance criteria validation
12
+
13
+ ## Usage
14
+
15
+ ```
16
+ @tests show me test strategy
17
+ @tests what tests exist for authentication?
18
+ @tests map TC-0001 to test file
19
+ ```
20
+
21
+ ## Files Loaded
22
+
23
+ When `@tests` is used, Cursor should load:
24
+
25
+ ```
26
+ .specweave/increments/####-feature/tests.md # Test strategy
27
+ tests/ # Actual test code
28
+ ├── e2e/ # Playwright E2E tests
29
+ │ └── auth.spec.ts
30
+ ├── unit/ # Unit tests
31
+ │ └── auth-utils.test.ts
32
+ └── integration/ # Integration tests
33
+ └── auth-api.test.ts
34
+ ```
35
+
36
+ ## Test Coverage Matrix
37
+
38
+ **tests.md contains mapping: TC-0001 → test file**
39
+
40
+ Example:
41
+ ```markdown
42
+ | TC ID | Acceptance Criteria | Test Type | Location | Priority |
43
+ |---------|-------------------------|-----------|------------------------|----------|
44
+ | TC-0001 | Valid login redirects | E2E | tests/e2e/auth.spec.ts | P1 |
45
+ | TC-0002 | Invalid password errors | E2E | tests/e2e/auth.spec.ts | P1 |
46
+ ```
47
+
48
+ ## Four Levels of Test Cases
49
+
50
+ ### Level 1: Specification (TC-0001 in spec.md)
51
+ ```markdown
52
+ - [ ] **TC-0001**: Valid credentials → redirect to dashboard
53
+ ```
54
+
55
+ ### Level 2: Feature Test Strategy (tests.md)
56
+ Mapping TC-0001 to test implementation
57
+
58
+ ### Level 3: Skill Test Cases (for SpecWeave skills)
59
+ YAML format in src/skills/{name}/test-cases/
60
+
61
+ ### Level 4: Code Tests (Playwright, Jest, etc.)
62
+ ```typescript
63
+ test('TC-0001: Valid Login Flow', async ({ page }) => {
64
+ // Implementation
65
+ });
66
+ ```
67
+
68
+ ## Context Precision
69
+
70
+ **Load test strategy for current increment only**
71
+
72
+ If working on auth increment:
73
+ ```
74
+ .specweave/increments/0002-user-auth/tests.md
75
+ tests/e2e/auth.spec.ts
76
+ tests/unit/auth-utils.test.ts
77
+ ```
78
+
79
+ Don't load ALL tests from ALL increments.
80
+
81
+ ## Example Workflow
82
+
83
+ User: `@tests what's the test coverage for authentication?`
84
+
85
+ You:
86
+ 1. Load .specweave/increments/0002-user-auth/tests.md
87
+ 2. Read test coverage matrix
88
+ 3. Load referenced test files (auth.spec.ts)
89
+ 4. Summarize: "TC-0001 to TC-0008 covered. 8/8 E2E tests in auth.spec.ts. All P1 tests passing."