trinity-method-sdk 2.0.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 +116 -0
- package/LICENSE +21 -0
- package/README.md +555 -0
- package/dist/cli/commands/deploy/agents.d.ts +14 -0
- package/dist/cli/commands/deploy/agents.js +59 -0
- package/dist/cli/commands/deploy/ci-cd.d.ts +13 -0
- package/dist/cli/commands/deploy/ci-cd.js +50 -0
- package/dist/cli/commands/deploy/claude-setup.d.ts +17 -0
- package/dist/cli/commands/deploy/claude-setup.js +91 -0
- package/dist/cli/commands/deploy/configuration.d.ts +13 -0
- package/dist/cli/commands/deploy/configuration.js +215 -0
- package/dist/cli/commands/deploy/directories.d.ts +12 -0
- package/dist/cli/commands/deploy/directories.js +38 -0
- package/dist/cli/commands/deploy/gitignore.d.ts +12 -0
- package/dist/cli/commands/deploy/gitignore.js +53 -0
- package/dist/cli/commands/deploy/index.d.ts +38 -0
- package/dist/cli/commands/deploy/index.js +156 -0
- package/dist/cli/commands/deploy/knowledge-base.d.ts +16 -0
- package/dist/cli/commands/deploy/knowledge-base.js +75 -0
- package/dist/cli/commands/deploy/linting.d.ts +18 -0
- package/dist/cli/commands/deploy/linting.js +51 -0
- package/dist/cli/commands/deploy/metrics.d.ts +13 -0
- package/dist/cli/commands/deploy/metrics.js +34 -0
- package/dist/cli/commands/deploy/pre-flight.d.ts +13 -0
- package/dist/cli/commands/deploy/pre-flight.js +29 -0
- package/dist/cli/commands/deploy/root-files.d.ts +16 -0
- package/dist/cli/commands/deploy/root-files.js +178 -0
- package/dist/cli/commands/deploy/sdk-install.d.ts +12 -0
- package/dist/cli/commands/deploy/sdk-install.js +57 -0
- package/dist/cli/commands/deploy/summary.d.ts +14 -0
- package/dist/cli/commands/deploy/summary.js +130 -0
- package/dist/cli/commands/deploy/templates.d.ts +14 -0
- package/dist/cli/commands/deploy/templates.js +84 -0
- package/dist/cli/commands/deploy/types.d.ts +39 -0
- package/dist/cli/commands/deploy/types.js +5 -0
- package/dist/cli/commands/update/agents.d.ts +14 -0
- package/dist/cli/commands/update/agents.js +31 -0
- package/dist/cli/commands/update/backup.d.ts +31 -0
- package/dist/cli/commands/update/backup.js +97 -0
- package/dist/cli/commands/update/commands.d.ts +14 -0
- package/dist/cli/commands/update/commands.js +75 -0
- package/dist/cli/commands/update/index.d.ts +15 -0
- package/dist/cli/commands/update/index.js +118 -0
- package/dist/cli/commands/update/knowledge-base.d.ts +14 -0
- package/dist/cli/commands/update/knowledge-base.js +38 -0
- package/dist/cli/commands/update/pre-flight.d.ts +13 -0
- package/dist/cli/commands/update/pre-flight.js +37 -0
- package/dist/cli/commands/update/summary.d.ts +20 -0
- package/dist/cli/commands/update/summary.js +47 -0
- package/dist/cli/commands/update/templates.d.ts +14 -0
- package/dist/cli/commands/update/templates.js +25 -0
- package/dist/cli/commands/update/types.d.ts +13 -0
- package/dist/cli/commands/update/types.js +7 -0
- package/dist/cli/commands/update/utils.d.ts +11 -0
- package/dist/cli/commands/update/utils.js +19 -0
- package/dist/cli/commands/update/verification.d.ts +20 -0
- package/dist/cli/commands/update/verification.js +54 -0
- package/dist/cli/commands/update/version.d.ts +18 -0
- package/dist/cli/commands/update/version.js +36 -0
- package/dist/cli/commands/update.d.ts +7 -0
- package/dist/cli/commands/update.js +7 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +36 -0
- package/dist/cli/types.d.ts +77 -0
- package/dist/cli/types.js +5 -0
- package/dist/cli/utils/deploy-ci.d.ts +22 -0
- package/dist/cli/utils/deploy-ci.js +138 -0
- package/dist/cli/utils/deploy-linting.d.ts +3 -0
- package/dist/cli/utils/deploy-linting.js +136 -0
- package/dist/cli/utils/detect-stack.d.ts +3 -0
- package/dist/cli/utils/detect-stack.js +270 -0
- package/dist/cli/utils/error-classes.d.ts +63 -0
- package/dist/cli/utils/error-classes.js +84 -0
- package/dist/cli/utils/error-handler.d.ts +59 -0
- package/dist/cli/utils/error-handler.js +127 -0
- package/dist/cli/utils/errors.d.ts +52 -0
- package/dist/cli/utils/errors.js +102 -0
- package/dist/cli/utils/get-sdk-path.d.ts +18 -0
- package/dist/cli/utils/get-sdk-path.js +31 -0
- package/dist/cli/utils/inject-dependencies.d.ts +2 -0
- package/dist/cli/utils/inject-dependencies.js +55 -0
- package/dist/cli/utils/linting-tools.d.ts +8 -0
- package/dist/cli/utils/linting-tools.js +206 -0
- package/dist/cli/utils/metrics/code-quality.d.ts +32 -0
- package/dist/cli/utils/metrics/code-quality.js +122 -0
- package/dist/cli/utils/metrics/dependency-parser.d.ts +21 -0
- package/dist/cli/utils/metrics/dependency-parser.js +153 -0
- package/dist/cli/utils/metrics/file-complexity.d.ts +26 -0
- package/dist/cli/utils/metrics/file-complexity.js +77 -0
- package/dist/cli/utils/metrics/framework-detector.d.ts +17 -0
- package/dist/cli/utils/metrics/framework-detector.js +120 -0
- package/dist/cli/utils/metrics/git-metrics.d.ts +30 -0
- package/dist/cli/utils/metrics/git-metrics.js +83 -0
- package/dist/cli/utils/metrics/index.d.ts +28 -0
- package/dist/cli/utils/metrics/index.js +100 -0
- package/dist/cli/utils/template-processor.d.ts +10 -0
- package/dist/cli/utils/template-processor.js +188 -0
- package/dist/cli/utils/validate-path.d.ts +80 -0
- package/dist/cli/utils/validate-path.js +180 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +8 -0
- package/dist/templates/agents/aj-team/apo-documentation-specialist.md.template +572 -0
- package/dist/templates/agents/aj-team/bas-quality-gate.md.template +906 -0
- package/dist/templates/agents/aj-team/bon-dependency-manager.md.template +636 -0
- package/dist/templates/agents/aj-team/cap-configuration-specialist.md.template +670 -0
- package/dist/templates/agents/aj-team/dra-code-reviewer.md.template +768 -0
- package/dist/templates/agents/aj-team/kil-task-executor.md.template +764 -0
- package/dist/templates/agents/aj-team/uro-refactoring-specialist.md.template +759 -0
- package/dist/templates/agents/audit/juno-auditor.md.template +447 -0
- package/dist/templates/agents/deployment/ein-cicd.md.template +694 -0
- package/dist/templates/agents/deployment/ino-context.md.template +733 -0
- package/dist/templates/agents/deployment/tan-structure.md.template +661 -0
- package/dist/templates/agents/deployment/zen-knowledge.md.template +451 -0
- package/dist/templates/agents/leadership/aj-cc.md.template +462 -0
- package/dist/templates/agents/leadership/aj-maestro.md.template +943 -0
- package/dist/templates/agents/leadership/aly-cto.md.template +407 -0
- package/dist/templates/agents/planning/eus-decomposer.md.template +496 -0
- package/dist/templates/agents/planning/mon-requirements.md.template +323 -0
- package/dist/templates/agents/planning/ror-design.md.template +465 -0
- package/dist/templates/agents/planning/tra-planner.md.template +432 -0
- package/dist/templates/ci/cd.yml.template +175 -0
- package/dist/templates/ci/ci.yml.template +196 -0
- package/dist/templates/ci/generic-ci.yml +115 -0
- package/dist/templates/ci/github-actions.yml +86 -0
- package/dist/templates/ci/gitlab-ci.yml +103 -0
- package/dist/templates/claude/EMPLOYEE-DIRECTORY.md.template +545 -0
- package/dist/templates/documentation/ROOT-README.md.template +307 -0
- package/dist/templates/documentation/SUBDIRECTORY-README.md.template +261 -0
- package/dist/templates/investigations/bug.md.template +484 -0
- package/dist/templates/investigations/feature.md.template +564 -0
- package/dist/templates/investigations/performance.md.template +625 -0
- package/dist/templates/investigations/security.md.template +714 -0
- package/dist/templates/investigations/technical.md.template +433 -0
- package/dist/templates/knowledge-base/AI-DEVELOPMENT-GUIDE.md.template +957 -0
- package/dist/templates/knowledge-base/ARCHITECTURE.md.template +452 -0
- package/dist/templates/knowledge-base/CODING-PRINCIPLES.md.template +750 -0
- package/dist/templates/knowledge-base/DOCUMENTATION-CRITERIA.md.template +1118 -0
- package/dist/templates/knowledge-base/ISSUES.md.template +539 -0
- package/dist/templates/knowledge-base/TESTING-PRINCIPLES.md.template +894 -0
- package/dist/templates/knowledge-base/Technical-Debt.md.template +640 -0
- package/dist/templates/knowledge-base/To-do.md.template +407 -0
- package/dist/templates/knowledge-base/Trinity.md.template +464 -0
- package/dist/templates/linting/flutter/.pre-commit-config.yaml.template +27 -0
- package/dist/templates/linting/flutter/analysis_options.yaml.template +26 -0
- package/dist/templates/linting/nodejs/.eslintrc-commonjs.json.template +19 -0
- package/dist/templates/linting/nodejs/.eslintrc-esm.json.template +19 -0
- package/dist/templates/linting/nodejs/.eslintrc-typescript.json.template +22 -0
- package/dist/templates/linting/nodejs/.pre-commit-config.yaml.template +51 -0
- package/dist/templates/linting/nodejs/.prettierrc.json.template +10 -0
- package/dist/templates/linting/python/.flake8.template +16 -0
- package/dist/templates/linting/python/.pre-commit-config.yaml.template +30 -0
- package/dist/templates/linting/python/pyproject.toml.template +38 -0
- package/dist/templates/linting/rust/.pre-commit-config.yaml.template +28 -0
- package/dist/templates/linting/rust/clippy.toml.template +14 -0
- package/dist/templates/linting/rust/rustfmt.toml.template +12 -0
- package/dist/templates/root/CLAUDE.md.template +65 -0
- package/dist/templates/root/TRINITY.md.template +52 -0
- package/dist/templates/shared/claude-commands/trinity-agents.md.template +168 -0
- package/dist/templates/shared/claude-commands/trinity-audit.md.template +646 -0
- package/dist/templates/shared/claude-commands/trinity-changelog.md.template +624 -0
- package/dist/templates/shared/claude-commands/trinity-continue.md.template +549 -0
- package/dist/templates/shared/claude-commands/trinity-create-investigation.md.template +232 -0
- package/dist/templates/shared/claude-commands/trinity-decompose.md.template +181 -0
- package/dist/templates/shared/claude-commands/trinity-design.md.template +347 -0
- package/dist/templates/shared/claude-commands/trinity-docs.md.template +2093 -0
- package/dist/templates/shared/claude-commands/trinity-end.md.template +397 -0
- package/dist/templates/shared/claude-commands/trinity-init.md.template +606 -0
- package/dist/templates/shared/claude-commands/trinity-investigate-templates.md.template +725 -0
- package/dist/templates/shared/claude-commands/trinity-orchestrate.md.template +1061 -0
- package/dist/templates/shared/claude-commands/trinity-plan-investigation.md.template +135 -0
- package/dist/templates/shared/claude-commands/trinity-plan.md.template +201 -0
- package/dist/templates/shared/claude-commands/trinity-readme.md.template +1971 -0
- package/dist/templates/shared/claude-commands/trinity-requirements.md.template +148 -0
- package/dist/templates/shared/claude-commands/trinity-start.md.template +268 -0
- package/dist/templates/shared/claude-commands/trinity-verify.md.template +453 -0
- package/dist/templates/shared/claude-commands/trinity-workorder.md.template +249 -0
- package/dist/templates/source/base-CLAUDE.md.template +310 -0
- package/dist/templates/source/flutter-CLAUDE.md.template +593 -0
- package/dist/templates/source/nodejs-CLAUDE.md.template +531 -0
- package/dist/templates/source/python-CLAUDE.md.template +510 -0
- package/dist/templates/source/react-CLAUDE.md.template +513 -0
- package/dist/templates/source/rust-CLAUDE.md.template +653 -0
- package/dist/templates/source/tests-CLAUDE.md.template +432 -0
- package/dist/templates/trinity/CLAUDE.md.template +372 -0
- package/dist/templates/work-orders/ANALYSIS-TEMPLATE.md.template +276 -0
- package/dist/templates/work-orders/AUDIT-TEMPLATE.md.template +262 -0
- package/dist/templates/work-orders/IMPLEMENTATION-TEMPLATE.md.template +260 -0
- package/dist/templates/work-orders/INVESTIGATION-TEMPLATE.md.template +206 -0
- package/dist/templates/work-orders/PATTERN-TEMPLATE.md.template +320 -0
- package/dist/templates/work-orders/VERIFICATION-TEMPLATE.md.template +273 -0
- package/package.json +94 -0
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
# Trinity Method Implementation - {{PROJECT_NAME}}
|
|
2
|
+
**Version**: 7.0
|
|
3
|
+
**Technology Stack**: {{TECHNOLOGY_STACK}}
|
|
4
|
+
**Framework**: {{PRIMARY_FRAMEWORK}}
|
|
5
|
+
**Last Updated**: {{CURRENT_DATE}}
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## PROJECT-SPECIFIC TRINITY PROTOCOLS
|
|
10
|
+
|
|
11
|
+
### {{FRAMEWORK}} Investigation Procedures
|
|
12
|
+
|
|
13
|
+
#### Pre-Implementation Investigation
|
|
14
|
+
Every feature/fix in {{PROJECT_NAME}} requires investigation:
|
|
15
|
+
|
|
16
|
+
1. **Scope Definition** (5 minutes)
|
|
17
|
+
```yaml
|
|
18
|
+
Investigation_Scope:
|
|
19
|
+
Feature: {{FEATURE_NAME}}
|
|
20
|
+
Components_Affected: [List components]
|
|
21
|
+
Success_Criteria: [Define clear criteria]
|
|
22
|
+
Time_Box: 30 minutes maximum
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
2. **{{FRAMEWORK}}-Specific Analysis** (15 minutes)
|
|
26
|
+
- Component dependencies in {{FRAMEWORK}}
|
|
27
|
+
- State management implications
|
|
28
|
+
- Performance impact assessment
|
|
29
|
+
- Security considerations
|
|
30
|
+
|
|
31
|
+
3. **Pattern Discovery** (5 minutes)
|
|
32
|
+
- Check trinity/patterns/ for existing solutions
|
|
33
|
+
- Document new patterns if discovered
|
|
34
|
+
- Update pattern library
|
|
35
|
+
|
|
36
|
+
4. **Documentation** (5 minutes)
|
|
37
|
+
- Save to trinity/investigations/[date]-[feature].md
|
|
38
|
+
- Update relevant knowledge base files
|
|
39
|
+
- Link to issues if applicable
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## {{PROJECT_NAME}} DEBUGGING STANDARDS
|
|
44
|
+
|
|
45
|
+
### Mandatory Debug Implementation
|
|
46
|
+
|
|
47
|
+
#### {{LANGUAGE}} Debug Pattern
|
|
48
|
+
```{{LANGUAGE}}
|
|
49
|
+
{{DEBUG_ENTRY_PATTERN}}
|
|
50
|
+
|
|
51
|
+
// Function logic here
|
|
52
|
+
|
|
53
|
+
{{DEBUG_EXIT_PATTERN}}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### Framework-Specific Debug Points
|
|
57
|
+
1. **Component Lifecycle** ({{FRAMEWORK}}):
|
|
58
|
+
{{LIFECYCLE_DEBUG_POINTS}}
|
|
59
|
+
|
|
60
|
+
2. **State Changes**:
|
|
61
|
+
{{STATE_DEBUG_POINTS}}
|
|
62
|
+
|
|
63
|
+
3. **API Calls**:
|
|
64
|
+
{{API_DEBUG_POINTS}}
|
|
65
|
+
|
|
66
|
+
4. **Error Boundaries**:
|
|
67
|
+
{{ERROR_DEBUG_POINTS}}
|
|
68
|
+
|
|
69
|
+
### Debug Levels
|
|
70
|
+
```yaml
|
|
71
|
+
Debug_Levels:
|
|
72
|
+
VERBOSE: All entry/exit points
|
|
73
|
+
INFO: Key operations only
|
|
74
|
+
WARN: Potential issues
|
|
75
|
+
ERROR: Failures only
|
|
76
|
+
SILENT: Production mode
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## PERFORMANCE STANDARDS
|
|
82
|
+
|
|
83
|
+
### {{PROJECT_NAME}} Performance Baselines
|
|
84
|
+
|
|
85
|
+
| Metric | Target | Warning | Critical | {{FRAMEWORK}} Notes |
|
|
86
|
+
|--------|--------|---------|----------|---------------------|
|
|
87
|
+
| Initial Load | <{{LOAD_TARGET}}ms | >{{LOAD_WARNING}}ms | >{{LOAD_CRITICAL}}ms | {{LOAD_NOTES}} |
|
|
88
|
+
| Interaction | <{{INTERACTION_TARGET}}ms | >{{INTERACTION_WARNING}}ms | >{{INTERACTION_CRITICAL}}ms | {{INTERACTION_NOTES}} |
|
|
89
|
+
| API Response | <{{API_TARGET}}ms | >{{API_WARNING}}ms | >{{API_CRITICAL}}ms | {{API_NOTES}} |
|
|
90
|
+
| Memory Usage | <{{MEMORY_TARGET}}MB | >{{MEMORY_WARNING}}MB | >{{MEMORY_CRITICAL}}MB | {{MEMORY_NOTES}} |
|
|
91
|
+
| Bundle Size | <{{BUNDLE_TARGET}}KB | >{{BUNDLE_WARNING}}KB | >{{BUNDLE_CRITICAL}}KB | {{BUNDLE_NOTES}} |
|
|
92
|
+
|
|
93
|
+
### Performance Monitoring
|
|
94
|
+
```{{LANGUAGE}}
|
|
95
|
+
// Performance monitoring wrapper
|
|
96
|
+
{{PERFORMANCE_MONITORING_PATTERN}}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## QUALITY GATES
|
|
102
|
+
|
|
103
|
+
### Pre-Implementation Checklist
|
|
104
|
+
- [ ] Investigation completed
|
|
105
|
+
- [ ] Existing patterns reviewed (trinity/patterns/)
|
|
106
|
+
- [ ] Performance impact assessed
|
|
107
|
+
- [ ] Security implications considered
|
|
108
|
+
- [ ] Test plan created
|
|
109
|
+
- [ ] Documentation plan defined
|
|
110
|
+
|
|
111
|
+
### Pre-Commit Checklist
|
|
112
|
+
- [ ] All tests passing
|
|
113
|
+
- [ ] Debug logging implemented
|
|
114
|
+
- [ ] Performance baselines met
|
|
115
|
+
- [ ] No console errors
|
|
116
|
+
- [ ] Code review completed
|
|
117
|
+
- [ ] Documentation updated
|
|
118
|
+
|
|
119
|
+
### Pre-Deploy Checklist
|
|
120
|
+
- [ ] Integration tests passing
|
|
121
|
+
- [ ] Performance tests passing
|
|
122
|
+
- [ ] Security scan clean
|
|
123
|
+
- [ ] Rollback plan defined
|
|
124
|
+
- [ ] Monitoring configured
|
|
125
|
+
- [ ] Team notified
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## CRISIS MANAGEMENT PROTOCOLS
|
|
130
|
+
|
|
131
|
+
### {{FRAMEWORK}}-Specific Quality Indicators
|
|
132
|
+
|
|
133
|
+
#### Console Error Monitoring
|
|
134
|
+
**Trigger**: >{{ERROR_THRESHOLD}} console errors
|
|
135
|
+
**Response Protocol**:
|
|
136
|
+
1. Screenshot all errors
|
|
137
|
+
2. Enable verbose debugging
|
|
138
|
+
3. Trace error sources
|
|
139
|
+
4. Document in ISSUES.md with error pattern analysis
|
|
140
|
+
5. Implement fixes with full debugging
|
|
141
|
+
6. Update error handling patterns
|
|
142
|
+
|
|
143
|
+
#### Performance Monitoring
|
|
144
|
+
**Trigger**: Performance degradation >{{PERF_DEGRADATION_THRESHOLD}}%
|
|
145
|
+
**Response Protocol**:
|
|
146
|
+
1. Profile current performance
|
|
147
|
+
2. Compare with baselines
|
|
148
|
+
3. Identify bottlenecks
|
|
149
|
+
4. Document in Technical-Debt.md
|
|
150
|
+
5. Implement optimizations
|
|
151
|
+
6. Update performance baselines
|
|
152
|
+
|
|
153
|
+
#### Security Monitoring
|
|
154
|
+
**Trigger**: Security vulnerability discovered
|
|
155
|
+
**Response Protocol**:
|
|
156
|
+
1. Isolate vulnerability
|
|
157
|
+
2. Assess impact scope
|
|
158
|
+
3. Implement immediate patch
|
|
159
|
+
4. Full security audit
|
|
160
|
+
5. Update security protocols
|
|
161
|
+
6. Document in ISSUES.md
|
|
162
|
+
|
|
163
|
+
#### Data Integrity Monitoring
|
|
164
|
+
**Trigger**: Data inconsistency detected
|
|
165
|
+
**Response Protocol**:
|
|
166
|
+
1. Halt write operations
|
|
167
|
+
2. Backup current state
|
|
168
|
+
3. Audit data sources
|
|
169
|
+
4. Identify corruption point
|
|
170
|
+
5. Restore integrity
|
|
171
|
+
6. Implement validation checks
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## SESSION WORKFLOW
|
|
176
|
+
|
|
177
|
+
### Session Initialization Protocol
|
|
178
|
+
```yaml
|
|
179
|
+
Session_Start:
|
|
180
|
+
1_Load_Context:
|
|
181
|
+
- Read CLAUDE.md hierarchy
|
|
182
|
+
- Review To-do.md
|
|
183
|
+
- Check Technical-Debt.md
|
|
184
|
+
- Load recent investigations
|
|
185
|
+
|
|
186
|
+
2_Health_Check:
|
|
187
|
+
- Run test suite
|
|
188
|
+
- Check build system
|
|
189
|
+
- Verify dependencies
|
|
190
|
+
- Check performance baselines
|
|
191
|
+
|
|
192
|
+
3_Session_Setup:
|
|
193
|
+
- Create session folder
|
|
194
|
+
- Initialize session log
|
|
195
|
+
- Set session goals
|
|
196
|
+
- Start time tracking
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Session Work Protocol
|
|
200
|
+
```yaml
|
|
201
|
+
Session_Work:
|
|
202
|
+
Investigation_First:
|
|
203
|
+
- Always investigate before implementing
|
|
204
|
+
- Document findings
|
|
205
|
+
- Check for patterns
|
|
206
|
+
|
|
207
|
+
Implementation:
|
|
208
|
+
- Follow {{FRAMEWORK}} best practices
|
|
209
|
+
- Implement debugging
|
|
210
|
+
- Write tests alongside code
|
|
211
|
+
- Monitor performance
|
|
212
|
+
|
|
213
|
+
Validation:
|
|
214
|
+
- Run tests frequently
|
|
215
|
+
- Check performance impact
|
|
216
|
+
- Verify no console errors
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Session Completion Protocol
|
|
220
|
+
```yaml
|
|
221
|
+
Session_End:
|
|
222
|
+
1_Documentation:
|
|
223
|
+
- Update ARCHITECTURE.md
|
|
224
|
+
- Update To-do.md
|
|
225
|
+
- Document issues in ISSUES.md
|
|
226
|
+
- Archive investigations
|
|
227
|
+
|
|
228
|
+
2_Knowledge_Capture:
|
|
229
|
+
- Save new patterns
|
|
230
|
+
- Update Technical-Debt.md
|
|
231
|
+
- Record decisions
|
|
232
|
+
- Update metrics
|
|
233
|
+
|
|
234
|
+
3_Archive:
|
|
235
|
+
- Move to trinity/sessions/[date]/
|
|
236
|
+
- Create session summary
|
|
237
|
+
- Update project metrics
|
|
238
|
+
- Plan next session
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## PATTERN LIBRARY INTEGRATION
|
|
244
|
+
|
|
245
|
+
### Pattern Discovery Process
|
|
246
|
+
1. **Identify**: Recognize recurring solutions
|
|
247
|
+
2. **Document**: Create pattern file in trinity/patterns/
|
|
248
|
+
3. **Validate**: Test pattern effectiveness
|
|
249
|
+
4. **Share**: Update pattern index
|
|
250
|
+
5. **Reuse**: Apply in future implementations
|
|
251
|
+
|
|
252
|
+
### Pattern Template
|
|
253
|
+
```markdown
|
|
254
|
+
# Pattern: {{PATTERN_NAME}}
|
|
255
|
+
**Category**: {{CATEGORY}}
|
|
256
|
+
**Framework**: {{FRAMEWORK}}
|
|
257
|
+
**Frequency**: {{FREQUENCY}}
|
|
258
|
+
|
|
259
|
+
## Problem
|
|
260
|
+
{{PROBLEM_DESCRIPTION}}
|
|
261
|
+
|
|
262
|
+
## Solution
|
|
263
|
+
\```{{LANGUAGE}}
|
|
264
|
+
{{SOLUTION_CODE}}
|
|
265
|
+
\```
|
|
266
|
+
|
|
267
|
+
## Usage
|
|
268
|
+
{{USAGE_INSTRUCTIONS}}
|
|
269
|
+
|
|
270
|
+
## Trade-offs
|
|
271
|
+
{{TRADE_OFFS}}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## SUCCESS METRICS
|
|
277
|
+
|
|
278
|
+
### Trinity Method Metrics
|
|
279
|
+
```javascript
|
|
280
|
+
const trinityMetrics = {
|
|
281
|
+
// Investigation effectiveness
|
|
282
|
+
investigationSuccessRate: 0, // Issues prevented by investigation
|
|
283
|
+
averageInvestigationTime: 0, // Minutes per investigation
|
|
284
|
+
|
|
285
|
+
// Pattern library growth
|
|
286
|
+
patternsDiscovered: 0, // New patterns this period
|
|
287
|
+
patternReuseRate: 0, // Patterns reused vs created
|
|
288
|
+
|
|
289
|
+
// Issue prevention
|
|
290
|
+
issuesPreventedByPatterns: 0, // Issues avoided through patterns
|
|
291
|
+
issueRecurrenceRate: 0, // Issues that reappear
|
|
292
|
+
|
|
293
|
+
// Quality metrics
|
|
294
|
+
firstTimeFixRate: 0, // Fixes that work first time
|
|
295
|
+
qualityGatePassRate: 0, // Commits passing all gates
|
|
296
|
+
|
|
297
|
+
// Performance maintenance
|
|
298
|
+
performanceRegressions: 0, // Times performance degraded
|
|
299
|
+
performanceImprovements: 0, // Times performance improved
|
|
300
|
+
|
|
301
|
+
// Crisis management
|
|
302
|
+
crisisesAvoided: 0, // Crises prevented by protocols
|
|
303
|
+
crisisResolutionTime: 0, // Average crisis resolution time
|
|
304
|
+
};
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Reporting Schedule
|
|
308
|
+
- **Daily**: Update session metrics
|
|
309
|
+
- **Weekly**: Review success metrics
|
|
310
|
+
- **Monthly**: Full Trinity Method audit
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## CONTINUOUS IMPROVEMENT
|
|
315
|
+
|
|
316
|
+
### Methodology Evolution
|
|
317
|
+
1. **Feedback Loop**: Collect team feedback weekly
|
|
318
|
+
2. **Pattern Analysis**: Review pattern effectiveness monthly
|
|
319
|
+
3. **Process Refinement**: Update protocols based on learnings
|
|
320
|
+
4. **Tool Enhancement**: Improve tooling and automation
|
|
321
|
+
|
|
322
|
+
### Knowledge Growth Strategy
|
|
323
|
+
- Document every investigation
|
|
324
|
+
- Capture every pattern
|
|
325
|
+
- Track every issue resolution
|
|
326
|
+
- Archive every session
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## TEAM PROTOCOLS
|
|
331
|
+
|
|
332
|
+
### Role Definitions
|
|
333
|
+
- **TRINITY CTO**: Methodology enforcement and evolution
|
|
334
|
+
- **Developers**: Investigation-first implementation
|
|
335
|
+
- **Reviewers**: Quality gate verification
|
|
336
|
+
|
|
337
|
+
### Communication Standards
|
|
338
|
+
- Investigation findings shared immediately
|
|
339
|
+
- Patterns documented within session
|
|
340
|
+
- Issues reported as discovered
|
|
341
|
+
- Metrics reviewed weekly
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## TECHNOLOGY-SPECIFIC ADAPTATIONS
|
|
346
|
+
|
|
347
|
+
### {{FRAMEWORK}} Specific Rules
|
|
348
|
+
{{FRAMEWORK_SPECIFIC_RULES}}
|
|
349
|
+
|
|
350
|
+
### {{LANGUAGE}} Specific Patterns
|
|
351
|
+
{{LANGUAGE_SPECIFIC_PATTERNS}}
|
|
352
|
+
|
|
353
|
+
### {{PROJECT_NAME}} Custom Protocols
|
|
354
|
+
{{CUSTOM_PROTOCOLS}}
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## 📝 WHEN TO UPDATE THIS DOCUMENT
|
|
359
|
+
|
|
360
|
+
This is a **living methodology document** that evolves as the team learns better development practices.
|
|
361
|
+
|
|
362
|
+
### Immediate Updates Required ⚠️
|
|
363
|
+
|
|
364
|
+
Update **when protocols change** (rare):
|
|
365
|
+
|
|
366
|
+
- ✅ **Investigation Protocol Changed**: Update investigation procedures if team finds better approach
|
|
367
|
+
- ✅ **Debugging Standard Modified**: Update debug patterns if framework/tools change
|
|
368
|
+
- ✅ **Performance Baseline Changed**: Update targets after major optimization or framework upgrade
|
|
369
|
+
- ✅ **Quality Gate Modified**: Update BAS phases if team adjusts quality criteria
|
|
370
|
+
- ✅ **Crisis Protocol Triggered**: Document new crisis management procedures after incident
|
|
371
|
+
|
|
372
|
+
### Session Updates (Via `/trinity-end`) 🔄
|
|
373
|
+
|
|
374
|
+
Update at end of sessions **only if** methodology improved:
|
|
375
|
+
|
|
376
|
+
- Success metrics (add session statistics)
|
|
377
|
+
- Pattern library updates (new patterns discovered)
|
|
378
|
+
- Session workflow improvements (better process found)
|
|
379
|
+
- Investigation time adjustments (if team getting faster/slower)
|
|
380
|
+
|
|
381
|
+
### Monthly Reviews 📅
|
|
382
|
+
|
|
383
|
+
Trinity Method effectiveness assessment:
|
|
384
|
+
|
|
385
|
+
- Review success metrics trends
|
|
386
|
+
- Evaluate investigation-first effectiveness
|
|
387
|
+
- Assess pattern library growth
|
|
388
|
+
- Analyze crisis prevention success rate
|
|
389
|
+
- Update methodology based on learnings
|
|
390
|
+
|
|
391
|
+
### Cross-Document Update Triggers 🔗
|
|
392
|
+
|
|
393
|
+
**When updating Trinity.md, also check:**
|
|
394
|
+
|
|
395
|
+
- **[AI-DEVELOPMENT-GUIDE.md](./AI-DEVELOPMENT-GUIDE.md)**: Update workflows if Trinity protocols change
|
|
396
|
+
- **[ISSUES.md](./ISSUES.md)**: Add Trinity Method pattern if process issue discovered
|
|
397
|
+
|
|
398
|
+
### Update Scenarios - What to Change
|
|
399
|
+
|
|
400
|
+
**Scenario: Investigation Time Box Changed**
|
|
401
|
+
```yaml
|
|
402
|
+
Updates_Required:
|
|
403
|
+
- Investigation_Procedures: Update time box (e.g., 30min → 45min)
|
|
404
|
+
- Rationale: Document why change made
|
|
405
|
+
- Success_Metrics: Track if change improves outcomes
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Scenario: New Debug Pattern Discovered**
|
|
409
|
+
```yaml
|
|
410
|
+
Updates_Required:
|
|
411
|
+
- Debugging_Standards: Add new pattern to framework-specific section
|
|
412
|
+
- Debug_Example: Provide code example
|
|
413
|
+
- Cross_References:
|
|
414
|
+
- CODING-PRINCIPLES.md: Add if pattern reveals coding standard
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
**Scenario: Performance Baseline Adjusted**
|
|
418
|
+
```yaml
|
|
419
|
+
Updates_Required:
|
|
420
|
+
- Performance_Standards: Update baseline metrics
|
|
421
|
+
- Baseline_Rationale: Document why targets changed
|
|
422
|
+
- Cross_References:
|
|
423
|
+
- ARCHITECTURE.md: Update Performance Architecture section
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### How to Update
|
|
427
|
+
|
|
428
|
+
**Step-by-step process:**
|
|
429
|
+
|
|
430
|
+
1. **Validate Change**: Is this improving methodology or just project-specific?
|
|
431
|
+
2. **Update Section**: Modify protocols, baselines, or workflows
|
|
432
|
+
3. **Document Rationale**: Why was this change made?
|
|
433
|
+
4. **Update Metrics**: Adjust success criteria if needed
|
|
434
|
+
5. **Update Timestamp**: Set `Last Updated: {{CURRENT_DATE}}`
|
|
435
|
+
|
|
436
|
+
**Quality Checklist:**
|
|
437
|
+
- [ ] Change improves methodology (not just one-off adjustment)
|
|
438
|
+
- [ ] Rationale documented (why change made)
|
|
439
|
+
- [ ] Examples match project's framework/language
|
|
440
|
+
- [ ] Success metrics updated to measure improvement
|
|
441
|
+
- [ ] Related documents updated (AI-DEV-GUIDE, ISSUES)
|
|
442
|
+
|
|
443
|
+
### When NOT to Update ❌
|
|
444
|
+
|
|
445
|
+
**Don't update if:**
|
|
446
|
+
- Project-specific change (belongs in ARCHITECTURE or ISSUES)
|
|
447
|
+
- One-time exception (not a protocol change)
|
|
448
|
+
- Framework-specific issue (document in ISSUES.md instead)
|
|
449
|
+
- Only updating placeholders with project values (done during /trinity-init)
|
|
450
|
+
|
|
451
|
+
**This document changes infrequently** - only update when methodology itself improves.
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
**Document Status**: Living Methodology Document
|
|
456
|
+
**Update Frequency**: Rare (only when methodology improves)
|
|
457
|
+
**Maintained By**: Development team using Trinity Method
|
|
458
|
+
**Referenced By**: `/trinity-end` for success metrics only
|
|
459
|
+
**Last Updated**: {{CURRENT_DATE}}
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
*Trinity Method implementation specific to {{PROJECT_NAME}}*
|
|
464
|
+
*Continuously evolved based on project learnings*
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Pre-commit Configuration
|
|
2
|
+
# Trinity Method v{{TRINITY_VERSION}}
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: local
|
|
6
|
+
hooks:
|
|
7
|
+
- id: dart-format
|
|
8
|
+
name: dart format
|
|
9
|
+
entry: dart format
|
|
10
|
+
language: system
|
|
11
|
+
files: \.dart$
|
|
12
|
+
pass_filenames: true
|
|
13
|
+
|
|
14
|
+
- id: dart-analyze
|
|
15
|
+
name: dart analyze
|
|
16
|
+
entry: dart analyze
|
|
17
|
+
language: system
|
|
18
|
+
files: \.dart$
|
|
19
|
+
pass_filenames: false
|
|
20
|
+
|
|
21
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
22
|
+
rev: v4.5.0
|
|
23
|
+
hooks:
|
|
24
|
+
- id: trailing-whitespace
|
|
25
|
+
- id: end-of-file-fixer
|
|
26
|
+
- id: check-yaml
|
|
27
|
+
- id: check-merge-conflict
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Dart Analysis Options
|
|
2
|
+
# Trinity Method v{{TRINITY_VERSION}}
|
|
3
|
+
|
|
4
|
+
include: package:flutter_lints/flutter.yaml
|
|
5
|
+
|
|
6
|
+
analyzer:
|
|
7
|
+
exclude:
|
|
8
|
+
- "**/*.g.dart"
|
|
9
|
+
- "**/*.freezed.dart"
|
|
10
|
+
errors:
|
|
11
|
+
invalid_annotation_target: ignore
|
|
12
|
+
strong-mode:
|
|
13
|
+
implicit-casts: false
|
|
14
|
+
implicit-dynamic: false
|
|
15
|
+
|
|
16
|
+
linter:
|
|
17
|
+
rules:
|
|
18
|
+
- always_declare_return_types
|
|
19
|
+
- avoid_print
|
|
20
|
+
- avoid_unnecessary_containers
|
|
21
|
+
- prefer_const_constructors
|
|
22
|
+
- prefer_const_literals_to_create_immutables
|
|
23
|
+
- prefer_final_fields
|
|
24
|
+
- prefer_final_locals
|
|
25
|
+
- sort_child_properties_last
|
|
26
|
+
- use_key_in_widget_constructors
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"es2021": true,
|
|
4
|
+
"node": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended"
|
|
8
|
+
],
|
|
9
|
+
"parserOptions": {
|
|
10
|
+
"ecmaVersion": "latest",
|
|
11
|
+
"sourceType": "script"
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"no-console": "off",
|
|
15
|
+
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
|
16
|
+
"prefer-const": "warn",
|
|
17
|
+
"no-var": "error"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"es2021": true,
|
|
4
|
+
"node": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended"
|
|
8
|
+
],
|
|
9
|
+
"parserOptions": {
|
|
10
|
+
"ecmaVersion": "latest",
|
|
11
|
+
"sourceType": "module"
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"no-console": "off",
|
|
15
|
+
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
|
16
|
+
"prefer-const": "warn",
|
|
17
|
+
"no-var": "error"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"es2021": true,
|
|
4
|
+
"node": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended",
|
|
8
|
+
"plugin:@typescript-eslint/recommended"
|
|
9
|
+
],
|
|
10
|
+
"parser": "@typescript-eslint/parser",
|
|
11
|
+
"parserOptions": {
|
|
12
|
+
"ecmaVersion": "latest",
|
|
13
|
+
"sourceType": "module"
|
|
14
|
+
},
|
|
15
|
+
"plugins": ["@typescript-eslint"],
|
|
16
|
+
"rules": {
|
|
17
|
+
"no-console": "off",
|
|
18
|
+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
|
19
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
20
|
+
"@typescript-eslint/no-explicit-any": "warn"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Trinity Method Pre-commit Hooks
|
|
2
|
+
# Trinity Method v{{TRINITY_VERSION}}
|
|
3
|
+
# Framework: {{FRAMEWORK}}
|
|
4
|
+
# Generated by: EIN (CI/CD Specialist)
|
|
5
|
+
# Install: pip install pre-commit && pre-commit install
|
|
6
|
+
|
|
7
|
+
repos:
|
|
8
|
+
# Linting and Formatting
|
|
9
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
+
rev: v4.5.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: trailing-whitespace
|
|
13
|
+
- id: end-of-file-fixer
|
|
14
|
+
- id: check-yaml
|
|
15
|
+
- id: check-json
|
|
16
|
+
- id: check-added-large-files
|
|
17
|
+
args: ['--maxkb=500']
|
|
18
|
+
- id: check-merge-conflict
|
|
19
|
+
- id: detect-private-key
|
|
20
|
+
|
|
21
|
+
# ESLint for JavaScript/TypeScript
|
|
22
|
+
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
23
|
+
rev: v8.56.0
|
|
24
|
+
hooks:
|
|
25
|
+
- id: eslint
|
|
26
|
+
files: \.(js|jsx|ts|tsx)$
|
|
27
|
+
args: ['--fix']
|
|
28
|
+
additional_dependencies:
|
|
29
|
+
- eslint
|
|
30
|
+
- '@typescript-eslint/eslint-plugin'
|
|
31
|
+
- '@typescript-eslint/parser'
|
|
32
|
+
|
|
33
|
+
# TypeScript type checking
|
|
34
|
+
- repo: local
|
|
35
|
+
hooks:
|
|
36
|
+
- id: tsc
|
|
37
|
+
name: TypeScript Compiler
|
|
38
|
+
entry: npx tsc --noEmit
|
|
39
|
+
language: system
|
|
40
|
+
types: [typescript]
|
|
41
|
+
pass_filenames: false
|
|
42
|
+
|
|
43
|
+
# Run tests for modified files
|
|
44
|
+
- repo: local
|
|
45
|
+
hooks:
|
|
46
|
+
- id: jest-changed
|
|
47
|
+
name: Jest (Changed Files)
|
|
48
|
+
entry: npm test -- --findRelatedTests --passWithNoTests
|
|
49
|
+
language: system
|
|
50
|
+
types: [javascript, typescript]
|
|
51
|
+
pass_filenames: true
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Flake8 Configuration
|
|
2
|
+
# Trinity Method v{{TRINITY_VERSION}}
|
|
3
|
+
|
|
4
|
+
[flake8]
|
|
5
|
+
max-line-length = 100
|
|
6
|
+
extend-ignore = E203, E266, E501, W503
|
|
7
|
+
exclude =
|
|
8
|
+
.git,
|
|
9
|
+
__pycache__,
|
|
10
|
+
.venv,
|
|
11
|
+
venv,
|
|
12
|
+
build,
|
|
13
|
+
dist,
|
|
14
|
+
*.egg-info
|
|
15
|
+
per-file-ignores =
|
|
16
|
+
__init__.py:F401
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Pre-commit Configuration
|
|
2
|
+
# Trinity Method v{{TRINITY_VERSION}}
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/psf/black
|
|
6
|
+
rev: 23.9.1
|
|
7
|
+
hooks:
|
|
8
|
+
- id: black
|
|
9
|
+
language_version: python3
|
|
10
|
+
|
|
11
|
+
- repo: https://github.com/pycqa/flake8
|
|
12
|
+
rev: 6.1.0
|
|
13
|
+
hooks:
|
|
14
|
+
- id: flake8
|
|
15
|
+
|
|
16
|
+
- repo: https://github.com/pycqa/isort
|
|
17
|
+
rev: 5.12.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: isort
|
|
20
|
+
args: ["--profile", "black"]
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
23
|
+
rev: v4.5.0
|
|
24
|
+
hooks:
|
|
25
|
+
- id: trailing-whitespace
|
|
26
|
+
- id: end-of-file-fixer
|
|
27
|
+
- id: check-yaml
|
|
28
|
+
- id: check-json
|
|
29
|
+
- id: check-merge-conflict
|
|
30
|
+
- id: check-ast
|