deviatdd 2.5.1__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 (344) hide show
  1. deviatdd-2.5.1/.deviate/.gitignore +6 -0
  2. deviatdd-2.5.1/.deviate/config.toml +9 -0
  3. deviatdd-2.5.1/.deviate/evaluations/deviate-flows-skill-2026-06-26.json +55 -0
  4. deviatdd-2.5.1/.env.example +8 -0
  5. deviatdd-2.5.1/.gitattributes +5 -0
  6. deviatdd-2.5.1/.githooks/pre-commit +33 -0
  7. deviatdd-2.5.1/.githooks/pre-push +48 -0
  8. deviatdd-2.5.1/.github/ISSUE_TEMPLATE/bug.md +47 -0
  9. deviatdd-2.5.1/.github/ISSUE_TEMPLATE/feature.md +45 -0
  10. deviatdd-2.5.1/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  11. deviatdd-2.5.1/.github/workflows/ci.yml +80 -0
  12. deviatdd-2.5.1/.gitignore +38 -0
  13. deviatdd-2.5.1/.opencode/.gitignore +5 -0
  14. deviatdd-2.5.1/.opencode/opencode.json +4 -0
  15. deviatdd-2.5.1/AGENTS.md +1 -0
  16. deviatdd-2.5.1/CHANGELOG.md +342 -0
  17. deviatdd-2.5.1/CLAUDE.md +97 -0
  18. deviatdd-2.5.1/CODE_OF_CONDUCT.md +142 -0
  19. deviatdd-2.5.1/CONTRIBUTING.md +263 -0
  20. deviatdd-2.5.1/LICENSE +21 -0
  21. deviatdd-2.5.1/PKG-INFO +386 -0
  22. deviatdd-2.5.1/README.md +332 -0
  23. deviatdd-2.5.1/SECURITY.md +138 -0
  24. deviatdd-2.5.1/deviatdd.png +0 -0
  25. deviatdd-2.5.1/mise.toml +99 -0
  26. deviatdd-2.5.1/pr_descriptions/feat/001-deviate-cli-python/008-meso-macro-automated-orchestration.md +11 -0
  27. deviatdd-2.5.1/pr_descriptions/feat/adhoc/006-context-cli-integration.md +7 -0
  28. deviatdd-2.5.1/pr_descriptions/feat-001-deviate-cli-python-001-cli-initialization-governance-provisioning-pr-11.md +7 -0
  29. deviatdd-2.5.1/pr_descriptions/feat-001-deviate-cli-python-003-meso-layer-specification-task-decomposition.md +46 -0
  30. deviatdd-2.5.1/pr_descriptions/feat-001-deviate-cli-python-004-micro-layer-tdd-sandbox-execution.md +8 -0
  31. deviatdd-2.5.1/pr_descriptions/feat-001-deviate-cli-python-005-cli-architecture-realignment-skill-integration.md +15 -0
  32. deviatdd-2.5.1/pr_descriptions/feat-001-deviate-cli-python-007-macro-meso-parity-backward-compatibility.md +13 -0
  33. deviatdd-2.5.1/pr_descriptions/feat-002-deviatdd-gap-analysis-001-foundation-cli-infrastructure.md +13 -0
  34. deviatdd-2.5.1/pr_descriptions/feat-002-deviatdd-gap-analysis-003-fast-path-commands.md +12 -0
  35. deviatdd-2.5.1/pr_descriptions/feat-002-deviatdd-gap-analysis-004-governance-inspection.md +7 -0
  36. deviatdd-2.5.1/pr_descriptions/feat-adhoc-001-streaming-pipeline-monitor.md +7 -0
  37. deviatdd-2.5.1/pr_descriptions/feat-adhoc-008-ast-phase-prioritization.md +17 -0
  38. deviatdd-2.5.1/pr_descriptions/feat_002-deviatdd-gap-analysis_001-foundation-cli-infrastructure.md +13 -0
  39. deviatdd-2.5.1/pyproject.toml +93 -0
  40. deviatdd-2.5.1/specs/001-deviate-cli-python/001-cli-initialization-governance-provisioning/manifest-t001.json +62 -0
  41. deviatdd-2.5.1/specs/001-deviate-cli-python/001-cli-initialization-governance-provisioning/manifest-t002.json +52 -0
  42. deviatdd-2.5.1/specs/001-deviate-cli-python/001-cli-initialization-governance-provisioning/manifest-t004.json +46 -0
  43. deviatdd-2.5.1/specs/001-deviate-cli-python/001-cli-initialization-governance-provisioning/spec.md +169 -0
  44. deviatdd-2.5.1/specs/001-deviate-cli-python/001-cli-initialization-governance-provisioning/tasks.md +136 -0
  45. deviatdd-2.5.1/specs/001-deviate-cli-python/002-macro-layer-state-ledger-management/spec.md +213 -0
  46. deviatdd-2.5.1/specs/001-deviate-cli-python/002-macro-layer-state-ledger-management/tasks.md +145 -0
  47. deviatdd-2.5.1/specs/001-deviate-cli-python/003-meso-layer-specification-task-decomposition/spec.md +159 -0
  48. deviatdd-2.5.1/specs/001-deviate-cli-python/003-meso-layer-specification-task-decomposition/tasks.md +143 -0
  49. deviatdd-2.5.1/specs/001-deviate-cli-python/004-micro-layer-tdd-sandbox-execution/spec.md +391 -0
  50. deviatdd-2.5.1/specs/001-deviate-cli-python/004-micro-layer-tdd-sandbox-execution/tasks.jsonl +2 -0
  51. deviatdd-2.5.1/specs/001-deviate-cli-python/004-micro-layer-tdd-sandbox-execution/tasks.md +200 -0
  52. deviatdd-2.5.1/specs/001-deviate-cli-python/005-cli-architecture-realignment-skill-integration/spec.md +377 -0
  53. deviatdd-2.5.1/specs/001-deviate-cli-python/005-cli-architecture-realignment-skill-integration/tasks.md +283 -0
  54. deviatdd-2.5.1/specs/001-deviate-cli-python/007-macro-meso-parity-backward-compatibility/spec.md +233 -0
  55. deviatdd-2.5.1/specs/001-deviate-cli-python/007-macro-meso-parity-backward-compatibility/tasks.md +237 -0
  56. deviatdd-2.5.1/specs/001-deviate-cli-python/008-meso-macro-automated-orchestration/spec.md +233 -0
  57. deviatdd-2.5.1/specs/001-deviate-cli-python/008-meso-macro-automated-orchestration/tasks.jsonl +20 -0
  58. deviatdd-2.5.1/specs/001-deviate-cli-python/008-meso-macro-automated-orchestration/tasks.md +248 -0
  59. deviatdd-2.5.1/specs/001-deviate-cli-python/data-model.md +205 -0
  60. deviatdd-2.5.1/specs/001-deviate-cli-python/design.md +85 -0
  61. deviatdd-2.5.1/specs/001-deviate-cli-python/explore.md +157 -0
  62. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/001-cli-initialization-governance-provisioning.md +51 -0
  63. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/002-macro-layer-state-ledger-management.md +48 -0
  64. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/003-meso-layer-specification-task-decomposition.md +48 -0
  65. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/004-micro-layer-tdd-sandbox-execution.md +253 -0
  66. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/005-cli-architecture-realignment-skill-integration.md +70 -0
  67. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/006-state-persistence-concurrency-safety.md +50 -0
  68. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/007-macro-meso-parity-backward-compatibility.md +93 -0
  69. deviatdd-2.5.1/specs/001-deviate-cli-python/issues/008-meso-macro-automated-orchestration.md +164 -0
  70. deviatdd-2.5.1/specs/001-deviate-cli-python/prd.md +474 -0
  71. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/001-foundation-cli-infrastructure/spec.md +189 -0
  72. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/001-foundation-cli-infrastructure/tasks.jsonl +4 -0
  73. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/001-foundation-cli-infrastructure/tasks.md +167 -0
  74. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/003-fast-path-commands/spec.md +188 -0
  75. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/003-fast-path-commands/tasks.jsonl +18 -0
  76. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/003-fast-path-commands/tasks.md +149 -0
  77. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/004-governance-inspection/spec.md +226 -0
  78. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/004-governance-inspection/tasks.jsonl +9 -0
  79. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/004-governance-inspection/tasks.md +122 -0
  80. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/005-micro-layer-integrity/spec.md +440 -0
  81. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/005-micro-layer-integrity/tasks.jsonl +30 -0
  82. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/005-micro-layer-integrity/tasks.md +315 -0
  83. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/data-model.md +504 -0
  84. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/design.md +214 -0
  85. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/explore.md +291 -0
  86. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/issues/001-foundation-cli-infrastructure.md +130 -0
  87. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/issues/002-context-pipeline.md +105 -0
  88. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/issues/003-fast-path-commands.md +100 -0
  89. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/issues/004-governance-inspection.md +111 -0
  90. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/issues/005-micro-layer-integrity.md +513 -0
  91. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/plan-tdd-integration-gap.md +363 -0
  92. deviatdd-2.5.1/specs/002-deviatdd-gap-analysis/prd.md +571 -0
  93. deviatdd-2.5.1/specs/003-graphite-cli-integration/explore.md +264 -0
  94. deviatdd-2.5.1/specs/DeviaTDD-api.md +874 -0
  95. deviatdd-2.5.1/specs/DeviaTDD-architecture.md +708 -0
  96. deviatdd-2.5.1/specs/_product/flows/flows-product.md +96 -0
  97. deviatdd-2.5.1/specs/_product/flows/index.md +7 -0
  98. deviatdd-2.5.1/specs/adhoc/001-streaming-pipeline-monitor/spec.md +210 -0
  99. deviatdd-2.5.1/specs/adhoc/001-streaming-pipeline-monitor/tasks.jsonl +15 -0
  100. deviatdd-2.5.1/specs/adhoc/001-streaming-pipeline-monitor/tasks.md +210 -0
  101. deviatdd-2.5.1/specs/adhoc/003-meso-layer-restructuring/spec.md +192 -0
  102. deviatdd-2.5.1/specs/adhoc/003-meso-layer-restructuring/tasks.jsonl +2 -0
  103. deviatdd-2.5.1/specs/adhoc/003-meso-layer-restructuring/tasks.md +211 -0
  104. deviatdd-2.5.1/specs/adhoc/004-deviate-review-skill/spec.md +227 -0
  105. deviatdd-2.5.1/specs/adhoc/004-deviate-review-skill/tasks.jsonl +12 -0
  106. deviatdd-2.5.1/specs/adhoc/004-deviate-review-skill/tasks.md +177 -0
  107. deviatdd-2.5.1/specs/adhoc/005-per-phase-model-configuration/plan.md +93 -0
  108. deviatdd-2.5.1/specs/adhoc/005-per-phase-model-configuration/tasks.jsonl +18 -0
  109. deviatdd-2.5.1/specs/adhoc/005-per-phase-model-configuration/tasks.md +186 -0
  110. deviatdd-2.5.1/specs/adhoc/006-context-cli-integration/plan.md +262 -0
  111. deviatdd-2.5.1/specs/adhoc/006-context-cli-integration/tasks.jsonl +7 -0
  112. deviatdd-2.5.1/specs/adhoc/006-context-cli-integration/tasks.md +159 -0
  113. deviatdd-2.5.1/specs/adhoc/007-graphite-cli/plan.md +93 -0
  114. deviatdd-2.5.1/specs/adhoc/007-graphite-cli/tasks.jsonl +17 -0
  115. deviatdd-2.5.1/specs/adhoc/007-graphite-cli/tasks.md +168 -0
  116. deviatdd-2.5.1/specs/adhoc/008-ast-phase-prioritization/plan.md +116 -0
  117. deviatdd-2.5.1/specs/adhoc/008-ast-phase-prioritization/tasks.jsonl +23 -0
  118. deviatdd-2.5.1/specs/adhoc/008-ast-phase-prioritization/tasks.md +219 -0
  119. deviatdd-2.5.1/specs/adhoc/009-pi-agent-backend-integration/plan.md +123 -0
  120. deviatdd-2.5.1/specs/adhoc/009-pi-agent-backend-integration/tasks.jsonl +18 -0
  121. deviatdd-2.5.1/specs/adhoc/009-pi-agent-backend-integration/tasks.md +187 -0
  122. deviatdd-2.5.1/specs/adhoc/010-deviate-setup-product-layer/plan.md +107 -0
  123. deviatdd-2.5.1/specs/adhoc/010-deviate-setup-product-layer/tasks.jsonl +18 -0
  124. deviatdd-2.5.1/specs/adhoc/010-deviate-setup-product-layer/tasks.md +170 -0
  125. deviatdd-2.5.1/specs/adhoc/issues/001-streaming-pipeline-monitor.md +57 -0
  126. deviatdd-2.5.1/specs/adhoc/issues/002-aider-agent-backend-integration.md +145 -0
  127. deviatdd-2.5.1/specs/adhoc/issues/003-meso-layer-restructuring.md +112 -0
  128. deviatdd-2.5.1/specs/adhoc/issues/004-deviate-review-skill.md +67 -0
  129. deviatdd-2.5.1/specs/adhoc/issues/005-per-phase-model-configuration.md +156 -0
  130. deviatdd-2.5.1/specs/adhoc/issues/006-context-cli-integration.md +142 -0
  131. deviatdd-2.5.1/specs/adhoc/issues/007-graphite-cli.md +119 -0
  132. deviatdd-2.5.1/specs/adhoc/issues/008-ast-phase-prioritization.md +301 -0
  133. deviatdd-2.5.1/specs/adhoc/issues/009-pi-agent-backend-integration.md +205 -0
  134. deviatdd-2.5.1/specs/adhoc/issues/010-deviate-setup-product-layer.md +259 -0
  135. deviatdd-2.5.1/specs/adhoc/prd.md +177 -0
  136. deviatdd-2.5.1/specs/constitution.md +99 -0
  137. deviatdd-2.5.1/specs/explore/ast-tree-sitter.md +269 -0
  138. deviatdd-2.5.1/specs/explore/graphite-cli.md +111 -0
  139. deviatdd-2.5.1/specs/explore/pi-agent-backend.md +132 -0
  140. deviatdd-2.5.1/specs/explore/product-layer.md +174 -0
  141. deviatdd-2.5.1/specs/implementation-gap.md +291 -0
  142. deviatdd-2.5.1/specs/issues.jsonl +58 -0
  143. deviatdd-2.5.1/src/deviate/__init__.py +3 -0
  144. deviatdd-2.5.1/src/deviate/cli/__init__.py +824 -0
  145. deviatdd-2.5.1/src/deviate/cli/_common.py +155 -0
  146. deviatdd-2.5.1/src/deviate/cli/adhoc.py +183 -0
  147. deviatdd-2.5.1/src/deviate/cli/constitution.py +113 -0
  148. deviatdd-2.5.1/src/deviate/cli/feature.py +94 -0
  149. deviatdd-2.5.1/src/deviate/cli/init.py +485 -0
  150. deviatdd-2.5.1/src/deviate/cli/inspect.py +208 -0
  151. deviatdd-2.5.1/src/deviate/cli/macro.py +937 -0
  152. deviatdd-2.5.1/src/deviate/cli/meso.py +1894 -0
  153. deviatdd-2.5.1/src/deviate/cli/micro.py +3249 -0
  154. deviatdd-2.5.1/src/deviate/cli/review.py +441 -0
  155. deviatdd-2.5.1/src/deviate/core/__init__.py +0 -0
  156. deviatdd-2.5.1/src/deviate/core/_shared.py +20 -0
  157. deviatdd-2.5.1/src/deviate/core/agent.py +505 -0
  158. deviatdd-2.5.1/src/deviate/core/cache_discipline.py +65 -0
  159. deviatdd-2.5.1/src/deviate/core/commands.py +202 -0
  160. deviatdd-2.5.1/src/deviate/core/commit.py +86 -0
  161. deviatdd-2.5.1/src/deviate/core/complexity.py +36 -0
  162. deviatdd-2.5.1/src/deviate/core/constitution.py +85 -0
  163. deviatdd-2.5.1/src/deviate/core/contract.py +17 -0
  164. deviatdd-2.5.1/src/deviate/core/convention.py +147 -0
  165. deviatdd-2.5.1/src/deviate/core/epic.py +73 -0
  166. deviatdd-2.5.1/src/deviate/core/issues.py +46 -0
  167. deviatdd-2.5.1/src/deviate/core/prd.py +18 -0
  168. deviatdd-2.5.1/src/deviate/core/profile.py +33 -0
  169. deviatdd-2.5.1/src/deviate/core/repo.py +47 -0
  170. deviatdd-2.5.1/src/deviate/core/run_logger.py +50 -0
  171. deviatdd-2.5.1/src/deviate/core/tasks_ledger.py +69 -0
  172. deviatdd-2.5.1/src/deviate/core/treesitter/__init__.py +31 -0
  173. deviatdd-2.5.1/src/deviate/core/treesitter/analysis.py +457 -0
  174. deviatdd-2.5.1/src/deviate/core/treesitter/models.py +35 -0
  175. deviatdd-2.5.1/src/deviate/core/treesitter/parser.py +184 -0
  176. deviatdd-2.5.1/src/deviate/core/treesitter/queries/bash.scm +7 -0
  177. deviatdd-2.5.1/src/deviate/core/treesitter/queries/c_sharp.scm +11 -0
  178. deviatdd-2.5.1/src/deviate/core/treesitter/queries/cpp.scm +9 -0
  179. deviatdd-2.5.1/src/deviate/core/treesitter/queries/css.scm +4 -0
  180. deviatdd-2.5.1/src/deviate/core/treesitter/queries/dockerfile.scm +8 -0
  181. deviatdd-2.5.1/src/deviate/core/treesitter/queries/elixir.scm +6 -0
  182. deviatdd-2.5.1/src/deviate/core/treesitter/queries/go.scm +9 -0
  183. deviatdd-2.5.1/src/deviate/core/treesitter/queries/hcl.scm +3 -0
  184. deviatdd-2.5.1/src/deviate/core/treesitter/queries/html.scm +3 -0
  185. deviatdd-2.5.1/src/deviate/core/treesitter/queries/javascript.scm +12 -0
  186. deviatdd-2.5.1/src/deviate/core/treesitter/queries/json.scm +4 -0
  187. deviatdd-2.5.1/src/deviate/core/treesitter/queries/kotlin.scm +8 -0
  188. deviatdd-2.5.1/src/deviate/core/treesitter/queries/markdown.scm +4 -0
  189. deviatdd-2.5.1/src/deviate/core/treesitter/queries/python.scm +10 -0
  190. deviatdd-2.5.1/src/deviate/core/treesitter/queries/rust.scm +12 -0
  191. deviatdd-2.5.1/src/deviate/core/treesitter/queries/sql.scm +7 -0
  192. deviatdd-2.5.1/src/deviate/core/treesitter/queries/swift.scm +10 -0
  193. deviatdd-2.5.1/src/deviate/core/treesitter/queries/toml.scm +3 -0
  194. deviatdd-2.5.1/src/deviate/core/treesitter/queries/tsx.scm +14 -0
  195. deviatdd-2.5.1/src/deviate/core/treesitter/queries/typescript.scm +14 -0
  196. deviatdd-2.5.1/src/deviate/core/treesitter/queries/yaml.scm +4 -0
  197. deviatdd-2.5.1/src/deviate/core/validation.py +153 -0
  198. deviatdd-2.5.1/src/deviate/core/worktree.py +141 -0
  199. deviatdd-2.5.1/src/deviate/main.py +4 -0
  200. deviatdd-2.5.1/src/deviate/prompts/__init__.py +0 -0
  201. deviatdd-2.5.1/src/deviate/prompts/assembly.py +122 -0
  202. deviatdd-2.5.1/src/deviate/prompts/auto/__init__.py +1 -0
  203. deviatdd-2.5.1/src/deviate/prompts/auto/execute.md +62 -0
  204. deviatdd-2.5.1/src/deviate/prompts/auto/explore.md +103 -0
  205. deviatdd-2.5.1/src/deviate/prompts/auto/green.md +137 -0
  206. deviatdd-2.5.1/src/deviate/prompts/auto/judge.md +260 -0
  207. deviatdd-2.5.1/src/deviate/prompts/auto/plan.md +127 -0
  208. deviatdd-2.5.1/src/deviate/prompts/auto/prd.md +108 -0
  209. deviatdd-2.5.1/src/deviate/prompts/auto/red.md +156 -0
  210. deviatdd-2.5.1/src/deviate/prompts/auto/refactor.md +166 -0
  211. deviatdd-2.5.1/src/deviate/prompts/auto/research.md +111 -0
  212. deviatdd-2.5.1/src/deviate/prompts/auto/shard.md +90 -0
  213. deviatdd-2.5.1/src/deviate/prompts/auto/specify.md +77 -0
  214. deviatdd-2.5.1/src/deviate/prompts/auto/tasks.md +191 -0
  215. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-adhoc.md +216 -0
  216. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-architecture.md +147 -0
  217. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-constitution.md +215 -0
  218. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-e2e.md +264 -0
  219. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-execute.md +223 -0
  220. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-explore.md +253 -0
  221. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-flows.md +226 -0
  222. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-green.md +217 -0
  223. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-hotfix.md +188 -0
  224. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-init.md +170 -0
  225. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-judge.md +193 -0
  226. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-merge.md +221 -0
  227. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-plan.md +158 -0
  228. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-pr.md +144 -0
  229. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-prd.md +216 -0
  230. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-prune.md +260 -0
  231. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-red.md +231 -0
  232. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-refactor.md +211 -0
  233. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-release.md +123 -0
  234. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-research.md +359 -0
  235. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-review.md +289 -0
  236. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-shard.md +226 -0
  237. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-tasks.md +281 -0
  238. deviatdd-2.5.1/src/deviate/prompts/commands/deviate-triage.md +141 -0
  239. deviatdd-2.5.1/src/deviate/prompts/constitution_seed.md +51 -0
  240. deviatdd-2.5.1/src/deviate/prompts/core/core.md +21 -0
  241. deviatdd-2.5.1/src/deviate/prompts/core/macro-auto.md +59 -0
  242. deviatdd-2.5.1/src/deviate/prompts/core/macro-command.md +54 -0
  243. deviatdd-2.5.1/src/deviate/prompts/core/macro-skill.md +54 -0
  244. deviatdd-2.5.1/src/deviate/prompts/core/meso-auto.md +63 -0
  245. deviatdd-2.5.1/src/deviate/prompts/core/meso-command.md +58 -0
  246. deviatdd-2.5.1/src/deviate/prompts/core/meso-skill.md +58 -0
  247. deviatdd-2.5.1/src/deviate/prompts/core/micro-auto.md +76 -0
  248. deviatdd-2.5.1/src/deviate/prompts/core/micro-command.md +67 -0
  249. deviatdd-2.5.1/src/deviate/prompts/core/micro-skill.md +67 -0
  250. deviatdd-2.5.1/src/deviate/prompts/extras/deviate-pr-graphite-routing.md +20 -0
  251. deviatdd-2.5.1/src/deviate/prompts/governance/__init__.py +0 -0
  252. deviatdd-2.5.1/src/deviate/prompts/governance/agents_seed.md +1 -0
  253. deviatdd-2.5.1/src/deviate/prompts/governance/claudemd_seed.md +1 -0
  254. deviatdd-2.5.1/src/deviate/prompts/governance/graphite_seed.md +18 -0
  255. deviatdd-2.5.1/src/deviate/prompts/governance/libref_seed.md +3 -0
  256. deviatdd-2.5.1/src/deviate/state/__init__.py +0 -0
  257. deviatdd-2.5.1/src/deviate/state/config.py +257 -0
  258. deviatdd-2.5.1/src/deviate/state/ledger.py +407 -0
  259. deviatdd-2.5.1/src/deviate/ui/__init__.py +5 -0
  260. deviatdd-2.5.1/src/deviate/ui/monitor.py +187 -0
  261. deviatdd-2.5.1/src/deviate/ui/render.py +26 -0
  262. deviatdd-2.5.1/tests/__init__.py +0 -0
  263. deviatdd-2.5.1/tests/conftest.py +47 -0
  264. deviatdd-2.5.1/tests/core/__init__.py +0 -0
  265. deviatdd-2.5.1/tests/core/test_agent.py +289 -0
  266. deviatdd-2.5.1/tests/core/test_treesitter.py +675 -0
  267. deviatdd-2.5.1/tests/e2e/test_macro_workflow.bats +65 -0
  268. deviatdd-2.5.1/tests/test_cli/__init__.py +0 -0
  269. deviatdd-2.5.1/tests/test_cli/test_adhoc.py +254 -0
  270. deviatdd-2.5.1/tests/test_cli/test_common.py +113 -0
  271. deviatdd-2.5.1/tests/test_cli/test_constitution.py +114 -0
  272. deviatdd-2.5.1/tests/test_cli/test_feature.py +135 -0
  273. deviatdd-2.5.1/tests/test_cli/test_init.py +1225 -0
  274. deviatdd-2.5.1/tests/test_cli/test_inspect.py +370 -0
  275. deviatdd-2.5.1/tests/test_cli/test_macro_contracts.py +271 -0
  276. deviatdd-2.5.1/tests/test_cli/test_meso.py +15 -0
  277. deviatdd-2.5.1/tests/test_cli/test_meso_contracts.py +225 -0
  278. deviatdd-2.5.1/tests/test_cli/test_micro.py +1825 -0
  279. deviatdd-2.5.1/tests/test_cli/test_review.py +740 -0
  280. deviatdd-2.5.1/tests/test_core/test_agent.py +997 -0
  281. deviatdd-2.5.1/tests/test_core/test_cache_discipline.py +374 -0
  282. deviatdd-2.5.1/tests/test_core/test_commands.py +218 -0
  283. deviatdd-2.5.1/tests/test_core/test_commit.py +127 -0
  284. deviatdd-2.5.1/tests/test_core/test_complexity.py +32 -0
  285. deviatdd-2.5.1/tests/test_core/test_constitution.py +118 -0
  286. deviatdd-2.5.1/tests/test_core/test_contract.py +36 -0
  287. deviatdd-2.5.1/tests/test_core/test_convention.py +258 -0
  288. deviatdd-2.5.1/tests/test_core/test_epic.py +15 -0
  289. deviatdd-2.5.1/tests/test_core/test_issues.py +55 -0
  290. deviatdd-2.5.1/tests/test_core/test_ledger.py +341 -0
  291. deviatdd-2.5.1/tests/test_core/test_prd.py +25 -0
  292. deviatdd-2.5.1/tests/test_core/test_profile.py +35 -0
  293. deviatdd-2.5.1/tests/test_core/test_repo.py +36 -0
  294. deviatdd-2.5.1/tests/test_core/test_tasks_ledger.py +145 -0
  295. deviatdd-2.5.1/tests/test_core/test_validation.py +328 -0
  296. deviatdd-2.5.1/tests/test_core/test_worktree.py +83 -0
  297. deviatdd-2.5.1/tests/test_integration/__init__.py +0 -0
  298. deviatdd-2.5.1/tests/test_integration/conftest.py +47 -0
  299. deviatdd-2.5.1/tests/test_integration/test_command_installation.py +140 -0
  300. deviatdd-2.5.1/tests/test_integration/test_init_export_cycle.py +568 -0
  301. deviatdd-2.5.1/tests/test_integration/test_macro_full_cycle.py +146 -0
  302. deviatdd-2.5.1/tests/test_integration/test_macro_layer.py +368 -0
  303. deviatdd-2.5.1/tests/test_integration/test_macro_orchestration.py +74 -0
  304. deviatdd-2.5.1/tests/test_integration/test_meso_layer.py +243 -0
  305. deviatdd-2.5.1/tests/test_integration/test_meso_orchestration.py +85 -0
  306. deviatdd-2.5.1/tests/test_integration/test_meso_task_ledger.py +130 -0
  307. deviatdd-2.5.1/tests/test_integration/test_parity.py +264 -0
  308. deviatdd-2.5.1/tests/test_integration/test_skill_installation.py +140 -0
  309. deviatdd-2.5.1/tests/test_macro/__init__.py +0 -0
  310. deviatdd-2.5.1/tests/test_macro/test_explore.py +73 -0
  311. deviatdd-2.5.1/tests/test_macro/test_macro_model_routing.py +123 -0
  312. deviatdd-2.5.1/tests/test_macro/test_macro_orchestration.py +274 -0
  313. deviatdd-2.5.1/tests/test_macro/test_prd.py +96 -0
  314. deviatdd-2.5.1/tests/test_macro/test_research.py +66 -0
  315. deviatdd-2.5.1/tests/test_macro/test_shard.py +56 -0
  316. deviatdd-2.5.1/tests/test_meso/__init__.py +0 -0
  317. deviatdd-2.5.1/tests/test_meso/test_auto_prompt_templates.py +176 -0
  318. deviatdd-2.5.1/tests/test_meso/test_meso_model_routing.py +280 -0
  319. deviatdd-2.5.1/tests/test_meso/test_meso_orchestration.py +506 -0
  320. deviatdd-2.5.1/tests/test_meso/test_plan_structure_injection.py +313 -0
  321. deviatdd-2.5.1/tests/test_meso/test_prompt_assembly.py +41 -0
  322. deviatdd-2.5.1/tests/test_meso/test_specify.py +31 -0
  323. deviatdd-2.5.1/tests/test_meso/test_tasks.py +155 -0
  324. deviatdd-2.5.1/tests/test_micro/__init__.py +0 -0
  325. deviatdd-2.5.1/tests/test_micro/conftest.py +69 -0
  326. deviatdd-2.5.1/tests/test_micro/test_e2e.py +130 -0
  327. deviatdd-2.5.1/tests/test_micro/test_execute.py +295 -0
  328. deviatdd-2.5.1/tests/test_micro/test_green.py +130 -0
  329. deviatdd-2.5.1/tests/test_micro/test_hotfix.py +105 -0
  330. deviatdd-2.5.1/tests/test_micro/test_judge.py +1429 -0
  331. deviatdd-2.5.1/tests/test_micro/test_orchestration.py +587 -0
  332. deviatdd-2.5.1/tests/test_micro/test_output_filter.py +83 -0
  333. deviatdd-2.5.1/tests/test_micro/test_red.py +181 -0
  334. deviatdd-2.5.1/tests/test_micro/test_refactor.py +364 -0
  335. deviatdd-2.5.1/tests/test_micro/test_run.py +411 -0
  336. deviatdd-2.5.1/tests/test_micro/test_task_label.py +52 -0
  337. deviatdd-2.5.1/tests/test_state/__init__.py +0 -0
  338. deviatdd-2.5.1/tests/test_state/test_config.py +235 -0
  339. deviatdd-2.5.1/tests/test_state/test_ledger.py +572 -0
  340. deviatdd-2.5.1/tests/test_state/test_session.py +175 -0
  341. deviatdd-2.5.1/tests/test_ui/__init__.py +0 -0
  342. deviatdd-2.5.1/tests/test_ui/test_monitor.py +140 -0
  343. deviatdd-2.5.1/tests/test_ui/test_render.py +54 -0
  344. deviatdd-2.5.1/uv.lock +776 -0
@@ -0,0 +1,6 @@
1
+ session.json
2
+ artifacts/
3
+ prompts.log
4
+ reports/
5
+ rollback.jsonl
6
+ logs/
@@ -0,0 +1,9 @@
1
+ profile = "default"
2
+ timeout_seconds = 300
3
+ agent_export_mode = "local"
4
+
5
+ graphite = false
6
+ use_context = true
7
+ use_libref = true
8
+ [agent]
9
+ backend = "pi"
@@ -0,0 +1,55 @@
1
+ {
2
+ "evaluation_id": "2026-06-26T000000Z",
3
+ "input_valid": true,
4
+ "target_archetype": "Multi_Step_Logic",
5
+ "target_path": "src/deviate/prompts/skills/deviate-flows/SKILL.md",
6
+ "scores": {
7
+ "domain_construct_definition": 8,
8
+ "predicate_atomicity": 10,
9
+ "affirmative_constraints": 10,
10
+ "causal_sequence": 10,
11
+ "output_contract": 9,
12
+ "lexical_specificity": 8,
13
+ "few_shot_icl": 4,
14
+ "snr_maximization": 8,
15
+ "edge_case_enumeration": 9,
16
+ "contextual_bounding": 9
17
+ },
18
+ "raw_scores": {
19
+ "domain_construct_definition": 8,
20
+ "predicate_atomicity": 9,
21
+ "affirmative_constraints": 9,
22
+ "causal_sequence": 8,
23
+ "output_contract": 9,
24
+ "lexical_specificity": 8,
25
+ "few_shot_icl": 4,
26
+ "snr_maximization": 8,
27
+ "edge_case_enumeration": 9,
28
+ "contextual_bounding": 9
29
+ },
30
+ "archetype_weights_applied": {
31
+ "causal_sequence": 2.0,
32
+ "predicate_atomicity": 1.5,
33
+ "affirmative_constraints": 1.5
34
+ },
35
+ "verification_passed": true,
36
+ "verification_notes": [
37
+ "Weighted causal_sequence (16.0), predicate_atomicity (13.5), and affirmative_constraints (13.5) capped at 10 per rubric bounds.",
38
+ "few_shot_icl adjusted from raw 5 to 4 to satisfy semantic rule: identified weakness 'no positive canonical example' must reflect in score ≤ 4.",
39
+ "KV-cache prefix estimated ~700 tokens; under 1024 threshold — no static-prefix bonus applied.",
40
+ "Top-3 lowest scores are few_shot_icl=4, then three-way tie at 8 (domain_construct, lexical_specificity, snr). Patches target few_shot_icl primarily; tied scores addressed via bounding-tag patch."
41
+ ],
42
+ "identified_weaknesses": [
43
+ "Few-shot ICL: edge-case table provides negative-path mappings but no positive canonical example of a complete FLOW-NN block, FLOW-01 schema-conformant file, or index row.",
44
+ "Lexical specificity: opening sentence 'This engine operates exclusively as an isolated, context-bounded...' carries mild narrative framing; could be tightened to declarative scope statement.",
45
+ "Contextual bounding: no explicit <inputs> block separates runtime user dialogue from static instructions, weakening prefix-cache reuse across invocations.",
46
+ "Causal sequence: workflow steps are named but lack explicit per-step precondition→action→verification loops; cross-step data flow is implied, not declared."
47
+ ],
48
+ "programmatic_patches": {
49
+ "inject_domain_construct": "Replace lines 15-16:\n\nOLD:\nThis engine operates exclusively as an isolated, context-bounded Product-layer\nflow authoring assistant for the DeviaTDD framework. Your objective is to\ncollaborate with the user to identify core customer flows, write them into the\nProduct-layer seed artifacts under `specs/_product/flows/`, and keep the\ncanonical flow index (`specs/_product/flows/index.md`) consistent with the\non-disk flow files.\n\nNEW:\nSCOPE: DeviaTDD Product-layer FLOW-01 (Flows) authoring.\nWRITES: `specs/_product/flows/flows-<domain>.md` files and `specs/_product/flows/index.md`.\nDOES NOT WRITE: `specs/_product/architecture.md`, `specs/_product/domain-model.md`, `specs/_product/release-next.md`.\nSEED: `specs/_product/flows/flows-product.md` is read-only; extend, never regenerate.\nGOAL: Produce FLOW-NN flow blocks that conform to the FLOW-01 section schema and remain traceable via `flow_refs:` frontmatter.",
50
+ "inject_few_shot_icl": "Insert after </edge_case_handling>:\n\n<canonical_example>\n## FLOW-04 Provision Developer Environment\n\n| Field | Value |\n|---|---|\n| Actor | Developer |\n| Domain | Onboarding |\n| Status | Active |\n| Source | specs/_product/flows/flows-onboarding.md |\n\n**Problem / job to be done**: As a Developer, I need a reproducible local environment so I can run the test suite without manual setup.\n**Trigger**: `deviate onboard` slash command.\n**Preconditions**: Repository cloned; `.deviate/` directory present.\n**Happy path**: 1. Run `deviate onboard`. 2. Skill provisions mise tasks. 3. Skill installs git hooks. 4. Skill reports green status.\n**Alternate / error paths**: If mise binary missing → abort with diagnostic link; offer manual fallback.\n**Success State**: `mise run check` exits 0 within 30s.\n**Metrics / Signals**: setup_time_seconds ≤ 30; references FLOW-01, FLOW-02.\n\n## index.md row appended by this flow\n\n| Flow ID | Name | Actor | Domain | Status | Source |\n|---|---|---|---|---|---|\n| FLOW-04 | Provision Developer Environment | Developer | Onboarding | Active | specs/_product/flows/flows-onboarding.md |\n</canonical_example>",
51
+ "inject_output_contract": "",
52
+ "inject_bounding_tags": "Insert immediately after the YAML frontmatter (line 11):\n\n<inputs>\n <input name=\"user_input\" required=\"true\">Free-text user request describing actor, domain, job-to-be-done, or trigger.</input>\n <input name=\"existing_seed_path\" required=\"false\">Absolute or repo-relative path to `specs/_product/flows/flows-product.md` if already populated.</input>\n <input name=\"existing_index_path\" required=\"false\">Absolute or repo-relative path to `specs/_product/flows/index.md`.</input>\n</inputs>\n\n<outputs>\n <output name=\"flow_file_path\" type=\"string\">Path to the newly authored `flows-<domain>.md`.</output>\n <output name=\"index_rows_added\" type=\"integer\">Count of rows appended to index.md.</output>\n <output name=\"flow_id\" type=\"string\">Assigned FLOW-NN identifier matching `^FLOW-\\d{2,}$`.</output>\n</outputs>",
53
+ "inject_cache_breakpoint": "Insert as the final block before </edge_case_handling> closing tag, after all static instructions:\n\n<runtime_payload>\n <!-- Dynamic content injected per invocation lives below this line. -->\n <!-- Static prefix above is shared across all calls; KV-cache breakpoint here. -->\n <user_turn />\n</runtime_payload>\n\nAlso restructure line ordering: move <edge_case_handling> BEFORE <workflow> so the static rule block precedes the workflow narrative, maximizing prefix-cache hit rate."
54
+ }
55
+ }
@@ -0,0 +1,8 @@
1
+ # PyPI API token for `mise run publish`.
2
+ #
3
+ # Generate at https://pypi.org/manage/account/token/
4
+ # - Scope the token to the `deviatdd` project only (not account-wide)
5
+ # - Copy this file to `.env` and paste your real token
6
+ # - `.env` is gitignored; never commit secrets
7
+
8
+ PYPI_API_TOKEN=
@@ -0,0 +1,5 @@
1
+ # DeviaTDD append-only JSONL ledgers: union-merge so concurrent
2
+ # appends never conflict at branch-merge time.
3
+ # See specs/constitution.md §1 Append-Only Ledger Protocol.
4
+ specs/issues.jsonl merge=union
5
+ specs/**/tasks.jsonl merge=union
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env bash
2
+ # Pre-commit: lint + format-check only the Python files touched by this commit.
3
+ # Tests stay in pre-push — even filtered, pytest on every commit is too slow.
4
+ #
5
+ # Portable to bash 3.2 (macOS /bin/bash): no `mapfile`, no `declare -A`, etc.
6
+ set -e
7
+ set -o pipefail
8
+
9
+ # Unset git env inherited from the hook context. Tests in this repo invoke
10
+ # git subprocesses with cwd for isolation; GIT_DIR overrides cwd.
11
+ GIT_DIR_SAVED="${GIT_DIR-}"
12
+ unset GIT_DIR
13
+
14
+ trap '[ -n "$GIT_DIR_SAVED" ] && export GIT_DIR="$GIT_DIR_SAVED" || unset GIT_DIR' EXIT
15
+
16
+ # Collect staged + unstaged Python files (Added/Copied/Modified/Renamed).
17
+ # Untracked and Deleted files are skipped — no content to check.
18
+ changed=()
19
+ while IFS= read -r f; do
20
+ [ -n "$f" ] && changed+=("$f")
21
+ done < <(
22
+ {
23
+ git diff --cached --name-only --diff-filter=ACMR HEAD -- '*.py' 2>/dev/null
24
+ git diff --name-only --diff-filter=ACMR -- '*.py' 2>/dev/null
25
+ } | sort -u
26
+ )
27
+
28
+ if [ "${#changed[@]}" -eq 0 ]; then
29
+ exit 0
30
+ fi
31
+
32
+ uv run ruff check "${changed[@]}"
33
+ uv run ruff format --check "${changed[@]}"
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env bash
2
+ # Pre-push: lint + format-check + selective pytest on the Python files
3
+ # changed since the upstream branch (or HEAD~1 if no upstream yet).
4
+ # `mise run test` stays the canonical full-suite command for CI / pre-release.
5
+ #
6
+ # Portable to bash 3.2 (macOS /bin/bash): no `mapfile`, no `declare -A`, etc.
7
+ set -e
8
+ set -o pipefail
9
+
10
+ # Unset git env inherited from the hook context. Tests in this repo invoke
11
+ # git subprocesses with cwd for isolation; GIT_DIR overrides cwd.
12
+ GIT_DIR_SAVED="${GIT_DIR-}"
13
+ unset GIT_DIR
14
+
15
+ trap '[ -n "$GIT_DIR_SAVED" ] && export GIT_DIR="$GIT_DIR_SAVED" || unset GIT_DIR' EXIT
16
+
17
+ # Pick a base: upstream if we have one, else the previous commit.
18
+ if upstream=$(git rev-parse --verify --quiet '@{u}' 2>/dev/null); then
19
+ base=$(git merge-base "$upstream" HEAD)
20
+ elif base=$(git rev-parse --verify --quiet 'HEAD~1' 2>/dev/null); then
21
+ :
22
+ else
23
+ # No upstream, no parent — nothing to compare against.
24
+ exit 0
25
+ fi
26
+
27
+ changed=()
28
+ while IFS= read -r f; do
29
+ [ -n "$f" ] && changed+=("$f")
30
+ done < <(git diff --name-only --diff-filter=ACMR "$base...HEAD" -- '*.py' | sort -u)
31
+
32
+ if [ "${#changed[@]}" -eq 0 ]; then
33
+ exit 0
34
+ fi
35
+
36
+ uv run ruff check "${changed[@]}"
37
+ uv run ruff format --check "${changed[@]}"
38
+
39
+ # testmon forceselect requires a warm .testmondata from a prior full-suite
40
+ # run. Without it, testmon selects zero tests and passes silently — defeating
41
+ # the purpose of the pre-push gate. Fall back to the full suite when the
42
+ # data file is missing or empty.
43
+ if [ -s .testmondata ]; then
44
+ mise run test-affected
45
+ else
46
+ echo "pre-push: .testmondata missing or empty — running full suite"
47
+ mise run test
48
+ fi
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report incorrect behavior, a regression, or an error message
4
+ title: "[Bug] "
5
+ labels: ["bug"]
6
+ ---
7
+
8
+ ## Summary
9
+
10
+ <!-- One or two sentences. What broke? What did you observe? -->
11
+
12
+ ## Reproduction
13
+
14
+ <!-- Minimal sequence to reproduce. Include the exact command(s). -->
15
+
16
+ ```bash
17
+ # e.g.
18
+ deviate explore pre "test problem"
19
+ ```
20
+
21
+ ## Expected behavior
22
+
23
+ <!-- What should have happened? -->
24
+
25
+ ## Actual behavior
26
+
27
+ <!-- What actually happened? Paste the exact error / output. -->
28
+
29
+ ```text
30
+ <!-- error / output here -->
31
+ ```
32
+
33
+ ## Environment
34
+
35
+ - DeviaTDD version: `deviate --version`
36
+ - Python version: `python --version`
37
+ - OS:
38
+ - Agent backend (opencode / claude / droid / pi):
39
+
40
+ ## Logs / Context
41
+
42
+ <!-- Paste relevant output, stack traces, or attach `prompts.log` if relevant. -->
43
+ <!-- If the bug is in a CLI subcommand, include the full command and its output. -->
44
+
45
+ ## Acceptance criteria
46
+
47
+ <!-- Optional: what would "fixed" look like? Behavior, error message, exit code. -->
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: Feature request
3
+ about: Propose a new capability for the DeviaTDD framework
4
+ title: "[Feature] "
5
+ labels: ["enhancement"]
6
+ ---
7
+
8
+ ## Problem
9
+
10
+ <!-- What user pain or framework gap does this address? -->
11
+
12
+ ## Proposal
13
+
14
+ <!-- High-level shape of the solution. Be concrete enough that the next person
15
+ can shard it into issues without re-deriving intent. -->
16
+
17
+ ## Layer(s) affected
18
+
19
+ <!-- Tick all that apply. -->
20
+
21
+ - [ ] Macro (Explore / Research / PRD / Shard)
22
+ - [ ] Meso (Specify / Plan / Tasks)
23
+ - [ ] Micro (RED / GREEN / YELLOW / JUDGE / REFACTOR / Execute)
24
+ - [ ] CLI surface (`deviate <subcommand>`)
25
+
26
+ - [ ] Other: ____
27
+
28
+ ## Alternatives considered
29
+
30
+ <!-- What else did you weigh, and why is this preferred? -->
31
+
32
+ ## Acceptance criteria
33
+
34
+ <!-- Concrete, verifiable outcomes that mean "done". Numbered so they can be
35
+ referenced from a follow-up issue. -->
36
+
37
+ - [ ] AC-1:
38
+ - [ ] AC-2:
39
+ - [ ] AC-3:
40
+
41
+ ## Spec alignment
42
+
43
+ <!-- If the change touches CLI shape or phase workflow, the corresponding
44
+ section in `specs/DeviaTDD-api.md` or `specs/DeviaTDD-architecture.md`
45
+ must be updated in the same commit. -->
@@ -0,0 +1,42 @@
1
+ ## Summary
2
+
3
+ <!-- 1–3 bullets. What changed and why. -->
4
+
5
+ -
6
+
7
+ ## Related
8
+
9
+ <!-- Issue(s), spec file(s), task ID(s). Use "Fixes #N" / "Refs #N" syntax. -->
10
+
11
+ -
12
+
13
+ ## Phase
14
+
15
+ <!-- Tick the TDD phase this PR resolves (or "non-TDD" for chores/docs). -->
16
+
17
+ - [ ] RED — failing test added
18
+ - [ ] GREEN — minimum implementation
19
+ - [ ] REFACTOR — cleanup (no behavior change)
20
+ - [ ] Non-TDD: chore / docs / ci
21
+
22
+ ## Validation
23
+
24
+ <!-- Run these locally before requesting review. CI runs the same gates. -->
25
+
26
+ - [ ] `mise run check` (lint + format-check) passes locally
27
+ - [ ] `mise run test` (pytest) passes locally
28
+ - [ ] `mise run test-e2e` (bats) passes locally (if CLI behavior changed)
29
+ - [ ] New tests added for behavior changes
30
+
31
+ ## Spec alignment
32
+
33
+ <!-- Confirm spec docs were updated in the same commit, if applicable. -->
34
+
35
+ - [ ] `specs/DeviaTDD-api.md` reflects the change (CLI surface)
36
+ - [ ] `specs/DeviaTDD-architecture.md` reflects the change (phase workflow, routing)
37
+ - [ ] `specs/constitution.md` reflects the change (governance / invariants)
38
+ - [ ] `CHANGELOG.md` updated under `[Unreleased]`
39
+
40
+ ## Risk & rollback
41
+
42
+ <!-- One or two sentences. How reversible is this? Any breaking changes? -->
@@ -0,0 +1,80 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ # Cancel in-progress runs for the same ref when a new commit lands.
10
+ concurrency:
11
+ group: ci-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ # Lint + format-check + pytest on a single Python 3.13 runner.
19
+ # Sequential rather than matrix because `uv sync` + cache restore dominate
20
+ # setup cost; matrix fan-out would multiply that without meaningful speedup.
21
+ quality:
22
+ name: Lint / Format / Test
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@v6
29
+ with:
30
+ python-version: "3.13"
31
+ enable-cache: true
32
+ cache-dependency-glob: "uv.lock"
33
+
34
+ - name: Sync dev dependencies
35
+ run: uv sync --extra dev
36
+
37
+ - name: Lint (ruff check)
38
+ run: uv run ruff check
39
+
40
+ - name: Format check (ruff format --check)
41
+ run: uv run ruff format --check
42
+
43
+ - name: Test (pytest)
44
+ # --testmon-noselect pins full-suite behavior so testmon selection never silently narrows CI.
45
+ run: uv run pytest --testmon-noselect tests/
46
+
47
+ # Bats end-to-end smoke suite. Installs the package as a real CLI tool
48
+ # (`uv tool install --editable`) so the smoke suite exercises the installed
49
+ # binary, not the in-repo module — closer to what users actually run.
50
+ e2e:
51
+ name: E2E (bats)
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+
56
+ - name: Install uv
57
+ uses: astral-sh/setup-uv@v6
58
+ with:
59
+ python-version: "3.13"
60
+ enable-cache: true
61
+ cache-dependency-glob: "uv.lock"
62
+
63
+ - name: Sync dev dependencies
64
+ run: uv sync --extra dev
65
+
66
+ - name: Install bats + jq
67
+ run: sudo apt-get update && sudo apt-get install -y --no-install-recommends bats jq
68
+
69
+ - name: Install deviate CLI (editable)
70
+ run: uv tool install --editable .
71
+
72
+ - name: Run bats smoke suite
73
+ # Force `deviate` onto PATH for this step; `uv tool install` puts it in
74
+ # a uv-managed directory that GitHub Actions does not expose by default.
75
+ run: |
76
+ set -euo pipefail
77
+ export PATH="$(uv tool dir --bin):$PATH"
78
+ which deviate
79
+ deviate --version
80
+ bats tests/e2e/
@@ -0,0 +1,38 @@
1
+ node_modules
2
+ package.json
3
+ package-lock.json
4
+ bun.lock
5
+ .worktrees/
6
+
7
+ graphify-out/
8
+ __pycache__/
9
+
10
+ # Tooling
11
+ .rgr
12
+ .tdd-session.json
13
+ .deviate/session.json
14
+ .opencode/index/
15
+ .opencode/codebase-index.json
16
+ node_modules/
17
+
18
+ .deviate/artifacts/
19
+ .deviate/logs/
20
+ .deviate/review/
21
+ */commands/deviate-*.md
22
+
23
+ */prompts/deviate-*.md
24
+
25
+ # Allow OMP slash commands — installed to .omp/prompts/ by deviate setup
26
+ !/.omp/prompts/deviate-*.md
27
+
28
+ # Internal launch prep notes
29
+ .launch/
30
+
31
+ # pytest-testmon selection data + SQLite WAL sidecars (regenerated by `mise run test` / `mise run test-affected`)
32
+ .testmondata*
33
+
34
+ # Local secrets — used by `mise run publish` for PYPI_API_TOKEN.
35
+ # `.env.example` is committed as a template; never commit the real `.env`.
36
+ .env
37
+ .env.*
38
+ !.env.example
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ package.json
3
+ package-lock.json
4
+ bun.lock
5
+ .gitignore
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "plugin": []
4
+ }
@@ -0,0 +1 @@
1
+ CLAUDE.md