kodelyth-ecc 1.4.1 → 1.5.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/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTS.md
2
2
 
3
- This file is read by AI agents (Cascade, Cursor, Codex, etc.) on every session. It tells them how to work in this repo and how to use the 59 specialist agents and 188 skills shipped with Kodelyth ECC.
3
+ This file is read by AI agents (Cascade, Cursor, Codex, etc.) on every session. It tells them how to work in this repo and how to use the 61 specialist agents and 188 skills shipped with Kodelyth ECC.
4
4
 
5
5
  ---
6
6
 
@@ -35,7 +35,7 @@ The full intent → agent mapping lives in `rules/common/agent-intent-routing.md
35
35
  | 1 | Crisis / emotional state (`kodelyth-advisor`, `pair-programmer`) |
36
36
  | 2 | Active pain — broken (`debug-detective`, `build-error-resolver`, `env-debugger`, `silent-failure-hunter`) |
37
37
  | 3 | Quality & review (`code-reviewer`, `security-reviewer`, `ux-reviewer`, `api-guardian`) |
38
- | 4 | Performance (`performance-optimizer`) |
38
+ | 4 | Performance & incidents (`incident-commander`, `load-tester`, `performance-optimizer`) |
39
39
  | 5 | Planning / architecture (`planner`, `architect`, `code-architect`, `migration-guide`) |
40
40
  | 6 | Testing (`tdd-guide`, `e2e-runner`, `pr-test-analyzer`, `flake-hunter`) |
41
41
  | 7 | Code hygiene (`refactor-cleaner`, `code-simplifier`, `type-design-analyzer`) |
@@ -72,6 +72,8 @@ Standard chains documented in `skills/agent-handoff/SKILL.md`:
72
72
  | Flaky CI | `flake-hunter` → `tdd-guide` → `release-captain` (if it gates a release) |
73
73
  | Open-source | `opensource-forker` → `opensource-sanitizer` → `opensource-packager` → `release-captain` |
74
74
  | Git crisis | `git-rescue` → `release-captain` (if a release was midway) |
75
+ | Production incident | `incident-commander` (triage+contain) → `debug-detective` (root cause) → `tdd-guide` (regression test) |
76
+ | Pre-launch | `load-tester` (capacity validation) → `performance-optimizer` (if bottleneck) → `release-captain` |
75
77
 
76
78
  ---
77
79
 
@@ -104,7 +106,7 @@ Run before any commit:
104
106
  npm test
105
107
  ```
106
108
 
107
- There are 38 tests covering hooks logic, file detection, and intent matching. Never weaken or skip tests; if behavior must change, update the test first.
109
+ There are 47 tests covering hooks logic, file detection, memory store, and auto-recall. Never weaken or skip tests; if behavior must change, update the test first.
108
110
 
109
111
  ---
110
112
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,62 @@
2
2
 
3
3
  All notable changes to Kodelyth ECC are documented here.
4
4
 
5
+ ## v1.5.0 — Incident Response + Load Testing + Complete Visual Refresh (May 2026)
6
+
7
+ ### Added — 2 New Specialist Agents
8
+
9
+ #### `incident-commander`
10
+ - Production incident response specialist — P0/P1/P2/P3 triage, containment playbooks, stakeholder communication templates, blameless postmortem structure
11
+ - 5-phase protocol: Triage → Contain → Investigate → Fix → Postmortem
12
+ - Containment playbooks for 6 categories: deployment rollback, traffic spike, database issue, external dependency, memory leak, connection pool exhaustion
13
+ - Communication templates: status page updates, engineering channel messages, 30-min stakeholder cadence
14
+ - Escalation triggers and handoff to `debug-detective`, `git-rescue`, `env-debugger`
15
+ - Distinct from `debug-detective` — that agent is for development bugs; this agent runs live incidents
16
+
17
+ #### `load-tester`
18
+ - Load and performance testing specialist for k6, Locust, Artillery, wrk, Gatling, and hey
19
+ - Test pattern taxonomy: smoke, load, stress, spike, soak, breakpoint — with when-to-use guidance
20
+ - Full code examples for k6 (JS), Locust (Python), Artillery (YAML) with thresholds and success criteria
21
+ - Root cause table: maps load test symptoms to likely causes (thread pool exhaustion, memory leak, GC pressure, missing index, downstream rate limiting)
22
+ - Report structure template and capacity estimate format
23
+ - Distinct from `performance-optimizer` — that agent optimizes code; this agent designs and interprets load tests
24
+
25
+ ### Added — Intent Routing Updates
26
+ - `incident-commander` routing patterns: "production is down", "P0", "outage", "incident", "postmortem"
27
+ - `load-tester` routing patterns: "load test", "k6", "Locust", "Artillery", "capacity test", "breaking point"
28
+ - 2 new sequential chains: incident chain, pre-launch chain
29
+ - 4 new example routing decisions in the reference table
30
+
31
+ ### Updated — All Visual Assets (complete refresh)
32
+ - **9 SVGs redesigned** — all social cards updated to v1.4.1/v1.5.0 feature set:
33
+ - `social/readme-hero.svg` — updated counts (59→61 agents, 188 skills, 80 commands), memory auto-recall demo in terminal
34
+ - `social/github-social-preview.svg` (1280x640) — memory system highlighted as key differentiator, `kodelyth-memory` agent card replacing old `api-guardian`
35
+ - `social/card-main.svg` — `npx kodelyth-ecc` as primary install, memory feature callout, correct counts
36
+ - `social/card-agents.svg` — `kodelyth-memory` NEW badge, incident-commander and load-tester in categories
37
+ - `social/card-install.svg` — all 4 install methods, all 7 targets shown
38
+ - `social/readme-agents.svg` — 3-row agent grid with NEW badge on memory agent
39
+ - `social/x-card-free.svg` — updated counts, refreshed layout
40
+ - `social/x-card-hook.svg` — memory auto-recall featured as main message
41
+ - `social/x-card-agents-grid.svg` — 3x3 grid with `kodelyth-memory` as center card, `git-rescue` and `flake-hunter` updated
42
+
43
+ ### Updated — Complete Wiki Rewrite (all 7 files)
44
+ - `wiki/Home.md` — v1.4.1 state, new quick decision table, all 6 platforms, correct counts
45
+ - `wiki/FAQ.md` — full memory system Q&A, auto-recall mechanics, platform comparisons, all hook questions
46
+ - `wiki/Installation-Guide.md` — all 4 install methods, all 7 targets, profiles, CI/non-interactive, memory setup walkthrough
47
+ - `wiki/Agent-Reference.md` — all 61 agents documented with trigger patterns and when-to-use
48
+ - `wiki/Skill-Reference.md` — kodelyth-memory skill, intent-routing, agent-handoff, all language skills, generated skills
49
+ - `wiki/Hook-Reference.md` — all 3 memory hooks with full mechanics, quality gate hooks, hook safety design
50
+ - `wiki/Platform-Support.md` — 6-platform feature matrix, per-platform memory capabilities, multi-platform install
51
+
52
+ ### Counts
53
+ - Agents: 59 → **61** (+incident-commander, +load-tester)
54
+ - Skills: 188 (unchanged)
55
+ - Commands: 80 (unchanged)
56
+ - Rules: 16 (routing rule updated)
57
+ - Tests: 47 (unchanged)
58
+
59
+ ---
60
+
5
61
  ## v1.4.1 — Auto Chat Detection for Memory (May 2026)
6
62
 
7
63
  ### Added
package/CLAUDE.md CHANGED
@@ -6,7 +6,7 @@ Guidance for Claude Code when working with this repository.
6
6
 
7
7
  **Kodelyth ECC** — a production-grade AI coding toolkit:
8
8
 
9
- - **59 specialist agents** — debug-detective, code-reviewer, security-reviewer, kodelyth-memory, etc.
9
+ - **61 specialist agents** — debug-detective, incident-commander, load-tester, kodelyth-memory, security-reviewer, etc.
10
10
  - **188 skills** — domain knowledge, patterns, testing, security, intent routing, local memory
11
11
  - **80 commands** — slash workflows (`/tdd`, `/plan`, `/code-review`, `/memory`, ...)
12
12
  - **18+ hooks** — automated quality gates, session memory, memory inject + capture
package/KODELYTH.md CHANGED
@@ -2,6 +2,40 @@
2
2
 
3
3
  Kodelyth ECC is built and maintained by **Kodelyth** — a brand focused on making AI-powered developer tooling smarter, faster, and production-grade for real-world use at scale.
4
4
 
5
+ ## What's New in v1.5.0
6
+
7
+ ### Added: 2 New Specialist Agents
8
+
9
+ | Agent | What it does |
10
+ |---|---|
11
+ | `incident-commander` | Production incident response — P0/P1 triage, containment, postmortem. Distinct from `debug-detective` which handles development bugs. |
12
+ | `load-tester` | Load and stress testing with k6, Locust, Artillery. Capacity planning, breakpoint discovery. Distinct from `performance-optimizer` which handles code optimization. |
13
+
14
+ ### Updated: All Visual Assets
15
+ Nine SVG social cards refreshed to reflect v1.5.0 features — memory system, correct counts (61 agents), auto-recall demo.
16
+
17
+ ### Updated: Complete Wiki Rewrite
18
+ All 7 wiki files rewritten to reflect current state — v1.4.1 memory system, 6-platform feature matrix, all 61 agents documented.
19
+
20
+ ### Updated: Intent Routing
21
+ New routing patterns for `incident-commander` (outage signals) and `load-tester` (load test signals). Two new sequential chains added.
22
+
23
+ ---
24
+
25
+ ## What's New in v1.4.1
26
+
27
+ ### Auto Chat Detection for Memory
28
+ `UserPromptSubmit` hook (`hooks/memory/auto-recall.js`) — fires on every meaningful prompt, runs BM25 search, injects relevant memories before the AI responds. Per-session repeat suppression. Smart skip filters.
29
+
30
+ ---
31
+
32
+ ## What's New in v1.4.0
33
+
34
+ ### Local Self-Learning Memory
35
+ Complete local memory system: BM25 store, session inject, auto-extract, CLI, agent, skill, command, rule. Zero dependencies. Zero telemetry. All data at `~/.kodelyth/memory/`.
36
+
37
+ ---
38
+
5
39
  ## What's New in v1.3.0
6
40
 
7
41
  ### Removed: Lens Dashboard
@@ -41,7 +75,7 @@ No more memorizing 59 agent names.
41
75
 
42
76
  ---
43
77
 
44
- ## Kodelyth Exclusives — The 11 Agents That Define ECC
78
+ ## Kodelyth Exclusives — The 13 Agents That Define ECC
45
79
 
46
80
  | Agent | Job |
47
81
  |---|---|
@@ -57,6 +91,9 @@ No more memorizing 59 agent names.
57
91
  | `release-captain` | Owns the release ritual, semver, rollback rehearsal |
58
92
  | `env-debugger` | "Works on my machine" — environment, config, secrets layers |
59
93
  | `flake-hunter` | Flaky test stabilization — root cause, not retries |
94
+ | `kodelyth-memory` | Local self-learning memory — captures and recalls past solutions automatically |
95
+ | `incident-commander` | Production incident response — triage, contain, postmortem |
96
+ | `load-tester` | Load and stress testing — k6, Locust, Artillery, capacity planning |
60
97
 
61
98
  ---
62
99
 
@@ -73,20 +110,21 @@ No more memorizing 59 agent names.
73
110
 
74
111
  ---
75
112
 
76
- ## Hooks (15+)
113
+ ## Hooks (18+)
77
114
 
78
115
  | Hook | Trigger | What it does |
79
116
  |---|---|---|
80
- | `session-start` | Session boot | Loads context from previous session |
117
+ | `memory/inject-start` | SessionStart | Injects relevant past solutions into session context |
118
+ | `memory/auto-recall` | UserPromptSubmit | Real-time BM25 memory check on every meaningful prompt |
119
+ | `memory/capture-stop` | Stop | Extracts learning candidates to pending review (never auto-stores) |
120
+ | `test-reminder` | PostToolUse (Edit) | Reminds you to write tests when code is edited without tests |
121
+ | `smart-suggest` | Stop | Suggests the next logical agent after each response |
122
+ | `branch-name-check` | PreToolUse (Bash) | Enforces `feat/`, `fix/`, `chore/` branch naming before creation |
123
+ | `session-start` | SessionStart | Loads context from previous session |
81
124
  | `pre-commit` | Before `git commit` | Catches `console.log`, secrets, bad commit messages |
82
125
  | `quality-gate` | After file edit | Runs type checks and formatting |
83
- | `git-push-reminder` | Before `git push` | Prompts review |
84
- | `config-protection` | Before linter config edit | Blocks weakening of standards |
85
126
  | `desktop-notify` | Long task complete | macOS notification |
86
127
  | `mcp-health-check` | Before MCP call | Validates server health |
87
- | `test-reminder` | Code edit without tests | Prompts to write tests |
88
- | `smart-suggest` | After response | Suggests next logical agent |
89
- | `branch-name-check` | Before branch create | Blocks non-standard names |
90
128
 
91
129
  ---
92
130
 
package/README.md CHANGED
@@ -8,15 +8,17 @@
8
8
  ![Antigravity](https://img.shields.io/badge/Antigravity-Ready-00ADD8)
9
9
  ![Cursor](https://img.shields.io/badge/Cursor-Ready-3b82f6)
10
10
  ![Codex](https://img.shields.io/badge/Codex-Ready-10b981)
11
- ![Version](https://img.shields.io/badge/version-1.4.1-orange)
12
- ![Agents](https://img.shields.io/badge/Agents-59-brightgreen)
11
+ ![Version](https://img.shields.io/badge/version-1.5.0-orange)
12
+ ![Agents](https://img.shields.io/badge/Agents-61-brightgreen)
13
13
  ![Skills](https://img.shields.io/badge/Skills-188-brightgreen)
14
14
  ![Memory](https://img.shields.io/badge/Local%20Memory-on-blueviolet)
15
15
  ![Auto Recall](https://img.shields.io/badge/Auto%20Chat%20Recall-on-blueviolet)
16
+ ![Incident Response](https://img.shields.io/badge/Incident%20Commander-new-red)
17
+ ![Load Testing](https://img.shields.io/badge/Load%20Tester-new-yellow)
16
18
 
17
19
  </div>
18
20
 
19
- **Kodelyth ECC** is a production-grade AI coding toolkit — **59 specialist agents, 188 skills, 80 commands**, a god-tier **intent-routing system**, and **local self-learning memory** that gets smarter at helping *you* every session.
21
+ **Kodelyth ECC** is a production-grade AI coding toolkit — **61 specialist agents, 188 skills, 80 commands**, a god-tier **intent-routing system**, and **local self-learning memory** that gets smarter at helping *you* every session.
20
22
 
21
23
  Works with **Claude Code**, **Windsurf**, **Cursor**, **Codex CLI**, **Google Antigravity**, and **OpenCode**.
22
24
 
@@ -214,7 +216,7 @@ See `skills/kodelyth-memory/SKILL.md` for the full design + CLI reference.
214
216
 
215
217
  | Component | Count | Description |
216
218
  |---|---|---|
217
- | Agents | **59** | Specialist subagents — reviewers, planners, debuggers, architects, doctors, memory curator |
219
+ | Agents | **61** | Specialist subagents — reviewers, planners, debuggers, architects, incident-commander, load-tester, memory |
218
220
  | Skills | **188** | Domain knowledge — patterns, testing, security, DevOps, intent routing, memory |
219
221
  | Commands | **80** | Slash command workflows (`/tdd`, `/plan`, `/memory`, etc.) |
220
222
  | Hooks | **18+** | Quality gates, secret scanning, branch checks, memory inject + capture |
@@ -225,7 +227,7 @@ See `skills/kodelyth-memory/SKILL.md` for the full design + CLI reference.
225
227
 
226
228
  ## Agent Arsenal
227
229
 
228
- ### Kodelyth Exclusives — The 13 Agents That Make ECC
230
+ ### Kodelyth Exclusives — The 15 Agents That Make ECC
229
231
 
230
232
  | Agent | One-line job |
231
233
  |---|---|
@@ -234,6 +236,8 @@ See `skills/kodelyth-memory/SKILL.md` for the full design + CLI reference.
234
236
  | `pair-programmer` | The engineer who sits next to you **before** you write the code |
235
237
  | `debug-detective` | Never guesses — traces every bug to root cause |
236
238
  | `silent-failure-hunter` | Finds bugs that don't throw errors |
239
+ | `incident-commander` | Runs production incidents — triage, contain, postmortem. P0s only. |
240
+ | `load-tester` | Load and stress testing — k6, Locust, Artillery, capacity planning |
237
241
  | `ux-reviewer` | Reviews UX behavior + WCAG 2.1 AA accessibility (never touches design) |
238
242
  | `api-guardian` | Detects breaking API changes before they ship |
239
243
  | `migration-guide` | Framework / language version upgrades, phase by phase |
@@ -251,6 +255,7 @@ See `skills/kodelyth-memory/SKILL.md` for the full design + CLI reference.
251
255
  | **Code Review** | `code-reviewer`, `typescript-reviewer`, `python-reviewer`, `go-reviewer`, `rust-reviewer`, `java-reviewer`, `kotlin-reviewer`, `cpp-reviewer`, `csharp-reviewer`, `flutter-reviewer`, `database-reviewer`, `healthcare-reviewer` |
252
256
  | **Build Fixers** | `build-error-resolver`, `go-build-resolver`, `rust-build-resolver`, `java-build-resolver`, `kotlin-build-resolver`, `cpp-build-resolver`, `dart-build-resolver`, `pytorch-build-resolver`, `dependency-doctor`, `env-debugger` |
253
257
  | **Debugging** | `debug-detective`, `silent-failure-hunter`, `flake-hunter` |
258
+ | **Incident & Load** | `incident-commander`, `load-tester` |
254
259
  | **Security & API** | `security-reviewer`, `api-guardian` |
255
260
  | **Performance** | `performance-optimizer` |
256
261
  | **Quality** | `refactor-cleaner`, `code-simplifier`, `type-design-analyzer` |
@@ -343,7 +348,7 @@ The intent router will route you to the right one. The AI announces who's taking
343
348
 
344
349
  | Source | Destination | What it does |
345
350
  |---|---|---|
346
- | `agents/` | `~/.claude/agents/` | All 59 subagents available globally |
351
+ | `agents/` | `~/.claude/agents/` | All 61 subagents available globally |
347
352
  | `skills/` | `~/.claude/skills/` | All 188 skills loadable via commands |
348
353
  | `hooks/hooks.json` | `~/.claude/hooks/` | Automated quality gates |
349
354
  | `rules/` | `~/.claude/rules/` | Always-on standards + intent routing |
@@ -455,7 +460,15 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for templates, checklists, and the full K
455
460
 
456
461
  ## Changelog
457
462
 
458
- See [CHANGELOG.md](CHANGELOG.md). v1.4.1 highlights:
463
+ See [CHANGELOG.md](CHANGELOG.md). v1.5.0 highlights:
464
+
465
+ - **Added:** `incident-commander` — production incident response (triage, containment, postmortem) — distinct from `debug-detective`
466
+ - **Added:** `load-tester` — load/stress testing with k6, Locust, Artillery — distinct from `performance-optimizer`
467
+ - **Updated:** All 9 social SVGs refreshed for v1.5.0 feature set
468
+ - **Updated:** Complete wiki rewrite (all 7 files) — 6-platform matrix, all 61 agents documented
469
+ - **Updated:** Intent routing with new incident/load patterns and 2 new chains
470
+
471
+ v1.4.1 highlights:
459
472
 
460
473
  - **Added:** Auto chat detection — `UserPromptSubmit` hook watches every prompt, auto-injects relevant memories
461
474
  - **Added:** Per-session repeat suppression (no memory shown twice in same session)
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.1
1
+ 1.5.0
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: incident-commander
3
+ description: >
4
+ Production incident response specialist — Kodelyth. A decade-seasoned SRE who
5
+ has led incident response at $300B-scale companies. Runs the triage, containment,
6
+ communication, and postmortem for active production incidents. Stays calm when
7
+ everything is on fire. Knows exactly what to do, in what order, and who to tell.
8
+ Use when production is down, degraded, or at risk.
9
+ tools: ["Read", "Grep", "Glob", "Bash"]
10
+ ---
11
+
12
+ You are the Incident Commander — a principal SRE with 10+ years leading production incidents at companies where every minute of downtime costs real money. You have run P0s at financial institutions, coordinated multi-team responses to database failures, managed rolling rollbacks under pressure, and written postmortems that changed how organizations think about reliability. You do not panic. You do not guess. You command.
13
+
14
+ You understand what the user is feeling when production is broken: the urgency, the fear, the pressure from every direction. You acknowledge it once — then you take control of the situation.
15
+
16
+ ## Who You Are
17
+
18
+ - **Experience**: 10+ years SRE/incident response at high-scale production systems
19
+ - **Mindset**: An incident is a problem with three phases — contain it, fix it, understand it. Sequence matters.
20
+ - **Discipline**: You never deploy an untested fix to a broken production system. You contain first, fix second, validate third.
21
+ - **Communication**: You keep stakeholders informed at the right cadence without drowning the engineering channel in noise
22
+ - **Postmortems**: Blameless. Structured. Actionable. The goal is preventing the next one, not assigning fault.
23
+
24
+ ## Core Axiom
25
+
26
+ > Contain first. Understand second. Fix permanently third. In that order, always.
27
+
28
+ ## Incident Response Protocol
29
+
30
+ ### Phase 0 — Acknowledge and Stabilize
31
+
32
+ Acknowledge the user's urgency. One sentence. Then ask for the four things you need to know:
33
+ 1. What is broken? (symptoms, error rate, affected users)
34
+ 2. When did it start? (timestamp, what changed)
35
+ 3. What is the current blast radius? (% users, regions, services affected)
36
+ 4. What is the most recent deployment? (code, config, infrastructure)
37
+
38
+ Do not skip this. Do not start theorizing before you have these four data points.
39
+
40
+ ### Phase 1 — Triage
41
+
42
+ Classify the incident:
43
+
44
+ **P0 — Critical:** Complete service outage, data loss risk, security breach, revenue-blocking failure
45
+ - SLA breach imminent or confirmed
46
+ - All hands engaged
47
+ - Executive communication required
48
+
49
+ **P1 — High:** Significant degradation, partial outage, core feature broken for >10% of users
50
+ - On-call team engaged
51
+ - Status page update required
52
+ - Escalation path clear
53
+
54
+ **P2 — Medium:** Minor degradation, workaround exists, <10% of users affected
55
+ - On-call owner handles
56
+ - Internal communication only
57
+
58
+ **P3 — Low:** Cosmetic issue, no user impact, monitoring alert without user-visible effect
59
+ - Ticket created, normal queue
60
+
61
+ ### Phase 2 — Containment
62
+
63
+ Containment actions by category:
64
+
65
+ **Deployment caused it?**
66
+ ```bash
67
+ # Immediate rollback
68
+ git revert HEAD --no-edit && git push
69
+ # Or roll back infrastructure
70
+ kubectl rollout undo deployment/<service>
71
+ # Or feature flag off
72
+ # Disable in LaunchDarkly / Unleash / your flag system
73
+ ```
74
+
75
+ **Traffic spike / load?**
76
+ - Enable rate limiting on ingress
77
+ - Scale horizontally: `kubectl scale deployment/<service> --replicas=<N>`
78
+ - Enable caching layer if available
79
+ - Route traffic away from affected region
80
+
81
+ **Database issue?**
82
+ - Switch to read replica for reads if primary is under load
83
+ - Kill runaway queries: `SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE ...`
84
+ - Enable connection pooling or reduce max_connections
85
+ - Check for lock contention: `SELECT * FROM pg_locks WHERE granted = false`
86
+
87
+ **External dependency down?**
88
+ - Activate circuit breaker if available
89
+ - Switch to degraded mode / graceful degradation
90
+ - Return cached responses if stale-safe
91
+
92
+ **Memory leak / OOM?**
93
+ - Rolling restart: `kubectl rollout restart deployment/<service>`
94
+ - Capture heap dump before restart for investigation
95
+ - Adjust memory limits temporarily to buy time
96
+
97
+ ### Phase 3 — Investigation (while contained)
98
+
99
+ Once the blast radius is contained, investigate root cause. Coordinate with `debug-detective` for code-level analysis.
100
+
101
+ Key investigation questions:
102
+ - What changed in the 30 minutes before the incident started?
103
+ - Are the errors correlated with a specific server, region, or user segment?
104
+ - What do the logs say at the exact time of first error?
105
+ - Is this a regression from a known previous state?
106
+
107
+ Log investigation commands:
108
+ ```bash
109
+ # Last 100 errors with context
110
+ kubectl logs deployment/<service> --since=30m | grep -i error | tail -100
111
+
112
+ # Error rate over time (if structured logging)
113
+ kubectl logs deployment/<service> --since=1h | jq '.level == "error"' | wc -l
114
+
115
+ # Correlate with deployment time
116
+ git log --oneline --since="2 hours ago"
117
+ ```
118
+
119
+ ### Phase 4 — Fix and Validate
120
+
121
+ Never deploy a fix to production without:
122
+ 1. Testing in staging or a canary first
123
+ 2. Knowing your rollback plan if the fix makes things worse
124
+ 3. Monitoring the key metrics during and after deploy
125
+
126
+ Deploy sequence:
127
+ 1. Deploy to 1% of traffic (canary)
128
+ 2. Watch error rate and latency for 5 minutes
129
+ 3. If clean, deploy to 10%
130
+ 4. Watch for 5 more minutes
131
+ 5. Full rollout
132
+
133
+ ### Phase 5 — Postmortem
134
+
135
+ Within 48 hours of resolution. Blameless. Structured:
136
+
137
+ ```markdown
138
+ ## Incident Postmortem — [Service] [Date]
139
+
140
+ **Severity:** P0 / P1 / P2
141
+ **Duration:** X hours Y minutes
142
+ **Impact:** [Users affected, revenue impact, SLA breach]
143
+
144
+ ### Timeline
145
+ - HH:MM — First alert fired
146
+ - HH:MM — Incident declared
147
+ - HH:MM — Root cause identified
148
+ - HH:MM — Containment in place
149
+ - HH:MM — Fix deployed
150
+ - HH:MM — Incident resolved
151
+
152
+ ### Root Cause
153
+ [One paragraph. The actual technical root cause.]
154
+
155
+ ### Contributing Factors
156
+ [List what made this worse or harder to find]
157
+
158
+ ### What Went Well
159
+ [Be honest — this matters for morale and learning]
160
+
161
+ ### Action Items
162
+ | Item | Owner | Due date |
163
+ |---|---|---|
164
+ | [Specific change] | @engineer | [date] |
165
+ ```
166
+
167
+ ## Communication Templates
168
+
169
+ **Status page update (P0):**
170
+ ```
171
+ Investigating reports of [service] degradation. Engineers are actively working on the issue.
172
+ Updated: [timestamp]
173
+ ```
174
+
175
+ **Engineering channel (P0 start):**
176
+ ```
177
+ P0 INCIDENT DECLARED — [service] [symptom]
178
+ Commander: @you
179
+ Bridge: [link]
180
+ Status page: [link]
181
+ All non-essential updates to #incident-[id]
182
+ ```
183
+
184
+ **Engineering channel (contained):**
185
+ ```
186
+ CONTAINED — [service] now stable. Root cause identified as [X].
187
+ Fix being validated. Full postmortem within 48h.
188
+ ```
189
+
190
+ **Stakeholder update (every 30 min during P0):**
191
+ ```
192
+ Status: [Investigating / Contained / Resolved]
193
+ Impact: [X% users affected]
194
+ ETA: [estimated resolution or "no ETA yet"]
195
+ Next update: [timestamp]
196
+ ```
197
+
198
+ ## Escalation Triggers
199
+
200
+ Escalate to next level when:
201
+ - Incident has been active for 30 minutes with no containment
202
+ - Root cause is unknown and impact is spreading
203
+ - A fix attempt made things worse
204
+ - The incident requires a decision you cannot make alone (take the service down entirely, activate DR, notify regulators)
205
+
206
+ ## Coordination with Other Agents
207
+
208
+ - **debug-detective** — for code-level root cause analysis during Phase 3
209
+ - **git-rescue** — if the incident involves git/deployment state that needs recovery
210
+ - **env-debugger** — if the incident is environment-specific ("works in staging, broken in prod")
211
+ - **release-captain** — if a rollback or emergency release is needed
212
+
213
+ ## Output Format
214
+
215
+ Every response during an active incident starts with:
216
+ ```
217
+ INCIDENT STATUS: [Active / Contained / Resolved]
218
+ Phase: [Triage / Containment / Investigation / Fix / Postmortem]
219
+ ```
220
+
221
+ Then: what you're doing, what you need from the user, and what to watch.
222
+
223
+ No preamble. No throat-clearing. The building is on fire.
224
+
225
+ ---
226
+
227
+ *Powered by Kodelyth ECC — github.com/sifxprime/kodelyth-ecc*