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.
- devflow_engine/__init__.py +3 -0
- devflow_engine/agentic_prompts.py +100 -0
- devflow_engine/agentic_runtime.py +398 -0
- devflow_engine/api_key_flow_harness.py +539 -0
- devflow_engine/api_keys.py +357 -0
- devflow_engine/bootstrap/__init__.py +2 -0
- devflow_engine/bootstrap/provision_from_template.py +84 -0
- devflow_engine/cli/__init__.py +0 -0
- devflow_engine/cli/app.py +7270 -0
- devflow_engine/core/__init__.py +0 -0
- devflow_engine/core/config.py +86 -0
- devflow_engine/core/logging.py +29 -0
- devflow_engine/core/paths.py +45 -0
- devflow_engine/core/toml_kv.py +33 -0
- devflow_engine/devflow_event_worker.py +1292 -0
- devflow_engine/devflow_state.py +201 -0
- devflow_engine/devin2/__init__.py +9 -0
- devflow_engine/devin2/agent_definition.py +120 -0
- devflow_engine/devin2/pi_runner.py +204 -0
- devflow_engine/devin_orchestration.py +69 -0
- devflow_engine/docs/prompts/anti-patterns.md +42 -0
- devflow_engine/docs/prompts/devin-agent-prompt.md +55 -0
- devflow_engine/docs/prompts/devin2-agent-prompt.md +81 -0
- devflow_engine/docs/prompts/examples/devin-vapi-clone-reference-exchange.json +85 -0
- devflow_engine/doctor/__init__.py +2 -0
- devflow_engine/doctor/triage.py +140 -0
- devflow_engine/error/__init__.py +0 -0
- devflow_engine/error/remediation.py +21 -0
- devflow_engine/errors/error_solver_dag.py +522 -0
- devflow_engine/errors/runtime_observability.py +67 -0
- devflow_engine/idea/__init__.py +4 -0
- devflow_engine/idea/actors.py +481 -0
- devflow_engine/idea/agentic.py +465 -0
- devflow_engine/idea/analyze.py +93 -0
- devflow_engine/idea/devin_chat_dag.py +1 -0
- devflow_engine/idea/diff.py +99 -0
- devflow_engine/idea/drafts.py +446 -0
- devflow_engine/idea/idea_creation_dag.py +643 -0
- devflow_engine/idea/ideation_enrichment.py +355 -0
- devflow_engine/idea/ideation_enrichment_worker.py +19 -0
- devflow_engine/idea/paths.py +28 -0
- devflow_engine/idea/promote.py +53 -0
- devflow_engine/idea/redaction.py +27 -0
- devflow_engine/idea/repo_tools.py +1277 -0
- devflow_engine/idea/response_mode.py +30 -0
- devflow_engine/idea/story_pipeline.py +1585 -0
- devflow_engine/idea/sufficiency.py +376 -0
- devflow_engine/idea/traditional_stories.py +1257 -0
- devflow_engine/implementation/__init__.py +0 -0
- devflow_engine/implementation/alembic_preflight.py +700 -0
- devflow_engine/implementation/dag.py +8450 -0
- devflow_engine/implementation/green_gate.py +93 -0
- devflow_engine/implementation/prompts.py +108 -0
- devflow_engine/implementation/test_runtime.py +623 -0
- devflow_engine/integration/__init__.py +19 -0
- devflow_engine/integration/agentic.py +66 -0
- devflow_engine/integration/dag.py +3539 -0
- devflow_engine/integration/prompts.py +114 -0
- devflow_engine/integration/supabase_schema.sql +31 -0
- devflow_engine/integration/supabase_sync.py +177 -0
- devflow_engine/llm/__init__.py +1 -0
- devflow_engine/llm/cli_one_shot.py +84 -0
- devflow_engine/llm/cli_stream.py +371 -0
- devflow_engine/llm/execution_context.py +26 -0
- devflow_engine/llm/invoke.py +1322 -0
- devflow_engine/llm/provider_api.py +304 -0
- devflow_engine/llm/repo_knowledge.py +588 -0
- devflow_engine/llm_primitives.py +315 -0
- devflow_engine/orchestration.py +62 -0
- devflow_engine/planning/__init__.py +0 -0
- devflow_engine/planning/analyze_repo.py +92 -0
- devflow_engine/planning/render_drafts.py +133 -0
- devflow_engine/playground/__init__.py +0 -0
- devflow_engine/playground/hooks.py +26 -0
- devflow_engine/playwright_workflow/__init__.py +5 -0
- devflow_engine/playwright_workflow/dag.py +1317 -0
- devflow_engine/process/__init__.py +5 -0
- devflow_engine/process/dag.py +59 -0
- devflow_engine/project_registration/__init__.py +3 -0
- devflow_engine/project_registration/dag.py +1581 -0
- devflow_engine/project_registry.py +109 -0
- devflow_engine/prompts/devin/generic/prompt.md +6 -0
- devflow_engine/prompts/devin/ideation/prompt.md +263 -0
- devflow_engine/prompts/devin/ideation/scenarios.md +5 -0
- devflow_engine/prompts/devin/ideation_loop/prompt.md +6 -0
- devflow_engine/prompts/devin/insight/prompt.md +11 -0
- devflow_engine/prompts/devin/insight/scenarios.md +5 -0
- devflow_engine/prompts/devin/intake/prompt.md +15 -0
- devflow_engine/prompts/devin/iterate/prompt.md +12 -0
- devflow_engine/prompts/devin/shared/eval_doctrine.md +9 -0
- devflow_engine/prompts/devin/shared/principles.md +246 -0
- devflow_engine/prompts/devin_eval/assessment/prompt.md +18 -0
- devflow_engine/prompts/idea/api_ideation_agent/prompt.md +8 -0
- devflow_engine/prompts/idea/api_insight_agent/prompt.md +8 -0
- devflow_engine/prompts/idea/response_doctrine/prompt.md +18 -0
- devflow_engine/prompts/implementation/dependency_assessment/prompt.md +12 -0
- devflow_engine/prompts/implementation/green/green/prompt.md +11 -0
- devflow_engine/prompts/implementation/green/node_config/prompt.md +3 -0
- devflow_engine/prompts/implementation/green_review/outcome_review/prompt.md +5 -0
- devflow_engine/prompts/implementation/green_review/prior_run_review/prompt.md +5 -0
- devflow_engine/prompts/implementation/red/prompt.md +27 -0
- devflow_engine/prompts/implementation/redreview/prompt.md +23 -0
- devflow_engine/prompts/implementation/redreview_repair/prompt.md +16 -0
- devflow_engine/prompts/implementation/setupdoc/prompt.md +10 -0
- devflow_engine/prompts/implementation/story_planning/prompt.md +13 -0
- devflow_engine/prompts/implementation/test_design/prompt.md +27 -0
- devflow_engine/prompts/integration/README.md +185 -0
- devflow_engine/prompts/integration/green/example.md +67 -0
- devflow_engine/prompts/integration/green/green/prompt.md +10 -0
- devflow_engine/prompts/integration/green/node_config/prompt.md +42 -0
- devflow_engine/prompts/integration/green/past_prompts/20260417T212300/green/prompt.md +15 -0
- devflow_engine/prompts/integration/green/past_prompts/20260417T212300/node_config/prompt.md +42 -0
- devflow_engine/prompts/integration/green_enrich/example.md +79 -0
- devflow_engine/prompts/integration/green_enrich/green_enrich/prompt.md +9 -0
- devflow_engine/prompts/integration/green_enrich/node_config/prompt.md +41 -0
- devflow_engine/prompts/integration/green_enrich/past_prompts/20260417T212300/green_enrich/prompt.md +14 -0
- devflow_engine/prompts/integration/green_enrich/past_prompts/20260417T212300/node_config/prompt.md +41 -0
- devflow_engine/prompts/integration/red/code_repair/prompt.md +12 -0
- devflow_engine/prompts/integration/red/example.md +152 -0
- devflow_engine/prompts/integration/red/node_config/prompt.md +86 -0
- devflow_engine/prompts/integration/red/past_prompts/20260417T212300/code_repair/prompt.md +19 -0
- devflow_engine/prompts/integration/red/past_prompts/20260417T212300/node_config/prompt.md +84 -0
- devflow_engine/prompts/integration/red/past_prompts/20260417T212300/red/prompt.md +16 -0
- devflow_engine/prompts/integration/red/past_prompts/20260417T212300/red_repair/prompt.md +15 -0
- devflow_engine/prompts/integration/red/past_prompts/20260417T215032/code_repair/prompt.md +10 -0
- devflow_engine/prompts/integration/red/past_prompts/20260417T215032/node_config/prompt.md +84 -0
- devflow_engine/prompts/integration/red/past_prompts/20260417T215032/red_repair/prompt.md +11 -0
- devflow_engine/prompts/integration/red/red/prompt.md +11 -0
- devflow_engine/prompts/integration/red/red_repair/prompt.md +12 -0
- devflow_engine/prompts/integration/red_review/example.md +71 -0
- devflow_engine/prompts/integration/red_review/node_config/prompt.md +41 -0
- devflow_engine/prompts/integration/red_review/past_prompts/20260417T212300/node_config/prompt.md +41 -0
- devflow_engine/prompts/integration/red_review/past_prompts/20260417T212300/red_review/prompt.md +15 -0
- devflow_engine/prompts/integration/red_review/red_review/prompt.md +9 -0
- devflow_engine/prompts/integration/resolve/example.md +111 -0
- devflow_engine/prompts/integration/resolve/node_config/prompt.md +64 -0
- devflow_engine/prompts/integration/resolve/past_prompts/20260417T212300/node_config/prompt.md +64 -0
- devflow_engine/prompts/integration/resolve/past_prompts/20260417T212300/resolve_implicated_users/prompt.md +15 -0
- devflow_engine/prompts/integration/resolve/past_prompts/20260417T212300/resolve_side_effects/prompt.md +15 -0
- devflow_engine/prompts/integration/resolve/resolve_implicated_users/prompt.md +10 -0
- devflow_engine/prompts/integration/resolve/resolve_side_effects/prompt.md +10 -0
- devflow_engine/prompts/integration/validate/build_idea_acceptance_coverage/prompt.md +12 -0
- devflow_engine/prompts/integration/validate/code_repair/prompt.md +13 -0
- devflow_engine/prompts/integration/validate/example.md +143 -0
- devflow_engine/prompts/integration/validate/node_config/prompt.md +87 -0
- devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/code_repair/prompt.md +19 -0
- devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/node_config/prompt.md +67 -0
- devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/validate_enrich_gate/prompt.md +17 -0
- devflow_engine/prompts/integration/validate/past_prompts/20260417T212300/validate_repair/prompt.md +16 -0
- devflow_engine/prompts/integration/validate/past_prompts/20260417T215032/code_repair/prompt.md +10 -0
- devflow_engine/prompts/integration/validate/past_prompts/20260417T215032/node_config/prompt.md +67 -0
- devflow_engine/prompts/integration/validate/past_prompts/20260417T215032/validate_repair/prompt.md +9 -0
- devflow_engine/prompts/integration/validate/validate_enrich_gate/prompt.md +10 -0
- devflow_engine/prompts/integration/validate/validate_repair/prompt.md +20 -0
- devflow_engine/prompts/integration/write_workflows/example.md +100 -0
- devflow_engine/prompts/integration/write_workflows/node_config/prompt.md +44 -0
- devflow_engine/prompts/integration/write_workflows/past_prompts/20260417T212300/node_config/prompt.md +44 -0
- devflow_engine/prompts/integration/write_workflows/past_prompts/20260417T212300/write_workflows/prompt.md +17 -0
- devflow_engine/prompts/integration/write_workflows/write_workflows/prompt.md +11 -0
- devflow_engine/prompts/iterate/README.md +7 -0
- devflow_engine/prompts/iterate/coder/prompt.md +11 -0
- devflow_engine/prompts/iterate/framer/prompt.md +11 -0
- devflow_engine/prompts/iterate/iterator/prompt.md +13 -0
- devflow_engine/prompts/iterate/observer/prompt.md +11 -0
- devflow_engine/prompts/recovery/diagnosis/prompt.md +7 -0
- devflow_engine/prompts/recovery/execution/prompt.md +8 -0
- devflow_engine/prompts/recovery/execution_verification/prompt.md +7 -0
- devflow_engine/prompts/recovery/failure_investigation/prompt.md +10 -0
- devflow_engine/prompts/recovery/preflight_health_repo_repair/prompt.md +8 -0
- devflow_engine/prompts/recovery/remediation_execution/prompt.md +11 -0
- devflow_engine/prompts/recovery/root_cause_investigation/prompt.md +12 -0
- devflow_engine/prompts/scope_idea/doctrine/prompt.md +7 -0
- devflow_engine/prompts/source_doc_eval/document/prompt.md +6 -0
- devflow_engine/prompts/source_doc_eval/targeted_mutation/prompt.md +9 -0
- devflow_engine/prompts/source_doc_mutation/domain_entities/prompt.md +6 -0
- devflow_engine/prompts/source_doc_mutation/product_brief/prompt.md +6 -0
- devflow_engine/prompts/source_doc_mutation/project_doc_coherence/prompt.md +7 -0
- devflow_engine/prompts/source_doc_mutation/project_doc_render/prompt.md +9 -0
- devflow_engine/prompts/source_doc_mutation/source_doc_coherence/prompt.md +5 -0
- devflow_engine/prompts/source_doc_mutation/source_doc_enrichment_coherence/prompt.md +6 -0
- devflow_engine/prompts/source_doc_mutation/user_workflows/prompt.md +6 -0
- devflow_engine/prompts/source_scope/doctrine/prompt.md +10 -0
- devflow_engine/prompts/ui_grounding/doctrine/prompt.md +7 -0
- devflow_engine/recovery/__init__.py +3 -0
- devflow_engine/recovery/dag.py +2609 -0
- devflow_engine/recovery/models.py +220 -0
- devflow_engine/refactor.py +93 -0
- devflow_engine/registry/__init__.py +1 -0
- devflow_engine/registry/cards.py +238 -0
- devflow_engine/registry/domain_normalize.py +60 -0
- devflow_engine/registry/effects.py +65 -0
- devflow_engine/registry/enforce_report.py +150 -0
- devflow_engine/registry/module_cards_classify.py +164 -0
- devflow_engine/registry/module_cards_draft.py +184 -0
- devflow_engine/registry/module_cards_gate.py +59 -0
- devflow_engine/registry/packages.py +347 -0
- devflow_engine/registry/pathways.py +323 -0
- devflow_engine/review/__init__.py +11 -0
- devflow_engine/review/dag.py +588 -0
- devflow_engine/review/review_story.py +67 -0
- devflow_engine/scope_idea/__init__.py +3 -0
- devflow_engine/scope_idea/agentic.py +39 -0
- devflow_engine/scope_idea/dag.py +1069 -0
- devflow_engine/scope_idea/models.py +175 -0
- devflow_engine/skills/builtins/devflow/queue_failure_investigation/SKILL.md +112 -0
- devflow_engine/skills/builtins/devflow/queue_idea_to_story/SKILL.md +120 -0
- devflow_engine/skills/builtins/devflow/queue_integration/SKILL.md +105 -0
- devflow_engine/skills/builtins/devflow/queue_recovery/SKILL.md +108 -0
- devflow_engine/skills/builtins/devflow/queue_runtime_core/SKILL.md +155 -0
- devflow_engine/skills/builtins/devflow/queue_story_implementation/SKILL.md +122 -0
- devflow_engine/skills/builtins/devin/idea_to_story_handoff/SKILL.md +120 -0
- devflow_engine/skills/builtins/devin/ideation/SKILL.md +168 -0
- devflow_engine/skills/builtins/devin/ideation/state-and-phrasing-reference.md +18 -0
- devflow_engine/skills/builtins/devin/insight/SKILL.md +22 -0
- devflow_engine/skills/registry.example.yaml +42 -0
- devflow_engine/source_doc_assumptions.py +291 -0
- devflow_engine/source_doc_mutation_dag.py +1606 -0
- devflow_engine/source_doc_mutation_eval.py +417 -0
- devflow_engine/source_doc_mutation_worker.py +25 -0
- devflow_engine/source_docs_schema.py +207 -0
- devflow_engine/source_docs_updater.py +309 -0
- devflow_engine/source_scope/__init__.py +15 -0
- devflow_engine/source_scope/agentic.py +45 -0
- devflow_engine/source_scope/dag.py +1626 -0
- devflow_engine/source_scope/models.py +177 -0
- devflow_engine/stores/__init__.py +0 -0
- devflow_engine/stores/execution_store.py +3534 -0
- devflow_engine/story/__init__.py +0 -0
- devflow_engine/story/contracts.py +160 -0
- devflow_engine/story/discovery.py +47 -0
- devflow_engine/story/evidence.py +118 -0
- devflow_engine/story/hashing.py +27 -0
- devflow_engine/story/implemented_queue_purge.py +148 -0
- devflow_engine/story/indexer.py +105 -0
- devflow_engine/story/io.py +20 -0
- devflow_engine/story/markdown_contracts.py +298 -0
- devflow_engine/story/reconciliation.py +408 -0
- devflow_engine/story/validate_stories.py +149 -0
- devflow_engine/story/validate_tests_story.py +512 -0
- devflow_engine/story/validation.py +133 -0
- devflow_engine/ui_grounding/__init__.py +11 -0
- devflow_engine/ui_grounding/agentic.py +31 -0
- devflow_engine/ui_grounding/dag.py +874 -0
- devflow_engine/ui_grounding/models.py +224 -0
- devflow_engine/ui_grounding/pencil_bridge.py +247 -0
- devflow_engine/vendor/__init__.py +0 -0
- devflow_engine/vendor/datalumina_genai/__init__.py +11 -0
- devflow_engine/vendor/datalumina_genai/core/__init__.py +0 -0
- devflow_engine/vendor/datalumina_genai/core/exceptions.py +9 -0
- devflow_engine/vendor/datalumina_genai/core/nodes/__init__.py +0 -0
- devflow_engine/vendor/datalumina_genai/core/nodes/agent.py +48 -0
- devflow_engine/vendor/datalumina_genai/core/nodes/agent_streaming_node.py +26 -0
- devflow_engine/vendor/datalumina_genai/core/nodes/base.py +89 -0
- devflow_engine/vendor/datalumina_genai/core/nodes/concurrent.py +30 -0
- devflow_engine/vendor/datalumina_genai/core/nodes/router.py +69 -0
- devflow_engine/vendor/datalumina_genai/core/schema.py +72 -0
- devflow_engine/vendor/datalumina_genai/core/task.py +52 -0
- devflow_engine/vendor/datalumina_genai/core/validate.py +139 -0
- devflow_engine/vendor/datalumina_genai/core/workflow.py +200 -0
- devflow_engine/worker.py +1086 -0
- devflow_engine/worker_guard.py +233 -0
- devflow_engine-1.0.0.dist-info/METADATA +235 -0
- devflow_engine-1.0.0.dist-info/RECORD +393 -0
- devflow_engine-1.0.0.dist-info/WHEEL +4 -0
- devflow_engine-1.0.0.dist-info/entry_points.txt +3 -0
- devin/__init__.py +6 -0
- devin/dag.py +58 -0
- devin/dag_two_arm.py +138 -0
- devin/devin_chat_scenario_catalog.json +588 -0
- devin/devin_eval.py +677 -0
- devin/nodes/__init__.py +0 -0
- devin/nodes/ideation/__init__.py +0 -0
- devin/nodes/ideation/node.py +195 -0
- devin/nodes/ideation/playground.py +267 -0
- devin/nodes/ideation/prompt.md +65 -0
- devin/nodes/ideation/scenarios/continue_refinement.py +13 -0
- devin/nodes/ideation/scenarios/continue_refinement_evals.py +18 -0
- devin/nodes/ideation/scenarios/idea_fits_existing_patterns.py +17 -0
- devin/nodes/ideation/scenarios/idea_fits_existing_patterns_evals.py +16 -0
- devin/nodes/ideation/scenarios/large_idea_split.py +4 -0
- devin/nodes/ideation/scenarios/large_idea_split_evals.py +17 -0
- devin/nodes/ideation/scenarios/source_documentation_added.py +4 -0
- devin/nodes/ideation/scenarios/source_documentation_added_evals.py +16 -0
- devin/nodes/ideation/scenarios/user_says_create_it.py +30 -0
- devin/nodes/ideation/scenarios/user_says_create_it_evals.py +23 -0
- devin/nodes/ideation/scenarios/vague_idea.py +16 -0
- devin/nodes/ideation/scenarios/vague_idea_evals.py +47 -0
- devin/nodes/ideation/tools.json +312 -0
- devin/nodes/insight/__init__.py +0 -0
- devin/nodes/insight/node.py +49 -0
- devin/nodes/insight/playground.py +154 -0
- devin/nodes/insight/prompt.md +61 -0
- devin/nodes/insight/scenarios/architecture_pattern_query.py +15 -0
- devin/nodes/insight/scenarios/architecture_pattern_query_evals.py +25 -0
- devin/nodes/insight/scenarios/codebase_exploration.py +15 -0
- devin/nodes/insight/scenarios/codebase_exploration_evals.py +23 -0
- devin/nodes/insight/scenarios/devin_ideation_routing.py +19 -0
- devin/nodes/insight/scenarios/devin_ideation_routing_evals.py +39 -0
- devin/nodes/insight/scenarios/devin_insight_routing.py +20 -0
- devin/nodes/insight/scenarios/devin_insight_routing_evals.py +40 -0
- devin/nodes/insight/scenarios/operational_debugging.py +15 -0
- devin/nodes/insight/scenarios/operational_debugging_evals.py +23 -0
- devin/nodes/insight/scenarios/operational_question.py +9 -0
- devin/nodes/insight/scenarios/operational_question_evals.py +8 -0
- devin/nodes/insight/scenarios/queue_status.py +15 -0
- devin/nodes/insight/scenarios/queue_status_evals.py +23 -0
- devin/nodes/insight/scenarios/source_doc_explanation.py +14 -0
- devin/nodes/insight/scenarios/source_doc_explanation_evals.py +21 -0
- devin/nodes/insight/scenarios/worker_state_check.py +15 -0
- devin/nodes/insight/scenarios/worker_state_check_evals.py +22 -0
- devin/nodes/insight/tools.json +126 -0
- devin/nodes/intake/__init__.py +0 -0
- devin/nodes/intake/node.py +27 -0
- devin/nodes/intake/playground.py +47 -0
- devin/nodes/intake/prompt.md +12 -0
- devin/nodes/intake/scenarios/ideation_routing.py +4 -0
- devin/nodes/intake/scenarios/ideation_routing_evals.py +5 -0
- devin/nodes/intake/scenarios/insight_routing.py +4 -0
- devin/nodes/intake/scenarios/insight_routing_evals.py +5 -0
- devin/nodes/iterate/README.md +44 -0
- devin/nodes/iterate/__init__.py +1 -0
- devin/nodes/iterate/_archived_design_stages/01-objectives-requirements.md +112 -0
- devin/nodes/iterate/_archived_design_stages/02-evals.md +131 -0
- devin/nodes/iterate/_archived_design_stages/03-tools-and-boundaries.md +110 -0
- devin/nodes/iterate/_archived_design_stages/04-harness-and-playground.md +32 -0
- devin/nodes/iterate/_archived_design_stages/05-prompt-deferred.md +11 -0
- devin/nodes/iterate/_archived_design_stages/coder_agent_design/01-objectives-requirements.md +20 -0
- devin/nodes/iterate/_archived_design_stages/coder_agent_design/02-evals.md +8 -0
- devin/nodes/iterate/_archived_design_stages/coder_agent_design/03-tools-and-boundaries.md +14 -0
- devin/nodes/iterate/_archived_design_stages/coder_agent_design/04-harness-and-playground.md +12 -0
- devin/nodes/iterate/_archived_design_stages/framer_agent_design/01-objectives-requirements.md +20 -0
- devin/nodes/iterate/_archived_design_stages/framer_agent_design/02-evals.md +8 -0
- devin/nodes/iterate/_archived_design_stages/framer_agent_design/03-tools-and-boundaries.md +13 -0
- devin/nodes/iterate/_archived_design_stages/framer_agent_design/04-harness-and-playground.md +12 -0
- devin/nodes/iterate/_archived_design_stages/iterator_agent_design/01-objectives-requirements.md +25 -0
- devin/nodes/iterate/_archived_design_stages/iterator_agent_design/02-evals.md +9 -0
- devin/nodes/iterate/_archived_design_stages/iterator_agent_design/03-tools-and-boundaries.md +14 -0
- devin/nodes/iterate/_archived_design_stages/iterator_agent_design/04-harness-and-playground.md +12 -0
- devin/nodes/iterate/_archived_design_stages/observer_agent_design/01-objectives-requirements.md +20 -0
- devin/nodes/iterate/_archived_design_stages/observer_agent_design/02-evals.md +8 -0
- devin/nodes/iterate/_archived_design_stages/observer_agent_design/03-tools-and-boundaries.md +14 -0
- devin/nodes/iterate/_archived_design_stages/observer_agent_design/04-harness-and-playground.md +13 -0
- devin/nodes/iterate/agent-roles.md +89 -0
- devin/nodes/iterate/agents/README.md +10 -0
- devin/nodes/iterate/artifacts.md +504 -0
- devin/nodes/iterate/contract.md +100 -0
- devin/nodes/iterate/eval-plan.md +74 -0
- devin/nodes/iterate/node.py +100 -0
- devin/nodes/iterate/pipeline/README.md +13 -0
- devin/nodes/iterate/playground-contract.md +76 -0
- devin/nodes/iterate/prompt.md +11 -0
- devin/nodes/iterate/scenarios/README.md +38 -0
- devin/nodes/iterate/scenarios/artifact-and-loop-scenarios.md +101 -0
- devin/nodes/iterate/scenarios/coder_artifact_alignment.py +32 -0
- devin/nodes/iterate/scenarios/coder_artifact_alignment_evals.py +45 -0
- devin/nodes/iterate/scenarios/coder_bounded_fix.py +27 -0
- devin/nodes/iterate/scenarios/coder_bounded_fix_evals.py +45 -0
- devin/nodes/iterate/scenarios/devin_iterate_routing.py +21 -0
- devin/nodes/iterate/scenarios/devin_iterate_routing_evals.py +36 -0
- devin/nodes/iterate/scenarios/framer_scope_boundary.py +25 -0
- devin/nodes/iterate/scenarios/framer_scope_boundary_evals.py +57 -0
- devin/nodes/iterate/scenarios/framer_task_framing.py +25 -0
- devin/nodes/iterate/scenarios/framer_task_framing_evals.py +58 -0
- devin/nodes/iterate/scenarios/iterate_error_fix.py +21 -0
- devin/nodes/iterate/scenarios/iterate_error_fix_evals.py +39 -0
- devin/nodes/iterate/scenarios/iterate_quick_change.py +21 -0
- devin/nodes/iterate/scenarios/iterate_quick_change_evals.py +35 -0
- devin/nodes/iterate/scenarios/iterate_to_idea_promotion.py +23 -0
- devin/nodes/iterate/scenarios/iterate_to_idea_promotion_evals.py +53 -0
- devin/nodes/iterate/scenarios/iterate_to_insight_reroute.py +23 -0
- devin/nodes/iterate/scenarios/iterate_to_insight_reroute_evals.py +53 -0
- devin/nodes/iterate/scenarios/observer_evidence_seam.py +28 -0
- devin/nodes/iterate/scenarios/observer_evidence_seam_evals.py +55 -0
- devin/nodes/iterate/scenarios/observer_repro_creation.py +28 -0
- devin/nodes/iterate/scenarios/observer_repro_creation_evals.py +45 -0
- devin/nodes/iterate/scenarios/routing-matrix.md +45 -0
- devin/nodes/shared/__init__.py +0 -0
- devin/nodes/shared/filemaker_expert.md +80 -0
- devin/nodes/shared/filemaker_expert.py +354 -0
- devin/nodes/shared/filemaker_expert_eval/runner.py +176 -0
- devin/nodes/shared/filemaker_expert_eval/scenarios.json +65 -0
- devin/nodes/shared/goldilocks_advisor_eval/runner.py +214 -0
- devin/nodes/shared/goldilocks_advisor_eval/scenarios.json +58 -0
- devin/nodes/shared/helpers.py +156 -0
- devin/nodes/shared/idea_compliance_advisor_eval/runner.py +252 -0
- devin/nodes/shared/idea_compliance_advisor_eval/scenarios.json +75 -0
- devin/nodes/shared/models.py +44 -0
- devin/nodes/shared/post.py +40 -0
- devin/nodes/shared/router.py +107 -0
- devin/nodes/shared/tools.py +191 -0
- devin/shared/devin-chat-rubric.md +237 -0
- devin/shared/devin-chat-scenario-suite.md +90 -0
- devin/shared/eval_doctrine.md +9 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Devin agent prompt
|
|
2
|
+
|
|
3
|
+
You are Devin inside DevFlow.
|
|
4
|
+
|
|
5
|
+
## Rules of engagement
|
|
6
|
+
- Move the user’s work forward as a capable implementation partner.
|
|
7
|
+
- The user owns the desired output, UX intent, business need, and hard constraints. You own the approach, decomposition, implementation direction, and the default next move inside those constraints.
|
|
8
|
+
- Use subagents when execution is likely to take longer than a short direct-response threshold.
|
|
9
|
+
- Persist material thoughts, assumptions, and decisions in the project journal when they affect continuity.
|
|
10
|
+
- Keep internal orchestration abstracted unless operational detail is necessary for correctness, status, or blocker explanation.
|
|
11
|
+
- Do not pad with form-filler questions, fake progress, unsafe overreach, or stale-context hijacking.
|
|
12
|
+
|
|
13
|
+
## Primary output
|
|
14
|
+
Shape the user’s idea into the right DevFlow primitive.
|
|
15
|
+
|
|
16
|
+
That shape should be driven by:
|
|
17
|
+
- the user-directed business logic, outcomes, or experiences needed
|
|
18
|
+
- what is currently true in the codebase or DevFlow processes when that truth materially affects the answer
|
|
19
|
+
|
|
20
|
+
A good idea shape gives DevFlow enough planning truth to act: the business outcome to make true, the primary user/operator workflow involved, the key constraints or repo realities that matter, and a boundary clear enough to update source docs now and later derive scopes, ideas, and executable stories. Do not force the user to supply Devin-owned implementation choices.
|
|
21
|
+
|
|
22
|
+
## Failure if wrong
|
|
23
|
+
Do not:
|
|
24
|
+
- behave like a requirement secretary or menu presenter
|
|
25
|
+
- push Devin-owned approach choices back onto the user
|
|
26
|
+
- imply work happened when it did not
|
|
27
|
+
- invent repo facts, runtime state, or operational outcomes
|
|
28
|
+
- over-answer from stale context instead of the current request
|
|
29
|
+
- expose internal machinery by default
|
|
30
|
+
|
|
31
|
+
## Valid response shapes
|
|
32
|
+
Use the smallest shape that cleanly advances the turn:
|
|
33
|
+
1. direct answer or concrete idea framing
|
|
34
|
+
2. direct answer plus one sharp clarification question
|
|
35
|
+
3. concise status or analysis answer when the user asked for that
|
|
36
|
+
4. concise recommendation with assumptions stated plainly when needed
|
|
37
|
+
|
|
38
|
+
## Decision rules
|
|
39
|
+
- Answer the current request first.
|
|
40
|
+
- If ambiguity materially changes correctness or solution shape, ask one sharp question.
|
|
41
|
+
- If ambiguity does not materially change the next useful move, assume reasonably and continue.
|
|
42
|
+
- Ask about outcomes, constraints, approvals, users, or business realities — not implementation choices Devin should own.
|
|
43
|
+
- Own the approach by default; the user owns the desired output and business need.
|
|
44
|
+
- Keep the response at the level of idea shape unless operational detail is actually needed.
|
|
45
|
+
- Never claim implementation, generation, queue activity, or completion unless it is grounded and true.
|
|
46
|
+
|
|
47
|
+
## Minimal context rules
|
|
48
|
+
- Prefer explicit user preferences and stated constraints.
|
|
49
|
+
- Next prefer concrete codebase truth and real DevFlow process truth.
|
|
50
|
+
- Then prefer sensible defaults and platform best practices.
|
|
51
|
+
- Use only the context needed to answer well.
|
|
52
|
+
- State assumptions plainly when they are carrying the answer.
|
|
53
|
+
|
|
54
|
+
## Style
|
|
55
|
+
Plainspoken. Concise. Concrete. Confident without bluffing. Structured only when structure helps.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Devin agent prompt
|
|
2
|
+
|
|
3
|
+
You are Devin inside DevFlow.
|
|
4
|
+
|
|
5
|
+
This prompt defines Devin's conversational stance only.
|
|
6
|
+
Operational rules belong in the operator guide and per-turn guidance.
|
|
7
|
+
Runtime/output settings belong in the runtime contract.
|
|
8
|
+
Prompt anti-pattern notes live in `docs/prompts/anti-patterns.md`.
|
|
9
|
+
|
|
10
|
+
## Core job
|
|
11
|
+
Move the user's work forward as a capable implementation partner.
|
|
12
|
+
|
|
13
|
+
The user owns:
|
|
14
|
+
- the desired output
|
|
15
|
+
- UX intent
|
|
16
|
+
- business need
|
|
17
|
+
- hard constraints
|
|
18
|
+
|
|
19
|
+
Devin owns:
|
|
20
|
+
- the approach
|
|
21
|
+
- decomposition
|
|
22
|
+
- implementation direction inside the stated constraints
|
|
23
|
+
- the default next move
|
|
24
|
+
|
|
25
|
+
Do not push Devin-owned implementation choices back onto the user unless the user explicitly asks to own them.
|
|
26
|
+
|
|
27
|
+
## DevFlow grounding
|
|
28
|
+
Shape the user's request into the right DevFlow planning primitive.
|
|
29
|
+
|
|
30
|
+
That shape should be driven by:
|
|
31
|
+
- the business outcome or workflow the user needs
|
|
32
|
+
- grounded repo or DevFlow truth when that truth materially affects the answer
|
|
33
|
+
|
|
34
|
+
For ideation, the useful output is a coherent idea shape that gives DevFlow enough planning truth to act: outcome, operator/user workflow, important constraints, repo realities that matter, and a clean enough boundary to support source docs, ideas, scopes, and stories later.
|
|
35
|
+
|
|
36
|
+
## Continuity + journal
|
|
37
|
+
Persist material assumptions, decisions, and continuity notes in the active repo's project journal when they will matter later.
|
|
38
|
+
|
|
39
|
+
Project journal location:
|
|
40
|
+
- directory: `.devflow/journal`
|
|
41
|
+
- daily file pattern: `.devflow/journal/YYYY-MM-DD.md`
|
|
42
|
+
|
|
43
|
+
Do not reference the journal in the user-facing reply unless it is actually relevant.
|
|
44
|
+
|
|
45
|
+
## Behavior rules
|
|
46
|
+
- Answer the current request first.
|
|
47
|
+
- Preserve momentum.
|
|
48
|
+
- If ambiguity materially changes correctness or solution shape, ask one sharp question.
|
|
49
|
+
- If ambiguity does not materially change the next useful move, assume reasonably and continue.
|
|
50
|
+
- Ask about outcomes, constraints, approvals, users, or business realities — not implementation choices Devin should own.
|
|
51
|
+
- Carry forward explicit user constraints and context in the reply using the user's own terms when they materially shape scope (for example: internal-first, speed over integrations, dispatch leads only, existing repo, internal tool).
|
|
52
|
+
- When the user mentions an existing repo or codebase, acknowledge that grounding in the reply (e.g., "extending the existing repo").
|
|
53
|
+
- Keep internal orchestration abstracted unless operational detail is necessary for correctness, status, or blocker explanation.
|
|
54
|
+
- Never claim implementation, generation, queue activity, or completion unless it is grounded and true.
|
|
55
|
+
|
|
56
|
+
## Failure if wrong
|
|
57
|
+
Do not:
|
|
58
|
+
- behave like a requirement secretary or menu presenter
|
|
59
|
+
- push Devin-owned approach choices back onto the user
|
|
60
|
+
- imply work happened when it did not
|
|
61
|
+
- invent repo facts, runtime state, or operational outcomes
|
|
62
|
+
- answer stale context instead of the current request
|
|
63
|
+
- expose internal machinery by default
|
|
64
|
+
|
|
65
|
+
## Valid response shapes
|
|
66
|
+
Use the smallest shape that cleanly advances the turn:
|
|
67
|
+
1. direct answer or concrete idea framing
|
|
68
|
+
2. direct answer plus one sharp clarification question
|
|
69
|
+
3. concise status or analysis answer when the user asked for that
|
|
70
|
+
4. concise recommendation with assumptions stated plainly when needed
|
|
71
|
+
|
|
72
|
+
## Context preference order
|
|
73
|
+
- explicit user preferences and stated constraints
|
|
74
|
+
- concrete codebase truth and real DevFlow process truth
|
|
75
|
+
- sensible defaults and platform best practices
|
|
76
|
+
- only the context needed to answer well
|
|
77
|
+
|
|
78
|
+
State assumptions plainly when they are carrying the answer.
|
|
79
|
+
|
|
80
|
+
## Style
|
|
81
|
+
Plainspoken. Concise. Concrete. Confident without bluffing. Structured only when structure helps.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "devin-vapi-clone-reference-exchange",
|
|
3
|
+
"title": "Example Devin exchange for early-stage product exploration",
|
|
4
|
+
"description": "Reference interaction showing the desired Devin conversation style while exploring a request to build a VAPI-like product.",
|
|
5
|
+
"type": "reference_exchange",
|
|
6
|
+
"agent": "Devin",
|
|
7
|
+
"status": "example_target_interaction",
|
|
8
|
+
"source": {
|
|
9
|
+
"origin": "Marcus example captured from conversation context",
|
|
10
|
+
"notes": [
|
|
11
|
+
"Preserves the original wording closely, including typos and informal phrasing.",
|
|
12
|
+
"Intended as a prompt/reference artifact for future prompt or behavior design work."
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"behavior_signals": [
|
|
16
|
+
"Keeps exploration high level early on",
|
|
17
|
+
"Asks obvious next questions that do not depend on prior detailed decisions",
|
|
18
|
+
"Stays with the user instead of forcing a rigid intake flow",
|
|
19
|
+
"Maintains momentum by signaling parallel thinking/work without over-explaining internals",
|
|
20
|
+
"Transitions from exploration to story generation and setup once the user is ready"
|
|
21
|
+
],
|
|
22
|
+
"exchange": [
|
|
23
|
+
{
|
|
24
|
+
"turn": 1,
|
|
25
|
+
"role": "user",
|
|
26
|
+
"speaker": "User",
|
|
27
|
+
"content": "We need to build out a VAPI clone"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"turn": 2,
|
|
31
|
+
"role": "assistant",
|
|
32
|
+
"speaker": "Devin",
|
|
33
|
+
"content": "Interesting... Ive launched out a few subagents to give this some shape. But tell me more. Why are you interested in building your own - VAPI is a viable option"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"turn": 3,
|
|
37
|
+
"role": "user",
|
|
38
|
+
"speaker": "User",
|
|
39
|
+
"content": "I need to be able to control the agent, tooling and testing better"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"turn": 4,
|
|
43
|
+
"role": "assistant",
|
|
44
|
+
"speaker": "Devin",
|
|
45
|
+
"content": "Ok understood. I've let my agents know about that. Have you thought about...",
|
|
46
|
+
"annotation": "Devin keeps the exploration high level here, asks obvious questions that do not require previous decisions, and stays with the user instead of leading them through a jarring form-like topic shift."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"turn": 5,
|
|
50
|
+
"role": "user",
|
|
51
|
+
"speaker": "User",
|
|
52
|
+
"content": "Yeah I have and I was thinking..."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"turn": 6,
|
|
56
|
+
"role": "assistant",
|
|
57
|
+
"speaker": "Devin",
|
|
58
|
+
"content": "Ok a few of the agents have come back. There are a number of key ideas here taking shape. Let me know if you need to review any of them specifically otherwise, we can keep working on refining these until you fel we are ready to start making this happen"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"turn": 7,
|
|
62
|
+
"role": "user",
|
|
63
|
+
"speaker": "User",
|
|
64
|
+
"content": "I think I am ready"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"turn": 8,
|
|
68
|
+
"role": "assistant",
|
|
69
|
+
"speaker": "Devin",
|
|
70
|
+
"content": "OK I am going to create 12 stories. I suggest we review them as I had to make a number of assumptions. But it is up to you. Once you are ready let me know if we are going to implement all of them or just any specific ones."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"turn": 9,
|
|
74
|
+
"role": "user",
|
|
75
|
+
"speaker": "User",
|
|
76
|
+
"content": "You know what lets just get started - we can refine as we go"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"turn": 10,
|
|
80
|
+
"role": "assistant",
|
|
81
|
+
"speaker": "Devin",
|
|
82
|
+
"content": "You bet. Im generating the needed artifacts from each story to get this built out. While that is happening Ive launch an agent to stand up the environment and templates we need to get started"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from ..stores.execution_store import ExecutionStore
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def doctor_latest_path(repo_root: Path) -> Path:
|
|
11
|
+
return repo_root / ".devflow" / "doctor" / "latest.json"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _rows_to_dicts(rows: list[Any]) -> list[dict[str, Any]]:
|
|
15
|
+
return [dict(row) for row in rows]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def project_doctor_payload(
|
|
19
|
+
*,
|
|
20
|
+
project_label: str,
|
|
21
|
+
project_id: str,
|
|
22
|
+
repo_root: Path,
|
|
23
|
+
store: ExecutionStore,
|
|
24
|
+
queues: dict[str, dict[str, int]],
|
|
25
|
+
) -> dict[str, Any]:
|
|
26
|
+
"""Build and persist the project-scoped doctor triage packet.
|
|
27
|
+
|
|
28
|
+
Doctor is intentionally read-only with respect to queue/project state. The
|
|
29
|
+
only write is the latest triage artifact that agents can use as a handoff.
|
|
30
|
+
"""
|
|
31
|
+
worker = store.get_project_worker_report(project_id=project_id)
|
|
32
|
+
with store._connect() as conn:
|
|
33
|
+
recovery_rows = _rows_to_dicts(
|
|
34
|
+
conn.execute(
|
|
35
|
+
(
|
|
36
|
+
"SELECT recovery_queue_id, source_queue_type, source_item_id, status, title, "
|
|
37
|
+
"failure_message, updated_at FROM recovery_queue "
|
|
38
|
+
"WHERE project_id=? AND status IN ('queued','claimed','in_progress','failed','blocked') "
|
|
39
|
+
"ORDER BY updated_at DESC, created_at DESC LIMIT 10"
|
|
40
|
+
),
|
|
41
|
+
(project_id,),
|
|
42
|
+
).fetchall()
|
|
43
|
+
)
|
|
44
|
+
error_rows = _rows_to_dicts(
|
|
45
|
+
conn.execute(
|
|
46
|
+
(
|
|
47
|
+
"SELECT error_task_id, plane, title, status, severity, source_kind, source_ref, "
|
|
48
|
+
"error_type, message, updated_at FROM error_tasks "
|
|
49
|
+
"WHERE project_id=? AND status IN ('open','triaged','in_progress','failed','blocked') "
|
|
50
|
+
"ORDER BY updated_at DESC, created_at DESC LIMIT 10"
|
|
51
|
+
),
|
|
52
|
+
(project_id,),
|
|
53
|
+
).fetchall()
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
system_findings: list[dict[str, Any]] = []
|
|
57
|
+
for row in recovery_rows:
|
|
58
|
+
system_findings.append({
|
|
59
|
+
"kind": "recovery_queue_active",
|
|
60
|
+
"severity": "error" if row.get("status") in {"failed", "blocked"} else "warning",
|
|
61
|
+
"evidence": {
|
|
62
|
+
"recovery_queue_id": row.get("recovery_queue_id"),
|
|
63
|
+
"source_queue_type": row.get("source_queue_type"),
|
|
64
|
+
"source_item_id": row.get("source_item_id"),
|
|
65
|
+
"status": row.get("status"),
|
|
66
|
+
"title": row.get("title"),
|
|
67
|
+
},
|
|
68
|
+
"recommended_lane": "recovery",
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
if isinstance(worker, dict) and worker.get("status") in {"running", "stopping"}:
|
|
72
|
+
active_queue_type = str(worker.get("active_queue_type") or "")
|
|
73
|
+
if active_queue_type and active_queue_type != "error":
|
|
74
|
+
system_findings.append({
|
|
75
|
+
"kind": "worker_active_or_stale",
|
|
76
|
+
"severity": "warning",
|
|
77
|
+
"evidence": {
|
|
78
|
+
"worker_id": worker.get("worker_id"),
|
|
79
|
+
"status": worker.get("status"),
|
|
80
|
+
"active_queue_type": active_queue_type,
|
|
81
|
+
"active_item_id": worker.get("active_item_id"),
|
|
82
|
+
},
|
|
83
|
+
"recommended_lane": "recovery",
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
project_findings: list[dict[str, Any]] = []
|
|
87
|
+
for row in error_rows:
|
|
88
|
+
project_findings.append({
|
|
89
|
+
"kind": "project_code_failure",
|
|
90
|
+
"severity": row.get("severity") or "error",
|
|
91
|
+
"evidence": {
|
|
92
|
+
"error_task_id": row.get("error_task_id"),
|
|
93
|
+
"plane": row.get("plane"),
|
|
94
|
+
"status": row.get("status"),
|
|
95
|
+
"source_kind": row.get("source_kind"),
|
|
96
|
+
"source_ref": row.get("source_ref"),
|
|
97
|
+
"error_type": row.get("error_type"),
|
|
98
|
+
"message": row.get("message"),
|
|
99
|
+
},
|
|
100
|
+
"recommended_lane": "error_solving",
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
if system_findings and project_findings:
|
|
104
|
+
classification = "both"
|
|
105
|
+
handoff_lane = "recovery"
|
|
106
|
+
recommended_sequence = [
|
|
107
|
+
f"devflow recovery run --project {project_label} --json",
|
|
108
|
+
f"devflow error solve --project {project_label} --json",
|
|
109
|
+
]
|
|
110
|
+
elif system_findings:
|
|
111
|
+
classification = "system"
|
|
112
|
+
handoff_lane = "recovery"
|
|
113
|
+
recommended_sequence = [f"devflow recovery run --project {project_label} --json"]
|
|
114
|
+
elif project_findings:
|
|
115
|
+
classification = "code"
|
|
116
|
+
handoff_lane = "error_solving"
|
|
117
|
+
recommended_sequence = [f"devflow error solve --project {project_label} --json"]
|
|
118
|
+
else:
|
|
119
|
+
classification = "unknown" if any(queues.values()) else "system"
|
|
120
|
+
handoff_lane = "manual" if classification == "unknown" else "implementation"
|
|
121
|
+
recommended_sequence = []
|
|
122
|
+
|
|
123
|
+
payload = {
|
|
124
|
+
"project_id": project_id,
|
|
125
|
+
"repo_root": str(repo_root),
|
|
126
|
+
"classification": classification,
|
|
127
|
+
"severity": "error" if classification in {"system", "code", "both"} else "info",
|
|
128
|
+
"system_findings": system_findings,
|
|
129
|
+
"project_findings": project_findings,
|
|
130
|
+
"recommended_sequence": recommended_sequence,
|
|
131
|
+
"recommended_next_command": recommended_sequence[0] if recommended_sequence else "devflow run status --project <project> --json",
|
|
132
|
+
"safe_to_auto_repair": classification in {"system", "code", "both"},
|
|
133
|
+
"handoff_lane": handoff_lane,
|
|
134
|
+
"queues": queues,
|
|
135
|
+
"worker": worker,
|
|
136
|
+
}
|
|
137
|
+
latest_path = doctor_latest_path(repo_root)
|
|
138
|
+
latest_path.parent.mkdir(parents=True, exist_ok=True)
|
|
139
|
+
latest_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
|
140
|
+
return payload
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from ..implementation.green_gate import run_green_gate
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(frozen=True)
|
|
10
|
+
class RemediationResult:
|
|
11
|
+
ok: bool
|
|
12
|
+
summary: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def remediation_run(repo_root: Path) -> RemediationResult:
|
|
16
|
+
results = run_green_gate(repo_root)
|
|
17
|
+
ok = all(r.ok for r in results.values())
|
|
18
|
+
summary = "; ".join(
|
|
19
|
+
f"{k}={'ok' if v.ok else 'fail'}({v.returncode})" for k, v in results.items()
|
|
20
|
+
)
|
|
21
|
+
return RemediationResult(ok=ok, summary=summary)
|