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,545 @@
1
+ # Trinity Method - Employee Directory
2
+ **Project:** {{PROJECT_NAME}}
3
+ **Framework:** {{FRAMEWORK}}
4
+ **Trinity Version:** {{TRINITY_VERSION}}
5
+ **Last Updated:** {{DEPLOYMENT_TIMESTAMP}}
6
+
7
+ ---
8
+
9
+ ## ๐Ÿ‘ฅ LEADERSHIP TEAM
10
+
11
+ ### ALY (Chief Technology Officer)
12
+ **File:** [.claude/agents/leadership/aly-cto.md](.claude/agents/leadership/aly-cto.md)
13
+ **Role:** Strategic leadership, scale determination, and AJ MAESTRO coordination
14
+ **Specialization:** Trinity Method v2.0 architecture, scale-based workflows, stop point management
15
+
16
+ **When to Deploy:**
17
+ - All implementation requests (ALY determines scale)
18
+ - Complex architectural decisions
19
+ - Medium/Large scale projects (stop point reviews)
20
+ - Strategic refactoring initiatives
21
+
22
+ **To invoke ALY:**
23
+ - Reference: "Please review `.claude/agents/leadership/aly-cto.md` for strategic guidance"
24
+ - ALY determines scale (Small/Medium/Large) and coordinates AJ MAESTRO for implementation
25
+
26
+ ---
27
+
28
+ ### AJ MAESTRO (Implementation Orchestrator)
29
+ **File:** [.claude/agents/leadership/aj-maestro.md](.claude/agents/leadership/aj-maestro.md)
30
+ **Role:** Implementation coordination using 19-agent team (organized in 5 role-based subdirectories)
31
+ **Specialization:** Planning layer, execution layer, support layer coordination
32
+
33
+ **Agent Organization:**
34
+ - **Leadership:** ALY, AJ MAESTRO, AJ CC (3 agents)
35
+ - **Deployment:** TAN, ZEN, INO, EIN (4 agents)
36
+ - **Planning:** MON, ROR, TRA, EUS (4 agents)
37
+ - **Implementation:** KIL, BAS, DRA, APO, BON, CAP, URO (7 agents)
38
+ - **Audit:** JUNO (1 agent)
39
+
40
+ **When to Deploy:**
41
+ - All implementation tasks (Small/Medium/Large)
42
+ - Coordinating planning agents (MON, ROR, TRA, EUS)
43
+ - Managing execution agents (KIL, BAS, DRA)
44
+ - Orchestrating support agents (APO, BON, CAP, URO)
45
+
46
+ **To invoke AJ MAESTRO:**
47
+ - Reference: "Please review `.claude/agents/leadership/aj-maestro.md` to orchestrate implementation"
48
+ - AJ MAESTRO coordinates all specialized agents based on scale-determined workflow
49
+
50
+ ---
51
+
52
+ ### AJ CC (Code Coordinator)
53
+ **File:** [.claude/agents/leadership/aj-cc.md](.claude/agents/leadership/aj-cc.md)
54
+ **Role:** Code quality and implementation oversight
55
+ **Specialization:** Tactical implementation coordination
56
+
57
+ ---
58
+
59
+ ## ๐Ÿš€ DEPLOYMENT TEAM (4 Specialists)
60
+
61
+ ### TAN (Structure Specialist)
62
+ **File:** [.claude/agents/deployment/tan-structure.md](.claude/agents/deployment/tan-structure.md)
63
+ **Role:** Creates Trinity folder structure and technical debt baseline
64
+ **Specialization:** Directory structures, baseline metrics, file organization
65
+
66
+ **When to Deploy:**
67
+ - Creating new Trinity structures
68
+ - Initial technical debt baseline
69
+ - Structure verification
70
+
71
+ **To invoke TAN:**
72
+ - Reference: "Please review `.claude/agents/deployment/tan-structure.md` for structure tasks"
73
+ - TAN creates Trinity folder structures and establishes technical debt baselines
74
+
75
+ ---
76
+
77
+ ### ZEN (Knowledge Base Specialist)
78
+ **File:** [.claude/agents/deployment/zen-knowledge.md](.claude/agents/deployment/zen-knowledge.md)
79
+ **Role:** Maintains and enriches Trinity knowledge base documentation
80
+ **Specialization:** Documentation quality, semantic codebase analysis
81
+
82
+ **When to Deploy:**
83
+ - Completing ARCHITECTURE.md with semantic analysis
84
+ - Documentation updates and improvements
85
+ - Pattern documentation
86
+ - **Recommended after initial deployment to complete metrics**
87
+
88
+ **To invoke ZEN:**
89
+ - Reference: "Please review `.claude/agents/deployment/zen-knowledge.md` to complete ARCHITECTURE.md and Technical-Debt.md with full semantic analysis"
90
+ - ZEN maintains and enriches Trinity knowledge base documentation
91
+
92
+ ---
93
+
94
+ ### INO (Context Specialist)
95
+ **File:** [.claude/agents/deployment/ino-context.md](.claude/agents/deployment/ino-context.md)
96
+ **Role:** Creates and maintains CLAUDE.md context hierarchy
97
+ **Specialization:** Context file creation, behavioral requirements
98
+
99
+ **When to Deploy:**
100
+ - Updating project context documentation
101
+ - Defining AI agent behavioral requirements
102
+ - Context hierarchy maintenance
103
+
104
+ **To invoke INO:**
105
+ - Reference: "Please review `.claude/agents/deployment/ino-context.md` for context updates"
106
+ - INO creates and maintains CLAUDE.md context hierarchy and behavioral requirements
107
+
108
+ ---
109
+
110
+ ### Ein (CI/CD Specialist)
111
+ **File:** [.claude/agents/deployment/ein-cicd.md](.claude/agents/deployment/ein-cicd.md)
112
+ **Role:** Continuous Integration/Continuous Deployment automation and optimization
113
+ **Specialization:** GitHub Actions, GitLab CI, coverage providers, badge generation, workflow optimization
114
+
115
+ **When to Deploy:**
116
+ - Customizing CI/CD workflows beyond defaults
117
+ - Setting up coverage providers (Codecov/Coveralls)
118
+ - Injecting status badges into README
119
+ - Troubleshooting CI/CD pipeline failures
120
+ - Optimizing workflow execution time
121
+ - **Recommended after basic CI/CD deployment**
122
+
123
+ **To invoke Ein:**
124
+ - Reference: "Please review `.claude/agents/deployment/ein-cicd.md` to customize CI/CD for [specific needs]"
125
+ - Ein specializes in CI/CD automation, coverage providers, and workflow optimization
126
+
127
+ ---
128
+
129
+ ## ๐Ÿ” AUDIT TEAM
130
+
131
+ ### JUNO (Quality Auditor)
132
+ **File:** [.claude/agents/audit/juno-auditor.md](.claude/agents/audit/juno-auditor.md)
133
+ **Role:** Comprehensive code quality and Trinity deployment audits (DRA compliance validation)
134
+ **Specialization:** Quality assurance, security audits, performance analysis, v2.0 deployment verification
135
+
136
+ **When to Deploy:**
137
+ - Trinity v2.0 deployment verification
138
+ - Code quality audits (DRA standards)
139
+ - Security vulnerability scans
140
+ - Performance bottleneck identification
141
+ - Large scale stop point #4 (final review)
142
+
143
+ **To invoke JUNO:**
144
+ - Reference: "Please review `.claude/agents/audit/juno-auditor.md` to audit Trinity Method deployment and code quality"
145
+ - JUNO performs comprehensive audits using DRA compliance standards (โ‰ฅ70% acceptance criteria)
146
+
147
+ ---
148
+
149
+ ## ๐ŸŽฏ PLANNING LAYER (4 Agents - MON, ROR, TRA, EUS)
150
+
151
+ ### MON (Requirements Analyst)
152
+ **File:** [.claude/agents/planning/mon-requirements.md](.claude/agents/planning/mon-requirements.md)
153
+ **Role:** Requirements analysis, scale determination, acceptance criteria definition
154
+ **Specialization:** Given-When-Then criteria, risk assessment, testability
155
+
156
+ **When to Deploy:**
157
+ - Large scale projects (stop point #1: requirements review)
158
+ - Complex requirements analysis
159
+ - Acceptance criteria definition
160
+
161
+ **To invoke MON:**
162
+ - Use `/trinity-requirements` slash command
163
+ - AJ MAESTRO invokes MON automatically for Medium/Large scale projects
164
+
165
+ ---
166
+
167
+ ### ROR (Design Architect)
168
+ **File:** [.claude/agents/planning/ror-design.md](.claude/agents/planning/ror-design.md)
169
+ **Role:** Technical design, ADRs, Design Doc creation
170
+ **Specialization:** Function signatures (โ‰ค2 params), error handling, DRA compliance
171
+
172
+ **When to Deploy:**
173
+ - Medium/Large scale projects (stop point #2: design approval)
174
+ - Architecture decisions
175
+ - Design Doc creation
176
+
177
+ **To invoke ROR:**
178
+ - Use `/trinity-design` slash command
179
+ - AJ MAESTRO invokes ROR automatically for Medium/Large scale projects
180
+
181
+ ---
182
+
183
+ ### TRA (Work Planner)
184
+ **File:** [.claude/agents/planning/tra-planner.md](.claude/agents/planning/tra-planner.md)
185
+ **Role:** Implementation sequencing, BAS quality gates, timeline estimation
186
+ **Specialization:** Task ordering, dependency resolution, 6-phase quality gates
187
+
188
+ **When to Deploy:**
189
+ - Large scale projects (stop point #3: plan approval)
190
+ - Complex task sequencing
191
+ - Timeline estimation
192
+
193
+ **To invoke TRA:**
194
+ - Use `/trinity-plan` slash command
195
+ - AJ MAESTRO invokes TRA automatically for all scale projects
196
+
197
+ ---
198
+
199
+ ### EUS (Task Decomposer)
200
+ **File:** [.claude/agents/planning/eus-decomposer.md](.claude/agents/planning/eus-decomposer.md)
201
+ **Role:** Atomic task breakdown, commit planning, TDD enforcement
202
+ **Specialization:** 1 task = 1 commit rule, RED-GREEN-REFACTOR, Conventional Commits
203
+
204
+ **When to Deploy:**
205
+ - All scale projects (atomic task breakdown)
206
+ - TDD cycle planning
207
+ - Commit message generation
208
+
209
+ **To invoke EUS:**
210
+ - Use `/trinity-decompose` slash command
211
+ - AJ MAESTRO invokes EUS automatically for all scale projects
212
+
213
+ ---
214
+
215
+ ## โš™๏ธ EXECUTION LAYER (3 Agents - KIL, BAS, DRA)
216
+
217
+ ### KIL (Task Executor)
218
+ **File:** [.claude/agents/aj-team/kil-task-executor.md](.claude/agents/aj-team/kil-task-executor.md)
219
+ **Role:** TDD implementation, code execution, commit creation
220
+ **Specialization:** RED-GREEN-REFACTOR cycle, atomic commits, test-first development
221
+
222
+ **When to Deploy:**
223
+ - All implementation tasks (invoked by AJ MAESTRO)
224
+ - TDD cycle execution
225
+ - Code writing and testing
226
+
227
+ **To invoke KIL:**
228
+ - AJ MAESTRO invokes KIL automatically
229
+ - Direct invocation for specific TDD tasks
230
+
231
+ ---
232
+
233
+ ### BAS (Quality Gate)
234
+ **File:** [.claude/agents/aj-team/bas-quality-gate.md](.claude/agents/aj-team/bas-quality-gate.md)
235
+ **Role:** 6-phase quality gate enforcement
236
+ **Specialization:** Linting, building, testing, coverage (โ‰ฅ80%), best practices
237
+
238
+ **When to Deploy:**
239
+ - After every KIL commit (automatic)
240
+ - CI/CD pipeline integration
241
+ - Quality validation
242
+
243
+ **To invoke BAS:**
244
+ - AJ MAESTRO invokes BAS automatically after each commit
245
+ - Manual invocation for quality checks
246
+
247
+ **6 Phases:**
248
+ 1. Linting (ESLint/Prettier auto-fix)
249
+ 2. Structure validation
250
+ 3. Build validation (TypeScript)
251
+ 4. Testing (all tests pass)
252
+ 5. Coverage check (โ‰ฅ80%)
253
+ 6. Final review (best practices)
254
+
255
+ ---
256
+
257
+ ### DRA (Code Reviewer)
258
+ **File:** [.claude/agents/aj-team/dra-code-reviewer.md](.claude/agents/aj-team/dra-code-reviewer.md)
259
+ **Role:** Code review, Design Doc compliance validation
260
+ **Specialization:** โ‰ฅ70% acceptance criteria, function complexity, error handling
261
+
262
+ **When to Deploy:**
263
+ - After implementation complete (stop points)
264
+ - Design Doc compliance check
265
+ - Final code review
266
+
267
+ **To invoke DRA:**
268
+ - AJ MAESTRO invokes DRA at stop points
269
+ - Manual invocation for code reviews
270
+
271
+ **DRA Standards:**
272
+ - Functions โ‰ค2 parameters
273
+ - Function length <200 lines
274
+ - Nesting depth โ‰ค4 levels
275
+ - Try-catch wraps async
276
+ - โ‰ฅ70% acceptance criteria met
277
+
278
+ ---
279
+
280
+ ## ๐Ÿ› ๏ธ SUPPORT LAYER (4 Agents - APO, BON, CAP, URO)
281
+
282
+ ### APO (Documentation Specialist)
283
+ **File:** [.claude/agents/aj-team/apo-documentation-specialist.md](.claude/agents/aj-team/apo-documentation-specialist.md)
284
+ **Role:** API documentation, JSDoc generation, README maintenance
285
+ **Specialization:** OpenAPI specs, TSDoc, inline documentation
286
+
287
+ **When to Deploy:**
288
+ - API documentation updates
289
+ - JSDoc/TSDoc generation
290
+ - README maintenance
291
+
292
+ **To invoke APO:**
293
+ - AJ MAESTRO invokes APO for documentation tasks
294
+ - Manual invocation for doc updates
295
+
296
+ ---
297
+
298
+ ### BON (Dependency Manager)
299
+ **File:** [.claude/agents/aj-team/bon-dependency-manager.md](.claude/agents/aj-team/bon-dependency-manager.md)
300
+ **Role:** Dependency updates, security patches, version management
301
+ **Specialization:** npm/pip/cargo updates, vulnerability scanning, lockfile management
302
+
303
+ **When to Deploy:**
304
+ - Dependency updates
305
+ - Security patch application
306
+ - Version conflict resolution
307
+
308
+ **To invoke BON:**
309
+ - AJ MAESTRO invokes BON for dependency tasks
310
+ - Manual invocation for updates
311
+
312
+ ---
313
+
314
+ ### CAP (Configuration Specialist)
315
+ **File:** [.claude/agents/aj-team/cap-configuration-specialist.md](.claude/agents/aj-team/cap-configuration-specialist.md)
316
+ **Role:** Configuration file management, environment setup
317
+ **Specialization:** tsconfig.json, .env, CI/CD configs, linting configs
318
+
319
+ **When to Deploy:**
320
+ - Configuration updates
321
+ - Environment variable management
322
+ - Build configuration changes
323
+
324
+ **To invoke CAP:**
325
+ - AJ MAESTRO invokes CAP for config tasks
326
+ - Manual invocation for config updates
327
+
328
+ ---
329
+
330
+ ### URO (Refactoring Specialist)
331
+ **File:** [.claude/agents/aj-team/uro-refactoring-specialist.md](.claude/agents/aj-team/uro-refactoring-specialist.md)
332
+ **Role:** Code refactoring, technical debt reduction, DRY enforcement
333
+ **Specialization:** Extract functions, reduce complexity, eliminate duplication
334
+
335
+ **When to Deploy:**
336
+ - Code refactoring tasks
337
+ - Technical debt reduction
338
+ - Complexity reduction
339
+
340
+ **To invoke URO:**
341
+ - AJ MAESTRO invokes URO for refactoring tasks
342
+ - Manual invocation for code cleanup
343
+
344
+ ---
345
+
346
+ ## ๐Ÿ“‹ DEPLOYMENT WORKFLOWS
347
+
348
+ ### Initial Project Setup (Recommended)
349
+ **1. Deploy Trinity Method:**
350
+ ```bash
351
+ npx @trinity-method/cli deploy
352
+ ```
353
+
354
+ **2. Complete knowledge base (optional but recommended):**
355
+ - Reference: "Please review `.claude/agents/deployment/zen-knowledge.md` to complete ARCHITECTURE.md and Technical-Debt.md with full codebase analysis"
356
+
357
+ **3. Verify deployment quality:**
358
+ - Reference: "Please review `.claude/agents/audit/juno-auditor.md` to audit Trinity Method deployment"
359
+
360
+ ### Fast Deployment (Minimal)
361
+ **Deploy without metrics:**
362
+ ```bash
363
+ npx @trinity-method/cli deploy --skip-audit
364
+ ```
365
+
366
+ **Complete manually when needed:**
367
+ - Reference: "Please review `.claude/agents/deployment/zen-knowledge.md` for knowledge base completion"
368
+
369
+ ### Starting a New Feature
370
+ **1. Investigation phase (Aly):**
371
+ - Reference: "Please review `.claude/agents/leadership/aly-cto.md` to investigate [feature name] and create work order"
372
+
373
+ **2. Implementation phase (AJ):**
374
+ - Reference: "Please review `.claude/agents/leadership/aj-cc.md` to implement work order WO-XXX-[feature-name]"
375
+
376
+ **3. Quality review (JUNO):**
377
+ - Reference: "Please review `.claude/agents/audit/juno-auditor.md` to review implementation of WO-XXX"
378
+
379
+ ### Bug Investigation
380
+ **1. Investigate root cause (Aly):**
381
+ - Reference: "Please review `.claude/agents/leadership/aly-cto.md` to investigate bug: [description]"
382
+
383
+ **2. Implement fix (AJ):**
384
+ - Reference: "Please review `.claude/agents/leadership/aj-cc.md` to fix bug per investigation findings"
385
+
386
+ ### Documentation Updates
387
+ **Update architecture docs (ZEN):**
388
+ - Reference: "Please review `.claude/agents/deployment/zen-knowledge.md` to update ARCHITECTURE.md with recent changes"
389
+
390
+ **Update context files (INO):**
391
+ - Reference: "Please review `.claude/agents/deployment/ino-context.md` to update CLAUDE.md hierarchy with new patterns"
392
+
393
+ ### CI/CD Customization (After Basic Deployment)
394
+ **1. Deploy Trinity Method:**
395
+ ```bash
396
+ npx @trinity-method/cli deploy --ci-deploy
397
+ ```
398
+
399
+ **2. Customize CI/CD (Ein):**
400
+ - Reference: "Please review `.claude/agents/deployment/ein-cicd.md` to set up Codecov coverage reporting and inject badges to README"
401
+
402
+ **3. Verify CI/CD setup (JUNO):**
403
+ - Reference: "Please review `.claude/agents/audit/juno-auditor.md` to audit CI/CD configuration and workflows"
404
+
405
+ ### Coverage Provider Setup
406
+ **Codecov setup with badges (Ein):**
407
+ - Reference: "Please review `.claude/agents/deployment/ein-cicd.md` to configure Codecov with badge injection to README and add CODECOV_TOKEN setup instructions"
408
+
409
+ **Switch to Coveralls (Ein):**
410
+ - Reference: "Please review `.claude/agents/deployment/ein-cicd.md` to switch from Codecov to Coveralls coverage provider"
411
+
412
+ **Use both providers (Ein):**
413
+ - Reference: "Please review `.claude/agents/deployment/ein-cicd.md` to configure both Codecov and Coveralls coverage reporting"
414
+
415
+ ### Workflow Optimization
416
+ **Optimize for speed (Ein):**
417
+ - Reference: "Please review `.claude/agents/deployment/ein-cicd.md` to optimize my CI/CD workflow to reduce execution time below 5 minutes"
418
+
419
+ **Add deployment automation (Ein):**
420
+ - Reference: "Please review `.claude/agents/deployment/ein-cicd.md` to add automated deployment to staging on merge to develop branch"
421
+
422
+ ---
423
+
424
+ ## ๐ŸŽฏ QUICK REFERENCE
425
+
426
+ ### v2.0 Agents (18 Total)
427
+
428
+ | Need | Agent | Layer | Slash Command |
429
+ |------|-------|-------|---------------|
430
+ | **Scale Determination** | ALY | Leadership | N/A (always first) |
431
+ | **AI Orchestration** | AJ MAESTRO | Leadership | `/trinity-orchestrate` |
432
+ | **Requirements** | MON | Planning | `/trinity-requirements` |
433
+ | **Technical Design** | ROR | Planning | `/trinity-design` |
434
+ | **Work Planning** | TRA | Planning | `/trinity-plan` |
435
+ | **Task Decomposition** | EUS | Planning | `/trinity-decompose` |
436
+ | **TDD Implementation** | KIL | Execution | Auto (via MAESTRO) |
437
+ | **Quality Gates** | BAS | Execution | Auto (via MAESTRO) |
438
+ | **Code Review** | DRA | Execution | Auto (via MAESTRO) |
439
+ | **API Documentation** | APO | Support | Auto (via MAESTRO) |
440
+ | **Dependencies** | BON | Support | Auto (via MAESTRO) |
441
+ | **Configuration** | CAP | Support | Auto (via MAESTRO) |
442
+ | **Refactoring** | URO | Support | Auto (via MAESTRO) |
443
+ | **Deployment Structure** | TAN | Deployment | N/A (initial setup) |
444
+ | **Knowledge Base** | ZEN | Deployment | N/A (doc updates) |
445
+ | **Context Management** | INO | Deployment | N/A (CLAUDE.md) |
446
+ | **CI/CD** | Ein | Deployment | N/A (CI/CD setup) |
447
+ | **Quality Audits** | JUNO | Audit | N/A (final review) |
448
+
449
+ ### v1.0 Legacy Agent
450
+
451
+ | Need | Agent | Team | Status |
452
+ |------|-------|------|--------|
453
+ | Single-Agent Implementation | AJ (Claude Code) | Leadership | Deprecated in v2.0 |
454
+
455
+ ---
456
+
457
+ ## ๐Ÿ“š ADDITIONAL RESOURCES
458
+
459
+ ### Trinity Method Documentation
460
+ - [Trinity Methodology](../trinity/knowledge-base/Trinity.md)
461
+ - [Project Architecture](../trinity/knowledge-base/ARCHITECTURE.md)
462
+ - [Current Tasks](../trinity/knowledge-base/To-do.md)
463
+ - [Known Issues](../trinity/knowledge-base/ISSUES.md)
464
+ - [Technical Debt](../trinity/knowledge-base/Technical-Debt.md)
465
+
466
+ ### Work Order Templates
467
+ Located in `trinity/templates/work-orders/`:
468
+ - INVESTIGATION-TEMPLATE.md
469
+ - IMPLEMENTATION-TEMPLATE.md
470
+ - ANALYSIS-TEMPLATE.md
471
+ - AUDIT-TEMPLATE.md
472
+ - PATTERN-TEMPLATE.md
473
+ - VERIFICATION-TEMPLATE.md
474
+
475
+ ### Investigation Templates
476
+ Located in `trinity/templates/investigations/`:
477
+ - bug.md - Bug investigation with Five Whys analysis
478
+ - feature.md - Feature analysis with epic breakdown
479
+ - technical.md - Technical investigation with ADR format
480
+ - performance.md - Performance baselines with p50/p95/p99
481
+ - security.md - Security investigation with CVSS 3.1 scoring
482
+
483
+ ---
484
+
485
+ ## ๐Ÿงน CODE QUALITY TOOLS
486
+
487
+ ### Linting and Formatting
488
+
489
+ Trinity Method SDK can optionally configure linting tools during deployment.
490
+
491
+ **Available Tools:**
492
+
493
+ | Framework | Tools Available |
494
+ |-----------|----------------|
495
+ | Node.js/React | ESLint, Prettier, Pre-commit hooks |
496
+ | Python | Black, Flake8, isort, Pre-commit hooks |
497
+ | Flutter | Dart Analyzer, Pre-commit hooks |
498
+ | Rust | Clippy, Rustfmt, Pre-commit hooks |
499
+
500
+ **To setup during deployment:**
501
+ ```bash
502
+ npx @trinity-method/cli deploy
503
+ # Select "Recommended" or "Custom" when prompted
504
+ ```
505
+
506
+ **After deployment:**
507
+ 1. Install dependencies: `npm install` (or `pip install -r requirements-dev.txt`)
508
+ 2. Setup hooks: `pip install pre-commit && pre-commit install`
509
+ 3. Test: `npm run lint` (or equivalent for your framework)
510
+
511
+ **Pre-commit Hooks:**
512
+ Trinity uses Python's `pre-commit` framework for ALL project types (Node.js, Python, Rust, Flutter). This ensures consistent quality checks across all frameworks.
513
+
514
+ **First-time setup:**
515
+ ```bash
516
+ # Install pre-commit (one-time global install)
517
+ pip install pre-commit
518
+
519
+ # In your project directory
520
+ pre-commit install
521
+ ```
522
+
523
+ **How it works:**
524
+ - Runs linters/formatters before each git commit
525
+ - Prevents committing code that fails quality checks
526
+ - Configured via `.pre-commit-config.yaml`
527
+
528
+ ---
529
+
530
+ ## Related Documentation
531
+
532
+ **Trinity Method Context Files**:
533
+ - [../CLAUDE.md](../CLAUDE.md) - Project overview and global requirements
534
+ - [../trinity/CLAUDE.md](../trinity/CLAUDE.md) - Trinity Method enforcement and protocols
535
+ - [../src/CLAUDE.md](../src/CLAUDE.md) - Framework-specific implementation rules
536
+
537
+ **Knowledge Base**:
538
+ - [Investigation Protocols](../trinity/CLAUDE.md#investigation-protocols) - Investigation-first methodology
539
+ - [Quality Gates](../trinity/CLAUDE.md#quality-standards) - BAS 6-phase quality gates
540
+ - [Crisis Management](../trinity/CLAUDE.md#crisis-management) - Emergency escalation protocols
541
+
542
+ ---
543
+
544
+ **Trinity Method {{TRINITY_VERSION}}**
545
+ **Deployed:** {{DEPLOYMENT_TIMESTAMP}}