@ngxtm/devkit 3.18.0 → 3.20.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/merged-commands/application-performance-performance-optimization.md +13 -13
- package/merged-commands/ask/fast.md +14 -57
- package/merged-commands/ask/hard.md +22 -79
- package/merged-commands/auto.md +6 -33
- package/merged-commands/backend-development-feature-development.md +12 -12
- package/merged-commands/bootstrap/auto/fast.md +15 -15
- package/merged-commands/bootstrap/auto/parallel.md +12 -12
- package/merged-commands/bootstrap/auto.md +14 -14
- package/merged-commands/bootstrap.md +15 -15
- package/merged-commands/brainstorm/fast.md +19 -72
- package/merged-commands/brainstorm/hard.md +23 -84
- package/merged-commands/c4-architecture-c4-architecture.md +5 -5
- package/merged-commands/code/auto.md +16 -16
- package/merged-commands/code/fast.md +19 -72
- package/merged-commands/code/hard.md +38 -122
- package/merged-commands/code/no-test.md +12 -12
- package/merged-commands/code/parallel.md +9 -9
- package/merged-commands/code.md +14 -14
- package/merged-commands/comprehensive-review-full-review.md +8 -8
- package/merged-commands/context-degradation.md +2 -2
- package/merged-commands/context-engineering.md +4 -4
- package/merged-commands/context-optimization.md +3 -3
- package/merged-commands/cook/auto/fast.md +3 -3
- package/merged-commands/cook/auto/parallel.md +9 -9
- package/merged-commands/cook/auto.md +1 -1
- package/merged-commands/cook/fast.md +38 -47
- package/merged-commands/cook/hard.md +46 -41
- package/merged-commands/cook.md +13 -13
- package/merged-commands/daily-news-report.md +15 -15
- package/merged-commands/data-engineering-data-driven-feature.md +16 -16
- package/merged-commands/debug/fast.md +13 -29
- package/merged-commands/debug/hard.md +47 -49
- package/merged-commands/debug.md +1 -1
- package/merged-commands/debugging-toolkit-smart-debug.md +1 -1
- package/merged-commands/deploy/check.md +22 -71
- package/merged-commands/deploy/preview.md +18 -62
- package/merged-commands/deploy/production.md +22 -71
- package/merged-commands/deploy/rollback.md +22 -71
- package/merged-commands/deploy.md +0 -11
- package/merged-commands/design/3d.md +3 -3
- package/merged-commands/design/describe.md +1 -1
- package/merged-commands/design/fast.md +2 -2
- package/merged-commands/design/good.md +3 -3
- package/merged-commands/design/hard.md +15 -85
- package/merged-commands/design/screenshot.md +1 -1
- package/merged-commands/design/video.md +1 -1
- package/merged-commands/design.md +0 -11
- package/merged-commands/doc-coauthoring.md +5 -5
- package/merged-commands/docker-expert.md +1 -1
- package/merged-commands/docs/audit.md +26 -77
- package/merged-commands/docs/business.md +26 -77
- package/merged-commands/docs/core.md +24 -68
- package/merged-commands/docs/init.md +8 -8
- package/merged-commands/docs/update.md +13 -13
- package/merged-commands/docs.md +0 -12
- package/merged-commands/error-debugging-multi-agent-review.md +1 -1
- package/merged-commands/error-diagnostics-smart-debug.md +1 -1
- package/merged-commands/finishing-a-development-branch.md +1 -1
- package/merged-commands/fix/ci.md +2 -2
- package/merged-commands/fix/fast.md +2 -2
- package/merged-commands/fix/hard.md +6 -6
- package/merged-commands/fix/logs.md +5 -5
- package/merged-commands/fix/parallel.md +9 -9
- package/merged-commands/fix/test.md +6 -6
- package/merged-commands/fix/ui.md +8 -8
- package/merged-commands/fixing.md +3 -3
- package/merged-commands/framework-migration-legacy-modernize.md +13 -13
- package/merged-commands/full-stack-orchestration-full-stack-feature.md +12 -12
- package/merged-commands/git/cm.md +1 -1
- package/merged-commands/git/cp.md +1 -1
- package/merged-commands/git/merge.md +1 -1
- package/merged-commands/git/pr.md +1 -1
- package/merged-commands/git-pr-workflows-git-workflow.md +10 -10
- package/merged-commands/google-adk-python.md +1 -1
- package/merged-commands/hr-pro.md +1 -1
- package/merged-commands/incident-response-incident-response.md +13 -13
- package/merged-commands/integrate/polar.md +3 -3
- package/merged-commands/integrate/sepay.md +3 -3
- package/merged-commands/journal.md +1 -1
- package/merged-commands/learn.md +51 -4
- package/merged-commands/linear-claude-skill.md +2 -2
- package/merged-commands/loki-mode.md +14 -14
- package/merged-commands/machine-learning-ops-ml-pipeline.md +7 -7
- package/merged-commands/mcp-management.md +8 -8
- package/merged-commands/multi-agent-patterns.md +14 -14
- package/merged-commands/multi-platform-apps-multi-platform.md +10 -10
- package/merged-commands/nestjs-expert.md +1 -1
- package/merged-commands/performance-testing-review-multi-agent-review.md +1 -1
- package/merged-commands/plan/archive.md +1 -1
- package/merged-commands/plan/ci.md +1 -1
- package/merged-commands/plan/fast.md +2 -2
- package/merged-commands/plan/hard.md +4 -4
- package/merged-commands/plan/parallel.md +5 -5
- package/merged-commands/plan/two.md +6 -6
- package/merged-commands/requesting-code-review.md +6 -6
- package/merged-commands/review/codebase/parallel.md +5 -5
- package/merged-commands/review/codebase.md +5 -5
- package/merged-commands/review/fast.md +13 -29
- package/merged-commands/review/hard.md +48 -49
- package/merged-commands/review.md +0 -11
- package/merged-commands/security-scanning-security-hardening.md +13 -13
- package/merged-commands/skill/add.md +6 -6
- package/merged-commands/skill/create.md +6 -6
- package/merged-commands/skill/fix-logs.md +6 -6
- package/merged-commands/skill/optimize/auto.md +1 -1
- package/merged-commands/skill/optimize.md +1 -1
- package/merged-commands/skill/plan.md +1 -1
- package/merged-commands/skill/update.md +6 -6
- package/merged-commands/subagent-driven-development.md +53 -53
- package/merged-commands/tdd-workflows-tdd-cycle.md +12 -12
- package/merged-commands/tdd-workflows-tdd-red.md +1 -1
- package/merged-commands/tdd-workflows-tdd-refactor.md +1 -1
- package/merged-commands/test/fast.md +22 -33
- package/merged-commands/test/hard.md +59 -56
- package/merged-commands/test/ui.md +1 -1
- package/merged-commands/test.md +1 -1
- package/merged-commands/typescript-expert.md +1 -1
- package/merged-commands/use-mcp.md +5 -5
- package/merged-commands/writing-plans.md +3 -3
- package/merged-commands/writing-skills.md +8 -8
- package/package.json +1 -1
- package/rules-index.json +1 -1
- package/skills/application-performance-performance-optimization/SKILL.md +13 -13
- package/skills/azure-ai-agents-python/references/tools.md +1 -1
- package/skills/backend-development-feature-development/SKILL.md +12 -12
- package/skills/best-practices/references/anti-patterns.md +2 -2
- package/skills/best-practices/references/best-practices-guide.md +14 -14
- package/skills/c4-architecture-c4-architecture/SKILL.md +5 -5
- package/skills/comprehensive-review-full-review/SKILL.md +8 -8
- package/skills/context-degradation/SKILL.md +2 -2
- package/skills/context-engineering/SKILL.md +4 -4
- package/skills/context-engineering/references/context-degradation.md +1 -1
- package/skills/context-engineering/references/context-optimization.md +1 -1
- package/skills/context-engineering/references/multi-agent-patterns.md +1 -1
- package/skills/context-engineering/references/runtime-awareness.md +1 -1
- package/skills/context-optimization/SKILL.md +3 -3
- package/skills/daily-news-report/SKILL.md +15 -15
- package/skills/data-engineering-data-driven-feature/SKILL.md +16 -16
- package/skills/debugging-toolkit-smart-debug/SKILL.md +1 -1
- package/skills/doc-coauthoring/SKILL.md +5 -5
- package/skills/docker-expert/SKILL.md +1 -1
- package/skills/error-debugging-multi-agent-review/SKILL.md +1 -1
- package/skills/error-diagnostics-smart-debug/SKILL.md +1 -1
- package/skills/finishing-a-development-branch/SKILL.md +1 -1
- package/skills/fixing/SKILL.md +3 -3
- package/skills/fixing/references/parallel-exploration.md +4 -4
- package/skills/fixing/references/skill-activation-matrix.md +3 -3
- package/skills/fixing/references/workflow-deep.md +11 -11
- package/skills/fixing/references/workflow-quick.md +4 -4
- package/skills/fixing/references/workflow-standard.md +12 -12
- package/skills/framework-migration-legacy-modernize/SKILL.md +13 -13
- package/skills/full-stack-orchestration-full-stack-feature/SKILL.md +12 -12
- package/skills/git-pr-workflows-git-workflow/SKILL.md +10 -10
- package/skills/google-adk-python/SKILL.md +1 -1
- package/skills/hr-pro/SKILL.md +1 -1
- package/skills/incident-response-incident-response/SKILL.md +13 -13
- package/skills/incident-response-smart-fix/resources/implementation-playbook.md +17 -17
- package/skills/learn/SKILL.md +51 -4
- package/skills/linear-claude-skill/SKILL.md +2 -2
- package/skills/loki-mode/ACKNOWLEDGEMENTS.md +4 -4
- package/skills/loki-mode/CHANGELOG.md +9 -9
- package/skills/loki-mode/CONTEXT-EXPORT.md +1 -1
- package/skills/loki-mode/README.md +2 -2
- package/skills/loki-mode/SKILL.md +14 -14
- package/skills/loki-mode/autonomy/run.sh +1 -1
- package/skills/loki-mode/integrations/vibe-kanban.md +1 -1
- package/skills/loki-mode/references/core-workflow.md +4 -4
- package/skills/loki-mode/references/production-patterns.md +6 -6
- package/skills/loki-mode/references/quality-control.md +2 -2
- package/skills/loki-mode/references/sdlc-phases.md +3 -3
- package/skills/machine-learning-ops-ml-pipeline/SKILL.md +7 -7
- package/skills/mcp-builder/reference/evaluation.md +3 -3
- package/skills/mcp-management/README.md +6 -6
- package/skills/mcp-management/SKILL.md +8 -8
- package/skills/mcp-management/references/gemini-cli-integration.md +1 -1
- package/skills/multi-agent-patterns/SKILL.md +14 -14
- package/skills/multi-platform-apps-multi-platform/SKILL.md +10 -10
- package/skills/nestjs-expert/SKILL.md +1 -1
- package/skills/performance-testing-review-multi-agent-review/SKILL.md +1 -1
- package/skills/planning-with-files/reference.md +2 -2
- package/skills/requesting-code-review/SKILL.md +6 -6
- package/skills/security-scanning-security-hardening/SKILL.md +13 -13
- package/skills/subagent-driven-development/SKILL.md +53 -53
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +1 -1
- package/skills/subagent-driven-development/implementer-prompt.md +3 -3
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +1 -1
- package/skills/tdd-workflows-tdd-cycle/SKILL.md +12 -12
- package/skills/tdd-workflows-tdd-green/resources/implementation-playbook.md +1 -1
- package/skills/tdd-workflows-tdd-red/SKILL.md +1 -1
- package/skills/tdd-workflows-tdd-refactor/SKILL.md +1 -1
- package/skills/typescript-expert/SKILL.md +1 -1
- package/skills/writing-plans/SKILL.md +3 -3
- package/skills/writing-skills/SKILL.md +8 -8
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +1 -1
- package/skills/writing-skills/references/cso/README.md +3 -3
- package/skills/writing-skills/testing-skills-with-subagents.md +1 -1
|
@@ -45,19 +45,19 @@ Orchestrate multi-agent incident response with modern SRE practices for rapid re
|
|
|
45
45
|
## Phase 1: Detection & Triage
|
|
46
46
|
|
|
47
47
|
### 1. Incident Detection and Classification
|
|
48
|
-
- Use Task tool with subagent_type="
|
|
48
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
49
49
|
- Prompt: "URGENT: Detect and classify incident: $ARGUMENTS. Analyze alerts from PagerDuty/Opsgenie/monitoring. Determine: 1) Incident severity (P0-P3), 2) Affected services and dependencies, 3) User impact and business risk, 4) Initial incident command structure needed. Check error budgets and SLO violations."
|
|
50
50
|
- Output: Severity classification, impact assessment, incident command assignments, SLO status
|
|
51
51
|
- Context: Initial alerts, monitoring dashboards, recent changes
|
|
52
52
|
|
|
53
53
|
### 2. Observability Analysis
|
|
54
|
-
- Use Task tool with subagent_type="
|
|
54
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
55
55
|
- Prompt: "Perform rapid observability sweep for incident: $ARGUMENTS. Query: 1) Distributed tracing (OpenTelemetry/Jaeger), 2) Metrics correlation (Prometheus/Grafana/DataDog), 3) Log aggregation (ELK/Splunk), 4) APM data, 5) Real User Monitoring. Identify anomalies, error patterns, and service degradation points."
|
|
56
56
|
- Output: Observability findings, anomaly detection, service health matrix, trace analysis
|
|
57
57
|
- Context: Severity level from step 1, affected services
|
|
58
58
|
|
|
59
59
|
### 3. Initial Mitigation
|
|
60
|
-
- Use Task tool with subagent_type="
|
|
60
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
61
61
|
- Prompt: "Implement immediate mitigation for P$SEVERITY incident: $ARGUMENTS. Actions: 1) Traffic throttling/rerouting if needed, 2) Feature flag disabling for affected features, 3) Circuit breaker activation, 4) Rollback assessment for recent deployments, 5) Scale resources if capacity-related. Prioritize user experience restoration."
|
|
62
62
|
- Output: Mitigation actions taken, temporary fixes applied, rollback decisions
|
|
63
63
|
- Context: Observability findings, severity classification
|
|
@@ -65,19 +65,19 @@ Orchestrate multi-agent incident response with modern SRE practices for rapid re
|
|
|
65
65
|
## Phase 2: Investigation & Root Cause Analysis
|
|
66
66
|
|
|
67
67
|
### 4. Deep System Debugging
|
|
68
|
-
- Use Task tool with subagent_type="
|
|
68
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
69
69
|
- Prompt: "Conduct deep debugging for incident: $ARGUMENTS using observability data. Investigate: 1) Stack traces and error logs, 2) Database query performance and locks, 3) Network latency and timeouts, 4) Memory leaks and CPU spikes, 5) Dependency failures and cascading errors. Apply Five Whys analysis."
|
|
70
70
|
- Output: Root cause identification, contributing factors, dependency impact map
|
|
71
71
|
- Context: Observability analysis, mitigation status
|
|
72
72
|
|
|
73
73
|
### 5. Security Assessment
|
|
74
|
-
- Use Task tool with subagent_type="
|
|
74
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
75
75
|
- Prompt: "Assess security implications of incident: $ARGUMENTS. Check: 1) DDoS attack indicators, 2) Authentication/authorization failures, 3) Data exposure risks, 4) Certificate issues, 5) Suspicious access patterns. Review WAF logs, security groups, and audit trails."
|
|
76
76
|
- Output: Security assessment, breach analysis, vulnerability identification
|
|
77
77
|
- Context: Root cause findings, system logs
|
|
78
78
|
|
|
79
79
|
### 6. Performance Engineering Analysis
|
|
80
|
-
- Use Task tool with subagent_type="
|
|
80
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
81
81
|
- Prompt: "Analyze performance aspects of incident: $ARGUMENTS. Examine: 1) Resource utilization patterns, 2) Query optimization opportunities, 3) Caching effectiveness, 4) Load balancer health, 5) CDN performance, 6) Autoscaling triggers. Identify bottlenecks and capacity issues."
|
|
82
82
|
- Output: Performance bottlenecks, resource recommendations, optimization opportunities
|
|
83
83
|
- Context: Debug findings, current mitigation state
|
|
@@ -85,13 +85,13 @@ Orchestrate multi-agent incident response with modern SRE practices for rapid re
|
|
|
85
85
|
## Phase 3: Resolution & Recovery
|
|
86
86
|
|
|
87
87
|
### 7. Fix Implementation
|
|
88
|
-
- Use Task tool with subagent_type="
|
|
88
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
89
89
|
- Prompt: "Design and implement production fix for incident: $ARGUMENTS based on root cause. Requirements: 1) Minimal viable fix for rapid deployment, 2) Risk assessment and rollback capability, 3) Staged rollout plan with monitoring, 4) Validation criteria and health checks. Consider both immediate fix and long-term solution."
|
|
90
90
|
- Output: Fix implementation, deployment strategy, validation plan, rollback procedures
|
|
91
91
|
- Context: Root cause analysis, performance findings, security assessment
|
|
92
92
|
|
|
93
93
|
### 8. Deployment and Validation
|
|
94
|
-
- Use Task tool with subagent_type="
|
|
94
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
95
95
|
- Prompt: "Execute emergency deployment for incident fix: $ARGUMENTS. Process: 1) Blue-green or canary deployment, 2) Progressive rollout with monitoring, 3) Health check validation at each stage, 4) Rollback triggers configured, 5) Real-time monitoring during deployment. Coordinate with incident command."
|
|
96
96
|
- Output: Deployment status, validation results, monitoring dashboard, rollback readiness
|
|
97
97
|
- Context: Fix implementation, current system state
|
|
@@ -99,13 +99,13 @@ Orchestrate multi-agent incident response with modern SRE practices for rapid re
|
|
|
99
99
|
## Phase 4: Communication & Coordination
|
|
100
100
|
|
|
101
101
|
### 9. Stakeholder Communication
|
|
102
|
-
- Use Task tool with subagent_type="
|
|
102
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
103
103
|
- Prompt: "Manage incident communication for: $ARGUMENTS. Create: 1) Status page updates (public-facing), 2) Internal engineering updates (technical details), 3) Executive summary (business impact/ETA), 4) Customer support briefing (talking points), 5) Timeline documentation with key decisions. Update every 15-30 minutes based on severity."
|
|
104
104
|
- Output: Communication artifacts, status updates, stakeholder briefings, timeline log
|
|
105
105
|
- Context: All previous phases, current resolution status
|
|
106
106
|
|
|
107
107
|
### 10. Customer Impact Assessment
|
|
108
|
-
- Use Task tool with subagent_type="
|
|
108
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
109
109
|
- Prompt: "Assess and document customer impact for incident: $ARGUMENTS. Analyze: 1) Affected user segments and geography, 2) Failed transactions or data loss, 3) SLA violations and contractual implications, 4) Customer support ticket volume, 5) Revenue impact estimation. Prepare proactive customer outreach list."
|
|
110
110
|
- Output: Customer impact report, SLA analysis, outreach recommendations
|
|
111
111
|
- Context: Resolution progress, communication status
|
|
@@ -113,19 +113,19 @@ Orchestrate multi-agent incident response with modern SRE practices for rapid re
|
|
|
113
113
|
## Phase 5: Postmortem & Prevention
|
|
114
114
|
|
|
115
115
|
### 11. Blameless Postmortem
|
|
116
|
-
- Use Task tool with subagent_type="
|
|
116
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
117
117
|
- Prompt: "Conduct blameless postmortem for incident: $ARGUMENTS. Document: 1) Complete incident timeline with decisions, 2) Root cause and contributing factors (systems focus), 3) What went well in response, 4) What could improve, 5) Action items with owners and deadlines, 6) Lessons learned for team education. Follow SRE postmortem best practices."
|
|
118
118
|
- Output: Postmortem document, action items list, process improvements, training needs
|
|
119
119
|
- Context: Complete incident history, all agent outputs
|
|
120
120
|
|
|
121
121
|
### 12. Monitoring and Alert Enhancement
|
|
122
|
-
- Use Task tool with subagent_type="
|
|
122
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
123
123
|
- Prompt: "Enhance monitoring to prevent recurrence of: $ARGUMENTS. Implement: 1) New alerts for early detection, 2) SLI/SLO adjustments if needed, 3) Dashboard improvements for visibility, 4) Runbook automation opportunities, 5) Chaos engineering scenarios for testing. Ensure alerts are actionable and reduce noise."
|
|
124
124
|
- Output: New monitoring configuration, alert rules, dashboard updates, runbook automation
|
|
125
125
|
- Context: Postmortem findings, root cause analysis
|
|
126
126
|
|
|
127
127
|
### 13. System Hardening
|
|
128
|
-
- Use Task tool with subagent_type="
|
|
128
|
+
- Use Task tool with subagent_type="general-purpose"
|
|
129
129
|
- Prompt: "Design system improvements to prevent incident: $ARGUMENTS. Propose: 1) Architecture changes for resilience (circuit breakers, bulkheads), 2) Graceful degradation strategies, 3) Capacity planning adjustments, 4) Technical debt prioritization, 5) Dependency reduction opportunities. Create implementation roadmap."
|
|
130
130
|
- Output: Architecture improvements, resilience patterns, technical debt items, roadmap
|
|
131
131
|
- Context: Postmortem action items, performance analysis
|
|
@@ -8,7 +8,7 @@ This file contains detailed patterns, checklists, and code samples referenced by
|
|
|
8
8
|
|
|
9
9
|
## Phase 1: Issue Analysis - Error Detection and Context Gathering
|
|
10
10
|
|
|
11
|
-
Use Task tool with subagent_type="
|
|
11
|
+
Use Task tool with subagent_type="general-purpose" followed by subagent_type="general-purpose":
|
|
12
12
|
|
|
13
13
|
**First: Error-Detective Analysis**
|
|
14
14
|
|
|
@@ -93,7 +93,7 @@ TESTING_REQUIREMENTS: [scenarios that must be covered]
|
|
|
93
93
|
|
|
94
94
|
## Phase 2: Root Cause Investigation - Deep Code Analysis
|
|
95
95
|
|
|
96
|
-
Use Task tool with subagent_type="
|
|
96
|
+
Use Task tool with subagent_type="general-purpose" and subagent_type="general-purpose" for systematic investigation:
|
|
97
97
|
|
|
98
98
|
**First: Debugger Code Analysis**
|
|
99
99
|
|
|
@@ -185,13 +185,13 @@ ARCHITECTURAL_CONCERNS: {if systemic issues exist}
|
|
|
185
185
|
Based on Phase 2 output, route to appropriate domain agent using Task tool:
|
|
186
186
|
|
|
187
187
|
**Routing Logic:**
|
|
188
|
-
- Python issues → subagent_type="
|
|
189
|
-
- TypeScript/JavaScript → subagent_type="
|
|
190
|
-
- Go → subagent_type="
|
|
191
|
-
- Rust → subagent_type="
|
|
192
|
-
- SQL/Database → subagent_type="
|
|
193
|
-
- Performance → subagent_type="
|
|
194
|
-
- Security → subagent_type="
|
|
188
|
+
- Python issues → subagent_type="general-purpose"
|
|
189
|
+
- TypeScript/JavaScript → subagent_type="general-purpose"
|
|
190
|
+
- Go → subagent_type="general-purpose"
|
|
191
|
+
- Rust → subagent_type="general-purpose"
|
|
192
|
+
- SQL/Database → subagent_type="general-purpose"
|
|
193
|
+
- Performance → subagent_type="general-purpose"
|
|
194
|
+
- Security → subagent_type="general-purpose"
|
|
195
195
|
|
|
196
196
|
**Prompt Template (adapt for language):**
|
|
197
197
|
```
|
|
@@ -269,7 +269,7 @@ BACKWARD_COMPATIBILITY: {maintained | breaking with mitigation}
|
|
|
269
269
|
|
|
270
270
|
## Phase 4: Verification - Automated Testing and Performance Validation
|
|
271
271
|
|
|
272
|
-
Use Task tool with subagent_type="
|
|
272
|
+
Use Task tool with subagent_type="general-purpose" and subagent_type="general-purpose":
|
|
273
273
|
|
|
274
274
|
**First: Test-Automator Regression Suite**
|
|
275
275
|
|
|
@@ -497,7 +497,7 @@ FINAL_VERDICT: {
|
|
|
497
497
|
|
|
498
498
|
## Phase 5: Documentation and Prevention - Long-term Resilience
|
|
499
499
|
|
|
500
|
-
Use Task tool with subagent_type="
|
|
500
|
+
Use Task tool with subagent_type="general-purpose" for prevention strategies:
|
|
501
501
|
|
|
502
502
|
**Prompt:**
|
|
503
503
|
```
|
|
@@ -613,13 +613,13 @@ For issues spanning multiple domains, orchestrate specialized agents sequentiall
|
|
|
613
613
|
|
|
614
614
|
**Sequence:**
|
|
615
615
|
1. **Phase 1-2**: error-detective + debugger identify slow database queries
|
|
616
|
-
2. **Phase 3a**: Task(subagent_type="
|
|
616
|
+
2. **Phase 3a**: Task(subagent_type="general-purpose")
|
|
617
617
|
- Optimize query with proper indexes
|
|
618
618
|
- Context: "Query execution taking 5s, missing index on user_id column, N+1 query pattern detected"
|
|
619
|
-
3. **Phase 3b**: Task(subagent_type="
|
|
619
|
+
3. **Phase 3b**: Task(subagent_type="general-purpose")
|
|
620
620
|
- Add caching layer for frequently accessed data
|
|
621
621
|
- Context: "Database query optimized from 5s to 50ms by adding index on user_id column. Application still experiencing 2s response times due to N+1 query pattern loading 100+ user records per request. Add Redis caching with 5-minute TTL for user profiles."
|
|
622
|
-
4. **Phase 3c**: Task(subagent_type="
|
|
622
|
+
4. **Phase 3c**: Task(subagent_type="general-purpose")
|
|
623
623
|
- Configure monitoring for query performance and cache hit rates
|
|
624
624
|
- Context: "Cache layer added with Redis. Need monitoring for: query p95 latency (threshold: 100ms), cache hit rate (threshold: >80%), cache memory usage (alert at 80%)."
|
|
625
625
|
|
|
@@ -630,11 +630,11 @@ For issues spanning multiple domains, orchestrate specialized agents sequentiall
|
|
|
630
630
|
- Context: "TypeError: Cannot read property 'map' of undefined, 500+ occurrences in last hour, affects Safari users on iOS 14"
|
|
631
631
|
2. **Phase 2**: debugger + code-reviewer investigate
|
|
632
632
|
- Context: "API response sometimes returns null instead of empty array when no results. Frontend assumes array."
|
|
633
|
-
3. **Phase 3a**: Task(subagent_type="
|
|
633
|
+
3. **Phase 3a**: Task(subagent_type="general-purpose")
|
|
634
634
|
- Fix frontend with proper null checks
|
|
635
635
|
- Add type guards
|
|
636
636
|
- Context: "Backend API /api/users endpoint returning null instead of [] when no results. Fix frontend to handle both. Add TypeScript strict null checks."
|
|
637
|
-
4. **Phase 3b**: Task(subagent_type="
|
|
637
|
+
4. **Phase 3b**: Task(subagent_type="general-purpose")
|
|
638
638
|
- Fix backend to always return array
|
|
639
639
|
- Update API contract
|
|
640
640
|
- Context: "Frontend now handles null, but API should follow contract and return [] not null. Update OpenAPI spec to document this."
|
|
@@ -648,7 +648,7 @@ For issues spanning multiple domains, orchestrate specialized agents sequentiall
|
|
|
648
648
|
- Context: "SQL injection vulnerability in login endpoint, Snyk severity: HIGH"
|
|
649
649
|
2. **Phase 2**: debugger + security-auditor investigate
|
|
650
650
|
- Context: "User input not sanitized in SQL WHERE clause, allows authentication bypass"
|
|
651
|
-
3. **Phase 3**: Task(subagent_type="
|
|
651
|
+
3. **Phase 3**: Task(subagent_type="general-purpose")
|
|
652
652
|
- Implement parameterized queries
|
|
653
653
|
- Add input validation
|
|
654
654
|
- Add rate limiting
|
package/skills/learn/SKILL.md
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: learn
|
|
3
3
|
description: Guided project building — you code, AI mentors. Build your own product step-by-step with best practices and deep understanding.
|
|
4
|
-
argument-hint: [topic]
|
|
4
|
+
argument-hint: [topic] [--plan <path>]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Learn Mode v3.
|
|
7
|
+
# Learn Mode v3.2
|
|
8
8
|
|
|
9
9
|
> Build your product. Design the architecture. Write every line. Understand every decision.
|
|
10
10
|
|
|
11
11
|
## Activation
|
|
12
12
|
|
|
13
13
|
`/learn "topic"` — e.g., `/learn "JWT auth in Express"`, `/learn "build real-time chat"`
|
|
14
|
+
`/learn --plan <path>` — Learn by following an existing plan (topic auto-extracted from plan title)
|
|
15
|
+
`/learn "topic" --plan <path>` — Learn with custom topic + existing plan
|
|
16
|
+
|
|
17
|
+
e.g., `/learn --plan plans/skill-sync-rewrite/plan.md`
|
|
18
|
+
e.g., `/learn "upstream sync" --plan plans/skill-sync-rewrite/plan.md`
|
|
14
19
|
|
|
15
20
|
---
|
|
16
21
|
|
|
@@ -18,7 +23,17 @@ argument-hint: [topic]
|
|
|
18
23
|
|
|
19
24
|
1. **Resume check**: Look in `learn/` for existing file matching topic. If found, read its YAML frontmatter and offer to resume from last checkpoint via `AskUserQuestion`.
|
|
20
25
|
|
|
21
|
-
2. **
|
|
26
|
+
2. **Plan import check**: If arguments contain `--plan <path>`:
|
|
27
|
+
a. Read the plan file at `<path>`. Validate it exists and has content.
|
|
28
|
+
b. **Topic resolution**: If no topic provided in arguments, extract from plan's YAML frontmatter `title` field.
|
|
29
|
+
c. Detect plan structure:
|
|
30
|
+
- **Single-file plan**: no `phase-XX` files referenced → tasks = plan's task list
|
|
31
|
+
- **Multi-phase plan**: has `## Phases` table with phase-XX links → each phase = potential learn module
|
|
32
|
+
d. If multi-phase: ask user via `AskUserQuestion` which phase(s) to learn.
|
|
33
|
+
e. Read selected phase file(s) for detailed tasks.
|
|
34
|
+
f. Store parsed steps for REVIEW phase.
|
|
35
|
+
|
|
36
|
+
3. **Language detection** (skip if `--plan` already implies language from plan context): Scan project for config files to identify primary language.
|
|
22
37
|
|
|
23
38
|
| Language | Config Files | Verify: Syntax | Verify: Run/Test |
|
|
24
39
|
|----------|-------------|----------------|------------------|
|
|
@@ -70,6 +85,8 @@ step: 0
|
|
|
70
85
|
total_steps: 0
|
|
71
86
|
difficulty: {deep|standard|quick}
|
|
72
87
|
teaching: {guided|scaffolded|demonstrated}
|
|
88
|
+
plan_source: "{path or none}"
|
|
89
|
+
plan_type: {single|multi-phase|none}
|
|
73
90
|
started: {ISO timestamp}
|
|
74
91
|
updated: {ISO timestamp}
|
|
75
92
|
---
|
|
@@ -93,9 +110,32 @@ Update frontmatter: `phase: LEARN`
|
|
|
93
110
|
|
|
94
111
|
---
|
|
95
112
|
|
|
113
|
+
## Phase 3-ALT: REVIEW (only when --plan provided, replaces Phase 3 + 4)
|
|
114
|
+
|
|
115
|
+
> Understand the plan before building. Light touch — not redesign.
|
|
116
|
+
|
|
117
|
+
1. **Summarize**: Present plan overview to user:
|
|
118
|
+
> "This plan proposes: {overview}. It has {N} steps targeting {files}."
|
|
119
|
+
> Key decisions: {list key decisions from plan}
|
|
120
|
+
|
|
121
|
+
2. **Socratic check** (skip in Quick difficulty): Ask 1-2 questions via `AskUserQuestion`:
|
|
122
|
+
> "Before we start — why do you think {first step} comes before {later step}?"
|
|
123
|
+
> OR "What problem does {key decision} solve?"
|
|
124
|
+
Build on user's answer. Correct misconceptions if any.
|
|
125
|
+
|
|
126
|
+
3. **Adapt**: Ask via `AskUserQuestion`:
|
|
127
|
+
> "Want to reorder, skip, or add any steps? Or proceed as-is?"
|
|
128
|
+
Adjust step list based on user feedback.
|
|
129
|
+
|
|
130
|
+
4. **Write to tutorial file**: Record plan source, overview, and adapted steps.
|
|
131
|
+
|
|
132
|
+
Update frontmatter: `phase: REVIEW`, `total_steps: {N}`
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
96
136
|
## Phase 3: DESIGN (Socratic architecture thinking)
|
|
97
137
|
|
|
98
|
-
>
|
|
138
|
+
> **Skip this phase entirely if `--plan` was provided.** Go to Phase 3-ALT: REVIEW instead.
|
|
99
139
|
|
|
100
140
|
1. **Frame the problem**: AI presents the high-level problem to solve:
|
|
101
141
|
> "We need to build {topic}. Before I suggest anything — how would YOU approach this? What components or pieces do you think we need?"
|
|
@@ -134,6 +174,8 @@ Update frontmatter: `phase: DESIGN`
|
|
|
134
174
|
|
|
135
175
|
## Phase 4: PLAN (concrete implementation steps)
|
|
136
176
|
|
|
177
|
+
> **Skip this phase entirely if `--plan` was provided.** Steps come from REVIEW phase instead.
|
|
178
|
+
|
|
137
179
|
1. **Break down the chosen design** into 3-7 concrete, verifiable steps. Each step should:
|
|
138
180
|
- Have a clear goal (what's done when this step is complete)
|
|
139
181
|
- Build on previous steps (incremental, testable progress)
|
|
@@ -155,6 +197,10 @@ Update frontmatter: `phase: PLAN`, `total_steps: {N}`
|
|
|
155
197
|
|
|
156
198
|
## Phase 5: BUILD (core phase)
|
|
157
199
|
|
|
200
|
+
> If `--plan` was provided, steps come from REVIEW phase (imported plan).
|
|
201
|
+
> If no `--plan`, steps come from Phase 4 (PLAN) as usual.
|
|
202
|
+
> Everything else in BUILD works identically for both paths.
|
|
203
|
+
|
|
158
204
|
1. **For each step from the PLAN phase, follow the teaching mode**:
|
|
159
205
|
|
|
160
206
|
### Guided Mode (user codes everything)
|
|
@@ -267,6 +313,7 @@ Display: `Tutorial saved: learn/{filename}.md`
|
|
|
267
313
|
|
|
268
314
|
## Version History
|
|
269
315
|
|
|
316
|
+
- **3.2.0** - Added --plan flag: import existing plan files, REVIEW phase replaces DESIGN+PLAN for plan-driven learning. Flow with plan: INIT → LEARN → REVIEW → BUILD → WRAP-UP
|
|
270
317
|
- **3.1.0** - Added DESIGN phase (Socratic architecture) and PLAN phase (concrete steps). Full flow: INIT → LEARN → DESIGN → PLAN → BUILD → WRAP-UP
|
|
271
318
|
- **3.0.0** - Teaching modes (guided/scaffolded/demonstrated), best-practice review, explain-back checkpoints, user-codes-first philosophy
|
|
272
319
|
- **2.0.0** - Rewrite: adaptive difficulty via codingLevel, 4 phases, WebSearch, Socratic method, resume support, tiered verify, 17 languages, codebase-aware
|
|
@@ -387,13 +387,13 @@ For detailed helper script usage, see **troubleshooting.md**.
|
|
|
387
387
|
|
|
388
388
|
### Parallel Agent Execution
|
|
389
389
|
|
|
390
|
-
For bulk operations or background execution, use the `Linear-specialist`
|
|
390
|
+
For bulk operations or background execution, use the `Linear-specialist` Task agent:
|
|
391
391
|
|
|
392
392
|
```javascript
|
|
393
393
|
Task({
|
|
394
394
|
description: "Update Linear issues",
|
|
395
395
|
prompt: "Mark ENG-101, ENG-102, ENG-103 as Done",
|
|
396
|
-
subagent_type: "
|
|
396
|
+
subagent_type: "general-purpose"
|
|
397
397
|
})
|
|
398
398
|
```
|
|
399
399
|
|
|
@@ -21,7 +21,7 @@ Loki Mode is built for Claude and incorporates Anthropic's cutting-edge research
|
|
|
21
21
|
| [Computer Use Safety](https://www.anthropic.com/news/3-5-models-and-computer-use) | Safe autonomous operation patterns |
|
|
22
22
|
| [Sabotage Evaluations](https://www.anthropic.com/research/sabotage-evaluations-for-frontier-models) | Safety evaluation methodology |
|
|
23
23
|
| [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) | One-feature-at-a-time pattern, Playwright MCP for E2E |
|
|
24
|
-
| [Claude Agent SDK Overview](https://platform.claude.com/docs/en/agent-sdk/overview) | Task tool,
|
|
24
|
+
| [Claude Agent SDK Overview](https://platform.claude.com/docs/en/agent-sdk/overview) | Task tool, Task agents, resume parameter, hooks |
|
|
25
25
|
|
|
26
26
|
### Google DeepMind
|
|
27
27
|
|
|
@@ -101,7 +101,7 @@ AWS Bedrock's multi-agent collaboration patterns inform Loki Mode's routing and
|
|
|
101
101
|
| Resource | Contribution |
|
|
102
102
|
|----------|--------------|
|
|
103
103
|
| [NVIDIA ToolOrchestra](https://github.com/NVlabs/ToolOrchestra) | Efficiency metrics, three-reward signal framework, dynamic agent selection |
|
|
104
|
-
| [LerianStudio/ring](https://github.com/LerianStudio/ring) |
|
|
104
|
+
| [LerianStudio/ring](https://github.com/LerianStudio/ring) | Task-agent-driven-development pattern |
|
|
105
105
|
| [Awesome Agentic Patterns](https://github.com/nibzard/awesome-agentic-patterns) | 105+ production patterns catalog |
|
|
106
106
|
|
|
107
107
|
### Best Practices Guides
|
|
@@ -124,7 +124,7 @@ Battle-tested insights from practitioners deploying agents in production.
|
|
|
124
124
|
|--------|-------------|
|
|
125
125
|
| [What Actually Works in Production for Autonomous Agents](https://news.ycombinator.com/item?id=44623207) | "Zero companies without human in the loop" |
|
|
126
126
|
| [Coding with LLMs in Summer 2025](https://news.ycombinator.com/item?id=44623953) | Context curation beats automatic RAG |
|
|
127
|
-
| [Superpowers: How I'm Using Coding Agents](https://news.ycombinator.com/item?id=45547344) |
|
|
127
|
+
| [Superpowers: How I'm Using Coding Agents](https://news.ycombinator.com/item?id=45547344) | Task agents for context isolation (Simon Willison) |
|
|
128
128
|
| [Claude Code Experience After Two Weeks](https://news.ycombinator.com/item?id=44596472) | Fresh contexts yield better results |
|
|
129
129
|
| [AI Agent Benchmarks Are Broken](https://news.ycombinator.com/item?id=44531697) | LLM-as-judge has shared blind spots |
|
|
130
130
|
| [How to Orchestrate Multi-Agent Workflows](https://news.ycombinator.com/item?id=45955997) | Event-driven, decoupled coordination |
|
|
@@ -150,7 +150,7 @@ Special thanks to thought leaders whose patterns and insights shaped Loki Mode:
|
|
|
150
150
|
| **Boris Cherny** (Creator of Claude Code) | Self-verification loop (2-3x quality improvement), extended thinking mode, "Less prompting, more systems" philosophy |
|
|
151
151
|
| **Ivan Steshov** | Centralized constitution, agent lineage tracking, structured artifacts as contracts |
|
|
152
152
|
| **Addy Osmani** | Git checkpoint system, specification-first approach, visual aids (Mermaid diagrams) |
|
|
153
|
-
| **Simon Willison** |
|
|
153
|
+
| **Simon Willison** | Task agents for context isolation, skills system, context curation patterns |
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
@@ -158,7 +158,7 @@ Battle-tested patterns from practitioners:
|
|
|
158
158
|
- **Confidence-Based Routing**: Auto-approve high confidence, escalate low
|
|
159
159
|
- **Deterministic Outer Loops**: Rule-based validation, not LLM-judged
|
|
160
160
|
- **Context Curation**: Manual selection beats automatic RAG
|
|
161
|
-
- **
|
|
161
|
+
- **Task Agents for Context Isolation**: Prevent token waste
|
|
162
162
|
- **Event-Driven Orchestration**: Async, decoupled coordination
|
|
163
163
|
- **Policy-First Enforcement**: Runtime governance
|
|
164
164
|
|
|
@@ -172,7 +172,7 @@ Battle-tested patterns from practitioners:
|
|
|
172
172
|
- Confidence-Based Routing thresholds
|
|
173
173
|
- Deterministic Outer Loops workflow
|
|
174
174
|
- Context Engineering principles
|
|
175
|
-
-
|
|
175
|
+
- Task Agents for Context Isolation
|
|
176
176
|
|
|
177
177
|
### Key Practitioner Insights
|
|
178
178
|
|
|
@@ -347,7 +347,7 @@ Comprehensive guide covering:
|
|
|
347
347
|
- **Haiku**: Unit tests, monitoring, and simple tasks
|
|
348
348
|
|
|
349
349
|
### Changed
|
|
350
|
-
- SKILL.md: Added Single-Responsibility Principle to
|
|
350
|
+
- SKILL.md: Added Single-Responsibility Principle to Task agent guidance
|
|
351
351
|
- SKILL.md: Clarified model selection (Opus=planning, Sonnet=dev, Haiku=tests)
|
|
352
352
|
- SKILL.md: Dynamic Agent Selection table now shows Planning/Development/Testing columns
|
|
353
353
|
- tool-orchestration.md: Added correlation_id, tool_reliability_rate to schema
|
|
@@ -939,7 +939,7 @@ The previous "37 agents" messaging was misleading because:
|
|
|
939
939
|
- **Sonnet 4.5** is now clearly marked as **DEFAULT** for all standard implementation work
|
|
940
940
|
- **Haiku 4.5** changed to **OPTIMIZATION ONLY** for simple/parallelizable tasks
|
|
941
941
|
- **Opus 4.5** changed to **COMPLEX ONLY** for architecture & security
|
|
942
|
-
- Previous documentation incorrectly suggested Haiku as default for most
|
|
942
|
+
- Previous documentation incorrectly suggested Haiku as default for most Task agents
|
|
943
943
|
- Aligns with best practices: Sonnet for quality, Haiku for speed optimization only
|
|
944
944
|
|
|
945
945
|
- **run.sh Implementation Gap** - RARV cycle now implemented in runner script (run.sh:870-871, 908-916):
|
|
@@ -1150,7 +1150,7 @@ For existing `.loki/` projects:
|
|
|
1150
1150
|
|
|
1151
1151
|
### Fixed
|
|
1152
1152
|
- Removed duplicate CONTINUITY.md template from bootstrap script (was lines 2436-2470)
|
|
1153
|
-
- Removed duplicate Task Completion Report from
|
|
1153
|
+
- Removed duplicate Task Completion Report from Task agent dispatch section (was lines 1731-1764)
|
|
1154
1154
|
- Consolidated severity matrices (removed duplicates, kept one authoritative version)
|
|
1155
1155
|
|
|
1156
1156
|
## [2.14.0] - 2026-01-02
|
|
@@ -1353,8 +1353,8 @@ Loki Mode now combines the best practices from GitHub's ecosystem:
|
|
|
1353
1353
|
- Secret scanning to prevent credential leaks
|
|
1354
1354
|
- 5 quality gate categories with blocking rules
|
|
1355
1355
|
|
|
1356
|
-
**Principle 2: Structured Prompting for
|
|
1357
|
-
- All
|
|
1356
|
+
**Principle 2: Structured Prompting for Task Agents**
|
|
1357
|
+
- All Task agent dispatches must include: GOAL, CONSTRAINTS, CONTEXT, OUTPUT FORMAT
|
|
1358
1358
|
- Goals explain "what success looks like" (not just actions)
|
|
1359
1359
|
- Constraints define boundaries (dependencies, compatibility, performance)
|
|
1360
1360
|
- Context includes CONTINUITY.md, ledgers, learnings, architecture decisions
|
|
@@ -1390,10 +1390,10 @@ Loki Mode now combines the best practices from GitHub's ecosystem:
|
|
|
1390
1390
|
|
|
1391
1391
|
### Changed
|
|
1392
1392
|
- CODE_REVIEW phase now requires static analysis before AI reviewers
|
|
1393
|
-
-
|
|
1393
|
+
- Task agent dispatch template updated with GOAL/CONSTRAINTS/CONTEXT/OUTPUT
|
|
1394
1394
|
- Task completion requires decision documentation (not just code output)
|
|
1395
1395
|
- Quality gates now include static analysis tools (CodeQL, linters, security scanners)
|
|
1396
|
-
- Context-Aware
|
|
1396
|
+
- Context-Aware Task Agent Dispatch section rewritten for structured prompting
|
|
1397
1397
|
|
|
1398
1398
|
### Philosophy
|
|
1399
1399
|
"Speed and control aren't trade-offs. They reinforce each other." - GitHub
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
### Key Features
|
|
14
14
|
- 37 specialized agent types across 6 swarms (Engineering, Operations, Business, Data, Product, Growth)
|
|
15
15
|
- Dynamic agent scaling based on project complexity
|
|
16
|
-
- Task tool for
|
|
16
|
+
- Task tool for Task agent dispatch with fresh context
|
|
17
17
|
- Distributed task queue (pending, in-progress, completed, failed, dead-letter)
|
|
18
18
|
- Circuit breakers for per-agent failure handling
|
|
19
19
|
- Timeout/stuck agent detection with heartbeat monitoring
|
|
@@ -522,12 +522,12 @@ Loki Mode incorporates research and patterns from leading AI labs and practition
|
|
|
522
522
|
### Practitioner Insights
|
|
523
523
|
|
|
524
524
|
- **Boris Cherny** (Claude Code creator) - Self-verification loop, extended thinking
|
|
525
|
-
- **Simon Willison** -
|
|
525
|
+
- **Simon Willison** - Task agents for context isolation, skills system
|
|
526
526
|
- **Hacker News Community** - [Production patterns](https://news.ycombinator.com/item?id=44623207) from real deployments
|
|
527
527
|
|
|
528
528
|
### Inspirations
|
|
529
529
|
|
|
530
|
-
- [LerianStudio/ring](https://github.com/LerianStudio/ring) -
|
|
530
|
+
- [LerianStudio/ring](https://github.com/LerianStudio/ring) - Task-agent-driven-development pattern
|
|
531
531
|
- [Awesome Agentic Patterns](https://github.com/nibzard/awesome-agentic-patterns) - 105+ production patterns
|
|
532
532
|
|
|
533
533
|
**[Full Acknowledgements](ACKNOWLEDGEMENTS.md)** - Complete list of 50+ research papers, articles, and resources
|
|
@@ -137,7 +137,7 @@ If bugs are found in these files, document them in `.loki/CONTINUITY.md` under "
|
|
|
137
137
|
| - Identify highest priority unblocked task |
|
|
138
138
|
+-------------------------------------------------------------------+
|
|
139
139
|
| ACT: Execute the task |
|
|
140
|
-
| - Dispatch
|
|
140
|
+
| - Dispatch Task agent via Task tool OR execute directly |
|
|
141
141
|
| - Write code, run tests, fix issues |
|
|
142
142
|
| - Commit changes atomically (git checkpoint) |
|
|
143
143
|
+-------------------------------------------------------------------+
|
|
@@ -175,7 +175,7 @@ If bugs are found in these files, document them in `.loki/CONTINUITY.md` under "
|
|
|
175
175
|
### Task Tool Model Parameter
|
|
176
176
|
```python
|
|
177
177
|
# Opus for planning/architecture ONLY
|
|
178
|
-
Task(subagent_type="
|
|
178
|
+
Task(subagent_type="general-purpose", model="opus", description="Design system architecture", prompt="...")
|
|
179
179
|
|
|
180
180
|
# Sonnet for development and functional testing
|
|
181
181
|
Task(subagent_type="general-purpose", description="Implement API endpoint", prompt="...")
|
|
@@ -286,7 +286,7 @@ Task(description="Refactor database layer for performance", prompt="...") #
|
|
|
286
286
|
- **Direct Routing:** Minimal context - just the task and relevant file(s)
|
|
287
287
|
- **Supervisor Mode:** Full context - CONTINUITY.md, architectural decisions, dependencies
|
|
288
288
|
|
|
289
|
-
> "Keep in mind, complex task histories might confuse simpler
|
|
289
|
+
> "Keep in mind, complex task histories might confuse simpler Task agents." - AWS Best Practices
|
|
290
290
|
|
|
291
291
|
### E2E Testing with Playwright MCP (Anthropic Harness Pattern)
|
|
292
292
|
|
|
@@ -325,7 +325,7 @@ mcp_servers = {
|
|
|
325
325
|
| Metric | What to Track | Store In |
|
|
326
326
|
|--------|---------------|----------|
|
|
327
327
|
| Wall time | Seconds from start to completion | `.loki/metrics/efficiency/` |
|
|
328
|
-
| Agent count | Number of
|
|
328
|
+
| Agent count | Number of Task agents spawned | `.loki/metrics/efficiency/` |
|
|
329
329
|
| Retry count | Attempts before success | `.loki/metrics/efficiency/` |
|
|
330
330
|
| Model usage | Haiku/Sonnet/Opus call distribution | `.loki/metrics/efficiency/` |
|
|
331
331
|
|
|
@@ -351,12 +351,12 @@ See `references/tool-orchestration.md` for full implementation details.
|
|
|
351
351
|
|
|
352
352
|
---
|
|
353
353
|
|
|
354
|
-
## Structured Prompting for
|
|
354
|
+
## Structured Prompting for Task Agents
|
|
355
355
|
|
|
356
356
|
**Single-Responsibility Principle:** Each agent should have ONE clear goal and narrow scope.
|
|
357
357
|
([UiPath Best Practices](https://www.uipath.com/blog/ai/agent-builder-best-practices))
|
|
358
358
|
|
|
359
|
-
**Every
|
|
359
|
+
**Every Task agent dispatch MUST include:**
|
|
360
360
|
|
|
361
361
|
```markdown
|
|
362
362
|
## GOAL (What success looks like)
|
|
@@ -446,7 +446,7 @@ See `references/agent-types.md` for complete definitions and capabilities.
|
|
|
446
446
|
- **NEVER** skip code review between tasks
|
|
447
447
|
- **NEVER** proceed with unfixed Critical/High/Medium issues
|
|
448
448
|
- **NEVER** dispatch reviewers sequentially (always parallel - 3x faster)
|
|
449
|
-
- **NEVER** dispatch multiple implementation
|
|
449
|
+
- **NEVER** dispatch multiple implementation Task agents in parallel (conflicts)
|
|
450
450
|
- **NEVER** implement without reading task requirements first
|
|
451
451
|
|
|
452
452
|
### Review Anti-Patterns
|
|
@@ -466,7 +466,7 @@ See `references/agent-types.md` for complete definitions and capabilities.
|
|
|
466
466
|
- **ALWAYS** wait for all reviewers before aggregating
|
|
467
467
|
- **ALWAYS** fix Critical/High/Medium immediately
|
|
468
468
|
- **ALWAYS** re-run ALL 3 reviewers after fixes
|
|
469
|
-
- **ALWAYS** checkpoint state before spawning
|
|
469
|
+
- **ALWAYS** checkpoint state before spawning Task agents
|
|
470
470
|
|
|
471
471
|
---
|
|
472
472
|
|
|
@@ -618,14 +618,14 @@ context_budget:
|
|
|
618
618
|
reserve: "90% for model reasoning"
|
|
619
619
|
```
|
|
620
620
|
|
|
621
|
-
###
|
|
621
|
+
### Task Agents for Context Isolation
|
|
622
622
|
|
|
623
|
-
**Use
|
|
623
|
+
**Use Task agents to prevent token waste on noisy subtasks:**
|
|
624
624
|
|
|
625
625
|
```
|
|
626
|
-
Main agent (focused) -->
|
|
627
|
-
-->
|
|
628
|
-
-->
|
|
626
|
+
Main agent (focused) --> Task agent (file search)
|
|
627
|
+
--> Task agent (test running)
|
|
628
|
+
--> Task agent (linting)
|
|
629
629
|
```
|
|
630
630
|
|
|
631
631
|
See `references/production-patterns.md` for full practitioner patterns.
|
|
@@ -690,7 +690,7 @@ Loki Mode with PRD at path/to/prd # Start with PRD
|
|
|
690
690
|
|-------|-------|
|
|
691
691
|
| Trigger | "Loki Mode" or "Loki Mode with PRD at [path]" |
|
|
692
692
|
| Skip When | Need human approval, want to review plan first, single small task |
|
|
693
|
-
| Related Skills |
|
|
693
|
+
| Related Skills | task-agent-driven-development, executing-plans |
|
|
694
694
|
|
|
695
695
|
---
|
|
696
696
|
|
|
@@ -1473,7 +1473,7 @@ build_prompt() {
|
|
|
1473
1473
|
local analysis_instruction="CODEBASE_ANALYSIS_MODE: No PRD. FIRST: Analyze codebase - scan structure, read package.json/requirements.txt, examine README. THEN: Generate PRD at .loki/generated-prd.md. FINALLY: Execute SDLC phases."
|
|
1474
1474
|
|
|
1475
1475
|
# Context Memory Instructions
|
|
1476
|
-
local memory_instruction="CONTEXT MEMORY: Save state to .loki/memory/ledgers/LEDGER-orchestrator.md before complex operations. Create handoffs at .loki/memory/handoffs/ when passing work to
|
|
1476
|
+
local memory_instruction="CONTEXT MEMORY: Save state to .loki/memory/ledgers/LEDGER-orchestrator.md before complex operations. Create handoffs at .loki/memory/handoffs/ when passing work to Task agents. Extract learnings to .loki/memory/learnings/ after completing tasks. Check .loki/rules/ for established patterns. If context feels heavy, create .loki/signals/CONTEXT_CLEAR_REQUESTED and the wrapper will reset context with your ledger preserved."
|
|
1477
1477
|
|
|
1478
1478
|
# Load existing context if resuming
|
|
1479
1479
|
local context_injection=""
|
|
@@ -10,7 +10,7 @@ Loki Mode can optionally integrate with [Vibe Kanban](https://github.com/BloopAI
|
|
|
10
10
|
| Progress monitoring | Log files | Real-time dashboard |
|
|
11
11
|
| Manual intervention | Edit queue files | Drag-and-drop tasks |
|
|
12
12
|
| Code review | Automated 3-reviewer | + Visual diff review |
|
|
13
|
-
| Parallel agents | Background
|
|
13
|
+
| Parallel agents | Background Task agents | Isolated git worktrees |
|
|
14
14
|
|
|
15
15
|
## Setup
|
|
16
16
|
|
|
@@ -34,7 +34,7 @@ Every iteration follows this cycle:
|
|
|
34
34
|
| - Determine exact steps to complete it |
|
|
35
35
|
+-------------------------------------------------------------------+
|
|
36
36
|
| ACT: Execute the task |
|
|
37
|
-
| - Dispatch
|
|
37
|
+
| - Dispatch Task agent via Task tool OR execute directly |
|
|
38
38
|
| - Write code, run tests, fix issues |
|
|
39
39
|
| - Commit changes atomically (git checkpoint) |
|
|
40
40
|
| - Update queue files (.loki/queue/*.json) |
|
|
@@ -266,10 +266,10 @@ move_tasks_to_pending after_task=$last_good_task_id
|
|
|
266
266
|
|
|
267
267
|
---
|
|
268
268
|
|
|
269
|
-
## If
|
|
269
|
+
## If Task Agent Fails
|
|
270
270
|
|
|
271
271
|
1. Do NOT try to fix manually (context pollution)
|
|
272
|
-
2. Dispatch fix
|
|
273
|
-
3. If fix
|
|
272
|
+
2. Dispatch fix Task agent with specific error context
|
|
273
|
+
3. If fix Task agent fails 3x, move to dead letter queue
|
|
274
274
|
4. Open circuit breaker for that agent type
|
|
275
275
|
5. Alert orchestrator for human review
|
|
@@ -283,20 +283,20 @@ skills_architecture:
|
|
|
283
283
|
- Skills can be updated independently
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
###
|
|
286
|
+
### Task Agents for Context Isolation
|
|
287
287
|
|
|
288
288
|
**Key Insight:** Prevent massive token waste by isolating context-noisy subtasks.
|
|
289
289
|
|
|
290
290
|
```python
|
|
291
291
|
async def context_isolated_search(query, codebase_path):
|
|
292
292
|
"""
|
|
293
|
-
Use
|
|
293
|
+
Use Task agent for grep/search to prevent context pollution.
|
|
294
294
|
Based on Simon Willison's patterns.
|
|
295
295
|
"""
|
|
296
296
|
# Main agent stays focused
|
|
297
|
-
#
|
|
297
|
+
# Task agent handles noisy file searching
|
|
298
298
|
|
|
299
|
-
search_agent =
|
|
299
|
+
search_agent = spawn_task_agent(
|
|
300
300
|
role="codebase-searcher",
|
|
301
301
|
context_limit="10k tokens",
|
|
302
302
|
permissions=["read-only"]
|
|
@@ -538,11 +538,11 @@ cost_patterns:
|
|
|
538
538
|
max_tier: "$200/month often needs 2-3 subscriptions"
|
|
539
539
|
|
|
540
540
|
token_economics:
|
|
541
|
-
|
|
541
|
+
task_agents_multiply_cost: "Each duplicates context"
|
|
542
542
|
example: "5-task parallel job = 50,000+ tokens per subtask"
|
|
543
543
|
|
|
544
544
|
optimization:
|
|
545
|
-
context_isolation: "Use
|
|
545
|
+
context_isolation: "Use Task agents for noisy tasks"
|
|
546
546
|
information_abstraction: "Summarize, don't dump"
|
|
547
547
|
fresh_conversations: "Reset after major tasks"
|
|
548
548
|
skill_on_demand: "Load only when needed"
|