@lvlup-sw/exarchos 2.0.1
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-plugin/marketplace.json +22 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.mcp.json +17 -0
- package/AGENTS.md +59 -0
- package/CLAUDE.md.template +62 -0
- package/LICENSE +202 -0
- package/README.md +258 -0
- package/commands/autocompact.md +37 -0
- package/commands/checkpoint.md +85 -0
- package/commands/cleanup.md +99 -0
- package/commands/debug.md +145 -0
- package/commands/delegate.md +56 -0
- package/commands/ideate.md +82 -0
- package/commands/plan.md +150 -0
- package/commands/refactor.md +139 -0
- package/commands/reload.md +37 -0
- package/commands/resume.md +130 -0
- package/commands/review.md +51 -0
- package/commands/sync-schemas.md +74 -0
- package/commands/synthesize.md +122 -0
- package/commands/tdd.md +58 -0
- package/dist/exarchos-cli.js +8828 -0
- package/dist/exarchos-mcp.js +50 -0
- package/hooks/hooks.json +53 -0
- package/package.json +59 -0
- package/rules/coding-standards.md +46 -0
- package/rules/mcp-tool-guidance.md +26 -0
- package/rules/pr-descriptions.md +12 -0
- package/rules/rm-safety.md +9 -0
- package/rules/skill-path-resolution.md +10 -0
- package/rules/tdd.md +41 -0
- package/rules/telemetry-awareness.md +9 -0
- package/scripts/assess-refactor-scope.sh +239 -0
- package/scripts/check-benchmark-regression.sh +229 -0
- package/scripts/check-coderabbit.sh +288 -0
- package/scripts/check-coverage-thresholds.sh +194 -0
- package/scripts/check-polish-scope.sh +245 -0
- package/scripts/check-property-tests.sh +167 -0
- package/scripts/check-tdd-compliance.sh +265 -0
- package/scripts/coderabbit-review-gate.sh +518 -0
- package/scripts/debug-review-gate.sh +201 -0
- package/scripts/extract-fix-tasks.sh +179 -0
- package/scripts/extract-task.sh +67 -0
- package/scripts/generate-traceability.sh +209 -0
- package/scripts/investigation-timer.sh +171 -0
- package/scripts/needs-schema-sync.sh +174 -0
- package/scripts/new-project.sh +103 -0
- package/scripts/post-delegation-check.sh +317 -0
- package/scripts/pre-synthesis-check.sh +440 -0
- package/scripts/reconcile-state.sh +346 -0
- package/scripts/reconstruct-stack.sh +432 -0
- package/scripts/review-diff.sh +63 -0
- package/scripts/review-verdict.sh +169 -0
- package/scripts/security-scan.sh +248 -0
- package/scripts/select-debug-track.sh +186 -0
- package/scripts/setup-worktree.sh +323 -0
- package/scripts/spec-coverage-check.sh +230 -0
- package/scripts/static-analysis-gate.sh +236 -0
- package/scripts/sync-labels.sh +122 -0
- package/scripts/validate-companion.sh +161 -0
- package/scripts/validate-dotnet-standards.sh +267 -0
- package/scripts/validate-installation.sh +101 -0
- package/scripts/validate-plugin.sh +223 -0
- package/scripts/validate-refactor.sh +234 -0
- package/scripts/validate-rm.sh +93 -0
- package/scripts/verify-delegation-saga.sh +240 -0
- package/scripts/verify-doc-links.sh +211 -0
- package/scripts/verify-ideate-artifacts.sh +296 -0
- package/scripts/verify-plan-coverage.sh +228 -0
- package/scripts/verify-review-triage.sh +219 -0
- package/scripts/verify-worktree-baseline.sh +159 -0
- package/scripts/verify-worktree.sh +84 -0
- package/settings.json +47 -0
- package/skills/brainstorming/SKILL.md +127 -0
- package/skills/brainstorming/references/design-template.md +65 -0
- package/skills/cleanup/SKILL.md +147 -0
- package/skills/cleanup/references/merge-verification.md +40 -0
- package/skills/debug/SKILL.md +204 -0
- package/skills/debug/references/hotfix-track.md +134 -0
- package/skills/debug/references/investigation-checklist.md +217 -0
- package/skills/debug/references/rca-template.md +150 -0
- package/skills/debug/references/state-schema.md +294 -0
- package/skills/debug/references/thorough-track.md +194 -0
- package/skills/debug/references/triage-questions.md +155 -0
- package/skills/debug/references/troubleshooting.md +47 -0
- package/skills/delegation/SKILL.md +150 -0
- package/skills/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/delegation/references/agent-teams-saga.md +248 -0
- package/skills/delegation/references/fix-mode.md +74 -0
- package/skills/delegation/references/fixer-prompt.md +162 -0
- package/skills/delegation/references/implementer-prompt.md +322 -0
- package/skills/delegation/references/parallel-strategy.md +124 -0
- package/skills/delegation/references/pbt-patterns.md +172 -0
- package/skills/delegation/references/pr-fixes-mode.md +154 -0
- package/skills/delegation/references/state-management.md +51 -0
- package/skills/delegation/references/testing-patterns.md +129 -0
- package/skills/delegation/references/troubleshooting.md +33 -0
- package/skills/delegation/references/workflow-steps.md +127 -0
- package/skills/delegation/references/worktree-enforcement.md +64 -0
- package/skills/dotnet-standards/SKILL.md +269 -0
- package/skills/dotnet-standards/references/csharp-standards.md +120 -0
- package/skills/dotnet-standards/templates/.editorconfig +366 -0
- package/skills/dotnet-standards/templates/Directory.Build.props +56 -0
- package/skills/dotnet-standards/templates/Directory.Packages.props +69 -0
- package/skills/dotnet-standards/templates/global.json +6 -0
- package/skills/dotnet-standards/templates/nuget.config +9 -0
- package/skills/dotnet-standards/templates/stylecop.json +37 -0
- package/skills/git-worktrees/SKILL.md +255 -0
- package/skills/implementation-planning/SKILL.md +233 -0
- package/skills/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/implementation-planning/references/task-template.md +43 -0
- package/skills/implementation-planning/references/testing-strategy-guide.md +88 -0
- package/skills/quality-review/SKILL.md +278 -0
- package/skills/quality-review/references/code-quality-checklist.md +159 -0
- package/skills/quality-review/references/review-report-template.md +65 -0
- package/skills/quality-review/references/security-checklist.md +79 -0
- package/skills/quality-review/references/typescript-standards.md +24 -0
- package/skills/refactor/COMMAND.md +67 -0
- package/skills/refactor/SKILL.md +198 -0
- package/skills/refactor/phases/auto-chain.md +262 -0
- package/skills/refactor/phases/brief.md +176 -0
- package/skills/refactor/phases/explore.md +132 -0
- package/skills/refactor/phases/overhaul-delegate.md +136 -0
- package/skills/refactor/phases/overhaul-plan.md +312 -0
- package/skills/refactor/phases/overhaul-review.md +304 -0
- package/skills/refactor/phases/polish-implement.md +349 -0
- package/skills/refactor/phases/polish-validate.md +218 -0
- package/skills/refactor/phases/update-docs.md +234 -0
- package/skills/refactor/references/brief-template.md +81 -0
- package/skills/refactor/references/doc-update-checklist.md +110 -0
- package/skills/refactor/references/explore-checklist.md +73 -0
- package/skills/refactor/references/overhaul-track.md +215 -0
- package/skills/refactor/references/polish-track.md +170 -0
- package/skills/shared/prompts/context-reading.md +58 -0
- package/skills/shared/prompts/report-format.md +54 -0
- package/skills/shared/prompts/tdd-requirements.md +39 -0
- package/skills/shepherd/SKILL.md +264 -0
- package/skills/shepherd/references/assess-checklist.md +124 -0
- package/skills/shepherd/references/fix-strategies.md +191 -0
- package/skills/spec-review/SKILL.md +229 -0
- package/skills/spec-review/references/review-checklist.md +60 -0
- package/skills/sync-schemas/SKILL.md +114 -0
- package/skills/sync-schemas/references/configuration.md +73 -0
- package/skills/synthesis/SKILL.md +129 -0
- package/skills/synthesis/references/pr-descriptions.md +87 -0
- package/skills/synthesis/references/synthesis-steps.md +109 -0
- package/skills/synthesis/references/troubleshooting.md +115 -0
- package/skills/validate-all-skills.sh +57 -0
- package/skills/validate-frontmatter.sh +237 -0
- package/skills/workflow-state/SKILL.md +210 -0
- package/skills/workflow-state/references/mcp-tool-reference.md +111 -0
- package/skills/workflow-state/references/phase-transitions.md +141 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Save workflow state and prepare for session handoff
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Checkpoint
|
|
6
|
+
|
|
7
|
+
Save current workflow progress for potential session handoff.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
Use `/exarchos:checkpoint` when:
|
|
12
|
+
- Context is getting heavy (many tool calls, large outputs)
|
|
13
|
+
- Before a long-running operation
|
|
14
|
+
- At natural workflow boundaries
|
|
15
|
+
- Before stepping away from the keyboard
|
|
16
|
+
|
|
17
|
+
## Skill Reference
|
|
18
|
+
|
|
19
|
+
- Workflow state: `@skills/workflow-state/SKILL.md`
|
|
20
|
+
|
|
21
|
+
## Process
|
|
22
|
+
|
|
23
|
+
### Step 1: Identify Active Workflow
|
|
24
|
+
|
|
25
|
+
The SessionStart hook automatically discovers active workflows on session start. If you need to locate the state file manually, check the state directory:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
ls ~/.claude/workflow-state/*.state.json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 2: Ensure State is Current
|
|
32
|
+
|
|
33
|
+
Update state file with latest progress:
|
|
34
|
+
- Current phase
|
|
35
|
+
- Task completion status
|
|
36
|
+
- Worktree locations
|
|
37
|
+
- Any pending items
|
|
38
|
+
|
|
39
|
+
### Step 3: Reconcile State
|
|
40
|
+
|
|
41
|
+
The SessionStart hook automatically verifies state matches git reality on resume. If manual reconciliation is needed, review state file contents against actual worktree and branch state.
|
|
42
|
+
|
|
43
|
+
Fix any discrepancies.
|
|
44
|
+
|
|
45
|
+
### Step 4: Output Checkpoint Summary
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## Checkpoint Saved
|
|
49
|
+
|
|
50
|
+
**Feature:** <feature-id>
|
|
51
|
+
**Phase:** <current-phase>
|
|
52
|
+
**State file:** `~/.claude/workflow-state/<feature>.state.json`
|
|
53
|
+
|
|
54
|
+
### Progress
|
|
55
|
+
- Tasks: X/Y complete
|
|
56
|
+
- Current: <what's in progress>
|
|
57
|
+
- Next: <suggested next action>
|
|
58
|
+
|
|
59
|
+
### Resume Instructions
|
|
60
|
+
|
|
61
|
+
To continue this workflow in a new session:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
/exarchos:resume ~/.claude/workflow-state/<feature>.state.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or start Claude Code fresh and run the resume command.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Auto-Checkpoint Triggers
|
|
71
|
+
|
|
72
|
+
The orchestrator should suggest `/exarchos:checkpoint` when:
|
|
73
|
+
|
|
74
|
+
1. **After `/exarchos:delegate` completes** - All tasks done, before review
|
|
75
|
+
2. **After PR created** - In `/exarchos:synthesize`, before feedback loop
|
|
76
|
+
3. **After 3+ feedback iterations** - Context accumulation risk
|
|
77
|
+
4. **When user mentions context issues** - Proactive save
|
|
78
|
+
|
|
79
|
+
## Output
|
|
80
|
+
|
|
81
|
+
After checkpointing, provide:
|
|
82
|
+
1. Confirmation that state is saved
|
|
83
|
+
2. Summary of current progress
|
|
84
|
+
3. Clear instructions for resuming
|
|
85
|
+
4. The exact `/exarchos:resume` command to use
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Resolve merged workflow to completed state
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Cleanup
|
|
6
|
+
|
|
7
|
+
Resolve merged workflow: "$ARGUMENTS"
|
|
8
|
+
|
|
9
|
+
## Workflow Position
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/exarchos:ideate → [CONFIRM] → /exarchos:plan → /exarchos:delegate → /exarchos:review → /exarchos:synthesize → [CONFIRM] → merge → /exarchos:cleanup
|
|
13
|
+
▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This command is the **post-merge cleanup** entry point. Use after PR stack has merged to resolve workflow state to `completed`.
|
|
17
|
+
|
|
18
|
+
## Skill Reference
|
|
19
|
+
|
|
20
|
+
Follow the cleanup skill: `@skills/cleanup/SKILL.md`
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
- [ ] Workflow exists (any non-terminal phase)
|
|
25
|
+
- [ ] All PRs in the stack are merged
|
|
26
|
+
|
|
27
|
+
## Process
|
|
28
|
+
|
|
29
|
+
### Step 1: Identify Workflow
|
|
30
|
+
|
|
31
|
+
Read workflow state:
|
|
32
|
+
```typescript
|
|
33
|
+
mcp__exarchos__exarchos_workflow({ action: "get", featureId: "<feature-id>" })
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If no `$ARGUMENTS` provided, list active workflows:
|
|
37
|
+
```typescript
|
|
38
|
+
mcp__exarchos__exarchos_view({ action: "pipeline" })
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Step 2: Verify PR Merge Status
|
|
42
|
+
|
|
43
|
+
Query GitHub for merged PRs associated with this workflow:
|
|
44
|
+
```bash
|
|
45
|
+
gh pr view <number> --json state,mergedAt,headRefName,url
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> Or use GitHub MCP `pull_request_read` if available.
|
|
49
|
+
|
|
50
|
+
Collect:
|
|
51
|
+
- `prUrl` — PR URL(s) that were merged
|
|
52
|
+
- `mergedBranches` — branch names that were merged
|
|
53
|
+
|
|
54
|
+
### Step 3: Invoke Cleanup Action
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
mcp__exarchos__exarchos_workflow({
|
|
58
|
+
action: "cleanup",
|
|
59
|
+
featureId: "<feature-id>",
|
|
60
|
+
mergeVerified: true,
|
|
61
|
+
prUrl: "<collected-pr-url>",
|
|
62
|
+
mergedBranches: ["<branch-1>", "<branch-2>"]
|
|
63
|
+
})
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Step 4: Worktree Cleanup
|
|
67
|
+
|
|
68
|
+
Remove worktrees associated with the workflow:
|
|
69
|
+
```bash
|
|
70
|
+
# For each worktree in state
|
|
71
|
+
git worktree remove .worktrees/<worktree-name>
|
|
72
|
+
git worktree prune
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 5: Branch Sync
|
|
76
|
+
|
|
77
|
+
Sync Graphite branches to remove merged ones:
|
|
78
|
+
```bash
|
|
79
|
+
gt sync --force
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Output
|
|
83
|
+
|
|
84
|
+
When complete:
|
|
85
|
+
```markdown
|
|
86
|
+
## Cleanup Complete
|
|
87
|
+
|
|
88
|
+
Feature: <featureId>
|
|
89
|
+
Previous phase: <phase> → completed
|
|
90
|
+
PRs merged: <count>
|
|
91
|
+
Worktrees removed: <count>
|
|
92
|
+
Branches synced: ✓
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Error Handling
|
|
96
|
+
|
|
97
|
+
- **Workflow not found:** "No workflow found for '<featureId>'. Check active workflows with pipeline view."
|
|
98
|
+
- **PRs not merged:** "Cannot cleanup — PR #<number> is not merged. Merge all PRs first or use `/cancel` to abandon."
|
|
99
|
+
- **Already completed:** "Workflow '<featureId>' is already completed. No cleanup needed."
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start debug workflow for bugs and regressions
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Debug
|
|
6
|
+
|
|
7
|
+
Start debug workflow for: "$ARGUMENTS"
|
|
8
|
+
|
|
9
|
+
## Workflow Overview
|
|
10
|
+
|
|
11
|
+
Debug workflows are **investigation-first**: understand the problem before fixing it.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/exarchos:debug → Triage → Investigate → [Fix] → Validate → [CONFIRM] → merge
|
|
15
|
+
│
|
|
16
|
+
┌─────────────┼─────────────┐
|
|
17
|
+
│ │ │
|
|
18
|
+
--hotfix (default) --escalate
|
|
19
|
+
│ │ │
|
|
20
|
+
Fast path Thorough path → /exarchos:ideate
|
|
21
|
+
(15 min) (full RCA)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Single human checkpoint:** Merge confirmation (after fix is validated).
|
|
25
|
+
|
|
26
|
+
## Skill Reference
|
|
27
|
+
|
|
28
|
+
Follow the debug skill: `@skills/debug/SKILL.md`
|
|
29
|
+
|
|
30
|
+
## Command Variants
|
|
31
|
+
|
|
32
|
+
### Default: Thorough Track
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
/debug "Users report cart total is wrong after removing items"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Full investigation with RCA documentation.
|
|
39
|
+
|
|
40
|
+
### Fast Path: Hotfix Track
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
/debug --hotfix "Production login is returning 500 errors"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Time-boxed investigation (15 min), minimal ceremony.
|
|
47
|
+
|
|
48
|
+
### Escalate: Feature Workflow Handoff
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
/debug --escalate "This requires redesigning the auth system"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Hands off to `/exarchos:ideate` with preserved context.
|
|
55
|
+
|
|
56
|
+
### Mid-Workflow: Switch to Thorough
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
/debug --switch-thorough
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Switch from hotfix to thorough track during investigation.
|
|
63
|
+
|
|
64
|
+
## Process
|
|
65
|
+
|
|
66
|
+
### Step 1: Initialize State
|
|
67
|
+
|
|
68
|
+
Initialize workflow state using `mcp__exarchos__exarchos_workflow` with `action: "init"`:
|
|
69
|
+
- Set `featureId` to `debug-<issue-slug>`
|
|
70
|
+
- Set `workflowType` to "debug"
|
|
71
|
+
|
|
72
|
+
Then update the track using `mcp__exarchos__exarchos_workflow` with `action: "set"`:
|
|
73
|
+
- Set `track` to "hotfix" or "thorough" based on triage
|
|
74
|
+
|
|
75
|
+
### Step 2: Triage
|
|
76
|
+
|
|
77
|
+
Gather context using `@skills/debug/references/triage-questions.md`:
|
|
78
|
+
|
|
79
|
+
1. **What is the symptom?**
|
|
80
|
+
2. **Can it be reproduced?**
|
|
81
|
+
3. **What is the impact/urgency?**
|
|
82
|
+
4. **What area of code is likely affected?**
|
|
83
|
+
|
|
84
|
+
Select track based on urgency and complexity.
|
|
85
|
+
|
|
86
|
+
### Step 3: Execute Track
|
|
87
|
+
|
|
88
|
+
**Hotfix Track:**
|
|
89
|
+
- Investigate (15 min max)
|
|
90
|
+
- Implement minimal fix
|
|
91
|
+
- Smoke test
|
|
92
|
+
- Merge checkpoint
|
|
93
|
+
|
|
94
|
+
**Thorough Track:**
|
|
95
|
+
- Investigate (no time limit)
|
|
96
|
+
- Document RCA
|
|
97
|
+
- Design fix approach
|
|
98
|
+
- Implement with TDD
|
|
99
|
+
- Spec review
|
|
100
|
+
- Create PR
|
|
101
|
+
- Merge checkpoint
|
|
102
|
+
|
|
103
|
+
## Arguments
|
|
104
|
+
|
|
105
|
+
| Argument | Effect |
|
|
106
|
+
|----------|--------|
|
|
107
|
+
| `<description>` | Bug description for triage context |
|
|
108
|
+
| `--hotfix` | Select hotfix track (P0 urgency) |
|
|
109
|
+
| `--escalate` | Hand off to /exarchos:ideate workflow |
|
|
110
|
+
| `--switch-thorough` | Switch from hotfix to thorough mid-workflow |
|
|
111
|
+
|
|
112
|
+
## State Management
|
|
113
|
+
|
|
114
|
+
Debug workflows use extended state schema. See `@skills/debug/references/state-schema.md`.
|
|
115
|
+
|
|
116
|
+
Key fields:
|
|
117
|
+
- `workflowType: "debug"`
|
|
118
|
+
- `track: "hotfix" | "thorough"`
|
|
119
|
+
- `urgency: { level, justification }`
|
|
120
|
+
- `triage: { symptom, reproduction, affectedArea, impact }`
|
|
121
|
+
- `investigation: { rootCause, findings }`
|
|
122
|
+
|
|
123
|
+
## Auto-Chain Behavior
|
|
124
|
+
|
|
125
|
+
Debug workflows auto-chain through phases with ONE human checkpoint.
|
|
126
|
+
|
|
127
|
+
**Both tracks:**
|
|
128
|
+
```
|
|
129
|
+
[all phases auto-chain] → merge confirmation (HUMAN)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Resume Support
|
|
133
|
+
|
|
134
|
+
Debug workflows resume like feature workflows:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
/exarchos:resume ~/.claude/workflow-state/debug-<issue-slug>.state.json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Related
|
|
141
|
+
|
|
142
|
+
- RCA template: `@skills/debug/references/rca-template.md`
|
|
143
|
+
- Triage questions: `@skills/debug/references/triage-questions.md`
|
|
144
|
+
- Investigation checklist: `@skills/debug/references/investigation-checklist.md`
|
|
145
|
+
- State schema: `@skills/debug/references/state-schema.md`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Dispatch tasks to Claude Code subagents
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Delegate
|
|
6
|
+
|
|
7
|
+
Delegate tasks for: "$ARGUMENTS"
|
|
8
|
+
|
|
9
|
+
## Workflow Position
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/exarchos:ideate → [CONFIRM] → /exarchos:plan → /exarchos:delegate → /exarchos:review → /exarchos:synthesize → [CONFIRM] → merge
|
|
13
|
+
▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ │
|
|
14
|
+
│ │
|
|
15
|
+
ON FAIL ──────┤ │
|
|
16
|
+
--pr-fixes ───┴────────────────────────────────────┘
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Auto-invokes `/exarchos:review` after tasks complete (or `/exarchos:synthesize` for `--pr-fixes` mode).
|
|
20
|
+
|
|
21
|
+
## Invocation Modes
|
|
22
|
+
|
|
23
|
+
| Flag | Source | Use Case |
|
|
24
|
+
|------|--------|----------|
|
|
25
|
+
| (none) | Implementation plan | Initial task delegation |
|
|
26
|
+
| `--fixes` | Review issues | Address spec/quality failures |
|
|
27
|
+
| `--pr-fixes` | PR comments | Address human review feedback |
|
|
28
|
+
|
|
29
|
+
## Skill References
|
|
30
|
+
|
|
31
|
+
Follow the delegation skill for full process details: `@skills/delegation/SKILL.md`
|
|
32
|
+
|
|
33
|
+
Supporting references:
|
|
34
|
+
- Git worktrees: `@skills/git-worktrees/SKILL.md`
|
|
35
|
+
- Implementer template: `@skills/delegation/references/implementer-prompt.md`
|
|
36
|
+
- Fixer template: `@skills/delegation/references/fixer-prompt.md`
|
|
37
|
+
- Fix mode: `@skills/delegation/references/fix-mode.md`
|
|
38
|
+
- PR fixes mode: `@skills/delegation/references/pr-fixes-mode.md`
|
|
39
|
+
- Parallel strategy: `@skills/delegation/references/parallel-strategy.md`
|
|
40
|
+
|
|
41
|
+
## Idempotency
|
|
42
|
+
|
|
43
|
+
Before delegating, check task status:
|
|
44
|
+
1. Read tasks from state file
|
|
45
|
+
2. Skip tasks where `status == "complete"`
|
|
46
|
+
3. Only dispatch pending/failed tasks
|
|
47
|
+
4. If all tasks already complete, skip to auto-chain
|
|
48
|
+
|
|
49
|
+
## Auto-Chain
|
|
50
|
+
|
|
51
|
+
After all delegated tasks complete, **auto-continue immediately** (no user confirmation needed).
|
|
52
|
+
|
|
53
|
+
- **Normal / --fixes mode:** Set phase to "review", invoke `Skill({ skill: "exarchos:review", args: "$STATE_FILE" })`
|
|
54
|
+
- **--pr-fixes mode:** Set phase to "synthesize", invoke `Skill({ skill: "exarchos:synthesize", args: "$PR_URL" })`
|
|
55
|
+
|
|
56
|
+
This is NOT a human checkpoint. State is saved automatically for recovery after context compaction.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start collaborative design exploration for a feature or problem
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Ideate
|
|
6
|
+
|
|
7
|
+
Begin brainstorming session for: "$ARGUMENTS"
|
|
8
|
+
|
|
9
|
+
## Workflow Overview
|
|
10
|
+
|
|
11
|
+
This command is the **entry point** of the development workflow:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/exarchos:ideate → /exarchos:plan → [CONFIRM] → /exarchos:delegate → /exarchos:review → /exarchos:synthesize → [CONFIRM] → merge
|
|
15
|
+
▲▲▲▲▲▲▲▲▲▲▲▲▲▲ (auto) ↑ (auto) (auto) (auto) │
|
|
16
|
+
│ ▲ │
|
|
17
|
+
│ ON FAIL ──────────┤ │
|
|
18
|
+
│ --pr-fixes ───────┴─────────────────────────┘
|
|
19
|
+
└──────────── ON BLOCKED ───────────────────────┘
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Confirmation points:**
|
|
23
|
+
- After `/exarchos:plan` (plan-review): User confirms implementation plan before delegation begins
|
|
24
|
+
- After `/exarchos:synthesize`: User confirms before PR is merged (or requests feedback fixes)
|
|
25
|
+
|
|
26
|
+
## Skill Reference
|
|
27
|
+
|
|
28
|
+
Follow the brainstorming skill: `@skills/brainstorming/SKILL.md`
|
|
29
|
+
|
|
30
|
+
## Process
|
|
31
|
+
|
|
32
|
+
### Phase 1: Understanding
|
|
33
|
+
Ask clarifying questions (one at a time):
|
|
34
|
+
1. What problem are we solving?
|
|
35
|
+
2. What constraints exist?
|
|
36
|
+
3. What patterns already exist in the codebase?
|
|
37
|
+
4. Who/what will consume this?
|
|
38
|
+
5. What does success look like?
|
|
39
|
+
|
|
40
|
+
### Phase 2: Exploration
|
|
41
|
+
Present 2-3 distinct approaches with:
|
|
42
|
+
- Approach description
|
|
43
|
+
- Pros and cons
|
|
44
|
+
- Best use case
|
|
45
|
+
- Recommendation with rationale
|
|
46
|
+
|
|
47
|
+
### Phase 3: Design Presentation
|
|
48
|
+
After user selects approach:
|
|
49
|
+
- Write detailed design (200-300 word sections)
|
|
50
|
+
- Include diagrams if helpful
|
|
51
|
+
- Save to `docs/designs/YYYY-MM-DD-<feature>.md`
|
|
52
|
+
|
|
53
|
+
## State Management
|
|
54
|
+
|
|
55
|
+
Initialize workflow state at the start using `mcp__exarchos__exarchos_workflow` with `action: "init"` and the featureId.
|
|
56
|
+
|
|
57
|
+
After saving design, update state using `mcp__exarchos__exarchos_workflow` with `action: "set"`:
|
|
58
|
+
- Set `artifacts.design` to the design path
|
|
59
|
+
- Set `phase` to "plan"
|
|
60
|
+
|
|
61
|
+
## Output
|
|
62
|
+
|
|
63
|
+
Save design to `docs/designs/YYYY-MM-DD-<feature>.md` and capture the path as `$DESIGN_PATH`.
|
|
64
|
+
|
|
65
|
+
## Auto-Chain
|
|
66
|
+
|
|
67
|
+
After saving the design document, **auto-continue to planning** (no user confirmation here):
|
|
68
|
+
|
|
69
|
+
1. Update state with design path and phase using `mcp__exarchos__exarchos_workflow` with `action: "set"`:
|
|
70
|
+
- Set `artifacts.design` to the design document path
|
|
71
|
+
- Set `phase` to "plan"
|
|
72
|
+
|
|
73
|
+
2. Output: "Design saved. Auto-continuing to implementation planning..."
|
|
74
|
+
|
|
75
|
+
3. Invoke immediately:
|
|
76
|
+
```typescript
|
|
77
|
+
Skill({ skill: "exarchos:plan", args: "$DESIGN_PATH" })
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This is NOT a human checkpoint. The human checkpoint occurs after plan review (plan-design delta analysis), before delegation.
|
|
81
|
+
|
|
82
|
+
**Workflow continues:** `/exarchos:ideate` → `/exarchos:plan` → plan-review → [HUMAN CHECKPOINT] → `/exarchos:delegate`
|
package/commands/plan.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create TDD implementation plan from design document
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Plan
|
|
6
|
+
|
|
7
|
+
Create implementation plan for: "$ARGUMENTS"
|
|
8
|
+
|
|
9
|
+
## Workflow Position
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
/exarchos:ideate → /exarchos:plan → [CONFIRM] → /exarchos:delegate → /exarchos:review → /exarchos:synthesize → [CONFIRM] → merge
|
|
13
|
+
▲▲▲▲▲▲▲▲▲▲▲▲▲▲ ↑
|
|
14
|
+
plan-review
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
After plan is saved, runs plan-review (delta analysis). User confirms at plan-review checkpoint before delegation.
|
|
18
|
+
|
|
19
|
+
## Skill Reference
|
|
20
|
+
|
|
21
|
+
Follow the implementation-planning skill: `@skills/implementation-planning/SKILL.md`
|
|
22
|
+
|
|
23
|
+
## Iron Law
|
|
24
|
+
|
|
25
|
+
> **NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST**
|
|
26
|
+
|
|
27
|
+
## Process
|
|
28
|
+
|
|
29
|
+
### Step 1: Analyze Design
|
|
30
|
+
Read the design document and identify:
|
|
31
|
+
- Core behaviors to implement
|
|
32
|
+
- Data structures needed
|
|
33
|
+
- API endpoints/interfaces
|
|
34
|
+
- Integration points
|
|
35
|
+
- Edge cases
|
|
36
|
+
|
|
37
|
+
### Step 2: Decompose into Tasks
|
|
38
|
+
Create tasks with:
|
|
39
|
+
- 2-5 minute granularity
|
|
40
|
+
- [RED], [GREEN], [REFACTOR] phases
|
|
41
|
+
- Test file paths
|
|
42
|
+
- Expected test names (Method_Scenario_Outcome)
|
|
43
|
+
- Dependencies
|
|
44
|
+
|
|
45
|
+
### Step 3: Identify Parallelization
|
|
46
|
+
Group tasks into:
|
|
47
|
+
- Sequential chains (dependencies)
|
|
48
|
+
- Parallel-safe groups (can run in worktrees)
|
|
49
|
+
|
|
50
|
+
### Step 4: Save Plan
|
|
51
|
+
Write to `docs/plans/YYYY-MM-DD-<feature>.md`
|
|
52
|
+
|
|
53
|
+
## Task Format
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
### Task [N]: [Description]
|
|
57
|
+
**Phase:** RED → GREEN → REFACTOR
|
|
58
|
+
|
|
59
|
+
1. [RED] Write test: `TestName_Scenario_Outcome`
|
|
60
|
+
- File: `path/to/test.ts`
|
|
61
|
+
- Expected failure: [reason]
|
|
62
|
+
|
|
63
|
+
2. [GREEN] Implement minimum code
|
|
64
|
+
- File: `path/to/impl.ts`
|
|
65
|
+
|
|
66
|
+
3. [REFACTOR] Clean up if needed
|
|
67
|
+
|
|
68
|
+
**Dependencies:** [Task IDs or None]
|
|
69
|
+
**Parallelizable:** [Yes/No]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## State Management
|
|
73
|
+
|
|
74
|
+
After saving plan, update state with tasks using `mcp__exarchos__exarchos_workflow` with `action: "set"`:
|
|
75
|
+
- Set `artifacts.plan` to the plan path
|
|
76
|
+
- Set `tasks` to an array of task objects (id, title, status, branch)
|
|
77
|
+
- Set `phase` to "plan-review"
|
|
78
|
+
|
|
79
|
+
## Output
|
|
80
|
+
|
|
81
|
+
Save plan to `docs/plans/YYYY-MM-DD-<feature>.md` and capture the path as `$PLAN_PATH`.
|
|
82
|
+
|
|
83
|
+
## Idempotency
|
|
84
|
+
|
|
85
|
+
Before planning, check if plan already exists:
|
|
86
|
+
1. Read state file for `.artifacts.plan`
|
|
87
|
+
2. If plan file exists and is valid, skip planning
|
|
88
|
+
3. Auto-chain directly to delegate
|
|
89
|
+
|
|
90
|
+
## Auto-Chain
|
|
91
|
+
|
|
92
|
+
After saving the implementation plan, **auto-continue to plan-review**:
|
|
93
|
+
|
|
94
|
+
1. Update state: `.phase = "plan-review"`
|
|
95
|
+
2. Output: "Plan saved to `$PLAN_PATH` with [N] tasks. Running plan-design coverage analysis..."
|
|
96
|
+
3. Run plan-review (delta analysis):
|
|
97
|
+
- Re-read design document
|
|
98
|
+
- Compare each design section against planned tasks
|
|
99
|
+
- Generate coverage report with any gaps identified
|
|
100
|
+
- Present to user with recommendation
|
|
101
|
+
|
|
102
|
+
## Plan Review: Auto-Loop on Gaps
|
|
103
|
+
|
|
104
|
+
Plan-review performs delta analysis and **auto-loops** back to `/exarchos:plan` if gaps are found (similar to `/exarchos:review` → `/exarchos:delegate --fixes`):
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
/exarchos:plan → plan-review → [gaps?] → /exarchos:plan --revise (auto-loop)
|
|
108
|
+
↓
|
|
109
|
+
[no gaps]
|
|
110
|
+
↓
|
|
111
|
+
[HUMAN: approve?] ← checkpoint
|
|
112
|
+
↓
|
|
113
|
+
/exarchos:delegate
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### On Gaps Found (Auto-Loop)
|
|
117
|
+
|
|
118
|
+
If plan-review finds missing coverage:
|
|
119
|
+
|
|
120
|
+
1. Update state with gaps using `mcp__exarchos__exarchos_workflow` with `action: "set"`:
|
|
121
|
+
- Set `planReview.gapsFound` to true
|
|
122
|
+
- Set `planReview.gaps` to an array of gap descriptions
|
|
123
|
+
|
|
124
|
+
2. Auto-invoke:
|
|
125
|
+
```typescript
|
|
126
|
+
Skill({ skill: "exarchos:plan", args: "--revise $DESIGN_PATH" })
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The `--revise` flag provides gap context for targeted plan updates.
|
|
130
|
+
|
|
131
|
+
### On No Gaps (Human Checkpoint)
|
|
132
|
+
|
|
133
|
+
If plan-review finds complete coverage:
|
|
134
|
+
|
|
135
|
+
1. Display coverage report showing:
|
|
136
|
+
- Design sections covered by tasks
|
|
137
|
+
- Confirmation that all requirements are planned
|
|
138
|
+
|
|
139
|
+
2. **PAUSE for user input**: "Plan covers all design requirements. Approve and continue to delegation? (yes/no)"
|
|
140
|
+
|
|
141
|
+
3. **On approval**, use `mcp__exarchos__exarchos_workflow` with `action: "set"`:
|
|
142
|
+
- Set `planReview.approved` to true
|
|
143
|
+
- Set `phase` to "delegate"
|
|
144
|
+
|
|
145
|
+
Then invoke:
|
|
146
|
+
```typescript
|
|
147
|
+
Skill({ skill: "exarchos:delegate", args: "$PLAN_PATH" })
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
From here, workflow runs autonomously until PR merge confirmation.
|