trinity-method-sdk 2.0.9 → 2.2.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/CHANGELOG.md +702 -267
- package/README.md +550 -540
- package/dist/cli/commands/deploy/agents.js +1 -1
- package/dist/cli/commands/deploy/ci-cd.d.ts +4 -3
- package/dist/cli/commands/deploy/ci-cd.js +10 -9
- package/dist/cli/commands/deploy/claude-setup.js +28 -35
- package/dist/cli/commands/deploy/configuration.js +10 -11
- package/dist/cli/commands/deploy/directories.js +13 -14
- package/dist/cli/commands/deploy/gitignore.js +3 -5
- package/dist/cli/commands/deploy/index.d.ts +1 -1
- package/dist/cli/commands/deploy/index.js +7 -3
- package/dist/cli/commands/deploy/knowledge-base.js +3 -3
- package/dist/cli/commands/deploy/pre-flight.js +1 -1
- package/dist/cli/commands/deploy/root-files.js +3 -18
- package/dist/cli/commands/deploy/sdk-install.js +1 -1
- package/dist/cli/commands/deploy/summary.js +3 -3
- package/dist/cli/commands/deploy/templates.js +33 -20
- package/dist/cli/commands/update/agents.js +1 -1
- package/dist/cli/commands/update/backup.js +6 -12
- package/dist/cli/commands/update/commands.d.ts +1 -0
- package/dist/cli/commands/update/commands.js +18 -45
- package/dist/cli/commands/update/knowledge-base.js +2 -2
- package/dist/cli/commands/update/pre-flight.js +11 -11
- package/dist/cli/commands/update/summary.js +5 -5
- package/dist/cli/commands/update/templates.js +35 -13
- package/dist/cli/commands/update/verification.js +5 -5
- package/dist/cli/commands/update/version.js +1 -1
- package/dist/cli/utils/deploy-ci.d.ts +3 -2
- package/dist/cli/utils/deploy-ci.js +24 -24
- package/dist/cli/utils/deploy-linting.js +101 -6
- package/dist/cli/utils/error-classes.d.ts +2 -2
- package/dist/cli/utils/linting-tools.js +14 -6
- package/dist/cli/utils/template-processor.js +2 -4
- package/dist/templates/{claude → .claude}/EMPLOYEE-DIRECTORY.md.template +16 -22
- package/dist/templates/{agents → .claude/agents}/aj-team/apo-documentation-specialist.md.template +10 -10
- package/dist/templates/{agents → .claude/agents}/aj-team/bas-quality-gate.md.template +13 -15
- package/dist/templates/{agents → .claude/agents}/aj-team/bon-dependency-manager.md.template +4 -4
- package/dist/templates/{agents → .claude/agents}/aj-team/cap-configuration-specialist.md.template +3 -3
- package/dist/templates/{agents → .claude/agents}/aj-team/dra-code-reviewer.md.template +8 -10
- package/dist/templates/{agents → .claude/agents}/aj-team/kil-task-executor.md.template +11 -13
- package/dist/templates/{agents → .claude/agents}/aj-team/uro-refactoring-specialist.md.template +3 -3
- package/dist/templates/{agents → .claude/agents}/audit/juno-auditor.md.template +46 -42
- package/dist/templates/{agents → .claude/agents}/deployment/ein-cicd.md.template +59 -164
- package/dist/templates/{agents → .claude/agents}/deployment/ino-context.md.template +25 -22
- package/dist/templates/{agents → .claude/agents}/deployment/tan-structure.md.template +32 -30
- package/dist/templates/{agents → .claude/agents}/deployment/zen-knowledge.md.template +28 -23
- package/dist/templates/{agents → .claude/agents}/leadership/aj-maestro.md.template +10 -6
- package/dist/templates/{agents → .claude/agents}/leadership/aly-cto.md.template +22 -19
- package/dist/templates/{agents → .claude/agents}/planning/eus-decomposer.md.template +8 -4
- package/dist/templates/{agents → .claude/agents}/planning/mon-requirements.md.template +8 -4
- package/dist/templates/{agents → .claude/agents}/planning/ror-design.md.template +8 -4
- package/dist/templates/{agents → .claude/agents}/planning/tra-planner.md.template +10 -4
- package/dist/templates/{shared/claude-commands → .claude/commands/execution}/trinity-audit.md.template +15 -15
- package/dist/templates/.claude/commands/execution/trinity-breakdown.md.template +535 -0
- package/dist/templates/{shared/claude-commands → .claude/commands/execution}/trinity-orchestrate.md.template +48 -48
- package/dist/templates/{shared/claude-commands → .claude/commands/infrastructure}/trinity-init.md.template +32 -54
- package/dist/templates/{shared/claude-commands → .claude/commands/investigation}/trinity-create-investigation.md.template +13 -7
- package/dist/templates/{shared/claude-commands → .claude/commands/investigation}/trinity-investigate-templates.md.template +19 -15
- package/dist/templates/{shared/claude-commands → .claude/commands/investigation}/trinity-plan-investigation.md.template +12 -6
- package/dist/templates/{shared/claude-commands → .claude/commands/maintenance}/trinity-changelog.md.template +9 -8
- package/dist/templates/.claude/commands/maintenance/trinity-docs-update.md.template +279 -0
- package/dist/templates/.claude/commands/maintenance/trinity-docs.md.template +2828 -0
- package/dist/templates/{shared/claude-commands → .claude/commands/maintenance}/trinity-readme.md.template +21 -20
- package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-decompose.md.template +6 -4
- package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-design.md.template +6 -4
- package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-plan.md.template +7 -5
- package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-requirements.md.template +6 -4
- package/dist/templates/{shared/claude-commands → .claude/commands/session}/trinity-continue.md.template +30 -24
- package/dist/templates/{shared/claude-commands → .claude/commands/session}/trinity-end.md.template +403 -397
- package/dist/templates/{shared/claude-commands → .claude/commands/session}/trinity-start.md.template +9 -4
- package/dist/templates/{shared/claude-commands → .claude/commands/utility}/trinity-agents.md.template +11 -8
- package/dist/templates/{shared/claude-commands → .claude/commands/utility}/trinity-verify.md.template +56 -57
- package/dist/templates/{shared/claude-commands → .claude/commands/utility}/trinity-workorder.md.template +13 -9
- package/dist/templates/ci/ci.yml.template +2 -2
- package/dist/templates/root/CLAUDE.md.template +9 -9
- package/dist/templates/root/linting/nodejs/.husky-pre-commit.template +5 -0
- package/dist/templates/source/base-CLAUDE.md.template +310 -310
- package/dist/templates/source/flutter-CLAUDE.md.template +593 -593
- package/dist/templates/source/nodejs-CLAUDE.md.template +531 -531
- package/dist/templates/source/python-CLAUDE.md.template +510 -510
- package/dist/templates/source/react-CLAUDE.md.template +513 -513
- package/dist/templates/source/rust-CLAUDE.md.template +653 -653
- package/dist/templates/trinity/CLAUDE.md.template +14 -14
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/AI-DEVELOPMENT-GUIDE.md.template +1 -1
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/ARCHITECTURE.md.template +5 -5
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/CODING-PRINCIPLES.md.template +1 -1
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/DOCUMENTATION-CRITERIA.md.template +1 -1
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/ISSUES.md.template +9 -9
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/TESTING-PRINCIPLES.md.template +1 -1
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/Technical-Debt.md.template +2 -4
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/To-do.md.template +2 -2
- package/dist/templates/{knowledge-base → trinity/knowledge-base}/Trinity.md.template +6 -6
- package/dist/templates/trinity/templates/documentation/api-docs/README.md.template +218 -0
- package/dist/templates/trinity/templates/documentation/configuration/documentation-structure.md.template +71 -0
- package/dist/templates/trinity/templates/documentation/configuration/env-example-generator.md.template +387 -0
- package/dist/templates/trinity/templates/documentation/discovery/api-endpoint-scanner.md.template +343 -0
- package/dist/templates/trinity/templates/documentation/discovery/component-discovery.md.template +254 -0
- package/dist/templates/trinity/templates/documentation/discovery/env-variable-extraction.md.template +316 -0
- package/dist/templates/trinity/templates/documentation/discovery/framework-detection.md.template +205 -0
- package/dist/templates/trinity/templates/documentation/guides/api-development.md.template +375 -0
- package/dist/templates/trinity/templates/documentation/guides/contributing.md.template +488 -0
- package/dist/templates/trinity/templates/documentation/guides/deployment.md.template +565 -0
- package/dist/templates/trinity/templates/documentation/guides/getting-started.md.template +118 -0
- package/dist/templates/trinity/templates/documentation/mermaid-diagrams/api-endpoint-map.md.template +56 -0
- package/dist/templates/trinity/templates/documentation/mermaid-diagrams/component-hierarchy.md.template +60 -0
- package/dist/templates/trinity/templates/documentation/mermaid-diagrams/database-er.md.template +49 -0
- package/dist/templates/trinity/templates/documentation/mermaid-diagrams/mvc-flow.md.template +41 -0
- package/dist/templates/trinity/templates/documentation/processes/error-handling-protocol.md.template +166 -0
- package/dist/templates/trinity/templates/documentation/processes/fallback-mechanism.md.template +88 -0
- package/dist/templates/trinity/templates/documentation/reports/apo-docs-update-checklist.md.template +343 -0
- package/dist/templates/trinity/templates/documentation/reports/juno-docs-update-checklist.md.template +1337 -0
- package/dist/templates/trinity/templates/documentation/reports/juno-final-report.md.template +237 -0
- package/dist/templates/trinity/templates/documentation/reports/juno-internal-report.md.template +461 -0
- package/dist/templates/trinity/templates/documentation/validation/documentation-verification-rules.md.template +379 -0
- package/dist/templates/trinity/templates/documentation/validation/juno-quality-gates.md.template +282 -0
- package/dist/templates/{investigations → trinity/templates/investigations}/bug.md.template +14 -14
- package/dist/templates/{investigations → trinity/templates/investigations}/feature.md.template +14 -14
- package/dist/templates/{investigations → trinity/templates/investigations}/performance.md.template +14 -14
- package/dist/templates/{investigations → trinity/templates/investigations}/security.md.template +14 -14
- package/dist/templates/{investigations → trinity/templates/investigations}/technical.md.template +14 -14
- package/dist/templates/{work-orders → trinity/templates/work-orders}/ANALYSIS-TEMPLATE.md.template +10 -13
- package/dist/templates/{work-orders → trinity/templates/work-orders}/AUDIT-TEMPLATE.md.template +10 -26
- package/dist/templates/{work-orders → trinity/templates/work-orders}/IMPLEMENTATION-TEMPLATE.md.template +10 -26
- package/dist/templates/{work-orders → trinity/templates/work-orders}/INVESTIGATION-TEMPLATE.md.template +10 -25
- package/dist/templates/{work-orders → trinity/templates/work-orders}/PATTERN-TEMPLATE.md.template +10 -26
- package/dist/templates/{work-orders → trinity/templates/work-orders}/VERIFICATION-TEMPLATE.md.template +10 -26
- package/package.json +99 -94
- package/dist/templates/agents/leadership/aj-cc.md.template +0 -462
- package/dist/templates/ci/cd.yml.template +0 -175
- package/dist/templates/ci/github-actions.yml +0 -86
- package/dist/templates/root/TRINITY.md.template +0 -52
- package/dist/templates/shared/claude-commands/trinity-docs.md.template +0 -2577
- /package/dist/templates/{linting → root/linting}/flutter/.pre-commit-config.yaml.template +0 -0
- /package/dist/templates/{linting → root/linting}/flutter/analysis_options.yaml.template +0 -0
- /package/dist/templates/{linting → root/linting}/nodejs/.eslintrc-commonjs.json.template +0 -0
- /package/dist/templates/{linting → root/linting}/nodejs/.eslintrc-esm.json.template +0 -0
- /package/dist/templates/{linting → root/linting}/nodejs/.eslintrc-typescript.json.template +0 -0
- /package/dist/templates/{linting → root/linting}/nodejs/.pre-commit-config.yaml.template +0 -0
- /package/dist/templates/{linting → root/linting}/nodejs/.prettierrc.json.template +0 -0
- /package/dist/templates/{linting → root/linting}/python/.flake8.template +0 -0
- /package/dist/templates/{linting → root/linting}/python/.pre-commit-config.yaml.template +0 -0
- /package/dist/templates/{linting → root/linting}/python/pyproject.toml.template +0 -0
- /package/dist/templates/{linting → root/linting}/rust/.pre-commit-config.yaml.template +0 -0
- /package/dist/templates/{linting → root/linting}/rust/clippy.toml.template +0 -0
- /package/dist/templates/{linting → root/linting}/rust/rustfmt.toml.template +0 -0
- /package/dist/templates/{documentation → trinity/templates/documentation}/ROOT-README.md.template +0 -0
- /package/dist/templates/{documentation → trinity/templates/documentation}/SUBDIRECTORY-README.md.template +0 -0
|
@@ -1,310 +1,310 @@
|
|
|
1
|
-
# CLAUDE.md - Technology-Specific Rules
|
|
2
|
-
## {{PROJECT_NAME}} - {{FRAMEWORK}} Implementation
|
|
3
|
-
|
|
4
|
-
**Framework:** {{FRAMEWORK}}
|
|
5
|
-
**Language:** {{TECH_STACK}}
|
|
6
|
-
**Source Directory:** {{SOURCE_DIR}}
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Technology Stack Behavioral Modifications
|
|
11
|
-
|
|
12
|
-
### Framework-Specific Requirements
|
|
13
|
-
- **Code Organization**: Follow {{FRAMEWORK}} project structure conventions
|
|
14
|
-
- **Dependency Management**: Use appropriate package manager for {{TECH_STACK}}
|
|
15
|
-
- **Module System**: Implement framework-specific module patterns
|
|
16
|
-
- **Performance Optimization**: Framework-specific performance best practices
|
|
17
|
-
- **Error Handling**: Implement framework error handling patterns
|
|
18
|
-
|
|
19
|
-
### Language-Specific Adaptations
|
|
20
|
-
- **Type Safety**: Use type systems where available (TypeScript, type hints, etc.)
|
|
21
|
-
- **Async Patterns**: Implement language-specific async/await patterns
|
|
22
|
-
- **Memory Management**: Follow memory management best practices
|
|
23
|
-
- **Concurrency**: Handle concurrent operations per language specifications
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Technology Debugging Standards
|
|
28
|
-
|
|
29
|
-
### Standard Debugging Framework
|
|
30
|
-
```javascript
|
|
31
|
-
// Generic debugging format - adapt to your language
|
|
32
|
-
const createDebugLogger = (moduleName) => {
|
|
33
|
-
return {
|
|
34
|
-
entry: (functionName, params) => {
|
|
35
|
-
console.log(`[ENTRY] ${moduleName}.${functionName}`, {
|
|
36
|
-
params: params,
|
|
37
|
-
timestamp: new Date().toISOString(),
|
|
38
|
-
module: moduleName,
|
|
39
|
-
framework: '{{FRAMEWORK}}'
|
|
40
|
-
});
|
|
41
|
-
},
|
|
42
|
-
exit: (functionName, result, startTime) => {
|
|
43
|
-
console.log(`[EXIT] ${moduleName}.${functionName}`, {
|
|
44
|
-
result: result,
|
|
45
|
-
duration: Date.now() - startTime,
|
|
46
|
-
timestamp: new Date().toISOString()
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
error: (functionName, error, context) => {
|
|
50
|
-
console.error(`[ERROR] ${moduleName}.${functionName}`, {
|
|
51
|
-
error: error.message || error,
|
|
52
|
-
context: context,
|
|
53
|
-
timestamp: new Date().toISOString(),
|
|
54
|
-
module: moduleName
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Framework Event Debugging
|
|
62
|
-
```javascript
|
|
63
|
-
// Adapt to framework-specific event system
|
|
64
|
-
// Monitor framework lifecycle events
|
|
65
|
-
// Log framework warnings and errors
|
|
66
|
-
// Track performance metrics
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Performance Optimization Rules
|
|
72
|
-
|
|
73
|
-
### Performance Monitoring
|
|
74
|
-
```javascript
|
|
75
|
-
// Generic performance monitoring - adapt to language/framework
|
|
76
|
-
class PerformanceMonitor {
|
|
77
|
-
static measure(name, operation) {
|
|
78
|
-
const startTime = performance.now();
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
const result = operation();
|
|
82
|
-
const duration = performance.now() - startTime;
|
|
83
|
-
|
|
84
|
-
console.log(`[PERF] ${name}`, {
|
|
85
|
-
duration: duration,
|
|
86
|
-
timestamp: new Date().toISOString()
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return result;
|
|
90
|
-
} catch (error) {
|
|
91
|
-
console.error(`[PERF-ERROR] ${name}`, {
|
|
92
|
-
error: error.message || error,
|
|
93
|
-
duration: performance.now() - startTime
|
|
94
|
-
});
|
|
95
|
-
throw error;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Framework Optimization Guidelines
|
|
102
|
-
- Implement lazy loading where appropriate
|
|
103
|
-
- Optimize asset loading and bundling
|
|
104
|
-
- Use framework-specific caching strategies
|
|
105
|
-
- Monitor and optimize rendering performance
|
|
106
|
-
- Implement pagination for large datasets
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Security Best Practices
|
|
111
|
-
|
|
112
|
-
### Input Validation
|
|
113
|
-
```javascript
|
|
114
|
-
// Input validation patterns
|
|
115
|
-
function validateInput(input, rules) {
|
|
116
|
-
// Implement validation logic
|
|
117
|
-
// Sanitize user input
|
|
118
|
-
// Prevent injection attacks
|
|
119
|
-
// Enforce type constraints
|
|
120
|
-
}
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Authentication & Authorization
|
|
124
|
-
- Implement secure authentication flows
|
|
125
|
-
- Use framework security middleware
|
|
126
|
-
- Validate permissions before operations
|
|
127
|
-
- Secure API endpoints and routes
|
|
128
|
-
- Handle sensitive data appropriately
|
|
129
|
-
|
|
130
|
-
### Data Protection
|
|
131
|
-
- Encrypt sensitive data at rest
|
|
132
|
-
- Use HTTPS for data in transit
|
|
133
|
-
- Implement secure session management
|
|
134
|
-
- Follow OWASP security guidelines
|
|
135
|
-
- Regular security audits
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Testing Requirements
|
|
140
|
-
|
|
141
|
-
### Unit Testing
|
|
142
|
-
```javascript
|
|
143
|
-
// Framework-specific testing patterns
|
|
144
|
-
describe('Component Tests', () => {
|
|
145
|
-
it('should perform expected behavior', () => {
|
|
146
|
-
// Test implementation
|
|
147
|
-
// Use framework testing utilities
|
|
148
|
-
// Assert expected outcomes
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Integration Testing
|
|
154
|
-
- Test component interactions
|
|
155
|
-
- Verify data flow between modules
|
|
156
|
-
- Test external service integrations
|
|
157
|
-
- Validate error handling paths
|
|
158
|
-
- Performance testing under load
|
|
159
|
-
|
|
160
|
-
### Test Coverage Requirements
|
|
161
|
-
- Minimum 80% code coverage for critical paths
|
|
162
|
-
- 100% coverage for security-sensitive code
|
|
163
|
-
- Test edge cases and error conditions
|
|
164
|
-
- Document test scenarios
|
|
165
|
-
- Automated test execution in CI/CD
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Framework Best Practices
|
|
170
|
-
|
|
171
|
-
### Project Structure
|
|
172
|
-
```
|
|
173
|
-
{{SOURCE_DIR}}/
|
|
174
|
-
├── components/ # Reusable components
|
|
175
|
-
├── utils/ # Utility functions
|
|
176
|
-
├── services/ # Business logic
|
|
177
|
-
├── models/ # Data models
|
|
178
|
-
├── config/ # Configuration
|
|
179
|
-
└── tests/ # Test files
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Code Organization
|
|
183
|
-
- Follow framework conventions
|
|
184
|
-
- Separate concerns appropriately
|
|
185
|
-
- Use dependency injection
|
|
186
|
-
- Implement modular architecture
|
|
187
|
-
- Maintain clear file naming
|
|
188
|
-
|
|
189
|
-
### Documentation Standards
|
|
190
|
-
```javascript
|
|
191
|
-
/**
|
|
192
|
-
* Function description
|
|
193
|
-
* @param {Type} param - Parameter description
|
|
194
|
-
* @returns {Type} Return value description
|
|
195
|
-
* @throws {Error} Error conditions
|
|
196
|
-
*/
|
|
197
|
-
function documentedFunction(param) {
|
|
198
|
-
// Implementation
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## Error Handling Patterns
|
|
205
|
-
|
|
206
|
-
### Comprehensive Error Handling
|
|
207
|
-
```javascript
|
|
208
|
-
// Framework-specific error handling
|
|
209
|
-
async function safeOperation(operation, context) {
|
|
210
|
-
try {
|
|
211
|
-
return await operation();
|
|
212
|
-
} catch (error) {
|
|
213
|
-
console.error(`[ERROR] ${context}`, {
|
|
214
|
-
error: error.message || error,
|
|
215
|
-
stack: error.stack,
|
|
216
|
-
context: context,
|
|
217
|
-
timestamp: new Date().toISOString()
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
// Handle specific error types
|
|
221
|
-
// Implement retry logic if appropriate
|
|
222
|
-
// Log to error tracking service
|
|
223
|
-
|
|
224
|
-
throw error;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Global Error Handlers
|
|
230
|
-
```javascript
|
|
231
|
-
// Implement framework-specific global error handlers
|
|
232
|
-
// Catch unhandled exceptions
|
|
233
|
-
// Log errors for debugging
|
|
234
|
-
// Graceful degradation
|
|
235
|
-
// User-friendly error messages
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
## Technology-Specific Command References
|
|
241
|
-
|
|
242
|
-
### Development Commands
|
|
243
|
-
```bash
|
|
244
|
-
# Framework-specific commands
|
|
245
|
-
# Start development server
|
|
246
|
-
# Run build process
|
|
247
|
-
# Execute tests
|
|
248
|
-
# Lint code
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### Testing Commands
|
|
252
|
-
```bash
|
|
253
|
-
# Run test suite
|
|
254
|
-
# Generate coverage reports
|
|
255
|
-
# Run specific tests
|
|
256
|
-
# Watch mode for development
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Deployment Commands
|
|
260
|
-
```bash
|
|
261
|
-
# Build for production
|
|
262
|
-
# Deploy application
|
|
263
|
-
# Run migrations
|
|
264
|
-
# Health checks
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## Component-Level Customizations
|
|
270
|
-
|
|
271
|
-
### State Management
|
|
272
|
-
- Implement framework-specific state patterns
|
|
273
|
-
- Use appropriate state management libraries
|
|
274
|
-
- Maintain predictable state updates
|
|
275
|
-
- Debug state changes effectively
|
|
276
|
-
|
|
277
|
-
### Data Flow
|
|
278
|
-
- Implement unidirectional data flow
|
|
279
|
-
- Use framework data binding
|
|
280
|
-
- Optimize data fetching
|
|
281
|
-
- Cache frequently accessed data
|
|
282
|
-
|
|
283
|
-
### UI/UX Patterns
|
|
284
|
-
- Follow framework UI conventions
|
|
285
|
-
- Implement responsive design
|
|
286
|
-
- Optimize user interactions
|
|
287
|
-
- Accessibility compliance
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
## Reference to Parent Context
|
|
292
|
-
|
|
293
|
-
This file extends the Trinity Method protocols defined in
|
|
294
|
-
|
|
295
|
-
- Trinity Method investigation requirements ([
|
|
296
|
-
- Global performance baselines ([
|
|
297
|
-
- Quality gate standards (BAS 6-phase) ([
|
|
298
|
-
- Crisis management protocols ([
|
|
299
|
-
|
|
300
|
-
All {{FRAMEWORK}} code must implement the debugging frameworks, error handling patterns, and performance monitoring specified in this document.
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
**Technology Context**: {{FRAMEWORK}} ({{TECH_STACK}}) Implementation
|
|
305
|
-
**Parent References**:
|
|
306
|
-
- `../CLAUDE.md` - Global project requirements
|
|
307
|
-
-
|
|
308
|
-
|
|
309
|
-
**Last Updated**: {{CURRENT_DATE}}
|
|
310
|
-
**Trinity Version**: {{TRINITY_VERSION}}
|
|
1
|
+
# CLAUDE.md - Technology-Specific Rules
|
|
2
|
+
## {{PROJECT_NAME}} - {{FRAMEWORK}} Implementation
|
|
3
|
+
|
|
4
|
+
**Framework:** {{FRAMEWORK}}
|
|
5
|
+
**Language:** {{TECH_STACK}}
|
|
6
|
+
**Source Directory:** {{SOURCE_DIR}}
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Technology Stack Behavioral Modifications
|
|
11
|
+
|
|
12
|
+
### Framework-Specific Requirements
|
|
13
|
+
- **Code Organization**: Follow {{FRAMEWORK}} project structure conventions
|
|
14
|
+
- **Dependency Management**: Use appropriate package manager for {{TECH_STACK}}
|
|
15
|
+
- **Module System**: Implement framework-specific module patterns
|
|
16
|
+
- **Performance Optimization**: Framework-specific performance best practices
|
|
17
|
+
- **Error Handling**: Implement framework error handling patterns
|
|
18
|
+
|
|
19
|
+
### Language-Specific Adaptations
|
|
20
|
+
- **Type Safety**: Use type systems where available (TypeScript, type hints, etc.)
|
|
21
|
+
- **Async Patterns**: Implement language-specific async/await patterns
|
|
22
|
+
- **Memory Management**: Follow memory management best practices
|
|
23
|
+
- **Concurrency**: Handle concurrent operations per language specifications
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Technology Debugging Standards
|
|
28
|
+
|
|
29
|
+
### Standard Debugging Framework
|
|
30
|
+
```javascript
|
|
31
|
+
// Generic debugging format - adapt to your language
|
|
32
|
+
const createDebugLogger = (moduleName) => {
|
|
33
|
+
return {
|
|
34
|
+
entry: (functionName, params) => {
|
|
35
|
+
console.log(`[ENTRY] ${moduleName}.${functionName}`, {
|
|
36
|
+
params: params,
|
|
37
|
+
timestamp: new Date().toISOString(),
|
|
38
|
+
module: moduleName,
|
|
39
|
+
framework: '{{FRAMEWORK}}'
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
exit: (functionName, result, startTime) => {
|
|
43
|
+
console.log(`[EXIT] ${moduleName}.${functionName}`, {
|
|
44
|
+
result: result,
|
|
45
|
+
duration: Date.now() - startTime,
|
|
46
|
+
timestamp: new Date().toISOString()
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
error: (functionName, error, context) => {
|
|
50
|
+
console.error(`[ERROR] ${moduleName}.${functionName}`, {
|
|
51
|
+
error: error.message || error,
|
|
52
|
+
context: context,
|
|
53
|
+
timestamp: new Date().toISOString(),
|
|
54
|
+
module: moduleName
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Framework Event Debugging
|
|
62
|
+
```javascript
|
|
63
|
+
// Adapt to framework-specific event system
|
|
64
|
+
// Monitor framework lifecycle events
|
|
65
|
+
// Log framework warnings and errors
|
|
66
|
+
// Track performance metrics
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Performance Optimization Rules
|
|
72
|
+
|
|
73
|
+
### Performance Monitoring
|
|
74
|
+
```javascript
|
|
75
|
+
// Generic performance monitoring - adapt to language/framework
|
|
76
|
+
class PerformanceMonitor {
|
|
77
|
+
static measure(name, operation) {
|
|
78
|
+
const startTime = performance.now();
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
const result = operation();
|
|
82
|
+
const duration = performance.now() - startTime;
|
|
83
|
+
|
|
84
|
+
console.log(`[PERF] ${name}`, {
|
|
85
|
+
duration: duration,
|
|
86
|
+
timestamp: new Date().toISOString()
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return result;
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error(`[PERF-ERROR] ${name}`, {
|
|
92
|
+
error: error.message || error,
|
|
93
|
+
duration: performance.now() - startTime
|
|
94
|
+
});
|
|
95
|
+
throw error;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Framework Optimization Guidelines
|
|
102
|
+
- Implement lazy loading where appropriate
|
|
103
|
+
- Optimize asset loading and bundling
|
|
104
|
+
- Use framework-specific caching strategies
|
|
105
|
+
- Monitor and optimize rendering performance
|
|
106
|
+
- Implement pagination for large datasets
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Security Best Practices
|
|
111
|
+
|
|
112
|
+
### Input Validation
|
|
113
|
+
```javascript
|
|
114
|
+
// Input validation patterns
|
|
115
|
+
function validateInput(input, rules) {
|
|
116
|
+
// Implement validation logic
|
|
117
|
+
// Sanitize user input
|
|
118
|
+
// Prevent injection attacks
|
|
119
|
+
// Enforce type constraints
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Authentication & Authorization
|
|
124
|
+
- Implement secure authentication flows
|
|
125
|
+
- Use framework security middleware
|
|
126
|
+
- Validate permissions before operations
|
|
127
|
+
- Secure API endpoints and routes
|
|
128
|
+
- Handle sensitive data appropriately
|
|
129
|
+
|
|
130
|
+
### Data Protection
|
|
131
|
+
- Encrypt sensitive data at rest
|
|
132
|
+
- Use HTTPS for data in transit
|
|
133
|
+
- Implement secure session management
|
|
134
|
+
- Follow OWASP security guidelines
|
|
135
|
+
- Regular security audits
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Testing Requirements
|
|
140
|
+
|
|
141
|
+
### Unit Testing
|
|
142
|
+
```javascript
|
|
143
|
+
// Framework-specific testing patterns
|
|
144
|
+
describe('Component Tests', () => {
|
|
145
|
+
it('should perform expected behavior', () => {
|
|
146
|
+
// Test implementation
|
|
147
|
+
// Use framework testing utilities
|
|
148
|
+
// Assert expected outcomes
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Integration Testing
|
|
154
|
+
- Test component interactions
|
|
155
|
+
- Verify data flow between modules
|
|
156
|
+
- Test external service integrations
|
|
157
|
+
- Validate error handling paths
|
|
158
|
+
- Performance testing under load
|
|
159
|
+
|
|
160
|
+
### Test Coverage Requirements
|
|
161
|
+
- Minimum 80% code coverage for critical paths
|
|
162
|
+
- 100% coverage for security-sensitive code
|
|
163
|
+
- Test edge cases and error conditions
|
|
164
|
+
- Document test scenarios
|
|
165
|
+
- Automated test execution in CI/CD
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Framework Best Practices
|
|
170
|
+
|
|
171
|
+
### Project Structure
|
|
172
|
+
```
|
|
173
|
+
{{SOURCE_DIR}}/
|
|
174
|
+
├── components/ # Reusable components
|
|
175
|
+
├── utils/ # Utility functions
|
|
176
|
+
├── services/ # Business logic
|
|
177
|
+
├── models/ # Data models
|
|
178
|
+
├── config/ # Configuration
|
|
179
|
+
└── tests/ # Test files
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Code Organization
|
|
183
|
+
- Follow framework conventions
|
|
184
|
+
- Separate concerns appropriately
|
|
185
|
+
- Use dependency injection
|
|
186
|
+
- Implement modular architecture
|
|
187
|
+
- Maintain clear file naming
|
|
188
|
+
|
|
189
|
+
### Documentation Standards
|
|
190
|
+
```javascript
|
|
191
|
+
/**
|
|
192
|
+
* Function description
|
|
193
|
+
* @param {Type} param - Parameter description
|
|
194
|
+
* @returns {Type} Return value description
|
|
195
|
+
* @throws {Error} Error conditions
|
|
196
|
+
*/
|
|
197
|
+
function documentedFunction(param) {
|
|
198
|
+
// Implementation
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Error Handling Patterns
|
|
205
|
+
|
|
206
|
+
### Comprehensive Error Handling
|
|
207
|
+
```javascript
|
|
208
|
+
// Framework-specific error handling
|
|
209
|
+
async function safeOperation(operation, context) {
|
|
210
|
+
try {
|
|
211
|
+
return await operation();
|
|
212
|
+
} catch (error) {
|
|
213
|
+
console.error(`[ERROR] ${context}`, {
|
|
214
|
+
error: error.message || error,
|
|
215
|
+
stack: error.stack,
|
|
216
|
+
context: context,
|
|
217
|
+
timestamp: new Date().toISOString()
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
// Handle specific error types
|
|
221
|
+
// Implement retry logic if appropriate
|
|
222
|
+
// Log to error tracking service
|
|
223
|
+
|
|
224
|
+
throw error;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Global Error Handlers
|
|
230
|
+
```javascript
|
|
231
|
+
// Implement framework-specific global error handlers
|
|
232
|
+
// Catch unhandled exceptions
|
|
233
|
+
// Log errors for debugging
|
|
234
|
+
// Graceful degradation
|
|
235
|
+
// User-friendly error messages
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Technology-Specific Command References
|
|
241
|
+
|
|
242
|
+
### Development Commands
|
|
243
|
+
```bash
|
|
244
|
+
# Framework-specific commands
|
|
245
|
+
# Start development server
|
|
246
|
+
# Run build process
|
|
247
|
+
# Execute tests
|
|
248
|
+
# Lint code
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Testing Commands
|
|
252
|
+
```bash
|
|
253
|
+
# Run test suite
|
|
254
|
+
# Generate coverage reports
|
|
255
|
+
# Run specific tests
|
|
256
|
+
# Watch mode for development
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Deployment Commands
|
|
260
|
+
```bash
|
|
261
|
+
# Build for production
|
|
262
|
+
# Deploy application
|
|
263
|
+
# Run migrations
|
|
264
|
+
# Health checks
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Component-Level Customizations
|
|
270
|
+
|
|
271
|
+
### State Management
|
|
272
|
+
- Implement framework-specific state patterns
|
|
273
|
+
- Use appropriate state management libraries
|
|
274
|
+
- Maintain predictable state updates
|
|
275
|
+
- Debug state changes effectively
|
|
276
|
+
|
|
277
|
+
### Data Flow
|
|
278
|
+
- Implement unidirectional data flow
|
|
279
|
+
- Use framework data binding
|
|
280
|
+
- Optimize data fetching
|
|
281
|
+
- Cache frequently accessed data
|
|
282
|
+
|
|
283
|
+
### UI/UX Patterns
|
|
284
|
+
- Follow framework UI conventions
|
|
285
|
+
- Implement responsive design
|
|
286
|
+
- Optimize user interactions
|
|
287
|
+
- Accessibility compliance
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Reference to Parent Context
|
|
292
|
+
|
|
293
|
+
This file extends the Trinity Method protocols defined in `../.claude/trinity/CLAUDE.md` and global requirements from `../CLAUDE.md`. Technology-specific implementations must comply with:
|
|
294
|
+
|
|
295
|
+
- Trinity Method investigation requirements ([../.claude/trinity/CLAUDE.md](../.claude/trinity/CLAUDE.md))
|
|
296
|
+
- Global performance baselines ([../.claude/trinity/knowledge-base/ARCHITECTURE.md](../.claude/trinity/knowledge-base/ARCHITECTURE.md#performance-baseline))
|
|
297
|
+
- Quality gate standards (BAS 6-phase) ([../.claude/trinity/CLAUDE.md](../.claude/trinity/CLAUDE.md#quality-standards))
|
|
298
|
+
- Crisis management protocols ([../.claude/trinity/CLAUDE.md](../.claude/trinity/CLAUDE.md#crisis-management))
|
|
299
|
+
|
|
300
|
+
All {{FRAMEWORK}} code must implement the debugging frameworks, error handling patterns, and performance monitoring specified in this document.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
**Technology Context**: {{FRAMEWORK}} ({{TECH_STACK}}) Implementation
|
|
305
|
+
**Parent References**:
|
|
306
|
+
- `../CLAUDE.md` - Global project requirements
|
|
307
|
+
- `../.claude/trinity/CLAUDE.md` - Trinity Method enforcement
|
|
308
|
+
|
|
309
|
+
**Last Updated**: {{CURRENT_DATE}}
|
|
310
|
+
**Trinity Version**: {{TRINITY_VERSION}}
|