Skip to content

Commit d4a0af0

Browse files
Add technology-agnostic blueprint generators for comprehensive project documentation (#113)
* add 7 technology-agnostic blueprint generators for project documentation that helps GitHub Copilot to generate instructions that respect project-specific conventions - Add architecture-blueprint-generator for documenting system design patterns - Add code-exemplars-blueprint-generator for identifying quality code standards - Add copilot-instructions-blueprint-generator for creating AI guidance files - Add folder-structure-blueprint-generator for documenting project organization - Add project-workflow-blueprint-generator for end-to-end process documentation - Add readme-blueprint-generator for comprehensive repository documentation - Add technology-stack-blueprint-generator for tech stack analysis * Update README.md * Update architecture-blueprint-generator.prompt.md Fixed : The description field in the front matter should be wrapped in single quotes, not double quotes, according to the coding guidelines. * Update folder-structure-blueprint-generator.prompt.md Fixed : The description field in the front matter should be wrapped in single quotes, not double quotes, according to the coding guidelines. * Update project-workflow-analysis-blueprint-generator.prompt.md Fixed : The description field in the front matter should be wrapped in single quotes, not double quotes, according to the coding guidelines. * Update readme-blueprint-generator.prompt.md Fixed : The description field in the front matter should be wrapped in single quotes, not double quotes, according to the coding guidelines. * update readme and fixed copilot suggestions --------- Co-authored-by: Ajay Singh <ajay.singh@compunnel.com>
1 parent 2587ec1 commit d4a0af0

8 files changed

Lines changed: 1764 additions & 0 deletions

README.md

Lines changed: 9 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 321 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
---
2+
description: 'Comprehensive project architecture blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks and architectural patterns, generates visual diagrams, documents implementation patterns, and provides extensible blueprints for maintaining architectural consistency and guiding new development.'
3+
---
4+
5+
# Comprehensive Project Architecture Blueprint Generator
6+
7+
## Configuration Variables
8+
${PROJECT_TYPE="Auto-detect|.NET|Java|React|Angular|Python|Node.js|Flutter|Other"} <!-- Primary technology -->
9+
${ARCHITECTURE_PATTERN="Auto-detect|Clean Architecture|Microservices|Layered|MVVM|MVC|Hexagonal|Event-Driven|Serverless|Monolithic|Other"} <!-- Primary architectural pattern -->
10+
${DIAGRAM_TYPE="C4|UML|Flow|Component|None"} <!-- Architecture diagram type -->
11+
${DETAIL_LEVEL="High-level|Detailed|Comprehensive|Implementation-Ready"} <!-- Level of detail to include -->
12+
${INCLUDES_CODE_EXAMPLES=true|false} <!-- Include sample code to illustrate patterns -->
13+
${INCLUDES_IMPLEMENTATION_PATTERNS=true|false} <!-- Include detailed implementation patterns -->
14+
${INCLUDES_DECISION_RECORDS=true|false} <!-- Include architectural decision records -->
15+
${FOCUS_ON_EXTENSIBILITY=true|false} <!-- Emphasize extension points and patterns -->
16+
17+
## Generated Prompt
18+
19+
"Create a comprehensive 'Project_Architecture_Blueprint.md' document that thoroughly analyzes the architectural patterns in the codebase to serve as a definitive reference for maintaining architectural consistency. Use the following approach:
20+
21+
### 1. Architecture Detection and Analysis
22+
- ${PROJECT_TYPE == "Auto-detect" ? "Analyze the project structure to identify all technology stacks and frameworks in use by examining:
23+
- Project and configuration files
24+
- Package dependencies and import statements
25+
- Framework-specific patterns and conventions
26+
- Build and deployment configurations" : "Focus on ${PROJECT_TYPE} specific patterns and practices"}
27+
28+
- ${ARCHITECTURE_PATTERN == "Auto-detect" ? "Determine the architectural pattern(s) by analyzing:
29+
- Folder organization and namespacing
30+
- Dependency flow and component boundaries
31+
- Interface segregation and abstraction patterns
32+
- Communication mechanisms between components" : "Document how the ${ARCHITECTURE_PATTERN} architecture is implemented"}
33+
34+
### 2. Architectural Overview
35+
- Provide a clear, concise explanation of the overall architectural approach
36+
- Document the guiding principles evident in the architectural choices
37+
- Identify architectural boundaries and how they're enforced
38+
- Note any hybrid architectural patterns or adaptations of standard patterns
39+
40+
### 3. Architecture Visualization
41+
${DIAGRAM_TYPE != "None" ? `Create ${DIAGRAM_TYPE} diagrams at multiple levels of abstraction:
42+
- High-level architectural overview showing major subsystems
43+
- Component interaction diagrams showing relationships and dependencies
44+
- Data flow diagrams showing how information moves through the system
45+
- Ensure diagrams accurately reflect the actual implementation, not theoretical patterns` : "Describe the component relationships based on actual code dependencies, providing clear textual explanations of:
46+
- Subsystem organization and boundaries
47+
- Dependency directions and component interactions
48+
- Data flow and process sequences"}
49+
50+
### 4. Core Architectural Components
51+
For each architectural component discovered in the codebase:
52+
53+
- **Purpose and Responsibility**:
54+
- Primary function within the architecture
55+
- Business domains or technical concerns addressed
56+
- Boundaries and scope limitations
57+
58+
- **Internal Structure**:
59+
- Organization of classes/modules within the component
60+
- Key abstractions and their implementations
61+
- Design patterns utilized
62+
63+
- **Interaction Patterns**:
64+
- How the component communicates with others
65+
- Interfaces exposed and consumed
66+
- Dependency injection patterns
67+
- Event publishing/subscription mechanisms
68+
69+
- **Evolution Patterns**:
70+
- How the component can be extended
71+
- Variation points and plugin mechanisms
72+
- Configuration and customization approaches
73+
74+
### 5. Architectural Layers and Dependencies
75+
- Map the layer structure as implemented in the codebase
76+
- Document the dependency rules between layers
77+
- Identify abstraction mechanisms that enable layer separation
78+
- Note any circular dependencies or layer violations
79+
- Document dependency injection patterns used to maintain separation
80+
81+
### 6. Data Architecture
82+
- Document domain model structure and organization
83+
- Map entity relationships and aggregation patterns
84+
- Identify data access patterns (repositories, data mappers, etc.)
85+
- Document data transformation and mapping approaches
86+
- Note caching strategies and implementations
87+
- Document data validation patterns
88+
89+
### 7. Cross-Cutting Concerns Implementation
90+
Document implementation patterns for cross-cutting concerns:
91+
92+
- **Authentication & Authorization**:
93+
- Security model implementation
94+
- Permission enforcement patterns
95+
- Identity management approach
96+
- Security boundary patterns
97+
98+
- **Error Handling & Resilience**:
99+
- Exception handling patterns
100+
- Retry and circuit breaker implementations
101+
- Fallback and graceful degradation strategies
102+
- Error reporting and monitoring approaches
103+
104+
- **Logging & Monitoring**:
105+
- Instrumentation patterns
106+
- Observability implementation
107+
- Diagnostic information flow
108+
- Performance monitoring approach
109+
110+
- **Validation**:
111+
- Input validation strategies
112+
- Business rule validation implementation
113+
- Validation responsibility distribution
114+
- Error reporting patterns
115+
116+
- **Configuration Management**:
117+
- Configuration source patterns
118+
- Environment-specific configuration strategies
119+
- Secret management approach
120+
- Feature flag implementation
121+
122+
### 8. Service Communication Patterns
123+
- Document service boundary definitions
124+
- Identify communication protocols and formats
125+
- Map synchronous vs. asynchronous communication patterns
126+
- Document API versioning strategies
127+
- Identify service discovery mechanisms
128+
- Note resilience patterns in service communication
129+
130+
### 9. Technology-Specific Architectural Patterns
131+
${PROJECT_TYPE == "Auto-detect" ? "For each detected technology stack, document specific architectural patterns:" : `Document ${PROJECT_TYPE}-specific architectural patterns:`}
132+
133+
${(PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect") ?
134+
"#### .NET Architectural Patterns (if detected)
135+
- Host and application model implementation
136+
- Middleware pipeline organization
137+
- Framework service integration patterns
138+
- ORM and data access approaches
139+
- API implementation patterns (controllers, minimal APIs, etc.)
140+
- Dependency injection container configuration" : ""}
141+
142+
${(PROJECT_TYPE == "Java" || PROJECT_TYPE == "Auto-detect") ?
143+
"#### Java Architectural Patterns (if detected)
144+
- Application container and bootstrap process
145+
- Dependency injection framework usage (Spring, CDI, etc.)
146+
- AOP implementation patterns
147+
- Transaction boundary management
148+
- ORM configuration and usage patterns
149+
- Service implementation patterns" : ""}
150+
151+
${(PROJECT_TYPE == "React" || PROJECT_TYPE == "Auto-detect") ?
152+
"#### React Architectural Patterns (if detected)
153+
- Component composition and reuse strategies
154+
- State management architecture
155+
- Side effect handling patterns
156+
- Routing and navigation approach
157+
- Data fetching and caching patterns
158+
- Rendering optimization strategies" : ""}
159+
160+
${(PROJECT_TYPE == "Angular" || PROJECT_TYPE == "Auto-detect") ?
161+
"#### Angular Architectural Patterns (if detected)
162+
- Module organization strategy
163+
- Component hierarchy design
164+
- Service and dependency injection patterns
165+
- State management approach
166+
- Reactive programming patterns
167+
- Route guard implementation" : ""}
168+
169+
${(PROJECT_TYPE == "Python" || PROJECT_TYPE == "Auto-detect") ?
170+
"#### Python Architectural Patterns (if detected)
171+
- Module organization approach
172+
- Dependency management strategy
173+
- OOP vs. functional implementation patterns
174+
- Framework integration patterns
175+
- Asynchronous programming approach" : ""}
176+
177+
### 10. Implementation Patterns
178+
${INCLUDES_IMPLEMENTATION_PATTERNS ?
179+
"Document concrete implementation patterns for key architectural components:
180+
181+
- **Interface Design Patterns**:
182+
- Interface segregation approaches
183+
- Abstraction level decisions
184+
- Generic vs. specific interface patterns
185+
- Default implementation patterns
186+
187+
- **Service Implementation Patterns**:
188+
- Service lifetime management
189+
- Service composition patterns
190+
- Operation implementation templates
191+
- Error handling within services
192+
193+
- **Repository Implementation Patterns**:
194+
- Query pattern implementations
195+
- Transaction management
196+
- Concurrency handling
197+
- Bulk operation patterns
198+
199+
- **Controller/API Implementation Patterns**:
200+
- Request handling patterns
201+
- Response formatting approaches
202+
- Parameter validation
203+
- API versioning implementation
204+
205+
- **Domain Model Implementation**:
206+
- Entity implementation patterns
207+
- Value object patterns
208+
- Domain event implementation
209+
- Business rule enforcement" : "Mention that detailed implementation patterns vary across the codebase."}
210+
211+
### 11. Testing Architecture
212+
- Document testing strategies aligned with the architecture
213+
- Identify test boundary patterns (unit, integration, system)
214+
- Map test doubles and mocking approaches
215+
- Document test data strategies
216+
- Note testing tools and frameworks integration
217+
218+
### 12. Deployment Architecture
219+
- Document deployment topology derived from configuration
220+
- Identify environment-specific architectural adaptations
221+
- Map runtime dependency resolution patterns
222+
- Document configuration management across environments
223+
- Identify containerization and orchestration approaches
224+
- Note cloud service integration patterns
225+
226+
### 13. Extension and Evolution Patterns
227+
${FOCUS_ON_EXTENSIBILITY ?
228+
"Provide detailed guidance for extending the architecture:
229+
230+
- **Feature Addition Patterns**:
231+
- How to add new features while preserving architectural integrity
232+
- Where to place new components by type
233+
- Dependency introduction guidelines
234+
- Configuration extension patterns
235+
236+
- **Modification Patterns**:
237+
- How to safely modify existing components
238+
- Strategies for maintaining backward compatibility
239+
- Deprecation patterns
240+
- Migration approaches
241+
242+
- **Integration Patterns**:
243+
- How to integrate new external systems
244+
- Adapter implementation patterns
245+
- Anti-corruption layer patterns
246+
- Service facade implementation" : "Document key extension points in the architecture."}
247+
248+
${INCLUDES_CODE_EXAMPLES ?
249+
"### 14. Architectural Pattern Examples
250+
Extract representative code examples that illustrate key architectural patterns:
251+
252+
- **Layer Separation Examples**:
253+
- Interface definition and implementation separation
254+
- Cross-layer communication patterns
255+
- Dependency injection examples
256+
257+
- **Component Communication Examples**:
258+
- Service invocation patterns
259+
- Event publication and handling
260+
- Message passing implementation
261+
262+
- **Extension Point Examples**:
263+
- Plugin registration and discovery
264+
- Extension interface implementations
265+
- Configuration-driven extension patterns
266+
267+
Include enough context with each example to show the pattern clearly, but keep examples concise and focused on architectural concepts." : ""}
268+
269+
${INCLUDES_DECISION_RECORDS ?
270+
"### 15. Architectural Decision Records
271+
Document key architectural decisions evident in the codebase:
272+
273+
- **Architectural Style Decisions**:
274+
- Why the current architectural pattern was chosen
275+
- Alternatives considered (based on code evolution)
276+
- Constraints that influenced the decision
277+
278+
- **Technology Selection Decisions**:
279+
- Key technology choices and their architectural impact
280+
- Framework selection rationales
281+
- Custom vs. off-the-shelf component decisions
282+
283+
- **Implementation Approach Decisions**:
284+
- Specific implementation patterns chosen
285+
- Standard pattern adaptations
286+
- Performance vs. maintainability tradeoffs
287+
288+
For each decision, note:
289+
- Context that made the decision necessary
290+
- Factors considered in making the decision
291+
- Resulting consequences (positive and negative)
292+
- Future flexibility or limitations introduced" : ""}
293+
294+
### ${INCLUDES_DECISION_RECORDS ? "16" : INCLUDES_CODE_EXAMPLES ? "15" : "14"}. Architecture Governance
295+
- Document how architectural consistency is maintained
296+
- Identify automated checks for architectural compliance
297+
- Note architectural review processes evident in the codebase
298+
- Document architectural documentation practices
299+
300+
### ${INCLUDES_DECISION_RECORDS ? "17" : INCLUDES_CODE_EXAMPLES ? "16" : "15"}. Blueprint for New Development
301+
Create a clear architectural guide for implementing new features:
302+
303+
- **Development Workflow**:
304+
- Starting points for different feature types
305+
- Component creation sequence
306+
- Integration steps with existing architecture
307+
- Testing approach by architectural layer
308+
309+
- **Implementation Templates**:
310+
- Base class/interface templates for key architectural components
311+
- Standard file organization for new components
312+
- Dependency declaration patterns
313+
- Documentation requirements
314+
315+
- **Common Pitfalls**:
316+
- Architecture violations to avoid
317+
- Common architectural mistakes
318+
- Performance considerations
319+
- Testing blind spots
320+
321+
Include information about when this blueprint was generated and recommendations for keeping it updated as the architecture evolves."

0 commit comments

Comments
 (0)