agentrules 3.8.0__tar.gz → 4.0.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.
Files changed (220) hide show
  1. {agentrules-3.8.0/src/agentrules.egg-info → agentrules-4.0.0}/PKG-INFO +2 -2
  2. {agentrules-3.8.0 → agentrules-4.0.0}/README.md +1 -1
  3. {agentrules-3.8.0 → agentrules-4.0.0}/pyproject.toml +1 -1
  4. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/execplan.py +21 -66
  5. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/__init__.py +8 -0
  6. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/creator.py +94 -55
  7. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/locks.py +5 -2
  8. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/milestones.py +136 -56
  9. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/paths.py +10 -10
  10. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/registry.py +5 -5
  11. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/templates/MILESTONE_TEMPLATE.md +1 -1
  12. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/templates/PLANS.md +1 -1
  13. {agentrules-3.8.0 → agentrules-4.0.0/src/agentrules.egg-info}/PKG-INFO +2 -2
  14. {agentrules-3.8.0 → agentrules-4.0.0}/LICENSE +0 -0
  15. {agentrules-3.8.0 → agentrules-4.0.0}/setup.cfg +0 -0
  16. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/__init__.py +0 -0
  17. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/__main__.py +0 -0
  18. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/__init__.py +0 -0
  19. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/app.py +0 -0
  20. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/bootstrap.py +0 -0
  21. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/__init__.py +0 -0
  22. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/analyze.py +0 -0
  23. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/configure.py +0 -0
  24. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/execplan_registry.py +0 -0
  25. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/keys.py +0 -0
  26. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/scaffold.py +0 -0
  27. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/snapshot.py +0 -0
  28. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/commands/tree.py +0 -0
  29. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/context.py +0 -0
  30. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/services/__init__.py +0 -0
  31. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/services/codex_runtime.py +0 -0
  32. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/services/configuration.py +0 -0
  33. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/services/output_validation.py +0 -0
  34. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/services/pipeline_runner.py +0 -0
  35. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/services/tree_preview.py +0 -0
  36. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/__init__.py +0 -0
  37. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/analysis_view.py +0 -0
  38. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/event_sink.py +0 -0
  39. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/main_menu.py +0 -0
  40. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/__init__.py +0 -0
  41. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/codex.py +0 -0
  42. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/exclusions/__init__.py +0 -0
  43. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/exclusions/editor.py +0 -0
  44. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/exclusions/preview.py +0 -0
  45. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/exclusions/summary.py +0 -0
  46. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/logging.py +0 -0
  47. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/menu.py +0 -0
  48. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/models/__init__.py +0 -0
  49. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/models/researcher.py +0 -0
  50. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/models/utils.py +0 -0
  51. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/outputs.py +0 -0
  52. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/settings/providers.py +0 -0
  53. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/cli/ui/styles.py +0 -0
  54. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/__init__.py +0 -0
  55. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/agents.py +0 -0
  56. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/exclusions.py +0 -0
  57. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/prompts/__init__.py +0 -0
  58. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/prompts/final_analysis_prompt.py +0 -0
  59. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/prompts/phase_1_prompts.py +0 -0
  60. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/prompts/phase_2_prompts.py +0 -0
  61. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/prompts/phase_3_prompts.py +0 -0
  62. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/prompts/phase_4_prompts.py +0 -0
  63. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/prompts/phase_5_prompts.py +0 -0
  64. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/config/tools.py +0 -0
  65. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/__init__.py +0 -0
  66. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agent_tools/tool_manager.py +0 -0
  67. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agent_tools/web_search/__init__.py +0 -0
  68. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agent_tools/web_search/tavily.py +0 -0
  69. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/__init__.py +0 -0
  70. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/__init__.py +0 -0
  71. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/architect.py +0 -0
  72. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/capabilities.py +0 -0
  73. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/client.py +0 -0
  74. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/prompting.py +0 -0
  75. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/request_builder.py +0 -0
  76. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/response_parser.py +0 -0
  77. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/anthropic/tooling.py +0 -0
  78. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/base.py +0 -0
  79. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/__init__.py +0 -0
  80. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/architect.py +0 -0
  81. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/client.py +0 -0
  82. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/errors.py +0 -0
  83. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/models.py +0 -0
  84. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/process.py +0 -0
  85. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/protocol.py +0 -0
  86. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/request_builder.py +0 -0
  87. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/codex/response_parser.py +0 -0
  88. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/__init__.py +0 -0
  89. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/architect.py +0 -0
  90. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/client.py +0 -0
  91. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/compat.py +0 -0
  92. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/config.py +0 -0
  93. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/prompting.py +0 -0
  94. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/request_builder.py +0 -0
  95. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/response_parser.py +0 -0
  96. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/deepseek/tooling.py +0 -0
  97. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/factory/__init__.py +0 -0
  98. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/factory/factory.py +0 -0
  99. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/__init__.py +0 -0
  100. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/architect.py +0 -0
  101. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/capabilities.py +0 -0
  102. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/client.py +0 -0
  103. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/errors.py +0 -0
  104. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/legacy.py +0 -0
  105. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/prompting.py +0 -0
  106. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/response_parser.py +0 -0
  107. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/gemini/tooling.py +0 -0
  108. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/openai/__init__.py +0 -0
  109. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/openai/architect.py +0 -0
  110. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/openai/client.py +0 -0
  111. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/openai/compat.py +0 -0
  112. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/openai/config.py +0 -0
  113. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/openai/request_builder.py +0 -0
  114. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/openai/response_parser.py +0 -0
  115. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/__init__.py +0 -0
  116. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/architect.py +0 -0
  117. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/client.py +0 -0
  118. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/config.py +0 -0
  119. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/prompting.py +0 -0
  120. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/request_builder.py +0 -0
  121. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/response_parser.py +0 -0
  122. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/agents/xai/tooling.py +0 -0
  123. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/__init__.py +0 -0
  124. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/events.py +0 -0
  125. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/final_analysis.py +0 -0
  126. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/phase_1.py +0 -0
  127. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/phase_2.py +0 -0
  128. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/phase_3.py +0 -0
  129. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/phase_4.py +0 -0
  130. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/analysis/phase_5.py +0 -0
  131. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/__init__.py +0 -0
  132. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/constants.py +0 -0
  133. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/environment.py +0 -0
  134. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/manager.py +0 -0
  135. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/model_presets.py +0 -0
  136. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/models.py +0 -0
  137. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/repository.py +0 -0
  138. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/serde.py +0 -0
  139. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/__init__.py +0 -0
  140. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/codex.py +0 -0
  141. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/exclusions.py +0 -0
  142. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/features.py +0 -0
  143. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/logging.py +0 -0
  144. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/outputs.py +0 -0
  145. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/phase_models.py +0 -0
  146. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/services/providers.py +0 -0
  147. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/configuration/utils.py +0 -0
  148. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/identity.py +0 -0
  149. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/templates/EXECPLAN_TEMPLATE.md +0 -0
  150. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/execplan/templates/MILESTONE_FILE_TEMPLATE.md +0 -0
  151. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/logging/__init__.py +0 -0
  152. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/logging/config.py +0 -0
  153. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/pipeline/__init__.py +0 -0
  154. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/pipeline/config.py +0 -0
  155. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/pipeline/factory.py +0 -0
  156. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/pipeline/orchestrator.py +0 -0
  157. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/pipeline/output.py +0 -0
  158. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/pipeline/project_profile.py +0 -0
  159. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/pipeline/snapshot.py +0 -0
  160. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/streaming/__init__.py +0 -0
  161. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/streaming/types.py +0 -0
  162. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/types/__init__.py +0 -0
  163. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/types/agent_config.py +0 -0
  164. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/types/models.py +0 -0
  165. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/types/tool_config.py +0 -0
  166. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/async_stream.py +0 -0
  167. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/constants.py +0 -0
  168. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/__init__.py +0 -0
  169. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/constants.py +0 -0
  170. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/discovery.py +0 -0
  171. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/metadata.py +0 -0
  172. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/models.py +0 -0
  173. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/__init__.py +0 -0
  174. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/clojure.py +0 -0
  175. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/dart.py +0 -0
  176. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/dotnet.py +0 -0
  177. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/elixir.py +0 -0
  178. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/generic.py +0 -0
  179. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/go.py +0 -0
  180. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/helpers.py +0 -0
  181. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/java.py +0 -0
  182. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/javascript.py +0 -0
  183. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/php.py +0 -0
  184. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/python.py +0 -0
  185. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/ruby.py +0 -0
  186. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/swift.py +0 -0
  187. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/parsers/toml_based.py +0 -0
  188. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/registry.py +0 -0
  189. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/dependency_scanner/scan.py +0 -0
  190. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/agent_scaffold.py +0 -0
  191. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/atomic_write.py +0 -0
  192. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/cursorignore.py +0 -0
  193. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/phases_output.py +0 -0
  194. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/snapshot_artifact.py +0 -0
  195. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_creation/snapshot_policy.py +0 -0
  196. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_system/__init__.py +0 -0
  197. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_system/file_retriever.py +0 -0
  198. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_system/gitignore.py +0 -0
  199. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/file_system/tree_generator.py +0 -0
  200. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/formatters/__init__.py +0 -0
  201. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/formatters/clean_agentrules.py +0 -0
  202. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/model_config_helper.py +0 -0
  203. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/offline.py +0 -0
  204. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/parsers/__init__.py +0 -0
  205. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/parsers/agent_parser.py +0 -0
  206. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/provider_capabilities.py +0 -0
  207. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/release_metadata.py +0 -0
  208. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/structured_outputs.py +0 -0
  209. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/system_prompt.py +0 -0
  210. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/token_estimator.py +0 -0
  211. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules/core/utils/token_packer.py +0 -0
  212. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules.egg-info/SOURCES.txt +0 -0
  213. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules.egg-info/dependency_links.txt +0 -0
  214. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules.egg-info/entry_points.txt +0 -0
  215. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules.egg-info/requires.txt +0 -0
  216. {agentrules-3.8.0 → agentrules-4.0.0}/src/agentrules.egg-info/top_level.txt +0 -0
  217. {agentrules-3.8.0 → agentrules-4.0.0}/tests/test_cli_services.py +0 -0
  218. {agentrules-3.8.0 → agentrules-4.0.0}/tests/test_env.py +0 -0
  219. {agentrules-3.8.0 → agentrules-4.0.0}/tests/test_openai_responses.py +0 -0
  220. {agentrules-3.8.0 → agentrules-4.0.0}/tests/test_smoke_discovery.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentrules
3
- Version: 3.8.0
3
+ Version: 4.0.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
@@ -273,7 +273,7 @@ agentrules execplan milestone list EP-20260207-001 --active-only
273
273
  # Optional: compact "what's left" view for active milestones only
274
274
  agentrules execplan milestone remaining EP-20260207-001
275
275
 
276
- # 4) Archive a completed milestone
276
+ # 4) Complete a finished milestone
277
277
  agentrules execplan milestone complete EP-20260207-001 --ms 1
278
278
 
279
279
  # 5) Complete the ExecPlan directory
@@ -235,7 +235,7 @@ agentrules execplan milestone list EP-20260207-001 --active-only
235
235
  # Optional: compact "what's left" view for active milestones only
236
236
  agentrules execplan milestone remaining EP-20260207-001
237
237
 
238
- # 4) Archive a completed milestone
238
+ # 4) Complete a finished milestone
239
239
  agentrules execplan milestone complete EP-20260207-001 --ms 1
240
240
 
241
241
  # 5) Complete the ExecPlan directory
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentrules"
7
- version = "3.8.0"
7
+ version = "4.0.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"}]
@@ -3,17 +3,16 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from pathlib import Path
6
- from typing import Any, Literal
6
+ from typing import Any
7
7
 
8
8
  import typer
9
9
 
10
- from agentrules.core.execplan.creator import archive_execplan, create_execplan
10
+ from agentrules.core.execplan.creator import complete_execplan, create_execplan
11
11
  from agentrules.core.execplan.milestones import (
12
- archive_execplan_milestone,
12
+ complete_execplan_milestone,
13
13
  create_execplan_milestone,
14
14
  list_execplan_milestones,
15
15
  )
16
- from agentrules.core.execplan.paths import ARCHIVE_DIR, COMPLETE_DIR, EXECPLAN_ARCHIVE_DIR, EXECPLAN_COMPLETE_DIR
17
16
  from agentrules.core.execplan.registry import (
18
17
  DEFAULT_EXECPLANS_DIR,
19
18
  DEFAULT_REGISTRY_PATH,
@@ -46,7 +45,7 @@ DATE_OPTION = typer.Option(
46
45
  metavar="YYYYMMDD",
47
46
  help="Override date token used in ExecPlan ID generation.",
48
47
  )
49
- ARCHIVE_DATE_OPTION = typer.Option(
48
+ COMPLETION_DATE_OPTION = typer.Option(
50
49
  None,
51
50
  "--date",
52
51
  metavar="YYYYMMDD",
@@ -106,10 +105,10 @@ MILESTONE_MS_OPTION = typer.Option(
106
105
  max=999,
107
106
  help="Milestone sequence number (MS###) to complete.",
108
107
  )
109
- MILESTONE_INCLUDE_ARCHIVED_OPTION = typer.Option(
108
+ MILESTONE_INCLUDE_COMPLETED_OPTION = typer.Option(
110
109
  True,
111
- "--archived/--active-only",
112
- help="Include completed milestones in list output. Legacy option name retained for compatibility.",
110
+ "--completed/--active-only",
111
+ help="Include completed milestones in list output.",
113
112
  )
114
113
  PLAN_LIST_INCLUDE_PATH_OPTION = typer.Option(
115
114
  False,
@@ -241,13 +240,12 @@ def register(app: typer.Typer) -> None:
241
240
  console.print("[yellow]Registry was not updated.[/]")
242
241
  raise typer.Exit(1)
243
242
 
244
- def _complete_or_archive_execplan( # type: ignore[func-returns-value]
243
+ def _complete_execplan( # type: ignore[func-returns-value]
245
244
  *,
246
- destination_dir: Literal["complete", "archive"],
247
245
  execplan_id: str = EXECPLAN_ID_ARGUMENT,
248
246
  root: Path | None = ROOT_OPTION,
249
247
  execplans_dir: Path = EXECPLANS_DIR_OPTION,
250
- date: str | None = ARCHIVE_DATE_OPTION,
248
+ date: str | None = COMPLETION_DATE_OPTION,
251
249
  out: Path = OUT_OPTION,
252
250
  update_registry: bool = UPDATE_REGISTRY_OPTION,
253
251
  fail_on_registry_warn: bool = FAIL_ON_REGISTRY_WARN_OPTION,
@@ -261,12 +259,11 @@ def register(app: typer.Typer) -> None:
261
259
  resolved_registry = _resolve_path(resolved_root, out)
262
260
 
263
261
  try:
264
- result = archive_execplan(
262
+ result = complete_execplan(
265
263
  root=resolved_root,
266
264
  execplan_id=execplan_id.strip(),
267
265
  execplans_dir=resolved_execplans_dir,
268
- archive_date_yyyymmdd=date,
269
- destination_dir=destination_dir,
266
+ completion_date_yyyymmdd=date,
270
267
  update_registry=update_registry,
271
268
  registry_path=resolved_registry,
272
269
  include_registry_timestamp=registry_timestamp,
@@ -283,7 +280,7 @@ def register(app: typer.Typer) -> None:
283
280
 
284
281
  console.print(f"[green]Completed ExecPlan:[/] {result.plan_id}")
285
282
  console.print(f"[green]From:[/] {result.source_plan_root.as_posix()}")
286
- console.print(f"[green]To:[/] {result.archived_plan_root.as_posix()}")
283
+ console.print(f"[green]To:[/] {result.completed_plan_root.as_posix()}")
287
284
  active_count = _count_active_execplans(
288
285
  root=resolved_root,
289
286
  execplans_dir=resolved_execplans_dir,
@@ -331,37 +328,13 @@ def register(app: typer.Typer) -> None:
331
328
  execplan_id: str = EXECPLAN_ID_ARGUMENT,
332
329
  root: Path | None = ROOT_OPTION,
333
330
  execplans_dir: Path = EXECPLANS_DIR_OPTION,
334
- date: str | None = ARCHIVE_DATE_OPTION,
331
+ date: str | None = COMPLETION_DATE_OPTION,
335
332
  out: Path = OUT_OPTION,
336
333
  update_registry: bool = UPDATE_REGISTRY_OPTION,
337
334
  fail_on_registry_warn: bool = FAIL_ON_REGISTRY_WARN_OPTION,
338
335
  registry_timestamp: bool = REGISTRY_TIMESTAMP_OPTION,
339
336
  ) -> None:
340
- _complete_or_archive_execplan(
341
- destination_dir=EXECPLAN_COMPLETE_DIR,
342
- execplan_id=execplan_id,
343
- root=root,
344
- execplans_dir=execplans_dir,
345
- date=date,
346
- out=out,
347
- update_registry=update_registry,
348
- fail_on_registry_warn=fail_on_registry_warn,
349
- registry_timestamp=registry_timestamp,
350
- )
351
-
352
- @execplan_app.command("archive")
353
- def archive_existing_execplan( # type: ignore[func-returns-value]
354
- execplan_id: str = EXECPLAN_ID_ARGUMENT,
355
- root: Path | None = ROOT_OPTION,
356
- execplans_dir: Path = EXECPLANS_DIR_OPTION,
357
- date: str | None = ARCHIVE_DATE_OPTION,
358
- out: Path = OUT_OPTION,
359
- update_registry: bool = UPDATE_REGISTRY_OPTION,
360
- fail_on_registry_warn: bool = FAIL_ON_REGISTRY_WARN_OPTION,
361
- registry_timestamp: bool = REGISTRY_TIMESTAMP_OPTION,
362
- ) -> None:
363
- _complete_or_archive_execplan(
364
- destination_dir=EXECPLAN_ARCHIVE_DIR,
337
+ _complete_execplan(
365
338
  execplan_id=execplan_id,
366
339
  root=root,
367
340
  execplans_dir=execplans_dir,
@@ -482,7 +455,7 @@ def register(app: typer.Typer) -> None:
482
455
  execplan_id: str = EXECPLAN_ID_ARGUMENT,
483
456
  root: Path | None = ROOT_OPTION,
484
457
  execplans_dir: Path = EXECPLANS_DIR_OPTION,
485
- include_archived: bool = MILESTONE_INCLUDE_ARCHIVED_OPTION,
458
+ include_completed: bool = MILESTONE_INCLUDE_COMPLETED_OPTION,
486
459
  ) -> None:
487
460
  context = bootstrap_runtime()
488
461
  console = context.console
@@ -495,7 +468,7 @@ def register(app: typer.Typer) -> None:
495
468
  root=resolved_root,
496
469
  execplan_id=execplan_id.strip(),
497
470
  execplans_dir=resolved_execplans_dir,
498
- include_archived=include_archived,
471
+ include_completed=include_completed,
499
472
  )
500
473
  except (ValueError, FileNotFoundError) as error:
501
474
  raise typer.BadParameter(str(error)) from error
@@ -509,9 +482,8 @@ def register(app: typer.Typer) -> None:
509
482
  console.print(f"{status} {milestone.milestone_id} -> {milestone.path.as_posix()}")
510
483
  raise typer.Exit(0)
511
484
 
512
- def _complete_or_archive_milestone( # type: ignore[func-returns-value]
485
+ def _complete_milestone( # type: ignore[func-returns-value]
513
486
  *,
514
- destination_dir: Literal["complete", "archive"],
515
487
  execplan_id: str = EXECPLAN_ID_ARGUMENT,
516
488
  root: Path | None = ROOT_OPTION,
517
489
  execplans_dir: Path = EXECPLANS_DIR_OPTION,
@@ -524,12 +496,11 @@ def register(app: typer.Typer) -> None:
524
496
  resolved_execplans_dir = _resolve_path(resolved_root, execplans_dir)
525
497
 
526
498
  try:
527
- result = archive_execplan_milestone(
499
+ result = complete_execplan_milestone(
528
500
  root=resolved_root,
529
501
  execplan_id=execplan_id.strip(),
530
502
  sequence=ms,
531
503
  execplans_dir=resolved_execplans_dir,
532
- destination_dir=destination_dir,
533
504
  )
534
505
  except (ValueError, FileNotFoundError) as error:
535
506
  raise typer.BadParameter(str(error)) from error
@@ -542,7 +513,7 @@ def register(app: typer.Typer) -> None:
542
513
 
543
514
  console.print(f"[green]Completed milestone:[/] {result.milestone_id}")
544
515
  console.print(f"[green]From:[/] {result.source_path.as_posix()}")
545
- console.print(f"[green]To:[/] {result.archived_path.as_posix()}")
516
+ console.print(f"[green]To:[/] {result.completed_path.as_posix()}")
546
517
  raise typer.Exit(0)
547
518
 
548
519
  @milestone_app.command("complete")
@@ -552,23 +523,7 @@ def register(app: typer.Typer) -> None:
552
523
  execplans_dir: Path = EXECPLANS_DIR_OPTION,
553
524
  ms: int = MILESTONE_MS_OPTION,
554
525
  ) -> None:
555
- _complete_or_archive_milestone(
556
- destination_dir=COMPLETE_DIR,
557
- execplan_id=execplan_id,
558
- root=root,
559
- execplans_dir=execplans_dir,
560
- ms=ms,
561
- )
562
-
563
- @milestone_app.command("archive")
564
- def archive_milestone( # type: ignore[func-returns-value]
565
- execplan_id: str = EXECPLAN_ID_ARGUMENT,
566
- root: Path | None = ROOT_OPTION,
567
- execplans_dir: Path = EXECPLANS_DIR_OPTION,
568
- ms: int = MILESTONE_MS_OPTION,
569
- ) -> None:
570
- _complete_or_archive_milestone(
571
- destination_dir=ARCHIVE_DIR,
526
+ _complete_milestone(
572
527
  execplan_id=execplan_id,
573
528
  root=root,
574
529
  execplans_dir=execplans_dir,
@@ -594,7 +549,7 @@ def register(app: typer.Typer) -> None:
594
549
  root=resolved_root,
595
550
  execplan_id=normalized_execplan_id,
596
551
  execplans_dir=resolved_execplans_dir,
597
- include_archived=False,
552
+ include_completed=False,
598
553
  )
599
554
  except (ValueError, FileNotFoundError) as error:
600
555
  raise typer.BadParameter(str(error)) from error
@@ -2,15 +2,19 @@
2
2
 
3
3
  from agentrules.core.execplan.creator import (
4
4
  ExecPlanArchiveResult,
5
+ ExecPlanCompleteResult,
5
6
  ExecPlanCreateResult,
6
7
  archive_execplan,
8
+ complete_execplan,
7
9
  create_execplan,
8
10
  )
9
11
  from agentrules.core.execplan.milestones import (
10
12
  MilestoneArchiveResult,
13
+ MilestoneCompleteResult,
11
14
  MilestoneCreateResult,
12
15
  MilestoneRef,
13
16
  archive_execplan_milestone,
17
+ complete_execplan_milestone,
14
18
  create_execplan_milestone,
15
19
  list_execplan_milestones,
16
20
  parse_milestone_filename,
@@ -30,8 +34,10 @@ __all__ = [
30
34
  "DEFAULT_EXECPLANS_DIR",
31
35
  "DEFAULT_REGISTRY_PATH",
32
36
  "ExecPlanArchiveResult",
37
+ "ExecPlanCompleteResult",
33
38
  "ExecPlanCreateResult",
34
39
  "MilestoneArchiveResult",
40
+ "MilestoneCompleteResult",
35
41
  "MilestoneCreateResult",
36
42
  "MilestoneRef",
37
43
  "RegistryBuildResult",
@@ -41,6 +47,8 @@ __all__ = [
41
47
  "archive_execplan",
42
48
  "build_execplan_registry",
43
49
  "collect_execplan_registry",
50
+ "complete_execplan_milestone",
51
+ "complete_execplan",
44
52
  "create_execplan_milestone",
45
53
  "create_execplan",
46
54
  "list_execplan_milestones",
@@ -1,22 +1,23 @@
1
- """Create ExecPlan documents and optionally refresh the ExecPlan registry."""
1
+ """Create and complete ExecPlan documents, optionally refreshing the registry."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
5
  import os
6
6
  import re
7
7
  import tempfile
8
+ import warnings
8
9
  from dataclasses import dataclass
9
10
  from datetime import datetime
10
11
  from importlib import resources
11
12
  from pathlib import Path
12
13
  from string import Template
13
- from typing import Literal
14
+ from typing import Literal, TypeAlias
14
15
 
15
16
  import yaml
16
17
 
17
18
  from agentrules.core.execplan.identity import extract_execplan_id_from_filename, parse_execplan_filename
18
19
  from agentrules.core.execplan.locks import execplan_mutation_lock
19
- from agentrules.core.execplan.milestones import scan_active_milestones_for_archive
20
+ from agentrules.core.execplan.milestones import scan_active_milestones_for_completion
20
21
  from agentrules.core.execplan.paths import (
21
22
  EXECPLAN_ACTIVE_DIR,
22
23
  EXECPLAN_ARCHIVE_DIR,
@@ -43,8 +44,6 @@ RESERVED_EXECPLAN_ROOT_SLUGS = frozenset(
43
44
  {EXECPLAN_ACTIVE_DIR, EXECPLAN_COMPLETE_DIR, EXECPLAN_ARCHIVE_DIR}
44
45
  )
45
46
  RESERVED_ACTIVE_PLAN_SLUGS = frozenset({MILESTONES_DIR})
46
- _ARCHIVE_DESTINATION_DIRS = frozenset({EXECPLAN_COMPLETE_DIR, EXECPLAN_ARCHIVE_DIR})
47
-
48
47
  _TEMPLATE_PACKAGE = "agentrules.core.execplan"
49
48
  _TEMPLATE_NAME = "EXECPLAN_TEMPLATE.md"
50
49
 
@@ -58,14 +57,27 @@ class ExecPlanCreateResult:
58
57
 
59
58
 
60
59
  @dataclass(frozen=True, slots=True)
61
- class ExecPlanArchiveResult:
60
+ class ExecPlanCompleteResult:
62
61
  plan_id: str
63
62
  source_plan_path: Path
64
- archived_plan_path: Path
63
+ completed_plan_path: Path
65
64
  source_plan_root: Path
66
- archived_plan_root: Path
65
+ completed_plan_root: Path
67
66
  registry_result: RegistryBuildResult | None = None
68
67
 
68
+ @property
69
+ def archived_plan_path(self) -> Path:
70
+ """Deprecated compatibility alias for ``completed_plan_path``."""
71
+ return self.completed_plan_path
72
+
73
+ @property
74
+ def archived_plan_root(self) -> Path:
75
+ """Deprecated compatibility alias for ``completed_plan_root``."""
76
+ return self.completed_plan_root
77
+
78
+
79
+ ExecPlanArchiveResult: TypeAlias = ExecPlanCompleteResult
80
+
69
81
 
70
82
  def _today_yyyymmdd_local() -> str:
71
83
  return datetime.now().astimezone().strftime("%Y%m%d")
@@ -127,11 +139,10 @@ def _resolve_path(root: Path, value: Path) -> Path:
127
139
 
128
140
  def _normalize_archive_destination_dir(destination_dir: str) -> str:
129
141
  normalized = destination_dir.strip().lower()
130
- if normalized not in _ARCHIVE_DESTINATION_DIRS:
131
- allowed = ", ".join(sorted(_ARCHIVE_DESTINATION_DIRS))
142
+ if normalized != EXECPLAN_COMPLETE_DIR:
132
143
  raise ValueError(
133
- f"Unsupported archive destination directory {destination_dir!r}. "
134
- f"Expected one of: {allowed}."
144
+ f"Unsupported completion destination directory {destination_dir!r}. "
145
+ f"The legacy archive destination is deprecated; use {EXECPLAN_COMPLETE_DIR!r}."
135
146
  )
136
147
  return normalized
137
148
 
@@ -265,7 +276,7 @@ def _atomic_write_text(path: Path, text: str) -> None:
265
276
  os.remove(temporary_path)
266
277
 
267
278
 
268
- def _mark_execplan_archived(*, plan_path: Path, updated_yyyy_mm_dd: str) -> None:
279
+ def _mark_execplan_completed(*, plan_path: Path, updated_yyyy_mm_dd: str) -> None:
269
280
  content = plan_path.read_text(encoding="utf-8")
270
281
  match = FRONT_MATTER_RE.search(content)
271
282
  if match is None:
@@ -275,7 +286,7 @@ def _mark_execplan_archived(*, plan_path: Path, updated_yyyy_mm_dd: str) -> None
275
286
  if not isinstance(metadata, dict):
276
287
  raise ValueError(f"ExecPlan {plan_path.as_posix()} has invalid YAML front matter.")
277
288
 
278
- metadata["status"] = "archived"
289
+ metadata["status"] = "done"
279
290
  metadata["updated"] = updated_yyyy_mm_dd
280
291
  updated_front_matter = yaml.safe_dump(metadata, sort_keys=False).strip()
281
292
  updated_content = f"{content[:match.start(1)]}{updated_front_matter}{content[match.end(1):]}"
@@ -392,24 +403,21 @@ def create_execplan(
392
403
  )
393
404
 
394
405
 
395
- def archive_execplan(
406
+ def complete_execplan(
396
407
  *,
397
408
  root: Path,
398
409
  execplan_id: str,
399
410
  execplans_dir: Path = DEFAULT_EXECPLANS_DIR,
400
- archive_date_yyyymmdd: str | None = None,
401
- destination_dir: Literal["complete", "archive"] = EXECPLAN_COMPLETE_DIR,
411
+ completion_date_yyyymmdd: str | None = None,
402
412
  update_registry: bool = True,
403
413
  registry_path: Path = DEFAULT_REGISTRY_PATH,
404
414
  include_registry_timestamp: bool = False,
405
415
  fail_on_registry_warn: bool = False,
406
- ) -> ExecPlanArchiveResult:
416
+ ) -> ExecPlanCompleteResult:
407
417
  resolved_root = root.resolve()
408
418
  resolved_execplans_dir = _resolve_path(resolved_root, execplans_dir)
409
419
  resolved_registry_path = _resolve_path(resolved_root, registry_path)
410
420
 
411
- archive_destination_dir = _normalize_archive_destination_dir(destination_dir)
412
-
413
421
  with execplan_mutation_lock(execplans_dir=resolved_execplans_dir, execplan_id=execplan_id):
414
422
  source_plan_path = _resolve_execplan_by_id(execplans_dir=resolved_execplans_dir, execplan_id=execplan_id)
415
423
  if is_execplan_complete_path(source_plan_path, execplans_root=resolved_execplans_dir):
@@ -459,7 +467,7 @@ def archive_execplan(
459
467
  f"ExecPlan IDs. Plan root: {source_plan_root.as_posix()}. Files: {joined}"
460
468
  )
461
469
 
462
- active_milestone_scan = scan_active_milestones_for_archive(
470
+ active_milestone_scan = scan_active_milestones_for_completion(
463
471
  plan_root=source_plan_root,
464
472
  execplan_id=execplan_id,
465
473
  )
@@ -483,23 +491,23 @@ def archive_execplan(
483
491
  f"ExecPlan: {execplan_id}. Active milestones: {joined}"
484
492
  )
485
493
 
486
- day_token = archive_date_yyyymmdd or _today_yyyymmdd_local()
494
+ day_token = completion_date_yyyymmdd or _today_yyyymmdd_local()
487
495
  day_value = _validate_date_yyyymmdd(day_token)
488
- archive_parent = (
496
+ completion_parent = (
489
497
  resolved_execplans_dir
490
- / archive_destination_dir
498
+ / EXECPLAN_COMPLETE_DIR
491
499
  / day_value.strftime("%Y")
492
500
  / day_value.strftime("%m")
493
501
  / day_value.strftime("%d")
494
502
  )
495
503
 
496
- archive_leaf = f"{execplan_id}_{source_plan_root.name}"
497
- archived_plan_root = (archive_parent / archive_leaf).resolve()
498
- if archived_plan_root == source_plan_root or archived_plan_root.is_relative_to(source_plan_root):
504
+ completion_leaf = f"{execplan_id}_{source_plan_root.name}"
505
+ completed_plan_root = (completion_parent / completion_leaf).resolve()
506
+ if completed_plan_root == source_plan_root or completed_plan_root.is_relative_to(source_plan_root):
499
507
  raise ValueError(
500
508
  "Cannot complete ExecPlan safely because the destination resolves inside the source plan root. "
501
509
  "This usually indicates a legacy top-level slug that conflicts with the destination namespace "
502
- f"({archive_destination_dir!r}). Rename or migrate the "
510
+ f"({EXECPLAN_COMPLETE_DIR!r}). Rename or migrate the "
503
511
  "legacy plan directory first."
504
512
  )
505
513
  if legacy_active_root:
@@ -516,70 +524,70 @@ def archive_execplan(
516
524
  f"under {legacy_milestones_root.as_posix()}: {joined}"
517
525
  )
518
526
 
519
- archive_parent.mkdir(parents=True, exist_ok=True)
520
- if archived_plan_root.exists():
521
- raise FileExistsError(f"Archive destination already exists: {archived_plan_root.as_posix()}")
522
- archived_plan_root.mkdir(parents=False, exist_ok=False)
527
+ completion_parent.mkdir(parents=True, exist_ok=True)
528
+ if completed_plan_root.exists():
529
+ raise FileExistsError(f"Completion destination already exists: {completed_plan_root.as_posix()}")
530
+ completed_plan_root.mkdir(parents=False, exist_ok=False)
523
531
 
524
- archived_plan_path = (archived_plan_root / source_plan_path.name).resolve()
525
- archived_milestones_root = (archived_plan_root / MILESTONES_DIR).resolve()
532
+ completed_plan_path = (completed_plan_root / source_plan_path.name).resolve()
533
+ completed_milestones_root = (completed_plan_root / MILESTONES_DIR).resolve()
526
534
  moved_plan = False
527
535
  moved_milestones = False
528
536
  try:
529
- os.replace(source_plan_path, archived_plan_path)
537
+ os.replace(source_plan_path, completed_plan_path)
530
538
  moved_plan = True
531
539
  if legacy_milestones_root.exists():
532
- os.replace(legacy_milestones_root, archived_milestones_root)
540
+ os.replace(legacy_milestones_root, completed_milestones_root)
533
541
  moved_milestones = True
534
542
 
535
- _mark_execplan_archived(
536
- plan_path=archived_plan_path,
543
+ _mark_execplan_completed(
544
+ plan_path=completed_plan_path,
537
545
  updated_yyyy_mm_dd=day_value.strftime("%Y-%m-%d"),
538
546
  )
539
547
  except Exception as error:
540
548
  if moved_milestones:
541
549
  try:
542
- os.replace(archived_milestones_root, legacy_milestones_root)
550
+ os.replace(completed_milestones_root, legacy_milestones_root)
543
551
  except OSError as rollback_error:
544
552
  raise RuntimeError(
545
553
  "Legacy milestone subtree was moved but rollback did not succeed. "
546
- f"Moved path: {archived_milestones_root.as_posix()}, rollback error: {rollback_error}"
554
+ f"Moved path: {completed_milestones_root.as_posix()}, rollback error: {rollback_error}"
547
555
  ) from error
548
556
  if moved_plan:
549
557
  try:
550
- os.replace(archived_plan_path, source_plan_path)
558
+ os.replace(completed_plan_path, source_plan_path)
551
559
  except OSError as rollback_error:
552
560
  raise RuntimeError(
553
561
  "Legacy ExecPlan file was moved but rollback did not succeed. "
554
- f"Moved path: {archived_plan_path.as_posix()}, rollback error: {rollback_error}"
562
+ f"Moved path: {completed_plan_path.as_posix()}, rollback error: {rollback_error}"
555
563
  ) from error
556
564
  try:
557
- archived_plan_root.rmdir()
565
+ completed_plan_root.rmdir()
558
566
  except OSError:
559
567
  pass
560
568
  raise
561
569
  else:
562
- archive_parent.mkdir(parents=True, exist_ok=True)
563
- if archived_plan_root.exists():
564
- raise FileExistsError(f"Archive destination already exists: {archived_plan_root.as_posix()}")
570
+ completion_parent.mkdir(parents=True, exist_ok=True)
571
+ if completed_plan_root.exists():
572
+ raise FileExistsError(f"Completion destination already exists: {completed_plan_root.as_posix()}")
565
573
 
566
574
  moved = False
567
575
  try:
568
- os.replace(source_plan_root, archived_plan_root)
576
+ os.replace(source_plan_root, completed_plan_root)
569
577
  moved = True
570
- archived_plan_path = (archived_plan_root / source_plan_path.relative_to(source_plan_root)).resolve()
571
- _mark_execplan_archived(
572
- plan_path=archived_plan_path,
578
+ completed_plan_path = (completed_plan_root / source_plan_path.relative_to(source_plan_root)).resolve()
579
+ _mark_execplan_completed(
580
+ plan_path=completed_plan_path,
573
581
  updated_yyyy_mm_dd=day_value.strftime("%Y-%m-%d"),
574
582
  )
575
583
  except Exception as error:
576
584
  if moved:
577
585
  try:
578
- os.replace(archived_plan_root, source_plan_root)
586
+ os.replace(completed_plan_root, source_plan_root)
579
587
  except OSError as rollback_error:
580
588
  raise RuntimeError(
581
589
  "ExecPlan directory was moved but metadata update failed, and rollback did not succeed. "
582
- f"Moved path: {archived_plan_root.as_posix()}, rollback error: {rollback_error}"
590
+ f"Moved path: {completed_plan_root.as_posix()}, rollback error: {rollback_error}"
583
591
  ) from error
584
592
  raise
585
593
 
@@ -593,11 +601,42 @@ def archive_execplan(
593
601
  fail_on_warn=fail_on_registry_warn,
594
602
  )
595
603
 
596
- return ExecPlanArchiveResult(
604
+ return ExecPlanCompleteResult(
597
605
  plan_id=execplan_id,
598
606
  source_plan_path=source_plan_path,
599
- archived_plan_path=archived_plan_path,
607
+ completed_plan_path=completed_plan_path,
600
608
  source_plan_root=source_plan_root,
601
- archived_plan_root=archived_plan_root,
609
+ completed_plan_root=completed_plan_root,
602
610
  registry_result=registry_result,
603
611
  )
612
+
613
+
614
+ def archive_execplan(
615
+ *,
616
+ root: Path,
617
+ execplan_id: str,
618
+ execplans_dir: Path = DEFAULT_EXECPLANS_DIR,
619
+ archive_date_yyyymmdd: str | None = None,
620
+ destination_dir: Literal["complete", "archive"] = EXECPLAN_COMPLETE_DIR,
621
+ update_registry: bool = True,
622
+ registry_path: Path = DEFAULT_REGISTRY_PATH,
623
+ include_registry_timestamp: bool = False,
624
+ fail_on_registry_warn: bool = False,
625
+ ) -> ExecPlanCompleteResult:
626
+ warnings.warn(
627
+ "archive_execplan() is deprecated; use complete_execplan(). "
628
+ "New completions always write under the complete/ layout.",
629
+ DeprecationWarning,
630
+ stacklevel=2,
631
+ )
632
+ _normalize_archive_destination_dir(destination_dir)
633
+ return complete_execplan(
634
+ root=root,
635
+ execplan_id=execplan_id,
636
+ execplans_dir=execplans_dir,
637
+ completion_date_yyyymmdd=archive_date_yyyymmdd,
638
+ update_registry=update_registry,
639
+ registry_path=registry_path,
640
+ include_registry_timestamp=include_registry_timestamp,
641
+ fail_on_registry_warn=fail_on_registry_warn,
642
+ )
@@ -12,6 +12,7 @@ import re
12
12
  from collections.abc import Iterator
13
13
  from contextlib import contextmanager
14
14
  from pathlib import Path
15
+ from typing import Any, cast
15
16
 
16
17
  from agentrules.core.execplan.identity import extract_execplan_id_from_filename
17
18
  from agentrules.core.execplan.paths import is_execplan_milestone_path
@@ -43,7 +44,8 @@ def file_lock(lock_path: Path) -> Iterator[None]:
43
44
  fcntl.flock(handle.fileno(), fcntl.LOCK_EX)
44
45
  elif msvcrt is not None: # pragma: no cover - Windows-only branch
45
46
  handle.seek(0)
46
- msvcrt.locking(handle.fileno(), msvcrt.LK_LOCK, 1)
47
+ msvcrt_runtime = cast(Any, msvcrt)
48
+ msvcrt_runtime.locking(handle.fileno(), msvcrt_runtime.LK_LOCK, 1)
47
49
  else: # pragma: no cover - unsupported platform
48
50
  raise RuntimeError("No supported file locking implementation is available on this platform.")
49
51
 
@@ -54,7 +56,8 @@ def file_lock(lock_path: Path) -> Iterator[None]:
54
56
  fcntl.flock(handle.fileno(), fcntl.LOCK_UN)
55
57
  elif msvcrt is not None: # pragma: no cover - Windows-only branch
56
58
  handle.seek(0)
57
- msvcrt.locking(handle.fileno(), msvcrt.LK_UNLCK, 1)
59
+ msvcrt_runtime = cast(Any, msvcrt)
60
+ msvcrt_runtime.locking(handle.fileno(), msvcrt_runtime.LK_UNLCK, 1)
58
61
 
59
62
 
60
63
  def get_execplan_lock_path(*, execplans_dir: Path, execplan_id: str) -> Path: