@mark-gozner/aigile-method 0.4.5
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.
- package/LICENSE.md +26 -0
- package/README.md +300 -0
- package/core/agent-teams/team-all.yaml +24 -0
- package/core/agent-teams/team-company.yaml +17 -0
- package/core/agent-teams/team-enterprise.yaml +17 -0
- package/core/agent-teams/team-fullstack.yaml +16 -0
- package/core/agent-teams/team-ide-minimal.yaml +10 -0
- package/core/agents/aigile-master.md +476 -0
- package/core/agents/aigile-orchestrator.agent.md +200 -0
- package/core/agents/analyst.md +45 -0
- package/core/agents/architect.md +43 -0
- package/core/agents/code-tour.agent.md +208 -0
- package/core/agents/dev.agent.md +145 -0
- package/core/agents/dev.md +130 -0
- package/core/agents/expert-react-frontend-engineer.agent.md +741 -0
- package/core/agents/pm.md +33 -0
- package/core/agents/po.md +35 -0
- package/core/agents/qa.md +38 -0
- package/core/agents/sm.md +31 -0
- package/core/agents/ui-expert.md +39 -0
- package/core/agents/ux-expert.md +31 -0
- package/core/checklists/architect-checklist.md +246 -0
- package/core/checklists/change-checklist.md +182 -0
- package/core/checklists/pm-checklist.md +286 -0
- package/core/checklists/po-master-checklist.md +291 -0
- package/core/checklists/story-dod-checklist.md +94 -0
- package/core/checklists/story-draft-checklist.md +153 -0
- package/core/core-config.yaml +22 -0
- package/core/data/aigile-kb.md +112 -0
- package/core/data/brainstorming-techniques.md +73 -0
- package/core/data/elicitation-methods.md +42 -0
- package/core/data/technical-preferences.md +52 -0
- package/core/data/test-levels-framework.md +43 -0
- package/core/data/test-priorities-matrix.md +26 -0
- package/core/instructions/csharp.instructions.md +656 -0
- package/core/instructions/dotnet/csharp.instructions.md +656 -0
- package/core/instructions/java/java.instructions.md +67 -0
- package/core/instructions/java/spring-boot.instructions.md +122 -0
- package/core/instructions/java.instructions.md +67 -0
- package/core/instructions/spring-boot.instructions.md +122 -0
- package/core/prompts/README.md +11 -0
- package/core/prompts/architecture/architecture-blueprint-generator.prompt.md +322 -0
- package/core/prompts/architecture/architecture-validation.prompt.md +71 -0
- package/core/prompts/architecture/file-tree-generator.prompt.md +405 -0
- package/core/prompts/architecture/technical-project-analyze.prompt.md +43 -0
- package/core/prompts/architecture-blueprint-generator.prompt.md +322 -0
- package/core/prompts/architecture-validation.prompt.md +71 -0
- package/core/prompts/code-review.prompt.md +107 -0
- package/core/prompts/confluence-in-md.prompt.md +167 -0
- package/core/prompts/copilot-instructions-blueprint-generator.prompt.md +294 -0
- package/core/prompts/create-implementation-plan.prompt.md +157 -0
- package/core/prompts/create-oo-component-documentation.prompt.md +193 -0
- package/core/prompts/file-tree-generator.prompt.md +405 -0
- package/core/prompts/generate-unit-tests.prompt.md +291 -0
- package/core/prompts/java/java-doc.prompt.md +24 -0
- package/core/prompts/java/java-junit.prompt.md +64 -0
- package/core/prompts/java/junit-5.prompt.md +64 -0
- package/core/prompts/java-doc.prompt.md +24 -0
- package/core/prompts/java-junit.prompt.md +64 -0
- package/core/prompts/junit-5.prompt.md +64 -0
- package/core/prompts/release-notes/README.md +11 -0
- package/core/prompts/release-notes/release-notes.prompt.md +723 -0
- package/core/prompts/release-notes.prompt.md +723 -0
- package/core/prompts/technical-project-analyze.prompt.md +43 -0
- package/core/tasks/advanced-elicitation.md +119 -0
- package/core/tasks/check-story-implemented.md +44 -0
- package/core/tasks/code-arch-review-with-github.md +40 -0
- package/core/tasks/create-architecture-doc.md +55 -0
- package/core/tasks/create-jira-epic-from-confluence.md +70 -0
- package/core/tasks/create-jira-story-from-confluence.md +39 -0
- package/core/tasks/create-jira-story-from-text.md +39 -0
- package/core/tasks/create-next-story.md +35 -0
- package/core/tasks/create-prd-doc.md +54 -0
- package/core/tasks/create-stories-from-epic.md +66 -0
- package/core/tasks/create-tasks-for-story.md +60 -0
- package/core/tasks/document-project.md +69 -0
- package/core/tasks/execute-checklist.md +37 -0
- package/core/tasks/explain-story-from-jira.md +44 -0
- package/core/tasks/facilitate-brainstorming-session.md +69 -0
- package/core/tasks/figma-audit-design-system.md +20 -0
- package/core/tasks/front-end-spec-from-design.md +33 -0
- package/core/tasks/gate.md +64 -0
- package/core/tasks/groom-jira-story.md +52 -0
- package/core/tasks/help.md +27 -0
- package/core/tasks/implement-freeform-work-item.md +30 -0
- package/core/tasks/implement-story-from-jira.md +63 -0
- package/core/tasks/implement-unit-tests.md +45 -0
- package/core/tasks/market-research-from-context7.md +37 -0
- package/core/tasks/review-story.md +30 -0
- package/core/tasks/sonarqube-hotspot-review.md +39 -0
- package/core/tasks/standup-digest.md +21 -0
- package/core/tasks/sync-jira-backlog.md +32 -0
- package/core/tasks/test-design.md +68 -0
- package/core/tasks/validate-next-story.md +37 -0
- package/core/tasks/verify-jira-story-e2e.md +45 -0
- package/core/templates/architecture-tmpl.yaml +651 -0
- package/core/templates/brainstorming-output-tmpl.yaml +156 -0
- package/core/templates/brownfield-architecture-tmpl.yaml +477 -0
- package/core/templates/brownfield-prd-tmpl.yaml +281 -0
- package/core/templates/front-end-architecture-tmpl.yaml +219 -0
- package/core/templates/front-end-spec-tmpl.yaml +350 -0
- package/core/templates/fullstack-architecture-tmpl.yaml +824 -0
- package/core/templates/market-research-tmpl.yaml +253 -0
- package/core/templates/prd-tmpl.yaml +203 -0
- package/core/templates/project-brief-tmpl.yaml +222 -0
- package/core/templates/qa-gate-tmpl.yaml +103 -0
- package/core/templates/story-tmpl.yaml +138 -0
- package/core/workflows/brownfield-fullstack.yaml +298 -0
- package/core/workflows/brownfield-service.yaml +188 -0
- package/core/workflows/brownfield-ui.yaml +198 -0
- package/core/workflows/greenfield-fullstack.yaml +241 -0
- package/core/workflows/greenfield-service.yaml +207 -0
- package/core/workflows/greenfield-ui.yaml +236 -0
- package/dist/agents/aigile-master.txt +500 -0
- package/dist/agents/aigile-orchestrator.agent.txt +224 -0
- package/dist/agents/analyst.txt +69 -0
- package/dist/agents/architect.txt +67 -0
- package/dist/agents/code-tour.agent.txt +232 -0
- package/dist/agents/dev.agent.txt +169 -0
- package/dist/agents/dev.txt +154 -0
- package/dist/agents/expert-react-frontend-engineer.agent.txt +765 -0
- package/dist/agents/pm.txt +57 -0
- package/dist/agents/po.txt +59 -0
- package/dist/agents/qa.txt +62 -0
- package/dist/agents/sm.txt +55 -0
- package/dist/agents/ui-expert.txt +63 -0
- package/dist/agents/ux-expert.txt +55 -0
- package/dist/dev-agent-bundle.txt +154 -0
- package/dist/teams/team-company.txt +10789 -0
- package/docs/mcp-servers.md +102 -0
- package/docs/orchestrator-guide.md +526 -0
- package/mcp/servers.json +108 -0
- package/mcp/servers.yaml +124 -0
- package/package.json +72 -0
- package/tools/cli.js +1864 -0
- package/tools/installer/README.md +24 -0
- package/tools/installer/lib/ide-setup.js +295 -0
- package/tools/installer/lib/installer.js +131 -0
- package/tools/md-assets/web-agent-startup-instructions.md +21 -0
- package/tools/postinstall.js +72 -0
- package/tools/shared/bannerArt.js +68 -0
- package/tools/validate-bundles.js +54 -0
- package/tools/verify-publish-registry.js +34 -0
|
@@ -0,0 +1,322 @@
|
|
|
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
|
+
mode: 'agent'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Comprehensive Project Architecture Blueprint Generator
|
|
7
|
+
|
|
8
|
+
## Configuration Variables
|
|
9
|
+
${PROJECT_TYPE="Auto-detect|.NET|Java|React|Angular|Python|Node.js|Flutter|Other"} <!-- Primary technology -->
|
|
10
|
+
${ARCHITECTURE_PATTERN="Auto-detect|Clean Architecture|Microservices|Layered|MVVM|MVC|Hexagonal|Event-Driven|Serverless|Monolithic|Other"} <!-- Primary architectural pattern -->
|
|
11
|
+
${DIAGRAM_TYPE="C4|UML|Flow|Component|None"} <!-- Architecture diagram type -->
|
|
12
|
+
${DETAIL_LEVEL="High-level|Detailed|Comprehensive|Implementation-Ready"} <!-- Level of detail to include -->
|
|
13
|
+
${INCLUDES_CODE_EXAMPLES=true|false} <!-- Include sample code to illustrate patterns -->
|
|
14
|
+
${INCLUDES_IMPLEMENTATION_PATTERNS=true|false} <!-- Include detailed implementation patterns -->
|
|
15
|
+
${INCLUDES_DECISION_RECORDS=true|false} <!-- Include architectural decision records -->
|
|
16
|
+
${FOCUS_ON_EXTENSIBILITY=true|false} <!-- Emphasize extension points and patterns -->
|
|
17
|
+
|
|
18
|
+
## Generated Prompt
|
|
19
|
+
|
|
20
|
+
"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:
|
|
21
|
+
|
|
22
|
+
### 1. Architecture Detection and Analysis
|
|
23
|
+
- ${PROJECT_TYPE == "Auto-detect" ? "Analyze the project structure to identify all technology stacks and frameworks in use by examining:
|
|
24
|
+
- Project and configuration files
|
|
25
|
+
- Package dependencies and import statements
|
|
26
|
+
- Framework-specific patterns and conventions
|
|
27
|
+
- Build and deployment configurations" : "Focus on ${PROJECT_TYPE} specific patterns and practices"}
|
|
28
|
+
|
|
29
|
+
- ${ARCHITECTURE_PATTERN == "Auto-detect" ? "Determine the architectural pattern(s) by analyzing:
|
|
30
|
+
- Folder organization and namespacing
|
|
31
|
+
- Dependency flow and component boundaries
|
|
32
|
+
- Interface segregation and abstraction patterns
|
|
33
|
+
- Communication mechanisms between components" : "Document how the ${ARCHITECTURE_PATTERN} architecture is implemented"}
|
|
34
|
+
|
|
35
|
+
### 2. Architectural Overview
|
|
36
|
+
- Provide a clear, concise explanation of the overall architectural approach
|
|
37
|
+
- Document the guiding principles evident in the architectural choices
|
|
38
|
+
- Identify architectural boundaries and how they're enforced
|
|
39
|
+
- Note any hybrid architectural patterns or adaptations of standard patterns
|
|
40
|
+
|
|
41
|
+
### 3. Architecture Visualization
|
|
42
|
+
${DIAGRAM_TYPE != "None" ? `Create ${DIAGRAM_TYPE} diagrams at multiple levels of abstraction:
|
|
43
|
+
- High-level architectural overview showing major subsystems
|
|
44
|
+
- Component interaction diagrams showing relationships and dependencies
|
|
45
|
+
- Data flow diagrams showing how information moves through the system
|
|
46
|
+
- Ensure diagrams accurately reflect the actual implementation, not theoretical patterns` : "Describe the component relationships based on actual code dependencies, providing clear textual explanations of:
|
|
47
|
+
- Subsystem organization and boundaries
|
|
48
|
+
- Dependency directions and component interactions
|
|
49
|
+
- Data flow and process sequences"}
|
|
50
|
+
|
|
51
|
+
### 4. Core Architectural Components
|
|
52
|
+
For each architectural component discovered in the codebase:
|
|
53
|
+
|
|
54
|
+
- **Purpose and Responsibility**:
|
|
55
|
+
- Primary function within the architecture
|
|
56
|
+
- Business domains or technical concerns addressed
|
|
57
|
+
- Boundaries and scope limitations
|
|
58
|
+
|
|
59
|
+
- **Internal Structure**:
|
|
60
|
+
- Organization of classes/modules within the component
|
|
61
|
+
- Key abstractions and their implementations
|
|
62
|
+
- Design patterns utilized
|
|
63
|
+
|
|
64
|
+
- **Interaction Patterns**:
|
|
65
|
+
- How the component communicates with others
|
|
66
|
+
- Interfaces exposed and consumed
|
|
67
|
+
- Dependency injection patterns
|
|
68
|
+
- Event publishing/subscription mechanisms
|
|
69
|
+
|
|
70
|
+
- **Evolution Patterns**:
|
|
71
|
+
- How the component can be extended
|
|
72
|
+
- Variation points and plugin mechanisms
|
|
73
|
+
- Configuration and customization approaches
|
|
74
|
+
|
|
75
|
+
### 5. Architectural Layers and Dependencies
|
|
76
|
+
- Map the layer structure as implemented in the codebase
|
|
77
|
+
- Document the dependency rules between layers
|
|
78
|
+
- Identify abstraction mechanisms that enable layer separation
|
|
79
|
+
- Note any circular dependencies or layer violations
|
|
80
|
+
- Document dependency injection patterns used to maintain separation
|
|
81
|
+
|
|
82
|
+
### 6. Data Architecture
|
|
83
|
+
- Document domain model structure and organization
|
|
84
|
+
- Map entity relationships and aggregation patterns
|
|
85
|
+
- Identify data access patterns (repositories, data mappers, etc.)
|
|
86
|
+
- Document data transformation and mapping approaches
|
|
87
|
+
- Note caching strategies and implementations
|
|
88
|
+
- Document data validation patterns
|
|
89
|
+
|
|
90
|
+
### 7. Cross-Cutting Concerns Implementation
|
|
91
|
+
Document implementation patterns for cross-cutting concerns:
|
|
92
|
+
|
|
93
|
+
- **Authentication & Authorization**:
|
|
94
|
+
- Security model implementation
|
|
95
|
+
- Permission enforcement patterns
|
|
96
|
+
- Identity management approach
|
|
97
|
+
- Security boundary patterns
|
|
98
|
+
|
|
99
|
+
- **Error Handling & Resilience**:
|
|
100
|
+
- Exception handling patterns
|
|
101
|
+
- Retry and circuit breaker implementations
|
|
102
|
+
- Fallback and graceful degradation strategies
|
|
103
|
+
- Error reporting and monitoring approaches
|
|
104
|
+
|
|
105
|
+
- **Logging & Monitoring**:
|
|
106
|
+
- Instrumentation patterns
|
|
107
|
+
- Observability implementation
|
|
108
|
+
- Diagnostic information flow
|
|
109
|
+
- Performance monitoring approach
|
|
110
|
+
|
|
111
|
+
- **Validation**:
|
|
112
|
+
- Input validation strategies
|
|
113
|
+
- Business rule validation implementation
|
|
114
|
+
- Validation responsibility distribution
|
|
115
|
+
- Error reporting patterns
|
|
116
|
+
|
|
117
|
+
- **Configuration Management**:
|
|
118
|
+
- Configuration source patterns
|
|
119
|
+
- Environment-specific configuration strategies
|
|
120
|
+
- Secret management approach
|
|
121
|
+
- Feature flag implementation
|
|
122
|
+
|
|
123
|
+
### 8. Service Communication Patterns
|
|
124
|
+
- Document service boundary definitions
|
|
125
|
+
- Identify communication protocols and formats
|
|
126
|
+
- Map synchronous vs. asynchronous communication patterns
|
|
127
|
+
- Document API versioning strategies
|
|
128
|
+
- Identify service discovery mechanisms
|
|
129
|
+
- Note resilience patterns in service communication
|
|
130
|
+
|
|
131
|
+
### 9. Technology-Specific Architectural Patterns
|
|
132
|
+
${PROJECT_TYPE == "Auto-detect" ? "For each detected technology stack, document specific architectural patterns:" : `Document ${PROJECT_TYPE}-specific architectural patterns:`}
|
|
133
|
+
|
|
134
|
+
${(PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect") ?
|
|
135
|
+
"#### .NET Architectural Patterns (if detected)
|
|
136
|
+
- Host and application model implementation
|
|
137
|
+
- Middleware pipeline organization
|
|
138
|
+
- Framework service integration patterns
|
|
139
|
+
- ORM and data access approaches
|
|
140
|
+
- API implementation patterns (controllers, minimal APIs, etc.)
|
|
141
|
+
- Dependency injection container configuration" : ""}
|
|
142
|
+
|
|
143
|
+
${(PROJECT_TYPE == "Java" || PROJECT_TYPE == "Auto-detect") ?
|
|
144
|
+
"#### Java Architectural Patterns (if detected)
|
|
145
|
+
- Application container and bootstrap process
|
|
146
|
+
- Dependency injection framework usage (Spring, CDI, etc.)
|
|
147
|
+
- AOP implementation patterns
|
|
148
|
+
- Transaction boundary management
|
|
149
|
+
- ORM configuration and usage patterns
|
|
150
|
+
- Service implementation patterns" : ""}
|
|
151
|
+
|
|
152
|
+
${(PROJECT_TYPE == "React" || PROJECT_TYPE == "Auto-detect") ?
|
|
153
|
+
"#### React Architectural Patterns (if detected)
|
|
154
|
+
- Component composition and reuse strategies
|
|
155
|
+
- State management architecture
|
|
156
|
+
- Side effect handling patterns
|
|
157
|
+
- Routing and navigation approach
|
|
158
|
+
- Data fetching and caching patterns
|
|
159
|
+
- Rendering optimization strategies" : ""}
|
|
160
|
+
|
|
161
|
+
${(PROJECT_TYPE == "Angular" || PROJECT_TYPE == "Auto-detect") ?
|
|
162
|
+
"#### Angular Architectural Patterns (if detected)
|
|
163
|
+
- Module organization strategy
|
|
164
|
+
- Component hierarchy design
|
|
165
|
+
- Service and dependency injection patterns
|
|
166
|
+
- State management approach
|
|
167
|
+
- Reactive programming patterns
|
|
168
|
+
- Route guard implementation" : ""}
|
|
169
|
+
|
|
170
|
+
${(PROJECT_TYPE == "Python" || PROJECT_TYPE == "Auto-detect") ?
|
|
171
|
+
"#### Python Architectural Patterns (if detected)
|
|
172
|
+
- Module organization approach
|
|
173
|
+
- Dependency management strategy
|
|
174
|
+
- OOP vs. functional implementation patterns
|
|
175
|
+
- Framework integration patterns
|
|
176
|
+
- Asynchronous programming approach" : ""}
|
|
177
|
+
|
|
178
|
+
### 10. Implementation Patterns
|
|
179
|
+
${INCLUDES_IMPLEMENTATION_PATTERNS ?
|
|
180
|
+
"Document concrete implementation patterns for key architectural components:
|
|
181
|
+
|
|
182
|
+
- **Interface Design Patterns**:
|
|
183
|
+
- Interface segregation approaches
|
|
184
|
+
- Abstraction level decisions
|
|
185
|
+
- Generic vs. specific interface patterns
|
|
186
|
+
- Default implementation patterns
|
|
187
|
+
|
|
188
|
+
- **Service Implementation Patterns**:
|
|
189
|
+
- Service lifetime management
|
|
190
|
+
- Service composition patterns
|
|
191
|
+
- Operation implementation templates
|
|
192
|
+
- Error handling within services
|
|
193
|
+
|
|
194
|
+
- **Repository Implementation Patterns**:
|
|
195
|
+
- Query pattern implementations
|
|
196
|
+
- Transaction management
|
|
197
|
+
- Concurrency handling
|
|
198
|
+
- Bulk operation patterns
|
|
199
|
+
|
|
200
|
+
- **Controller/API Implementation Patterns**:
|
|
201
|
+
- Request handling patterns
|
|
202
|
+
- Response formatting approaches
|
|
203
|
+
- Parameter validation
|
|
204
|
+
- API versioning implementation
|
|
205
|
+
|
|
206
|
+
- **Domain Model Implementation**:
|
|
207
|
+
- Entity implementation patterns
|
|
208
|
+
- Value object patterns
|
|
209
|
+
- Domain event implementation
|
|
210
|
+
- Business rule enforcement" : "Mention that detailed implementation patterns vary across the codebase."}
|
|
211
|
+
|
|
212
|
+
### 11. Testing Architecture
|
|
213
|
+
- Document testing strategies aligned with the architecture
|
|
214
|
+
- Identify test boundary patterns (unit, integration, system)
|
|
215
|
+
- Map test doubles and mocking approaches
|
|
216
|
+
- Document test data strategies
|
|
217
|
+
- Note testing tools and frameworks integration
|
|
218
|
+
|
|
219
|
+
### 12. Deployment Architecture
|
|
220
|
+
- Document deployment topology derived from configuration
|
|
221
|
+
- Identify environment-specific architectural adaptations
|
|
222
|
+
- Map runtime dependency resolution patterns
|
|
223
|
+
- Document configuration management across environments
|
|
224
|
+
- Identify containerization and orchestration approaches
|
|
225
|
+
- Note cloud service integration patterns
|
|
226
|
+
|
|
227
|
+
### 13. Extension and Evolution Patterns
|
|
228
|
+
${FOCUS_ON_EXTENSIBILITY ?
|
|
229
|
+
"Provide detailed guidance for extending the architecture:
|
|
230
|
+
|
|
231
|
+
- **Feature Addition Patterns**:
|
|
232
|
+
- How to add new features while preserving architectural integrity
|
|
233
|
+
- Where to place new components by type
|
|
234
|
+
- Dependency introduction guidelines
|
|
235
|
+
- Configuration extension patterns
|
|
236
|
+
|
|
237
|
+
- **Modification Patterns**:
|
|
238
|
+
- How to safely modify existing components
|
|
239
|
+
- Strategies for maintaining backward compatibility
|
|
240
|
+
- Deprecation patterns
|
|
241
|
+
- Migration approaches
|
|
242
|
+
|
|
243
|
+
- **Integration Patterns**:
|
|
244
|
+
- How to integrate new external systems
|
|
245
|
+
- Adapter implementation patterns
|
|
246
|
+
- Anti-corruption layer patterns
|
|
247
|
+
- Service facade implementation" : "Document key extension points in the architecture."}
|
|
248
|
+
|
|
249
|
+
${INCLUDES_CODE_EXAMPLES ?
|
|
250
|
+
"### 14. Architectural Pattern Examples
|
|
251
|
+
Extract representative code examples that illustrate key architectural patterns:
|
|
252
|
+
|
|
253
|
+
- **Layer Separation Examples**:
|
|
254
|
+
- Interface definition and implementation separation
|
|
255
|
+
- Cross-layer communication patterns
|
|
256
|
+
- Dependency injection examples
|
|
257
|
+
|
|
258
|
+
- **Component Communication Examples**:
|
|
259
|
+
- Service invocation patterns
|
|
260
|
+
- Event publication and handling
|
|
261
|
+
- Message passing implementation
|
|
262
|
+
|
|
263
|
+
- **Extension Point Examples**:
|
|
264
|
+
- Plugin registration and discovery
|
|
265
|
+
- Extension interface implementations
|
|
266
|
+
- Configuration-driven extension patterns
|
|
267
|
+
|
|
268
|
+
Include enough context with each example to show the pattern clearly, but keep examples concise and focused on architectural concepts." : ""}
|
|
269
|
+
|
|
270
|
+
${INCLUDES_DECISION_RECORDS ?
|
|
271
|
+
"### 15. Architectural Decision Records
|
|
272
|
+
Document key architectural decisions evident in the codebase:
|
|
273
|
+
|
|
274
|
+
- **Architectural Style Decisions**:
|
|
275
|
+
- Why the current architectural pattern was chosen
|
|
276
|
+
- Alternatives considered (based on code evolution)
|
|
277
|
+
- Constraints that influenced the decision
|
|
278
|
+
|
|
279
|
+
- **Technology Selection Decisions**:
|
|
280
|
+
- Key technology choices and their architectural impact
|
|
281
|
+
- Framework selection rationales
|
|
282
|
+
- Custom vs. off-the-shelf component decisions
|
|
283
|
+
|
|
284
|
+
- **Implementation Approach Decisions**:
|
|
285
|
+
- Specific implementation patterns chosen
|
|
286
|
+
- Standard pattern adaptations
|
|
287
|
+
- Performance vs. maintainability tradeoffs
|
|
288
|
+
|
|
289
|
+
For each decision, note:
|
|
290
|
+
- Context that made the decision necessary
|
|
291
|
+
- Factors considered in making the decision
|
|
292
|
+
- Resulting consequences (positive and negative)
|
|
293
|
+
- Future flexibility or limitations introduced" : ""}
|
|
294
|
+
|
|
295
|
+
### ${INCLUDES_DECISION_RECORDS ? "16" : INCLUDES_CODE_EXAMPLES ? "15" : "14"}. Architecture Governance
|
|
296
|
+
- Document how architectural consistency is maintained
|
|
297
|
+
- Identify automated checks for architectural compliance
|
|
298
|
+
- Note architectural review processes evident in the codebase
|
|
299
|
+
- Document architectural documentation practices
|
|
300
|
+
|
|
301
|
+
### ${INCLUDES_DECISION_RECORDS ? "17" : INCLUDES_CODE_EXAMPLES ? "16" : "15"}. Blueprint for New Development
|
|
302
|
+
Create a clear architectural guide for implementing new features:
|
|
303
|
+
|
|
304
|
+
- **Development Workflow**:
|
|
305
|
+
- Starting points for different feature types
|
|
306
|
+
- Component creation sequence
|
|
307
|
+
- Integration steps with existing architecture
|
|
308
|
+
- Testing approach by architectural layer
|
|
309
|
+
|
|
310
|
+
- **Implementation Templates**:
|
|
311
|
+
- Base class/interface templates for key architectural components
|
|
312
|
+
- Standard file organization for new components
|
|
313
|
+
- Dependency declaration patterns
|
|
314
|
+
- Documentation requirements
|
|
315
|
+
|
|
316
|
+
- **Common Pitfalls**:
|
|
317
|
+
- Architecture violations to avoid
|
|
318
|
+
- Common architectural mistakes
|
|
319
|
+
- Performance considerations
|
|
320
|
+
- Testing blind spots
|
|
321
|
+
|
|
322
|
+
Include information about when this blueprint was generated and recommendations for keeping it updated as the architecture evolves."
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Validate and document the repository architecture and technology consistency.'
|
|
3
|
+
mode: 'agent'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Validate and document the repository architecture and technology consistency across the entire project.
|
|
7
|
+
|
|
8
|
+
Purpose
|
|
9
|
+
- Auto-detect technologies, manifests, and architectural patterns in the repository.
|
|
10
|
+
- Run deterministic checks for consistency, missing artifacts, and obvious risks.
|
|
11
|
+
- Produce both machine-readable findings (JSON) and a concise human-readable report (Markdown).
|
|
12
|
+
|
|
13
|
+
Constraints
|
|
14
|
+
- Only read repository files; do not perform network calls or modify files.
|
|
15
|
+
- If information is missing, mark it as unknown with low confidence and suggest exact local commands to run to resolve it.
|
|
16
|
+
- Be deterministic: same input repo must produce the same output.
|
|
17
|
+
|
|
18
|
+
Steps (agent must follow)
|
|
19
|
+
1. Walk the repository and collect files and metadata (path, size, file type, and first 20 lines where helpful).
|
|
20
|
+
2. Group files into components by folder/manifests.
|
|
21
|
+
3. For each component, infer language, package manager, build and test commands, runtime versions (if present), and whether CI is configured.
|
|
22
|
+
4. Run consistency checks (see below) and assign confidence scores (0.0-1.0) to inferred items.
|
|
23
|
+
5. Produce JSON findings and a Markdown summary as described in Output Format.
|
|
24
|
+
|
|
25
|
+
Checks to run per component (examples)
|
|
26
|
+
- Manifest presence: expected manifest exists (e.g., package.json for Node, pom.xml for Maven).
|
|
27
|
+
- Lockfile presence when expected (e.g., package-lock.json, yarn.lock, poetry.lock).
|
|
28
|
+
- Version coherence: runtime version declared in manifest matches other artifacts (e.g., Dockerfile FROM image tag).
|
|
29
|
+
- CI presence: workflow or pipeline config exists that builds/tests the component.
|
|
30
|
+
- Test presence: test folders or test dependencies are present.
|
|
31
|
+
- Mixed package managers in same component (flag as issue).
|
|
32
|
+
- Broken path references in docs/prompts (report path, line snippet).
|
|
33
|
+
- Potential secrets/secrets placeholders: detect obvious token patterns or files under mcp/ that reference tokens (do not show values).
|
|
34
|
+
|
|
35
|
+
Output Format (required)
|
|
36
|
+
1) JSON findings (single JSON object) with these top-level keys:
|
|
37
|
+
- repo: { name, path }
|
|
38
|
+
- summary: { components, languages, total_files, confidence }
|
|
39
|
+
- components: [
|
|
40
|
+
{ id, path, type, language, package_manager, manifests, inferred_runtime_versions, build_commands, test_commands, has_ci, checks, recommendations }
|
|
41
|
+
]
|
|
42
|
+
- global_checks: [ { id, description, pass, confidence, details } ]
|
|
43
|
+
- recommendations: [ { id, description, priority, effort, affected_components } ]
|
|
44
|
+
- metadata: { generated_at (ISO8601), tool, version }
|
|
45
|
+
|
|
46
|
+
Notes for JSON
|
|
47
|
+
- Use numeric confidence (0.0-1.0).
|
|
48
|
+
- Keep identifiers deterministic and stable (use normalized path strings).
|
|
49
|
+
|
|
50
|
+
2) Markdown summary (max ~1200 words):
|
|
51
|
+
- Title: "Architecture Validation — <repo name>"
|
|
52
|
+
- One-paragraph overview of inferred architecture and primary technologies.
|
|
53
|
+
- Bullet list of components: path, language, main status (OK / Issues).
|
|
54
|
+
- Top 5 prioritized recommendations (one line each).
|
|
55
|
+
- Checklist of failing high-severity checks.
|
|
56
|
+
- "How I inferred" short heuristics list.
|
|
57
|
+
- Minimal examples of how to fix the top 2 issues with PowerShell-compatible commands.
|
|
58
|
+
- Quality gates: Build, Lint/Typecheck, Tests (PASS/FAIL).
|
|
59
|
+
|
|
60
|
+
Quality gates
|
|
61
|
+
- Build: each code component must have at least one build command or CI pipeline (PASS/FAIL).
|
|
62
|
+
- Lint/Typecheck: evidence of lint or typecheck config for major languages (PASS/FAIL).
|
|
63
|
+
- Tests: presence of test folders or test manifests (PASS/FAIL).
|
|
64
|
+
|
|
65
|
+
Behavior
|
|
66
|
+
- Be concise. Use bullets and short sentences.
|
|
67
|
+
- Prioritize actionable remediation steps with estimated effort (Low/Medium/High).
|
|
68
|
+
- When recommending commands, use PowerShell-safe commands in fenced blocks.
|
|
69
|
+
|
|
70
|
+
Begin by listing detected top-level manifests and components (one-line each), then provide the full JSON findings object, followed by the Markdown summary and a final 3-step next-action plan.
|
|
71
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Perform a code review"
|
|
3
|
+
mode : 'ask'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Code Review Expert: Detailed Analysis and Best Practices
|
|
7
|
+
|
|
8
|
+
As a senior software engineer with expertise in code quality, security, and performance optimization, perform a code review of the provided git diff.
|
|
9
|
+
|
|
10
|
+
Focus on delivering actionable feedback in the following areas:
|
|
11
|
+
|
|
12
|
+
Critical Issues:
|
|
13
|
+
- Security vulnerabilities and potential exploits
|
|
14
|
+
- Runtime errors and logic bugs
|
|
15
|
+
- Performance bottlenecks and optimization opportunities
|
|
16
|
+
- Memory management and resource utilization
|
|
17
|
+
- Threading and concurrency issues
|
|
18
|
+
- Input validation and error handling
|
|
19
|
+
|
|
20
|
+
Code Quality:
|
|
21
|
+
- Adherence to language-specific conventions and best practices
|
|
22
|
+
- Design patterns and architectural considerations
|
|
23
|
+
- Code organization and modularity
|
|
24
|
+
- Naming conventions and code readability
|
|
25
|
+
- Documentation completeness and clarity
|
|
26
|
+
- Test coverage and testing approach
|
|
27
|
+
|
|
28
|
+
Maintainability:
|
|
29
|
+
- Code duplication and reusability
|
|
30
|
+
- Complexity metrics (cyclomatic complexity, cognitive complexity)
|
|
31
|
+
- Dependencies and coupling
|
|
32
|
+
- Extensibility and future-proofing
|
|
33
|
+
- Technical debt implications
|
|
34
|
+
|
|
35
|
+
Provide specific recommendations with:
|
|
36
|
+
- Code examples for suggested improvements
|
|
37
|
+
- References to relevant documentation or standards
|
|
38
|
+
- Rationale for suggested changes
|
|
39
|
+
- Impact assessment of proposed modifications
|
|
40
|
+
|
|
41
|
+
Format your review using clear sections and bullet points. Include inline code references where applicable.
|
|
42
|
+
|
|
43
|
+
Note: This review should comply with the project's established coding standards and architectural guidelines.
|
|
44
|
+
|
|
45
|
+
## Constraints
|
|
46
|
+
|
|
47
|
+
* **IMPORTANT**: Use `git --no-pager diff --no-prefix --unified=100000 --minimal $(git merge-base main --fork-point)...head` to get the diff for code review.
|
|
48
|
+
* In the provided git diff, if the line start with `+` or `-`, it means that the line is added or removed. If the line starts with a space, it means that the line is unchanged. If the line starts with `@@`, it means that the line is a hunk header.
|
|
49
|
+
|
|
50
|
+
* Avoid overwhelming the developer with too many suggestions at once.
|
|
51
|
+
* Use clear and concise language to ensure understanding.
|
|
52
|
+
|
|
53
|
+
* Assume suppressions are needed like `#pragma warning disable` and don't include them in the review.
|
|
54
|
+
* If there are any TODO comments, make sure to address them in the review.
|
|
55
|
+
|
|
56
|
+
* Use markdown for each suggestion, like
|
|
57
|
+
```
|
|
58
|
+
# Code Review for ${feature_description}
|
|
59
|
+
|
|
60
|
+
Overview of the code changes, including the purpose of the feature, any relevant context, and the files involved.
|
|
61
|
+
|
|
62
|
+
# Suggestions
|
|
63
|
+
|
|
64
|
+
## ${code_review_emoji} ${Summary of the suggestion, include necessary context to understand suggestion}
|
|
65
|
+
* **Priority**: ${priority: (🔥/⚠️/🟡/🟢)}
|
|
66
|
+
* **File**: ${relative/path/to/file}
|
|
67
|
+
* **Details**: ...
|
|
68
|
+
* **Example** (if applicable): ...
|
|
69
|
+
* **Suggested Change** (if applicable): (code snippet...)
|
|
70
|
+
|
|
71
|
+
## (other suggestions...)
|
|
72
|
+
...
|
|
73
|
+
|
|
74
|
+
# Summary
|
|
75
|
+
```
|
|
76
|
+
* Use the following emojis to indicate the priority of the suggestions:
|
|
77
|
+
* 🔥 Critical
|
|
78
|
+
* ⚠️ High
|
|
79
|
+
* 🟡 Medium
|
|
80
|
+
* 🟢 Low
|
|
81
|
+
* Each suggestion should be prefixed with an emoji to indicate the type of suggestion:
|
|
82
|
+
* 🔧 Change request
|
|
83
|
+
* ❓ Question
|
|
84
|
+
* ⛏️ Nitpick
|
|
85
|
+
* ♻️ Refactor suggestion
|
|
86
|
+
* 💭 Thought process or concern
|
|
87
|
+
* 👍 Positive feedback
|
|
88
|
+
* 📝 Explanatory note or fun fact
|
|
89
|
+
* 🌱 Observation for future consideration
|
|
90
|
+
* Always use file paths
|
|
91
|
+
|
|
92
|
+
### Use Code Review Emojis
|
|
93
|
+
|
|
94
|
+
Use code review emojis. Give the reviewee added context and clarity to follow up on code review. For example, knowing whether something really requires action (🔧), highlighting nit-picky comments (⛏), flagging out of scope items for follow-up (📌) and clarifying items that don’t necessarily require action but are worth saying ( 👍, 📝, 🤔 )
|
|
95
|
+
|
|
96
|
+
#### Emoji Legend
|
|
97
|
+
|
|
98
|
+
| | `:code:` | Meaning |
|
|
99
|
+
| :---: | :-----------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
100
|
+
| 🔧 | `:wrench:` | Use when this needs to be changed. This is a concern or suggested change/refactor that I feel is worth addressing. |
|
|
101
|
+
| ❓ | `:question:` | Use when you have a question. This should be a fully formed question with sufficient information and context that requires a response. |
|
|
102
|
+
| ⛏ | `:pick:` | This is a nitpick. This does not require any changes and is often better left unsaid. This may include stylistic, formatting, or organization suggestions and should likely be prevented/enforced by linting if they really matter |
|
|
103
|
+
| ♻️ | `:recycle:` | Suggestion for refactoring. Should include enough context to be actionable and not be considered a nitpick. |
|
|
104
|
+
| 💭 | `:thought_balloon:` | Express concern, suggest an alternative solution, or walk through the code in my own words to make sure I understand. |
|
|
105
|
+
| 👍 | `:+1:` | Let the author know that you really liked something! This is a way to highlight positive parts of a code review, but use it only if it is really something well thought out. |
|
|
106
|
+
| 📝 | `:memo:` | This is an explanatory note, fun fact, or relevant commentary that does not require any action. |
|
|
107
|
+
| 🌱 | `:seedling:` | An observation or suggestion that is not a change request, but may have larger implications. Generally something to keep in mind for the future. |
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Prompt for generating Confluence documentation in Markdown format.'
|
|
3
|
+
mode: 'agent'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Important: This prompt expects the host environment to provide a tool named `confluence_get_page` (an Atlassian MCP integration) that accepts a Confluence space key and page title or page id and returns the page content and metadata. If `confluence_get_page` is not available in the execution environment, STOP and report to the user that the tool is unavailable and that network/MCP access is required.
|
|
7
|
+
|
|
8
|
+
When a user provides a Confluence URL (for example: `https://your-company.atlassian.net/wiki/display/PROJ/Page+Title`), you MUST do the following before fetching content:
|
|
9
|
+
|
|
10
|
+
- Parse the URL and extract the space key and page title (or page id if the URL contains `pages/<id>`). Rules:
|
|
11
|
+
- If the URL contains `/display/{SPACE}/{Page+Title}`, then `SPACE` is the space key and the page title is the portion after the space, with `+` decoded to spaces.
|
|
12
|
+
- If the URL contains `/pages/{id}`, extract the numeric page id.
|
|
13
|
+
- Normalize the page title by URL-decoding and trimming leading/trailing whitespace.
|
|
14
|
+
|
|
15
|
+
- Confirm back to the user the extracted values in one short line, for example: `Extracted space key: INV, page title: Flows for instruments` and then proceed.
|
|
16
|
+
|
|
17
|
+
- Use the `confluence_get_page` tool with the extracted identifiers. The call should request the page in Storage (HTML) format along with full metadata (title, id, space, url, version, created/updated timestamps, author, labels, attachments list).
|
|
18
|
+
|
|
19
|
+
- If the `confluence_get_page` tool returns an error indicating the page is restricted or inaccessible, report that to the user and do not attempt further fetches for that page unless explicit permission is granted.
|
|
20
|
+
|
|
21
|
+
- If the `confluence_get_page` tool is not available, do NOT attempt to call Confluence APIs directly. Immediately inform the user: "The required `confluence_get_page` tool is not available in this environment. I cannot fetch Confluence pages without MCP access. Please provide the page content or enable the tool."
|
|
22
|
+
|
|
23
|
+
Additional details:
|
|
24
|
+
- Assumptions the agent can rely on (must verify before running):
|
|
25
|
+
- You have valid Confluence access and appropriate permissions to read pages and attachments.
|
|
26
|
+
- The Confluence content format can be either Storage (HTML-like) or WYSIWYG; the agent must detect and handle both.
|
|
27
|
+
- The user will provide either a page ID or space key + title
|
|
28
|
+
- Network rate limits and transient HTTP errors can occur; implement retries with exponential backoff (3 attempts default).
|
|
29
|
+
|
|
30
|
+
1) Reasoning / Plan (required):
|
|
31
|
+
- For each run, produce a 3–6 sentence plan describing inputs, scope, number of pages estimated, attachments expected, and any ambiguous items that require user confirmation. Wait for confirmation when key inputs are missing or ambiguous (e.g., both space_keys and page_ids absent).
|
|
32
|
+
|
|
33
|
+
2) Discovery:
|
|
34
|
+
- Resolve the list of pages to export based on scope.
|
|
35
|
+
- For space_keys: list pages via Confluence API (paginate). Respect include/exclude label filters.
|
|
36
|
+
- For root_page_id: traverse children up to configured depth.
|
|
37
|
+
- For page_ids: validate each id exists and record metadata.
|
|
38
|
+
|
|
39
|
+
3) Fetch content:
|
|
40
|
+
- For each resolved page id, fetch storage-format content (prefer Storage format via API).
|
|
41
|
+
- Also fetch page metadata: title, id, space, url, version, created/updated timestamps, author, labels, and list of attachments (name, id, mediaType, download link).
|
|
42
|
+
|
|
43
|
+
4) Conversion rules:
|
|
44
|
+
- Convert Storage/HTML content to GitHub-flavored Markdown.
|
|
45
|
+
- Preserve headings, lists, tables, code blocks, blockquotes.
|
|
46
|
+
- Convert Confluence-specific macros:
|
|
47
|
+
- Jira macros: replace with a short link or a placeholder with the referenced issue keys.
|
|
48
|
+
- Include/excerpt macros: inline the fetched content where possible; otherwise insert a clear placeholder with the source page id and URL.
|
|
49
|
+
- Other unsupported macros: insert a markdown placeholder with macro name and parameters.
|
|
50
|
+
- Convert internal Confluence links:
|
|
51
|
+
- If link_style == "relative": map to local markdown filenames using `page_name_template` and make links relative.
|
|
52
|
+
- If absolute: keep original Confluence URLs.
|
|
53
|
+
- Record broken or unresolvable links in a `links-report.json`.
|
|
54
|
+
- Images and attachments:
|
|
55
|
+
- If attachments==true and image_handling=="save_and_link": download attachments to `output_dir/assets/<page-id>/` and replace src with relative path.
|
|
56
|
+
- If "embed_base64": embed small images as data URIs (limit configurable; default 100KB).
|
|
57
|
+
- For attachments that are not images (PDFs, etc.), download and place in assets folder and link to them from the markdown.
|
|
58
|
+
|
|
59
|
+
5) Output file format per page:
|
|
60
|
+
- Each page must become one markdown file named per `page_name_template`. Filenames must be sanitized for filesystem compatibility.
|
|
61
|
+
- Prepend YAML frontmatter with the following fields:
|
|
62
|
+
- title: original page title
|
|
63
|
+
- confluence_id: page id
|
|
64
|
+
- space: space key
|
|
65
|
+
- confluence_url: canonical URL
|
|
66
|
+
- version: version number
|
|
67
|
+
- created_at: ISO timestamp
|
|
68
|
+
- updated_at: ISO timestamp
|
|
69
|
+
- author: name or account id
|
|
70
|
+
- labels: [list]
|
|
71
|
+
- attachments: [{ name, path_relative, mediaType }]
|
|
72
|
+
- After frontmatter, include a "source" section that contains a short provenance line: "Exported from Confluence space {space} page {id} on {export_date}".
|
|
73
|
+
- Then the converted markdown content.
|
|
74
|
+
|
|
75
|
+
6) Manifest and reports:
|
|
76
|
+
- Write `export-manifest.json` in `output_dir` listing all exported pages with metadata and file paths.
|
|
77
|
+
- Write `links-report.json` with unresolved links, mapped links, and any conversion warnings.
|
|
78
|
+
- Write `errors.log` with any pages skipped and error reasons.
|
|
79
|
+
|
|
80
|
+
7) Idempotency & safe runs:
|
|
81
|
+
- If a file already exists, compare Confluence page updated_at with a stored manifest_version; skip or overwrite based on `--force` flag (agent must ask the user if overwrite policy is not provided).
|
|
82
|
+
- Maintain a lightweight cache of page ids and etags to speed repeated runs.
|
|
83
|
+
|
|
84
|
+
8) Error handling:
|
|
85
|
+
- Retry HTTP requests up to 3 times with exponential backoff for 5xx errors and transient network failures.
|
|
86
|
+
- For 401/403, report authentication failure and stop.
|
|
87
|
+
- For rate limiting (429), honor Retry-After header.
|
|
88
|
+
|
|
89
|
+
Output Format (explicit):
|
|
90
|
+
- A directory at `output_dir` containing:
|
|
91
|
+
- For each page: `{sanitized-filename}.md` with YAML frontmatter + content.
|
|
92
|
+
- `assets/` subfolders organizing attachments by page id: `assets/<page-id>/...`
|
|
93
|
+
- `export-manifest.json` (JSON array of page metadata and file paths)
|
|
94
|
+
- `links-report.json` (JSON detailing internal link mappings and broken links)
|
|
95
|
+
- `errors.log` (text log)
|
|
96
|
+
- All JSON outputs must be machine-parseable (UTF-8, newline-delimited pretty-print).
|
|
97
|
+
|
|
98
|
+
Examples (start and end markers; placeholders MUST be used):
|
|
99
|
+
- Example Input (placeholder):
|
|
100
|
+
- confluence_base_url: [https://yourcompany.atlassian.net/wiki]
|
|
101
|
+
- auth_method: [mcp_credential]
|
|
102
|
+
- scope: { space_keys: ["REQ"], include_labels: ["requirements"], depth: 2 }
|
|
103
|
+
- output_dir: [/tmp/confluence-requirements-export]
|
|
104
|
+
- Example Output (one per page):
|
|
105
|
+
- File: `REQ-User-Login-12345.md`
|
|
106
|
+
- YAML frontmatter:
|
|
107
|
+
---
|
|
108
|
+
title: "User Login"
|
|
109
|
+
confluence_id: "12345"
|
|
110
|
+
space: "REQ"
|
|
111
|
+
confluence_url: "https://yourcompany.atlassian.net/wiki/spaces/REQ/pages/12345"
|
|
112
|
+
version: 4
|
|
113
|
+
created_at: "2023-05-01T12:00:00Z"
|
|
114
|
+
updated_at: "2024-02-10T09:30:00Z"
|
|
115
|
+
author: "Jane Doe"
|
|
116
|
+
labels: ["requirements","auth"]
|
|
117
|
+
attachments:
|
|
118
|
+
- name: "login-flow.png"
|
|
119
|
+
path_relative: "assets/12345/login-flow.png"
|
|
120
|
+
mediaType: "image/png"
|
|
121
|
+
---
|
|
122
|
+
Exported from Confluence space REQ page 12345 on 2025-10-28T12:00:00Z
|
|
123
|
+
# User Login
|
|
124
|
+
...
|
|
125
|
+
|
|
126
|
+
Notes / Edge cases:
|
|
127
|
+
- Large pages: if converted markdown exceeds filesystem limits, warn and truncate title-based filename using `{id}` fallback.
|
|
128
|
+
- Attachment name collisions: deduplicate by appending numeric suffixes or use UUIDs; record original names in manifest.
|
|
129
|
+
- Confluence macros that render dynamic content (e.g., reports): include a placeholder and, when possible, fetch underlying data (e.g., Jira issue keys) to provide stable references.
|
|
130
|
+
- If conversion of complex tables or diagrams fails, include both a markdown placeholder and save the original HTML snippet into `assets/<page-id>/raw-<id>.html`.
|
|
131
|
+
|
|
132
|
+
User prompts & confirmations:
|
|
133
|
+
- If required inputs are missing, ask succinct clarifying questions before proceeding (e.g., "Provide Confluence base URL and either page_ids, space_keys, or root_page_id+depth.").
|
|
134
|
+
- If overwrite policy is not set and existing files are present, ask: "Existing files detected in {output_dir}. Overwrite? [yes/no/skip/backup]" and wait for explicit confirmation.
|
|
135
|
+
|
|
136
|
+
Success criteria (how to verify):
|
|
137
|
+
- Every requested page produces a `.md` file with YAML frontmatter and valid Markdown body.
|
|
138
|
+
- All in-page images and attachments referenced when attachments==true are downloaded into `assets/` and linked relative.
|
|
139
|
+
- `export-manifest.json` lists all pages and their output paths.
|
|
140
|
+
- `links-report.json` contains zero unresolved internal links (or a clear list if unresolved).
|
|
141
|
+
- No unhandled exceptions; all failures logged in `errors.log`.
|
|
142
|
+
|
|
143
|
+
Performance / Rate-limiting guidance:
|
|
144
|
+
- Use pagination and parallelize content fetches moderately (max 5 concurrent requests by default) to avoid rate limits; expose concurrency setting to the caller.
|
|
145
|
+
|
|
146
|
+
Security:
|
|
147
|
+
- Never print or include `auth_credentials` in the exported files or logs.
|
|
148
|
+
- Respect any data retention/export policies; if a page is marked restricted, do not export it unless explicit permission is confirmed.
|
|
149
|
+
|
|
150
|
+
# Output Format
|
|
151
|
+
- The agent must return JSON summarizing the run when finished (in addition to writing files). The JSON must include:
|
|
152
|
+
{
|
|
153
|
+
"exported_pages": N,
|
|
154
|
+
"skipped_pages": [ { "id": "...", "reason":"..." } ],
|
|
155
|
+
"output_dir": "[path]",
|
|
156
|
+
"manifest_path": "output_dir/export-manifest.json",
|
|
157
|
+
"links_report_path": "output_dir/links-report.json",
|
|
158
|
+
"errors_log": "output_dir/errors.log",
|
|
159
|
+
"warnings": [ ... ]
|
|
160
|
+
}
|
|
161
|
+
- After the JSON summary, print a one-line human-friendly summary.
|
|
162
|
+
|
|
163
|
+
# Notes
|
|
164
|
+
- Always require explicit confirmation before performing write/overwrite actions on the filesystem.
|
|
165
|
+
- Favor fidelity of content and provenance over cosmetic formatting changes.
|
|
166
|
+
- If the agent cannot perform network calls (no MCP access), it must stop and clearly report that network access is unavailable and list the minimal manual steps to run the export offline (e.g., provide HTML exports to be converted).
|
|
167
|
+
- Keep logs structured and machine-readable where possible.
|