trinity-method-sdk 2.0.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.
- package/CHANGELOG.md +116 -0
- package/LICENSE +21 -0
- package/README.md +555 -0
- package/dist/cli/commands/deploy/agents.d.ts +14 -0
- package/dist/cli/commands/deploy/agents.js +59 -0
- package/dist/cli/commands/deploy/ci-cd.d.ts +13 -0
- package/dist/cli/commands/deploy/ci-cd.js +50 -0
- package/dist/cli/commands/deploy/claude-setup.d.ts +17 -0
- package/dist/cli/commands/deploy/claude-setup.js +91 -0
- package/dist/cli/commands/deploy/configuration.d.ts +13 -0
- package/dist/cli/commands/deploy/configuration.js +215 -0
- package/dist/cli/commands/deploy/directories.d.ts +12 -0
- package/dist/cli/commands/deploy/directories.js +38 -0
- package/dist/cli/commands/deploy/gitignore.d.ts +12 -0
- package/dist/cli/commands/deploy/gitignore.js +53 -0
- package/dist/cli/commands/deploy/index.d.ts +38 -0
- package/dist/cli/commands/deploy/index.js +156 -0
- package/dist/cli/commands/deploy/knowledge-base.d.ts +16 -0
- package/dist/cli/commands/deploy/knowledge-base.js +75 -0
- package/dist/cli/commands/deploy/linting.d.ts +18 -0
- package/dist/cli/commands/deploy/linting.js +51 -0
- package/dist/cli/commands/deploy/metrics.d.ts +13 -0
- package/dist/cli/commands/deploy/metrics.js +34 -0
- package/dist/cli/commands/deploy/pre-flight.d.ts +13 -0
- package/dist/cli/commands/deploy/pre-flight.js +29 -0
- package/dist/cli/commands/deploy/root-files.d.ts +16 -0
- package/dist/cli/commands/deploy/root-files.js +178 -0
- package/dist/cli/commands/deploy/sdk-install.d.ts +12 -0
- package/dist/cli/commands/deploy/sdk-install.js +57 -0
- package/dist/cli/commands/deploy/summary.d.ts +14 -0
- package/dist/cli/commands/deploy/summary.js +130 -0
- package/dist/cli/commands/deploy/templates.d.ts +14 -0
- package/dist/cli/commands/deploy/templates.js +84 -0
- package/dist/cli/commands/deploy/types.d.ts +39 -0
- package/dist/cli/commands/deploy/types.js +5 -0
- package/dist/cli/commands/update/agents.d.ts +14 -0
- package/dist/cli/commands/update/agents.js +31 -0
- package/dist/cli/commands/update/backup.d.ts +31 -0
- package/dist/cli/commands/update/backup.js +97 -0
- package/dist/cli/commands/update/commands.d.ts +14 -0
- package/dist/cli/commands/update/commands.js +75 -0
- package/dist/cli/commands/update/index.d.ts +15 -0
- package/dist/cli/commands/update/index.js +118 -0
- package/dist/cli/commands/update/knowledge-base.d.ts +14 -0
- package/dist/cli/commands/update/knowledge-base.js +38 -0
- package/dist/cli/commands/update/pre-flight.d.ts +13 -0
- package/dist/cli/commands/update/pre-flight.js +37 -0
- package/dist/cli/commands/update/summary.d.ts +20 -0
- package/dist/cli/commands/update/summary.js +47 -0
- package/dist/cli/commands/update/templates.d.ts +14 -0
- package/dist/cli/commands/update/templates.js +25 -0
- package/dist/cli/commands/update/types.d.ts +13 -0
- package/dist/cli/commands/update/types.js +7 -0
- package/dist/cli/commands/update/utils.d.ts +11 -0
- package/dist/cli/commands/update/utils.js +19 -0
- package/dist/cli/commands/update/verification.d.ts +20 -0
- package/dist/cli/commands/update/verification.js +54 -0
- package/dist/cli/commands/update/version.d.ts +18 -0
- package/dist/cli/commands/update/version.js +36 -0
- package/dist/cli/commands/update.d.ts +7 -0
- package/dist/cli/commands/update.js +7 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +36 -0
- package/dist/cli/types.d.ts +77 -0
- package/dist/cli/types.js +5 -0
- package/dist/cli/utils/deploy-ci.d.ts +22 -0
- package/dist/cli/utils/deploy-ci.js +138 -0
- package/dist/cli/utils/deploy-linting.d.ts +3 -0
- package/dist/cli/utils/deploy-linting.js +136 -0
- package/dist/cli/utils/detect-stack.d.ts +3 -0
- package/dist/cli/utils/detect-stack.js +270 -0
- package/dist/cli/utils/error-classes.d.ts +63 -0
- package/dist/cli/utils/error-classes.js +84 -0
- package/dist/cli/utils/error-handler.d.ts +59 -0
- package/dist/cli/utils/error-handler.js +127 -0
- package/dist/cli/utils/errors.d.ts +52 -0
- package/dist/cli/utils/errors.js +102 -0
- package/dist/cli/utils/get-sdk-path.d.ts +18 -0
- package/dist/cli/utils/get-sdk-path.js +31 -0
- package/dist/cli/utils/inject-dependencies.d.ts +2 -0
- package/dist/cli/utils/inject-dependencies.js +55 -0
- package/dist/cli/utils/linting-tools.d.ts +8 -0
- package/dist/cli/utils/linting-tools.js +206 -0
- package/dist/cli/utils/metrics/code-quality.d.ts +32 -0
- package/dist/cli/utils/metrics/code-quality.js +122 -0
- package/dist/cli/utils/metrics/dependency-parser.d.ts +21 -0
- package/dist/cli/utils/metrics/dependency-parser.js +153 -0
- package/dist/cli/utils/metrics/file-complexity.d.ts +26 -0
- package/dist/cli/utils/metrics/file-complexity.js +77 -0
- package/dist/cli/utils/metrics/framework-detector.d.ts +17 -0
- package/dist/cli/utils/metrics/framework-detector.js +120 -0
- package/dist/cli/utils/metrics/git-metrics.d.ts +30 -0
- package/dist/cli/utils/metrics/git-metrics.js +83 -0
- package/dist/cli/utils/metrics/index.d.ts +28 -0
- package/dist/cli/utils/metrics/index.js +100 -0
- package/dist/cli/utils/template-processor.d.ts +10 -0
- package/dist/cli/utils/template-processor.js +188 -0
- package/dist/cli/utils/validate-path.d.ts +80 -0
- package/dist/cli/utils/validate-path.js +180 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +8 -0
- package/dist/templates/agents/aj-team/apo-documentation-specialist.md.template +572 -0
- package/dist/templates/agents/aj-team/bas-quality-gate.md.template +906 -0
- package/dist/templates/agents/aj-team/bon-dependency-manager.md.template +636 -0
- package/dist/templates/agents/aj-team/cap-configuration-specialist.md.template +670 -0
- package/dist/templates/agents/aj-team/dra-code-reviewer.md.template +768 -0
- package/dist/templates/agents/aj-team/kil-task-executor.md.template +764 -0
- package/dist/templates/agents/aj-team/uro-refactoring-specialist.md.template +759 -0
- package/dist/templates/agents/audit/juno-auditor.md.template +447 -0
- package/dist/templates/agents/deployment/ein-cicd.md.template +694 -0
- package/dist/templates/agents/deployment/ino-context.md.template +733 -0
- package/dist/templates/agents/deployment/tan-structure.md.template +661 -0
- package/dist/templates/agents/deployment/zen-knowledge.md.template +451 -0
- package/dist/templates/agents/leadership/aj-cc.md.template +462 -0
- package/dist/templates/agents/leadership/aj-maestro.md.template +943 -0
- package/dist/templates/agents/leadership/aly-cto.md.template +407 -0
- package/dist/templates/agents/planning/eus-decomposer.md.template +496 -0
- package/dist/templates/agents/planning/mon-requirements.md.template +323 -0
- package/dist/templates/agents/planning/ror-design.md.template +465 -0
- package/dist/templates/agents/planning/tra-planner.md.template +432 -0
- package/dist/templates/ci/cd.yml.template +175 -0
- package/dist/templates/ci/ci.yml.template +196 -0
- package/dist/templates/ci/generic-ci.yml +115 -0
- package/dist/templates/ci/github-actions.yml +86 -0
- package/dist/templates/ci/gitlab-ci.yml +103 -0
- package/dist/templates/claude/EMPLOYEE-DIRECTORY.md.template +545 -0
- package/dist/templates/documentation/ROOT-README.md.template +307 -0
- package/dist/templates/documentation/SUBDIRECTORY-README.md.template +261 -0
- package/dist/templates/investigations/bug.md.template +484 -0
- package/dist/templates/investigations/feature.md.template +564 -0
- package/dist/templates/investigations/performance.md.template +625 -0
- package/dist/templates/investigations/security.md.template +714 -0
- package/dist/templates/investigations/technical.md.template +433 -0
- package/dist/templates/knowledge-base/AI-DEVELOPMENT-GUIDE.md.template +957 -0
- package/dist/templates/knowledge-base/ARCHITECTURE.md.template +452 -0
- package/dist/templates/knowledge-base/CODING-PRINCIPLES.md.template +750 -0
- package/dist/templates/knowledge-base/DOCUMENTATION-CRITERIA.md.template +1118 -0
- package/dist/templates/knowledge-base/ISSUES.md.template +539 -0
- package/dist/templates/knowledge-base/TESTING-PRINCIPLES.md.template +894 -0
- package/dist/templates/knowledge-base/Technical-Debt.md.template +640 -0
- package/dist/templates/knowledge-base/To-do.md.template +407 -0
- package/dist/templates/knowledge-base/Trinity.md.template +464 -0
- package/dist/templates/linting/flutter/.pre-commit-config.yaml.template +27 -0
- package/dist/templates/linting/flutter/analysis_options.yaml.template +26 -0
- package/dist/templates/linting/nodejs/.eslintrc-commonjs.json.template +19 -0
- package/dist/templates/linting/nodejs/.eslintrc-esm.json.template +19 -0
- package/dist/templates/linting/nodejs/.eslintrc-typescript.json.template +22 -0
- package/dist/templates/linting/nodejs/.pre-commit-config.yaml.template +51 -0
- package/dist/templates/linting/nodejs/.prettierrc.json.template +10 -0
- package/dist/templates/linting/python/.flake8.template +16 -0
- package/dist/templates/linting/python/.pre-commit-config.yaml.template +30 -0
- package/dist/templates/linting/python/pyproject.toml.template +38 -0
- package/dist/templates/linting/rust/.pre-commit-config.yaml.template +28 -0
- package/dist/templates/linting/rust/clippy.toml.template +14 -0
- package/dist/templates/linting/rust/rustfmt.toml.template +12 -0
- package/dist/templates/root/CLAUDE.md.template +65 -0
- package/dist/templates/root/TRINITY.md.template +52 -0
- package/dist/templates/shared/claude-commands/trinity-agents.md.template +168 -0
- package/dist/templates/shared/claude-commands/trinity-audit.md.template +646 -0
- package/dist/templates/shared/claude-commands/trinity-changelog.md.template +624 -0
- package/dist/templates/shared/claude-commands/trinity-continue.md.template +549 -0
- package/dist/templates/shared/claude-commands/trinity-create-investigation.md.template +232 -0
- package/dist/templates/shared/claude-commands/trinity-decompose.md.template +181 -0
- package/dist/templates/shared/claude-commands/trinity-design.md.template +347 -0
- package/dist/templates/shared/claude-commands/trinity-docs.md.template +2093 -0
- package/dist/templates/shared/claude-commands/trinity-end.md.template +397 -0
- package/dist/templates/shared/claude-commands/trinity-init.md.template +606 -0
- package/dist/templates/shared/claude-commands/trinity-investigate-templates.md.template +725 -0
- package/dist/templates/shared/claude-commands/trinity-orchestrate.md.template +1061 -0
- package/dist/templates/shared/claude-commands/trinity-plan-investigation.md.template +135 -0
- package/dist/templates/shared/claude-commands/trinity-plan.md.template +201 -0
- package/dist/templates/shared/claude-commands/trinity-readme.md.template +1971 -0
- package/dist/templates/shared/claude-commands/trinity-requirements.md.template +148 -0
- package/dist/templates/shared/claude-commands/trinity-start.md.template +268 -0
- package/dist/templates/shared/claude-commands/trinity-verify.md.template +453 -0
- package/dist/templates/shared/claude-commands/trinity-workorder.md.template +249 -0
- package/dist/templates/source/base-CLAUDE.md.template +310 -0
- package/dist/templates/source/flutter-CLAUDE.md.template +593 -0
- package/dist/templates/source/nodejs-CLAUDE.md.template +531 -0
- package/dist/templates/source/python-CLAUDE.md.template +510 -0
- package/dist/templates/source/react-CLAUDE.md.template +513 -0
- package/dist/templates/source/rust-CLAUDE.md.template +653 -0
- package/dist/templates/source/tests-CLAUDE.md.template +432 -0
- package/dist/templates/trinity/CLAUDE.md.template +372 -0
- package/dist/templates/work-orders/ANALYSIS-TEMPLATE.md.template +276 -0
- package/dist/templates/work-orders/AUDIT-TEMPLATE.md.template +262 -0
- package/dist/templates/work-orders/IMPLEMENTATION-TEMPLATE.md.template +260 -0
- package/dist/templates/work-orders/INVESTIGATION-TEMPLATE.md.template +206 -0
- package/dist/templates/work-orders/PATTERN-TEMPLATE.md.template +320 -0
- package/dist/templates/work-orders/VERIFICATION-TEMPLATE.md.template +273 -0
- package/package.json +94 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate AI-powered investigation plans with visualizations
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Generate a comprehensive AI-powered investigation plan using the Trinity Method.
|
|
6
|
+
|
|
7
|
+
**Investigation Planner Process:**
|
|
8
|
+
|
|
9
|
+
**Step 1: Gather Requirements**
|
|
10
|
+
Ask user:
|
|
11
|
+
- What needs investigation?
|
|
12
|
+
- Known symptoms or issues
|
|
13
|
+
- Affected systems/components
|
|
14
|
+
- Previous investigation attempts
|
|
15
|
+
- Time constraints
|
|
16
|
+
|
|
17
|
+
**Step 2: Analyze Context**
|
|
18
|
+
- Scan relevant codebase sections
|
|
19
|
+
- Review related investigations
|
|
20
|
+
- Check system dependencies
|
|
21
|
+
- Identify complexity factors
|
|
22
|
+
|
|
23
|
+
**Step 3: Generate Plan**
|
|
24
|
+
Using InvestigationPlanner, create:
|
|
25
|
+
|
|
26
|
+
1. **Investigation Strategy**
|
|
27
|
+
- Recommended approach (breadth-first, depth-first, hybrid)
|
|
28
|
+
- Key focus areas
|
|
29
|
+
- Risk assessment
|
|
30
|
+
- Complexity rating
|
|
31
|
+
|
|
32
|
+
2. **Phase Breakdown**
|
|
33
|
+
- Phase 1: Discovery & Analysis
|
|
34
|
+
- Phase 2: Hypothesis Formation
|
|
35
|
+
- Phase 3: Testing & Validation
|
|
36
|
+
- Phase 4: Documentation & Recommendations
|
|
37
|
+
|
|
38
|
+
3. **Resource Estimates**
|
|
39
|
+
- Estimated time: X hours
|
|
40
|
+
- Agent assignments (Aly, AJ, JUNO, etc.)
|
|
41
|
+
- Tools required
|
|
42
|
+
- External dependencies
|
|
43
|
+
|
|
44
|
+
4. **Task Checklist**
|
|
45
|
+
- [ ] Analyze entry points
|
|
46
|
+
- [ ] Map data flow
|
|
47
|
+
- [ ] Identify edge cases
|
|
48
|
+
- [ ] Test hypotheses
|
|
49
|
+
- [ ] Document findings
|
|
50
|
+
|
|
51
|
+
**Step 4: Generate Visualizations**
|
|
52
|
+
Create Mermaid diagrams:
|
|
53
|
+
|
|
54
|
+
```mermaid
|
|
55
|
+
graph TD
|
|
56
|
+
A[Start Investigation] --> B[Analyze Codebase]
|
|
57
|
+
B --> C[Form Hypotheses]
|
|
58
|
+
C --> D[Test Scenarios]
|
|
59
|
+
D --> E{Issue Found?}
|
|
60
|
+
E -->|Yes| F[Document Solution]
|
|
61
|
+
E -->|No| C
|
|
62
|
+
F --> G[End Investigation]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Step 5: Risk & Dependency Analysis**
|
|
66
|
+
- Potential blockers
|
|
67
|
+
- Required permissions/access
|
|
68
|
+
- Integration points
|
|
69
|
+
- Rollback considerations
|
|
70
|
+
|
|
71
|
+
**Output:**
|
|
72
|
+
Save investigation plan to:
|
|
73
|
+
`trinity/investigations/plans/PLAN-{investigation-title}.md`
|
|
74
|
+
|
|
75
|
+
**Plan Includes:**
|
|
76
|
+
- Executive summary
|
|
77
|
+
- Detailed phase breakdown
|
|
78
|
+
- Mermaid diagrams (flowchart, sequence, timeline)
|
|
79
|
+
- Resource allocation
|
|
80
|
+
- Success criteria
|
|
81
|
+
- Contingency plans
|
|
82
|
+
|
|
83
|
+
**Interactive Options:**
|
|
84
|
+
- Modify plan sections
|
|
85
|
+
- Add custom phases
|
|
86
|
+
- Assign specific agents
|
|
87
|
+
- Create investigation from plan
|
|
88
|
+
- Export plan to JSON
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## When to Use: /trinity-plan-investigation vs /trinity-create-investigation
|
|
93
|
+
|
|
94
|
+
### /trinity-create-investigation
|
|
95
|
+
**Use when**: Starting a new investigation from scratch
|
|
96
|
+
|
|
97
|
+
**What it does**:
|
|
98
|
+
- Creates new INV-XXX file
|
|
99
|
+
- Sets up investigation structure
|
|
100
|
+
- Defines research questions
|
|
101
|
+
- Establishes scope
|
|
102
|
+
|
|
103
|
+
**Example**: "Investigate why API is slow" → Creates INV-015-api-performance-analysis.md
|
|
104
|
+
|
|
105
|
+
### /trinity-plan-investigation
|
|
106
|
+
**Use when**: Investigation already exists, need execution plan
|
|
107
|
+
|
|
108
|
+
**What it does**:
|
|
109
|
+
- Reads existing INV-XXX file
|
|
110
|
+
- Creates research methodology
|
|
111
|
+
- Generates data collection plan
|
|
112
|
+
- Defines success criteria
|
|
113
|
+
- Produces step-by-step investigation tasks
|
|
114
|
+
|
|
115
|
+
**Example**: "Plan how to execute INV-015" → Creates detailed investigation plan with 8 research tasks
|
|
116
|
+
|
|
117
|
+
### Workflow
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
1. /trinity-create-investigation
|
|
121
|
+
→ Creates INV-XXX-problem.md
|
|
122
|
+
|
|
123
|
+
2. /trinity-plan-investigation
|
|
124
|
+
→ Reads INV-XXX-problem.md
|
|
125
|
+
→ Creates investigation-plan-XXX.md
|
|
126
|
+
|
|
127
|
+
3. Execute investigation
|
|
128
|
+
→ Follow plan
|
|
129
|
+
→ Document findings
|
|
130
|
+
|
|
131
|
+
4. Archive results
|
|
132
|
+
→ Update INV-XXX with conclusions
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create implementation plan using TRA (Work Planner)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Trinity Work Planning - TRA
|
|
6
|
+
|
|
7
|
+
**Agent:** TRA (Work Planner)
|
|
8
|
+
**Role:** Implementation sequencing, BAS quality gates, and timeline estimation
|
|
9
|
+
|
|
10
|
+
## What TRA Does
|
|
11
|
+
|
|
12
|
+
1. **Implementation Sequencing:**
|
|
13
|
+
- Determines optimal task order
|
|
14
|
+
- Identifies dependencies
|
|
15
|
+
- Plans for parallelization opportunities
|
|
16
|
+
|
|
17
|
+
2. **BAS Quality Gate Integration:**
|
|
18
|
+
- **Phase 1:** Linting (auto-fix enabled)
|
|
19
|
+
- **Phase 2:** Structure validation
|
|
20
|
+
- **Phase 3:** Build validation
|
|
21
|
+
- **Phase 4:** Testing (all tests pass)
|
|
22
|
+
- **Phase 5:** Coverage check (≥80%)
|
|
23
|
+
- **Phase 6:** Final review (best practices)
|
|
24
|
+
|
|
25
|
+
3. **Timeline Estimation:**
|
|
26
|
+
- Task complexity scoring
|
|
27
|
+
- Dependency chains
|
|
28
|
+
- Realistic time estimates
|
|
29
|
+
|
|
30
|
+
4. **Stop Points (Scale-Based):**
|
|
31
|
+
- Small: 0 stop points
|
|
32
|
+
- Medium: 2 stop points (design, final)
|
|
33
|
+
- Large: 4 stop points (requirements, design, plan, final)
|
|
34
|
+
|
|
35
|
+
## Output Format
|
|
36
|
+
|
|
37
|
+
TRA produces structured JSON handoff:
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"tasks": [
|
|
41
|
+
{
|
|
42
|
+
"id": 1,
|
|
43
|
+
"description": "task description",
|
|
44
|
+
"dependencies": [],
|
|
45
|
+
"estimatedTime": "30min",
|
|
46
|
+
"basGates": ["lint", "build", "test", "coverage"]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"sequence": [1, 2, 3],
|
|
50
|
+
"parallelizable": [[4, 5]],
|
|
51
|
+
"stopPoints": ["design", "final"],
|
|
52
|
+
"totalEstimate": "2 hours"
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Integration with Trinity Workflow
|
|
57
|
+
|
|
58
|
+
TRA's strategic planning bridges design and implementation:
|
|
59
|
+
|
|
60
|
+
**TRA's Planning Role:**
|
|
61
|
+
- Requirements breakdown into implementation phases
|
|
62
|
+
- 3-phase implementation structure (Setup → Core → Finalize)
|
|
63
|
+
- High-level task identification with dependencies
|
|
64
|
+
- Risk assessment and mitigation strategies
|
|
65
|
+
- Resource allocation and timeline estimation
|
|
66
|
+
- BAS quality gate integration points
|
|
67
|
+
|
|
68
|
+
**Workflow Context:**
|
|
69
|
+
|
|
70
|
+
1. **After ROR:** Technical design complete with function signatures
|
|
71
|
+
2. **TRA Planning (Claude adopts TRA persona):** Creates strategic implementation plan
|
|
72
|
+
3. **Plan Output:** JSON handoff with tasks, sequence, stop points, time estimates
|
|
73
|
+
4. **Handoff to EUS:** Strategic plan feeds into atomic task decomposition
|
|
74
|
+
|
|
75
|
+
**See Also:** `/trinity-orchestrate` for complete workflow planning guidance
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
**Provide design and Claude (as TRA) will create implementation plan:**
|
|
80
|
+
|
|
81
|
+
What is the technical design? (Or provide ROR's output)
|
|
82
|
+
|
|
83
|
+
**For complete workflow planning:**
|
|
84
|
+
|
|
85
|
+
Use `/trinity-orchestrate` to plan your implementation approach with TRA as a key planning phase
|
|
86
|
+
|
|
87
|
+
## Related Commands
|
|
88
|
+
|
|
89
|
+
- `/trinity-orchestrate` - Complete workflow planning guidance
|
|
90
|
+
- `/trinity-design` - ROR technical design (input to TRA)
|
|
91
|
+
- `/trinity-decompose` - EUS atomic task decomposition (follows TRA)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Complexity Scoring Guide
|
|
96
|
+
|
|
97
|
+
Rate each task on complexity (1-10 scale):
|
|
98
|
+
|
|
99
|
+
### Scoring Criteria
|
|
100
|
+
|
|
101
|
+
**1-3 (Low)**:
|
|
102
|
+
- Simple CRUD operations
|
|
103
|
+
- Configuration changes
|
|
104
|
+
- Documentation updates
|
|
105
|
+
- Straightforward refactoring
|
|
106
|
+
|
|
107
|
+
**4-6 (Medium)**:
|
|
108
|
+
- Business logic implementation
|
|
109
|
+
- API integrations
|
|
110
|
+
- Database migrations
|
|
111
|
+
- Multi-step workflows
|
|
112
|
+
|
|
113
|
+
**7-10 (High)**:
|
|
114
|
+
- Complex algorithms
|
|
115
|
+
- Security-critical features
|
|
116
|
+
- Performance optimization
|
|
117
|
+
- Large-scale refactoring
|
|
118
|
+
|
|
119
|
+
### Complexity Factors
|
|
120
|
+
|
|
121
|
+
Add +1-2 points for each:
|
|
122
|
+
- External dependencies (APIs, services)
|
|
123
|
+
- Security requirements (auth, payments, PII)
|
|
124
|
+
- Performance requirements (<100ms, high throughput)
|
|
125
|
+
- Complex state management
|
|
126
|
+
- Cross-cutting concerns
|
|
127
|
+
|
|
128
|
+
**Example**:
|
|
129
|
+
- "Add user field" = 2 (Low)
|
|
130
|
+
- "JWT refresh tokens" = 6 (Medium: auth + API + security)
|
|
131
|
+
- "Real-time notification system" = 9 (High: WebSockets + state + performance)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Task Parallelization
|
|
136
|
+
|
|
137
|
+
### Identifying Parallel Tasks
|
|
138
|
+
|
|
139
|
+
Tasks can run in parallel if:
|
|
140
|
+
- ✅ No shared file modifications
|
|
141
|
+
- ✅ No data dependencies
|
|
142
|
+
- ✅ Independent test suites
|
|
143
|
+
|
|
144
|
+
Tasks must be sequential if:
|
|
145
|
+
- ❌ One modifies file that other reads
|
|
146
|
+
- ❌ One creates interface that other implements
|
|
147
|
+
- ❌ One's output is other's input
|
|
148
|
+
|
|
149
|
+
### Parallelization Examples
|
|
150
|
+
|
|
151
|
+
**Example 1: Authentication Module**
|
|
152
|
+
|
|
153
|
+
Sequential (WRONG):
|
|
154
|
+
```
|
|
155
|
+
1. Create auth service → 2 hours
|
|
156
|
+
2. Create auth middleware → 1 hour
|
|
157
|
+
3. Add types → 30 min
|
|
158
|
+
4. Write tests → 2 hours
|
|
159
|
+
Total: 5.5 hours
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Parallel (CORRECT):
|
|
163
|
+
```
|
|
164
|
+
Phase 1 (Parallel):
|
|
165
|
+
- Create auth service (2 hours)
|
|
166
|
+
- Create auth middleware (1 hour)
|
|
167
|
+
- Add types (30 min)
|
|
168
|
+
Bottleneck: 2 hours
|
|
169
|
+
|
|
170
|
+
Phase 2 (Parallel):
|
|
171
|
+
- Test auth service (1 hour)
|
|
172
|
+
- Test auth middleware (1 hour)
|
|
173
|
+
Bottleneck: 1 hour
|
|
174
|
+
|
|
175
|
+
Total: 3 hours (42% faster)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Example 2: API Endpoints**
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Parallel Tasks (no dependencies):
|
|
182
|
+
├─ POST /users endpoint (1 hour)
|
|
183
|
+
├─ GET /users/:id endpoint (45 min)
|
|
184
|
+
├─ PUT /users/:id endpoint (1 hour)
|
|
185
|
+
└─ DELETE /users/:id endpoint (45 min)
|
|
186
|
+
|
|
187
|
+
Bottleneck: 1 hour (vs 3.5 hours sequential)
|
|
188
|
+
Speedup: 71%
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Dependencies Require Sequencing**:
|
|
192
|
+
```
|
|
193
|
+
1. Create User model (must finish first)
|
|
194
|
+
↓
|
|
195
|
+
2. Parallel tasks can start:
|
|
196
|
+
├─ UserService (uses model)
|
|
197
|
+
├─ UserController (uses model)
|
|
198
|
+
└─ User validation (uses model)
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|