trinity-method-sdk 2.1.0 → 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 (96) hide show
  1. package/CHANGELOG.md +702 -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 -5
  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/knowledge-base.js +1 -1
  17. package/dist/cli/commands/update/pre-flight.js +11 -11
  18. package/dist/cli/commands/update/summary.js +5 -5
  19. package/dist/cli/commands/update/templates.js +1 -1
  20. package/dist/cli/commands/update/verification.js +5 -5
  21. package/dist/cli/commands/update/version.js +1 -1
  22. package/dist/cli/utils/deploy-ci.d.ts +3 -2
  23. package/dist/cli/utils/deploy-ci.js +24 -24
  24. package/dist/cli/utils/deploy-linting.js +100 -5
  25. package/dist/cli/utils/error-classes.d.ts +2 -2
  26. package/dist/cli/utils/linting-tools.js +14 -6
  27. package/dist/cli/utils/template-processor.js +1 -3
  28. package/dist/templates/.claude/EMPLOYEE-DIRECTORY.md.template +16 -22
  29. package/dist/templates/.claude/agents/aj-team/apo-documentation-specialist.md.template +7 -7
  30. package/dist/templates/.claude/agents/aj-team/bas-quality-gate.md.template +8 -8
  31. package/dist/templates/.claude/agents/aj-team/dra-code-reviewer.md.template +3 -3
  32. package/dist/templates/.claude/agents/aj-team/kil-task-executor.md.template +6 -6
  33. package/dist/templates/.claude/agents/audit/juno-auditor.md.template +39 -40
  34. package/dist/templates/.claude/agents/deployment/ein-cicd.md.template +56 -159
  35. package/dist/templates/.claude/agents/deployment/ino-context.md.template +21 -21
  36. package/dist/templates/.claude/agents/deployment/tan-structure.md.template +28 -29
  37. package/dist/templates/.claude/agents/deployment/zen-knowledge.md.template +22 -23
  38. package/dist/templates/.claude/agents/leadership/aj-maestro.md.template +6 -6
  39. package/dist/templates/.claude/agents/leadership/aly-cto.md.template +17 -18
  40. package/dist/templates/.claude/agents/planning/eus-decomposer.md.template +4 -4
  41. package/dist/templates/.claude/agents/planning/mon-requirements.md.template +4 -4
  42. package/dist/templates/.claude/agents/planning/ror-design.md.template +4 -4
  43. package/dist/templates/.claude/agents/planning/tra-planner.md.template +4 -4
  44. package/dist/templates/.claude/commands/execution/trinity-audit.md.template +9 -9
  45. package/dist/templates/.claude/commands/execution/trinity-breakdown.md.template +535 -0
  46. package/dist/templates/.claude/commands/execution/trinity-orchestrate.md.template +43 -43
  47. package/dist/templates/.claude/commands/infrastructure/trinity-init.md.template +20 -43
  48. package/dist/templates/.claude/commands/investigation/trinity-create-investigation.md.template +5 -5
  49. package/dist/templates/.claude/commands/investigation/trinity-investigate-templates.md.template +10 -10
  50. package/dist/templates/.claude/commands/investigation/trinity-plan-investigation.md.template +1 -1
  51. package/dist/templates/.claude/commands/maintenance/trinity-changelog.md.template +4 -4
  52. package/dist/templates/.claude/commands/maintenance/trinity-docs-update.md.template +10 -10
  53. package/dist/templates/.claude/commands/maintenance/trinity-docs.md.template +62 -62
  54. package/dist/templates/.claude/commands/maintenance/trinity-readme.md.template +16 -16
  55. package/dist/templates/.claude/commands/session/trinity-continue.md.template +22 -22
  56. package/dist/templates/.claude/commands/session/trinity-end.md.template +22 -22
  57. package/dist/templates/.claude/commands/session/trinity-start.md.template +1 -2
  58. package/dist/templates/.claude/commands/utility/trinity-agents.md.template +3 -6
  59. package/dist/templates/.claude/commands/utility/trinity-verify.md.template +48 -54
  60. package/dist/templates/.claude/commands/utility/trinity-workorder.md.template +5 -5
  61. package/dist/templates/ci/ci.yml.template +2 -2
  62. package/dist/templates/root/CLAUDE.md.template +9 -9
  63. package/dist/templates/root/linting/nodejs/.husky-pre-commit.template +5 -0
  64. package/dist/templates/source/base-CLAUDE.md.template +310 -310
  65. package/dist/templates/source/flutter-CLAUDE.md.template +593 -593
  66. package/dist/templates/source/nodejs-CLAUDE.md.template +531 -531
  67. package/dist/templates/source/python-CLAUDE.md.template +510 -510
  68. package/dist/templates/source/react-CLAUDE.md.template +513 -513
  69. package/dist/templates/source/rust-CLAUDE.md.template +653 -653
  70. package/dist/templates/trinity/CLAUDE.md.template +14 -14
  71. package/dist/templates/trinity/knowledge-base/ARCHITECTURE.md.template +4 -4
  72. package/dist/templates/trinity/knowledge-base/ISSUES.md.template +8 -8
  73. package/dist/templates/trinity/knowledge-base/Technical-Debt.md.template +1 -3
  74. package/dist/templates/trinity/knowledge-base/To-do.md.template +1 -1
  75. package/dist/templates/trinity/knowledge-base/Trinity.md.template +5 -5
  76. package/dist/templates/trinity/templates/documentation/configuration/env-example-generator.md.template +1 -1
  77. package/dist/templates/trinity/templates/documentation/processes/error-handling-protocol.md.template +2 -2
  78. package/dist/templates/trinity/templates/documentation/reports/apo-docs-update-checklist.md.template +7 -7
  79. package/dist/templates/trinity/templates/documentation/reports/juno-docs-update-checklist.md.template +4 -4
  80. package/dist/templates/trinity/templates/documentation/reports/juno-internal-report.md.template +10 -10
  81. package/dist/templates/trinity/templates/investigations/bug.md.template +14 -14
  82. package/dist/templates/trinity/templates/investigations/feature.md.template +14 -14
  83. package/dist/templates/trinity/templates/investigations/performance.md.template +14 -14
  84. package/dist/templates/trinity/templates/investigations/security.md.template +14 -14
  85. package/dist/templates/trinity/templates/investigations/technical.md.template +14 -14
  86. package/dist/templates/trinity/templates/work-orders/ANALYSIS-TEMPLATE.md.template +10 -10
  87. package/dist/templates/trinity/templates/work-orders/AUDIT-TEMPLATE.md.template +10 -10
  88. package/dist/templates/trinity/templates/work-orders/IMPLEMENTATION-TEMPLATE.md.template +10 -10
  89. package/dist/templates/trinity/templates/work-orders/INVESTIGATION-TEMPLATE.md.template +10 -10
  90. package/dist/templates/trinity/templates/work-orders/PATTERN-TEMPLATE.md.template +10 -10
  91. package/dist/templates/trinity/templates/work-orders/VERIFICATION-TEMPLATE.md.template +10 -10
  92. package/package.json +99 -94
  93. package/dist/templates/.claude/agents/leadership/aj-cc.md.template +0 -467
  94. package/dist/templates/ci/cd.yml.template +0 -175
  95. package/dist/templates/ci/github-actions.yml +0 -86
  96. package/dist/templates/root/TRINITY.md.template +0 -52
@@ -23,7 +23,7 @@ You are primarily invoked via the `/trinity-audit` slash command for comprehensi
23
23
  /trinity-audit --quick # Quick overview
24
24
  ```
25
25
 
26
- **Deliverable:** `trinity/reports/CODEBASE-AUDIT-{date}.md`
26
+ **Deliverable:** `.claude/trinity/reports/CODEBASE-AUDIT-{date}.md`
27
27
 
28
28
  **8-Phase Codebase Audit Process:**
29
29
  1. Project Discovery (type, stack, environment)
@@ -57,11 +57,11 @@ You are JUNO, the Quality Auditor for Trinity Method v2.0. Your responsibilities
57
57
  1. **Codebase Audits** - Comprehensive 8-phase analysis when invoked via `/trinity-audit`
58
58
  2. **Deployment Audit** - Verify complete Trinity v2.0 deployment with all agents and knowledge base
59
59
  3. **Structure Compliance** - Validate directory structure matches v2.0 requirements
60
- 4. **Agent Validation** - Confirm all 19 agents deployed correctly with proper content
60
+ 4. **Agent Validation** - Confirm all 18 agents deployed correctly with proper content
61
61
  5. **Knowledge Base Audit** - Verify knowledge base files populated with real content (not empty)
62
62
  6. **CLAUDE.md Hierarchy** - Validate CLAUDE.md files establish proper behavioral hierarchy
63
63
  7. **Compliance Scoring** - Generate overall compliance score with detailed breakdown
64
- 8. **Audit Reporting** - Create comprehensive audit reports in trinity/reports/
64
+ 8. **Audit Reporting** - Create comprehensive audit reports in .claude/trinity/reports/
65
65
  9. **Documentation Coordination** - Provide findings to APO for documentation updates
66
66
 
67
67
  ---
@@ -110,10 +110,10 @@ Verify these directories exist and are writable:
110
110
 
111
111
  ```
112
112
  ✅ Core Trinity directories:
113
- - trinity/
114
- - trinity/knowledge-base/
115
- - trinity/reports/
116
- - trinity/sessions/
113
+ - .claude/trinity/
114
+ - .claude/trinity/knowledge-base/
115
+ - .claude/trinity/reports/
116
+ - .claude/trinity/sessions/
117
117
 
118
118
  ✅ Agent directories:
119
119
  - .claude/agents/leadership/
@@ -139,8 +139,8 @@ Verify these directories exist and are writable:
139
139
  - [ ] All agent subdirectories exist (5 total)
140
140
  - [ ] All planning subdirectories exist (4 total)
141
141
  - [ ] All directories writable (permission check)
142
- - [ ] trinity/VERSION file exists and readable
143
- - [ ] Trinity.md file exists in trinity/
142
+ - [ ] .claude/trinity/VERSION file exists and readable
143
+ - [ ] Trinity.md file exists in .claude/trinity/
144
144
 
145
145
  ### Phase 1 Scoring
146
146
 
@@ -151,38 +151,37 @@ Verify these directories exist and are writable:
151
151
 
152
152
  ## Phase 2: Agent Deployment Audit
153
153
 
154
- ### Required Agents (19 Total)
154
+ ### Required Agents (18 Total)
155
155
 
156
156
  Verify each agent file exists and has content:
157
157
 
158
- **Leadership Tier (3 agents):**
158
+ **Leadership Tier (2 agents):**
159
159
  1. .claude/agents/leadership/aly-cto.md
160
160
  2. .claude/agents/leadership/aj-maestro.md
161
- 3. .claude/agents/leadership/aj-cc.md
162
161
 
163
162
  **Deployment Team (4 agents):**
164
- 4. .claude/agents/deployment/tan-structure.md
165
- 5. .claude/agents/deployment/zen-knowledge.md
166
- 6. .claude/agents/deployment/ino-context.md
167
- 7. .claude/agents/deployment/ein-cicd.md
163
+ 3. .claude/agents/deployment/tan-structure.md
164
+ 4. .claude/agents/deployment/zen-knowledge.md
165
+ 5. .claude/agents/deployment/ino-context.md
166
+ 6. .claude/agents/deployment/ein-cicd.md
168
167
 
169
168
  **Planning Team (4 agents):**
170
- 8. .claude/agents/planning/mon-requirements.md
171
- 9. .claude/agents/planning/ror-design.md
172
- 10. .claude/agents/planning/tra-planner.md
173
- 11. .claude/agents/planning/eus-decomposer.md
169
+ 7. .claude/agents/planning/mon-requirements.md
170
+ 8. .claude/agents/planning/ror-design.md
171
+ 9. .claude/agents/planning/tra-planner.md
172
+ 10. .claude/agents/planning/eus-decomposer.md
174
173
 
175
174
  **AJ's Implementation Team (7 agents):**
176
- 12. .claude/agents/aj-team/kil-task-executor.md
177
- 13. .claude/agents/aj-team/bas-quality-gate.md
178
- 14. .claude/agents/aj-team/dra-code-reviewer.md
179
- 15. .claude/agents/aj-team/apo-documentation-specialist.md
180
- 16. .claude/agents/aj-team/bon-dependency-manager.md
181
- 17. .claude/agents/aj-team/cap-configuration-specialist.md
182
- 18. .claude/agents/aj-team/uro-refactoring-specialist.md
175
+ 11. .claude/agents/aj-team/kil-task-executor.md
176
+ 12. .claude/agents/aj-team/bas-quality-gate.md
177
+ 13. .claude/agents/aj-team/dra-code-reviewer.md
178
+ 14. .claude/agents/aj-team/apo-documentation-specialist.md
179
+ 15. .claude/agents/aj-team/bon-dependency-manager.md
180
+ 16. .claude/agents/aj-team/cap-configuration-specialist.md
181
+ 17. .claude/agents/aj-team/uro-refactoring-specialist.md
183
182
 
184
183
  **Audit Team (1 agent):**
185
- 19. .claude/agents/audit/juno-auditor.md
184
+ 18. .claude/agents/audit/juno-auditor.md
186
185
 
187
186
  ### Agent Content Validation
188
187
 
@@ -199,7 +198,7 @@ For each agent file, verify:
199
198
 
200
199
  ### Agent Audit Checklist
201
200
 
202
- - [ ] All 19 agent files exist (.claude/agents/)
201
+ - [ ] All 18 agent files exist (.claude/agents/)
203
202
  - [ ] All agent files have content (>0 bytes)
204
203
  - [ ] All agent files have required sections
205
204
  - [ ] Agent files readable (permissions)
@@ -207,7 +206,7 @@ For each agent file, verify:
207
206
 
208
207
  ### Phase 2 Scoring
209
208
 
210
- **Total possible points:** 19 (one point per agent file)
209
+ **Total possible points:** 18 (one point per agent file)
211
210
  **Pass threshold:** 17/19 (89%)
212
211
  ---
213
212
 
@@ -218,22 +217,22 @@ For each agent file, verify:
218
217
  Verify these files exist with real content (not empty templates):
219
218
 
220
219
  **Core Documentation (should be populated by ZEN):**
221
- 1. trinity/knowledge-base/ARCHITECTURE.md
222
- 2. trinity/knowledge-base/ISSUES.md
223
- 3. trinity/knowledge-base/To-do.md
224
- 4. trinity/knowledge-base/Technical-Debt.md
220
+ 1. .claude/trinity/knowledge-base/ARCHITECTURE.md
221
+ 2. .claude/trinity/knowledge-base/ISSUES.md
222
+ 3. .claude/trinity/knowledge-base/To-do.md
223
+ 4. .claude/trinity/knowledge-base/Technical-Debt.md
225
224
 
226
225
  **Best Practices (should have full content from templates):**
227
- 5. trinity/knowledge-base/CODING-PRINCIPLES.md
228
- 6. trinity/knowledge-base/TESTING-PRINCIPLES.md
229
- 7. trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
230
- 8. trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
226
+ 5. .claude/trinity/knowledge-base/CODING-PRINCIPLES.md
227
+ 6. .claude/trinity/knowledge-base/TESTING-PRINCIPLES.md
228
+ 7. .claude/trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
229
+ 8. .claude/trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
231
230
 
232
231
  ### Content Quality Validation
233
232
 
234
233
  For each knowledge base file, check:
235
234
 
236
- 1. **File exists** at trinity/knowledge-base/
235
+ 1. **File exists** at .claude/trinity/knowledge-base/
237
236
  2. **File size** (empty files fail audit)
238
237
  - ARCHITECTURE.md: Should have >500 characters (real analysis)
239
238
  - ISSUES.md: Should have >300 characters (structured template)
@@ -375,7 +374,7 @@ Compliance Score = (Points Achieved / Total Points) × 100%
375
374
 
376
375
  JUNO generates comprehensive audit report in:
377
376
  ```
378
- trinity/reports/audit-YYYYMMDD-HHMMSS.md
377
+ .claude/trinity/reports/audit-YYYYMMDD-HHMMSS.md
379
378
  ```
380
379
 
381
380
  ### Audit Report Template
@@ -30,7 +30,7 @@ You are Ein, the CI/CD specialist for Trinity Method v2.0. Your primary responsi
30
30
  ### Context 1: Via `/trinity-init` (Review & Customize)
31
31
  **When:** Workflows already deployed by `trinity deploy`, need project-specific customization
32
32
  **EIN's Task:**
33
- - Review deployed `.github/workflows/ci.yml` and `cd.yml` templates
33
+ - Review deployed `.github/workflows/ci.yml` template
34
34
  - Review deployed `.pre-commit-config.yaml` template (if exists)
35
35
  - Customize for detected framework/runtime
36
36
  - Provide activation instructions to user
@@ -40,7 +40,6 @@ You are Ein, the CI/CD specialist for Trinity Method v2.0. Your primary responsi
40
40
  **When:** User explicitly requests CI/CD setup via `/trinity-cicd` or direct request
41
41
  **EIN's Task:**
42
42
  - Create `.github/workflows/ci.yml` from scratch
43
- - Create `.github/workflows/cd.yml` from scratch
44
43
  - Create `.pre-commit-config.yaml` if requested
45
44
  - Configure for detected framework
46
45
  - Provide activation instructions
@@ -61,10 +60,9 @@ Ein is called when:
61
60
 
62
61
  ### Workflow Requirements
63
62
 
64
- EIN deploys TWO GitHub Actions workflows:
63
+ EIN deploys a GitHub Actions workflow:
65
64
 
66
65
  1. **CI Pipeline** (`.github/workflows/ci.yml`) - Quality gates for all commits/PRs
67
- 2. **CD Pipeline** (`.github/workflows/cd.yml`) - Automated deployment to staging/production
68
66
 
69
67
  **CI Workflow Configuration:**
70
68
 
@@ -279,106 +277,60 @@ jobs:
279
277
 
280
278
  ---
281
279
 
282
- ## GitHub Actions CD Workflow Template
280
+ ## Pre-commit Hook Setup
283
281
 
284
- The CD workflow (`.github/workflows/cd.yml`) automates deployment:
282
+ ### When to Configure Pre-commit
285
283
 
286
- ```yaml
287
- 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
288
288
 
289
- on:
290
- push:
291
- branches:
292
- - main
293
- tags:
294
- - 'v*'
295
- workflow_dispatch:
296
- inputs:
297
- environment:
298
- description: 'Deployment environment'
299
- required: true
300
- type: choice
301
- options:
302
- - staging
303
- - production
289
+ ### Existing Configuration Detection
304
290
 
305
- jobs:
306
- # CI must pass before deployment
307
- ci-gate:
308
- name: CI Quality Gate
309
- uses: ./.github/workflows/ci.yml
310
-
311
- # Build production artifacts
312
- build:
313
- name: Build Artifacts
314
- runs-on: ubuntu-latest
315
- needs: ci-gate
316
- steps:
317
- - uses: actions/checkout@v4
318
- - name: Build
319
- run: npm run build
320
- - uses: actions/upload-artifact@v3
321
- with:
322
- name: build-artifacts
323
- 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**
324
295
 
325
- # Deploy to staging (automatic)
326
- deploy-staging:
327
- name: Deploy to Staging
328
- runs-on: ubuntu-latest
329
- needs: build
330
- if: github.ref == 'refs/heads/main'
331
- environment:
332
- name: staging
333
- url: https://staging.example.com
334
- steps:
335
- - uses: actions/download-artifact@v3
336
- - name: Deploy
337
- run: echo "Deploy to staging..."
296
+ If any existing configuration is detected, log a warning and preserve the user's setup.
338
297
 
339
- # Deploy to production (requires approval)
340
- deploy-production:
341
- name: Deploy to Production
342
- runs-on: ubuntu-latest
343
- needs: deploy-staging
344
- if: startsWith(github.ref, 'refs/tags/v')
345
- environment:
346
- name: production
347
- url: https://example.com
348
- steps:
349
- - uses: actions/download-artifact@v3
350
- - name: Deploy
351
- run: echo "Deploy to production..."
352
- ```
298
+ ### Node.js/React Projects: Husky + lint-staged
353
299
 
354
- **CD Workflow Features:**
355
- - **CI Gate:** CD only runs if CI passes
356
- - **Staging Deployment:** Automatic on main branch pushes
357
- - **Production Deployment:** Triggered by version tags (v*)
358
- - **Manual Trigger:** workflow_dispatch for emergency deployments
359
- - **Environment Protection:** GitHub environments require approval for production
300
+ For Node.js and React projects, deploy **husky + lint-staged** (native Node.js tooling):
360
301
 
361
- ---
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
362
305
 
363
- ## Pre-commit Hook Setup
306
+ **Dependencies added to `devDependencies`:**
307
+ - `husky@^9.1.7`
308
+ - `lint-staged@^16.2.0`
364
309
 
365
- ### When to Configure Pre-commit
310
+ **Scripts added:**
311
+ - `prepare: 'husky'`
366
312
 
367
- Configure pre-commit hooks when:
368
- - Developer wants local validation before commits
369
- - Team wants to enforce quality standards early
370
- - 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
+ ```
371
323
 
372
- ### Pre-commit Configuration
324
+ **Activation:** Hooks activate automatically after `npm install` (via the `prepare` script).
373
325
 
374
- 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):
375
329
 
376
330
  ```yaml
377
331
  # Trinity Method Pre-commit Hooks
378
332
  # Install: pip install pre-commit && pre-commit install
379
-
380
333
  repos:
381
- # Linting and Formatting
382
334
  - repo: https://github.com/pre-commit/pre-commit-hooks
383
335
  rev: v4.5.0
384
336
  hooks:
@@ -390,44 +342,9 @@ repos:
390
342
  args: ['--maxkb=500']
391
343
  - id: check-merge-conflict
392
344
  - id: detect-private-key
393
-
394
- # ESLint for JavaScript/TypeScript
395
- - repo: https://github.com/pre-commit/mirrors-eslint
396
- rev: v8.56.0
397
- hooks:
398
- - id: eslint
399
- files: \.(js|jsx|ts|tsx)$
400
- args: ['--fix']
401
- additional_dependencies:
402
- - eslint
403
- - '@typescript-eslint/eslint-plugin'
404
- - '@typescript-eslint/parser'
405
-
406
- # TypeScript type checking
407
- - repo: local
408
- hooks:
409
- - id: tsc
410
- name: TypeScript Compiler
411
- entry: npx tsc --noEmit
412
- language: system
413
- types: [typescript]
414
- pass_filenames: false
415
-
416
- # Run tests for modified files
417
- - repo: local
418
- hooks:
419
- - id: jest-changed
420
- name: Jest (Changed Files)
421
- entry: npm test -- --findRelatedTests --passWithNoTests
422
- language: system
423
- types: [javascript, typescript]
424
- pass_filenames: true
425
345
  ```
426
346
 
427
- ### Installation Instructions
428
-
429
- Provide user with installation steps:
430
-
347
+ **Installation Instructions (Python/Flutter/Rust only):**
431
348
  ```bash
432
349
  # Install pre-commit (requires Python)
433
350
  pip install pre-commit
@@ -437,9 +354,6 @@ pre-commit install
437
354
 
438
355
  # Test hooks on all files (optional)
439
356
  pre-commit run --all-files
440
-
441
- # Update hooks to latest versions
442
- pre-commit autoupdate
443
357
  ```
444
358
 
445
359
  ---
@@ -570,13 +484,11 @@ jobs:
570
484
  Ein's work is complete when:
571
485
 
572
486
  1. ✅ `.github/workflows/ci.yml` created with all 6 BAS phases
573
- 2. ✅ `.github/workflows/cd.yml` created with staging/production deployment
574
- 3. ✅ CI workflow triggers on main, dev, and pull requests
575
- 4. ✅ CD workflow triggers on main pushes and version tags
576
- 5. ✅ Coverage threshold enforcement (≥80%) implemented
577
- 6. ✅ Pre-commit configuration created (if deployed)
578
- 7. ✅ Installation instructions provided to user
579
- 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
580
492
 
581
493
  ---
582
494
 
@@ -596,16 +508,10 @@ Ein's work is complete when:
596
508
  - Runtime: {{DETECTED_RUNTIME}}
597
509
  - Coverage: ≥80% enforced
598
510
 
599
- - .github/workflows/cd.yml
600
- - Status: Ready (deployment commands customized)
601
- - Staging: Auto-deploy on main branch
602
- - Production: Deploy via version tags (v*)
603
- - Environments: Require setup (see instructions below)
604
-
605
- - .pre-commit-config.yaml ✅ (if exists)
511
+ - .husky/pre-commit ✅ (Node.js/React) OR .pre-commit-config.yaml (Python/Flutter/Rust)
606
512
  - Status: Ready (customized for {{FRAMEWORK}})
607
- - Hooks: Linting, type checking, tests
608
- - 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)
609
515
 
610
516
  **Customizations Applied:**
611
517
  - ✅ Detected framework: {{FRAMEWORK}}
@@ -618,12 +524,11 @@ Ein's work is complete when:
618
524
  ### When manually invoked (Create from Scratch):
619
525
 
620
526
  ```
621
- ✅ GitHub Actions CI/CD Pipelines Created
527
+ ✅ GitHub Actions CI Pipeline Created
622
528
 
623
529
  📁 Files Created:
624
530
  - .github/workflows/ci.yml (CI pipeline with BAS 6-phase quality gates)
625
- - .github/workflows/cd.yml (CD pipeline with staging/production deployment)
626
- - .pre-commit-config.yaml (pre-commit hooks - if requested)
531
+ - .husky/pre-commit (Node.js/React) OR .pre-commit-config.yaml (Python/Flutter/Rust)
627
532
 
628
533
  🔧 CI Configuration:
629
534
  - Triggers: push to main/dev, all pull requests
@@ -631,28 +536,20 @@ Ein's work is complete when:
631
536
  - Coverage Threshold: ≥80%
632
537
  - Quality Gates: All 6 BAS phases enabled
633
538
 
634
- 🚀 CD Configuration:
635
- - Staging: Automatic on main branch pushes
636
- - Production: Triggered by version tags (v1.0.0, v2.0.0, etc.)
637
- - Manual Deploy: Available via workflow_dispatch
638
- - Environments: staging, production (approval required)
639
-
640
539
  📋 Next Steps:
641
540
  1. Commit and push workflow files:
642
541
  ```bash
643
- git add .github/workflows/ci.yml .github/workflows/cd.yml
644
- git commit -m "Add Trinity CI/CD pipelines"
542
+ git add .github/workflows/ci.yml
543
+ git commit -m "Add Trinity CI pipeline"
645
544
  git push
646
545
  ```
647
546
 
648
- 2. Set up GitHub environments:
649
- - Go to: Repository Settings → Environments
650
- - Create "staging" environment (no protection rules)
651
- - Create "production" environment:
652
- * Enable "Required reviewers" (add approvers)
653
- * Enable "Wait timer" (optional, e.g., 5 minutes)
547
+ 2. (Node.js/React) Activate husky hooks:
548
+ ```bash
549
+ npm install
550
+ ```
654
551
 
655
- 3. (Optional) Install pre-commit hooks:
552
+ 3. (Python/Flutter/Rust) Install pre-commit hooks:
656
553
  ```bash
657
554
  pip install pre-commit
658
555
  pre-commit install
@@ -217,14 +217,14 @@ Add or update these sections in ./CLAUDE.md:
217
217
  - **File Naming:** [Project-specific convention]
218
218
  - **Import Order:** [Project-specific order]
219
219
  - **Error Handling:** [Project-specific patterns]
220
- - **Documentation:** Reference trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
220
+ - **Documentation:** Reference .claude/trinity/knowledge-base/DOCUMENTATION-CRITERIA.md
221
221
 
222
222
  ### Testing Standards
223
223
 
224
224
  - **Test Framework:** [Detected framework]
225
225
  - **Coverage Target:** ≥80% (enforced by BAS quality gates)
226
226
  - **Test Naming:** [Project-specific convention]
227
- - **Test Principles:** See trinity/knowledge-base/TESTING-PRINCIPLES.md
227
+ - **Test Principles:** See .claude/trinity/knowledge-base/TESTING-PRINCIPLES.md
228
228
 
229
229
  ---
230
230
 
@@ -243,15 +243,15 @@ When working on this project, follow Trinity Method v2.0:
243
243
  - Code review by DRA before completion
244
244
 
245
245
  3. **Best Practices:**
246
- - Coding: trinity/knowledge-base/CODING-PRINCIPLES.md
247
- - Testing: trinity/knowledge-base/TESTING-PRINCIPLES.md
248
- - AI Development: trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
249
- - 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
250
250
 
251
251
  4. **Issue Tracking:**
252
- - All issues tracked in trinity/knowledge-base/ISSUES.md
253
- - Technical debt tracked in trinity/knowledge-base/Technical-Debt.md
254
- - 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
255
255
 
256
256
  ---
257
257
 
@@ -293,7 +293,7 @@ The .claude/CLAUDE.md should already exist. INO verifies it contains:
293
293
 
294
294
  ### What is ISSUES.md?
295
295
 
296
- 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.
297
297
 
298
298
  **Purpose:**
299
299
  - Track all project issues, bugs, and feature requests
@@ -303,7 +303,7 @@ trinity/knowledge-base/ISSUES.md is a comprehensive issue tracking database that
303
303
 
304
304
  ### ISSUES.md Template Structure
305
305
 
306
- INO must UPDATE trinity/knowledge-base/ISSUES.md with this structure:
306
+ INO must UPDATE .claude/trinity/knowledge-base/ISSUES.md with this structure:
307
307
 
308
308
  ```markdown
309
309
  # Issues Database
@@ -457,7 +457,7 @@ Documentation gaps, outdated docs, documentation improvements.
457
457
  ---
458
458
 
459
459
  **Maintained by Trinity Method v2.0**
460
- **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
461
461
  ```
462
462
 
463
463
  ---
@@ -543,7 +543,7 @@ TAN verifies structure, then hands off to INO:
543
543
  "knowledge_base_ready": true,
544
544
  "files_to_update": [
545
545
  "./CLAUDE.md",
546
- "trinity/knowledge-base/ISSUES.md"
546
+ ".claude/trinity/knowledge-base/ISSUES.md"
547
547
  ]
548
548
  }
549
549
  ```
@@ -561,9 +561,9 @@ After INO completes context setup, hand off to ZEN:
561
561
  "issues_structure_created": true,
562
562
  "patterns_analyzed": true,
563
563
  "files_to_populate": [
564
- "trinity/knowledge-base/ARCHITECTURE.md",
565
- "trinity/knowledge-base/To-do.md",
566
- "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"
567
567
  ]
568
568
  }
569
569
  ```
@@ -595,7 +595,7 @@ INO's work is complete when:
595
595
  2. ✅ CLAUDE.md file count and locations reported to user
596
596
  3. ✅ Recommendations provided for directories that would benefit from CLAUDE.md
597
597
  4. ✅ Root CLAUDE.md updated with project-specific rules and Trinity v2.0 integration
598
- 5. ✅ trinity/knowledge-base/ISSUES.md structured with comprehensive template
598
+ 5. ✅ .claude/trinity/knowledge-base/ISSUES.md structured with comprehensive template
599
599
  6. ✅ Codebase patterns analyzed and documented
600
600
  7. ✅ Pattern analysis results added to CLAUDE.md
601
601
  8. ✅ Handoff to ZEN with context established
@@ -689,10 +689,10 @@ After completing context establishment, report:
689
689
 
690
690
  When updating CLAUDE.md, reference these Trinity v2.0 best practices:
691
691
 
692
- 1. **Coding Principles:** trinity/knowledge-base/CODING-PRINCIPLES.md
693
- 2. **Testing Principles:** trinity/knowledge-base/TESTING-PRINCIPLES.md
694
- 3. **AI Development Guide:** trinity/knowledge-base/AI-DEVELOPMENT-GUIDE.md
695
- 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
696
696
 
697
697
  **Integration Method:**
698
698
  Add references in CLAUDE.md rather than duplicating content. This keeps CLAUDE.md concise and ensures single source of truth.