@abarcenas/ai-workflow-template 1.1.0 → 1.13.0
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/.agents/instructions/learned-knowledge.instructions.md +46 -0
- package/{.github → .agents}/instructions/memory-bank.instructions.md +14 -0
- package/{.github → .agents}/instructions/task-implementation.instructions.md +8 -0
- package/.agents/skills/architecture-blueprint-generator/SKILL.md +378 -0
- package/.agents/skills/cavecrew/SKILL.md +82 -0
- package/.agents/skills/caveman/SKILL.md +74 -0
- package/.agents/skills/caveman-commit/SKILL.md +65 -0
- package/.agents/skills/caveman-compress/README.md +163 -0
- package/.agents/skills/caveman-compress/SECURITY.md +31 -0
- package/.agents/skills/caveman-compress/SKILL.md +111 -0
- package/.agents/skills/caveman-compress/scripts/__init__.py +9 -0
- package/.agents/skills/caveman-compress/scripts/__main__.py +3 -0
- package/.agents/skills/caveman-compress/scripts/benchmark.py +78 -0
- package/.agents/skills/caveman-compress/scripts/cli.py +85 -0
- package/.agents/skills/caveman-compress/scripts/compress.py +254 -0
- package/.agents/skills/caveman-compress/scripts/detect.py +121 -0
- package/.agents/skills/caveman-compress/scripts/validate.py +213 -0
- package/.agents/skills/caveman-help/SKILL.md +59 -0
- package/.agents/skills/caveman-review/SKILL.md +55 -0
- package/.agents/skills/caveman-stats/SKILL.md +10 -0
- package/.agents/skills/compress/SKILL.md +111 -0
- package/.agents/skills/compress/scripts/__init__.py +9 -0
- package/.agents/skills/compress/scripts/__main__.py +3 -0
- package/.agents/skills/compress/scripts/benchmark.py +78 -0
- package/.agents/skills/compress/scripts/cli.py +85 -0
- package/.agents/skills/compress/scripts/compress.py +254 -0
- package/.agents/skills/compress/scripts/detect.py +121 -0
- package/.agents/skills/compress/scripts/validate.py +213 -0
- package/{.github/agents/implementation-plan.agent.md → .agents/skills/create-implementation-plan/SKILL.md} +17 -52
- package/.agents/skills/create-specification/SKILL.md +127 -0
- package/AGENTS.md +149 -0
- package/README.md +197 -60
- package/opencode.mcp.example.json +54 -0
- package/package.json +13 -5
- package/scripts/mcp/playwright-mcp-launcher.js +46 -0
- package/scripts/sync.js +54 -11
- package/.github/agents/plan.agent.md +0 -135
- package/.github/agents/research-spike.agent.md +0 -204
- package/.github/prompts/copilot-instructions-blueprint-generator.prompt.md +0 -317
- /package/{.github → .agents}/instructions/agent-safety.instructions.md +0 -0
- /package/{.github → .agents}/instructions/agent-skill.instructions.md +0 -0
- /package/{.github → .agents}/instructions/agent.instructions.md +0 -0
- /package/{.github → .agents}/instructions/ai-prompt-engineering-safety.instructions.md +0 -0
- /package/{.github → .agents}/instructions/angular.instructions.md +0 -0
- /package/{.github → .agents}/instructions/context7.instructions.md +0 -0
- /package/{.github → .agents}/instructions/go.instructions.md +0 -0
- /package/{.github → .agents}/instructions/html-to-css-guide.instructions.md +0 -0
- /package/{.github → .agents}/instructions/instructions.instructions.md +0 -0
- /package/{.github → .agents}/instructions/markdown.instructions.md +0 -0
- /package/{.github → .agents}/instructions/nodejs-vitest.instructions.md +0 -0
- /package/{.github → .agents}/instructions/playwright-typescript.instructions.md +0 -0
- /package/{.github → .agents}/instructions/prompt.instructions.md +0 -0
- /package/{.github → .agents}/instructions/security-owasp.instructions.md +0 -0
- /package/{.github → .agents}/instructions/shell.instructions.md +0 -0
- /package/{.github → .agents}/instructions/typescript.instructions.md +0 -0
- /package/{.github → .agents}/prompts/documentation-writer.prompt.md +0 -0
- /package/{.github → .agents}/prompts/editconfig.prompt.md +0 -0
- /package/{.github → .agents}/prompts/playwright-explore.prompt.md +0 -0
- /package/{.github → .agents}/prompts/playwright-generate-test.prompt.md +0 -0
- /package/{.github → .agents}/skills/agent-governance/SKILL.md +0 -0
- /package/{.github → .agents}/skills/boost-prompt/SKILL.md +0 -0
- /package/{.github → .agents}/skills/chrome-devtools/SKILL.md +0 -0
- /package/{.github → .agents}/skills/context-map/SKILL.md +0 -0
- /package/{.github → .agents}/skills/conventional-commit/SKILL.md +0 -0
- /package/{.github → .agents}/skills/create-readme/SKILL.md +0 -0
- /package/{.github → .agents}/skills/editorconfig/SKILL.md +0 -0
- /package/{.github → .agents}/skills/gh-cli/SKILL.md +0 -0
- /package/{.github → .agents}/skills/git-commit/SKILL.md +0 -0
- /package/{.github → .agents}/skills/github-issues/SKILL.md +0 -0
- /package/{.github → .agents}/skills/github-issues/references/templates.md +0 -0
- /package/{.github → .agents}/skills/microsoft-docs/SKILL.md +0 -0
- /package/{.github → .agents}/skills/playwright-explore-website/SKILL.md +0 -0
- /package/{.github → .agents}/skills/playwright-generate-test/SKILL.md +0 -0
- /package/{.github → .agents}/skills/polygot-test-agent/SKILL.md +0 -0
- /package/{.github → .agents}/skills/polygot-test-agent/unit-test-genearation.prompt.md +0 -0
- /package/{.github → .agents}/skills/prompt-builder/SKILL.md +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**"
|
|
3
|
+
description: "Persistent project knowledge accumulated across sessions. This file grows over time as agents discover patterns, conventions, gotchas, and preferences during work. It enables self-improvement — each session learns from the last."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Learned Project Knowledge
|
|
7
|
+
|
|
8
|
+
This file is the project's cumulative memory. It is read at the start of every session and updated at the end of every orchestrated pipeline.
|
|
9
|
+
|
|
10
|
+
## How to Use
|
|
11
|
+
|
|
12
|
+
- **Read this file** at the beginning of every task to apply previously discovered patterns and conventions.
|
|
13
|
+
- **Append new entries** when you discover something that would help future sessions (patterns, gotchas, preferences).
|
|
14
|
+
- **Never overwrite** — only append. This is a living log.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Project Overview
|
|
19
|
+
|
|
20
|
+
<!-- High-level project description filled in over time -->
|
|
21
|
+
|
|
22
|
+
## Conventions & Patterns
|
|
23
|
+
|
|
24
|
+
<!-- Coding conventions, architectural patterns, naming conventions discovered in this project -->
|
|
25
|
+
|
|
26
|
+
## Gotchas & Deviations
|
|
27
|
+
|
|
28
|
+
<!-- Unexpected behaviors, tricky configs, known pitfalls -->
|
|
29
|
+
|
|
30
|
+
## Preferences
|
|
31
|
+
|
|
32
|
+
<!-- User preferences about tooling, style, approach, etc. -->
|
|
33
|
+
|
|
34
|
+
## Architecture Decisions
|
|
35
|
+
|
|
36
|
+
<!-- Key technical decisions and their rationale -->
|
|
37
|
+
|
|
38
|
+
## Agent Tuning Notes
|
|
39
|
+
|
|
40
|
+
<!-- Per-agent prompt improvements discovered during sessions -->
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Session Log
|
|
45
|
+
|
|
46
|
+
<!-- New entries are appended here by the orchestrator after each pipeline -->
|
|
@@ -125,6 +125,20 @@ flowchart TD
|
|
|
125
125
|
Complete -->|No| Execute
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
### Audit Trail Requirement
|
|
129
|
+
|
|
130
|
+
All planning, implementation, and execution work must be recorded in Markdown files.
|
|
131
|
+
|
|
132
|
+
For every task:
|
|
133
|
+
|
|
134
|
+
- Create or update a task file in `tasks/` with the request, plan, progress, and decisions.
|
|
135
|
+
- Record implementation progress in the task progress log as work advances.
|
|
136
|
+
- Keep `tasks/_index.md` current.
|
|
137
|
+
- Use `progress.md` and `activeContext.md` for broader project status when relevant.
|
|
138
|
+
- Do not rely on chat alone for durable tracking of plans or execution history.
|
|
139
|
+
|
|
140
|
+
The Markdown record is the source of truth for auditing, traceability, and recovery after session resets.
|
|
141
|
+
|
|
128
142
|
## Documentation Updates
|
|
129
143
|
|
|
130
144
|
Memory Bank updates occur when:
|
|
@@ -11,6 +11,14 @@ Implementation progress MUST be tracked in a corresponding changes files located
|
|
|
11
11
|
|
|
12
12
|
## Core Implementation Process
|
|
13
13
|
|
|
14
|
+
### Markdown Audit Trail
|
|
15
|
+
|
|
16
|
+
All planning, implementation, and execution work must be recorded in Markdown files.
|
|
17
|
+
|
|
18
|
+
- Keep the plan file, the changes file, and any task-specific notes current as work progresses.
|
|
19
|
+
- Do not rely on chat alone for durable tracking of implementation decisions or progress.
|
|
20
|
+
- Treat the Markdown record as the source of truth for auditability and session recovery.
|
|
21
|
+
|
|
14
22
|
### 1. Plan Analysis and Preparation
|
|
15
23
|
|
|
16
24
|
**MUST complete before starting implementation:**
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture-blueprint-generator
|
|
3
|
+
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.'
|
|
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.
|
|
323
|
+
|
|
324
|
+
### ${INCLUDES_DECISION_RECORDS ? "18" : INCLUDES_CODE_EXAMPLES ? "17" : "16"}. Populate Agent Knowledge Base
|
|
325
|
+
|
|
326
|
+
Write the discovered architecture details into the persistent knowledge system so all orchestrator agents (researcher, architect, implementer, coder, tracker) inherit this context without rediscovery:
|
|
327
|
+
|
|
328
|
+
1. **Update `learned-knowledge.instructions.md`**:
|
|
329
|
+
- Append session entry with:
|
|
330
|
+
- **Pipeline:** `architecture-blueprint-generator`
|
|
331
|
+
- **New knowledge** section: detected tech stack, architectural pattern, layer structure, dependency rules, key abstractions
|
|
332
|
+
- Organize findings under the relevant sections (Conventions & Patterns, Architecture Decisions, Gotchas)
|
|
333
|
+
|
|
334
|
+
2. **Create/update `docs/.architecture-context.md`**:
|
|
335
|
+
A concise, agent-readable reference (~50-150 lines) with:
|
|
336
|
+
|
|
337
|
+
```markdown
|
|
338
|
+
# Architecture Context (Auto-Detected)
|
|
339
|
+
|
|
340
|
+
**Generated:** {date}
|
|
341
|
+
**Source:** architecture-blueprint-generator skill
|
|
342
|
+
|
|
343
|
+
## Tech Stack
|
|
344
|
+
| Layer | Technology | Version |
|
|
345
|
+
|---|---|---|
|
|
346
|
+
| Frontend | {detected} | {version} |
|
|
347
|
+
| Backend | {detected} | {version} |
|
|
348
|
+
| Database | {detected} | {version} |
|
|
349
|
+
| Infrastructure | {detected} | {version} |
|
|
350
|
+
|
|
351
|
+
## Architectural Pattern
|
|
352
|
+
{detected pattern} — {brief description, e.g., "Clean Architecture with CQRS"}
|
|
353
|
+
|
|
354
|
+
## Layer Structure
|
|
355
|
+
| Layer | Directory | Purpose | Depends On |
|
|
356
|
+
|---|---|---|---|
|
|
357
|
+
| {name} | {path} | {responsibility} | {layer names} |
|
|
358
|
+
|
|
359
|
+
## Key Abstractions
|
|
360
|
+
| Interface/Class | Location | Purpose | Implementations |
|
|
361
|
+
|---|---|---|---|
|
|
362
|
+
| `{name}` | `{path}` | {what it does} | {concrete classes} |
|
|
363
|
+
|
|
364
|
+
## Dependency Rules
|
|
365
|
+
- {direction rule}: e.g., "Presentation → Application → Domain ← Infrastructure"
|
|
366
|
+
- {enforcement}: e.g., "Enforced via ArchUnit tests in tests/Architecture"
|
|
367
|
+
|
|
368
|
+
## Notable Deviations / Gotchas
|
|
369
|
+
- {issue or quirk found}: {brief description}
|
|
370
|
+
|
|
371
|
+
## Extension Points
|
|
372
|
+
- {how to add new feature type}: {pattern to follow}
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
3. **After writing both files**, summarize in your output:
|
|
376
|
+
- `docs/.architecture-context.md` created/updated
|
|
377
|
+
- `learned-knowledge.instructions.md` appended
|
|
378
|
+
- Key findings that were persisted (3-5 bullet points)"
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cavecrew
|
|
3
|
+
description: >
|
|
4
|
+
Decision guide for delegating to caveman-style subagents. Tells the main
|
|
5
|
+
thread WHEN to spawn `cavecrew-investigator` (locate code), `cavecrew-builder`
|
|
6
|
+
(1-2 file edit), or `cavecrew-reviewer` (diff review) instead of doing the
|
|
7
|
+
work inline or using vanilla `Explore`. Subagent output is caveman-compressed
|
|
8
|
+
so the tool-result injected back into main context is ~60% smaller — main
|
|
9
|
+
context lasts longer across long sessions.
|
|
10
|
+
Trigger: "delegate to subagent", "use cavecrew", "spawn investigator/builder/reviewer",
|
|
11
|
+
"save context", "compressed agent output".
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Cavecrew = three subagent presets that emit caveman output. Same job as Anthropic defaults (`Explore`, edit-style agents, reviewer); difference is the tool-result they return is compressed, so main context shrinks per delegation.
|
|
15
|
+
|
|
16
|
+
## When to use cavecrew vs alternatives
|
|
17
|
+
|
|
18
|
+
| Task | Use |
|
|
19
|
+
|---|---|
|
|
20
|
+
| "Where is X defined / what calls Y / list uses of Z" | `cavecrew-investigator` |
|
|
21
|
+
| Same but you also want suggestions/architecture commentary | `Explore` (vanilla) |
|
|
22
|
+
| Surgical edit, ≤2 files, scope obvious | `cavecrew-builder` |
|
|
23
|
+
| New feature / 3+ files / cross-cutting refactor | Main thread or `feature-dev:code-architect` |
|
|
24
|
+
| Review diff, branch, or file for bugs | `cavecrew-reviewer` |
|
|
25
|
+
| Deep code review with rationale + alternatives | `Code Reviewer` (vanilla) |
|
|
26
|
+
| One-line answer you already know | Main thread, no subagent |
|
|
27
|
+
|
|
28
|
+
Rule of thumb: **if you'd want the subagent's output in 1/3 the tokens, pick cavecrew. If you'd want prose, pick vanilla.**
|
|
29
|
+
|
|
30
|
+
## Why this exists (the real win)
|
|
31
|
+
|
|
32
|
+
Subagent tool results get injected into main context verbatim. A vanilla `Explore` that returns 2k tokens of prose costs 2k tokens of main-context budget every time. The same finding from `cavecrew-investigator` returns ~700 tokens. Across 20 delegations in one session that's the difference between context exhaustion and finishing the task.
|
|
33
|
+
|
|
34
|
+
## Output contracts
|
|
35
|
+
|
|
36
|
+
What main thread can rely on per agent:
|
|
37
|
+
|
|
38
|
+
**`cavecrew-investigator`**
|
|
39
|
+
```
|
|
40
|
+
<Header>:
|
|
41
|
+
- path:line — `symbol` — short note
|
|
42
|
+
totals: <counts>.
|
|
43
|
+
```
|
|
44
|
+
Or `No match.` Always file-path-first, line-number-attached, backticked symbols. Safe to grep with `path:\d+`.
|
|
45
|
+
|
|
46
|
+
**`cavecrew-builder`**
|
|
47
|
+
```
|
|
48
|
+
<path:line-range> — <change ≤10 words>.
|
|
49
|
+
verified: <re-read OK | mismatch @ path:line>.
|
|
50
|
+
```
|
|
51
|
+
Or one of: `too-big.` / `needs-confirm.` / `ambiguous.` / `regressed.` (terminal first token).
|
|
52
|
+
|
|
53
|
+
**`cavecrew-reviewer`**
|
|
54
|
+
```
|
|
55
|
+
path:line: <emoji> <severity>: <problem>. <fix>.
|
|
56
|
+
totals: N🔴 N🟡 N🔵 N❓
|
|
57
|
+
```
|
|
58
|
+
Or `No issues.` Findings sorted file → line ascending.
|
|
59
|
+
|
|
60
|
+
## Chaining patterns
|
|
61
|
+
|
|
62
|
+
**Locate → fix → verify** (most common):
|
|
63
|
+
1. `cavecrew-investigator` returns site list.
|
|
64
|
+
2. Main thread picks 1-2 sites, hands paths to `cavecrew-builder`.
|
|
65
|
+
3. `cavecrew-reviewer` audits the diff.
|
|
66
|
+
|
|
67
|
+
**Parallel scout** (when investigation is broad):
|
|
68
|
+
Spawn 2-3 `cavecrew-investigator` calls in one message (different angles: defs vs callers vs tests). Aggregate in main thread.
|
|
69
|
+
|
|
70
|
+
**Single-shot edit** (when site is already known):
|
|
71
|
+
Skip investigator. Hand exact path:line to `cavecrew-builder` directly.
|
|
72
|
+
|
|
73
|
+
## What NOT to do
|
|
74
|
+
|
|
75
|
+
- Don't use `cavecrew-builder` when you don't already know the file. Spawn investigator first or main thread will eat tokens passing context.
|
|
76
|
+
- Don't chain `cavecrew-investigator → cavecrew-builder` for a 5-file refactor. Builder will return `too-big.` and you'll have wasted a turn.
|
|
77
|
+
- Don't ask `cavecrew-reviewer` for "general feedback" — it returns findings only, no architecture opinions. Use `Code Reviewer` for that.
|
|
78
|
+
- Don't expect prose. Cavecrew output is structured, sometimes terse to the point of cryptic. If a human will read it directly, paraphrase.
|
|
79
|
+
|
|
80
|
+
## Auto-clarity (inherited)
|
|
81
|
+
|
|
82
|
+
Subagents drop caveman → normal English for security warnings, irreversible-action confirmations, and any output where fragment ambiguity could be misread. Resume caveman after.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: caveman
|
|
3
|
+
description: >
|
|
4
|
+
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman
|
|
5
|
+
while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra,
|
|
6
|
+
wenyan-lite, wenyan-full, wenyan-ultra.
|
|
7
|
+
Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens",
|
|
8
|
+
"be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Respond terse like smart caveman. All technical substance stay. Only fluff die.
|
|
12
|
+
|
|
13
|
+
## Persistence
|
|
14
|
+
|
|
15
|
+
ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure. Off only: "stop caveman" / "normal mode".
|
|
16
|
+
|
|
17
|
+
Default: **full**. Switch: `/caveman lite|full|ultra`.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). Technical terms exact. Code blocks unchanged. Errors quoted exact.
|
|
22
|
+
|
|
23
|
+
Pattern: `[thing] [action] [reason]. [next step].`
|
|
24
|
+
|
|
25
|
+
Not: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
|
|
26
|
+
Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"
|
|
27
|
+
|
|
28
|
+
## Intensity
|
|
29
|
+
|
|
30
|
+
| Level | What change |
|
|
31
|
+
|-------|------------|
|
|
32
|
+
| **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight |
|
|
33
|
+
| **full** | Drop articles, fragments OK, short synonyms. Classic caveman |
|
|
34
|
+
| **ultra** | Abbreviate prose words (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough. Code symbols, function names, API names, error strings: never abbreviate |
|
|
35
|
+
| **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register |
|
|
36
|
+
| **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) |
|
|
37
|
+
| **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse |
|
|
38
|
+
|
|
39
|
+
Example — "Why React component re-render?"
|
|
40
|
+
- lite: "Your component re-renders because you create a new object reference each render. Wrap it in `useMemo`."
|
|
41
|
+
- full: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."
|
|
42
|
+
- ultra: "Inline obj prop → new ref → re-render. `useMemo`."
|
|
43
|
+
- wenyan-lite: "組件頻重繪,以每繪新生對象參照故。以 useMemo 包之。"
|
|
44
|
+
- wenyan-full: "物出新參照,致重繪。useMemo .Wrap之。"
|
|
45
|
+
- wenyan-ultra: "新參照→重繪。useMemo Wrap。"
|
|
46
|
+
|
|
47
|
+
Example — "Explain database connection pooling."
|
|
48
|
+
- lite: "Connection pooling reuses open connections instead of creating new ones per request. Avoids repeated handshake overhead."
|
|
49
|
+
- full: "Pool reuse open DB connections. No new connection per request. Skip handshake overhead."
|
|
50
|
+
- ultra: "Pool = reuse DB conn. Skip handshake → fast under load."
|
|
51
|
+
- wenyan-full: "池reuse open connection。不每req新開。skip handshake overhead。"
|
|
52
|
+
- wenyan-ultra: "池reuse conn。skip handshake → fast。"
|
|
53
|
+
|
|
54
|
+
## Auto-Clarity
|
|
55
|
+
|
|
56
|
+
Drop caveman when:
|
|
57
|
+
- Security warnings
|
|
58
|
+
- Irreversible action confirmations
|
|
59
|
+
- Multi-step sequences where fragment order or omitted conjunctions risk misread
|
|
60
|
+
- Compression itself creates technical ambiguity (e.g., `"migrate table drop column backup first"` — order unclear without articles/conjunctions)
|
|
61
|
+
- User asks to clarify or repeats question
|
|
62
|
+
|
|
63
|
+
Resume caveman after clear part done.
|
|
64
|
+
|
|
65
|
+
Example — destructive op:
|
|
66
|
+
> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
|
|
67
|
+
> ```sql
|
|
68
|
+
> DROP TABLE users;
|
|
69
|
+
> ```
|
|
70
|
+
> Caveman resume. Verify backup exist first.
|
|
71
|
+
|
|
72
|
+
## Boundaries
|
|
73
|
+
|
|
74
|
+
Code/commits/PRs: write normal. "stop caveman" or "normal mode": revert. Level persist until changed or session end.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: caveman-commit
|
|
3
|
+
description: >
|
|
4
|
+
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving
|
|
5
|
+
intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why"
|
|
6
|
+
isn't obvious. Use when user says "write a commit", "commit message", "generate commit",
|
|
7
|
+
"/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Write commit messages terse and exact. Conventional Commits format. No fluff. Why over what.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
**Subject line:**
|
|
15
|
+
- `<type>(<scope>): <imperative summary>` — `<scope>` optional
|
|
16
|
+
- Types: `feat`, `fix`, `refactor`, `perf`, `docs`, `test`, `chore`, `build`, `ci`, `style`, `revert`
|
|
17
|
+
- Imperative mood: "add", "fix", "remove" — not "added", "adds", "adding"
|
|
18
|
+
- ≤50 chars when possible, hard cap 72
|
|
19
|
+
- No trailing period
|
|
20
|
+
- Match project convention for capitalization after the colon
|
|
21
|
+
|
|
22
|
+
**Body (only if needed):**
|
|
23
|
+
- Skip entirely when subject is self-explanatory
|
|
24
|
+
- Add body only for: non-obvious *why*, breaking changes, migration notes, linked issues
|
|
25
|
+
- Wrap at 72 chars
|
|
26
|
+
- Bullets `-` not `*`
|
|
27
|
+
- Reference issues/PRs at end: `Closes #42`, `Refs #17`
|
|
28
|
+
|
|
29
|
+
**What NEVER goes in:**
|
|
30
|
+
- "This commit does X", "I", "we", "now", "currently" — the diff says what
|
|
31
|
+
- "As requested by..." — use Co-authored-by trailer
|
|
32
|
+
- "Generated with Claude Code" or any AI attribution
|
|
33
|
+
- Emoji (unless project convention requires)
|
|
34
|
+
- Restating the file name when scope already says it
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
Diff: new endpoint for user profile with body explaining the why
|
|
39
|
+
- ❌ "feat: add a new endpoint to get user profile information from the database"
|
|
40
|
+
- ✅
|
|
41
|
+
```
|
|
42
|
+
feat(api): add GET /users/:id/profile
|
|
43
|
+
|
|
44
|
+
Mobile client needs profile data without the full user payload
|
|
45
|
+
to reduce LTE bandwidth on cold-launch screens.
|
|
46
|
+
|
|
47
|
+
Closes #128
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Diff: breaking API change
|
|
51
|
+
- ✅
|
|
52
|
+
```
|
|
53
|
+
feat(api)!: rename /v1/orders to /v1/checkout
|
|
54
|
+
|
|
55
|
+
BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout
|
|
56
|
+
before 2026-06-01. Old route returns 410 after that date.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Auto-Clarity
|
|
60
|
+
|
|
61
|
+
Always include body for: breaking changes, security fixes, data migrations, anything reverting a prior commit. Never compress these into subject-only — future debuggers need the context.
|
|
62
|
+
|
|
63
|
+
## Boundaries
|
|
64
|
+
|
|
65
|
+
Only generates the commit message. Does not run `git commit`, does not stage files, does not amend. Output the message as a code block ready to paste. "stop caveman-commit" or "normal mode": revert to verbose commit style.
|