cc-viewer 1.6.167 → 1.6.169

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.
Files changed (75) hide show
  1. package/README.md +2 -0
  2. package/cli.js +8 -4
  3. package/concepts/en/CustomUltraplanExpert.md +161 -0
  4. package/concepts/zh/CustomUltraplanExpert.md +158 -0
  5. package/dist/assets/{App-RoyFuh5Q.js → App-CeymbgbA.js} +16 -16
  6. package/dist/assets/{AppHeader-CISkv2M7.css → AppHeader-qxiNe89i.css} +2 -2
  7. package/dist/assets/{AppHeader.module-BImQ_54s.js → AppHeader.module-DPnQHzzR.js} +168 -168
  8. package/dist/assets/{Mobile-vWVxR99L.js → Mobile-DjnTG4qC.js} +1 -1
  9. package/dist/assets/{_baseUniq-B6ltZppX.js → _baseUniq-43cnlw-r.js} +1 -1
  10. package/dist/assets/{arc-Vbp4ofmN.js → arc-BUFs6PQm.js} +1 -1
  11. package/dist/assets/{architectureDiagram-Q4EWVU46-Omfxat_t.js → architectureDiagram-Q4EWVU46-CEqjU2Yr.js} +1 -1
  12. package/dist/assets/{blockDiagram-DXYQGD6D-Cf3-qloX.js → blockDiagram-DXYQGD6D-DSbymKNU.js} +1 -1
  13. package/dist/assets/{c4Diagram-AHTNJAMY-DYwRFXfv.js → c4Diagram-AHTNJAMY-DMeT4sOi.js} +1 -1
  14. package/dist/assets/channel-Ccy-P4LS.js +1 -0
  15. package/dist/assets/{chunk-4BX2VUAB-CIDGvU3W.js → chunk-4BX2VUAB-BFxgafgd.js} +1 -1
  16. package/dist/assets/{chunk-4TB4RGXK-BQLP4sEU.js → chunk-4TB4RGXK-iBjZne-i.js} +1 -1
  17. package/dist/assets/{chunk-55IACEB6-BKCJCwXl.js → chunk-55IACEB6-BHoL99Rv.js} +1 -1
  18. package/dist/assets/{chunk-EDXVE4YY-CP0l4ZvR.js → chunk-EDXVE4YY-BleRGeR6.js} +1 -1
  19. package/dist/assets/{chunk-FMBD7UC4-BXuR0bLg.js → chunk-FMBD7UC4-xfDsv2e3.js} +1 -1
  20. package/dist/assets/{chunk-OYMX7WX6-CQAT-kvP.js → chunk-OYMX7WX6-Bd0Q_7rX.js} +1 -1
  21. package/dist/assets/{chunk-QZHKN3VN-Q98nSi6M.js → chunk-QZHKN3VN-CAsA3yuO.js} +1 -1
  22. package/dist/assets/{chunk-YZCP3GAM-DVI8PJQD.js → chunk-YZCP3GAM-koDLBRDb.js} +1 -1
  23. package/dist/assets/classDiagram-6PBFFD2Q-DIxbiWjL.js +1 -0
  24. package/dist/assets/classDiagram-v2-HSJHXN6E-DIxbiWjL.js +1 -0
  25. package/dist/assets/clone-DdX7TiWD.js +1 -0
  26. package/dist/assets/{cose-bilkent-S5V4N54A-xIPitAMf.js → cose-bilkent-S5V4N54A-DZf1mwhN.js} +1 -1
  27. package/dist/assets/{dagre-KV5264BT-BbSCasJv.js → dagre-KV5264BT-CoyMLIR8.js} +1 -1
  28. package/dist/assets/{diagram-5BDNPKRD-BHoJ1el8.js → diagram-5BDNPKRD-Djsx8Om-.js} +1 -1
  29. package/dist/assets/{diagram-G4DWMVQ6-Bq5eXRdC.js → diagram-G4DWMVQ6-IR3Z9SIW.js} +1 -1
  30. package/dist/assets/{diagram-MMDJMWI5-7p56RIQO.js → diagram-MMDJMWI5-TUdlJKCs.js} +1 -1
  31. package/dist/assets/{diagram-TYMM5635-CbVE-avc.js → diagram-TYMM5635-dE6LLI4N.js} +1 -1
  32. package/dist/assets/{erDiagram-SMLLAGMA-rfaQ57n7.js → erDiagram-SMLLAGMA-Dbl3_DA5.js} +1 -1
  33. package/dist/assets/{flowDiagram-DWJPFMVM-CRocX4iG.js → flowDiagram-DWJPFMVM-uZ6AjhW3.js} +1 -1
  34. package/dist/assets/{ganttDiagram-T4ZO3ILL-DeIZmyFR.js → ganttDiagram-T4ZO3ILL-VWPHYnwK.js} +1 -1
  35. package/dist/assets/{gitGraphDiagram-UUTBAWPF-Cr74Jxgd.js → gitGraphDiagram-UUTBAWPF-DKRLN0f1.js} +1 -1
  36. package/dist/assets/{graph-CNQvwryq.js → graph-DMOJ-VX2.js} +1 -1
  37. package/dist/assets/{index-DFWhTJN9.js → index-CIrnsaQS.js} +2 -2
  38. package/dist/assets/index-D4OUrcvS.css +1 -0
  39. package/dist/assets/{infoDiagram-42DDH7IO-BFA0Fouc.js → infoDiagram-42DDH7IO-nvzkBgvn.js} +1 -1
  40. package/dist/assets/{ishikawaDiagram-UXIWVN3A-DjpdHSVJ.js → ishikawaDiagram-UXIWVN3A-CA3nFN3p.js} +1 -1
  41. package/dist/assets/{journeyDiagram-VCZTEJTY-BXp82IFg.js → journeyDiagram-VCZTEJTY-d9xsZ8Yd.js} +1 -1
  42. package/dist/assets/{kanban-definition-6JOO6SKY-B9SYmCv8.js → kanban-definition-6JOO6SKY-D3bsT_7v.js} +1 -1
  43. package/dist/assets/{layout-0tZdmu24.js → layout-DuO7IWHx.js} +1 -1
  44. package/dist/assets/{linear-B8hOkc_x.js → linear-B928iyZ_.js} +1 -1
  45. package/dist/assets/{mermaid.core-BSWRD8yE.js → mermaid.core-CcE8BsIy.js} +4 -4
  46. package/dist/assets/{min-1aSd-oa0.js → min-CgMHjcOo.js} +1 -1
  47. package/dist/assets/{mindmap-definition-QFDTVHPH-CMEc5FcZ.js → mindmap-definition-QFDTVHPH-BkMM9jUI.js} +1 -1
  48. package/dist/assets/{pieDiagram-DEJITSTG-D42vvWaR.js → pieDiagram-DEJITSTG-HgCMufe4.js} +1 -1
  49. package/dist/assets/{quadrantDiagram-34T5L4WZ-BB9FFGmx.js → quadrantDiagram-34T5L4WZ-Ced0pZFH.js} +1 -1
  50. package/dist/assets/{requirementDiagram-MS252O5E-BaHoyqhI.js → requirementDiagram-MS252O5E-BnPPJ2sr.js} +1 -1
  51. package/dist/assets/{sankeyDiagram-XADWPNL6-DnOPT0zB.js → sankeyDiagram-XADWPNL6-d_U14FxJ.js} +1 -1
  52. package/dist/assets/{sequenceDiagram-FGHM5R23-iLAT7VEf.js → sequenceDiagram-FGHM5R23-yrmTmDlx.js} +1 -1
  53. package/dist/assets/{stateDiagram-FHFEXIEX-C4Qd5gTI.js → stateDiagram-FHFEXIEX-z6ITJtUk.js} +1 -1
  54. package/dist/assets/stateDiagram-v2-QKLJ7IA2-vbgNYNft.js +1 -0
  55. package/dist/assets/{timeline-definition-GMOUNBTQ-KtoXhsrQ.js → timeline-definition-GMOUNBTQ-CA-9LnCz.js} +1 -1
  56. package/dist/assets/{vennDiagram-DHZGUBPP-872kuRjQ.js → vennDiagram-DHZGUBPP-kjEHn01W.js} +1 -1
  57. package/dist/assets/{wardley-RL74JXVD-Dt_qgD8L.js → wardley-RL74JXVD-DBS4ToLP.js} +1 -1
  58. package/dist/assets/{wardleyDiagram-NUSXRM2D-BPeR96Ai.js → wardleyDiagram-NUSXRM2D-BpgxZLmX.js} +1 -1
  59. package/dist/assets/{xychartDiagram-5P7HB3ND-DSp30xYo.js → xychartDiagram-5P7HB3ND-D2SogsgK.js} +1 -1
  60. package/dist/index.html +2 -2
  61. package/findcc.js +24 -4
  62. package/interceptor.js +2 -2
  63. package/lib/context-watcher.js +3 -3
  64. package/lib/ensure-hooks.js +3 -3
  65. package/lib/updater.js +3 -3
  66. package/package.json +1 -1
  67. package/proxy.js +2 -1
  68. package/pty-manager.js +13 -2
  69. package/server.js +9 -5
  70. package/dist/assets/channel-Cra_2uB5.js +0 -1
  71. package/dist/assets/classDiagram-6PBFFD2Q-DZO1YSrB.js +0 -1
  72. package/dist/assets/classDiagram-v2-HSJHXN6E-DZO1YSrB.js +0 -1
  73. package/dist/assets/clone-ClSvKPUH.js +0 -1
  74. package/dist/assets/index-DCtZ2KSX.css +0 -1
  75. package/dist/assets/stateDiagram-v2-QKLJ7IA2-C7ZVbjTe.js +0 -1
package/README.md CHANGED
@@ -125,6 +125,8 @@ You can even scan a QR code to code from your mobile device:
125
125
 
126
126
  Fulfill your imagination of mobile programming. There's also a plugin mechanism — if you need to customize for your coding habits, stay tuned for plugin hooks updates.
127
127
 
128
+ **Voice input:** tap the microphone icon in the chat input for voice-to-text (Web Speech API; requires HTTPS or localhost, so it's hidden on LAN HTTP access). Alternatively, on Android use Gboard's built-in 🎤 key, and on iOS use the system dictation on the keyboard — both work offline and without any HTTPS requirement.
129
+
128
130
  ### Logger Mode (View Complete Claude Code Sessions)
129
131
 
130
132
  <img width="1500" height="768" alt="image" src="https://github.com/user-attachments/assets/a8a9f3f7-d876-4f6b-a64d-f323a05c4d21" />
package/cli.js CHANGED
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url';
6
6
  import { homedir } from 'node:os';
7
7
  import { spawn } from 'node:child_process';
8
8
  import { t } from './i18n.js';
9
- import { INJECT_IMPORT, resolveCliPath, resolveNativePath, resolveNpmClaudePath, buildShellCandidates, setLogDir, LOG_DIR, hasClaude2xWrapper, getGlobalNodeModulesDir, PACKAGES } from './findcc.js';
9
+ import { INJECT_IMPORT, resolveCliPath, resolveNativePath, resolveNpmClaudePath, buildShellCandidates, setLogDir, LOG_DIR, hasClaude2xWrapper, getGlobalNodeModulesDir, PACKAGES, getClaudeConfigDir } from './findcc.js';
10
10
  import { ensureHooks } from './lib/ensure-hooks.js';
11
11
 
12
12
  const __dirname = fileURLToPath(new URL('.', import.meta.url));
@@ -274,6 +274,10 @@ async function runProxyCommand(args) {
274
274
  }
275
275
  });
276
276
 
277
+ // 注入默认 --thinking-display summarized(用户已显式传入则不覆盖)
278
+ const { withDefaultThinkingDisplay } = await import('./pty-manager.js');
279
+ cmdArgs = withDefaultThinkingDisplay(cmdArgs);
280
+
277
281
  cmdArgs.unshift(settingsJson);
278
282
  cmdArgs.unshift('--settings');
279
283
 
@@ -650,7 +654,7 @@ if (isUninstall) {
650
654
 
651
655
  // 清理 statusLine 配置和脚本(兼容历史版本遗留)
652
656
  try {
653
- const settingsPath = resolve(homedir(), '.claude', 'settings.json');
657
+ const settingsPath = resolve(getClaudeConfigDir(), 'settings.json');
654
658
  if (existsSync(settingsPath)) {
655
659
  const settings = JSON.parse(readFileSync(settingsPath, 'utf-8'));
656
660
  if (settings.statusLine?.command?.includes('ccv-statusline')) {
@@ -659,13 +663,13 @@ if (isUninstall) {
659
663
  console.log('Cleaned statusLine config from settings.json');
660
664
  }
661
665
  }
662
- const ccvScript = resolve(homedir(), '.claude', 'ccv-statusline.sh');
666
+ const ccvScript = resolve(getClaudeConfigDir(), 'ccv-statusline.sh');
663
667
  if (existsSync(ccvScript)) {
664
668
  unlinkSync(ccvScript);
665
669
  console.log('Removed ccv-statusline.sh');
666
670
  }
667
671
  // 清理 context-window.json
668
- const ctxFile = resolve(homedir(), '.claude', 'context-window.json');
672
+ const ctxFile = resolve(getClaudeConfigDir(), 'context-window.json');
669
673
  if (existsSync(ctxFile)) {
670
674
  unlinkSync(ctxFile);
671
675
  }
@@ -0,0 +1,161 @@
1
+ # Custom UltraPlan Expert — Authoring Guide
2
+
3
+ ## What the two input fields do
4
+
5
+ - **Expert name**: the label shown on the role button in the UltraPlan variant row (30-char max). It's just a display name and is **never** sent to Claude Code.
6
+ - **Prompt body**: your role instruction. At send time cc-viewer **automatically** wraps it in `<system-reminder>...</system-reminder>` tags with a `[SCOPED INSTRUCTION]` scope header. So **write the body only** — do not add `<system-reminder>` tags yourself.
7
+
8
+ ---
9
+
10
+ ## What does the expert template look like?
11
+
12
+ Every built-in expert (Code Expert / Research Expert) is essentially a `<system-reminder>` block injected into Claude Code's context. Your custom expert goes through the exact same pipeline. Here's the **Research Expert** template broken down:
13
+
14
+ ```xml
15
+ <system-reminder>
16
+ [SCOPED INSTRUCTION] The following instructions are intended for the next 1–3
17
+ interactions. Once the task is complete, these instructions should be gradually
18
+ deprioritized and no longer influence subsequent interactions.
19
+
20
+ Leverage a multi-agent exploration mechanism to formulate an exceptionally
21
+ detailed implementation plan.
22
+
23
+ Instructions:
24
+ 1. Utilize the Agent tool to spawn parallel agents that simultaneously explore
25
+ various facets of the requirements:
26
+ - If necessary, deploy a preliminary investigator to conduct an initial
27
+ survey of industry-specific solutions using `webSearch`;
28
+ - If necessary, deploy a specialized investigator to research authoritative
29
+ sources—such as academic papers, news articles, and research reports—
30
+ using `webSearch`;
31
+ - Assign an agent to synthesize the target solution, while simultaneously
32
+ verifying the rigor and credibility of the gathered papers, news, and
33
+ research reports;
34
+ - If necessary, assign an agent to analyze competitor data to provide
35
+ supplementary analytical perspectives;
36
+ - If necessary, assign an agent to handle the implementation of a product
37
+ demo (generating outputs such as HTML, Markdown, etc.);
38
+ - If the task is sufficiently complex, you may assign additional teammates
39
+ to the roles defined above, or introduce other specialized roles; you are
40
+ permitted to schedule up to 5 teammates concurrently.
41
+
42
+ 2. Synthesize the findings from the aforementioned agents into a comprehensive,
43
+ step-by-step implementation plan.
44
+
45
+ 3. Utilize the Agent tool to spawn a set of parallel review agents; these
46
+ agents shall scrutinize the plan from multiple roles and perspectives to
47
+ identify any omitted steps and to propose reasonable additions or
48
+ optimizations.
49
+
50
+ 4. Consolidate the feedback received from the review agents, then invoke
51
+ `ExitPlanMode` to submit your final plan.
52
+
53
+ 5. Upon receiving the result from `ExitPlanMode`:
54
+ - If Approved: Proceed to execute the plan within this current session.
55
+ - If Rejected: Revise the plan based on the provided feedback, and then
56
+ invoke `ExitPlanMode` once again.
57
+ - If an Error Occurs: Do *not* follow the suggestions; prompt the user for
58
+ further instructions.
59
+
60
+ Your final plan must include the following elements:
61
+ - A clear summary of the proposed implementation strategy;
62
+ - An ordered list of files to be created or modified, specifying the exact
63
+ changes required for each;
64
+ - A step-by-step sequence for executing the implementation;
65
+ - Identification of potential risks and corresponding mitigation strategies;
66
+ - Creative ideation and suggestions for advanced enhancements;
67
+ - If a product demo was generated, place the corresponding demo output in an
68
+ appropriate location and notify the user.
69
+ </system-reminder>
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Section-by-section breakdown
75
+
76
+ ### 1. `[SCOPED INSTRUCTION]` scope header (wrapper — auto-generated)
77
+ > The following instructions are intended for the next 1–3 interactions...
78
+
79
+ This tells Claude Code: **these instructions are only active for the next 1–3 turns**, then fade out. Prevents the "expert persona" from leaking into unrelated conversation afterwards.
80
+
81
+ **This line is generated by cc-viewer automatically. You don't need to write it.**
82
+
83
+ ### 2. Opening task definition (**this is what you should rewrite**)
84
+ > Leverage a multi-agent exploration mechanism to formulate an exceptionally detailed implementation plan.
85
+
86
+ This is the "subject-verb-object" of the whole template: **it tells Claude Code the posture and objective**. The default "multi-agent exploration + implementation plan" fits **software engineering / planning** tasks well, but feels awkward for many other domains (content review, data analysis, copywriting, market research, compliance audit…).
87
+
88
+ **We strongly recommend rewriting this line for your objective**, for example:
89
+
90
+ - **Content reviewer**: "You are a senior content reviewer specializing in {domain}. Your goal is to identify factual inaccuracies, tone inconsistencies, and structural weaknesses in the provided material."
91
+ - **Competitive analyst**: "Conduct a rigorous competitive analysis for {product category}. Produce a comparison matrix, positioning insights, and strategic recommendations."
92
+ - **Copywriter**: "Generate multiple creative copy variants for {scenario}, each with distinct positioning, tone, and call-to-action strategy."
93
+
94
+ ### 3. Workflow steps (1–5 items — **trim or extend based on complexity**)
95
+
96
+ The Research Expert has 5 steps: **explore → synthesize → review → submit plan → execute**. This enforces "parallel multi-agent + cross-review + plan approval" — three layers of rigor, appropriate for high-stakes/wide-scope tasks but **overkill for lightweight ones**.
97
+
98
+ - **Simple task** (single lookup / small fix): drop the multi-agent dispatch and review; just "produce the answer" in one step.
99
+ - **Moderate task**: keep "explore → synthesize → review"; drop the ExitPlanMode dance; deliver the result directly.
100
+ - **Complex, high-cost task** (large refactor, multi-option comparison, cross-domain research): keep all 5 steps, possibly add a "risk model" or "option-comparison matrix" step.
101
+
102
+ ### 4. Sub-roles in Step 1 (**tailor to your domain**)
103
+
104
+ Research Expert lists 6 potential roles (industry scout, academic researcher, synthesizer + fact-checker, competitor analyst, demo producer, extensibility slot). **Rewrite this list for your scenario**:
105
+
106
+ - **Writing**: "source collector + style analyst + fact checker"
107
+ - **Data analysis**: "data-cleaning agent + statistical modeling agent + visualization agent"
108
+ - **Code audit**: "static-analysis agent + dependency-chain auditor + threat modeler"
109
+
110
+ ### 5. Final deliverable checklist (**align with your real need**)
111
+
112
+ > Your final plan must include the following elements: ...
113
+
114
+ The original template lists 6 elements of an "implementation plan". Your deliverable could be something else entirely:
115
+
116
+ - A **research report** → "Executive summary / Methodology / Key findings / Limitations / Action recommendations"
117
+ - A **review report** → "Issue list / Severity rating / Fix suggestions / Before-after examples"
118
+ - A **comparison matrix** → "Dimension definitions / Scoring rubric / Conclusions / Recommendation rationale"
119
+
120
+ ---
121
+
122
+ ## Authoring tips (TL;DR)
123
+
124
+ 1. **Keep the wrapper**: `<system-reminder>` + `[SCOPED INSTRUCTION]` line is added by cc-viewer — don't repeat.
125
+ 2. **Rewrite the opening sentence**: state the role, goal, and output format in one line.
126
+ 3. **Flex the workflow**: 1–2 steps for light tasks, the full 5-step loop only for complex ones.
127
+ 4. **Rewrite Step 1 sub-roles**: the defaults (academic papers / competitors / demo) are probably not what you want.
128
+ 5. **The final "deliverable checklist" is your quality bar**: spell out the output structure — Claude Code will follow it strictly.
129
+
130
+ ---
131
+
132
+ ## A refactored example: Competitive Analyst
133
+
134
+ ```
135
+ You are a senior competitive intelligence analyst for {industry}. Your goal is to
136
+ produce a decision-grade competitive landscape report for the product "{our product}".
137
+
138
+ Instructions:
139
+ 1. Use the Agent tool to dispatch 3 parallel investigators:
140
+ - Market landscape agent: map the top 5–8 competitors with core positioning
141
+ - Feature matrix agent: compile a feature-by-feature comparison using
142
+ publicly available sources (webSearch)
143
+ - Pricing & GTM agent: analyze pricing models, distribution channels, and
144
+ go-to-market motions
145
+
146
+ 2. Synthesize the three streams into a unified competitive report.
147
+
148
+ 3. Dispatch one review agent to stress-test the report: challenge any
149
+ assumption lacking a cited source, flag outdated data (>12 months), and
150
+ propose one "non-obvious" insight.
151
+
152
+ 4. Deliver the final report with the following sections:
153
+ - TL;DR (3 bullets)
154
+ - Competitor positioning map
155
+ - Feature matrix (markdown table)
156
+ - Pricing & GTM table
157
+ - Top 3 strategic implications for our product
158
+ - Caveats & data gaps
159
+ ```
160
+
161
+ Compared to the original Research Expert: trimmed to 4 steps, sub-roles reduced from 6 to 3, deliverable list fully rewritten as "report sections".
@@ -0,0 +1,158 @@
1
+ # 自定义 UltraPlan 专家 — 使用说明
2
+
3
+ ## 两个输入框的作用
4
+
5
+ - **专家名称**:显示在 UltraPlan 弹窗变体行里的按钮标题,30 字符以内。只是一个标签,不会被发送给 Claude Code。
6
+ - **提示词正文**:你写给 Claude Code 的"角色指令"。发送时会被**自动**用 `<system-reminder>...</system-reminder>` 标签包裹,并在最前面加上一行 `[SCOPED INSTRUCTION]` 的作用域声明。所以你**只需要写正文**,不要自己加 `<system-reminder>` 标签。
7
+
8
+ ---
9
+
10
+ ## 专家模版是什么样的
11
+
12
+ 所有内置专家(代码专家 / 调研专家)本质上都是一段注入到 Claude Code 上下文里的 `<system-reminder>`。你的自定义专家会走一模一样的管道。下面以**调研专家**为例拆解给你看:
13
+
14
+ ```xml
15
+ <system-reminder>
16
+ [SCOPED INSTRUCTION] The following instructions are intended for the next 1–3
17
+ interactions. Once the task is complete, these instructions should be gradually
18
+ deprioritized and no longer influence subsequent interactions.
19
+
20
+ Leverage a multi-agent exploration mechanism to formulate an exceptionally
21
+ detailed implementation plan.
22
+
23
+ Instructions:
24
+ 1. Utilize the Agent tool to spawn parallel agents that simultaneously explore
25
+ various facets of the requirements:
26
+ - If necessary, deploy a preliminary investigator to conduct an initial
27
+ survey of industry-specific solutions using `webSearch`;
28
+ - If necessary, deploy a specialized investigator to research authoritative
29
+ sources—such as academic papers, news articles, and research reports—
30
+ using `webSearch`;
31
+ - Assign an agent to synthesize the target solution, while simultaneously
32
+ verifying the rigor and credibility of the gathered papers, news, and
33
+ research reports;
34
+ - If necessary, assign an agent to analyze competitor data to provide
35
+ supplementary analytical perspectives;
36
+ - If necessary, assign an agent to handle the implementation of a product
37
+ demo (generating outputs such as HTML, Markdown, etc.);
38
+ - If the task is sufficiently complex, you may assign additional teammates
39
+ to the roles defined above, or introduce other specialized roles; you are
40
+ permitted to schedule up to 5 teammates concurrently.
41
+
42
+ 2. Synthesize the findings from the aforementioned agents into a comprehensive,
43
+ step-by-step implementation plan.
44
+
45
+ 3. Utilize the Agent tool to spawn a set of parallel review agents; these
46
+ agents shall scrutinize the plan from multiple roles and perspectives to
47
+ identify any omitted steps and to propose reasonable additions or
48
+ optimizations.
49
+
50
+ 4. Consolidate the feedback received from the review agents, then invoke
51
+ `ExitPlanMode` to submit your final plan.
52
+
53
+ 5. Upon receiving the result from `ExitPlanMode`:
54
+ - If Approved: Proceed to execute the plan within this current session.
55
+ - If Rejected: Revise the plan based on the provided feedback, and then
56
+ invoke `ExitPlanMode` once again.
57
+ - If an Error Occurs: Do *not* follow the suggestions; prompt the user for
58
+ further instructions.
59
+
60
+ Your final plan must include the following elements:
61
+ - A clear summary of the proposed implementation strategy;
62
+ - An ordered list of files to be created or modified, specifying the exact
63
+ changes required for each;
64
+ - A step-by-step sequence for executing the implementation;
65
+ - Identification of potential risks and corresponding mitigation strategies;
66
+ - Creative ideation and suggestions for advanced enhancements;
67
+ - If a product demo was generated, place the corresponding demo output in an
68
+ appropriate location and notify the user.
69
+ </system-reminder>
70
+ ```
71
+
72
+ ---
73
+
74
+ ## 逐段解释
75
+
76
+ ### 1. `[SCOPED INSTRUCTION]` 作用域声明(外壳,自动生成)
77
+ > The following instructions are intended for the next 1–3 interactions...
78
+
79
+ 这行告诉 Claude Code:这段指令**只在未来 1–3 轮对话中强制执行**,任务完成后就淡出,不再影响后续交互。避免"专家人格"污染到任务之外的对话。
80
+
81
+ **这行由 ccv 自动生成,你不需要写。**
82
+
83
+ ### 2. 首段任务定义(**这段最值得你改**)
84
+ > Leverage a multi-agent exploration mechanism to formulate an exceptionally detailed implementation plan.
85
+
86
+ 这是整段模板的"主谓宾":**告诉 Claude Code 要以什么姿态、为什么目标工作**。默认的"多代理探索 + 实施计划"适合**软件研发/规划型**任务,但对很多其他场景(内容审校、数据分析、文案创意、市场研究、合规审查……)就不贴切。
87
+
88
+ **建议你根据自己的目标改写这一段**,比如:
89
+ - **内容审校专家**:"You are a senior content reviewer specializing in {领域}. Your goal is to identify factual inaccuracies, tone inconsistencies, and structural weaknesses in the provided material."
90
+ - **竞品分析专家**:"Conduct a rigorous competitive analysis for {产品类别}. Produce a comparison matrix, positioning insights, and strategic recommendations."
91
+ - **文案创意专家**:"Generate multiple creative copy variants for {场景}, each with distinct positioning, tone, and call-to-action strategy."
92
+
93
+ ### 3. 工作流步骤(1–5 项,**根据任务复杂度适当精简或扩展**)
94
+
95
+ 调研专家原模板是 5 步:**探索 → 汇总 → 审查 → 提交计划 → 执行**。这套流程自带"多代理并行 + 交叉审查 + 计划审批"三层保障,适合跨度大、代价高的任务。但对很多轻量任务**过重了**,建议:
96
+
97
+ - **任务简单**(单点查询/小改动):删掉多代理 agent 派遣、删掉并行审查,直接 1 步"给出结论"。
98
+ - **任务中等**:保留"探索 → 综合 → 审查"三步,删掉 ExitPlanMode 环节,直接产出结果。
99
+ - **任务复杂、代价高**(大重构、多方案对比、跨多个领域调研):保留 5 步,甚至增加"风险建模"或"方案对比矩阵"步骤。
100
+
101
+ ### 4. Step 1 的子角色列表(**按领域裁剪**)
102
+
103
+ 调研专家派了 6 种潜在角色(industry 调研员、学术调研员、综合 + 核实、竞品、Demo 产出、扩展角色)。**根据你的场景重新列清单**:
104
+ - 写作类:可能需要"资料收集员 + 风格分析员 + 事实核查员"
105
+ - 数据分析:可能需要"数据清洗员 + 统计建模员 + 可视化员"
106
+ - 代码审计:可能需要"静态扫描员 + 依赖链审计员 + 威胁建模员"
107
+
108
+ ### 5. 最终产出清单(**对齐你的真正诉求**)
109
+
110
+ > Your final plan must include the following elements: ...
111
+
112
+ 原模板要求的是"实施计划"的 6 个要素,但你的任务产出可能是:
113
+ - 一份研究报告 → 改为"摘要 / 方法论 / 核心发现 / 限制 / 行动建议"
114
+ - 一份审校报告 → 改为"问题清单 / 严重度分级 / 修改建议 / 改后示例"
115
+ - 一份对比矩阵 → 改为"维度定义 / 打分标准 / 结论 / 优选理由"
116
+
117
+ ---
118
+
119
+ ## 写作建议(TL;DR)
120
+
121
+ 1. **保留外壳**(`<system-reminder>` 和 `[SCOPED INSTRUCTION]` 那行 ccv 自动加,你别重复写)。
122
+ 2. **重点改首段**:用一句话明确角色、目标、产出形式。
123
+ 3. **流程视复杂度伸缩**:轻量任务 1–2 步够了,复杂任务才走 5 步的多代理 + 审查闭环。
124
+ 4. **Step 1 的子角色按领域重写**:默认那些(academic papers / competitor / demo)大概率不是你要的。
125
+ 5. **最后的"产出清单"是 quality bar**:写清楚你期望的输出结构,Claude Code 会严格按这个出结果。
126
+
127
+ ---
128
+
129
+ ## 一个改好的例子(竞品分析专家)
130
+
131
+ ```
132
+ You are a senior competitive intelligence analyst for {行业}. Your goal is to
133
+ produce a decision-grade competitive landscape report for the product "{我方产品}".
134
+
135
+ Instructions:
136
+ 1. Use the Agent tool to dispatch 3 parallel investigators:
137
+ - Market landscape agent: map the top 5–8 competitors with core positioning
138
+ - Feature matrix agent: compile a feature-by-feature comparison using
139
+ publicly available sources (webSearch)
140
+ - Pricing & GTM agent: analyze pricing models, distribution channels, and
141
+ go-to-market motions
142
+
143
+ 2. Synthesize the three streams into a unified competitive report.
144
+
145
+ 3. Dispatch one review agent to stress-test the report: challenge any
146
+ assumption lacking a cited source, flag outdated data (>12 months), and
147
+ propose one "non-obvious" insight.
148
+
149
+ 4. Deliver the final report with the following sections:
150
+ - TL;DR (3 bullets)
151
+ - Competitor positioning map
152
+ - Feature matrix (markdown table)
153
+ - Pricing & GTM table
154
+ - Top 3 strategic implications for our product
155
+ - Caveats & data gaps
156
+ ```
157
+
158
+ 这份相比调研专家原版:精简到 4 步,子角色从 6 个减到 3 个,产出清单完全重写成"报告章节"。