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.
Files changed (191) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/LICENSE +21 -0
  3. package/README.md +555 -0
  4. package/dist/cli/commands/deploy/agents.d.ts +14 -0
  5. package/dist/cli/commands/deploy/agents.js +59 -0
  6. package/dist/cli/commands/deploy/ci-cd.d.ts +13 -0
  7. package/dist/cli/commands/deploy/ci-cd.js +50 -0
  8. package/dist/cli/commands/deploy/claude-setup.d.ts +17 -0
  9. package/dist/cli/commands/deploy/claude-setup.js +91 -0
  10. package/dist/cli/commands/deploy/configuration.d.ts +13 -0
  11. package/dist/cli/commands/deploy/configuration.js +215 -0
  12. package/dist/cli/commands/deploy/directories.d.ts +12 -0
  13. package/dist/cli/commands/deploy/directories.js +38 -0
  14. package/dist/cli/commands/deploy/gitignore.d.ts +12 -0
  15. package/dist/cli/commands/deploy/gitignore.js +53 -0
  16. package/dist/cli/commands/deploy/index.d.ts +38 -0
  17. package/dist/cli/commands/deploy/index.js +156 -0
  18. package/dist/cli/commands/deploy/knowledge-base.d.ts +16 -0
  19. package/dist/cli/commands/deploy/knowledge-base.js +75 -0
  20. package/dist/cli/commands/deploy/linting.d.ts +18 -0
  21. package/dist/cli/commands/deploy/linting.js +51 -0
  22. package/dist/cli/commands/deploy/metrics.d.ts +13 -0
  23. package/dist/cli/commands/deploy/metrics.js +34 -0
  24. package/dist/cli/commands/deploy/pre-flight.d.ts +13 -0
  25. package/dist/cli/commands/deploy/pre-flight.js +29 -0
  26. package/dist/cli/commands/deploy/root-files.d.ts +16 -0
  27. package/dist/cli/commands/deploy/root-files.js +178 -0
  28. package/dist/cli/commands/deploy/sdk-install.d.ts +12 -0
  29. package/dist/cli/commands/deploy/sdk-install.js +57 -0
  30. package/dist/cli/commands/deploy/summary.d.ts +14 -0
  31. package/dist/cli/commands/deploy/summary.js +130 -0
  32. package/dist/cli/commands/deploy/templates.d.ts +14 -0
  33. package/dist/cli/commands/deploy/templates.js +84 -0
  34. package/dist/cli/commands/deploy/types.d.ts +39 -0
  35. package/dist/cli/commands/deploy/types.js +5 -0
  36. package/dist/cli/commands/update/agents.d.ts +14 -0
  37. package/dist/cli/commands/update/agents.js +31 -0
  38. package/dist/cli/commands/update/backup.d.ts +31 -0
  39. package/dist/cli/commands/update/backup.js +97 -0
  40. package/dist/cli/commands/update/commands.d.ts +14 -0
  41. package/dist/cli/commands/update/commands.js +75 -0
  42. package/dist/cli/commands/update/index.d.ts +15 -0
  43. package/dist/cli/commands/update/index.js +118 -0
  44. package/dist/cli/commands/update/knowledge-base.d.ts +14 -0
  45. package/dist/cli/commands/update/knowledge-base.js +38 -0
  46. package/dist/cli/commands/update/pre-flight.d.ts +13 -0
  47. package/dist/cli/commands/update/pre-flight.js +37 -0
  48. package/dist/cli/commands/update/summary.d.ts +20 -0
  49. package/dist/cli/commands/update/summary.js +47 -0
  50. package/dist/cli/commands/update/templates.d.ts +14 -0
  51. package/dist/cli/commands/update/templates.js +25 -0
  52. package/dist/cli/commands/update/types.d.ts +13 -0
  53. package/dist/cli/commands/update/types.js +7 -0
  54. package/dist/cli/commands/update/utils.d.ts +11 -0
  55. package/dist/cli/commands/update/utils.js +19 -0
  56. package/dist/cli/commands/update/verification.d.ts +20 -0
  57. package/dist/cli/commands/update/verification.js +54 -0
  58. package/dist/cli/commands/update/version.d.ts +18 -0
  59. package/dist/cli/commands/update/version.js +36 -0
  60. package/dist/cli/commands/update.d.ts +7 -0
  61. package/dist/cli/commands/update.js +7 -0
  62. package/dist/cli/index.d.ts +3 -0
  63. package/dist/cli/index.js +36 -0
  64. package/dist/cli/types.d.ts +77 -0
  65. package/dist/cli/types.js +5 -0
  66. package/dist/cli/utils/deploy-ci.d.ts +22 -0
  67. package/dist/cli/utils/deploy-ci.js +138 -0
  68. package/dist/cli/utils/deploy-linting.d.ts +3 -0
  69. package/dist/cli/utils/deploy-linting.js +136 -0
  70. package/dist/cli/utils/detect-stack.d.ts +3 -0
  71. package/dist/cli/utils/detect-stack.js +270 -0
  72. package/dist/cli/utils/error-classes.d.ts +63 -0
  73. package/dist/cli/utils/error-classes.js +84 -0
  74. package/dist/cli/utils/error-handler.d.ts +59 -0
  75. package/dist/cli/utils/error-handler.js +127 -0
  76. package/dist/cli/utils/errors.d.ts +52 -0
  77. package/dist/cli/utils/errors.js +102 -0
  78. package/dist/cli/utils/get-sdk-path.d.ts +18 -0
  79. package/dist/cli/utils/get-sdk-path.js +31 -0
  80. package/dist/cli/utils/inject-dependencies.d.ts +2 -0
  81. package/dist/cli/utils/inject-dependencies.js +55 -0
  82. package/dist/cli/utils/linting-tools.d.ts +8 -0
  83. package/dist/cli/utils/linting-tools.js +206 -0
  84. package/dist/cli/utils/metrics/code-quality.d.ts +32 -0
  85. package/dist/cli/utils/metrics/code-quality.js +122 -0
  86. package/dist/cli/utils/metrics/dependency-parser.d.ts +21 -0
  87. package/dist/cli/utils/metrics/dependency-parser.js +153 -0
  88. package/dist/cli/utils/metrics/file-complexity.d.ts +26 -0
  89. package/dist/cli/utils/metrics/file-complexity.js +77 -0
  90. package/dist/cli/utils/metrics/framework-detector.d.ts +17 -0
  91. package/dist/cli/utils/metrics/framework-detector.js +120 -0
  92. package/dist/cli/utils/metrics/git-metrics.d.ts +30 -0
  93. package/dist/cli/utils/metrics/git-metrics.js +83 -0
  94. package/dist/cli/utils/metrics/index.d.ts +28 -0
  95. package/dist/cli/utils/metrics/index.js +100 -0
  96. package/dist/cli/utils/template-processor.d.ts +10 -0
  97. package/dist/cli/utils/template-processor.js +188 -0
  98. package/dist/cli/utils/validate-path.d.ts +80 -0
  99. package/dist/cli/utils/validate-path.js +180 -0
  100. package/dist/index.d.ts +6 -0
  101. package/dist/index.js +8 -0
  102. package/dist/templates/agents/aj-team/apo-documentation-specialist.md.template +572 -0
  103. package/dist/templates/agents/aj-team/bas-quality-gate.md.template +906 -0
  104. package/dist/templates/agents/aj-team/bon-dependency-manager.md.template +636 -0
  105. package/dist/templates/agents/aj-team/cap-configuration-specialist.md.template +670 -0
  106. package/dist/templates/agents/aj-team/dra-code-reviewer.md.template +768 -0
  107. package/dist/templates/agents/aj-team/kil-task-executor.md.template +764 -0
  108. package/dist/templates/agents/aj-team/uro-refactoring-specialist.md.template +759 -0
  109. package/dist/templates/agents/audit/juno-auditor.md.template +447 -0
  110. package/dist/templates/agents/deployment/ein-cicd.md.template +694 -0
  111. package/dist/templates/agents/deployment/ino-context.md.template +733 -0
  112. package/dist/templates/agents/deployment/tan-structure.md.template +661 -0
  113. package/dist/templates/agents/deployment/zen-knowledge.md.template +451 -0
  114. package/dist/templates/agents/leadership/aj-cc.md.template +462 -0
  115. package/dist/templates/agents/leadership/aj-maestro.md.template +943 -0
  116. package/dist/templates/agents/leadership/aly-cto.md.template +407 -0
  117. package/dist/templates/agents/planning/eus-decomposer.md.template +496 -0
  118. package/dist/templates/agents/planning/mon-requirements.md.template +323 -0
  119. package/dist/templates/agents/planning/ror-design.md.template +465 -0
  120. package/dist/templates/agents/planning/tra-planner.md.template +432 -0
  121. package/dist/templates/ci/cd.yml.template +175 -0
  122. package/dist/templates/ci/ci.yml.template +196 -0
  123. package/dist/templates/ci/generic-ci.yml +115 -0
  124. package/dist/templates/ci/github-actions.yml +86 -0
  125. package/dist/templates/ci/gitlab-ci.yml +103 -0
  126. package/dist/templates/claude/EMPLOYEE-DIRECTORY.md.template +545 -0
  127. package/dist/templates/documentation/ROOT-README.md.template +307 -0
  128. package/dist/templates/documentation/SUBDIRECTORY-README.md.template +261 -0
  129. package/dist/templates/investigations/bug.md.template +484 -0
  130. package/dist/templates/investigations/feature.md.template +564 -0
  131. package/dist/templates/investigations/performance.md.template +625 -0
  132. package/dist/templates/investigations/security.md.template +714 -0
  133. package/dist/templates/investigations/technical.md.template +433 -0
  134. package/dist/templates/knowledge-base/AI-DEVELOPMENT-GUIDE.md.template +957 -0
  135. package/dist/templates/knowledge-base/ARCHITECTURE.md.template +452 -0
  136. package/dist/templates/knowledge-base/CODING-PRINCIPLES.md.template +750 -0
  137. package/dist/templates/knowledge-base/DOCUMENTATION-CRITERIA.md.template +1118 -0
  138. package/dist/templates/knowledge-base/ISSUES.md.template +539 -0
  139. package/dist/templates/knowledge-base/TESTING-PRINCIPLES.md.template +894 -0
  140. package/dist/templates/knowledge-base/Technical-Debt.md.template +640 -0
  141. package/dist/templates/knowledge-base/To-do.md.template +407 -0
  142. package/dist/templates/knowledge-base/Trinity.md.template +464 -0
  143. package/dist/templates/linting/flutter/.pre-commit-config.yaml.template +27 -0
  144. package/dist/templates/linting/flutter/analysis_options.yaml.template +26 -0
  145. package/dist/templates/linting/nodejs/.eslintrc-commonjs.json.template +19 -0
  146. package/dist/templates/linting/nodejs/.eslintrc-esm.json.template +19 -0
  147. package/dist/templates/linting/nodejs/.eslintrc-typescript.json.template +22 -0
  148. package/dist/templates/linting/nodejs/.pre-commit-config.yaml.template +51 -0
  149. package/dist/templates/linting/nodejs/.prettierrc.json.template +10 -0
  150. package/dist/templates/linting/python/.flake8.template +16 -0
  151. package/dist/templates/linting/python/.pre-commit-config.yaml.template +30 -0
  152. package/dist/templates/linting/python/pyproject.toml.template +38 -0
  153. package/dist/templates/linting/rust/.pre-commit-config.yaml.template +28 -0
  154. package/dist/templates/linting/rust/clippy.toml.template +14 -0
  155. package/dist/templates/linting/rust/rustfmt.toml.template +12 -0
  156. package/dist/templates/root/CLAUDE.md.template +65 -0
  157. package/dist/templates/root/TRINITY.md.template +52 -0
  158. package/dist/templates/shared/claude-commands/trinity-agents.md.template +168 -0
  159. package/dist/templates/shared/claude-commands/trinity-audit.md.template +646 -0
  160. package/dist/templates/shared/claude-commands/trinity-changelog.md.template +624 -0
  161. package/dist/templates/shared/claude-commands/trinity-continue.md.template +549 -0
  162. package/dist/templates/shared/claude-commands/trinity-create-investigation.md.template +232 -0
  163. package/dist/templates/shared/claude-commands/trinity-decompose.md.template +181 -0
  164. package/dist/templates/shared/claude-commands/trinity-design.md.template +347 -0
  165. package/dist/templates/shared/claude-commands/trinity-docs.md.template +2093 -0
  166. package/dist/templates/shared/claude-commands/trinity-end.md.template +397 -0
  167. package/dist/templates/shared/claude-commands/trinity-init.md.template +606 -0
  168. package/dist/templates/shared/claude-commands/trinity-investigate-templates.md.template +725 -0
  169. package/dist/templates/shared/claude-commands/trinity-orchestrate.md.template +1061 -0
  170. package/dist/templates/shared/claude-commands/trinity-plan-investigation.md.template +135 -0
  171. package/dist/templates/shared/claude-commands/trinity-plan.md.template +201 -0
  172. package/dist/templates/shared/claude-commands/trinity-readme.md.template +1971 -0
  173. package/dist/templates/shared/claude-commands/trinity-requirements.md.template +148 -0
  174. package/dist/templates/shared/claude-commands/trinity-start.md.template +268 -0
  175. package/dist/templates/shared/claude-commands/trinity-verify.md.template +453 -0
  176. package/dist/templates/shared/claude-commands/trinity-workorder.md.template +249 -0
  177. package/dist/templates/source/base-CLAUDE.md.template +310 -0
  178. package/dist/templates/source/flutter-CLAUDE.md.template +593 -0
  179. package/dist/templates/source/nodejs-CLAUDE.md.template +531 -0
  180. package/dist/templates/source/python-CLAUDE.md.template +510 -0
  181. package/dist/templates/source/react-CLAUDE.md.template +513 -0
  182. package/dist/templates/source/rust-CLAUDE.md.template +653 -0
  183. package/dist/templates/source/tests-CLAUDE.md.template +432 -0
  184. package/dist/templates/trinity/CLAUDE.md.template +372 -0
  185. package/dist/templates/work-orders/ANALYSIS-TEMPLATE.md.template +276 -0
  186. package/dist/templates/work-orders/AUDIT-TEMPLATE.md.template +262 -0
  187. package/dist/templates/work-orders/IMPLEMENTATION-TEMPLATE.md.template +260 -0
  188. package/dist/templates/work-orders/INVESTIGATION-TEMPLATE.md.template +206 -0
  189. package/dist/templates/work-orders/PATTERN-TEMPLATE.md.template +320 -0
  190. package/dist/templates/work-orders/VERIFICATION-TEMPLATE.md.template +273 -0
  191. package/package.json +94 -0
@@ -0,0 +1,453 @@
1
+ ---
2
+ description: Verify Trinity Method installation completeness
3
+ ---
4
+
5
+ Verify that Trinity Method is properly installed in this project.
6
+
7
+ Check for:
8
+ 1. **Trinity Core Structure (14 directories):**
9
+ - trinity/knowledge-base/
10
+ - trinity/reports/
11
+ - trinity/sessions/
12
+ - trinity/investigations/
13
+ - trinity/investigations/plans/
14
+ - trinity/patterns/
15
+ - trinity/work-orders/
16
+ - trinity/templates/
17
+ - trinity/templates/work-orders/
18
+ - trinity/templates/investigations/
19
+ - trinity/archive/work-orders/
20
+ - trinity/archive/investigations/
21
+ - trinity/archive/reports/
22
+ - trinity/archive/sessions/
23
+
24
+ 2. **CLAUDE.md Context Files:**
25
+ - Root CLAUDE.md (behavioral hierarchy)
26
+ - trinity/CLAUDE.md (Trinity-specific context)
27
+
28
+ 3. **Agent Organization (19 agents in 5 subdirectories):**
29
+ - .claude/agents/leadership/ (3 agents: ALY, AJ MAESTRO, AJ CC)
30
+ - .claude/agents/deployment/ (4 agents: TAN, ZEN, INO, EIN)
31
+ - .claude/agents/audit/ (1 agent: JUNO)
32
+ - .claude/agents/planning/ (4 agents: MON, ROR, TRA, EUS)
33
+ - .claude/agents/aj-team/ (7 agents: KIL, BAS, DRA, APO, BON, CAP, URO)
34
+
35
+ 4. **Slash Commands (20 commands in 6 categories):**
36
+ - .claude/commands/ (all Trinity slash commands)
37
+ - Session: start, continue, end
38
+ - Planning: requirements, design, plan, decompose
39
+ - Execution: orchestrate, audit, readme, docs, changelog
40
+ - Investigation: create-investigation, plan-investigation, investigate-templates
41
+ - Infrastructure: init
42
+ - Utility: verify, agents, workorder
43
+
44
+ 5. **Templates (13 total):**
45
+ - Work Orders: 6 templates in trinity/templates/work-orders/
46
+ - Investigations: 5 templates in trinity/templates/investigations/
47
+ - Documentation: 2 templates in trinity/templates/documentation/
48
+
49
+ 6. **Knowledge Base Files (9 files):**
50
+ - ARCHITECTURE.md, Trinity.md, To-do.md, ISSUES.md, Technical-Debt.md
51
+ - CODING-PRINCIPLES.md, TESTING-PRINCIPLES.md
52
+ - AI-DEVELOPMENT-GUIDE.md, DOCUMENTATION-CRITERIA.md
53
+
54
+ 7. **CI/CD Workflows (if deployed):**
55
+ - .github/workflows/ci.yml (BAS 6-phase quality gates)
56
+ - .github/workflows/cd.yml (Deployment pipeline)
57
+
58
+ Report:
59
+ - ✅ Installed components
60
+ - ❌ Missing components
61
+ - Deployment completeness percentage
62
+ - Next steps if incomplete
63
+
64
+ ---
65
+
66
+ ## Example Verification Reports
67
+
68
+ ### Example 1: Complete Installation (100%)
69
+
70
+ ```markdown
71
+ # Trinity v2.0 Verification Report
72
+
73
+ **Project**: MyApp
74
+ **Date**: 2025-12-18
75
+ **Trinity Version**: v2.0.0
76
+
77
+ ## Verification Results: ✅ 100% COMPLETE
78
+
79
+ ### 1. Directory Structure ✅
80
+ - ✅ .claude/
81
+ - ✅ .claude/agents/ (5 subdirectories)
82
+ - ✅ .claude/commands/
83
+ - ✅ trinity/knowledge-base/
84
+ - ✅ trinity/work-orders/
85
+ - ✅ trinity/sessions/
86
+ - ✅ trinity/planning/
87
+ - ✅ trinity/reports/
88
+
89
+ ### 2. Agent Deployment ✅ (19/19)
90
+ **Leadership** (3/3):
91
+ - ✅ aly-cto.md (2.4 KB)
92
+ - ✅ aj-maestro.md (18.2 KB)
93
+ - ✅ aj-cc.md (12.1 KB)
94
+
95
+ **Deployment** (4/4):
96
+ - ✅ tan-structure.md (8.5 KB)
97
+ - ✅ zen-knowledge.md (6.2 KB)
98
+ - ✅ ino-context.md (5.8 KB)
99
+ - ✅ ein-cicd.md (7.1 KB)
100
+
101
+ **Planning** (4/4):
102
+ - ✅ mon-requirements.md (9.3 KB)
103
+ - ✅ ror-design.md (11.2 KB)
104
+ - ✅ tra-planner.md (8.7 KB)
105
+ - ✅ eus-decomposer.md (7.4 KB)
106
+
107
+ **AJ Team** (7/7):
108
+ - ✅ kil-task-executor.md (10.5 KB)
109
+ - ✅ bas-quality-gate.md (14.8 KB)
110
+ - ✅ dra-code-reviewer.md (9.6 KB)
111
+ - ✅ apo-documentation-specialist.md (6.9 KB)
112
+ - ✅ bon-dependency-manager.md (7.2 KB)
113
+ - ✅ cap-configuration-specialist.md (6.5 KB)
114
+ - ✅ uro-refactoring-specialist.md (7.8 KB)
115
+
116
+ **Audit** (1/1):
117
+ - ✅ juno-auditor.md (12.3 KB)
118
+
119
+ ### 3. Slash Commands ✅ (15/15)
120
+ - ✅ trinity-init.md
121
+ - ✅ trinity-verify.md
122
+ - ✅ trinity-start.md
123
+ - ✅ trinity-agents.md
124
+ - ✅ trinity-requirements.md
125
+ - ✅ trinity-design.md
126
+ - ✅ trinity-plan.md
127
+ - ✅ trinity-decompose.md
128
+ - ✅ trinity-continue.md
129
+ - ✅ trinity-end.md
130
+ - ✅ trinity-workorder.md
131
+ - ✅ trinity-create-investigation.md
132
+ - ✅ trinity-plan-investigation.md
133
+ - ✅ trinity-investigate-templates.md
134
+ - ✅ trinity-orchestrate.md
135
+
136
+ ### 4. Knowledge Base ✅ (9/9)
137
+ - ✅ ARCHITECTURE.md (populated)
138
+ - ✅ Trinity.md (populated)
139
+ - ✅ To-do.md (populated)
140
+ - ✅ ISSUES.md (populated)
141
+ - ✅ Technical-Debt.md (populated)
142
+ - ✅ CODING-PRINCIPLES.md (populated)
143
+ - ✅ TESTING-PRINCIPLES.md (populated)
144
+ - ✅ AI-DEVELOPMENT-GUIDE.md (populated)
145
+ - ✅ DOCUMENTATION-CRITERIA.md (populated)
146
+
147
+ ### 5. CI/CD Workflows ✅ (Optional)
148
+ - ✅ .github/workflows/ci.yml (BAS 6-phase gates)
149
+ - ✅ .github/workflows/cd.yml (Deployment pipeline)
150
+
151
+ ## Summary
152
+ **Status**: ✅ FULLY DEPLOYED
153
+ **Completeness**: 100%
154
+ **Next Steps**: Trinity v2.0 is ready to use. Run `/trinity-start` to begin your first workflow.
155
+ ```
156
+
157
+ ---
158
+
159
+ ### Example 2: Incomplete Installation (82%)
160
+
161
+ ```markdown
162
+ # Trinity v2.0 Verification Report
163
+
164
+ **Project**: PartialApp
165
+ **Date**: 2025-12-18
166
+ **Trinity Version**: v2.0.0
167
+
168
+ ## Verification Results: ⚠️ 82% INCOMPLETE
169
+
170
+ ### 1. Directory Structure ⚠️
171
+ - ✅ .claude/
172
+ - ✅ .claude/agents/ (5 subdirectories)
173
+ - ✅ .claude/commands/
174
+ - ✅ trinity/knowledge-base/
175
+ - ❌ trinity/work-orders/ (MISSING)
176
+ - ✅ trinity/sessions/
177
+ - ✅ trinity/planning/
178
+ - ❌ trinity/reports/ (MISSING)
179
+
180
+ ### 2. Agent Deployment ⚠️ (17/19)
181
+ **Leadership** (3/3):
182
+ - ✅ aly-cto.md
183
+ - ✅ aj-maestro.md
184
+ - ✅ aj-cc.md
185
+
186
+ **Deployment** (2/4):
187
+ - ✅ tan-structure.md
188
+ - ✅ zen-knowledge.md
189
+ - ❌ ino-context.md (MISSING)
190
+ - ❌ ein-cicd.md (MISSING)
191
+
192
+ **Planning** (4/4):
193
+ - ✅ All present
194
+
195
+ **AJ Team** (7/7):
196
+ - ✅ All present
197
+
198
+ **Audit** (1/1):
199
+ - ✅ juno-auditor.md
200
+
201
+ ### 3. Slash Commands ✅ (15/15)
202
+ - ✅ All present
203
+
204
+ ### 4. Knowledge Base ⚠️ (7/9)
205
+ - ✅ ARCHITECTURE.md (populated)
206
+ - ✅ Trinity.md (populated)
207
+ - ✅ To-do.md (EMPTY - needs population)
208
+ - ✅ ISSUES.md (EMPTY - needs population)
209
+ - ✅ Technical-Debt.md (populated)
210
+ - ✅ CODING-PRINCIPLES.md (populated)
211
+ - ✅ TESTING-PRINCIPLES.md (populated)
212
+ - ❌ AI-DEVELOPMENT-GUIDE.md (MISSING)
213
+ - ❌ DOCUMENTATION-CRITERIA.md (MISSING)
214
+
215
+ ### 5. CI/CD Workflows ❌
216
+ - ❌ Not deployed (optional - not affecting score)
217
+
218
+ ## Issues Found
219
+
220
+ **Critical** (Blocking deployment):
221
+ - Missing 2 deployment agents (INO, EIN)
222
+ - Missing 2 knowledge base files
223
+
224
+ **Warning** (Should fix):
225
+ - 2 empty knowledge base files (To-do.md, ISSUES.md)
226
+ - Missing work-orders and reports directories
227
+
228
+ ## Summary
229
+ **Status**: ⚠️ INCOMPLETE DEPLOYMENT
230
+ **Completeness**: 82%
231
+ **Blocking Issues**: 4 critical components missing
232
+
233
+ **Next Steps**:
234
+ 1. Re-run `/trinity-init` to deploy missing components
235
+ 2. Populate empty knowledge base files
236
+ 3. Create missing directories manually if needed
237
+ ```
238
+
239
+ ---
240
+
241
+ ## Troubleshooting Common Issues
242
+
243
+ ### Issue 1: Missing Directories
244
+
245
+ **Symptom**:
246
+ ```
247
+ ❌ trinity/work-orders/ not found
248
+ ❌ trinity/reports/ not found
249
+ ```
250
+
251
+ **Cause**: Incomplete `trinity deploy` or TAN agent failure
252
+
253
+ **Fix**:
254
+ ```bash
255
+ # Manually create missing directories
256
+ mkdir -p trinity/work-orders
257
+ mkdir -p trinity/reports
258
+ mkdir -p trinity/sessions
259
+ mkdir -p trinity/planning
260
+
261
+ # Verify creation
262
+ ls -la trinity/
263
+ ```
264
+
265
+ **Verification**:
266
+ ```bash
267
+ # Should show all directories
268
+ trinity/
269
+ ├── work-orders/
270
+ ├── reports/
271
+ ├── sessions/
272
+ ├── planning/
273
+ └── knowledge-base/
274
+ ```
275
+
276
+ ---
277
+
278
+ ### Issue 2: Missing Agent Files
279
+
280
+ **Symptom**:
281
+ ```
282
+ ❌ .claude/agents/deployment/ino-context.md not found
283
+ ❌ .claude/agents/deployment/ein-cicd.md not found
284
+ ```
285
+
286
+ **Cause**: Partial deployment or TAN agent error during agent file creation
287
+
288
+ **Fix**:
289
+ ```bash
290
+ # Re-run Trinity initialization
291
+ /trinity-init
292
+
293
+ # OR manually deploy specific agents
294
+ trinity deploy --agents-only
295
+
296
+ # OR reinstall Trinity SDK
297
+ npm install @trinity-method/sdk@latest
298
+ ```
299
+
300
+ **Verification**:
301
+ ```bash
302
+ # Count agent files (should be 19)
303
+ find .claude/agents -name "*.md" | wc -l
304
+
305
+ # List all agents
306
+ find .claude/agents -name "*.md" -type f
307
+ ```
308
+
309
+ ---
310
+
311
+ ### Issue 3: Empty Knowledge Base Files
312
+
313
+ **Symptom**:
314
+ ```
315
+ ⚠️ ISSUES.md exists but is empty (0 bytes)
316
+ ⚠️ To-do.md exists but is empty (0 bytes)
317
+ ```
318
+
319
+ **Cause**: ZEN agent created files but did not populate with template content
320
+
321
+ **Fix**:
322
+ ```bash
323
+ # Re-populate knowledge base
324
+ /trinity-init
325
+
326
+ # OR manually populate files
327
+ # ISSUES.md should contain:
328
+ echo "# Known Issues\n\nNo issues currently tracked." > trinity/knowledge-base/ISSUES.md
329
+
330
+ # To-do.md should contain:
331
+ echo "# Project To-Do List\n\nNo tasks currently tracked." > trinity/knowledge-base/To-do.md
332
+ ```
333
+
334
+ **Verification**:
335
+ ```bash
336
+ # Check file sizes (should be >0 bytes)
337
+ ls -lh trinity/knowledge-base/*.md
338
+
339
+ # Verify content
340
+ cat trinity/knowledge-base/ISSUES.md
341
+ cat trinity/knowledge-base/To-do.md
342
+ ```
343
+
344
+ ---
345
+
346
+ ### Issue 4: Wrong CLAUDE.md Locations
347
+
348
+ **Symptom**:
349
+ ```
350
+ ❌ CLAUDE.md found in project root (should be in .claude/)
351
+ ❌ .claude/CLAUDE.md not found
352
+ ```
353
+
354
+ **Cause**: INO agent did not create proper CLAUDE.md hierarchy
355
+
356
+ **Fix**:
357
+ ```bash
358
+ # Remove incorrect CLAUDE.md
359
+ rm CLAUDE.md # if in wrong location
360
+
361
+ # Re-run INO agent via /trinity-init
362
+ /trinity-init
363
+
364
+ # OR manually create hierarchy
365
+ # .claude/CLAUDE.md (global)
366
+ # .claude/agents/CLAUDE.md (agent-specific)
367
+ ```
368
+
369
+ **Verification**:
370
+ ```bash
371
+ # Verify CLAUDE.md hierarchy
372
+ find .claude -name "CLAUDE.md"
373
+
374
+ # Expected output:
375
+ # .claude/CLAUDE.md
376
+ # .claude/agents/CLAUDE.md
377
+ ```
378
+
379
+ ---
380
+
381
+ ### Issue 5: Slash Commands Not Working
382
+
383
+ **Symptom**:
384
+ ```
385
+ Command '/trinity-start' not found
386
+ Command '/trinity-verify' not recognized
387
+ ```
388
+
389
+ **Cause**: Slash command files not deployed to .claude/commands/
390
+
391
+ **Fix**:
392
+ ```bash
393
+ # Verify commands directory exists
394
+ ls -la .claude/commands/
395
+
396
+ # If missing, re-deploy
397
+ /trinity-init
398
+
399
+ # OR manually install commands
400
+ trinity deploy --commands-only
401
+
402
+ # Restart Claude Code (reload window)
403
+ ```
404
+
405
+ **Verification**:
406
+ ```bash
407
+ # Count command files (should be 15)
408
+ ls .claude/commands/*.md | wc -l
409
+
410
+ # Test a command
411
+ /trinity-verify
412
+ ```
413
+
414
+ ---
415
+
416
+ ### Issue 6: CI/CD Workflows Missing (Normal vs Issue)
417
+
418
+ **Symptom**:
419
+ ```
420
+ ℹ️ .github/workflows/ not found
421
+ ```
422
+
423
+ **This is NORMAL if**:
424
+ - You did not request CI/CD integration
425
+ - EIN agent was not invoked
426
+ - Project doesn't use GitHub Actions
427
+
428
+ **This is an ISSUE if**:
429
+ - You explicitly requested CI/CD setup
430
+ - EIN agent was supposed to run but failed
431
+
432
+ **Fix (if needed)**:
433
+ ```bash
434
+ # Deploy CI/CD workflows
435
+ /trinity-init # with EIN option
436
+
437
+ # OR manually create workflows
438
+ mkdir -p .github/workflows
439
+ # Copy workflow templates from Trinity SDK
440
+ ```
441
+
442
+ **Verification**:
443
+ ```bash
444
+ # Check if workflows exist
445
+ ls -la .github/workflows/
446
+
447
+ # Expected (if CI/CD requested):
448
+ # ci.yml
449
+ # cd.yml
450
+ ```
451
+
452
+ ---
453
+
@@ -0,0 +1,249 @@
1
+ ---
2
+ description: Create Trinity Method work orders interactively
3
+ ---
4
+
5
+ # Trinity Work Orders
6
+
7
+ ## What Are Work Orders?
8
+
9
+ Work orders are structured task documents that provide clear objectives, task breakdown, progress tracking, context preservation, and quality assurance.
10
+
11
+ **Purpose**: Bridge gap between user requests and systematic implementation.
12
+
13
+ ---
14
+
15
+ ## When to Use Work Orders
16
+
17
+ **Use For**: Medium/Large tasks (3+ files), session-spanning work, team collaboration, audit trail needed
18
+
19
+ **Skip For**: Small tasks (1-2 files), one-off experiments, trivial changes
20
+
21
+ ---
22
+
23
+ ## Work Order Naming
24
+
25
+ **Format**: `WO-XXX-{brief-title}.md`
26
+
27
+ Examples: WO-042-jwt-refresh-implementation.md
28
+
29
+ ---
30
+
31
+ ## Direct Work Order Creation
32
+
33
+ When `/trinity-workorder` is invoked, the agent will:
34
+
35
+ 1. **Analyze user's request** to determine:
36
+ - Work order type (Investigation/Implementation/Analysis/Audit/Pattern/Verification)
37
+ - Task description and objectives
38
+ - Deliverables and acceptance criteria
39
+ - Priority and estimated effort
40
+
41
+ 2. **Select appropriate template** from `trinity/templates/work-orders/`:
42
+ - **Investigation:** Research and analysis tasks
43
+ - **Implementation:** Feature development tasks
44
+ - **Analysis:** Code analysis and review tasks
45
+ - **Audit:** Quality and compliance audits
46
+ - **Pattern:** Pattern detection and analysis
47
+ - **Verification:** Verification and validation tasks
48
+
49
+ 3. **Create work order file** in `trinity/work-orders/WO-XXX-{task-name}.md`
50
+
51
+ 4. **Populate template** with:
52
+ - Clear mission objective
53
+ - Implementation scope and affected files
54
+ - Deliverable requirements
55
+ - Success criteria
56
+ - After completion instructions
57
+
58
+ 5. **Report completion** to user with work order file path
59
+
60
+ **No Interactive Wizard:** The agent proceeds directly without asking questions. All necessary information is inferred from the user's request or filled with reasonable defaults.
61
+
62
+ **User Override:** If specific details are needed, the agent may ask clarifying questions, but default is to proceed autonomously.
63
+
64
+ **Example Usage:**
65
+ ```bash
66
+ # Agent analyzes request and creates WO-043-implement-dark-mode.md
67
+ /trinity-workorder "Implement dark mode toggle in application settings"
68
+
69
+ # Then execute:
70
+ /trinity-orchestrate @WO-043-implement-dark-mode.md
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Orchestration
76
+
77
+ Once work order is created in `trinity/work-orders/`, execute it:
78
+
79
+ ```bash
80
+ /trinity-orchestrate @WO-001-example-task.md
81
+ ```
82
+
83
+ **AJ MAESTRO** picks up the work order from `trinity/work-orders/` and orchestrates the 19-agent team to complete the task following Trinity Method workflows.
84
+
85
+ ---
86
+
87
+ ## Complete Example
88
+
89
+ See WO-042 example in work order files showing full structure with objectives, implementation plan, testing strategy, and progress tracking.
90
+
91
+ ---
92
+
93
+ ## Available Templates
94
+
95
+ Work order templates are located in `trinity/templates/work-orders/`:
96
+ - **INVESTIGATION-TEMPLATE.md** - Research and analysis tasks
97
+ - **IMPLEMENTATION-TEMPLATE.md** - Feature development tasks
98
+ - **ANALYSIS-TEMPLATE.md** - Code analysis and review tasks
99
+ - **AUDIT-TEMPLATE.md** - Quality and compliance audits
100
+ - **PATTERN-TEMPLATE.md** - Pattern detection and analysis
101
+ - **VERIFICATION-TEMPLATE.md** - Verification and validation tasks
102
+
103
+ ---
104
+
105
+ ## Real-World Examples
106
+
107
+ ### Example 1: Implementation Work Order
108
+ **Work Order:** WO-042-jwt-refresh-implementation
109
+ **Template:** Implementation
110
+ **Priority:** High
111
+ **Estimated Time:** 2 days
112
+
113
+ **Objectives:**
114
+ 1. Implement automatic JWT token refresh
115
+ 2. Handle edge cases (expired tokens, race conditions)
116
+ 3. Add comprehensive test coverage
117
+
118
+ **Deliverables:**
119
+ - Token refresh middleware
120
+ - Unit tests (≥80% coverage)
121
+ - Integration tests for refresh flow
122
+ - API documentation update
123
+
124
+ **Outcome:**
125
+ - Completed in 1.5 days
126
+ - Test coverage: 92%
127
+ - All acceptance criteria met
128
+ - Zero production incidents post-deployment
129
+
130
+ ---
131
+
132
+ ### Example 2: Investigation Work Order
133
+ **Work Order:** WO-015-database-performance-analysis
134
+ **Template:** Investigation
135
+ **Priority:** Critical
136
+ **Estimated Time:** 1 day
137
+
138
+ **Objectives:**
139
+ 1. Identify cause of 300% increase in query times
140
+ 2. Analyze database query patterns
141
+ 3. Recommend optimization strategy
142
+
143
+ **Deliverables:**
144
+ - Performance analysis report
145
+ - Query execution plan analysis
146
+ - Optimization recommendations with effort estimates
147
+
148
+ **Outcome:**
149
+ - Root cause: Missing indexes on new user_metadata table
150
+ - Recommended 3 compound indexes
151
+ - Created follow-up work order WO-016 for implementation
152
+
153
+ ---
154
+
155
+ ### Example 3: Audit Work Order
156
+ **Work Order:** WO-023-security-dependency-audit
157
+ **Template:** Audit
158
+ **Priority:** Medium
159
+ **Estimated Time:** 4 hours
160
+
161
+ **Objectives:**
162
+ 1. Audit all npm dependencies for vulnerabilities
163
+ 2. Assess CVSS scores and exploitability
164
+ 3. Create remediation plan
165
+
166
+ **Deliverables:**
167
+ - Dependency vulnerability report
168
+ - Risk assessment (Critical/High/Medium/Low)
169
+ - Upgrade path for vulnerable packages
170
+
171
+ **Outcome:**
172
+ - 12 vulnerabilities found (3 critical, 5 high, 4 medium)
173
+ - All critical issues resolved immediately
174
+ - Documented upgrade blockers for 2 high-severity issues
175
+
176
+ ---
177
+
178
+ ### Example 4: Analysis Work Order
179
+ **Work Order:** WO-031-codebase-complexity-analysis
180
+ **Template:** Analysis
181
+ **Priority:** Low
182
+ **Estimated Time:** 1 day
183
+
184
+ **Objectives:**
185
+ 1. Analyze codebase complexity metrics
186
+ 2. Identify refactoring candidates
187
+ 3. Prioritize technical debt reduction
188
+
189
+ **Deliverables:**
190
+ - Complexity metrics report (cyclomatic complexity, coupling)
191
+ - Top 10 files needing refactoring
192
+ - Technical debt reduction roadmap
193
+
194
+ **Outcome:**
195
+ - Identified 8 files with cyclomatic complexity >15
196
+ - Created 4 follow-up work orders for refactoring
197
+ - Established baseline metrics for future tracking
198
+
199
+ ---
200
+
201
+ ### Example 5: Verification Work Order
202
+ **Work Order:** WO-050-production-deployment-verification
203
+ **Template:** Verification
204
+ **Priority:** Critical
205
+ **Estimated Time:** 2 hours
206
+
207
+ **Objectives:**
208
+ 1. Verify payment processing deployment to production
209
+ 2. Validate all smoke tests pass
210
+ 3. Confirm monitoring and alerts operational
211
+
212
+ **Deliverables:**
213
+ - Deployment verification checklist (completed)
214
+ - Smoke test results (all passing)
215
+ - Rollback plan (if needed)
216
+
217
+ **Outcome:**
218
+ - All 24 smoke tests passed
219
+ - Monitoring confirmed normal operation
220
+ - No rollback required
221
+ - Payment processing 100% operational
222
+
223
+ ---
224
+
225
+ ## Template Selection Guide
226
+
227
+ **Use this decision tree:**
228
+
229
+ ```
230
+ Do you need to implement new code or features?
231
+ → YES: Use Implementation Template
232
+
233
+ Do you need to research or investigate something?
234
+ → YES: Use Investigation Template
235
+
236
+ Do you need to analyze code, architecture, or metrics?
237
+ → YES: Use Analysis Template
238
+
239
+ Do you need to audit quality, security, or compliance?
240
+ → YES: Use Audit Template
241
+
242
+ Do you need to identify or document patterns?
243
+ → YES: Use Pattern Template
244
+
245
+ Do you need to verify deployment or validate results?
246
+ → YES: Use Verification Template
247
+ ```
248
+
249
+ ---