claude-code-orchestrator-kit 1.4.18 → 1.4.19

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.
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: Process error logs from database - fetch, analyze, fix, mark resolved
3
+ ---
4
+
5
+ # Process Error Logs
6
+
7
+ Execute the `process-logs` skill for automated error processing.
8
+
9
+ ## Quick Start
10
+
11
+ 1. Read `.claude/skills/process-logs/SKILL.md`
12
+ 2. Follow the workflow phases directly
13
+ 3. Use Task tool for complex fixes (delegate to subagents)
14
+ 4. Run quality gates inline via Bash
15
+
16
+ ## Workflow Summary
17
+
18
+ ```
19
+ Fetch Errors → Analyze → Fix → Verify → Mark Resolved → Report
20
+ ```
21
+
22
+ **Subagents**: database-architect, fullstack-nextjs-specialist, typescript-types-specialist
23
+ **Quality gates**: `pnpm type-check && pnpm build`
24
+
25
+ ---
26
+
27
+ Now read and execute the skill: `.claude/skills/process-logs/SKILL.md`
@@ -0,0 +1,270 @@
1
+ ---
2
+ name: process-logs
3
+ description: Process error logs from database - fetch new errors, analyze, fix, and mark resolved. Automates bug fixing workflow.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Process Error Logs
8
+
9
+ Automated workflow for processing error logs from your database. Fetches new errors, analyzes root cause, delegates fixes to specialized agents, and marks as resolved.
10
+
11
+ ## Prerequisites
12
+
13
+ Before using this skill, you need:
14
+
15
+ 1. **Error logging table** in your database (see `prompts/setup-error-logging.md`)
16
+ 2. **Database access** via MCP server (Supabase, Postgres, etc.)
17
+ 3. **Quality gate commands** (`pnpm type-check`, `pnpm build`, or similar)
18
+
19
+ ## Usage
20
+
21
+ Invoke via: `/process-logs` or "process error logs"
22
+
23
+ ## Workflow Overview
24
+
25
+ ```
26
+ Fetch New Errors → Analyze Each → Fix (delegate or direct) → Verify → Mark Resolved
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Phase 1: Fetch New Errors
32
+
33
+ Query your error_logs table for unresolved errors:
34
+
35
+ ```sql
36
+ -- Adjust table/column names for your project
37
+ SELECT id, severity, error_message, stack_trace, metadata, created_at
38
+ FROM error_logs
39
+ WHERE status IS NULL OR status NOT IN ('resolved', 'ignored', 'auto_muted')
40
+ ORDER BY
41
+ CASE severity WHEN 'CRITICAL' THEN 1 WHEN 'ERROR' THEN 2 ELSE 3 END,
42
+ created_at DESC
43
+ LIMIT 20;
44
+ ```
45
+
46
+ **If no errors found:** Report "No new errors to process" and exit.
47
+
48
+ ---
49
+
50
+ ## Phase 2: For Each Error
51
+
52
+ ### Step 2.1: Analyze Error Type
53
+
54
+ Determine the category and appropriate handler:
55
+
56
+ | Error Pattern | Category | Handler | Priority |
57
+ |---------------|----------|---------|----------|
58
+ | `violates.*constraint` | DB constraint | `database-architect` | 1 |
59
+ | `tRPC error`, API failure | API bug | `fullstack-nextjs-specialist` | 2 |
60
+ | `Type.*error`, TypeScript | Type error | `typescript-types-specialist` | 2 |
61
+ | `Error querying`, DB error | Query bug | `database-architect` | 2 |
62
+ | Single-line fix, typo | Simple fix | **Execute directly** | 3 |
63
+ | Config missing | Config issue | **Ask user** | 3 |
64
+ | External service error | External | Mark `to_verify` | 3 |
65
+
66
+ ### Step 2.2: Search Similar Resolved Errors
67
+
68
+ Before fixing, check if similar issue was resolved before:
69
+
70
+ ```sql
71
+ SELECT id, error_message, notes, created_at
72
+ FROM error_logs
73
+ WHERE status = 'resolved'
74
+ AND error_message ILIKE '%<keyword>%'
75
+ ORDER BY created_at DESC
76
+ LIMIT 5;
77
+ ```
78
+
79
+ **If found:** Apply same solution pattern, reference in notes.
80
+
81
+ ### Step 2.3: Fix the Error
82
+
83
+ **For SIMPLE fixes** (single-line, typo, import):
84
+ - Execute directly using Edit tool
85
+ - Verify with quality gates
86
+
87
+ **For MEDIUM/COMPLEX fixes** (multi-file, migration, architecture):
88
+ - Delegate to appropriate subagent via Task tool:
89
+
90
+ ```
91
+ Task(
92
+ subagent_type="<selected-agent>",
93
+ prompt="Fix error in production logs.
94
+
95
+ Error: <full_error_message>
96
+ Stack: <stack_trace>
97
+ Context: <relevant_context>
98
+
99
+ Requirements:
100
+ 1. Find and fix the ROOT CAUSE
101
+ 2. Ensure type-check and build pass
102
+ 3. Document what was changed"
103
+ )
104
+ ```
105
+
106
+ ### Step 2.4: Verify Fix
107
+
108
+ **MANDATORY before marking resolved:**
109
+
110
+ ```bash
111
+ pnpm type-check
112
+ pnpm build
113
+ ```
114
+
115
+ - If PASS → proceed to mark resolved
116
+ - If FAIL → re-analyze, re-fix, or ask user
117
+
118
+ ### Step 2.5: Mark as Resolved
119
+
120
+ Update the error status in database:
121
+
122
+ ```sql
123
+ UPDATE error_logs
124
+ SET status = 'resolved',
125
+ notes = '<root_cause>. <action_taken>.',
126
+ resolved_at = NOW()
127
+ WHERE id = '<error_id>';
128
+ ```
129
+
130
+ **Notes format:** `<root_cause>. <action_taken>.` — Max 100 chars.
131
+
132
+ **Examples:**
133
+ - `ESM import conflict. Renamed generator.ts to generator-node.ts.`
134
+ - `Missing DB constraint. Added 'approved' to enum via migration.`
135
+ - `Null pointer in API. Added optional chaining to response handler.`
136
+
137
+ ---
138
+
139
+ ## Phase 3: Summary Report
140
+
141
+ After processing all errors, generate summary:
142
+
143
+ ```markdown
144
+ ## Error Processing Summary
145
+
146
+ | Severity | Fixed | Pending | To Verify |
147
+ |----------|-------|---------|-----------|
148
+ | CRITICAL | X | Y | Z |
149
+ | ERROR | X | Y | Z |
150
+ | WARNING | X | Y | Z |
151
+
152
+ ### Fixed:
153
+ - <error_id>: <brief_description> → resolved
154
+
155
+ ### Pending (need user input):
156
+ - <error_id>: <reason>
157
+
158
+ ### To Verify (external/monitoring):
159
+ - <error_id>: <what_to_check>
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Subagent Delegation Examples
165
+
166
+ ### Database Error
167
+
168
+ ```
169
+ Task(
170
+ subagent_type="database-architect",
171
+ prompt="Fix DB constraint violation.
172
+ Error: violates check constraint 'status_check'
173
+ Table: lessons
174
+ Attempted value: 'approved'
175
+ Create migration to add the missing value to enum."
176
+ )
177
+ ```
178
+
179
+ ### API Error
180
+
181
+ ```
182
+ Task(
183
+ subagent_type="fullstack-nextjs-specialist",
184
+ prompt="Fix tRPC error in lesson.approve endpoint.
185
+ Error: Cannot read properties of undefined
186
+ Input: { lessonId: '...' }
187
+ Stack: at LessonRouter.approve (lesson.ts:142)
188
+ Fix the null handling in the API endpoint."
189
+ )
190
+ ```
191
+
192
+ ### Type Error
193
+
194
+ ```
195
+ Task(
196
+ subagent_type="typescript-types-specialist",
197
+ prompt="Fix TypeScript type mismatch.
198
+ Error: Type 'string' is not assignable to type 'Status'
199
+ File: src/types/lesson.ts
200
+ Ensure type compatibility across the codebase."
201
+ )
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Bug Fixing Principles
207
+
208
+ ### Fix Root Cause, Not Symptoms
209
+
210
+ - Find WHY the error happened, not just WHERE
211
+ - If error in function X but cause is in function Y → fix Y
212
+ - Ask "Why?" until you reach the actual cause
213
+
214
+ ### Never Ignore Errors
215
+
216
+ - Every error indicates a real problem
217
+ - "Works most of the time" is NOT acceptable
218
+ - External service errors → add retry logic or graceful degradation
219
+
220
+ ### Quality Over Speed
221
+
222
+ - Take time to understand full context
223
+ - Check for similar patterns elsewhere
224
+ - One good fix > multiple quick patches
225
+
226
+ ### Document Everything
227
+
228
+ - Always write notes when resolving
229
+ - Future you will thank present you
230
+ - Notes help identify patterns over time
231
+
232
+ ---
233
+
234
+ ## Auto-Mute Rules (Optional)
235
+
236
+ Some "errors" are expected behavior. Consider auto-muting:
237
+
238
+ | Pattern | Reason | Why Not a Bug |
239
+ |---------|--------|---------------|
240
+ | `Redis connection ended` | graceful_shutdown | App restart |
241
+ | `/health 404` | monitoring_probe | Health checks |
242
+ | `Cloudflare 5XX` | external_service | Not your bug |
243
+ | `Job stalled` | job_lifecycle | Long operations |
244
+
245
+ **Implementation:** Add auto-classification logic to your error logger.
246
+
247
+ ---
248
+
249
+ ## Verification Checklist
250
+
251
+ Before marking ANY error as resolved:
252
+
253
+ - [ ] Root cause identified
254
+ - [ ] Fix implemented (not workaround)
255
+ - [ ] Modified files reviewed
256
+ - [ ] `type-check` passes
257
+ - [ ] `build` passes
258
+ - [ ] No new errors introduced
259
+ - [ ] Notes documented
260
+
261
+ ---
262
+
263
+ ## Customization
264
+
265
+ Adapt this skill to your project:
266
+
267
+ 1. **Table names**: Change `error_logs` to your table
268
+ 2. **Status values**: Adjust to your enum
269
+ 3. **Quality gates**: Use your build commands
270
+ 4. **Subagents**: Use agents available in your setup
package/README.md CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  > **Professional automation and orchestration system for Claude Code**
4
4
 
5
- Complete toolkit with **39 AI agents**, **37 skills**, **20 slash commands**, **7 MCP configurations**, **Beads issue tracking**, and **quality gates** for building production-ready projects with Claude Code.
5
+ Complete toolkit with **39 AI agents**, **38 skills**, **21 slash commands**, **7 MCP configurations**, **Beads issue tracking**, **ready-to-use prompts**, and **quality gates** for building production-ready projects with Claude Code.
6
6
 
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
8
8
  [![npm version](https://img.shields.io/npm/v/claude-code-orchestrator-kit.svg)](https://www.npmjs.com/package/claude-code-orchestrator-kit)
9
9
  [![Agents](https://img.shields.io/badge/Agents-39-green.svg)](#agents-ecosystem)
10
- [![Skills](https://img.shields.io/badge/Skills-37-blue.svg)](#skills-library)
11
- [![Commands](https://img.shields.io/badge/Commands-20-orange.svg)](#slash-commands)
10
+ [![Skills](https://img.shields.io/badge/Skills-38-blue.svg)](#skills-library)
11
+ [![Commands](https://img.shields.io/badge/Commands-21-orange.svg)](#slash-commands)
12
12
 
13
13
  **[English](#overview)** | **[Русский](README.ru.md)**
14
14
 
@@ -25,6 +25,7 @@ Complete toolkit with **39 AI agents**, **37 skills**, **20 slash commands**, **
25
25
  - [Skills Library](#skills-library)
26
26
  - [Slash Commands](#slash-commands)
27
27
  - [MCP Configurations](#mcp-configurations)
28
+ - [Prompts](#prompts)
28
29
  - [Project Structure](#project-structure)
29
30
  - [Usage Examples](#usage-examples)
30
31
  - [Best Practices](#best-practices)
@@ -42,8 +43,8 @@ Complete toolkit with **39 AI agents**, **37 skills**, **20 slash commands**, **
42
43
  | Category | Count | Description |
43
44
  |----------|-------|-------------|
44
45
  | **AI Agents** | 39 | Specialized workers for bugs, security, testing, database, frontend, DevOps |
45
- | **Skills** | 37 | Reusable utilities for validation, reporting, automation, senior expertise |
46
- | **Commands** | 20 | Health checks, SpecKit, Beads, worktree, releases |
46
+ | **Skills** | 38 | Reusable utilities for validation, reporting, automation, senior expertise |
47
+ | **Commands** | 21 | Health checks, SpecKit, Beads, process-logs, worktree, releases |
47
48
  | **MCP Configs** | 7 | Pre-configured setups from minimal (600 tokens) to full (6500 tokens) |
48
49
 
49
50
  ### Key Benefits
@@ -261,12 +262,12 @@ SEQUENTIAL_THINKING_PROFILE=your-profile
261
262
 
262
263
  ┌────────────────────────────────────────────────────────────────┐
263
264
  │ COMMANDS │
264
- │ (18 slash commands) │
265
+ │ (21 slash commands) │
265
266
  ├────────────────────────────────────────────────────────────────┤
266
267
  │ /health-bugs /speckit.specify /worktree │
267
268
  │ /health-security /speckit.plan /push │
268
269
  │ /health-deps /speckit.implement /translate-doc │
269
- │ /health-cleanup /speckit.clarify
270
+ │ /health-cleanup /speckit.clarify /process-logs
270
271
  │ /health-reuse /speckit.constitution │
271
272
  │ /health-metrics /speckit.taskstoissues │
272
273
  └────────────────────────────────────────────────────────────────┘
@@ -349,7 +350,7 @@ SEQUENTIAL_THINKING_PROFILE=your-profile
349
350
 
350
351
  ## Skills Library
351
352
 
352
- ### 37 Reusable Skills
353
+ ### 38 Reusable Skills
353
354
 
354
355
  #### Inline Orchestration (5 skills)
355
356
  Execute health workflows directly without spawning orchestrator agents:
@@ -412,9 +413,10 @@ Professional-grade domain expertise:
412
413
  | `webapp-testing` | Playwright testing |
413
414
  | `frontend-aesthetics` | Distinctive UI design |
414
415
 
415
- #### Other (4 skills)
416
+ #### Other (5 skills)
416
417
  | Skill | Purpose |
417
418
  |-------|---------|
419
+ | `process-logs` | Automated error log processing workflow |
418
420
  | `git-commit-helper` | Commit message from diff |
419
421
  | `changelog-generator` | User-facing changelogs |
420
422
  | `content-research-writer` | Research-driven content |
@@ -424,7 +426,7 @@ Professional-grade domain expertise:
424
426
 
425
427
  ## Slash Commands
426
428
 
427
- ### 18 Commands
429
+ ### 21 Commands
428
430
 
429
431
  #### Health Monitoring (6 commands)
430
432
 
@@ -464,10 +466,11 @@ Professional-grade domain expertise:
464
466
  | `/beads-init` | Initialize Beads in project |
465
467
  | `/speckit.tobeads` | Import tasks.md to Beads |
466
468
 
467
- #### Other (3 commands)
469
+ #### Other (4 commands)
468
470
 
469
471
  | Command | Purpose |
470
472
  |---------|---------|
473
+ | `/process-logs` | Automated error log processing and fixing |
471
474
  | `/push [patch\|minor\|major]` | Automated release with changelog |
472
475
  | `/worktree` | Git worktree management |
473
476
  | `/translate-doc` | Translate documentation (EN↔RU) |
@@ -496,6 +499,24 @@ Switch configurations based on your task to save tokens:
496
499
 
497
500
  ---
498
501
 
502
+ ## Prompts
503
+
504
+ Ready-to-use prompts for setting up various features in your project. Copy, paste, and let Claude Code do the work.
505
+
506
+ | Prompt | Description |
507
+ |--------|-------------|
508
+ | [`setup-error-logging.md`](prompts/setup-error-logging.md) | Complete error logging system with DB table, logger service, auto-mute rules |
509
+
510
+ **How to Use:**
511
+
512
+ 1. Copy the prompt content to your chat with Claude Code
513
+ 2. Answer any questions Claude asks about your project specifics
514
+ 3. Review the generated code before committing
515
+
516
+ See [`prompts/README.md`](prompts/README.md) for full documentation.
517
+
518
+ ---
519
+
499
520
  ## Project Structure
500
521
 
501
522
  ```
@@ -534,6 +555,10 @@ claude-code-orchestrator-kit/
534
555
  │ ├── .mcp.frontend.json
535
556
  │ └── ...
536
557
 
558
+ ├── prompts/ # Ready-to-use setup prompts
559
+ │ ├── README.md
560
+ │ └── setup-error-logging.md
561
+
537
562
  ├── docs/ # Documentation
538
563
  │ ├── FAQ.md
539
564
  │ ├── ARCHITECTURE.md
@@ -717,8 +742,8 @@ Built with:
717
742
  ## Stats
718
743
 
719
744
  - **39** AI Agents
720
- - **37** Reusable Skills
721
- - **18** Slash Commands
745
+ - **38** Reusable Skills
746
+ - **21** Slash Commands
722
747
  - **7** MCP Configurations
723
748
  - **v1.4.13** Current Version
724
749
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-orchestrator-kit",
3
- "version": "1.4.18",
3
+ "version": "1.4.19",
4
4
  "description": "Professional automation and orchestration system for Claude Code with 39 AI agents, 37 skills, 18 slash commands, 7 MCP configurations, quality gates, and inline orchestration workflows",
5
5
  "main": "index.js",
6
6
  "type": "module",