Loading...
Loading...
Compare original and translation side by side
references/perspective-prompts.mdreferences/perspective-prompts.md/do-perspectives/do-perspectives/do-parallel <target-name> <source-path>undefined/do-parallel <target-name> <source-path>undefined
- Determine if target is an agent or skill based on which path exists
- Read target file to understand current state, capture line count
- If target does not exist in either location, stop and report error
**Step 3: Validate source material**
```markdown
- 根据路径存在情况判断目标是Agent还是Skill
- 读取目标文件以了解当前状态,记录行数
- 如果目标在任一位置都不存在,停止并报告错误
**步骤3:验证源材料**
```markdown
- Read source file, confirm it is non-empty
- Estimate word count. If over 5,000 words, warn about elevated token cost.
- If material fails 2+ quality indicators, recommend inline analysis instead and ask user to confirm
**Step 4: Estimate token budget**
| Component | Estimated Tokens |
|-----------|-----------------|
| 10 agents x source material | source_words x 10 x ~3 |
| 10 agent outputs | ~5,000 (500 words each) |
| Synthesis | ~3,000 |
| Application | ~5,000 |
| **Total** | **sum of above** |
If total exceeds 60,000 tokens, warn user and request confirmation before proceeding.
**Gate**: Target exists and is readable. Source material is present and substantive. Token estimate is acceptable. Proceed only when gate passes.
- 读取源文件,确认非空
- 估算字数。如果超过5000字,警告Token成本过高。
- 如果材料未满足2个及以上质量指标,建议使用单线程分析并请求用户确认
**步骤4:估算Token预算**
| 组件 | 估算Token数量 |
|-----------|-----------------|
| 10个Agent × 源材料 | 源文件字数 × 10 × ~3 |
| 10个Agent输出结果 | ~5000(每个500字) |
| 整合阶段 | ~3000 |
| 应用阶段 | ~5000 |
| **总计** | **以上各项之和** |
如果总计超过60000个Token,警告用户并请求确认后再继续。
**准入条件**:目标存在且可读,源材料存在且有实质内容,Token估算在可接受范围内。仅当所有条件满足时才可继续。references/perspective-prompts.mdAgent running > 5 minutes?
|
+-- YES --> Check progress (non-blocking)
| |
| +-- Making progress? --> Wait 2 more minutes
| |
| +-- Stuck on web fetch? --> Mark as timed out, proceed
|
+-- NO --> Continue waiting| Agents Completed | Action |
|---|---|
| 8-10 of 10 | Full pipeline, excellent coverage |
| 5-7 of 10 | Proceed, note gaps in report |
| 3-4 of 10 | Proceed with caution, synthesis will be thinner |
| 1-2 of 10 | Abort parallel approach, fall back to inline analysis |
| 0 of 10 | Critical failure, investigate cause |
references/perspective-prompts.mdAgent运行超过5分钟?
|
+-- 是 --> 检查进度(非阻塞)
| |
| +-- 正在推进? --> 再等待2分钟
| |
| +-- 卡在网络请求? --> 标记为超时,继续执行
|
+-- 否 --> 继续等待| 完成的Agent数量 | 操作 |
|---|---|
| 8-10个 | 完整流程,覆盖全面 |
| 5-7个 | 继续执行,在报告中说明缺口 |
| 3-4个 | 谨慎继续,整合结果会较简略 |
| 1-2个 | 终止并行方式, fallback到单线程分析 |
| 0个 | 严重故障,调查原因 |
| Rule | Struct | Clarity | Tech | Audience | Evidence | Narrative | Para | Header | Complex | Nuance | Count |
|------|--------|---------|------|----------|----------|-----------|------|--------|---------|--------|-------|
| [Rule A] | X | X | | X | | X | | | X | | 5 |
| [Rule B] | | | X | | X | | X | X | | X | 4 |undefined| 规则 | 结构 | 清晰度 | 技术 | 受众 | 证据 | 叙事 | 段落 | 标题 | 复杂度 | 细微差别 | 计数 |
|------|--------|---------|------|----------|----------|-----------|------|--------|---------|--------|-------|
| [规则A] | X | X | | X | | X | | | X | | 5 |
| [规则B] | | | X | | X | | X | X | | X | 4 |undefined
**Step 5: Save synthesis document**
- Write to `skills/do-parallel/artifacts/synthesis-{target}-{date}.md`
- Include the cross-reference matrix, themes, and prioritized rules
- This artifact persists for future reference and can inform later analyses
**Gate**: Synthesis document exists with at least 3 Must-Have and 3 Should-Have rules. Proceed only when gate passes.
**步骤5:保存整合文档**
- 写入`skills/do-parallel/artifacts/synthesis-{target}-{date}.md`
- 包含交叉引用矩阵、主题和优先级规则
- 该工件将永久留存,用于未来参考和后续分析
**准入条件**:整合文档存在,且包含至少3条必备规则和3条推荐规则。仅当满足条件时才可继续。undefinedundefined
**Step 2: Plan application**
Map each Priority 1 and Priority 2 rule to a specific location in the target:
```markdown
**步骤2:规划应用方案**
将每个优先级1和优先级2的规则映射到目标中的具体位置:
```markdown| Rule | Action | Target Section | Risk |
|---|---|---|---|
| [Rule 1] | Add subsection | Operator Context | LOW |
| [Rule 2] | Enhance existing | Instructions Phase 2 | LOW |
| [Rule 3] | Add new section | After Anti-Patterns | MEDIUM |
**Step 3: Apply Priority 1 rules**
- Add or enhance sections based on Must-Have recommendations
- Preserve all existing working patterns
- After each rule application, verify target file is still valid markdown
**Step 4: Apply Priority 2 rules**
- Add Should-Have enhancements where they integrate naturally
- Do NOT force rules that conflict with existing patterns
- If a Should-Have rule conflicts with an existing pattern, document the conflict in the report and skip
**Step 5: Commit changes**
- Create descriptive git commit explaining what was improved and from what source
- Bump version if target is a skill (e.g., 1.0.0 to 1.1.0)
**Gate**: Target file has been modified. Changes preserve existing behavior. Before/after diff shows additions only (no deletions of existing content). Proceed only when gate passes.| 规则 | 操作 | 目标章节 | 风险 |
|---|---|---|---|
| [规则1] | 添加子章节 | 操作者上下文 | 低 |
| [规则2] | 增强现有内容 | 操作步骤阶段2 | 低 |
| [规则3] | 添加新章节 | 反模式之后 | 中 |
**步骤3:应用优先级1规则**
- 根据必备建议添加或增强章节
- 保留所有现有有效模式
- 每条规则应用后,验证目标文件仍是有效的Markdown
**步骤4:应用优先级2规则**
- 在自然整合的地方添加推荐增强内容
- 绝不强制应用与现有模式冲突的规则
- 如果推荐规则与现有模式冲突,在报告中记录冲突并跳过该规则
**步骤5:提交变更**
- 创建描述性Git提交信息,说明优化内容及来源
- 如果目标是Skill,升级版本(例如从1.0.0到1.1.0)
**准入条件**:目标文件已修改,变更保留了现有行为,前后对比显示仅添加了内容(未删除现有内容)。仅当满足条件时才可继续。undefinedundefined
If any check fails, revert the problematic change and re-apply.
**Step 2: Generate completion report**
Use template from `references/perspective-prompts.md`. The report MUST include:
- Per-perspective key insights (one sentence each)
- Cross-reference showing which perspectives contributed to each improvement
- Before/after comparison (line counts, section counts)
- Estimated token usage breakdown
- Recommendations for future improvements
**Step 3: Save completion report**
- Write to `skills/do-parallel/artifacts/report-{target}-{date}.md`
- Present summary to user in conversation
**Step 4: Present results**
```markdown
如果任何检查项失败,回滚问题变更并重新应用。
**步骤2:生成完成报告**
使用`references/perspective-prompts.md`中的模板。报告必须包含:
- 每个视角的关键洞察(各一句话)
- 交叉引用,展示各视角对每项优化的贡献
- 前后对比(行数、章节数)
- 估算Token使用明细
- 未来优化建议
**步骤3:保存完成报告**
- 写入`skills/do-parallel/artifacts/report-{target}-{date}.md`
- 在对话中向用户展示摘要
**步骤4:呈现结果**
```markdown
**Gate**: Completion report exists. Target file is valid. All phases documented.
---
**准入条件**:完成报告存在,目标文件有效,所有阶段均已记录。
---/do-parallel technical-journalist-writer expert-writing-guide.md/do-parallel technical-journalist-writer expert-writing-guide.md/do-parallel systematic-debugging postgres-debugging-guide.md/do-parallel systematic-debugging postgres-debugging-guide.md| Phase | Token Range | Notes |
|---|---|---|
| Phase 1: Validate | 500-1,000 | Reading target + source |
| Phase 2: Analysis | 20,000-50,000 | 10 agents x (source + output) |
| Phase 3: Synthesize | 2,000-5,000 | Cross-reference + prioritization |
| Phase 4: Apply | 3,000-8,000 | Reading target + modifications |
| Phase 5: Verify | 1,000-2,000 | Integrity checks + report |
| Total | 26,500-66,000 | 3-5x inline analysis cost |
| 阶段 | Token范围 | 说明 |
|---|---|---|
| 阶段1:验证 | 500-1000 | 读取目标和源材料 |
| 阶段2:分析 | 20000-50000 | 10个Agent ×(源材料 + 输出) |
| 阶段3:整合 | 2000-5000 | 交叉引用 + 优先级排序 |
| 阶段4:应用 | 3000-8000 | 读取目标 + 修改 |
| 阶段5:验证 | 1000-2000 | 完整性检查 + 报告 |
| 总计 | 26500-66000 | 是单线程分析成本的3-5倍 |
Estimated tokens = (source_words * 3 * 10) + 15,000
Example: 2,000-word article
= (2,000 * 3 * 10) + 15,000
= 60,000 + 15,000
= ~75,000 tokens (HIGH - consider trimming source or reducing perspectives)
Example: 800-word article
= (800 * 3 * 10) + 15,000
= 24,000 + 15,000
= ~39,000 tokens (ACCEPTABLE)估算Token数 = (源文件字数 × 3 × 10) + 15000
示例:2000字文章
= (2000 × 3 × 10) + 15000
= 60000 + 15000
= ~75000个Token(高成本 - 考虑精简源材料或减少视角)
示例:800字文章
= (800 × 3 × 10) + 15000
= 24000 + 15000
= ~39000个Token(可接受)ls agents/*.mdls skills/*/SKILL.mdls agents/*.mdls skills/*/SKILL.md/do-perspectives/do-perspectives| Rationalization | Why It's Wrong | Required Action |
|---|---|---|
| "Source is simple, 10 perspectives overkill" | Simple source = use inline analysis instead | Check material depth in Phase 1, downgrade if thin |
| "3 perspectives returned, close enough" | 3 is minimum for synthesis, not ideal | Wait for timeout threshold, then proceed with available |
| "I can synthesize as I go" | Per-perspective application misses cross-cutting themes | Complete all collection before ANY synthesis |
| "Existing patterns in target are outdated" | Existing patterns may work; new rules ADD, never replace | Preserve all existing content, add depth only |
| 合理化借口 | 问题所在 | 要求的操作 |
|---|---|---|
| 「源材料简单,10个视角是过度设计」 | 简单材料应使用单线程分析 | 在阶段1检查材料深度,若单薄则降级为单线程分析 |
| 「3个视角返回结果,足够了」 | 3个是整合的最低要求,而非理想状态 | 等待超时阈值后,使用已有结果继续 |
| 「我可以边收集边整合」 | 逐视角应用会错过跨领域主题 | 收集完所有结果后再开始整合 |
| 「目标中的现有模式已过时」 | 现有模式可能仍有效,新规则仅用于补充,绝不替换 | 保留所有现有内容,仅添加深度 |
${CLAUDE_SKILL_DIR}/references/perspective-prompts.md${CLAUDE_SKILL_DIR}/references/perspective-prompts.md