trinity-method-sdk 2.0.9 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/CHANGELOG.md +702 -267
  2. package/README.md +550 -540
  3. package/dist/cli/commands/deploy/agents.js +1 -1
  4. package/dist/cli/commands/deploy/ci-cd.d.ts +4 -3
  5. package/dist/cli/commands/deploy/ci-cd.js +10 -9
  6. package/dist/cli/commands/deploy/claude-setup.js +28 -35
  7. package/dist/cli/commands/deploy/configuration.js +10 -11
  8. package/dist/cli/commands/deploy/directories.js +13 -14
  9. package/dist/cli/commands/deploy/gitignore.js +3 -5
  10. package/dist/cli/commands/deploy/index.d.ts +1 -1
  11. package/dist/cli/commands/deploy/index.js +7 -3
  12. package/dist/cli/commands/deploy/knowledge-base.js +3 -3
  13. package/dist/cli/commands/deploy/pre-flight.js +1 -1
  14. package/dist/cli/commands/deploy/root-files.js +3 -18
  15. package/dist/cli/commands/deploy/sdk-install.js +1 -1
  16. package/dist/cli/commands/deploy/summary.js +3 -3
  17. package/dist/cli/commands/deploy/templates.js +33 -20
  18. package/dist/cli/commands/update/agents.js +1 -1
  19. package/dist/cli/commands/update/backup.js +6 -12
  20. package/dist/cli/commands/update/commands.d.ts +1 -0
  21. package/dist/cli/commands/update/commands.js +18 -45
  22. package/dist/cli/commands/update/knowledge-base.js +2 -2
  23. package/dist/cli/commands/update/pre-flight.js +11 -11
  24. package/dist/cli/commands/update/summary.js +5 -5
  25. package/dist/cli/commands/update/templates.js +35 -13
  26. package/dist/cli/commands/update/verification.js +5 -5
  27. package/dist/cli/commands/update/version.js +1 -1
  28. package/dist/cli/utils/deploy-ci.d.ts +3 -2
  29. package/dist/cli/utils/deploy-ci.js +24 -24
  30. package/dist/cli/utils/deploy-linting.js +101 -6
  31. package/dist/cli/utils/error-classes.d.ts +2 -2
  32. package/dist/cli/utils/linting-tools.js +14 -6
  33. package/dist/cli/utils/template-processor.js +2 -4
  34. package/dist/templates/{claude → .claude}/EMPLOYEE-DIRECTORY.md.template +16 -22
  35. package/dist/templates/{agents → .claude/agents}/aj-team/apo-documentation-specialist.md.template +10 -10
  36. package/dist/templates/{agents → .claude/agents}/aj-team/bas-quality-gate.md.template +13 -15
  37. package/dist/templates/{agents → .claude/agents}/aj-team/bon-dependency-manager.md.template +4 -4
  38. package/dist/templates/{agents → .claude/agents}/aj-team/cap-configuration-specialist.md.template +3 -3
  39. package/dist/templates/{agents → .claude/agents}/aj-team/dra-code-reviewer.md.template +8 -10
  40. package/dist/templates/{agents → .claude/agents}/aj-team/kil-task-executor.md.template +11 -13
  41. package/dist/templates/{agents → .claude/agents}/aj-team/uro-refactoring-specialist.md.template +3 -3
  42. package/dist/templates/{agents → .claude/agents}/audit/juno-auditor.md.template +46 -42
  43. package/dist/templates/{agents → .claude/agents}/deployment/ein-cicd.md.template +59 -164
  44. package/dist/templates/{agents → .claude/agents}/deployment/ino-context.md.template +25 -22
  45. package/dist/templates/{agents → .claude/agents}/deployment/tan-structure.md.template +32 -30
  46. package/dist/templates/{agents → .claude/agents}/deployment/zen-knowledge.md.template +28 -23
  47. package/dist/templates/{agents → .claude/agents}/leadership/aj-maestro.md.template +10 -6
  48. package/dist/templates/{agents → .claude/agents}/leadership/aly-cto.md.template +22 -19
  49. package/dist/templates/{agents → .claude/agents}/planning/eus-decomposer.md.template +8 -4
  50. package/dist/templates/{agents → .claude/agents}/planning/mon-requirements.md.template +8 -4
  51. package/dist/templates/{agents → .claude/agents}/planning/ror-design.md.template +8 -4
  52. package/dist/templates/{agents → .claude/agents}/planning/tra-planner.md.template +10 -4
  53. package/dist/templates/{shared/claude-commands → .claude/commands/execution}/trinity-audit.md.template +15 -15
  54. package/dist/templates/.claude/commands/execution/trinity-breakdown.md.template +535 -0
  55. package/dist/templates/{shared/claude-commands → .claude/commands/execution}/trinity-orchestrate.md.template +48 -48
  56. package/dist/templates/{shared/claude-commands → .claude/commands/infrastructure}/trinity-init.md.template +32 -54
  57. package/dist/templates/{shared/claude-commands → .claude/commands/investigation}/trinity-create-investigation.md.template +13 -7
  58. package/dist/templates/{shared/claude-commands → .claude/commands/investigation}/trinity-investigate-templates.md.template +19 -15
  59. package/dist/templates/{shared/claude-commands → .claude/commands/investigation}/trinity-plan-investigation.md.template +12 -6
  60. package/dist/templates/{shared/claude-commands → .claude/commands/maintenance}/trinity-changelog.md.template +9 -8
  61. package/dist/templates/.claude/commands/maintenance/trinity-docs-update.md.template +279 -0
  62. package/dist/templates/.claude/commands/maintenance/trinity-docs.md.template +2828 -0
  63. package/dist/templates/{shared/claude-commands → .claude/commands/maintenance}/trinity-readme.md.template +21 -20
  64. package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-decompose.md.template +6 -4
  65. package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-design.md.template +6 -4
  66. package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-plan.md.template +7 -5
  67. package/dist/templates/{shared/claude-commands → .claude/commands/planning}/trinity-requirements.md.template +6 -4
  68. package/dist/templates/{shared/claude-commands → .claude/commands/session}/trinity-continue.md.template +30 -24
  69. package/dist/templates/{shared/claude-commands → .claude/commands/session}/trinity-end.md.template +403 -397
  70. package/dist/templates/{shared/claude-commands → .claude/commands/session}/trinity-start.md.template +9 -4
  71. package/dist/templates/{shared/claude-commands → .claude/commands/utility}/trinity-agents.md.template +11 -8
  72. package/dist/templates/{shared/claude-commands → .claude/commands/utility}/trinity-verify.md.template +56 -57
  73. package/dist/templates/{shared/claude-commands → .claude/commands/utility}/trinity-workorder.md.template +13 -9
  74. package/dist/templates/ci/ci.yml.template +2 -2
  75. package/dist/templates/root/CLAUDE.md.template +9 -9
  76. package/dist/templates/root/linting/nodejs/.husky-pre-commit.template +5 -0
  77. package/dist/templates/source/base-CLAUDE.md.template +310 -310
  78. package/dist/templates/source/flutter-CLAUDE.md.template +593 -593
  79. package/dist/templates/source/nodejs-CLAUDE.md.template +531 -531
  80. package/dist/templates/source/python-CLAUDE.md.template +510 -510
  81. package/dist/templates/source/react-CLAUDE.md.template +513 -513
  82. package/dist/templates/source/rust-CLAUDE.md.template +653 -653
  83. package/dist/templates/trinity/CLAUDE.md.template +14 -14
  84. package/dist/templates/{knowledge-base → trinity/knowledge-base}/AI-DEVELOPMENT-GUIDE.md.template +1 -1
  85. package/dist/templates/{knowledge-base → trinity/knowledge-base}/ARCHITECTURE.md.template +5 -5
  86. package/dist/templates/{knowledge-base → trinity/knowledge-base}/CODING-PRINCIPLES.md.template +1 -1
  87. package/dist/templates/{knowledge-base → trinity/knowledge-base}/DOCUMENTATION-CRITERIA.md.template +1 -1
  88. package/dist/templates/{knowledge-base → trinity/knowledge-base}/ISSUES.md.template +9 -9
  89. package/dist/templates/{knowledge-base → trinity/knowledge-base}/TESTING-PRINCIPLES.md.template +1 -1
  90. package/dist/templates/{knowledge-base → trinity/knowledge-base}/Technical-Debt.md.template +2 -4
  91. package/dist/templates/{knowledge-base → trinity/knowledge-base}/To-do.md.template +2 -2
  92. package/dist/templates/{knowledge-base → trinity/knowledge-base}/Trinity.md.template +6 -6
  93. package/dist/templates/trinity/templates/documentation/api-docs/README.md.template +218 -0
  94. package/dist/templates/trinity/templates/documentation/configuration/documentation-structure.md.template +71 -0
  95. package/dist/templates/trinity/templates/documentation/configuration/env-example-generator.md.template +387 -0
  96. package/dist/templates/trinity/templates/documentation/discovery/api-endpoint-scanner.md.template +343 -0
  97. package/dist/templates/trinity/templates/documentation/discovery/component-discovery.md.template +254 -0
  98. package/dist/templates/trinity/templates/documentation/discovery/env-variable-extraction.md.template +316 -0
  99. package/dist/templates/trinity/templates/documentation/discovery/framework-detection.md.template +205 -0
  100. package/dist/templates/trinity/templates/documentation/guides/api-development.md.template +375 -0
  101. package/dist/templates/trinity/templates/documentation/guides/contributing.md.template +488 -0
  102. package/dist/templates/trinity/templates/documentation/guides/deployment.md.template +565 -0
  103. package/dist/templates/trinity/templates/documentation/guides/getting-started.md.template +118 -0
  104. package/dist/templates/trinity/templates/documentation/mermaid-diagrams/api-endpoint-map.md.template +56 -0
  105. package/dist/templates/trinity/templates/documentation/mermaid-diagrams/component-hierarchy.md.template +60 -0
  106. package/dist/templates/trinity/templates/documentation/mermaid-diagrams/database-er.md.template +49 -0
  107. package/dist/templates/trinity/templates/documentation/mermaid-diagrams/mvc-flow.md.template +41 -0
  108. package/dist/templates/trinity/templates/documentation/processes/error-handling-protocol.md.template +166 -0
  109. package/dist/templates/trinity/templates/documentation/processes/fallback-mechanism.md.template +88 -0
  110. package/dist/templates/trinity/templates/documentation/reports/apo-docs-update-checklist.md.template +343 -0
  111. package/dist/templates/trinity/templates/documentation/reports/juno-docs-update-checklist.md.template +1337 -0
  112. package/dist/templates/trinity/templates/documentation/reports/juno-final-report.md.template +237 -0
  113. package/dist/templates/trinity/templates/documentation/reports/juno-internal-report.md.template +461 -0
  114. package/dist/templates/trinity/templates/documentation/validation/documentation-verification-rules.md.template +379 -0
  115. package/dist/templates/trinity/templates/documentation/validation/juno-quality-gates.md.template +282 -0
  116. package/dist/templates/{investigations → trinity/templates/investigations}/bug.md.template +14 -14
  117. package/dist/templates/{investigations → trinity/templates/investigations}/feature.md.template +14 -14
  118. package/dist/templates/{investigations → trinity/templates/investigations}/performance.md.template +14 -14
  119. package/dist/templates/{investigations → trinity/templates/investigations}/security.md.template +14 -14
  120. package/dist/templates/{investigations → trinity/templates/investigations}/technical.md.template +14 -14
  121. package/dist/templates/{work-orders → trinity/templates/work-orders}/ANALYSIS-TEMPLATE.md.template +10 -13
  122. package/dist/templates/{work-orders → trinity/templates/work-orders}/AUDIT-TEMPLATE.md.template +10 -26
  123. package/dist/templates/{work-orders → trinity/templates/work-orders}/IMPLEMENTATION-TEMPLATE.md.template +10 -26
  124. package/dist/templates/{work-orders → trinity/templates/work-orders}/INVESTIGATION-TEMPLATE.md.template +10 -25
  125. package/dist/templates/{work-orders → trinity/templates/work-orders}/PATTERN-TEMPLATE.md.template +10 -26
  126. package/dist/templates/{work-orders → trinity/templates/work-orders}/VERIFICATION-TEMPLATE.md.template +10 -26
  127. package/package.json +99 -94
  128. package/dist/templates/agents/leadership/aj-cc.md.template +0 -462
  129. package/dist/templates/ci/cd.yml.template +0 -175
  130. package/dist/templates/ci/github-actions.yml +0 -86
  131. package/dist/templates/root/TRINITY.md.template +0 -52
  132. package/dist/templates/shared/claude-commands/trinity-docs.md.template +0 -2577
  133. /package/dist/templates/{linting → root/linting}/flutter/.pre-commit-config.yaml.template +0 -0
  134. /package/dist/templates/{linting → root/linting}/flutter/analysis_options.yaml.template +0 -0
  135. /package/dist/templates/{linting → root/linting}/nodejs/.eslintrc-commonjs.json.template +0 -0
  136. /package/dist/templates/{linting → root/linting}/nodejs/.eslintrc-esm.json.template +0 -0
  137. /package/dist/templates/{linting → root/linting}/nodejs/.eslintrc-typescript.json.template +0 -0
  138. /package/dist/templates/{linting → root/linting}/nodejs/.pre-commit-config.yaml.template +0 -0
  139. /package/dist/templates/{linting → root/linting}/nodejs/.prettierrc.json.template +0 -0
  140. /package/dist/templates/{linting → root/linting}/python/.flake8.template +0 -0
  141. /package/dist/templates/{linting → root/linting}/python/.pre-commit-config.yaml.template +0 -0
  142. /package/dist/templates/{linting → root/linting}/python/pyproject.toml.template +0 -0
  143. /package/dist/templates/{linting → root/linting}/rust/.pre-commit-config.yaml.template +0 -0
  144. /package/dist/templates/{linting → root/linting}/rust/clippy.toml.template +0 -0
  145. /package/dist/templates/{linting → root/linting}/rust/rustfmt.toml.template +0 -0
  146. /package/dist/templates/{documentation → trinity/templates/documentation}/ROOT-README.md.template +0 -0
  147. /package/dist/templates/{documentation → trinity/templates/documentation}/SUBDIRECTORY-README.md.template +0 -0
package/CHANGELOG.md CHANGED
@@ -1,267 +1,702 @@
1
- # Changelog
2
-
3
- All notable changes to Trinity Method SDK will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ### Added
11
-
12
- ### Changed
13
-
14
- ### Deprecated
15
-
16
- ### Removed
17
-
18
- ### Fixed
19
-
20
- ### Security
21
-
22
- ## [2.0.9] - 2026-01-12
23
-
24
- ### Changed
25
-
26
- - **Trinity-docs command specification** - Added evidence-based documentation verification
27
- - Added Rule 2: Evidence-Based Documentation Only - prevents documenting uninstalled tools
28
- - Added Phase 1 Step 6: Tool & Feature Verification for all project types
29
- - Added tool verification report to Phase 5 output
30
- - Prevents aspirational/best-practice content that doesn't exist in codebase
31
- - Addresses incident where Lighthouse was documented without being installed
32
-
33
- - **Trinity-readme command specification** - Removed Trinity self-documentation conflicts
34
- - Deleted Type C Template that documented Trinity infrastructure (violated Rule 1)
35
- - Added Rule 1 Enforcement Checklist with verification commands
36
- - Added Phase 1 Step 4.5: Filter Gitignored and Trinity Directories
37
- - Added Trinity Detection Warning to explicitly skip trinity/ and .claude/
38
- - Removed trinity/ from glob patterns and project structure examples
39
- - Addresses incident where trinity/ was included in README file tree despite being gitignored
40
-
41
- - **Trinity-readme command specification** - Added LICENSE file verification for badges
42
- - Added Phase 1 Step 7: License Verification - reads actual LICENSE file
43
- - LICENSE file is now source of truth (priority over package.json)
44
- - Detects license type from file header (MIT, ISC, Apache, GPL, BSD, etc.)
45
- - Warns when package.json license field doesn't match LICENSE file
46
- - Falls back to package.json only if LICENSE file doesn't exist
47
- - Addresses incident where ISC badge was generated despite MIT LICENSE file
48
-
49
- - **Trinity-docs command specification** - Added Trinity reference sanitization enforcement
50
- - Added Rule 1 Forbidden Patterns - explicit list of patterns that must not appear in docs/
51
- - Added Phase 4.5: Trinity Reference Sanitization - scans and removes Trinity references
52
- - Added Rule 1 Compliance verification to Phase 5 report with pass/fail status
53
- - Removed Trinity report link from docs/README.md template footer
54
- - Prevents Trinity Method, agent names, commands, and infrastructure references in user docs
55
- - Addresses incident where 7 documentation files contained Trinity Method references
56
-
57
- ## [2.0.8] - 2026-01-08
58
-
59
- ### Added
60
-
61
- - **Bot directory support** - Added `bot/` as a recognized source directory
62
- - `bot/` directory now detected during deployment
63
- - Framework-specific CLAUDE.md automatically deployed to `bot/` directory
64
- - Supports nested patterns: `bot/src`, `bot/lib`, `bot/app`, `src/bot`
65
-
66
- - **Force update flag** - Added `--force` flag to `trinity update` command
67
- - Allows forcing re-update even when already at latest version
68
- - Useful for repairing corrupted deployments or applying template fixes
69
- - Usage: `trinity update --force`
70
-
71
- ## [2.0.7] - 2026-01-06
72
-
73
- ### Fixed
74
-
75
- - **CRITICAL: Agent file extension handling** - Fixed agent updates to strip `.template` extension
76
- - Agents were being copied with `.md.template` extension, creating duplicates alongside old `.md` files
77
- - Now correctly strips `.template` extension during deployment to `.claude/agents/` subdirectories
78
- - Each agent file copied individually with proper extension handling
79
-
80
- - **CRITICAL: Template directory structure** - Fixed template updates to use correct directory structure
81
- - Work order templates were being deployed to wrong directory (`trinity/templates/` instead of `trinity/templates/work-orders/`)
82
- - Documentation templates (`trinity/templates/documentation/`) were not being updated at all
83
- - Investigation templates (`trinity/templates/investigations/`) were not being updated at all
84
- - Now correctly deploys all 3 template types to their proper subdirectories with `.template` extension stripped
85
- - Total templates updated: 13 files (6 work-orders + 2 documentation + 5 investigations)
86
-
87
- ## [2.0.6] - 2026-01-06
88
-
89
- ### Fixed
90
-
91
- - **CRITICAL: Command categorization logic** - Fixed `trinity update` to correctly categorize slash commands
92
- - Execution commands (`audit`, `changelog`, `docs`, `readme`) were falling through to utility category
93
- - Investigation commands containing `investigate` were not being matched properly
94
- - Commands now deploy to correct category directories (session, planning, execution, investigation, infrastructure, infrastructure, utility)
95
- - Prevents duplicate commands in wrong directories during updates
96
-
97
- ## [2.0.5] - 2026-01-06
98
-
99
- ### Fixed
100
-
101
- - **CRITICAL: Slash command file updates** - Fixed `trinity update` command file extension handling
102
- - Update commands module was looking for `.md` files but templates use `.md.template` extension
103
- - Now correctly processes `.md.template` files and strips extension for deployed files
104
- - Slash commands now update properly (20 command files) when running `trinity update`
105
- - Matches the pattern used by knowledge-base update module
106
-
107
- ## [2.0.4] - 2026-01-06
108
-
109
- ### Fixed
110
-
111
- - **CRITICAL: Update command path resolution** - Fixed `trinity update` to use centralized SDK path resolution
112
- - Update command was using hardcoded `@trinity-method/sdk` path instead of `trinity-method-sdk`
113
- - Commands, agents, templates, and knowledge base files now update correctly with global installations
114
- - Fixed "Commands template path not found, skipping" warning
115
-
116
- ## [2.0.3] - 2026-01-06
117
-
118
- ### Fixed
119
-
120
- - **CRITICAL: Global install support** - Fixed SDK path resolution to work with global installations
121
- - Changed package name from incorrect `@trinity-method/sdk` to `trinity-method-sdk` in path resolution
122
- - Added `import.meta.url` support for resolving SDK location in global installs
123
- - `trinity update` command now works correctly when SDK is installed globally
124
- - Fixed "ENOENT: no such file or directory" error when running update command
125
-
126
- ## [2.0.2] - 2026-01-02
127
-
128
- ### Added
129
-
130
- - **DOCUMENTATION RULES** section to all APO documentation commands (`/trinity-docs`, `/trinity-readme`, `/trinity-changelog`)
131
- - Rule 1: No Self-Serving Trinity Documentation - Prevents APO from including Trinity Method information in user project documentation
132
- - Provides clear ✅/❌ examples and rationale for focusing exclusively on user's codebase
133
- - Explicit **Write tool execution commands** throughout `/trinity-docs` Phase 2
134
- - Added 🚨 CRITICAL EXECUTION REQUIREMENT section at Phase 2 start
135
- - Added **EXECUTION REQUIRED** code blocks for each seeding step
136
- - Added **Phase 2 Execution Summary** with mandatory file creation checklist
137
- - Ensures APO creates actual documentation files instead of just showing templates
138
-
139
- ### Changed
140
-
141
- - **`/trinity-docs` command:** Enhanced Phase 2 with explicit Write tool requirements
142
- - Step 2 (Guides): Added execution requirements for getting-started.md and framework-specific guides
143
- - Step 3 (API): Added execution requirements for api/README.md
144
- - Step 4 (Architecture): Added execution requirements for architecture/overview.md
145
- - Step 5 (Reference): Added execution requirements for reference/README.md
146
- - Phase now requires minimum 4 files to be created: getting-started.md, api/README.md, architecture/overview.md, reference/README.md
147
-
148
- ### Fixed
149
-
150
- - **APO file creation issue:** `/trinity-docs` now explicitly commands APO to use Write tool, preventing scenario where directory structure is created but documentation files are not written
151
-
152
- ## [2.0.1] - 2025-12-29
153
-
154
- ### Added
155
-
156
- - Installation instructions in README.md with npx and global install options
157
- - Automatic npm deployment on every push to main branch via GitHub Actions CD workflow
158
-
159
- ### Changed
160
-
161
- - **CD Workflow:** Modified to deploy to npm on all main branch pushes (not just version tags)
162
- - **CD Workflow:** GitHub releases now only created for version tags, not regular commits
163
- - Updated all package references from `@trinity-method/cli` to `trinity-method-sdk`
164
-
165
- ### Fixed
166
-
167
- - Removed redundant `node_modules/` from Trinity's .gitignore additions
168
-
169
- ## [2.0.0] - 2025-12-21
170
-
171
- ### Added
172
-
173
- - **Agent System Expansion:** Grew from 7 to 19 specialized agents
174
- - **Planning Layer (4 agents):** MON (Requirements Analyst), ROR (Design Architect), TRA (Work Planner), EUS (Task Decomposer)
175
- - **Execution Layer (3 agents):** KIL (Task Executor), BAS (Quality Gate), DRA (Code Reviewer)
176
- - **Support Layer (4 agents):** APO (Documentation Specialist), BON (Dependency Manager), CAP (Configuration Specialist), URO (Refactoring Specialist)
177
- - **Leadership & Audit (2 agents):** ALY (Chief Technology Officer), JUNO (Quality Auditor)
178
- - **Infrastructure (5 agents):** TAN, ZEN, INO, EIN, AJ MAESTRO (legacy)
179
- - Increased deployment from 49 to 64 production-ready components
180
- - Expanded slash commands from 8 to 20 commands across 6 categories
181
- - Session Management: `/trinity-start`, `/trinity-continue`, `/trinity-end`
182
- - Planning: `/trinity-requirements`, `/trinity-design`, `/trinity-decompose`, `/trinity-plan`
183
- - Execution: `/trinity-orchestrate`, `/trinity-audit`, `/trinity-readme`, `/trinity-docs`, `/trinity-changelog`
184
- - Investigation: `/trinity-create-investigation`, `/trinity-plan-investigation`, `/trinity-investigate-templates`
185
- - Infrastructure: `/trinity-init`
186
- - Utility: `/trinity-verify`, `/trinity-agents`, `/trinity-workorder`
187
- - Enhanced `/trinity-readme` command template to v2.0.0 with comprehensive validation phases
188
- - Phase 2h: Command/Script/CLI Validation - Verifies all documented commands exist in codebase
189
- - Phase 2i: Code Example Validation - Checks code examples match current API signatures
190
- - Phase 2j: API/Function Reference Validation - Verifies documented functions/classes exist
191
- - Phase 2k: Dependency Claims Validation - Cross-references README with package manifests
192
- - Phase 2l: Stale Content Detection - Finds TODO markers, outdated dates, placeholder text
193
-
194
- ### Changed
195
-
196
- - **BREAKING:** Updated Trinity Method to v2.0.0 architecture
197
- - **Agent System:** Complete agent architecture redesign with specialized layers
198
- - **Documentation System:** Enhanced APO capabilities with comprehensive audit phases
199
- - Refactored 7 functions to reduce cyclomatic complexity (all ≤15)
200
- - Improved code maintainability and readability across codebase
201
- - Enhanced test coverage and reliability (405 tests, 100% passing)
202
-
203
- ### Deprecated
204
-
205
- - AJ MAESTRO orchestrator (v1.0) replaced by ALY in v2.0
206
-
207
- ### Fixed
208
-
209
- - Template path resolution in integration tests
210
- - Linting deployment tests now correctly locate template files
211
- - **Documentation Accuracy:** Fixed 6 critical inaccuracies in README.md
212
- - Removed 24+ non-existent CLI commands (`npx trinity investigate`, `crisis`, `analytics`, etc.)
213
- - Fixed 13 broken documentation links (docs/methodology/, docs/adr/, docs/workflows/)
214
- - Corrected agent count inconsistencies throughout documentation (unified to 19 agents)
215
- - Updated deployment examples to reflect actual CLI (`npx @trinity-method/cli deploy/update`)
216
- - Fixed broken ADR links in src/README.md (replaced with design principles summary)
217
- - Fixed broken ADR links in docs/README.md (removed non-existent file references)
218
-
219
- ---
220
-
221
- ## [1.0.1] - 2025-10-02 (Legacy - @trinity-method/cli)
222
-
223
- ### Fixed
224
-
225
- - **Critical:** Missing template files in npm package (only 9 of 36 were included)
226
- - Fixed file paths to use bundled templates instead of workspace structure
227
- - All `.md.template` files now properly included in published package
228
- - Updated `deploy.js` and `update.js` to reference correct template locations
229
- - Bundled agents and hooks directly into CLI package for standalone operation
230
-
231
- ### Changed
232
-
233
- - Reorganized package structure to be self-contained when published to npm
234
- - Templates, agents, and hooks now bundled in `packages/cli/templates/`
235
-
236
- **Note:** This version was published as `@trinity-method/cli`. Starting with v2.0.0, the package was renamed to `trinity-method-sdk`.
237
-
238
- ---
239
-
240
- ## [1.0.0] - 2025-10-01 (Legacy - @trinity-method/cli)
241
-
242
- ### Added
243
-
244
- - Initial release of Trinity Method SDK for Claude Code
245
- - 7 specialized Trinity agents (Aly, AJ, TAN, ZEN, INO, Ein, JUNO)
246
- - Claude Code-exclusive deployment
247
- - Interactive deployment with linting and CI/CD configuration
248
- - Linting configuration (ESLint, Prettier, etc.)
249
- - CI/CD automation (GitHub Actions, GitLab CI)
250
- - Matrix testing support
251
- - Coverage integration (Codecov, Coveralls)
252
- - Employee Directory with agent documentation
253
- - Trinity structure (knowledge-base, templates)
254
- - CLAUDE.md context file deployment
255
- - README injection for Trinity Method section
256
- - 8 slash commands (/trinity-init, /trinity-verify, /trinity-docs, /trinity-start, /trinity-continue, /trinity-end, /trinity-workorder, /trinity-agents)
257
- - Session management with archival system
258
- - Comprehensive CLI documentation
259
-
260
- ### Strategic Decision
261
-
262
- - Focused exclusively on Claude Code for exceptional user experience
263
- - Community contributions welcome for other coding agents
264
-
265
- **Note:** This version was published as `@trinity-method/cli`. Starting with v2.0.0, the package was renamed to `trinity-method-sdk`.
266
-
267
- [1.0.0]: https://github.com/lukadfagundes/trinity-method-sdk/releases/tag/v1.0.0
1
+ # Changelog
2
+
3
+ All notable changes to Trinity Method SDK will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [2.2.0] - 2026-02-24
11
+
12
+ ### Added
13
+
14
+ - **Markdown linting in CI pipeline and pre-commit hook** - Added blocking `markdownlint-cli2`
15
+ validation for `*.md`, `docs/**/*.md`, and `src/**/*.md` in both CI and pre-commit
16
+ - CI: Added lint step to `docs` job in `.github/workflows/ci.yml`
17
+ - Pre-commit: Added Stage 4 to `.husky/pre-commit` running markdownlint on all tracked
18
+ markdown directories
19
+ - Enforces markdown syntax standards across all 78 markdown files using
20
+ `.markdownlint.json` config
21
+ - **New `/trinity-breakdown` slash command** - Guided, user-driven implementations where CC
22
+ acts as an instructor walking users through changes step-by-step instead of executing them
23
+ directly (Issue #11)
24
+ - **GitHub Releases workflow** - Automated draft release creation on version tags (`v*.*.*`)
25
+ via `.github/workflows/release.yml` (Issue #5)
26
+ - 5-job pipeline: version extraction, CHANGELOG release notes extraction,
27
+ tag-vs-package.json version validation, full CI quality gates, and draft GitHub release
28
+ - Uses `softprops/action-gh-release@v2` with `draft: true` releases require manual
29
+ publishing
30
+ - CHANGELOG extraction uses Node.js script (not sed) matching `## [X.Y.Z]` Keep a
31
+ Changelog format
32
+ - Fails fast on version mismatch or missing/empty CHANGELOG section
33
+ - Coverage thresholds mirror CI pipeline: lines >= 75%, branches >= 65%,
34
+ functions >= 80%, statements >= 75%
35
+ - No `npm publish` automation publishing remains manual via `npm publish`
36
+
37
+ ### Changed
38
+
39
+ - **Enabled all TypeScript strict mode flags** - Turned on `strictNullChecks`,
40
+ `strictPropertyInitialization`, `noUnusedLocals`, and `noUnusedParameters` in
41
+ tsconfig.json (Issue #6)
42
+ - All four flags were previously disabled, weakening compile-time type safety
43
+ - Codebase required zero changes for `strictNullChecks` and
44
+ `strictPropertyInitialization` (already null-safe)
45
+ - Prefixed 6 unused parameters with `_` to satisfy `noUnusedParameters`
46
+ (5 in `deploy-linting.ts`, 1 in `summary.ts`)
47
+ - All 417 tests pass, 0 type errors, lint clean
48
+ - **Added metrics module test coverage** - Created comprehensive test suites for
49
+ `dependency-parser.ts` and `framework-detector.ts` (Issue #6)
50
+ - `dependency-parser.ts` coverage: 9.37% 100% (23 tests covering Node.js, Python,
51
+ Rust, Flutter, Go, and error paths)
52
+ - `framework-detector.ts` coverage: 36.36% 95.23% (24 tests covering all version
53
+ detectors and package manager detection)
54
+ - Overall project coverage improved from 83% 89% (464 tests total)
55
+ - **Fixed all 32 devDependency vulnerabilities** - Resolved minimatch ReDoS, ajv ReDoS,
56
+ and markdown-it ReDoS via `npm audit fix` and `overrides` in package.json (Issue #6)
57
+ - `npm audit fix` resolved ajv (<6.14.0), markdown-it (13.0.0-14.1.0), and
58
+ @isaacs/brace-expansion (5.0.0) — 9 vulnerabilities
59
+ - Added `overrides` for `minimatch@^10.2.1` to force resolution of 23 remaining
60
+ transitive dependency vulnerabilities through eslint, jest, and typedoc
61
+ - `npm audit` now reports 0 vulnerabilities (was 32: 30 high, 2 moderate)
62
+ - **Restructured `trinity/` into `.claude/trinity/`** - Consolidated deployment footprint
63
+ from two top-level directories to one (Issue #3)
64
+ - `trinity deploy` now creates `.claude/trinity/` instead of a separate `trinity/`
65
+ directory
66
+ - `trinity update` manages `.claude/trinity/` with consolidated backup (single `.claude/`
67
+ backup covers everything)
68
+ - All 50+ template files updated with new deployment target paths
69
+ - All relative paths recalculated for new directory depth
70
+ - 417 tests pass with restructured paths
71
+ - **Updated `.gitignore` entries** - Trinity deployment now only ignores
72
+ `.claude/trinity/archive/` and `.claude/trinity/templates/` instead of all `.claude/`,
73
+ `*CLAUDE.md`, `TRINITY.md`, and `trinity/` allowing agents, commands, and context files
74
+ to be tracked in version control
75
+ - **Removed `.claude/trinity/patterns/` directory** - No longer deployed as an empty
76
+ placeholder; directory structure reduced from 17 to 16 directories
77
+
78
+ ### Fixed
79
+
80
+ - **Resolved ~600 markdownlint violations across 78 markdown files** - Fixed all markdown
81
+ syntax errors in `docs/`, root (`*.md`), and `src/` directories (Issue #6)
82
+ - `docs/` (72 files): ~580 violations fixed (MD013 line length, MD022 blanks around
83
+ headings, MD031/MD032 blanks around fences/lists, MD040 code fence languages, MD009
84
+ trailing spaces, MD036 emphasis as heading, MD026 trailing punctuation)
85
+ - `README.md`: 16 violations fixed (MD013, MD022, MD026, MD036, MD040)
86
+ - `CONTRIBUTING.md`: 6 violations fixed (MD013, MD009, MD031, MD032, MD040)
87
+ - `CLAUDE.md`: 4 violations fixed (MD022 blanks around headings)
88
+ - `src/CLAUDE.md`: 42 violations fixed (MD022, MD031, MD032, MD040, MD013)
89
+ - `src/README.md`: 3 violations fixed (MD013, MD040)
90
+ - Updated `.markdownlint.json` config: added `siblings_only: true` to MD024 for Keep a
91
+ Changelog duplicate heading compatibility
92
+
93
+ - **CRITICAL: Pre-commit hooks non-functional for Node.js** - Switched from Python's
94
+ pre-commit framework to husky + lint-staged for Node.js/React projects (Issue #4)
95
+ - Node.js/React projects now deploy `.husky/pre-commit` with `npx lint-staged` instead
96
+ of `.pre-commit-config.yaml`
97
+ - Added `husky@^9.1.7` and `lint-staged@^16.2.0` as devDependencies with
98
+ `prepare: 'husky'` script
99
+ - Hooks activate automatically on `npm install` — no manual setup required
100
+ - `lint-staged` configuration injected into `package.json` (eslint + prettier for TS/JS,
101
+ prettier for JSON/MD/YAML)
102
+ - Python/Flutter/Rust projects continue to use `.pre-commit-config.yaml` (unchanged)
103
+ - Existing pre-commit configurations detected and preserved (`.husky/`,
104
+ `.pre-commit-config.yaml`, or husky/lint-staged in package.json)
105
+
106
+ - **CRITICAL: CI/CD workflow templates never deployed** - Fixed `enableCICD` from
107
+ interactive config never bridging to `ciDeploy` deployment flag
108
+ - Added bridge in deploy orchestrator:
109
+ `if (config.enableCICD) { options.ciDeploy = true; }`
110
+ - CI templates now correctly deploy when user selects CI/CD during `trinity deploy`
111
+
112
+ - **CI template variables not processed** - Added `processTemplate()` call to CI workflow
113
+ deployment
114
+ - `{{PROJECT_NAME}}`, `{{FRAMEWORK}}`, and other template variables now resolve in
115
+ deployed `ci.yml`
116
+ - Passes variables from deploy orchestrator through `deployCICD()` to
117
+ `deployCITemplates()`
118
+
119
+ - **No --force protection for GitHub Actions templates** - Added existence check matching
120
+ GitLab's pattern
121
+ - `.github/workflows/ci.yml` now skipped if it already exists (unless `--force` is used)
122
+ - Both GitHub and GitLab platforms now have consistent `--force` flag protection
123
+
124
+ - **Configuration display showed wrong filename** - Changed `trinity-ci.yml` to `ci.yml`
125
+ in interactive prompt output
126
+ - Both detected-platform and unknown-platform display now show correct filename
127
+
128
+ - **CI workflow template header** - Changed `CI/CD Pipeline` to `CI Pipeline` in
129
+ `ci.yml.template`
130
+
131
+ ### Removed
132
+
133
+ - **`TRINITY.md` root file** - No longer deployed; Trinity context is now at
134
+ `.claude/trinity/CLAUDE.md`
135
+ - Deleted `src/templates/root/TRINITY.md.template`
136
+ - Removed `deployTrinityMarkdown()` function from deploy pipeline
137
+ - **Dead template files** - Deleted `cd.yml.template` (used undefined `{{DOMAIN}}`
138
+ variable) and `github-actions.yml` (orphaned, never referenced)
139
+ - **CD workflow references** - Removed all Continuous Deployment workflow references from
140
+ source code, templates (EIN, TAN, init, verify), CI workflow, tests, and documentation
141
+
142
+ ## [2.1.0] - 2026-01-21
143
+
144
+ ### Added
145
+
146
+ - **NEW: Trinity-docs-update command** - Comprehensive documentation update system for
147
+ maintaining existing docs
148
+ - **Command:** `/maintenance:trinity-docs-update` - Updates existing documentation to
149
+ reflect codebase changes
150
+ - **Architecture:** JUNO audit 3 parallel APO instances JUNO verification loop
151
+ Final quality audit
152
+ - **Autonomous Execution:** Runs from start to finish without user intervention unless
153
+ errors occur
154
+ - **Version:** 2.0.9
155
+ - **Last Updated:** 2026-01-19
156
+
157
+ - **Trinity-docs-update - JUNO audit system** - Phase 1 comprehensive codebase analysis
158
+ with mandatory verification protocols
159
+ - **Database Verification Protocol (Mandatory):**
160
+ - Step 1: Detect database presence via bash detection script
161
+ - Step 2: **MANDATORY** production database connection attempt if database detected
162
+ - Documents connection info search (.env, docker-compose.yml, config files)
163
+ - Documents connection attempt method and result (success/failure with reason)
164
+ - Falls back to schema files ONLY after documented connection failure
165
+ - Prevents documentation based on outdated schema files
166
+ - **Environment Configuration Verification Protocol (All Projects):**
167
+ - Priority 1: Check actual environment files (.env, .env.local) FIRST
168
+ - Priority 2: Check template files (.env.example)
169
+ - Priority 3: Check code defaults (|| fallback values)
170
+ - Documents all findings and discrepancies
171
+ - Source of truth order: Actual config > Template > Code defaults
172
+ - **Prevents false positives:** Won't flag correct docs as wrong by verifying against
173
+ actual config
174
+ - **Business Logic Discovery:** Scans controllers, services, models, utilities at
175
+ function-level granularity
176
+ - **Output:** `trinity/reports/DOCS-UPDATE-AUDIT-{{DATE}}.md` with APO work assignments
177
+
178
+ - **Trinity-docs-update - Configuration false positive prevention** - Resolution rules
179
+ prevent incorrect audit findings
180
+ - **Resolution Rule 1:** If .env sets value X, then X is correct (docs showing X are
181
+ correct)
182
+ - **Resolution Rule 2:** Code defaults contradicting .env should be fixed (not docs)
183
+ - **Resolution Rule 3:** Documentation showing actual config value is NEVER wrong
184
+ - **Example:** Port 3001 in docs + .env, but code shows `|| 4000` → docs are correct,
185
+ code default needs fixing
186
+ - **Impact:** Eliminates false positives where JUNO would flag correct documentation as
187
+ wrong
188
+
189
+ - **Trinity-docs-update - Scope boundary with consistency exceptions** - Defines strict
190
+ boundaries with limited exceptions
191
+ - **ALLOWED:** Read any file, write/edit files in docs/ directory only
192
+ - **FORBIDDEN:** Modify source code, database schemas, config files, build files, tests
193
+ - **EXCEPTIONS (APO-1 only):**
194
+ - Fix hardcoded default values contradicting documented standards
195
+ (e.g., `|| 4000` → `|| 3001`)
196
+ - Update .env.example template values to match actual standards
197
+ - ONLY simple constant/default changes (no logic modifications)
198
+ - MUST verify against actual .env first
199
+ - **Scenario C Example:** Docs show port 3001, .env has 3001, code default is 4000 →
200
+ Fix code default to 3001
201
+
202
+ - **Trinity-docs-update - APO parallel execution system** - Phase 2 launches three
203
+ documentation specialists concurrently
204
+ - **APO-1:** Base documentation updates (architecture, setup, guides)
205
+ - **NEW:** Configuration consistency fixes (simple defaults that contradict standards)
206
+ - Update .env.example to match actual standards
207
+ - Align configuration values across codebase and docs
208
+ - Restriction: Only simple constants (no logic changes)
209
+ - **APO-2:** Update existing business logic documentation OR new docs (first half)
210
+ - **APO-3:** New business logic documentation (second half)
211
+ - Each APO creates personal checklist from JUNO's audit report
212
+ - All APOs verify changes against actual codebase (not assumptions)
213
+ - Output: Updated/new documentation files in docs/
214
+
215
+ - **Trinity-docs-update - APO verification requirements** - Mandatory codebase
216
+ verification for all documentation changes
217
+ - **For EVERY change, APO must:**
218
+ 1. Identify what needs to change (from JUNO's assignment)
219
+ 2. Verify correct value in codebase (read .env, source files, config)
220
+ 3. Document verification in task (which files read, what found)
221
+ 4. Use Read tool BEFORE making changes
222
+ 5. Use Edit tool with verified information only
223
+ 6. DO NOT make assumptions or guesses
224
+ - **Verification examples:**
225
+ - API ports Read .env, server.js, app.js
226
+ - Table names Read init.sql or check production database
227
+ - Endpoint URLs Read route files
228
+ - Method signatures Read actual source file
229
+ - Configuration values Read config files
230
+ - **Documentation format:**
231
+
232
+ ```markdown
233
+ - [x] docs/api/README.md
234
+ - Verification: Read backend/.env - confirmed port is 3001
235
+ - Changes made: Updated 49 instances of port number to 3001
236
+ ```
237
+
238
+ - **Trinity-docs-update - JUNO verification loop** - Phase 3 ensures 100% completion
239
+ before final audit
240
+ - **Step 3.1:** JUNO checks all three APO checklists for completion status
241
+ - Counts total tasks vs completed tasks per APO
242
+ - Calculates completion percentage
243
+ - Determines next action (PROCEED or RESTART)
244
+ - **Step 3.1A:** Re-launch incomplete APOs automatically
245
+ - Identifies incomplete APOs from JUNO's report
246
+ - Restarts only incomplete APOs with resume instructions
247
+ - Loops until all APOs reach 100%
248
+ - **Step 3.2:** JUNO final quality audit (only when all APOs 100% complete)
249
+ - Verifies files created/updated
250
+ - Checks content accuracy against codebase
251
+ - Validates no hallucinated components
252
+ - Generates verification report with pass/fail status
253
+ - **Output:** `trinity/reports/DOCS-UPDATE-VERIFICATION-{{DATE}}.md`
254
+
255
+ - **Trinity-docs-update - Three template files** - Command template and two checklist
256
+ templates deployed via CLI
257
+ - **Command Template:**
258
+ `src/templates/.claude/commands/maintenance/trinity-docs-update.md.template`
259
+ - Deployed to: `.claude/commands/maintenance/trinity-docs-update.md`
260
+ - Updated by: `trinity update` command via `updateCommands()` function
261
+ - **JUNO Checklist:**
262
+ `src/templates/trinity/templates/documentation/reports/juno-docs-update-checklist.md.template`
263
+ - Deployed to:
264
+ `trinity/templates/documentation/reports/juno-docs-update-checklist.md`
265
+ - Updated by: `trinity update` command via `updateTemplates()` function (recursively
266
+ copies all documentation templates)
267
+ - **APO Checklist:**
268
+ `src/templates/trinity/templates/documentation/reports/apo-docs-update-checklist.md.template`
269
+ - Deployed to:
270
+ `trinity/templates/documentation/reports/apo-docs-update-checklist.md`
271
+ - Updated by: `trinity update` command via `updateTemplates()` function (recursively
272
+ copies all documentation templates)
273
+ - All templates automatically deployed during `trinity deploy` and updated during
274
+ `trinity update`
275
+
276
+ - **Trinity-docs command - Complete architectural overhaul** - Transformed from
277
+ single-agent to multi-agent orchestration
278
+ - **New Architecture:** JUNO audit → 3 parallel APO instances → Verification
279
+ - **JUNO Agent Integration:** Read-only codebase audit creates documentation checklist
280
+ before generation
281
+ - **Parallel APO Execution:** APO-1 (diagrams), APO-2 (guides/API), APO-3 (config) run
282
+ concurrently
283
+ - **Performance:** 3x faster execution via parallel agent orchestration
284
+ - **Context Efficiency:** Each agent receives focused instructions (<100 lines) vs
285
+ single 2,577-line spec
286
+
287
+ - **Trinity-docs command - External template system** - Created 28 reusable documentation
288
+ templates
289
+ - **Template Directory:** `trinity/templates/documentation/` with 8 categories
290
+ - **Mermaid Diagrams (4 templates):** MVC flow, database ER, API endpoint map,
291
+ component hierarchy
292
+ - **Guides (4 templates):** Getting started, API development, deployment, contributing
293
+ - **API Documentation (1 template):** API README with endpoint structure
294
+ - **Configuration (2 templates):** Documentation structure, env-example generator
295
+ - **Discovery (4 templates):** Framework detection, component discovery, API endpoint
296
+ scanner, env variable extraction
297
+ - **Validation (3 templates):** APO self-validation checklists for all 3 agents
298
+ - **Processes (6 templates):** APO workflows (common, diagram-specific,
299
+ guide-specific, config-specific), error handling, fallback mechanisms
300
+ - **Reports (2 templates):** JUNO internal report, ROOT-README for template organization
301
+ - **Template Variables:** All templates use `{{UPPERCASE_UNDERSCORE}}` syntax for
302
+ dynamic content replacement
303
+
304
+ - **Trinity-docs command - Template validation phase** - Optional Phase 0.2 validates
305
+ template syntax
306
+ - Validates `{{VARIABLE}}` syntax (must be UPPERCASE_UNDERSCORE)
307
+ - Detects nested variables (not supported)
308
+ - Checks balanced braces
309
+ - Non-blocking warnings for template issues
310
+
311
+ - **Trinity-docs command - Retry mechanism** - Phase 0.25 handles transient failures
312
+ - Retries operations up to 3 times with 500ms delay
313
+ - Handles filesystem delays and race conditions
314
+ - Graceful degradation for non-critical operations
315
+
316
+ - **Trinity-docs command - JUNO documentation audit** - Phase 1 performs comprehensive
317
+ codebase analysis
318
+ - **Framework Detection:** Analyzes package.json for Express, NestJS, React, Next.js,
319
+ Django, Flask, FastAPI
320
+ - **Component Discovery:** Scans for React/Vue/Angular/Svelte components with
321
+ zero-tolerance for fake components
322
+ - **API Endpoint Scanning:** Detects Express/Fastify/NestJS/Koa routes with enhanced
323
+ patterns
324
+ - **Database Detection:** PostgreSQL, MySQL, MongoDB, SQLite, Redis via dependency
325
+ analysis
326
+ - **Environment Variables:** Extracts from .env and process.env usage patterns
327
+ - **Checklist Report:** Generates
328
+ `trinity/templates/documentation/reports/juno-internal-report.md` with all discovered
329
+ metadata
330
+
331
+ - **Trinity-docs command - Fallback mechanism** - Handles missing JUNO data gracefully
332
+ - Uses discovery templates when JUNO variables missing
333
+ - Framework detection fallback via package.json analysis
334
+ - Component discovery fallback for frontend frameworks
335
+ - API endpoint scanner fallback for backend frameworks
336
+ - Environment variable extraction fallback
337
+ - Default template paths when discovery fails
338
+
339
+ - **Trinity-docs command - APO self-validation** - Each APO validates its own work before
340
+ completion
341
+ - APO-1 validates: 4 diagram files created, correct paths, no placeholders, proper
342
+ Mermaid syntax
343
+ - APO-2 validates: Guide completeness, API documentation accuracy, no fake examples
344
+ - APO-3 validates: Config files exist, no hardcoded secrets, proper .env.example format
345
+ - Security checks for APO-3: No API keys, passwords, tokens, or sensitive data in
346
+ generated files
347
+
348
+ - **Trinity-docs command - Enhanced verification phase** - Phase 4 performs comprehensive
349
+ quality checks
350
+ - Verifies all JUNO checklist items completed
351
+ - Validates file existence and content quality
352
+ - Checks for placeholders and fake data
353
+ - Ensures proper Mermaid syntax in diagrams
354
+ - Validates security (no secrets in config files)
355
+ - Generates final completion report with pass/fail status
356
+
357
+ ### Changed
358
+
359
+ - **Trinity-docs command - File relocation** - Moved from
360
+ `src/templates/shared/claude-commands/` to
361
+ `src/templates/.claude/commands/execution/`
362
+ - Aligns with new command categorization structure
363
+ - Distinguishes execution commands from utility/session/planning commands
364
+
365
+ - **Trinity-docs command - Diagram output path** - Changed from
366
+ `docs/architecture/diagrams/` to `docs/architecture/`
367
+ - Simplified directory structure
368
+ - All architecture files (diagrams, overview, ADRs) now in single directory
369
+ - Updated all references throughout command specification (lines 1079, 1205-1208)
370
+
371
+ - **Trinity-docs command - API endpoint scanner enhancement** - Added 3 missing route
372
+ detection patterns
373
+ - Added `router.route('...').get|post|put|patch|delete()` pattern
374
+ - Added `app.route('...').get|post|put|patch|delete()` pattern
375
+ - Added `router.all('...')` wildcard route pattern
376
+ - Fixes endpoint count variance (33 vs 34 detected endpoints)
377
+
378
+ - **Trinity-docs command - Configuration directory consolidation** - Merged `config/` into
379
+ `configuration/`
380
+ - Moved `env-example-generator.md.template` from `config/` to `configuration/`
381
+ - Removed duplicate directory structure
382
+ - Now single `configuration/` directory with 2 templates
383
+
384
+ - **Trinity-docs command - Version update** - Updated to v2.0.9
385
+ - Reflects architectural overhaul and template externalization
386
+ - Command now references 28 external templates vs inline logic
387
+
388
+ ### Deprecated
389
+
390
+ ### Removed
391
+
392
+ - **Trinity-docs command - Inline documentation logic** - Removed 808+ lines of inline
393
+ instructions (WO-004)
394
+ - Phase 1 codebase analysis logic → `trinity/templates/documentation/discovery/`
395
+ templates
396
+ - Phase 2 content seeding → `trinity/templates/documentation/guides/` templates
397
+ - Diagram generation → `trinity/templates/documentation/mermaid-diagrams/` templates
398
+ - Validation logic → `trinity/templates/documentation/validation/` templates
399
+
400
+ - **Trinity-docs command - Single-agent architecture** - Replaced with multi-agent
401
+ orchestration
402
+ - Old: Single APO reads 2,577-line spec and performs all work
403
+ - New: JUNO audit + 3 parallel APO instances with focused instructions
404
+ - Reduces context fatigue and improves reliability
405
+
406
+ ### Fixed
407
+
408
+ ### Security
409
+
410
+ ## [2.0.9] - 2026-01-12
411
+
412
+ ### Changed
413
+
414
+ - **Trinity-docs command specification** - Added evidence-based documentation verification
415
+ - Added Rule 2: Evidence-Based Documentation Only - prevents documenting uninstalled
416
+ tools
417
+ - Added Phase 1 Step 6: Tool & Feature Verification for all project types
418
+ - Added tool verification report to Phase 5 output
419
+ - Prevents aspirational/best-practice content that doesn't exist in codebase
420
+ - Addresses incident where Lighthouse was documented without being installed
421
+
422
+ - **Trinity-readme command specification** - Removed Trinity self-documentation conflicts
423
+ - Deleted Type C Template that documented Trinity infrastructure (violated Rule 1)
424
+ - Added Rule 1 Enforcement Checklist with verification commands
425
+ - Added Phase 1 Step 4.5: Filter Gitignored and Trinity Directories
426
+ - Added Trinity Detection Warning to explicitly skip trinity/ and .claude/
427
+ - Removed trinity/ from glob patterns and project structure examples
428
+ - Addresses incident where trinity/ was included in README file tree despite being
429
+ gitignored
430
+
431
+ - **Trinity-readme command specification** - Added LICENSE file verification for badges
432
+ - Added Phase 1 Step 7: License Verification - reads actual LICENSE file
433
+ - LICENSE file is now source of truth (priority over package.json)
434
+ - Detects license type from file header (MIT, ISC, Apache, GPL, BSD, etc.)
435
+ - Warns when package.json license field doesn't match LICENSE file
436
+ - Falls back to package.json only if LICENSE file doesn't exist
437
+ - Addresses incident where ISC badge was generated despite MIT LICENSE file
438
+
439
+ - **Trinity-docs command specification** - Added Trinity reference sanitization enforcement
440
+ - Added Rule 1 Forbidden Patterns - explicit list of patterns that must not appear in
441
+ docs/
442
+ - Added Phase 4.5: Trinity Reference Sanitization - scans and removes Trinity references
443
+ - Added Rule 1 Compliance verification to Phase 5 report with pass/fail status
444
+ - Removed Trinity report link from docs/README.md template footer
445
+ - Prevents Trinity Method, agent names, commands, and infrastructure references in user
446
+ docs
447
+ - Addresses incident where 7 documentation files contained Trinity Method references
448
+
449
+ ## [2.0.8] - 2026-01-08
450
+
451
+ ### Added
452
+
453
+ - **Bot directory support** - Added `bot/` as a recognized source directory
454
+ - `bot/` directory now detected during deployment
455
+ - Framework-specific CLAUDE.md automatically deployed to `bot/` directory
456
+ - Supports nested patterns: `bot/src`, `bot/lib`, `bot/app`, `src/bot`
457
+
458
+ - **Force update flag** - Added `--force` flag to `trinity update` command
459
+ - Allows forcing re-update even when already at latest version
460
+ - Useful for repairing corrupted deployments or applying template fixes
461
+ - Usage: `trinity update --force`
462
+
463
+ ## [2.0.7] - 2026-01-06
464
+
465
+ ### Fixed
466
+
467
+ - **CRITICAL: Agent file extension handling** - Fixed agent updates to strip `.template`
468
+ extension
469
+ - Agents were being copied with `.md.template` extension, creating duplicates alongside
470
+ old `.md` files
471
+ - Now correctly strips `.template` extension during deployment to `.claude/agents/`
472
+ subdirectories
473
+ - Each agent file copied individually with proper extension handling
474
+
475
+ - **CRITICAL: Template directory structure** - Fixed template updates to use correct
476
+ directory structure
477
+ - Work order templates were being deployed to wrong directory (`trinity/templates/`
478
+ instead of `trinity/templates/work-orders/`)
479
+ - Documentation templates (`trinity/templates/documentation/`) were not being updated at
480
+ all
481
+ - Investigation templates (`trinity/templates/investigations/`) were not being updated
482
+ at all
483
+ - Now correctly deploys all 3 template types to their proper subdirectories with
484
+ `.template` extension stripped
485
+ - Total templates updated: 13 files (6 work-orders + 2 documentation + 5 investigations)
486
+
487
+ ## [2.0.6] - 2026-01-06
488
+
489
+ ### Fixed
490
+
491
+ - **CRITICAL: Command categorization logic** - Fixed `trinity update` to correctly
492
+ categorize slash commands
493
+ - Execution commands (`audit`, `changelog`, `docs`, `readme`) were falling through to
494
+ utility category
495
+ - Investigation commands containing `investigate` were not being matched properly
496
+ - Commands now deploy to correct category directories (session, planning, execution,
497
+ investigation, infrastructure, infrastructure, utility)
498
+ - Prevents duplicate commands in wrong directories during updates
499
+
500
+ ## [2.0.5] - 2026-01-06
501
+
502
+ ### Fixed
503
+
504
+ - **CRITICAL: Slash command file updates** - Fixed `trinity update` command file extension
505
+ handling
506
+ - Update commands module was looking for `.md` files but templates use `.md.template`
507
+ extension
508
+ - Now correctly processes `.md.template` files and strips extension for deployed files
509
+ - Slash commands now update properly (20 command files) when running `trinity update`
510
+ - Matches the pattern used by knowledge-base update module
511
+
512
+ ## [2.0.4] - 2026-01-06
513
+
514
+ ### Fixed
515
+
516
+ - **CRITICAL: Update command path resolution** - Fixed `trinity update` to use centralized
517
+ SDK path resolution
518
+ - Update command was using hardcoded `@trinity-method/sdk` path instead of
519
+ `trinity-method-sdk`
520
+ - Commands, agents, templates, and knowledge base files now update correctly with global
521
+ installations
522
+ - Fixed "Commands template path not found, skipping" warning
523
+
524
+ ## [2.0.3] - 2026-01-06
525
+
526
+ ### Fixed
527
+
528
+ - **CRITICAL: Global install support** - Fixed SDK path resolution to work with global
529
+ installations
530
+ - Changed package name from incorrect `@trinity-method/sdk` to `trinity-method-sdk` in
531
+ path resolution
532
+ - Added `import.meta.url` support for resolving SDK location in global installs
533
+ - `trinity update` command now works correctly when SDK is installed globally
534
+ - Fixed "ENOENT: no such file or directory" error when running update command
535
+
536
+ ## [2.0.2] - 2026-01-02
537
+
538
+ ### Added
539
+
540
+ - **DOCUMENTATION RULES** section to all APO documentation commands (`/trinity-docs`,
541
+ `/trinity-readme`, `/trinity-changelog`)
542
+ - Rule 1: No Self-Serving Trinity Documentation - Prevents APO from including Trinity
543
+ Method information in user project documentation
544
+ - Provides clear examples and rationale for focusing exclusively on user's codebase
545
+ - Explicit **Write tool execution commands** throughout `/trinity-docs` Phase 2
546
+ - Added CRITICAL EXECUTION REQUIREMENT section at Phase 2 start
547
+ - Added **EXECUTION REQUIRED** code blocks for each seeding step
548
+ - Added **Phase 2 Execution Summary** with mandatory file creation checklist
549
+ - Ensures APO creates actual documentation files instead of just showing templates
550
+
551
+ ### Changed
552
+
553
+ - **`/trinity-docs` command:** Enhanced Phase 2 with explicit Write tool requirements
554
+ - Step 2 (Guides): Added execution requirements for getting-started.md and
555
+ framework-specific guides
556
+ - Step 3 (API): Added execution requirements for api/README.md
557
+ - Step 4 (Architecture): Added execution requirements for architecture/overview.md
558
+ - Step 5 (Reference): Added execution requirements for reference/README.md
559
+ - Phase now requires minimum 4 files to be created: getting-started.md, api/README.md,
560
+ architecture/overview.md, reference/README.md
561
+
562
+ ### Fixed
563
+
564
+ - **APO file creation issue:** `/trinity-docs` now explicitly commands APO to use Write
565
+ tool, preventing scenario where directory structure is created but documentation files
566
+ are not written
567
+
568
+ ## [2.0.1] - 2025-12-29
569
+
570
+ ### Added
571
+
572
+ - Installation instructions in README.md with npx and global install options
573
+ - Automatic npm deployment on every push to main branch via GitHub Actions CD workflow
574
+
575
+ ### Changed
576
+
577
+ - **CD Workflow:** Modified to deploy to npm on all main branch pushes (not just version
578
+ tags)
579
+ - **CD Workflow:** GitHub releases now only created for version tags, not regular commits
580
+ - Updated all package references from `@trinity-method/cli` to `trinity-method-sdk`
581
+
582
+ ### Fixed
583
+
584
+ - Removed redundant `node_modules/` from Trinity's .gitignore additions
585
+
586
+ ## [2.0.0] - 2025-12-21
587
+
588
+ ### Added
589
+
590
+ - **Agent System Expansion:** Grew from 7 to 19 specialized agents
591
+ - **Planning Layer (4 agents):** MON (Requirements Analyst), ROR (Design Architect),
592
+ TRA (Work Planner), EUS (Task Decomposer)
593
+ - **Execution Layer (3 agents):** KIL (Task Executor), BAS (Quality Gate),
594
+ DRA (Code Reviewer)
595
+ - **Support Layer (4 agents):** APO (Documentation Specialist),
596
+ BON (Dependency Manager), CAP (Configuration Specialist),
597
+ URO (Refactoring Specialist)
598
+ - **Leadership & Audit (2 agents):** ALY (Chief Technology Officer),
599
+ JUNO (Quality Auditor)
600
+ - **Infrastructure (5 agents):** TAN, ZEN, INO, EIN, AJ MAESTRO (legacy)
601
+ - Increased deployment from 49 to 64 production-ready components
602
+ - Expanded slash commands from 8 to 20 commands across 6 categories
603
+ - Session Management: `/trinity-start`, `/trinity-continue`, `/trinity-end`
604
+ - Planning: `/trinity-requirements`, `/trinity-design`, `/trinity-decompose`,
605
+ `/trinity-plan`
606
+ - Execution: `/trinity-orchestrate`, `/trinity-audit`, `/trinity-readme`,
607
+ `/trinity-docs`, `/trinity-changelog`
608
+ - Investigation: `/trinity-create-investigation`, `/trinity-plan-investigation`,
609
+ `/trinity-investigate-templates`
610
+ - Infrastructure: `/trinity-init`
611
+ - Utility: `/trinity-verify`, `/trinity-agents`, `/trinity-workorder`
612
+ - Enhanced `/trinity-readme` command template to v2.0.0 with comprehensive validation
613
+ phases
614
+ - Phase 2h: Command/Script/CLI Validation - Verifies all documented commands exist in
615
+ codebase
616
+ - Phase 2i: Code Example Validation - Checks code examples match current API signatures
617
+ - Phase 2j: API/Function Reference Validation - Verifies documented functions/classes
618
+ exist
619
+ - Phase 2k: Dependency Claims Validation - Cross-references README with package
620
+ manifests
621
+ - Phase 2l: Stale Content Detection - Finds TODO markers, outdated dates, placeholder
622
+ text
623
+
624
+ ### Changed
625
+
626
+ - **BREAKING:** Updated Trinity Method to v2.0.0 architecture
627
+ - **Agent System:** Complete agent architecture redesign with specialized layers
628
+ - **Documentation System:** Enhanced APO capabilities with comprehensive audit phases
629
+ - Refactored 7 functions to reduce cyclomatic complexity (all ≤15)
630
+ - Improved code maintainability and readability across codebase
631
+ - Enhanced test coverage and reliability (405 tests, 100% passing)
632
+
633
+ ### Deprecated
634
+
635
+ - AJ MAESTRO orchestrator (v1.0) replaced by ALY in v2.0
636
+
637
+ ### Fixed
638
+
639
+ - Template path resolution in integration tests
640
+ - Linting deployment tests now correctly locate template files
641
+ - **Documentation Accuracy:** Fixed 6 critical inaccuracies in README.md
642
+ - Removed 24+ non-existent CLI commands (`npx trinity investigate`, `crisis`,
643
+ `analytics`, etc.)
644
+ - Fixed 13 broken documentation links (docs/methodology/, docs/adr/, docs/workflows/)
645
+ - Corrected agent count inconsistencies throughout documentation (unified to 18 agents)
646
+ - Updated deployment examples to reflect actual CLI
647
+ (`npx @trinity-method/cli deploy/update`)
648
+ - Fixed broken ADR links in src/README.md (replaced with design principles summary)
649
+ - Fixed broken ADR links in docs/README.md (removed non-existent file references)
650
+
651
+ ---
652
+
653
+ ## [1.0.1] - 2025-10-02 (Legacy - @trinity-method/cli)
654
+
655
+ ### Fixed
656
+
657
+ - **Critical:** Missing template files in npm package (only 9 of 36 were included)
658
+ - Fixed file paths to use bundled templates instead of workspace structure
659
+ - All `.md.template` files now properly included in published package
660
+ - Updated `deploy.js` and `update.js` to reference correct template locations
661
+ - Bundled agents and hooks directly into CLI package for standalone operation
662
+
663
+ ### Changed
664
+
665
+ - Reorganized package structure to be self-contained when published to npm
666
+ - Templates, agents, and hooks now bundled in `packages/cli/templates/`
667
+
668
+ **Note:** This version was published as `@trinity-method/cli`. Starting with v2.0.0,
669
+ the package was renamed to `trinity-method-sdk`.
670
+
671
+ ---
672
+
673
+ ## [1.0.0] - 2025-10-01 (Legacy - @trinity-method/cli)
674
+
675
+ ### Added
676
+
677
+ - Initial release of Trinity Method SDK for Claude Code
678
+ - 7 specialized Trinity agents (Aly, AJ, TAN, ZEN, INO, Ein, JUNO)
679
+ - Claude Code-exclusive deployment
680
+ - Interactive deployment with linting and CI/CD configuration
681
+ - Linting configuration (ESLint, Prettier, etc.)
682
+ - CI/CD automation (GitHub Actions, GitLab CI)
683
+ - Matrix testing support
684
+ - Coverage integration (Codecov, Coveralls)
685
+ - Employee Directory with agent documentation
686
+ - Trinity structure (knowledge-base, templates)
687
+ - CLAUDE.md context file deployment
688
+ - README injection for Trinity Method section
689
+ - 8 slash commands (/trinity-init, /trinity-verify, /trinity-docs, /trinity-start,
690
+ /trinity-continue, /trinity-end, /trinity-workorder, /trinity-agents)
691
+ - Session management with archival system
692
+ - Comprehensive CLI documentation
693
+
694
+ ### Strategic Decision
695
+
696
+ - Focused exclusively on Claude Code for exceptional user experience
697
+ - Community contributions welcome for other coding agents
698
+
699
+ **Note:** This version was published as `@trinity-method/cli`. Starting with v2.0.0,
700
+ the package was renamed to `trinity-method-sdk`.
701
+
702
+ [1.0.0]: https://github.com/lukadfagundes/trinity-method-sdk/releases/tag/v1.0.0