mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-14 02:42:04 +08:00
- Implemented main render function for the issue discovery view. - Added data loading functions to fetch discoveries, details, findings, and progress. - Created rendering functions for discovery list and detail sections. - Introduced filtering and searching capabilities for findings. - Implemented actions for exporting and dismissing findings. - Added polling mechanism to track discovery progress. - Included utility functions for HTML escaping and cleanup.
1.8 KiB
1.8 KiB
Phase 3.5: Consolidation
使用 universal-executor 子 Agent 执行质量检查,避免主 Agent 内存溢出。
核心原则
主 Agent 负责编排,子 Agent 负责繁重计算。
执行流程
const agentResults = JSON.parse(Read(`${workDir}/agent-results.json`));
// 委托给 universal-executor 执行整合检查
const result = Task({
subagent_type: 'universal-executor',
run_in_background: false,
prompt: buildConsolidationPrompt(workDir)
});
const consolidationResult = JSON.parse(result);
Prompt 构建
function buildConsolidationPrompt(workDir) {
return `
[ROLE] Quality Analyst
[TASK]
检查所有章节的一致性和完整性
[INPUT]
- 章节文件: ${workDir}/sections/section-*.md
- Agent 结果: ${workDir}/agent-results.json
[CHECKS]
1. Markdown 语法有效性
2. 截图标记格式 (<!-- SCREENSHOT: id="..." -->)
3. 交叉引用有效性
4. 术语一致性
5. 代码块语言标注
[OUTPUT]
1. 写入 ${workDir}/consolidation-summary.md
2. 写入 ${workDir}/screenshots-list.json (截图清单)
[RETURN JSON]
{
"status": "completed",
"sections_checked": <n>,
"screenshots_found": <n>,
"issues": { "errors": <n>, "warnings": <n> },
"quality_score": <0-100>
}
`;
}
Agent 职责
- 读取章节 → 逐个检查 section-*.md
- 提取截图 → 收集所有截图标记
- 验证引用 → 检查交叉引用有效性
- 评估质量 → 计算综合分数
- 输出报告 → consolidation-summary.md
输出
consolidation-summary.md- 质量报告screenshots-list.json- 截图清单(供 Phase 4 使用)
质量门禁
- 无错误
- 总分 >= 60%
- 交叉引用有效