claudecode-omc 5.6.3 → 5.6.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "bundledAt": "2026-05-09T07:40:17Z",
2
+ "bundledAt": "2026-05-13T02:46:15Z",
3
3
  "sources": {
4
4
  "anthropic-skills": { "artifacts": 2 },
5
5
  "ecc": { "artifacts": 131 },
@@ -8,14 +8,38 @@ description: >-
8
8
  "how to write a prompt for", "help me prompt", "rewrite this prompt",
9
9
  or explicitly asks to enhance prompt quality. Also triggers on Chinese
10
10
  equivalents: "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令".
11
+ Specially handles short Chinese bug reports (the dominant real-world use
12
+ case): runs Bug Report Triage to extract repro/expected/actual/environment,
13
+ asks up to 3 clarifying questions if ≤ 2 fields are present, and inserts
14
+ systematic-debugging as a hard prerequisite before any code change.
11
15
  DO NOT TRIGGER when: user wants the task executed directly, or says
12
16
  "just do it" / "直接做". DO NOT TRIGGER when user says "优化代码",
13
17
  "优化性能", "optimize performance", "optimize this code" — those are
14
- refactoring/performance tasks, not prompt optimization.
18
+ refactoring/performance tasks, not prompt optimization (unless the user
19
+ explicitly invokes /prompt-optimize, in which case treat them as
20
+ Bug Fix + Refactor combined).
15
21
  origin: community
16
22
  metadata:
17
23
  author: YannJY02
18
- version: "1.0.0"
24
+ version: "1.2.0"
25
+ changelog: |
26
+ 1.2.0 — Skill Existence & Alias Resolution (Phase 0.5) so we stop
27
+ recommending phantom skills (`tdd-workflow`, `search-first`,
28
+ `blueprint`, `tdd-guide` agent, etc. that don't exist on most
29
+ installs). Multi-Intent Detection in Phase 1 with structured
30
+ patterns and scope-bump rule. Conductor scope-gating column
31
+ in Phase 2 (TRIVIAL/LOW skip, MEDIUM optional, HIGH default,
32
+ EPIC required) — prevents over-ceremonialized small tasks.
33
+ Best-Practices Skill Chains subsection in Phase 3 documenting
34
+ the superpowers pipeline per intent (New Feature, Bug Fix,
35
+ Performance, Research-then-Build, Multi-Intent, Refactor).
36
+ 1.1.0 — Added Bug Report Triage (Phase 1.5), Compact Mode (Phase 6),
37
+ Tauri/Electron tech stacks, Research-then-Build intent,
38
+ Performance intent, conductor/systematic-debugging/trace/analyze
39
+ in component matching, real-data Chinese bug example.
40
+ Driven by 8 real /prompt-optimize invocations: 7/8 were Chinese
41
+ bug reports, 1/8 was research-then-build.
42
+ 1.0.0 — Initial release.
19
43
  ---
20
44
 
21
45
  # Prompt Optimizer
@@ -68,6 +92,9 @@ Before analyzing the prompt, detect the current project context:
68
92
  - `go.mod` → Go
69
93
  - `pyproject.toml` / `requirements.txt` → Python
70
94
  - `Cargo.toml` → Rust
95
+ - `src-tauri/` + `Cargo.toml` + `package.json` → **Tauri** (Rust core + Web frontend)
96
+ - `electron.json` / `electron-builder.json` / `electron` in `package.json` deps → **Electron**
97
+ - `expo.json` / `app.json` with Expo SDK → React Native (Expo)
71
98
  - `build.gradle` / `pom.xml` → Java / Kotlin / Spring Boot
72
99
  - `Package.swift` → Swift
73
100
  - `Gemfile` → Ruby
@@ -75,39 +102,190 @@ Before analyzing the prompt, detect the current project context:
75
102
  - `*.csproj` / `*.sln` → .NET
76
103
  - `Makefile` / `CMakeLists.txt` → C / C++
77
104
  - `cpanfile` / `Makefile.PL` → Perl
78
- 3. Note detected tech stack for use in Phase 3 and Phase 4
105
+ 3. **Git context auto-pull** if the user's prompt mentions `当前分支` / `current branch` / `this PR` / `本次改动`, run these read-only commands and inject results into Phase 4 context:
106
+ - `git status --short` (uncommitted changes)
107
+ - `git log -5 --oneline` (recent commits)
108
+ - `git diff --stat HEAD~1` (latest commit's surface area)
109
+ This converts vague references into concrete file lists.
110
+ 4. Note detected tech stack for use in Phase 3 and Phase 4
79
111
 
80
112
  If no project files are found (e.g., the prompt is abstract or for a new project),
81
113
  skip detection and flag "tech stack unknown" in Phase 4.
82
114
 
115
+ ### Phase 0.5: Skill Existence & Alias Resolution
116
+
117
+ The component tables below were authored against a generic ECC distribution.
118
+ Many users run OMC, superpowers, or their own custom installs where the same
119
+ capability lives under a **different skill name**. Recommending a phantom skill
120
+ wastes the user's time.
121
+
122
+ **Rule:** before listing a skill in Section 2 / Section 3, mentally check:
123
+ *"Is this skill likely installed locally?"* If unsure, follow the alias table
124
+ or add a verification note.
125
+
126
+ **Common alias map (generic ECC name → likely real names):**
127
+
128
+ | Generic ECC name | superpowers / OMC actual | Verification |
129
+ |---|---|---|
130
+ | `tdd-workflow` (skill) | `test-driven-development` (superpowers) OR `tdd-generator` (OMC) | `ls ~/.claude/skills/test-driven-development` |
131
+ | `verification-loop` (skill) | `verification-before-completion` (superpowers) OR `verification-loop` (OMC) | both common |
132
+ | `search-first` (skill) | `external-context` OR `iterative-retrieval` | check both |
133
+ | `blueprint` (skill) | **`conductor`** (preferred multi-session driver) | `ls ~/.claude/skills/conductor` |
134
+ | `e2e-testing` (skill) | `e2e` | — |
135
+ | `tdd-guide` (agent) | `test-engineer` (OMC) | — |
136
+ | `build-error-resolver` (agent) | `debugger` (OMC) | — |
137
+ | `refactor-cleaner` (agent) | `code-simplifier` (OMC) | — |
138
+ | `doc-updater` (agent) | `writer` (OMC) | — |
139
+ | `python-reviewer` / `go-reviewer` / etc. | usually just `code-reviewer` | — |
140
+
141
+ **Tech-stack-specific patterns** (`django-patterns`, `springboot-patterns`,
142
+ `frontend-patterns`, etc., listed in the By Tech Stack table) are **aspirational
143
+ on most installs** — assume absent unless the user confirms otherwise. When
144
+ referencing them in Section 3, write:
145
+
146
+ > If you don't have `<skill-name>` installed, recommend the universal `coding-standards` skill instead, or use the conventions in the project's `CLAUDE.md`.
147
+
148
+ **Discovery shortcut for the user:** if you suspect the skill catalog is sparse,
149
+ suggest they run `/oh-my-claudecode:skill-stocktake` (OMC) or `ls ~/.claude/skills/`
150
+ to enumerate what they actually have.
151
+
83
152
  ### Phase 1: Intent Detection
84
153
 
85
154
  Classify the user's task into one or more categories:
86
155
 
87
156
  | Category | Signal Words | Example |
88
157
  |----------|-------------|---------|
89
- | New Feature | build, create, add, implement, 创建, 实现, 添加 | "Build a login page" |
90
- | Bug Fix | fix, broken, not working, error, 修复, 报错 | "Fix the auth flow" |
158
+ | New Feature | build, create, add, implement, 创建, 实现, 添加, 增加 | "Build a login page" |
159
+ | Bug Fix | fix, broken, not working, error, 修复, 报错, 偶现, 不工作, 失效, 卡顿, 我发现一个问题, 你先看看 | "Fix the auth flow" / "我发现头像不显示" |
91
160
  | Refactor | refactor, clean up, restructure, 重构, 整理 | "Refactor the API layer" |
92
161
  | Research | how to, what is, explore, investigate, 怎么, 如何 | "How to add SSO" |
162
+ | **Research-then-Build** | "先调研 X 再实现", "参考 X 怎么做", "look at how X does it then build" | "先调研 Gemini CLI 自动补全再实现" |
93
163
  | Testing | test, coverage, verify, 测试, 覆盖率 | "Add tests for the cart" |
94
164
  | Review | review, audit, check, 审查, 检查 | "Review my PR" |
95
165
  | Documentation | document, update docs, 文档 | "Update the API docs" |
96
166
  | Infrastructure | deploy, CI, docker, database, 部署, 数据库 | "Set up CI/CD pipeline" |
97
167
  | Design | design, architecture, plan, 设计, 架构 | "Design the data model" |
168
+ | Performance | "优化性能", "卡顿", "slow", "latency", "做性能优化" | "Windows 上卡顿" |
169
+
170
+ **Multi-intent prompts** (detect at this phase, plan in Phase 2):
171
+
172
+ Many real prompts pack ≥ 2 intents into one sentence. Detect by counting
173
+ distinct verbs/categories. Common patterns:
174
+
175
+ | Pattern | Example | Intents |
176
+ |---|---|---|
177
+ | "先 X 再 Y" | "先做性能优化,再做 UX 优化" | Performance → Refactor |
178
+ | "X 同时 Y" | "修复 bug 同时加一个新页面" | Bug Fix + New Feature |
179
+ | "顺便/也" | "改这个 bug,顺便补测试" | Bug Fix + Testing |
180
+ | "调研 X 然后实现" | "调研 Gemini CLI 自动补全再实现" | Research-then-Build |
181
+ | "重构 X 顺便加 Y" | "重构 API 顺便补文档" | Refactor + Documentation |
182
+
183
+ **When ≥ 2 distinct intents detected:**
184
+
185
+ 1. **Do not collapse into a single prompt.** That produces ambiguous task
186
+ ordering and loses scope discipline.
187
+ 2. **Bump scope assessment by one level** (e.g., MEDIUM → HIGH). Multi-intent
188
+ work has higher coordination cost than single-intent.
189
+ 3. **Recommend the conductor skill** if combined scope is HIGH or above —
190
+ each intent becomes a track:
191
+ ```
192
+ .omc/conductor/<feature-name>/
193
+ ├── tracks/
194
+ │ ├── perf-optimization/ # spec → plan → review
195
+ │ └── ux-improvement/ # spec → plan → review
196
+ ```
197
+ 4. **Order matters**: explicit "先 X 再 Y" is sequential; "X + Y" with no
198
+ ordering signal — recommend a default order based on dependency
199
+ (e.g., investigation before fix, fix before refactor, refactor before docs).
200
+ 5. **Stop conditions per intent**: each track gets its own /verify gate; do
201
+ NOT proceed to track 2 until track 1's verify passes.
202
+
203
+ **Note on Performance intent**: The skill's "Do Not Use When" rule blocks `优化性能` *as a trigger* — but if the user explicitly invoked `/prompt-optimize` with a performance task, treat it like Bug Fix + Refactor combined: investigate first (`analyze`/`trace`), then refactor with measurement gates.
204
+
205
+ ### Phase 1.5: Bug Report Triage (only if Intent = Bug Fix or Performance)
206
+
207
+ Bug reports are the highest-volume use case for this skill, and they fail in
208
+ predictable ways: vague repro, missing environment, no expected/actual.
209
+ For Bug Fix and Performance intents, you MUST score the prompt against this
210
+ checklist before generating the optimized prompt.
211
+
212
+ | Field | What to extract | Default if missing |
213
+ |---|---|---|
214
+ | **Repro steps** | Concrete numbered steps to trigger the bug | Mark `TODO: 用户补充复现步骤` |
215
+ | **Expected behavior** | What should happen | Infer from prompt or mark TODO |
216
+ | **Actual behavior** | What does happen (error message, screenshot, log) | Mark TODO |
217
+ | **Environment** | OS (macOS/Windows/Linux), version, browser, device | Ask if absent and prompt mentions cross-platform symptoms |
218
+ | **Reproducibility** | 100% / 偶现 (intermittent) / "first time" | Default 100% if not stated |
219
+ | **Recent changes** | Branch name, recent commits, suspected commit | Auto-fill via `git log -5` (Phase 0) |
220
+ | **Logs / stack trace** | Error text, console output, network response | Mark `TODO: 粘贴完整错误日志/截图` |
221
+
222
+ **Scoring rule:**
223
+ - ≥ 5 fields present → proceed to Phase 2 directly
224
+ - 3–4 fields present → fill TODO markers in optimized prompt; do NOT block
225
+ - ≤ 2 fields present → ask the user up to 3 clarifying questions BEFORE generating prompt. Prioritize: (1) repro, (2) environment if "偶现"/"intermittent"/cross-platform mentioned, (3) actual error/log
226
+
227
+ **Special signals:**
228
+ - "偶现" / "intermittent" / "flaky" / "sometimes" / "occasionally" → MUST ask: trigger pattern, frequency, environment differences
229
+ - "X 平台正常 Y 平台不正常" / "works on mac, broken on windows" → cross-platform Bug; recommend `electron-driver` skill if Electron, recommend platform-conditional repro
230
+ - "重启后/restart" → state-persistence bug; recommend reading any storage layer (localStorage, electron-store, Tauri store, sqlite) before fixing
231
+ - "性能/slow/卡顿" → Performance intent; recommend `analyze` skill + measurement-first workflow (record baseline, then optimize)
232
+
233
+ **Bug Fix optimized-prompt template** (used in Section 3 when intent = Bug Fix):
234
+
235
+ ```
236
+ ## 问题描述
237
+ [symptom in 1-2 sentences]
238
+
239
+ ## 复现步骤
240
+ 1. ...
241
+ 2. ...
242
+ 3. ...
243
+
244
+ ## 期望 vs 实际
245
+ - 期望:...
246
+ - 实际:...
247
+
248
+ ## 环境
249
+ - OS / 版本:[macOS 14 / Windows 11 / ...]
250
+ - 复现率:[100% / 偶现 N 次/M 次]
251
+ - 当前分支:[auto-filled via git]
252
+ - 相关日志:[paste here / TODO]
253
+
254
+ ## 工作流
255
+ 1. **不要直接改代码**。先用 systematic-debugging skill 定位根因
256
+ - 列出至少 3 个候选假设
257
+ - 对每个假设设计最小验证(添加日志 / 阅读相关代码)
258
+ 2. /tdd 写一个 failing 测试复现 bug(如果是 UI bug,写 e2e 用例)
259
+ 3. 修复到 green
260
+ 4. /verify 跨平台验证(如适用,跑 macOS + Windows)
261
+ 5. /code-review
262
+
263
+ ## 不要做
264
+ - 不要重构相邻无关代码
265
+ - 不要修改无关文件
266
+ - 不要在没有定位根因前提交"试试看"的修复
267
+ ```
98
268
 
99
269
  ### Phase 2: Scope Assessment
100
270
 
101
271
  If Phase 0 detected a project, use codebase size as a signal. Otherwise, estimate
102
272
  from the prompt description alone and mark the estimate as uncertain.
103
273
 
104
- | Scope | Heuristic | Orchestration |
105
- |-------|-----------|---------------|
106
- | TRIVIAL | Single file, < 50 lines | Direct execution |
107
- | LOW | Single component or module | Single command or skill |
108
- | MEDIUM | Multiple components, same domain | Command chain + /verify |
109
- | HIGH | Cross-domain, 5+ files | /plan first, then phased execution |
110
- | EPIC | Multi-session, multi-PR, architectural shift | Use blueprint skill for multi-session plan |
274
+ | Scope | Heuristic | Orchestration | **Conductor recommendation** |
275
+ |-------|-----------|---------------|------------------------------|
276
+ | TRIVIAL | Single file, < 50 lines | Direct execution | **Skip** — overkill |
277
+ | LOW | Single component or module | Single command or skill | **Skip** — single skill is enough |
278
+ | MEDIUM | Multiple components, same domain | Command chain + /verify | **Optional** — offer it but don't force; user choice |
279
+ | HIGH | Cross-domain, 5+ files | /plan first, then phased execution | **Default ON** — `conductor` track keeps phases coherent across reviews |
280
+ | EPIC | Multi-session, multi-PR, architectural shift | conductor (or blueprint) for multi-session plan | **Required** — single-session execution will lose context |
281
+
282
+ **Why the gating matters:** Recommending conductor for a TRIVIAL task ("rename
283
+ this variable") creates `.omc/conductor/<track>/spec.md` etc. — pure ceremony
284
+ overhead. Conductor's value (durable spec/plan/review across sessions) only
285
+ pays off when the task itself is durable (HIGH+).
286
+
287
+ **Multi-intent override**: per Phase 1, multi-intent prompts bump scope by
288
+ one level. So a MEDIUM task with 2 intents → HIGH → conductor defaults ON.
111
289
 
112
290
  ### Phase 3: ECC Component Matching
113
291
 
@@ -118,15 +296,19 @@ Map intent + scope + tech stack (from Phase 0) to specific ECC components.
118
296
  | Intent | Commands | Skills | Agents |
119
297
  |--------|----------|--------|--------|
120
298
  | New Feature | /plan, /tdd, /code-review, /verify | tdd-workflow, verification-loop | planner, tdd-guide, code-reviewer |
121
- | Bug Fix | /tdd, /build-fix, /verify | tdd-workflow | tdd-guide, build-error-resolver |
299
+ | **Bug Fix** | /tdd, /verify | **systematic-debugging (REQUIRED first)**, trace, analyze, debug, verification-loop | **debugger**, tdd-guide, code-reviewer |
300
+ | **Bug Fix (intermittent / 偶现)** | /verify | systematic-debugging, trace, **e2e (for flaky reproduction harness)** | debugger, tracer |
301
+ | **Bug Fix (cross-platform)** | /verify | systematic-debugging, **electron-driver** (if Electron) | debugger, code-reviewer |
302
+ | **Performance** | /verify | analyze, trace, verification-loop | architect, code-reviewer |
122
303
  | Refactor | /refactor-clean, /code-review, /verify | verification-loop | refactor-cleaner, code-reviewer |
123
- | Research | /plan | search-first, iterative-retrieval | — |
304
+ | Research | /plan | search-first, iterative-retrieval, external-context | — |
305
+ | **Research-then-Build** | /plan | external-context (research) → **conductor** (track delivery) → /tdd per phase | planner → executor |
124
306
  | Testing | /tdd, /e2e, /test-coverage | tdd-workflow, e2e-testing | tdd-guide, e2e-runner |
125
307
  | Review | /code-review | security-review | code-reviewer, security-reviewer |
126
- | Documentation | /update-docs, /update-codemaps | — | doc-updater |
308
+ | Documentation | /update-docs, /update-codemaps | — | doc-updater, writer |
127
309
  | Infrastructure | /plan, /verify | docker-patterns, deployment-patterns, database-migrations | architect |
128
310
  | Design (MEDIUM-HIGH) | /plan | — | planner, architect |
129
- | Design (EPIC) | — | blueprint (invoke as skill) | planner, architect |
311
+ | Design (EPIC) | — | **conductor** (multi-session track) OR blueprint | planner, architect |
130
312
 
131
313
  #### By Tech Stack
132
314
 
@@ -138,11 +320,113 @@ Map intent + scope + tech stack (from Phase 0) to specific ECC components.
138
320
  | Kotlin / Android | kotlin-coroutines-flows, compose-multiplatform-patterns, android-clean-architecture | kotlin-reviewer |
139
321
  | TypeScript / React | frontend-patterns, backend-patterns, coding-standards | code-reviewer |
140
322
  | Swift / iOS | swiftui-patterns, swift-concurrency-6-2, swift-actor-persistence, swift-protocol-di-testing | code-reviewer |
323
+ | **Tauri (Rust + Web)** | rust-patterns, frontend-patterns, coding-standards (note IPC bridge between Rust core and Web) | code-reviewer |
324
+ | **Electron** | **electron-driver (E2E)**, frontend-patterns, coding-standards (note main vs renderer process) | code-reviewer |
325
+ | **React Native / Expo** | frontend-patterns, coding-standards | code-reviewer |
326
+ | **Cross-platform desktop bug** | electron-driver (if Electron) + systematic-debugging + platform-conditional repro | debugger |
141
327
  | PostgreSQL | postgres-patterns, database-migrations | database-reviewer |
142
328
  | Perl | perl-patterns, perl-testing, perl-security | code-reviewer |
143
329
  | C++ | cpp-coding-standards, cpp-testing | code-reviewer |
144
330
  | Other / Unlisted | coding-standards (universal) | code-reviewer |
145
331
 
332
+ #### Best-Practices Skill Chains
333
+
334
+ The two tables above pick **single skills**; this subsection wires them into
335
+ **ordered chains** that match documented community best practices (primarily
336
+ the superpowers pipeline). Use these chains in Section 3 — don't just dump a
337
+ flat list of skills.
338
+
339
+ **Chain notation:** `A → B → C` means run A first, then B, then C, with each
340
+ step gated by its own success criterion. `[X]` = optional, include only if
341
+ scope/risk warrants it.
342
+
343
+ ##### Chain: New Feature (HIGH+ scope)
344
+
345
+ ```
346
+ brainstorming (clarify intent + requirements)
347
+ → using-git-worktrees (isolate work)
348
+ → conductor (init track) (create spec.md / plan.md skeleton)
349
+ → writing-plans (fill plan.md with concrete steps)
350
+ → [research] external-context (only if novel domain)
351
+ → test-driven-development (red → green per step)
352
+ → verification-before-completion (evidence-based check)
353
+ → requesting-code-review (independent review pass)
354
+ → finishing-a-development-branch (merge / PR / cleanup)
355
+ ```
356
+
357
+ ##### Chain: New Feature (LOW–MEDIUM scope, no conductor)
358
+
359
+ ```
360
+ brainstorming
361
+ → writing-plans (lightweight inline plan)
362
+ → test-driven-development
363
+ → verification-before-completion
364
+ → [requesting-code-review] (skip for trivial)
365
+ ```
366
+
367
+ ##### Chain: Bug Fix (any scope)
368
+
369
+ ```
370
+ systematic-debugging (REQUIRED: hypotheses → evidence)
371
+ → [trace] (only if intermittent / 偶现)
372
+ → test-driven-development (failing test reproduces bug)
373
+ → verification-before-completion (test passes + no regressions)
374
+ → [requesting-code-review] (for non-trivial fixes)
375
+ → finishing-a-development-branch
376
+ ```
377
+
378
+ ##### Chain: Performance Optimization
379
+
380
+ ```
381
+ analyze (baseline measurement: profile / timing)
382
+ → trace (locate hotspot with evidence)
383
+ → writing-plans (which optimizations, in what order)
384
+ → test-driven-development (regression test for behavior)
385
+ → [implement] (one optimization at a time)
386
+ → verification-before-completion (re-measure: did it actually improve?)
387
+ → finishing-a-development-branch
388
+ ```
389
+
390
+ ##### Chain: Research-then-Build
391
+
392
+ ```
393
+ external-context (study reference implementation)
394
+ → produce comparison report (what to copy, what to skip, what to adapt)
395
+ → brainstorming (apply learnings to our context)
396
+ → conductor (init multi-phase track)
397
+ → phase-1: minimal viable port
398
+ → phase-2: project-specific adaptations
399
+ → phase-3: integration + tests
400
+ → finishing-a-development-branch
401
+ ```
402
+
403
+ ##### Chain: Multi-Intent Prompt
404
+
405
+ ```
406
+ brainstorming (decompose into intents, prioritize)
407
+ → conductor (multi-track init) (one track per intent)
408
+ → for each track in dependency order:
409
+ → use the appropriate single-intent chain above
410
+ → /verify gate before next track starts
411
+ → finishing-a-development-branch (one PR or split per track, user's call)
412
+ ```
413
+
414
+ ##### Chain: Refactor (no behavior change)
415
+
416
+ ```
417
+ [code-review of current state] (understand existing intent)
418
+ → writing-plans (refactor steps, each behavior-preserving)
419
+ → test-driven-development (characterization tests if absent)
420
+ → ai-slop-cleaner (only if cleaning AI-generated bloat)
421
+ → verification-before-completion (behavior unchanged: tests still pass)
422
+ → finishing-a-development-branch
423
+ ```
424
+
425
+ **When to deviate from these chains:**
426
+ - User explicitly says "skip TDD" → drop test-driven-development
427
+ - Project's `CLAUDE.md` mandates a different workflow → follow it (CLAUDE.md > skill chains, per superpowers `using-superpowers` priority rule)
428
+ - Time-boxed prototype / spike → can drop verification-before-completion + requesting-code-review (mark explicitly: "this is a spike, not production")
429
+
146
430
  ### Phase 4: Missing Context Detection
147
431
 
148
432
  Scan the prompt for missing critical information. Check each item and mark
@@ -190,6 +474,25 @@ For tasks that exceed a single session, split into sequential prompts:
190
474
  - Prompt 2-N: Implement one phase per prompt (each ends with /verify)
191
475
  - Final Prompt: Integration test + /code-review across all phases
192
476
  - Use /save-session and /resume-session to preserve context between sessions
477
+ - For multi-session structured delivery, prefer the **conductor** skill (creates `.omc/conductor/` tracks with Context → Spec → Plan → Implement artifacts that survive across sessions)
478
+
479
+ ### Phase 6: Compact Mode (output short-circuit)
480
+
481
+ When ALL of these are true, skip Section 1 (Diagnosis) and Section 5 (Rationale)
482
+ in the output — just deliver Section 2 (Components) + Section 3 (Full prompt) +
483
+ Section 4 (Quick) + Footer:
484
+
485
+ - Original prompt is < 300 characters AND
486
+ - Single, well-defined issue (no multi-part request) AND
487
+ - Tech stack auto-detected in Phase 0 AND
488
+ - Bug Triage scored ≥ 5/7 OR intent ≠ Bug Fix
489
+
490
+ **Why:** Real telemetry shows the majority of `/prompt-optimize` invocations
491
+ are short Chinese bug reports. Forcing them through full diagnosis adds reading
492
+ overhead with no signal. Diagnosis tables matter when prompts are ambiguous —
493
+ not when they're already concrete.
494
+
495
+ If Compact Mode triggers, prefix Section 2 with: `> Compact mode (short single-issue prompt). Full diagnosis skipped — ask if you want it.`
193
496
 
194
497
  ---
195
498
 
@@ -241,13 +544,17 @@ A compact version for experienced ECC users. Vary by intent type:
241
544
  | Intent | Quick Pattern |
242
545
  |--------|--------------|
243
546
  | New Feature | `/plan [feature]. /tdd to implement. /code-review. /verify.` |
244
- | Bug Fix | `/tdd — write failing test for [bug]. Fix to green. /verify.` |
547
+ | Bug Fix | `Use systematic-debugging for [bug] list 3 hypotheses, verify each. Then /tdd: write failing test, fix to green. /verify.` |
548
+ | Bug Fix (intermittent) | `Use trace skill for [intermittent bug] — competing hypotheses with evidence. Build flaky-repro harness in /e2e. Fix only after 100% repro. /verify.` |
549
+ | Bug Fix (cross-platform) | `Use systematic-debugging for [bug]. Repro on both [platform A] and [platform B]. Fix. /verify on both platforms.` |
550
+ | Performance | `Use analyze for [slow path] — measure baseline first (timing/profile). Identify top 3 hotspots. Fix one at a time, re-measure after each. /verify regression.` |
245
551
  | Refactor | `/refactor-clean [scope]. /code-review. /verify.` |
246
- | Research | `Use search-first skill for [topic]. /plan based on findings.` |
552
+ | Research | `Use external-context skill for [topic]. /plan based on findings.` |
553
+ | Research-then-Build | `Use external-context to study [reference X]. Produce comparison report. Then use conductor skill to track delivery: spec → plan → /tdd per phase.` |
247
554
  | Testing | `/tdd [module]. /e2e for critical flows. /test-coverage.` |
248
555
  | Review | `/code-review. Then use security-reviewer agent.` |
249
556
  | Docs | `/update-docs. /update-codemaps.` |
250
- | EPIC | `Use blueprint skill for "[objective]". Execute phases with /verify gates.` |
557
+ | EPIC | `Use conductor skill (or blueprint) for "[objective]". Execute phases with /verify gates.` |
251
558
 
252
559
  ### Section 5: Enhancement Rationale
253
560
 
@@ -259,6 +566,10 @@ A compact version for experienced ECC users. Vary by intent type:
259
566
 
260
567
  > Not what you need? Tell me what to adjust, or make a normal task request
261
568
  > if you want execution instead of prompt optimization.
569
+ >
570
+ > **For bug reports:** before pasting the optimized prompt into a new session,
571
+ > attach any error logs, stack traces, or screenshots — they make the
572
+ > investigation 10× faster than text descriptions alone.
262
573
 
263
574
  ---
264
575
 
@@ -351,7 +662,66 @@ Do not:
351
662
  - Add new dependencies without checking existing ones first (use search-first skill)
352
663
  ```
353
664
 
354
- ### Example 3: EPIC Project
665
+ ### Example 3: Chinese Bug Report (real-data pattern)
666
+
667
+ **User input:**
668
+ ```
669
+ 当前分支的分享 html 项目或者 md 文档的功能,存在一个问题,就是如果用户修改已经分享的文件,无法再次分享,这样链接始终不会发生改变
670
+ ```
671
+
672
+ **Phase 0 detects:** Tauri (Rust + Web) project. Git context: 3 uncommitted files in `src/share/`, branch `feat/share-html`.
673
+
674
+ **Phase 1.5 Triage:** repro 1/7 (only symptom), expected/actual implicit, environment unspecified, reproducibility 100% inferred. **Score 3/7 → fill TODO markers, do not block.**
675
+
676
+ **Optimized Prompt (Full):**
677
+ ```
678
+ ## 问题描述
679
+ 分享 HTML 项目 / MD 文档功能:用户修改已分享文件后,无法再次生成新链接,
680
+ 链接始终不更新。
681
+
682
+ ## 复现步骤
683
+ 1. 在当前分支(feat/share-html)打开任意 HTML 项目或 MD 文档
684
+ 2. 点击分享,记录生成的链接 A
685
+ 3. 修改文件内容并保存
686
+ 4. 再次点击分享
687
+ 5. 观察生成的链接是否变化
688
+
689
+ ## 期望 vs 实际
690
+ - 期望:再次分享时生成新链接(或同链接但内容已更新)
691
+ - 实际:分享按钮无响应 / 链接不变 / 旧内容(请确认是哪种)
692
+
693
+ ## 环境
694
+ - OS / 版本:[macOS / Windows,请补充]
695
+ - 复现率:100%(推测,请确认)
696
+ - 当前分支:feat/share-html
697
+ - 相关文件:src/share/*(git status 显示 3 个未提交改动 — 是否相关?)
698
+
699
+ ## 工作流
700
+ 1. **不要直接改代码**。先用 systematic-debugging skill 定位根因,候选假设:
701
+ - H1: 分享缓存(按文件路径 key)未失效
702
+ - H2: 文件 hash 计算逻辑用了 mtime 而非内容 hash
703
+ - H3: 分享接口幂等性设计阻止了重复请求
704
+ - H4: 前端短路 — 检测到"已分享"就不再触发请求
705
+ 对每个假设:阅读 src/share/ 相关代码 + 添加临时日志验证
706
+ 2. /tdd 写 e2e 测试用例:分享 → 修改 → 再分享,断言链接或内容变化
707
+ 3. 修复到 green
708
+ 4. /verify:跑 e2e 测试 + macOS + Windows 各手测一次(Tauri 项目跨平台)
709
+ 5. /code-review
710
+
711
+ ## 不要做
712
+ - 不要改其他分享类型(仅 HTML / MD 文档)
713
+ - 不要重构 share 模块的整体架构
714
+ - 不要在没定位根因前做"清缓存"之类的猜测性修复
715
+ ```
716
+
717
+ **Optimized Prompt (Quick):**
718
+ ```
719
+ Use systematic-debugging for "分享 HTML/MD 后修改文件链接不更新" — list 3 hypotheses
720
+ (cache key, hash strategy, idempotent API), verify each. /tdd write failing e2e.
721
+ Fix to green. /verify on macOS + Windows.
722
+ ```
723
+
724
+ ### Example 4: EPIC Project
355
725
 
356
726
  **User input:**
357
727
  ```
@@ -392,6 +762,13 @@ Recommended: Opus 4.6 for blueprint planning, Sonnet 4.6 for phase execution.
392
762
  | `configure-ecc` | User hasn't set up ECC yet |
393
763
  | `skill-stocktake` | Audit which components are installed (use instead of hardcoded catalog) |
394
764
  | `search-first` | Research phase in optimized prompts |
395
- | `blueprint` | EPIC-scope optimized prompts (invoke as skill, not command) |
765
+ | `external-context` | Research external docs/products (e.g., "调研 Gemini CLI 怎么做的") |
766
+ | `systematic-debugging` | **Always** referenced for Bug Fix intent — root-cause before code |
767
+ | `trace` | Bug Fix with competing hypotheses, intermittent / 偶现 bugs |
768
+ | `analyze` | Performance intent or unknown-cause investigation |
769
+ | `debug` | OMC session/repo state diagnosis |
770
+ | `conductor` | Multi-session structured delivery (replaces blueprint for most cases) |
771
+ | `blueprint` | EPIC-scope when conductor is unavailable (legacy) |
772
+ | `electron-driver` | Electron cross-platform bugs requiring E2E repro |
396
773
  | `strategic-compact` | Long session context management |
397
774
  | `cost-aware-llm-pipeline` | Token optimization recommendations |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudecode-omc",
3
- "version": "5.6.3",
3
+ "version": "5.6.5",
4
4
  "description": "Claude Code harness — best-practice skills, agents, hooks, and configs from multiple sources",
5
5
  "bin": {
6
6
  "omc-manage": "bin/omc-manage.js"
package/src/cli/index.js CHANGED
@@ -31,6 +31,7 @@ function showHelp() {
31
31
  console.log(' evaluate [name] — quality score (Anthropic-aligned)');
32
32
  console.log(' compare [--threshold N] — cross-source overlap analysis');
33
33
  console.log(' recommend [--apply] — preference recommendations');
34
+ console.log(' index [--scope user|project] — generate _index.md catalog');
34
35
  console.log(' help Show this help');
35
36
  console.log('');
36
37
  console.log('Artifact types: skills, agents, hooks, commands, guidelines, claude-md, settings, hud');
package/src/cli/setup.js CHANGED
@@ -505,6 +505,15 @@ async function setup(args, flags = {}) {
505
505
  if (result.conflicts > 0) {
506
506
  console.log(` resolved ${result.conflicts} conflicts`);
507
507
  }
508
+
509
+ if (artifactType === 'skills' && !flags.dryRun) {
510
+ try {
511
+ const { buildAndWriteIndex } = require('./skill-index');
512
+ await buildAndWriteIndex(installTarget, { quiet: false });
513
+ } catch (err) {
514
+ console.log(` warning: skill index generation failed: ${err.message}`);
515
+ }
516
+ }
508
517
  }
509
518
 
510
519
  if (!flags.dryRun && scope === 'user') {