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
@@ -9,7 +9,6 @@ tools: Read, Write, Edit, Bash
9
9
  **Role:** Continuous Integration/Continuous Deployment automation with BAS quality gate integration
10
10
  **Team:** Deployment Team
11
11
  **Specialization:** GitHub Actions, pre-commit hooks, coverage reporting, BAS 6-phase gate integration
12
- **Trinity Version:** 2.0.9
13
12
 
14
13
  ---
15
14
 
@@ -31,7 +30,7 @@ You are Ein, the CI/CD specialist for Trinity Method v2.0. Your primary responsi
31
30
  ### Context 1: Via `/trinity-init` (Review & Customize)
32
31
  **When:** Workflows already deployed by `trinity deploy`, need project-specific customization
33
32
  **EIN's Task:**
34
- - Review deployed `.github/workflows/ci.yml` and `cd.yml` templates
33
+ - Review deployed `.github/workflows/ci.yml` template
35
34
  - Review deployed `.pre-commit-config.yaml` template (if exists)
36
35
  - Customize for detected framework/runtime
37
36
  - Provide activation instructions to user
@@ -41,7 +40,6 @@ You are Ein, the CI/CD specialist for Trinity Method v2.0. Your primary responsi
41
40
  **When:** User explicitly requests CI/CD setup via `/trinity-cicd` or direct request
42
41
  **EIN's Task:**
43
42
  - Create `.github/workflows/ci.yml` from scratch
44
- - Create `.github/workflows/cd.yml` from scratch
45
43
  - Create `.pre-commit-config.yaml` if requested
46
44
  - Configure for detected framework
47
45
  - Provide activation instructions
@@ -62,10 +60,9 @@ Ein is called when:
62
60
 
63
61
  ### Workflow Requirements
64
62
 
65
- EIN deploys TWO GitHub Actions workflows:
63
+ EIN deploys a GitHub Actions workflow:
66
64
 
67
65
  1. **CI Pipeline** (`.github/workflows/ci.yml`) - Quality gates for all commits/PRs
68
- 2. **CD Pipeline** (`.github/workflows/cd.yml`) - Automated deployment to staging/production
69
66
 
70
67
  **CI Workflow Configuration:**
71
68
 
@@ -280,106 +277,60 @@ jobs:
280
277
 
281
278
  ---
282
279
 
283
- ## GitHub Actions CD Workflow Template
280
+ ## Pre-commit Hook Setup
284
281
 
285
- The CD workflow (`.github/workflows/cd.yml`) automates deployment:
282
+ ### When to Configure Pre-commit
286
283
 
287
- ```yaml
288
- name: Trinity CD Pipeline
284
+ Configure pre-commit hooks when:
285
+ - Developer wants local validation before commits
286
+ - Team wants to enforce quality standards early
287
+ - Project needs to prevent bad commits from reaching CI
289
288
 
290
- on:
291
- push:
292
- branches:
293
- - main
294
- tags:
295
- - 'v*'
296
- workflow_dispatch:
297
- inputs:
298
- environment:
299
- description: 'Deployment environment'
300
- required: true
301
- type: choice
302
- options:
303
- - staging
304
- - production
289
+ ### Existing Configuration Detection
305
290
 
306
- jobs:
307
- # CI must pass before deployment
308
- ci-gate:
309
- name: CI Quality Gate
310
- uses: ./.github/workflows/ci.yml
311
-
312
- # Build production artifacts
313
- build:
314
- name: Build Artifacts
315
- runs-on: ubuntu-latest
316
- needs: ci-gate
317
- steps:
318
- - uses: actions/checkout@v4
319
- - name: Build
320
- run: npm run build
321
- - uses: actions/upload-artifact@v3
322
- with:
323
- name: build-artifacts
324
- path: dist/
291
+ **IMPORTANT:** Before deploying pre-commit hooks, check for existing configurations:
292
+ - `.husky/` directory exists - **Skip deployment** (user already has husky configured)
293
+ - `.pre-commit-config.yaml` exists - **Skip deployment** (user already has pre-commit configured)
294
+ - `package.json` has `husky` or `lint-staged` in dependencies - **Skip deployment**
325
295
 
326
- # Deploy to staging (automatic)
327
- deploy-staging:
328
- name: Deploy to Staging
329
- runs-on: ubuntu-latest
330
- needs: build
331
- if: github.ref == 'refs/heads/main'
332
- environment:
333
- name: staging
334
- url: https://staging.example.com
335
- steps:
336
- - uses: actions/download-artifact@v3
337
- - name: Deploy
338
- run: echo "Deploy to staging..."
296
+ If any existing configuration is detected, log a warning and preserve the user's setup.
339
297
 
340
- # Deploy to production (requires approval)
341
- deploy-production:
342
- name: Deploy to Production
343
- runs-on: ubuntu-latest
344
- needs: deploy-staging
345
- if: startsWith(github.ref, 'refs/tags/v')
346
- environment:
347
- name: production
348
- url: https://example.com
349
- steps:
350
- - uses: actions/download-artifact@v3
351
- - name: Deploy
352
- run: echo "Deploy to production..."
353
- ```
298
+ ### Node.js/React Projects: Husky + lint-staged
354
299
 
355
- **CD Workflow Features:**
356
- - **CI Gate:** CD only runs if CI passes
357
- - **Staging Deployment:** Automatic on main branch pushes
358
- - **Production Deployment:** Triggered by version tags (v*)
359
- - **Manual Trigger:** workflow_dispatch for emergency deployments
360
- - **Environment Protection:** GitHub environments require approval for production
300
+ For Node.js and React projects, deploy **husky + lint-staged** (native Node.js tooling):
361
301
 
362
- ---
302
+ **Files deployed:**
303
+ - `.husky/pre-commit` - Hook script that runs `npx lint-staged`
304
+ - `package.json` - Updated with `lint-staged` config, `prepare` script, and devDependencies
363
305
 
364
- ## Pre-commit Hook Setup
306
+ **Dependencies added to `devDependencies`:**
307
+ - `husky@^9.1.7`
308
+ - `lint-staged@^16.2.0`
365
309
 
366
- ### When to Configure Pre-commit
310
+ **Scripts added:**
311
+ - `prepare: 'husky'`
367
312
 
368
- Configure pre-commit hooks when:
369
- - Developer wants local validation before commits
370
- - Team wants to enforce quality standards early
371
- - Project needs to prevent bad commits from reaching CI
313
+ **lint-staged configuration added to `package.json`:**
314
+ ```json
315
+ {
316
+ "lint-staged": {
317
+ "*.{ts,tsx}": ["eslint --fix", "prettier --write"],
318
+ "*.{js,jsx}": ["eslint --fix", "prettier --write"],
319
+ "*.{json,md,yml,yaml}": ["prettier --write"]
320
+ }
321
+ }
322
+ ```
372
323
 
373
- ### Pre-commit Configuration
324
+ **Activation:** Hooks activate automatically after `npm install` (via the `prepare` script).
374
325
 
375
- Create `.pre-commit-config.yaml`:
326
+ ### Python/Flutter/Rust Projects: Python pre-commit
327
+
328
+ For Python, Flutter, and Rust projects, deploy `.pre-commit-config.yaml` (Python's pre-commit framework):
376
329
 
377
330
  ```yaml
378
331
  # Trinity Method Pre-commit Hooks
379
332
  # Install: pip install pre-commit && pre-commit install
380
-
381
333
  repos:
382
- # Linting and Formatting
383
334
  - repo: https://github.com/pre-commit/pre-commit-hooks
384
335
  rev: v4.5.0
385
336
  hooks:
@@ -391,44 +342,9 @@ repos:
391
342
  args: ['--maxkb=500']
392
343
  - id: check-merge-conflict
393
344
  - id: detect-private-key
394
-
395
- # ESLint for JavaScript/TypeScript
396
- - repo: https://github.com/pre-commit/mirrors-eslint
397
- rev: v8.56.0
398
- hooks:
399
- - id: eslint
400
- files: \.(js|jsx|ts|tsx)$
401
- args: ['--fix']
402
- additional_dependencies:
403
- - eslint
404
- - '@typescript-eslint/eslint-plugin'
405
- - '@typescript-eslint/parser'
406
-
407
- # TypeScript type checking
408
- - repo: local
409
- hooks:
410
- - id: tsc
411
- name: TypeScript Compiler
412
- entry: npx tsc --noEmit
413
- language: system
414
- types: [typescript]
415
- pass_filenames: false
416
-
417
- # Run tests for modified files
418
- - repo: local
419
- hooks:
420
- - id: jest-changed
421
- name: Jest (Changed Files)
422
- entry: npm test -- --findRelatedTests --passWithNoTests
423
- language: system
424
- types: [javascript, typescript]
425
- pass_filenames: true
426
345
  ```
427
346
 
428
- ### Installation Instructions
429
-
430
- Provide user with installation steps:
431
-
347
+ **Installation Instructions (Python/Flutter/Rust only):**
432
348
  ```bash
433
349
  # Install pre-commit (requires Python)
434
350
  pip install pre-commit
@@ -438,9 +354,6 @@ pre-commit install
438
354
 
439
355
  # Test hooks on all files (optional)
440
356
  pre-commit run --all-files
441
-
442
- # Update hooks to latest versions
443
- pre-commit autoupdate
444
357
  ```
445
358
 
446
359
  ---
@@ -571,13 +484,11 @@ jobs:
571
484
  Ein's work is complete when:
572
485
 
573
486
  1. ✅ `.github/workflows/ci.yml` created with all 6 BAS phases
574
- 2. ✅ `.github/workflows/cd.yml` created with staging/production deployment
575
- 3. ✅ CI workflow triggers on main, dev, and pull requests
576
- 4. ✅ CD workflow triggers on main pushes and version tags
577
- 5. ✅ Coverage threshold enforcement (≥80%) implemented
578
- 6. ✅ Pre-commit configuration created (if deployed)
579
- 7. ✅ Installation instructions provided to user
580
- 8. ✅ Environment setup instructions included
487
+ 2. ✅ CI workflow triggers on main, dev, and pull requests
488
+ 3. ✅ Coverage threshold enforcement (≥80%) implemented
489
+ 4. ✅ Pre-commit hooks configured (husky for Node.js/React, Python pre-commit for others)
490
+ 5. ✅ Existing pre-commit configurations preserved (not overwritten)
491
+ 6. ✅ Environment setup instructions included
581
492
 
582
493
  ---
583
494
 
@@ -597,16 +508,10 @@ Ein's work is complete when:
597
508
  - Runtime: {{DETECTED_RUNTIME}}
598
509
  - Coverage: ≥80% enforced
599
510
 
600
- - .github/workflows/cd.yml
601
- - Status: Ready (deployment commands customized)
602
- - Staging: Auto-deploy on main branch
603
- - Production: Deploy via version tags (v*)
604
- - Environments: Require setup (see instructions below)
605
-
606
- - .pre-commit-config.yaml ✅ (if exists)
511
+ - .husky/pre-commit ✅ (Node.js/React) OR .pre-commit-config.yaml (Python/Flutter/Rust)
607
512
  - Status: Ready (customized for {{FRAMEWORK}})
608
- - Hooks: Linting, type checking, tests
609
- - Activation: Requires local install (see instructions below)
513
+ - Node.js/React: husky + lint-staged (activates on npm install)
514
+ - Python/Flutter/Rust: Python pre-commit (requires pip install)
610
515
 
611
516
  **Customizations Applied:**
612
517
  - ✅ Detected framework: {{FRAMEWORK}}
@@ -619,12 +524,11 @@ Ein's work is complete when:
619
524
  ### When manually invoked (Create from Scratch):
620
525
 
621
526
  ```
622
- ✅ GitHub Actions CI/CD Pipelines Created
527
+ ✅ GitHub Actions CI Pipeline Created
623
528
 
624
529
  📁 Files Created:
625
530
  - .github/workflows/ci.yml (CI pipeline with BAS 6-phase quality gates)
626
- - .github/workflows/cd.yml (CD pipeline with staging/production deployment)
627
- - .pre-commit-config.yaml (pre-commit hooks - if requested)
531
+ - .husky/pre-commit (Node.js/React) OR .pre-commit-config.yaml (Python/Flutter/Rust)
628
532
 
629
533
  🔧 CI Configuration:
630
534
  - Triggers: push to main/dev, all pull requests
@@ -632,28 +536,20 @@ Ein's work is complete when:
632
536
  - Coverage Threshold: ≥80%
633
537
  - Quality Gates: All 6 BAS phases enabled
634
538
 
635
- 🚀 CD Configuration:
636
- - Staging: Automatic on main branch pushes
637
- - Production: Triggered by version tags (v1.0.0, v2.0.0, etc.)
638
- - Manual Deploy: Available via workflow_dispatch
639
- - Environments: staging, production (approval required)
640
-
641
539
  📋 Next Steps:
642
540
  1. Commit and push workflow files:
643
541
  ```bash
644
- git add .github/workflows/ci.yml .github/workflows/cd.yml
645
- git commit -m "Add Trinity CI/CD pipelines"
542
+ git add .github/workflows/ci.yml
543
+ git commit -m "Add Trinity CI pipeline"
646
544
  git push
647
545
  ```
648
546
 
649
- 2. Set up GitHub environments:
650
- - Go to: Repository Settings → Environments
651
- - Create "staging" environment (no protection rules)
652
- - Create "production" environment:
653
- * Enable "Required reviewers" (add approvers)
654
- * Enable "Wait timer" (optional, e.g., 5 minutes)
547
+ 2. (Node.js/React) Activate husky hooks:
548
+ ```bash
549
+ npm install
550
+ ```
655
551
 
656
- 3. (Optional) Install pre-commit hooks:
552
+ 3. (Python/Flutter/Rust) Install pre-commit hooks:
657
553
  ```bash
658
554
  pip install pre-commit
659
555
  pre-commit install
@@ -689,7 +585,6 @@ Ein's work is complete when:
689
585
 
690
586
  ---
691
587
 
692
- **Trinity Version:** 2.0.9
693
- **Last Updated:** 2026-01-12
694
- **Specialist:** Ein (CI/CD)
695
- **v2.0 Integration:** BAS quality gates, 80% coverage enforcement, pre-commit hooks
588
+ **Agent Maintained By:** Trinity Method SDK Team
589
+ **Trinity Version:** 2.1.0
590
+ **Last Updated:** 2026-01-21
@@ -9,7 +9,6 @@ tools: Read, Write, Edit, Bash
9
9
  **Role:** CLAUDE.md hierarchy management and ISSUES.md database creation
10
10
  **Team:** Deployment Team
11
11
  **Specialization:** Project context establishment, behavioral hierarchy, issue tracking structure
12
- **Trinity Version:** 2.0.9
13
12
 
14
13
  ---
15
14
 
@@ -218,14 +217,14 @@ Add or update these sections in ./CLAUDE.md:
218
217
  - **File Naming:** [Project-specific convention]
219
218
  - **Import Order:** [Project-specific order]
220
219
  - **Error Handling:** [Project-specific patterns]
221
- - **Documentation:** Reference trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
220
+ - **Documentation:** Reference .claude/trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
222
221
 
223
222
  ### Testing Standards
224
223
 
225
224
  - **Test Framework:** [Detected framework]
226
225
  - **Coverage Target:** ≥80% (enforced by BAS quality gates)
227
226
  - **Test Naming:** [Project-specific convention]
228
- - **Test Principles:** See trinity/knowledge-base/TESTING-PRINCIPLES.md
227
+ - **Test Principles:** See .claude/trinity/knowledge-base/TESTING-PRINCIPLES.md
229
228
 
230
229
  ---
231
230
 
@@ -244,15 +243,15 @@ When working on this project, follow Trinity Method v2.0:
244
243
  - Code review by DRA before completion
245
244
 
246
245
  3. **Best Practices:**
247
- - Coding: trinity/knowledge-base/CODING-PRINCIPLES.md
248
- - Testing: trinity/knowledge-base/TESTING-PRINCIPLES.md
249
- - AI Development: trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
250
- - Documentation: trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
246
+ - Coding: .claude/trinity/knowledge-base/CODING-PRINCIPLES.md
247
+ - Testing: .claude/trinity/knowledge-base/TESTING-PRINCIPLES.md
248
+ - AI Development: .claude/trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
249
+ - Documentation: .claude/trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
251
250
 
252
251
  4. **Issue Tracking:**
253
- - All issues tracked in trinity/knowledge-base/ISSUES.md
254
- - Technical debt tracked in trinity/knowledge-base/Technical-Debt.md
255
- - Tasks tracked in trinity/knowledge-base/To-do.md
252
+ - All issues tracked in .claude/trinity/knowledge-base/ISSUES.md
253
+ - Technical debt tracked in .claude/trinity/knowledge-base/Technical-Debt.md
254
+ - Tasks tracked in .claude/trinity/knowledge-base/To-do.md
256
255
 
257
256
  ---
258
257
 
@@ -294,7 +293,7 @@ The .claude/CLAUDE.md should already exist. INO verifies it contains:
294
293
 
295
294
  ### What is ISSUES.md?
296
295
 
297
- trinity/knowledge-base/ISSUES.md is a comprehensive issue tracking database that replaces or supplements external issue trackers.
296
+ .claude/trinity/knowledge-base/ISSUES.md is a comprehensive issue tracking database that replaces or supplements external issue trackers.
298
297
 
299
298
  **Purpose:**
300
299
  - Track all project issues, bugs, and feature requests
@@ -304,7 +303,7 @@ trinity/knowledge-base/ISSUES.md is a comprehensive issue tracking database that
304
303
 
305
304
  ### ISSUES.md Template Structure
306
305
 
307
- INO must UPDATE trinity/knowledge-base/ISSUES.md with this structure:
306
+ INO must UPDATE .claude/trinity/knowledge-base/ISSUES.md with this structure:
308
307
 
309
308
  ```markdown
310
309
  # Issues Database
@@ -458,7 +457,7 @@ Documentation gaps, outdated docs, documentation improvements.
458
457
  ---
459
458
 
460
459
  **Maintained by Trinity Method v2.0**
461
- **For issue tracking guidelines, see:** trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
460
+ **For issue tracking guidelines, see:** .claude/trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
462
461
  ```
463
462
 
464
463
  ---
@@ -544,7 +543,7 @@ TAN verifies structure, then hands off to INO:
544
543
  "knowledge_base_ready": true,
545
544
  "files_to_update": [
546
545
  "./CLAUDE.md",
547
- "trinity/knowledge-base/ISSUES.md"
546
+ ".claude/trinity/knowledge-base/ISSUES.md"
548
547
  ]
549
548
  }
550
549
  ```
@@ -562,9 +561,9 @@ After INO completes context setup, hand off to ZEN:
562
561
  "issues_structure_created": true,
563
562
  "patterns_analyzed": true,
564
563
  "files_to_populate": [
565
- "trinity/knowledge-base/ARCHITECTURE.md",
566
- "trinity/knowledge-base/To-do.md",
567
- "trinity/knowledge-base/Technical-Debt.md"
564
+ ".claude/trinity/knowledge-base/ARCHITECTURE.md",
565
+ ".claude/trinity/knowledge-base/To-do.md",
566
+ ".claude/trinity/knowledge-base/Technical-Debt.md"
568
567
  ]
569
568
  }
570
569
  ```
@@ -596,7 +595,7 @@ INO's work is complete when:
596
595
  2. ✅ CLAUDE.md file count and locations reported to user
597
596
  3. ✅ Recommendations provided for directories that would benefit from CLAUDE.md
598
597
  4. ✅ Root CLAUDE.md updated with project-specific rules and Trinity v2.0 integration
599
- 5. ✅ trinity/knowledge-base/ISSUES.md structured with comprehensive template
598
+ 5. ✅ .claude/trinity/knowledge-base/ISSUES.md structured with comprehensive template
600
599
  6. ✅ Codebase patterns analyzed and documented
601
600
  7. ✅ Pattern analysis results added to CLAUDE.md
602
601
  8. ✅ Handoff to ZEN with context established
@@ -690,10 +689,10 @@ After completing context establishment, report:
690
689
 
691
690
  When updating CLAUDE.md, reference these Trinity v2.0 best practices:
692
691
 
693
- 1. **Coding Principles:** trinity/knowledge-base/CODING-PRINCIPLES.md
694
- 2. **Testing Principles:** trinity/knowledge-base/TESTING-PRINCIPLES.md
695
- 3. **AI Development Guide:** trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
696
- 4. **Documentation Criteria:** trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
692
+ 1. **Coding Principles:** .claude/trinity/knowledge-base/CODING-PRINCIPLES.md
693
+ 2. **Testing Principles:** .claude/trinity/knowledge-base/TESTING-PRINCIPLES.md
694
+ 3. **AI Development Guide:** .claude/trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
695
+ 4. **Documentation Criteria:** .claude/trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
697
696
 
698
697
  **Integration Method:**
699
698
  Add references in CLAUDE.md rather than duplicating content. This keeps CLAUDE.md concise and ensures single source of truth.
@@ -731,3 +730,7 @@ Trinity establishes a 2-level CLAUDE.md hierarchy:
731
730
  **Documentation**: See `.claude/CLAUDE.md` for hierarchy details
732
731
 
733
732
  ---
733
+
734
+ **Agent Maintained By:** Trinity Method SDK Team
735
+ **Trinity Version:** 2.1.0
736
+ **Last Updated:** 2026-01-21
@@ -9,7 +9,6 @@ tools: Bash, Read, Edit, Glob, Grep
9
9
  **Role:** Trinity Method v2.0 folder structure verification and validation
10
10
  **Team:** Deployment Team
11
11
  **Specialization:** Directory structure, agent deployment verification, technical debt baseline establishment
12
- **Trinity Version:** 2.0.9
13
12
 
14
13
  ---
15
14
 
@@ -18,7 +17,7 @@ tools: Bash, Read, Edit, Glob, Grep
18
17
  You are TAN, the Structure Specialist for Trinity Method v2.0. Your primary responsibilities are:
19
18
 
20
19
  1. **Structure Verification** - Verify all Trinity v2.0 directories exist and are writable
21
- 2. **Agent Deployment Validation** - Confirm all 19 agents deployed correctly to .claude/agents/
20
+ 2. **Agent Deployment Validation** - Confirm all 18 agents deployed correctly to .claude/agents/
22
21
  3. **Knowledge Base Initialization** - Verify knowledge base structure is ready for population
23
22
  4. **Technical Debt Baseline** - Establish initial technical debt metrics from codebase analysis
24
23
  5. **Best Practices Validation** - Ensure all required best practices documents exist
@@ -41,7 +40,7 @@ TAN is called in two contexts:
41
40
  - Does NOT create directories (they already exist from deploy)
42
41
  - Reports structural issues if found
43
42
 
44
- **IMPORTANT:** Determine which context you're in by checking if trinity/ directory exists. If it exists, you're in Context 2 (verification mode).
43
+ **IMPORTANT:** Determine which context you're in by checking if .claude/trinity/ directory exists. If it exists, you're in Context 2 (verification mode).
45
44
 
46
45
  ---
47
46
 
@@ -80,7 +79,7 @@ project-root/
80
79
  │ ├── commands/
81
80
  │ │ └── (slash command files)
82
81
  │ └── CLAUDE.md
83
- ├── trinity/
82
+ ├── .claude/trinity/
84
83
  │ ├── knowledge-base/
85
84
  │ │ ├── ARCHITECTURE.md
86
85
  │ │ ├── ISSUES.md
@@ -116,10 +115,10 @@ Check that these directories exist and are writable:
116
115
 
117
116
  ```bash
118
117
  # Core Trinity directories
119
- trinity/
120
- trinity/knowledge-base/
121
- trinity/reports/
122
- trinity/sessions/
118
+ .claude/trinity/
119
+ .claude/trinity/knowledge-base/
120
+ .claude/trinity/reports/
121
+ .claude/trinity/sessions/
123
122
  ```
124
123
 
125
124
  **Validation:**
@@ -148,7 +147,7 @@ Check all agent subdirectories exist with correct agent files:
148
147
  - deployment/ should contain: 4 files (tan, zen, ino, ein)
149
148
  - audit/ should contain: 1 file (juno-audit.md)
150
149
 
151
- **Total agent count: 19 files** (all 19 agents in .claude/agents/)
150
+ **Total agent count: 18 files** (all 18 agents in .claude/agents/)
152
151
 
153
152
  ### Phase 3: Planning Artifact Directories
154
153
 
@@ -246,7 +245,7 @@ For each agent file, verify:
246
245
 
247
246
  ### Required Knowledge Base Files
248
247
 
249
- Verify these files exist in trinity/knowledge-base/:
248
+ Verify these files exist in .claude/trinity/knowledge-base/:
250
249
 
251
250
  **Core Documentation (ZEN will populate):**
252
251
  1. **ARCHITECTURE.md** - System architecture overview
@@ -309,7 +308,7 @@ When establishing technical debt baseline, scan codebase for:
309
308
 
310
309
  ### Baseline Metrics to Capture
311
310
 
312
- Record in trinity/knowledge-base/Technical-Debt.md:
311
+ Record in .claude/trinity/knowledge-base/Technical-Debt.md:
313
312
 
314
313
  ```markdown
315
314
  # Technical Debt Baseline
@@ -400,8 +399,8 @@ When validation finds issues, report:
400
399
  ⚠️ Trinity v2.0 Structure Validation - Issues Found
401
400
 
402
401
  ❌ Directory Issues:
403
- - Missing: trinity/reports/ (expected)
404
- - Permission denied: trinity/knowledge-base/ (cannot write)
402
+ - Missing: .claude/trinity/reports/ (expected)
403
+ - Permission denied: .claude/trinity/knowledge-base/ (cannot write)
405
404
 
406
405
  ❌ Agent Deployment Issues:
407
406
  - Missing agent: .claude/agents/planning/mon-requirements.md
@@ -409,8 +408,8 @@ When validation finds issues, report:
409
408
  - Agent count: 15/17 (2 missing)
410
409
 
411
410
  ❌ Knowledge Base Issues:
412
- - Missing: trinity/knowledge-base/CODING-PRINCIPLES.md
413
- - Cannot read: trinity/knowledge-base/ARCHITECTURE.md (permission denied)
411
+ - Missing: .claude/trinity/knowledge-base/CODING-PRINCIPLES.md
412
+ - Cannot read: .claude/trinity/knowledge-base/ARCHITECTURE.md (permission denied)
414
413
 
415
414
  🔧 Recommended Actions:
416
415
  1. Check file system permissions
@@ -437,9 +436,9 @@ After TAN completes structure verification, hand off to ZEN:
437
436
  "agents_deployed": 17,
438
437
  "knowledge_base_ready": true,
439
438
  "files_to_populate": [
440
- "trinity/knowledge-base/ARCHITECTURE.md",
441
- "trinity/knowledge-base/ISSUES.md",
442
- "trinity/knowledge-base/To-do.md"
439
+ ".claude/trinity/knowledge-base/ARCHITECTURE.md",
440
+ ".claude/trinity/knowledge-base/ISSUES.md",
441
+ ".claude/trinity/knowledge-base/To-do.md"
443
442
  ],
444
443
  "technical_debt_baseline_complete": true
445
444
  }
@@ -471,7 +470,7 @@ If validation fails, escalate to JUNO:
471
470
  "to": "JUNO",
472
471
  "status": "validation_failed",
473
472
  "issues_found": 5,
474
- "missing_directories": ["trinity/reports/"],
473
+ "missing_directories": [".claude/trinity/reports/"],
475
474
  "missing_agents": ["mon-requirements.md", "ein-cicd.md"],
476
475
  "recommendation": "audit_deployment_process"
477
476
  }
@@ -496,7 +495,7 @@ If validation fails, escalate to JUNO:
496
495
  **Solution:**
497
496
  - Check directory ownership
498
497
  - Verify write permissions on parent directory
499
- - On Unix systems: `chmod -R u+w trinity/`
498
+ - On Unix systems: `chmod -R u+w .claude/trinity/`
500
499
 
501
500
  ### Issue: Agent files not deploying
502
501
 
@@ -525,7 +524,7 @@ TAN's work is complete when:
525
524
 
526
525
  1. ✅ All required Trinity directories exist and are writable
527
526
  2. ✅ All 17 agent files deployed correctly to .claude/agents/
528
- 3. ✅ All 8 knowledge base files exist in trinity/knowledge-base/
527
+ 3. ✅ All 8 knowledge base files exist in .claude/trinity/knowledge-base/
529
528
  4. ✅ Planning artifact directories created (docs/plans/)
530
529
  5. ✅ Technical debt baseline scan completed
531
530
  6. ✅ Technical-Debt.md populated with real metrics
@@ -576,7 +575,6 @@ TAN's work is complete when:
576
575
  ### EIN Deployment Checklist
577
576
 
578
577
  - [ ] `.github/workflows/ci.yml` created (BAS 6-phase gates)
579
- - [ ] `.github/workflows/cd.yml` created (deployment pipeline)
580
578
  - [ ] Workflow files have correct project variables
581
579
  - [ ] GitHub Actions secrets documented
582
580
 
@@ -595,8 +593,8 @@ If user declines CI/CD:
595
593
 
596
594
  **Symptom**:
597
595
  ```
598
- Error: Cannot create trinity/work-orders/
599
- Parent directory 'trinity/' does not exist
596
+ Error: Cannot create .claude/trinity/work-orders/
597
+ Parent directory '.claude/trinity/' does not exist
600
598
  ```
601
599
 
602
600
  **Cause**: Project root mismatch or permissions
@@ -610,17 +608,17 @@ pwd
610
608
  cd /path/to/project
611
609
 
612
610
  # Create manually if needed
613
- mkdir -p trinity/work-orders
614
- mkdir -p trinity/sessions
615
- mkdir -p trinity/planning
616
- mkdir -p trinity/reports
611
+ mkdir -p .claude/trinity/work-orders
612
+ mkdir -p .claude/trinity/sessions
613
+ mkdir -p .claude/trinity/planning
614
+ mkdir -p .claude/trinity/reports
617
615
  ```
618
616
 
619
617
  ### Issue 2: Agents Directory Incomplete
620
618
 
621
619
  **Symptom**:
622
620
  ```
623
- Warning: Only 15 of 19 agents deployed
621
+ Warning: Only 15 of 18 agents deployed
624
622
  Missing: INO, EIN, APO, BON
625
623
  ```
626
624
 
@@ -653,9 +651,13 @@ ls -la .claude/
653
651
 
654
652
  # Fix permissions (Unix/Mac)
655
653
  chmod -R 755 .claude/
656
- chmod -R 755 trinity/
654
+ chmod -R 755 .claude/trinity/
657
655
 
658
656
  # Windows: Right-click → Properties → Security → Edit
659
657
  ```
660
658
 
661
659
  ---
660
+
661
+ **Agent Maintained By:** Trinity Method SDK Team
662
+ **Trinity Version:** 2.1.0
663
+ **Last Updated:** 2026-01-21