Squashed 'docs/standards/playbook/' changes from e504a68..b529012

b529012  test(tests): avoid hardcoded missing path
07583c8 🐛 fix(tests): make doc link check awk-portable
6244aa3 🔧 chore(ci): relax gitattributes check
31dd0c5 🐛 fix(scripts): require existing project root
15d4d63 🔧 chore(ci): install python3-pip
90c6313 🔧 chore(ci): run tests in a single job
d84eff0 🔧 chore(ci): make actions base url configurable
395598d 🔧 chore(ci): fix yaml step names
4ae2733  feat(sync_standards): auto-detect existing languages
e97fb00  feat(sync_standards): default gitattributes to append
da0ef2b  test: add automated tests and ci workflow
99bef30 🎨 style(markdown): format all markdown files with prettier
7e96bc8 ♻️ refactor(tsl): split function.md into 44 modular files
0d6b2a0 📝 docs(readme): add quick decision table and TL;DR for distribution methods
3b2188f 🎨 style(markdown): format markdown files with prettier
41fc43b 📝 docs(tsl): document {Unit.}Type source annotation
3dceaf7 📝 docs(tsl): clarify tsf-only top-level rules and type annotations
3a63829 📝 docs(skills): add create-plan skill
f02a707 🐛 fix(scripts): escape markdown backticks in vendor_playbook
064aa92 🐛 fix(scripts): correct bat scripts
4881feb 🔧 chore(gitattributes): enforce crlf for bat files
1fa3e2a 🐛 fix(scripts): escape parentheses in sync_standards output
3958cad 📝 docs(vendor_playbook): mention ci templates
9d059cf  feat(templates): add gitea ci example
a52bb24 📝 docs(codex_skills): normalize markdown formatting
cc8ad4c 📝 docs(skills): slim commit-message
2a98e15 🐛 fix(skills): quote YAML descriptions
8f78d22 🐛 fix(sync_standards): generate minimal AGENTS.md
5547665  feat(skills): add commit-message suggestion skill
3fe8bd7 🔧 chore(sync_standards): create AGENTS.md on sync
283d311  feat(playbook): add syntax book and codex skills tooling
5b97ed5 📝 docs(tsl): clarify syntax references
27e0700  feat(skills): add pdf/docx/pptx/xlsx wrapper workflows
5551363  feat(skills): add debugging and bulk refactor workflows
1d4f548  feat(skills): add built-in workflow skills
c0895dd 📝 docs(skills): add anthropics document-skills integration
cf9f80d 🔧 chore(playbook): add Claude Code skills guide and align python templates

git-subtree-dir: docs/standards/playbook
git-subtree-split: b529012c59c5d67c3073884d7b617763647417fd
This commit is contained in:
csh
2026-01-08 15:56:36 +08:00
parent eada742d75
commit ac794a6a70
113 changed files with 254751 additions and 176 deletions
+56
View File
@@ -0,0 +1,56 @@
---
name: xlsx-workflow
description:
"XLSX workflow: edit spreadsheets, formulas, formatting, charts, validations;
recalc and ensure zero-error checks. Triggers: xlsx workflow, Excel表格,
改公式, 数据透视表, 生成报表, 对账, #REF, #DIV/0."
---
# XLSX WorkflowExcel / 公式与校验)
## When to Use
- 批量清洗数据、生成报表、对账
- 需要编辑公式/格式/条件格式/数据验证
- 需要“零错误”校验(避免 `#REF!/#DIV/0!/#NAME?` 等)
## Inputsrequired
- Files: `.xlsx` 路径(以及是否有模板/受保护工作表)
- Goal: 哪些 sheet/范围需要修改(明确列名/单元格范围)
- Constraints: 是否允许改公式?是否必须保留原格式/保护/宏?
- Output: 产物路径(xlsx + 可选导出 csv/pdf
- Environment: 可用工具(repo scripts、Python 依赖、`libreoffice --headless`
等)
## Capability Decisiondo first
1. 优先使用项目/环境已有的 **高保真工具链**(如果有)。
2. 否则走开源 fallback(需确认可接受的行为差异):
- Python`openpyxl`(结构化编辑;对公式重算能力有限/依赖 Excel 语义)
- 数据处理:`pandas`(适合表格化数据,但要小心丢格式)
## Proceduredefault
1. **Inspect**
- Sheet 列表、命名、表头、冻结窗格、数据验证规则
- 是否含外部链接、宏、受保护区域
2. **Operate**
- 数据改动优先:保持表头不变、范围可追踪、避免隐式类型转换
- 公式改动:先定义输入/输出列,写最小可验证样例
- 格式改动:与业务逻辑分离,避免“数据+格式”混改造成回滚困难
3. **Validate**
- 可用时做重新计算,并检查错误值:`#REF!/#DIV/0!/#NAME?/#VALUE!`
- 抽样核对:关键行/关键合计值/边界值
## Output Contractstable
- Summary:输入 → 输出(xlsx/csv/pdf
- Changes:按 sheet 列出(数据/公式/格式/验证规则)
- Validation:重算/错误检查/抽样核对结果
- Notesfallback 模式的限制(公式重算、宏、外部链接)
## Guardrails
- 表格数据可能含敏感信息:默认不在对话粘贴大表;用统计/摘要/行号定位
- 批量变更必须给出可复现的变换规则(便于审计与回滚)