trinity-method-sdk 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CHANGELOG.md +728 -467
  2. package/README.md +550 -539
  3. package/dist/cli/commands/deploy/ci-cd.d.ts +4 -3
  4. package/dist/cli/commands/deploy/ci-cd.js +10 -9
  5. package/dist/cli/commands/deploy/configuration.js +10 -11
  6. package/dist/cli/commands/deploy/directories.js +13 -14
  7. package/dist/cli/commands/deploy/gitignore.js +3 -4
  8. package/dist/cli/commands/deploy/index.d.ts +1 -1
  9. package/dist/cli/commands/deploy/index.js +6 -2
  10. package/dist/cli/commands/deploy/knowledge-base.js +2 -2
  11. package/dist/cli/commands/deploy/pre-flight.js +1 -1
  12. package/dist/cli/commands/deploy/root-files.js +2 -17
  13. package/dist/cli/commands/deploy/summary.js +3 -3
  14. package/dist/cli/commands/deploy/templates.js +5 -5
  15. package/dist/cli/commands/update/backup.js +6 -12
  16. package/dist/cli/commands/update/index.js +15 -1
  17. package/dist/cli/commands/update/knowledge-base.js +1 -1
  18. package/dist/cli/commands/update/migration.d.ts +31 -0
  19. package/dist/cli/commands/update/migration.js +130 -0
  20. package/dist/cli/commands/update/pre-flight.d.ts +7 -2
  21. package/dist/cli/commands/update/pre-flight.js +21 -20
  22. package/dist/cli/commands/update/summary.js +11 -5
  23. package/dist/cli/commands/update/templates.js +1 -1
  24. package/dist/cli/commands/update/types.d.ts +2 -0
  25. package/dist/cli/commands/update/verification.js +5 -5
  26. package/dist/cli/commands/update/version.js +6 -4
  27. package/dist/cli/utils/deploy-ci.d.ts +3 -2
  28. package/dist/cli/utils/deploy-ci.js +24 -24
  29. package/dist/cli/utils/deploy-linting.js +100 -5
  30. package/dist/cli/utils/error-classes.d.ts +2 -2
  31. package/dist/cli/utils/linting-tools.js +14 -6
  32. package/dist/cli/utils/template-processor.js +1 -3
  33. package/dist/templates/.claude/EMPLOYEE-DIRECTORY.md.template +16 -22
  34. package/dist/templates/.claude/agents/aj-team/apo-documentation-specialist.md.template +7 -7
  35. package/dist/templates/.claude/agents/aj-team/bas-quality-gate.md.template +8 -8
  36. package/dist/templates/.claude/agents/aj-team/dra-code-reviewer.md.template +3 -3
  37. package/dist/templates/.claude/agents/aj-team/kil-task-executor.md.template +6 -6
  38. package/dist/templates/.claude/agents/audit/juno-auditor.md.template +39 -40
  39. package/dist/templates/.claude/agents/deployment/ein-cicd.md.template +56 -159
  40. package/dist/templates/.claude/agents/deployment/ino-context.md.template +21 -21
  41. package/dist/templates/.claude/agents/deployment/tan-structure.md.template +28 -29
  42. package/dist/templates/.claude/agents/deployment/zen-knowledge.md.template +22 -23
  43. package/dist/templates/.claude/agents/leadership/aj-maestro.md.template +6 -6
  44. package/dist/templates/.claude/agents/leadership/aly-cto.md.template +17 -18
  45. package/dist/templates/.claude/agents/planning/eus-decomposer.md.template +4 -4
  46. package/dist/templates/.claude/agents/planning/mon-requirements.md.template +4 -4
  47. package/dist/templates/.claude/agents/planning/ror-design.md.template +4 -4
  48. package/dist/templates/.claude/agents/planning/tra-planner.md.template +4 -4
  49. package/dist/templates/.claude/commands/execution/trinity-audit.md.template +9 -9
  50. package/dist/templates/.claude/commands/execution/trinity-breakdown.md.template +535 -0
  51. package/dist/templates/.claude/commands/execution/trinity-orchestrate.md.template +43 -43
  52. package/dist/templates/.claude/commands/infrastructure/trinity-init.md.template +20 -43
  53. package/dist/templates/.claude/commands/investigation/trinity-create-investigation.md.template +5 -5
  54. package/dist/templates/.claude/commands/investigation/trinity-investigate-templates.md.template +10 -10
  55. package/dist/templates/.claude/commands/investigation/trinity-plan-investigation.md.template +1 -1
  56. package/dist/templates/.claude/commands/maintenance/trinity-changelog.md.template +4 -4
  57. package/dist/templates/.claude/commands/maintenance/trinity-docs-update.md.template +10 -10
  58. package/dist/templates/.claude/commands/maintenance/trinity-docs.md.template +62 -62
  59. package/dist/templates/.claude/commands/maintenance/trinity-readme.md.template +16 -16
  60. package/dist/templates/.claude/commands/session/trinity-continue.md.template +22 -22
  61. package/dist/templates/.claude/commands/session/trinity-end.md.template +22 -22
  62. package/dist/templates/.claude/commands/session/trinity-start.md.template +1 -2
  63. package/dist/templates/.claude/commands/utility/trinity-agents.md.template +3 -6
  64. package/dist/templates/.claude/commands/utility/trinity-verify.md.template +48 -54
  65. package/dist/templates/.claude/commands/utility/trinity-workorder.md.template +5 -5
  66. package/dist/templates/ci/ci.yml.template +2 -2
  67. package/dist/templates/root/CLAUDE.md.template +9 -9
  68. package/dist/templates/root/linting/nodejs/.husky-pre-commit.template +5 -0
  69. package/dist/templates/source/base-CLAUDE.md.template +310 -310
  70. package/dist/templates/source/flutter-CLAUDE.md.template +593 -593
  71. package/dist/templates/source/nodejs-CLAUDE.md.template +531 -531
  72. package/dist/templates/source/python-CLAUDE.md.template +510 -510
  73. package/dist/templates/source/react-CLAUDE.md.template +513 -513
  74. package/dist/templates/source/rust-CLAUDE.md.template +653 -653
  75. package/dist/templates/trinity/CLAUDE.md.template +14 -14
  76. package/dist/templates/trinity/knowledge-base/ARCHITECTURE.md.template +4 -4
  77. package/dist/templates/trinity/knowledge-base/ISSUES.md.template +8 -8
  78. package/dist/templates/trinity/knowledge-base/Technical-Debt.md.template +1 -3
  79. package/dist/templates/trinity/knowledge-base/To-do.md.template +1 -1
  80. package/dist/templates/trinity/knowledge-base/Trinity.md.template +5 -5
  81. package/dist/templates/trinity/templates/documentation/configuration/env-example-generator.md.template +1 -1
  82. package/dist/templates/trinity/templates/documentation/processes/error-handling-protocol.md.template +2 -2
  83. package/dist/templates/trinity/templates/documentation/reports/apo-docs-update-checklist.md.template +7 -7
  84. package/dist/templates/trinity/templates/documentation/reports/juno-docs-update-checklist.md.template +4 -4
  85. package/dist/templates/trinity/templates/documentation/reports/juno-internal-report.md.template +10 -10
  86. package/dist/templates/trinity/templates/investigations/bug.md.template +14 -14
  87. package/dist/templates/trinity/templates/investigations/feature.md.template +14 -14
  88. package/dist/templates/trinity/templates/investigations/performance.md.template +14 -14
  89. package/dist/templates/trinity/templates/investigations/security.md.template +14 -14
  90. package/dist/templates/trinity/templates/investigations/technical.md.template +14 -14
  91. package/dist/templates/trinity/templates/work-orders/ANALYSIS-TEMPLATE.md.template +10 -10
  92. package/dist/templates/trinity/templates/work-orders/AUDIT-TEMPLATE.md.template +10 -10
  93. package/dist/templates/trinity/templates/work-orders/IMPLEMENTATION-TEMPLATE.md.template +10 -10
  94. package/dist/templates/trinity/templates/work-orders/INVESTIGATION-TEMPLATE.md.template +10 -10
  95. package/dist/templates/trinity/templates/work-orders/PATTERN-TEMPLATE.md.template +10 -10
  96. package/dist/templates/trinity/templates/work-orders/VERIFICATION-TEMPLATE.md.template +10 -10
  97. package/package.json +99 -94
  98. package/dist/templates/.claude/agents/leadership/aj-cc.md.template +0 -467
  99. package/dist/templates/ci/cd.yml.template +0 -175
  100. package/dist/templates/ci/github-actions.yml +0 -86
  101. package/dist/templates/root/TRINITY.md.template +0 -52
package/README.md CHANGED
@@ -1,539 +1,550 @@
1
- # Trinity Method SDK
2
-
3
- [![npm version](https://img.shields.io/npm/v/trinity-method-sdk?color=success)](https://www.npmjs.com/package/trinity-method-sdk)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![Node.js Version](https://img.shields.io/badge/node-%3E%3D16.9.0-brightgreen)](https://nodejs.org/)
6
- [![AI Agents](https://img.shields.io/badge/AI%20Agent-Claude%20Code-blue)](https://github.com/lukadfagundes/trinity-method-sdk)
7
-
8
- > Investigation-first development methodology for Claude Code
9
-
10
- ---
11
-
12
- ## Why Trinity Method Exists
13
-
14
- ### The Problem with Traditional AI-Assisted Development
15
-
16
- AI coding assistants are powerful, but without structure they become expensive guessing machines:
17
-
18
- **❌ Jump-to-Code Anti-Pattern:**
19
-
20
- - AI generates code without understanding the problem
21
- - No investigation phase → immediate implementation
22
- - Context lost between sessions → repeated mistakes
23
- - No institutional knowledge → every session starts from zero
24
- - Inconsistent quality → success depends on prompt luck
25
- - Manual quality setup → 50 minutes configuring linters per project
26
-
27
- **The Cost:**
28
-
29
- - Developers waste time debugging AI-generated code that solves the wrong problem
30
- - Teams lose hard-won lessons when developers leave
31
- - Technical debt accumulates invisibly
32
- - Code quality varies wildly across sessions
33
-
34
- ### Our Philosophy: Investigation-First Development
35
-
36
- Trinity Method rejects "prompt and pray" development. Instead, we enforce **systematic investigation before implementation**:
37
-
38
- **1. Investigation-First Principle**
39
-
40
- ```
41
- WRONG: "Build authentication" → AI generates code → Debug for hours
42
- RIGHT: "Investigate authentication requirements" → Understand problem → Design solution → Implement correctly
43
- ```
44
-
45
- **2. Evidence-Based Decisions**
46
- Every decision backed by documentation, codebase metrics, and historical patterns. No guessing.
47
-
48
- **3. Knowledge Preservation**
49
- Lessons learned persist across sessions through institutional memory. Agents get smarter over time.
50
-
51
- **4. Systematic Quality Assurance**
52
- Quality isn't aspirational—it's systematically enforced through automated gates (BAS 6-phase validation).
53
-
54
- ### The Trinity Transformation
55
-
56
- **✅ With Trinity Method:**
57
-
58
- - **Investigation before coding** → Understand the problem first
59
- - **Persistent knowledge base** → Learn from every session
60
- - **Automated quality enforcement** → BAS gates ensure standards
61
- - **19-agent team coordination** → Right specialist for each task
62
- - **Institutional memory** → Patterns, strategies, and lessons preserved
63
- - **90-second deployment** → Complete development environment instantly
64
-
65
- ---
66
-
67
- ## What is Trinity Method SDK?
68
-
69
- Trinity Method SDK is a **production-ready development methodology** that transforms AI-assisted coding from random generation into systematic engineering.
70
-
71
- ### Core Philosophy
72
-
73
- **Trinity Method enforces three pillars:**
74
-
75
- 1. **Investigation-First Development**
76
- - Systematic investigation using MON (Requirements), ROR (Design), TRA (Planning)
77
- - Evidence-based decisions backed by documentation and metrics
78
- - Scale-based workflows: SMALL (0 stop points) MEDIUM (2 stop points) LARGE (4 stop points)
79
-
80
- 2. **Knowledge Preservation**
81
- - Learning system captures patterns from every investigation
82
- - Cross-session persistence through filesystem storage
83
- - Agent knowledge sharing via pub/sub bus (≥0.8 confidence threshold)
84
-
85
- 3. **Systematic Quality Assurance**
86
- - BAS 6-phase quality gate: Lint → Structure → Build → Test → Coverage (≥80%) → Review
87
- - Crisis management system for 5 crisis types (build, test, error, performance, security)
88
- - Automated codebase metrics collection and technical debt tracking
89
-
90
- ### The 19-Agent Team
91
-
92
- Trinity SDK includes **19 specialized agents** organized across 5 functional teams:
93
-
94
- **Planning Layer:**
95
-
96
- - **MON** - Requirements Analyst (functional & non-functional requirements)
97
- - **ROR** - Design Architect (technical design, ADRs)
98
- - **TRA** - Work Planner (implementation sequencing, BAS integration)
99
- - **EUS** - Task Decomposer (atomic task breakdown)
100
-
101
- **Execution Layer:**
102
-
103
- - **KIL** - Task Executor (TDD implementation: RED → GREEN → REFACTOR)
104
- - **BAS** - Quality Gate (6-phase validation enforcer)
105
- - **DRA** - Code Reviewer (design doc compliance, quality escalation)
106
-
107
- **Support Layer:**
108
-
109
- - **APO** - Documentation Specialist (API docs, inline comments)
110
- - **BON** - Dependency Manager (package security, version management)
111
- - **CAP** - Configuration Specialist (env vars, config files)
112
- - **URO** - Refactoring Specialist (technical debt reduction)
113
-
114
- **Leadership & Audit:**
115
-
116
- - **ALY** - Chief Technology Officer (investigation orchestration, strategic coordination)
117
- - **JUNO** - Quality Auditor (comprehensive codebase audits, deployment verification)
118
-
119
- **Infrastructure & Legacy:**
120
-
121
- - **TAN** - Structure Specialist (directory structure validation)
122
- - **ZEN** - Knowledge Base Specialist (comprehensive documentation)
123
- - **INO** - Context Specialist (CLAUDE.md hierarchy management)
124
- - **EIN** - CI/CD Specialist (continuous integration/deployment automation)
125
- - **AJ-CC** - Claude Code Orchestrator (specialized v2.0 orchestration)
126
- - **AJ MAESTRO** - Legacy Orchestrator (deprecated v1.0, replaced by ALY in v2.0)
127
-
128
- ### What Gets Deployed
129
-
130
- Trinity deploys **88 production-ready components** in 90 seconds:
131
-
132
- **Methodology Infrastructure:**
133
-
134
- - `trinity/knowledge-base/` - 9 living documentation files
135
- - ARCHITECTURE.md (codebase metrics, architecture documentation)
136
- - ISSUES.md (known issues and bug tracking)
137
- - To-do.md (task management and priorities)
138
- - Technical-Debt.md (technical debt tracking)
139
- - Trinity.md (project-specific Trinity guide)
140
- - TESTING-PRINCIPLES.md (testing standards)
141
- - CODING-PRINCIPLES.md (code quality standards)
142
- - DOCUMENTATION-CRITERIA.md (documentation standards)
143
- - AI-DEVELOPMENT-GUIDE.md (AI-assisted development best practices)
144
- - `trinity/templates/` - Reusable templates
145
- - `documentation/` - Documentation templates (2 README templates + 23 report templates)
146
- - `investigations/` - 5 investigation templates (bug, feature, performance, security, technical)
147
- - `work-orders/` - 6 work order templates
148
- - `trinity/investigations/` - Active investigations with execution plans
149
- - `trinity/sessions/` - Session archives
150
- - `trinity/reports/` - Audit and integration reports
151
- - `trinity/work-orders/` - Active work orders
152
- - `trinity/patterns/` - Reusable patterns library
153
- - `trinity/archive/` - Archived sessions, reports, and investigations
154
-
155
- **Agent System:**
156
-
157
- - `.claude/agents/` - 19 specialized agents organized by category:
158
- - `aj-team/` - 7 execution agents (APO, BAS, BON, CAP, DRA, KIL, URO)
159
- - `audit/` - 1 quality auditor (JUNO)
160
- - `deployment/` - 4 infrastructure agents (EIN, INO, TAN, ZEN)
161
- - `leadership/` - 3 orchestration agents (ALY, AJ-CC, AJ-MAESTRO)
162
- - `planning/` - 4 planning agents (MON, ROR, EUS, TRA)
163
- - `.claude/commands/` - 20 slash commands organized in 7 categories:
164
- - `execution/` - 2 commands (orchestrate, audit)
165
- - `infrastructure/` - 1 command (init)
166
- - `investigation/` - 3 commands (create-investigation, plan-investigation, investigate-templates)
167
- - `maintenance/` - 4 commands (readme, docs, docs-update, changelog)
168
- - `planning/` - 4 commands (requirements, design, decompose, plan)
169
- - `session/` - 3 commands (start, continue, end)
170
- - `utility/` - 3 commands (verify, agents, workorder)
171
- - `.claude/EMPLOYEE-DIRECTORY.md` - Complete 19-agent team guide
172
-
173
- **Context Hierarchy:**
174
-
175
- - Root `CLAUDE.md` - Global project context
176
- - `trinity/CLAUDE.md` - Trinity Method enforcement
177
- - `src/CLAUDE.md` - Technology-specific rules
178
-
179
- **Quality Automation:**
180
-
181
- - Linting tools (ESLint, Prettier, Black, Flake8, Clippy, Rustfmt)
182
- - Pre-commit hooks (Python's pre-commit framework for ALL languages)
183
- - Automatic dependency injection to package.json/requirements.txt
184
- - Real codebase metrics: TODO counts, console statements, file complexity, git metrics
185
-
186
- ---
187
-
188
- ## How Trinity Works
189
-
190
- ### Installation
191
-
192
- **Option 1: Use npx (Recommended - No installation needed)**
193
-
194
- ```bash
195
- # Runs latest version without installing
196
- npx trinity-method-sdk deploy
197
- ```
198
-
199
- **Option 2: Global Installation**
200
-
201
- ```bash
202
- # Install once globally
203
- npm install -g trinity-method-sdk
204
-
205
- # Then use anywhere
206
- trinity deploy
207
- ```
208
-
209
- ### Quick Start (90 Seconds to Production)
210
-
211
- ```bash
212
- # Navigate to your project
213
- cd your-project
214
-
215
- # Deploy Trinity Method (using npx)
216
- npx trinity-method-sdk deploy
217
- ```
218
-
219
- **Interactive Wizard:**
220
-
221
- 1. ✅ **Stack Detection**: Automatically detects framework (Node.js, Python, Rust, Flutter, Go)
222
- 2. ✅ **Linting Setup**: Choose "Recommended" for one-click best practices
223
- 3. ✅ **Deploy**: 90-second deployment with full infrastructure
224
- 4. ✅ **Install Dependencies**: `npm install` (or `pip install -r requirements-dev.txt`)
225
- 5. ✅ **Setup Pre-commit**: `pip install pre-commit && pre-commit install`
226
-
227
- **Result:** Production-ready development environment with 19 agents, 20 slash commands, quality gates, and documentation.
228
-
229
- ### Available Commands
230
-
231
- ```bash
232
- # Deploy Trinity to your project
233
- npx trinity-method-sdk deploy
234
-
235
- # Update Trinity to latest version
236
- npx trinity-method-sdk update
237
- ```
238
-
239
- ### Using Trinity Method (Slash Commands)
240
-
241
- After deployment, access Trinity functionality through Claude Code slash commands:
242
-
243
- **Session Management:**
244
-
245
- - `/trinity-start` - Start workflow guide
246
- - `/trinity-continue` - Resume after interruption
247
- - `/trinity-end` - End session and archive
248
-
249
- **Planning:**
250
-
251
- - `/trinity-requirements` - Analyze requirements (MON)
252
- - `/trinity-design` - Create technical design (ROR)
253
- - `/trinity-decompose` - Break down tasks (EUS)
254
- - `/trinity-plan` - Create implementation plan (TRA)
255
-
256
- **Execution:**
257
-
258
- - `/trinity-orchestrate` - Execute with ALY orchestration
259
- - `/trinity-audit` - Run codebase audit (JUNO)
260
- - `/trinity-readme` - Update README coverage (APO)
261
- - `/trinity-docs` - Generate new documentation (JUNO + 3 parallel APOs)
262
- - `/trinity-docs-update` - Update existing documentation (JUNO audit → 3 APOs → verification loop)
263
- - `/trinity-changelog` - Maintain CHANGELOG.md (APO)
264
-
265
- **Investigation:**
266
-
267
- - `/trinity-create-investigation` - Create structured investigation
268
- - `/trinity-plan-investigation` - Generate investigation plan
269
- - `/trinity-investigate-templates` - View investigation templates
270
-
271
- **Utility:**
272
-
273
- - `/trinity-verify` - Verify Trinity deployment
274
- - `/trinity-agents` - View agent directory
275
- - `/trinity-workorder` - Create work orders
276
-
277
- ### Linting & Code Quality (85-90% Time Savings)
278
-
279
- **Before Trinity (Manual Setup): ~50 minutes per project**
280
-
281
- 1. Research tools for your framework
282
- 2. Install dependencies
283
- 3. Create configuration files
284
- 4. Configure pre-commit hooks
285
- 5. Test and debug configuration
286
-
287
- **With Trinity (Automated): ~6 minutes per project**
288
-
289
- 1. Select "Recommended" during deployment (30 seconds)
290
- 2. Run `npm install` (3-5 minutes)
291
- 3. Setup pre-commit: `pip install pre-commit && pre-commit install` (30 seconds)
292
-
293
- **Supported Frameworks:**
294
-
295
- - **Node.js/React**: ESLint + Prettier + Pre-commit
296
- - **Python**: Black + Flake8 + isort + Pre-commit
297
- - **Flutter**: Dart Analyzer + Pre-commit
298
- - **Rust**: Clippy + Rustfmt + Pre-commit
299
-
300
- ---
301
-
302
- ## Designed for Claude Code
303
-
304
- Trinity Method SDK is built exclusively for [Claude Code](https://claude.com/claude-code), Anthropic's AI pair programming environment.
305
-
306
- ### Why Claude Code?
307
-
308
- - **Deep Integration**: Trinity's 19-agent team leverages Claude Code's agent architecture
309
- - **Slash Commands**: Built-in `/trinity-*` commands for instant workflow access
310
- - **Hooks System**: Pre/post-action automation via Claude Code hooks
311
- - **Quality Focus**: Exceptional single-agent experience optimized for Claude
312
-
313
- ### Other AI Assistants?
314
-
315
- The Trinity Method **philosophy** is agent-agnostic, but this SDK is optimized for Claude Code's capabilities. Want to use Trinity with Cursor, Copilot, or others? We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md).
316
-
317
- ---
318
-
319
- ## Examples & Documentation
320
-
321
- ### Real-World Deployments
322
-
323
- ```bash
324
- # Node.js/Express API
325
- cd my-api && npx trinity-method-sdk deploy
326
- # Result: API with ESLint, Prettier, pre-commit, 19 agents, quality gates
327
-
328
- # Python/Django Project
329
- cd my-django && npx trinity-method-sdk deploy
330
- # Result: Django with Black, Flake8, isort, pre-commit, full Trinity infrastructure
331
-
332
- # Flutter Mobile App
333
- cd my-flutter-app && npx trinity-method-sdk deploy
334
- # Result: Flutter with Dart Analyzer, pre-commit, investigation templates
335
-
336
- # Rust CLI Tool
337
- cd my-rust-cli && npx trinity-method-sdk deploy
338
- # Result: Rust with Clippy, Rustfmt, pre-commit, crisis management
339
- ```
340
-
341
- ### Documentation
342
-
343
- After deploying Trinity to your project, comprehensive documentation is available in your project:
344
-
345
- **Trinity Knowledge Base:**
346
-
347
- - `trinity/knowledge-base/ARCHITECTURE.md` - System architecture with codebase metrics
348
- - `trinity/knowledge-base/ISSUES.md` - Known issues and bug tracking
349
- - `trinity/knowledge-base/To-do.md` - Task management and priorities
350
- - `trinity/knowledge-base/Technical-Debt.md` - Technical debt tracking
351
- - `trinity/knowledge-base/Trinity.md` - Project-specific Trinity guide
352
- - `trinity/knowledge-base/TESTING-PRINCIPLES.md` - Testing standards
353
- - `trinity/knowledge-base/CODING-PRINCIPLES.md` - Code quality standards
354
-
355
- **Agent System:**
356
-
357
- - `.claude/EMPLOYEE-DIRECTORY.md` - Complete agent reference and selection guide
358
- - `.claude/agents/` - 19 specialized agent markdown files
359
-
360
- **SDK Documentation:**
361
-
362
- - [API Documentation](docs/) - TypeDoc-generated API reference
363
- - [CONTRIBUTING.md](CONTRIBUTING.md) - Development setup, workflow, and standards
364
- - [CHANGELOG.md](CHANGELOG.md) - Version history and release notes
365
-
366
- ### After Deployment
367
-
368
- Your project contains:
369
-
370
- - **88 production-ready components** deployed in 90 seconds
371
- - **19 specialized agents** in `.claude/agents/` (7 execution + 1 audit + 4 infrastructure + 3 leadership + 4 planning)
372
- - **20 slash commands** in `.claude/commands/` (2 execution + 1 infrastructure + 3 investigation + 4 maintenance + 4 planning + 3 session + 3 utility)
373
- - **Complete knowledge base** in `trinity/knowledge-base/` (ARCHITECTURE.md, ISSUES.md, To-do.md, Technical-Debt.md)
374
- - **Investigation templates** in `trinity/templates/investigations/` (bug, feature, performance, security, technical)
375
- - **Work order templates** in `trinity/templates/work-orders/`
376
- - **Session archives** in `trinity/sessions/`
377
- - **Audit reports** in `trinity/reports/`
378
- - **Linting tools** configured for your framework
379
-
380
- **Complete Deployed Structure:**
381
-
382
- ```
383
- your-project/
384
- ├── .claude/
385
- │ ├── agents/
386
- │ │ ├── aj-team/ # 7 execution agents (APO, BAS, BON, CAP, DRA, KIL, URO)
387
- │ │ ├── audit/ # 1 quality auditor (JUNO)
388
- │ │ ├── deployment/ # 4 infrastructure agents (EIN, INO, TAN, ZEN)
389
- │ │ ├── leadership/ # 3 orchestration agents (ALY, AJ-CC, AJ-MAESTRO)
390
- │ │ └── planning/ # 4 planning agents (MON, ROR, EUS, TRA)
391
- │ ├── commands/
392
- │ │ ├── execution/ # trinity-orchestrate, trinity-audit
393
- │ │ ├── infrastructure/ # trinity-init
394
- │ │ ├── investigation/ # trinity-create-investigation, trinity-plan-investigation, trinity-investigate-templates
395
- │ │ ├── maintenance/ # trinity-readme, trinity-docs, trinity-docs-update, trinity-changelog
396
- │ │ ├── planning/ # trinity-requirements, trinity-design, trinity-decompose, trinity-plan
397
- │ │ ├── session/ # trinity-start, trinity-continue, trinity-end
398
- │ │ └── utility/ # trinity-verify, trinity-agents, trinity-workorder
399
- │ └── EMPLOYEE-DIRECTORY.md # 19-agent team guide
400
- ├── trinity/
401
- │ ├── knowledge-base/ # ARCHITECTURE.md, ISSUES.md, To-do.md, Technical-Debt.md, Trinity.md
402
- │ ├── templates/
403
- │ │ ├── documentation/ # 2 README templates + 23 report templates
404
- │ │ ├── investigations/ # 5 investigation templates (bug, feature, performance, security, technical)
405
- │ │ └── work-orders/ # 6 work order templates
406
- ├── investigations/ # Active investigations
407
- │ └── plans/ # Investigation execution plans
408
- │ ├── sessions/ # Session archives
409
- │ ├── reports/ # Audit and integration reports
410
- │ ├── work-orders/ # Active work orders
411
- │ ├── patterns/ # Reusable patterns library
412
- └── archive/ # Archived sessions, reports, investigations
413
- ├── CLAUDE.md # Root context file
414
- └── src/CLAUDE.md # Framework-specific context
415
- ```
416
-
417
- - **Pre-commit hooks** automatically enforcing quality standards
418
-
419
- ---
420
-
421
- ## Contributing
422
-
423
- Trinity Method SDK is open source and welcomes contributions!
424
-
425
- **Ways to Contribute:**
426
-
427
- - 🐛 Report bugs and issues
428
- - 💡 Suggest new features or agent improvements
429
- - 📝 Improve documentation
430
- - 🔧 Submit pull requests
431
- - ⭐ Star the repository if you find it useful
432
-
433
- **Development Setup:**
434
-
435
- ```bash
436
- # Clone repository
437
- git clone https://github.com/lukadfagundes/trinity-method-sdk.git
438
- cd trinity-method-sdk
439
-
440
- # Install dependencies
441
- npm install
442
-
443
- # Build SDK
444
- npm run build
445
-
446
- # Test locally
447
- npm link
448
- trinity deploy
449
- ```
450
-
451
- See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
452
-
453
- ---
454
-
455
- ## Development & Publishing
456
-
457
- ### CI/CD Pipeline
458
-
459
- Trinity uses GitHub Actions for comprehensive continuous integration and deployment with BAS 6-phase quality gates.
460
-
461
- #### Continuous Integration (CI)
462
-
463
- **Automated Quality Checks on Every Push:**
464
-
465
- - ✅ Multi-platform testing (Ubuntu, Windows, macOS)
466
- - ✅ Multi-version testing (Node.js 18.x, 20.x, 22.x)
467
- - ✅ Trinity component validation (19 agents, 20 slash commands, knowledge base, CI/CD templates)
468
- - ✅ Test suite execution (unit, integration, e2e, performance)
469
- - ✅ Code coverage validation (80%+ threshold enforced)
470
- - Linting and type checking
471
- - ✅ Security scanning (npm audit, dependency checks)
472
- - Build verification with artifact validation
473
- - ✅ Documentation validation
474
-
475
- **BAS 6-Phase Quality Gates:**
476
-
477
- 1. **Phase 1**: Code Quality (Linting, type checking, formatting)
478
- 2. **Phase 2**: Structure Validation (Trinity template validation)
479
- 3. **Phase 3**: Build Validation (TypeScript compilation, artifact verification)
480
- 4. **Phase 4**: Testing (All test suites across platforms)
481
- 5. **Phase 5**: Coverage Check (≥80% threshold)
482
- 6. **Phase 6**: Documentation (API docs, README validation)
483
-
484
- **CI Workflow Location:** [.github/workflows/ci.yml](.github/workflows/ci.yml)
485
-
486
- #### Publishing to npm
487
-
488
- **Manual Publishing Workflow:**
489
-
490
- ```bash
491
- # 1. Update version and changelog
492
- npm version patch # or minor, major
493
-
494
- # 2. Build and publish
495
- npm run build
496
- npm publish --access public
497
-
498
- # 3. Create git tag and push
499
- git tag -a v2.0.9 -m "Release v2.0.9"
500
- git push origin main --follow-tags
501
- ```
502
-
503
- **Automated Checks Before Publishing:**
504
-
505
- The `prepublishOnly` script runs automatically before every publish:
506
-
507
- 1. TypeScript compilation (`npm run build`)
508
- 2. Template copying to dist/
509
- 3. Full test suite execution (`npm run test`)
510
- 4. Only publishes if all checks pass
511
-
512
- ---
513
-
514
- ## License
515
-
516
- MIT License - see [LICENSE](LICENSE) for details
517
-
518
- ---
519
-
520
- ## Links
521
-
522
- ### Project Resources
523
-
524
- - **npm Package**: [trinity-method-sdk](https://www.npmjs.com/package/trinity-method-sdk)
525
- - **GitHub**: [lukadfagundes/trinity-method-sdk](https://github.com/lukadfagundes/trinity-method-sdk)
526
- - **Issues**: [GitHub Issues](https://github.com/lukadfagundes/trinity-method-sdk/issues)
527
- - **Discussions**: [GitHub Discussions](https://github.com/lukadfagundes/trinity-method-sdk/discussions)
528
-
529
- ### Documentation
530
-
531
- - **API Documentation**: [docs/](docs/) - Generated TypeDoc API reference
532
- - **Contributing Guide**: [CONTRIBUTING.md](CONTRIBUTING.md) - Development setup, workflow, and standards
533
- - **Changelog**: [CHANGELOG.md](CHANGELOG.md) - Version history and release notes
534
-
535
- ---
536
-
537
- **Built with ❤️ by the Trinity Method Team**
538
-
539
- _Trinity Method: Investigation-first development for the AI age_
1
+ # Trinity Method SDK
2
+
3
+ [![npm version](https://img.shields.io/npm/v/trinity-method-sdk?color=success)](https://www.npmjs.com/package/trinity-method-sdk)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D16.9.0-brightgreen)](https://nodejs.org/)
6
+ [![AI Agents](https://img.shields.io/badge/AI%20Agent-Claude%20Code-blue)](https://github.com/lukadfagundes/trinity-method-sdk)
7
+
8
+ > Investigation-first development methodology for Claude Code
9
+
10
+ ---
11
+
12
+ ## Why Trinity Method Exists
13
+
14
+ ### The Problem with Traditional AI-Assisted Development
15
+
16
+ AI coding assistants are powerful, but without structure they become expensive guessing machines:
17
+
18
+ **❌ Jump-to-Code Anti-Pattern:**
19
+
20
+ - AI generates code without understanding the problem
21
+ - No investigation phase → immediate implementation
22
+ - Context lost between sessions → repeated mistakes
23
+ - No institutional knowledge → every session starts from zero
24
+ - Inconsistent quality → success depends on prompt luck
25
+ - Manual quality setup → 50 minutes configuring linters per project
26
+
27
+ **The Cost:**
28
+
29
+ - Developers waste time debugging AI-generated code that solves the wrong problem
30
+ - Teams lose hard-won lessons when developers leave
31
+ - Technical debt accumulates invisibly
32
+ - Code quality varies wildly across sessions
33
+
34
+ ### Our Philosophy: Investigation-First Development
35
+
36
+ Trinity Method rejects "prompt and pray" development. Instead, we enforce **systematic investigation before implementation**:
37
+
38
+ #### 1. Investigation-First Principle
39
+
40
+ ```text
41
+ WRONG: "Build authentication" → AI generates code → Debug for hours
42
+ RIGHT: "Investigate authentication requirements" → Understand problem → Design solution → Implement correctly
43
+ ```
44
+
45
+ #### 2. Evidence-Based Decisions
46
+
47
+ Every decision backed by documentation, codebase metrics, and historical patterns. No guessing.
48
+
49
+ **3. Knowledge Preservation**
50
+ Lessons learned persist across sessions through institutional memory. Agents get smarter over time.
51
+
52
+ **4. Systematic Quality Assurance**
53
+ Quality isn't aspirational—it's systematically enforced through automated gates (BAS 6-phase validation).
54
+
55
+ ### The Trinity Transformation
56
+
57
+ **✅ With Trinity Method:**
58
+
59
+ - **Investigation before coding** → Understand the problem first
60
+ - **Persistent knowledge base** → Learn from every session
61
+ - **Automated quality enforcement** → BAS gates ensure standards
62
+ - **18-agent team coordination** → Right specialist for each task
63
+ - **Institutional memory** → Patterns, strategies, and lessons preserved
64
+ - **90-second deployment** → Complete development environment instantly
65
+
66
+ ---
67
+
68
+ ## What is Trinity Method SDK
69
+
70
+ Trinity Method SDK is a **production-ready development methodology** that transforms AI-assisted coding
71
+ from random generation into systematic engineering.
72
+
73
+ ### Core Philosophy
74
+
75
+ **Trinity Method enforces three pillars:**
76
+
77
+ 1. **Investigation-First Development**
78
+ - Systematic investigation using MON (Requirements), ROR (Design), TRA (Planning)
79
+ - Evidence-based decisions backed by documentation and metrics
80
+ - Scale-based workflows: SMALL (0 stop points) → MEDIUM (2 stop points) → LARGE (4 stop points)
81
+
82
+ 2. **Knowledge Preservation**
83
+ - Learning system captures patterns from every investigation
84
+ - Cross-session persistence through filesystem storage
85
+ - Agent knowledge sharing via pub/sub bus (≥0.8 confidence threshold)
86
+
87
+ 3. **Systematic Quality Assurance**
88
+ - BAS 6-phase quality gate: Lint Structure → Build → Test → Coverage (≥80%) → Review
89
+ - Crisis management system for 5 crisis types (build, test, error, performance, security)
90
+ - Automated codebase metrics collection and technical debt tracking
91
+
92
+ ### The 18-Agent Team
93
+
94
+ Trinity SDK includes **18 specialized agents** organized across 5 functional teams:
95
+
96
+ **Planning Layer:**
97
+
98
+ - **MON** - Requirements Analyst (functional & non-functional requirements)
99
+ - **ROR** - Design Architect (technical design, ADRs)
100
+ - **TRA** - Work Planner (implementation sequencing, BAS integration)
101
+ - **EUS** - Task Decomposer (atomic task breakdown)
102
+
103
+ **Execution Layer:**
104
+
105
+ - **KIL** - Task Executor (TDD implementation: RED GREEN → REFACTOR)
106
+ - **BAS** - Quality Gate (6-phase validation enforcer)
107
+ - **DRA** - Code Reviewer (design doc compliance, quality escalation)
108
+
109
+ **Support Layer:**
110
+
111
+ - **APO** - Documentation Specialist (API docs, inline comments)
112
+ - **BON** - Dependency Manager (package security, version management)
113
+ - **CAP** - Configuration Specialist (env vars, config files)
114
+ - **URO** - Refactoring Specialist (technical debt reduction)
115
+
116
+ **Leadership:**
117
+
118
+ - **ALY** - Chief Technology Officer (investigation orchestration, strategic coordination)
119
+ - **AJ MAESTRO** - Orchestrator (multi-agent workflow orchestration, task delegation)
120
+
121
+ **Deployment:**
122
+
123
+ - **TAN** - Structure Specialist (directory structure validation)
124
+ - **ZEN** - Knowledge Base Specialist (comprehensive documentation)
125
+ - **INO** - Context Specialist (CLAUDE.md hierarchy management)
126
+ - **EIN** - CI/CD Specialist (continuous integration/deployment automation)
127
+
128
+ **Audit:**
129
+
130
+ - **JUNO** - Quality Auditor (comprehensive codebase audits, deployment verification)
131
+
132
+ ### What Gets Deployed
133
+
134
+ Trinity deploys **88 production-ready components** in 90 seconds:
135
+
136
+ **Methodology Infrastructure:**
137
+
138
+ - `.claude/trinity/knowledge-base/` - 9 living documentation files
139
+ - ARCHITECTURE.md (codebase metrics, architecture documentation)
140
+ - ISSUES.md (known issues and bug tracking)
141
+ - To-do.md (task management and priorities)
142
+ - Technical-Debt.md (technical debt tracking)
143
+ - Trinity.md (project-specific Trinity guide)
144
+ - TESTING-PRINCIPLES.md (testing standards)
145
+ - CODING-PRINCIPLES.md (code quality standards)
146
+ - DOCUMENTATION-CRITERIA.md (documentation standards)
147
+ - AI-DEVELOPMENT-GUIDE.md (AI-assisted development best practices)
148
+ - `.claude/trinity/templates/` - Reusable templates
149
+ - `documentation/` - Documentation templates (2 README templates + 23 report templates)
150
+ - `investigations/` - 5 investigation templates (bug, feature, performance, security, technical)
151
+ - `work-orders/` - 6 work order templates
152
+ - `.claude/trinity/investigations/` - Active investigations with execution plans
153
+ - `.claude/trinity/sessions/` - Session archives
154
+ - `.claude/trinity/reports/` - Audit and integration reports
155
+ - `.claude/trinity/work-orders/` - Active work orders
156
+ - `.claude/trinity/archive/` - Archived sessions, reports, and investigations
157
+
158
+ **Agent System:**
159
+
160
+ - `.claude/agents/` - 18 specialized agents organized by category:
161
+ - `aj-team/` - 7 execution agents (APO, BAS, BON, CAP, DRA, KIL, URO)
162
+ - `audit/` - 1 quality auditor (JUNO)
163
+ - `deployment/` - 4 infrastructure agents (EIN, INO, TAN, ZEN)
164
+ - `leadership/` - 2 orchestration agents (ALY, AJ MAESTRO)
165
+ - `planning/` - 4 planning agents (MON, ROR, EUS, TRA)
166
+ - `.claude/commands/` - 21 slash commands organized in 7 categories:
167
+ - `execution/` - 3 commands (orchestrate, audit, breakdown)
168
+ - `infrastructure/` - 1 command (init)
169
+ - `investigation/` - 3 commands (create-investigation, plan-investigation, investigate-templates)
170
+ - `maintenance/` - 4 commands (readme, docs, docs-update, changelog)
171
+ - `planning/` - 4 commands (requirements, design, decompose, plan)
172
+ - `session/` - 3 commands (start, continue, end)
173
+ - `utility/` - 3 commands (verify, agents, workorder)
174
+ - `.claude/EMPLOYEE-DIRECTORY.md` - Complete 18-agent team guide
175
+
176
+ **Context Hierarchy:**
177
+
178
+ - Root `CLAUDE.md` - Global project context
179
+ - `.claude/trinity/CLAUDE.md` - Trinity Method enforcement
180
+ - `src/CLAUDE.md` - Technology-specific rules
181
+
182
+ **Quality Automation:**
183
+
184
+ - Linting tools (ESLint, Prettier, Black, Flake8, Clippy, Rustfmt)
185
+ - Pre-commit hooks (Husky + lint-staged for Node.js; Python's pre-commit framework for Python, Flutter, Rust)
186
+ - Automatic dependency injection to package.json/requirements.txt
187
+ - Real codebase metrics: TODO counts, console statements, file complexity, git metrics
188
+
189
+ ---
190
+
191
+ ## How Trinity Works
192
+
193
+ ### Installation
194
+
195
+ #### Option 1: Use npx (Recommended - No installation needed)
196
+
197
+ ```bash
198
+ # Runs latest version without installing
199
+ npx trinity-method-sdk deploy
200
+ ```
201
+
202
+ #### Option 2: Global Installation
203
+
204
+ ```bash
205
+ # Install once globally
206
+ npm install -g trinity-method-sdk
207
+
208
+ # Then use anywhere
209
+ trinity deploy
210
+ ```
211
+
212
+ ### Quick Start (90 Seconds to Production)
213
+
214
+ ```bash
215
+ # Navigate to your project
216
+ cd your-project
217
+
218
+ # Deploy Trinity Method (using npx)
219
+ npx trinity-method-sdk deploy
220
+ ```
221
+
222
+ **Interactive Wizard:**
223
+
224
+ 1. ✅ **Stack Detection**: Automatically detects framework (Node.js, Python, Rust, Flutter, Go)
225
+ 2. ✅ **Linting Setup**: Choose "Recommended" for one-click best practices
226
+ 3. ✅ **Deploy**: 90-second deployment with full infrastructure
227
+ 4. **Install Dependencies**: `npm install` (or `pip install -r requirements-dev.txt`)
228
+ 5. ✅ **Setup Hooks**: Automatic for Node.js (Husky via `npm install`);
229
+ for Python/Flutter/Rust: `pip install pre-commit && pre-commit install`
230
+
231
+ **Result:** Production-ready development environment with 18 agents, 21 slash commands, quality gates, and documentation.
232
+
233
+ ### Available Commands
234
+
235
+ ```bash
236
+ # Deploy Trinity to your project
237
+ npx trinity-method-sdk deploy
238
+
239
+ # Update Trinity to latest version
240
+ npx trinity-method-sdk update
241
+ ```
242
+
243
+ ### Using Trinity Method (Slash Commands)
244
+
245
+ After deployment, access Trinity functionality through Claude Code slash commands:
246
+
247
+ **Session Management:**
248
+
249
+ - `/trinity-start` - Start workflow guide
250
+ - `/trinity-continue` - Resume after interruption
251
+ - `/trinity-end` - End session and archive
252
+
253
+ **Planning:**
254
+
255
+ - `/trinity-requirements` - Analyze requirements (MON)
256
+ - `/trinity-design` - Create technical design (ROR)
257
+ - `/trinity-decompose` - Break down tasks (EUS)
258
+ - `/trinity-plan` - Create implementation plan (TRA)
259
+
260
+ **Execution:**
261
+
262
+ - `/trinity-orchestrate` - Execute with ALY orchestration
263
+ - `/trinity-audit` - Run codebase audit (JUNO)
264
+ - `/trinity-breakdown` - Guided step-by-step implementation walkthrough
265
+
266
+ **Maintenance:**
267
+
268
+ - `/trinity-readme` - Update README coverage (APO)
269
+ - `/trinity-docs` - Generate new documentation (JUNO + 3 parallel APOs)
270
+ - `/trinity-docs-update` - Update existing documentation (JUNO audit → 3 APOs → verification loop)
271
+ - `/trinity-changelog` - Maintain CHANGELOG.md (APO)
272
+
273
+ **Investigation:**
274
+
275
+ - `/trinity-create-investigation` - Create structured investigation
276
+ - `/trinity-plan-investigation` - Generate investigation plan
277
+ - `/trinity-investigate-templates` - View investigation templates
278
+
279
+ **Infrastructure:**
280
+
281
+ - `/trinity-init` - Initialize Trinity configuration
282
+
283
+ **Utility:**
284
+
285
+ - `/trinity-verify` - Verify Trinity deployment
286
+ - `/trinity-agents` - View agent directory
287
+ - `/trinity-workorder` - Create work orders
288
+
289
+ ### Linting & Code Quality (85-90% Time Savings)
290
+
291
+ #### Before Trinity (Manual Setup): ~50 minutes per project
292
+
293
+ 1. Research tools for your framework
294
+ 2. Install dependencies
295
+ 3. Create configuration files
296
+ 4. Configure pre-commit hooks
297
+ 5. Test and debug configuration
298
+
299
+ #### With Trinity (Automated): ~6 minutes per project
300
+
301
+ 1. Select "Recommended" during deployment (30 seconds)
302
+ 2. Run `npm install` (3-5 minutes, automatically sets up Husky hooks for Node.js)
303
+ 3. For Python/Flutter/Rust only: `pip install pre-commit && pre-commit install` (30 seconds)
304
+
305
+ **Supported Frameworks:**
306
+
307
+ - **Node.js/React**: ESLint + Prettier + Husky + lint-staged
308
+ - **Python**: Black + Flake8 + isort + Pre-commit
309
+ - **Flutter**: Dart Analyzer + Pre-commit
310
+ - **Rust**: Clippy + Rustfmt + Pre-commit
311
+
312
+ ---
313
+
314
+ ## Designed for Claude Code
315
+
316
+ Trinity Method SDK is built exclusively for
317
+ [Claude Code](https://claude.com/claude-code), Anthropic's AI pair programming environment.
318
+
319
+ ### Why Claude Code
320
+
321
+ - **Deep Integration**: Trinity's 18-agent team leverages Claude Code's agent architecture
322
+ - **Slash Commands**: Built-in `/trinity-*` commands for instant workflow access
323
+ - **Context System**: Layered CLAUDE.md hierarchy for persistent project knowledge
324
+ - **Quality Focus**: Exceptional single-agent experience optimized for Claude
325
+
326
+ ### Other AI Assistants
327
+
328
+ The Trinity Method **philosophy** is agent-agnostic, but this SDK is optimized for Claude Code's
329
+ capabilities. Want to use Trinity with Cursor, Copilot, or others? We welcome contributions!
330
+ See [CONTRIBUTING.md](./CONTRIBUTING.md).
331
+
332
+ ---
333
+
334
+ ## Examples & Documentation
335
+
336
+ ### Real-World Deployments
337
+
338
+ ```bash
339
+ # Node.js/Express API
340
+ cd my-api && npx trinity-method-sdk deploy
341
+ # Result: API with ESLint, Prettier, Husky, 18 agents, quality gates
342
+
343
+ # Python/Django Project
344
+ cd my-django && npx trinity-method-sdk deploy
345
+ # Result: Django with Black, Flake8, isort, pre-commit, full Trinity infrastructure
346
+
347
+ # Flutter Mobile App
348
+ cd my-flutter-app && npx trinity-method-sdk deploy
349
+ # Result: Flutter with Dart Analyzer, pre-commit, investigation templates
350
+
351
+ # Rust CLI Tool
352
+ cd my-rust-cli && npx trinity-method-sdk deploy
353
+ # Result: Rust with Clippy, Rustfmt, pre-commit, crisis management
354
+ ```
355
+
356
+ ### Documentation
357
+
358
+ After deploying Trinity to your project, comprehensive documentation is available in your project:
359
+
360
+ **Trinity Knowledge Base:**
361
+
362
+ - `.claude/trinity/knowledge-base/ARCHITECTURE.md` - System architecture with codebase metrics
363
+ - `.claude/trinity/knowledge-base/ISSUES.md` - Known issues and bug tracking
364
+ - `.claude/trinity/knowledge-base/To-do.md` - Task management and priorities
365
+ - `.claude/trinity/knowledge-base/Technical-Debt.md` - Technical debt tracking
366
+ - `.claude/trinity/knowledge-base/Trinity.md` - Project-specific Trinity guide
367
+ - `.claude/trinity/knowledge-base/TESTING-PRINCIPLES.md` - Testing standards
368
+ - `.claude/trinity/knowledge-base/CODING-PRINCIPLES.md` - Code quality standards
369
+
370
+ **Agent System:**
371
+
372
+ - `.claude/EMPLOYEE-DIRECTORY.md` - Complete agent reference and selection guide
373
+ - `.claude/agents/` - 18 specialized agent markdown files
374
+
375
+ **SDK Documentation:**
376
+
377
+ - [API Documentation](docs/) - TypeDoc-generated API reference
378
+ - [CONTRIBUTING.md](CONTRIBUTING.md) - Development setup, workflow, and standards
379
+ - [CHANGELOG.md](CHANGELOG.md) - Version history and release notes
380
+
381
+ ### After Deployment
382
+
383
+ Your project contains:
384
+
385
+ - **88 production-ready components** deployed in 90 seconds
386
+ - **18 specialized agents** in `.claude/agents/` (7 execution + 1 audit + 4 deployment + 2 leadership + 4 planning)
387
+ - **21 slash commands** in `.claude/commands/`
388
+ (3 execution + 1 infrastructure + 3 investigation + 4 maintenance + 4 planning + 3 session + 3 utility)
389
+ - **Complete knowledge base** in `.claude/trinity/knowledge-base/` (ARCHITECTURE.md, ISSUES.md, To-do.md, Technical-Debt.md)
390
+ - **Investigation templates** in `.claude/trinity/templates/investigations/` (bug, feature, performance, security, technical)
391
+ - **Work order templates** in `.claude/trinity/templates/work-orders/`
392
+ - **Session archives** in `.claude/trinity/sessions/`
393
+ - **Audit reports** in `.claude/trinity/reports/`
394
+ - **Linting tools** configured for your framework
395
+
396
+ **Complete Deployed Structure:**
397
+
398
+ ```text
399
+ your-project/
400
+ ├── .claude/
401
+ │ ├── agents/
402
+ ├── aj-team/ # 7 execution agents (APO, BAS, BON, CAP, DRA, KIL, URO)
403
+ │ │ ├── audit/ # 1 quality auditor (JUNO)
404
+ │ │ ├── deployment/ # 4 infrastructure agents (EIN, INO, TAN, ZEN)
405
+ │ │ ├── leadership/ # 2 orchestration agents (ALY, AJ MAESTRO)
406
+ │ └── planning/ # 4 planning agents (MON, ROR, EUS, TRA)
407
+ ├── commands/
408
+ ├── execution/ # trinity-orchestrate, trinity-audit, trinity-breakdown
409
+ ├── infrastructure/ # trinity-init
410
+ ├── investigation/ # trinity-create-investigation, trinity-plan-investigation, trinity-investigate-templates
411
+ ├── maintenance/ # trinity-readme, trinity-docs, trinity-docs-update, trinity-changelog
412
+ │ ├── planning/ # trinity-requirements, trinity-design, trinity-decompose, trinity-plan
413
+ │ │ ├── session/ # trinity-start, trinity-continue, trinity-end
414
+ │ │ └── utility/ # trinity-verify, trinity-agents, trinity-workorder
415
+ │ ├── trinity/
416
+ │ │ ├── knowledge-base/ # ARCHITECTURE.md, ISSUES.md, To-do.md, Technical-Debt.md, Trinity.md
417
+ │ │ ├── templates/
418
+ │ │ │ ├── documentation/ # 2 README templates + 23 report templates
419
+ │ │ │ ├── investigations/ # 5 investigation templates (bug, feature, performance, security, technical)
420
+ │ │ │ └── work-orders/ # 6 work order templates
421
+ │ │ ├── investigations/ # Active investigations
422
+ │ │ │ └── plans/ # Investigation execution plans
423
+ │ │ ├── sessions/ # Session archives
424
+ │ │ ├── reports/ # Audit and integration reports
425
+ │ │ ├── work-orders/ # Active work orders
426
+ │ │ └── archive/ # Archived sessions, reports, investigations
427
+ │ └── EMPLOYEE-DIRECTORY.md # 18-agent team guide
428
+ ├── CLAUDE.md # Root context file
429
+ └── src/CLAUDE.md # Framework-specific context
430
+ ```
431
+
432
+ - **Pre-commit hooks** automatically enforcing quality standards
433
+
434
+ ---
435
+
436
+ ## Contributing
437
+
438
+ Trinity Method SDK is open source and welcomes contributions!
439
+
440
+ **Ways to Contribute:**
441
+
442
+ - 🐛 Report bugs and issues
443
+ - 💡 Suggest new features or agent improvements
444
+ - 📝 Improve documentation
445
+ - 🔧 Submit pull requests
446
+ - Star the repository if you find it useful
447
+
448
+ **Development Setup:**
449
+
450
+ ```bash
451
+ # Clone repository
452
+ git clone https://github.com/lukadfagundes/trinity-method-sdk.git
453
+ cd trinity-method-sdk
454
+
455
+ # Install dependencies
456
+ npm install
457
+
458
+ # Build SDK
459
+ npm run build
460
+
461
+ # Test locally
462
+ npm link
463
+ trinity deploy
464
+ ```
465
+
466
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
467
+
468
+ ---
469
+
470
+ ## Development & Publishing
471
+
472
+ ### CI/CD Pipeline
473
+
474
+ Trinity uses GitHub Actions for comprehensive continuous integration and deployment with BAS 6-phase quality gates.
475
+
476
+ #### Continuous Integration (CI)
477
+
478
+ **Automated Quality Checks on Every Push:**
479
+
480
+ - Multi-platform testing (Ubuntu, Windows, macOS)
481
+ - Multi-version testing (Node.js 18.x, 20.x, 22.x)
482
+ - Trinity component validation (18 agents, 21 slash commands, knowledge base, CI/CD templates)
483
+ - ✅ Test suite execution (unit, integration, e2e, performance)
484
+ - Code coverage validation (80%+ threshold enforced)
485
+ - ✅ Linting and type checking
486
+ - Security scanning (npm audit, dependency checks)
487
+ - ✅ Build verification with artifact validation
488
+ - Documentation validation
489
+
490
+ **BAS 6-Phase Quality Gates:**
491
+
492
+ 1. **Phase 1**: Code Quality (Linting, type checking, formatting)
493
+ 2. **Phase 2**: Structure Validation (Trinity template validation)
494
+ 3. **Phase 3**: Build Validation (TypeScript compilation, artifact verification)
495
+ 4. **Phase 4**: Testing (All test suites across platforms)
496
+ 5. **Phase 5**: Coverage Check (≥80% threshold)
497
+ 6. **Phase 6**: Documentation (API docs, README validation)
498
+
499
+ **CI Workflow Location:** [.github/workflows/ci.yml](.github/workflows/ci.yml)
500
+
501
+ #### Publishing to npm
502
+
503
+ **Manual Publishing Workflow:**
504
+
505
+ ```bash
506
+ # 1. Update version and changelog
507
+ npm version patch # or minor, major
508
+
509
+ # 2. Build and publish
510
+ npm run build
511
+ npm publish --access public
512
+
513
+ # 3. Create git tag and push
514
+ git tag -a vX.Y.Z -m "Release vX.Y.Z"
515
+ git push origin main --follow-tags
516
+ ```
517
+
518
+ **Automated Checks Before Publishing:**
519
+
520
+ The `prepublishOnly` script runs automatically before every publish:
521
+
522
+ 1. TypeScript compilation (`npm run build`)
523
+ 2. Template copying to dist/
524
+ 3. Full test suite execution (`npm run test`)
525
+ 4. Only publishes if all checks pass
526
+
527
+ ---
528
+
529
+ ## License
530
+
531
+ MIT License - see [LICENSE](LICENSE) for details
532
+
533
+ ---
534
+
535
+ ## Links
536
+
537
+ ### Project Resources
538
+
539
+ - **npm Package**: [trinity-method-sdk](https://www.npmjs.com/package/trinity-method-sdk)
540
+ - **GitHub**: [lukadfagundes/trinity-method-sdk](https://github.com/lukadfagundes/trinity-method-sdk)
541
+ - **Issues**: [GitHub Issues](https://github.com/lukadfagundes/trinity-method-sdk/issues)
542
+ - **Discussions**: [GitHub Discussions](https://github.com/lukadfagundes/trinity-method-sdk/discussions)
543
+
544
+ ### Documentation
545
+
546
+ - **API Documentation**: [docs/](docs/) - Generated TypeDoc API reference
547
+ - **Contributing Guide**: [CONTRIBUTING.md](CONTRIBUTING.md) - Development setup, workflow, and standards
548
+ - **Changelog**: [CHANGELOG.md](CHANGELOG.md) - Version history and release notes
549
+
550
+ ---