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,304 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any, Literal
|
|
7
|
+
from urllib import error, request
|
|
8
|
+
|
|
9
|
+
from ..api_keys import get_provider_api_key
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
ANTHROPIC_MESSAGES_URL = "https://api.anthropic.com/v1/messages"
|
|
13
|
+
ANTHROPIC_VERSION = "2023-06-01"
|
|
14
|
+
ANTHROPIC_MODEL_DEFAULT = "claude-sonnet-4-6"
|
|
15
|
+
OPENAI_RESPONSES_URL = "https://api.openai.com/v1/responses"
|
|
16
|
+
OPENAI_MODEL_DEFAULT = "gpt-5"
|
|
17
|
+
OLLAMA_RESPONSES_URL = "http://127.0.0.1:11434/v1/responses"
|
|
18
|
+
OLLAMA_MODEL_DEFAULT = "llama3.2"
|
|
19
|
+
GOOGLE_GENERATE_CONTENT_URL_TEMPLATE = "https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent"
|
|
20
|
+
GOOGLE_MODEL_DEFAULT = "gemini-2.5-flash"
|
|
21
|
+
ANTHROPIC_STYLE_PROVIDERS = frozenset({"anthropic", "minimax"})
|
|
22
|
+
OPENAI_STYLE_PROVIDERS = frozenset({"openai", "ollama"})
|
|
23
|
+
GOOGLE_STYLE_PROVIDERS = frozenset({"google"})
|
|
24
|
+
ProviderApiShape = Literal["anthropic", "openai", "google"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass(frozen=True)
|
|
28
|
+
class AnthropicApiSettings:
|
|
29
|
+
api_key: str
|
|
30
|
+
model: str
|
|
31
|
+
max_tokens: int
|
|
32
|
+
api_url: str = ANTHROPIC_MESSAGES_URL
|
|
33
|
+
api_version: str = ANTHROPIC_VERSION
|
|
34
|
+
provider_label: str = "Anthropic"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass(frozen=True)
|
|
38
|
+
class OpenAiApiSettings:
|
|
39
|
+
api_key: str
|
|
40
|
+
model: str
|
|
41
|
+
api_url: str = OPENAI_RESPONSES_URL
|
|
42
|
+
provider_label: str = "OpenAI"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@dataclass(frozen=True)
|
|
46
|
+
class GoogleApiSettings:
|
|
47
|
+
api_key: str
|
|
48
|
+
model: str
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def canonical_provider_api_shape(provider: str | None) -> ProviderApiShape | None:
|
|
52
|
+
normalized = str(provider or "").strip().lower()
|
|
53
|
+
if not normalized:
|
|
54
|
+
return None
|
|
55
|
+
if normalized in ANTHROPIC_STYLE_PROVIDERS:
|
|
56
|
+
return "anthropic"
|
|
57
|
+
if normalized in OPENAI_STYLE_PROVIDERS:
|
|
58
|
+
return "openai"
|
|
59
|
+
if normalized in GOOGLE_STYLE_PROVIDERS:
|
|
60
|
+
return "google"
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def provider_uses_anthropic_api_shape(provider: str | None) -> bool:
|
|
65
|
+
return canonical_provider_api_shape(provider) == "anthropic"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def read_provider_api_key(*, provider: str, repo_root: Path) -> str:
|
|
69
|
+
runtime_key = get_provider_api_key(provider)
|
|
70
|
+
if runtime_key:
|
|
71
|
+
return runtime_key
|
|
72
|
+
|
|
73
|
+
del repo_root
|
|
74
|
+
candidate_paths: list[Path] = []
|
|
75
|
+
try:
|
|
76
|
+
from ..idea.traditional_stories import _global_devflow_dir
|
|
77
|
+
|
|
78
|
+
candidate_paths.append(_global_devflow_dir() / "keys" / f"{provider}.json")
|
|
79
|
+
except Exception:
|
|
80
|
+
candidate_paths.append(Path.home() / ".devflow" / "keys" / f"{provider}.json")
|
|
81
|
+
|
|
82
|
+
for path in candidate_paths:
|
|
83
|
+
if not path.exists():
|
|
84
|
+
continue
|
|
85
|
+
try:
|
|
86
|
+
payload = json.loads(path.read_text(encoding="utf-8"))
|
|
87
|
+
except Exception as exc: # pragma: no cover - invalid operator-managed secret file is operator error
|
|
88
|
+
raise RuntimeError(f"Failed to read {provider.capitalize()} key file: {path}") from exc
|
|
89
|
+
api_key = str(payload.get("api_key") or "").strip()
|
|
90
|
+
if api_key:
|
|
91
|
+
return api_key
|
|
92
|
+
raise RuntimeError(
|
|
93
|
+
f"{provider.capitalize()} API key not configured. "
|
|
94
|
+
f"Expected runtime env, macOS keychain entry, or global ~/.devflow/keys/{provider}.json."
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def read_anthropic_api_key(*, repo_root: Path) -> str:
|
|
99
|
+
return read_provider_api_key(provider="anthropic", repo_root=repo_root)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def load_anthropic_api_settings(
|
|
103
|
+
*,
|
|
104
|
+
repo_root: Path,
|
|
105
|
+
model: str | None = None,
|
|
106
|
+
max_tokens: int = 1_200,
|
|
107
|
+
) -> AnthropicApiSettings:
|
|
108
|
+
return AnthropicApiSettings(
|
|
109
|
+
api_key=read_anthropic_api_key(repo_root=repo_root),
|
|
110
|
+
model=str(model or ANTHROPIC_MODEL_DEFAULT).strip() or ANTHROPIC_MODEL_DEFAULT,
|
|
111
|
+
max_tokens=max_tokens,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def load_openai_api_settings(
|
|
116
|
+
*,
|
|
117
|
+
repo_root: Path,
|
|
118
|
+
provider: str = "openai",
|
|
119
|
+
model: str | None = None,
|
|
120
|
+
) -> OpenAiApiSettings:
|
|
121
|
+
normalized_provider = str(provider or "openai").strip().lower() or "openai"
|
|
122
|
+
if normalized_provider == "ollama":
|
|
123
|
+
api_key = get_provider_api_key("ollama") or "ollama"
|
|
124
|
+
api_url = OLLAMA_RESPONSES_URL
|
|
125
|
+
provider_label = "Ollama"
|
|
126
|
+
resolved_model = str(model or OLLAMA_MODEL_DEFAULT).strip() or OLLAMA_MODEL_DEFAULT
|
|
127
|
+
else:
|
|
128
|
+
api_key = read_provider_api_key(provider="openai", repo_root=repo_root)
|
|
129
|
+
api_url = OPENAI_RESPONSES_URL
|
|
130
|
+
provider_label = "OpenAI"
|
|
131
|
+
resolved_model = str(model or OPENAI_MODEL_DEFAULT).strip() or OPENAI_MODEL_DEFAULT
|
|
132
|
+
return OpenAiApiSettings(
|
|
133
|
+
api_key=api_key,
|
|
134
|
+
model=resolved_model,
|
|
135
|
+
api_url=api_url,
|
|
136
|
+
provider_label=provider_label,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def load_google_api_settings(
|
|
141
|
+
*,
|
|
142
|
+
repo_root: Path,
|
|
143
|
+
model: str | None = None,
|
|
144
|
+
) -> GoogleApiSettings:
|
|
145
|
+
return GoogleApiSettings(
|
|
146
|
+
api_key=read_provider_api_key(provider="google", repo_root=repo_root),
|
|
147
|
+
model=str(model or GOOGLE_MODEL_DEFAULT).strip() or GOOGLE_MODEL_DEFAULT,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def anthropic_messages_create(
|
|
152
|
+
*,
|
|
153
|
+
settings: AnthropicApiSettings,
|
|
154
|
+
system_prompt: str,
|
|
155
|
+
messages: list[dict[str, Any]],
|
|
156
|
+
tools: list[dict[str, Any]],
|
|
157
|
+
timeout_seconds: int | None,
|
|
158
|
+
) -> dict[str, Any]:
|
|
159
|
+
payload: dict[str, Any] = {
|
|
160
|
+
"model": settings.model,
|
|
161
|
+
"max_tokens": settings.max_tokens,
|
|
162
|
+
"system": system_prompt,
|
|
163
|
+
"messages": messages,
|
|
164
|
+
"tools": tools,
|
|
165
|
+
}
|
|
166
|
+
data = json.dumps(payload).encode("utf-8")
|
|
167
|
+
req = request.Request(
|
|
168
|
+
settings.api_url,
|
|
169
|
+
data=data,
|
|
170
|
+
headers={
|
|
171
|
+
"content-type": "application/json",
|
|
172
|
+
"x-api-key": settings.api_key,
|
|
173
|
+
"anthropic-version": settings.api_version,
|
|
174
|
+
},
|
|
175
|
+
method="POST",
|
|
176
|
+
)
|
|
177
|
+
try:
|
|
178
|
+
with request.urlopen(req, timeout=timeout_seconds) as resp:
|
|
179
|
+
raw = resp.read().decode("utf-8")
|
|
180
|
+
except error.HTTPError as exc:
|
|
181
|
+
body = exc.read().decode("utf-8", errors="replace")
|
|
182
|
+
raise RuntimeError(f"{settings.provider_label} API request failed: {exc.code} {body}") from exc
|
|
183
|
+
except error.URLError as exc:
|
|
184
|
+
raise RuntimeError(f"{settings.provider_label} API request failed: {exc}") from exc
|
|
185
|
+
return json.loads(raw)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
def anthropic_response_text(response: dict[str, Any]) -> str:
|
|
189
|
+
return "\n".join(
|
|
190
|
+
str(block.get("text") or "").strip()
|
|
191
|
+
for block in list(response.get("content") or [])
|
|
192
|
+
if block.get("type") == "text"
|
|
193
|
+
).strip()
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def _openai_text_format_for_response_contract(response_contract: str | None) -> dict[str, Any] | None:
|
|
197
|
+
if response_contract != "json_only":
|
|
198
|
+
return None
|
|
199
|
+
return {
|
|
200
|
+
"format": {
|
|
201
|
+
"type": "json_schema",
|
|
202
|
+
"name": "generic_json_response",
|
|
203
|
+
"schema": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": True,
|
|
206
|
+
},
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def openai_responses_create(
|
|
212
|
+
*,
|
|
213
|
+
settings: OpenAiApiSettings,
|
|
214
|
+
prompt: str,
|
|
215
|
+
timeout_seconds: int | None,
|
|
216
|
+
response_contract: str | None = None,
|
|
217
|
+
) -> dict[str, Any]:
|
|
218
|
+
payload: dict[str, Any] = {
|
|
219
|
+
"model": settings.model,
|
|
220
|
+
"input": prompt,
|
|
221
|
+
}
|
|
222
|
+
text_format = _openai_text_format_for_response_contract(response_contract)
|
|
223
|
+
if text_format is not None:
|
|
224
|
+
payload["text"] = text_format
|
|
225
|
+
data = json.dumps(payload).encode("utf-8")
|
|
226
|
+
req = request.Request(
|
|
227
|
+
settings.api_url,
|
|
228
|
+
data=data,
|
|
229
|
+
headers={
|
|
230
|
+
"content-type": "application/json",
|
|
231
|
+
"authorization": f"Bearer {settings.api_key}",
|
|
232
|
+
},
|
|
233
|
+
method="POST",
|
|
234
|
+
)
|
|
235
|
+
try:
|
|
236
|
+
with request.urlopen(req, timeout=timeout_seconds) as resp:
|
|
237
|
+
raw = resp.read().decode("utf-8")
|
|
238
|
+
except error.HTTPError as exc:
|
|
239
|
+
body = exc.read().decode("utf-8", errors="replace")
|
|
240
|
+
raise RuntimeError(f"{settings.provider_label} API request failed: {exc.code} {body}") from exc
|
|
241
|
+
except error.URLError as exc:
|
|
242
|
+
raise RuntimeError(f"{settings.provider_label} API request failed: {exc}") from exc
|
|
243
|
+
return json.loads(raw)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def openai_response_text(response: dict[str, Any]) -> str:
|
|
247
|
+
output_text = str(response.get("output_text") or "").strip()
|
|
248
|
+
if output_text:
|
|
249
|
+
return output_text
|
|
250
|
+
|
|
251
|
+
collected: list[str] = []
|
|
252
|
+
for item in list(response.get("output") or []):
|
|
253
|
+
for block in list(item.get("content") or []):
|
|
254
|
+
if block.get("type") in {"output_text", "text"}:
|
|
255
|
+
text = str(block.get("text") or "").strip()
|
|
256
|
+
if text:
|
|
257
|
+
collected.append(text)
|
|
258
|
+
return "\n".join(collected).strip()
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def google_generate_content(
|
|
262
|
+
*,
|
|
263
|
+
settings: GoogleApiSettings,
|
|
264
|
+
prompt: str,
|
|
265
|
+
timeout_seconds: int | None,
|
|
266
|
+
) -> dict[str, Any]:
|
|
267
|
+
payload: dict[str, Any] = {
|
|
268
|
+
"contents": [
|
|
269
|
+
{
|
|
270
|
+
"role": "user",
|
|
271
|
+
"parts": [{"text": prompt}],
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
}
|
|
275
|
+
data = json.dumps(payload).encode("utf-8")
|
|
276
|
+
req = request.Request(
|
|
277
|
+
GOOGLE_GENERATE_CONTENT_URL_TEMPLATE.format(model=settings.model),
|
|
278
|
+
data=data,
|
|
279
|
+
headers={
|
|
280
|
+
"content-type": "application/json",
|
|
281
|
+
"x-goog-api-key": settings.api_key,
|
|
282
|
+
},
|
|
283
|
+
method="POST",
|
|
284
|
+
)
|
|
285
|
+
try:
|
|
286
|
+
with request.urlopen(req, timeout=timeout_seconds) as resp:
|
|
287
|
+
raw = resp.read().decode("utf-8")
|
|
288
|
+
except error.HTTPError as exc:
|
|
289
|
+
body = exc.read().decode("utf-8", errors="replace")
|
|
290
|
+
raise RuntimeError(f"Google API request failed: {exc.code} {body}") from exc
|
|
291
|
+
except error.URLError as exc:
|
|
292
|
+
raise RuntimeError(f"Google API request failed: {exc}") from exc
|
|
293
|
+
return json.loads(raw)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
def google_response_text(response: dict[str, Any]) -> str:
|
|
297
|
+
collected: list[str] = []
|
|
298
|
+
for candidate in list(response.get("candidates") or []):
|
|
299
|
+
content = candidate.get("content") or {}
|
|
300
|
+
for part in list(content.get("parts") or []):
|
|
301
|
+
text = str(part.get("text") or "").strip()
|
|
302
|
+
if text:
|
|
303
|
+
collected.append(text)
|
|
304
|
+
return "\n".join(collected).strip()
|