gv-specwright 1.0.2__tar.gz

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 (483) hide show
  1. gv_specwright-1.0.2/.claude/skills/sw-context/SKILL.md +65 -0
  2. gv_specwright-1.0.2/.claude/skills/sw-new/SKILL.md +77 -0
  3. gv_specwright-1.0.2/.claude/skills/sw-plan/SKILL.md +92 -0
  4. gv_specwright-1.0.2/.claude/skills/sw-review/SKILL.md +67 -0
  5. gv_specwright-1.0.2/.claude/skills/sw-status/SKILL.md +92 -0
  6. gv_specwright-1.0.2/.claude/skills/sw-task/SKILL.md +123 -0
  7. gv_specwright-1.0.2/.claude/skills/sw-update/SKILL.md +86 -0
  8. gv_specwright-1.0.2/.claude/skills/sw-verify/SKILL.md +89 -0
  9. gv_specwright-1.0.2/.dockerignore +38 -0
  10. gv_specwright-1.0.2/.env.example +31 -0
  11. gv_specwright-1.0.2/.github/ISSUE_TEMPLATE/task.yml +29 -0
  12. gv_specwright-1.0.2/.github/workflows/ci.yml +43 -0
  13. gv_specwright-1.0.2/.github/workflows/claude-code-review.yml +65 -0
  14. gv_specwright-1.0.2/.github/workflows/deploy.yml +120 -0
  15. gv_specwright-1.0.2/.github/workflows/docs.yml +38 -0
  16. gv_specwright-1.0.2/.github/workflows/publish.yml +58 -0
  17. gv_specwright-1.0.2/.gitignore +60 -0
  18. gv_specwright-1.0.2/.mcp.json +15 -0
  19. gv_specwright-1.0.2/.python-version +1 -0
  20. gv_specwright-1.0.2/CHANGELOG.md +23 -0
  21. gv_specwright-1.0.2/Dockerfile +69 -0
  22. gv_specwright-1.0.2/Dockerfile.dev +24 -0
  23. gv_specwright-1.0.2/Makefile +136 -0
  24. gv_specwright-1.0.2/PKG-INFO +192 -0
  25. gv_specwright-1.0.2/README.md +149 -0
  26. gv_specwright-1.0.2/SPECWRIGHT.yaml +10 -0
  27. gv_specwright-1.0.2/action/action.yml +76 -0
  28. gv_specwright-1.0.2/chart/specwright/.helmignore +2 -0
  29. gv_specwright-1.0.2/chart/specwright/Chart.yaml +13 -0
  30. gv_specwright-1.0.2/chart/specwright/templates/NOTES.txt +22 -0
  31. gv_specwright-1.0.2/chart/specwright/templates/_helpers.tpl +160 -0
  32. gv_specwright-1.0.2/chart/specwright/templates/configmap.yaml +15 -0
  33. gv_specwright-1.0.2/chart/specwright/templates/cronjob-coverage-snapshot.yaml +56 -0
  34. gv_specwright-1.0.2/chart/specwright/templates/cronjob-reindex.yaml +54 -0
  35. gv_specwright-1.0.2/chart/specwright/templates/cronjob-stale-check.yaml +56 -0
  36. gv_specwright-1.0.2/chart/specwright/templates/cronjob.yaml +64 -0
  37. gv_specwright-1.0.2/chart/specwright/templates/deployment.yaml +96 -0
  38. gv_specwright-1.0.2/chart/specwright/templates/hpa.yaml +22 -0
  39. gv_specwright-1.0.2/chart/specwright/templates/ingress.yaml +33 -0
  40. gv_specwright-1.0.2/chart/specwright/templates/networkpolicy.yaml +21 -0
  41. gv_specwright-1.0.2/chart/specwright/templates/pdb.yaml +13 -0
  42. gv_specwright-1.0.2/chart/specwright/templates/secret.yaml +104 -0
  43. gv_specwright-1.0.2/chart/specwright/templates/service.yaml +15 -0
  44. gv_specwright-1.0.2/chart/specwright/templates/serviceaccount.yaml +12 -0
  45. gv_specwright-1.0.2/chart/specwright/templates/tests/test-connection.yaml +15 -0
  46. gv_specwright-1.0.2/chart/specwright/values-dev.yaml +59 -0
  47. gv_specwright-1.0.2/chart/specwright/values-production.yaml +50 -0
  48. gv_specwright-1.0.2/chart/specwright/values.yaml +231 -0
  49. gv_specwright-1.0.2/devspace.yaml +142 -0
  50. gv_specwright-1.0.2/docs/agent-behavior.md +335 -0
  51. gv_specwright-1.0.2/docs/examples/auth-migration.md +68 -0
  52. gv_specwright-1.0.2/docs/examples/payments-overhaul.md +123 -0
  53. gv_specwright-1.0.2/docs/self-hosting.md +452 -0
  54. gv_specwright-1.0.2/docs/specs/_template.md +55 -0
  55. gv_specwright-1.0.2/docs/specs/auth-hardening.md +341 -0
  56. gv_specwright-1.0.2/docs/specs/developer-docs-site.md +535 -0
  57. gv_specwright-1.0.2/docs/specs/integration-testing.md +72 -0
  58. gv_specwright-1.0.2/docs/specs/marketing-site-revamp.md +359 -0
  59. gv_specwright-1.0.2/docs/specs/observability.md +57 -0
  60. gv_specwright-1.0.2/docs/specs/pr-comment-enhancements.md +75 -0
  61. gv_specwright-1.0.2/docs/specs/security-vulnerabilities.md +85 -0
  62. gv_specwright-1.0.2/docs/specs/slack-integration.md +93 -0
  63. gv_specwright-1.0.2/docs/specs/spec-explorer-web-app.md +208 -0
  64. gv_specwright-1.0.2/docs/specs/spec-review-workflow.md +85 -0
  65. gv_specwright-1.0.2/docs/specs/theme-toggle-light-mode.md +86 -0
  66. gv_specwright-1.0.2/docs/specs/ticket-mapping-model.md +463 -0
  67. gv_specwright-1.0.2/docs/specs/ticket-sync-enhancements.md +105 -0
  68. gv_specwright-1.0.2/docs/specs/user-profile-page.md +105 -0
  69. gv_specwright-1.0.2/docs/vision.md +540 -0
  70. gv_specwright-1.0.2/docs-site/.vitepress/config.ts +134 -0
  71. gv_specwright-1.0.2/docs-site/.vitepress/theme/custom.css +114 -0
  72. gv_specwright-1.0.2/docs-site/.vitepress/theme/index.ts +7 -0
  73. gv_specwright-1.0.2/docs-site/architecture/components.md +135 -0
  74. gv_specwright-1.0.2/docs-site/architecture/data-flow.md +127 -0
  75. gv_specwright-1.0.2/docs-site/architecture/index.md +53 -0
  76. gv_specwright-1.0.2/docs-site/architecture/system-design.md +137 -0
  77. gv_specwright-1.0.2/docs-site/concepts/agent-mesh.md +117 -0
  78. gv_specwright-1.0.2/docs-site/concepts/coverage.md +90 -0
  79. gv_specwright-1.0.2/docs-site/concepts/delta-tracking.md +99 -0
  80. gv_specwright-1.0.2/docs-site/concepts/index.md +31 -0
  81. gv_specwright-1.0.2/docs-site/concepts/living-specs.md +107 -0
  82. gv_specwright-1.0.2/docs-site/concepts/openspec.md +106 -0
  83. gv_specwright-1.0.2/docs-site/contributing/code-style.md +84 -0
  84. gv_specwright-1.0.2/docs-site/contributing/development.md +143 -0
  85. gv_specwright-1.0.2/docs-site/contributing/index.md +9 -0
  86. gv_specwright-1.0.2/docs-site/contributing/testing.md +123 -0
  87. gv_specwright-1.0.2/docs-site/getting-started/configuration.md +161 -0
  88. gv_specwright-1.0.2/docs-site/getting-started/index.md +36 -0
  89. gv_specwright-1.0.2/docs-site/getting-started/installation.md +108 -0
  90. gv_specwright-1.0.2/docs-site/getting-started/quickstart.md +115 -0
  91. gv_specwright-1.0.2/docs-site/guides/ci-integration.md +126 -0
  92. gv_specwright-1.0.2/docs-site/guides/github-app.md +78 -0
  93. gv_specwright-1.0.2/docs-site/guides/index.md +17 -0
  94. gv_specwright-1.0.2/docs-site/guides/self-hosting.md +230 -0
  95. gv_specwright-1.0.2/docs-site/guides/ticket-sync.md +173 -0
  96. gv_specwright-1.0.2/docs-site/guides/writing-specs.md +220 -0
  97. gv_specwright-1.0.2/docs-site/index.md +35 -0
  98. gv_specwright-1.0.2/docs-site/package-lock.json +3923 -0
  99. gv_specwright-1.0.2/docs-site/package.json +17 -0
  100. gv_specwright-1.0.2/docs-site/public/fonts/inter-latin.woff2 +0 -0
  101. gv_specwright-1.0.2/docs-site/public/fonts/jetbrains-mono-latin.woff2 +0 -0
  102. gv_specwright-1.0.2/docs-site/public/fonts/space-grotesk-latin.woff2 +0 -0
  103. gv_specwright-1.0.2/docs-site/public/logo.svg +6 -0
  104. gv_specwright-1.0.2/docs-site/reference/api.md +77 -0
  105. gv_specwright-1.0.2/docs-site/reference/cli.md +101 -0
  106. gv_specwright-1.0.2/docs-site/reference/config.md +223 -0
  107. gv_specwright-1.0.2/docs-site/reference/index.md +15 -0
  108. gv_specwright-1.0.2/docs-site/reference/mcp.md +170 -0
  109. gv_specwright-1.0.2/docs-site/reference/skills.md +128 -0
  110. gv_specwright-1.0.2/docs-site/reference/spec-format.md +195 -0
  111. gv_specwright-1.0.2/frontend/.gitignore +3 -0
  112. gv_specwright-1.0.2/frontend/env.d.ts +31 -0
  113. gv_specwright-1.0.2/frontend/eslint.config.js +49 -0
  114. gv_specwright-1.0.2/frontend/index.html +23 -0
  115. gv_specwright-1.0.2/frontend/package-lock.json +4356 -0
  116. gv_specwright-1.0.2/frontend/package.json +42 -0
  117. gv_specwright-1.0.2/frontend/src/App.vue +24 -0
  118. gv_specwright-1.0.2/frontend/src/api/admin.ts +10 -0
  119. gv_specwright-1.0.2/frontend/src/api/client.ts +126 -0
  120. gv_specwright-1.0.2/frontend/src/api/coverage.ts +10 -0
  121. gv_specwright-1.0.2/frontend/src/api/dashboard.ts +10 -0
  122. gv_specwright-1.0.2/frontend/src/api/docs.ts +6 -0
  123. gv_specwright-1.0.2/frontend/src/api/editor.ts +164 -0
  124. gv_specwright-1.0.2/frontend/src/api/profile.ts +6 -0
  125. gv_specwright-1.0.2/frontend/src/api/repos.ts +6 -0
  126. gv_specwright-1.0.2/frontend/src/api/search.ts +20 -0
  127. gv_specwright-1.0.2/frontend/src/api/session.ts +6 -0
  128. gv_specwright-1.0.2/frontend/src/api/specs.ts +6 -0
  129. gv_specwright-1.0.2/frontend/src/api/tasks.ts +13 -0
  130. gv_specwright-1.0.2/frontend/src/api/types.ts +395 -0
  131. gv_specwright-1.0.2/frontend/src/components/admin/IndexingDashboard.vue +105 -0
  132. gv_specwright-1.0.2/frontend/src/components/common/ConfirmDialog.vue +36 -0
  133. gv_specwright-1.0.2/frontend/src/components/common/EmptyState.vue +23 -0
  134. gv_specwright-1.0.2/frontend/src/components/common/LoadingSpinner.vue +8 -0
  135. gv_specwright-1.0.2/frontend/src/components/common/StatusBadge.vue +26 -0
  136. gv_specwright-1.0.2/frontend/src/components/dashboard/FilterBar.vue +31 -0
  137. gv_specwright-1.0.2/frontend/src/components/dashboard/OrgDashboard.vue +72 -0
  138. gv_specwright-1.0.2/frontend/src/components/dashboard/RepoCard.vue +20 -0
  139. gv_specwright-1.0.2/frontend/src/components/dashboard/SpecList.vue +74 -0
  140. gv_specwright-1.0.2/frontend/src/components/doc/DocDetail.vue +26 -0
  141. gv_specwright-1.0.2/frontend/src/components/editor/ACItem.vue +97 -0
  142. gv_specwright-1.0.2/frontend/src/components/editor/AcceptanceCriteria.vue +97 -0
  143. gv_specwright-1.0.2/frontend/src/components/editor/AiDiffReview.vue +146 -0
  144. gv_specwright-1.0.2/frontend/src/components/editor/AiDiffToolbar.vue +48 -0
  145. gv_specwright-1.0.2/frontend/src/components/editor/AiSpecGenerator.vue +98 -0
  146. gv_specwright-1.0.2/frontend/src/components/editor/ConflictModal.vue +59 -0
  147. gv_specwright-1.0.2/frontend/src/components/editor/EditorLayout.vue +542 -0
  148. gv_specwright-1.0.2/frontend/src/components/editor/EditorList.vue +38 -0
  149. gv_specwright-1.0.2/frontend/src/components/editor/EditorToolbar.vue +171 -0
  150. gv_specwright-1.0.2/frontend/src/components/editor/FrontmatterForm.vue +242 -0
  151. gv_specwright-1.0.2/frontend/src/components/editor/MarkdownPreview.vue +139 -0
  152. gv_specwright-1.0.2/frontend/src/components/editor/MonacoEditor.vue +54 -0
  153. gv_specwright-1.0.2/frontend/src/components/editor/PreviewPane.vue +17 -0
  154. gv_specwright-1.0.2/frontend/src/components/editor/SaveDialog.vue +168 -0
  155. gv_specwright-1.0.2/frontend/src/components/editor/SectionAiActions.vue +179 -0
  156. gv_specwright-1.0.2/frontend/src/components/editor/SectionCard.vue +267 -0
  157. gv_specwright-1.0.2/frontend/src/components/editor/SourceModeAi.vue +158 -0
  158. gv_specwright-1.0.2/frontend/src/components/editor/StructuredEditor.vue +111 -0
  159. gv_specwright-1.0.2/frontend/src/components/layout/AppFooter.vue +10 -0
  160. gv_specwright-1.0.2/frontend/src/components/layout/AppNav.vue +68 -0
  161. gv_specwright-1.0.2/frontend/src/components/layout/Breadcrumb.vue +18 -0
  162. gv_specwright-1.0.2/frontend/src/components/layout/MobileMenu.vue +48 -0
  163. gv_specwright-1.0.2/frontend/src/components/layout/OrgSwitcher.vue +22 -0
  164. gv_specwright-1.0.2/frontend/src/components/layout/SearchBar.vue +66 -0
  165. gv_specwright-1.0.2/frontend/src/components/layout/SearchResults.vue +45 -0
  166. gv_specwright-1.0.2/frontend/src/components/layout/ThemeToggle.vue +41 -0
  167. gv_specwright-1.0.2/frontend/src/components/marketing/CapabilitiesGrid.vue +58 -0
  168. gv_specwright-1.0.2/frontend/src/components/marketing/CliShowcase.vue +84 -0
  169. gv_specwright-1.0.2/frontend/src/components/marketing/CtaSection.vue +43 -0
  170. gv_specwright-1.0.2/frontend/src/components/marketing/FeedbackLoop.vue +61 -0
  171. gv_specwright-1.0.2/frontend/src/components/marketing/HeroSection.vue +52 -0
  172. gv_specwright-1.0.2/frontend/src/components/marketing/IntegrationsGrid.vue +47 -0
  173. gv_specwright-1.0.2/frontend/src/components/marketing/InteractiveDemo.vue +157 -0
  174. gv_specwright-1.0.2/frontend/src/components/marketing/MarketingFooter.vue +17 -0
  175. gv_specwright-1.0.2/frontend/src/components/marketing/MarketingNav.vue +94 -0
  176. gv_specwright-1.0.2/frontend/src/components/marketing/PricingSection.vue +155 -0
  177. gv_specwright-1.0.2/frontend/src/components/marketing/ProblemSolution.vue +55 -0
  178. gv_specwright-1.0.2/frontend/src/components/marketing/ProductMockup.vue +269 -0
  179. gv_specwright-1.0.2/frontend/src/components/marketing/SetupSteps.vue +38 -0
  180. gv_specwright-1.0.2/frontend/src/components/marketing/TerminalMockup.vue +21 -0
  181. gv_specwright-1.0.2/frontend/src/components/profile/ProfileCard.vue +175 -0
  182. gv_specwright-1.0.2/frontend/src/components/repo/DocCard.vue +26 -0
  183. gv_specwright-1.0.2/frontend/src/components/repo/RepoDetail.vue +78 -0
  184. gv_specwright-1.0.2/frontend/src/components/repo/SpecCard.vue +49 -0
  185. gv_specwright-1.0.2/frontend/src/components/spec/SpecContent.vue +13 -0
  186. gv_specwright-1.0.2/frontend/src/components/spec/SpecDetail.vue +23 -0
  187. gv_specwright-1.0.2/frontend/src/components/spec/SpecHeader.vue +55 -0
  188. gv_specwright-1.0.2/frontend/src/components/welcome/WelcomeChecklist.vue +90 -0
  189. gv_specwright-1.0.2/frontend/src/composables/useClickOutside.ts +15 -0
  190. gv_specwright-1.0.2/frontend/src/composables/useKeyboardShortcuts.ts +27 -0
  191. gv_specwright-1.0.2/frontend/src/composables/usePostHog.ts +56 -0
  192. gv_specwright-1.0.2/frontend/src/composables/useResizablePane.ts +65 -0
  193. gv_specwright-1.0.2/frontend/src/composables/useSearch.ts +49 -0
  194. gv_specwright-1.0.2/frontend/src/composables/useTheme.ts +8 -0
  195. gv_specwright-1.0.2/frontend/src/main.ts +38 -0
  196. gv_specwright-1.0.2/frontend/src/router/guards.ts +31 -0
  197. gv_specwright-1.0.2/frontend/src/router/index.ts +123 -0
  198. gv_specwright-1.0.2/frontend/src/stores/auth.ts +54 -0
  199. gv_specwright-1.0.2/frontend/src/stores/editor.ts +93 -0
  200. gv_specwright-1.0.2/frontend/src/stores/theme.ts +47 -0
  201. gv_specwright-1.0.2/frontend/src/style.css +174 -0
  202. gv_specwright-1.0.2/frontend/src/utils/status.ts +29 -0
  203. gv_specwright-1.0.2/frontend/src/views/AdminIndexingView.vue +27 -0
  204. gv_specwright-1.0.2/frontend/src/views/ChangelogView.vue +68 -0
  205. gv_specwright-1.0.2/frontend/src/views/DashboardView.vue +30 -0
  206. gv_specwright-1.0.2/frontend/src/views/DocView.vue +33 -0
  207. gv_specwright-1.0.2/frontend/src/views/DocsView.vue +65 -0
  208. gv_specwright-1.0.2/frontend/src/views/EditorView.vue +128 -0
  209. gv_specwright-1.0.2/frontend/src/views/LandingView.vue +64 -0
  210. gv_specwright-1.0.2/frontend/src/views/LoginView.vue +128 -0
  211. gv_specwright-1.0.2/frontend/src/views/ProfileView.vue +30 -0
  212. gv_specwright-1.0.2/frontend/src/views/RepoView.vue +30 -0
  213. gv_specwright-1.0.2/frontend/src/views/SearchView.vue +254 -0
  214. gv_specwright-1.0.2/frontend/src/views/SpecView.vue +43 -0
  215. gv_specwright-1.0.2/frontend/src/views/TasksView.vue +160 -0
  216. gv_specwright-1.0.2/frontend/src/views/WelcomeView.vue +22 -0
  217. gv_specwright-1.0.2/frontend/tsconfig.json +23 -0
  218. gv_specwright-1.0.2/frontend/vite.config.ts +53 -0
  219. gv_specwright-1.0.2/github-app-manifest.json +23 -0
  220. gv_specwright-1.0.2/plugin/.claude-plugin/marketplace.json +12 -0
  221. gv_specwright-1.0.2/plugin/.claude-plugin/plugin.json +13 -0
  222. gv_specwright-1.0.2/plugin/.mcp.json +8 -0
  223. gv_specwright-1.0.2/plugin/README.md +90 -0
  224. gv_specwright-1.0.2/plugin/settings.json +8 -0
  225. gv_specwright-1.0.2/plugin/skills/sw-context/SKILL.md +65 -0
  226. gv_specwright-1.0.2/plugin/skills/sw-new/SKILL.md +77 -0
  227. gv_specwright-1.0.2/plugin/skills/sw-plan/SKILL.md +92 -0
  228. gv_specwright-1.0.2/plugin/skills/sw-review/SKILL.md +67 -0
  229. gv_specwright-1.0.2/plugin/skills/sw-status/SKILL.md +92 -0
  230. gv_specwright-1.0.2/plugin/skills/sw-task/SKILL.md +123 -0
  231. gv_specwright-1.0.2/plugin/skills/sw-update/SKILL.md +86 -0
  232. gv_specwright-1.0.2/plugin/skills/sw-verify/SKILL.md +89 -0
  233. gv_specwright-1.0.2/pyproject.toml +85 -0
  234. gv_specwright-1.0.2/ruff.toml +10 -0
  235. gv_specwright-1.0.2/scripts/setup-github-app.sh +45 -0
  236. gv_specwright-1.0.2/src/specwright/__init__.py +1 -0
  237. gv_specwright-1.0.2/src/specwright/agent/__init__.py +1 -0
  238. gv_specwright-1.0.2/src/specwright/agent/analyzer.py +400 -0
  239. gv_specwright-1.0.2/src/specwright/agent/client.py +75 -0
  240. gv_specwright-1.0.2/src/specwright/agent/prompts.py +255 -0
  241. gv_specwright-1.0.2/src/specwright/agent/spec_editor.py +145 -0
  242. gv_specwright-1.0.2/src/specwright/agent/spec_generator.py +148 -0
  243. gv_specwright-1.0.2/src/specwright/analytics.py +113 -0
  244. gv_specwright-1.0.2/src/specwright/auth/__init__.py +0 -0
  245. gv_specwright-1.0.2/src/specwright/auth/api_key_routes.py +124 -0
  246. gv_specwright-1.0.2/src/specwright/auth/deps.py +177 -0
  247. gv_specwright-1.0.2/src/specwright/auth/device_routes.py +190 -0
  248. gv_specwright-1.0.2/src/specwright/auth/github_oauth.py +66 -0
  249. gv_specwright-1.0.2/src/specwright/auth/github_routes.py +79 -0
  250. gv_specwright-1.0.2/src/specwright/auth/jwt.py +84 -0
  251. gv_specwright-1.0.2/src/specwright/auth/middleware.py +129 -0
  252. gv_specwright-1.0.2/src/specwright/auth/models.py +62 -0
  253. gv_specwright-1.0.2/src/specwright/auth/oauth.py +26 -0
  254. gv_specwright-1.0.2/src/specwright/auth/permissions.py +49 -0
  255. gv_specwright-1.0.2/src/specwright/auth/refresh_routes.py +162 -0
  256. gv_specwright-1.0.2/src/specwright/auth/routes.py +184 -0
  257. gv_specwright-1.0.2/src/specwright/cli/__init__.py +98 -0
  258. gv_specwright-1.0.2/src/specwright/cli/_credentials.py +47 -0
  259. gv_specwright-1.0.2/src/specwright/cli/_local.py +265 -0
  260. gv_specwright-1.0.2/src/specwright/cli/_platform.py +97 -0
  261. gv_specwright-1.0.2/src/specwright/cli/auth_cmd.py +53 -0
  262. gv_specwright-1.0.2/src/specwright/cli/done.py +106 -0
  263. gv_specwright-1.0.2/src/specwright/cli/login.py +131 -0
  264. gv_specwright-1.0.2/src/specwright/cli/logout.py +27 -0
  265. gv_specwright-1.0.2/src/specwright/cli/plan.py +101 -0
  266. gv_specwright-1.0.2/src/specwright/cli/setup_cmd.py +279 -0
  267. gv_specwright-1.0.2/src/specwright/cli/start.py +148 -0
  268. gv_specwright-1.0.2/src/specwright/cli/status_cmd.py +107 -0
  269. gv_specwright-1.0.2/src/specwright/cli/sync_cmd.py +125 -0
  270. gv_specwright-1.0.2/src/specwright/cli/tasks.py +71 -0
  271. gv_specwright-1.0.2/src/specwright/cli/verify.py +212 -0
  272. gv_specwright-1.0.2/src/specwright/config/__init__.py +19 -0
  273. gv_specwright-1.0.2/src/specwright/config/merge.py +42 -0
  274. gv_specwright-1.0.2/src/specwright/config/parse.py +412 -0
  275. gv_specwright-1.0.2/src/specwright/cron/__init__.py +1 -0
  276. gv_specwright-1.0.2/src/specwright/cron/__main__.py +5 -0
  277. gv_specwright-1.0.2/src/specwright/cron/cleanup_keys.py +61 -0
  278. gv_specwright-1.0.2/src/specwright/cron/cleanup_sessions.py +61 -0
  279. gv_specwright-1.0.2/src/specwright/cron/coverage_snapshot.py +153 -0
  280. gv_specwright-1.0.2/src/specwright/cron/stale_check.py +164 -0
  281. gv_specwright-1.0.2/src/specwright/cron/sync_status.py +187 -0
  282. gv_specwright-1.0.2/src/specwright/db/__init__.py +20 -0
  283. gv_specwright-1.0.2/src/specwright/db/agent_store.py +490 -0
  284. gv_specwright-1.0.2/src/specwright/db/pool.py +15 -0
  285. gv_specwright-1.0.2/src/specwright/db/registry.py +293 -0
  286. gv_specwright-1.0.2/src/specwright/db/schema.py +68 -0
  287. gv_specwright-1.0.2/src/specwright/db/schema.sql +102 -0
  288. gv_specwright-1.0.2/src/specwright/db/schema_agent.sql +51 -0
  289. gv_specwright-1.0.2/src/specwright/db/schema_bm25.sql +17 -0
  290. gv_specwright-1.0.2/src/specwright/db/schema_coverage.sql +27 -0
  291. gv_specwright-1.0.2/src/specwright/db/schema_installations.sql +46 -0
  292. gv_specwright-1.0.2/src/specwright/db/schema_users.sql +44 -0
  293. gv_specwright-1.0.2/src/specwright/db/session_store.py +154 -0
  294. gv_specwright-1.0.2/src/specwright/db/user_store.py +198 -0
  295. gv_specwright-1.0.2/src/specwright/github/__init__.py +1 -0
  296. gv_specwright-1.0.2/src/specwright/github/client.py +529 -0
  297. gv_specwright-1.0.2/src/specwright/github/handlers/__init__.py +26 -0
  298. gv_specwright-1.0.2/src/specwright/github/handlers/on_installation.py +111 -0
  299. gv_specwright-1.0.2/src/specwright/github/handlers/on_installation_repos.py +85 -0
  300. gv_specwright-1.0.2/src/specwright/github/handlers/on_issue_comment.py +225 -0
  301. gv_specwright-1.0.2/src/specwright/github/handlers/on_issues.py +21 -0
  302. gv_specwright-1.0.2/src/specwright/github/handlers/on_pull_request.py +385 -0
  303. gv_specwright-1.0.2/src/specwright/github/handlers/on_pull_request_merged.py +270 -0
  304. gv_specwright-1.0.2/src/specwright/github/handlers/on_push.py +360 -0
  305. gv_specwright-1.0.2/src/specwright/github/handlers/onboarding.py +246 -0
  306. gv_specwright-1.0.2/src/specwright/github/spec_utils.py +256 -0
  307. gv_specwright-1.0.2/src/specwright/github/user_client.py +139 -0
  308. gv_specwright-1.0.2/src/specwright/github/verify.py +33 -0
  309. gv_specwright-1.0.2/src/specwright/main.py +396 -0
  310. gv_specwright-1.0.2/src/specwright/mcp/__init__.py +3 -0
  311. gv_specwright-1.0.2/src/specwright/mcp/__main__.py +114 -0
  312. gv_specwright-1.0.2/src/specwright/mcp/auth.py +58 -0
  313. gv_specwright-1.0.2/src/specwright/mcp/deps.py +22 -0
  314. gv_specwright-1.0.2/src/specwright/mcp/server.py +732 -0
  315. gv_specwright-1.0.2/src/specwright/otel_logging.py +94 -0
  316. gv_specwright-1.0.2/src/specwright/parser/__init__.py +52 -0
  317. gv_specwright-1.0.2/src/specwright/parser/classify.py +28 -0
  318. gv_specwright-1.0.2/src/specwright/parser/models.py +142 -0
  319. gv_specwright-1.0.2/src/specwright/parser/parse.py +519 -0
  320. gv_specwright-1.0.2/src/specwright/parser/templates/adr.md +30 -0
  321. gv_specwright-1.0.2/src/specwright/parser/templates/design.md +48 -0
  322. gv_specwright-1.0.2/src/specwright/parser/templates/proposal.md +34 -0
  323. gv_specwright-1.0.2/src/specwright/parser/templates/spec.md +32 -0
  324. gv_specwright-1.0.2/src/specwright/parser/templates.py +35 -0
  325. gv_specwright-1.0.2/src/specwright/parser/writer.py +255 -0
  326. gv_specwright-1.0.2/src/specwright/plugin_data/__init__.py +3 -0
  327. gv_specwright-1.0.2/src/specwright/search/__init__.py +17 -0
  328. gv_specwright-1.0.2/src/specwright/search/background.py +262 -0
  329. gv_specwright-1.0.2/src/specwright/search/embed.py +108 -0
  330. gv_specwright-1.0.2/src/specwright/search/index.py +643 -0
  331. gv_specwright-1.0.2/src/specwright/search/indexer.py +124 -0
  332. gv_specwright-1.0.2/src/specwright/search/reindex.py +145 -0
  333. gv_specwright-1.0.2/src/specwright/settings.py +91 -0
  334. gv_specwright-1.0.2/src/specwright/setup.py +210 -0
  335. gv_specwright-1.0.2/src/specwright/stale/__init__.py +1 -0
  336. gv_specwright-1.0.2/src/specwright/stale/detector.py +111 -0
  337. gv_specwright-1.0.2/src/specwright/stale/issue_reporter.py +132 -0
  338. gv_specwright-1.0.2/src/specwright/sync/__init__.py +1 -0
  339. gv_specwright-1.0.2/src/specwright/sync/adapters/__init__.py +1 -0
  340. gv_specwright-1.0.2/src/specwright/sync/adapters/base.py +40 -0
  341. gv_specwright-1.0.2/src/specwright/sync/adapters/factory.py +153 -0
  342. gv_specwright-1.0.2/src/specwright/sync/adapters/github_issues.py +150 -0
  343. gv_specwright-1.0.2/src/specwright/sync/adapters/jira.py +245 -0
  344. gv_specwright-1.0.2/src/specwright/sync/adapters/linear.py +186 -0
  345. gv_specwright-1.0.2/src/specwright/sync/engine.py +155 -0
  346. gv_specwright-1.0.2/src/specwright/sync/field_resolver.py +99 -0
  347. gv_specwright-1.0.2/src/specwright/sync/hierarchy.py +45 -0
  348. gv_specwright-1.0.2/src/specwright/sync/mapping.py +340 -0
  349. gv_specwright-1.0.2/src/specwright/sync/models.py +85 -0
  350. gv_specwright-1.0.2/src/specwright/sync/router.py +71 -0
  351. gv_specwright-1.0.2/src/specwright/sync/status_map.py +214 -0
  352. gv_specwright-1.0.2/src/specwright/sync/templates.py +133 -0
  353. gv_specwright-1.0.2/src/specwright/web/__init__.py +1 -0
  354. gv_specwright-1.0.2/src/specwright/web/cache.py +48 -0
  355. gv_specwright-1.0.2/src/specwright/web/editor_routes.py +834 -0
  356. gv_specwright-1.0.2/src/specwright/web/models.py +242 -0
  357. gv_specwright-1.0.2/src/specwright/web/profile_routes.py +68 -0
  358. gv_specwright-1.0.2/src/specwright/web/render.py +177 -0
  359. gv_specwright-1.0.2/src/specwright/web/routes.py +897 -0
  360. gv_specwright-1.0.2/src/specwright/web/services.py +1034 -0
  361. gv_specwright-1.0.2/src/specwright/web/spec_template.py +39 -0
  362. gv_specwright-1.0.2/static/brand.css +164 -0
  363. gv_specwright-1.0.2/static/editor.js +674 -0
  364. gv_specwright-1.0.2/static/screenshots/dashboard.png +0 -0
  365. gv_specwright-1.0.2/static/screenshots/search.png +0 -0
  366. gv_specwright-1.0.2/static/screenshots/spec-detail.png +0 -0
  367. gv_specwright-1.0.2/static/style.css +97 -0
  368. gv_specwright-1.0.2/templates/admin/indexing.html +153 -0
  369. gv_specwright-1.0.2/templates/base.html +222 -0
  370. gv_specwright-1.0.2/templates/dashboard.html +97 -0
  371. gv_specwright-1.0.2/templates/doc.html +33 -0
  372. gv_specwright-1.0.2/templates/editor.html +193 -0
  373. gv_specwright-1.0.2/templates/landing.html +1247 -0
  374. gv_specwright-1.0.2/templates/partials/editor_preview.html +1 -0
  375. gv_specwright-1.0.2/templates/partials/empty_state.html +12 -0
  376. gv_specwright-1.0.2/templates/partials/search_results.html +49 -0
  377. gv_specwright-1.0.2/templates/partials/spec_list.html +70 -0
  378. gv_specwright-1.0.2/templates/repo.html +105 -0
  379. gv_specwright-1.0.2/templates/spec.html +66 -0
  380. gv_specwright-1.0.2/templates/welcome.html +106 -0
  381. gv_specwright-1.0.2/tests/__init__.py +0 -0
  382. gv_specwright-1.0.2/tests/conftest.py +25 -0
  383. gv_specwright-1.0.2/tests/test_agent/__init__.py +0 -0
  384. gv_specwright-1.0.2/tests/test_agent/test_analyzer.py +774 -0
  385. gv_specwright-1.0.2/tests/test_agent/test_client.py +31 -0
  386. gv_specwright-1.0.2/tests/test_agent/test_prompts.py +311 -0
  387. gv_specwright-1.0.2/tests/test_agent/test_spec_editor.py +300 -0
  388. gv_specwright-1.0.2/tests/test_analytics.py +168 -0
  389. gv_specwright-1.0.2/tests/test_auth/__init__.py +0 -0
  390. gv_specwright-1.0.2/tests/test_auth/test_api_key_routes.py +228 -0
  391. gv_specwright-1.0.2/tests/test_auth/test_api_keys.py +26 -0
  392. gv_specwright-1.0.2/tests/test_auth/test_deps.py +236 -0
  393. gv_specwright-1.0.2/tests/test_auth/test_device_routes.py +196 -0
  394. gv_specwright-1.0.2/tests/test_auth/test_github_oauth.py +58 -0
  395. gv_specwright-1.0.2/tests/test_auth/test_middleware.py +290 -0
  396. gv_specwright-1.0.2/tests/test_auth/test_models.py +68 -0
  397. gv_specwright-1.0.2/tests/test_auth/test_permissions.py +63 -0
  398. gv_specwright-1.0.2/tests/test_auth/test_refresh_routes.py +196 -0
  399. gv_specwright-1.0.2/tests/test_auth/test_routes.py +419 -0
  400. gv_specwright-1.0.2/tests/test_cli/__init__.py +0 -0
  401. gv_specwright-1.0.2/tests/test_cli/test_auth_commands.py +119 -0
  402. gv_specwright-1.0.2/tests/test_cli/test_credentials.py +118 -0
  403. gv_specwright-1.0.2/tests/test_cli/test_done.py +92 -0
  404. gv_specwright-1.0.2/tests/test_cli/test_local.py +231 -0
  405. gv_specwright-1.0.2/tests/test_cli/test_plan.py +103 -0
  406. gv_specwright-1.0.2/tests/test_cli/test_platform_client.py +161 -0
  407. gv_specwright-1.0.2/tests/test_cli/test_setup_cmd.py +252 -0
  408. gv_specwright-1.0.2/tests/test_cli/test_skills_content.py +94 -0
  409. gv_specwright-1.0.2/tests/test_cli/test_start.py +91 -0
  410. gv_specwright-1.0.2/tests/test_cli/test_status_cmd.py +82 -0
  411. gv_specwright-1.0.2/tests/test_cli/test_sync_cmd.py +91 -0
  412. gv_specwright-1.0.2/tests/test_cli/test_tasks.py +102 -0
  413. gv_specwright-1.0.2/tests/test_cli/test_verify.py +123 -0
  414. gv_specwright-1.0.2/tests/test_config/__init__.py +0 -0
  415. gv_specwright-1.0.2/tests/test_config/test_merge.py +101 -0
  416. gv_specwright-1.0.2/tests/test_config/test_parse.py +299 -0
  417. gv_specwright-1.0.2/tests/test_config/test_ticket_mapping_config.py +339 -0
  418. gv_specwright-1.0.2/tests/test_cron/__init__.py +0 -0
  419. gv_specwright-1.0.2/tests/test_cron/test_cleanup_keys.py +40 -0
  420. gv_specwright-1.0.2/tests/test_cron/test_cleanup_sessions.py +40 -0
  421. gv_specwright-1.0.2/tests/test_cron/test_coverage_snapshot.py +35 -0
  422. gv_specwright-1.0.2/tests/test_cron/test_stale_check.py +35 -0
  423. gv_specwright-1.0.2/tests/test_db/__init__.py +0 -0
  424. gv_specwright-1.0.2/tests/test_db/test_agent_store.py +367 -0
  425. gv_specwright-1.0.2/tests/test_db/test_pool.py +37 -0
  426. gv_specwright-1.0.2/tests/test_db/test_registry.py +252 -0
  427. gv_specwright-1.0.2/tests/test_db/test_schema.py +126 -0
  428. gv_specwright-1.0.2/tests/test_db/test_session_store.py +234 -0
  429. gv_specwright-1.0.2/tests/test_db/test_user_store.py +242 -0
  430. gv_specwright-1.0.2/tests/test_github/__init__.py +0 -0
  431. gv_specwright-1.0.2/tests/test_github/test_client.py +176 -0
  432. gv_specwright-1.0.2/tests/test_github/test_on_installation.py +119 -0
  433. gv_specwright-1.0.2/tests/test_github/test_on_installation_repos.py +56 -0
  434. gv_specwright-1.0.2/tests/test_github/test_on_pr_merged.py +537 -0
  435. gv_specwright-1.0.2/tests/test_github/test_on_pull_request.py +326 -0
  436. gv_specwright-1.0.2/tests/test_github/test_onboarding.py +335 -0
  437. gv_specwright-1.0.2/tests/test_github/test_review_workflow.py +180 -0
  438. gv_specwright-1.0.2/tests/test_github/test_spec_utils.py +169 -0
  439. gv_specwright-1.0.2/tests/test_github/test_user_client.py +239 -0
  440. gv_specwright-1.0.2/tests/test_mcp/__init__.py +0 -0
  441. gv_specwright-1.0.2/tests/test_mcp/test_http.py +175 -0
  442. gv_specwright-1.0.2/tests/test_mcp/test_tools.py +598 -0
  443. gv_specwright-1.0.2/tests/test_mcp/test_write_tools.py +410 -0
  444. gv_specwright-1.0.2/tests/test_otel_logging.py +206 -0
  445. gv_specwright-1.0.2/tests/test_parser/__init__.py +0 -0
  446. gv_specwright-1.0.2/tests/test_parser/test_classify.py +45 -0
  447. gv_specwright-1.0.2/tests/test_parser/test_delta.py +279 -0
  448. gv_specwright-1.0.2/tests/test_parser/test_parse.py +694 -0
  449. gv_specwright-1.0.2/tests/test_parser/test_scenarios.py +230 -0
  450. gv_specwright-1.0.2/tests/test_parser/test_templates.py +57 -0
  451. gv_specwright-1.0.2/tests/test_parser/test_writer.py +288 -0
  452. gv_specwright-1.0.2/tests/test_parser/test_writer_frontmatter.py +93 -0
  453. gv_specwright-1.0.2/tests/test_search/__init__.py +0 -0
  454. gv_specwright-1.0.2/tests/test_search/test_background.py +188 -0
  455. gv_specwright-1.0.2/tests/test_search/test_embed.py +199 -0
  456. gv_specwright-1.0.2/tests/test_search/test_index.py +528 -0
  457. gv_specwright-1.0.2/tests/test_search/test_indexer.py +291 -0
  458. gv_specwright-1.0.2/tests/test_search/test_reindex.py +237 -0
  459. gv_specwright-1.0.2/tests/test_setup.py +165 -0
  460. gv_specwright-1.0.2/tests/test_stale/__init__.py +0 -0
  461. gv_specwright-1.0.2/tests/test_stale/test_detector.py +91 -0
  462. gv_specwright-1.0.2/tests/test_stale/test_issue_reporter.py +107 -0
  463. gv_specwright-1.0.2/tests/test_sync/__init__.py +0 -0
  464. gv_specwright-1.0.2/tests/test_sync/test_backward_compat.py +103 -0
  465. gv_specwright-1.0.2/tests/test_sync/test_configurable_status_map.py +107 -0
  466. gv_specwright-1.0.2/tests/test_sync/test_engine.py +222 -0
  467. gv_specwright-1.0.2/tests/test_sync/test_factory_config.py +129 -0
  468. gv_specwright-1.0.2/tests/test_sync/test_field_resolver.py +111 -0
  469. gv_specwright-1.0.2/tests/test_sync/test_github.py +146 -0
  470. gv_specwright-1.0.2/tests/test_sync/test_hierarchy.py +92 -0
  471. gv_specwright-1.0.2/tests/test_sync/test_mapping.py +341 -0
  472. gv_specwright-1.0.2/tests/test_sync/test_review_gate.py +129 -0
  473. gv_specwright-1.0.2/tests/test_sync/test_router.py +170 -0
  474. gv_specwright-1.0.2/tests/test_sync/test_status_map.py +120 -0
  475. gv_specwright-1.0.2/tests/test_sync/test_templates.py +133 -0
  476. gv_specwright-1.0.2/tests/test_web/__init__.py +0 -0
  477. gv_specwright-1.0.2/tests/test_web/test_cache.py +67 -0
  478. gv_specwright-1.0.2/tests/test_web/test_editor_routes.py +1178 -0
  479. gv_specwright-1.0.2/tests/test_web/test_profile_routes.py +189 -0
  480. gv_specwright-1.0.2/tests/test_web/test_render.py +264 -0
  481. gv_specwright-1.0.2/tests/test_web/test_routes.py +411 -0
  482. gv_specwright-1.0.2/tests/test_web/test_services.py +815 -0
  483. gv_specwright-1.0.2/uv.lock +1800 -0
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: sw-context
3
+ description: >
4
+ Load spec context for the current task. Use when starting work on a feature,
5
+ investigating a bug, or reviewing code that relates to a spec. Automatically
6
+ identifies relevant specs from git changes or a user-provided topic.
7
+ allowed-tools:
8
+ - Read
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - mcp__specwright__search
13
+ - mcp__specwright__get_spec
14
+ - mcp__specwright__get_section
15
+ ---
16
+
17
+ # Load Spec Context
18
+
19
+ You are loading spec context for the user's current task.
20
+
21
+ ## Step 1: Identify Relevant Files
22
+
23
+ Check what the user is currently working on:
24
+
25
+ ```bash
26
+ git diff --name-only HEAD 2>/dev/null || git diff --name-only --cached 2>/dev/null || echo ""
27
+ ```
28
+
29
+ If the user provided a topic, use that instead of git changes.
30
+
31
+ ## Step 2: Find Relevant Specs
32
+
33
+ **With MCP (preferred):** Use `mcp__specwright__search` to find specs matching changed files or the topic.
34
+
35
+ **Without MCP (fallback):** Search locally:
36
+ 1. Use `Glob` to find all specs: `docs/specs/*.md`
37
+ 2. Use `Grep` to search spec content for terms from changed files or topic
38
+ 3. Use `Read` to load matching spec files
39
+
40
+ ## Step 3: Present Context
41
+
42
+ For each relevant spec, present:
43
+ - **Title** and **status** from frontmatter
44
+ - **Relevant sections** with their status (draft/todo/in_progress/done)
45
+ - **Acceptance criteria** — checked items and unchecked items
46
+ - **Ticket links** if present
47
+
48
+ ## Spec Format Reference
49
+
50
+ Specs use YAML frontmatter:
51
+ ```yaml
52
+ ---
53
+ title: "Feature Name"
54
+ type: spec # spec, proposal, design, adr
55
+ status: draft # draft, in_progress, done, deprecated
56
+ owner: "name"
57
+ team: "team-name"
58
+ tags: [tag1, tag2]
59
+ ---
60
+ ```
61
+
62
+ Sections are numbered headings (`## 1. Section Title`).
63
+ Status comments: `<!-- specwright:system:1.1 status:todo -->`
64
+ Ticket links: `<!-- specwright:ticket:github:ORG-123 -->`
65
+ AC checkboxes: `- [ ] Unchecked` / `- [x] Checked`
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: sw-new
3
+ description: >
4
+ Create a new spec document from a template. Use when starting a new feature,
5
+ writing a design doc, proposal, or ADR. Walks through structured creation
6
+ with the user.
7
+ allowed-tools:
8
+ - Read
9
+ - Write
10
+ - Glob
11
+ - mcp__specwright__create_spec
12
+ ---
13
+
14
+ # Create New Spec
15
+
16
+ You are helping the user create a new spec document.
17
+
18
+ ## Step 1: Gather Information
19
+
20
+ Ask the user for:
21
+ 1. **Title** — what is this spec about?
22
+ 2. **Type** — spec (default), proposal, design, or adr
23
+ 3. **Team** — which team owns this?
24
+ 4. **Tags** — relevant tags for discovery
25
+
26
+ ## Step 2: Create the Spec
27
+
28
+ **With MCP:** Use `mcp__specwright__create_spec` to create the file directly in the repo.
29
+
30
+ **Without MCP:** Create locally using `Write`:
31
+ - Path: `docs/specs/<slug>.md` (derived from title)
32
+ - Use the template format below
33
+
34
+ ## Spec Template
35
+
36
+ ```markdown
37
+ ---
38
+ title: "<Title>"
39
+ type: spec
40
+ status: draft
41
+ owner: ""
42
+ team: "<team>"
43
+ review_status: draft
44
+ tags: [<tags>]
45
+ depends_on: []
46
+ created: ""
47
+ updated: ""
48
+ ---
49
+
50
+ # <Title>
51
+
52
+ ## 1. Background
53
+
54
+ Describe the context and motivation for this spec.
55
+
56
+ ## 2. Requirements
57
+
58
+ ### Acceptance Criteria
59
+
60
+ - [ ] First requirement
61
+
62
+ ## 3. Design
63
+
64
+ Describe the technical approach.
65
+
66
+ ## 4. Rollout Plan
67
+
68
+ Describe phased rollout and success criteria.
69
+ ```
70
+
71
+ ## Step 3: Guide Next Steps
72
+
73
+ After creation, suggest:
74
+ 1. Fill in the Background section with context
75
+ 2. Define specific acceptance criteria
76
+ 3. Add design details
77
+ 4. Run `/sw:review` when ready for review
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: sw-plan
3
+ description: >
4
+ Spec-driven planning workflow inspired by OpenSpec. Use when starting a new
5
+ feature or project to go from exploration through spec creation to
6
+ implementation tasks. Follows the explore-propose-spec-design-tasks lifecycle.
7
+ allowed-tools:
8
+ - Read
9
+ - Write
10
+ - Glob
11
+ - Grep
12
+ - Bash
13
+ - mcp__specwright__search
14
+ - mcp__specwright__get_spec
15
+ - mcp__specwright__get_doc
16
+ - mcp__specwright__create_spec
17
+ ---
18
+
19
+ # Spec-Driven Planning
20
+
21
+ You are guiding the user through a spec-driven planning workflow.
22
+
23
+ ## Quick Task Extraction with CLI
24
+
25
+ For an existing spec, try the CLI first to extract a structured task plan:
26
+
27
+ ```bash
28
+ specwright plan <spec-file>
29
+ ```
30
+
31
+ This parses the spec, lists todo/in_progress sections as tasks with ACs as
32
+ subtasks, and includes dependency information. Use this as a starting point
33
+ for the planning workflow below.
34
+
35
+ ## Phase 1: Explore
36
+
37
+ Understand the current state:
38
+ 1. What exists in the codebase relevant to this work?
39
+ 2. Are there existing specs that overlap or depend on this?
40
+ 3. What constraints exist (architecture, dependencies, timeline)?
41
+
42
+ Search with MCP `search` or local `Glob` + `Grep` to find related code and docs.
43
+
44
+ ## Phase 2: Propose
45
+
46
+ Based on exploration, propose an approach:
47
+ 1. **Scope** — what will this spec cover?
48
+ 2. **Approach** — high-level technical direction
49
+ 3. **Dependencies** — what does this depend on?
50
+ 4. **Risks** — what could go wrong?
51
+
52
+ Present this as a short proposal for the user to approve before writing the full spec.
53
+
54
+ ## Phase 3: Spec
55
+
56
+ Create the spec document:
57
+ 1. Use `/sw:new` or `mcp__specwright__create_spec` to create the file
58
+ 2. Fill in:
59
+ - Background and motivation
60
+ - Requirements with specific acceptance criteria
61
+ - Technical design
62
+ - Rollout plan
63
+
64
+ Each AC should be:
65
+ - **Specific** — testable, not vague
66
+ - **Independent** — can be verified on its own
67
+ - **Valuable** — directly ties to user value
68
+
69
+ ## Phase 4: Design
70
+
71
+ Add technical design details:
72
+ 1. Architecture decisions
73
+ 2. API contracts
74
+ 3. Data model changes
75
+ 4. Integration points
76
+
77
+ ## Phase 5: Tasks
78
+
79
+ Break the spec into implementation tasks:
80
+ 1. Map each section/AC to concrete work items
81
+ 2. Identify dependencies between tasks
82
+ 3. Suggest implementation order
83
+ 4. Estimate relative complexity
84
+
85
+ Present as a task list the user can use directly or sync to their ticket system.
86
+
87
+ ## Workflow Tips
88
+
89
+ - Don't skip exploration — understanding context prevents rework
90
+ - Keep ACs specific and testable
91
+ - Design docs should live alongside specs, not separately
92
+ - Tasks should map back to spec sections for traceability
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: sw-review
3
+ description: >
4
+ Review code changes against all documentation — specs, ADRs, READMEs,
5
+ architecture docs. Broader than verify. Use during code review or before
6
+ merging to catch documentation drift.
7
+ allowed-tools:
8
+ - Read
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - mcp__specwright__search
13
+ - mcp__specwright__get_spec
14
+ - mcp__specwright__get_doc
15
+ - mcp__specwright__list_specs
16
+ - mcp__specwright__list_docs
17
+ ---
18
+
19
+ # Review Changes Against Documentation
20
+
21
+ You are reviewing code changes against all project documentation.
22
+
23
+ ## Step 1: Identify Changes
24
+
25
+ ```bash
26
+ git diff --name-only HEAD 2>/dev/null || git diff --name-only --cached 2>/dev/null
27
+ ```
28
+
29
+ If reviewing a PR, examine all changed files.
30
+
31
+ ## Step 2: Find Relevant Documentation
32
+
33
+ Search broadly — not just specs but all docs:
34
+ - `docs/specs/*.md` — spec files
35
+ - `docs/adrs/*.md` — architecture decision records
36
+ - `docs/**/*.md` — any documentation
37
+ - `README.md`, `CONTRIBUTING.md`, `CHANGELOG.md`
38
+
39
+ Use MCP `search` or local `Glob` + `Grep` to find docs mentioning changed files, functions, or concepts.
40
+
41
+ ## Step 3: Check for Drift
42
+
43
+ For each relevant doc, check:
44
+ 1. **Accuracy** — does the doc still accurately describe the code?
45
+ 2. **Completeness** — are new features/changes reflected in docs?
46
+ 3. **Consistency** — do docs agree with each other?
47
+ 4. **Spec compliance** — do code changes align with spec requirements?
48
+
49
+ ## Step 4: Report Findings
50
+
51
+ Organize findings by severity:
52
+
53
+ ### Must Fix
54
+ - Documentation that is now **incorrect** due to code changes
55
+ - Spec ACs that are **contradicted** by the implementation
56
+
57
+ ### Should Update
58
+ - Docs that are **incomplete** — missing new functionality
59
+ - README sections that reference **changed** behavior
60
+
61
+ ### Consider
62
+ - Opportunities to **improve** documentation
63
+ - Specs that could be **updated** to reflect implementation learnings
64
+
65
+ ## Step 5: Suggest Updates
66
+
67
+ For each finding, provide specific suggestions for what to change in the documentation.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: sw-status
3
+ description: >
4
+ Show a spec coverage dashboard. Use to see overall project status,
5
+ spec progress, and coverage metrics. Works with MCP for org-wide
6
+ metrics or locally by parsing spec files.
7
+ allowed-tools:
8
+ - Read
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - mcp__specwright__get_coverage
13
+ - mcp__specwright__list_specs
14
+ - mcp__specwright__get_spec
15
+ ---
16
+
17
+ # Spec Coverage Dashboard
18
+
19
+ You are generating a spec coverage dashboard for the user.
20
+
21
+ ## With CLI (preferred — fast local parsing)
22
+
23
+ Try the CLI first for an instant local dashboard:
24
+
25
+ ```bash
26
+ specwright status
27
+ ```
28
+
29
+ For a single spec detail view:
30
+
31
+ ```bash
32
+ specwright status --spec <file>
33
+ ```
34
+
35
+ If the CLI works, present its output directly. Only fall back to other methods
36
+ if the CLI is unavailable or if org-wide metrics are needed.
37
+
38
+ ## With MCP (org-wide metrics)
39
+
40
+ Use `mcp__specwright__get_coverage` to get aggregate metrics:
41
+ - Total specs, sections, acceptance criteria
42
+ - Coverage percentages (section, AC, realization)
43
+ - Health score
44
+ - Trend data
45
+
46
+ Then use `mcp__specwright__list_specs` for per-spec breakdown.
47
+
48
+ ## Without MCP (local parsing)
49
+
50
+ 1. Find all specs: `Glob` for `docs/specs/*.md`
51
+ 2. Read each spec and extract:
52
+ - Frontmatter status
53
+ - Section count and statuses
54
+ - AC counts (total, checked, unchecked)
55
+
56
+ ## Dashboard Format
57
+
58
+ Present the dashboard as:
59
+
60
+ ```
61
+ Spec Coverage Dashboard
62
+ ========================
63
+
64
+ Overall: X specs | Y sections | Z acceptance criteria
65
+
66
+ | Spec | Status | Sections | ACs | Coverage |
67
+ |------|--------|----------|-----|----------|
68
+ | Auth | in_progress | 4/6 done | 8/12 | 67% |
69
+ | Billing | draft | 0/3 done | 0/5 | 0% |
70
+
71
+ Health Score: XX/100
72
+ ```
73
+
74
+ ## Section Status Breakdown
75
+
76
+ For specs the user is interested in, show section-level detail:
77
+
78
+ ```
79
+ Auth Spec (in_progress)
80
+ 1. Login Flow ........... done
81
+ 1.1 Password Reset .... in_progress
82
+ 2. OAuth ................ todo
83
+ 3. Session Management ... draft
84
+ ```
85
+
86
+ ## Acceptance Criteria Summary
87
+
88
+ ```
89
+ Checked: 8 / 12 (67%)
90
+ Realized: 5 / 12 (42%) ← have code evidence
91
+ Unchecked: 4 / 12 (33%)
92
+ ```
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: sw-task
3
+ description: >
4
+ Pick up a spec-driven task, work through its acceptance criteria, and mark it
5
+ done. Bridges the specwright CLI workflow with Claude Code's interactive
6
+ capabilities for a guided implementation experience.
7
+ allowed-tools:
8
+ - Read
9
+ - Write
10
+ - Edit
11
+ - Glob
12
+ - Grep
13
+ - Bash
14
+ - mcp__specwright__get_spec
15
+ - mcp__specwright__get_section
16
+ - mcp__specwright__search
17
+ - mcp__specwright__add_realization
18
+ - mcp__specwright__update_section_status
19
+ ---
20
+
21
+ # Spec-Driven Task Workflow
22
+
23
+ You are guiding the user through a spec-driven development task — picking up a
24
+ work item, implementing it against acceptance criteria, and marking it done.
25
+
26
+ ## Step 1: Show Available Tasks
27
+
28
+ Try the CLI first for a quick overview:
29
+
30
+ ```bash
31
+ specwright tasks
32
+ ```
33
+
34
+ If the CLI is not available, fall back to local parsing:
35
+ 1. `Glob` for `docs/specs/*.md`
36
+ 2. `Read` each spec, find sections with `todo` or `in_progress` status
37
+
38
+ Present available tasks as a numbered list:
39
+ ```
40
+ Available tasks:
41
+ 1. [1] Login Flow (todo) — 0/3 ACs
42
+ 2. [2] OAuth (todo) — 0/2 ACs
43
+ 3. [3.1] Password Reset (in_progress) — 1/4 ACs
44
+ ```
45
+
46
+ Ask the user which task to pick up.
47
+
48
+ ## Step 2: Start the Task
49
+
50
+ Mark the selected section as `in_progress`:
51
+
52
+ ```bash
53
+ specwright start <section-id>
54
+ ```
55
+
56
+ Or fall back to editing the spec file directly — update the status comment:
57
+ ```
58
+ <!-- specwright:system:1.1 status:in_progress -->
59
+ ```
60
+
61
+ If `--issue` is needed, the CLI can create a GitHub Issue too.
62
+
63
+ ## Step 3: Present Acceptance Criteria
64
+
65
+ Load the full section and present ACs as an implementation checklist:
66
+
67
+ ```
68
+ Task: 1.1 Password Reset (in_progress)
69
+
70
+ Acceptance Criteria:
71
+ [ ] Reset email sends within 30 seconds
72
+ [x] Token expires after 1 hour
73
+ [ ] Rate limit: max 3 resets per hour per user
74
+ [ ] Reset link works exactly once
75
+ ```
76
+
77
+ ## Step 4: Implement
78
+
79
+ Work through each unchecked AC:
80
+ 1. Search the codebase for existing relevant code
81
+ 2. Implement the requirement
82
+ 3. Verify the implementation satisfies the AC
83
+
84
+ After implementing each AC, offer to check the box in the spec.
85
+
86
+ ## Step 5: Mark Done
87
+
88
+ When all ACs are satisfied:
89
+
90
+ ```bash
91
+ specwright done <section-id>
92
+ ```
93
+
94
+ Or edit the spec directly to set status to `done`.
95
+
96
+ ## Step 6: Record Realization Evidence
97
+
98
+ For each completed AC, add realization evidence linking code to the requirement.
99
+
100
+ If MCP is available:
101
+ ```
102
+ mcp__specwright__add_realization(
103
+ section_id="1.1",
104
+ ac_text="Reset email sends within 30 seconds",
105
+ pr_number=42,
106
+ code_file="src/auth/reset.py",
107
+ lines="15-30"
108
+ )
109
+ ```
110
+
111
+ Without MCP, insert realization comments directly:
112
+ ```markdown
113
+ - [x] Reset email sends within 30 seconds
114
+ <!-- specwright:realized-in:PR#42 file:src/auth/reset.py:15-30 -->
115
+ ```
116
+
117
+ ## Workflow Tips
118
+
119
+ - Always read the full section content before implementing — context matters
120
+ - Check existing code first to avoid duplicating work
121
+ - Keep ACs atomic — implement and verify one at a time
122
+ - If an AC is unclear, ask the user for clarification before implementing
123
+ - Use `specwright verify` to double-check implementation coverage
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: sw-update
3
+ description: >
4
+ Update spec statuses based on code implementation evidence. Use after
5
+ implementing features to keep specs in sync with reality. Scans the codebase
6
+ for implementation evidence and proposes status transitions.
7
+ allowed-tools:
8
+ - Read
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - mcp__specwright__get_spec
13
+ - mcp__specwright__get_section
14
+ - mcp__specwright__search
15
+ - mcp__specwright__update_section_status
16
+ - mcp__specwright__add_realization
17
+ - mcp__specwright__sync_spec_status
18
+ ---
19
+
20
+ # Update Spec Statuses
21
+
22
+ You are scanning the codebase to update spec statuses based on implementation evidence.
23
+
24
+ ## Quick Status Updates with CLI
25
+
26
+ For simple status transitions, use the CLI directly:
27
+
28
+ ```bash
29
+ specwright start <section-id> # Mark section as in_progress
30
+ specwright done <section-id> # Mark section as done
31
+ ```
32
+
33
+ Add `--issue` to create/update GitHub Issues alongside the status change:
34
+
35
+ ```bash
36
+ specwright start <section-id> --issue
37
+ specwright done <section-id> --issue
38
+ ```
39
+
40
+ For bulk automated updates based on code evidence, continue with the workflow below.
41
+
42
+ ## Step 1: Load Specs
43
+
44
+ If the user specifies a spec, load it. Otherwise, load all specs:
45
+ - MCP: `mcp__specwright__list_specs` then `mcp__specwright__get_spec` for each
46
+ - Local: `Glob` for `docs/specs/*.md` then `Read` each
47
+
48
+ ## Step 2: Scan for Implementation Evidence
49
+
50
+ For each spec section with unchecked ACs or non-done status:
51
+
52
+ 1. **Search the codebase** for implementation:
53
+ - `Grep` for function names, class names, or keywords from the AC
54
+ - Check recent git commits: `git log --oneline --since="30 days ago"`
55
+ - Look at test files for test coverage of the requirement
56
+
57
+ 2. **Evaluate** each section:
58
+ - All ACs checked + code exists → **done**
59
+ - Some ACs checked + active work → **in_progress**
60
+ - No ACs checked + no code → stays as-is
61
+
62
+ ## Step 3: Propose Updates
63
+
64
+ Present proposed changes as a table:
65
+
66
+ | Section | Current | Proposed | Evidence |
67
+ |---------|---------|----------|----------|
68
+ | 1.1 Password Reset | todo | in_progress | `src/auth/reset.py` exists, 2/3 ACs done |
69
+ | 2. OAuth | todo | done | Full implementation in `src/auth/oauth/` |
70
+
71
+ ## Step 4: Apply Updates
72
+
73
+ Ask the user to confirm before applying. Then:
74
+
75
+ **With MCP (preferred):** Use `mcp__specwright__sync_spec_status` for bulk updates in a single commit.
76
+
77
+ **Without MCP:** Use `Edit` to modify the spec files locally:
78
+ - Update status comments: `<!-- specwright:system:1.1 status:in_progress -->`
79
+ - Check AC boxes: `- [x] Requirement text`
80
+
81
+ ## Status Transitions
82
+
83
+ Valid states: `draft` → `todo` → `in_progress` → `done`
84
+ Also: `blocked` (with reason), `deprecated`
85
+
86
+ Only propose forward transitions unless there's clear evidence of regression.
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: sw-verify
3
+ description: >
4
+ Verify code implementation against spec acceptance criteria. Use when you want
5
+ to check if code satisfies spec requirements, after implementing a feature,
6
+ or during code review. Evaluates each AC as realized, partial, or conflicting.
7
+ allowed-tools:
8
+ - Read
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - mcp__specwright__get_spec
13
+ - mcp__specwright__get_section
14
+ - mcp__specwright__search
15
+ - mcp__specwright__add_realization
16
+ - mcp__specwright__update_section_status
17
+ ---
18
+
19
+ # Verify Code Against Spec
20
+
21
+ You are verifying whether the current codebase satisfies a spec's acceptance criteria.
22
+
23
+ ## Quick Check with CLI
24
+
25
+ Try the CLI first for a fast static check:
26
+
27
+ ```bash
28
+ specwright verify
29
+ ```
30
+
31
+ Or for a specific section:
32
+
33
+ ```bash
34
+ specwright verify --section <id>
35
+ ```
36
+
37
+ This greps the codebase for keywords from each unchecked AC and classifies them
38
+ as "likely realized", "not started", or "unknown". Use the results as a starting
39
+ point, then do deeper analysis with the steps below.
40
+
41
+ ## Step 1: Load the Spec
42
+
43
+ If the user specifies a spec file, load it directly. Otherwise, identify the relevant spec:
44
+ - Check recent changes: `git diff --name-only HEAD`
45
+ - Search for matching specs using MCP `search` or local `Glob` + `Grep`
46
+
47
+ Load the full spec with `mcp__specwright__get_spec` or `Read`.
48
+
49
+ ## Step 2: Evaluate Each Acceptance Criterion
50
+
51
+ For each AC checkbox in the spec:
52
+
53
+ 1. **Search the codebase** for implementation evidence using `Grep` and `Read`
54
+ 2. **Classify** the AC:
55
+ - **Realized** — code fully implements the requirement
56
+ - **Partial** — code partially implements it (explain what's missing)
57
+ - **Not Started** — no implementation found
58
+ - **Conflicting** — implementation contradicts the requirement
59
+
60
+ ## Step 3: Present Results
61
+
62
+ Format as a table:
63
+
64
+ | AC | Status | Evidence |
65
+ |----|--------|----------|
66
+ | Rate limiting | Realized | `src/auth/rate_limit.py:42-60` |
67
+ | Email validation | Partial | Validates format but not domain |
68
+ | OAuth support | Not Started | — |
69
+
70
+ ## Step 4: Offer Write-Back (MCP only)
71
+
72
+ If MCP is available, offer to:
73
+ - Update section statuses: `mcp__specwright__update_section_status`
74
+ - Record realization evidence: `mcp__specwright__add_realization`
75
+
76
+ Ask the user before making any writes.
77
+
78
+ ## Spec Format Reference
79
+
80
+ AC checkboxes appear under `### Acceptance Criteria` headings:
81
+ ```markdown
82
+ - [x] Checked (done)
83
+ - [ ] Unchecked (not done)
84
+ ```
85
+
86
+ Realization comments appear after ACs:
87
+ ```
88
+ <!-- specwright:realized-in:PR#42 file:src/auth.py:10-25 -->
89
+ ```