agentrules 3.4.2__tar.gz → 3.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agentrules-3.4.2/src/agentrules.egg-info → agentrules-3.5.0}/PKG-INFO +1 -1
- {agentrules-3.4.2 → agentrules-3.5.0}/pyproject.toml +1 -1
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/prompts/phase_1_prompts.py +64 -1
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/phase_1.py +86 -28
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/pipeline/__init__.py +2 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/pipeline/config.py +2 -1
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/pipeline/orchestrator.py +54 -17
- agentrules-3.5.0/src/agentrules/core/pipeline/project_profile.py +489 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/pipeline/snapshot.py +19 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/formatters/clean_agentrules.py +2 -3
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/structured_outputs.py +8 -1
- {agentrules-3.4.2 → agentrules-3.5.0/src/agentrules.egg-info}/PKG-INFO +1 -1
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules.egg-info/SOURCES.txt +1 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/LICENSE +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/README.md +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/setup.cfg +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/__main__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/app.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/bootstrap.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/analyze.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/configure.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/execplan.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/execplan_registry.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/keys.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/scaffold.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/snapshot.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/commands/tree.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/context.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/services/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/services/codex_runtime.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/services/configuration.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/services/output_validation.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/services/pipeline_runner.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/services/tree_preview.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/analysis_view.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/event_sink.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/main_menu.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/codex.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/exclusions/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/exclusions/editor.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/exclusions/preview.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/exclusions/summary.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/logging.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/menu.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/models/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/models/researcher.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/models/utils.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/outputs.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/settings/providers.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/cli/ui/styles.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/agents.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/exclusions.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/prompts/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/prompts/final_analysis_prompt.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/prompts/phase_2_prompts.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/prompts/phase_3_prompts.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/prompts/phase_4_prompts.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/prompts/phase_5_prompts.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/config/tools.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agent_tools/tool_manager.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agent_tools/web_search/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agent_tools/web_search/tavily.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/architect.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/capabilities.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/client.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/prompting.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/request_builder.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/response_parser.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/anthropic/tooling.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/base.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/architect.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/client.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/errors.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/models.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/process.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/protocol.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/request_builder.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/codex/response_parser.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/architect.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/client.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/compat.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/config.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/prompting.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/request_builder.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/response_parser.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/deepseek/tooling.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/factory/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/factory/factory.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/architect.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/capabilities.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/client.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/errors.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/legacy.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/prompting.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/response_parser.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/gemini/tooling.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/openai/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/openai/architect.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/openai/client.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/openai/compat.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/openai/config.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/openai/request_builder.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/openai/response_parser.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/architect.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/client.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/config.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/prompting.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/request_builder.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/response_parser.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/agents/xai/tooling.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/events.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/final_analysis.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/phase_2.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/phase_3.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/phase_4.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/analysis/phase_5.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/constants.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/environment.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/manager.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/model_presets.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/models.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/repository.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/serde.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/codex.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/exclusions.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/features.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/logging.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/outputs.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/phase_models.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/services/providers.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/configuration/utils.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/creator.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/identity.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/locks.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/milestones.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/paths.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/registry.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/templates/EXECPLAN_TEMPLATE.md +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/execplan/templates/MILESTONE_FILE_TEMPLATE.md +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/logging/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/logging/config.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/pipeline/factory.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/pipeline/output.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/streaming/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/streaming/types.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/types/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/types/agent_config.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/types/models.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/types/tool_config.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/async_stream.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/constants.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/constants.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/discovery.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/metadata.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/models.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/clojure.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/dart.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/dotnet.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/elixir.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/generic.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/go.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/helpers.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/java.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/javascript.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/php.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/python.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/ruby.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/swift.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/parsers/toml_based.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/registry.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/dependency_scanner/scan.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/agent_scaffold.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/atomic_write.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/cursorignore.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/phases_output.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/snapshot_artifact.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/snapshot_policy.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/templates/MILESTONE_TEMPLATE.md +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_creation/templates/PLANS.md +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_system/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_system/file_retriever.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_system/gitignore.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/file_system/tree_generator.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/formatters/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/model_config_helper.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/offline.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/parsers/__init__.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/parsers/agent_parser.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/provider_capabilities.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/release_metadata.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/system_prompt.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/token_estimator.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules/core/utils/token_packer.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules.egg-info/dependency_links.txt +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules.egg-info/entry_points.txt +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules.egg-info/requires.txt +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/src/agentrules.egg-info/top_level.txt +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/tests/test_cli_services.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/tests/test_env.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/tests/test_openai_responses.py +0 -0
- {agentrules-3.4.2 → agentrules-3.5.0}/tests/test_smoke_discovery.py +0 -0
|
@@ -8,6 +8,9 @@ modifying the core logic of the agents.
|
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
11
|
+
from collections.abc import Mapping
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
11
14
|
from agentrules.core.utils.system_prompt import normalize_responsibilities
|
|
12
15
|
|
|
13
16
|
# Phase 1 system prompt template (agent behavior/persona guidance).
|
|
@@ -111,6 +114,30 @@ RESEARCHER_AGENT_PROMPT = {
|
|
|
111
114
|
]
|
|
112
115
|
}
|
|
113
116
|
|
|
117
|
+
FRONTEND_DESIGN_AGENT_PROMPT = {
|
|
118
|
+
"name": "Frontend Design Agent",
|
|
119
|
+
"role": "analyzing UI styling architecture and design system surface",
|
|
120
|
+
"responsibilities": [
|
|
121
|
+
"Identify the primary styling approach used by the frontend (Tailwind, CSS modules, global CSS, CSS-in-JS)",
|
|
122
|
+
"Locate likely design-token and variant definitions from configuration files and project layout",
|
|
123
|
+
"Summarize frontend architecture patterns that influence UI composition and onboarding",
|
|
124
|
+
"Call out uncertainty explicitly when styling evidence is incomplete or mixed"
|
|
125
|
+
],
|
|
126
|
+
"profile_key": "frontend",
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
PYTHON_TOOLING_AGENT_PROMPT = {
|
|
130
|
+
"name": "Python Tooling Agent",
|
|
131
|
+
"role": "analyzing Python packaging, tooling, and local developer workflow surfaces",
|
|
132
|
+
"responsibilities": [
|
|
133
|
+
"Summarize Python packaging and dependency-management conventions across pyproject, requirements, and setup files",
|
|
134
|
+
"Identify task runner entrypoints such as Makefile or justfile and their likely onboarding relevance",
|
|
135
|
+
"Capture tooling surfaces such as tox or nox that shape local development workflows",
|
|
136
|
+
"Highlight mixed or redundant Python tooling conventions that may confuse onboarding"
|
|
137
|
+
],
|
|
138
|
+
"profile_key": "python",
|
|
139
|
+
}
|
|
140
|
+
|
|
114
141
|
# Function to format a prompt for a specific agent
|
|
115
142
|
def format_agent_prompt(agent_config, context):
|
|
116
143
|
"""
|
|
@@ -145,10 +172,46 @@ def get_dependency_agent_prompt(researcher_enabled: bool) -> dict:
|
|
|
145
172
|
}
|
|
146
173
|
|
|
147
174
|
|
|
175
|
+
def get_specialized_phase1_agent_prompts(
|
|
176
|
+
project_profile: Mapping[str, Any] | None,
|
|
177
|
+
) -> list[dict[str, Any]]:
|
|
178
|
+
"""
|
|
179
|
+
Return specialized Phase 1 agent configs based on deterministic profile signals.
|
|
180
|
+
|
|
181
|
+
Specialized agents are optional and should run only when the profile indicates
|
|
182
|
+
a relevant project surface.
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
prompts: list[dict[str, Any]] = []
|
|
186
|
+
profile = project_profile if isinstance(project_profile, Mapping) else {}
|
|
187
|
+
|
|
188
|
+
if _profile_slice_detected(profile, "frontend"):
|
|
189
|
+
prompts.append(_clone_prompt(FRONTEND_DESIGN_AGENT_PROMPT))
|
|
190
|
+
if _profile_slice_detected(profile, "python"):
|
|
191
|
+
prompts.append(_clone_prompt(PYTHON_TOOLING_AGENT_PROMPT))
|
|
192
|
+
return prompts
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def _profile_slice_detected(project_profile: Mapping[str, Any], key: str) -> bool:
|
|
196
|
+
section = project_profile.get(key)
|
|
197
|
+
return bool(isinstance(section, Mapping) and section.get("detected"))
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def _clone_prompt(prompt: Mapping[str, Any]) -> dict[str, Any]:
|
|
201
|
+
return {
|
|
202
|
+
"name": str(prompt["name"]),
|
|
203
|
+
"role": str(prompt["role"]),
|
|
204
|
+
"responsibilities": list(prompt.get("responsibilities", [])),
|
|
205
|
+
"profile_key": prompt.get("profile_key"),
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
|
|
148
209
|
# List of all Phase 1 agent configurations (default order assumes researcher enabled)
|
|
149
210
|
PHASE_1_AGENTS = [
|
|
150
211
|
DEPENDENCY_KNOWLEDGE_GAP_PROMPT,
|
|
151
212
|
STRUCTURE_AGENT_PROMPT,
|
|
152
213
|
TECH_STACK_AGENT_PROMPT,
|
|
153
|
-
RESEARCHER_AGENT_PROMPT
|
|
214
|
+
RESEARCHER_AGENT_PROMPT,
|
|
215
|
+
FRONTEND_DESIGN_AGENT_PROMPT,
|
|
216
|
+
PYTHON_TOOLING_AGENT_PROMPT,
|
|
154
217
|
]
|
|
@@ -23,11 +23,13 @@ from agentrules.config.prompts.phase_1_prompts import ( # Prompts used for conf
|
|
|
23
23
|
TECH_STACK_AGENT_PROMPT,
|
|
24
24
|
format_phase1_system_prompt,
|
|
25
25
|
get_dependency_agent_prompt,
|
|
26
|
+
get_specialized_phase1_agent_prompts,
|
|
26
27
|
)
|
|
27
28
|
from agentrules.config.tools import TOOL_SETS
|
|
28
29
|
from agentrules.core.agents.factory.factory import get_architect_for_phase, get_researcher_architect
|
|
29
30
|
from agentrules.core.types.tool_config import Tool
|
|
30
31
|
from agentrules.core.utils.provider_capabilities import requires_external_research_tool_loop
|
|
32
|
+
from agentrules.core.utils.system_prompt import normalize_responsibilities
|
|
31
33
|
|
|
32
34
|
try:
|
|
33
35
|
from agentrules.core.agent_tools.web_search.tavily import run_tavily_search as _run_tavily_search
|
|
@@ -61,41 +63,20 @@ class Phase1Analysis:
|
|
|
61
63
|
self.researcher_enabled = researcher_enabled
|
|
62
64
|
|
|
63
65
|
dependency_prompt = get_dependency_agent_prompt(self.researcher_enabled)
|
|
64
|
-
self.dependency_architect =
|
|
65
|
-
"phase1",
|
|
66
|
+
self.dependency_architect = self._create_phase1_architect(
|
|
66
67
|
name=dependency_prompt["name"],
|
|
67
68
|
role=dependency_prompt["role"],
|
|
68
69
|
responsibilities=dependency_prompt["responsibilities"],
|
|
69
|
-
prompt_template=PHASE_1_BASE_PROMPT,
|
|
70
|
-
system_prompt=format_phase1_system_prompt(
|
|
71
|
-
agent_name=dependency_prompt["name"],
|
|
72
|
-
agent_role=dependency_prompt["role"],
|
|
73
|
-
responsibilities=dependency_prompt["responsibilities"],
|
|
74
|
-
),
|
|
75
70
|
)
|
|
76
|
-
self.structure_architect =
|
|
77
|
-
"phase1",
|
|
71
|
+
self.structure_architect = self._create_phase1_architect(
|
|
78
72
|
name=STRUCTURE_AGENT_PROMPT["name"],
|
|
79
73
|
role=STRUCTURE_AGENT_PROMPT["role"],
|
|
80
74
|
responsibilities=STRUCTURE_AGENT_PROMPT["responsibilities"],
|
|
81
|
-
prompt_template=PHASE_1_BASE_PROMPT,
|
|
82
|
-
system_prompt=format_phase1_system_prompt(
|
|
83
|
-
agent_name=STRUCTURE_AGENT_PROMPT["name"],
|
|
84
|
-
agent_role=STRUCTURE_AGENT_PROMPT["role"],
|
|
85
|
-
responsibilities=STRUCTURE_AGENT_PROMPT["responsibilities"],
|
|
86
|
-
),
|
|
87
75
|
)
|
|
88
|
-
self.tech_stack_architect =
|
|
89
|
-
"phase1",
|
|
76
|
+
self.tech_stack_architect = self._create_phase1_architect(
|
|
90
77
|
name=TECH_STACK_AGENT_PROMPT["name"],
|
|
91
78
|
role=TECH_STACK_AGENT_PROMPT["role"],
|
|
92
79
|
responsibilities=TECH_STACK_AGENT_PROMPT["responsibilities"],
|
|
93
|
-
prompt_template=PHASE_1_BASE_PROMPT,
|
|
94
|
-
system_prompt=format_phase1_system_prompt(
|
|
95
|
-
agent_name=TECH_STACK_AGENT_PROMPT["name"],
|
|
96
|
-
agent_role=TECH_STACK_AGENT_PROMPT["role"],
|
|
97
|
-
responsibilities=TECH_STACK_AGENT_PROMPT["responsibilities"],
|
|
98
|
-
),
|
|
99
80
|
)
|
|
100
81
|
self.initial_architects = [
|
|
101
82
|
self.dependency_architect,
|
|
@@ -110,18 +91,45 @@ class Phase1Analysis:
|
|
|
110
91
|
role=RESEARCHER_AGENT_PROMPT["role"],
|
|
111
92
|
responsibilities=RESEARCHER_AGENT_PROMPT["responsibilities"],
|
|
112
93
|
prompt_template=PHASE_1_BASE_PROMPT,
|
|
113
|
-
system_prompt=
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
system_prompt=self._build_phase1_system_prompt(
|
|
95
|
+
name=RESEARCHER_AGENT_PROMPT["name"],
|
|
96
|
+
role=RESEARCHER_AGENT_PROMPT["role"],
|
|
116
97
|
responsibilities=RESEARCHER_AGENT_PROMPT["responsibilities"],
|
|
117
98
|
),
|
|
118
99
|
)
|
|
119
100
|
|
|
101
|
+
def _build_phase1_system_prompt(self, *, name: str, role: str, responsibilities: object) -> str:
|
|
102
|
+
return format_phase1_system_prompt(
|
|
103
|
+
agent_name=name,
|
|
104
|
+
agent_role=role,
|
|
105
|
+
responsibilities=responsibilities,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def _create_phase1_architect(self, *, name: str, role: str, responsibilities: object) -> Any:
|
|
109
|
+
normalized_responsibilities = normalize_responsibilities(responsibilities)
|
|
110
|
+
return get_architect_for_phase(
|
|
111
|
+
"phase1",
|
|
112
|
+
name=name,
|
|
113
|
+
role=role,
|
|
114
|
+
responsibilities=normalized_responsibilities,
|
|
115
|
+
prompt_template=PHASE_1_BASE_PROMPT,
|
|
116
|
+
system_prompt=self._build_phase1_system_prompt(
|
|
117
|
+
name=name,
|
|
118
|
+
role=role,
|
|
119
|
+
responsibilities=normalized_responsibilities,
|
|
120
|
+
),
|
|
121
|
+
)
|
|
122
|
+
|
|
120
123
|
# ----------------------------------------------------
|
|
121
124
|
# Run Method
|
|
122
125
|
# Executes the Initial Discovery phase.
|
|
123
126
|
# ----------------------------------------------------
|
|
124
|
-
async def run(
|
|
127
|
+
async def run(
|
|
128
|
+
self,
|
|
129
|
+
tree: list[str],
|
|
130
|
+
package_info: dict,
|
|
131
|
+
project_profile: dict[str, Any] | None = None,
|
|
132
|
+
) -> dict:
|
|
125
133
|
"""
|
|
126
134
|
Run the Initial Discovery Phase.
|
|
127
135
|
|
|
@@ -132,12 +140,15 @@ class Phase1Analysis:
|
|
|
132
140
|
Returns:
|
|
133
141
|
Dictionary containing the results of the phase
|
|
134
142
|
"""
|
|
143
|
+
profile_context = project_profile if isinstance(project_profile, dict) else {}
|
|
144
|
+
|
|
135
145
|
logging.info("[bold]Phase 1, Part 1:[/bold] Starting dependency analysis")
|
|
136
146
|
|
|
137
147
|
dependency_context = {
|
|
138
148
|
"dependency_manifests": package_info.get("manifests", []),
|
|
139
149
|
"dependency_summary": package_info.get("summary", {}),
|
|
140
150
|
"researcher_expected": self.researcher_enabled,
|
|
151
|
+
"project_profile": profile_context,
|
|
141
152
|
}
|
|
142
153
|
dependency_result = await self.dependency_architect.analyze(dependency_context)
|
|
143
154
|
|
|
@@ -166,6 +177,7 @@ class Phase1Analysis:
|
|
|
166
177
|
"dependency_summary": package_info.get("summary", {}),
|
|
167
178
|
"dependency_manifests": package_info.get("manifests", []),
|
|
168
179
|
"tree_structure": tree,
|
|
180
|
+
"project_profile": profile_context,
|
|
169
181
|
}
|
|
170
182
|
|
|
171
183
|
if requires_external_research_tool_loop(self.researcher_architect):
|
|
@@ -188,6 +200,7 @@ class Phase1Analysis:
|
|
|
188
200
|
"research_findings": research_findings.get("findings"),
|
|
189
201
|
"research_agent_error": research_findings.get("error"),
|
|
190
202
|
"research_status": research_findings.get("status"),
|
|
203
|
+
"project_profile": profile_context,
|
|
191
204
|
}
|
|
192
205
|
tech_stack_context = dict(structure_context)
|
|
193
206
|
|
|
@@ -205,14 +218,59 @@ class Phase1Analysis:
|
|
|
205
218
|
tech_stack_result,
|
|
206
219
|
]
|
|
207
220
|
|
|
221
|
+
specialized_results = await self._run_specialized_profile_agents(
|
|
222
|
+
project_profile=profile_context,
|
|
223
|
+
base_context=structure_context,
|
|
224
|
+
)
|
|
225
|
+
if specialized_results:
|
|
226
|
+
initial_results.extend(specialized_results)
|
|
227
|
+
|
|
208
228
|
# Return the combined results.
|
|
209
229
|
return {
|
|
210
230
|
"phase": "Initial Discovery",
|
|
211
231
|
"initial_findings": initial_results,
|
|
212
232
|
"documentation_research": research_findings,
|
|
213
233
|
"package_info": package_info,
|
|
234
|
+
"project_profile": profile_context,
|
|
214
235
|
}
|
|
215
236
|
|
|
237
|
+
async def _run_specialized_profile_agents(
|
|
238
|
+
self,
|
|
239
|
+
*,
|
|
240
|
+
project_profile: dict[str, Any],
|
|
241
|
+
base_context: dict[str, Any],
|
|
242
|
+
) -> list[dict[str, Any]]:
|
|
243
|
+
"""
|
|
244
|
+
Run optional specialized Phase 1 agents selected from profile signals.
|
|
245
|
+
"""
|
|
246
|
+
|
|
247
|
+
prompt_configs = get_specialized_phase1_agent_prompts(project_profile)
|
|
248
|
+
if not prompt_configs:
|
|
249
|
+
return []
|
|
250
|
+
|
|
251
|
+
logging.info(
|
|
252
|
+
"[bold]Phase 1, Part 4:[/bold] Running %d profile-specialized discovery agent(s)",
|
|
253
|
+
len(prompt_configs),
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
tasks = []
|
|
257
|
+
for prompt_config in prompt_configs:
|
|
258
|
+
architect = self._create_phase1_architect(
|
|
259
|
+
name=str(prompt_config["name"]),
|
|
260
|
+
role=str(prompt_config["role"]),
|
|
261
|
+
responsibilities=prompt_config.get("responsibilities", []),
|
|
262
|
+
)
|
|
263
|
+
context = dict(base_context)
|
|
264
|
+
context["project_profile"] = project_profile
|
|
265
|
+
profile_key = prompt_config.get("profile_key")
|
|
266
|
+
if isinstance(profile_key, str):
|
|
267
|
+
context[f"{profile_key}_profile"] = project_profile.get(profile_key, {})
|
|
268
|
+
tasks.append(architect.analyze(context))
|
|
269
|
+
|
|
270
|
+
results = await asyncio.gather(*tasks)
|
|
271
|
+
logging.info("[bold green]Phase 1, Part 4:[/bold green] Specialized profile agents completed")
|
|
272
|
+
return [result for result in results if isinstance(result, dict)]
|
|
273
|
+
|
|
216
274
|
async def _run_researcher_with_tools(
|
|
217
275
|
self,
|
|
218
276
|
research_context: dict[str, Any],
|
|
@@ -11,6 +11,7 @@ from .config import (
|
|
|
11
11
|
from .factory import create_default_pipeline
|
|
12
12
|
from .orchestrator import AnalysisPipeline
|
|
13
13
|
from .output import PipelineOutputOptions, PipelineOutputSummary, PipelineOutputWriter
|
|
14
|
+
from .project_profile import build_project_profile
|
|
14
15
|
from .snapshot import build_project_snapshot
|
|
15
16
|
|
|
16
17
|
__all__ = [
|
|
@@ -24,6 +25,7 @@ __all__ = [
|
|
|
24
25
|
"PipelineResult",
|
|
25
26
|
"PipelineSettings",
|
|
26
27
|
"ProjectSnapshot",
|
|
28
|
+
"build_project_profile",
|
|
27
29
|
"create_default_pipeline",
|
|
28
30
|
"build_project_snapshot",
|
|
29
31
|
]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from collections.abc import Mapping
|
|
6
|
-
from dataclasses import dataclass
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
9
|
from pathspec import PathSpec
|
|
@@ -48,6 +48,7 @@ class ProjectSnapshot:
|
|
|
48
48
|
tree: tuple[str, ...]
|
|
49
49
|
dependency_info: Mapping[str, object]
|
|
50
50
|
gitignore: GitignoreSnapshot
|
|
51
|
+
project_profile: Mapping[str, object] = field(default_factory=dict)
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
@dataclass(frozen=True)
|
|
@@ -3,15 +3,10 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import time
|
|
6
|
+
from collections.abc import Sequence
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Protocol, runtime_checkable
|
|
6
9
|
|
|
7
|
-
from agentrules.core.analysis import (
|
|
8
|
-
FinalAnalysis,
|
|
9
|
-
Phase1Analysis,
|
|
10
|
-
Phase2Analysis,
|
|
11
|
-
Phase3Analysis,
|
|
12
|
-
Phase4Analysis,
|
|
13
|
-
Phase5Analysis,
|
|
14
|
-
)
|
|
15
10
|
from agentrules.core.analysis.events import AnalysisEventSink
|
|
16
11
|
from agentrules.core.pipeline.config import (
|
|
17
12
|
PipelineMetrics,
|
|
@@ -21,18 +16,59 @@ from agentrules.core.pipeline.config import (
|
|
|
21
16
|
)
|
|
22
17
|
|
|
23
18
|
|
|
19
|
+
class Phase1Runner(Protocol):
|
|
20
|
+
async def run(
|
|
21
|
+
self,
|
|
22
|
+
tree: list[str],
|
|
23
|
+
package_info: dict,
|
|
24
|
+
project_profile: dict | None = None,
|
|
25
|
+
/,
|
|
26
|
+
) -> dict: ...
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Phase2Runner(Protocol):
|
|
30
|
+
async def run(self, phase1_results: dict, tree: Sequence[str] | None = None, /) -> dict: ...
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class Phase3Runner(Protocol):
|
|
34
|
+
async def run(self, phase2_results: dict, tree: list[str], directory: Path, /) -> dict: ...
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Phase4Runner(Protocol):
|
|
38
|
+
async def run(self, phase3_results: dict, /) -> dict: ...
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Phase5Runner(Protocol):
|
|
42
|
+
async def run(self, all_results: dict, /) -> dict: ...
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class FinalRunner(Protocol):
|
|
46
|
+
async def run(
|
|
47
|
+
self,
|
|
48
|
+
consolidated_report: dict,
|
|
49
|
+
project_structure: Sequence[str] | None = None,
|
|
50
|
+
/,
|
|
51
|
+
rules_filename: str | None = None,
|
|
52
|
+
) -> dict: ...
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@runtime_checkable
|
|
56
|
+
class SupportsEventSink(Protocol):
|
|
57
|
+
def set_event_sink(self, sink: AnalysisEventSink | None) -> None: ...
|
|
58
|
+
|
|
59
|
+
|
|
24
60
|
class AnalysisPipeline:
|
|
25
61
|
"""Run the configured analysis phases and collect their outputs."""
|
|
26
62
|
|
|
27
63
|
def __init__(
|
|
28
64
|
self,
|
|
29
65
|
*,
|
|
30
|
-
phase1:
|
|
31
|
-
phase2:
|
|
32
|
-
phase3:
|
|
33
|
-
phase4:
|
|
34
|
-
phase5:
|
|
35
|
-
final:
|
|
66
|
+
phase1: Phase1Runner,
|
|
67
|
+
phase2: Phase2Runner,
|
|
68
|
+
phase3: Phase3Runner,
|
|
69
|
+
phase4: Phase4Runner,
|
|
70
|
+
phase5: Phase5Runner,
|
|
71
|
+
final: FinalRunner,
|
|
36
72
|
event_sink: AnalysisEventSink | None = None,
|
|
37
73
|
) -> None:
|
|
38
74
|
self._phase1 = phase1
|
|
@@ -48,15 +84,16 @@ class AnalysisPipeline:
|
|
|
48
84
|
"""Attach an event sink to phases that emit progress notifications."""
|
|
49
85
|
|
|
50
86
|
self._event_sink = sink
|
|
51
|
-
if
|
|
87
|
+
if isinstance(self._phase2, SupportsEventSink):
|
|
52
88
|
self._phase2.set_event_sink(sink)
|
|
53
|
-
if
|
|
89
|
+
if isinstance(self._phase3, SupportsEventSink):
|
|
54
90
|
self._phase3.set_event_sink(sink)
|
|
55
91
|
|
|
56
92
|
async def run_phase1(self, snapshot: ProjectSnapshot) -> dict[str, object]:
|
|
57
93
|
tree = list(snapshot.tree)
|
|
58
94
|
dependency_info = dict(snapshot.dependency_info)
|
|
59
|
-
|
|
95
|
+
project_profile = dict(snapshot.project_profile)
|
|
96
|
+
phase1_raw = await self._phase1.run(tree, dependency_info, project_profile)
|
|
60
97
|
return dict(phase1_raw)
|
|
61
98
|
|
|
62
99
|
async def run_phase2(
|