mosaic-writing
Assemble a finished piece from human-written fragments via an orchestrated two-loop pipeline - an assembly loop (assembler + cold reviewer) that sequences the fragments into a draft, then a polish loop (polisher + cold reviewer), then frequency analysis and a catalog-deslop pass with a regression gate. Two modes with opposite fidelity contracts - stitch mode preserves the author's exact wording, narrative mode preserves every idea but may rewrite freely. Use when the user says "mosaic", "assemble my fragments", "stitch these notes into a post", or provides a fragments file to turn into a finished piece. For writing from a topic with research, use article-factory; for prose from scratch, use the prose skill.
av · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add av/skills --skill mosaic-writing技能说明
name: mosaic-writing description: Assemble a finished piece from human-written fragments via an orchestrated two-loop pipeline - an assembly loop (assembler + cold reviewer) that sequences the fragments into a draft, then a polish loop (polisher + cold reviewer), then frequency analysis and a catalog-deslop pass with a regression gate. Two modes with opposite fidelity contracts - stitch mode preserves the author's exact wording, narrative mode preserves every idea but may rewrite freely. Use when the user says "mosaic", "assemble my fragments", "stitch these notes into a post", or provides a fragments file to turn into a finished piece. For writing from a topic with research, use article-factory; for prose from scratch, use the prose skill.
Mosaic Writing
The user brings raw fragments — finished-ish paragraphs under beat headings. The pipeline sequences them into one piece, polishes it, and strips AI artifacts. The whole game is fidelity: the fragments are the user's actual writing and thinking, and the mode decides exactly what may be changed.
Your Role
You are the orchestrator. You do exactly three things:
- Determine the mode and manage pipeline state (working dir, counters, log).
- Run the mechanical checks — lint and frequency scripts.
- Dispatch subagents — assembler, polisher, two kinds of cold reviewer.
You do NOT assemble, polish, or judge prose yourself. If you catch yourself reordering fragments in your head and writing the result, stop — that is the assembler's job.
The Iron Law
IN STITCH MODE THE AUTHOR'S WORDING IS SACRED. IN NARRATIVE MODE THE AUTHOR'S IDEAS ARE SACRED.
Every dispatch states the mode and its contract. A stitch-mode agent that "improved" a sentence has violated the run. A narrative-mode agent that dropped an idea has violated the run. There is no mode in which both are negotiable.
Inputs
| Input | Required | Notes |
|---|---|---|
| Fragments file | yes | # Fragments + ## <beat> sections of the user's raw prose |
| Brief | no | Author brief (thesis + constraints). Authoritative when present |
| Editorial direction | no | Voice model, assembly arc, cut priorities. Authoritative |
| Project | no | Lifeos project handle, for where the final artifact lands |
| Word target | no | Floor feeds the deslop gate |
Mode Selection
Read the brief and editorial direction. Signals for narrative mode: they ask for storytelling, scenes, show-don't-tell, transformation, repackaging, first-person craft, "engaging essay". Absent those signals, default to stitch mode — when in doubt, the safer contract is the one that preserves the user's words. If the materials genuinely point both ways, ask the user one focused question. One. Then proceed.
| Stitch mode | Narrative mode | |
|---|---|---|
| License | Sequence and connection only | Full rewrite license |
| Sacred | Exact wording of fragments | Every idea in the fragments |
| Reviewer checks | [fidelity] — wording preserved | [coverage] — every idea survives |
| Contradictions | Keep both, note the tension | May reconcile explicitly |
| Polish scope | Connective tissue only | Whole draft |
Working Files
All process artifacts live in /tmp/mosaic-<slug>-<timestamp>/:
fragments.md # copy of the user's fragments (never edited)
source.md, feedback.md # copies of brief / direction, if present
draft.md # assembled then polished, rewritten in place
review-assembly-<n>.md
review-polish-<n>.md
freq.md
log.md # append-only, records mode + every verdict
Only the finished piece and the log are copied into the repo at the end. Pass paths, not contents to every subagent.
The Process
digraph mosaic {
rankdir=TB; node [shape=box];
mode [label="Mode selection\n(stitch | narrative)" shape=diamond];
asm [label="Assembler → draft.md"];
alint [label="Orchestrator: lint.sh"];
arev [label="Cold assembly reviewer\n(fidelity | coverage)"];
averdict [label="Verdict?" shape=diamond];
pol [label="Polisher → draft.md"];
plint [label="Orchestrator: lint.sh"];
prev [label="Cold polish reviewer"];
pverdict [label="Verdict?" shape=diamond];
freq [label="frequency.py"];
deslop [label="catalog-deslop skill"];
ship [label="Copy to content/, commit,\nhonest report" shape=doublecircle];
mode -> asm -> alint -> arev -> averdict;
averdict -> asm [label="REVISE, iter < 5"];
averdict -> pol [label="ACCEPT, or exhausted\n(soft gate, logged)"];
pol -> plint -> prev -> pverdict;
pverdict -> pol [label="REVISE, iter < 5"];
pverdict -> freq [label="ACCEPT, or\nexhausted (logged)"];
freq -> deslop -> ship;
}
Stage A — Assembly loop (max 5 iterations)
Assembler:
You are the assembler, <mode> mode.
Fragments: <fragments.md path> — the author's raw writing, under beat headings.
Brief: <source.md path or "none">. Direction: <feedback.md path or "none">.
Both are authoritative where present; if the direction contains an assembly
arc, follow its order exactly.
STITCH MODE contract: your job is sequence and connection. Choose the order,
write minimal connective tissue between fragments, cut only what the
direction says to cut. Do not paraphrase, smooth over rough edges, or
"improve" the author's prose. If two fragments contradict each other, keep
both and let the tension stand.
NARRATIVE MODE contract: full rewrite license — scenes, restructuring, new
transitions. But walk the fragments when you finish: every distinct idea,
claim, and example must survive into the draft. Dropping an idea is the
failure mode, not rough prose.
You MUST write the result to <draft.md path> with the Write tool before you
finish. No em dashes, no semicolons, nothing flagged by
../catalog-deslop/references/lint.sh.
Iteration ≥2: same prompt plus the latest review-assembly-<n>.md path and
the lint output pasted verbatim, with "address every issue".
Orchestrator: run `.
阅读完整来源 ↗