trinity-method-sdk 2.0.8 → 2.0.9

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 (49) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +1 -1
  3. package/dist/cli/commands/deploy/index.js +1 -1
  4. package/dist/cli/commands/deploy/root-files.js +1 -1
  5. package/dist/cli/commands/deploy/sdk-install.js +1 -1
  6. package/dist/cli/utils/template-processor.js +1 -1
  7. package/dist/templates/agents/aj-team/apo-documentation-specialist.md.template +2 -2
  8. package/dist/templates/agents/aj-team/bas-quality-gate.md.template +3 -3
  9. package/dist/templates/agents/aj-team/bon-dependency-manager.md.template +7 -7
  10. package/dist/templates/agents/aj-team/cap-configuration-specialist.md.template +2 -2
  11. package/dist/templates/agents/aj-team/dra-code-reviewer.md.template +2 -2
  12. package/dist/templates/agents/aj-team/kil-task-executor.md.template +2 -2
  13. package/dist/templates/agents/aj-team/uro-refactoring-specialist.md.template +2 -2
  14. package/dist/templates/agents/audit/juno-auditor.md.template +1 -1
  15. package/dist/templates/agents/deployment/ein-cicd.md.template +3 -2
  16. package/dist/templates/agents/deployment/ino-context.md.template +3 -3
  17. package/dist/templates/agents/deployment/tan-structure.md.template +1 -1
  18. package/dist/templates/agents/deployment/zen-knowledge.md.template +5 -5
  19. package/dist/templates/agents/leadership/aj-cc.md.template +2 -2
  20. package/dist/templates/claude/EMPLOYEE-DIRECTORY.md.template +1 -1
  21. package/dist/templates/documentation/SUBDIRECTORY-README.md.template +1 -1
  22. package/dist/templates/investigations/bug.md.template +2 -2
  23. package/dist/templates/investigations/feature.md.template +2 -2
  24. package/dist/templates/investigations/performance.md.template +2 -2
  25. package/dist/templates/investigations/security.md.template +2 -2
  26. package/dist/templates/investigations/technical.md.template +2 -2
  27. package/dist/templates/knowledge-base/AI-DEVELOPMENT-GUIDE.md.template +1 -1
  28. package/dist/templates/knowledge-base/ARCHITECTURE.md.template +2 -2
  29. package/dist/templates/knowledge-base/CODING-PRINCIPLES.md.template +1 -1
  30. package/dist/templates/knowledge-base/DOCUMENTATION-CRITERIA.md.template +1 -1
  31. package/dist/templates/knowledge-base/ISSUES.md.template +2 -2
  32. package/dist/templates/knowledge-base/TESTING-PRINCIPLES.md.template +1 -1
  33. package/dist/templates/knowledge-base/Technical-Debt.md.template +2 -2
  34. package/dist/templates/knowledge-base/To-do.md.template +2 -2
  35. package/dist/templates/knowledge-base/Trinity.md.template +4 -3
  36. package/dist/templates/root/TRINITY.md.template +1 -1
  37. package/dist/templates/shared/claude-commands/trinity-changelog.md.template +2 -2
  38. package/dist/templates/shared/claude-commands/trinity-continue.md.template +1 -1
  39. package/dist/templates/shared/claude-commands/trinity-docs.md.template +376 -7
  40. package/dist/templates/shared/claude-commands/trinity-end.md.template +397 -397
  41. package/dist/templates/shared/claude-commands/trinity-readme.md.template +141 -33
  42. package/dist/templates/shared/claude-commands/trinity-verify.md.template +1 -1
  43. package/dist/templates/source/base-CLAUDE.md.template +310 -310
  44. package/dist/templates/source/flutter-CLAUDE.md.template +593 -593
  45. package/dist/templates/source/nodejs-CLAUDE.md.template +531 -531
  46. package/dist/templates/source/python-CLAUDE.md.template +510 -510
  47. package/dist/templates/source/react-CLAUDE.md.template +513 -513
  48. package/dist/templates/source/rust-CLAUDE.md.template +653 -653
  49. package/package.json +1 -1
@@ -71,6 +71,27 @@ The `/trinity-readme` command invokes APO (Documentation Specialist) to manage R
71
71
 
72
72
  **Why:** Trinity Method SDK is a tool for developers. The project's documentation should focus exclusively on the project's code, features, and usage - not on the development methodology used to create it.
73
73
 
74
+ ### Rule 1 Enforcement Checklist
75
+
76
+ Before finalizing any README, verify:
77
+
78
+ - [ ] No trinity/ directory in file tree
79
+ - [ ] No .claude/ directory in file tree
80
+ - [ ] No Trinity commands documented (unless project IS Trinity Method)
81
+ - [ ] No references to Trinity agents (MON, ROR, KIL, etc.)
82
+ - [ ] No Trinity session files documented
83
+ - [ ] No Trinity work orders documented
84
+
85
+ **Verification Command:**
86
+ ```bash
87
+ # Check for forbidden Trinity references in README
88
+ grep -i "trinity/" README.md && echo "❌ VIOLATION: Documents trinity/ directory"
89
+ grep -i "\.claude/" README.md && echo "❌ VIOLATION: Documents .claude/ directory"
90
+ grep -i "/trinity-" README.md && echo "❌ VIOLATION: Documents Trinity commands"
91
+ ```
92
+
93
+ **If any violations found:** Remove the offending documentation immediately.
94
+
74
95
  ---
75
96
 
76
97
  ## When to Use `/trinity-readme`
@@ -298,6 +319,52 @@ for (let i = 0; i < glob_output_lines; i++) {
298
319
  }
299
320
  ```
300
321
 
322
+ **Step 4.5: Filter Gitignored and Trinity Directories (CRITICAL)**
323
+
324
+ **CRITICAL: Remove Trinity infrastructure and gitignored directories from documentation.**
325
+
326
+ ```bash
327
+ # Filter out Trinity infrastructure (ALWAYS excluded)
328
+ filtered_directories = []
329
+
330
+ for each directory in all_directories:
331
+ # ALWAYS skip Trinity infrastructure
332
+ if directory.includes("trinity/") or directory.includes(".claude/"):
333
+ echo "SKIP: $directory (Trinity infrastructure - never document)"
334
+ continue
335
+
336
+ # Check if gitignored (optional but recommended)
337
+ if git check-ignore -q "$directory" 2>/dev/null; then
338
+ echo "SKIP: $directory (gitignored)"
339
+ continue
340
+ fi
341
+
342
+ # Include this directory
343
+ filtered_directories.push(directory)
344
+ echo "INCLUDE: $directory"
345
+ done
346
+ ```
347
+
348
+ **Trinity Detection Warning:**
349
+
350
+ If you detect trinity/ or .claude/ directories during Phase 1:
351
+
352
+ 1. **Acknowledge detection:** "Detected Trinity Method infrastructure (trinity/ directory found)"
353
+ 2. **Skip documentation:** Do NOT include trinity/ in file tree or README content
354
+ 3. **Skip template:** Do NOT use Trinity-specific templates
355
+ 4. **Continue normally:** Process other directories (backend/, frontend/, etc.)
356
+
357
+ **Example Output:**
358
+ ```
359
+ ✓ Detected directories: backend/, frontend/, docs/, trinity/
360
+ ✓ Filtering Trinity infrastructure and gitignored directories...
361
+ - trinity/ (Trinity infrastructure) → SKIP
362
+ - .claude/ (Trinity infrastructure) → SKIP
363
+ ✓ Final directories to document: backend/, frontend/, docs/
364
+ ```
365
+
366
+ **Rule:** Trinity infrastructure (trinity/, .claude/) is ALWAYS excluded from user-facing READMEs, even if not gitignored.
367
+
301
368
  **Step 5: Report Complete Inventory (Using Validated Count)**
302
369
 
303
370
  APO MUST output:
@@ -352,7 +419,8 @@ APO MUST answer ALL checklist items:
352
419
  - If NO: STOP and use Glob output count
353
420
 
354
421
  6. **Project Structure Sanity:**
355
- - For project with backend/, frontend/, database/, trinity/, do I expect nested CLAUDE.md files? ✅ YES | ❌ NO
422
+ - For project with backend/, frontend/, database/, do I expect nested CLAUDE.md files? ✅ YES | ❌ NO
423
+ - Do I see trinity/ or .claude/ directories? ⚠️ IGNORE (methodology infrastructure, not project code)
356
424
  - If YES but none found: Re-run Glob with explicit paths
357
425
 
358
426
  **Self-Verification Action:**
@@ -362,12 +430,79 @@ IF any critical item = ❌ NO:
362
430
  - backend/**/CLAUDE.md
363
431
  - frontend/**/CLAUDE.md
364
432
  - database/**/CLAUDE.md
365
- - trinity/**/CLAUDE.md
433
+ - src/**/CLAUDE.md
434
+ - lib/**/CLAUDE.md
366
435
  Merge results and re-validate
367
436
 
437
+ **Note:** Do NOT include trinity/ or .claude/ patterns - these are methodology infrastructure.
438
+
368
439
  **Checklist Completion:** ✅ 6/6 items verified
369
440
  ```
370
441
 
442
+ **Step 7: License Verification (CRITICAL)**
443
+
444
+ **CRITICAL: Verify actual LICENSE file before generating license badges.**
445
+
446
+ Before generating any license badge, read and verify the LICENSE file:
447
+
448
+ 1. **Check for LICENSE file:**
449
+ ```bash
450
+ # Check for LICENSE file (various naming conventions)
451
+ if exists("LICENSE"): LICENSE_FILE = "LICENSE"
452
+ elif exists("LICENSE.md"): LICENSE_FILE = "LICENSE.md"
453
+ elif exists("LICENSE.txt"): LICENSE_FILE = "LICENSE.txt"
454
+ elif exists("LICENCE"): LICENSE_FILE = "LICENCE"
455
+ else: LICENSE_FILE = null
456
+ ```
457
+
458
+ 2. **Read LICENSE file and detect type:**
459
+ ```javascript
460
+ // Read first 3 lines to identify license type
461
+ firstLine = read(LICENSE_FILE).lines[0].toUpperCase()
462
+ firstThreeLines = read(LICENSE_FILE).lines.slice(0, 3).join(' ').toUpperCase()
463
+
464
+ // Detect license type from file header
465
+ if (firstLine.includes('MIT LICENSE')): DETECTED_LICENSE = 'MIT'
466
+ elif (firstLine.includes('ISC LICENSE')): DETECTED_LICENSE = 'ISC'
467
+ elif (firstLine.includes('APACHE LICENSE')): DETECTED_LICENSE = 'Apache-2.0'
468
+ elif (firstLine.includes('BSD 3-CLAUSE')): DETECTED_LICENSE = 'BSD-3-Clause'
469
+ elif (firstLine.includes('BSD 2-CLAUSE')): DETECTED_LICENSE = 'BSD-2-Clause'
470
+ elif (firstThreeLines.includes('GNU GENERAL PUBLIC LICENSE VERSION 3')): DETECTED_LICENSE = 'GPL-3.0'
471
+ elif (firstThreeLines.includes('GNU GENERAL PUBLIC LICENSE VERSION 2')): DETECTED_LICENSE = 'GPL-2.0'
472
+ elif (firstThreeLines.includes('GNU LESSER GENERAL PUBLIC LICENSE')): DETECTED_LICENSE = 'LGPL-3.0'
473
+ else: DETECTED_LICENSE = null
474
+ ```
475
+
476
+ 3. **Compare with package.json (if exists):**
477
+ ```javascript
478
+ if exists("package.json"):
479
+ PACKAGE_LICENSE = read("package.json").license
480
+
481
+ if (DETECTED_LICENSE && PACKAGE_LICENSE && DETECTED_LICENSE != PACKAGE_LICENSE):
482
+ echo "⚠️ WARNING: package.json claims ${PACKAGE_LICENSE} but LICENSE file is ${DETECTED_LICENSE}"
483
+ echo "Using LICENSE file as source of truth: ${DETECTED_LICENSE}"
484
+ ```
485
+
486
+ 4. **Determine badge license (priority order):**
487
+ ```javascript
488
+ // Priority: LICENSE file > package.json > default
489
+ if (DETECTED_LICENSE):
490
+ BADGE_LICENSE = DETECTED_LICENSE // Use LICENSE file (source of truth)
491
+ elif (PACKAGE_LICENSE):
492
+ BADGE_LICENSE = PACKAGE_LICENSE // Fall back to package.json
493
+ else:
494
+ BADGE_LICENSE = "Unlicensed" // Default if neither found
495
+ ```
496
+
497
+ 5. **Generate license badge:**
498
+ ```markdown
499
+ [![License](https://img.shields.io/badge/License-${BADGE_LICENSE}-yellow)](LICENSE)
500
+ ```
501
+
502
+ **Rule:** The LICENSE file is the legal source of truth. package.json metadata is secondary.
503
+
504
+ **Mismatch Detection:** If LICENSE file and package.json disagree, always use LICENSE file and warn user to update package.json.
505
+
371
506
  ---
372
507
 
373
508
  ### Phase 2: README Audit (Root + Subdirectories)
@@ -940,7 +1075,7 @@ Scan README.md for common stale content patterns:
940
1075
 
941
1076
  **Outdated Date References:**
942
1077
  ```markdown
943
- - "Last updated: 2021"
1078
+ - "**Last Updated**: 2021"
944
1079
  - "As of January 2022"
945
1080
  - "In version 1.0 (released 2020)"
946
1081
  ```
@@ -1039,7 +1174,7 @@ Scan README for version mentions:
1039
1174
  ```markdown
1040
1175
  ❌ **Outdated Date Reference**
1041
1176
  - **File:** README.md (line Y)
1042
- - **Current (WRONG):** "Last updated: January 2022"
1177
+ - **Current (WRONG):** "**Last Updated**: January 2022"
1043
1178
  - **Reality:** Current year is 2025, content is stale
1044
1179
  - **Correct:** Update date or remove if unnecessary
1045
1180
  - **Fix in:** Phase 3 (Root README Update)
@@ -1333,33 +1468,6 @@ for each directory in directories_to_create:
1333
1468
  See [{directory}/CLAUDE.md](CLAUDE.md) for architecture details.
1334
1469
  ```
1335
1470
 
1336
- **Type C: Trinity Directory**
1337
- - **Detection:** Directory name is "trinity"
1338
- - **Template:**
1339
- ```markdown
1340
- # Trinity Method
1341
-
1342
- Trinity Method v2.0 implementation for {project name}.
1343
-
1344
- ## Directory Structure
1345
- {Use ls to show trinity/ subdirectories}
1346
-
1347
- ## Key Files
1348
- {List actual files in trinity/knowledge-base/ with line counts}
1349
-
1350
- ## Trinity Commands
1351
- ```bash
1352
- /trinity-start # Start workflow guide
1353
- /trinity-audit # Run codebase audit
1354
- /trinity-readme # Update READMEs
1355
- /trinity-docs # Organize docs/
1356
- /trinity-changelog # Update CHANGELOG
1357
- ```
1358
-
1359
- ## Documentation
1360
- See [trinity/CLAUDE.md](CLAUDE.md) for Trinity Method context.
1361
- ```
1362
-
1363
1471
  **Type D: Test Directory**
1364
1472
  - **Detection:** Directory name contains "test", "__tests__", "spec"
1365
1473
  - **Template:**
@@ -1991,5 +2099,5 @@ If Phase 6 validation shows coverage < 100%, status = ❌ FAILED even if Phase 4
1991
2099
 
1992
2100
  ---
1993
2101
 
1994
- **Command Specification Version:** 2.0.0
1995
- **Last Updated:** 2025-12-27
2102
+ ** Trinity Version:** 2.0.9
2103
+ **Last Updated:** 2026-01-12
@@ -68,7 +68,7 @@ Report:
68
68
  ### Example 1: Complete Installation (100%)
69
69
 
70
70
  ```markdown
71
- # Trinity v2.0 Verification Report
71
+ # Trinity Verification Report
72
72
 
73
73
  **Project**: MyApp
74
74
  **Date**: 2025-12-18