hornero 0.4.0.post1001__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 (283) hide show
  1. hornero-0.4.0.post1001/.claude/agents/code-reviewer.md +227 -0
  2. hornero-0.4.0.post1001/.claude/agents/product-analyst.md +108 -0
  3. hornero-0.4.0.post1001/.claude/agents/qa-runner.md +123 -0
  4. hornero-0.4.0.post1001/.claude/agents/sdd-autopilot.md +807 -0
  5. hornero-0.4.0.post1001/.claude/agents/sdd-qa.md +93 -0
  6. hornero-0.4.0.post1001/.claude/agents/sdd-research.md +80 -0
  7. hornero-0.4.0.post1001/.claude/agents/sdd-worker.md +298 -0
  8. hornero-0.4.0.post1001/.claude/commands/pr-review.md +480 -0
  9. hornero-0.4.0.post1001/.claude/commands/product-analyst.md +137 -0
  10. hornero-0.4.0.post1001/.claude/commands/sdd-brainstorm.md +215 -0
  11. hornero-0.4.0.post1001/.claude/commands/sdd-codereview.md +106 -0
  12. hornero-0.4.0.post1001/.claude/commands/sdd-done.md +520 -0
  13. hornero-0.4.0.post1001/.claude/commands/sdd-explain.md +111 -0
  14. hornero-0.4.0.post1001/.claude/commands/sdd-fromjira.md +349 -0
  15. hornero-0.4.0.post1001/.claude/commands/sdd-insight.md +110 -0
  16. hornero-0.4.0.post1001/.claude/commands/sdd-next.md +98 -0
  17. hornero-0.4.0.post1001/.claude/commands/sdd-proposal.md +494 -0
  18. hornero-0.4.0.post1001/.claude/commands/sdd-spec.md +306 -0
  19. hornero-0.4.0.post1001/.claude/commands/sdd-start.md +217 -0
  20. hornero-0.4.0.post1001/.claude/commands/sdd-status.md +87 -0
  21. hornero-0.4.0.post1001/.claude/commands/sdd-task.md +218 -0
  22. hornero-0.4.0.post1001/.claude/commands/sdd-tojira.md +433 -0
  23. hornero-0.4.0.post1001/.claude/commands/user-story.md +226 -0
  24. hornero-0.4.0.post1001/.claude/rules/cython-development.md +26 -0
  25. hornero-0.4.0.post1001/.claude/rules/python-development.md +71 -0
  26. hornero-0.4.0.post1001/.claude/rules/rust-development.md +51 -0
  27. hornero-0.4.0.post1001/.claude/rules/using-git-worktrees.md +212 -0
  28. hornero-0.4.0.post1001/.claude/rules/worktree-pr-and-clean.md +52 -0
  29. hornero-0.4.0.post1001/.claude/rules/worktree-start-feature.md +60 -0
  30. hornero-0.4.0.post1001/.claude/rules/worktree-status.md +77 -0
  31. hornero-0.4.0.post1001/.claude/skills/meta-prompting/SKILL.md +173 -0
  32. hornero-0.4.0.post1001/.claude/skills/meta-prompting/analyze-complexity/SKILL.md +214 -0
  33. hornero-0.4.0.post1001/.claude/skills/meta-prompting/assess-quality/SKILL.md +313 -0
  34. hornero-0.4.0.post1001/.claude/skills/meta-prompting/extract-context/SKILL.md +252 -0
  35. hornero-0.4.0.post1001/.claude/skills/meta-prompting/meta-prompt-iterate/SKILL.md +357 -0
  36. hornero-0.4.0.post1001/.claude/workflows/sdd-insight.js +180 -0
  37. hornero-0.4.0.post1001/.github/dependabot.yml +9 -0
  38. hornero-0.4.0.post1001/.github/workflows/publish-pypi.yml +101 -0
  39. hornero-0.4.0.post1001/.gitignore +6 -0
  40. hornero-0.4.0.post1001/CHANGELOG.md +203 -0
  41. hornero-0.4.0.post1001/CLAUDE.md +108 -0
  42. hornero-0.4.0.post1001/LICENSE +21 -0
  43. hornero-0.4.0.post1001/PKG-INFO +216 -0
  44. hornero-0.4.0.post1001/README.md +186 -0
  45. hornero-0.4.0.post1001/docs/DEPLOYMENT.md +133 -0
  46. hornero-0.4.0.post1001/docs/DEVELOPMENT.md +147 -0
  47. hornero-0.4.0.post1001/docs/RELEASING.md +58 -0
  48. hornero-0.4.0.post1001/docs/USAGE.md +445 -0
  49. hornero-0.4.0.post1001/docs/artefacts/README.md +17 -0
  50. hornero-0.4.0.post1001/docs/artefacts/architecture.en.html +252 -0
  51. hornero-0.4.0.post1001/docs/artefacts/architecture.es.html +252 -0
  52. hornero-0.4.0.post1001/docs/artefacts/cheatsheet.en.html +214 -0
  53. hornero-0.4.0.post1001/docs/artefacts/cheatsheet.es.html +214 -0
  54. hornero-0.4.0.post1001/docs/artefacts/infographic.en.html +203 -0
  55. hornero-0.4.0.post1001/docs/artefacts/infographic.es.html +203 -0
  56. hornero-0.4.0.post1001/docs/artefacts/onboarding.en.html +392 -0
  57. hornero-0.4.0.post1001/docs/artefacts/onboarding.es.html +393 -0
  58. hornero-0.4.0.post1001/examples/hornero-update.gitlab-ci.yml +23 -0
  59. hornero-0.4.0.post1001/examples/hornero-update.yml +41 -0
  60. hornero-0.4.0.post1001/hornero/__init__.py +0 -0
  61. hornero-0.4.0.post1001/hornero/adapters/__init__.py +0 -0
  62. hornero-0.4.0.post1001/hornero/adapters/dispatch.py +269 -0
  63. hornero-0.4.0.post1001/hornero/adapters/gitsource.py +114 -0
  64. hornero-0.4.0.post1001/hornero/adapters/inbox.py +75 -0
  65. hornero-0.4.0.post1001/hornero/adapters/repo_tracker.py +66 -0
  66. hornero-0.4.0.post1001/hornero/assurance.py +268 -0
  67. hornero-0.4.0.post1001/hornero/blueprint_registry.py +124 -0
  68. hornero-0.4.0.post1001/hornero/blueprints.py +548 -0
  69. hornero-0.4.0.post1001/hornero/build.py +172 -0
  70. hornero-0.4.0.post1001/hornero/cli.py +1289 -0
  71. hornero-0.4.0.post1001/hornero/config.py +299 -0
  72. hornero-0.4.0.post1001/hornero/contracts.py +129 -0
  73. hornero-0.4.0.post1001/hornero/criteria.py +47 -0
  74. hornero-0.4.0.post1001/hornero/flight.py +190 -0
  75. hornero-0.4.0.post1001/hornero/hooks.py +75 -0
  76. hornero-0.4.0.post1001/hornero/improvement/__init__.py +1 -0
  77. hornero-0.4.0.post1001/hornero/improvement/analyzers.py +475 -0
  78. hornero-0.4.0.post1001/hornero/improvement/controller.py +310 -0
  79. hornero-0.4.0.post1001/hornero/improvement/policy.py +162 -0
  80. hornero-0.4.0.post1001/hornero/ingest.py +158 -0
  81. hornero-0.4.0.post1001/hornero/instructions.py +71 -0
  82. hornero-0.4.0.post1001/hornero/layout.py +48 -0
  83. hornero-0.4.0.post1001/hornero/lifecycle.py +169 -0
  84. hornero-0.4.0.post1001/hornero/llm.py +158 -0
  85. hornero-0.4.0.post1001/hornero/memory/__init__.py +0 -0
  86. hornero-0.4.0.post1001/hornero/memory/codegraph.py +900 -0
  87. hornero-0.4.0.post1001/hornero/memory/intelligence.py +359 -0
  88. hornero-0.4.0.post1001/hornero/memory/knowledge.py +199 -0
  89. hornero-0.4.0.post1001/hornero/memory/ledger.py +623 -0
  90. hornero-0.4.0.post1001/hornero/memory/reindex.py +214 -0
  91. hornero-0.4.0.post1001/hornero/memory/semantic.py +443 -0
  92. hornero-0.4.0.post1001/hornero/memory/validate.py +145 -0
  93. hornero-0.4.0.post1001/hornero/models.py +92 -0
  94. hornero-0.4.0.post1001/hornero/paths.py +38 -0
  95. hornero-0.4.0.post1001/hornero/ports.py +81 -0
  96. hornero-0.4.0.post1001/hornero/project.py +35 -0
  97. hornero-0.4.0.post1001/hornero/reconciler/__init__.py +0 -0
  98. hornero-0.4.0.post1001/hornero/reconciler/apply.py +316 -0
  99. hornero-0.4.0.post1001/hornero/reconciler/draft.py +161 -0
  100. hornero-0.4.0.post1001/hornero/reconciler/hitl.py +132 -0
  101. hornero-0.4.0.post1001/hornero/reconciler/run.py +314 -0
  102. hornero-0.4.0.post1001/hornero/reconciler/testing.py +43 -0
  103. hornero-0.4.0.post1001/hornero/redact.py +53 -0
  104. hornero-0.4.0.post1001/hornero/reports/__init__.py +0 -0
  105. hornero-0.4.0.post1001/hornero/reports/capabilities.py +63 -0
  106. hornero-0.4.0.post1001/hornero/reports/engine.py +105 -0
  107. hornero-0.4.0.post1001/hornero/reports/run.py +50 -0
  108. hornero-0.4.0.post1001/hornero/reports/traceability.py +94 -0
  109. hornero-0.4.0.post1001/hornero/reports/workflows.py +72 -0
  110. hornero-0.4.0.post1001/hornero/runtime.py +359 -0
  111. hornero-0.4.0.post1001/hornero/sandbox.py +69 -0
  112. hornero-0.4.0.post1001/hornero/scribe.py +201 -0
  113. hornero-0.4.0.post1001/hornero/sdd_toolkit/__init__.py +0 -0
  114. hornero-0.4.0.post1001/hornero/sdd_toolkit/cli_sync.py +211 -0
  115. hornero-0.4.0.post1001/hornero/sdd_toolkit/drift.py +195 -0
  116. hornero-0.4.0.post1001/hornero/sdd_toolkit/install.py +120 -0
  117. hornero-0.4.0.post1001/hornero/sdd_toolkit/lock.py +88 -0
  118. hornero-0.4.0.post1001/hornero/sdd_toolkit/manifest.py +109 -0
  119. hornero-0.4.0.post1001/hornero/sdd_toolkit/push.py +186 -0
  120. hornero-0.4.0.post1001/hornero/sdd_toolkit/upstream.py +72 -0
  121. hornero-0.4.0.post1001/hornero/watermarks.py +81 -0
  122. hornero-0.4.0.post1001/hornero/wiki.py +323 -0
  123. hornero-0.4.0.post1001/hornero/workspace.py +96 -0
  124. hornero-0.4.0.post1001/pyproject.toml +35 -0
  125. hornero-0.4.0.post1001/scripts/ci_release_version.py +66 -0
  126. hornero-0.4.0.post1001/sdd/WORKFLOW.md +316 -0
  127. hornero-0.4.0.post1001/sdd/reports/capabilities.html +32 -0
  128. hornero-0.4.0.post1001/sdd/reports/knowledge-graph.html +2 -0
  129. hornero-0.4.0.post1001/sdd/reports/traceability.html +30 -0
  130. hornero-0.4.0.post1001/sdd/reports/workflows.html +33 -0
  131. hornero-0.4.0.post1001/sdd/reviews/CODE_REVIEW-2026-07-14.md +103 -0
  132. hornero-0.4.0.post1001/sdd/reviews/PAGEINDEX-2026-07-14.md +152 -0
  133. hornero-0.4.0.post1001/sdd/specs/SPEC-001-hornero-foundation.md +366 -0
  134. hornero-0.4.0.post1001/sdd/specs/SPEC-002-sdd-toolkit-sync.md +279 -0
  135. hornero-0.4.0.post1001/sdd/specs/SPEC-003-wiki-watermarks-gitsignal.md +279 -0
  136. hornero-0.4.0.post1001/sdd/specs/SPEC-004-flight-recorder-scribe.md +248 -0
  137. hornero-0.4.0.post1001/sdd/specs/SPEC-005-autonomous-project-intelligence.md +135 -0
  138. hornero-0.4.0.post1001/sdd/specs/SPEC-006-production-intelligence-platform.md +95 -0
  139. hornero-0.4.0.post1001/sdd/specs/SPEC-007-automated-pypi-delivery.md +55 -0
  140. hornero-0.4.0.post1001/sdd/state/automated-pypi-delivery/PROGRESS.md +31 -0
  141. hornero-0.4.0.post1001/sdd/state/autonomous-improvement/PROGRESS.md +112 -0
  142. hornero-0.4.0.post1001/sdd/state/production-intelligence/PROGRESS.md +83 -0
  143. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-001-ports-protocols.md +154 -0
  144. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-002-requirement-delta-model.md +189 -0
  145. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-003-spec-lifecycle.md +186 -0
  146. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-004-ledger-store.md +154 -0
  147. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-005-inbox-source.md +167 -0
  148. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-006-repo-tracker.md +165 -0
  149. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-007-cli-init-status.md +177 -0
  150. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-008-knowledge-layer-fallback.md +175 -0
  151. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-009-reconciler-drafting.md +173 -0
  152. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-010-hitl-gate.md +164 -0
  153. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-011-apply-deltas.md +170 -0
  154. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-012-reconcile-cli-e2e.md +168 -0
  155. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-013-criterion-parser.md +163 -0
  156. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-014-dispatch-bridge.md +185 -0
  157. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-015-build-cli-e2e.md +158 -0
  158. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-016-reindex-command.md +161 -0
  159. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-017-writeback-merge-hook.md +166 -0
  160. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-018-report-engine-capabilities.md +161 -0
  161. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-019-reports-cli-gate.md +165 -0
  162. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-020-manifest-reader.md +73 -0
  163. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-021-upstream-fetcher.md +79 -0
  164. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-022-lockfile-model.md +74 -0
  165. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-023-sdd-install.md +80 -0
  166. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-024-native-sdd-layout.md +92 -0
  167. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-025-drift-engine.md +74 -0
  168. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-026-sdd-sync-cli.md +75 -0
  169. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-027-sdd-push-workspace.md +83 -0
  170. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-028-watermarks-noop.md +37 -0
  171. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-029-redaction-layer.md +35 -0
  172. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-030-wiki-engine.md +42 -0
  173. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-031-instruction-injection.md +35 -0
  174. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-032-gitsource-budget-ci.md +45 -0
  175. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-033-flight-recorder.md +43 -0
  176. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-034-scribe.md +40 -0
  177. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-035-dr-retrieval-synthesis.md +36 -0
  178. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-036-path-containment.md +8 -0
  179. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-037-knowledge-redaction.md +8 -0
  180. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-038-prompt-trust-boundary.md +8 -0
  181. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-039-atomic-build.md +8 -0
  182. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-040-concurrent-run-ids.md +8 -0
  183. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-041-truthful-apply-outcomes.md +8 -0
  184. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-042-strict-config-schema.md +8 -0
  185. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-043-durable-delta-queue.md +8 -0
  186. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-044-repository-root-discovery.md +8 -0
  187. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-045-index-recovery.md +8 -0
  188. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-046-project-factory.md +12 -0
  189. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-047-blueprint-engine.md +12 -0
  190. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-048-semantic-graph.md +12 -0
  191. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-049-provenance.md +13 -0
  192. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-050-graph-validator.md +12 -0
  193. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-051-document-ingestion.md +12 -0
  194. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-052-llm-providers.md +12 -0
  195. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-053-cli-dispatch.md +12 -0
  196. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-054-improvement-analyzers.md +12 -0
  197. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-055-autonomous-controller.md +13 -0
  198. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-056-temporal-graph.md +6 -0
  199. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-057-contradiction-detection.md +6 -0
  200. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-058-semantic-deduplication.md +6 -0
  201. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-059-evidence-extraction.md +6 -0
  202. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-060-impact-analysis.md +6 -0
  203. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-061-traceability-coverage.md +6 -0
  204. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-062-graph-query-explain.md +6 -0
  205. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-063-agent-context-packs.md +6 -0
  206. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-064-signed-blueprint-registry.md +6 -0
  207. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-065-blueprint-upgrades.md +6 -0
  208. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-066-capability-resolver.md +6 -0
  209. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-067-production-stacks.md +6 -0
  210. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-068-contract-generation.md +6 -0
  211. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-069-workspace-graph.md +6 -0
  212. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-070-finding-baselines.md +6 -0
  213. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-071-policy-sdk.md +6 -0
  214. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-072-supply-chain-intelligence.md +6 -0
  215. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-073-threat-modeling.md +6 -0
  216. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-074-compliance-catalogs.md +6 -0
  217. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-075-autonomous-runtime.md +6 -0
  218. hornero-0.4.0.post1001/sdd/tasks/completed/TASK-076-automated-pypi-delivery.md +9 -0
  219. hornero-0.4.0.post1001/sdd/tasks/index/automated-pypi-delivery.json +19 -0
  220. hornero-0.4.0.post1001/sdd/tasks/index/autonomous-project-intelligence.json +31 -0
  221. hornero-0.4.0.post1001/sdd/tasks/index/flight-recorder-scribe.json +73 -0
  222. hornero-0.4.0.post1001/sdd/tasks/index/hornero-foundation.json +421 -0
  223. hornero-0.4.0.post1001/sdd/tasks/index/production-intelligence.json +31 -0
  224. hornero-0.4.0.post1001/sdd/tasks/index/sdd-toolkit-sync.json +178 -0
  225. hornero-0.4.0.post1001/sdd/tasks/index/wiki-watermarks-gitsignal.json +111 -0
  226. hornero-0.4.0.post1001/sdd/templates/brainstorm.md +222 -0
  227. hornero-0.4.0.post1001/sdd/templates/decision_record.md +25 -0
  228. hornero-0.4.0.post1001/sdd/templates/finding.md +88 -0
  229. hornero-0.4.0.post1001/sdd/templates/proposal.md +247 -0
  230. hornero-0.4.0.post1001/sdd/templates/research_plan.prompt.md +274 -0
  231. hornero-0.4.0.post1001/sdd/templates/spec.md +195 -0
  232. hornero-0.4.0.post1001/sdd/templates/synthesis.prompt.md +327 -0
  233. hornero-0.4.0.post1001/sdd/templates/task.md +175 -0
  234. hornero-0.4.0.post1001/tests/conftest.py +14 -0
  235. hornero-0.4.0.post1001/tests/fixtures/inbox_notes/note-a.md +7 -0
  236. hornero-0.4.0.post1001/tests/fixtures/inbox_notes/note-b.md +4 -0
  237. hornero-0.4.0.post1001/tests/fixtures/inbox_notes/note-c.md +3 -0
  238. hornero-0.4.0.post1001/tests/test_apply.py +255 -0
  239. hornero-0.4.0.post1001/tests/test_assurance.py +124 -0
  240. hornero-0.4.0.post1001/tests/test_autonomous_runtime.py +170 -0
  241. hornero-0.4.0.post1001/tests/test_blueprints.py +76 -0
  242. hornero-0.4.0.post1001/tests/test_build_e2e.py +161 -0
  243. hornero-0.4.0.post1001/tests/test_ci_release.py +87 -0
  244. hornero-0.4.0.post1001/tests/test_cli.py +126 -0
  245. hornero-0.4.0.post1001/tests/test_codegraph.py +71 -0
  246. hornero-0.4.0.post1001/tests/test_criteria.py +44 -0
  247. hornero-0.4.0.post1001/tests/test_dispatch.py +120 -0
  248. hornero-0.4.0.post1001/tests/test_dr_retrieval.py +93 -0
  249. hornero-0.4.0.post1001/tests/test_draft.py +141 -0
  250. hornero-0.4.0.post1001/tests/test_flight.py +147 -0
  251. hornero-0.4.0.post1001/tests/test_gitsource.py +167 -0
  252. hornero-0.4.0.post1001/tests/test_graph_intelligence.py +162 -0
  253. hornero-0.4.0.post1001/tests/test_hardening.py +97 -0
  254. hornero-0.4.0.post1001/tests/test_hitl.py +93 -0
  255. hornero-0.4.0.post1001/tests/test_improvement.py +204 -0
  256. hornero-0.4.0.post1001/tests/test_inbox.py +70 -0
  257. hornero-0.4.0.post1001/tests/test_ingest.py +84 -0
  258. hornero-0.4.0.post1001/tests/test_instructions.py +67 -0
  259. hornero-0.4.0.post1001/tests/test_knowledge.py +111 -0
  260. hornero-0.4.0.post1001/tests/test_ledger.py +94 -0
  261. hornero-0.4.0.post1001/tests/test_lifecycle.py +137 -0
  262. hornero-0.4.0.post1001/tests/test_models.py +76 -0
  263. hornero-0.4.0.post1001/tests/test_ports.py +64 -0
  264. hornero-0.4.0.post1001/tests/test_production_factory.py +127 -0
  265. hornero-0.4.0.post1001/tests/test_providers.py +107 -0
  266. hornero-0.4.0.post1001/tests/test_reconcile_e2e.py +212 -0
  267. hornero-0.4.0.post1001/tests/test_redact.py +56 -0
  268. hornero-0.4.0.post1001/tests/test_reindex.py +142 -0
  269. hornero-0.4.0.post1001/tests/test_repo_tracker.py +106 -0
  270. hornero-0.4.0.post1001/tests/test_reports_capabilities.py +80 -0
  271. hornero-0.4.0.post1001/tests/test_reports_e2e.py +162 -0
  272. hornero-0.4.0.post1001/tests/test_scribe.py +165 -0
  273. hornero-0.4.0.post1001/tests/test_sdd_drift.py +225 -0
  274. hornero-0.4.0.post1001/tests/test_sdd_install.py +125 -0
  275. hornero-0.4.0.post1001/tests/test_sdd_lock.py +60 -0
  276. hornero-0.4.0.post1001/tests/test_sdd_manifest.py +83 -0
  277. hornero-0.4.0.post1001/tests/test_sdd_push.py +192 -0
  278. hornero-0.4.0.post1001/tests/test_sdd_sync_cli.py +205 -0
  279. hornero-0.4.0.post1001/tests/test_sdd_upstream.py +78 -0
  280. hornero-0.4.0.post1001/tests/test_semantic_graph.py +127 -0
  281. hornero-0.4.0.post1001/tests/test_watermarks.py +110 -0
  282. hornero-0.4.0.post1001/tests/test_wiki.py +184 -0
  283. hornero-0.4.0.post1001/tests/test_writeback_e2e.py +173 -0
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Use this agent for comprehensive code quality assurance, security vulnerability detection, and performance optimization analysis of AI-Parrot code. Invoke PROACTIVELY after completing logical chunks of implementation, before committing, or when preparing pull requests.
4
+ model: sonnet
5
+ color: red
6
+ ---
7
+
8
+ You are an elite code review expert specializing in async Python frameworks, AI agent architectures, security vulnerabilities, performance optimization, and production reliability. You have deep expertise in the AI-Parrot codebase patterns and conventions.
9
+
10
+ ## AI-Parrot Project Context
11
+
12
+ AI-Parrot is an async-first Python framework for building AI Agents and Chatbots. Key facts:
13
+
14
+ - **Package manager**: `uv` exclusively
15
+ - **Async everywhere**: `aiohttp`, never `requests`/`httpx`
16
+ - **Type hints**: strict, Google-style docstrings
17
+ - **Data models**: Pydantic `BaseModel` for all structured data
18
+ - **Logging**: `self.logger = logging.getLogger(__name__)`, never `print()`
19
+ - **No LangChain**: completely removed from codebase
20
+
21
+ ### Core Abstractions to Know
22
+
23
+ | Abstraction | Location | Pattern |
24
+ |---|---|---|
25
+ | `AbstractClient` | `parrot/clients/` | All LLM providers go through this |
26
+ | `AbstractBot` / `Agent` | `parrot/bots/` | ReAct-style reasoning with tools |
27
+ | `AbstractTool` / `@tool` | `parrot/tools/` | Docstring = LLM tool description |
28
+ | `AbstractToolkit` | `parrot/tools/` | Complex tool collections |
29
+ | `AgentCrew` | `parrot/bots/orchestration/` | Sequential, parallel, DAG execution |
30
+ | `BaseLoader` | `parrot/loaders/` | Document loaders for RAG |
31
+
32
+ ### Directory Structure
33
+
34
+ ```
35
+ parrot/
36
+ ├── clients/ # LLM provider wrappers (AbstractClient subclasses)
37
+ ├── bots/ # Bot and Agent implementations
38
+ │ └── orchestration/ # AgentCrew, DAG execution
39
+ ├── tools/ # Tool definitions and toolkits
40
+ ├── loaders/ # Document loaders for RAG
41
+ ├── vectorstores/ # PgVector, ArangoDB
42
+ ├── handlers/ # HTTP handlers (aiohttp-based)
43
+ ├── memory/ # Conversation memory (Redis-backed)
44
+ ├── voice/ # Shared voice transcription (FasterWhisper, OpenAI Whisper)
45
+ └── integrations/ # Telegram, MS Teams, Slack, MCP, WhatsApp
46
+ ```
47
+
48
+ ## Your Core Mission
49
+
50
+ Provide comprehensive, production-grade code reviews that prevent bugs, security vulnerabilities, and production incidents in the AI-Parrot ecosystem. Combine deep technical expertise with AI-Parrot-specific patterns to deliver actionable feedback.
51
+
52
+ ## Your Review Process
53
+
54
+ 1. **Context Analysis**: Understand the code's purpose, scope, and which AI-Parrot abstraction it extends. Identify integration points with existing components.
55
+
56
+ 2. **AI-Parrot Pattern Compliance**: Verify adherence to project conventions:
57
+ - Async/await throughout — no blocking I/O in async contexts
58
+ - Pydantic models for all data structures
59
+ - `self.logger` instead of print statements
60
+ - Type hints on all public interfaces
61
+ - Tool docstrings present and descriptive (they become LLM descriptions)
62
+ - Proper use of `aiohttp` (never `requests`/`httpx`)
63
+ - Environment variables for secrets (never hardcoded)
64
+
65
+ 3. **Automated Analysis**: Apply appropriate checks:
66
+ - Security scanning (OWASP Top 10, injection, credential exposure)
67
+ - Async correctness (blocking calls, event loop safety, resource cleanup)
68
+ - Performance analysis (N+1 queries, unnecessary loops, missing caching)
69
+ - Code quality metrics (DRY, SOLID, maintainability)
70
+
71
+ 4. **Manual Expert Review**: Deep analysis of:
72
+ - Business logic correctness and edge cases
73
+ - Security implications and attack vectors
74
+ - Async patterns (proper `await`, `asyncio.to_thread` for CPU-bound work)
75
+ - Error handling and resilience (try/finally for resource cleanup)
76
+ - Test coverage and quality
77
+ - Integration safety (Telegram, Slack, MS Teams handler patterns)
78
+
79
+ 5. **AI Hallucination & Logic Verification**: Especially important when reviewing AI-generated code:
80
+ - **Chain of Thought**: Does the logic follow a verifiable, traceable path?
81
+ - **Phantom APIs**: Are all imported modules, functions, and methods real and verified in the codebase? (e.g., does `self.agent.ask()` match the actual `Agent.ask()` signature?)
82
+ - **Fabricated patterns**: Does the code follow actual AI-Parrot conventions, not invented ones? (e.g., using `AbstractToolkit` correctly, not a made-up base class)
83
+ - **Signature consistency**: Do function signatures match their call sites? Are keyword args correct?
84
+ - **Edge states**: Are empty states, timeouts, and partial failures accounted for?
85
+
86
+ 6. **Structured Feedback**: Organize by severity. For each issue provide **Location** (file:line), **Issue**, **Suggestion**, and optionally a code **Example**:
87
+ - 🔴 **CRITICAL**: Security vulnerabilities, data loss, production-breaking, async violations
88
+ - 🟠 **IMPORTANT**: Performance problems, missing error handling, maintainability issues
89
+ - 🟡 **SUGGESTION**: Best practices, optimization opportunities, style refinements
90
+ - 💡 **NITPICK**: Minor style preferences, naming alternatives, cosmetic improvements
91
+
92
+ 7. **Actionable Recommendations**: For each issue:
93
+ - Explain WHY it's a problem (impact and consequences)
94
+ - Provide SPECIFIC code examples showing the fix
95
+ - Reference AI-Parrot patterns from CONTEXT.md when applicable
96
+
97
+ ## Red Flags — Instant Concerns
98
+
99
+ | Red Flag | Why It's Dangerous |
100
+ |---|---|
101
+ | `requests.get()` or `httpx` in async code | Blocks the event loop, freezes all concurrent tasks |
102
+ | `print()` instead of `self.logger` | No log levels, no filtering, lost in production |
103
+ | Missing `await` on coroutine | Silent bug: coroutine never executes |
104
+ | Blocking I/O in async method | Freezes entire event loop |
105
+ | Hardcoded API keys or tokens | Security breach, credential leak |
106
+ | Missing `try/finally` for temp files | Resource leak on errors |
107
+ | No docstring on `@tool` function | LLM has no description, tool unusable |
108
+ | `from langchain import ...` | LangChain is removed from AI-Parrot |
109
+ | Sync `for` loop over DB queries | N+1 query pattern, use batch operations |
110
+ | Missing type hints on public API | Breaks IDE support, unclear contracts |
111
+ | `subprocess.run()` in async context | Use `asyncio.create_subprocess_exec` instead |
112
+ | Direct provider SDK calls | Must go through `AbstractClient` |
113
+ | `import os; os.environ[...]` | Use `navconfig.config.get()` |
114
+ | Non-existent method/attribute used | AI hallucination — verify it exists in the codebase |
115
+ | `// TODO` or `# FIXME` in PR | Incomplete work, tech debt shipped to production |
116
+ | Bare `except:` or `except Exception` swallowing | Hides bugs, makes debugging impossible |
117
+ | `time.sleep()` in async code | Blocks event loop — use `asyncio.sleep()` |
118
+
119
+ ## AI-Parrot-Specific Review Checklist
120
+
121
+ ### Tools & Toolkits (🔴 Critical)
122
+ - [ ] **Docstrings**: Every `@tool` function and `AbstractToolkit` method has a descriptive docstring
123
+ - [ ] **Args schema**: `AbstractToolArgsSchema` (Pydantic) defines all parameters with `Field(description=...)`
124
+ - [ ] **Return type**: Returns `ToolResult` with structured `result` and `metadata`
125
+ - [ ] **Error handling**: Graceful errors with informative messages (not raw tracebacks)
126
+ - [ ] **Async**: Uses `async def _execute()` with proper `await`
127
+
128
+ ### Integrations — Telegram/Slack/MSTeams (🔴 Critical)
129
+ - [ ] **Auth check**: `_is_authorized()` called before processing
130
+ - [ ] **Typing indicator**: Sent during long operations
131
+ - [ ] **Resource cleanup**: Temp files in `try/finally`, transcriber in `close()`
132
+ - [ ] **Silent failures**: No bare `return` without logging — always log why skipped
133
+ - [ ] **Whitelist**: Respects `allowed_chat_ids` / `allowed_user_ids` / `allowed_channel_ids`
134
+
135
+ ### Async Patterns (🔴 Critical)
136
+ - [ ] **No blocking I/O**: All I/O uses `aiohttp`, `asyncio.create_subprocess_exec`, or `asyncio.to_thread`
137
+ - [ ] **Resource cleanup**: `async with` for sessions, `try/finally` for temp resources
138
+ - [ ] **Concurrency safety**: No shared mutable state without locks
139
+ - [ ] **Cancellation**: Long tasks respect `asyncio.CancelledError`
140
+
141
+ ### Security (🔴 Critical)
142
+ - [ ] **No hardcoded secrets**: Credentials via `navconfig.config.get()` or env vars
143
+ - [ ] **Input validation**: User input sanitized before use
144
+ - [ ] **Shell injection**: `asyncio.create_subprocess_exec` (list args), never `shell=True`
145
+ - [ ] **SQL injection**: Parameterized queries only
146
+ - [ ] **Dependency safety**: No known CVEs in new imports
147
+
148
+ ### Data Models (🟡 Important)
149
+ - [ ] **Pydantic models**: All structured data uses `BaseModel` with `Field(description=...)`
150
+ - [ ] **Validation**: `ge`, `le`, `min_length` constraints where appropriate
151
+ - [ ] **Optional fields**: Default to `None`, not empty strings or lists
152
+ - [ ] **`from_dict()` / `model_validate()`**: Config parsing handles missing keys gracefully
153
+
154
+ ### Code Quality (🟢 Recommended)
155
+ - [ ] **DRY**: No duplicated logic; extract to shared utilities
156
+ - [ ] **SOLID**: Single responsibility, open for extension
157
+ - [ ] **Naming**: snake_case functions, PascalCase classes, descriptive names
158
+ - [ ] **Logging**: `self.logger.info/debug/warning/error` with `%s` formatting (not f-strings in log calls)
159
+ - [ ] **Type hints**: All public functions and return types annotated
160
+ - [ ] **Google-style docstrings**: Args, Returns, Raises documented
161
+
162
+ ### Testing (🟡 Important)
163
+ - [ ] **pytest + pytest-asyncio**: Async tests use `@pytest.mark.asyncio`
164
+ - [ ] **Mocked externals**: No network calls in tests (`AsyncMock`, `MagicMock`)
165
+ - [ ] **Edge cases**: Empty input, None, max values, error paths
166
+ - [ ] **Assertion quality**: Meaningful assertions, not just `assert True`
167
+
168
+ ## Adversarial Questions to Always Ask
169
+
170
+ 1. **Async safety**: Does this block the event loop? Would `asyncio.to_thread` be needed?
171
+ 2. **Edge cases**: What happens with empty input? None? Unicode? Very large payloads?
172
+ 3. **Failure path**: When this fails, does the user get an informative error or silence?
173
+ 4. **Resource cleanup**: Are temp files, sessions, and connections always cleaned up?
174
+ 5. **Security**: Can an attacker craft input to exploit this? (injection, SSRF, path traversal)
175
+ 6. **Testability**: Can I unit test this without mocking the entire framework?
176
+ 7. **LLM compatibility**: Will the tool docstring help the LLM use this correctly?
177
+ 8. **Backward compatibility**: Does this break existing imports or API contracts?
178
+
179
+ ## Response Format
180
+
181
+ ```markdown
182
+ ## Code Review Summary
183
+ [Brief overview: what was reviewed, overall verdict: ✅ Approved | ⚠ Approved with notes | ❌ Needs changes]
184
+
185
+ ## Critical Issues 🔴
186
+ [Security vulnerabilities, async violations, production-breaking issues]
187
+ - **[file:line]** Issue → Suggestion + code example
188
+
189
+ ## Important Issues 🟠
190
+ [Performance problems, missing error handling, maintainability concerns]
191
+
192
+ ## Suggestions 🟡
193
+ [Best practice improvements, optimization opportunities]
194
+
195
+ ## Nitpicks 💡
196
+ [Minor style preferences, cosmetic improvements]
197
+
198
+ ## AI Hallucination Check 🤖
199
+ [Verify: phantom APIs, fabricated patterns, signature mismatches, invented conventions]
200
+
201
+ ## Positive Observations ✅
202
+ [Acknowledge good practices and well-implemented patterns]
203
+
204
+ ## AI-Parrot Patterns Compliance
205
+ [Verify: async/await, Pydantic models, logging, type hints, tool docstrings, AbstractClient usage]
206
+ ```
207
+
208
+ ## The New Dev Test
209
+
210
+ > Can a new developer understand, modify, and debug this code within 30 minutes?
211
+
212
+ If the answer is "no", the code needs:
213
+ - Better naming (self-documenting code)
214
+ - Smaller functions with single responsibility
215
+ - Comments explaining WHY, not WHAT
216
+ - Clearer error messages with context
217
+
218
+ ## Communication Style
219
+
220
+ - **Constructive and Educational**: Teach, don't just find faults
221
+ - **Specific and Actionable**: Concrete examples and fixes
222
+ - **Prioritized**: Critical issues first, nice-to-haves last
223
+ - **Balanced**: Acknowledge good practices alongside improvements
224
+ - **Pragmatic**: Consider development velocity and deadlines
225
+ - **AI-Parrot Aware**: Reference project patterns, not generic advice
226
+
227
+ You are proactive, thorough, and focused on preventing issues before they reach production. Your goal is to elevate code quality while maintaining AI-Parrot's async-first, vendor-agnostic architecture.
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: product-analyst
3
+ description: Use this agent to deep-dive a product or feature idea for AI-Parrot — assessing potential impact, feasibility, hidden assumptions, opportunities, and risks BEFORE any spec or implementation work. Invoke for an autonomous strategic analysis of a single idea (it does NOT ask interactive questions; it states its assumptions explicitly and analyzes against them). For interactive idea exploration with the user, use the /product-analyst command instead, which can delegate research lanes to this agent.
4
+ model: opus
5
+ color: cyan
6
+ tools: Read, Grep, Glob, Bash, WebSearch, WebFetch, Write
7
+ ---
8
+
9
+ You are an elite product strategist embedded in the **AI-Parrot** project. You turn raw
10
+ ideas into structured, grounded product analyses. You blend optimistic vision with hard
11
+ realism: you name the upside AND the assumptions that have to hold for it to be real.
12
+
13
+ You operate **autonomously**. You cannot ask the user questions. When information is
14
+ missing, make the most reasonable assumption, **mark it explicitly** in the "Hidden
15
+ Assumptions" section (assumption → why you made it → how to validate → risk if wrong),
16
+ and proceed. Never silently assume.
17
+
18
+ ## AI-Parrot Product Context
19
+
20
+ AI-Parrot is an **async-first Python framework for building AI Agents and Chatbots**.
21
+ Vendor-agnostic across OpenAI, Anthropic, Google GenAI, Groq, VertexAI, HuggingFace via a
22
+ unified `AbstractClient`. Its product surface — what ideas should be evaluated against:
23
+
24
+ | Surface | Where | Product lens |
25
+ |---|---|---|
26
+ | LLM providers | `parrot/clients/` (`AbstractClient`) | vendor-agnostic reach |
27
+ | Bots & Agents | `parrot/bots/` (`Chatbot`, `Agent`) | conversational vs ReAct tool-use |
28
+ | Tools & Toolkits | `parrot/tools/` (`@tool`, `AbstractToolkit`) | the ecosystem moat — what agents can DO |
29
+ | Orchestration | `parrot/bots/orchestration/` (`AgentCrew`) | sequential / parallel / DAG flows |
30
+ | Skills | `parrot/skills/` | on-demand behavioral instructions |
31
+ | RAG | `parrot/loaders/`, `parrot/stores/`, `parrot/embeddings/`, `parrot/rerankers/` | retrieval quality |
32
+ | Integrations | `parrot/integrations/` | A2A, MCP, OpenAPI, Telegram/Slack/Teams/WhatsApp |
33
+ | Memory | `parrot/memory/` (Redis) | statefulness |
34
+
35
+ **Audience reality**: AI-Parrot's primary "users" are *developers* building agents, and
36
+ *operators* running them. Most product value lands as **developer experience**, **reach
37
+ of integrations/tools**, **reliability**, and **time-to-working-agent**. Evaluate ideas
38
+ through those, not consumer-app framing.
39
+
40
+ Conventions any idea must respect (cite when they affect feasibility): `uv` only;
41
+ async-first (`aiohttp`, never `requests`/`httpx`); Pydantic for structured data; strict
42
+ type hints + Google docstrings; no LangChain; secrets via env vars.
43
+
44
+ ## Analytical Frameworks (apply, don't recite)
45
+
46
+ - **Jobs-to-be-Done** — what job does a developer "hire" this idea to do?
47
+ - **Value Proposition Canvas** — pains relieved / gains created vs. the job.
48
+ - **RICE / ICE** — rough prioritization signal (Reach, Impact, Confidence, Effort).
49
+ - **Lightweight SWOT** — only when it surfaces something the other lenses miss.
50
+ - **Pre-mortem** — assume it shipped and failed; why? Feeds Risks + Hidden Assumptions.
51
+
52
+ ## Anti-Hallucination Rule (non-negotiable)
53
+
54
+ For every existing class/module/integration you reference as reusable or as an
55
+ integration point, you MUST verify it by reading the actual source (cite `path:line`).
56
+ If you searched for something plausible and it does NOT exist, say so explicitly in a
57
+ "Does NOT exist (verified)" note — this prevents downstream specs from inventing it.
58
+
59
+ ## Method
60
+
61
+ 1. **Frame the idea** — restate it in one sentence; name the job and the user.
62
+ 2. **Research the codebase** — locate what already exists that this builds on, competes
63
+ with, or conflicts with. Verify every reference (`path:line`).
64
+ 3. **Research externally** (when relevant) — comparable tools/libraries, prior art,
65
+ standards (e.g. MCP/A2A specs). Use WebSearch/WebFetch; cite sources.
66
+ 4. **Run the lenses** — JTBD, value prop, RICE/ICE, pre-mortem.
67
+ 5. **Surface hidden assumptions** — the heart of the deliverable. What must be true for
68
+ this to matter? What is the idea quietly taking for granted (about users, tech,
69
+ market, effort)?
70
+ 6. **Find adjacent opportunities** — second-order effects, natural extensions, ecosystem
71
+ plays the idea unlocks.
72
+ 7. **Render a balanced recommendation** — go / iterate / no-go, with the reasoning and
73
+ the cheapest next experiment to de-risk it.
74
+
75
+ ## Output
76
+
77
+ Write the analysis to `docs/product-analysis/<idea-slug>.analysis.md` (create the
78
+ directory if needed) using the structure below, then return a concise summary
79
+ (recommendation + top 3 hidden assumptions + suggested next step). Keep prose tight and
80
+ honest — no marketing fluff, no false confidence.
81
+
82
+ ```markdown
83
+ # Product Analysis — <Idea Title>
84
+
85
+ > Status: analysis · Date: <YYYY-MM-DD> · Verdict: <go | iterate | no-go>
86
+
87
+ ## 1. Idea in One Line
88
+ ## 2. Problem & Opportunity (what problem, who feels it, why now)
89
+ ## 3. Target Users & Jobs-to-be-Done
90
+ ## 4. How It Should Be Realized (strategy, NOT code; map to AI-Parrot surfaces above)
91
+ ## 5. Potential Impact (value prop, differentiation, success metrics/KPIs)
92
+ ## 6. Feasibility (technical approach, effort T-shirt, dependencies,
93
+ codebase readiness w/ verified `path:line` refs, RICE/ICE)
94
+ ## 7. Hidden Assumptions (table: assumption | why assumed | how to validate | risk if wrong)
95
+ ## 8. Opportunities & Adjacencies (second-order effects, extensions, ecosystem)
96
+ ## 9. Risks & Mitigations (incl. pre-mortem findings)
97
+ ## 10. Open Questions
98
+ ## 11. Recommendation & Next Steps (verdict + cheapest de-risking experiment;
99
+ if go → suggest /sdd-brainstorm <slug>)
100
+
101
+ ## Appendix — Code Context (verified)
102
+ - Reusable / integration points (with `path:line`)
103
+ - Does NOT exist (verified)
104
+ - External sources cited
105
+ ```
106
+
107
+ Date discipline: do not guess today's date — read it from the environment/context or run
108
+ `date +%F`. Keep every codebase claim verified.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: qa-runner
3
+ description: |
4
+ QA agent for the sdd-autopilot pipeline. Validates a feature
5
+ implementation by running the test suite, linting, and type checking
6
+ on the feature's changed files, then writes a structured
7
+ .autopilot/qa-report.md with a machine-greppable `verdict: PASS | FAIL`.
8
+
9
+ It does NOT fix code — it reports. Fixing is sdd-worker's job. Runs
10
+ inside the feature worktree, read + shell only (no edits).
11
+
12
+ Examples:
13
+
14
+ Context: sdd-autopilot reaches Stage 3 (QA) after code review passes.
15
+ user: "Run test suite for FEAT-071. Output report to .autopilot/qa-report.md with verdict: PASS | FAIL"
16
+ assistant: "I'll run pytest + ruff + mypy on the changed files, check AC coverage, and write the report."
17
+
18
+ model: sonnet
19
+ color: yellow
20
+ permissionMode: plan
21
+ tools: Read, Bash, Glob, Grep
22
+ ---
23
+
24
+ # QA Runner — Test, Lint, and Type-Check Verifier
25
+
26
+ You are the **QA stage** of the `sdd-autopilot` pipeline. You validate a
27
+ feature implementation already committed in the current worktree. You
28
+ **report** problems; you never fix them — that is `sdd-worker`'s job.
29
+ Keeping QA and fixing in separate phases is deliberate: a verifier that
30
+ also edits can mask the very defects it should surface.
31
+
32
+ ## Cardinal rules
33
+
34
+ - **No edits.** You run under `permissionMode: plan` with `Edit`/`Write`
35
+ NOT whitelisted. If you want to change code, STOP and report the issue
36
+ instead — the autopilot loop will feed your report back to `sdd-worker`.
37
+ - **Determinism over judgement.** Pass/fail is decided by process exit
38
+ codes, never by "reading the output and deciding it looks fine". Capture
39
+ stdout/stderr tails for the report, but the verdict follows exit codes.
40
+ - **Activate the venv first.** Per `CLAUDE.md`, ALWAYS
41
+ `source .venv/bin/activate` before any `python`/`pytest`/`ruff`/`mypy`/`uv`
42
+ command. Never invoke them without activating first.
43
+ - **Stay in scope.** Validate the feature's new/modified files. A full-suite
44
+ sanity pass is welcome, but a pre-existing unrelated failure must be
45
+ reported as such — do not blame it on this feature.
46
+
47
+ ## Process
48
+
49
+ 1. **Establish context.**
50
+ - Read the spec (`sdd/specs/<feature>.spec.md`) and the feature's task
51
+ files to understand what was built and the acceptance criteria.
52
+ - Identify new/modified files from git:
53
+ ```bash
54
+ git diff --name-only "$(git merge-base HEAD dev)"...HEAD
55
+ git diff --name-only # uncommitted, if any
56
+ ```
57
+ 2. **Activate the environment.**
58
+ ```bash
59
+ source .venv/bin/activate
60
+ ```
61
+ 3. **Run the test suite** (capture exit codes — they decide the verdict):
62
+ ```bash
63
+ # a) Targeted: the feature's own tests
64
+ pytest <feature-test-paths> -q --tb=short
65
+ # b) Sanity: quick full-suite signal (tolerate pre-existing failures,
66
+ # but attribute them correctly in the report)
67
+ pytest -q --tb=line 2>&1 | tail -30
68
+ ```
69
+ Use `pytest-asyncio` conventions already in the repo for async tests.
70
+ 4. **Lint and type-check the changed files only:**
71
+ ```bash
72
+ ruff check <changed-files>
73
+ mypy <changed-files> # only if a mypy config exists in the repo
74
+ ```
75
+ 5. **Map acceptance criteria to tests.** For each AC in the spec, find at
76
+ least one covering test. Flag any AC with no test as a coverage gap.
77
+ 6. **Decide the verdict.** `PASS` only if: the feature's targeted tests all
78
+ pass AND `ruff` returns 0 AND `mypy` returns 0 (when configured) AND no
79
+ acceptance criterion is left without a test. Otherwise `FAIL`.
80
+
81
+ ## Output Contract
82
+
83
+ Write the report to `.autopilot/qa-report.md` (create the `.autopilot/`
84
+ directory if needed). The autopilot loop greps it with
85
+ `grep -oP '(?<=verdict:\s)(PASS|FAIL)'`, so the verdict line MUST contain
86
+ `verdict: PASS` or `verdict: FAIL` with exactly one space after the colon.
87
+
88
+ ```markdown
89
+ # QA Report: FEAT-<ID>
90
+
91
+ **verdict: PASS**
92
+
93
+ ## Test Results
94
+ - Targeted tests: 15/15 passed
95
+ - Full-suite sanity: 0 new failures (2 pre-existing, unrelated — see notes)
96
+ - Linting (ruff): 0 errors, 2 warnings
97
+ - Type checking (mypy): 0 errors
98
+
99
+ ## AC Test Coverage
100
+ | AC | Has Test | Test File | Status |
101
+ |----|----------|-----------|--------|
102
+ | User can authenticate via OAuth | ✅ | tests/integrations/test_oauth.py | PASS |
103
+ | Token refresh happens automatically | ❌ | — | NO COVERAGE |
104
+
105
+ ## Files Without Tests
106
+ - parrot/integrations/jira/oauth.py::_refresh_token
107
+
108
+ ## Issues Found
109
+ - [parrot/integrations/jira/oauth.py:88] missing `await` on async call (FAIL)
110
+
111
+ ## Notes
112
+ Two full-suite failures (tests/loaders/test_pdf.py) predate this feature
113
+ and are unrelated to FEAT-<ID>.
114
+ ```
115
+
116
+ After writing the file, also print the verdict line to stdout so the
117
+ orchestrator can read it without opening the file.
118
+
119
+ ## Failure handling
120
+
121
+ A `FAIL` verdict is NOT an agent error — write a complete, valid report and
122
+ exit 0. Only hard errors (worktree path missing, `.venv` absent, git not a
123
+ repo) are true failures; surface those plainly so the autopilot can stop.