agentrules 4.0.0__tar.gz → 4.2.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-4.0.0/src/agentrules.egg-info → agentrules-4.2.0}/PKG-INFO +46 -33
- {agentrules-4.0.0 → agentrules-4.2.0}/README.md +44 -32
- {agentrules-4.0.0 → agentrules-4.2.0}/pyproject.toml +3 -2
- agentrules-4.2.0/src/agentrules/cli/services/claude_code_runtime.py +89 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/services/configuration.py +41 -2
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/__init__.py +2 -0
- agentrules-4.2.0/src/agentrules/cli/ui/settings/claude_code.py +212 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/menu.py +5 -1
- agentrules-4.2.0/src/agentrules/cli/ui/settings/models/__init__.py +569 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/models/researcher.py +11 -4
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/models/utils.py +86 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/styles.py +2 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/agents.py +286 -23
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/capabilities.py +24 -1
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/request_builder.py +9 -2
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/base.py +1 -0
- agentrules-4.2.0/src/agentrules/core/agents/claude_code/__init__.py +11 -0
- {agentrules-4.0.0/src/agentrules/core/agents/codex → agentrules-4.2.0/src/agentrules/core/agents/claude_code}/architect.py +44 -53
- agentrules-4.2.0/src/agentrules/core/agents/claude_code/client.py +216 -0
- agentrules-4.2.0/src/agentrules/core/agents/claude_code/errors.py +22 -0
- agentrules-4.2.0/src/agentrules/core/agents/claude_code/request_builder.py +231 -0
- agentrules-4.2.0/src/agentrules/core/agents/claude_code/response_parser.py +122 -0
- agentrules-4.2.0/src/agentrules/core/agents/codex/architect.py +395 -0
- agentrules-4.2.0/src/agentrules/core/agents/codex/model_selection.py +148 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/request_builder.py +6 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/factory/factory.py +3 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/capabilities.py +19 -1
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/architect.py +1 -1
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/config.py +19 -5
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/request_builder.py +2 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/__init__.py +12 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/constants.py +6 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/environment.py +3 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/manager.py +70 -2
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/model_presets.py +339 -40
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/models.py +28 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/serde.py +67 -2
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/__init__.py +2 -1
- agentrules-4.2.0/src/agentrules/core/configuration/services/claude_code.py +239 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/providers.py +3 -1
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/utils.py +36 -1
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/types/__init__.py +8 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/types/models.py +87 -2
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/provider_capabilities.py +1 -1
- agentrules-4.2.0/src/agentrules/core/utils/provider_utils.py +104 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/structured_outputs.py +19 -1
- {agentrules-4.0.0 → agentrules-4.2.0/src/agentrules.egg-info}/PKG-INFO +46 -33
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules.egg-info/SOURCES.txt +11 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules.egg-info/requires.txt +1 -0
- agentrules-4.0.0/src/agentrules/cli/ui/settings/models/__init__.py +0 -343
- {agentrules-4.0.0 → agentrules-4.2.0}/LICENSE +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/setup.cfg +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/__main__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/app.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/bootstrap.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/analyze.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/configure.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/execplan.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/execplan_registry.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/keys.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/scaffold.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/snapshot.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/commands/tree.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/context.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/services/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/services/codex_runtime.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/services/output_validation.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/services/pipeline_runner.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/services/tree_preview.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/analysis_view.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/event_sink.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/main_menu.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/codex.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/exclusions/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/exclusions/editor.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/exclusions/preview.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/exclusions/summary.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/logging.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/outputs.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/cli/ui/settings/providers.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/exclusions.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/prompts/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/prompts/final_analysis_prompt.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/prompts/phase_1_prompts.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/prompts/phase_2_prompts.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/prompts/phase_3_prompts.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/prompts/phase_4_prompts.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/prompts/phase_5_prompts.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/config/tools.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agent_tools/tool_manager.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agent_tools/web_search/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agent_tools/web_search/tavily.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/architect.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/client.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/prompting.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/response_parser.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/anthropic/tooling.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/client.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/errors.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/models.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/process.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/protocol.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/codex/response_parser.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/architect.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/client.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/compat.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/config.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/prompting.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/request_builder.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/response_parser.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/deepseek/tooling.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/factory/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/architect.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/client.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/errors.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/legacy.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/prompting.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/response_parser.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/gemini/tooling.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/openai/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/openai/architect.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/openai/client.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/openai/compat.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/openai/config.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/openai/request_builder.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/openai/response_parser.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/client.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/prompting.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/response_parser.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/agents/xai/tooling.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/events.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/final_analysis.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/phase_1.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/phase_2.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/phase_3.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/phase_4.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/analysis/phase_5.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/repository.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/codex.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/exclusions.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/features.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/logging.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/outputs.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/configuration/services/phase_models.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/creator.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/identity.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/locks.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/milestones.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/paths.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/registry.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/templates/EXECPLAN_TEMPLATE.md +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/execplan/templates/MILESTONE_FILE_TEMPLATE.md +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/logging/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/logging/config.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/pipeline/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/pipeline/config.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/pipeline/factory.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/pipeline/orchestrator.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/pipeline/output.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/pipeline/project_profile.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/pipeline/snapshot.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/streaming/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/streaming/types.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/types/agent_config.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/types/tool_config.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/async_stream.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/constants.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/constants.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/discovery.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/metadata.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/models.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/clojure.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/dart.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/dotnet.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/elixir.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/generic.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/go.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/helpers.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/java.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/javascript.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/php.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/python.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/ruby.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/swift.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/parsers/toml_based.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/registry.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/dependency_scanner/scan.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/agent_scaffold.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/atomic_write.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/cursorignore.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/phases_output.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/snapshot_artifact.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/snapshot_policy.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/templates/MILESTONE_TEMPLATE.md +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_creation/templates/PLANS.md +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_system/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_system/file_retriever.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_system/gitignore.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/file_system/tree_generator.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/formatters/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/formatters/clean_agentrules.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/model_config_helper.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/offline.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/parsers/__init__.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/parsers/agent_parser.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/release_metadata.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/system_prompt.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/token_estimator.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules/core/utils/token_packer.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules.egg-info/dependency_links.txt +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules.egg-info/entry_points.txt +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/src/agentrules.egg-info/top_level.txt +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/tests/test_cli_services.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/tests/test_env.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/tests/test_openai_responses.py +0 -0
- {agentrules-4.0.0 → agentrules-4.2.0}/tests/test_smoke_discovery.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentrules
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.2.0
|
|
4
4
|
Summary: AGENTS.md/CLAUDE.md generator and ExecPlan harness for coding agents
|
|
5
5
|
Author: trevor-nichols
|
|
6
6
|
License-Expression: MIT
|
|
@@ -27,6 +27,7 @@ Requires-Dist: PyYAML>=6.0
|
|
|
27
27
|
Requires-Dist: tomli; python_version < "3.11"
|
|
28
28
|
Requires-Dist: tomli-w
|
|
29
29
|
Requires-Dist: tiktoken>=0.7.0
|
|
30
|
+
Requires-Dist: claude-agent-sdk>=0.2.88
|
|
30
31
|
Provides-Extra: dev
|
|
31
32
|
Requires-Dist: pytest; extra == "dev"
|
|
32
33
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
@@ -36,7 +37,7 @@ Requires-Dist: ruff>=0.6; extra == "dev"
|
|
|
36
37
|
Requires-Dist: pyright>=1.1.380; extra == "dev"
|
|
37
38
|
Dynamic: license-file
|
|
38
39
|
|
|
39
|
-
# 🤖 AgentRules Architect
|
|
40
|
+
# 🤖 AgentRules Architect
|
|
40
41
|
|
|
41
42
|
<div align="center">
|
|
42
43
|
|
|
@@ -45,14 +46,15 @@ Dynamic: license-file
|
|
|
45
46
|
[](https://openai.com/)
|
|
46
47
|
[](https://github.com/openai/codex)
|
|
47
48
|
[](https://www.anthropic.com/)
|
|
49
|
+
[](docs/claude-code-runtime.md)
|
|
48
50
|
[](https://deepseek.com/)
|
|
49
51
|
[](https://ai.google.dev/)
|
|
50
52
|
[](https://x.ai/)
|
|
51
53
|
[](https://github.com/trevor-nichols)
|
|
52
54
|
|
|
53
|
-
**
|
|
55
|
+
**Multi-provider repository analysis, agent rules generation, and ExecPlan tooling.**
|
|
54
56
|
|
|
55
|
-
[Demo](#-cli-demo) • [Highlights](#-
|
|
57
|
+
[Demo](#-cli-demo) • [Highlights](#-highlights) • [Features](#-feature-overview) • [Requirements](#-requirements) • [Installation](#-installation) • [Local Runtimes](#-configure-local-runtimes-optional) • [CLI](#-cli-at-a-glance) • [Configuration](#-configuration--preferences) • [Architecture](#-project-architecture) • [Outputs](#-output-artifacts) • [Development](#-development-workflow)
|
|
56
58
|
|
|
57
59
|
</div>
|
|
58
60
|
|
|
@@ -62,17 +64,17 @@ Dynamic: license-file
|
|
|
62
64
|
|
|
63
65
|
## Why AgentRules Architect?
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
AgentRules Architect analyzes a repository, coordinates specialized model-backed architects, and writes durable rules artifacts such as `AGENTS.md` or a custom rules filename like `CLAUDE.md`. It is built around a six-phase pipeline, a Rich/Typer CLI, persistent TOML configuration, provider-specific request adapters, local runtime integrations, and optional planning artifacts for longer agent-led work.
|
|
66
68
|
|
|
67
|
-
## 🔥
|
|
69
|
+
## 🔥 Highlights
|
|
68
70
|
|
|
69
|
-
-
|
|
70
|
-
- 🧭 **
|
|
71
|
+
- 📦 **PyPI package** – ships with console-script and `python -m agentrules` entry points.
|
|
72
|
+
- 🧭 **Interactive CLI** – `agentrules` launches a guided main menu, while subcommands cover analysis, configuration, keys, snapshots, ExecPlans, scaffolds, and tree previews.
|
|
71
73
|
- 🗂️ **Persistent settings** – API keys, model presets, logging, and output preferences live in `~/.config/agentrules/config.toml` (override with `AGENTRULES_CONFIG_DIR`).
|
|
72
|
-
- 🧠 **
|
|
73
|
-
- 🧰 **
|
|
74
|
-
- 🔌 **Unified tool management** –
|
|
75
|
-
- ✅ **Test & quality backbone** –
|
|
74
|
+
- 🧠 **Broad provider matrix** – presets span Anthropic, Claude Code, OpenAI, Codex app-server, Google Gemini, DeepSeek, and xAI, with phase-by-phase model selection from the CLI or config file.
|
|
75
|
+
- 🧰 **Local runtime support** – route phases through Codex app-server or Claude Code without treating those runtimes as ordinary API-key providers.
|
|
76
|
+
- 🔌 **Unified tool management** – `ToolManager` adapts canonical JSON tool schemas for each provider; Tavily web search is available to researcher agents with one toggle.
|
|
77
|
+
- ✅ **Test & quality backbone** – unit/integration tests, offline stubs, Pyright, and Ruff provide confidence without hitting live APIs.
|
|
76
78
|
|
|
77
79
|
## ✨ Feature Overview
|
|
78
80
|
|
|
@@ -81,6 +83,7 @@ Version 3 rebrands the project from **CursorRules Architect** to **AgentRules Ar
|
|
|
81
83
|
- 🧩 Researcher tooling via Tavily search with provider-aware tool translation.
|
|
82
84
|
- 📊 Rich terminal UI (Rich) showing per-agent progress, duration, and failures in real time.
|
|
83
85
|
- 🪵 Configurable outputs: `AGENTS.md`, `SNAPSHOT.md` (enabled by default), `.cursorignore`, optional `.agent/` scaffold templates, and per-phase markdown/json snapshots.
|
|
86
|
+
- 🧭 ExecPlan and milestone commands for long-running work with deterministic IDs and registry validation.
|
|
84
87
|
- 🔧 Declarative model presets plus runtime overrides via CLI or TOML.
|
|
85
88
|
|
|
86
89
|
## 🧮 Analysis Pipeline
|
|
@@ -99,18 +102,18 @@ The pipeline captures metrics (elapsed time, agent counts) and hands them to the
|
|
|
99
102
|
## 🛠 Requirements
|
|
100
103
|
|
|
101
104
|
- Python **3.11.9+** (matches Pyright target and packaged metadata).
|
|
102
|
-
- API key(s) for at least one provider:
|
|
105
|
+
- API key(s), OAuth runtime auth, or both for at least one model provider:
|
|
103
106
|
- Anthropic
|
|
107
|
+
- Claude Code (local runtime via Claude OAuth / SDK)
|
|
104
108
|
- OpenAI
|
|
109
|
+
- Codex app-server (local runtime via ChatGPT auth)
|
|
105
110
|
- DeepSeek
|
|
106
|
-
- Google
|
|
111
|
+
- Google Gemini
|
|
107
112
|
- xAI
|
|
108
113
|
- Tavily (optional, enables live web search tooling)
|
|
109
|
-
- Optional local runtime provider:
|
|
110
|
-
- Codex CLI (`codex`) for `codex app-server` integration
|
|
111
114
|
- Current preset IDs live in `src/agentrules/config/agents.py`.
|
|
112
|
-
-
|
|
113
|
-
- Dev tooling
|
|
115
|
+
- Dependency declarations live in `pyproject.toml`.
|
|
116
|
+
- Dev tooling includes `pytest`, Ruff, and Pyright.
|
|
114
117
|
|
|
115
118
|
## 📦 Installation
|
|
116
119
|
|
|
@@ -161,7 +164,7 @@ pip install "git+https://github.com/trevor-nichols/agentrules-architect.git#egg=
|
|
|
161
164
|
Need to validate against TestPyPI specifically?
|
|
162
165
|
|
|
163
166
|
```bash
|
|
164
|
-
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple agentrules
|
|
167
|
+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple agentrules
|
|
165
168
|
```
|
|
166
169
|
|
|
167
170
|
## 🔐 Configure API Keys
|
|
@@ -181,9 +184,9 @@ agentrules configure
|
|
|
181
184
|
agentrules keys
|
|
182
185
|
```
|
|
183
186
|
|
|
184
|
-
## 🧰 Configure
|
|
187
|
+
## 🧰 Configure Local Runtimes (Optional)
|
|
185
188
|
|
|
186
|
-
AgentRules supports
|
|
189
|
+
AgentRules supports local runtime providers separately from API-key providers.
|
|
187
190
|
|
|
188
191
|
- Open `agentrules` -> `Settings` -> `Codex runtime`
|
|
189
192
|
- Configure:
|
|
@@ -191,10 +194,16 @@ AgentRules supports Codex as a local runtime provider via `codex app-server`, se
|
|
|
191
194
|
- `CODEX_HOME` strategy (`managed` or `inherit`)
|
|
192
195
|
- optional managed home override
|
|
193
196
|
- Use `Sign in with ChatGPT` to authenticate runtime-backed model access.
|
|
197
|
+
- Open `agentrules` -> `Settings` -> `Claude Code runtime`
|
|
198
|
+
- Configure:
|
|
199
|
+
- Claude Agent SDK runtime resolution
|
|
200
|
+
- optional explicit `claude` executable path
|
|
201
|
+
- API-key environment sanitization for Claude Code child processes
|
|
202
|
+
- Authenticate Claude Code outside AgentRules with Claude Code's OAuth flow.
|
|
194
203
|
|
|
195
|
-
After runtime setup, choose Codex presets under `Settings -> Model presets per phase`.
|
|
204
|
+
After runtime setup, choose Codex or Claude Code presets under `Settings -> Model presets per phase`.
|
|
196
205
|
|
|
197
|
-
See [docs/codex-runtime.md](docs/codex-runtime.md) for
|
|
206
|
+
See [docs/codex-runtime.md](docs/codex-runtime.md) and [docs/claude-code-runtime.md](docs/claude-code-runtime.md) for setup, auth flow, model catalog behavior, and live smoke instructions.
|
|
198
207
|
|
|
199
208
|
## 🧭 CLI At A Glance
|
|
200
209
|
|
|
@@ -203,10 +212,10 @@ See [docs/codex-runtime.md](docs/codex-runtime.md) for complete setup, auth flow
|
|
|
203
212
|
- `agentrules analyze /path/to/project --rules-filename CLAUDE.md` – one-run override for output rules filename.
|
|
204
213
|
- `agentrules snapshot generate [path]` – create (or refresh) `SNAPSHOT.md` in the current directory by default.
|
|
205
214
|
- `agentrules snapshot sync [path]` – sync an existing snapshot as project files evolve (also creates if missing).
|
|
206
|
-
- `agentrules execplan new
|
|
215
|
+
- `agentrules execplan new "Title"` – create a new ExecPlan markdown file under `.agent/exec_plans/active/<slug>/`.
|
|
207
216
|
- `agentrules execplan complete EP-YYYYMMDD-NNN [--date YYYYMMDD]` – move a full ExecPlan directory under `.agent/exec_plans/complete/YYYY/MM/DD/EP-YYYYMMDD-NNN_<slug>/`.
|
|
208
217
|
- `agentrules execplan list [--path]` – list active ExecPlans with compact milestone progress (`completed/total`).
|
|
209
|
-
- `agentrules execplan milestone new EP-YYYYMMDD-NNN
|
|
218
|
+
- `agentrules execplan milestone new EP-YYYYMMDD-NNN "Title" [--ms N]` – create a milestone under a specific ExecPlan (auto sequence by default, or explicit `MS###` when provided).
|
|
210
219
|
- `agentrules execplan milestone list EP-YYYYMMDD-NNN [--active-only]` – list milestones for one ExecPlan.
|
|
211
220
|
- `agentrules execplan milestone complete EP-YYYYMMDD-NNN --ms <N>` – move an active milestone sequence into the `milestones/complete/` directory.
|
|
212
221
|
- `agentrules execplan milestone remaining EP-YYYYMMDD-NNN [--path]` – show active milestones left for one ExecPlan.
|
|
@@ -215,13 +224,14 @@ See [docs/codex-runtime.md](docs/codex-runtime.md) for complete setup, auth flow
|
|
|
215
224
|
- `agentrules configure --models` – assign presets per phase with guided prompts; the Phase 1 → Researcher entry lets you toggle the agent On/Off once a Tavily key is configured.
|
|
216
225
|
- `agentrules configure --outputs` – toggle `.cursorignore`, `.agent/` scaffold generation, `phases_output/`, and custom rules filename.
|
|
217
226
|
- `agentrules configure --logging` – set verbosity (`quiet`, `standard`, `verbose`) or export via `AGENTRULES_LOG_LEVEL`.
|
|
227
|
+
- `agentrules tree [path]` – preview the exclusion-aware project tree and optionally save it.
|
|
218
228
|
|
|
219
229
|
## 🧭 ExecPlan & Milestones
|
|
220
230
|
|
|
221
231
|
ExecPlans are long-horizon execution artifacts for work that is too large for a single prompt/session and too risky to run as ad hoc edits.
|
|
222
232
|
They give humans and agents a durable plan, explicit scope, and audit trail that can survive context switching across days or weeks.
|
|
223
233
|
|
|
224
|
-
This follows the same general planning pattern
|
|
234
|
+
This follows the same general planning pattern used for larger Codex work: start with an implementation plan, then execute it iteratively in smaller scoped chunks (see [OpenAI Codex docs](https://developers.openai.com/codex) and [How OpenAI uses Codex](https://openai.com/index/how-openai-uses-codex/)).
|
|
225
235
|
|
|
226
236
|
Think of the model in three layers:
|
|
227
237
|
|
|
@@ -288,6 +298,7 @@ agentrules execplan list
|
|
|
288
298
|
- **Config file**: `~/.config/agentrules/config.toml`
|
|
289
299
|
- `providers` – API keys per provider.
|
|
290
300
|
- `codex` – local runtime settings (`cli_path`, `home_strategy`, `managed_home`).
|
|
301
|
+
- `claude_code` – Claude Code SDK runtime settings, request limits, and environment sanitization preferences.
|
|
291
302
|
- `models` – preset IDs applied to each phase (`phase1`, `phase2`, `final`, `researcher`, …).
|
|
292
303
|
- `outputs` – `generate_cursorignore`, `generate_agent_scaffold`, `generate_phase_outputs`, `generate_snapshot`, `rules_filename`, `snapshot_filename`.
|
|
293
304
|
- `generate_snapshot` defaults to `true` and writes `SNAPSHOT.md` at project root after each analysis run (toggle anytime in `agentrules configure --outputs`).
|
|
@@ -301,6 +312,7 @@ agentrules execplan list
|
|
|
301
312
|
- `AGENTRULES_LOG_LEVEL` – overrides persisted verbosity.
|
|
302
313
|
- `AGENTRULES_RULES_FILENAME` – runtime override for generated rules filename (for example `CLAUDE.md`).
|
|
303
314
|
- `CODEX_HOME` – used when Codex `home_strategy = "inherit"`.
|
|
315
|
+
- `CLAUDE_CODE_OAUTH_TOKEN` – optional Claude Code automation token for environments that cannot use an interactive login.
|
|
304
316
|
- **Rules filename precedence**:
|
|
305
317
|
1. `agentrules analyze --rules-filename <name>`
|
|
306
318
|
2. `AGENTRULES_RULES_FILENAME`
|
|
@@ -318,24 +330,25 @@ Presets live in `config/agents.py` via the `MODEL_PRESETS` dictionary. Each pres
|
|
|
318
330
|
The app currently exposes presets across these providers:
|
|
319
331
|
|
|
320
332
|
- Anthropic
|
|
333
|
+
- Claude Code (local runtime)
|
|
321
334
|
- OpenAI
|
|
322
335
|
- Codex App Server (local runtime)
|
|
323
|
-
- Google
|
|
336
|
+
- Google Gemini
|
|
324
337
|
- DeepSeek
|
|
325
338
|
- xAI
|
|
326
339
|
|
|
327
340
|
Choose any available preset per phase through the CLI (`agentrules configure --models`) or by editing `config.toml` / `config/agents.py`. At runtime the values populate `MODEL_CONFIG`, which the pipeline consumes while resolving phase architects (`src/agentrules/core/agents/factory/factory.py`).
|
|
328
341
|
|
|
329
|
-
> **Preset tip:**
|
|
342
|
+
> **Preset tip:** Preset keys are compatibility IDs, not release markers. Static presets live in `config/agents.py`, while Codex runtime selections in the settings UI are discovered from the live app-server catalog.
|
|
330
343
|
|
|
331
344
|
## 🧠 Reasoning & Advanced Configuration
|
|
332
345
|
|
|
333
346
|
- **Reasoning modes:** Anthropic presets use fixed-budget or adaptive thinking depending on the Claude family, Gemini presets use provider-native thinking controls, OpenAI presets map to reasoning effort or temperature based on model family, and DeepSeek/xAI presets keep their provider-native reasoning behavior (`src/agentrules/core/types/models.py`).
|
|
334
|
-
- **
|
|
347
|
+
- **Runtime modes:** Codex presets route phases through `codex app-server`, with runtime-discovered model/effort variants available from the live model catalog. Claude Code presets route phases through the Claude Agent SDK while preserving Claude Code's runtime behavior.
|
|
335
348
|
- **Agent planning:** Phase 2 generates agent manifests that Phase 3 converts into live architects; when parsing fails the fallback extractor and default agents keep the pipeline running (`core/analysis/phase_2.py`, `core/analysis/phase_3.py`).
|
|
336
349
|
- **Provider-specific tools:** `create_researcher_config` enables Tavily-backed tool use for whichever preset you promote to the Researcher role, and the CLI’s Researcher row simply flips that on/off (`core/types/models.py`, `config/tools.py`).
|
|
337
350
|
- **Prompt customization:** Fine-tune behaviour by editing the phase prompts under `src/agentrules/config/prompts/`—heavy modifications should stay aligned with the YAML/XML formats expected by the parser utilities.
|
|
338
|
-
- **Token-aware runs:** Architects
|
|
351
|
+
- **Token-aware runs:** Architects emit token preflight logs using configured context limits/estimators, and Phase 3 uses limit-aware batching plus summarization when a model’s max input tokens are provided.
|
|
339
352
|
- **Direct overrides:** Advanced users can swap presets or tweak reasoning levels by modifying `MODEL_PRESETS`/`MODEL_PRESET_DEFAULTS` in `config/agents.py`; the configuration manager merges those with TOML overrides at runtime.
|
|
340
353
|
|
|
341
354
|
## 🔍 Tooling & Research Agents
|
|
@@ -368,14 +381,14 @@ Toggle outputs with `agentrules configure --outputs` or via the config TOML.
|
|
|
368
381
|
|
|
369
382
|
## 🛠 Development Workflow
|
|
370
383
|
|
|
371
|
-
- Install dev extras: `pip install -e .[dev]`
|
|
384
|
+
- Install dev extras: `pip install -e ".[dev]"`
|
|
372
385
|
- Format & lint: `ruff format . && ruff check .`
|
|
373
386
|
- Static typing: `pyright`
|
|
374
387
|
- Run targeted tests: `python tests/phase_3_test/run_test.py`
|
|
375
388
|
- Deterministic smoke runs (CI/local without API calls): `agentrules analyze --offline tests/tests_input`
|
|
376
|
-
- Full suite: `
|
|
389
|
+
- Full suite: `pytest`
|
|
377
390
|
- Releases are Release Please-driven: merges to `main` update/open a release PR, and merging that PR creates the `vX.Y.Z` tag + GitHub release automatically.
|
|
378
|
-
- GitHub Actions
|
|
391
|
+
- GitHub Actions publishes package artifacts with Trusted Publishing (OIDC) via `.github/workflows/publish-pypi.yml` (no long-lived PyPI API token).
|
|
379
392
|
- Run a safe preflight publish first from Actions with `workflow_dispatch` and `repository = testpypi`; publish to production PyPI on release-tag push or manual `repository = pypi`.
|
|
380
393
|
- Keep docs and presets in sync when adding providers (`config/agents.py`, `config/tools.py`, `core/agents/*`).
|
|
381
394
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 🤖 AgentRules Architect
|
|
1
|
+
# 🤖 AgentRules Architect
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
[](https://openai.com/)
|
|
8
8
|
[](https://github.com/openai/codex)
|
|
9
9
|
[](https://www.anthropic.com/)
|
|
10
|
+
[](docs/claude-code-runtime.md)
|
|
10
11
|
[](https://deepseek.com/)
|
|
11
12
|
[](https://ai.google.dev/)
|
|
12
13
|
[](https://x.ai/)
|
|
13
14
|
[](https://github.com/trevor-nichols)
|
|
14
15
|
|
|
15
|
-
**
|
|
16
|
+
**Multi-provider repository analysis, agent rules generation, and ExecPlan tooling.**
|
|
16
17
|
|
|
17
|
-
[Demo](#-cli-demo) • [Highlights](#-
|
|
18
|
+
[Demo](#-cli-demo) • [Highlights](#-highlights) • [Features](#-feature-overview) • [Requirements](#-requirements) • [Installation](#-installation) • [Local Runtimes](#-configure-local-runtimes-optional) • [CLI](#-cli-at-a-glance) • [Configuration](#-configuration--preferences) • [Architecture](#-project-architecture) • [Outputs](#-output-artifacts) • [Development](#-development-workflow)
|
|
18
19
|
|
|
19
20
|
</div>
|
|
20
21
|
|
|
@@ -24,17 +25,17 @@
|
|
|
24
25
|
|
|
25
26
|
## Why AgentRules Architect?
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
AgentRules Architect analyzes a repository, coordinates specialized model-backed architects, and writes durable rules artifacts such as `AGENTS.md` or a custom rules filename like `CLAUDE.md`. It is built around a six-phase pipeline, a Rich/Typer CLI, persistent TOML configuration, provider-specific request adapters, local runtime integrations, and optional planning artifacts for longer agent-led work.
|
|
28
29
|
|
|
29
|
-
## 🔥
|
|
30
|
+
## 🔥 Highlights
|
|
30
31
|
|
|
31
|
-
-
|
|
32
|
-
- 🧭 **
|
|
32
|
+
- 📦 **PyPI package** – ships with console-script and `python -m agentrules` entry points.
|
|
33
|
+
- 🧭 **Interactive CLI** – `agentrules` launches a guided main menu, while subcommands cover analysis, configuration, keys, snapshots, ExecPlans, scaffolds, and tree previews.
|
|
33
34
|
- 🗂️ **Persistent settings** – API keys, model presets, logging, and output preferences live in `~/.config/agentrules/config.toml` (override with `AGENTRULES_CONFIG_DIR`).
|
|
34
|
-
- 🧠 **
|
|
35
|
-
- 🧰 **
|
|
36
|
-
- 🔌 **Unified tool management** –
|
|
37
|
-
- ✅ **Test & quality backbone** –
|
|
35
|
+
- 🧠 **Broad provider matrix** – presets span Anthropic, Claude Code, OpenAI, Codex app-server, Google Gemini, DeepSeek, and xAI, with phase-by-phase model selection from the CLI or config file.
|
|
36
|
+
- 🧰 **Local runtime support** – route phases through Codex app-server or Claude Code without treating those runtimes as ordinary API-key providers.
|
|
37
|
+
- 🔌 **Unified tool management** – `ToolManager` adapts canonical JSON tool schemas for each provider; Tavily web search is available to researcher agents with one toggle.
|
|
38
|
+
- ✅ **Test & quality backbone** – unit/integration tests, offline stubs, Pyright, and Ruff provide confidence without hitting live APIs.
|
|
38
39
|
|
|
39
40
|
## ✨ Feature Overview
|
|
40
41
|
|
|
@@ -43,6 +44,7 @@ Version 3 rebrands the project from **CursorRules Architect** to **AgentRules Ar
|
|
|
43
44
|
- 🧩 Researcher tooling via Tavily search with provider-aware tool translation.
|
|
44
45
|
- 📊 Rich terminal UI (Rich) showing per-agent progress, duration, and failures in real time.
|
|
45
46
|
- 🪵 Configurable outputs: `AGENTS.md`, `SNAPSHOT.md` (enabled by default), `.cursorignore`, optional `.agent/` scaffold templates, and per-phase markdown/json snapshots.
|
|
47
|
+
- 🧭 ExecPlan and milestone commands for long-running work with deterministic IDs and registry validation.
|
|
46
48
|
- 🔧 Declarative model presets plus runtime overrides via CLI or TOML.
|
|
47
49
|
|
|
48
50
|
## 🧮 Analysis Pipeline
|
|
@@ -61,18 +63,18 @@ The pipeline captures metrics (elapsed time, agent counts) and hands them to the
|
|
|
61
63
|
## 🛠 Requirements
|
|
62
64
|
|
|
63
65
|
- Python **3.11.9+** (matches Pyright target and packaged metadata).
|
|
64
|
-
- API key(s) for at least one provider:
|
|
66
|
+
- API key(s), OAuth runtime auth, or both for at least one model provider:
|
|
65
67
|
- Anthropic
|
|
68
|
+
- Claude Code (local runtime via Claude OAuth / SDK)
|
|
66
69
|
- OpenAI
|
|
70
|
+
- Codex app-server (local runtime via ChatGPT auth)
|
|
67
71
|
- DeepSeek
|
|
68
|
-
- Google
|
|
72
|
+
- Google Gemini
|
|
69
73
|
- xAI
|
|
70
74
|
- Tavily (optional, enables live web search tooling)
|
|
71
|
-
- Optional local runtime provider:
|
|
72
|
-
- Codex CLI (`codex`) for `codex app-server` integration
|
|
73
75
|
- Current preset IDs live in `src/agentrules/config/agents.py`.
|
|
74
|
-
-
|
|
75
|
-
- Dev tooling
|
|
76
|
+
- Dependency declarations live in `pyproject.toml`.
|
|
77
|
+
- Dev tooling includes `pytest`, Ruff, and Pyright.
|
|
76
78
|
|
|
77
79
|
## 📦 Installation
|
|
78
80
|
|
|
@@ -123,7 +125,7 @@ pip install "git+https://github.com/trevor-nichols/agentrules-architect.git#egg=
|
|
|
123
125
|
Need to validate against TestPyPI specifically?
|
|
124
126
|
|
|
125
127
|
```bash
|
|
126
|
-
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple agentrules
|
|
128
|
+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple agentrules
|
|
127
129
|
```
|
|
128
130
|
|
|
129
131
|
## 🔐 Configure API Keys
|
|
@@ -143,9 +145,9 @@ agentrules configure
|
|
|
143
145
|
agentrules keys
|
|
144
146
|
```
|
|
145
147
|
|
|
146
|
-
## 🧰 Configure
|
|
148
|
+
## 🧰 Configure Local Runtimes (Optional)
|
|
147
149
|
|
|
148
|
-
AgentRules supports
|
|
150
|
+
AgentRules supports local runtime providers separately from API-key providers.
|
|
149
151
|
|
|
150
152
|
- Open `agentrules` -> `Settings` -> `Codex runtime`
|
|
151
153
|
- Configure:
|
|
@@ -153,10 +155,16 @@ AgentRules supports Codex as a local runtime provider via `codex app-server`, se
|
|
|
153
155
|
- `CODEX_HOME` strategy (`managed` or `inherit`)
|
|
154
156
|
- optional managed home override
|
|
155
157
|
- Use `Sign in with ChatGPT` to authenticate runtime-backed model access.
|
|
158
|
+
- Open `agentrules` -> `Settings` -> `Claude Code runtime`
|
|
159
|
+
- Configure:
|
|
160
|
+
- Claude Agent SDK runtime resolution
|
|
161
|
+
- optional explicit `claude` executable path
|
|
162
|
+
- API-key environment sanitization for Claude Code child processes
|
|
163
|
+
- Authenticate Claude Code outside AgentRules with Claude Code's OAuth flow.
|
|
156
164
|
|
|
157
|
-
After runtime setup, choose Codex presets under `Settings -> Model presets per phase`.
|
|
165
|
+
After runtime setup, choose Codex or Claude Code presets under `Settings -> Model presets per phase`.
|
|
158
166
|
|
|
159
|
-
See [docs/codex-runtime.md](docs/codex-runtime.md) for
|
|
167
|
+
See [docs/codex-runtime.md](docs/codex-runtime.md) and [docs/claude-code-runtime.md](docs/claude-code-runtime.md) for setup, auth flow, model catalog behavior, and live smoke instructions.
|
|
160
168
|
|
|
161
169
|
## 🧭 CLI At A Glance
|
|
162
170
|
|
|
@@ -165,10 +173,10 @@ See [docs/codex-runtime.md](docs/codex-runtime.md) for complete setup, auth flow
|
|
|
165
173
|
- `agentrules analyze /path/to/project --rules-filename CLAUDE.md` – one-run override for output rules filename.
|
|
166
174
|
- `agentrules snapshot generate [path]` – create (or refresh) `SNAPSHOT.md` in the current directory by default.
|
|
167
175
|
- `agentrules snapshot sync [path]` – sync an existing snapshot as project files evolve (also creates if missing).
|
|
168
|
-
- `agentrules execplan new
|
|
176
|
+
- `agentrules execplan new "Title"` – create a new ExecPlan markdown file under `.agent/exec_plans/active/<slug>/`.
|
|
169
177
|
- `agentrules execplan complete EP-YYYYMMDD-NNN [--date YYYYMMDD]` – move a full ExecPlan directory under `.agent/exec_plans/complete/YYYY/MM/DD/EP-YYYYMMDD-NNN_<slug>/`.
|
|
170
178
|
- `agentrules execplan list [--path]` – list active ExecPlans with compact milestone progress (`completed/total`).
|
|
171
|
-
- `agentrules execplan milestone new EP-YYYYMMDD-NNN
|
|
179
|
+
- `agentrules execplan milestone new EP-YYYYMMDD-NNN "Title" [--ms N]` – create a milestone under a specific ExecPlan (auto sequence by default, or explicit `MS###` when provided).
|
|
172
180
|
- `agentrules execplan milestone list EP-YYYYMMDD-NNN [--active-only]` – list milestones for one ExecPlan.
|
|
173
181
|
- `agentrules execplan milestone complete EP-YYYYMMDD-NNN --ms <N>` – move an active milestone sequence into the `milestones/complete/` directory.
|
|
174
182
|
- `agentrules execplan milestone remaining EP-YYYYMMDD-NNN [--path]` – show active milestones left for one ExecPlan.
|
|
@@ -177,13 +185,14 @@ See [docs/codex-runtime.md](docs/codex-runtime.md) for complete setup, auth flow
|
|
|
177
185
|
- `agentrules configure --models` – assign presets per phase with guided prompts; the Phase 1 → Researcher entry lets you toggle the agent On/Off once a Tavily key is configured.
|
|
178
186
|
- `agentrules configure --outputs` – toggle `.cursorignore`, `.agent/` scaffold generation, `phases_output/`, and custom rules filename.
|
|
179
187
|
- `agentrules configure --logging` – set verbosity (`quiet`, `standard`, `verbose`) or export via `AGENTRULES_LOG_LEVEL`.
|
|
188
|
+
- `agentrules tree [path]` – preview the exclusion-aware project tree and optionally save it.
|
|
180
189
|
|
|
181
190
|
## 🧭 ExecPlan & Milestones
|
|
182
191
|
|
|
183
192
|
ExecPlans are long-horizon execution artifacts for work that is too large for a single prompt/session and too risky to run as ad hoc edits.
|
|
184
193
|
They give humans and agents a durable plan, explicit scope, and audit trail that can survive context switching across days or weeks.
|
|
185
194
|
|
|
186
|
-
This follows the same general planning pattern
|
|
195
|
+
This follows the same general planning pattern used for larger Codex work: start with an implementation plan, then execute it iteratively in smaller scoped chunks (see [OpenAI Codex docs](https://developers.openai.com/codex) and [How OpenAI uses Codex](https://openai.com/index/how-openai-uses-codex/)).
|
|
187
196
|
|
|
188
197
|
Think of the model in three layers:
|
|
189
198
|
|
|
@@ -250,6 +259,7 @@ agentrules execplan list
|
|
|
250
259
|
- **Config file**: `~/.config/agentrules/config.toml`
|
|
251
260
|
- `providers` – API keys per provider.
|
|
252
261
|
- `codex` – local runtime settings (`cli_path`, `home_strategy`, `managed_home`).
|
|
262
|
+
- `claude_code` – Claude Code SDK runtime settings, request limits, and environment sanitization preferences.
|
|
253
263
|
- `models` – preset IDs applied to each phase (`phase1`, `phase2`, `final`, `researcher`, …).
|
|
254
264
|
- `outputs` – `generate_cursorignore`, `generate_agent_scaffold`, `generate_phase_outputs`, `generate_snapshot`, `rules_filename`, `snapshot_filename`.
|
|
255
265
|
- `generate_snapshot` defaults to `true` and writes `SNAPSHOT.md` at project root after each analysis run (toggle anytime in `agentrules configure --outputs`).
|
|
@@ -263,6 +273,7 @@ agentrules execplan list
|
|
|
263
273
|
- `AGENTRULES_LOG_LEVEL` – overrides persisted verbosity.
|
|
264
274
|
- `AGENTRULES_RULES_FILENAME` – runtime override for generated rules filename (for example `CLAUDE.md`).
|
|
265
275
|
- `CODEX_HOME` – used when Codex `home_strategy = "inherit"`.
|
|
276
|
+
- `CLAUDE_CODE_OAUTH_TOKEN` – optional Claude Code automation token for environments that cannot use an interactive login.
|
|
266
277
|
- **Rules filename precedence**:
|
|
267
278
|
1. `agentrules analyze --rules-filename <name>`
|
|
268
279
|
2. `AGENTRULES_RULES_FILENAME`
|
|
@@ -280,24 +291,25 @@ Presets live in `config/agents.py` via the `MODEL_PRESETS` dictionary. Each pres
|
|
|
280
291
|
The app currently exposes presets across these providers:
|
|
281
292
|
|
|
282
293
|
- Anthropic
|
|
294
|
+
- Claude Code (local runtime)
|
|
283
295
|
- OpenAI
|
|
284
296
|
- Codex App Server (local runtime)
|
|
285
|
-
- Google
|
|
297
|
+
- Google Gemini
|
|
286
298
|
- DeepSeek
|
|
287
299
|
- xAI
|
|
288
300
|
|
|
289
301
|
Choose any available preset per phase through the CLI (`agentrules configure --models`) or by editing `config.toml` / `config/agents.py`. At runtime the values populate `MODEL_CONFIG`, which the pipeline consumes while resolving phase architects (`src/agentrules/core/agents/factory/factory.py`).
|
|
290
302
|
|
|
291
|
-
> **Preset tip:**
|
|
303
|
+
> **Preset tip:** Preset keys are compatibility IDs, not release markers. Static presets live in `config/agents.py`, while Codex runtime selections in the settings UI are discovered from the live app-server catalog.
|
|
292
304
|
|
|
293
305
|
## 🧠 Reasoning & Advanced Configuration
|
|
294
306
|
|
|
295
307
|
- **Reasoning modes:** Anthropic presets use fixed-budget or adaptive thinking depending on the Claude family, Gemini presets use provider-native thinking controls, OpenAI presets map to reasoning effort or temperature based on model family, and DeepSeek/xAI presets keep their provider-native reasoning behavior (`src/agentrules/core/types/models.py`).
|
|
296
|
-
- **
|
|
308
|
+
- **Runtime modes:** Codex presets route phases through `codex app-server`, with runtime-discovered model/effort variants available from the live model catalog. Claude Code presets route phases through the Claude Agent SDK while preserving Claude Code's runtime behavior.
|
|
297
309
|
- **Agent planning:** Phase 2 generates agent manifests that Phase 3 converts into live architects; when parsing fails the fallback extractor and default agents keep the pipeline running (`core/analysis/phase_2.py`, `core/analysis/phase_3.py`).
|
|
298
310
|
- **Provider-specific tools:** `create_researcher_config` enables Tavily-backed tool use for whichever preset you promote to the Researcher role, and the CLI’s Researcher row simply flips that on/off (`core/types/models.py`, `config/tools.py`).
|
|
299
311
|
- **Prompt customization:** Fine-tune behaviour by editing the phase prompts under `src/agentrules/config/prompts/`—heavy modifications should stay aligned with the YAML/XML formats expected by the parser utilities.
|
|
300
|
-
- **Token-aware runs:** Architects
|
|
312
|
+
- **Token-aware runs:** Architects emit token preflight logs using configured context limits/estimators, and Phase 3 uses limit-aware batching plus summarization when a model’s max input tokens are provided.
|
|
301
313
|
- **Direct overrides:** Advanced users can swap presets or tweak reasoning levels by modifying `MODEL_PRESETS`/`MODEL_PRESET_DEFAULTS` in `config/agents.py`; the configuration manager merges those with TOML overrides at runtime.
|
|
302
314
|
|
|
303
315
|
## 🔍 Tooling & Research Agents
|
|
@@ -330,14 +342,14 @@ Toggle outputs with `agentrules configure --outputs` or via the config TOML.
|
|
|
330
342
|
|
|
331
343
|
## 🛠 Development Workflow
|
|
332
344
|
|
|
333
|
-
- Install dev extras: `pip install -e .[dev]`
|
|
345
|
+
- Install dev extras: `pip install -e ".[dev]"`
|
|
334
346
|
- Format & lint: `ruff format . && ruff check .`
|
|
335
347
|
- Static typing: `pyright`
|
|
336
348
|
- Run targeted tests: `python tests/phase_3_test/run_test.py`
|
|
337
349
|
- Deterministic smoke runs (CI/local without API calls): `agentrules analyze --offline tests/tests_input`
|
|
338
|
-
- Full suite: `
|
|
350
|
+
- Full suite: `pytest`
|
|
339
351
|
- Releases are Release Please-driven: merges to `main` update/open a release PR, and merging that PR creates the `vX.Y.Z` tag + GitHub release automatically.
|
|
340
|
-
- GitHub Actions
|
|
352
|
+
- GitHub Actions publishes package artifacts with Trusted Publishing (OIDC) via `.github/workflows/publish-pypi.yml` (no long-lived PyPI API token).
|
|
341
353
|
- Run a safe preflight publish first from Actions with `workflow_dispatch` and `repository = testpypi`; publish to production PyPI on release-tag push or manual `repository = pypi`.
|
|
342
354
|
- Keep docs and presets in sync when adding providers (`config/agents.py`, `config/tools.py`, `core/agents/*`).
|
|
343
355
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agentrules"
|
|
7
|
-
version = "4.
|
|
7
|
+
version = "4.2.0"
|
|
8
8
|
description = "AGENTS.md/CLAUDE.md generator and ExecPlan harness for coding agents"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{name = "trevor-nichols"}]
|
|
@@ -32,7 +32,8 @@ dependencies = [
|
|
|
32
32
|
"PyYAML>=6.0",
|
|
33
33
|
"tomli; python_version < '3.11'",
|
|
34
34
|
"tomli-w",
|
|
35
|
-
"tiktoken>=0.7.0"
|
|
35
|
+
"tiktoken>=0.7.0",
|
|
36
|
+
"claude-agent-sdk>=0.2.88",
|
|
36
37
|
]
|
|
37
38
|
|
|
38
39
|
[project.optional-dependencies]
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""Synchronous helpers for inspecting the local Claude Code runtime."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import subprocess
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
|
|
8
|
+
from agentrules.core.configuration import (
|
|
9
|
+
CLAUDE_CODE_API_KEY_ENV_VARS,
|
|
10
|
+
CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR,
|
|
11
|
+
ConfigManager,
|
|
12
|
+
get_config_manager,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@dataclass(frozen=True)
|
|
17
|
+
class ClaudeCodeRuntimeDiagnostics:
|
|
18
|
+
cli_path: str | None
|
|
19
|
+
executable_path: str | None
|
|
20
|
+
sdk_available: bool
|
|
21
|
+
auth_strategy: str
|
|
22
|
+
sanitize_api_key_env: bool
|
|
23
|
+
oauth_token_present: bool
|
|
24
|
+
api_key_env_present_after_sanitization: bool
|
|
25
|
+
version: str | None = None
|
|
26
|
+
runtime_error: str | None = None
|
|
27
|
+
version_error: str | None = None
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def is_available(self) -> bool:
|
|
31
|
+
return self.sdk_available and self.runtime_error is None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def get_claude_code_runtime_diagnostics(
|
|
35
|
+
*,
|
|
36
|
+
config_manager: ConfigManager | None = None,
|
|
37
|
+
timeout_seconds: float = 2.0,
|
|
38
|
+
) -> ClaudeCodeRuntimeDiagnostics:
|
|
39
|
+
manager = config_manager or get_config_manager()
|
|
40
|
+
runtime_config = manager.get_claude_code_config()
|
|
41
|
+
executable_path = manager.resolve_claude_code_executable()
|
|
42
|
+
sdk_available = manager.is_claude_agent_sdk_available()
|
|
43
|
+
child_env = manager.build_claude_code_environment()
|
|
44
|
+
|
|
45
|
+
version: str | None = None
|
|
46
|
+
version_error: str | None = None
|
|
47
|
+
runtime_error: str | None = None
|
|
48
|
+
|
|
49
|
+
if not sdk_available:
|
|
50
|
+
runtime_error = "Claude Agent SDK package could not be imported in the AgentRules environment."
|
|
51
|
+
elif executable_path is None:
|
|
52
|
+
if runtime_config.cli_path is None:
|
|
53
|
+
runtime_error = "Claude Code executable could not be resolved from the SDK default runtime settings."
|
|
54
|
+
else:
|
|
55
|
+
runtime_error = "Configured Claude Code executable could not be resolved from the current settings."
|
|
56
|
+
else:
|
|
57
|
+
try:
|
|
58
|
+
completed = subprocess.run(
|
|
59
|
+
[executable_path, "--version"],
|
|
60
|
+
check=False,
|
|
61
|
+
capture_output=True,
|
|
62
|
+
env=child_env,
|
|
63
|
+
text=True,
|
|
64
|
+
timeout=timeout_seconds,
|
|
65
|
+
)
|
|
66
|
+
if completed.returncode == 0:
|
|
67
|
+
version = (completed.stdout or completed.stderr).strip() or None
|
|
68
|
+
else:
|
|
69
|
+
version_error = (completed.stderr or completed.stdout).strip() or (
|
|
70
|
+
f"`claude --version` exited with status {completed.returncode}."
|
|
71
|
+
)
|
|
72
|
+
except Exception as exc:
|
|
73
|
+
version_error = str(exc)
|
|
74
|
+
|
|
75
|
+
return ClaudeCodeRuntimeDiagnostics(
|
|
76
|
+
cli_path=runtime_config.cli_path,
|
|
77
|
+
executable_path=executable_path,
|
|
78
|
+
sdk_available=sdk_available,
|
|
79
|
+
auth_strategy=runtime_config.auth_strategy,
|
|
80
|
+
sanitize_api_key_env=runtime_config.sanitize_api_key_env,
|
|
81
|
+
oauth_token_present=CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR in child_env,
|
|
82
|
+
api_key_env_present_after_sanitization=any(env_var in child_env for env_var in CLAUDE_CODE_API_KEY_ENV_VARS),
|
|
83
|
+
version=version,
|
|
84
|
+
runtime_error=runtime_error,
|
|
85
|
+
version_error=version_error,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
__all__ = ["ClaudeCodeRuntimeDiagnostics", "get_claude_code_runtime_diagnostics"]
|