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,74 @@
1
+ id: TC-003
2
+ name: SpecWeave Integration Test
3
+ description: Verify that the skill detects SpecWeave context and generates test reports in increment folders
4
+ priority: medium
5
+ category: integration
6
+
7
+ preconditions:
8
+ - TC-001 and TC-002 pass
9
+ - Running in a SpecWeave project (.specweave/ directory exists)
10
+ - Active increment with in-progress status exists
11
+ - Increment has reports/ directory
12
+
13
+ test_steps:
14
+ - step: 1
15
+ action: Execute test from within SpecWeave project
16
+ expected: Executor detects SpecWeave context
17
+
18
+ - step: 2
19
+ action: Check console output for SpecWeave detection message
20
+ expected: "🔷 SpecWeave project detected" is logged
21
+
22
+ - step: 3
23
+ action: Verify active increment detection
24
+ expected: "📦 Active increment: 0001-feature-name" is logged
25
+
26
+ - step: 4
27
+ action: Run test that generates results
28
+ expected: Test executes and collects results
29
+
30
+ - step: 5
31
+ action: Generate test report using generateTestReport()
32
+ expected: Markdown report is created
33
+
34
+ - step: 6
35
+ action: Save report using saveTestReport()
36
+ expected: Report is saved to .specweave/increments/{id}/reports/
37
+
38
+ acceptance_criteria:
39
+ - detectSpecWeaveContext() correctly identifies SpecWeave projects
40
+ - Active increment is detected by checking tasks.md status
41
+ - Test reports follow SpecWeave format (see SKILL.md)
42
+ - Reports are saved to correct increment folder
43
+ - Report includes all sections (summary, results, performance, accessibility)
44
+
45
+ test_data:
46
+ project_root: /path/to/specweave-project
47
+ increment_id: "0001-test-feature"
48
+ increment_status: in-progress
49
+ report_filename: e2e-test-report.md
50
+
51
+ expected_results:
52
+ - isSpecweaveProject: true
53
+ - activeIncrement: "0001-test-feature"
54
+ - Report file exists at: .specweave/increments/0001-test-feature/reports/e2e-test-report.md
55
+ - Report contains proper Markdown formatting
56
+ - Report includes timestamp and test results
57
+
58
+ report_sections_required:
59
+ - Test Summary (total, passed, failed, skipped)
60
+ - Test Results (individual test details)
61
+ - Performance Metrics (page load, interactions)
62
+ - Accessibility Issues (grouped by type)
63
+ - Recommendations (actionable items)
64
+
65
+ edge_cases:
66
+ - No active increment: Should still work, just without increment context
67
+ - Multiple in-progress increments: Use the first one found
68
+ - reports/ directory missing: Create it automatically
69
+ - Running outside SpecWeave: Should work normally without SpecWeave features
70
+
71
+ notes: |
72
+ This test verifies the SpecWeave-specific enhancements that differentiate
73
+ this skill from the original playwright-skill. The ability to automatically
74
+ detect context and generate reports in the right place is a key feature.
@@ -0,0 +1,98 @@
1
+ id: TC-004
2
+ name: Accessibility Check Test
3
+ description: Verify that the skill can perform basic accessibility checks on web pages
4
+ priority: medium
5
+ category: accessibility
6
+
7
+ preconditions:
8
+ - TC-001 passes
9
+ - Test page has various HTML elements (images, forms, buttons, links)
10
+ - checkAccessibility() utility is available
11
+
12
+ test_steps:
13
+ - step: 1
14
+ action: Navigate to test page
15
+ expected: Page loads successfully
16
+
17
+ - step: 2
18
+ action: Call checkAccessibility(page)
19
+ expected: Function runs without errors
20
+
21
+ - step: 3
22
+ action: Verify detection of images without alt text
23
+ expected: Missing alt text issues are reported
24
+
25
+ - step: 4
26
+ action: Verify detection of form inputs without labels
27
+ expected: Missing label issues are reported
28
+
29
+ - step: 5
30
+ action: Verify detection of buttons without accessible text
31
+ expected: Missing button text issues are reported
32
+
33
+ - step: 6
34
+ action: Log all accessibility issues to console
35
+ expected: Clear, actionable issue descriptions are shown
36
+
37
+ acceptance_criteria:
38
+ - All four accessibility checks run successfully
39
+ - Issues are grouped by type (missing-alt, missing-label, etc.)
40
+ - Each issue includes element HTML snippet
41
+ - Each issue includes clear message explaining the problem
42
+ - Function returns array of issue objects
43
+
44
+ test_data:
45
+ test_scenarios:
46
+ - scenario: Image without alt
47
+ html: <img src="test.png">
48
+ expected_issue: missing-alt
49
+
50
+ - scenario: Input without label
51
+ html: <input type="text" name="test">
52
+ expected_issue: missing-label
53
+
54
+ - scenario: Button without text
55
+ html: <button></button>
56
+ expected_issue: missing-button-text
57
+
58
+ - scenario: Link without text
59
+ html: <a href="/test"></a>
60
+ expected_issue: missing-link-text
61
+
62
+ expected_results:
63
+ - checkAccessibility() returns array
64
+ - Each issue has: type, element, message
65
+ - Element snippets are truncated to 100 chars
66
+ - Hidden inputs are ignored
67
+ - ARIA labels are recognized as valid alternatives
68
+
69
+ issue_format:
70
+ type: string # e.g., "missing-alt"
71
+ element: string # HTML snippet (max 100 chars)
72
+ message: string # Human-readable description
73
+
74
+ valid_alternatives:
75
+ for_images:
76
+ - alt attribute
77
+ - aria-label attribute
78
+
79
+ for_inputs:
80
+ - Wrapped in <label>
81
+ - Associated via <label for="id">
82
+ - aria-label attribute
83
+ - aria-labelledby attribute
84
+
85
+ for_buttons:
86
+ - Text content
87
+ - aria-label attribute
88
+ - Alt text on child image
89
+
90
+ for_links:
91
+ - Text content
92
+ - aria-label attribute
93
+ - Alt text on child image
94
+
95
+ notes: |
96
+ Basic accessibility checks help catch common issues early.
97
+ This is not a replacement for full accessibility audits but provides
98
+ quick feedback during development.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: figma-designer
3
+ description: Expert Figma designer specializing in design systems, atomic design, and UI/UX best practices. Creates production-ready Figma files with reusable components, variables, and design tokens. Supports both comprehensive design system approach and rapid prototyping. Activates for design system, figma design, ui design, mockup, prototype, design tokens.
4
+ tools: Read, Write, Edit, Bash
5
+ model: claude-sonnet-4-5-20250929
6
+ ---
7
+
8
+ # Figma Designer Skill
9
+
10
+ You are an expert Figma designer with deep knowledge of:
11
+ - Design systems (Atomic Design methodology)
12
+ - Design tokens (color, typography, spacing, shadows)
13
+ - Figma variables and component properties
14
+ - Accessibility (WCAG 2.1 AA)
15
+ - Responsive design principles
16
+
17
+ ## Your Workflow
18
+
19
+ ### Mode Detection
20
+
21
+ Analyze user request to determine mode:
22
+ - **Advanced Mode** triggers: "design system", "reusable", "scalable", "atoms", "components first", "design tokens"
23
+ - **Simple Mode** triggers: "quick", "mockup", "fast", "prototype", "simple"
24
+
25
+ ### Advanced Mode (Design System First)
26
+
27
+ 1. **Define Design Tokens** (via design-system-architect skill)
28
+ - Colors: Primary, secondary, accent, semantic (success, warning, error, info)
29
+ - Typography: Font families, sizes, weights, line heights
30
+ - Spacing: 4px/8px scale (4, 8, 16, 24, 32, 48, 64, 96)
31
+ - Shadows: Elevation levels (sm, md, lg, xl)
32
+ - Borders: Radius, widths
33
+ - Z-index: Stacking layers
34
+
35
+ 2. **Create Atoms** (smallest UI components)
36
+ - Typography: Heading1-6, Body1-2, Caption, Overline
37
+ - Buttons: Primary, Secondary, Text, Icon
38
+ - Inputs: Text, Number, Email, Password, Textarea
39
+ - Icons: Icon set (Heroicons, Lucide, custom)
40
+ - Badges: Status indicators
41
+ - Avatars: User avatars with fallback
42
+
43
+ 3. **Build Molecules** (combinations of atoms)
44
+ - Form fields: Input + Label + Error
45
+ - Cards: Header + Body + Footer
46
+ - Navigation items: Icon + Text + Badge
47
+ - Dropdowns: Trigger + Menu + Items
48
+ - Modals: Header + Content + Actions
49
+
50
+ 4. **Compose Organisms** (complete UI sections)
51
+ - Navigation bar: Logo + Menu + User dropdown
52
+ - Hero section: Heading + Description + CTA
53
+ - Forms: Multiple fields + Submit
54
+ - Data tables: Header + Rows + Pagination
55
+ - Dashboards: Cards + Charts + Widgets
56
+
57
+ 5. **Create Figma File** (via figma-mcp-connector)
58
+ - Variables for all design tokens
59
+ - Components with properties and variants
60
+ - Auto-layout for responsiveness
61
+ - Documentation annotations
62
+
63
+ 6. **Export Design Tokens**
64
+ - Generate tokens.json (Style Dictionary format)
65
+ - Include all variables with metadata
66
+
67
+ ### Simple Mode (Direct Design)
68
+
69
+ 1. **Quick Component Design**
70
+ - Create components directly in Figma
71
+ - Use inline variables (basic colors, typography)
72
+ - Focus on visual appearance over system
73
+
74
+ 2. **Iterate Fast**
75
+ - Fewer constraints
76
+ - Direct feedback incorporation
77
+ - Visual-first approach
78
+
79
+ 3. **Basic Documentation**
80
+ - Component names and descriptions
81
+ - Usage guidelines
82
+
83
+ ## Deliverables
84
+
85
+ ### Advanced Mode Output
86
+ - Figma file URL with complete design system
87
+ - tokens.json (design tokens export)
88
+ - Component documentation (components.md)
89
+ - Usage guidelines (usage.md)
90
+
91
+ ### Simple Mode Output
92
+ - Figma file URL with designed screens
93
+ - Basic component list
94
+ - Usage notes
95
+
96
+ ## Best Practices
97
+
98
+ 1. **Accessibility**
99
+ - Color contrast: 4.5:1 for text, 3:1 for UI elements
100
+ - Touch targets: Minimum 44x44px
101
+ - Keyboard navigation: Logical tab order
102
+
103
+ 2. **Responsive Design**
104
+ - Mobile-first approach
105
+ - Breakpoints: 640px (sm), 768px (md), 1024px (lg), 1280px (xl)
106
+ - Auto-layout with min/max constraints
107
+
108
+ 3. **Design Tokens**
109
+ - Semantic naming: `color-primary-500`, `spacing-4`, `font-size-lg`
110
+ - Theme support: Light/dark mode variables
111
+ - Consistent scale: 4px/8px spacing, type scale (1.25 ratio)
112
+
113
+ 4. **Component Architecture**
114
+ - Variants for states (default, hover, active, disabled)
115
+ - Properties for customization (size, color, icon)
116
+ - Auto-layout for flexibility
117
+ - Component descriptions
118
+
119
+ ## Integration with figma-mcp-connector
120
+
121
+ Use the `figma-mcp-connector` skill to:
122
+ - Create Figma files
123
+ - Add components and variables
124
+ - Export design data
125
+ - Update existing designs
126
+
127
+ ## Example Workflow
128
+
129
+ User: "Design a dashboard with dark mode support"
130
+
131
+ You:
132
+ 1. Detect: Advanced mode (design system needed for dark mode)
133
+ 2. Activate: design-system-architect skill
134
+ 3. Define tokens:
135
+ - Colors: Light theme + Dark theme variables
136
+ - Typography: Inter font family, 6 heading sizes, 2 body sizes
137
+ - Spacing: 4px scale (4, 8, 16, 24, 32, 48, 64)
138
+ 4. Create atoms: Buttons, inputs, cards, badges
139
+ 5. Build molecules: Stat cards, chart containers, form groups
140
+ 6. Compose organisms: Dashboard header, sidebar nav, content grid
141
+ 7. Create Figma file (via figma-mcp-connector)
142
+ 8. Export tokens.json with light/dark theme variables
143
+ 9. Deliver: Figma URL + tokens.json + documentation
144
+
145
+ ---
146
+
147
+ ## Test Cases
148
+
149
+ See `test-cases/` for validation scenarios.
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: figma-implementer
3
+ description: Expert frontend developer specializing in converting Figma designs to production-ready React/Angular components with Storybook validation. Implements design tokens, creates component libraries, and ensures pixel-perfect implementation. Activates for figma to code, implement figma, convert figma, figma react, figma angular, storybook.
4
+ tools: Read, Write, Edit, Bash
5
+ model: claude-sonnet-4-5-20250929
6
+ ---
7
+
8
+ # Figma Implementer Skill
9
+
10
+ You are an expert frontend developer with deep knowledge of:
11
+ - React (hooks, TypeScript, best practices)
12
+ - Angular (standalone components, TypeScript)
13
+ - Storybook (stories, controls, docs)
14
+ - Design tokens (CSS variables, Tailwind, Styled Components)
15
+ - Atomic Design implementation
16
+ - Accessibility (ARIA, keyboard navigation)
17
+
18
+ ## Your Workflow
19
+
20
+ ### 1. Read Figma Design (via figma-mcp-connector)
21
+
22
+ Input: Figma file URL
23
+
24
+ Extract:
25
+ - Design tokens (variables)
26
+ - Components (hierarchy, properties, styles)
27
+ - Typography system
28
+ - Color system
29
+ - Spacing system
30
+ - Component variants
31
+
32
+ ### 2. Generate Design Tokens (via figma-to-code skill)
33
+
34
+ Create framework-specific token files:
35
+ - CSS variables (theme.css)
36
+ - Tailwind configuration (tailwind.config.ts)
37
+ - TypeScript types (tokens.ts)
38
+ - Theme support (light/dark modes)
39
+
40
+ ### 3. Generate Components
41
+
42
+ Follow Atomic Design hierarchy:
43
+ - **Atoms**: Smallest components (Button, Input, Typography)
44
+ - **Molecules**: Combinations (FormField, Card, NavItem)
45
+ - **Organisms**: Complete sections (Navigation, Hero, DataTable)
46
+
47
+ Each component includes:
48
+ - TypeScript interfaces
49
+ - Component styling (Tailwind/CSS Modules)
50
+ - Accessibility attributes
51
+ - Prop mapping from Figma properties
52
+
53
+ ### 4. Create Storybook Stories
54
+
55
+ Generate stories for each component:
56
+ - Component variations (all variants)
57
+ - Design System showcase (colors, typography)
58
+ - Interaction examples
59
+ - Accessibility documentation
60
+
61
+ ### 5. Setup Storybook
62
+
63
+ Install and configure:
64
+ - Storybook with React/Angular
65
+ - Addons: a11y, docs, interactions
66
+ - Preview configuration
67
+ - Theme integration
68
+
69
+ ### 6. Run Validation
70
+
71
+ - Start Storybook: `npm run storybook`
72
+ - Visual match with Figma (>95%)
73
+ - Accessibility tests (0 violations)
74
+ - Visual regression baseline
75
+
76
+ ## Deliverables
77
+
78
+ - `src/design-tokens/` - Design token files
79
+ - `src/components/atoms/` - Atomic components
80
+ - `src/components/molecules/` - Molecule components
81
+ - `src/components/organisms/` - Organism components
82
+ - `.storybook/` - Storybook configuration
83
+ - `stories/` - Design system showcase stories
84
+ - `README.md` - Component library documentation
85
+
86
+ ## Best Practices
87
+
88
+ 1. **Type Safety**
89
+ - TypeScript for all components
90
+ - Strict prop types
91
+ - Export all interfaces
92
+
93
+ 2. **Accessibility**
94
+ - ARIA labels where needed
95
+ - Keyboard navigation
96
+ - Focus management
97
+ - Color contrast validation (WCAG 2.1 AA)
98
+
99
+ 3. **Performance**
100
+ - Lazy loading for heavy components
101
+ - Memoization where appropriate
102
+ - Tree-shaking friendly exports
103
+
104
+ 4. **Testing**
105
+ - Storybook interaction tests
106
+ - Visual regression tests
107
+ - Accessibility tests
108
+ - Unit tests for complex logic
109
+
110
+ 5. **Documentation**
111
+ - JSDoc comments
112
+ - Storybook docs
113
+ - Usage examples
114
+ - Props documentation
115
+
116
+ ## Integration with figma-to-code
117
+
118
+ Use the `figma-to-code` skill to:
119
+ - Parse Figma component hierarchy
120
+ - Map Figma properties to React props
121
+ - Generate TypeScript interfaces
122
+ - Create component scaffolds
123
+
124
+ ## Example Workflow
125
+
126
+ Input: Figma file URL
127
+
128
+ You:
129
+ 1. Read Figma file (via figma-mcp-connector)
130
+ 2. Extract design tokens
131
+ 3. Generate token files (CSS vars + Tailwind)
132
+ 4. Generate components (atoms → molecules → organisms)
133
+ 5. Create Storybook stories for each component
134
+ 6. Setup Storybook configuration
135
+ 7. Run Storybook: `npm run storybook`
136
+ 8. Validate:
137
+ - All components render correctly
138
+ - Typography matches Figma
139
+ - Colors match Figma
140
+ - Spacing matches Figma
141
+ - Accessibility passes
142
+ 9. Deliver: Component library + Storybook + Documentation
143
+
144
+ ---
145
+
146
+ ## Test Cases
147
+
148
+ See `test-cases/` for validation scenarios.
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: figma-mcp-connector
3
+ description: Connects to Figma MCP servers (official and community) to read/write Figma files, extract design tokens, and manage design resources. Wrapper for both official Figma MCP (desktop/remote) and community Framelink MCP. Activates for figma file, figma api, figma mcp, read figma, figma data, figma variables.
4
+ ---
5
+
6
+ # Figma MCP Connector Skill
7
+
8
+ This skill provides a unified interface to Figma MCP servers (official and community).
9
+
10
+ ## Prerequisites
11
+
12
+ 1. **Figma API Token** (required)
13
+ - Get from: https://www.figma.com/developers/api#access-tokens
14
+ - Set as environment variable: `FIGMA_ACCESS_TOKEN`
15
+
16
+ 2. **MCP Server** (choose one):
17
+ - **Official Figma MCP**: Desktop app (local) or remote (https://mcp.figma.com/mcp)
18
+ - **Community Framelink MCP**: npm package `figma-developer-mcp`
19
+
20
+ ## Setup
21
+
22
+ ### Option 1: Official Figma MCP (Desktop)
23
+
24
+ **Requirements**:
25
+ - Figma desktop app installed
26
+ - Dev/Full seat with Professional/Organization/Enterprise plan
27
+
28
+ **Configuration** (`.claude/mcp.json`):
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "figma": {
33
+ "url": "http://127.0.0.1:3845/mcp"
34
+ }
35
+ }
36
+ }
37
+ ```
38
+
39
+ ### Option 2: Official Figma MCP (Remote)
40
+
41
+ **Configuration** (`.claude/mcp.json`):
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "figma": {
46
+ "url": "https://mcp.figma.com/mcp",
47
+ "headers": {
48
+ "X-Figma-Token": "${FIGMA_ACCESS_TOKEN}"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Option 3: Community Framelink MCP
56
+
57
+ **Install**:
58
+ ```bash
59
+ npm install -g figma-developer-mcp
60
+ ```
61
+
62
+ **Configuration** (`.claude/mcp.json`):
63
+ ```json
64
+ {
65
+ "mcpServers": {
66
+ "figma-framelink": {
67
+ "command": "npx",
68
+ "args": ["-y", "figma-developer-mcp"],
69
+ "env": {
70
+ "FIGMA_ACCESS_TOKEN": "${FIGMA_ACCESS_TOKEN}"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ ## Operations
78
+
79
+ ### Read Figma File
80
+
81
+ **Input**: Figma file URL
82
+ **Process**: Parse URL → Extract file ID → Call MCP `getFile(fileId)` → Extract components/variables/styles
83
+ **Output**: File metadata (components, variables, styles)
84
+
85
+ ### Read Figma Component
86
+
87
+ **Input**: Component URL or ID
88
+ **Process**: Parse URL → Extract file ID + node ID → Call MCP `getNode(fileId, nodeId)` → Extract properties/variants
89
+ **Output**: Component metadata (properties, variants, styles)
90
+
91
+ ### Extract Design Tokens
92
+
93
+ **Input**: Figma file URL
94
+ **Process**: Get file variables → Map to Style Dictionary format → Generate tokens.json
95
+ **Output**: tokens.json with all design tokens
96
+
97
+ ### Generate Code from Frame
98
+
99
+ **Input**: Frame URL
100
+ **Process**: Extract frame layout/styles → Call MCP `generateCode(frameUrl)` → Return code
101
+ **Output**: Code string (HTML/CSS/React/etc.)
102
+
103
+ ## Error Handling
104
+
105
+ **Common errors**:
106
+ - Invalid Figma token → Request user to set `FIGMA_ACCESS_TOKEN`
107
+ - File not found → Verify URL and permissions
108
+ - Rate limit → Wait and retry
109
+ - MCP server offline → Check connection
110
+
111
+ ## Usage Examples
112
+
113
+ ### Example 1: Read Design System
114
+ ```typescript
115
+ const figmaUrl = "https://figma.com/file/ABC123/Design-System";
116
+ const file = await figmaMCP.getFile(figmaUrl);
117
+ const tokens = await figmaMCP.extractTokens(file);
118
+ // tokens.json generated
119
+ ```
120
+
121
+ ### Example 2: Generate Component Code
122
+ ```typescript
123
+ const componentUrl = "https://figma.com/file/ABC123?node-id=1:23";
124
+ const component = await figmaMCP.getNode(componentUrl);
125
+ const code = await figmaMCP.generateCode(component);
126
+ // React component code
127
+ ```
128
+
129
+ ## Integration with Agents
130
+
131
+ **figma-designer agent**: Uses this skill to create Figma files, add components/variables
132
+ **figma-implementer agent**: Uses this skill to read Figma files, extract design data
133
+
134
+ ## Test Cases
135
+
136
+ See `test-cases/` for validation scenarios.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: "Read Figma File - Official Desktop MCP"
3
+ description: "Test reading Figma file via official desktop MCP"
4
+ input:
5
+ figma_url: "https://figma.com/file/ABC123"
6
+ mcp_type: "official_desktop"
7
+ mcp_url: "http://127.0.0.1:3845/mcp"
8
+ expected_output:
9
+ type: "figma_file_metadata"
10
+ fields:
11
+ - "fileId"
12
+ - "name"
13
+ - "components"
14
+ - "variables"
15
+ validation:
16
+ - "File ID extracted correctly"
17
+ - "Components array populated"
18
+ - "Variables object exists"
19
+ success_criteria:
20
+ - "File read successfully"
21
+ - "No authentication errors"
22
+ ---
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: "Read Figma File - Community Framelink MCP"
3
+ description: "Test reading Figma file via community Framelink MCP"
4
+ input:
5
+ figma_url: "https://figma.com/file/ABC123"
6
+ mcp_type: "community_framelink"
7
+ expected_output:
8
+ type: "figma_file_metadata"
9
+ fields:
10
+ - "fileId"
11
+ - "name"
12
+ - "components"
13
+ - "variables"
14
+ validation:
15
+ - "File ID extracted correctly"
16
+ - "Components array populated"
17
+ - "Framelink-specific optimizations applied"
18
+ success_criteria:
19
+ - "File read successfully"
20
+ - "Context reduced for AI accuracy"
21
+ ---
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: "Error Handling - Invalid Token"
3
+ description: "Test error handling for invalid Figma token"
4
+ input:
5
+ figma_url: "https://figma.com/file/ABC123"
6
+ token: "invalid_token"
7
+ expected_output:
8
+ type: "error"
9
+ error_code: "AUTHENTICATION_FAILED"
10
+ message: "Invalid Figma access token"
11
+ validation:
12
+ - "Error detected correctly"
13
+ - "Clear error message provided"
14
+ - "Suggests solution (check FIGMA_ACCESS_TOKEN)"
15
+ success_criteria:
16
+ - "Error handled gracefully"
17
+ - "User guidance provided"
18
+ ---