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
package/dist/templates/{shared/claude-commands → .claude/commands/session}/trinity-end.md.template
RENAMED
|
@@ -1,397 +1,403 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
│
|
|
54
|
-
├──
|
|
55
|
-
│
|
|
56
|
-
|
|
57
|
-
│ ├── INV-001
|
|
58
|
-
│
|
|
59
|
-
└──
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
**
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
**
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
**
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
- [ ] **
|
|
235
|
-
- [ ] **
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
- [ ] **
|
|
239
|
-
- [ ] **
|
|
240
|
-
- [ ] **
|
|
241
|
-
- [ ] **
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
- [ ] **
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
- [ ] **
|
|
248
|
-
- [ ] **
|
|
249
|
-
- [ ] **
|
|
250
|
-
- [ ] **
|
|
251
|
-
|
|
252
|
-
-
|
|
253
|
-
- [ ] **
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
- [ ] **
|
|
257
|
-
- [ ] **
|
|
258
|
-
- [ ] **
|
|
259
|
-
- [ ] **
|
|
260
|
-
|
|
261
|
-
-
|
|
262
|
-
- [ ] **
|
|
263
|
-
- [ ] **
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
####
|
|
276
|
-
- [ ] **New
|
|
277
|
-
- [ ] **
|
|
278
|
-
- [ ] **
|
|
279
|
-
- [ ] **Last Updated**: Set to current date (only if modified)
|
|
280
|
-
|
|
281
|
-
####
|
|
282
|
-
- [ ] **
|
|
283
|
-
- [ ] **
|
|
284
|
-
- [ ] **
|
|
285
|
-
- [ ] **Last Updated**: Set to current date (only if modified)
|
|
286
|
-
|
|
287
|
-
####
|
|
288
|
-
- [ ] **
|
|
289
|
-
- [ ] **
|
|
290
|
-
- [ ] **
|
|
291
|
-
- [ ] **
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
- [ ] **
|
|
296
|
-
- [ ] **
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
####
|
|
309
|
-
- [ ]
|
|
310
|
-
- [ ]
|
|
311
|
-
- [ ]
|
|
312
|
-
- [ ]
|
|
313
|
-
|
|
314
|
-
####
|
|
315
|
-
- [ ]
|
|
316
|
-
- [ ]
|
|
317
|
-
- [ ]
|
|
318
|
-
- [ ]
|
|
319
|
-
|
|
320
|
-
####
|
|
321
|
-
- [ ]
|
|
322
|
-
- [ ]
|
|
323
|
-
- [ ]
|
|
324
|
-
- [ ]
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
→
|
|
345
|
-
→ Update
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
→ Update
|
|
351
|
-
→ Update To-do.md (
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
→ Update
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
→ Update
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
**
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
-
|
|
389
|
-
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
-
|
|
394
|
-
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
1
|
+
# Trinity End
|
|
2
|
+
|
|
3
|
+
**Command:** `/session:trinity-end`
|
|
4
|
+
**Purpose:** End session and archive work to .claude/trinity/archive/
|
|
5
|
+
**Architecture:** ALY session summary → Work archival → Documentation update
|
|
6
|
+
**Trinity Version:** 2.1.0
|
|
7
|
+
**Last Updated:** 2026-01-21
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
End current Trinity Method session and prepare for commit.
|
|
12
|
+
|
|
13
|
+
**Context:** User is finished with current task and ready to commit, push, or move to next work.
|
|
14
|
+
|
|
15
|
+
**Process:**
|
|
16
|
+
1. **ALY (CTO)** archives session work:
|
|
17
|
+
|
|
18
|
+
**STRICT ARCHIVING PROTOCOL:**
|
|
19
|
+
|
|
20
|
+
a. **Archive Completed Work Orders:**
|
|
21
|
+
- Read all files from `.claude/trinity/sessions/` matching `WO-*.md`
|
|
22
|
+
- Move each to `.claude/trinity/archive/work-orders/YYYY-MM-DD/`
|
|
23
|
+
- These were moved to sessions/ after completion per work order template
|
|
24
|
+
|
|
25
|
+
b. **Archive Completed Investigations:**
|
|
26
|
+
- Read all files from `.claude/trinity/sessions/` matching `INV-*.md`
|
|
27
|
+
- Move each to `.claude/trinity/archive/investigations/YYYY-MM-DD/`
|
|
28
|
+
- These were moved to sessions/ after completion per investigation template
|
|
29
|
+
|
|
30
|
+
c. **Archive ALL Reports:**
|
|
31
|
+
- Move ALL files from `.claude/trinity/reports/` to `.claude/trinity/archive/reports/YYYY-MM-DD/`
|
|
32
|
+
- This includes:
|
|
33
|
+
- Implementation completion reports
|
|
34
|
+
- Investigation findings reports
|
|
35
|
+
- JUNO audit reports
|
|
36
|
+
- Any other session reports
|
|
37
|
+
- **NO EXCEPTIONS:** Every file in reports/ must be archived
|
|
38
|
+
|
|
39
|
+
d. **Archive Session Files:**
|
|
40
|
+
- Move ALL remaining files from `.claude/trinity/sessions/` to `.claude/trinity/archive/sessions/YYYY-MM-DD/`
|
|
41
|
+
- Create session summary document in `.claude/trinity/archive/sessions/YYYY-MM-DD/SESSION-SUMMARY-{date}.md`
|
|
42
|
+
|
|
43
|
+
e. **Verify Clean Slate:**
|
|
44
|
+
- **CRITICAL:** After archiving, `.claude/trinity/sessions/` MUST be empty
|
|
45
|
+
- **CRITICAL:** After archiving, `.claude/trinity/reports/` MUST be empty
|
|
46
|
+
- If any files remain, archive them or report error
|
|
47
|
+
- Next session MUST start with completely empty sessions/ and reports/ folders
|
|
48
|
+
|
|
49
|
+
**Archive Structure:**
|
|
50
|
+
```
|
|
51
|
+
.claude/trinity/archive/
|
|
52
|
+
├── work-orders/YYYY-MM-DD/
|
|
53
|
+
│ ├── WO-001-*.md
|
|
54
|
+
│ ├── WO-002-*.md
|
|
55
|
+
│ └── ...
|
|
56
|
+
├── investigations/YYYY-MM-DD/
|
|
57
|
+
│ ├── INV-001-*.md
|
|
58
|
+
│ ├── INV-002-*.md
|
|
59
|
+
│ └── ...
|
|
60
|
+
├── reports/YYYY-MM-DD/
|
|
61
|
+
│ ├── WO-001-IMPLEMENTATION-COMPLETE-*.md
|
|
62
|
+
│ ├── AUDIT-WO-001-*.md
|
|
63
|
+
│ ├── INV-001-findings-*.md
|
|
64
|
+
│ └── ...
|
|
65
|
+
└── sessions/YYYY-MM-DD/
|
|
66
|
+
├── SESSION-SUMMARY-{date}.md
|
|
67
|
+
└── [any other session files]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Important Notes:**
|
|
71
|
+
- Keep ONLY active/in-progress work orders in `.claude/trinity/work-orders/`
|
|
72
|
+
- Keep ONLY active/in-progress investigations in `.claude/trinity/investigations/`
|
|
73
|
+
- Do NOT archive incomplete work
|
|
74
|
+
- Completed work is identified by presence in `.claude/trinity/sessions/` folder
|
|
75
|
+
- All reports are archived regardless of status
|
|
76
|
+
|
|
77
|
+
2. **ALY analyzes session events:**
|
|
78
|
+
- Review all work completed during session
|
|
79
|
+
- Identify patterns and learnings
|
|
80
|
+
- Update .claude/trinity/knowledge-base/ARCHITECTURE.md with architectural changes
|
|
81
|
+
- Update .claude/trinity/knowledge-base/ISSUES.md with new known issues
|
|
82
|
+
- Update .claude/trinity/knowledge-base/To-do.md with next tasks
|
|
83
|
+
- Update .claude/trinity/knowledge-base/Technical-Debt.md with new debt
|
|
84
|
+
|
|
85
|
+
3. **Clean workspace:**
|
|
86
|
+
- Verify .claude/trinity/work-orders/ contains only active work
|
|
87
|
+
- Verify .claude/trinity/investigations/ contains only active investigations
|
|
88
|
+
- Verify .claude/trinity/reports/ is empty
|
|
89
|
+
- Verify .claude/trinity/sessions/ is empty
|
|
90
|
+
- Ready for next session
|
|
91
|
+
|
|
92
|
+
4. **Git commit instructions:**
|
|
93
|
+
After archiving, provide user with commit checklist:
|
|
94
|
+
|
|
95
|
+
**For Trinity Method SDK project:**
|
|
96
|
+
- Update version in package.json (semantic versioning)
|
|
97
|
+
- Run `npm run build` to compile changes
|
|
98
|
+
- Run `npm pack` to create tarball
|
|
99
|
+
- Update CHANGELOG.md with changes
|
|
100
|
+
- Git commit with descriptive message
|
|
101
|
+
- Git push to repository
|
|
102
|
+
|
|
103
|
+
**For client projects using Trinity:**
|
|
104
|
+
- Review git status for modified files
|
|
105
|
+
- Stage changes: `git add .`
|
|
106
|
+
- Commit with message describing work completed
|
|
107
|
+
- Push to repository: `git push`
|
|
108
|
+
|
|
109
|
+
**Outcome:**
|
|
110
|
+
- All completed work properly archived with timestamp
|
|
111
|
+
- Active/in-progress work remains in working directories
|
|
112
|
+
- Trinity documents updated with session learnings
|
|
113
|
+
- Workspace clean and ready for git operations
|
|
114
|
+
- User has clear instructions for version updates and commits
|
|
115
|
+
|
|
116
|
+
**Note:** Run this before committing your work.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## When to Use /trinity-end
|
|
121
|
+
|
|
122
|
+
### ✅ Use When:
|
|
123
|
+
|
|
124
|
+
1. **Work Session Complete**
|
|
125
|
+
- All work orders closed
|
|
126
|
+
- All commits pushed
|
|
127
|
+
- Ready to stop working
|
|
128
|
+
|
|
129
|
+
2. **Major Milestone Reached**
|
|
130
|
+
- Feature complete and merged
|
|
131
|
+
- Sprint completed
|
|
132
|
+
- Release deployed
|
|
133
|
+
|
|
134
|
+
3. **Context Cleanup Needed**
|
|
135
|
+
- Long session (>4 hours)
|
|
136
|
+
- Multiple work orders completed
|
|
137
|
+
- Knowledge base needs updating
|
|
138
|
+
|
|
139
|
+
### ❌ Don't Use When:
|
|
140
|
+
|
|
141
|
+
1. **Mid-Task**
|
|
142
|
+
- Work order still in progress
|
|
143
|
+
- Uncommitted changes
|
|
144
|
+
- Tests failing
|
|
145
|
+
|
|
146
|
+
2. **Just Pausing**
|
|
147
|
+
- Taking a break (keep context)
|
|
148
|
+
- Switching tasks temporarily
|
|
149
|
+
- Waiting for review
|
|
150
|
+
|
|
151
|
+
**Instead Use**: `/trinity-continue` when resuming work
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Session Summary Example
|
|
156
|
+
|
|
157
|
+
```markdown
|
|
158
|
+
# Session Summary - 2025-12-18
|
|
159
|
+
|
|
160
|
+
**Duration**: 4 hours 30 minutes
|
|
161
|
+
**Work Orders Completed**: 2 (WO-042, WO-043)
|
|
162
|
+
**Commits**: 7 commits pushed to main
|
|
163
|
+
|
|
164
|
+
## Accomplishments
|
|
165
|
+
|
|
166
|
+
### WO-042: JWT Refresh Token Implementation ✅
|
|
167
|
+
- Implemented secure refresh token rotation
|
|
168
|
+
- Added HttpOnly cookie support
|
|
169
|
+
- 87% test coverage (exceeds 80% threshold)
|
|
170
|
+
- All BAS quality gates passed
|
|
171
|
+
|
|
172
|
+
**Files Changed**: 4 files (service, middleware, types, tests)
|
|
173
|
+
**Lines**: +234 additions, -12 deletions
|
|
174
|
+
|
|
175
|
+
### WO-043: User Profile Editing ✅
|
|
176
|
+
- Added profile update endpoint
|
|
177
|
+
- Validation for all fields
|
|
178
|
+
- Integration tests complete
|
|
179
|
+
- Documentation updated
|
|
180
|
+
|
|
181
|
+
**Files Changed**: 3 files (controller, service, tests)
|
|
182
|
+
**Lines**: +156 additions, -8 deletions
|
|
183
|
+
|
|
184
|
+
## Knowledge Base Updates
|
|
185
|
+
|
|
186
|
+
**ARCHITECTURE.md**:
|
|
187
|
+
- Added OAuth2 refresh token flow diagram
|
|
188
|
+
- Documented token rotation strategy
|
|
189
|
+
|
|
190
|
+
**ISSUES.md**:
|
|
191
|
+
- Closed: #42 (JWT refresh), #45 (profile editing)
|
|
192
|
+
- Added: #48 (rate limiting for refresh endpoint)
|
|
193
|
+
|
|
194
|
+
**Technical-Debt.md**:
|
|
195
|
+
- Added: Refactor auth service (split into 2 files)
|
|
196
|
+
- Resolved: Email validation duplication
|
|
197
|
+
|
|
198
|
+
## Metrics
|
|
199
|
+
|
|
200
|
+
- **Velocity**: 2 work orders / 4.5 hours = 0.44 WO/hour
|
|
201
|
+
- **Test Coverage**: Maintained 85% average
|
|
202
|
+
- **Build Status**: All builds passed
|
|
203
|
+
- **Code Quality**: Zero linting errors
|
|
204
|
+
|
|
205
|
+
## Next Session
|
|
206
|
+
|
|
207
|
+
**Planned Work Orders**:
|
|
208
|
+
- WO-048: Rate limiting implementation
|
|
209
|
+
- WO-049: Auth service refactoring
|
|
210
|
+
|
|
211
|
+
**Estimated Time**: 3-4 hours
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
**Session closed at**: 2025-12-18 18:30
|
|
216
|
+
**Knowledge base**: Updated
|
|
217
|
+
**All changes**: Committed and pushed
|
|
218
|
+
**Status**: ✅ Clean slate for next session
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Knowledge Base Update Checklist
|
|
226
|
+
|
|
227
|
+
Before ending session, ALY updates living documentation based on session work:
|
|
228
|
+
|
|
229
|
+
### Phase 1: Core Document Updates (Required)
|
|
230
|
+
|
|
231
|
+
Update these documents based on what changed during the session:
|
|
232
|
+
|
|
233
|
+
#### ARCHITECTURE.md
|
|
234
|
+
- [ ] **New Components**: Add to Component Architecture table
|
|
235
|
+
- [ ] **Technology Changes**: Update Technology Profile (framework versions, new tools)
|
|
236
|
+
- [ ] **API Changes**: Update API endpoints or patterns
|
|
237
|
+
- [ ] **Integration Changes**: Add/update External Integrations
|
|
238
|
+
- [ ] **Performance Changes**: Update baselines if optimization occurred
|
|
239
|
+
- [ ] **Architectural Decisions**: Add to Technical Decisions Log
|
|
240
|
+
- [ ] **Cross-References**: Verify links to ISSUES.md, Technical-Debt.md still valid
|
|
241
|
+
- [ ] **Last Updated**: Set to current date
|
|
242
|
+
|
|
243
|
+
#### ISSUES.md
|
|
244
|
+
- [ ] **Close Resolved Issues**: Mark issues fixed during session as resolved
|
|
245
|
+
- [ ] **Add New Issues**: Document new bugs/patterns discovered
|
|
246
|
+
- [ ] **Update Patterns**: Add new recurring patterns discovered
|
|
247
|
+
- [ ] **Update Metrics**: Refresh Issue Resolution Metrics
|
|
248
|
+
- [ ] **Investigation Links**: Link to investigations completed this session
|
|
249
|
+
- [ ] **Cross-References**: Ensure links to Technical-Debt.md, ARCHITECTURE.md accurate
|
|
250
|
+
- [ ] **Last Updated**: Set to current date
|
|
251
|
+
|
|
252
|
+
#### To-do.md
|
|
253
|
+
- [ ] **Remove Completed**: Delete or mark complete tasks finished during session
|
|
254
|
+
- [ ] **Add New Tasks**: Add tasks identified during development
|
|
255
|
+
- [ ] **Update Priorities**: Re-prioritize based on new information
|
|
256
|
+
- [ ] **Update Sprint Planning**: Refresh current sprint status
|
|
257
|
+
- [ ] **Update Backlog**: Add items discovered during session
|
|
258
|
+
- [ ] **Velocity Metrics**: Calculate session velocity
|
|
259
|
+
- [ ] **Last Updated**: Set to current date
|
|
260
|
+
|
|
261
|
+
#### Technical-Debt.md
|
|
262
|
+
- [ ] **Add New Debt**: Document TODOs/FIXMEs/HACKs added during session
|
|
263
|
+
- [ ] **Resolve Debt**: Remove items paid down during session
|
|
264
|
+
- [ ] **Update Metrics**: Recalculate debt metrics (TODO count, file complexity, coverage)
|
|
265
|
+
- [ ] **Add Patterns**: Document new debt patterns discovered
|
|
266
|
+
- [ ] **Update Trends**: Refresh Session Comparison metrics
|
|
267
|
+
- [ ] **ROI Analysis**: Update debt reduction plan based on session learnings
|
|
268
|
+
- [ ] **Cross-References**: Ensure links to ISSUES.md patterns are current
|
|
269
|
+
- [ ] **Last Updated**: Set to current date
|
|
270
|
+
|
|
271
|
+
### Phase 2: Standards Updates (If Changed)
|
|
272
|
+
|
|
273
|
+
Only update these if the session introduced new patterns or standards:
|
|
274
|
+
|
|
275
|
+
#### CODING-PRINCIPLES.md
|
|
276
|
+
- [ ] **New Patterns**: Add new good/bad examples discovered
|
|
277
|
+
- [ ] **Refactoring Strategies**: Document new refactoring patterns used
|
|
278
|
+
- [ ] **Framework Changes**: Update if framework version changed standards
|
|
279
|
+
- [ ] **Last Updated**: Set to current date (only if modified)
|
|
280
|
+
|
|
281
|
+
#### TESTING-PRINCIPLES.md
|
|
282
|
+
- [ ] **New Test Patterns**: Add testing patterns discovered
|
|
283
|
+
- [ ] **Coverage Updates**: Update coverage targets if changed
|
|
284
|
+
- [ ] **Testing Strategies**: Document new mocking/stubbing patterns
|
|
285
|
+
- [ ] **Last Updated**: Set to current date (only if modified)
|
|
286
|
+
|
|
287
|
+
#### AI-DEVELOPMENT-GUIDE.md
|
|
288
|
+
- [ ] **Workflow Improvements**: Update if Trinity workflows changed
|
|
289
|
+
- [ ] **Scale Examples**: Add new scale examples if discovered
|
|
290
|
+
- [ ] **Agent Protocols**: Update if agent communication patterns changed
|
|
291
|
+
- [ ] **Last Updated**: Set to current date (only if modified)
|
|
292
|
+
|
|
293
|
+
#### Trinity.md
|
|
294
|
+
- [ ] **Protocol Updates**: Document protocol changes or improvements
|
|
295
|
+
- [ ] **Performance Baselines**: Update if project baselines changed
|
|
296
|
+
- [ ] **Session Workflow**: Update if workflow process improved
|
|
297
|
+
- [ ] **Success Metrics**: Add metrics from completed session
|
|
298
|
+
- [ ] **Last Updated**: Set to current date (only if modified)
|
|
299
|
+
|
|
300
|
+
#### DOCUMENTATION-CRITERIA.md
|
|
301
|
+
- [ ] **Criteria Changes**: Update if documentation standards evolved
|
|
302
|
+
- [ ] **Last Updated**: Set to current date (only if modified)
|
|
303
|
+
|
|
304
|
+
### Phase 3: Quality Verification
|
|
305
|
+
|
|
306
|
+
After all updates, verify documentation integrity:
|
|
307
|
+
|
|
308
|
+
#### Content Quality
|
|
309
|
+
- [ ] All updated files have meaningful changes (not just timestamp)
|
|
310
|
+
- [ ] No placeholder syntax `{{VARIABLE}}` introduced during updates
|
|
311
|
+
- [ ] Metrics use real project values (not example numbers)
|
|
312
|
+
- [ ] Code examples match project's actual framework/language
|
|
313
|
+
|
|
314
|
+
#### Cross-Reference Integrity
|
|
315
|
+
- [ ] Links between documents still work (no broken references)
|
|
316
|
+
- [ ] When updating ARCHITECTURE → checked if ISSUES/Technical-Debt need updates
|
|
317
|
+
- [ ] When adding ISSUES → added related Technical-Debt items if applicable
|
|
318
|
+
- [ ] When closing To-do tasks → verified linked ISSUES closed
|
|
319
|
+
|
|
320
|
+
#### Consistency Checks
|
|
321
|
+
- [ ] Timestamps updated ({{CURRENT_DATE}} replaced with actual date)
|
|
322
|
+
- [ ] Project name consistent across all files
|
|
323
|
+
- [ ] Framework/technology names consistent
|
|
324
|
+
- [ ] Component names match across ARCHITECTURE/ISSUES/Technical-Debt
|
|
325
|
+
|
|
326
|
+
#### Completeness Validation
|
|
327
|
+
- [ ] New components documented in ARCHITECTURE
|
|
328
|
+
- [ ] New issues documented in ISSUES.md
|
|
329
|
+
- [ ] New technical debt tracked in Technical-Debt.md
|
|
330
|
+
- [ ] Completed work removed from To-do.md
|
|
331
|
+
- [ ] Session learnings captured somewhere (not lost)
|
|
332
|
+
|
|
333
|
+
### Update Guidelines
|
|
334
|
+
|
|
335
|
+
**For each document updated**:
|
|
336
|
+
1. Open the file
|
|
337
|
+
2. Use the document's "When to Update" section as guide (see knowledge-base templates)
|
|
338
|
+
3. Make specific, meaningful changes (don't just change timestamps)
|
|
339
|
+
4. Verify cross-references to other documents
|
|
340
|
+
5. Keep placeholders for future sessions (don't replace with generic examples)
|
|
341
|
+
|
|
342
|
+
**When in doubt**:
|
|
343
|
+
- If something changed → document it
|
|
344
|
+
- If nothing changed → don't update (stale timestamp is okay)
|
|
345
|
+
- If unsure → reference the document's "When to Update This Document" section
|
|
346
|
+
|
|
347
|
+
**Cross-Document Update Scenarios**:
|
|
348
|
+
|
|
349
|
+
**Scenario: Added New Component**
|
|
350
|
+
→ Update ARCHITECTURE.md (component table)
|
|
351
|
+
→ Update To-do.md (add testing/documentation tasks)
|
|
352
|
+
→ Check ISSUES.md (any known issues with this type of component?)
|
|
353
|
+
|
|
354
|
+
**Scenario: Fixed Bug**
|
|
355
|
+
→ Update ISSUES.md (close issue)
|
|
356
|
+
→ Update Technical-Debt.md (if fix paid down debt)
|
|
357
|
+
→ Update To-do.md (mark task complete)
|
|
358
|
+
|
|
359
|
+
**Scenario: Added TODO/FIXME**
|
|
360
|
+
→ Update Technical-Debt.md (increment TODO count)
|
|
361
|
+
→ Update To-do.md (add task to address it)
|
|
362
|
+
|
|
363
|
+
**Scenario: Refactored Large File**
|
|
364
|
+
→ Update Technical-Debt.md (reduce file complexity metrics)
|
|
365
|
+
→ Update ARCHITECTURE.md (if component structure changed)
|
|
366
|
+
→ Update ISSUES.md (close related refactoring issues)
|
|
367
|
+
|
|
368
|
+
### Session Summary Integration
|
|
369
|
+
|
|
370
|
+
After knowledge base updates, ALY creates session summary including:
|
|
371
|
+
- **Documents Updated**: List which knowledge-base files changed
|
|
372
|
+
- **Key Changes**: Summarize what was added/removed/modified
|
|
373
|
+
- **Cross-References**: Note which documents reference each other
|
|
374
|
+
- **Metrics Delta**: Before/after metrics for Technical-Debt.md
|
|
375
|
+
|
|
376
|
+
Example:
|
|
377
|
+
```markdown
|
|
378
|
+
## Knowledge Base Updates
|
|
379
|
+
|
|
380
|
+
**ARCHITECTURE.md**:
|
|
381
|
+
- Added: OAuth2 refresh token flow to API Architecture
|
|
382
|
+
- Updated: Authentication section with refresh token rotation
|
|
383
|
+
|
|
384
|
+
**ISSUES.md**:
|
|
385
|
+
- Closed: ISS-042 (JWT refresh implementation)
|
|
386
|
+
- Added: ISS-048 (Rate limiting pattern for auth endpoints)
|
|
387
|
+
|
|
388
|
+
**Technical-Debt.md**:
|
|
389
|
+
- Resolved: Email validation duplication (was in 3 files)
|
|
390
|
+
- Added: Auth service refactoring (split into 2 files)
|
|
391
|
+
- Metrics: TODO count decreased 5 → 3, File complexity improved
|
|
392
|
+
|
|
393
|
+
**To-do.md**:
|
|
394
|
+
- Completed: T-042 (Implement JWT refresh)
|
|
395
|
+
- Added: T-048 (Rate limiting), T-049 (Auth refactoring)
|
|
396
|
+
|
|
397
|
+
**Cross-References Updated**:
|
|
398
|
+
- ARCHITECTURE.md ↔ ISSUES.md (linked refresh token pattern)
|
|
399
|
+
- ISSUES.md ↔ Technical-Debt.md (linked auth refactoring debt)
|
|
400
|
+
- To-do.md ↔ ISSUES.md (linked rate limiting task to issue)
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
---
|