ara-cli 0.1.9.95__tar.gz → 0.1.10.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.

Potentially problematic release.


This version of ara-cli might be problematic. Click here for more details.

Files changed (181) hide show
  1. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/PKG-INFO +2 -1
  2. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/__init__.py +5 -2
  3. ara_cli-0.1.10.0/ara_cli/__main__.py +129 -0
  4. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/ara_command_action.py +85 -20
  5. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/ara_command_parser.py +42 -2
  6. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/ara_config.py +118 -94
  7. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_autofix.py +131 -2
  8. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_creator.py +2 -7
  9. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_deleter.py +2 -4
  10. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_fuzzy_search.py +13 -6
  11. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/artefact_templates.py +3 -3
  12. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/feature_artefact_model.py +25 -0
  13. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_reader.py +4 -5
  14. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/chat.py +210 -150
  15. ara_cli-0.1.10.0/ara_cli/commands/extract_command.py +15 -0
  16. ara_cli-0.1.10.0/ara_cli/error_handler.py +134 -0
  17. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_classifier.py +3 -2
  18. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/prompt_extractor.py +1 -1
  19. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/prompt_handler.py +268 -127
  20. ara_cli-0.1.10.0/ara_cli/template_loader.py +245 -0
  21. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/version.py +1 -1
  22. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli.egg-info/PKG-INFO +2 -1
  23. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli.egg-info/SOURCES.txt +3 -0
  24. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli.egg-info/requires.txt +1 -0
  25. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/docker/base/requirements.txt +1 -0
  26. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_ara_command_action.py +66 -52
  27. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_artefact_autofix.py +361 -5
  28. ara_cli-0.1.10.0/tests/test_chat.py +2635 -0
  29. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_file_classifier.py +23 -0
  30. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_file_creator.py +3 -5
  31. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_prompt_handler.py +40 -4
  32. ara_cli-0.1.10.0/tests/test_template_loader.py +192 -0
  33. ara_cli-0.1.9.95/ara_cli/__main__.py +0 -81
  34. ara_cli-0.1.9.95/ara_cli/commands/extract_command.py +0 -22
  35. ara_cli-0.1.9.95/tests/test_chat.py +0 -1287
  36. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/MANIFEST.in +0 -0
  37. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/README.md +0 -0
  38. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_link_updater.py +0 -0
  39. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_lister.py +0 -0
  40. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/__init__.py +0 -0
  41. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/artefact_data_retrieval.py +0 -0
  42. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/artefact_load.py +0 -0
  43. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/artefact_mapping.py +0 -0
  44. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/artefact_model.py +0 -0
  45. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/businessgoal_artefact_model.py +0 -0
  46. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/capability_artefact_model.py +0 -0
  47. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/epic_artefact_model.py +0 -0
  48. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/example_artefact_model.py +0 -0
  49. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/issue_artefact_model.py +0 -0
  50. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/keyfeature_artefact_model.py +0 -0
  51. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/serialize_helper.py +0 -0
  52. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/task_artefact_model.py +0 -0
  53. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/userstory_artefact_model.py +0 -0
  54. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_models/vision_artefact_model.py +0 -0
  55. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_renamer.py +0 -0
  56. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/artefact_scan.py +0 -0
  57. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/classifier.py +0 -0
  58. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/codefusionretriever.py +0 -0
  59. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/codehierachieretriever.py +0 -0
  60. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/commandline_completer.py +0 -0
  61. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/commands/__init__.py +0 -0
  62. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/commands/command.py +0 -0
  63. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/commands/load_command.py +0 -0
  64. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/commands/load_image_command.py +0 -0
  65. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/commands/read_command.py +0 -0
  66. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/directory_navigator.py +0 -0
  67. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_lister.py +0 -0
  68. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/__init__.py +0 -0
  69. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/binary_file_loader.py +0 -0
  70. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/document_file_loader.py +0 -0
  71. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/document_reader.py +0 -0
  72. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/document_readers.py +0 -0
  73. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/file_loader.py +0 -0
  74. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/file_loaders.py +0 -0
  75. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/image_processor.py +0 -0
  76. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/markdown_reader.py +0 -0
  77. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/file_loaders/text_file_loader.py +0 -0
  78. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/filename_validator.py +0 -0
  79. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/global_file_lister.py +0 -0
  80. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/list_filter.py +0 -0
  81. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/output_suppressor.py +0 -0
  82. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/prompt_chat.py +0 -0
  83. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/prompt_rag.py +0 -0
  84. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/run_file_lister.py +0 -0
  85. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/tag_extractor.py +0 -0
  86. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/template_manager.py +0 -0
  87. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/agile.artefacts +0 -0
  88. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/blueprints/complete_pytest_unittest.blueprint.md +0 -0
  89. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/blueprints/empty.blueprint.md +0 -0
  90. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_C4_architecture_analysis.blueprint.md +0 -0
  91. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_implement_feature_BDD_way.blueprint.md +0 -0
  92. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/architecture_C4_analysis.commands.md +0 -0
  93. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/architecture_radon_cc_score.commands.md +0 -0
  94. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/architecture_radon_halstead_v.commands.md +0 -0
  95. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/architecture_radon_maintainability_score.commands.md +0 -0
  96. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/artefact_classification.commands.md +0 -0
  97. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/artefact_extension.commands.md +0 -0
  98. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/artefact_formulation.commands.md +0 -0
  99. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/behave_step_generation.commands.md +0 -0
  100. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/code_generation_complex.commands.md +0 -0
  101. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/code_generation_simple.commands.md +0 -0
  102. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/empty.commands.md +0 -0
  103. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/error_fixing.commands.md +0 -0
  104. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/feature_file_update.commands.md +0 -0
  105. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/feature_formulation.commands.md +0 -0
  106. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/js_code_generation_simple.commands.md +0 -0
  107. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/refactoring.commands.md +0 -0
  108. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/refactoring_analysis.commands.md +0 -0
  109. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/reverse_engineer_feature_file.commands.md +0 -0
  110. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/commands/reverse_engineer_program_flow.commands.md +0 -0
  111. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/classify_task.intention.md +0 -0
  112. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/empty.intention.md +0 -0
  113. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/error_fixing.intention.md +0 -0
  114. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/feature_fix_steps_for_scenario.intention.md +0 -0
  115. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/feature_formulation.intention.md +0 -0
  116. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/feature_reverse_formulation_from_code.intention.md +0 -0
  117. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation.intention.md +0 -0
  118. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation_update.intention.md +0 -0
  119. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/feature_scenario_outline_extension.intention.md +0 -0
  120. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/feature_update_formulation.intention.md +0 -0
  121. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/fibonacci_example_implementation.intention.md +0 -0
  122. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/js_implementation_from_task_description.intention.md +0 -0
  123. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/js_steps_implementation.intention.md +0 -0
  124. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/python_cli_implementation_with_test.intention.md +0 -0
  125. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/python_code_understanding.intention.md +0 -0
  126. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/task_implementation.intention.md +0 -0
  127. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/task_prompt_control_by_status.intention.md +0 -0
  128. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_number.intention.md +0 -0
  129. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_status.intention.md +0 -0
  130. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/architecture_analyst.rules.md +0 -0
  131. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/code_analyst.rules.md +0 -0
  132. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/empty.rules.md +0 -0
  133. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/error_analyst.rules.md +0 -0
  134. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/gherkin_expert.rules.md +0 -0
  135. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/js_expert_developer.rules.md +0 -0
  136. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/product_owner.rules.md +0 -0
  137. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/python_behave.rules.md +0 -0
  138. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/prompt-modules/rules/python_developer.rules.md +0 -0
  139. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.concept.exploration.md +0 -0
  140. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.concept.md +0 -0
  141. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.customer.exploration.md +0 -0
  142. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.customer.md +0 -0
  143. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.persona.exploration.md +0 -0
  144. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.persona.md +0 -0
  145. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.step.exploration.md +0 -0
  146. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.step.md +0 -0
  147. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.technology.exploration.md +0 -0
  148. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/specification_breakdown_files/template.technology.md +0 -0
  149. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.businessgoal.prompt_log.md +0 -0
  150. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.capability.prompt_log.md +0 -0
  151. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.epic.prompt_log.md +0 -0
  152. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.example.prompt_log.md +0 -0
  153. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.feature.prompt_log.md +0 -0
  154. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.issue.prompt_log.md +0 -0
  155. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.keyfeature.prompt_log.md +0 -0
  156. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.steps.prompt_log.md +0 -0
  157. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.task.prompt_log.md +0 -0
  158. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.userstory.prompt_log.md +0 -0
  159. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/templates/template.vision.prompt_log.md +0 -0
  160. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli/update_config_prompt.py +0 -0
  161. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli.egg-info/dependency_links.txt +0 -0
  162. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli.egg-info/entry_points.txt +0 -0
  163. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/ara_cli.egg-info/top_level.txt +0 -0
  164. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/setup.cfg +0 -0
  165. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/setup.py +0 -0
  166. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/__init__.py +0 -0
  167. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_ara_config.py +0 -0
  168. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_artefact_fuzzy_search.py +0 -0
  169. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_artefact_link_updater.py +0 -0
  170. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_artefact_lister.py +0 -0
  171. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_artefact_reader.py +0 -0
  172. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_artefact_renamer.py +0 -0
  173. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_artefact_scan.py +0 -0
  174. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_classifier.py +0 -0
  175. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_directory_navigator.py +0 -0
  176. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_file_lister.py +0 -0
  177. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_global_file_lister.py +0 -0
  178. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_list_filter.py +0 -0
  179. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_tag_extractor.py +0 -0
  180. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_template_manager.py +0 -0
  181. {ara_cli-0.1.9.95 → ara_cli-0.1.10.0}/tests/test_update_config_prompt.py +0 -0
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ara_cli
3
- Version: 0.1.9.95
3
+ Version: 0.1.10.0
4
4
  Summary: Powerful, open source command-line tool for managing, structuring and automating software development artifacts in line with Business-Driven Development (BDD) and AI-assisted processes
5
5
  Description-Content-Type: text/markdown
6
+ Requires-Dist: langfuse
6
7
  Requires-Dist: litellm
7
8
  Requires-Dist: llama-index
8
9
  Requires-Dist: llama-index-llms-openai
@@ -1,17 +1,20 @@
1
1
  import warnings
2
- from .version import __version__
2
+ from .error_handler import ErrorHandler
3
3
 
4
4
 
5
5
  whitelisted_commands = ["RERUN", "SEND", "EXTRACT", "LOAD_IMAGE", "CHOOSE_MODEL", "CHOOSE_EXTRACTION_MODEL", "CURRENT_MODEL", "CURRENT_EXTRACTION_MODEL", "LIST_MODELS"]
6
6
 
7
7
 
8
+ error_handler = ErrorHandler()
9
+
10
+
8
11
  # ANSI escape codes for coloring
9
12
  YELLOW = '\033[93m'
10
13
  RESET = '\033[0m'
11
14
 
12
15
 
13
16
  def format_warning(message, category, *args, **kwargs):
14
- return f'{YELLOW}{category.__name__}: {message}{RESET}\n'
17
+ return f'{YELLOW}[WARNING] {category.__name__}: {message}{RESET}\n'
15
18
 
16
19
 
17
20
  warnings.formatwarning = format_warning
@@ -0,0 +1,129 @@
1
+ # PYTHON_ARGCOMPLETE_OK
2
+ from ara_cli.ara_command_parser import action_parser
3
+ from ara_cli.error_handler import AraError
4
+ from ara_cli.version import __version__
5
+ from ara_cli.ara_command_action import (
6
+ create_action,
7
+ delete_action,
8
+ rename_action,
9
+ list_action,
10
+ list_tags_action,
11
+ prompt_action,
12
+ chat_action,
13
+ template_action,
14
+ fetch_templates_action,
15
+ read_action,
16
+ reconnect_action,
17
+ read_status_action,
18
+ read_user_action,
19
+ set_status_action,
20
+ set_user_action,
21
+ classifier_directory_action,
22
+ scan_action,
23
+ autofix_action,
24
+ extract_action,
25
+ load_action
26
+ )
27
+ from . import error_handler
28
+ import argcomplete
29
+ import sys
30
+ from os import getenv
31
+
32
+
33
+ def define_action_mapping():
34
+ return {
35
+ "create": create_action,
36
+ "delete": delete_action,
37
+ "rename": rename_action,
38
+ "list": list_action,
39
+ "list-tags": list_tags_action,
40
+ "prompt": prompt_action,
41
+ "chat": chat_action,
42
+ "template": template_action,
43
+ "fetch-templates": fetch_templates_action,
44
+ "read": read_action,
45
+ "reconnect": reconnect_action,
46
+ "read-status": read_status_action,
47
+ "read-user": read_user_action,
48
+ "set-status": set_status_action,
49
+ "set-user": set_user_action,
50
+ "classifier-directory": classifier_directory_action,
51
+ "scan": scan_action,
52
+ "autofix": autofix_action,
53
+ "extract": extract_action,
54
+ "load": load_action
55
+ }
56
+
57
+
58
+ def handle_invalid_action(args):
59
+ raise AraError("Invalid action provided. Type ara -h for help", error_code=1)
60
+
61
+
62
+ def is_debug_mode_enabled():
63
+ """Check if debug mode is enabled via environment variable."""
64
+ return getenv('ARA_DEBUG', '').lower() in ('1', 'true', 'yes')
65
+
66
+
67
+ def setup_parser():
68
+ """Create and configure the argument parser."""
69
+ parser = action_parser()
70
+
71
+ # Show examples when help is called
72
+ if any(arg in sys.argv for arg in ["-h", "--help"]):
73
+ parser.add_examples = True
74
+
75
+ parser.add_argument(
76
+ "-v", "--version", action="version", version=f"%(prog)s {__version__}"
77
+ )
78
+
79
+ parser.add_argument(
80
+ "--debug", action="store_true", help="Enable debug mode for detailed error output"
81
+ )
82
+
83
+ return parser
84
+
85
+
86
+ def configure_debug_mode(args, env_debug_mode):
87
+ """Configure debug mode based on arguments and environment."""
88
+ if (hasattr(args, 'debug') and args.debug) or env_debug_mode:
89
+ error_handler.debug_mode = True
90
+
91
+
92
+ def should_show_help(args):
93
+ """Check if help should be displayed."""
94
+ return not hasattr(args, "action") or not args.action
95
+
96
+
97
+ def execute_action(args, action_mapping):
98
+ """Execute the specified action."""
99
+ action = action_mapping.get(args.action, handle_invalid_action)
100
+ action(args)
101
+
102
+
103
+ def cli():
104
+ debug_mode = is_debug_mode_enabled()
105
+
106
+ try:
107
+ parser = setup_parser()
108
+ action_mapping = define_action_mapping()
109
+
110
+ argcomplete.autocomplete(parser)
111
+ args = parser.parse_args()
112
+
113
+ configure_debug_mode(args, debug_mode)
114
+
115
+ if should_show_help(args):
116
+ parser.print_help()
117
+ return
118
+
119
+ execute_action(args, action_mapping)
120
+
121
+ except KeyboardInterrupt:
122
+ print("\n[INFO] Operation cancelled by user", file=sys.stderr)
123
+ sys.exit(130) # Standard exit code for Ctrl+C
124
+ except Exception as e:
125
+ error_handler.handle_error(e, context="cli")
126
+
127
+
128
+ if __name__ == "__main__":
129
+ cli()
@@ -2,17 +2,19 @@ from os.path import join
2
2
  import os
3
3
  import sys
4
4
  import json
5
+ from ara_cli.error_handler import AraError
6
+ from ara_cli.error_handler import handle_errors, AraValidationError
5
7
  from ara_cli.output_suppressor import suppress_stdout
6
8
  from ara_cli.artefact_fuzzy_search import suggest_close_name_matches
7
- from . import whitelisted_commands
9
+ from . import whitelisted_commands, error_handler
8
10
 
9
11
 
10
12
  def check_validity(condition, error_message):
11
13
  if not condition:
12
- print(error_message)
13
- sys.exit(1)
14
+ raise AraValidationError(error_message)
14
15
 
15
16
 
17
+ @handle_errors(context="create action", error_handler=error_handler)
16
18
  def create_action(args):
17
19
  from ara_cli.artefact_creator import ArtefactCreator
18
20
  from ara_cli.classifier import Classifier
@@ -62,6 +64,7 @@ def create_action(args):
62
64
  artefact_creator.run(args.parameter, args.classifier, parent_classifier, parent_name, rule)
63
65
 
64
66
 
67
+ @handle_errors(context="delete action", error_handler=error_handler)
65
68
  def delete_action(args):
66
69
  from ara_cli.artefact_deleter import ArtefactDeleter
67
70
 
@@ -69,6 +72,7 @@ def delete_action(args):
69
72
  artefact_deleter.delete(args.parameter, args.classifier, args.force)
70
73
 
71
74
 
75
+ @handle_errors(context="rename action", error_handler=error_handler)
72
76
  def rename_action(args):
73
77
  from ara_cli.artefact_renamer import ArtefactRenamer
74
78
  from ara_cli.classifier import Classifier
@@ -82,6 +86,7 @@ def rename_action(args):
82
86
  artefact_renamer.rename(args.parameter, args.aspect, args.classifier)
83
87
 
84
88
 
89
+ @handle_errors(context="rename action", error_handler=error_handler)
85
90
  def list_action(args):
86
91
  from ara_cli.artefact_lister import ArtefactLister
87
92
  from ara_cli.list_filter import ListFilter
@@ -131,6 +136,7 @@ def list_action(args):
131
136
  artefact_lister.list_files(list_filter=list_filter)
132
137
 
133
138
 
139
+ @handle_errors(context="list-tags action", error_handler=error_handler)
134
140
  def list_tags_action(args):
135
141
  from ara_cli.tag_extractor import TagExtractor
136
142
  from ara_cli.list_filter import ListFilter
@@ -155,6 +161,7 @@ def list_tags_action(args):
155
161
  print(output)
156
162
 
157
163
 
164
+ @handle_errors(context="prompt action", error_handler=error_handler)
158
165
  def prompt_action(args):
159
166
  from ara_cli.classifier import Classifier
160
167
  from ara_cli.filename_validator import is_valid_filename
@@ -227,6 +234,7 @@ def prompt_action(args):
227
234
  raise ValueError(f"Unknown command '{init}' provided.")
228
235
 
229
236
 
237
+ @handle_errors(context="chat action", error_handler=error_handler)
230
238
  def chat_action(args):
231
239
  from ara_cli.chat import Chat
232
240
 
@@ -253,6 +261,60 @@ def chat_action(args):
253
261
  chat.start()
254
262
 
255
263
 
264
+ def _find_chat_file(chat_name: str) -> str | None:
265
+ """Resolves the chat file path based on common naming conventions."""
266
+ # Logic from setup_chat for finding existing files.
267
+ if os.path.exists(chat_name) and os.path.isfile(chat_name):
268
+ return chat_name
269
+
270
+ chat_name_md = f"{chat_name}.md"
271
+ if os.path.exists(chat_name_md) and os.path.isfile(chat_name_md):
272
+ return chat_name_md
273
+
274
+ chat_name_chat_md = f"{chat_name}_chat.md"
275
+ if os.path.exists(chat_name_chat_md) and os.path.isfile(chat_name_chat_md):
276
+ return chat_name_chat_md
277
+
278
+ return None
279
+
280
+
281
+ @handle_errors(context="load action", error_handler=error_handler)
282
+ def load_action(args):
283
+ from ara_cli.template_loader import TemplateLoader
284
+
285
+ chat_name = args.chat_name
286
+ template_type = args.template_type
287
+ template_name = args.template_name
288
+
289
+ chat_file_path = _find_chat_file(chat_name)
290
+
291
+ if not chat_file_path:
292
+ raise AraError(f"Chat file for '{chat_name}' not found.")
293
+
294
+ default_patterns = {
295
+ "rules": "*.rules.md",
296
+ "intention": "*.intention.md",
297
+ "commands": "*.commands.md"
298
+ }
299
+
300
+ default_pattern = default_patterns.get(template_type)
301
+
302
+ if not template_name and not default_pattern:
303
+ raise AraError(f"A template name is required for template type '{template_type}'.")
304
+
305
+ loader = TemplateLoader() # No chat instance for CLI context
306
+ success = loader.load_template(
307
+ template_name=template_name,
308
+ template_type=template_type,
309
+ chat_file_path=chat_file_path,
310
+ default_pattern=default_pattern
311
+ )
312
+
313
+ if not success:
314
+ sys.exit(1)
315
+
316
+
317
+ @handle_errors(context="template action", error_handler=error_handler)
256
318
  def template_action(args):
257
319
  from ara_cli.classifier import Classifier
258
320
  from ara_cli.template_manager import TemplatePathManager
@@ -265,6 +327,7 @@ def template_action(args):
265
327
  print(content)
266
328
 
267
329
 
330
+ @handle_errors(context="fetch-templates action", error_handler=error_handler)
268
331
  def fetch_templates_action(args):
269
332
  import shutil
270
333
  from ara_cli.ara_config import ConfigManager
@@ -294,6 +357,7 @@ def fetch_templates_action(args):
294
357
  os.makedirs(join(local_prompt_modules_dir, subdir), exist_ok=True)
295
358
 
296
359
 
360
+ @handle_errors(context="read action", error_handler=error_handler)
297
361
  def read_action(args):
298
362
  from ara_cli.commands.read_command import ReadCommand
299
363
  from ara_cli.list_filter import ListFilter
@@ -321,6 +385,7 @@ def read_action(args):
321
385
  command.execute()
322
386
 
323
387
 
388
+ @handle_errors(context="reconnect action", error_handler=error_handler)
324
389
  def reconnect_action(args):
325
390
  from ara_cli.artefact_models.artefact_load import artefact_from_content
326
391
  from ara_cli.artefact_models.artefact_model import Contribution
@@ -348,8 +413,7 @@ def reconnect_action(args):
348
413
  )
349
414
 
350
415
  if not artefact:
351
- print(read_error_message)
352
- return
416
+ raise AraError(read_error_message)
353
417
 
354
418
  parent = ArtefactReader.read_artefact(
355
419
  artefact_name=parent_name,
@@ -358,8 +422,7 @@ def reconnect_action(args):
358
422
  )
359
423
 
360
424
  if not parent:
361
- print(read_error_message)
362
- return
425
+ raise AraError(read_error_message)
363
426
 
364
427
  contribution = Contribution(
365
428
  artefact_name=parent.title,
@@ -367,13 +430,9 @@ def reconnect_action(args):
367
430
  )
368
431
 
369
432
  if rule:
370
- try:
371
- closest_rule = find_closest_rule(parent, rule)
372
- contribution.rule = closest_rule
373
- feedback_message += f" using rule '{closest_rule}'"
374
- except TypeError as e:
375
- print(f"{type(e).__name__}:", e)
376
- exit(1)
433
+ closest_rule = find_closest_rule(parent, rule)
434
+ contribution.rule = closest_rule
435
+ feedback_message += f" using rule '{closest_rule}'"
377
436
 
378
437
  artefact.contribution = contribution
379
438
  with open(artefact.file_path, 'w', encoding='utf-8') as file:
@@ -383,6 +442,7 @@ def reconnect_action(args):
383
442
  print(feedback_message + ".")
384
443
 
385
444
 
445
+ @handle_errors(context="read-status action", error_handler=error_handler)
386
446
  def read_status_action(args):
387
447
  from ara_cli.file_classifier import FileClassifier
388
448
  from ara_cli.artefact_models.artefact_load import artefact_from_content
@@ -396,7 +456,7 @@ def read_status_action(args):
396
456
 
397
457
  all_artefact_names = [artefact_info["title"] for artefact_info in artefact_info_dicts]
398
458
  if artefact_name not in all_artefact_names:
399
- suggest_close_name_matches(artefact_name, all_artefact_names)
459
+ suggest_close_name_matches(artefact_name, all_artefact_names, report_as_error=True)
400
460
  return
401
461
 
402
462
  artefact_info = next(filter(
@@ -415,6 +475,7 @@ def read_status_action(args):
415
475
  print(status)
416
476
 
417
477
 
478
+ @handle_errors(context="read-user action", error_handler=error_handler)
418
479
  def read_user_action(args):
419
480
  from ara_cli.artefact_models.artefact_load import artefact_from_content
420
481
  from ara_cli.file_classifier import FileClassifier
@@ -428,7 +489,7 @@ def read_user_action(args):
428
489
 
429
490
  all_artefact_names = [artefact_info["title"] for artefact_info in artefact_info_dicts]
430
491
  if artefact_name not in all_artefact_names:
431
- suggest_close_name_matches(artefact_name, all_artefact_names)
492
+ suggest_close_name_matches(artefact_name, all_artefact_names, report_as_error=True)
432
493
  return
433
494
 
434
495
  artefact_info = next(filter(
@@ -448,6 +509,7 @@ def read_user_action(args):
448
509
  print(f" - {tag}")
449
510
 
450
511
 
512
+ @handle_errors(context="set-status action", error_handler=error_handler)
451
513
  def set_status_action(args):
452
514
  from ara_cli.artefact_models.artefact_model import ALLOWED_STATUS_VALUES
453
515
  from ara_cli.artefact_models.artefact_load import artefact_from_content
@@ -490,6 +552,7 @@ def set_status_action(args):
490
552
  print(f"Status of task '{artefact_name}' has been updated to '{new_status}'.")
491
553
 
492
554
 
555
+ @handle_errors(context="set-user action", error_handler=error_handler)
493
556
  def set_user_action(args):
494
557
  from ara_cli.file_classifier import FileClassifier
495
558
  from ara_cli.artefact_models.artefact_load import artefact_from_content
@@ -528,6 +591,7 @@ def set_user_action(args):
528
591
  print(f"User of task '{artefact_name}' has been updated to '{new_user}'.")
529
592
 
530
593
 
594
+ @handle_errors(context="classifier-directory action", error_handler=error_handler)
531
595
  def classifier_directory_action(args):
532
596
  from ara_cli.classifier import Classifier
533
597
 
@@ -536,6 +600,7 @@ def classifier_directory_action(args):
536
600
  print(subdirectory)
537
601
 
538
602
 
603
+ @handle_errors(context="scan action", error_handler=error_handler)
539
604
  def scan_action(args):
540
605
  from ara_cli.file_classifier import FileClassifier
541
606
  from ara_cli.artefact_scan import find_invalid_files, show_results
@@ -550,6 +615,7 @@ def scan_action(args):
550
615
  show_results(invalid_artefacts)
551
616
 
552
617
 
618
+ @handle_errors(context="autofix_action", error_handler=error_handler)
553
619
  def autofix_action(args):
554
620
  from ara_cli.artefact_autofix import parse_report, apply_autofix, read_report_file
555
621
  from ara_cli.file_classifier import FileClassifier
@@ -589,18 +655,17 @@ def autofix_action(args):
589
655
  print("\nAutofix process completed. Please review the changes.")
590
656
 
591
657
 
658
+ @handle_errors(context="extract action", error_handler=error_handler)
592
659
  def extract_action(args):
593
660
  from ara_cli.commands.extract_command import ExtractCommand
594
661
 
595
662
  filename = args.filename
596
663
  force = args.force
597
664
  write = getattr(args, 'write', False)
598
- print(filename)
599
665
  command = ExtractCommand(
600
666
  file_name=filename,
601
667
  force=force,
602
668
  write=write,
603
- output=lambda msg: print(msg, file=sys.stdout),
604
- error_output=lambda msg: print(msg, file=sys.stderr)
669
+ output=lambda msg: print(msg, file=sys.stdout)
605
670
  )
606
- command.execute()
671
+ command.execute()
@@ -7,7 +7,8 @@ from ara_cli.commandline_completer import (
7
7
  StatusCompleter,
8
8
  )
9
9
  from ara_cli.template_manager import SpecificationBreakdownAspects
10
-
10
+ import os
11
+ import glob
11
12
 
12
13
  classifiers = Classifier.ordered_classifiers()
13
14
  aspects = SpecificationBreakdownAspects.VALID_ASPECTS
@@ -191,6 +192,44 @@ def list_tags_parser(subparsers):
191
192
  )
192
193
 
193
194
 
195
+ class TemplateNameCompleter:
196
+ """Provides command-line completion for template names."""
197
+ def __call__(self, prefix, parsed_args, **kwargs):
198
+ import os
199
+ from ara_cli.template_loader import TemplateLoader
200
+
201
+ if not hasattr(parsed_args, 'template_type'):
202
+ return []
203
+
204
+ template_type = parsed_args.template_type
205
+ context_path = os.getcwd()
206
+
207
+ loader = TemplateLoader()
208
+ templates = loader.get_available_templates(template_type, context_path)
209
+
210
+ return [t for t in templates if t.startswith(prefix)]
211
+
212
+
213
+ def load_parser(subparsers):
214
+ load_parser = subparsers.add_parser(
215
+ "load", help="Load a template into a chat file."
216
+ )
217
+ load_parser.add_argument(
218
+ "chat_name", help="Name of the chat file to load template into (without extension)."
219
+ )
220
+ load_parser.add_argument(
221
+ "template_type",
222
+ choices=['rules', 'intention', 'commands', 'blueprint'],
223
+ help="Type of template to load."
224
+ )
225
+ load_parser.add_argument(
226
+ "template_name",
227
+ nargs='?',
228
+ default="",
229
+ help="Name of the template to load. Supports wildcards and 'global/' prefix."
230
+ ).completer = TemplateNameCompleter()
231
+
232
+
194
233
  def add_chat_arguments(chat_parser):
195
234
  chat_parser.add_argument(
196
235
  "chat_name",
@@ -560,6 +599,7 @@ def action_parser():
560
599
  classifier_directory_parser(subparsers)
561
600
  scan_parser(subparsers)
562
601
  autofix_parser(subparsers)
602
+ load_parser(subparsers)
563
603
  extract_parser(subparsers)
564
604
 
565
- return parser
605
+ return parser