add documentation scommand , revised gen component command's component format

This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-12-05 15:46:28 +02:00
parent abc26d5c20
commit a99d68a103
4 changed files with 84 additions and 17 deletions
@@ -26,22 +26,35 @@
- Solution draft could be incomplete, so add all necessary components to meet acceptance criteria and restrictions
- When you've got full understanding of how exactly each component will interact with each other, create components
## Output
- Store description of each component to the file `_docs/02_components/[##]_[component_name]/[##]._component_[component_name].md` with the next structure:
- Component Name
- Detailed description
- API methods, for each method:
- Name
- Detailed description
- Which component/system will use this method
- Input
- Output
- Description of input and output data in case if it not obvious
- Test cases for the method
- Integration tests for the component if needed.
- Non-functional tests for the component if needed.
- Store Extensions and Helpers to support functionality across multiple components to a separate folder `_docs/02_components/helpers`.
- Generate draw.io components diagram shows relations between components.
## Output Format
Store description of each component to the file `_docs/02_components/[##]_[component_name]/[##]._component_[component_name].md` with the next structure:
1. High-level overview
- **Purpose:** A concise summary of what this component does and its role in the larger system.
- **Architectural Pattern:** Identify the design patterns used (e.g., Singleton, Observer, Factory).
2. Logic & Architecture
- **Control Flow Diagram:**
- Generate a `graph TD` or `sequenceDiagram` in Mermaid syntax.
- Generate draw.io components diagram shows relations between components.
3. API Reference. Create a table for eac function or method with the next columns:
- Name
- Description
- Input
- Output
- Description of input and output data in case if it is not obvious
- Test cases which could be for the method
4. Implementation Details
- **Algorithmic Complexity:** Analyze Time (Big O) and Space complexity for critical methods.
- **State Management:** Explain how this component handles state (local vs. global).
- **Dependencies:** List key external libraries and their purpose here.
5. Tests
- Integration tests for the component if needed.
- Non-functional tests for the component if needed.
6. Extensions and Helpers
- Store Extensions and Helpers to support functionality across multiple components to a separate folder `_docs/02_components/helpers`.
7. Caveats & Edge Cases
- Known limitations
- Potential race conditions
- Potential performance bottlenecks.
## Notes
- Strongly follow Single Responsibility Principle during creation of components.