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
@@ -39,7 +39,7 @@
39
39
  ### Session Initialization
40
40
  ```markdown
41
41
  ## Required Steps at Session Start:
42
- 1. Load project context from ../CLAUDE.md
42
+ 1. Load project context from ../../CLAUDE.md
43
43
  2. Review outstanding tasks in knowledge-base/To-do.md
44
44
  3. Check system health and performance metrics
45
45
  4. Update dependencies if needed
@@ -63,7 +63,7 @@
63
63
  ### Session Artifacts Management
64
64
  ```yaml
65
65
  Session Artifacts:
66
- Location: trinity/sessions/[YYYY-MM-DD]-[HHMMSS]/
66
+ Location: .claude/trinity/sessions/[YYYY-MM-DD]-[HHMMSS]/
67
67
  Required Files:
68
68
  - SESSION-SUMMARY.md # Session overview and accomplishments
69
69
  - investigation-summary.md # What was investigated
@@ -94,7 +94,7 @@ Session Artifacts:
94
94
  ```markdown
95
95
  ## Response for Performance Degradation:
96
96
  1. Measure current performance metrics
97
- 2. Compare against established baselines in ../CLAUDE.md
97
+ 2. Compare against established baselines in ../../CLAUDE.md
98
98
  3. Identify performance bottlenecks
99
99
  4. Investigate using Trinity methodology
100
100
  5. Implement targeted optimizations
@@ -237,14 +237,14 @@ const trinityMetrics = {
237
237
  ### Knowledge Persistence Framework
238
238
  ```yaml
239
239
  Knowledge Base Structure:
240
- trinity/knowledge-base/
240
+ .claude/trinity/knowledge-base/
241
241
  - ISSUES.md # Common problems and solutions
242
242
  - Trinity.md # Trinity Method project guide
243
243
  - ARCHITECTURE.md # System architecture documentation
244
244
  - Technical-Debt.md # Technical debt tracking
245
245
  - To-do.md # Task tracking and planning
246
246
 
247
- trinity/sessions/
247
+ .claude/trinity/sessions/
248
248
  - [YYYY-MM-DD]-[HHMMSS]/ # Session artifacts
249
249
  - SESSION-SUMMARY.md
250
250
  - investigation-summary.md
@@ -252,13 +252,13 @@ Knowledge Base Structure:
252
252
  - issues-resolved.md
253
253
  - performance-report.md
254
254
 
255
- trinity/investigations/
255
+ .claude/trinity/investigations/
256
256
  - [investigation-name]/ # Investigation work products
257
257
 
258
- trinity/patterns/
258
+ .claude/trinity/patterns/
259
259
  - [pattern-name].md # Reusable solution patterns
260
260
 
261
- trinity/work-orders/
261
+ .claude/trinity/work-orders/
262
262
  - WORKORDER-XXX.md # Active work orders
263
263
  ```
264
264
 
@@ -326,9 +326,9 @@ Execute Framework Crisis Protocol
326
326
 
327
327
  ### Hierarchical Context Loading
328
328
  ```
329
- 1. ../CLAUDE.md → Global project context (load FIRST)
330
- 2. trinity/CLAUDE.md (this file) → Trinity Method enforcement (load SECOND)
331
- 3. ../{{SOURCE_DIR}}/CLAUDE.md → Technology-specific rules (load THIRD)
329
+ 1. ../../CLAUDE.md → Global project context (load FIRST)
330
+ 2. .claude/trinity/CLAUDE.md (this file) → Trinity Method enforcement (load SECOND)
331
+ 3. ../../{{SOURCE_DIR}}/CLAUDE.md → Technology-specific rules (load THIRD)
332
332
  ```
333
333
 
334
334
  ### Context Priority Rules
@@ -341,7 +341,7 @@ Execute Framework Crisis Protocol
341
341
 
342
342
  ## Reference to Parent Context
343
343
 
344
- This file extends and enforces the global requirements defined in `../CLAUDE.md`. All Trinity Method protocols must comply with:
344
+ This file extends and enforces the global requirements defined in `../../CLAUDE.md`. All Trinity Method protocols must comply with:
345
345
  - Global performance baselines
346
346
  - Project-wide behavioral requirements
347
347
  - Technology stack specifications
@@ -355,10 +355,10 @@ For technology-specific implementation details, see: `../src/CLAUDE.md`
355
355
 
356
356
  This file enforces Trinity Method protocols for all development work.
357
357
 
358
- **Parent Context**: [../CLAUDE.md](../CLAUDE.md) - Project overview and global requirements
358
+ **Parent Context**: [../../CLAUDE.md](../../CLAUDE.md) - Project overview and global requirements
359
359
  **Child Context**: [../src/CLAUDE.md](../src/CLAUDE.md) - Framework-specific implementation rules
360
360
  **Related Resources**:
361
- - [Agent Directory](../.claude/EMPLOYEE-DIRECTORY.md) - 19-agent Trinity team guide
361
+ - [Agent Directory](../EMPLOYEE-DIRECTORY.md) - 19-agent Trinity team guide
362
362
  - [Architecture Documentation](knowledge-base/ARCHITECTURE.md) - System architecture and patterns
363
363
  - [Known Issues](knowledge-base/ISSUES.md) - Issue patterns and resolutions
364
364
  - [Technical Debt](knowledge-base/Technical-Debt.md) - Debt tracking and reduction plans
@@ -1,6 +1,6 @@
1
1
  # AI Development Guide
2
2
 
3
- ** Trinity Version:** 2.0.9
3
+ **Trinity Version:** 2.1.0
4
4
  **Last Updated**: {{date}}
5
5
  **Project**: {{projectName}}
6
6
 
@@ -1,5 +1,5 @@
1
1
  # {{PROJECT_NAME}} Architecture
2
- **Trinity Method v2.0**
2
+ **Trinity Version:** 2.1.0
3
3
  **Technology Stack**: {{TECHNOLOGY_STACK}}
4
4
  **Framework**: {{PRIMARY_FRAMEWORK}}
5
5
  **Last Updated**: {{CURRENT_DATE}}
@@ -27,7 +27,7 @@ const {{PROJECT_VAR_NAME}}Stack = {
27
27
  ```
28
28
  {{PROJECT_NAME}}/
29
29
  ├── {{SOURCE_DIR}}/ # Main source code
30
- ├── trinity/ # Trinity Method implementation
30
+ ├── .claude/trinity/ # Trinity Method implementation
31
31
  │ ├── knowledge-base/ # Architecture & documentation
32
32
  ├── tests/ # Test suites
33
33
  └── docs/ # Additional documentation
@@ -308,9 +308,9 @@ graph LR
308
308
 
309
309
  ### Knowledge Capture
310
310
  - Architecture decisions recorded here
311
- - Patterns documented in trinity/patterns/
312
- - Issues tracked in trinity/knowledge-base/ISSUES.md
313
- - Sessions archived in trinity/sessions/
311
+ - Patterns documented in .claude/trinity/patterns/
312
+ - Issues tracked in .claude/trinity/knowledge-base/ISSUES.md
313
+ - Sessions archived in .claude/trinity/sessions/
314
314
 
315
315
  ---
316
316
 
@@ -1,6 +1,6 @@
1
1
  # Coding Principles
2
2
 
3
- ** Trinity Version:** 2.0.9
3
+ **Trinity Version:** 2.1.0
4
4
  **Last Updated**: {{date}}
5
5
  **Project**: {{projectName}}
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Documentation Criteria
2
2
 
3
- ** Trinity Version:** 2.0.9
3
+ **Trinity Version:** 2.1.0
4
4
  **Last Updated**: {{date}}
5
5
  **Project**: {{projectName}}
6
6
 
@@ -1,5 +1,5 @@
1
1
  # ISSUES.md - {{PROJECT_NAME}}
2
- **Trinity Method v2.0 - Issue Intelligence System**
2
+ **Trinity Version:** 2.1.0
3
3
  **Technology Stack**: {{TECHNOLOGY_STACK}}
4
4
  **Framework**: {{PRIMARY_FRAMEWORK}}
5
5
  **Last Updated**: {{CURRENT_DATE}}
@@ -225,8 +225,8 @@ Pattern_Prevention_Rate: {{PERCENTAGE}}%
225
225
  - Dependencies: {{DEPENDENCIES}}
226
226
 
227
227
  ### Completed Investigations (This Session)
228
- - [x] {{COMPLETED_1}} - See: trinity/investigations/{{DATE}}-{{INVESTIGATION}}.md
229
- - [x] {{COMPLETED_2}} - See: trinity/investigations/{{DATE}}-{{INVESTIGATION}}.md
228
+ - [x] {{COMPLETED_1}} - See: .claude/trinity/investigations/{{DATE}}-{{INVESTIGATION}}.md
229
+ - [x] {{COMPLETED_2}} - See: .claude/trinity/investigations/{{DATE}}-{{INVESTIGATION}}.md
230
230
 
231
231
  ---
232
232
 
@@ -285,7 +285,7 @@ Solution:
285
285
 
286
286
  Prevention:
287
287
  Pattern_Created: {{YES/NO}}
288
- Pattern_Location: trinity/patterns/{{PATTERN_FILE}}
288
+ Pattern_Location: .claude/trinity/patterns/{{PATTERN_FILE}}
289
289
  Guidelines_Updated: {{YES/NO}}
290
290
 
291
291
  Metrics:
@@ -346,7 +346,7 @@ Metrics:
346
346
  - **ARCHITECTURE.md**: System design and components
347
347
  - **Trinity.md**: Methodology implementation
348
348
  - **To-do.md**: Pending fixes and improvements
349
- - **Pattern Library**: trinity/patterns/
349
+ - **Pattern Library**: .claude/trinity/patterns/
350
350
 
351
351
  ---
352
352
 
@@ -417,7 +417,7 @@ Updates_Required:
417
417
  - Active_Issues: Add new issue with P0/P1/P2/P3 priority
418
418
  - Issue_Template: Fill with symptoms, root cause, solution
419
419
  - Pattern_Check: Is this a recurring issue? Create pattern if yes
420
- - Investigation_Link: Link to trinity/investigations/ file if investigation done
420
+ - Investigation_Link: Link to .claude/trinity/investigations/ file if investigation done
421
421
  - Cross_References:
422
422
  - To-do.md: Add fix task with priority
423
423
  - Technical-Debt.md: Add debt if issue reveals shortcuts
@@ -442,7 +442,7 @@ Updates_Required:
442
442
  - Pattern_Frequency: Update occurrence count
443
443
  - Related_Issues: Link all issue IDs that match this pattern
444
444
  - Prevention_Measures: Document how to prevent this pattern
445
- - Pattern_Library: Create pattern file in trinity/patterns/
445
+ - Pattern_Library: Create pattern file in .claude/trinity/patterns/
446
446
  - Cross_References:
447
447
  - Technical-Debt.md: Link pattern to debt if applicable
448
448
  - CODING-PRINCIPLES.md: Add principle if pattern reveals standard gap
@@ -481,7 +481,7 @@ Updates_Required:
481
481
  4. **Link Investigation**: If investigation file exists, link it
482
482
  5. **Update Metrics**: Increment counts, update averages
483
483
  6. **Cross-Reference**: Update related documents (To-do, Technical-Debt, etc.)
484
- 7. **Pattern Library**: Create trinity/patterns/ file if reusable solution
484
+ 7. **Pattern Library**: Create .claude/trinity/patterns/ file if reusable solution
485
485
  8. **Update Timestamp**: Set `**Last Updated**: {{CURRENT_DATE}}` to actual date
486
486
 
487
487
  **Quality Checklist:**
@@ -530,7 +530,7 @@ Updates_Required:
530
530
  **Update Frequency**: Real-time (as issues discovered) + session-based
531
531
  **Maintained By**: Development team using Trinity Method
532
532
  **Referenced By**: `/trinity-end` command for session updates
533
- **Pattern Library**: Creates trinity/patterns/ files
533
+ **Pattern Library**: Creates .claude/trinity/patterns/ files
534
534
  **Last Updated**: {{CURRENT_DATE}}
535
535
 
536
536
  ---
@@ -1,6 +1,6 @@
1
1
  # Testing Principles
2
2
 
3
- ** Trinity Version:** 2.0.9
3
+ **Trinity Version:** 2.1.0
4
4
  **Last Updated**: {{date}}
5
5
  **Project**: {{projectName}}
6
6
 
@@ -1,5 +1,5 @@
1
1
  # Technical Debt Tracking - {{PROJECT_NAME}}
2
- **Trinity Method v2.0**
2
+ **Trinity Version:** 2.1.0
3
3
  **Technology Stack**: {{TECHNOLOGY_STACK}}
4
4
  **Framework**: {{PRIMARY_FRAMEWORK}}
5
5
  **Last Updated**: {{CURRENT_DATE}}
@@ -402,8 +402,6 @@ const calculateDebtScore = () => {
402
402
  - **ARCHITECTURE.md**: System design decisions
403
403
  - **Trinity.md**: Methodology implementation
404
404
  - **To-do.md**: Actionable task list
405
- - **Pattern Library**: trinity/patterns/
406
-
407
405
  ---
408
406
 
409
407
  ## 📝 WHEN TO UPDATE THIS DOCUMENT
@@ -512,7 +510,7 @@ Updates_Required:
512
510
  - Debt_Reduction_Plan: Add to Quick Wins or Strategic Improvements
513
511
  - Cross_References:
514
512
  - ISSUES.md: Link to duplication pattern if causes issues
515
- - trinity/patterns/: Create pattern file
513
+ - Document pattern in Pattern Library section above
516
514
  ```
517
515
 
518
516
  **Scenario: Security Vulnerability Fixed**
@@ -1,5 +1,5 @@
1
1
  # To-do List - {{PROJECT_NAME}}
2
- **Trinity Method v2.0**
2
+ **Trinity Version:** 2.1.0
3
3
  **Technology Stack**: {{TECHNOLOGY_STACK}}
4
4
  **Framework**: {{PRIMARY_FRAMEWORK}}
5
5
  **Last Updated**: {{CURRENT_DATE}}
@@ -29,7 +29,7 @@
29
29
  ### Feature Development
30
30
  - [ ] **{{FEATURE_1}}**
31
31
  - Investigation Required: YES
32
- - Pattern Check: trinity/patterns/
32
+ - Pattern Check: Technical-Debt.md#pattern-library
33
33
  - Tests Required: Unit + Integration
34
34
  - Documentation: Update ARCHITECTURE.md
35
35
  - Estimated: {{TIME_ESTIMATE}}
@@ -1,5 +1,5 @@
1
1
  # Trinity Method Implementation - {{PROJECT_NAME}}
2
- ** Trinity Version:** 2.0.9
2
+ **Trinity Version:** 2.1.0
3
3
  **Last Updated**: {{date}}
4
4
  **Technology Stack**: {{TECHNOLOGY_STACK}}
5
5
  **Framework**: {{PRIMARY_FRAMEWORK}}
@@ -30,12 +30,12 @@ Every feature/fix in {{PROJECT_NAME}} requires investigation:
30
30
  - Security considerations
31
31
 
32
32
  3. **Pattern Discovery** (5 minutes)
33
- - Check trinity/patterns/ for existing solutions
33
+ - Check .claude/trinity/patterns/ for existing solutions
34
34
  - Document new patterns if discovered
35
35
  - Update pattern library
36
36
 
37
37
  4. **Documentation** (5 minutes)
38
- - Save to trinity/investigations/[date]-[feature].md
38
+ - Save to .claude/trinity/investigations/[date]-[feature].md
39
39
  - Update relevant knowledge base files
40
40
  - Link to issues if applicable
41
41
 
@@ -103,7 +103,7 @@ Debug_Levels:
103
103
 
104
104
  ### Pre-Implementation Checklist
105
105
  - [ ] Investigation completed
106
- - [ ] Existing patterns reviewed (trinity/patterns/)
106
+ - [ ] Existing patterns reviewed (.claude/trinity/patterns/)
107
107
  - [ ] Performance impact assessed
108
108
  - [ ] Security implications considered
109
109
  - [ ] Test plan created
@@ -233,7 +233,7 @@ Session_End:
233
233
  - Update metrics
234
234
 
235
235
  3_Archive:
236
- - Move to trinity/sessions/[date]/
236
+ - Move to .claude/trinity/sessions/[date]/
237
237
  - Create session summary
238
238
  - Update project metrics
239
239
  - Plan next session
@@ -245,7 +245,7 @@ Session_End:
245
245
 
246
246
  ### Pattern Discovery Process
247
247
  1. **Identify**: Recognize recurring solutions
248
- 2. **Document**: Create pattern file in trinity/patterns/
248
+ 2. **Document**: Create pattern file in .claude/trinity/patterns/
249
249
  3. **Validate**: Test pattern effectiveness
250
250
  4. **Share**: Update pattern index
251
251
  5. **Reuse**: Apply in future implementations
@@ -0,0 +1,218 @@
1
+ # {{PROJECT_NAME}} API Documentation
2
+
3
+ Complete REST API reference for {{PROJECT_NAME}}.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ {{PROJECT_NAME}} provides **{{ENDPOINT_COUNT}} REST API endpoints** across **{{RESOURCE_COUNT}} resources**.
10
+
11
+ **Base URL:** `{{API_BASE_URL}}`
12
+
13
+ **API Version:** {{API_VERSION}}
14
+
15
+ ---
16
+
17
+ ## Authentication
18
+
19
+ {{AUTHENTICATION}}
20
+
21
+ ---
22
+
23
+ ## Request Format
24
+
25
+ All requests should include:
26
+
27
+ ```
28
+ Content-Type: application/json
29
+ {{AUTH_HEADER}}
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Response Format
35
+
36
+ All responses are returned in JSON format:
37
+
38
+ ### Success Response
39
+
40
+ ```json
41
+ {
42
+ "data": { /* Response data */ },
43
+ "status": "success",
44
+ "timestamp": "2026-01-15T12:00:00Z"
45
+ }
46
+ ```
47
+
48
+ ### Error Response
49
+
50
+ ```json
51
+ {
52
+ "error": "Error message",
53
+ "statusCode": 400,
54
+ "timestamp": "2026-01-15T12:00:00Z",
55
+ "path": "/api/endpoint"
56
+ }
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Status Codes
62
+
63
+ | Code | Meaning | Description |
64
+ |------|---------|-------------|
65
+ | 200 | OK | Request succeeded |
66
+ | 201 | Created | Resource created successfully |
67
+ | 204 | No Content | Request succeeded, no content to return |
68
+ | 400 | Bad Request | Invalid request parameters |
69
+ | 401 | Unauthorized | Authentication required |
70
+ | 403 | Forbidden | Insufficient permissions |
71
+ | 404 | Not Found | Resource not found |
72
+ | 409 | Conflict | Resource conflict (e.g., duplicate) |
73
+ | 422 | Unprocessable Entity | Validation error |
74
+ | 429 | Too Many Requests | Rate limit exceeded |
75
+ | 500 | Internal Server Error | Server error |
76
+
77
+ ---
78
+
79
+ ## Rate Limiting
80
+
81
+ {{RATE_LIMITING}}
82
+
83
+ ---
84
+
85
+ ## Pagination
86
+
87
+ List endpoints support pagination using query parameters:
88
+
89
+ ```
90
+ GET /api/resource?page=1&limit=20
91
+ ```
92
+
93
+ **Parameters:**
94
+ - `page` (integer, default: 1) - Page number
95
+ - `limit` (integer, default: 20, max: 100) - Items per page
96
+
97
+ **Response includes pagination metadata:**
98
+
99
+ ```json
100
+ {
101
+ "data": [ /* items */ ],
102
+ "pagination": {
103
+ "page": 1,
104
+ "limit": 20,
105
+ "total": 150,
106
+ "totalPages": 8
107
+ }
108
+ }
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Filtering & Sorting
114
+
115
+ {{FILTERING_SORTING}}
116
+
117
+ ---
118
+
119
+ ## API Resources
120
+
121
+ {{RESOURCES}}
122
+
123
+ ---
124
+
125
+ ## Endpoints
126
+
127
+ {{ENDPOINT_DETAILS}}
128
+
129
+ ---
130
+
131
+ ## Error Codes
132
+
133
+ ### Common Errors
134
+
135
+ {{ERROR_CODES}}
136
+
137
+ ---
138
+
139
+ ## Code Examples
140
+
141
+ ### JavaScript (Fetch)
142
+
143
+ ```javascript
144
+ const response = await fetch('{{API_BASE_URL}}/{{EXAMPLE_ENDPOINT}}', {
145
+ method: 'GET',
146
+ headers: {
147
+ 'Content-Type': 'application/json',
148
+ {{AUTH_HEADER_EXAMPLE}}
149
+ }
150
+ });
151
+
152
+ const data = await response.json();
153
+ console.log(data);
154
+ ```
155
+
156
+ ### cURL
157
+
158
+ ```bash
159
+ curl -X GET '{{API_BASE_URL}}/{{EXAMPLE_ENDPOINT}}' \
160
+ -H 'Content-Type: application/json' \
161
+ {{CURL_AUTH_EXAMPLE}}
162
+ ```
163
+
164
+ ### Python (Requests)
165
+
166
+ ```python
167
+ import requests
168
+
169
+ response = requests.get(
170
+ '{{API_BASE_URL}}/{{EXAMPLE_ENDPOINT}}',
171
+ headers={
172
+ 'Content-Type': 'application/json',
173
+ {{PYTHON_AUTH_EXAMPLE}}
174
+ }
175
+ )
176
+
177
+ data = response.json()
178
+ print(data)
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Webhooks
184
+
185
+ {{WEBHOOKS}}
186
+
187
+ ---
188
+
189
+ ## Versioning
190
+
191
+ {{API_VERSIONING}}
192
+
193
+ ---
194
+
195
+ ## Changelog
196
+
197
+ {{CHANGELOG}}
198
+
199
+ ---
200
+
201
+ ## Related Documentation
202
+
203
+ - [Getting Started](../guides/getting-started.md) - Setup and installation
204
+ - [API Development Guide](../guides/api-development.md) - Creating new endpoints
205
+ - [Deployment Guide](../guides/deployment.md) - Production deployment
206
+
207
+ ---
208
+
209
+ ## Support
210
+
211
+ For API support:
212
+ - **Documentation:** [Full documentation](../README.md)
213
+ - **Issues:** Report bugs via GitHub issues
214
+ - **Questions:** GitHub Discussions
215
+
216
+ ---
217
+
218
+ *Last updated: {{GENERATION_DATE}}*
@@ -0,0 +1,71 @@
1
+ # Documentation Structure Configuration
2
+
3
+ ## Template Paths
4
+
5
+ All documentation templates follow a consistent directory structure:
6
+
7
+ ### Core Templates
8
+ - **Root README**: `src/templates/documentation/ROOT-README.md.template`
9
+ - **Subdirectory README**: `src/templates/documentation/SUBDIRECTORY-README.md.template`
10
+
11
+ ### Mermaid Diagrams (`mermaid-diagrams/`)
12
+ - `mvc-flow.md.template` - MVC architecture flow
13
+ - `database-er.md.template` - Database entity relationships
14
+ - `component-hierarchy.md.template` - Component dependency tree
15
+ - `api-endpoint-map.md.template` - API endpoint organization
16
+
17
+ ### Guides (`guides/`)
18
+ - `getting-started.md.template` - Initial setup and onboarding
19
+ - `api-development.md.template` - API development patterns
20
+ - `deployment.md.template` - Deployment procedures
21
+ - `contributing.md.template` - Contribution guidelines
22
+
23
+ ### API Documentation (`api-docs/`)
24
+ - `README.md.template` - API reference structure
25
+
26
+ ### Configuration (`config/`)
27
+ - `env-example-generator.md.template` - Environment variable examples
28
+
29
+ ### Reports (`reports/`)
30
+ - `juno-final-report.md.template` - Public documentation report
31
+ - `juno-internal-report.md.template` - Internal audit report
32
+
33
+ ### Discovery (`discovery/`)
34
+ - `framework-detection.md.template` - Framework identification patterns
35
+ - `component-discovery.md.template` - Component scanning logic
36
+ - `api-endpoint-scanner.md.template` - API endpoint detection
37
+ - `env-variable-extraction.md.template` - Environment variable parsing
38
+
39
+ ### Validation (`validation/`)
40
+ - `juno-quality-gates.md.template` - Quality gate criteria
41
+ - `documentation-verification-rules.md.template` - Verification rules
42
+ - `apo-self-validation.md.template` - APO self-check procedures
43
+
44
+ ### Processes (`processes/`)
45
+ - `error-handling-protocol.md.template` - Error handling standards
46
+ - `apo-workflow-common.md.template` - Common APO workflow steps
47
+ - `apo-diagram-specific.md.template` - Diagram-specific workflow
48
+ - `apo-guide-specific.md.template` - Guide-specific workflow
49
+ - `apo-config-specific.md.template` - Configuration-specific workflow
50
+ - `fallback-mechanism.md.template` - Fallback procedures
51
+
52
+ ## Component Discovery Patterns
53
+
54
+ **Search patterns for framework components:**
55
+ - Controllers: `**/*Controller.{js,ts,py,rb,go,java,cs,php}`
56
+ - Models: `**/models/**/*.{js,ts,py,rb,go,java,cs,php}`
57
+ - Services: `**/services/**/*.{js,ts,py,rb,go,java,cs,php}`
58
+ - Routes: `**/routes/**/*.{js,ts,py,rb,go,java,cs,php}`
59
+
60
+ ## Verification Glob Patterns
61
+
62
+ **Quality gate file checks:**
63
+ ```javascript
64
+ const verification_globs = [
65
+ "docs/**/README.md",
66
+ "docs/diagrams/**/*.md",
67
+ "docs/guides/**/*.md",
68
+ "docs/api/**/*.md",
69
+ ".env.example"
70
+ ];
71
+ ```