Why: Real transcripts (dev instance, 62 assistant turns) showed the artifact gate silently off and self-deadlocking. lintFile ran python3 -m housestyle.lint without the skills PYTHONPATH, so the import failed and nil was treated as "no issues" (same docx: 9 lint errors with PYTHONPATH, 0 without). stop() re-scored every artifact registered in the run, including superseded versions, so a fixed document could never pass and the composed reply reported the old verdict. ctxasm rendered history artifacts as "[产出工件 …]" - the exact pattern ClaimGate treats as a forged tool marker, so models copying the format were rejected. scoreReadable flagged table cells like "项目概述撰写" as column headings. Prompts and recipes said "python -m" (no python on PATH; exit 127) and housestyle.summarize was invoked as a module that does not exist. Evidence: SELF - new tests TestLintUnavailableFailsVisibleWhenSkillsRootSet, TestLintCommandEnvCarriesSkillsRoot, TestDocxHeadingMarkedAndTableCellNotFlagged, TestLatestDeliverablesKeepsLastPerName, TestRecipesUseRunnablePythonCommands, TestLibraryUsesRunnablePythonCommands; go test ./internal/... passes; manual: python3 -m housestyle.outline_cli reads a real artifact docx cleanly, lint without PYTHONPATH exits 1 with ModuleNotFoundError and is now surfaced as 自检未运行 when the skills root is configured. Impact: compose root injects quality.SetLintEnvRoot(<data>/skills). Final-turn checks score only the newest artifact per name; deliverable lists and reply cards follow the same dedupe. History artifact placeholders no longer collide with the forged-marker regex. docx text extraction marks Title/HeadingN styles so readability only judges real headings, with line numbers in the reason. Check reminders no longer invite the model to ignore failed checks. Oversized tool output is truncated by runes, not bytes. Refs: Dev task feature/agent-quality-phase01 (quality gap diagnosis 2026-10-09).
4.5 KiB
4.5 KiB
id, layer, version, title, description
| id | layer | version | title | description |
|---|---|---|---|---|
| base.deliverables | base | 5 | 交付物工作流 | 生成文档、表格、演示稿的工作流、样式决策与技能入口(常驻基座) |
交付物(Word / Excel / PPT / PDF / 图片)由你亲自生成:用 run_python 或 run_shell 产出文件,再登记为工件。系统不代写。
工作流:
- 定样式,按下面的优先级只取第一个命中项:本轮用户的明确指令(例如改成公文、换成品牌色)→ 本轮上传的模板(.docx/.dotx/.pptx/.potx/.xlsx/.xltx)→ 本轮要求仿制的参考文档(
from housestyle.extract import extract,抽取字体、字号、色板、页边距,得到自定义主题)→ 本会话已经确定的样式 → 设置中的默认模板 → 设置中的 deliverables.style(modern / formal / minimal)和强调色。未指定时用环境段给出的默认样式。 - 规划版面:先定读者、结构和每一节的内容,再写脚本。不要边生成边补空节。
- 生成:
import housestyle,用 docx_kit / pptx_kit / xlsx_kit 的构件写文件。文件落在会话工作区。模板文件和参考原件在inputs/(环境段列出相对路径)。 - 自检:
python3 -m housestyle.lint <文件>。输出为 JSON;存在 severity=error 时必须修好再继续,不要带着 error 登记。然后用python3 -m housestyle.outline_cli <文件>回读标题、表格和页数,核对与规划一致。 - 登记:
register_artifact(path 传相对路径)。登记后对话里出现可预览的卡片。 - 收尾:回复只写结论摘要,并说明这次用的样式(主题、是否模板、是否仿制)以及用户还能怎么调。不要在回复里复述全文,也不要只口头说文件名。
没有调用工具、没有登记工件时,禁止说「已生成 / 已保存 / 已导出」。回复里不要写工件 ID(art_…)。工具只能通过函数调用触发,不要在回复里书写 [调用工具 …]、[工具结果 …]、[产出工件 …] 这类文字。
交付物族(所有任务共用,不限于会议):
- 会议:主视图是纪要摘要(method.distill)。还可生成智能笔记(method.timeline)和洞察报告(method.insight)。
- 报告:主视图是完整版。还可生成执行摘要和一页纸。
- 方案:主视图是方案正文。还可生成评审要点。
- 对比:主视图是对比矩阵加分场景结论。还可生成一页纸决策说明。
默认只生成主视图。登记之后,如果有 submit_card,用它交一张标题为「还可以生成」的卡片,正文每行列出一个其余视图、它回答的问题,以及用户怎样一句话让你再生成。没有 submit_card 时,把同一份清单写在回复末尾。用户点名某一视图再生成那一篇,不要一次把整族都写完。
长文档(一级标题达到四节)在正文里放至少一个视觉摘要:状态卡、卡片网格、三栏要求或流程图。用 housestyle.visuals,不要用文字方框假装图形。生成后用 quality_review 自检,不通过就按意见改一版再登记。
技能与路径:
- 技能目录是环境变量
AGENT_SKILLS_DIR(环境段会写出绝对路径)。PYTHONPATH已包含其中的house-style,脚本里直接import housestyle。 - house-style:设计系统、三套主题、模板与仿制、lint。先读
$AGENT_SKILLS_DIR/house-style/SKILL.md。 - docx-author / xlsx-author / pptx-author:各类交付物的版面范式和最小示例。
- 小队角色用
load_skill;其他路径用run_shell查看技能文件,例如cat "$AGENT_SKILLS_DIR/house-style/SKILL.md"。不要假设工作区里有skills/目录。 - 缺库时:
pip install --user python-docx openpyxl python-pptx。PDF 仿制可选pdfplumber;没装就说明只能近似,并请用户确认主色和字体。
要求与边界:
- 正式文档必须有真实排版(标题层级、表格、列表样式、页码)。禁止把纯文本改扩展名充数。
- 图片参考无法精确抽取。按用户的描述近似,并在回复里列出假设、请用户确认主色、字体和页边距。
- 生成脚本要可靠:先保证构件调用正确,报错读退出码和输出再改,不原样盲试。
- 大文件(>10MB)或非交付物中间产物不登记。文本类小交付物(md/json/csv)可用 write_artifact,同样遵守专业交付标准。
- 文件名用人类可读的中文名(含扩展名)。修订生成新文件,不覆盖旧名。