claude-code-orchestrator-kit 1.2.3 → 1.2.5
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/.claude/agents/health/orchestrators/bug-orchestrator.md +39 -0
- package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +19 -0
- package/.claude/agents/health/orchestrators/dependency-orchestrator.md +20 -1
- package/.claude/agents/health/orchestrators/reuse-orchestrator.md +1112 -0
- package/.claude/agents/health/orchestrators/security-orchestrator.md +19 -0
- package/.claude/agents/health/workers/dependency-auditor.md +80 -25
- package/.claude/agents/health/workers/reuse-fixer.md +496 -0
- package/.claude/agents/health/workers/reuse-hunter.md +545 -0
- package/.claude/commands/health-reuse.md +327 -0
- package/.claude/commands/speckit.implement.md +15 -0
- package/.claude/commands/speckit.plan.md +6 -1
- package/.claude/commands/speckit.tasks.md +7 -0
- package/.claude/project-index.md +75 -0
- package/.claude/skills/load-project-context/SKILL.md +89 -0
- package/.claude/skills/resume-session/SKILL.md +164 -0
- package/.claude/skills/save-session-context/SKILL.md +123 -0
- package/.claude/templates/project-index.template.md +67 -0
- package/.claude/templates/session/context.template.md +40 -0
- package/.claude/templates/session/log.template.md +72 -0
- package/CLAUDE.md +17 -0
- package/README.md +45 -5
- package/mcp/.mcp.full.json +11 -0
- package/package.json +1 -1
- package/switch-mcp.sh +10 -4
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resume-session
|
|
3
|
+
description: Resume a previously saved session by loading context and recent log entries. Use at start of orchestrator workflows to check for existing sessions.
|
|
4
|
+
trigger: At the start of health workflows, or when user asks to continue previous work
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Resume Session
|
|
8
|
+
|
|
9
|
+
Checks for and loads a previously saved session context, enabling seamless workflow continuation.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- At the start of health orchestrator workflows (automatic)
|
|
14
|
+
- When user explicitly asks to continue previous work
|
|
15
|
+
- After session restart or context switch
|
|
16
|
+
|
|
17
|
+
## When NOT to Use
|
|
18
|
+
|
|
19
|
+
- For new workflows with no prior context
|
|
20
|
+
- When user explicitly wants to start fresh
|
|
21
|
+
|
|
22
|
+
## Algorithm
|
|
23
|
+
|
|
24
|
+
### Step 1: Check for Existing Session
|
|
25
|
+
|
|
26
|
+
Check if `.tmp/current/session/context.md` exists.
|
|
27
|
+
|
|
28
|
+
### Step 2: Validate Freshness
|
|
29
|
+
|
|
30
|
+
If file exists, check the "Updated" timestamp:
|
|
31
|
+
- If < 24 hours old: Session is valid
|
|
32
|
+
- If > 24 hours old: Session is stale, ask user
|
|
33
|
+
|
|
34
|
+
### Step 3: Load Context
|
|
35
|
+
|
|
36
|
+
Read `.tmp/current/session/context.md` and extract:
|
|
37
|
+
- Current workflow and phase
|
|
38
|
+
- Last action and next steps
|
|
39
|
+
- Git state
|
|
40
|
+
- Quality gate status
|
|
41
|
+
|
|
42
|
+
### Step 4: Load Recent Log Entries
|
|
43
|
+
|
|
44
|
+
Read last 10 entries from `.tmp/current/session/log.md`:
|
|
45
|
+
- Recent decisions
|
|
46
|
+
- Issues encountered
|
|
47
|
+
- Learnings
|
|
48
|
+
|
|
49
|
+
### Step 5: Present Resume Option
|
|
50
|
+
|
|
51
|
+
If valid session found, present to user:
|
|
52
|
+
```
|
|
53
|
+
Found previous session:
|
|
54
|
+
- Workflow: health-bugs
|
|
55
|
+
- Phase: 3/7 (Staged Fixing)
|
|
56
|
+
- Last action: Fixed auth validation
|
|
57
|
+
- Age: 2 hours ago
|
|
58
|
+
|
|
59
|
+
Options:
|
|
60
|
+
1. Resume from where you left off
|
|
61
|
+
2. Start fresh (archive current session)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 6: On Resume
|
|
65
|
+
|
|
66
|
+
Return combined context for orchestrator to continue:
|
|
67
|
+
```markdown
|
|
68
|
+
## Resuming Session
|
|
69
|
+
|
|
70
|
+
### Current State
|
|
71
|
+
[Content from context.md]
|
|
72
|
+
|
|
73
|
+
### Recent Decisions
|
|
74
|
+
[Last 5 entries from log.md]
|
|
75
|
+
|
|
76
|
+
### Next Actions
|
|
77
|
+
[From context.md Next Steps section]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Step 7: On Start Fresh
|
|
81
|
+
|
|
82
|
+
If user chooses fresh start:
|
|
83
|
+
1. Move current session files to `.tmp/archive/session-[timestamp]/`
|
|
84
|
+
2. Return empty context
|
|
85
|
+
3. Orchestrator starts Phase 1
|
|
86
|
+
|
|
87
|
+
## Implementation
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
### Check session exists
|
|
91
|
+
|
|
92
|
+
Read `.tmp/current/session/context.md`
|
|
93
|
+
|
|
94
|
+
If not found:
|
|
95
|
+
Return "No previous session found. Starting fresh."
|
|
96
|
+
|
|
97
|
+
### Validate timestamp
|
|
98
|
+
|
|
99
|
+
Extract "Updated: YYYY-MM-DDTHH:MM:SS" from file
|
|
100
|
+
Calculate age in hours
|
|
101
|
+
|
|
102
|
+
If age > 24:
|
|
103
|
+
Ask user: "Session is [X] hours old. Resume or start fresh?"
|
|
104
|
+
|
|
105
|
+
### Load and return
|
|
106
|
+
|
|
107
|
+
Read context.md fully
|
|
108
|
+
Read last 500 lines of log.md (covers ~10 entries)
|
|
109
|
+
Return combined content
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Output Format
|
|
113
|
+
|
|
114
|
+
### When session found:
|
|
115
|
+
```
|
|
116
|
+
Previous session found:
|
|
117
|
+
- Workflow: health-bugs
|
|
118
|
+
- Phase: 3/7 (Staged Fixing)
|
|
119
|
+
- Age: 2h 15m
|
|
120
|
+
- Last: Fixed auth validation in src/auth.ts
|
|
121
|
+
|
|
122
|
+
Resume? [Y/n]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### When no session:
|
|
126
|
+
```
|
|
127
|
+
No previous session found. Starting fresh workflow.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### When stale:
|
|
131
|
+
```
|
|
132
|
+
Found stale session (26 hours old):
|
|
133
|
+
- Workflow: health-security
|
|
134
|
+
- Phase: 2/5
|
|
135
|
+
|
|
136
|
+
[R]esume anyway, [A]rchive and start fresh, or [C]ancel?
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Token Cost
|
|
140
|
+
|
|
141
|
+
- Context read: ~100-150 tokens
|
|
142
|
+
- Log read (last 10 entries): ~200-300 tokens
|
|
143
|
+
- Total: ~300-450 tokens (only when resuming)
|
|
144
|
+
|
|
145
|
+
## Related Skills
|
|
146
|
+
|
|
147
|
+
- `save-session-context` — Save current state for later
|
|
148
|
+
- `load-project-context` — Load project structure
|
|
149
|
+
|
|
150
|
+
## Integration with Orchestrators
|
|
151
|
+
|
|
152
|
+
Health orchestrators should call this skill in Phase 0:
|
|
153
|
+
|
|
154
|
+
```markdown
|
|
155
|
+
## Phase 0: Session Check
|
|
156
|
+
|
|
157
|
+
1. Invoke `resume-session` skill
|
|
158
|
+
2. If valid session:
|
|
159
|
+
- Ask user: Resume or fresh?
|
|
160
|
+
- If resume: Jump to saved phase
|
|
161
|
+
3. If no session:
|
|
162
|
+
- Proceed to Phase 1
|
|
163
|
+
4. Create new session context
|
|
164
|
+
```
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: save-session-context
|
|
3
|
+
description: Save current session state for later resumption. Use after completing workflow phases or before ending a session.
|
|
4
|
+
trigger: After completing a workflow phase, before session end, or when switching to different task
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Save Session Context
|
|
8
|
+
|
|
9
|
+
Saves the current workflow state to enable seamless session resumption.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- After completing each phase in health orchestrator workflows
|
|
14
|
+
- Before ending a long-running session
|
|
15
|
+
- When switching context to a different task
|
|
16
|
+
- After significant progress that should be preserved
|
|
17
|
+
|
|
18
|
+
## When NOT to Use
|
|
19
|
+
|
|
20
|
+
- For simple, quick tasks that don't need resumption
|
|
21
|
+
- When workflow is fully complete (clean up instead)
|
|
22
|
+
|
|
23
|
+
## Algorithm
|
|
24
|
+
|
|
25
|
+
### Step 1: Gather Current State
|
|
26
|
+
|
|
27
|
+
Collect the following information:
|
|
28
|
+
- Current workflow name and phase
|
|
29
|
+
- Priority level and completion counts
|
|
30
|
+
- Last completed action
|
|
31
|
+
- List of modified files (from git status)
|
|
32
|
+
|
|
33
|
+
### Step 2: Get Git State
|
|
34
|
+
|
|
35
|
+
Run `git status` and `git log -1` to capture:
|
|
36
|
+
- Current branch
|
|
37
|
+
- Uncommitted files count
|
|
38
|
+
- Last commit hash and message
|
|
39
|
+
|
|
40
|
+
### Step 3: Determine Next Steps
|
|
41
|
+
|
|
42
|
+
Based on current phase and workflow, identify:
|
|
43
|
+
- Immediate next action
|
|
44
|
+
- Following 2-3 actions
|
|
45
|
+
|
|
46
|
+
### Step 4: Write Context File
|
|
47
|
+
|
|
48
|
+
Write to `.tmp/current/session/context.md`:
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
# Session Context
|
|
52
|
+
|
|
53
|
+
> Auto-generated by save-session-context skill. Updated: [ISO timestamp]
|
|
54
|
+
|
|
55
|
+
## Current State
|
|
56
|
+
|
|
57
|
+
- **Workflow:** [workflow-name]
|
|
58
|
+
- **Phase:** [current]/[total] ([phase-name])
|
|
59
|
+
- **Priority:** [priority-level] ([completed] of [total] fixed)
|
|
60
|
+
- **Last Action:** [description]
|
|
61
|
+
|
|
62
|
+
## Active Files
|
|
63
|
+
|
|
64
|
+
[List from git status]
|
|
65
|
+
|
|
66
|
+
## Next Steps
|
|
67
|
+
|
|
68
|
+
1. [Next action]
|
|
69
|
+
2. [Following action]
|
|
70
|
+
3. [Third action]
|
|
71
|
+
|
|
72
|
+
## Git State
|
|
73
|
+
|
|
74
|
+
- **Branch:** [branch-name]
|
|
75
|
+
- **Uncommitted:** [count] files
|
|
76
|
+
- **Last Commit:** [hash] "[message]"
|
|
77
|
+
|
|
78
|
+
## Quality Gate Status
|
|
79
|
+
|
|
80
|
+
- **Type-check:** [status]
|
|
81
|
+
- **Build:** [status]
|
|
82
|
+
- **Tests:** [status]
|
|
83
|
+
|
|
84
|
+
## Resume Instructions
|
|
85
|
+
|
|
86
|
+
To continue this session:
|
|
87
|
+
1. Read this file to understand current state
|
|
88
|
+
2. Read `session-log.md` for recent decisions
|
|
89
|
+
3. Continue from "Next Steps" section
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Step 5: Confirm Save
|
|
93
|
+
|
|
94
|
+
Output confirmation message with file path.
|
|
95
|
+
|
|
96
|
+
## Implementation Notes
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Get git state
|
|
100
|
+
git status --porcelain | wc -l # Uncommitted count
|
|
101
|
+
git log -1 --format="%h %s" # Last commit
|
|
102
|
+
git branch --show-current # Current branch
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Output
|
|
106
|
+
|
|
107
|
+
Confirmation message:
|
|
108
|
+
```
|
|
109
|
+
Session context saved to .tmp/current/session/context.md
|
|
110
|
+
- Workflow: health-bugs
|
|
111
|
+
- Phase: 3/7 (Staged Fixing)
|
|
112
|
+
- Uncommitted: 2 files
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Token Cost
|
|
116
|
+
|
|
117
|
+
- Execution: ~50 tokens for git commands
|
|
118
|
+
- Output: 0 (write-only operation)
|
|
119
|
+
|
|
120
|
+
## Related Skills
|
|
121
|
+
|
|
122
|
+
- `resume-session` — Read saved context to continue
|
|
123
|
+
- `run-quality-gate` — Update quality gate status in context
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Project Index
|
|
2
|
+
|
|
3
|
+
> Quick navigation for AI agents. Updated: YYYY-MM-DD
|
|
4
|
+
>
|
|
5
|
+
> **Purpose:** This file helps agents understand project structure without reading entire codebase.
|
|
6
|
+
> **Usage:** Read by `load-project-context` skill when exploring unfamiliar areas.
|
|
7
|
+
|
|
8
|
+
## Architecture
|
|
9
|
+
|
|
10
|
+
- **[ARCHITECTURE.md](docs/ARCHITECTURE.md)** — System design, diagrams, data flow
|
|
11
|
+
- **[CLAUDE.md](CLAUDE.md)** — Behavioral rules, orchestration patterns
|
|
12
|
+
|
|
13
|
+
## Core Domains
|
|
14
|
+
|
|
15
|
+
### [Domain 1 Name]
|
|
16
|
+
- **[path/to/domain/](path/to/domain/)** — Brief description of what this domain does
|
|
17
|
+
- Key: `src/` — Main source code
|
|
18
|
+
- Key: `types/` — TypeScript types and interfaces
|
|
19
|
+
- Pattern: [Describe the main pattern used, e.g., "Repository pattern", "MVC"]
|
|
20
|
+
|
|
21
|
+
### [Domain 2 Name]
|
|
22
|
+
- **[path/to/domain/](path/to/domain/)** — Brief description
|
|
23
|
+
- Key: `components/` — UI components
|
|
24
|
+
- Key: `hooks/` — Custom React hooks
|
|
25
|
+
|
|
26
|
+
## Shared Code
|
|
27
|
+
|
|
28
|
+
- **[packages/shared/](packages/shared/)** — Shared utilities, types, constants
|
|
29
|
+
- Key: `utils/` — Helper functions
|
|
30
|
+
- Key: `types/` — Shared TypeScript types
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
- **[.env.example](.env.example)** — Environment variables template
|
|
35
|
+
- **[tsconfig.json](tsconfig.json)** — TypeScript configuration
|
|
36
|
+
- **[package.json](package.json)** — Dependencies and scripts
|
|
37
|
+
|
|
38
|
+
## Patterns & Conventions
|
|
39
|
+
|
|
40
|
+
- **Auth:** [How authentication is implemented]
|
|
41
|
+
- **State:** [State management approach]
|
|
42
|
+
- **Styling:** [CSS/styling approach]
|
|
43
|
+
- **Testing:** [Testing framework and patterns]
|
|
44
|
+
- **Error Handling:** [How errors are handled]
|
|
45
|
+
|
|
46
|
+
## Key Entry Points
|
|
47
|
+
|
|
48
|
+
| Purpose | File | Description |
|
|
49
|
+
|---------|------|-------------|
|
|
50
|
+
| App entry | `src/index.ts` | Main application entry point |
|
|
51
|
+
| API routes | `src/routes/` | All API endpoints |
|
|
52
|
+
| Database | `src/db/` | Database connection and queries |
|
|
53
|
+
|
|
54
|
+
## Recent Changes (last 7 days)
|
|
55
|
+
|
|
56
|
+
- YYYY-MM-DD: [Brief description of change]
|
|
57
|
+
- YYYY-MM-DD: [Brief description of change]
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Usage Notes
|
|
62
|
+
|
|
63
|
+
1. Keep this file under 150 lines
|
|
64
|
+
2. Update "Recent Changes" weekly
|
|
65
|
+
3. Only include KEY directories and files
|
|
66
|
+
4. Annotations should be 1 line max
|
|
67
|
+
5. Link to detailed docs, don't duplicate content
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Session Context
|
|
2
|
+
|
|
3
|
+
> Auto-generated by save-session-context skill. Updated: YYYY-MM-DDTHH:MM:SS
|
|
4
|
+
|
|
5
|
+
## Current State
|
|
6
|
+
|
|
7
|
+
- **Workflow:** [workflow-name]
|
|
8
|
+
- **Phase:** [current]/[total] ([phase-name])
|
|
9
|
+
- **Priority:** [priority-level] ([completed] of [total] [type])
|
|
10
|
+
- **Last Action:** [brief description of last completed action]
|
|
11
|
+
|
|
12
|
+
## Active Files
|
|
13
|
+
|
|
14
|
+
- `path/to/file1.ts` — [status: Modified/Created/Deleted], [not committed/committed]
|
|
15
|
+
- `path/to/file2.ts` — [status], [commit status]
|
|
16
|
+
|
|
17
|
+
## Next Steps
|
|
18
|
+
|
|
19
|
+
1. [Next immediate action]
|
|
20
|
+
2. [Following action]
|
|
21
|
+
3. [Action after that]
|
|
22
|
+
|
|
23
|
+
## Git State
|
|
24
|
+
|
|
25
|
+
- **Branch:** [current-branch-name]
|
|
26
|
+
- **Uncommitted:** [count] files
|
|
27
|
+
- **Last Commit:** [short-hash] "[commit-message]"
|
|
28
|
+
|
|
29
|
+
## Quality Gate Status
|
|
30
|
+
|
|
31
|
+
- **Type-check:** [PASS/FAIL/NOT_RUN]
|
|
32
|
+
- **Build:** [PASS/FAIL/NOT_RUN]
|
|
33
|
+
- **Tests:** [PASS/FAIL/NOT_RUN]
|
|
34
|
+
|
|
35
|
+
## Resume Instructions
|
|
36
|
+
|
|
37
|
+
To continue this session:
|
|
38
|
+
1. Read this file to understand current state
|
|
39
|
+
2. Read `session-log.md` for recent decisions and issues
|
|
40
|
+
3. Continue from "Next Steps" section
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Session Log
|
|
2
|
+
|
|
3
|
+
> Decisions, issues, and learnings from this session.
|
|
4
|
+
> Newest entries at the top.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## YYYY-MM-DDTHH:MM:SS
|
|
9
|
+
|
|
10
|
+
### [Category]: [Brief Title]
|
|
11
|
+
|
|
12
|
+
**Context:** [What were you trying to do]
|
|
13
|
+
|
|
14
|
+
**Issue/Decision:** [What happened or what decision was made]
|
|
15
|
+
|
|
16
|
+
**Resolution:** [How it was resolved or why this decision was made]
|
|
17
|
+
|
|
18
|
+
**Learning:** [Optional - what to remember for future]
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Entry Categories
|
|
23
|
+
|
|
24
|
+
Use these categories for consistency:
|
|
25
|
+
|
|
26
|
+
- **Decision** — Architectural or implementation choice made
|
|
27
|
+
- **Issue** — Problem encountered and how it was solved
|
|
28
|
+
- **Discovery** — Something learned about the codebase
|
|
29
|
+
- **Blocker** — Something that stopped progress (and resolution)
|
|
30
|
+
- **Rollback** — Change that was reverted and why
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Example Entries
|
|
35
|
+
|
|
36
|
+
### 2025-11-27T14:30:00
|
|
37
|
+
|
|
38
|
+
### Decision: Auth validation approach
|
|
39
|
+
|
|
40
|
+
**Context:** Multiple auth checks scattered across codebase
|
|
41
|
+
|
|
42
|
+
**Issue/Decision:** Chose middleware-based approach over per-route validation
|
|
43
|
+
|
|
44
|
+
**Resolution:** Created `authMiddleware.ts` in `src/middleware/`
|
|
45
|
+
|
|
46
|
+
**Learning:** Check existing patterns in `middleware/` before adding new auth logic
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### 2025-11-27T15:00:00
|
|
51
|
+
|
|
52
|
+
### Issue: TypeScript error after fix
|
|
53
|
+
|
|
54
|
+
**Context:** Fixed auth validation, but broke type inference
|
|
55
|
+
|
|
56
|
+
**Issue/Decision:** Type 'string | undefined' not assignable to 'string'
|
|
57
|
+
|
|
58
|
+
**Resolution:** Added nullish coalescing `?? ''` fallback
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### 2025-11-27T15:30:00
|
|
63
|
+
|
|
64
|
+
### Blocker: Missing dependency
|
|
65
|
+
|
|
66
|
+
**Context:** Tried to use zod validation
|
|
67
|
+
|
|
68
|
+
**Issue/Decision:** zod not installed in this package
|
|
69
|
+
|
|
70
|
+
**Resolution:** Added to package.json, ran pnpm install
|
|
71
|
+
|
|
72
|
+
**Learning:** Check package.json before using external libraries
|
package/CLAUDE.md
CHANGED
|
@@ -77,6 +77,23 @@ If contradictions occur:
|
|
|
77
77
|
- If truly ambiguous: ask user with specific options
|
|
78
78
|
- Only ask when unable to determine best practice (rare, ~10%)
|
|
79
79
|
|
|
80
|
+
**8. LIBRARY-FIRST APPROACH (MANDATORY)**
|
|
81
|
+
|
|
82
|
+
Before writing new code (>20 lines), ALWAYS search for existing libraries:
|
|
83
|
+
- WebSearch: "npm {functionality} library 2024" or "python {functionality} package"
|
|
84
|
+
- Context7: documentation for candidate libraries
|
|
85
|
+
- Check: weekly downloads >1000, commits in last 6 months, TypeScript/types support
|
|
86
|
+
|
|
87
|
+
**Use library when**:
|
|
88
|
+
- Covers >70% of required functionality
|
|
89
|
+
- Actively maintained, no critical vulnerabilities
|
|
90
|
+
- Reasonable bundle size (check bundlephobia.com)
|
|
91
|
+
|
|
92
|
+
**Write custom code when**:
|
|
93
|
+
- <20 lines of simple logic
|
|
94
|
+
- All libraries abandoned or insecure
|
|
95
|
+
- Core business logic requiring full control
|
|
96
|
+
|
|
80
97
|
### Planning Phase (ALWAYS First)
|
|
81
98
|
|
|
82
99
|
Before implementing tasks:
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ Complete toolkit with **33+ AI agents**, **quality gates**, **health monitoring*
|
|
|
60
60
|
|
|
61
61
|
### ⚙️ **MCP Server Configurations**
|
|
62
62
|
|
|
63
|
-
Switch between
|
|
63
|
+
Switch between 7 optimized MCP configurations based on your needs:
|
|
64
64
|
|
|
65
65
|
| Configuration | Servers | Token Usage | Use Case |
|
|
66
66
|
|---------------|---------|-------------|----------|
|
|
@@ -69,7 +69,8 @@ Switch between 6 optimized MCP configurations based on your needs:
|
|
|
69
69
|
| **SUPABASE-FULL** | Base + Supabase (dual) | ~3000 | Multi-project database |
|
|
70
70
|
| **N8N** | Base + n8n automation | ~2500 | Workflow automation |
|
|
71
71
|
| **FRONTEND** | Base + Playwright + ShadCN | ~2000 | UI/UX development |
|
|
72
|
-
| **
|
|
72
|
+
| **SERENA** | Base + Serena LSP | ~2500 | Semantic code search |
|
|
73
|
+
| **FULL** | All servers + Serena | ~6500 | Maximum capabilities |
|
|
73
74
|
|
|
74
75
|
### 🚀 **Slash Commands**
|
|
75
76
|
|
|
@@ -231,6 +232,37 @@ Orchestrator → Resume → Verify → Next phase
|
|
|
231
232
|
|
|
232
233
|
**Result**: Main Claude Code stays lean, all context gathered on-demand.
|
|
233
234
|
|
|
235
|
+
### 🧠 **DeksdenFlow Integration (Lazy Knowledge Loading)**
|
|
236
|
+
|
|
237
|
+
Inspired by [deksden-flow](https://github.com/deksden/deksden-flow), we implement **zero-overhead context management**:
|
|
238
|
+
|
|
239
|
+
**Project Index** (`.claude/project-index.md`):
|
|
240
|
+
- Compact project map with annotated links
|
|
241
|
+
- Loaded on-demand via `load-project-context` skill
|
|
242
|
+
- ~100-200 tokens when used, 0 at baseline
|
|
243
|
+
|
|
244
|
+
**Session Context** (`.tmp/current/session/`):
|
|
245
|
+
- `context.md`: Current workflow state for resumption
|
|
246
|
+
- `log.md`: Decisions, issues, learnings (write-only)
|
|
247
|
+
- Enables seamless session continuation
|
|
248
|
+
|
|
249
|
+
**Why It Matters**:
|
|
250
|
+
- Resume health workflows after session restart
|
|
251
|
+
- Track decisions for debugging
|
|
252
|
+
- Navigate codebase without full exploration
|
|
253
|
+
|
|
254
|
+
**Token Impact**: Zero baseline overhead. Skills load context only when needed.
|
|
255
|
+
|
|
256
|
+
### 🔬 **Serena LSP Integration**
|
|
257
|
+
|
|
258
|
+
**Serena MCP** provides semantic code understanding via Language Server Protocol:
|
|
259
|
+
- **Symbol Search**: Find functions, classes, types by name
|
|
260
|
+
- **Reference Lookup**: "Find all usages of X"
|
|
261
|
+
- **Intelligent Refactoring**: Rename with full reference awareness
|
|
262
|
+
- **Context**: `ide-assistant` mode avoids tool duplication
|
|
263
|
+
|
|
264
|
+
**When to Use**: Large codebases where Grep produces too many false positives.
|
|
265
|
+
|
|
234
266
|
---
|
|
235
267
|
|
|
236
268
|
## 🚀 Quick Start
|
|
@@ -246,7 +278,7 @@ cp .env.example .env.local
|
|
|
246
278
|
|
|
247
279
|
# 3. Choose MCP configuration
|
|
248
280
|
./switch-mcp.sh
|
|
249
|
-
# Select option 1-
|
|
281
|
+
# Select option 1-7 based on your needs
|
|
250
282
|
|
|
251
283
|
# 4. Restart Claude Code
|
|
252
284
|
# Your orchestration system is ready!
|
|
@@ -815,6 +847,14 @@ Reusable utilities accessible via `Skill` tool.
|
|
|
815
847
|
| `render-template` | Variable substitution in templates |
|
|
816
848
|
| `rollback-changes` | Restore files from changes log |
|
|
817
849
|
|
|
850
|
+
### Context & Session Skills (DeksdenFlow)
|
|
851
|
+
|
|
852
|
+
| Skill | Purpose |
|
|
853
|
+
|-------|---------|
|
|
854
|
+
| `load-project-context` | Load project index for navigation |
|
|
855
|
+
| `save-session-context` | Save workflow state for resumption |
|
|
856
|
+
| `resume-session` | Resume previously saved session |
|
|
857
|
+
|
|
818
858
|
---
|
|
819
859
|
|
|
820
860
|
## 💡 Usage Examples
|
|
@@ -1210,8 +1250,8 @@ Special thanks to the open-source community and all contributors!
|
|
|
1210
1250
|
|
|
1211
1251
|
- **33+** AI Agents (Orchestrators + Workers)
|
|
1212
1252
|
- **19+** Slash Commands
|
|
1213
|
-
- **
|
|
1214
|
-
- **
|
|
1253
|
+
- **18+** Reusable Skills
|
|
1254
|
+
- **7** MCP Configurations (including Serena LSP)
|
|
1215
1255
|
- **3** Quality Gate Scripts
|
|
1216
1256
|
- **100%** Environment Variable Security
|
|
1217
1257
|
|
package/mcp/.mcp.full.json
CHANGED
|
@@ -56,6 +56,17 @@
|
|
|
56
56
|
"shadcn": {
|
|
57
57
|
"command": "npx",
|
|
58
58
|
"args": ["shadcn@latest", "mcp"]
|
|
59
|
+
},
|
|
60
|
+
"serena": {
|
|
61
|
+
"command": "uvx",
|
|
62
|
+
"args": [
|
|
63
|
+
"--from",
|
|
64
|
+
"git+https://github.com/oraios/serena",
|
|
65
|
+
"serena",
|
|
66
|
+
"start-mcp-server",
|
|
67
|
+
"--context",
|
|
68
|
+
"ide-assistant"
|
|
69
|
+
]
|
|
59
70
|
}
|
|
60
71
|
}
|
|
61
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-orchestrator-kit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Complete automation and orchestration system for Claude Code with 33+ AI agents, quality gates, health monitoring, and workflow automation",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
package/switch-mcp.sh
CHANGED
|
@@ -29,11 +29,12 @@ echo -e "${GREEN}2${NC} - SUPABASE (Base + Supabase MegaCampusAI)
|
|
|
29
29
|
echo -e "${GREEN}3${NC} - SUPABASE + LEGACY (Base + Supabase + Legacy project) ~3000 tokens"
|
|
30
30
|
echo -e "${GREEN}4${NC} - N8N (Base + n8n-workflows + n8n-mcp) ~2500 tokens"
|
|
31
31
|
echo -e "${GREEN}5${NC} - FRONTEND (Base + Playwright + ShadCN) ~2000 tokens"
|
|
32
|
-
echo -e "${GREEN}6${NC} -
|
|
32
|
+
echo -e "${GREEN}6${NC} - SERENA (Base + Serena LSP semantic search) ~2500 tokens"
|
|
33
|
+
echo -e "${GREEN}7${NC} - FULL (All servers including Serena) ~6500 tokens"
|
|
33
34
|
echo ""
|
|
34
35
|
echo -e "${YELLOW}0${NC} - STATUS (Show current configuration)"
|
|
35
36
|
echo ""
|
|
36
|
-
read -p "Your choice (0-
|
|
37
|
+
read -p "Your choice (0-7): " choice
|
|
37
38
|
|
|
38
39
|
case "$choice" in
|
|
39
40
|
1)
|
|
@@ -57,8 +58,12 @@ case "$choice" in
|
|
|
57
58
|
desc="FRONTEND (Playwright + ShadCN)"
|
|
58
59
|
;;
|
|
59
60
|
6)
|
|
61
|
+
config="serena"
|
|
62
|
+
desc="SERENA (Base + LSP semantic search)"
|
|
63
|
+
;;
|
|
64
|
+
7)
|
|
60
65
|
config="full"
|
|
61
|
-
desc="FULL (All servers)"
|
|
66
|
+
desc="FULL (All servers including Serena)"
|
|
62
67
|
;;
|
|
63
68
|
0)
|
|
64
69
|
echo ""
|
|
@@ -76,11 +81,12 @@ case "$choice" in
|
|
|
76
81
|
[ -f "$MCP_DIR/.mcp.supabase-full.json" ] && echo -e " ✓ $MCP_DIR/.mcp.supabase-full.json"
|
|
77
82
|
[ -f "$MCP_DIR/.mcp.n8n.json" ] && echo -e " ✓ $MCP_DIR/.mcp.n8n.json"
|
|
78
83
|
[ -f "$MCP_DIR/.mcp.frontend.json" ] && echo -e " ✓ $MCP_DIR/.mcp.frontend.json"
|
|
84
|
+
[ -f "$MCP_DIR/.mcp.serena.json" ] && echo -e " ✓ $MCP_DIR/.mcp.serena.json"
|
|
79
85
|
[ -f "$MCP_DIR/.mcp.full.json" ] && echo -e " ✓ $MCP_DIR/.mcp.full.json"
|
|
80
86
|
exit 0
|
|
81
87
|
;;
|
|
82
88
|
*)
|
|
83
|
-
echo -e "${RED}Invalid choice. Use numbers 0-
|
|
89
|
+
echo -e "${RED}Invalid choice. Use numbers 0-7.${NC}"
|
|
84
90
|
exit 1
|
|
85
91
|
;;
|
|
86
92
|
esac
|