quality-studio 0.0.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 (328) hide show
  1. quality_studio-0.0.1/.claude/skills/.shared/simplicity-principals.md +68 -0
  2. quality_studio-0.0.1/.claude/skills/backend-error-guard/SKILL.md +219 -0
  3. quality_studio-0.0.1/.claude/skills/backlog-author/SKILL.md +276 -0
  4. quality_studio-0.0.1/.claude/skills/backlog-author/references/bug-format.md +168 -0
  5. quality_studio-0.0.1/.claude/skills/backlog-author/references/feature-format.md +236 -0
  6. quality_studio-0.0.1/.claude/skills/backlog-author/references/output-format.md +104 -0
  7. quality_studio-0.0.1/.claude/skills/backlog-author/references/task-format.md +215 -0
  8. quality_studio-0.0.1/.claude/skills/backlog-executor/SKILL.md +393 -0
  9. quality_studio-0.0.1/.claude/skills/bugbuster/SKILL.md +162 -0
  10. quality_studio-0.0.1/.claude/skills/doc-writer/SKILL.md +130 -0
  11. quality_studio-0.0.1/.claude/skills/doc-writer/references/api-reference-template.md +140 -0
  12. quality_studio-0.0.1/.claude/skills/doc-writer/references/audit-criteria.md +134 -0
  13. quality_studio-0.0.1/.claude/skills/doc-writer/references/doc-targets.md +97 -0
  14. quality_studio-0.0.1/.claude/skills/doc-writer/references/document-standards.md +122 -0
  15. quality_studio-0.0.1/.claude/skills/epic-executor/SKILL.md +293 -0
  16. quality_studio-0.0.1/.claude/skills/integration-runner/SKILL.md +101 -0
  17. quality_studio-0.0.1/.claude/skills/integration-runner/references/documentation-traceability.md +39 -0
  18. quality_studio-0.0.1/.claude/skills/integration-runner/references/repo-paths.md +41 -0
  19. quality_studio-0.0.1/.claude/skills/integration-runner/references/report-templates.md +90 -0
  20. quality_studio-0.0.1/.claude/skills/product-advisor/SKILL.md +359 -0
  21. quality_studio-0.0.1/.claude/skills/python-agent/SKILL.md +258 -0
  22. quality_studio-0.0.1/.claude/skills/python-agent/references/environment.md +262 -0
  23. quality_studio-0.0.1/.claude/skills/python-agent/references/mitigations.md +235 -0
  24. quality_studio-0.0.1/.claude/skills/solution-designer/SKILL.md +331 -0
  25. quality_studio-0.0.1/.claude/skills/tech-auditor/SKILL.md +516 -0
  26. quality_studio-0.0.1/.claude/skills/test-author/SKILL.md +144 -0
  27. quality_studio-0.0.1/.claude/skills/test-author/agents/openai.yaml +7 -0
  28. quality_studio-0.0.1/.claude/skills/test-author/references/integration-authoring-rules.md +159 -0
  29. quality_studio-0.0.1/.claude/skills/test-author/references/output-formats.md +235 -0
  30. quality_studio-0.0.1/.claude/skills/test-author/references/repo-paths.md +63 -0
  31. quality_studio-0.0.1/.claude/skills/test-author/references/step-design-rules.md +166 -0
  32. quality_studio-0.0.1/.claude/skills/test-runner/SKILL.md +165 -0
  33. quality_studio-0.0.1/.claude/skills/test-runner/agents/openai.yaml +8 -0
  34. quality_studio-0.0.1/.claude/skills/test-runner/references/documentation-traceability.md +50 -0
  35. quality_studio-0.0.1/.claude/skills/test-runner/references/repo-paths.md +40 -0
  36. quality_studio-0.0.1/.claude/skills/test-runner/references/report-templates.md +108 -0
  37. quality_studio-0.0.1/.github/workflows/lint.yml +40 -0
  38. quality_studio-0.0.1/.github/workflows/release.yml +209 -0
  39. quality_studio-0.0.1/.github/workflows/tests.yml +149 -0
  40. quality_studio-0.0.1/.github/workflows/www-build.yml +56 -0
  41. quality_studio-0.0.1/.gitignore +23 -0
  42. quality_studio-0.0.1/Dockerfile.backend +17 -0
  43. quality_studio-0.0.1/PKG-INFO +38 -0
  44. quality_studio-0.0.1/README.md +12 -0
  45. quality_studio-0.0.1/docker-compose.yml +69 -0
  46. quality_studio-0.0.1/docs/cli-reference.md +201 -0
  47. quality_studio-0.0.1/docs/definitions-editor.md +181 -0
  48. quality_studio-0.0.1/docs/di-demo-walkthrough.md +329 -0
  49. quality_studio-0.0.1/docs/generation-triggers.md +259 -0
  50. quality_studio-0.0.1/docs/lenses-and-personas.md +99 -0
  51. quality_studio-0.0.1/docs/multi-target.md +256 -0
  52. quality_studio-0.0.1/docs/overview.md +41 -0
  53. quality_studio-0.0.1/docs/self-bootstrap.md +175 -0
  54. quality_studio-0.0.1/docs/shipped-skills.md +35 -0
  55. quality_studio-0.0.1/docs/target-repo-contract.md +115 -0
  56. quality_studio-0.0.1/docs/users-guide.md +696 -0
  57. quality_studio-0.0.1/project/design-doc.md +737 -0
  58. quality_studio-0.0.1/project/discussions/journey-composition-model/v1.0.md +1094 -0
  59. quality_studio-0.0.1/project/discussions/ui-generation-trigger/v1.0.md +193 -0
  60. quality_studio-0.0.1/project/discussions/ui-target-selector/v1.0.md +452 -0
  61. quality_studio-0.0.1/project/requirements-and-design/new-design/Quality Studio - Directions.dc.html +473 -0
  62. quality_studio-0.0.1/project/requirements-and-design/new-design/Quality Studio.dc.html +744 -0
  63. quality_studio-0.0.1/project/requirements-and-design/new-design/README.md +336 -0
  64. quality_studio-0.0.1/project/requirements-and-design/new-design/globals.css +90 -0
  65. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/01-dark.png +0 -0
  66. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/01-light.png +0 -0
  67. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/02-dark.png +0 -0
  68. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/02-light.png +0 -0
  69. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/03-dark.png +0 -0
  70. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/03-light.png +0 -0
  71. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/04-dark.png +0 -0
  72. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/04-light.png +0 -0
  73. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/05-dark.png +0 -0
  74. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/05-light.png +0 -0
  75. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/06-dark.png +0 -0
  76. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/06-light.png +0 -0
  77. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/07-dark.png +0 -0
  78. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/07-light.png +0 -0
  79. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/08-dark.png +0 -0
  80. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/08-light.png +0 -0
  81. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/09-dark.png +0 -0
  82. quality_studio-0.0.1/project/requirements-and-design/new-design/screenshots/09-light.png +0 -0
  83. quality_studio-0.0.1/project/requirements-and-design/new-design/support.js +1567 -0
  84. quality_studio-0.0.1/project/requirements-and-design/new-design/tailwind.config.ts +54 -0
  85. quality_studio-0.0.1/project/requirements-and-design/v1.0.md +599 -0
  86. quality_studio-0.0.1/project/requirements-and-design/v1.1.md +268 -0
  87. quality_studio-0.0.1/project/requirements-and-design/v2.0.md +273 -0
  88. quality_studio-0.0.1/pyproject.toml +98 -0
  89. quality_studio-0.0.1/quality.toml +76 -0
  90. quality_studio-0.0.1/scripts/agnosticism_lint.py +106 -0
  91. quality_studio-0.0.1/scripts/boundary_lint.py +152 -0
  92. quality_studio-0.0.1/skills/qs-author/SKILL.md +70 -0
  93. quality_studio-0.0.1/skills/qs-runs/SKILL.md +63 -0
  94. quality_studio-0.0.1/src/quality_studio/__init__.py +1 -0
  95. quality_studio-0.0.1/src/quality_studio/backend/__init__.py +15 -0
  96. quality_studio-0.0.1/src/quality_studio/backend/__main__.py +6 -0
  97. quality_studio-0.0.1/src/quality_studio/backend/api/__init__.py +6 -0
  98. quality_studio-0.0.1/src/quality_studio/backend/api/_deps.py +77 -0
  99. quality_studio-0.0.1/src/quality_studio/backend/api/catalog.py +160 -0
  100. quality_studio-0.0.1/src/quality_studio/backend/api/changesets.py +103 -0
  101. quality_studio-0.0.1/src/quality_studio/backend/api/coverage.py +103 -0
  102. quality_studio-0.0.1/src/quality_studio/backend/api/data.py +148 -0
  103. quality_studio-0.0.1/src/quality_studio/backend/api/generation.py +126 -0
  104. quality_studio-0.0.1/src/quality_studio/backend/api/generation_stream.py +225 -0
  105. quality_studio-0.0.1/src/quality_studio/backend/api/generation_trigger.py +413 -0
  106. quality_studio-0.0.1/src/quality_studio/backend/api/health.py +110 -0
  107. quality_studio-0.0.1/src/quality_studio/backend/api/history.py +51 -0
  108. quality_studio-0.0.1/src/quality_studio/backend/api/issues.py +44 -0
  109. quality_studio-0.0.1/src/quality_studio/backend/api/journeys.py +186 -0
  110. quality_studio-0.0.1/src/quality_studio/backend/api/runs.py +210 -0
  111. quality_studio-0.0.1/src/quality_studio/backend/api/status.py +142 -0
  112. quality_studio-0.0.1/src/quality_studio/backend/api/steps.py +152 -0
  113. quality_studio-0.0.1/src/quality_studio/backend/api/target_config.py +547 -0
  114. quality_studio-0.0.1/src/quality_studio/backend/api/target_toml.py +449 -0
  115. quality_studio-0.0.1/src/quality_studio/backend/api/targets.py +44 -0
  116. quality_studio-0.0.1/src/quality_studio/backend/main.py +374 -0
  117. quality_studio-0.0.1/src/quality_studio/backend/state.py +141 -0
  118. quality_studio-0.0.1/src/quality_studio/cli.py +1703 -0
  119. quality_studio-0.0.1/src/quality_studio/config.py +320 -0
  120. quality_studio-0.0.1/src/quality_studio/coverage.py +225 -0
  121. quality_studio-0.0.1/src/quality_studio/customization.py +100 -0
  122. quality_studio-0.0.1/src/quality_studio/db.py +432 -0
  123. quality_studio-0.0.1/src/quality_studio/definitions.py +290 -0
  124. quality_studio-0.0.1/src/quality_studio/generation/__init__.py +60 -0
  125. quality_studio-0.0.1/src/quality_studio/generation/anthropic_client.py +395 -0
  126. quality_studio-0.0.1/src/quality_studio/generation/cli_driver.py +324 -0
  127. quality_studio-0.0.1/src/quality_studio/generation/context.py +267 -0
  128. quality_studio-0.0.1/src/quality_studio/generation/driver_resolver.py +127 -0
  129. quality_studio-0.0.1/src/quality_studio/generation/pr_diff.py +357 -0
  130. quality_studio-0.0.1/src/quality_studio/generation/progress_log.py +308 -0
  131. quality_studio-0.0.1/src/quality_studio/generation/prompts/_voice.md +57 -0
  132. quality_studio-0.0.1/src/quality_studio/generation/prompts/data_author/component.md +33 -0
  133. quality_studio-0.0.1/src/quality_studio/generation/prompts/data_author/coverage.md +33 -0
  134. quality_studio-0.0.1/src/quality_studio/generation/prompts/data_author/live.md +33 -0
  135. quality_studio-0.0.1/src/quality_studio/generation/prompts/data_author/process.md +33 -0
  136. quality_studio-0.0.1/src/quality_studio/generation/prompts/journey_author/component.md +36 -0
  137. quality_studio-0.0.1/src/quality_studio/generation/prompts/journey_author/coverage.md +36 -0
  138. quality_studio-0.0.1/src/quality_studio/generation/prompts/journey_author/live.md +36 -0
  139. quality_studio-0.0.1/src/quality_studio/generation/prompts/journey_author/process.md +36 -0
  140. quality_studio-0.0.1/src/quality_studio/generation/prompts/step_author/component.md +56 -0
  141. quality_studio-0.0.1/src/quality_studio/generation/prompts/step_author/coverage.md +39 -0
  142. quality_studio-0.0.1/src/quality_studio/generation/prompts/step_author/live.md +39 -0
  143. quality_studio-0.0.1/src/quality_studio/generation/prompts/step_author/process.md +39 -0
  144. quality_studio-0.0.1/src/quality_studio/generation/registry.py +185 -0
  145. quality_studio-0.0.1/src/quality_studio/generation/runner.py +647 -0
  146. quality_studio-0.0.1/src/quality_studio/generation/validators.py +174 -0
  147. quality_studio-0.0.1/src/quality_studio/generation/version_guard.py +122 -0
  148. quality_studio-0.0.1/src/quality_studio/github.py +107 -0
  149. quality_studio-0.0.1/src/quality_studio/history.py +142 -0
  150. quality_studio-0.0.1/src/quality_studio/issues.py +485 -0
  151. quality_studio-0.0.1/src/quality_studio/manage_compose.py +160 -0
  152. quality_studio-0.0.1/src/quality_studio/migrations/001_initial.sql +319 -0
  153. quality_studio-0.0.1/src/quality_studio/migrations/002_generation_driver.sql +13 -0
  154. quality_studio-0.0.1/src/quality_studio/migrations/003_quality_meta.sql +99 -0
  155. quality_studio-0.0.1/src/quality_studio/migrations/005_user_stories.sql +75 -0
  156. quality_studio-0.0.1/src/quality_studio/migrations/006_target_config_audit.sql +27 -0
  157. quality_studio-0.0.1/src/quality_studio/migrations/007_host_repo_path.sql +17 -0
  158. quality_studio-0.0.1/src/quality_studio/migrations/008_generation_progress_log.sql +26 -0
  159. quality_studio-0.0.1/src/quality_studio/migrations/009_generation_run_open_state.sql +38 -0
  160. quality_studio-0.0.1/src/quality_studio/migrations/010_journey_composition_spine.sql +225 -0
  161. quality_studio-0.0.1/src/quality_studio/migrations/__init__.py +0 -0
  162. quality_studio-0.0.1/src/quality_studio/runs.py +784 -0
  163. quality_studio-0.0.1/src/quality_studio/services.py +915 -0
  164. quality_studio-0.0.1/src/quality_studio/skills.py +160 -0
  165. quality_studio-0.0.1/src/quality_studio/target_repo.py +78 -0
  166. quality_studio-0.0.1/src/quality_studio/target_toml_writer.py +262 -0
  167. quality_studio-0.0.1/src/quality_studio/targets.py +391 -0
  168. quality_studio-0.0.1/src/quality_studio/validate.py +508 -0
  169. quality_studio-0.0.1/src/quality_studio/yaml_io.py +207 -0
  170. quality_studio-0.0.1/tests/CONVENTIONS.md +94 -0
  171. quality_studio-0.0.1/tests/__init__.py +0 -0
  172. quality_studio-0.0.1/tests/contract/__init__.py +0 -0
  173. quality_studio-0.0.1/tests/contract/test_002_migration.py +130 -0
  174. quality_studio-0.0.1/tests/contract/test_003_quality_meta.py +177 -0
  175. quality_studio-0.0.1/tests/contract/test_006_config_audit.py +145 -0
  176. quality_studio-0.0.1/tests/contract/test_010_journey_spine.py +226 -0
  177. quality_studio-0.0.1/tests/contract/test_backend_cors.py +88 -0
  178. quality_studio-0.0.1/tests/contract/test_backend_health.py +184 -0
  179. quality_studio-0.0.1/tests/contract/test_backend_runs_data.py +335 -0
  180. quality_studio-0.0.1/tests/contract/test_baseline_rules_v3.py +181 -0
  181. quality_studio-0.0.1/tests/contract/test_catalog_step_journey_api.py +177 -0
  182. quality_studio-0.0.1/tests/contract/test_cors_preflight_for_all_writes.py +104 -0
  183. quality_studio-0.0.1/tests/contract/test_coverage_cli.py +239 -0
  184. quality_studio-0.0.1/tests/contract/test_customization_rules.py +255 -0
  185. quality_studio-0.0.1/tests/contract/test_definitions_endpoints.py +234 -0
  186. quality_studio-0.0.1/tests/contract/test_export_apply_roundtrip.py +167 -0
  187. quality_studio-0.0.1/tests/contract/test_generate_cli.py +334 -0
  188. quality_studio-0.0.1/tests/contract/test_generation_runner.py +413 -0
  189. quality_studio-0.0.1/tests/contract/test_generation_runs_writer.py +170 -0
  190. quality_studio-0.0.1/tests/contract/test_generation_sse_stream.py +432 -0
  191. quality_studio-0.0.1/tests/contract/test_generation_steps_journeys.py +233 -0
  192. quality_studio-0.0.1/tests/contract/test_generation_trigger_post.py +533 -0
  193. quality_studio-0.0.1/tests/contract/test_init_auto_registers.py +172 -0
  194. quality_studio-0.0.1/tests/contract/test_init_cli.py +251 -0
  195. quality_studio-0.0.1/tests/contract/test_init_command.py +102 -0
  196. quality_studio-0.0.1/tests/contract/test_install_skills_cli.py +63 -0
  197. quality_studio-0.0.1/tests/contract/test_issues_cli.py +380 -0
  198. quality_studio-0.0.1/tests/contract/test_journey_coverage.py +156 -0
  199. quality_studio-0.0.1/tests/contract/test_journey_cycle_rejection.py +122 -0
  200. quality_studio-0.0.1/tests/contract/test_progress_log_writes.py +294 -0
  201. quality_studio-0.0.1/tests/contract/test_runs_failures_api.py +214 -0
  202. quality_studio-0.0.1/tests/contract/test_runs_ingest.py +383 -0
  203. quality_studio-0.0.1/tests/contract/test_runs_trigger_coverage.py +466 -0
  204. quality_studio-0.0.1/tests/contract/test_self_bootstrap.py +41 -0
  205. quality_studio-0.0.1/tests/contract/test_services_history.py +320 -0
  206. quality_studio-0.0.1/tests/contract/test_services_step_journey.py +189 -0
  207. quality_studio-0.0.1/tests/contract/test_status_endpoint.py +206 -0
  208. quality_studio-0.0.1/tests/contract/test_target_config_endpoints.py +301 -0
  209. quality_studio-0.0.1/tests/contract/test_target_toml_endpoints.py +412 -0
  210. quality_studio-0.0.1/tests/contract/test_targets_api_endpoint.py +337 -0
  211. quality_studio-0.0.1/tests/contract/test_targets_cli_e2e.py +242 -0
  212. quality_studio-0.0.1/tests/contract/test_targets_route_prefix.py +228 -0
  213. quality_studio-0.0.1/tests/contract/test_validate_rules.py +371 -0
  214. quality_studio-0.0.1/tests/fixtures/minimal_target/conftest.py +13 -0
  215. quality_studio-0.0.1/tests/fixtures/minimal_target/quality.toml +44 -0
  216. quality_studio-0.0.1/tests/fixtures/minimal_target/scripts/fake_integration.sh +31 -0
  217. quality_studio-0.0.1/tests/fixtures/minimal_target/scripts/fake_unit.sh +27 -0
  218. quality_studio-0.0.1/tests/fixtures/minimal_target/src/demo/__init__.py +0 -0
  219. quality_studio-0.0.1/tests/fixtures/minimal_target/src/demo/example.py +13 -0
  220. quality_studio-0.0.1/tests/fixtures/minimal_target/tests/test_demo.py +15 -0
  221. quality_studio-0.0.1/tests/unit/__init__.py +0 -0
  222. quality_studio-0.0.1/tests/unit/test_admin_dsn_resolution.py +61 -0
  223. quality_studio-0.0.1/tests/unit/test_agnosticism_lint.py +79 -0
  224. quality_studio-0.0.1/tests/unit/test_backend_health.py +125 -0
  225. quality_studio-0.0.1/tests/unit/test_backend_state.py +61 -0
  226. quality_studio-0.0.1/tests/unit/test_boundary_lint.py +161 -0
  227. quality_studio-0.0.1/tests/unit/test_cli_driver.py +219 -0
  228. quality_studio-0.0.1/tests/unit/test_cli_help.py +75 -0
  229. quality_studio-0.0.1/tests/unit/test_config.py +174 -0
  230. quality_studio-0.0.1/tests/unit/test_config_generation_driver.py +99 -0
  231. quality_studio-0.0.1/tests/unit/test_customization.py +120 -0
  232. quality_studio-0.0.1/tests/unit/test_db.py +92 -0
  233. quality_studio-0.0.1/tests/unit/test_definitions_module.py +216 -0
  234. quality_studio-0.0.1/tests/unit/test_docs_generation_triggers.py +130 -0
  235. quality_studio-0.0.1/tests/unit/test_docs_invariants.py +144 -0
  236. quality_studio-0.0.1/tests/unit/test_driver_resolver.py +171 -0
  237. quality_studio-0.0.1/tests/unit/test_generation_anthropic_client.py +421 -0
  238. quality_studio-0.0.1/tests/unit/test_generation_context.py +270 -0
  239. quality_studio-0.0.1/tests/unit/test_generation_registry.py +64 -0
  240. quality_studio-0.0.1/tests/unit/test_generation_runner_preflight.py +27 -0
  241. quality_studio-0.0.1/tests/unit/test_generation_validators.py +148 -0
  242. quality_studio-0.0.1/tests/unit/test_init_command.py +111 -0
  243. quality_studio-0.0.1/tests/unit/test_init_slugify.py +79 -0
  244. quality_studio-0.0.1/tests/unit/test_init_target_registration.py +57 -0
  245. quality_studio-0.0.1/tests/unit/test_journey_cycle.py +48 -0
  246. quality_studio-0.0.1/tests/unit/test_manage_compose.py +161 -0
  247. quality_studio-0.0.1/tests/unit/test_pr_diff_module.py +485 -0
  248. quality_studio-0.0.1/tests/unit/test_progress_log_helpers.py +242 -0
  249. quality_studio-0.0.1/tests/unit/test_release_workflow.py +63 -0
  250. quality_studio-0.0.1/tests/unit/test_runs_list_failures.py +48 -0
  251. quality_studio-0.0.1/tests/unit/test_runs_parser.py +116 -0
  252. quality_studio-0.0.1/tests/unit/test_runs_parser_multiformat.py +118 -0
  253. quality_studio-0.0.1/tests/unit/test_services.py +22 -0
  254. quality_studio-0.0.1/tests/unit/test_signature_canonicalization.py +98 -0
  255. quality_studio-0.0.1/tests/unit/test_skills_install.py +168 -0
  256. quality_studio-0.0.1/tests/unit/test_target_registry.py +106 -0
  257. quality_studio-0.0.1/tests/unit/test_target_repo.py +110 -0
  258. quality_studio-0.0.1/tests/unit/test_target_toml_writer.py +220 -0
  259. quality_studio-0.0.1/tests/unit/test_targets_cli.py +134 -0
  260. quality_studio-0.0.1/tests/unit/test_validation_categories.py +101 -0
  261. quality_studio-0.0.1/tests/unit/test_version_guard.py +71 -0
  262. quality_studio-0.0.1/tests/unit/test_www_definitions_editor.py +189 -0
  263. quality_studio-0.0.1/tests/unit/test_www_design_tokens.py +152 -0
  264. quality_studio-0.0.1/tests/unit/test_www_detail_panel.py +62 -0
  265. quality_studio-0.0.1/tests/unit/test_www_no_locale_dependent_dates.py +62 -0
  266. quality_studio-0.0.1/tests/unit/test_www_target_config_route.py +178 -0
  267. quality_studio-0.0.1/tests/unit/test_www_target_switcher.py +119 -0
  268. quality_studio-0.0.1/tests/unit/test_www_toml_section.py +74 -0
  269. quality_studio-0.0.1/tests/unit/test_yaml_io.py +166 -0
  270. quality_studio-0.0.1/tests/unit/test_yaml_io_export.py +82 -0
  271. quality_studio-0.0.1/www/.gitignore +10 -0
  272. quality_studio-0.0.1/www/Dockerfile +25 -0
  273. quality_studio-0.0.1/www/app/config/definitions/page.tsx +76 -0
  274. quality_studio-0.0.1/www/app/failures/page.tsx +185 -0
  275. quality_studio-0.0.1/www/app/generate/generate-wizard.tsx +370 -0
  276. quality_studio-0.0.1/www/app/generate/page.tsx +149 -0
  277. quality_studio-0.0.1/www/app/globals.css +90 -0
  278. quality_studio-0.0.1/www/app/history/page.tsx +166 -0
  279. quality_studio-0.0.1/www/app/layout.tsx +52 -0
  280. quality_studio-0.0.1/www/app/page.tsx +207 -0
  281. quality_studio-0.0.1/www/app/quality/[target_id]/[domain]/checks-table.tsx +82 -0
  282. quality_studio-0.0.1/www/app/quality/[target_id]/[domain]/data/[data_name]/page.tsx +64 -0
  283. quality_studio-0.0.1/www/app/quality/[target_id]/[domain]/data/page.tsx +78 -0
  284. quality_studio-0.0.1/www/app/quality/[target_id]/[domain]/flow-map.tsx +135 -0
  285. quality_studio-0.0.1/www/app/quality/[target_id]/[domain]/page.tsx +287 -0
  286. quality_studio-0.0.1/www/app/quality/[target_id]/config/config-header.tsx +67 -0
  287. quality_studio-0.0.1/www/app/quality/[target_id]/config/definitions/[kind]/[...name]/editor-workspace.tsx +276 -0
  288. quality_studio-0.0.1/www/app/quality/[target_id]/config/definitions/[kind]/[...name]/page.tsx +69 -0
  289. quality_studio-0.0.1/www/app/quality/[target_id]/config/definitions-section.tsx +211 -0
  290. quality_studio-0.0.1/www/app/quality/[target_id]/config/page.tsx +77 -0
  291. quality_studio-0.0.1/www/app/quality/[target_id]/config/recent-audit.tsx +42 -0
  292. quality_studio-0.0.1/www/app/quality/[target_id]/config/rename-dialog.tsx +71 -0
  293. quality_studio-0.0.1/www/app/quality/[target_id]/config/secrets-section.tsx +333 -0
  294. quality_studio-0.0.1/www/app/quality/[target_id]/config/settings-section.tsx +248 -0
  295. quality_studio-0.0.1/www/app/quality/[target_id]/config/toml-section.tsx +426 -0
  296. quality_studio-0.0.1/www/app/quality/[target_id]/page.tsx +94 -0
  297. quality_studio-0.0.1/www/app/runs/[run_id]/page.tsx +200 -0
  298. quality_studio-0.0.1/www/components/code-editor.tsx +63 -0
  299. quality_studio-0.0.1/www/components/command-palette.tsx +377 -0
  300. quality_studio-0.0.1/www/components/copy-button.tsx +48 -0
  301. quality_studio-0.0.1/www/components/dense-table.tsx +140 -0
  302. quality_studio-0.0.1/www/components/detail-panel.tsx +452 -0
  303. quality_studio-0.0.1/www/components/diff-panel.tsx +69 -0
  304. quality_studio-0.0.1/www/components/failing-check-row.tsx +81 -0
  305. quality_studio-0.0.1/www/components/filter-strip.tsx +121 -0
  306. quality_studio-0.0.1/www/components/project-data.tsx +181 -0
  307. quality_studio-0.0.1/www/components/relative-time.tsx +26 -0
  308. quality_studio-0.0.1/www/components/shell.tsx +39 -0
  309. quality_studio-0.0.1/www/components/sidebar.tsx +275 -0
  310. quality_studio-0.0.1/www/components/theme-toggle.tsx +39 -0
  311. quality_studio-0.0.1/www/components/top-bar.tsx +92 -0
  312. quality_studio-0.0.1/www/e2e/redesign.spec.ts +84 -0
  313. quality_studio-0.0.1/www/lib/api.ts +638 -0
  314. quality_studio-0.0.1/www/lib/derive.ts +231 -0
  315. quality_studio-0.0.1/www/lib/format.ts +42 -0
  316. quality_studio-0.0.1/www/lib/project.ts +39 -0
  317. quality_studio-0.0.1/www/lib/targets.ts +59 -0
  318. quality_studio-0.0.1/www/lib/ui.ts +138 -0
  319. quality_studio-0.0.1/www/middleware.ts +69 -0
  320. quality_studio-0.0.1/www/next-env.d.ts +5 -0
  321. quality_studio-0.0.1/www/next.config.mjs +9 -0
  322. quality_studio-0.0.1/www/package-lock.json +1800 -0
  323. quality_studio-0.0.1/www/package.json +28 -0
  324. quality_studio-0.0.1/www/playwright.config.ts +20 -0
  325. quality_studio-0.0.1/www/postcss.config.mjs +6 -0
  326. quality_studio-0.0.1/www/public/.gitkeep +0 -0
  327. quality_studio-0.0.1/www/tailwind.config.ts +54 -0
  328. quality_studio-0.0.1/www/tsconfig.json +24 -0
@@ -0,0 +1,68 @@
1
+ # Simplicity Principles
2
+
3
+ > "Simplicity is the ultimate sophistication" — the north star for every change
4
+ > made to this codebase.
5
+
6
+ Simplicity is not about fewer lines of code. It is about **fewer concepts**,
7
+ **predictable flows**, and **easy reversal**. Complexity is debt — every
8
+ abstraction is a bet that we understand the problem space. Start simple. Add
9
+ complexity only when forced by real requirements. Keep the escape hatches open.
10
+
11
+ ---
12
+
13
+ ## Core Rules
14
+
15
+ | Rule | What it means in practice |
16
+ |------|--------------------------|
17
+ | **One thing per file** | Each file should do one thing and be findable in under 10 seconds. If a file is growing, it is probably doing too much — split it. |
18
+ | **Domains own their folders** | Folder structure reflects domain boundaries, not framework conventions. If a folder needs a README to explain its structure, simplify the structure instead. |
19
+ | **Standardise the stack** | Reuse before you build. Use the established patterns, hooks, helpers, and abstractions that already exist. Introduce new ones only when the existing toolset genuinely cannot solve the problem. |
20
+ | **Push complexity to the edges** | Business rules in pure functions. I/O at the boundaries. Minimal logic inside framework callbacks, route handlers, or render functions. |
21
+ | **APIs must be tiny** | Expose the minimum interface needed. Every extra parameter, flag, or overload is a contract that must be maintained forever. |
22
+ | **Resist premature abstraction** | A base class or generic utility with one concrete implementation is not an abstraction — it is indirection. Wait for the second or third real case. |
23
+ | **Keep escape hatches open** | Before adding a pattern, ask: can we delete this later without a large rewrite? If not, simplify until the answer is yes. |
24
+
25
+ ---
26
+
27
+ ## Line Count Policy
28
+
29
+ Line count is a **review trigger, not a completion gate**. A long file can be a
30
+ sign that responsibilities are mixed, but LOC is not a simplicity violation by
31
+ itself. Do not split a cohesive file solely to satisfy a numeric threshold when
32
+ the split would add indirection, create new concepts, scatter one flow across
33
+ files, or make the behavior harder to explain.
34
+
35
+ When a file crosses a LOC trigger, review the actual simplicity criteria:
36
+
37
+ - Does the file still have one clear responsibility?
38
+ - Can the flow still be explained in under 60 seconds?
39
+ - Would a split make the next change easier to find, test, and reverse?
40
+ - Would keeping the file together be simpler than introducing a new boundary?
41
+
42
+ Prefer the simpler design, even when that means accepting a non-blocking LOC
43
+ advisory.
44
+
45
+ ---
46
+
47
+ ## PR Checklist
48
+
49
+ Before any change is complete, verify:
50
+
51
+ - [ ] Can a new dev explain this flow in **< 60 seconds**?
52
+ - [ ] Did we add a **new concept**? If yes, it must be justified by a real requirement.
53
+ - [ ] Can we **delete this later** easily?
54
+ - [ ] Are **errors observable in one place**?
55
+
56
+ ---
57
+
58
+ ## Applying These Principles
59
+
60
+ Every skill in this repository enforces the simplicity standard at its quality
61
+ gate. When delivering work — whether implementing, reviewing, auditing, or
62
+ planning — apply these questions before finalising output:
63
+
64
+ 1. Is there a simpler way to achieve the same outcome?
65
+ 2. Does this introduce a concept that does not already exist in the codebase?
66
+ 3. Will a colleague be able to modify or remove this safely in six months?
67
+ 4. If this fails, will the failure be obvious and localised?
68
+
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: backend-error-guard
3
+ description: >
4
+ Audit and improve backend and infrastructure error handling in the
5
+ qa-studio codebase. Use when reviewing FastAPI routes (backend/api/), the
6
+ change-set + history write path (services.py, history.py), Anthropic SDK
7
+ retries (generation/anthropic_client.py), GitHub auto-issue creation
8
+ (issues.py, github.py), junit-xml ingest (runs.py), Docker exit behavior,
9
+ and CI failures. Produces a prioritized findings report — does not modify
10
+ code.
11
+ tool_hints:
12
+ - "Every finding must cite a concrete file:line in src/quality_studio/"
13
+ - "Treat the change-set wrapper as non-negotiable — flag any write path that bypasses services.py"
14
+ - "Anthropic and GitHub clients already retry; do not recommend a second retry layer"
15
+ - "No code changes — output is the audit report only"
16
+ composition_hints:
17
+ - "Pair with backlog-author to file findings as GitHub Issues, then backlog-executor for delivery"
18
+ - "Pair with python-agent to implement fixes after the audit is reviewed (via backlog-executor)"
19
+ - "Pair with bugbuster when a specific failing test or traceback motivates the audit"
20
+ - "Pair with tech-auditor when the error-handling audit reveals broader architectural concerns"
21
+ ---
22
+
23
+ # Backend Error Guard
24
+
25
+ Audit backend and runtime-layer error handling methodically, then produce a
26
+ prioritized improvement plan grounded in the actual qa-studio architecture.
27
+
28
+ This skill is specialized. Use it when the primary task is error-handling audit,
29
+ hardening, or redesign. For general backend feature work, use `python-agent`.
30
+
31
+ ## Standards Precedence
32
+
33
+ The change-set audit spine takes precedence over generic audit guidance.
34
+
35
+ - The Studio's only write path is through `src/quality_studio/services.py` (records) and the runs/issues writers in `runs.py` / `issues.py`. Errors that bypass the change-set wrapper break audit and time-travel.
36
+ - Anthropic and GitHub clients have retry policies built in (`src/quality_studio/generation/anthropic_client.py`, `src/quality_studio/github.py`); do not wrap them in a second retry layer.
37
+ - Configuration loads through `src/quality_studio/config.py`. Never read `os.environ` directly inside Studio code — use the resolved config object.
38
+ - All errors that abort a `quality` CLI invocation must exit non-zero with a message that names the file path or DB row at fault (CI gates depend on it).
39
+
40
+ ## Primary Audit Scope
41
+
42
+ Review the backend and adjacent runtime layers for:
43
+
44
+ - bare `except:` and broad `except Exception:` blocks
45
+ - swallowed exceptions or logs without tracebacks
46
+ - inconsistent exception-to-response mapping in FastAPI routes and middleware
47
+ - incorrect HTTP status semantics
48
+ - missing or fragmented custom exception hierarchies
49
+ - provider, database, HTTP client, and file-service errors that lose context
50
+ - background or async task failures that are dropped silently
51
+ - health checks that do not reflect real degraded states
52
+ - missing startup validation for required configuration
53
+ - Docker, compose, and CI failures that exit without enough context
54
+
55
+ ## Workflow
56
+
57
+ 1. **Ground in the actual implementation first.**
58
+ - Read the relevant route, service, and support modules before making recommendations.
59
+ - Start with the Studio's primary write path: [src/quality_studio/services.py](src/quality_studio/services.py) and [src/quality_studio/history.py](src/quality_studio/history.py).
60
+ - Inspect external boundaries that can fail: [src/quality_studio/generation/anthropic_client.py](src/quality_studio/generation/anthropic_client.py), [src/quality_studio/github.py](src/quality_studio/github.py), [src/quality_studio/runs.py](src/quality_studio/runs.py) (junit-xml parse + subprocess), [src/quality_studio/target_repo.py](src/quality_studio/target_repo.py) (filesystem reads), [src/quality_studio/db.py](src/quality_studio/db.py) (asyncpg).
61
+ - Inspect Dockerfile, docker-compose.yml, and the CI workflow files for failure modes that exit without enough context.
62
+
63
+ 2. **Audit the current state before proposing fixes.**
64
+ - Search for `except Exception:` and bare `except:` first.
65
+ - Identify where tracebacks are lost because `logger.error(...)` is used
66
+ inside `except` blocks instead of traceback-preserving logging.
67
+ - Check whether request-scoped identifiers such as `request_id` are carried
68
+ into logs and error responses.
69
+ - Distinguish legitimate defensive compatibility wrappers from production
70
+ error-swallowing.
71
+
72
+ 3. **Assess framework-level handling.**
73
+ - Verify whether FastAPI exception handlers or middleware return a consistent
74
+ error shape.
75
+ - Confirm that 4xx versus 5xx behavior matches the failure source.
76
+ - Identify routes that do ad hoc translation instead of relying on a central
77
+ exception mapping strategy.
78
+
79
+ 4. **Assess operational surfacing.**
80
+ - Review startup validation, background task handling, health checks,
81
+ container shutdown behavior, and CI error visibility.
82
+ - Prefer fail-fast startup for missing required config.
83
+ - Flag hidden retries, fallback paths, or shutdown paths that suppress root
84
+ cause context.
85
+
86
+ 5. **Produce the audit deliverables.**
87
+ - Write findings to `docs/audit/error/audit-report.md`.
88
+ - Write the prioritized plan to `docs/audit/error/improvement-plan.md`.
89
+ - If these files already exist, preserve validated content and extend them
90
+ rather than overwriting unrelated sections.
91
+
92
+ ## Audit Output Contract
93
+
94
+ Write the backend findings into `docs/audit/error/audit-report.md` using this
95
+ shape:
96
+
97
+ ```markdown
98
+ ## Audit Report
99
+
100
+ ### Summary
101
+ - Layers reviewed: API / Backend, Infrastructure / Pipeline
102
+ - Total issues found:
103
+ - Critical: / High: / Medium: / Low:
104
+
105
+ ### Findings Table
106
+ | ID | Layer | Location | Issue | Severity | Impact |
107
+ |----|-------|----------|-------|----------|--------|
108
+ ```
109
+
110
+ Rules:
111
+
112
+ - Use stable IDs such as `BE-001`, `INF-002`.
113
+ - `Location` must point to concrete files, modules, endpoints, scripts, or
114
+ runtime assets.
115
+ - `Impact` must explain the operational consequence, not restate the issue.
116
+ - Prioritize evidence-backed findings. Do not speculate.
117
+
118
+ ## Improvement Plan Contract
119
+
120
+ Write the backend plan into `docs/audit/error/improvement-plan.md` using this
121
+ shape:
122
+
123
+ ```markdown
124
+ ## Improvement Plan
125
+
126
+ ### Quick Wins (< 1 day each)
127
+ | ID | Action | Layer | Owner |
128
+ |----|--------|-------|-------|
129
+
130
+ ### Medium-term (1–3 days each)
131
+ | ID | Action | Layer | Owner |
132
+ |----|--------|-------|-------|
133
+
134
+ ### Strategic (requires design/discussion)
135
+ | ID | Action | Layer | Owner |
136
+ |----|--------|-------|-------|
137
+
138
+ ### Recommended Tooling
139
+ - Logging:
140
+ - Monitoring / Alerting:
141
+ - Error tracking:
142
+
143
+ ### Proposed Exception Class Structure
144
+ [Provide a Python code scaffold]
145
+
146
+ ### Success Criteria
147
+ - [ ] No bare except blocks in production code
148
+ - [ ] All API errors follow a consistent response schema
149
+ - [ ] Developers receive traceback + context; users receive safe messages
150
+ - [ ] Background task failures visible in monitoring
151
+ - [ ] Error rates and types tracked in a dashboard
152
+ ```
153
+
154
+ ## Backend Improvement Standards
155
+
156
+ Use these standards when forming recommendations or implementing fixes:
157
+
158
+ - Catch specific exceptions where the code can recover meaningfully.
159
+ - If the code cannot recover, add context and re-raise or let centralized
160
+ handling translate the failure.
161
+ - Prefer traceback-preserving exception logging inside `except` paths.
162
+ - Preserve safe user-facing messages while keeping full internal context in logs.
163
+ - Centralize exception-to-response mapping instead of duplicating response logic
164
+ across route handlers.
165
+ - Standardize on one application-level exception hierarchy for service and API
166
+ failures. Extend existing base types before adding new root classes.
167
+ - Reconcile the ErrorGuard target shape `{ code, message, details?, request_id?,
168
+ trace_id? }` with the current canonical response model before proposing API
169
+ contract changes. Do not create a second competing schema.
170
+ - Ensure third-party failures preserve provider, status, timeout, and retry
171
+ metadata when available.
172
+
173
+ When proposing a scaffold, keep it close to the current codebase shape, for
174
+ example:
175
+
176
+ ```python
177
+ class AppError(Exception):
178
+ code: str
179
+ http_status: int
180
+
181
+
182
+ class ValidationError(AppError): ...
183
+ class NotFoundError(AppError): ...
184
+ class AuthorizationError(AppError): ...
185
+ class ConflictError(AppError): ...
186
+ class ExternalServiceError(AppError): ...
187
+ class TimeoutError(AppError): ...
188
+ ```
189
+
190
+ ## Boundaries With Other Skills
191
+
192
+ - Use `python-agent` for normal backend implementation once the error-handling
193
+ direction is clear.
194
+ - For a specific failing test or traceback, hand off to `test-runner` after the audit narrows the scope.
195
+ - Use `test-author` to design backend error-path tests.
196
+ - Use `test-runner` to execute backend verification and produce test reports.
197
+ - Use `doc-writer` only when the primary task is broader API or operational
198
+ documentation beyond this audit output.
199
+
200
+ ## Operating Style
201
+
202
+ - Highest-impact gaps first.
203
+ - Findings before plan.
204
+ - Evidence before recommendation.
205
+ - Prefer minimal, enforceable standards over broad rewrites.
206
+ - Call out ambiguity explicitly when a recommendation depends on a repository
207
+ decision that has not yet been made.
208
+
209
+ ---
210
+
211
+ ## Simplicity Standard
212
+
213
+ See [`../.shared/simplicity-principals.md`](../.shared/simplicity-principals.md) for the full specification.
214
+
215
+ Apply the PR checklist before finalising any output:
216
+ - [ ] Can a new dev explain this flow in **< 60 seconds**?
217
+ - [ ] Did this add a new concept? If yes, it must be justified.
218
+ - [ ] Can this be deleted later easily?
219
+ - [ ] Are errors observable in one place?
@@ -0,0 +1,276 @@
1
+ ---
2
+ name: backlog-author
3
+ description: >
4
+ Analyze a feature, bug, gap, or implementation request and create a GitHub
5
+ Issue in pixenbio/qa-studio that follows the repository's backlog patterns.
6
+ Use this when the user wants a new backlog item written from repository
7
+ evidence, including title, scope, verified current state, requirements,
8
+ acceptance criteria, and implementation guidance where appropriate. Always
9
+ use the GitHub CLI (`gh`) and prefer `gh api graphql` for issue reads,
10
+ searches, and mutations.
11
+ tool_hints:
12
+ - "Read references/output-format.md and then the linked type-specific format doc before drafting"
13
+ - "Review at least 2-3 similar existing GitHub issues before writing a new one, covering both open and closed issues for prior decisions and scope, not to rediscover the template"
14
+ - "Choose the native GitHub issue type first (Bug, Feature, Task), then use the matching local format reference"
15
+ - "If the local references and the live issue corpus disagree, update the local references first instead of silently following issue drift"
16
+ - "For bug issues, explicitly write how the fix prevents the same bug from happening again and require regression coverage for that failure mode"
17
+ - "For any code-changing issue, require test-author to author/update tests and quality records before test-runner executes them"
18
+ - "For issues that cross the target-agnostic boundary, the change-set audit spine, baseline, or layered configuration, the issue must say so and cite the source files that enforce those invariants (CI lints, services.py, generation/validators.py, config.py)"
19
+ - "For issues that cross contract boundaries (Studio capability against minimal_target), require explicit contract test coverage in tests/contract/"
20
+ - "Separate verified current state from proposed work; do not present speculation as already implemented"
21
+ - "Use repository evidence from src/quality_studio/, www/, tests/, and docs/ before drafting requirements"
22
+ - "During fact generation, share verified facts and open questions with the user and ask concise follow-up questions before finalizing the backlog item when product or scope details remain unclear"
23
+ - "Add a `Skill Routing` section to each new issue body that points to `backlog-executor` plus only the relevant companion skills for the scoped work"
24
+ - "Use `gh api graphql` `createIssue` to create new GitHub issues; never use MCP tools"
25
+ - "Use `gh api graphql` `repository.issue` queries to read existing issues before enrichment"
26
+ - "Use `gh api graphql` mutations (`updateIssue`, `addLabelsToLabelable`, `removeLabelsFromLabelable`) to update issue body and labels"
27
+ - "Use the `v:*` label set on existing GitHub issues to infer v-band targeting; if uncertain, ask the user before filing"
28
+ composition_hints:
29
+ - "Use before implementation when a request is still exploratory, cross-cutting, or needs a durable project record"
30
+ - "Pair with backlog-executor after the item is approved and ready for delivery"
31
+ - "Receive handoffs from solution-designer (fact pack), product-advisor (decision), or bugbuster (confirmed bug)"
32
+ - "Use with doc-writer only if the backlog work requires source-verified documentation changes"
33
+ - "Use in enrich mode when a quality-studio:auto issue (created by `quality runs ingest` on test failure) needs codebase analysis and structured body"
34
+ ---
35
+
36
+ # Backlog Item Creator
37
+
38
+ Create GitHub Issues as backlog items using qa-studio's repository patterns. This skill is for analysis and backlog authoring, not feature implementation.
39
+
40
+ Read [`references/output-format.md`](references/output-format.md) at the start of every task. It defines the active GitHub issue types, required metadata, and links to the type-specific body formats for qa-studio.
41
+
42
+ Before live GitHub reads or mutations, confirm `gh` is installed and authenticated (`gh auth status`). If unavailable, produce a ready-to-run issue payload and exact command instead of retrying live mutations.
43
+
44
+ When authoring a backlog issue that would touch `src/quality_studio/services.py` (change-set + history writes), `src/quality_studio/generation/` (LLM pipeline + JSON-schema enforcement), the target-agnostic boundary, or the opinionated baseline, read those source files directly and ground the issue's verified-state and acceptance criteria in the actual invariants they enforce.
45
+
46
+ ## Purpose
47
+
48
+ Use this skill when the user wants one of these outcomes:
49
+
50
+ - a new GitHub Issue for a feature or enhancement
51
+ - a backlog record for a bug, contract gap, or boundary concern
52
+ - an implementation plan captured as a GitHub Issue
53
+ - a progress-tracking issue derived from existing work
54
+
55
+ Do not use this skill to implement the change itself. If the user wants delivery, hand off to `backlog-executor` after the issue exists.
56
+
57
+ ## Operating Modes
58
+
59
+ This skill has two modes depending on whether the item originates from a new request or from an external source.
60
+
61
+ ### Mode A — Create new
62
+
63
+ Use when the user requests a new backlog item. This is the default mode.
64
+
65
+ 1. Analyze nearby code, docs, and similar issues across both open and closed issue states
66
+ 2. Build a fact pack with verified current state, inferred gaps, and open questions
67
+ 3. Interact with the user to resolve material unknowns before drafting the final issue body
68
+ 4. Create GitHub Issue via `gh api graphql` (`createIssue` mutation), then set type and parent metadata as needed
69
+ 5. Report the issue number to the user
70
+
71
+ ### Mode B — Enrich existing
72
+
73
+ Use when a GitHub issue already exists (e.g., a `quality-studio:auto` issue auto-created by `quality runs ingest` from a test failure, or a Sentry-style import) and needs structured analysis.
74
+
75
+ 1. Read existing GitHub issue via a GraphQL `repository.issue(number: <NN>)` query — extract title, body, labels, references
76
+ 2. Analyze codebase: read source files implicated, check existing tests, inspect related code
77
+ 3. Update issue body via the GraphQL `updateIssue` mutation with structured analysis: Root Cause, Affected Code, Test Coverage, Fix Direction, Acceptance Criteria, Skill Routing
78
+ 4. Set missing labels (type, area, priority) via GraphQL label mutations using the qa-studio label enum
79
+
80
+ ## Non-Negotiables
81
+
82
+ - Write from repository evidence first. Read code, tests, existing docs, and nearby issues before drafting.
83
+ - Search both open and closed GitHub issues for similar backlog items, prior decisions, and earlier attempts before drafting a new one.
84
+ - Keep verified facts and proposed future work clearly separated.
85
+ - Do not claim something is broken, implemented, or validated unless the repository proves it.
86
+ - Follow the local type-specific format reference for the chosen GitHub issue type; do not rediscover section order from issue search results.
87
+ - If the local references are missing, ambiguous, or stale for the requested work, update the local references first before drafting or creating the issue.
88
+ - If the local references and the current issue corpus disagree, stop and update the local references before drafting or creating the issue. Do not silently follow the drift.
89
+ - For bug issues, explicitly document the repeat-prevention boundary: how the planned fix stops the same failure mode from recurring, not just how it resolves the current symptom.
90
+ - When a workflow or bug-contract change needs verification, route test design through `test-author` and test execution through `test-runner`; do not describe verification as complete without the proper skill handoff.
91
+ - Every code-changing backlog issue must make the testing sequence explicit: `test-author` authors or updates quality records and executable tests first; `test-runner` executes the relevant suites, records measured results, and delegates contract-layer execution against `postgres-quality:5433` to `integration-runner` when applicable. Do not write issue text that allows ad hoc test creation and raw command output to substitute for this sequence.
92
+ - For every issue, assess whether the planned work crosses Studio boundaries:
93
+ - change-set + history audit spine (no DB writes outside `services.py`)
94
+ - opinionated baseline (validations[], risk_level, outcome tag, three mandatory validate rules)
95
+ - layered configuration (Target → Domain → Records)
96
+ - Anthropic SDK boundary (cost cap, prompt caching, structured-output validation)
97
+ - GitHub write boundary (auto-issue creation, PAT scope, dedup)
98
+ Acceptance criteria must explicitly preserve these boundaries.
99
+ - During fact generation, stop and ask the user targeted questions when product intent, scope boundaries, rollout expectations, or acceptance details are still ambiguous in a way that would materially change the backlog item.
100
+ - Every new backlog issue must include a `Skill Routing` section that names `backlog-executor` and the relevant repository skills needed to deliver the work.
101
+
102
+ ## Regression Prevention
103
+
104
+ Apply this guardrail on every `backlog-author` task:
105
+
106
+ 1. Choose the native GitHub issue type first.
107
+ 2. Open the matching local reference and treat it as the format source of truth.
108
+ 3. Search GitHub issues only after that, and only for prior decisions and scope context.
109
+ 4. Before issue creation or update, compare the draft against the matching local reference and resolve any mismatch intentionally.
110
+ 5. For bug issues, make the draft state how the implementation and regression coverage will prevent the same bug from recurring.
111
+ 6. When this workflow changes, add or update automated contract tests for the skill/reference rules with `test-author`, then run them with `test-runner`.
112
+
113
+ ## Workflow
114
+
115
+ ### 1. Gather context
116
+
117
+ Before writing:
118
+
119
+ 1. Read `references/output-format.md`.
120
+ 2. Determine the native GitHub issue **Type** first: `Bug`, `Feature`, or `Task`.
121
+ 3. Open the matching local format reference from `references/` and use it as the source of truth for metadata and section order.
122
+ 4. Review at least two existing GitHub Issues that overlap with the requested domain or problem, covering both open and closed states when possible. Use GraphQL search queries such as `repo:pixenbio/qa-studio is:issue is:open ...` and `repo:pixenbio/qa-studio is:issue is:closed ...`, then use the shared `repository.issue` query pattern for the most relevant matches.
123
+ 5. Use issue review for prior decisions, scope boundaries, parents, siblings, and historical context. Do not use issue review to infer the body template.
124
+ 6. If the local references feel outdated while reviewing the current issue corpus, update the references and their contract tests before continuing with issue authoring.
125
+ 7. If the request is a bug or regression, identify the repeat path up front: what allowed the same failure mode through before, and what test coverage should stop it from returning.
126
+ 8. Identify whether contract coverage (against `minimal_target` or a live target) is relevant by checking for change-set, generation, runs, issues, baseline, or boundary surfaces in the planned work.
127
+ 9. Identify the testing layers affected by the planned work. Record whether `unit` and `contract` are in scope, out of scope, or blocked. For every in-scope layer, the issue must require `test-author` coverage authoring before `test-runner` execution.
128
+ 10. If `contract` is in scope, draft explicit acceptance criteria requiring `test-author` to publish or update the corresponding test against `tests/fixtures/minimal_target/` and require `test-runner` (delegating to `integration-runner`) to execute it before the issue is complete.
129
+
130
+ ### 2. Build factual context
131
+
132
+ Read only the files needed to support the item:
133
+
134
+ - implementation files in `src/quality_studio/`
135
+ - tests in `tests/unit/`, `tests/contract/`
136
+ - docs/ (overview, cli-reference, target-repo-contract, shipped-skills)
137
+ - migrations in `src/quality_studio/migrations/`
138
+ - existing issues that overlap with the same area
139
+
140
+ Resolve source, test, doc, and migration paths with `rg --files` or `test -f` before citing them in the issue body. If a path from memory, logs, or an older issue is stale, search for the symbol, route, migration number, or test name and record the current path only.
141
+
142
+ Capture:
143
+
144
+ - what exists today
145
+ - what is missing or unclear
146
+ - what the backlog item is trying to change
147
+ - what constraints or dependencies already exist
148
+
149
+ Turn this into a compact fact pack before drafting:
150
+
151
+ - `Verified Facts`: repository-supported statements only
152
+ - `Prior Issue Context`: what related open and closed issues already established
153
+ - `Open Questions`: missing decisions, unclear requirements, or disputed assumptions
154
+
155
+ If the requested work mixes more than one stable deliverable, note that before drafting and prefer restructuring it as prerequisite plus follow-up, or parent plus child issues, rather than widening one issue body to cover everything.
156
+
157
+ If `Open Questions` contain anything that would materially change scope, acceptance criteria, labels, or routing, pause and ask the user concise follow-up questions before moving on. Do not silently fill these gaps with assumptions when the user can answer them.
158
+
159
+ When interacting with the user during fact generation:
160
+
161
+ - summarize the verified facts first
162
+ - ask only the minimum set of questions needed to unblock drafting
163
+ - preserve the original question text and record the user's answer beneath it using `**Answer:**`
164
+ - carry unresolved items into the backlog issue's `## Open Questions` section rather than inventing certainty
165
+
166
+ ### 3. Choose the issue type and local format
167
+
168
+ Use the local references to choose the native GitHub issue type and its closest format variant:
169
+
170
+ - `Bug`: defects, regressions, contract mismatches, misleading failures, or observability gaps in existing behavior
171
+ - `Feature`: new capabilities, contract additions, cross-cutting initiatives, or epics
172
+ - `Task`: bounded delivery slices such as QA automation, coverage expansion, migrations, implementation follow-ups, and similar scoped work
173
+
174
+ ### 4. Draft the issue body
175
+
176
+ Write the issue body using the chosen type-specific local format and only repository-supported claims.
177
+
178
+ Required qualities:
179
+
180
+ - concise title (under 70 characters, action-verb-first)
181
+ - overview that states why the item exists
182
+ - explicit separation of current state vs planned work
183
+ - requirements or phased plan when implementation is in scope
184
+ - for bug issues, an explicit repeat-prevention statement that explains how the same failure mode will be blocked from returning
185
+ - a `Skill Routing` section for active work that tells the implementer which repository skills to use
186
+ - acceptance criteria
187
+ - contract-test authoring and execution acceptance criteria when the issue touches contract boundaries (change-set spine, generation pipeline, runs/issues, baseline)
188
+ - a testing acceptance section that separates `test-author` responsibilities from `test-runner` responsibilities
189
+ - references to real file paths when they materially support the claim
190
+ - a v-band assignment (v1 / v1.5 / v2 / v3) matching the `v:*` GitHub label convention; confirm with the user when unsure
191
+ - when the scope mixes foundation work with adoption or multiple independently shippable outcomes, split the work into separate issues instead of drafting one broad execution ticket
192
+
193
+ When drafting `Skill Routing`, always include `backlog-executor` for delivery handoff, then add only the skills that materially match the scoped work. Common mappings:
194
+
195
+ - Studio backend or CLI work (Python: CLI, config, services, history, runs, issues, generation, backend API, models, tests): `python-agent`
196
+ - **Next.js / React / UI work (every file under `www/`):** route through the frontend stack in priority order — **`frontend-design` first** (design + polish + production-grade interfaces; this is the priority skill for any new UI capability), then `shadcn` (component library install + composition), then `nextjs` (App Router architecture, Server Components, layouts, data fetching), plus Tailwind CSS styling guidance via the shadcn / nextjs flow. Add `react-best-practices` when the change touches multiple `.tsx` components. Reserve `python-agent` for backend API / data-layer work the UI consumes — do NOT use `python-agent` as the primary skill for UI changes.
197
+ - new tests, regression coverage design, or quality-record authoring: `test-author`
198
+ - test execution and durable run records: `test-runner`
199
+ - contract execution against `postgres-quality:5433` + `minimal_target`: `integration-runner`
200
+ - source-verified documentation changes: `doc-writer`
201
+ - error-handling audit: `backend-error-guard`
202
+ - root-cause debugging: `bugbuster`
203
+
204
+ For bug items, workflow changes, and contract-relevant issues, default to including both `test-author` and `test-runner` unless the user explicitly wants analysis only. Add `integration-runner` when the issue should produce or run contract-layer coverage.
205
+
206
+ Required testing acceptance language for code-changing issues:
207
+
208
+ - `test-author` must update or add the relevant `tests/unit/` and `tests/contract/` files (and the related `quality_test_cases` records in DB when target-side cases are part of scope) before any test execution is reported.
209
+ - `test-runner` must execute the relevant suites after the test-author work, record measured results, and clearly separate authored tests, executable tests present, and measured command results.
210
+ - If contract coverage is in scope, `test-runner` must delegate execution to `integration-runner` (which owns `postgres-quality:5433` provisioning and `001_initial.sql` application); issue text must not permit direct host-database or ad hoc contract runs.
211
+
212
+ ### 5. Create the GitHub Issue
213
+
214
+ 1. Resolve the repository ID, label IDs, and optional milestone ID via GraphQL against `pixenbio/qa-studio`.
215
+ 2. Create the issue via GraphQL `createIssue`, then record the returned issue number, URL, and node ID.
216
+ 3. Set the native **Type** using GraphQL `updateIssue` with the issue type ID (`Bug` / `Feature` / `Task`).
217
+ 4. Set **Parent** if this issue is a child of another using the GraphQL `addSubIssue` mutation after resolving both issue node IDs.
218
+ 5. Report the issue number, type, and parent (if any) to the user.
219
+
220
+ For long issue bodies or enrichment updates, avoid fragile inline heredocs. Prefer a reviewed temporary markdown file plus `--body-file`. If GitHub transport fails after the body is drafted, leave the body in a ready-to-run form and state that the remote issue was not updated.
221
+
222
+ ## Labels
223
+
224
+ Always apply both a type label and an area label.
225
+
226
+ | Label group | Values |
227
+ |---|---|
228
+ | Type | `type:task`, `type:feature`, `type:bug` |
229
+ | Area | `area:cli`, `area:generation`, `area:runs`, `area:issues`, `area:api`, `area:ui`, `area:skills`, `area:docs`, `area:schema`, `area:ci` (aligned with the locked spec's Backlog Conventions; the older `area:backend` / `area:www` names are NOT used) |
230
+ | v-band | `v:1`, `v:1.5`, `v:2`, `v:3` |
231
+ | Special | `blocks:<issue>`, `blocked-by:<issue>`, `quality-studio:auto` (only on auto-created issues from `quality runs ingest`) |
232
+
233
+ ## Writing Rules
234
+
235
+ - Prefer repository-specific language over generic product-management boilerplate.
236
+ - Use tables when comparing current state, phases, or requirements.
237
+ - Keep speculative implementation ideas under sections like `Plan`, `Implementation Sketch`, `Dependencies`, or `Open Questions`.
238
+ - Keep `Skill Routing` concrete and selective; do not dump the full skill catalog into every item.
239
+ - Include `Acceptance Criteria` for all new `Bug`, `Feature`, and `Task` issues.
240
+ - For each contract-relevant issue, include explicit acceptance criteria requiring `test-author` to author the contract test against `tests/fixtures/minimal_target/` and `test-runner` (via `integration-runner`) to execute it before completion.
241
+ - For every code-changing issue, include explicit acceptance criteria requiring `test-author` to author/update the applicable tests before `test-runner` executes and reports verification. If a layer is intentionally out of scope, require a source-backed explanation rather than leaving the layer implicit.
242
+ - Bug issues should name the regression barrier explicitly: what test or contract check will catch the same defect next time.
243
+ - If the code and prior issues disagree, document the mismatch instead of normalizing it silently.
244
+ - If the item is partly implemented already, state that directly and distinguish shipped behavior from remaining scope.
245
+ - If the requested work contains more than one stable deliverable, prefer parent plus child issues or prerequisite plus follow-up issues over one oversized ticket.
246
+ - Preserve user answers as explicit answers to the original questions:
247
+ ```
248
+ 1. Should retry be configurable per Anthropic call?
249
+ **Answer:** Yes — exponential backoff with max_retries from quality.toml, default 3.
250
+ ```
251
+
252
+ ## Output Expectations
253
+
254
+ A complete backlog-authoring task usually leaves:
255
+
256
+ - one new GitHub Issue with appropriate labels
257
+ - an issue body that is traceable to actual repository evidence
258
+
259
+ ## Example Uses
260
+
261
+ - "Create a backlog item for adding `--environment` filter to `quality runs coverage`."
262
+ - "Analyze the auto-issue dedup flow and write a backlog item for the missing close-on-pass behavior."
263
+ - "Turn this rough feature request (per-target prompt overrides) into a proper feature backlog item."
264
+ - "Enrich auto-issue #73 (quality-studio:auto) with codebase analysis and fix direction."
265
+
266
+ ---
267
+
268
+ ## Simplicity Standard
269
+
270
+ See [`../.shared/simplicity-principals.md`](../.shared/simplicity-principals.md) for the full specification.
271
+
272
+ Apply the PR checklist before finalising any output:
273
+ - [ ] Can a new dev explain this flow in **< 60 seconds**?
274
+ - [ ] Did this add a new concept? If yes, it must be justified.
275
+ - [ ] Can this be deleted later easily?
276
+ - [ ] Are errors observable in one place?