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,262 @@
1
+ # ORCHESTRATOR WORK ORDER #XXX
2
+ ## Type: AUDIT
3
+ ## [Audit Title]
4
+
5
+ ---
6
+
7
+ ## AUTHORIZATION
8
+
9
+ ```
10
+ TRINITY COUNCIL APPROVAL:
11
+ ☑ LUKA: APPROVED - [Strategic need for audit]
12
+ ☑ TRINITY: APPROVED - [Technical audit scope]
13
+ ☑ CC: PENDING - Awaiting your acknowledgment
14
+
15
+ STATUS: APPROVED FOR EXECUTION
16
+ ```
17
+
18
+ ---
19
+
20
+ ## MISSION OBJECTIVE
21
+
22
+ [Clear statement of what needs to be audited and against what standards]
23
+
24
+ **Audit Purpose:** [Why this audit is needed now]
25
+ **Baseline:** [What standards/requirements to audit against]
26
+
27
+ ---
28
+
29
+ ## AUDIT SCOPE
30
+
31
+ ### Components to Audit
32
+ 1. **[Component/Module #1]**
33
+ - Files: [Count or list]
34
+ - Focus: [Specific concerns]
35
+ - Standards: [Which standards apply]
36
+
37
+ 2. **[Component/Module #2]**
38
+ - Files: [Count or list]
39
+ - Focus: [Specific concerns]
40
+ - Standards: [Which standards apply]
41
+
42
+ ### Compliance Categories
43
+
44
+ #### Code Quality
45
+ - [ ] Naming conventions
46
+ - [ ] File organization
47
+ - [ ] Documentation completeness
48
+ - [ ] Comment quality
49
+
50
+ #### Security
51
+ - [ ] Input validation
52
+ - [ ] Memory safety
53
+ - [ ] Authentication/Authorization
54
+ - [ ] Data protection
55
+
56
+ #### Performance
57
+ - [ ] Resource usage
58
+ - [ ] Algorithm efficiency
59
+ - [ ] Caching implementation
60
+ - [ ] Database queries
61
+
62
+ #### Mobile-First Compliance
63
+ **MANDATORY for all UI-related audits:**
64
+ - [ ] **Mobile Viewport Compliance** - Responsive design implementation
65
+ - [ ] **Touch Target Standards** - Minimum 44px touch targets
66
+ - [ ] **Mobile Performance Standards** - Loading times under 3 seconds
67
+ - [ ] **Mobile Browser Compatibility** - iOS Safari, Chrome Mobile, Android support
68
+ - [ ] **Dynamic Viewport Handling** - Proper use of viewport units (dvh, lvh, svh)
69
+ - [ ] **Mobile-Specific Accessibility** - Screen reader and mobile assistive technology support
70
+
71
+ #### Trinity Standards
72
+ - [ ] Investigation documentation
73
+ - [ ] Test coverage requirements
74
+ - [ ] Technical debt tracking
75
+ - [ ] Pattern documentation
76
+
77
+ ---
78
+
79
+ ## AUDIT METHODOLOGY
80
+
81
+ ### Automated Scans
82
+ - **Tool/Pattern:** [What to run]
83
+ - Expected output: [What you'll get]
84
+ - Threshold: [Pass/fail criteria]
85
+
86
+ - **Tool/Pattern:** [What to run]
87
+ - Expected output: [What you'll get]
88
+ - Threshold: [Pass/fail criteria]
89
+
90
+ ### Manual Review
91
+ - **Area:** [What to review manually]
92
+ - Checklist: [Specific items to verify]
93
+ - Red flags: [What to watch for]
94
+
95
+ ### Metrics Collection
96
+ - [ ] Lines of code by component
97
+ - [ ] Test coverage percentage
98
+ - [ ] TODO/FIXME count
99
+ - [ ] Warning suppression count
100
+ - [ ] File size distribution
101
+ - [ ] Complexity scores
102
+ - [ ] Mobile compatibility scores (if UI audit)
103
+
104
+ ---
105
+
106
+ ## DELIVERABLE REQUIREMENTS
107
+
108
+ ### Document Format
109
+ **Filename:** `AUDIT-REPORT-[TIMESTAMP].md`
110
+ **Location:** `${PROJECT_REPORTS}/` (Project-specific Reports folder)
111
+
112
+ ### Required Sections
113
+ 1. **Executive Summary** - Overall compliance status
114
+ 2. **Compliance Score** - Percentage by category
115
+ 3. **Critical Issues** - Must-fix items found
116
+ 4. **High Priority Issues** - Should-fix items
117
+ 5. **Medium Priority Issues** - Nice-to-fix items
118
+ 6. **Mobile Compliance Assessment** - Mobile-specific findings (if applicable)
119
+ 7. **Metrics Dashboard** - All collected metrics
120
+ 8. **Recommendations** - Prioritized action items
121
+
122
+ ### Scoring Rubric
123
+ ```yaml
124
+ Critical_Issues: -5 points each
125
+ Moderate_Issues: -2 points each
126
+ Minor_Issues: -1 point each
127
+
128
+ Starting_Score: 100
129
+ Passing_Score: 70
130
+ ```
131
+
132
+ ---
133
+
134
+ ## ✅ AFTER COMPLETION
135
+
136
+ ### ⚠️ CRITICAL: Complete ALL Steps Below - NO EXCEPTIONS
137
+
138
+ **Step 1: Create Completion Report** ✅
139
+ - [ ] Audit deliverable created in `${PROJECT_REPORTS}/`
140
+ - [ ] Follow format: `AUDIT-[COMPONENT]-[TIMESTAMP].md`
141
+ - [ ] JUNO audit report generated automatically (if applicable)
142
+ - [ ] All deliverables include required sections listed above
143
+
144
+ **Step 2: 🚨 MOVE THIS WORK ORDER FILE 🚨** ✅
145
+ - [ ] **IMMEDIATELY** move this file from `trinity/work-orders/` to `trinity/sessions/`
146
+ - [ ] **THIS STEP IS MANDATORY** - Work orders left in trinity/work-orders/ are considered incomplete
147
+
148
+ **Execute this exact command:**
149
+ ```bash
150
+ mv trinity/work-orders/{{workOrderFilename}} trinity/sessions/
151
+ ```
152
+
153
+ **Step 3: Verify File Locations** ✅
154
+ - [ ] This work order file NOW EXISTS in: `trinity/sessions/{{workOrderFilename}}`
155
+ - [ ] Completion report exists in: `${PROJECT_REPORTS}/AUDIT-[COMPONENT]-[TIMESTAMP].md`
156
+ - [ ] This work order NO LONGER EXISTS in: `trinity/work-orders/`
157
+
158
+ **If any verification fails, the work order is NOT complete. Fix immediately.**
159
+
160
+ **Step 4: Session Cleanup (when entire session complete):**
161
+ - [ ] When session is complete, run `/trinity-end`
162
+ - [ ] trinity-end will archive ALL files from `trinity/sessions/` and `${PROJECT_REPORTS}/`
163
+ - [ ] Next session starts with empty sessions/ and reports/ folders
164
+
165
+ **Archive Destination (via trinity-end):**
166
+ - Work order → `trinity/archive/work-orders/YYYY-MM-DD/`
167
+ - Completion report → `trinity/archive/reports/YYYY-MM-DD/`
168
+ - JUNO audit report → `trinity/archive/reports/YYYY-MM-DD/` (if applicable)
169
+ - Session summary → `trinity/archive/sessions/YYYY-MM-DD/`
170
+
171
+ ---
172
+
173
+ ## SUCCESS CRITERIA
174
+
175
+ The audit is complete when:
176
+ - [ ] All specified components have been audited
177
+ - [ ] All compliance categories have been checked
178
+ - [ ] Mobile compliance verified (if UI audit)
179
+ - [ ] Metrics have been collected and analyzed
180
+ - [ ] Issues have been categorized by severity
181
+ - [ ] Clear recommendations have been provided
182
+ - [ ] Audit report submitted with score
183
+
184
+ ---
185
+
186
+ ## ⚠️ CRITICAL RESTRICTIONS - GIT OPERATIONS FORBIDDEN
187
+
188
+ **AUDITS ARE READ-ONLY OPERATIONS:**
189
+ ALL team members (CC, TRINITY, specialists) are PERMANENTLY FORBIDDEN from performing ANY git operations during audits:
190
+
191
+ - [ ] **git add** - FORBIDDEN - Only LUKA has permission
192
+ - [ ] **git commit** - FORBIDDEN - Only LUKA has permission
193
+ - [ ] **git push** - FORBIDDEN - Only LUKA has permission
194
+ - [ ] **git pull** - FORBIDDEN - Only LUKA has permission
195
+ - [ ] **git merge** - FORBIDDEN - Only LUKA has permission
196
+ - [ ] **git checkout -b** - FORBIDDEN - Only LUKA has permission
197
+ - [ ] **git branch** - FORBIDDEN - Only LUKA has permission
198
+ - [ ] **git tag** - FORBIDDEN - Only LUKA has permission
199
+ - [ ] **git rebase** - FORBIDDEN - Only LUKA has permission
200
+ - [ ] **git reset** - FORBIDDEN - Only LUKA has permission
201
+ - [ ] **git revert** - FORBIDDEN - Only LUKA has permission
202
+ - [ ] **git stash** - FORBIDDEN - Only LUKA has permission
203
+ - [ ] **Any git operation that modifies repository state**
204
+
205
+ **AUDIT PROTOCOL:**
206
+ 1. Audit files and components in current state
207
+ 2. Document all compliance findings
208
+ 3. Report audit results to LUKA
209
+ 4. No file modifications during audit phase
210
+ 5. If fixes are needed, LUKA will issue separate implementation work order
211
+
212
+ ---
213
+
214
+ ## SPECIFIC STANDARDS TO ENFORCE
215
+
216
+ ### Trinity Method Requirements
217
+ - Investigation before implementation
218
+ - Comprehensive documentation
219
+ - Test coverage > X%
220
+ - No suppressed warnings without justification
221
+ - All TODOs tracked in Technical-Debt.md
222
+
223
+ ### Project-Specific Standards
224
+ [List any project-specific requirements to check]
225
+
226
+ ---
227
+
228
+ ## CONTEXT & BASELINE
229
+
230
+ **Previous Audit:** [If applicable, Work Order #XXX]
231
+ **Baseline Metrics:** [Previous scores to compare against]
232
+ **Known Issues:** [Existing problems to verify if fixed]
233
+
234
+ ---
235
+
236
+ ## PRIORITY LEVEL
237
+
238
+ **Analysis Scope:** [COMPREHENSIVE/STANDARD/FOCUSED]
239
+ **Completeness Required:** 100% - Full analysis must be completed
240
+ **Trigger:** [What prompted this audit]
241
+ **Frequency:** [One-time/Recurring]
242
+
243
+ ---
244
+
245
+ ## OUTPUT FORMATTING
246
+
247
+ For each issue found:
248
+ ```markdown
249
+ **Issue:** [Brief description]
250
+ **Location:** [File:Line]
251
+ **Category:** [Quality/Security/Performance/Mobile/Trinity]
252
+ **Severity:** [Critical/High/Medium/Low]
253
+ **Evidence:** [Specific example]
254
+ **Recommendation:** [How to fix]
255
+ ```
256
+
257
+ ---
258
+
259
+ **Remember:** Be thorough but fair. The goal is to improve quality, not to find fault. Focus on actionable findings with clear remediation paths. Audits are read-only - no file modifications or git operations.
260
+
261
+ *Trinity Method v2.0 - Audit Work Order Template*
262
+ *Project-Isolated Architecture with Dynamic Paths*
@@ -0,0 +1,260 @@
1
+ # ORCHESTRATOR WORK ORDER #XXX
2
+ ## Type: IMPLEMENTATION
3
+ ## [Implementation Title]
4
+
5
+ ---
6
+
7
+ ## AUTHORIZATION
8
+
9
+ ```
10
+ TRINITY COUNCIL APPROVAL:
11
+ ☑ LUKA: APPROVED - [Strategic approval]
12
+ ☑ TRINITY: APPROVED - [Technical validation]
13
+ ☑ CC: PENDING - Awaiting your acknowledgment
14
+
15
+ STATUS: APPROVED FOR EXECUTION
16
+ ```
17
+
18
+ ---
19
+
20
+ ## MISSION OBJECTIVE
21
+
22
+ [Clear statement of what needs to be implemented and the expected outcome]
23
+
24
+ **Implementation Goal:** [Specific end state to achieve]
25
+ **Based On:** [Investigation/Analysis that identified this need]
26
+
27
+ ---
28
+
29
+ ## IMPLEMENTATION SCOPE
30
+
31
+ ### Files to Modify
32
+ ```yaml
33
+ Critical_Files:
34
+ - path: [file/path.ext]
35
+ changes: [type of changes]
36
+ risk: [HIGH/MEDIUM/LOW]
37
+
38
+ - path: [file/path.ext]
39
+ changes: [type of changes]
40
+ risk: [HIGH/MEDIUM/LOW]
41
+
42
+ Supporting_Files:
43
+ - [file/path.ext] - [minor changes]
44
+ - [file/path.ext] - [minor changes]
45
+ ```
46
+
47
+ ### Changes Required
48
+
49
+ #### Change Set 1: [Category]
50
+ **Files:** [List of files]
51
+ **Current State:** [What exists now]
52
+ **Target State:** [What should exist after]
53
+ **Implementation:**
54
+ ```language
55
+ // Specific code pattern or approach
56
+ [Code example or template]
57
+ ```
58
+
59
+ #### Change Set 2: [Category]
60
+ [Same structure]
61
+
62
+ ---
63
+
64
+ ## IMPLEMENTATION APPROACH
65
+
66
+ ### Step 1: [Preparation]
67
+ - [ ] [Specific action]
68
+ - [ ] [Verification step]
69
+ - [ ] [Safety check]
70
+
71
+ ### Step 2: [Core Implementation]
72
+ - [ ] [Change action #1]
73
+ - [ ] [Change action #2]
74
+ - [ ] [Testing between changes]
75
+
76
+ ### Step 3: [Validation]
77
+ - [ ] [Test the changes]
78
+ - [ ] [Verify no regressions]
79
+ - [ ] [Confirm improvement]
80
+
81
+ ---
82
+
83
+ ## DELIVERABLE REQUIREMENTS
84
+
85
+ ### Document Format
86
+ **Filename:** `[COMPONENT]-IMPLEMENTATION-COMPLETE-[TIMESTAMP].md`
87
+ **Location:** `${PROJECT_REPORTS}/` (Project-specific Reports folder)
88
+
89
+ ### Required Sections
90
+ 1. **Executive Summary** - What was implemented
91
+ 2. **Changes Applied** - Detailed list with diffs
92
+ 3. **Test Results** - Validation of changes
93
+ 4. **Metrics** - Before/after comparisons
94
+ 5. **Rollback Plan** - How to revert if needed
95
+ 6. **Next Steps** - What to monitor or do next
96
+
97
+ ### Evidence to Provide
98
+ - File diff statistics (X files changed, Y insertions, Z deletions)
99
+ - Specific line numbers for critical changes
100
+ - Test output showing success
101
+ - Performance metrics if applicable
102
+
103
+ ---
104
+
105
+ ## ✅ AFTER COMPLETION
106
+
107
+ ### ⚠️ CRITICAL: Complete ALL Steps Below - NO EXCEPTIONS
108
+
109
+ **Step 1: Create Completion Report** ✅
110
+ - [ ] Implementation deliverable created in `${PROJECT_REPORTS}/`
111
+ - [ ] Follow format: `[COMPONENT]-IMPLEMENTATION-COMPLETE-[TIMESTAMP].md`
112
+ - [ ] JUNO audit report generated automatically (if applicable)
113
+ - [ ] All deliverables include required sections listed above
114
+
115
+ **Step 2: 🚨 MOVE THIS WORK ORDER FILE 🚨** ✅
116
+ - [ ] **IMMEDIATELY** move this file from `trinity/work-orders/` to `trinity/sessions/`
117
+ - [ ] **THIS STEP IS MANDATORY** - Work orders left in trinity/work-orders/ are considered incomplete
118
+
119
+ **Execute this exact command:**
120
+ ```bash
121
+ mv trinity/work-orders/{{workOrderFilename}} trinity/sessions/
122
+ ```
123
+
124
+ **Step 3: Verify File Locations** ✅
125
+ - [ ] This work order file NOW EXISTS in: `trinity/sessions/{{workOrderFilename}}`
126
+ - [ ] Completion report exists in: `${PROJECT_REPORTS}/[COMPONENT]-IMPLEMENTATION-COMPLETE-[TIMESTAMP].md`
127
+ - [ ] This work order NO LONGER EXISTS in: `trinity/work-orders/`
128
+
129
+ **If any verification fails, the work order is NOT complete. Fix immediately.**
130
+
131
+ **Step 4: Session Cleanup (when entire session complete):**
132
+ - [ ] When session is complete, run `/trinity-end`
133
+ - [ ] trinity-end will archive ALL files from `trinity/sessions/` and `${PROJECT_REPORTS}/`
134
+ - [ ] Next session starts with empty sessions/ and reports/ folders
135
+
136
+ **Archive Destination (via trinity-end):**
137
+ - Work order → `trinity/archive/work-orders/YYYY-MM-DD/`
138
+ - Completion report → `trinity/archive/reports/YYYY-MM-DD/`
139
+ - JUNO audit report → `trinity/archive/reports/YYYY-MM-DD/` (if applicable)
140
+ - Session summary → `trinity/archive/sessions/YYYY-MM-DD/`
141
+
142
+ ---
143
+
144
+ ## SUCCESS CRITERIA
145
+
146
+ The implementation is complete when:
147
+ - [ ] All specified files have been modified
148
+ - [ ] Changes follow the specified patterns
149
+ - [ ] No regressions introduced
150
+ - [ ] Tests pass (if applicable)
151
+ - [ ] Code follows project standards
152
+ - [ ] Implementation report submitted to project Reports folder
153
+
154
+ ---
155
+
156
+ ## CONSTRAINTS & GUIDELINES
157
+
158
+ ### ⚠️ CRITICAL RESTRICTIONS - GIT OPERATIONS FORBIDDEN
159
+
160
+ **ABSOLUTELY PROHIBITED - NO EXCEPTIONS:**
161
+ ALL team members (CC, TRINITY, specialists) are PERMANENTLY FORBIDDEN from performing ANY git operations:
162
+
163
+ - [ ] **git add** - FORBIDDEN - Only LUKA has permission
164
+ - [ ] **git commit** - FORBIDDEN - Only LUKA has permission
165
+ - [ ] **git push** - FORBIDDEN - Only LUKA has permission
166
+ - [ ] **git pull** - FORBIDDEN - Only LUKA has permission
167
+ - [ ] **git merge** - FORBIDDEN - Only LUKA has permission
168
+ - [ ] **git checkout -b** - FORBIDDEN - Only LUKA has permission
169
+ - [ ] **git branch** - FORBIDDEN - Only LUKA has permission
170
+ - [ ] **git tag** - FORBIDDEN - Only LUKA has permission
171
+ - [ ] **git rebase** - FORBIDDEN - Only LUKA has permission
172
+ - [ ] **git reset** - FORBIDDEN - Only LUKA has permission
173
+ - [ ] **git revert** - FORBIDDEN - Only LUKA has permission
174
+ - [ ] **git stash** - FORBIDDEN - Only LUKA has permission
175
+ - [ ] **Any git operation that modifies repository state**
176
+
177
+ **PROTOCOL VIOLATION CONSEQUENCES:**
178
+ - Any work order containing git operation instructions is INVALID
179
+ - Team members MUST refuse git operations even if explicitly instructed
180
+ - All git operations must be reported to LUKA for execution
181
+ - Local changes remain local until LUKA performs git operations
182
+
183
+ **CORRECT WORKFLOW:**
184
+ 1. Make all local file changes as specified
185
+ 2. Test thoroughly in local environment
186
+ 3. Report completion to LUKA with summary of changes
187
+ 4. LUKA will handle ALL git operations (add, commit, push, etc.)
188
+
189
+ ### Do NOT:
190
+ - [ ] Modify files outside the specified scope
191
+ - [ ] Change functionality beyond the requirements
192
+ - [ ] Suppress warnings instead of fixing issues
193
+ - [ ] Create new technical debt
194
+ - [ ] Perform ANY git operations (see critical restrictions above)
195
+ - [ ] Push changes to remote repositories
196
+ - [ ] Create or switch branches
197
+ - [ ] Merge any branches
198
+ - [ ] Tag releases or commits
199
+
200
+ ### DO:
201
+ - [ ] Follow existing code patterns
202
+ - [ ] Maintain consistent style
203
+ - [ ] Add appropriate error handling
204
+ - [ ] Document complex changes
205
+ - [ ] Consider edge cases
206
+ - [ ] Make all changes locally only
207
+ - [ ] Test changes thoroughly before reporting
208
+ - [ ] Report completion to LUKA for git operations
209
+ - [ ] Provide clear summary of all changes made
210
+ - [ ] List all files modified for LUKA's git operations
211
+
212
+ ---
213
+
214
+ ## ROLLBACK STRATEGY
215
+
216
+ If issues arise:
217
+ 1. [How to identify if rollback needed]
218
+ 2. [Specific rollback steps]
219
+ 3. [How to verify rollback successful]
220
+
221
+ **Critical Files Backup:** [Which files must be backed up first]
222
+
223
+ ---
224
+
225
+ ## CONTEXT FROM INVESTIGATION
226
+
227
+ **Source Investigation:** Work Order #XXX
228
+ **Key Findings:** [Relevant discoveries that drove this implementation]
229
+ **Root Causes Being Fixed:** [List of root causes]
230
+ **Expected Impact:** [X issues resolved, Y% improvement]
231
+
232
+ ---
233
+
234
+ ## SCOPE & RISK ASSESSMENT
235
+
236
+ ## PACE AND COMPLETENESS NOTICE
237
+
238
+ **IMPORTANT:** There are NO time constraints on this work.
239
+ The scope indicators are for planning purposes only, NOT deadlines.
240
+ Take as much time as needed to achieve 100% completion with precision.
241
+ Partial completion is unacceptable.
242
+ Quality and completeness are the ONLY metrics that matter.
243
+
244
+ **Implementation Scope:** [COMPREHENSIVE/STANDARD/FOCUSED]
245
+ **Completeness Required:** 100% - All specified changes must be implemented
246
+ **Risk Level:** [HIGH/MEDIUM/LOW]
247
+ **Risk Factors:**
248
+ - [Specific risk #1]
249
+ - [Specific risk #2]
250
+
251
+ **Mitigation:**
252
+ - [How to minimize risk #1]
253
+ - [How to minimize risk #2]
254
+
255
+ ---
256
+
257
+ **Remember:** Make changes systematically, test frequently, and maintain code quality throughout the implementation. Report all changes to LUKA for git operations.
258
+
259
+ *Trinity Method v2.0 - Implementation Work Order Template*
260
+ *Project-Isolated Architecture with Dynamic Paths*