@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,294 @@
|
|
|
1
|
+
# Debug Workflow State Schema
|
|
2
|
+
|
|
3
|
+
Extended schema for debug workflow state files.
|
|
4
|
+
|
|
5
|
+
## Base Schema
|
|
6
|
+
|
|
7
|
+
Debug workflows extend the standard workflow state with additional fields.
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"version": "1.1",
|
|
12
|
+
"featureId": "debug-<issue-slug>",
|
|
13
|
+
"workflowType": "debug",
|
|
14
|
+
"createdAt": "ISO8601",
|
|
15
|
+
"updatedAt": "ISO8601",
|
|
16
|
+
"track": "hotfix | thorough",
|
|
17
|
+
"phase": "triage | investigate | rca | design | debug-implement | debug-validate | debug-review | hotfix-implement | hotfix-validate | synthesize | completed | cancelled | blocked",
|
|
18
|
+
|
|
19
|
+
"urgency": {
|
|
20
|
+
"level": "P0 | P1 | P2",
|
|
21
|
+
"justification": "string"
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"triage": {
|
|
25
|
+
"symptom": "string",
|
|
26
|
+
"reproduction": "string | null",
|
|
27
|
+
"affectedArea": "string",
|
|
28
|
+
"impact": "string"
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
"investigation": {
|
|
32
|
+
"startedAt": "ISO8601 | null",
|
|
33
|
+
"completedAt": "ISO8601 | null",
|
|
34
|
+
"rootCause": "string | null",
|
|
35
|
+
"findings": ["string"]
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
"artifacts": {
|
|
39
|
+
"rca": "string | null",
|
|
40
|
+
"fixDesign": "string | null",
|
|
41
|
+
"pr": "string | null"
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
"followUp": {
|
|
45
|
+
"rcaRequired": "boolean",
|
|
46
|
+
"issueUrl": "string | null"
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
"tasks": [],
|
|
50
|
+
"worktrees": {},
|
|
51
|
+
"reviews": {},
|
|
52
|
+
"synthesis": {
|
|
53
|
+
"integrationBranch": "string | null",
|
|
54
|
+
"mergeOrder": [],
|
|
55
|
+
"mergedBranches": [],
|
|
56
|
+
"prUrl": "string | null",
|
|
57
|
+
"prFeedback": []
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Field Definitions
|
|
63
|
+
|
|
64
|
+
### Top-Level Fields
|
|
65
|
+
|
|
66
|
+
| Field | Type | Description |
|
|
67
|
+
|-------|------|-------------|
|
|
68
|
+
| `version` | string | Schema version, currently "1.1" |
|
|
69
|
+
| `featureId` | string | Unique identifier, format: `debug-<issue-slug>` |
|
|
70
|
+
| `workflowType` | string | Always "debug" for debug workflows |
|
|
71
|
+
| `createdAt` | ISO8601 | When workflow was created |
|
|
72
|
+
| `updatedAt` | ISO8601 | Last modification timestamp |
|
|
73
|
+
| `track` | enum | "hotfix" or "thorough" |
|
|
74
|
+
| `phase` | enum | Current workflow phase |
|
|
75
|
+
|
|
76
|
+
### Phase Values
|
|
77
|
+
|
|
78
|
+
| Track | Valid Phases |
|
|
79
|
+
|----------|-----------------------------------------------------------------------------------------|
|
|
80
|
+
| Hotfix | triage → investigate → hotfix-implement → hotfix-validate → completed |
|
|
81
|
+
| Thorough | triage → investigate → rca → design → debug-implement → debug-validate → debug-review → synthesize → completed |
|
|
82
|
+
|
|
83
|
+
Note: Thorough track may skip `rca` and `design` phases if root cause is straightforward.
|
|
84
|
+
|
|
85
|
+
### Urgency Object
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"urgency": {
|
|
90
|
+
"level": "P0",
|
|
91
|
+
"justification": "Production login broken, 100% of users affected"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
| Field | Type | Description |
|
|
97
|
+
|-------|------|-------------|
|
|
98
|
+
| `level` | enum | P0 (critical), P1 (high), P2 (normal) |
|
|
99
|
+
| `justification` | string | Why this urgency level was selected |
|
|
100
|
+
|
|
101
|
+
### Triage Object
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"triage": {
|
|
106
|
+
"symptom": "Login returns 500 error",
|
|
107
|
+
"reproduction": "Click login button with valid credentials",
|
|
108
|
+
"affectedArea": "src/auth/login.ts",
|
|
109
|
+
"impact": "All users cannot log in"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
| Field | Type | Description |
|
|
115
|
+
|-------|------|-------------|
|
|
116
|
+
| `symptom` | string | Observable problem description |
|
|
117
|
+
| `reproduction` | string\|null | Steps to reproduce, null if unknown |
|
|
118
|
+
| `affectedArea` | string | Suspected code area or component |
|
|
119
|
+
| `impact` | string | Business/user impact description |
|
|
120
|
+
|
|
121
|
+
### Investigation Object
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"investigation": {
|
|
126
|
+
"startedAt": "2026-01-27T10:00:00Z",
|
|
127
|
+
"completedAt": "2026-01-27T10:15:00Z",
|
|
128
|
+
"rootCause": "Session cookie SameSite attribute mismatch",
|
|
129
|
+
"findings": [
|
|
130
|
+
"Error occurs in handleLogin function",
|
|
131
|
+
"Session object is null when it shouldn't be",
|
|
132
|
+
"Cookie not being set due to browser security policy"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
| Field | Type | Description |
|
|
139
|
+
|-------|------|-------------|
|
|
140
|
+
| `startedAt` | ISO8601\|null | When investigation began |
|
|
141
|
+
| `completedAt` | ISO8601\|null | When root cause was found |
|
|
142
|
+
| `rootCause` | string\|null | Final root cause determination |
|
|
143
|
+
| `findings` | string[] | Progressive findings during investigation |
|
|
144
|
+
|
|
145
|
+
### Artifacts Object
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"artifacts": {
|
|
150
|
+
"rca": "docs/rca/2026-01-27-login-500-error.md",
|
|
151
|
+
"fixDesign": "Set SameSite=None on session cookie, add Secure flag",
|
|
152
|
+
"pr": "https://github.com/org/repo/pull/123"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
| Field | Type | Description |
|
|
158
|
+
|-------|------|-------------|
|
|
159
|
+
| `rca` | string\|null | Path to RCA document (thorough track only) |
|
|
160
|
+
| `fixDesign` | string\|null | Brief fix description (in state, not separate doc) |
|
|
161
|
+
| `pr` | string\|null | Pull request URL |
|
|
162
|
+
|
|
163
|
+
### Follow-Up Object
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"followUp": {
|
|
168
|
+
"rcaRequired": true,
|
|
169
|
+
"issueUrl": "https://github.com/org/repo/issues/456"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
| Field | Type | Description |
|
|
175
|
+
|-------|------|-------------|
|
|
176
|
+
| `rcaRequired` | boolean | True if hotfix shipped without full RCA |
|
|
177
|
+
| `issueUrl` | string\|null | Link to follow-up issue for RCA |
|
|
178
|
+
|
|
179
|
+
## State Transitions
|
|
180
|
+
|
|
181
|
+
### Hotfix Track
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
triage → investigate → hotfix-implement → hotfix-validate → completed
|
|
185
|
+
│ │ │ │ │
|
|
186
|
+
│ │ │ │ └─ Human checkpoint: merge
|
|
187
|
+
│ │ │ └─ Run smoke tests
|
|
188
|
+
│ │ └─ Apply minimal fix
|
|
189
|
+
│ └─ Find root cause (15 min max)
|
|
190
|
+
└─ Gather context, select track
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Thorough Track
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
triage → investigate → rca → design → debug-implement → debug-validate → debug-review → synthesize → completed
|
|
197
|
+
│ │ │ │ │ │ │ │ │
|
|
198
|
+
│ │ │ │ │ │ │ │ └─ Merge
|
|
199
|
+
│ │ │ │ │ │ │ └─ Create PR
|
|
200
|
+
│ │ │ │ │ │ └─ Spec review
|
|
201
|
+
│ │ │ │ │ └─ Run validation
|
|
202
|
+
│ │ │ │ └─ TDD implementation
|
|
203
|
+
│ │ │ └─ Brief fix approach
|
|
204
|
+
│ │ └─ Full RCA document
|
|
205
|
+
│ └─ Systematic investigation
|
|
206
|
+
└─ Gather context, select track
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Example State Files
|
|
210
|
+
|
|
211
|
+
### Hotfix In Progress
|
|
212
|
+
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"version": "1.1",
|
|
216
|
+
"featureId": "debug-login-500",
|
|
217
|
+
"workflowType": "debug",
|
|
218
|
+
"createdAt": "2026-01-27T10:00:00Z",
|
|
219
|
+
"updatedAt": "2026-01-27T10:12:00Z",
|
|
220
|
+
"track": "hotfix",
|
|
221
|
+
"phase": "hotfix-implement",
|
|
222
|
+
"urgency": {
|
|
223
|
+
"level": "P0",
|
|
224
|
+
"justification": "Production login broken"
|
|
225
|
+
},
|
|
226
|
+
"triage": {
|
|
227
|
+
"symptom": "Login returns 500",
|
|
228
|
+
"reproduction": "Click login with valid creds",
|
|
229
|
+
"affectedArea": "src/auth/login.ts",
|
|
230
|
+
"impact": "All users blocked"
|
|
231
|
+
},
|
|
232
|
+
"investigation": {
|
|
233
|
+
"startedAt": "2026-01-27T10:02:00Z",
|
|
234
|
+
"completedAt": "2026-01-27T10:10:00Z",
|
|
235
|
+
"rootCause": "Missing null check on session",
|
|
236
|
+
"findings": [
|
|
237
|
+
"Error in handleLogin line 42",
|
|
238
|
+
"Session is null when user has no prior session"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"artifacts": {
|
|
242
|
+
"rca": null,
|
|
243
|
+
"fixDesign": "Add null check before accessing session properties",
|
|
244
|
+
"pr": null
|
|
245
|
+
},
|
|
246
|
+
"followUp": {
|
|
247
|
+
"rcaRequired": true,
|
|
248
|
+
"issueUrl": null
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Thorough Completed
|
|
254
|
+
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"version": "1.1",
|
|
258
|
+
"featureId": "debug-cart-total-wrong",
|
|
259
|
+
"workflowType": "debug",
|
|
260
|
+
"createdAt": "2026-01-26T14:00:00Z",
|
|
261
|
+
"updatedAt": "2026-01-27T09:00:00Z",
|
|
262
|
+
"track": "thorough",
|
|
263
|
+
"phase": "completed",
|
|
264
|
+
"urgency": {
|
|
265
|
+
"level": "P2",
|
|
266
|
+
"justification": "Cart shows wrong total, workaround is refresh"
|
|
267
|
+
},
|
|
268
|
+
"triage": {
|
|
269
|
+
"symptom": "Cart total doesn't update after removing item",
|
|
270
|
+
"reproduction": "Add 2 items, remove 1, total shows both",
|
|
271
|
+
"affectedArea": "src/cart/CartTotal.tsx",
|
|
272
|
+
"impact": "Users confused, may abandon checkout"
|
|
273
|
+
},
|
|
274
|
+
"investigation": {
|
|
275
|
+
"startedAt": "2026-01-26T14:05:00Z",
|
|
276
|
+
"completedAt": "2026-01-26T15:30:00Z",
|
|
277
|
+
"rootCause": "React state not updating due to stale closure in useEffect",
|
|
278
|
+
"findings": [
|
|
279
|
+
"Total computed in useEffect",
|
|
280
|
+
"Effect has stale items reference",
|
|
281
|
+
"Missing items in dependency array"
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
"artifacts": {
|
|
285
|
+
"rca": "docs/rca/2026-01-26-cart-total-wrong.md",
|
|
286
|
+
"fixDesign": "Add items to useEffect deps, use useMemo for total",
|
|
287
|
+
"pr": "https://github.com/org/repo/pull/789"
|
|
288
|
+
},
|
|
289
|
+
"followUp": {
|
|
290
|
+
"rcaRequired": false,
|
|
291
|
+
"issueUrl": null
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
```
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thorough-track
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Thorough Track
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Fix bugs with proper rigor. Capture institutional knowledge through RCA.
|
|
10
|
+
|
|
11
|
+
## Phases
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Triage -> Investigate -> RCA -> Design -> Implement -> Review -> Synthesize -> Completed
|
|
15
|
+
| | | | | | | |
|
|
16
|
+
| | | | | | | +- Merge
|
|
17
|
+
| | | | | | +- Create PR
|
|
18
|
+
| | | | | +- Spec review only
|
|
19
|
+
| | | | +- TDD in worktree
|
|
20
|
+
| | | +- Brief fix approach
|
|
21
|
+
| | +- Full RCA document
|
|
22
|
+
| +- Systematic investigation
|
|
23
|
+
+- Capture symptom, select track
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Phase Details
|
|
27
|
+
|
|
28
|
+
### 1. Triage Phase
|
|
29
|
+
|
|
30
|
+
Same as hotfix, but set track to "thorough":
|
|
31
|
+
|
|
32
|
+
**Set track and advance to investigate:**
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
action: "set", featureId: "debug-<issue-slug>", updates: {
|
|
36
|
+
"track": "thorough"
|
|
37
|
+
}, phase: "investigate"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Investigate Phase
|
|
41
|
+
|
|
42
|
+
Use `@skills/debug/references/investigation-checklist.md`.
|
|
43
|
+
|
|
44
|
+
No time limit. Be thorough:
|
|
45
|
+
- Use Task tool with Explore agent for complex investigation
|
|
46
|
+
- Document all findings
|
|
47
|
+
- Understand the full picture before proposing fix
|
|
48
|
+
|
|
49
|
+
### 3. RCA Phase
|
|
50
|
+
|
|
51
|
+
Create RCA document using `@skills/debug/references/rca-template.md`.
|
|
52
|
+
|
|
53
|
+
Save to: `docs/rca/YYYY-MM-DD-<issue-slug>.md`
|
|
54
|
+
|
|
55
|
+
Update state:
|
|
56
|
+
|
|
57
|
+
**Record RCA artifact and advance to design:**
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
action: "set", featureId: "debug-<issue-slug>", updates: {
|
|
61
|
+
"artifacts.rca": "docs/rca/YYYY-MM-DD-<issue-slug>.md"
|
|
62
|
+
}, phase: "design"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 4. Design Phase
|
|
66
|
+
|
|
67
|
+
Brief fix approach (NOT a full design document).
|
|
68
|
+
|
|
69
|
+
2-3 paragraphs max in state file:
|
|
70
|
+
|
|
71
|
+
**Record fix design and advance to implement:**
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
action: "set", featureId: "debug-<issue-slug>", updates: {
|
|
75
|
+
"artifacts.fixDesign": "<fix approach description>"
|
|
76
|
+
}, phase: "implement"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 5. Implement Phase
|
|
80
|
+
|
|
81
|
+
Create worktree and implement with TDD:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Create worktree
|
|
85
|
+
git branch feature/debug-<issue-slug> main
|
|
86
|
+
git worktree add .worktrees/debug-<issue-slug> feature/debug-<issue-slug>
|
|
87
|
+
cd .worktrees/debug-<issue-slug> && npm install
|
|
88
|
+
|
|
89
|
+
# TDD: Write failing test first, then implement
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Update state:
|
|
93
|
+
|
|
94
|
+
**Record worktree and advance to review:**
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
action: "set", featureId: "debug-<issue-slug>", updates: {
|
|
98
|
+
"worktrees.\".worktrees/debug-<issue-slug>\"": {
|
|
99
|
+
"branch": "feature/debug-<issue-slug>",
|
|
100
|
+
"status": "active"
|
|
101
|
+
}
|
|
102
|
+
}, phase: "review"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 6. Review Phase
|
|
106
|
+
|
|
107
|
+
Spec review only (not quality review - this is a fix, not new feature).
|
|
108
|
+
|
|
109
|
+
Run the debug review gate to verify test coverage for the bug fix:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
scripts/debug-review-gate.sh --repo-root <path> --base-branch <branch>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**On exit 0:** Review passed -- tests added and passing.
|
|
116
|
+
**On exit 1:** Gaps found -- missing tests or regressions.
|
|
117
|
+
|
|
118
|
+
Additionally verify:
|
|
119
|
+
- [ ] Fix matches RCA root cause
|
|
120
|
+
- [ ] Fix matches design approach
|
|
121
|
+
|
|
122
|
+
Update state:
|
|
123
|
+
|
|
124
|
+
**Advance to synthesize:**
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
action: "set", featureId: "debug-<issue-slug>", phase: "synthesize"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 7. Synthesize Phase
|
|
131
|
+
|
|
132
|
+
Create PR via Graphite MCP:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
# Stage and create branch with fix commit
|
|
136
|
+
mcp__graphite__run_gt_cmd({ args: ["create", "-m", "fix: <issue summary>"], cwd: "<repo-root>" })
|
|
137
|
+
|
|
138
|
+
# Submit to create the PR
|
|
139
|
+
mcp__graphite__run_gt_cmd({ args: ["submit", "--no-interactive", "--publish", "--merge-when-ready"], cwd: "<repo-root>" })
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Then update the PR description:
|
|
143
|
+
```bash
|
|
144
|
+
gh pr edit <number> --body "## Summary
|
|
145
|
+
[Brief description]
|
|
146
|
+
|
|
147
|
+
## Root Cause Analysis
|
|
148
|
+
See: docs/rca/YYYY-MM-DD-<issue-slug>.md
|
|
149
|
+
|
|
150
|
+
## Changes
|
|
151
|
+
- [change 1]
|
|
152
|
+
|
|
153
|
+
## Test Plan
|
|
154
|
+
- [test approach]"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
> Or use GitHub MCP `update_pull_request` if available.
|
|
158
|
+
|
|
159
|
+
**Human checkpoint:** Confirm merge.
|
|
160
|
+
|
|
161
|
+
## Track Switching
|
|
162
|
+
|
|
163
|
+
### Hotfix -> Thorough
|
|
164
|
+
|
|
165
|
+
When `scripts/investigation-timer.sh` exits with code 1 (budget exceeded), switch to thorough track:
|
|
166
|
+
|
|
167
|
+
**Switch to thorough track:**
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
action: "set", featureId: "debug-<issue-slug>", updates: {
|
|
171
|
+
"track": "thorough",
|
|
172
|
+
"investigation.findings": ["Switched to thorough track: root cause not found in 15 min"]
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Continue investigation without time constraint.
|
|
177
|
+
|
|
178
|
+
### Thorough -> Escalate
|
|
179
|
+
|
|
180
|
+
If fix requires architectural changes:
|
|
181
|
+
|
|
182
|
+
**Escalate to blocked:**
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
action: "set", featureId: "debug-<issue-slug>", updates: {
|
|
186
|
+
"investigation.findings": ["Escalated: requires architectural changes"]
|
|
187
|
+
}, phase: "blocked"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Output to user:
|
|
191
|
+
> This issue requires architectural changes that exceed bug fix scope.
|
|
192
|
+
> Recommend running `/exarchos:ideate` to design the solution properly.
|
|
193
|
+
>
|
|
194
|
+
> Context preserved in: `<state-file>`
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Triage Questions
|
|
2
|
+
|
|
3
|
+
Use these questions during the triage phase to gather context and select the appropriate track.
|
|
4
|
+
|
|
5
|
+
## Core Questions
|
|
6
|
+
|
|
7
|
+
### 1. What is the symptom?
|
|
8
|
+
|
|
9
|
+
Capture the observable problem:
|
|
10
|
+
- Error messages (exact text)
|
|
11
|
+
- Unexpected behavior
|
|
12
|
+
- Performance degradation
|
|
13
|
+
- Data corruption/loss
|
|
14
|
+
|
|
15
|
+
**Prompts:**
|
|
16
|
+
- "What error message do you see?"
|
|
17
|
+
- "What behavior are you observing?"
|
|
18
|
+
- "What did you expect to happen instead?"
|
|
19
|
+
|
|
20
|
+
### 2. Can it be reproduced?
|
|
21
|
+
|
|
22
|
+
Determine reproducibility:
|
|
23
|
+
- **Always** - Happens every time
|
|
24
|
+
- **Sometimes** - Intermittent, conditions unclear
|
|
25
|
+
- **Rarely** - Happened once, hard to trigger
|
|
26
|
+
- **Unknown** - Haven't tried yet
|
|
27
|
+
|
|
28
|
+
**Prompts:**
|
|
29
|
+
- "Can you trigger this consistently?"
|
|
30
|
+
- "What steps reproduce the issue?"
|
|
31
|
+
- "Does it happen in all environments?"
|
|
32
|
+
|
|
33
|
+
### 3. What is the impact/urgency?
|
|
34
|
+
|
|
35
|
+
Assess business impact to determine urgency level:
|
|
36
|
+
|
|
37
|
+
| Level | Criteria | Examples |
|
|
38
|
+
|-------|----------|----------|
|
|
39
|
+
| **P0** | Production down, revenue impact, data loss | Site unreachable, payments failing, user data corrupted |
|
|
40
|
+
| **P1** | Major feature broken, significant user impact | Login fails for subset, core workflow blocked |
|
|
41
|
+
| **P2** | Minor issue, workaround exists, cosmetic | UI glitch, slow performance, edge case failure |
|
|
42
|
+
|
|
43
|
+
**Prompts:**
|
|
44
|
+
- "How many users are affected?"
|
|
45
|
+
- "Is there a workaround?"
|
|
46
|
+
- "Is this blocking production use?"
|
|
47
|
+
|
|
48
|
+
### 4. What area of code is likely affected?
|
|
49
|
+
|
|
50
|
+
Narrow down the investigation scope:
|
|
51
|
+
- Component/module name
|
|
52
|
+
- File paths if known
|
|
53
|
+
- Recent changes that might relate
|
|
54
|
+
- Related features
|
|
55
|
+
|
|
56
|
+
**Prompts:**
|
|
57
|
+
- "Which feature/page does this affect?"
|
|
58
|
+
- "Were there recent deployments?"
|
|
59
|
+
- "Has this worked before? When did it break?"
|
|
60
|
+
|
|
61
|
+
## Track Selection Logic
|
|
62
|
+
|
|
63
|
+
Based on answers, select the appropriate track:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
┌─────────────┐
|
|
67
|
+
│ P0 / P1 │
|
|
68
|
+
│ severity? │
|
|
69
|
+
└──────┬──────┘
|
|
70
|
+
│
|
|
71
|
+
┌────────────┼────────────┐
|
|
72
|
+
│ │ │
|
|
73
|
+
P0 + Known P0 + Unknown P1 or P2
|
|
74
|
+
Root Cause Root Cause
|
|
75
|
+
│ │ │
|
|
76
|
+
▼ ▼ ▼
|
|
77
|
+
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
78
|
+
│ HOTFIX │ │ Attempt │ │THOROUGH │
|
|
79
|
+
│ TRACK │ │ Hotfix │ │ TRACK │
|
|
80
|
+
└─────────┘ │ 15 min │ └─────────┘
|
|
81
|
+
└────┬────┘
|
|
82
|
+
│
|
|
83
|
+
┌────┴────┐
|
|
84
|
+
│ Found │
|
|
85
|
+
│ in 15m? │
|
|
86
|
+
└────┬────┘
|
|
87
|
+
Yes │ No
|
|
88
|
+
┌───┴───┐
|
|
89
|
+
▼ ▼
|
|
90
|
+
HOTFIX THOROUGH
|
|
91
|
+
TRACK TRACK
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Hotfix Track Criteria
|
|
95
|
+
|
|
96
|
+
Select hotfix when ALL of these apply:
|
|
97
|
+
- [ ] P0 urgency (production down or revenue impact)
|
|
98
|
+
- [ ] Root cause is known OR likely findable in 15 minutes
|
|
99
|
+
- [ ] Fix is straightforward (code change, config fix, rollback)
|
|
100
|
+
- [ ] User accepts reduced ceremony for speed
|
|
101
|
+
|
|
102
|
+
### Thorough Track Criteria
|
|
103
|
+
|
|
104
|
+
Select thorough when ANY of these apply:
|
|
105
|
+
- [ ] P1/P2 urgency (not production-critical)
|
|
106
|
+
- [ ] Root cause is unknown and complex
|
|
107
|
+
- [ ] Fix requires design decisions
|
|
108
|
+
- [ ] Issue is recurring or indicates systemic problem
|
|
109
|
+
- [ ] User wants full documentation for learning
|
|
110
|
+
|
|
111
|
+
### Escalation Criteria
|
|
112
|
+
|
|
113
|
+
Escalate to `/exarchos:ideate` when:
|
|
114
|
+
- [ ] Fix requires architectural changes
|
|
115
|
+
- [ ] Multiple systems/teams need coordination
|
|
116
|
+
- [ ] Issue exposes design flaw requiring redesign
|
|
117
|
+
- [ ] Scope exceeds bug fix (becomes feature work)
|
|
118
|
+
|
|
119
|
+
## Triage Output Format
|
|
120
|
+
|
|
121
|
+
After gathering answers, record in state file:
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"triage": {
|
|
126
|
+
"symptom": "Login button returns 500 error on click",
|
|
127
|
+
"reproduction": "Always reproducible: Click login with valid credentials",
|
|
128
|
+
"affectedArea": "Authentication service, src/auth/login.ts",
|
|
129
|
+
"impact": "All users cannot log in"
|
|
130
|
+
},
|
|
131
|
+
"urgency": {
|
|
132
|
+
"level": "P0",
|
|
133
|
+
"justification": "Production login completely broken, 100% of users affected"
|
|
134
|
+
},
|
|
135
|
+
"track": "hotfix"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Quick Triage Script
|
|
140
|
+
|
|
141
|
+
For fast P0 situations, use this abbreviated flow:
|
|
142
|
+
|
|
143
|
+
1. **Symptom?** [one sentence]
|
|
144
|
+
2. **Repro?** [yes/no/unknown]
|
|
145
|
+
3. **P0?** [yes → hotfix, no → thorough]
|
|
146
|
+
4. **Affected file?** [path or "unknown"]
|
|
147
|
+
|
|
148
|
+
Example:
|
|
149
|
+
```
|
|
150
|
+
Symptom: Login 500 error
|
|
151
|
+
Repro: Yes
|
|
152
|
+
P0: Yes
|
|
153
|
+
File: src/auth/login.ts
|
|
154
|
+
→ HOTFIX TRACK
|
|
155
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: troubleshooting
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Troubleshooting
|
|
6
|
+
|
|
7
|
+
## MCP Tool Call Failed
|
|
8
|
+
If an Exarchos MCP tool returns an error:
|
|
9
|
+
1. Check the error message -- it usually contains specific guidance
|
|
10
|
+
2. Verify the workflow state exists: call `mcp__exarchos__exarchos_workflow` with `action: "get"` and the featureId
|
|
11
|
+
3. If "version mismatch": another process updated state -- retry the operation
|
|
12
|
+
4. If state is corrupted: call `mcp__exarchos__exarchos_workflow` with `action: "cancel"` and `dryRun: true`
|
|
13
|
+
|
|
14
|
+
## State Desync
|
|
15
|
+
If workflow state doesn't match git reality:
|
|
16
|
+
1. The SessionStart hook runs reconciliation automatically on resume
|
|
17
|
+
2. If manual check needed: compare state file with `git log` and branch state
|
|
18
|
+
3. Update state via `mcp__exarchos__exarchos_workflow` with `action: "set"` to match git truth
|
|
19
|
+
|
|
20
|
+
## Investigation Timeout (Hotfix Track)
|
|
21
|
+
If 15-minute investigation timer expires without root cause:
|
|
22
|
+
1. The workflow auto-switches to thorough track
|
|
23
|
+
2. All investigation findings are preserved in state
|
|
24
|
+
3. Continue investigation without time constraint
|
|
25
|
+
|
|
26
|
+
## Track Switching
|
|
27
|
+
If hotfix track reveals complexity requiring thorough investigation:
|
|
28
|
+
1. Call `mcp__exarchos__exarchos_workflow` with `action: "set"` to update track to "thorough"
|
|
29
|
+
2. Previous investigation findings carry over
|
|
30
|
+
3. RCA phase begins after investigation completes
|
|
31
|
+
|
|
32
|
+
## Exarchos Integration
|
|
33
|
+
|
|
34
|
+
When Exarchos MCP tools are available, emit events throughout the debug workflow:
|
|
35
|
+
|
|
36
|
+
1. **At workflow start (triage):** `mcp__exarchos__exarchos_event` with `action: "append"` -> `workflow.started` with workflowType "debug", urgency
|
|
37
|
+
2. **On track selection:** `mcp__exarchos__exarchos_event` with `action: "append"` -> `phase.transitioned` with selected track (hotfix/thorough)
|
|
38
|
+
3. **On each phase transition:** `mcp__exarchos__exarchos_event` with `action: "append"` -> `phase.transitioned` from->to
|
|
39
|
+
4. **Thorough track stacking:** Handled by `/exarchos:synthesize` (Graphite stack submission)
|
|
40
|
+
5. **Hotfix track commit:** Single `gt create -m "fix: <description>"` -- no multi-branch stacking needed
|
|
41
|
+
6. **On complete:** `mcp__exarchos__exarchos_event` with `action: "append"` -> `phase.transitioned` to "completed"
|
|
42
|
+
|
|
43
|
+
## Performance Notes
|
|
44
|
+
|
|
45
|
+
- Complete each step fully before advancing -- quality over speed
|
|
46
|
+
- Do not skip validation checks even when the change appears trivial
|
|
47
|
+
- Complete each investigation step before concluding root cause. Do not jump to fix without evidence.
|