devflow-engine 1.0.0__py3-none-any.whl

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 (393) hide show
  1. devflow_engine/__init__.py +3 -0
  2. devflow_engine/agentic_prompts.py +100 -0
  3. devflow_engine/agentic_runtime.py +398 -0
  4. devflow_engine/api_key_flow_harness.py +539 -0
  5. devflow_engine/api_keys.py +357 -0
  6. devflow_engine/bootstrap/__init__.py +2 -0
  7. devflow_engine/bootstrap/provision_from_template.py +84 -0
  8. devflow_engine/cli/__init__.py +0 -0
  9. devflow_engine/cli/app.py +7270 -0
  10. devflow_engine/core/__init__.py +0 -0
  11. devflow_engine/core/config.py +86 -0
  12. devflow_engine/core/logging.py +29 -0
  13. devflow_engine/core/paths.py +45 -0
  14. devflow_engine/core/toml_kv.py +33 -0
  15. devflow_engine/devflow_event_worker.py +1292 -0
  16. devflow_engine/devflow_state.py +201 -0
  17. devflow_engine/devin2/__init__.py +9 -0
  18. devflow_engine/devin2/agent_definition.py +120 -0
  19. devflow_engine/devin2/pi_runner.py +204 -0
  20. devflow_engine/devin_orchestration.py +69 -0
  21. devflow_engine/docs/prompts/anti-patterns.md +42 -0
  22. devflow_engine/docs/prompts/devin-agent-prompt.md +55 -0
  23. devflow_engine/docs/prompts/devin2-agent-prompt.md +81 -0
  24. devflow_engine/docs/prompts/examples/devin-vapi-clone-reference-exchange.json +85 -0
  25. devflow_engine/doctor/__init__.py +2 -0
  26. devflow_engine/doctor/triage.py +140 -0
  27. devflow_engine/error/__init__.py +0 -0
  28. devflow_engine/error/remediation.py +21 -0
  29. devflow_engine/errors/error_solver_dag.py +522 -0
  30. devflow_engine/errors/runtime_observability.py +67 -0
  31. devflow_engine/idea/__init__.py +4 -0
  32. devflow_engine/idea/actors.py +481 -0
  33. devflow_engine/idea/agentic.py +465 -0
  34. devflow_engine/idea/analyze.py +93 -0
  35. devflow_engine/idea/devin_chat_dag.py +1 -0
  36. devflow_engine/idea/diff.py +99 -0
  37. devflow_engine/idea/drafts.py +446 -0
  38. devflow_engine/idea/idea_creation_dag.py +643 -0
  39. devflow_engine/idea/ideation_enrichment.py +355 -0
  40. devflow_engine/idea/ideation_enrichment_worker.py +19 -0
  41. devflow_engine/idea/paths.py +28 -0
  42. devflow_engine/idea/promote.py +53 -0
  43. devflow_engine/idea/redaction.py +27 -0
  44. devflow_engine/idea/repo_tools.py +1277 -0
  45. devflow_engine/idea/response_mode.py +30 -0
  46. devflow_engine/idea/story_pipeline.py +1585 -0
  47. devflow_engine/idea/sufficiency.py +376 -0
  48. devflow_engine/idea/traditional_stories.py +1257 -0
  49. devflow_engine/implementation/__init__.py +0 -0
  50. devflow_engine/implementation/alembic_preflight.py +700 -0
  51. devflow_engine/implementation/dag.py +8450 -0
  52. devflow_engine/implementation/green_gate.py +93 -0
  53. devflow_engine/implementation/prompts.py +108 -0
  54. devflow_engine/implementation/test_runtime.py +623 -0
  55. devflow_engine/integration/__init__.py +19 -0
  56. devflow_engine/integration/agentic.py +66 -0
  57. devflow_engine/integration/dag.py +3539 -0
  58. devflow_engine/integration/prompts.py +114 -0
  59. devflow_engine/integration/supabase_schema.sql +31 -0
  60. devflow_engine/integration/supabase_sync.py +177 -0
  61. devflow_engine/llm/__init__.py +1 -0
  62. devflow_engine/llm/cli_one_shot.py +84 -0
  63. devflow_engine/llm/cli_stream.py +371 -0
  64. devflow_engine/llm/execution_context.py +26 -0
  65. devflow_engine/llm/invoke.py +1322 -0
  66. devflow_engine/llm/provider_api.py +304 -0
  67. devflow_engine/llm/repo_knowledge.py +588 -0
  68. devflow_engine/llm_primitives.py +315 -0
  69. devflow_engine/orchestration.py +62 -0
  70. devflow_engine/planning/__init__.py +0 -0
  71. devflow_engine/planning/analyze_repo.py +92 -0
  72. devflow_engine/planning/render_drafts.py +133 -0
  73. devflow_engine/playground/__init__.py +0 -0
  74. devflow_engine/playground/hooks.py +26 -0
  75. devflow_engine/playwright_workflow/__init__.py +5 -0
  76. devflow_engine/playwright_workflow/dag.py +1317 -0
  77. devflow_engine/process/__init__.py +5 -0
  78. devflow_engine/process/dag.py +59 -0
  79. devflow_engine/project_registration/__init__.py +3 -0
  80. devflow_engine/project_registration/dag.py +1581 -0
  81. devflow_engine/project_registry.py +109 -0
  82. devflow_engine/prompts/devin/generic/prompt.md +6 -0
  83. devflow_engine/prompts/devin/ideation/prompt.md +263 -0
  84. devflow_engine/prompts/devin/ideation/scenarios.md +5 -0
  85. devflow_engine/prompts/devin/ideation_loop/prompt.md +6 -0
  86. devflow_engine/prompts/devin/insight/prompt.md +11 -0
  87. devflow_engine/prompts/devin/insight/scenarios.md +5 -0
  88. devflow_engine/prompts/devin/intake/prompt.md +15 -0
  89. devflow_engine/prompts/devin/iterate/prompt.md +12 -0
  90. devflow_engine/prompts/devin/shared/eval_doctrine.md +9 -0
  91. devflow_engine/prompts/devin/shared/principles.md +246 -0
  92. devflow_engine/prompts/devin_eval/assessment/prompt.md +18 -0
  93. devflow_engine/prompts/idea/api_ideation_agent/prompt.md +8 -0
  94. devflow_engine/prompts/idea/api_insight_agent/prompt.md +8 -0
  95. devflow_engine/prompts/idea/response_doctrine/prompt.md +18 -0
  96. devflow_engine/prompts/implementation/dependency_assessment/prompt.md +12 -0
  97. devflow_engine/prompts/implementation/green/green/prompt.md +11 -0
  98. devflow_engine/prompts/implementation/green/node_config/prompt.md +3 -0
  99. devflow_engine/prompts/implementation/green_review/outcome_review/prompt.md +5 -0
  100. devflow_engine/prompts/implementation/green_review/prior_run_review/prompt.md +5 -0
  101. devflow_engine/prompts/implementation/red/prompt.md +27 -0
  102. devflow_engine/prompts/implementation/redreview/prompt.md +23 -0
  103. devflow_engine/prompts/implementation/redreview_repair/prompt.md +16 -0
  104. devflow_engine/prompts/implementation/setupdoc/prompt.md +10 -0
  105. devflow_engine/prompts/implementation/story_planning/prompt.md +13 -0
  106. devflow_engine/prompts/implementation/test_design/prompt.md +27 -0
  107. devflow_engine/prompts/integration/README.md +185 -0
  108. devflow_engine/prompts/integration/green/example.md +67 -0
  109. devflow_engine/prompts/integration/green/green/prompt.md +10 -0
  110. devflow_engine/prompts/integration/green/node_config/prompt.md +42 -0
  111. devflow_engine/prompts/integration/green/past_prompts/20260417T212300/green/prompt.md +15 -0
  112. devflow_engine/prompts/integration/green/past_prompts/20260417T212300/node_config/prompt.md +42 -0
  113. devflow_engine/prompts/integration/green_enrich/example.md +79 -0
  114. devflow_engine/prompts/integration/green_enrich/green_enrich/prompt.md +9 -0
  115. devflow_engine/prompts/integration/green_enrich/node_config/prompt.md +41 -0
  116. devflow_engine/prompts/integration/green_enrich/past_prompts/20260417T212300/green_enrich/prompt.md +14 -0
  117. devflow_engine/prompts/integration/green_enrich/past_prompts/20260417T212300/node_config/prompt.md +41 -0
  118. devflow_engine/prompts/integration/red/code_repair/prompt.md +12 -0
  119. devflow_engine/prompts/integration/red/example.md +152 -0
  120. devflow_engine/prompts/integration/red/node_config/prompt.md +86 -0
  121. devflow_engine/prompts/integration/red/past_prompts/20260417T212300/code_repair/prompt.md +19 -0
  122. devflow_engine/prompts/integration/red/past_prompts/20260417T212300/node_config/prompt.md +84 -0
  123. devflow_engine/prompts/integration/red/past_prompts/20260417T212300/red/prompt.md +16 -0
  124. devflow_engine/prompts/integration/red/past_prompts/20260417T212300/red_repair/prompt.md +15 -0
  125. devflow_engine/prompts/integration/red/past_prompts/20260417T215032/code_repair/prompt.md +10 -0
  126. devflow_engine/prompts/integration/red/past_prompts/20260417T215032/node_config/prompt.md +84 -0
  127. devflow_engine/prompts/integration/red/past_prompts/20260417T215032/red_repair/prompt.md +11 -0
  128. devflow_engine/prompts/integration/red/red/prompt.md +11 -0
  129. devflow_engine/prompts/integration/red/red_repair/prompt.md +12 -0
  130. devflow_engine/prompts/integration/red_review/example.md +71 -0
  131. devflow_engine/prompts/integration/red_review/node_config/prompt.md +41 -0
  132. devflow_engine/prompts/integration/red_review/past_prompts/20260417T212300/node_config/prompt.md +41 -0
  133. devflow_engine/prompts/integration/red_review/past_prompts/20260417T212300/red_review/prompt.md +15 -0
  134. devflow_engine/prompts/integration/red_review/red_review/prompt.md +9 -0
  135. devflow_engine/prompts/integration/resolve/example.md +111 -0
  136. devflow_engine/prompts/integration/resolve/node_config/prompt.md +64 -0
  137. devflow_engine/prompts/integration/resolve/past_prompts/20260417T212300/node_config/prompt.md +64 -0
  138. devflow_engine/prompts/integration/resolve/past_prompts/20260417T212300/resolve_implicated_users/prompt.md +15 -0
  139. devflow_engine/prompts/integration/resolve/past_prompts/20260417T212300/resolve_side_effects/prompt.md +15 -0
  140. devflow_engine/prompts/integration/resolve/resolve_implicated_users/prompt.md +10 -0
  141. devflow_engine/prompts/integration/resolve/resolve_side_effects/prompt.md +10 -0
  142. devflow_engine/prompts/integration/validate/build_idea_acceptance_coverage/prompt.md +12 -0
  143. devflow_engine/prompts/integration/validate/code_repair/prompt.md +13 -0
  144. devflow_engine/prompts/integration/validate/example.md +143 -0
  145. devflow_engine/prompts/integration/validate/node_config/prompt.md +87 -0
  146. devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/code_repair/prompt.md +19 -0
  147. devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/node_config/prompt.md +67 -0
  148. devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/validate_enrich_gate/prompt.md +17 -0
  149. devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/validate_repair/prompt.md +16 -0
  150. devflow_engine/prompts/integration/validate/past_prompts/20260417T215032/code_repair/prompt.md +10 -0
  151. devflow_engine/prompts/integration/validate/past_prompts/20260417T215032/node_config/prompt.md +67 -0
  152. devflow_engine/prompts/integration/validate/past_prompts/20260417T215032/validate_repair/prompt.md +9 -0
  153. devflow_engine/prompts/integration/validate/validate_enrich_gate/prompt.md +10 -0
  154. devflow_engine/prompts/integration/validate/validate_repair/prompt.md +20 -0
  155. devflow_engine/prompts/integration/write_workflows/example.md +100 -0
  156. devflow_engine/prompts/integration/write_workflows/node_config/prompt.md +44 -0
  157. devflow_engine/prompts/integration/write_workflows/past_prompts/20260417T212300/node_config/prompt.md +44 -0
  158. devflow_engine/prompts/integration/write_workflows/past_prompts/20260417T212300/write_workflows/prompt.md +17 -0
  159. devflow_engine/prompts/integration/write_workflows/write_workflows/prompt.md +11 -0
  160. devflow_engine/prompts/iterate/README.md +7 -0
  161. devflow_engine/prompts/iterate/coder/prompt.md +11 -0
  162. devflow_engine/prompts/iterate/framer/prompt.md +11 -0
  163. devflow_engine/prompts/iterate/iterator/prompt.md +13 -0
  164. devflow_engine/prompts/iterate/observer/prompt.md +11 -0
  165. devflow_engine/prompts/recovery/diagnosis/prompt.md +7 -0
  166. devflow_engine/prompts/recovery/execution/prompt.md +8 -0
  167. devflow_engine/prompts/recovery/execution_verification/prompt.md +7 -0
  168. devflow_engine/prompts/recovery/failure_investigation/prompt.md +10 -0
  169. devflow_engine/prompts/recovery/preflight_health_repo_repair/prompt.md +8 -0
  170. devflow_engine/prompts/recovery/remediation_execution/prompt.md +11 -0
  171. devflow_engine/prompts/recovery/root_cause_investigation/prompt.md +12 -0
  172. devflow_engine/prompts/scope_idea/doctrine/prompt.md +7 -0
  173. devflow_engine/prompts/source_doc_eval/document/prompt.md +6 -0
  174. devflow_engine/prompts/source_doc_eval/targeted_mutation/prompt.md +9 -0
  175. devflow_engine/prompts/source_doc_mutation/domain_entities/prompt.md +6 -0
  176. devflow_engine/prompts/source_doc_mutation/product_brief/prompt.md +6 -0
  177. devflow_engine/prompts/source_doc_mutation/project_doc_coherence/prompt.md +7 -0
  178. devflow_engine/prompts/source_doc_mutation/project_doc_render/prompt.md +9 -0
  179. devflow_engine/prompts/source_doc_mutation/source_doc_coherence/prompt.md +5 -0
  180. devflow_engine/prompts/source_doc_mutation/source_doc_enrichment_coherence/prompt.md +6 -0
  181. devflow_engine/prompts/source_doc_mutation/user_workflows/prompt.md +6 -0
  182. devflow_engine/prompts/source_scope/doctrine/prompt.md +10 -0
  183. devflow_engine/prompts/ui_grounding/doctrine/prompt.md +7 -0
  184. devflow_engine/recovery/__init__.py +3 -0
  185. devflow_engine/recovery/dag.py +2609 -0
  186. devflow_engine/recovery/models.py +220 -0
  187. devflow_engine/refactor.py +93 -0
  188. devflow_engine/registry/__init__.py +1 -0
  189. devflow_engine/registry/cards.py +238 -0
  190. devflow_engine/registry/domain_normalize.py +60 -0
  191. devflow_engine/registry/effects.py +65 -0
  192. devflow_engine/registry/enforce_report.py +150 -0
  193. devflow_engine/registry/module_cards_classify.py +164 -0
  194. devflow_engine/registry/module_cards_draft.py +184 -0
  195. devflow_engine/registry/module_cards_gate.py +59 -0
  196. devflow_engine/registry/packages.py +347 -0
  197. devflow_engine/registry/pathways.py +323 -0
  198. devflow_engine/review/__init__.py +11 -0
  199. devflow_engine/review/dag.py +588 -0
  200. devflow_engine/review/review_story.py +67 -0
  201. devflow_engine/scope_idea/__init__.py +3 -0
  202. devflow_engine/scope_idea/agentic.py +39 -0
  203. devflow_engine/scope_idea/dag.py +1069 -0
  204. devflow_engine/scope_idea/models.py +175 -0
  205. devflow_engine/skills/builtins/devflow/queue_failure_investigation/SKILL.md +112 -0
  206. devflow_engine/skills/builtins/devflow/queue_idea_to_story/SKILL.md +120 -0
  207. devflow_engine/skills/builtins/devflow/queue_integration/SKILL.md +105 -0
  208. devflow_engine/skills/builtins/devflow/queue_recovery/SKILL.md +108 -0
  209. devflow_engine/skills/builtins/devflow/queue_runtime_core/SKILL.md +155 -0
  210. devflow_engine/skills/builtins/devflow/queue_story_implementation/SKILL.md +122 -0
  211. devflow_engine/skills/builtins/devin/idea_to_story_handoff/SKILL.md +120 -0
  212. devflow_engine/skills/builtins/devin/ideation/SKILL.md +168 -0
  213. devflow_engine/skills/builtins/devin/ideation/state-and-phrasing-reference.md +18 -0
  214. devflow_engine/skills/builtins/devin/insight/SKILL.md +22 -0
  215. devflow_engine/skills/registry.example.yaml +42 -0
  216. devflow_engine/source_doc_assumptions.py +291 -0
  217. devflow_engine/source_doc_mutation_dag.py +1606 -0
  218. devflow_engine/source_doc_mutation_eval.py +417 -0
  219. devflow_engine/source_doc_mutation_worker.py +25 -0
  220. devflow_engine/source_docs_schema.py +207 -0
  221. devflow_engine/source_docs_updater.py +309 -0
  222. devflow_engine/source_scope/__init__.py +15 -0
  223. devflow_engine/source_scope/agentic.py +45 -0
  224. devflow_engine/source_scope/dag.py +1626 -0
  225. devflow_engine/source_scope/models.py +177 -0
  226. devflow_engine/stores/__init__.py +0 -0
  227. devflow_engine/stores/execution_store.py +3534 -0
  228. devflow_engine/story/__init__.py +0 -0
  229. devflow_engine/story/contracts.py +160 -0
  230. devflow_engine/story/discovery.py +47 -0
  231. devflow_engine/story/evidence.py +118 -0
  232. devflow_engine/story/hashing.py +27 -0
  233. devflow_engine/story/implemented_queue_purge.py +148 -0
  234. devflow_engine/story/indexer.py +105 -0
  235. devflow_engine/story/io.py +20 -0
  236. devflow_engine/story/markdown_contracts.py +298 -0
  237. devflow_engine/story/reconciliation.py +408 -0
  238. devflow_engine/story/validate_stories.py +149 -0
  239. devflow_engine/story/validate_tests_story.py +512 -0
  240. devflow_engine/story/validation.py +133 -0
  241. devflow_engine/ui_grounding/__init__.py +11 -0
  242. devflow_engine/ui_grounding/agentic.py +31 -0
  243. devflow_engine/ui_grounding/dag.py +874 -0
  244. devflow_engine/ui_grounding/models.py +224 -0
  245. devflow_engine/ui_grounding/pencil_bridge.py +247 -0
  246. devflow_engine/vendor/__init__.py +0 -0
  247. devflow_engine/vendor/datalumina_genai/__init__.py +11 -0
  248. devflow_engine/vendor/datalumina_genai/core/__init__.py +0 -0
  249. devflow_engine/vendor/datalumina_genai/core/exceptions.py +9 -0
  250. devflow_engine/vendor/datalumina_genai/core/nodes/__init__.py +0 -0
  251. devflow_engine/vendor/datalumina_genai/core/nodes/agent.py +48 -0
  252. devflow_engine/vendor/datalumina_genai/core/nodes/agent_streaming_node.py +26 -0
  253. devflow_engine/vendor/datalumina_genai/core/nodes/base.py +89 -0
  254. devflow_engine/vendor/datalumina_genai/core/nodes/concurrent.py +30 -0
  255. devflow_engine/vendor/datalumina_genai/core/nodes/router.py +69 -0
  256. devflow_engine/vendor/datalumina_genai/core/schema.py +72 -0
  257. devflow_engine/vendor/datalumina_genai/core/task.py +52 -0
  258. devflow_engine/vendor/datalumina_genai/core/validate.py +139 -0
  259. devflow_engine/vendor/datalumina_genai/core/workflow.py +200 -0
  260. devflow_engine/worker.py +1086 -0
  261. devflow_engine/worker_guard.py +233 -0
  262. devflow_engine-1.0.0.dist-info/METADATA +235 -0
  263. devflow_engine-1.0.0.dist-info/RECORD +393 -0
  264. devflow_engine-1.0.0.dist-info/WHEEL +4 -0
  265. devflow_engine-1.0.0.dist-info/entry_points.txt +3 -0
  266. devin/__init__.py +6 -0
  267. devin/dag.py +58 -0
  268. devin/dag_two_arm.py +138 -0
  269. devin/devin_chat_scenario_catalog.json +588 -0
  270. devin/devin_eval.py +677 -0
  271. devin/nodes/__init__.py +0 -0
  272. devin/nodes/ideation/__init__.py +0 -0
  273. devin/nodes/ideation/node.py +195 -0
  274. devin/nodes/ideation/playground.py +267 -0
  275. devin/nodes/ideation/prompt.md +65 -0
  276. devin/nodes/ideation/scenarios/continue_refinement.py +13 -0
  277. devin/nodes/ideation/scenarios/continue_refinement_evals.py +18 -0
  278. devin/nodes/ideation/scenarios/idea_fits_existing_patterns.py +17 -0
  279. devin/nodes/ideation/scenarios/idea_fits_existing_patterns_evals.py +16 -0
  280. devin/nodes/ideation/scenarios/large_idea_split.py +4 -0
  281. devin/nodes/ideation/scenarios/large_idea_split_evals.py +17 -0
  282. devin/nodes/ideation/scenarios/source_documentation_added.py +4 -0
  283. devin/nodes/ideation/scenarios/source_documentation_added_evals.py +16 -0
  284. devin/nodes/ideation/scenarios/user_says_create_it.py +30 -0
  285. devin/nodes/ideation/scenarios/user_says_create_it_evals.py +23 -0
  286. devin/nodes/ideation/scenarios/vague_idea.py +16 -0
  287. devin/nodes/ideation/scenarios/vague_idea_evals.py +47 -0
  288. devin/nodes/ideation/tools.json +312 -0
  289. devin/nodes/insight/__init__.py +0 -0
  290. devin/nodes/insight/node.py +49 -0
  291. devin/nodes/insight/playground.py +154 -0
  292. devin/nodes/insight/prompt.md +61 -0
  293. devin/nodes/insight/scenarios/architecture_pattern_query.py +15 -0
  294. devin/nodes/insight/scenarios/architecture_pattern_query_evals.py +25 -0
  295. devin/nodes/insight/scenarios/codebase_exploration.py +15 -0
  296. devin/nodes/insight/scenarios/codebase_exploration_evals.py +23 -0
  297. devin/nodes/insight/scenarios/devin_ideation_routing.py +19 -0
  298. devin/nodes/insight/scenarios/devin_ideation_routing_evals.py +39 -0
  299. devin/nodes/insight/scenarios/devin_insight_routing.py +20 -0
  300. devin/nodes/insight/scenarios/devin_insight_routing_evals.py +40 -0
  301. devin/nodes/insight/scenarios/operational_debugging.py +15 -0
  302. devin/nodes/insight/scenarios/operational_debugging_evals.py +23 -0
  303. devin/nodes/insight/scenarios/operational_question.py +9 -0
  304. devin/nodes/insight/scenarios/operational_question_evals.py +8 -0
  305. devin/nodes/insight/scenarios/queue_status.py +15 -0
  306. devin/nodes/insight/scenarios/queue_status_evals.py +23 -0
  307. devin/nodes/insight/scenarios/source_doc_explanation.py +14 -0
  308. devin/nodes/insight/scenarios/source_doc_explanation_evals.py +21 -0
  309. devin/nodes/insight/scenarios/worker_state_check.py +15 -0
  310. devin/nodes/insight/scenarios/worker_state_check_evals.py +22 -0
  311. devin/nodes/insight/tools.json +126 -0
  312. devin/nodes/intake/__init__.py +0 -0
  313. devin/nodes/intake/node.py +27 -0
  314. devin/nodes/intake/playground.py +47 -0
  315. devin/nodes/intake/prompt.md +12 -0
  316. devin/nodes/intake/scenarios/ideation_routing.py +4 -0
  317. devin/nodes/intake/scenarios/ideation_routing_evals.py +5 -0
  318. devin/nodes/intake/scenarios/insight_routing.py +4 -0
  319. devin/nodes/intake/scenarios/insight_routing_evals.py +5 -0
  320. devin/nodes/iterate/README.md +44 -0
  321. devin/nodes/iterate/__init__.py +1 -0
  322. devin/nodes/iterate/_archived_design_stages/01-objectives-requirements.md +112 -0
  323. devin/nodes/iterate/_archived_design_stages/02-evals.md +131 -0
  324. devin/nodes/iterate/_archived_design_stages/03-tools-and-boundaries.md +110 -0
  325. devin/nodes/iterate/_archived_design_stages/04-harness-and-playground.md +32 -0
  326. devin/nodes/iterate/_archived_design_stages/05-prompt-deferred.md +11 -0
  327. devin/nodes/iterate/_archived_design_stages/coder_agent_design/01-objectives-requirements.md +20 -0
  328. devin/nodes/iterate/_archived_design_stages/coder_agent_design/02-evals.md +8 -0
  329. devin/nodes/iterate/_archived_design_stages/coder_agent_design/03-tools-and-boundaries.md +14 -0
  330. devin/nodes/iterate/_archived_design_stages/coder_agent_design/04-harness-and-playground.md +12 -0
  331. devin/nodes/iterate/_archived_design_stages/framer_agent_design/01-objectives-requirements.md +20 -0
  332. devin/nodes/iterate/_archived_design_stages/framer_agent_design/02-evals.md +8 -0
  333. devin/nodes/iterate/_archived_design_stages/framer_agent_design/03-tools-and-boundaries.md +13 -0
  334. devin/nodes/iterate/_archived_design_stages/framer_agent_design/04-harness-and-playground.md +12 -0
  335. devin/nodes/iterate/_archived_design_stages/iterator_agent_design/01-objectives-requirements.md +25 -0
  336. devin/nodes/iterate/_archived_design_stages/iterator_agent_design/02-evals.md +9 -0
  337. devin/nodes/iterate/_archived_design_stages/iterator_agent_design/03-tools-and-boundaries.md +14 -0
  338. devin/nodes/iterate/_archived_design_stages/iterator_agent_design/04-harness-and-playground.md +12 -0
  339. devin/nodes/iterate/_archived_design_stages/observer_agent_design/01-objectives-requirements.md +20 -0
  340. devin/nodes/iterate/_archived_design_stages/observer_agent_design/02-evals.md +8 -0
  341. devin/nodes/iterate/_archived_design_stages/observer_agent_design/03-tools-and-boundaries.md +14 -0
  342. devin/nodes/iterate/_archived_design_stages/observer_agent_design/04-harness-and-playground.md +13 -0
  343. devin/nodes/iterate/agent-roles.md +89 -0
  344. devin/nodes/iterate/agents/README.md +10 -0
  345. devin/nodes/iterate/artifacts.md +504 -0
  346. devin/nodes/iterate/contract.md +100 -0
  347. devin/nodes/iterate/eval-plan.md +74 -0
  348. devin/nodes/iterate/node.py +100 -0
  349. devin/nodes/iterate/pipeline/README.md +13 -0
  350. devin/nodes/iterate/playground-contract.md +76 -0
  351. devin/nodes/iterate/prompt.md +11 -0
  352. devin/nodes/iterate/scenarios/README.md +38 -0
  353. devin/nodes/iterate/scenarios/artifact-and-loop-scenarios.md +101 -0
  354. devin/nodes/iterate/scenarios/coder_artifact_alignment.py +32 -0
  355. devin/nodes/iterate/scenarios/coder_artifact_alignment_evals.py +45 -0
  356. devin/nodes/iterate/scenarios/coder_bounded_fix.py +27 -0
  357. devin/nodes/iterate/scenarios/coder_bounded_fix_evals.py +45 -0
  358. devin/nodes/iterate/scenarios/devin_iterate_routing.py +21 -0
  359. devin/nodes/iterate/scenarios/devin_iterate_routing_evals.py +36 -0
  360. devin/nodes/iterate/scenarios/framer_scope_boundary.py +25 -0
  361. devin/nodes/iterate/scenarios/framer_scope_boundary_evals.py +57 -0
  362. devin/nodes/iterate/scenarios/framer_task_framing.py +25 -0
  363. devin/nodes/iterate/scenarios/framer_task_framing_evals.py +58 -0
  364. devin/nodes/iterate/scenarios/iterate_error_fix.py +21 -0
  365. devin/nodes/iterate/scenarios/iterate_error_fix_evals.py +39 -0
  366. devin/nodes/iterate/scenarios/iterate_quick_change.py +21 -0
  367. devin/nodes/iterate/scenarios/iterate_quick_change_evals.py +35 -0
  368. devin/nodes/iterate/scenarios/iterate_to_idea_promotion.py +23 -0
  369. devin/nodes/iterate/scenarios/iterate_to_idea_promotion_evals.py +53 -0
  370. devin/nodes/iterate/scenarios/iterate_to_insight_reroute.py +23 -0
  371. devin/nodes/iterate/scenarios/iterate_to_insight_reroute_evals.py +53 -0
  372. devin/nodes/iterate/scenarios/observer_evidence_seam.py +28 -0
  373. devin/nodes/iterate/scenarios/observer_evidence_seam_evals.py +55 -0
  374. devin/nodes/iterate/scenarios/observer_repro_creation.py +28 -0
  375. devin/nodes/iterate/scenarios/observer_repro_creation_evals.py +45 -0
  376. devin/nodes/iterate/scenarios/routing-matrix.md +45 -0
  377. devin/nodes/shared/__init__.py +0 -0
  378. devin/nodes/shared/filemaker_expert.md +80 -0
  379. devin/nodes/shared/filemaker_expert.py +354 -0
  380. devin/nodes/shared/filemaker_expert_eval/runner.py +176 -0
  381. devin/nodes/shared/filemaker_expert_eval/scenarios.json +65 -0
  382. devin/nodes/shared/goldilocks_advisor_eval/runner.py +214 -0
  383. devin/nodes/shared/goldilocks_advisor_eval/scenarios.json +58 -0
  384. devin/nodes/shared/helpers.py +156 -0
  385. devin/nodes/shared/idea_compliance_advisor_eval/runner.py +252 -0
  386. devin/nodes/shared/idea_compliance_advisor_eval/scenarios.json +75 -0
  387. devin/nodes/shared/models.py +44 -0
  388. devin/nodes/shared/post.py +40 -0
  389. devin/nodes/shared/router.py +107 -0
  390. devin/nodes/shared/tools.py +191 -0
  391. devin/shared/devin-chat-rubric.md +237 -0
  392. devin/shared/devin-chat-scenario-suite.md +90 -0
  393. devin/shared/eval_doctrine.md +9 -0
@@ -0,0 +1,175 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Literal
4
+
5
+ from pydantic import BaseModel, Field
6
+
7
+
8
+ ScopeShape = Literal["too_broad", "just_right", "too_narrow"]
9
+ ResolutionStatus = Literal["ideas_registered", "narrow_scope_review_required"]
10
+
11
+
12
+ class SourceEvidenceRef(BaseModel):
13
+ ref: str
14
+ summary: str | None = None
15
+
16
+
17
+ class ArtifactLineage(BaseModel):
18
+ stage: str
19
+ origin: Literal["model", "fallback", "deterministic"]
20
+ mode: str
21
+ artifact_path: str | None = None
22
+ agent_run_ref: str | None = None
23
+ generated_from: list[str] = Field(default_factory=list)
24
+ notes: list[str] = Field(default_factory=list)
25
+ metadata: dict[str, Any] = Field(default_factory=dict)
26
+
27
+
28
+ class ScopeContextArtifact(BaseModel):
29
+ project_id: str
30
+ scope_set_id: str
31
+ scope_id: str
32
+ scope_title: str
33
+ scope_description: str
34
+ source_support: list[SourceEvidenceRef] = Field(default_factory=list)
35
+ assumptions: list[str] = Field(default_factory=list)
36
+ cross_cutting_constraints: list[str] = Field(default_factory=list)
37
+ neighbor_scope_refs: list[str] = Field(default_factory=list)
38
+ approval_status: str = "approved"
39
+
40
+
41
+ class GoldilocksAssessmentArtifact(BaseModel):
42
+ execution_lineage: ArtifactLineage | None = None
43
+ scope_shape: ScopeShape
44
+ reasoning: str
45
+ dominant_outcomes: list[str] = Field(default_factory=list)
46
+ workflow_clusters: list[str] = Field(default_factory=list)
47
+ actor_clusters: list[str] = Field(default_factory=list)
48
+ outcome_coherence_summary: str | None = None
49
+ business_outcome_signals: list[str] = Field(default_factory=list)
50
+ implementation_detail_signals: list[str] = Field(default_factory=list)
51
+ breadth_signals: list[str] = Field(default_factory=list)
52
+ cohesion_notes: list[str] = Field(default_factory=list)
53
+ split_recommended: bool = False
54
+ recommended_child_idea_count: int = 1
55
+ merge_review_recommended: bool = False
56
+ notes: list[str] = Field(default_factory=list)
57
+
58
+
59
+ class GoldilocksDecisionArtifact(BaseModel):
60
+ decision: ScopeShape
61
+ reason: str
62
+ next_node: str
63
+
64
+
65
+ class IdeaCandidateArtifact(BaseModel):
66
+ execution_lineage: ArtifactLineage | None = None
67
+ idea_candidate_id: str
68
+ project_id: str
69
+ scope_set_id: str
70
+ scope_id: str
71
+ parent_scope_id: str
72
+ refs: list[str] = Field(default_factory=list)
73
+ title: str
74
+ problem: str
75
+ users: list[str]
76
+ goal: str
77
+ scope: list[str]
78
+ constraints: list[str]
79
+ acceptance_criteria: list[str]
80
+ assumptions: list[str]
81
+ traceability: list[str]
82
+ split_rationale: str | None = None
83
+
84
+
85
+ class IdeaSplitPlanArtifact(BaseModel):
86
+ execution_lineage: ArtifactLineage | None = None
87
+ project_id: str
88
+ scope_set_id: str
89
+ scope_id: str
90
+ parent_scope_id: str
91
+ refs: list[str] = Field(default_factory=list)
92
+ split_required: bool
93
+ split_rationale: str
94
+ child_ideas: list[IdeaCandidateArtifact]
95
+ coverage_of_parent_scope: list[str] = Field(default_factory=list)
96
+ remaining_risks: list[str] = Field(default_factory=list)
97
+
98
+
99
+ class IdeaCandidateSetArtifact(BaseModel):
100
+ lineage: list[ArtifactLineage] = Field(default_factory=list)
101
+ project_id: str
102
+ scope_set_id: str
103
+ scope_id: str
104
+ parent_scope_id: str
105
+ refs: list[str] = Field(default_factory=list)
106
+ idea_candidates: list[IdeaCandidateArtifact]
107
+ candidate_count: int
108
+ split_applied: bool
109
+ split_rationale: str | None = None
110
+
111
+
112
+ class RegisteredIdeaArtifact(BaseModel):
113
+ execution_lineage: ArtifactLineage | None = None
114
+ idea_id: str
115
+ source_scope_id: str
116
+ parent_scope_id: str
117
+ idea_candidate_id: str
118
+ title: str
119
+ summary: str
120
+ registry_ref: str
121
+ idea_ref: str
122
+ status: str
123
+
124
+
125
+ class IdeaRegistryRecordArtifact(BaseModel):
126
+ lineage: list[ArtifactLineage] = Field(default_factory=list)
127
+ project_id: str
128
+ scope_set_id: str
129
+ scope_id: str
130
+ parent_scope_id: str
131
+ refs: list[str] = Field(default_factory=list)
132
+ scope_shape: ScopeShape
133
+ registered_ideas: list[RegisteredIdeaArtifact]
134
+ registration_timestamp: str
135
+ registry_root: str
136
+
137
+
138
+ class NarrowScopeReviewArtifact(BaseModel):
139
+ execution_lineage: ArtifactLineage | None = None
140
+ project_id: str
141
+ scope_set_id: str
142
+ scope_id: str
143
+ parent_scope_id: str
144
+ refs: list[str] = Field(default_factory=list)
145
+ reason_too_narrow: str
146
+ suggested_merge_targets: list[str] = Field(default_factory=list)
147
+ human_review_required: bool = True
148
+ recommended_next_action: str
149
+
150
+
151
+ class IdeaResolutionPackageArtifact(BaseModel):
152
+ lineage: list[ArtifactLineage] = Field(default_factory=list)
153
+ project_id: str
154
+ scope_set_id: str
155
+ scope_id: str
156
+ parent_scope_id: str
157
+ refs: list[str] = Field(default_factory=list)
158
+ scope_shape: ScopeShape
159
+ split_applied: bool
160
+ resolution_status: ResolutionStatus
161
+ registered_idea_count: int
162
+ registered_ideas: list[RegisteredIdeaArtifact] = Field(default_factory=list)
163
+ assumptions_added: list[str] = Field(default_factory=list)
164
+ remaining_risks: list[str] = Field(default_factory=list)
165
+ recommended_next_action: str
166
+ review_required: bool = False
167
+ review_package_ref: str | None = None
168
+
169
+
170
+ class ScopeIdeaDagSummary(BaseModel):
171
+ exit_code: int
172
+ run_id: str
173
+ pipeline_dir: str
174
+ message: str
175
+ outcome: dict[str, object]
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: devflow-queue-failure-investigation
3
+ description: Cross-cutting DevFlow skill for failure/log investigation across queue lanes, with log-first evidence order and run-correlation doctrine.
4
+ owner: devflow
5
+ scope: built-in
6
+ version: 1
7
+ ---
8
+
9
+ # DevFlow queue: failure investigation / logs
10
+
11
+ Use this skill when the task is to answer:
12
+ - what failed
13
+ - where it failed
14
+ - whether the queue state matches the real failure
15
+ - whether recovery is acting on the correct seam
16
+ - whether a run is actually stuck, stale, or merely mis-correlated
17
+
18
+ This is the cross-cutting investigation module for all queue lanes.
19
+
20
+ ## Core doctrine
21
+
22
+ Do not start from summary rows alone when richer evidence exists.
23
+ Prefer this evidence order:
24
+
25
+ 1. **Primary:** streamed LLM / agent logs and session evidence
26
+ - `/Users/devflow/.devflow/llm_logs/*.jsonl`
27
+ - `/Users/devflow/.devflow/llm_sessions.sqlite`
28
+ 2. **Secondary:** node-level artifacts and errors
29
+ - `artifacts`
30
+ - `errors`
31
+ - `nodes`
32
+ 3. **Tertiary:** queue rows and worker summary state
33
+ - `idea_queue`
34
+ - `story_queue`
35
+ - `integration_queue`
36
+ - `recovery_queue`
37
+ - `project_workers`
38
+
39
+ ## Standard investigation loop
40
+
41
+ 1. Identify the lane and durable item id.
42
+ 2. Read the queue row and current worker state.
43
+ 3. Correlate to the wrapper/orchestration run.
44
+ 4. Search for the real child DAG run if the wrapper is thin.
45
+ 5. Read logs/artifacts for the failing stage.
46
+ 6. Classify the failure as one of:
47
+ - real code/runtime failure
48
+ - stale worker / reconciliation failure
49
+ - wrong-run investigation
50
+ - repeated churn with no material change
51
+ - blocked by prerequisite/state boundary
52
+
53
+ ## Wrapper-vs-child run rule
54
+
55
+ Never assume the user-facing wrapper run id is the same as the actual child DAG run id.
56
+ Check for mismatch explicitly.
57
+
58
+ Correlate on:
59
+ - queue item id
60
+ - `story_id` or `idea_id` when relevant
61
+ - repo root
62
+ - created-at time window
63
+ - artifact paths
64
+ - node sequence
65
+
66
+ A wrapper run can look stranded even while the child DAG succeeded correctly.
67
+ Do not call the whole flow failed until both layers are checked.
68
+
69
+ ## First inspection targets
70
+
71
+ ### For any failed lane
72
+ - queue row `failure_message`
73
+ - queue row `failure_context_json`
74
+ - matching run(s) in `runs`
75
+ - matching node rows in `nodes`
76
+ - matching `errors`
77
+ - high-value `artifacts`
78
+
79
+ ### For story churn
80
+ - `actual_failed_node`
81
+ - `churn_state`
82
+ - streamed transcripts for Green/Refactor/Security/etc.
83
+ - whether the edits hit the correct seam
84
+
85
+ ### For recovery churn
86
+ - recovery diagnosis/execution artifacts
87
+ - durable churn-gate evidence
88
+ - whether the same failure signature repeated without material repo/state change
89
+
90
+ ## What counts as success
91
+
92
+ A failure investigation is successful when it produces a grounded answer to:
93
+ - the failing boundary
94
+ - the best primary evidence
95
+ - whether the state is real failure vs stale/mis-correlated state
96
+ - the next correct lane: retry, recovery, escalate, or declare blocked
97
+
98
+ ## What counts as blockage
99
+
100
+ Treat the investigation itself as blocked when:
101
+ - the queue item cannot be correlated to any relevant run or artifact
102
+ - logs are missing and DB evidence is internally inconsistent
103
+ - the worker/report state is stale and must be reconciled first
104
+ - the operator is still looking at the wrong wrapper run
105
+
106
+ ## Strong future tool candidates
107
+
108
+ - log-first failure packet reader
109
+ - queue item -> run/artifact/session correlation helper
110
+ - wrapper-child mismatch detector
111
+ - churn explainer for story/recovery lanes
112
+ - lane-specific first-evidence summary helper
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: devflow-queue-idea-to-story
3
+ description: Operational DevFlow skill for starting, observing, and investigating the idea-to-story queue lane.
4
+ owner: devflow
5
+ scope: built-in
6
+ version: 1
7
+ ---
8
+
9
+ # DevFlow queue: idea -> story
10
+
11
+ Use this skill when the task is about the **runtime lane that turns an already-approved idea into story outputs**.
12
+
13
+ This skill starts at the queue/runtime boundary.
14
+ It does **not** replace:
15
+ - `devin/ideation`
16
+ - `devin/idea_to_story_handoff`
17
+
18
+ Those own conversational approval truth.
19
+ This skill owns operational inspection after the idea payload exists or the queue lane is being discussed.
20
+
21
+ ## Core job
22
+
23
+ Determine whether an idea has:
24
+ - been queued for story generation
25
+ - been claimed and started
26
+ - produced durable story outputs
27
+ - failed, blocked, or stalled
28
+
29
+ ## How to start / kick the lane
30
+
31
+ Primary runtime path:
32
+ - ensure an `idea_queue` item exists for the `idea_id`
33
+ - run `devflow worker start --project <project_id> --once` for one-step pickup
34
+ - or `devflow worker start --project <project_id>` to drain the queue
35
+
36
+ Supabase/control-plane path in this repo:
37
+ - `devflow worker supabase-events`
38
+ - supported request event: `devflow.idea.stories.generate.request`
39
+
40
+ Do not say story generation started just because the idea was approved in conversation.
41
+ Runtime start begins when the queue item is claimed and the worker starts `worker.idea_to_story`.
42
+
43
+ ## Observe status
44
+
45
+ Check in this order:
46
+
47
+ 1. `devflow worker report --project <project_id>`
48
+ 2. `idea_queue` row in `<repo_root>/.devflow/execution.sqlite`
49
+ 3. correlated run in `runs` for kind `worker.idea_to_story`
50
+ 4. generated idea/story artifacts under `.devflow/ideas/<idea_id>/...`
51
+ 5. canonical story outputs under `ai_docs/context/v2/project_docs/user_stories/`
52
+
53
+ Good first SQL snapshot:
54
+
55
+ ```sql
56
+ select idea_queue_id, idea_id, status, started_run_id, finished_run_id, failure_message, updated_at
57
+ from idea_queue
58
+ where project_id = '<project_id>'
59
+ order by updated_at desc;
60
+ ```
61
+
62
+ High-value artifact locations:
63
+ - `.devflow/ideas/<idea_id>/traditional_user_stories/<story_set_id>/`
64
+ - `.devflow/ideas/<idea_id>/devflow_story_sets/<devflow_story_set_id>/`
65
+ - `ai_docs/context/v2/project_docs/user_stories/`
66
+
67
+ ## Investigate failures
68
+
69
+ Look first at:
70
+ 1. `idea_queue.failure_message`
71
+ 2. `idea_queue.failure_context_json`
72
+ 3. `runs` / `nodes` / `artifacts` for the correlated run
73
+ 4. any `resume_cursor` recorded in failure context
74
+ 5. story-generation artifacts in the idea directory
75
+
76
+ Helpful current commands:
77
+ - `devflow worker failed-ideas --project <project_id>`
78
+ - `devflow worker retry-idea --project <project_id> --latest`
79
+ - `devflow worker retry-idea --project <project_id> --latest --run-now`
80
+
81
+ If the lane failed after partial output, verify whether the failure happened in:
82
+ - traditional story decomposition
83
+ - story-plane adjudication
84
+ - DevFlow story compilation
85
+ - downstream sync/publication after story artifacts already exist
86
+
87
+ ## Primary evidence to inspect first
88
+
89
+ 1. `idea_queue` row
90
+ 2. run + node records
91
+ 3. `.devflow/ideas/<idea_id>/traditional_user_stories/...`
92
+ 4. `.devflow/ideas/<idea_id>/devflow_story_sets/...`
93
+ 5. canonical generated story docs
94
+
95
+ If richer agent logs exist for the failure, prefer those over summary fields.
96
+
97
+ ## What counts as success
98
+
99
+ Only treat the lane as successful when:
100
+ - the `idea_queue` row is terminal-complete
101
+ - the run finished successfully
102
+ - durable story outputs exist for the idea
103
+ - the canonical generated story surface was updated when that step belongs to the run
104
+
105
+ ## What counts as blockage
106
+
107
+ Treat these as blocked/problem states:
108
+ - `idea_queue.status = failed`
109
+ - repeated retries with the same `resume_cursor` and no new durable outputs
110
+ - story artifacts exist but queue/run reconciliation is inconsistent
111
+ - the idea payload is missing or stale for the referenced `idea_id`
112
+ - recovery has taken over the lane
113
+
114
+ ## Strong future tool candidates
115
+
116
+ - latest `idea_queue` summary for an `idea_id`
117
+ - `resume_cursor` explainer
118
+ - story-output locator for an `idea_id`
119
+ - latest failed idea retry helper
120
+ - queue-row -> run/artifact correlation helper
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: devflow-queue-integration
3
+ description: Operational DevFlow skill for kicking, observing, and investigating integration_queue work and integration DAG outputs.
4
+ owner: devflow
5
+ scope: built-in
6
+ version: 1
7
+ ---
8
+
9
+ # DevFlow queue: integration
10
+
11
+ Use this skill when the task is about **integration follow-through for an implemented idea**.
12
+
13
+ ## Core job
14
+
15
+ Determine whether integration work for an `idea_id` has:
16
+ - had a payload prepared
17
+ - been enqueued
18
+ - started via worker execution
19
+ - completed with durable current artifacts
20
+ - failed and handed off to recovery
21
+
22
+ ## How to start / kick the lane
23
+
24
+ Current repo surfaces:
25
+ - `devflow integration prepare <idea_id>`
26
+ - `devflow integration enqueue <idea_id> --project <project_id>`
27
+ - `devflow worker start --project <project_id> --once`
28
+
29
+ Manual direct run exists but is not the queue path:
30
+ - `devflow integration run <idea_id>`
31
+
32
+ When operating the queue lane, prefer enqueue + worker over claiming queue progress from a manual run.
33
+
34
+ ## Observe status
35
+
36
+ Check in this order:
37
+
38
+ 1. `devflow integration status <idea_id>`
39
+ 2. `devflow worker report --project <project_id>`
40
+ 3. `integration_queue` row in `.devflow/execution.sqlite`
41
+ 4. correlated run of kind `worker.integration`
42
+ 5. idea-local integration artifacts
43
+
44
+ High-value artifact locations:
45
+ - `.devflow/ideas/<idea_id>/integration_payload.json`
46
+ - `.devflow/ideas/<idea_id>/integration/current/`
47
+ - `.devflow/ideas/<idea_id>/integration/runs/`
48
+ - legacy fallback location: `.devflow/ideas/<idea_id>/pipelines/integration_dag/`
49
+
50
+ Good first SQL snapshot:
51
+
52
+ ```sql
53
+ select integration_queue_id, idea_id, status, started_run_id, finished_run_id, failure_message, updated_at
54
+ from integration_queue
55
+ where project_id = '<project_id>'
56
+ order by updated_at desc;
57
+ ```
58
+
59
+ ## Investigate failures
60
+
61
+ Look first at:
62
+ 1. `integration_queue.failure_message`
63
+ 2. `integration_queue.failure_context_json`
64
+ 3. `integration_payload.json`
65
+ 4. latest pipeline run directory
66
+ 5. run/node/artifact/error rows for `worker.integration`
67
+ 6. recovery queue state if the failure already escalated
68
+
69
+ Common real failure shapes:
70
+ - payload missing or stale for the `idea_id`
71
+ - implemented-story evidence incomplete
72
+ - integration DAG failed after starting
73
+ - queue row failed but current artifacts partially exist
74
+
75
+ ## Primary evidence to inspect first
76
+
77
+ 1. `integration_queue` row
78
+ 2. `devflow integration status <idea_id>` output
79
+ 3. payload path
80
+ 4. latest integration run dir
81
+ 5. correlated DB run/artifact/error records
82
+
83
+ ## What counts as success
84
+
85
+ Only treat the lane as successful when:
86
+ - `integration_queue.status = completed`
87
+ - the integration run succeeded
88
+ - `.devflow/ideas/<idea_id>/integration/current/` exists or equivalent latest durable current state exists
89
+ - any registered-project sync side effects completed when expected
90
+
91
+ ## What counts as blockage
92
+
93
+ Treat these as blocked/problem states:
94
+ - queue row failed
95
+ - payload cannot be prepared/resolved
96
+ - latest run exists but current durable integration state was not updated
97
+ - recovery is now the active owner of the failed integration item
98
+
99
+ ## Strong future tool candidates
100
+
101
+ - `idea_id` -> integration status summary
102
+ - integration payload validator/locator
103
+ - latest integration run summary
104
+ - integration queue retry / inspect helper
105
+ - queue-to-artifact correlation helper
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: devflow-queue-recovery
3
+ description: Operational DevFlow skill for recovery_queue execution, recovery outcome classification, and recovery handoff inspection.
4
+ owner: devflow
5
+ scope: built-in
6
+ version: 1
7
+ ---
8
+
9
+ # DevFlow queue: recovery
10
+
11
+ Use this skill when the task is about **post-failure recovery work** in `recovery_queue`.
12
+
13
+ This skill complements `docs/recovery-dag-contract.md`.
14
+ That doc explains the DAG contract.
15
+ This skill explains how to operate and inspect the recovery lane concretely.
16
+
17
+ ## Core job
18
+
19
+ Determine whether a failed queue item has:
20
+ - been handed off into `recovery_queue`
21
+ - started a real recovery run
22
+ - been re-enqueued, delegated, blocked, or fully recovered
23
+ - produced the expected recovery handoff artifact
24
+
25
+ ## How to start / kick the lane
26
+
27
+ Normal path:
28
+ - recovery items are enqueued automatically when a queue lane fails
29
+ - run `devflow worker start --project <project_id> --once` or drain the worker
30
+
31
+ Separate command with different purpose:
32
+ - `devflow worker recover --project <project_id>` repairs **stale worker ownership state**
33
+ - it does **not** itself run the business recovery DAG for a fresh failure
34
+
35
+ Do not bypass recovery state with direct SQL edits unless the task is explicitly DB repair.
36
+
37
+ ## Observe status
38
+
39
+ Check in this order:
40
+
41
+ 1. `devflow worker report --project <project_id>`
42
+ 2. `recovery_queue` row in `.devflow/execution.sqlite`
43
+ 3. correlated recovery run, usually `post_queue_failure_recovery_dag`
44
+ 4. recovery execution metadata / artifacts
45
+ 5. recovery handoff artifact on disk
46
+ 6. source queue row after recovery action
47
+
48
+ Good first SQL snapshot:
49
+
50
+ ```sql
51
+ select recovery_queue_id, source_queue_type, source_item_id, status, started_run_id, finished_run_id, failure_message, updated_at
52
+ from recovery_queue
53
+ where project_id = '<project_id>'
54
+ order by updated_at desc;
55
+ ```
56
+
57
+ High-value handoff artifact locations:
58
+ - story-scoped: `.devflow/stories/<story_id>/recovery_handoff.json`
59
+ - non-story fallback: `.devflow/recovery_handoffs/<queue_type>/<item_id>.json`
60
+
61
+ ## Investigate failures
62
+
63
+ Look first at:
64
+ 1. `recovery_queue` row
65
+ 2. correlated recovery run + node/artifact/error records
66
+ 3. recovery handoff artifact
67
+ 4. source queue item state after attempted recovery
68
+ 5. rich logs gathered during recovery investigation/execution
69
+
70
+ Important recovery outcomes to classify correctly:
71
+ - `reenqueued`
72
+ - `delegated`
73
+ - `blocked`
74
+ - `recovered`
75
+
76
+ Do not compress those into a generic "fixed" claim.
77
+
78
+ ## Primary evidence to inspect first
79
+
80
+ 1. `recovery_queue.status`
81
+ 2. recovery run status
82
+ 3. published recovery summary / handoff artifact
83
+ 4. source queue row reconciliation
84
+ 5. churn/no-material-change evidence if retries repeat
85
+
86
+ ## What counts as success
87
+
88
+ Only treat recovery as successful when the durable result matches the declared outcome:
89
+ - `reenqueued` -> source queue row was actually reset/re-queued
90
+ - `delegated` -> the handoff/delegation artifact exists and the target lane is explicit
91
+ - `recovered` -> the recovery row completed and the source item is reconciled as intended
92
+
93
+ ## What counts as blockage
94
+
95
+ Treat these as blocked/problem states:
96
+ - `recovery_queue.status = failed` or `blocked`
97
+ - durable churn gate fired for repeated no-material-change recovery
98
+ - recovery kept acting on the wrong seam
99
+ - handoff artifact is missing despite a claimed publish step
100
+ - source queue row did not reconcile to the declared outcome
101
+
102
+ ## Strong future tool candidates
103
+
104
+ - latest recovery queue item summary
105
+ - source queue item -> recovery chain reader
106
+ - recovery handoff locator
107
+ - recovery outcome explainer
108
+ - durable churn-gate state reader