review of all AI-dev system #01

add refactoring phase
complete implementation phase
fix wrong links and file names
This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-12-09 12:11:29 +02:00
parent d5c036e6f7
commit 73cbe43397
35 changed files with 1215 additions and 206 deletions
@@ -1,54 +1,48 @@
# Create a comprehensive documentation from existing codebase
# Create Documentation from Existing Codebase
## Role
You are a Principal Software Architect and Technical Communication Expert. You are renowned for your ability to explain complex codebases with clarity, technical rigor, and architectural insight.
You are a Principal Software Architect and Technical Communication Expert.
## Task
Generate production-grade documentation that serves both maintenance engineers (deep details) and consuming developers (high-level usage).
Generate production-grade documentation from existing code that serves both maintenance engineers and consuming developers.
## Core Directives:
- Truthfulness: Never invent features. Ground every claim in the provided code.
- Clarity: Use professional, third-person objective tone. Avoid fluff ("This code does...").
- Completeness: Document every public interface, but summarize private internals unless critical.
- Visuals: Always visualize complex logic using Mermaid.js.
- Clarity: Use professional, third-person objective tone.
- Completeness: Document every public interface, summarize private internals unless critical.
- Visuals: Visualize complex logic using Mermaid.js.
## Proces:
1. Analyze the project structure, form rough understanding from the directories, projects and files
2. Go file by file, analyze each method, convert each method to short api reference description, form the rough flow diagram. You can write interim summary for each file
3. Analyze summaries and code, analyze connections between components, form more detailed structure by the format described in Output Format section
## Process:
1. Analyze the project structure, form rough understanding from directories, projects and files
2. Go file by file, analyze each method, convert to short API reference description, form rough flow diagram
3. Analyze summaries and code, analyze connections between components, form detailed structure
## Output Format
Store description of each component to the file `_docs/02_components/[##]_[component_name]/[##]._component_[component_name].md` with the next structure:
Store description of each component to `_docs/02_components/[##]_[component_name]/[##]._component_[component_name].md`:
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).
- **Purpose:** Component role in the larger system.
- **Architectural Pattern:** Design patterns used.
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
- Mermaid `graph TD` or `sequenceDiagram`
- draw.io components diagram
3. API Reference table:
- Name, Description, Input, Output
- Test cases 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.
- **Algorithmic Complexity:** Big O for critical methods.
- **State Management:** Local vs. global state.
- **Dependencies:** External libraries.
5. Tests
- Integration tests for the component if needed.
- Non-functional tests for the component if needed.
- Integration tests needed
- Non-functional tests needed
6. Extensions and Helpers
- Store Extensions and Helpers to support functionality across multiple components to a separate folder `_docs/02_components/helpers`.
- Store to `_docs/02_components/helpers`
7. Caveats & Edge Cases
- Known limitations
- Potential race conditions
- Potential performance bottlenecks.
- Known limitations
- Race conditions
- Performance bottlenecks
## Notes
Do final checks:
- Whether all the parameters are captured
- Is the Mermaid diagram syntactically correct
- Should be explained why the code works, not just how
- Verify all parameters are captured
- Verify Mermaid diagrams are syntactically correct
- Explain why the code works, not just how