Turn one daily task into one Task Skill. Two phases, same session. No scaffolding for later.
Phase 1 — grill
Run the grilling tree on the daily task. Frontier is every decision with prerequisites settled; ask the whole frontier in one round, with recommended answer, then wait.
Cover in order (keep general, no STT/dossier-specific jargon):
- YAGNI — does this need a skill or does
officecli+ copy/manual cover it? - I/O — one concrete input (folder/file, e.g.
11. MS BỘ.../1. Hồ sơ thầu:1as example) and one concrete output (.docx/.xlsx/.pptx/.pdf+ path) — use real paths the user canls. - Branches — distinct cases the skill handles (missing file, empty table row, different supplier/template). One trigger phrase per branch.
- Leading word — shared word in prompts + code + docs that fires the skill.
- Reference/Template — if L3 Fidelity is required, which real file is the Reference (full Format to clone) and which fields become
{{placeholder}}in the Template. Read the Reference viaofficecli read+ unzip check, list candidate placeholders (w:t/a:t/vvalues) for user to confirm. If no Reference exists, decide whether to create a Template from scratch (markdown → docx then inject placeholders) or to treat the task as L1 (markdown-only).
Completion: every branch has a named trigger phrase and I/O is concrete (real input listed, real output officecli clone → substitute → accept path for L3, or officecli create for L1). For L3 tasks a Reference path and placeholder map exist. No dossier/STT wording here — task-agnostic.
Phase 2 — write
Write per writing-for-agents ladder (SKILL-MECHANICS.md:10 for frontmatter):
skills/<kebab-name>/SKILL.md— frontmattername+description(pointer: front-loaded leading word, one trigger per branch, no synonyms). Body: steps in order, each ends on a checkable completion criterion. Demand is exhaustive. For L3 tasks, steps areclone Reference → substitute {{placeholders}} → accept, notcreate from markdown.- Disclose reference behind a pointer when only some branches need it:
references/template.md,references/mapping.md, orreferences/grill-questions.md. Inline what every branch needs; disclose what only some need. Put task-specific tables (e.g. dossierSTT→filemapping) in references, not in this file. For L3, includereferences/template.docx(or.xlsx/.pptx) as the real Template ZIP with{{placeholder}}insidew:t/a:t/v, plusreferences/placeholder-map.mdlistingplaceholder → source field. - Keep single source of truth; do not restate
package.jsonscripts orofficeclihelp.
Scaffold is 2-4 files (SKILL.md + references/*.md + optional scripts/validate.mjs). No scripts/ until a branch needs code or validate needs deep check.
Validate — 4 gates (run in Isolated Runtime, generic)
- Name & frontmatter —
namekebab-case matches folder,descriptionfront-loads leading word + one trigger per branch, no synonyms perwriting-for-agents:12. Completion:head -n 5 skills/<name>/SKILL.mdpasses. - Checklist coverage — every branch/item the task requires has an entry in
references/*.md(e.g. 22 STT for dossier perProcurement Dossier:1would begrep "| STT"22 there, but for non-dossier tasks count the task's own rows). Completion:grep "|"counts match spec, no orphan. - Office hygiene —
officecli readon each template returns markdown withoutPKspill. L1:officecli create → accept; L3:officecli clone → substitute → acceptthenunzip -p word/document.xml | grep -c "<w:tr"≥ body rows,officecli verify-l3PASS,filetype matches original (.docstaysCompositeviacp,.docxstaysWord 2007+). Completion:bun tests/isolated-workspace/scripts/test-*.mjs:1style PASS. - Tracer Bullet —
bun tests/isolated-workspace/scripts/tracer.mjs:1fordocx|xlsx|pptx|pdfPASS,report.md:1shows 4 PASS. No global install.
Skipped: deep XML font/header check — add soffice --headless --convert-to pdf visual diff when w:tr counts diverge >20%.
See references/checklist.md (grill) and references/skill-template.md (SKILL shell).