trinity-method-sdk 2.0.7 → 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.
- package/CHANGELOG.md +267 -218
- package/README.md +540 -540
- package/dist/cli/commands/deploy/index.js +1 -1
- package/dist/cli/commands/deploy/root-files.js +1 -1
- package/dist/cli/commands/deploy/sdk-install.js +1 -1
- package/dist/cli/commands/update/index.js +4 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/types.d.ts +1 -0
- package/dist/cli/utils/detect-stack.js +6 -0
- package/dist/cli/utils/template-processor.js +1 -1
- package/dist/templates/agents/aj-team/apo-documentation-specialist.md.template +2 -2
- package/dist/templates/agents/aj-team/bas-quality-gate.md.template +3 -3
- package/dist/templates/agents/aj-team/bon-dependency-manager.md.template +636 -636
- package/dist/templates/agents/aj-team/cap-configuration-specialist.md.template +2 -2
- package/dist/templates/agents/aj-team/dra-code-reviewer.md.template +2 -2
- package/dist/templates/agents/aj-team/kil-task-executor.md.template +2 -2
- package/dist/templates/agents/aj-team/uro-refactoring-specialist.md.template +2 -2
- package/dist/templates/agents/audit/juno-auditor.md.template +1 -1
- package/dist/templates/agents/deployment/ein-cicd.md.template +3 -2
- package/dist/templates/agents/deployment/ino-context.md.template +3 -3
- package/dist/templates/agents/deployment/tan-structure.md.template +1 -1
- package/dist/templates/agents/deployment/zen-knowledge.md.template +5 -5
- package/dist/templates/agents/leadership/aj-cc.md.template +2 -2
- package/dist/templates/claude/EMPLOYEE-DIRECTORY.md.template +1 -1
- package/dist/templates/documentation/SUBDIRECTORY-README.md.template +1 -1
- package/dist/templates/investigations/bug.md.template +2 -2
- package/dist/templates/investigations/feature.md.template +2 -2
- package/dist/templates/investigations/performance.md.template +2 -2
- package/dist/templates/investigations/security.md.template +2 -2
- package/dist/templates/investigations/technical.md.template +2 -2
- package/dist/templates/knowledge-base/AI-DEVELOPMENT-GUIDE.md.template +1 -1
- package/dist/templates/knowledge-base/ARCHITECTURE.md.template +2 -2
- package/dist/templates/knowledge-base/CODING-PRINCIPLES.md.template +1 -1
- package/dist/templates/knowledge-base/DOCUMENTATION-CRITERIA.md.template +1 -1
- package/dist/templates/knowledge-base/ISSUES.md.template +2 -2
- package/dist/templates/knowledge-base/TESTING-PRINCIPLES.md.template +1 -1
- package/dist/templates/knowledge-base/Technical-Debt.md.template +2 -2
- package/dist/templates/knowledge-base/To-do.md.template +2 -2
- package/dist/templates/knowledge-base/Trinity.md.template +4 -3
- package/dist/templates/root/TRINITY.md.template +1 -1
- package/dist/templates/shared/claude-commands/trinity-changelog.md.template +2 -2
- package/dist/templates/shared/claude-commands/trinity-continue.md.template +1 -1
- package/dist/templates/shared/claude-commands/trinity-docs.md.template +376 -7
- package/dist/templates/shared/claude-commands/trinity-end.md.template +397 -397
- package/dist/templates/shared/claude-commands/trinity-readme.md.template +141 -33
- package/dist/templates/shared/claude-commands/trinity-verify.md.template +1 -1
- package/dist/templates/source/base-CLAUDE.md.template +310 -310
- package/dist/templates/source/flutter-CLAUDE.md.template +593 -593
- package/dist/templates/source/nodejs-CLAUDE.md.template +531 -531
- package/dist/templates/source/python-CLAUDE.md.template +510 -510
- package/dist/templates/source/react-CLAUDE.md.template +513 -513
- package/dist/templates/source/rust-CLAUDE.md.template +653 -653
- package/package.json +94 -94
|
@@ -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/,
|
|
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
|
-
-
|
|
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)
|
|
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
|
|
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
|
|
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
|
-
**
|
|
1995
|
-
**Last Updated:**
|
|
2102
|
+
** Trinity Version:** 2.0.9
|
|
2103
|
+
**Last Updated:** 2026-01-12
|