trinity-method-sdk 2.1.0 → 2.2.1

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 (101) hide show
  1. package/CHANGELOG.md +728 -467
  2. package/README.md +550 -539
  3. package/dist/cli/commands/deploy/ci-cd.d.ts +4 -3
  4. package/dist/cli/commands/deploy/ci-cd.js +10 -9
  5. package/dist/cli/commands/deploy/configuration.js +10 -11
  6. package/dist/cli/commands/deploy/directories.js +13 -14
  7. package/dist/cli/commands/deploy/gitignore.js +3 -4
  8. package/dist/cli/commands/deploy/index.d.ts +1 -1
  9. package/dist/cli/commands/deploy/index.js +6 -2
  10. package/dist/cli/commands/deploy/knowledge-base.js +2 -2
  11. package/dist/cli/commands/deploy/pre-flight.js +1 -1
  12. package/dist/cli/commands/deploy/root-files.js +2 -17
  13. package/dist/cli/commands/deploy/summary.js +3 -3
  14. package/dist/cli/commands/deploy/templates.js +5 -5
  15. package/dist/cli/commands/update/backup.js +6 -12
  16. package/dist/cli/commands/update/index.js +15 -1
  17. package/dist/cli/commands/update/knowledge-base.js +1 -1
  18. package/dist/cli/commands/update/migration.d.ts +31 -0
  19. package/dist/cli/commands/update/migration.js +130 -0
  20. package/dist/cli/commands/update/pre-flight.d.ts +7 -2
  21. package/dist/cli/commands/update/pre-flight.js +21 -20
  22. package/dist/cli/commands/update/summary.js +11 -5
  23. package/dist/cli/commands/update/templates.js +1 -1
  24. package/dist/cli/commands/update/types.d.ts +2 -0
  25. package/dist/cli/commands/update/verification.js +5 -5
  26. package/dist/cli/commands/update/version.js +6 -4
  27. package/dist/cli/utils/deploy-ci.d.ts +3 -2
  28. package/dist/cli/utils/deploy-ci.js +24 -24
  29. package/dist/cli/utils/deploy-linting.js +100 -5
  30. package/dist/cli/utils/error-classes.d.ts +2 -2
  31. package/dist/cli/utils/linting-tools.js +14 -6
  32. package/dist/cli/utils/template-processor.js +1 -3
  33. package/dist/templates/.claude/EMPLOYEE-DIRECTORY.md.template +16 -22
  34. package/dist/templates/.claude/agents/aj-team/apo-documentation-specialist.md.template +7 -7
  35. package/dist/templates/.claude/agents/aj-team/bas-quality-gate.md.template +8 -8
  36. package/dist/templates/.claude/agents/aj-team/dra-code-reviewer.md.template +3 -3
  37. package/dist/templates/.claude/agents/aj-team/kil-task-executor.md.template +6 -6
  38. package/dist/templates/.claude/agents/audit/juno-auditor.md.template +39 -40
  39. package/dist/templates/.claude/agents/deployment/ein-cicd.md.template +56 -159
  40. package/dist/templates/.claude/agents/deployment/ino-context.md.template +21 -21
  41. package/dist/templates/.claude/agents/deployment/tan-structure.md.template +28 -29
  42. package/dist/templates/.claude/agents/deployment/zen-knowledge.md.template +22 -23
  43. package/dist/templates/.claude/agents/leadership/aj-maestro.md.template +6 -6
  44. package/dist/templates/.claude/agents/leadership/aly-cto.md.template +17 -18
  45. package/dist/templates/.claude/agents/planning/eus-decomposer.md.template +4 -4
  46. package/dist/templates/.claude/agents/planning/mon-requirements.md.template +4 -4
  47. package/dist/templates/.claude/agents/planning/ror-design.md.template +4 -4
  48. package/dist/templates/.claude/agents/planning/tra-planner.md.template +4 -4
  49. package/dist/templates/.claude/commands/execution/trinity-audit.md.template +9 -9
  50. package/dist/templates/.claude/commands/execution/trinity-breakdown.md.template +535 -0
  51. package/dist/templates/.claude/commands/execution/trinity-orchestrate.md.template +43 -43
  52. package/dist/templates/.claude/commands/infrastructure/trinity-init.md.template +20 -43
  53. package/dist/templates/.claude/commands/investigation/trinity-create-investigation.md.template +5 -5
  54. package/dist/templates/.claude/commands/investigation/trinity-investigate-templates.md.template +10 -10
  55. package/dist/templates/.claude/commands/investigation/trinity-plan-investigation.md.template +1 -1
  56. package/dist/templates/.claude/commands/maintenance/trinity-changelog.md.template +4 -4
  57. package/dist/templates/.claude/commands/maintenance/trinity-docs-update.md.template +10 -10
  58. package/dist/templates/.claude/commands/maintenance/trinity-docs.md.template +62 -62
  59. package/dist/templates/.claude/commands/maintenance/trinity-readme.md.template +16 -16
  60. package/dist/templates/.claude/commands/session/trinity-continue.md.template +22 -22
  61. package/dist/templates/.claude/commands/session/trinity-end.md.template +22 -22
  62. package/dist/templates/.claude/commands/session/trinity-start.md.template +1 -2
  63. package/dist/templates/.claude/commands/utility/trinity-agents.md.template +3 -6
  64. package/dist/templates/.claude/commands/utility/trinity-verify.md.template +48 -54
  65. package/dist/templates/.claude/commands/utility/trinity-workorder.md.template +5 -5
  66. package/dist/templates/ci/ci.yml.template +2 -2
  67. package/dist/templates/root/CLAUDE.md.template +9 -9
  68. package/dist/templates/root/linting/nodejs/.husky-pre-commit.template +5 -0
  69. package/dist/templates/source/base-CLAUDE.md.template +310 -310
  70. package/dist/templates/source/flutter-CLAUDE.md.template +593 -593
  71. package/dist/templates/source/nodejs-CLAUDE.md.template +531 -531
  72. package/dist/templates/source/python-CLAUDE.md.template +510 -510
  73. package/dist/templates/source/react-CLAUDE.md.template +513 -513
  74. package/dist/templates/source/rust-CLAUDE.md.template +653 -653
  75. package/dist/templates/trinity/CLAUDE.md.template +14 -14
  76. package/dist/templates/trinity/knowledge-base/ARCHITECTURE.md.template +4 -4
  77. package/dist/templates/trinity/knowledge-base/ISSUES.md.template +8 -8
  78. package/dist/templates/trinity/knowledge-base/Technical-Debt.md.template +1 -3
  79. package/dist/templates/trinity/knowledge-base/To-do.md.template +1 -1
  80. package/dist/templates/trinity/knowledge-base/Trinity.md.template +5 -5
  81. package/dist/templates/trinity/templates/documentation/configuration/env-example-generator.md.template +1 -1
  82. package/dist/templates/trinity/templates/documentation/processes/error-handling-protocol.md.template +2 -2
  83. package/dist/templates/trinity/templates/documentation/reports/apo-docs-update-checklist.md.template +7 -7
  84. package/dist/templates/trinity/templates/documentation/reports/juno-docs-update-checklist.md.template +4 -4
  85. package/dist/templates/trinity/templates/documentation/reports/juno-internal-report.md.template +10 -10
  86. package/dist/templates/trinity/templates/investigations/bug.md.template +14 -14
  87. package/dist/templates/trinity/templates/investigations/feature.md.template +14 -14
  88. package/dist/templates/trinity/templates/investigations/performance.md.template +14 -14
  89. package/dist/templates/trinity/templates/investigations/security.md.template +14 -14
  90. package/dist/templates/trinity/templates/investigations/technical.md.template +14 -14
  91. package/dist/templates/trinity/templates/work-orders/ANALYSIS-TEMPLATE.md.template +10 -10
  92. package/dist/templates/trinity/templates/work-orders/AUDIT-TEMPLATE.md.template +10 -10
  93. package/dist/templates/trinity/templates/work-orders/IMPLEMENTATION-TEMPLATE.md.template +10 -10
  94. package/dist/templates/trinity/templates/work-orders/INVESTIGATION-TEMPLATE.md.template +10 -10
  95. package/dist/templates/trinity/templates/work-orders/PATTERN-TEMPLATE.md.template +10 -10
  96. package/dist/templates/trinity/templates/work-orders/VERIFICATION-TEMPLATE.md.template +10 -10
  97. package/package.json +99 -94
  98. package/dist/templates/.claude/agents/leadership/aj-cc.md.template +0 -467
  99. package/dist/templates/ci/cd.yml.template +0 -175
  100. package/dist/templates/ci/github-actions.yml +0 -86
  101. package/dist/templates/root/TRINITY.md.template +0 -52
@@ -44,18 +44,18 @@
44
44
 
45
45
  **Workflow:**
46
46
  1. Create work order: `/trinity-workorder`
47
- 2. Work order saved to: `trinity/work-orders/WO-XXX-{task-name}.md`
47
+ 2. Work order saved to: `.claude/trinity/work-orders/WO-XXX-{task-name}.md`
48
48
  3. Execute: `/trinity-orchestrate @WO-042-jwt-refresh.md`
49
49
  4. **AJ MAESTRO** selects agents and orchestrates execution
50
50
  5. **TWO DELIVERABLES CREATED:**
51
51
  a. **Implementation Report** (from work order template):
52
- `trinity/reports/[COMPONENT]-IMPLEMENTATION-COMPLETE-{timestamp}.md`
52
+ `.claude/trinity/reports/[COMPONENT]-IMPLEMENTATION-COMPLETE-{timestamp}.md`
53
53
  b. **JUNO Audit Report** (automatic verification):
54
- `trinity/reports/AUDIT-WO-042-{date}.md`
55
- 6. 🚨 **CRITICAL: MOVE completed work order** from `trinity/work-orders/` to `trinity/sessions/`
56
- - **MANDATORY STEP** - Execute: `mv trinity/work-orders/WO-XXX-*.md trinity/sessions/`
57
- - **Verify work order NO LONGER exists in trinity/work-orders/**
58
- 7. **Reports remain** in `trinity/reports/` until session end
54
+ `.claude/trinity/reports/AUDIT-WO-042-{date}.md`
55
+ 6. 🚨 **CRITICAL: MOVE completed work order** from `.claude/trinity/work-orders/` to `.claude/trinity/sessions/`
56
+ - **MANDATORY STEP** - Execute: `mv .claude/trinity/work-orders/WO-XXX-*.md .claude/trinity/sessions/`
57
+ - **Verify work order NO LONGER exists in .claude/trinity/work-orders/**
58
+ 7. **Reports remain** in `.claude/trinity/reports/` until session end
59
59
  8. **Run `/trinity-end`** when session complete to archive all session files
60
60
 
61
61
  **Example:**
@@ -80,17 +80,17 @@
80
80
 
81
81
  **Workflow:**
82
82
  1. Create investigation: `/trinity-create-investigation`
83
- 2. Investigation saved to: `trinity/investigations/INV-XXX-{title}.md`
83
+ 2. Investigation saved to: `.claude/trinity/investigations/INV-XXX-{title}.md`
84
84
  3. Execute: `/trinity-orchestrate @INV-015-performance-analysis.md`
85
85
  4. **AJ MAESTRO** coordinates READ-ONLY investigation
86
86
  5. Findings documented (no code changes)
87
87
  6. **Investigation Report Created:**
88
- `trinity/reports/INV-015-findings-{date}.md`
88
+ `.claude/trinity/reports/INV-015-findings-{date}.md`
89
89
  (See investigation template for required sections)
90
- 7. 🚨 **CRITICAL: MOVE completed investigation** from `trinity/investigations/` to `trinity/sessions/`
91
- - **MANDATORY STEP** - Execute: `mv trinity/investigations/INV-XXX-*.md trinity/sessions/`
92
- - **Verify investigation NO LONGER exists in trinity/investigations/**
93
- 8. **Report remains** in `trinity/reports/` until session end
90
+ 7. 🚨 **CRITICAL: MOVE completed investigation** from `.claude/trinity/investigations/` to `.claude/trinity/sessions/`
91
+ - **MANDATORY STEP** - Execute: `mv .claude/trinity/investigations/INV-XXX-*.md .claude/trinity/sessions/`
92
+ - **Verify investigation NO LONGER exists in .claude/trinity/investigations/**
93
+ 8. **Report remains** in `.claude/trinity/reports/` until session end
94
94
  9. **Run `/trinity-end`** when session complete to archive all session files
95
95
 
96
96
  ⚠️ **CRITICAL:** Investigations are READ-ONLY operations. No code changes during investigation phase. Implementation happens separately after investigation is complete.
@@ -244,7 +244,7 @@ When you invoke `/trinity-orchestrate`, here's what happens:
244
244
  - Complexity within limits
245
245
 
246
246
  **JUNO's Audit Report:**
247
- - Saved to: `trinity/reports/AUDIT-{task-id}-{date}.md`
247
+ - Saved to: `.claude/trinity/reports/AUDIT-{task-id}-{date}.md`
248
248
  - Pass/Fail status for each criterion
249
249
  - Overall assessment (APPROVED / REQUIRES FIXES)
250
250
  - Recommendations for improvements
@@ -337,23 +337,23 @@ Please address WO-043 before marking WO-042 complete.
337
337
  **Step 1: Verify Deliverables Created** ✅
338
338
 
339
339
  **Work Orders:**
340
- - [ ] Implementation report in `trinity/reports/[COMPONENT]-IMPLEMENTATION-COMPLETE-{timestamp}.md`
341
- - [ ] JUNO audit report in `trinity/reports/AUDIT-WO-XXX-{date}.md` (if applicable)
340
+ - [ ] Implementation report in `.claude/trinity/reports/[COMPONENT]-IMPLEMENTATION-COMPLETE-{timestamp}.md`
341
+ - [ ] JUNO audit report in `.claude/trinity/reports/AUDIT-WO-XXX-{date}.md` (if applicable)
342
342
 
343
343
  **Investigations:**
344
- - [ ] Findings report in `trinity/reports/INV-XXX-findings-{date}.md`
344
+ - [ ] Findings report in `.claude/trinity/reports/INV-XXX-findings-{date}.md`
345
345
  - [ ] All required sections completed (summary, findings, root cause, recommendations, evidence)
346
346
 
347
347
  **Step 2: 🚨 MOVE THE COMPLETED FILE TO SESSIONS/ 🚨** ✅
348
348
 
349
- **THIS STEP IS MANDATORY - Work orders left in trinity/work-orders/ are considered INCOMPLETE.**
349
+ **THIS STEP IS MANDATORY - Work orders left in .claude/trinity/work-orders/ are considered INCOMPLETE.**
350
350
 
351
351
  ```bash
352
352
  # Work Order Example - EXECUTE THIS IMMEDIATELY AFTER CREATING DELIVERABLE
353
- mv trinity/work-orders/WO-042-jwt-refresh.md trinity/sessions/
353
+ mv .claude/trinity/work-orders/WO-042-jwt-refresh.md .claude/trinity/sessions/
354
354
 
355
355
  # Investigation Example - EXECUTE THIS IMMEDIATELY AFTER CREATING FINDINGS REPORT
356
- mv trinity/investigations/INV-015-performance-analysis.md trinity/sessions/
356
+ mv .claude/trinity/investigations/INV-015-performance-analysis.md .claude/trinity/sessions/
357
357
  ```
358
358
 
359
359
  **Step 3: Verify File Locations** ✅
@@ -361,22 +361,22 @@ mv trinity/investigations/INV-015-performance-analysis.md trinity/sessions/
361
361
  **CRITICAL VERIFICATION - If this fails, the task is NOT complete:**
362
362
 
363
363
  **For Work Orders:**
364
- - [ ] Work order file NOW EXISTS in: `trinity/sessions/WO-XXX-*.md`
365
- - [ ] Deliverable report exists in: `trinity/reports/[COMPONENT]-IMPLEMENTATION-COMPLETE-*.md`
366
- - [ ] Work order file NO LONGER EXISTS in: `trinity/work-orders/`
364
+ - [ ] Work order file NOW EXISTS in: `.claude/trinity/sessions/WO-XXX-*.md`
365
+ - [ ] Deliverable report exists in: `.claude/trinity/reports/[COMPONENT]-IMPLEMENTATION-COMPLETE-*.md`
366
+ - [ ] Work order file NO LONGER EXISTS in: `.claude/trinity/work-orders/`
367
367
 
368
368
  **For Investigations:**
369
- - [ ] Investigation file NOW EXISTS in: `trinity/sessions/INV-XXX-*.md`
370
- - [ ] Findings report exists in: `trinity/reports/INV-XXX-findings-*.md`
371
- - [ ] Investigation file NO LONGER EXISTS in: `trinity/investigations/`
369
+ - [ ] Investigation file NOW EXISTS in: `.claude/trinity/sessions/INV-XXX-*.md`
370
+ - [ ] Findings report exists in: `.claude/trinity/reports/INV-XXX-findings-*.md`
371
+ - [ ] Investigation file NO LONGER EXISTS in: `.claude/trinity/investigations/`
372
372
 
373
373
  **If any verification fails, STOP and fix immediately before proceeding.**
374
374
 
375
375
  **Step 4: Continue Working or End Session**
376
376
 
377
377
  **If continuing work in same session:**
378
- - Reports remain in `trinity/reports/` (available for reference)
379
- - Completed WOs/INVs in `trinity/sessions/` (out of active work queue)
378
+ - Reports remain in `.claude/trinity/reports/` (available for reference)
379
+ - Completed WOs/INVs in `.claude/trinity/sessions/` (out of active work queue)
380
380
  - Proceed with next task
381
381
 
382
382
  **If session is complete:**
@@ -385,12 +385,12 @@ mv trinity/investigations/INV-015-performance-analysis.md trinity/sessions/
385
385
  ```
386
386
 
387
387
  This will:
388
- - Archive ALL files from `trinity/sessions/` → `trinity/archive/sessions/YYYY-MM-DD/`
389
- - Archive ALL files from `trinity/reports/` → `trinity/archive/reports/YYYY-MM-DD/`
390
- - Archive completed work orders → `trinity/archive/work-orders/YYYY-MM-DD/`
391
- - Archive completed investigations → `trinity/archive/investigations/YYYY-MM-DD/`
392
- - Create session summary in `trinity/archive/sessions/YYYY-MM-DD/`
393
- - **Result:** Clean `trinity/sessions/` and `trinity/reports/` folders for next session
388
+ - Archive ALL files from `.claude/trinity/sessions/` → `.claude/trinity/archive/sessions/YYYY-MM-DD/`
389
+ - Archive ALL files from `.claude/trinity/reports/` → `.claude/trinity/archive/reports/YYYY-MM-DD/`
390
+ - Archive completed work orders → `.claude/trinity/archive/work-orders/YYYY-MM-DD/`
391
+ - Archive completed investigations → `.claude/trinity/archive/investigations/YYYY-MM-DD/`
392
+ - Create session summary in `.claude/trinity/archive/sessions/YYYY-MM-DD/`
393
+ - **Result:** Clean `.claude/trinity/sessions/` and `.claude/trinity/reports/` folders for next session
394
394
 
395
395
  ---
396
396
 
@@ -398,7 +398,7 @@ This will:
398
398
 
399
399
  **Active Session:**
400
400
  ```
401
- trinity/
401
+ .claude/trinity/
402
402
  ├── work-orders/ # Active work orders (not yet completed)
403
403
  ├── investigations/ # Active investigations (not yet completed)
404
404
  ├── sessions/ # Completed WOs/INVs (awaiting archival)
@@ -407,7 +407,7 @@ trinity/
407
407
 
408
408
  **After /trinity-end:**
409
409
  ```
410
- trinity/
410
+ .claude/trinity/
411
411
  ├── work-orders/ # EMPTY (all active work complete or in-progress only)
412
412
  ├── investigations/ # EMPTY (all active investigations complete or in-progress only)
413
413
  ├── sessions/ # EMPTY (all archived)
@@ -433,14 +433,14 @@ trinity/
433
433
  **How Trinity Handles Context Loss:**
434
434
 
435
435
  1. **Documentation Persists:**
436
- - Work orders: `trinity/work-orders/WO-XXX.md`
437
- - Investigations: `trinity/investigations/INV-XXX.md`
438
- - JUNO reports: `trinity/reports/AUDIT-*.md`
439
- - Knowledge base: `trinity/knowledge-base/*.md`
436
+ - Work orders: `.claude/trinity/work-orders/WO-XXX.md`
437
+ - Investigations: `.claude/trinity/investigations/INV-XXX.md`
438
+ - JUNO reports: `.claude/trinity/reports/AUDIT-*.md`
439
+ - Knowledge base: `.claude/trinity/knowledge-base/*.md`
440
440
 
441
441
  2. **When Context Window Is Exceeded:**
442
442
  - Current work is automatically documented
443
- - Session state saved to `trinity/sessions/SESSION-{timestamp}.md`
443
+ - Session state saved to `.claude/trinity/sessions/SESSION-{timestamp}.md`
444
444
  - Use `/trinity-continue` to resume
445
445
  - AJ MAESTRO reads files to understand current state
446
446
  - JUNO reports show what's been completed
@@ -678,7 +678,7 @@ JUNO: Performing comprehensive audit...
678
678
  **Overall Assessment: APPROVED ✅**
679
679
 
680
680
  Audit report saved to:
681
- `trinity/reports/AUDIT-WO-042-2025-12-19.md`
681
+ `.claude/trinity/reports/AUDIT-WO-042-2025-12-19.md`
682
682
 
683
683
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
684
684
 
@@ -837,7 +837,7 @@ JUNO: Auditing investigation completeness...
837
837
  ✅ Recommendations: 3 actionable items with effort estimates
838
838
 
839
839
  **Findings Report:**
840
- `trinity/reports/INV-015-findings-2025-12-19.md`
840
+ `.claude/trinity/reports/INV-015-findings-2025-12-19.md`
841
841
 
842
842
  **Follow-Up Work Orders Created:**
843
843
  - WO-043-database-index-optimization (HIGH priority, 2 hours)
@@ -13,15 +13,15 @@
13
13
  **Install Trinity in 3 steps**:
14
14
 
15
15
  1. **Run Init**: `/infrastructure:trinity-init`
16
- 2. **Wait**: ~30 seconds (deploys 19 agents + knowledge base)
16
+ 2. **Wait**: ~30 seconds (deploys 18 agents + knowledge base)
17
17
  3. **Verify**: `/utility:trinity-verify` (confirm 100% deployment)
18
18
 
19
19
  **What You Get**:
20
- - 19 specialized agents in `.claude/agents/`
20
+ - 18 specialized agents in `.claude/agents/`
21
21
  - 20 slash commands in `.claude/commands/` (6 categories)
22
- - Knowledge base in `trinity/knowledge-base/`
23
- - Work order system in `trinity/work-orders/`
24
- - Documentation templates in `trinity/templates/documentation/`
22
+ - Knowledge base in `.claude/trinity/knowledge-base/`
23
+ - Work order system in `.claude/trinity/work-orders/`
24
+ - Documentation templates in `.claude/trinity/templates/documentation/`
25
25
 
26
26
  **Next Steps**: Run `/session:trinity-start` to begin your first workflow
27
27
 
@@ -36,7 +36,7 @@ Trinity initialization populates the Trinity Method infrastructure with:
36
36
 
37
37
  **Context:** User has run `trinity deploy` and basic Trinity structure exists. Deployment team will now populate and verify all Trinity documents.
38
38
 
39
- **IMPORTANT:** All folders and basic files already exist from deployment. DO NOT attempt to create folders that already exist (trinity/, .claude/, etc.). Focus on POPULATING and VERIFYING content.
39
+ **IMPORTANT:** All folders and basic files already exist from deployment. DO NOT attempt to create folders that already exist (.claude/trinity/, .claude/, etc.). Focus on POPULATING and VERIFYING content.
40
40
 
41
41
  ## Trinity Method Capabilities
42
42
 
@@ -268,7 +268,7 @@ Trinity creates additional CLAUDE.md files when it detects:
268
268
 
269
269
  ### Configuration Override
270
270
 
271
- You can manually specify CLAUDE.md locations in `trinity/config.json`:
271
+ You can manually specify CLAUDE.md locations in `.claude/trinity/config.json`:
272
272
 
273
273
  ```json
274
274
  {
@@ -373,16 +373,16 @@ Suggestions:
373
373
 
374
374
  ### Phase 2: ZEN (Knowledge Base Specialist) - Populate Trinity documentation
375
375
  - Analyze existing codebase
376
- - POPULATE trinity/knowledge-base/ARCHITECTURE.md with detailed architecture analysis
377
- - POPULATE trinity/knowledge-base/ISSUES.md with discovered issues
378
- - POPULATE trinity/knowledge-base/To-do.md with identified tasks
379
- - POPULATE trinity/knowledge-base/Technical-Debt.md with technical debt assessment
376
+ - POPULATE .claude/trinity/knowledge-base/ARCHITECTURE.md with detailed architecture analysis
377
+ - POPULATE .claude/trinity/knowledge-base/ISSUES.md with discovered issues
378
+ - POPULATE .claude/trinity/knowledge-base/To-do.md with identified tasks
379
+ - POPULATE .claude/trinity/knowledge-base/Technical-Debt.md with technical debt assessment
380
380
  - Update existing Trinity.md if needed
381
381
 
382
382
  ### Phase 3: INO (Context Specialist) - Establish context hierarchy
383
383
  - Analyze codebase context and complexity
384
384
  - UPDATE existing CLAUDE.md files with project-specific instructions
385
- - POPULATE trinity/knowledge-base/ISSUES.md database structure
385
+ - POPULATE .claude/trinity/knowledge-base/ISSUES.md database structure
386
386
  - Verify CLAUDE.md hierarchy is complete
387
387
 
388
388
  ### Phase 4: JUNO (Quality Auditor) - Perform comprehensive audit
@@ -390,7 +390,7 @@ Suggestions:
390
390
  - Verify all documentation files are populated (not empty)
391
391
  - Validate CLAUDE.md hierarchy completeness
392
392
  - Check that knowledge base documents have real content
393
- - Generate audit report in trinity/reports/
393
+ - Generate audit report in .claude/trinity/reports/
394
394
  - Report findings to user with compliance score
395
395
 
396
396
  ### Phase 5: EIN (CI/CD Specialist) - Review CI/CD and Pre-commit Configuration
@@ -402,7 +402,6 @@ Suggestions:
402
402
  1. **Check for GitHub Actions workflows:**
403
403
  ```bash
404
404
  ls .github/workflows/ci.yml 2>/dev/null && echo "CI FOUND" || echo "CI NOT_FOUND"
405
- ls .github/workflows/cd.yml 2>/dev/null && echo "CD FOUND" || echo "CD NOT_FOUND"
406
405
  ```
407
406
 
408
407
  2. **Check for pre-commit configuration:**
@@ -412,7 +411,7 @@ Suggestions:
412
411
 
413
412
  **Decision Tree:**
414
413
 
415
- - **IF any CI/CD files exist (ci.yml, cd.yml, OR pre-commit config):**
414
+ - **IF any CI/CD files exist (ci.yml OR pre-commit config):**
416
415
  - ✅ **Invoke EIN** - Adopt EIN (CI/CD Specialist) persona
417
416
  - Continue with "EIN's Responsibilities" below
418
417
  - Include EIN's work in JUNO's audit report
@@ -444,15 +443,7 @@ Suggestions:
444
443
  - **Validate** triggers are correct (push to main/dev, pull requests)
445
444
  - **Confirm** coverage threshold enforcement is configured
446
445
 
447
- **2. GitHub Actions CD Workflow** (if `.github/workflows/cd.yml` exists):
448
- - **Read** the deployed cd.yml file
449
- - **Verify** deployment stages (CI gate → build → staging → production)
450
- - **Validate** CI workflow is called as prerequisite
451
- - **Customize** deployment commands for project type
452
- - **Confirm** environment protection is documented
453
- - **Validate** artifact management (upload/download between jobs)
454
-
455
- **3. Pre-commit Hooks** (if `.pre-commit-config.yaml` exists):
446
+ **2. Pre-commit Hooks** (if `.pre-commit-config.yaml` exists):
456
447
  - **Read** the deployed .pre-commit-config.yaml file
457
448
  - **Verify** all hooks are configured:
458
449
  - Standard hooks (trailing whitespace, YAML/JSON validation, etc.)
@@ -476,12 +467,6 @@ After reviewing and customizing CI/CD files, EIN should report:
476
467
  - Runtime: {{DETECTED_RUNTIME}}
477
468
  - Coverage: ≥80% enforced
478
469
 
479
- - .github/workflows/cd.yml ✅
480
- - Status: Ready (deployment commands customized)
481
- - Staging: Auto-deploy on main branch
482
- - Production: Deploy via version tags (v*)
483
- - Environments: Require setup (see instructions below)
484
-
485
470
  - .pre-commit-config.yaml ✅ (if deployed)
486
471
  - Status: Ready (customized for {{FRAMEWORK}})
487
472
  - Hooks: Linting, type checking, tests
@@ -496,23 +481,15 @@ After reviewing and customizing CI/CD files, EIN should report:
496
481
 
497
482
  **Activation Instructions:**
498
483
 
499
- 📋 **Step 1: Activate GitHub Actions Workflows**
484
+ 📋 **Step 1: Activate GitHub Actions Workflow**
500
485
  ```bash
501
- # Workflows are already in place, just commit and push
502
- git add .github/workflows/ci.yml .github/workflows/cd.yml
503
- git commit -m "Activate Trinity CI/CD pipelines"
486
+ # Workflow is already in place, just commit and push
487
+ git add .github/workflows/ci.yml
488
+ git commit -m "Activate Trinity CI pipeline"
504
489
  git push
505
490
  ```
506
491
 
507
- 📋 **Step 2: Set Up GitHub Environments** (Required for CD)
508
- 1. Go to: Repository Settings → Environments
509
- 2. Create "staging" environment:
510
- - No protection rules needed
511
- 3. Create "production" environment:
512
- - ✅ Enable "Required reviewers" (add team members)
513
- - ⏱️ Optional: "Wait timer" (e.g., 5 minutes before deploy)
514
-
515
- 📋 **Step 3: Activate Pre-commit Hooks** (Optional but Recommended)
492
+ 📋 **Step 2: Activate Pre-commit Hooks** (Optional but Recommended)
516
493
  ```bash
517
494
  # Install pre-commit framework
518
495
  pip install pre-commit
@@ -51,7 +51,7 @@ Define completion criteria:
51
51
 
52
52
  **Step 6: Template Selection**
53
53
  Offer templates based on investigation type:
54
- - Standard templates (from trinity/templates/investigations/)
54
+ - Standard templates (from .claude/trinity/templates/investigations/)
55
55
  - Custom templates (from user's template library)
56
56
  - Generate new template
57
57
 
@@ -60,7 +60,7 @@ Show investigation summary and confirm creation.
60
60
 
61
61
  **Output:**
62
62
  Create investigation file at:
63
- `trinity/investigations/INV-XXX-{title}.md`
63
+ `.claude/trinity/investigations/INV-XXX-{title}.md`
64
64
 
65
65
  **Post-Creation:**
66
66
  Ask if user wants to:
@@ -69,13 +69,13 @@ Ask if user wants to:
69
69
  - Schedule for later
70
70
 
71
71
  **Orchestration:**
72
- Once investigation is created in `trinity/investigations/`, execute it:
72
+ Once investigation is created in `.claude/trinity/investigations/`, execute it:
73
73
 
74
74
  ```bash
75
75
  /trinity-orchestrate @INV-001-example-investigation.md
76
76
  ```
77
77
 
78
- **AJ MAESTRO** picks up the investigation from `trinity/investigations/` and orchestrates the investigation, leaving findings in `trinity/reports/`.
78
+ **AJ MAESTRO** picks up the investigation from `.claude/trinity/investigations/` and orchestrates the investigation, leaving findings in `.claude/trinity/reports/`.
79
79
 
80
80
  **CRITICAL: Investigation Protocol**
81
81
  ⚠️ **INVESTIGATIONS ARE READ-ONLY OPERATIONS**
@@ -112,7 +112,7 @@ INV-012-authentication-flow-review.md
112
112
  INV-025-database-query-optimization.md
113
113
  ```
114
114
 
115
- **Auto-Numbering**: System scans `trinity/investigations/` and assigns next number
115
+ **Auto-Numbering**: System scans `.claude/trinity/investigations/` and assigns next number
116
116
 
117
117
  ---
118
118
 
@@ -450,11 +450,11 @@ Is it new functionality?
450
450
 
451
451
  ```bash
452
452
  # Copy template to investigations folder
453
- cp trinity/templates/investigations/[type].md \
454
- trinity/investigations/INV-XXX-[title].md
453
+ cp .claude/trinity/templates/investigations/[type].md \
454
+ .claude/trinity/investigations/INV-XXX-[title].md
455
455
 
456
456
  # Fill out investigation
457
- # Edit: trinity/investigations/INV-XXX-[title].md
457
+ # Edit: .claude/trinity/investigations/INV-XXX-[title].md
458
458
  ```
459
459
 
460
460
  ### 2. Link to Design Doc
@@ -462,7 +462,7 @@ cp trinity/templates/investigations/[type].md \
462
462
  Every investigation should reference the Design Doc:
463
463
 
464
464
  ```markdown
465
- **Design Doc:** [Link to trinity/design-docs/[name].md]
465
+ **Design Doc:** [Link to .claude/trinity/design-docs/[name].md]
466
466
  ```
467
467
 
468
468
  ### 3. Complete Investigation Thoroughly
@@ -483,10 +483,10 @@ Every investigation should reference the Design Doc:
483
483
  ```
484
484
 
485
485
  This command will:
486
- - Archive all completed investigations to `trinity/archive/investigations/`
487
- - Archive work orders to `trinity/archive/work-orders/`
488
- - Archive reports to `trinity/archive/reports/`
489
- - Archive session logs to `trinity/archive/sessions/`
486
+ - Archive all completed investigations to `.claude/trinity/archive/investigations/`
487
+ - Archive work orders to `.claude/trinity/archive/work-orders/`
488
+ - Archive reports to `.claude/trinity/archive/reports/`
489
+ - Archive session logs to `.claude/trinity/archive/sessions/`
490
490
  - Organize archives by date (YYYY-MM format)
491
491
 
492
492
  ## Integration with Workflow Orchestration
@@ -573,7 +573,7 @@ Templates work seamlessly with `/trinity-orchestrate`:
573
573
 
574
574
  After deployment, templates are located in:
575
575
  ```
576
- trinity/templates/investigations/
576
+ .claude/trinity/templates/investigations/
577
577
  ├── bug.md
578
578
  ├── performance.md
579
579
  ├── security.md
@@ -687,7 +687,7 @@ After investigating templates, verify your findings:
687
687
  ```bash
688
688
  # Count template files
689
689
  find src/templates -name "*.template" | wc -l
690
- # Expected: 19 agent templates + knowledge base templates
690
+ # Expected: 18 agent templates + knowledge base templates
691
691
 
692
692
  # Verify organization
693
693
  ls -la src/templates/agents/leadership/
@@ -76,7 +76,7 @@ graph TD
76
76
 
77
77
  **Output:**
78
78
  Save investigation plan to:
79
- `trinity/investigations/plans/PLAN-{investigation-title}.md`
79
+ `.claude/trinity/investigations/plans/PLAN-{investigation-title}.md`
80
80
 
81
81
  **Plan Includes:**
82
82
  - Executive summary
@@ -8,7 +8,7 @@
8
8
 
9
9
  **Use Case:** Ensure CHANGELOG.md exists, follows Keep-a-Changelog format, and documents project changes.
10
10
 
11
- **Deliverable:** CHANGELOG audit report in `trinity/reports/CHANGELOG-AUDIT-{date}.md`
11
+ **Deliverable:** CHANGELOG audit report in `.claude/trinity/reports/CHANGELOG-AUDIT-{date}.md`
12
12
 
13
13
  ---
14
14
 
@@ -431,7 +431,7 @@ if (missing_categories.length > 0) {
431
431
 
432
432
  ### Phase 3: CHANGELOG Audit Report
433
433
 
434
- **APO Generates:** `trinity/reports/CHANGELOG-AUDIT-{date}.md`
434
+ **APO Generates:** `.claude/trinity/reports/CHANGELOG-AUDIT-{date}.md`
435
435
 
436
436
  **Required Report Structure:**
437
437
 
@@ -557,7 +557,7 @@ if (missing_categories.length > 0) {
557
557
  ---
558
558
 
559
559
  **Report Generated:** {timestamp}
560
- **Report Location:** trinity/reports/CHANGELOG-AUDIT-{date}.md
560
+ **Report Location:** .claude/trinity/reports/CHANGELOG-AUDIT-{date}.md
561
561
  ```
562
562
 
563
563
  ---
@@ -583,7 +583,7 @@ if (missing_categories.length > 0) {
583
583
 
584
584
  **After `/trinity-changelog` completes, verify:**
585
585
 
586
- 1. ✅ Check `trinity/reports/CHANGELOG-AUDIT-{date}.md`
586
+ 1. ✅ Check `.claude/trinity/reports/CHANGELOG-AUDIT-{date}.md`
587
587
  2. ✅ Verify CHANGELOG.md exists in root
588
588
  3. ✅ Check [Unreleased] section present
589
589
  4. ✅ Verify format score ≥ 60/100
@@ -60,13 +60,13 @@ fi
60
60
 
61
61
  **Agent:** JUNO (Quality Auditor)
62
62
  **Mode:** AUDIT + REPORT (Creates audit report file only)
63
- **Output:** `trinity/reports/DOCS-UPDATE-AUDIT-{{DATE}}.md`
63
+ **Output:** `.claude/trinity/reports/DOCS-UPDATE-AUDIT-{{DATE}}.md`
64
64
 
65
65
  ### Step 1.1: Execute JUNO Audit
66
66
 
67
67
  1. **Read the audit checklist template:**
68
68
  ```
69
- trinity/templates/documentation/reports/juno-docs-update-checklist.md
69
+ .claude/trinity/templates/documentation/reports/juno-docs-update-checklist.md
70
70
  ```
71
71
 
72
72
  2. **Follow all instructions in the checklist** to perform the comprehensive audit
@@ -75,7 +75,7 @@ fi
75
75
 
76
76
  4. **Save the report to:**
77
77
  ```
78
- trinity/reports/DOCS-UPDATE-AUDIT-{{DATE}}.md
78
+ .claude/trinity/reports/DOCS-UPDATE-AUDIT-{{DATE}}.md
79
79
  ```
80
80
 
81
81
  ---
@@ -95,7 +95,7 @@ Use the Task tool to launch all three APO agents simultaneously:
95
95
  3. **APO-3** - New business logic documentation (second half)
96
96
 
97
97
  Each APO will:
98
- 1. Read the APO checklist template: `trinity/templates/documentation/reports/apo-docs-update-checklist.md`
98
+ 1. Read the APO checklist template: `.claude/trinity/templates/documentation/reports/apo-docs-update-checklist.md`
99
99
  2. Execute all instructions in the checklist
100
100
  3. Complete their assigned work from JUNO's audit report
101
101
 
@@ -141,9 +141,9 @@ Use the Task tool to launch JUNO with this prompt:
141
141
  **Instructions:**
142
142
 
143
143
  1. Read all three APO checklists:
144
- - trinity/reports/apo-1-docs-update-checklist.md
145
- - trinity/reports/apo-2-docs-update-checklist.md
146
- - trinity/reports/apo-3-docs-update-checklist.md
144
+ - .claude/trinity/reports/apo-1-docs-update-checklist.md
145
+ - .claude/trinity/reports/apo-2-docs-update-checklist.md
146
+ - .claude/trinity/reports/apo-3-docs-update-checklist.md
147
147
 
148
148
  2. For each checklist, count:
149
149
  - Total tasks assigned
@@ -190,7 +190,7 @@ Use the Task tool to launch JUNO with this prompt:
190
190
  **Instructions:**
191
191
 
192
192
  1. Read your personal checklist:
193
- - trinity/reports/apo-{{DESIGNATION}}-docs-update-checklist.md
193
+ - .claude/trinity/reports/apo-{{DESIGNATION}}-docs-update-checklist.md
194
194
 
195
195
  2. Find the FIRST task marked [ ] (unchecked)
196
196
 
@@ -225,7 +225,7 @@ Use the Task tool to launch JUNO with this prompt:
225
225
  **Instructions:**
226
226
 
227
227
  1. Read JUNO's original audit report:
228
- - trinity/reports/DOCS-UPDATE-AUDIT-{{DATE}}.md
228
+ - .claude/trinity/reports/DOCS-UPDATE-AUDIT-{{DATE}}.md
229
229
 
230
230
  2. For each item that was assigned to APOs, verify:
231
231
  - File was created/updated (check file exists)
@@ -240,7 +240,7 @@ Use the Task tool to launch JUNO with this prompt:
240
240
  - Check for outdated information
241
241
 
242
242
  4. Generate verification report:
243
- - Save to: trinity/reports/DOCS-UPDATE-VERIFICATION-{{DATE}}.md
243
+ - Save to: .claude/trinity/reports/DOCS-UPDATE-VERIFICATION-{{DATE}}.md
244
244
  - Include: Coverage percentage, accuracy percentage, issues found
245
245
 
246
246
  5. Determine final status: