/cogni-publishing:design-composefrom cogni-publishing
Binds a validated publishing brief to reusable visual patterns, producing a target-neutral semantic-composition@2 before HTML or PPTX rendering.
Ships in cogni-publishing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Bind a normalized brief to the pattern library and hand on a target-neutral semantic-composition@2. The validator is the authority: never alter, shorten, merge or reorder content to make a composition pass — frozen copy, unit order and source lineage are exactly what it protects. When no accepted pattern fits a unit, report that to the author and stop.
data of a successful publishing-validate normalize run, saved as its own JSON file. Pass the artifact itself, not the envelope around it.{name, version} and nothing else. The name is the theme_slug from the manage-themes selection handoff. The version is the cogni-publishing version in .claude-plugin/plugin.json for a bundled theme, since bundled themes are versioned with the plugin, or the revision the user supplies for a user theme — ask when there is none. Never use the theme manifest's schema_version. The pin is recorded as data; the composition resolves no token.html, pptx, or both. Every unit's pattern must support every requested target.Run check-patterns to confirm the library is valid and to see which patterns are accepted.
Read ${CLAUDE_PLUGIN_ROOT}/references/design-composition.md for each pattern's eligibility, slots, limits and variants, and for the binding rules.
Group consecutive frozen records into units, up to the chosen pattern's constraints.max_records, and choose one accepted pattern and variant per unit — by slide type or section role, record kind and whether the records carry data. One exception: on a unit that declares metric intent whose bound text repeats one of the brief's key figures, leave both out and let compose route it (step 5). Routing declines in three cases — no matching figure, a single match in a unit of more than four bound texts, or a candidate whose limits the draft's bindings exceed — and a unit it declines stays patternless and is rejected as unknown-pattern, so give such a unit a pattern instead. Parallel direct sections can share one comparison unit. A narrative visual_intent is a hint the choice may decline, never a requirement. A brief that carries sources needs one sources unit: the narrative source-register slide takes it, and a direct brief ends on a sources unit with no bindings.
Write a draft that binds content by reference only:
{
"artifact_type": "semantic-composition",
"artifact_version": "2",
"artifact_id": "composition:<brief-id>",
"normalized_brief_ref": {"artifact_id": "<normalized artifact_id>", "artifact_version": "1"},
"pattern_library_ref": {"artifact_id": "cogni-publishing/pattern-library", "artifact_version": "1"},
"design_system": {"name": "<theme slug>", "version": "<design-system version>"},
"targets": ["html", "pptx"],
"units": [
{
"id": "u-<first record>", "role": "<kebab-case role>", "pattern": "<pattern id>", "variant": "<variant id>",
"bindings": [{"slot": "<slot>", "record_ref": "<record id>", "field": "<field>"}],
"data_bindings": [{"slot": "series", "data_ref": "<data id>"}],
"entities": [{"id": "e1", "record_ref": "<record id>", "field": "slide_points", "item": 0}],
"relationships": [{"from": "e1", "to": "e2", "kind": "<relationship kind>"}]
}
]
}
Bind every content field of every record once: slide headline, slide_points, talk_track, evidence_status; section title, body, notes. Include data_bindings only on a chart and entities/relationships only on a conceptual system. A role names what the unit does, never what it says: a short kebab-case token such as governing-thought. Leave the binding digests, the content fingerprint, source_refs, register_refs, document_bindings and type_floor out — compose fills them (step 5). On a metric-intent unit that compose should route, leave pattern and variant out of the template too (step 5).
Run compose. Besides the mechanical fields, it makes two choices where the draft is silent: a unit that declares metric intent — a record typed metric, or one whose visual_intent prefers a metric expression — and whose bound text carries the brief's authored key figures is given key-figure-strip or hero-metric; and a small comparison or conceptual-system unit is given type_floor: type.lead. A pattern, variant or type_floor the draft already carries is judged, never overwritten, so leave both pattern and variant out to accept the routing and write either one to decline it. See references/design-composition.md for the match counts and item limits that decide both. On exit 0, the envelope's data is the validated semantic-composition@2 that a renderer's own target-resolved plan consumes (see Boundaries); save it only where the user asked.
The validator prints one JSON envelope, {"success", "data", "error"}: exit 0 valid, 1 a contract finding (data.code, data.check, data.reference), 2 a usage or runtime problem. Quote the code, check and reference, then act by class:
impossible-fit, ineligible-pattern, unsupported-capability, typography-relaxed, unknown-pattern — choose another eligible accepted variant or pattern for that one unit. For typography-relaxed, remove type_floor or raise it; for unknown-pattern, name a pattern and variant the library defines. Where the fix happens depends on where the finding came from:
compose rejected a draft — change only that unit's pattern, variant and binding slot names in the draft and run compose again. The draft carries no copy, so the change is presentation-only; check-repair does not apply, because a rejected draft was never composed.check-composition, or a valid one needs another variant — keep the original, save the changed version beside it, and prove it with check-repair --brief <normalized.json> --before <original.json> --after <new.json>, where both files are compose output.Never shorten, split, merge, reorder or drop content, and never lower type_floor. If no accepted pattern fits, report the finding to the author and stop.
unsourced-chart-data, absent-dataset, mismatched-unit, invented-value — the fix belongs upstream in the brief: supply the dataset, its unit or its source there. Never type a number, unit or label into the composition.
unbound-content, duplicate-binding, reordered-unit, reference-omitted, reference-reassigned, unexpected-field, copy-changed, source-identity-changed, fingerprint-mismatch — fix the draft's bindings, never the copy; remove an unexpected-field, and keep role a kebab-case token. On a saved composition, a copy-changed or fingerprint-mismatch means the brief changed: recompose from the new brief. A draft passed to check-repair always fails as fingerprint-mismatch, because only compose output carries the fingerprint.
invalid-repair — the changed composition altered more than pattern, variant and slot names. Restore everything else from the original, or compose it as a new composition and validate it with check-composition.
target-geometry — remove the coordinate, size or layout value; geometry belongs to the target-resolved plan.
Every finding code is defined in ${CLAUDE_PLUGIN_ROOT}/references/artifact-contracts.md.
Never route a proposed pattern into a production composition: a pattern is usable only after its status is accepted and check-patterns passes its specimens.
To extend the library, draft the new pattern with status: proposed in a copy of ${CLAUDE_PLUGIN_ROOT}/references/pattern-library-v1.json — any model or person may draft it, and no provider or API is required. Give it every contract field and at least one specimen: a minimal brief plus one unit that binds all of it. Run check-patterns --patterns <copy>; the pattern appears under proposed with ready_for_acceptance: true once its specimens pass. Acceptance is a reviewed change that flips status in the bundled library. Until then, compose and check-composition reject any unit using it as unaccepted-pattern. A pattern that needs a family the validator does not know is a code change, not a library entry.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/validate-publishing.py" check-patterns [--patterns <library.json>]
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/validate-publishing.py" compose --brief <normalized.json> --composition <draft.json>
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/validate-publishing.py" check-composition --brief <normalized.json> --composition <composition.json>
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/validate-publishing.py" check-repair --brief <normalized.json> --before <before.json> --after <after.json>
Pass --patterns only to check-patterns, for a library copy under review. Never pass it to compose, check-composition or check-repair: production compositions validate against the bundled library.
| File | Read it when |
|---|---|
${CLAUDE_PLUGIN_ROOT}/references/design-composition.md | choosing a pattern, binding content, explaining a finding, or extending the library |
${CLAUDE_PLUGIN_ROOT}/references/pattern-library-v1.json | checking a pattern's exact slots, limits, variants or target capabilities |
${CLAUDE_PLUGIN_ROOT}/references/pattern-contract-v1.schema.json | drafting a new pattern entry |
${CLAUDE_PLUGIN_ROOT}/references/semantic-composition-v2.schema.json | checking the composition's exact shape |
${CLAUDE_PLUGIN_ROOT}/references/artifact-contracts.md | the version compatibility matrix and every finding code |
target-resolved-plan@1 consumes semantic-composition@1 only; the plans that consume @2 belong to the renderers.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cogni-work/insight-wave --plugin cogni-publishing7 skills in this plugin
/copywriterPolish, rewrite, or create business documents (memos, briefs, reports, proposals, one-pagers, executive summaries, emails, blog posts, business letters) using professional messaging frameworks (BLUF, McKinsey Pyramid, SCQA, STAR, PSB, FAB) and persuasion techniques (number plays, power words, rhetorical devices). Use this skill when the user asks to polish a document, improve writing, make something more readable, restructure a brief, apply BLUF or Pyramid Principle, rewrite for executives, strengthen messaging, create a proposal, write a one-pager, clean up a report, compress a document to minimum length without losing facts, shorten a synthesis for circulation, tighten a document while keeping every citation and number, or apply any named messaging framework. Handles German documents (Wolf Schneider style), arc-aware narrative polishing (story arcs with arc_id), and IS/DOES/MEANS sales messaging. Simple requests like "make this better" about a markdown file should trigger this skill./design-renderThis skill should be used to create a branded HTML page or editable PPTX deck from a validated publishing composition — "render this composition", "render the composition as HTML", "render branded HTML from the composition", "render the composition as an editable PPTX", or "design-render". For PPTX it hands the frozen brief, composition and theme to the presentation skill the host provides, then admits the result only through design-verify; HTML follows the DOM contract design-verify reads. It also handles explicitly qualified renderer diagnostics — "run the renderer fidelity check", "diagnose a render failure", and "measure the rendered page". Creation preserves frozen copy, data and order and runs design-verify before reporting success. Independent checks of an existing deliverable against frozen inputs or before handover belong to design-verify. Optional browser measurement uses the provisioned pinned runtime.Other plugins' skills for the same job