ara-cli 0.1.9.69__py3-none-any.whl → 0.1.10.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ara-cli might be problematic. Click here for more details.
- ara_cli/__init__.py +18 -2
- ara_cli/__main__.py +248 -62
- ara_cli/ara_command_action.py +155 -86
- ara_cli/ara_config.py +226 -80
- ara_cli/ara_subcommands/__init__.py +0 -0
- ara_cli/ara_subcommands/autofix.py +26 -0
- ara_cli/ara_subcommands/chat.py +27 -0
- ara_cli/ara_subcommands/classifier_directory.py +16 -0
- ara_cli/ara_subcommands/common.py +100 -0
- ara_cli/ara_subcommands/create.py +75 -0
- ara_cli/ara_subcommands/delete.py +22 -0
- ara_cli/ara_subcommands/extract.py +22 -0
- ara_cli/ara_subcommands/fetch_templates.py +14 -0
- ara_cli/ara_subcommands/list.py +65 -0
- ara_cli/ara_subcommands/list_tags.py +25 -0
- ara_cli/ara_subcommands/load.py +48 -0
- ara_cli/ara_subcommands/prompt.py +136 -0
- ara_cli/ara_subcommands/read.py +47 -0
- ara_cli/ara_subcommands/read_status.py +20 -0
- ara_cli/ara_subcommands/read_user.py +20 -0
- ara_cli/ara_subcommands/reconnect.py +27 -0
- ara_cli/ara_subcommands/rename.py +22 -0
- ara_cli/ara_subcommands/scan.py +14 -0
- ara_cli/ara_subcommands/set_status.py +22 -0
- ara_cli/ara_subcommands/set_user.py +22 -0
- ara_cli/ara_subcommands/template.py +16 -0
- ara_cli/artefact_autofix.py +649 -68
- ara_cli/artefact_creator.py +8 -11
- ara_cli/artefact_deleter.py +2 -4
- ara_cli/artefact_fuzzy_search.py +22 -10
- ara_cli/artefact_link_updater.py +4 -4
- ara_cli/artefact_lister.py +29 -55
- ara_cli/artefact_models/artefact_data_retrieval.py +23 -0
- ara_cli/artefact_models/artefact_load.py +11 -3
- ara_cli/artefact_models/artefact_model.py +146 -39
- ara_cli/artefact_models/artefact_templates.py +70 -44
- ara_cli/artefact_models/businessgoal_artefact_model.py +23 -25
- ara_cli/artefact_models/epic_artefact_model.py +34 -26
- ara_cli/artefact_models/feature_artefact_model.py +203 -64
- ara_cli/artefact_models/keyfeature_artefact_model.py +21 -24
- ara_cli/artefact_models/serialize_helper.py +1 -1
- ara_cli/artefact_models/task_artefact_model.py +83 -15
- ara_cli/artefact_models/userstory_artefact_model.py +37 -27
- ara_cli/artefact_models/vision_artefact_model.py +23 -42
- ara_cli/artefact_reader.py +92 -91
- ara_cli/artefact_renamer.py +8 -4
- ara_cli/artefact_scan.py +66 -3
- ara_cli/chat.py +622 -162
- ara_cli/chat_agent/__init__.py +0 -0
- ara_cli/chat_agent/agent_communicator.py +62 -0
- ara_cli/chat_agent/agent_process_manager.py +211 -0
- ara_cli/chat_agent/agent_status_manager.py +73 -0
- ara_cli/chat_agent/agent_workspace_manager.py +76 -0
- ara_cli/commands/__init__.py +0 -0
- ara_cli/commands/command.py +7 -0
- ara_cli/commands/extract_command.py +15 -0
- ara_cli/commands/load_command.py +65 -0
- ara_cli/commands/load_image_command.py +34 -0
- ara_cli/commands/read_command.py +117 -0
- ara_cli/completers.py +144 -0
- ara_cli/directory_navigator.py +37 -4
- ara_cli/error_handler.py +134 -0
- ara_cli/file_classifier.py +6 -5
- ara_cli/file_lister.py +1 -1
- ara_cli/file_loaders/__init__.py +0 -0
- ara_cli/file_loaders/binary_file_loader.py +33 -0
- ara_cli/file_loaders/document_file_loader.py +34 -0
- ara_cli/file_loaders/document_reader.py +245 -0
- ara_cli/file_loaders/document_readers.py +233 -0
- ara_cli/file_loaders/file_loader.py +50 -0
- ara_cli/file_loaders/file_loaders.py +123 -0
- ara_cli/file_loaders/image_processor.py +89 -0
- ara_cli/file_loaders/markdown_reader.py +75 -0
- ara_cli/file_loaders/text_file_loader.py +187 -0
- ara_cli/global_file_lister.py +51 -0
- ara_cli/list_filter.py +1 -1
- ara_cli/output_suppressor.py +1 -1
- ara_cli/prompt_extractor.py +215 -88
- ara_cli/prompt_handler.py +521 -134
- ara_cli/prompt_rag.py +2 -2
- ara_cli/tag_extractor.py +83 -38
- ara_cli/template_loader.py +245 -0
- ara_cli/template_manager.py +18 -13
- ara_cli/templates/prompt-modules/commands/empty.commands.md +2 -12
- ara_cli/templates/prompt-modules/commands/extract_general.commands.md +12 -0
- ara_cli/templates/prompt-modules/commands/extract_markdown.commands.md +11 -0
- ara_cli/templates/prompt-modules/commands/extract_python.commands.md +13 -0
- ara_cli/templates/prompt-modules/commands/feature_add_or_modifiy_specified_behavior.commands.md +36 -0
- ara_cli/templates/prompt-modules/commands/feature_generate_initial_specified_bevahior.commands.md +53 -0
- ara_cli/templates/prompt-modules/commands/prompt_template_tech_stack_transformer.commands.md +95 -0
- ara_cli/templates/prompt-modules/commands/python_bug_fixing_code.commands.md +34 -0
- ara_cli/templates/prompt-modules/commands/python_generate_code.commands.md +27 -0
- ara_cli/templates/prompt-modules/commands/python_refactoring_code.commands.md +39 -0
- ara_cli/templates/prompt-modules/commands/python_step_definitions_generation_and_fixing.commands.md +40 -0
- ara_cli/templates/prompt-modules/commands/python_unittest_generation_and_fixing.commands.md +48 -0
- ara_cli/update_config_prompt.py +9 -3
- ara_cli/version.py +1 -1
- ara_cli-0.1.10.8.dist-info/METADATA +241 -0
- ara_cli-0.1.10.8.dist-info/RECORD +193 -0
- tests/test_ara_command_action.py +73 -59
- tests/test_ara_config.py +341 -36
- tests/test_artefact_autofix.py +1060 -0
- tests/test_artefact_link_updater.py +3 -3
- tests/test_artefact_lister.py +52 -132
- tests/test_artefact_renamer.py +2 -2
- tests/test_artefact_scan.py +327 -33
- tests/test_chat.py +2063 -498
- tests/test_file_classifier.py +24 -1
- tests/test_file_creator.py +3 -5
- tests/test_file_lister.py +1 -1
- tests/test_global_file_lister.py +131 -0
- tests/test_list_filter.py +2 -2
- tests/test_prompt_handler.py +746 -0
- tests/test_tag_extractor.py +19 -13
- tests/test_template_loader.py +192 -0
- tests/test_template_manager.py +5 -4
- tests/test_update_config_prompt.py +2 -2
- ara_cli/ara_command_parser.py +0 -327
- ara_cli/templates/prompt-modules/blueprints/complete_pytest_unittest.blueprint.md +0 -27
- ara_cli/templates/prompt-modules/blueprints/task_todo_list_implement_feature_BDD_way.blueprint.md +0 -30
- ara_cli/templates/prompt-modules/commands/artefact_classification.commands.md +0 -9
- ara_cli/templates/prompt-modules/commands/artefact_extension.commands.md +0 -17
- ara_cli/templates/prompt-modules/commands/artefact_formulation.commands.md +0 -14
- ara_cli/templates/prompt-modules/commands/behave_step_generation.commands.md +0 -102
- ara_cli/templates/prompt-modules/commands/code_generation_complex.commands.md +0 -20
- ara_cli/templates/prompt-modules/commands/code_generation_simple.commands.md +0 -13
- ara_cli/templates/prompt-modules/commands/error_fixing.commands.md +0 -20
- ara_cli/templates/prompt-modules/commands/feature_file_update.commands.md +0 -18
- ara_cli/templates/prompt-modules/commands/feature_formulation.commands.md +0 -43
- ara_cli/templates/prompt-modules/commands/js_code_generation_simple.commands.md +0 -13
- ara_cli/templates/prompt-modules/commands/refactoring.commands.md +0 -15
- ara_cli/templates/prompt-modules/commands/refactoring_analysis.commands.md +0 -9
- ara_cli/templates/prompt-modules/commands/reverse_engineer_feature_file.commands.md +0 -15
- ara_cli/templates/prompt-modules/commands/reverse_engineer_program_flow.commands.md +0 -19
- ara_cli/templates/template.businessgoal +0 -10
- ara_cli/templates/template.capability +0 -10
- ara_cli/templates/template.epic +0 -15
- ara_cli/templates/template.example +0 -6
- ara_cli/templates/template.feature +0 -26
- ara_cli/templates/template.issue +0 -14
- ara_cli/templates/template.keyfeature +0 -15
- ara_cli/templates/template.task +0 -6
- ara_cli/templates/template.userstory +0 -17
- ara_cli/templates/template.vision +0 -14
- ara_cli-0.1.9.69.dist-info/METADATA +0 -16
- ara_cli-0.1.9.69.dist-info/RECORD +0 -158
- tests/test_ara_autofix.py +0 -219
- {ara_cli-0.1.9.69.dist-info → ara_cli-0.1.10.8.dist-info}/WHEEL +0 -0
- {ara_cli-0.1.9.69.dist-info → ara_cli-0.1.10.8.dist-info}/entry_points.txt +0 -0
- {ara_cli-0.1.9.69.dist-info → ara_cli-0.1.10.8.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Tech Stack Prompt Template Transformer
|
|
2
|
+
|
|
3
|
+
## PROMPT:
|
|
4
|
+
You are a prompt template transformation specialist. Your task is to transform Python-specific prompt templates into equivalent templates for a different technology stack while maintaining the same structure, intent, and quality standards.
|
|
5
|
+
|
|
6
|
+
### INPUT REQUIREMENTS:
|
|
7
|
+
1. **Target Technology Stack** (MANDATORY): The technology stack to transform to (e.g., 'C#', 'Java', 'React', 'TypeScript', 'Go', 'Rust', etc.)
|
|
8
|
+
2. **Source Prompt Templates** (MANDATORY): One or more Python prompt templates to transform
|
|
9
|
+
|
|
10
|
+
### TRANSFORMATION RULES:
|
|
11
|
+
1. **Preserve Structure and Intent**:
|
|
12
|
+
- Maintain the same logical flow and purpose of each prompt template
|
|
13
|
+
- Keep all sections and their hierarchical organization
|
|
14
|
+
- Preserve the extract/filename format for code generation
|
|
15
|
+
|
|
16
|
+
2. **Technology-Specific Adaptations**:
|
|
17
|
+
- Replace Python-specific references with target technology equivalents
|
|
18
|
+
- Update file extensions (.py → appropriate extension for target stack)
|
|
19
|
+
- Adapt coding standards (PEP8 → target language conventions)
|
|
20
|
+
- Replace Python packages with target language equivalents
|
|
21
|
+
- Update testing frameworks (pytest/behave → target language testing tools)
|
|
22
|
+
- Adapt documentation styles (numpy docstrings → target language documentation)
|
|
23
|
+
- Update logging approaches to target language standards
|
|
24
|
+
- Adjust line/method/class length limits based on target language best practices. Prefer lower length limits.
|
|
25
|
+
|
|
26
|
+
3. **Naming Convention**:
|
|
27
|
+
- Prefix each transformed template filename with the target technology
|
|
28
|
+
- Example: `python_bug_fixing_code.commands.md` → `csharp_bug_fixing_code.commands.md`
|
|
29
|
+
|
|
30
|
+
4. **Output Format**:
|
|
31
|
+
- Return each transformed template as a complete, copy-pastable markdown file in 5-backticks
|
|
32
|
+
- The first character of the first line inside your code block must be '#' and the first character of the second line inside your code block must be '#'
|
|
33
|
+
- Use this format for each transformed template:
|
|
34
|
+
|
|
35
|
+
`````markdown
|
|
36
|
+
# [ ] extract
|
|
37
|
+
# filename: ara/.araconfig/custom-prompt-modules/commands/{technology}_{original_template_name}
|
|
38
|
+
{transformed template content}
|
|
39
|
+
`````
|
|
40
|
+
|
|
41
|
+
5. Markdown code block handling in prompt templates
|
|
42
|
+
The first and the second line of the Markdown code blocks used in the prompt templates serve as extraction control commands. the '#' tags in the first and second line of the code blocks must not be replaced by any other symbols, independent of the technology for which the markdown code block response is defined
|
|
43
|
+
|
|
44
|
+
6. **Technology Mapping Guidelines**:
|
|
45
|
+
**For C#/.NET:**
|
|
46
|
+
- PEP8 → C# Coding Conventions (Microsoft guidelines)
|
|
47
|
+
- pytest → NUnit/xUnit/MSTest
|
|
48
|
+
- behave → SpecFlow
|
|
49
|
+
- unittest.mock → Moq/NSubstitute
|
|
50
|
+
- numpy docstrings → XML documentation comments
|
|
51
|
+
- logging package → ILogger/Serilog/NLog
|
|
52
|
+
|
|
53
|
+
**For Java:**
|
|
54
|
+
- PEP8 → Java Code Conventions (Oracle/Google style)
|
|
55
|
+
- pytest → JUnit/TestNG
|
|
56
|
+
- behave → Cucumber-JVM
|
|
57
|
+
- unittest.mock → Mockito/EasyMock
|
|
58
|
+
- numpy docstrings → Javadoc
|
|
59
|
+
- logging package → SLF4J/Log4j
|
|
60
|
+
|
|
61
|
+
**For JavaScript/TypeScript:**
|
|
62
|
+
- PEP8 → ESLint/Prettier standards
|
|
63
|
+
- pytest → Jest/Mocha/Vitest
|
|
64
|
+
- behave → Cucumber.js, Selenium
|
|
65
|
+
- unittest.mock → Jest mocks/Sinon
|
|
66
|
+
- numpy docstrings → JSDoc/TSDoc
|
|
67
|
+
- logging package → Winston/Bunyan/Pino
|
|
68
|
+
|
|
69
|
+
**For React:**
|
|
70
|
+
- Include React-specific patterns (components, hooks, state management)
|
|
71
|
+
- pytest → Jest/React Testing Library
|
|
72
|
+
- behave → Selenium
|
|
73
|
+
- Add component testing guidelines
|
|
74
|
+
- Include JSX/TSX specific rules
|
|
75
|
+
|
|
76
|
+
7. **Preserve Key Constraints**:
|
|
77
|
+
- Maintain separation of concerns and single responsibility principles
|
|
78
|
+
- Keep modular/extensible design requirements
|
|
79
|
+
- Preserve testability requirements
|
|
80
|
+
- Maintain observability/logging requirements
|
|
81
|
+
|
|
82
|
+
### VALIDATION:
|
|
83
|
+
- Ensure all Python-specific references are properly transformed
|
|
84
|
+
- Verify file paths and extensions match target technology conventions
|
|
85
|
+
- Confirm testing and mocking frameworks are appropriate for target stack
|
|
86
|
+
- Check that documentation styles match target language standards
|
|
87
|
+
|
|
88
|
+
### OUTPUT SPECIFICATION:
|
|
89
|
+
- Replace '# [ ] extract' with '# [x] extract' in all output blocks
|
|
90
|
+
- Ensure each template is complete and ready for extraction
|
|
91
|
+
- Include a summary of key transformations made for each template
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
**Begin transformation after receiving target technology stack and source templates.**
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
### COMMANDS FOR FIXING BUGS
|
|
2
|
+
|
|
3
|
+
Your job is now to fix the described error:
|
|
4
|
+
|
|
5
|
+
* Silently analyze the given error description or error log files
|
|
6
|
+
* Silently review the provided source files and if given the provided feature file (specified behavior) to understand the current faulty implementation and draft silently a potential solution to fix the error
|
|
7
|
+
* Develop implementation strategies that minimize code changes, prefer reusing existing methods over new implementations. Also always prefer to use existing python packages over your own implementation.
|
|
8
|
+
|
|
9
|
+
When you touch code or need to generate code for bug fixing:
|
|
10
|
+
* The max function or method length should not exceed 40 lines.
|
|
11
|
+
* The max class length should not exceed 150 lines.
|
|
12
|
+
* The max file length should not exceed 150 lines.
|
|
13
|
+
* Split implementation files or functions/methods/classes in case they exceed their defined length maximum.
|
|
14
|
+
* Apply as coding and design principle the separation of concerns and single responsibility principle in general and specifically when you need to split.
|
|
15
|
+
|
|
16
|
+
* Important: you are NOT allowed to do any further refactorings not related to the bug fixing implementation. Refactoring for enhancing the code quality is not allowed.
|
|
17
|
+
* The fixed code must fully implement the specified behavior in an easy testable and modular/extensible way.
|
|
18
|
+
* Follow PEP8 coding guidelines.
|
|
19
|
+
* Use descriptive numpy style docstrings for inline method and class documentation.
|
|
20
|
+
* Use the python logger logging package to implement logging for all application modules that enables a fine granular full observability of the program flow by the log file. Use ./logs/<module_name>.log as filepath for logging.
|
|
21
|
+
|
|
22
|
+
* Only return full copy pastable file content.
|
|
23
|
+
* Use for every single generated code block this markdown code block format:
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
# [ ] extract
|
|
27
|
+
# filename: src/{filename}.py
|
|
28
|
+
{python code}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
* The extract and filename statements are only allowed once per code block
|
|
32
|
+
* The first character of the first line inside your code block must be '#' and the first character of the second line inside your code block must be '#'
|
|
33
|
+
* replace the '# [ ] extract' statement of the template with '# [x] extract' in your response
|
|
34
|
+
* in case of files get deprecated give me a list of files that can be safely deleted
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
### COMMANDS FOR IMPLEMENTING ONE OR A SET OF NEW OR CHANGED FEATURE FILES
|
|
2
|
+
|
|
3
|
+
Your job is now:
|
|
4
|
+
* Silently analyze the given feature files and the specified behavior.
|
|
5
|
+
* Develop implementation strategies that minimize code changes with respect to any given code and test files, prefer reusing existing methods over new implementations.
|
|
6
|
+
* The max function length should not exceed 25 lines. The max file length should not exceed 120 lines.
|
|
7
|
+
* Always prefer to use existing python packages over your own implementation.
|
|
8
|
+
* In case additional implementation instructions are given as:
|
|
9
|
+
* Specified in files with extensions "*.technology.md" follow strictly the specified mandatory python packages and tech stack
|
|
10
|
+
* Explicitly specified as example reference implementation: use this reference information as starting point for your own implementation
|
|
11
|
+
* Fully implement the specified behavior in an easy testable and modular/extensible way, fully implement unit tests for your production code (try to achieve at least 90% code coverage) and implement for all given feature files the corresponding step definitions. Follow PEP8 coding guidelines, use numpy style docstrings for inline function documentation, apply as coding and design principle the separation of concerns and single responsibility principle.
|
|
12
|
+
* Generated or reworked python methods must not exceed 25 lines of code. In case methods exceed this length they need to be split according to the single responsibility principle and separation of concerns.
|
|
13
|
+
* Generated or reworked python files must not exceed 120 lines of code. In case files exceed this length they need to be split according to the single responsibility principle and separation of concerns.
|
|
14
|
+
* Use the python logger logging package to implement logging for all application modules that enable a full observability of the program flow over the log file. Use ./logs/<module_name>.log as filepath for logging.
|
|
15
|
+
|
|
16
|
+
* Only return full copy pastable file content for production code, unit test files and step definition files. Use for every single generated code block this markdown code block format:
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
# [ ] extract
|
|
20
|
+
# filename: src/{filename}.py
|
|
21
|
+
{python code}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
* The extract and filename statements are only allowed once per markdown code block
|
|
25
|
+
* The first character of the first line inside your code block must be '#' and the first character of the second line inside your code block must be '#'
|
|
26
|
+
* replace the '# [ ] extract' statement of the template with '# [x] extract' in your response
|
|
27
|
+
* in case of files get deprecated give me a list of files that can be safely deleted
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
### COMMANDS FOR REFACTORING
|
|
2
|
+
|
|
3
|
+
Your job is now to refactor the code for enhancing the code quality and the design of the code according to the following guidelines:
|
|
4
|
+
* Refactoring = Changing the internal structure of code
|
|
5
|
+
* Without changing its external behavior
|
|
6
|
+
* Goal = Improve readability, maintainability, and design
|
|
7
|
+
-> "Refactoring is a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior."
|
|
8
|
+
-> "Refactoring changes how code is written, not what it does."
|
|
9
|
+
|
|
10
|
+
Now do:
|
|
11
|
+
* Silently analyze the given code base
|
|
12
|
+
* Silently analyze the given feature file (specified behavior) to fully understand the flow and logic of the current implementation. Remember: you are not allowed to change specified behavior.
|
|
13
|
+
|
|
14
|
+
When you refactor the code remember:
|
|
15
|
+
* The max function or method length should not exceed 40 lines.
|
|
16
|
+
* The max class length should not exceed 150 lines.
|
|
17
|
+
* The max file length should not exceed 150 lines.
|
|
18
|
+
* Split implementation files or functions/methods/classes in case they exceed their defined length maximum.
|
|
19
|
+
* Apply as coding and design principle the separation of concerns and single responsibility principle in general and specifically when you need to split.
|
|
20
|
+
* Flatten nested code structures (e.g. if/while/for statements) to only one nesting level.
|
|
21
|
+
* The refactored code must fully implement the specified behavior in an easy testable and modular/extensible way.
|
|
22
|
+
* Follow PEP8 coding guidelines.
|
|
23
|
+
* Use descriptive numpy style docstrings for inline method and class documentation.
|
|
24
|
+
* Use the python logger logging package to implement logging for all application modules that enables a fine granular full observability of the program flow by the log file. Use ./logs/<module_name>.log as filepath for logging.
|
|
25
|
+
|
|
26
|
+
Your output specification is:
|
|
27
|
+
* Only return full copy pastable file content.
|
|
28
|
+
* Use for every single generated code block this markdown code block format:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
# [ ] extract
|
|
32
|
+
# filename: src/{filename}.py
|
|
33
|
+
{python code}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
* The extract and filename statements are only allowed once per markdown code block
|
|
37
|
+
* The first character of the first line inside your code block must be '#' and the first character of the second line inside your code block must be '#'
|
|
38
|
+
* replace the '# [ ] extract' statement of the template with '# [x] extract' in your response
|
|
39
|
+
* in case of files get deprecated give me a list of files that can be safely deleted
|
ara_cli/templates/prompt-modules/commands/python_step_definitions_generation_and_fixing.commands.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
### COMMANDS FOR CREATING AND CORRECTING STEP DEFINITIONS FOR FEATURE FILES
|
|
2
|
+
|
|
3
|
+
**MANDATORY INPUT VALIDATION:**
|
|
4
|
+
- Feature files (.feature) must be provided
|
|
5
|
+
- Behave test report must be provided
|
|
6
|
+
|
|
7
|
+
**PROMPT DEFINITION ERROR:** If mandatory input is missing, immediately stop and return: "ERROR: Missing mandatory input. Please provide both feature files (.feature) and behave test report before proceeding."
|
|
8
|
+
|
|
9
|
+
**OPTIONAL INPUT:**
|
|
10
|
+
- Already existing step definitions
|
|
11
|
+
|
|
12
|
+
**PROMPT DEFINITION WARNING:** If optional input is missing: "WARNING: No existing step definitions provided. If step definitions already exist in your project, please include them as input context to avoid duplication and ensure consistency."
|
|
13
|
+
|
|
14
|
+
### Your job is now:
|
|
15
|
+
* Silently analyze the given feature files and behave test report to understand current test failures and missing step implementations.
|
|
16
|
+
* Silently review any provided existing step definitions to avoid duplication and maintain consistency.
|
|
17
|
+
* Develop step definition implementation strategies that minimize code changes with respect to existing step definitions, prefer reusing existing step patterns over new implementations.
|
|
18
|
+
* The max function length should not exceed 25 lines. The max file length should not exceed 120 lines.
|
|
19
|
+
* Always prefer to use existing python packages over your own implementation.
|
|
20
|
+
* Use the behave testing framework for all step definition implementations.
|
|
21
|
+
* Apply mocking extensively to isolate step definitions from external inputs and interfaces using unittest.mock or pytest-mock.
|
|
22
|
+
* Fully implement all missing step definitions for the given feature files in an easy testable and modular/extensible way. Follow PEP8 coding guidelines, use numpy style docstrings for inline function documentation, apply as coding and design principle the separation of concerns and single responsibility principle.
|
|
23
|
+
* Generated or reworked python methods must not exceed 25 lines of code. In case methods exceed this length they need to be split according to the single responsibility principle and separation of concerns.
|
|
24
|
+
* Generated or reworked python files must not exceed 120 lines of code. In case files exceed this length they need to be split according to the single responsibility principle and separation of concerns.
|
|
25
|
+
* Implement proper assertion methods that provide clear error messages when steps fail.
|
|
26
|
+
* Use context.scenario, context.feature, and context.table appropriately for data sharing between steps.
|
|
27
|
+
* Implement proper cleanup in @after_scenario and @after_feature hooks when necessary.
|
|
28
|
+
|
|
29
|
+
* Only return full copy pastable file content for step definition files. Use for every single generated code block this markdown code block format:
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
# [ ] extract
|
|
33
|
+
# filename: ara/features/steps/{filename}_steps.py
|
|
34
|
+
{python code}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
* The extract and filename statements are only allowed once per markdown code block
|
|
38
|
+
* The first character of the first line inside your code block must be '#' and the first character of the second line inside your code block must be '#'
|
|
39
|
+
* replace the '# [ ] extract' statement of the template with '# [x] extract' in your response
|
|
40
|
+
* in case of files get deprecated give me a list of files that can be safely deleted
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
### COMMANDS FOR CREATING AND CORRECTING UNIT TESTS
|
|
2
|
+
|
|
3
|
+
**MANDATORY INPUT VALIDATION:**
|
|
4
|
+
- Feature files (.feature) must be provided
|
|
5
|
+
- Code coverage report or pytest test report must be provided
|
|
6
|
+
|
|
7
|
+
**PROMPT DEFINITION ERROR:** If mandatory input is missing, immediately stop and return: "ERROR: Missing mandatory input. Please provide both feature files (.feature) and code coverage/pytest test report before proceeding."
|
|
8
|
+
|
|
9
|
+
**OPTIONAL INPUT:**
|
|
10
|
+
- Already existing unit tests
|
|
11
|
+
|
|
12
|
+
**PROMPT DEFINITION WARNING:** If optional input is missing: "WARNING: No existing unit tests provided. If unit tests already exist in your project, please include them as input context to avoid duplication and ensure consistency."
|
|
13
|
+
|
|
14
|
+
#### Your job is now:
|
|
15
|
+
* Silently analyze the given feature files and code coverage/pytest test report to understand current test gaps and implementation requirements.
|
|
16
|
+
* Silently review any provided existing unit tests to avoid duplication and maintain consistency with existing test patterns.
|
|
17
|
+
* Develop unit test implementation strategies that minimize code changes with respect to existing tests, prefer reusing existing test patterns and fixtures over new implementations.
|
|
18
|
+
* The max function length should not exceed 25 lines. The max file length should not exceed 120 lines.
|
|
19
|
+
* Always prefer to use existing python packages over your own implementation.
|
|
20
|
+
* Use the pytest testing framework for all unit test implementations.
|
|
21
|
+
* Apply mocking extensively to isolate unit tests from external inputs and interfaces using unittest.mock or pytest-mock. Mock all external dependencies, file I/O, network calls, and database interactions.
|
|
22
|
+
* Fully implement comprehensive unit tests that achieve at least 90% code coverage for the specified behavior in an easy maintainable and modular/extensible way. Follow PEP8 coding guidelines, use numpy style docstrings for inline function documentation, apply as coding and design principle the separation of concerns and single responsibility principle.
|
|
23
|
+
* Generated or reworked python methods must not exceed 25 lines of code. In case methods exceed this length they need to be split according to the single responsibility principle and separation of concerns.
|
|
24
|
+
* Generated or reworked python files must not exceed 120 lines of code. In case files exceed this length they need to be split according to the single responsibility principle and separation of concerns.
|
|
25
|
+
|
|
26
|
+
* Implement comprehensive test cases covering:
|
|
27
|
+
- Happy path scenarios
|
|
28
|
+
- Edge cases and boundary conditions
|
|
29
|
+
- Error handling and exception scenarios
|
|
30
|
+
- Input validation scenarios
|
|
31
|
+
|
|
32
|
+
* Use pytest fixtures for test data setup and teardown to ensure test isolation.
|
|
33
|
+
* Implement parametrized tests using @pytest.mark.parametrize for testing multiple input combinations efficiently.
|
|
34
|
+
* Use descriptive test method names that clearly indicate what is being tested.
|
|
35
|
+
* Include proper assertions with meaningful error messages.
|
|
36
|
+
|
|
37
|
+
* Only return full copy pastable file content for unit test files. Use for every single generated code block this markdown code block format:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
# [ ] extract
|
|
41
|
+
# filename: test/test_{filename}.py
|
|
42
|
+
{python code}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
* The extract and filename statements are only allowed once per markdown code block
|
|
46
|
+
* The first character of the first line inside your code block must be '#' and the first character of the second line inside your code block must be '#'
|
|
47
|
+
* replace the '# [ ] extract' statement of the template with '# [x] extract' in your response
|
|
48
|
+
* in case of files get deprecated give me a list of files that can be safely deleted
|
ara_cli/update_config_prompt.py
CHANGED
|
@@ -5,13 +5,13 @@ from ara_cli.prompt_handler import generate_config_prompt_template_file, generat
|
|
|
5
5
|
|
|
6
6
|
def read_file(filepath):
|
|
7
7
|
"""Read and return the content of a file."""
|
|
8
|
-
with open(filepath, 'r') as file:
|
|
8
|
+
with open(filepath, 'r', encoding='utf-8') as file:
|
|
9
9
|
return file.read()
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def write_file(filepath, content):
|
|
13
13
|
"""Write content to a file."""
|
|
14
|
-
with open(filepath, 'w') as file:
|
|
14
|
+
with open(filepath, 'w', encoding='utf-8') as file:
|
|
15
15
|
file.write(content)
|
|
16
16
|
|
|
17
17
|
|
|
@@ -103,6 +103,7 @@ def handle_existing_file(file_path, tmp_file_path, generate_file_func, automatic
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
def update_artefact_config_prompt_files(classifier, param, automatic_update=False):
|
|
106
|
+
from ara_cli.prompt_handler import generate_config_prompt_global_givens_file
|
|
106
107
|
sub_directory = Classifier.get_sub_directory(classifier)
|
|
107
108
|
artefact_data_path = os.path.join("ara", sub_directory, f"{param}.data")
|
|
108
109
|
prompt_data_path = os.path.join(artefact_data_path, "prompt.data")
|
|
@@ -111,13 +112,18 @@ def update_artefact_config_prompt_files(classifier, param, automatic_update=Fals
|
|
|
111
112
|
|
|
112
113
|
givens_file_name = "config.prompt_givens.md"
|
|
113
114
|
givens_tmp_file_name = "config.prompt_givens_tmp.md"
|
|
115
|
+
global_givens_file_name = "config.prompt_global_givens.md"
|
|
116
|
+
global_givens_tmp_file_name = "config.prompt_global_givens_tmp.md"
|
|
114
117
|
template_file_name = "config.prompt_templates.md"
|
|
115
118
|
template_tmp_file_name = "config.prompt_templates_tmp.md"
|
|
116
119
|
|
|
117
120
|
prompt_config_givens = os.path.join(prompt_data_path, givens_file_name)
|
|
118
121
|
prompt_config_givens_tmp = os.path.join(prompt_data_path, givens_tmp_file_name)
|
|
122
|
+
prompt_config_global_givens = os.path.join(prompt_data_path, global_givens_file_name)
|
|
123
|
+
prompt_config_global_givens_tmp = os.path.join(prompt_data_path, global_givens_tmp_file_name)
|
|
119
124
|
prompt_config_templates = os.path.join(prompt_data_path, template_file_name)
|
|
120
125
|
prompt_config_templates_tmp = os.path.join(prompt_data_path, template_tmp_file_name)
|
|
121
126
|
|
|
122
127
|
handle_existing_file(prompt_config_givens, prompt_config_givens_tmp, generate_config_prompt_givens_file, automatic_update)
|
|
123
|
-
handle_existing_file(
|
|
128
|
+
handle_existing_file(prompt_config_global_givens, prompt_config_global_givens_tmp, generate_config_prompt_global_givens_file, automatic_update)
|
|
129
|
+
handle_existing_file(prompt_config_templates, prompt_config_templates_tmp, generate_config_prompt_template_file, automatic_update)
|
ara_cli/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# version.py
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.10.8" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ara_cli
|
|
3
|
+
Version: 0.1.10.8
|
|
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
|
+
Description-Content-Type: text/markdown
|
|
6
|
+
Requires-Dist: langfuse
|
|
7
|
+
Requires-Dist: litellm
|
|
8
|
+
Requires-Dist: llama-index
|
|
9
|
+
Requires-Dist: llama-index-llms-openai
|
|
10
|
+
Requires-Dist: llama-index-retrievers-bm25
|
|
11
|
+
Requires-Dist: openai
|
|
12
|
+
Requires-Dist: markdown-it-py
|
|
13
|
+
Requires-Dist: json-repair
|
|
14
|
+
Requires-Dist: argparse
|
|
15
|
+
Requires-Dist: argcomplete
|
|
16
|
+
Requires-Dist: cmd2>=2.5
|
|
17
|
+
Requires-Dist: charset-normalizer
|
|
18
|
+
Requires-Dist: pydantic
|
|
19
|
+
Requires-Dist: pydantic_ai
|
|
20
|
+
Requires-Dist: python-docx
|
|
21
|
+
Requires-Dist: pymupdf4llm
|
|
22
|
+
Requires-Dist: typer
|
|
23
|
+
Requires-Dist: psutil
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# ara-cli
|
|
30
|
+
|
|
31
|
+
**ara-cli** is a powerful, open source command-line tool for managing, structuring and automating software development artifacts in line with Behavior-Driven Development (BDD) and AI-assisted processes. With an intuitive interface and platform-independent implementation in Python, ara-cli enables teams to structure business goals, capabilities, features, user stories, and tasks, and to leverage integrated AI/chat capabilities for requirements engineering, documentation, and process automation.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- **Comprehensive Artefact Management:**
|
|
38
|
+
Create, edit, rename, delete, and list all core artefacts of the software development lifecycle: businessgoals, vision, capabilities, keyfeatures, features, epics, userstories, examples, and tasks.
|
|
39
|
+
|
|
40
|
+
- **Structured Traceability:**
|
|
41
|
+
Organize and link artefacts for full traceability from business goals to implementation tasks. Effortlessly navigate artefact hierarchies and dependencies.
|
|
42
|
+
|
|
43
|
+
- **Integrated AI and Chat:**
|
|
44
|
+
Interact with AI language models directly from your terminal. Use chat and prompt commands to assist with documentation, requirements refinement, and artefact management.
|
|
45
|
+
|
|
46
|
+
- **Prompt Templates:**
|
|
47
|
+
Fetch, use, and manage reusable prompt templates for consistent and efficient requirements and documentation workflows.
|
|
48
|
+
|
|
49
|
+
- **Artefact Status and User Management:**
|
|
50
|
+
Assign and query status and responsible users for artefacts to support project coordination and tracking.
|
|
51
|
+
|
|
52
|
+
- **Automated Quality Assurance:**
|
|
53
|
+
Scan artefact trees for inconsistencies and automatically correct issues using integrated LLM-powered autofix functionality.
|
|
54
|
+
|
|
55
|
+
- **Powerful Listing and Search:**
|
|
56
|
+
List artefacts and filter by type, tags, content, contributor relationships, file extensions, and more.
|
|
57
|
+
|
|
58
|
+
- **Open Source & Platform Independent:**
|
|
59
|
+
Implemented in Python and available on PyPI for easy installation and integration into any workflow.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Use Cases
|
|
64
|
+
|
|
65
|
+
- **Requirements Engineering:**
|
|
66
|
+
Capture and structure business requirements and user stories with clear traceability.
|
|
67
|
+
|
|
68
|
+
- **Agile Development:**
|
|
69
|
+
Manage and automate backlog refinement, sprint planning, and task tracking.
|
|
70
|
+
|
|
71
|
+
- **AI-Enhanced Productivity:**
|
|
72
|
+
Use chat and prompt features to accelerate documentation, code review, and knowledge management.
|
|
73
|
+
|
|
74
|
+
- **Quality Management:**
|
|
75
|
+
Ensure artefact consistency and high documentation quality via automated scans and fixes.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Quick Start
|
|
80
|
+
|
|
81
|
+
Install from PyPI:
|
|
82
|
+
```bash
|
|
83
|
+
pip install ara-cli
|
|
84
|
+
````
|
|
85
|
+
|
|
86
|
+
Create your first feature artefact:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
ara create feature login
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
List all features:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
ara list --include-extension .feature
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Chat with the integrated AI:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
ara chat
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Scan and autofix artefacts:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
ara scan
|
|
108
|
+
ara autofix
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Command Overview
|
|
114
|
+
|
|
115
|
+
| Action | Description |
|
|
116
|
+
| ----------------------- | ----------------------------------------------------------------------- |
|
|
117
|
+
| create | Create a classified artefact with data directory |
|
|
118
|
+
| delete | Delete an artefact and its data directory |
|
|
119
|
+
| rename | Rename an artefact and its data directory |
|
|
120
|
+
| list, list-tags | List artefacts, show tags, filter by content, extension, hierarchy etc. |
|
|
121
|
+
| prompt, chat | Use AI-powered chat and prompt templates for artefact management |
|
|
122
|
+
| template | Print artefact templates in the terminal |
|
|
123
|
+
| fetch-templates | Download and manage reusable prompt templates |
|
|
124
|
+
| read | Output artefact contents and their full contribution chain |
|
|
125
|
+
| reconnect | Connect artefacts to parent artefacts |
|
|
126
|
+
| read-status, set-status | Query and assign status to artefacts |
|
|
127
|
+
| read-user, set-user | Query and assign responsible users |
|
|
128
|
+
| classifier-directory | Show directory of artefact classifiers |
|
|
129
|
+
| scan | Scan the ARA tree for incompatible or inconsistent artefacts |
|
|
130
|
+
| autofix | Automatically correct artefact issues with LLM assistance |
|
|
131
|
+
|
|
132
|
+
See `ara -h` for the complete list of commands and usage examples.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
## Agent Commands
|
|
136
|
+
|
|
137
|
+
`ara-cli` includes powerful agent-based capabilities that can be accessed through the interactive chat. These agents can perform complex, multi-step tasks, such as conducting interviews or automating coding workflows.
|
|
138
|
+
|
|
139
|
+
To use the agent commands, first start an interactive chat session:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
ara prompt chat <artefact_classifier> <artefact_name>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Once inside the chat, you can use the following commands to manage agents:
|
|
146
|
+
|
|
147
|
+
| Command | Shortcut | Description |
|
|
148
|
+
| ---------------- | -------- | ------------------------------------------------- |
|
|
149
|
+
| `AGENT_RUN` | `a` | Run an agent by name. |
|
|
150
|
+
| `AGENT_STOP` | `as` | Stop the currently running agent. |
|
|
151
|
+
| `AGENT_CONTINUE` | `ac` | Continue the agent's operation without new input. |
|
|
152
|
+
| `AGENT_STATUS` | `astat` | Show the status of the current agent. |
|
|
153
|
+
| `exit` | | Exit from agent interfacto back to chat. |
|
|
154
|
+
|
|
155
|
+
**Example:**
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
ara> a interview_agent
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Important:** The agent functionality requires the `ara-agents` package to be installed separately. If you do not have `ara-agents` installed, please contact the Talsen Team for assistance.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Artefact Structure
|
|
166
|
+
|
|
167
|
+
ara-cli organizes your project artefacts in a clear directory structure:
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
./ara/
|
|
171
|
+
├── businessgoals/
|
|
172
|
+
├── vision/
|
|
173
|
+
├── capabilities/
|
|
174
|
+
├── keyfeatures/
|
|
175
|
+
├── features/
|
|
176
|
+
├── epics/
|
|
177
|
+
├── userstories/
|
|
178
|
+
├── examples/
|
|
179
|
+
├── tasks/
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Example Workflows
|
|
185
|
+
|
|
186
|
+
- **Create a new feature and link it to a user story:**
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
ara create feature payment contributes-to userstory checkout
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
- **Read an artefact's content and its full parent chain:**
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
ara read task implement_api --branch
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
- **List tasks containing specific content:**
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
ara list --include-extension .task --include-content "API integration"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
- **Automate prompt-based LLM interaction for a task:**
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
ara prompt send task implement_api
|
|
208
|
+
ara prompt extract task implement_api
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Requirements
|
|
214
|
+
|
|
215
|
+
- Python 3.8+
|
|
216
|
+
- Platform-independent; tested on Linux, macOS, and Windows
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## License
|
|
221
|
+
|
|
222
|
+
This project is open source and freely available under the [MIT License](vector://vector/webapp/LICENSE).
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Links
|
|
227
|
+
|
|
228
|
+
- **PyPI:** https://pypi.org/project/ara-cli/
|
|
229
|
+
- **Source code:** \[GitHub link or repository URL\]
|
|
230
|
+
- **Documentation:** \[Link if available\]
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Contributing
|
|
235
|
+
|
|
236
|
+
Contributions, issues, and feature requests are welcome! Please open an issue or submit a pull request via GitHub.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
**ara-cli — Structure your development. Automate with AI. Build better software.**
|
|
241
|
+
|