Make the write-guide skill produce genuinely topic-shaped guides. The section library is the primary unit: the author assembles each guide from it to fit the topic — adding, dropping, reordering, or blending sections freely. The five archetypes (system-explainer, rule-deep-dive, how-to/tutorial, concept-explainer, change/recap) are non-binding starting points, not molds. What every guide is held to is the evidentiary spine — the six discipline rules, verbatim quoting, a quoted-source/worked-example depth bar, and the provenance → body → Quick reference → Cross-references frame — never a fixed section sequence.
Read and implement all steps in the plan at docs/plans/make-write-guide-output-dynamic.html — Make write-guide output dynamic via a section library and archetypes. Start from the embedded digest: awk '!f && /<script[^>]*id="plan-digest"/{f=1;next} f && /<\/script>/{exit} f' docs/plans/make-write-guide-output-dynamic.html
make-write-guide-output-dynamic.html
docs/plans/make-write-guide-output-dynamic.html
Context
The write-guide skill (kit/plugins/social-media-tools/skills/write-guide/) advertises broad scope — "systems, rules, concepts, tools, resources, plans, changes, or saved memories" (SKILL.md:10-11) — but builds every guide to a single "fixed 12-section skeleton" (SKILL.md:12) reverse-engineered from only two exemplars, both rule/system deep-dives. The skeleton's rhetorical devices (incident with numbers §3, italic diagnostic question §6, do/do-NOT script §7, numbered carve-outs §8, verification protocol §12) fit guardrail and subsystem topics but misfit tutorials, concept explainers, and change recaps. Flex valves exist (titles may flex, sections may be omitted) but the framing — "copy verbatim", "Every guide follows it", and a self-check that counts all 12 sections (SKILL.md:136) — pushes authors to fill the template rather than fit the topic. Empirically, write-guide has produced two guides: publish-docs-to-github-pages.md used all 12 sections (it is a system), while using-design-md-and-component-md.md abandoned the numbered skeleton for six renamed sections — proving the flex works but is treated as a deviation. This plan implements recommendations A (reframe the template as a section library) and B (add archetypes) while leaving the evidentiary spine untouched. The write-guide ↔ documenting-plans scope overlap is deliberately deferred to Next Steps.
Files to Modify
CLAUDE.mdmodified reframe write-guide plugin-table line (drop "fixed 12-section").claude-plugin/marketplace.jsonmodified bump social-media-tools 2.12.1 → 2.13.0- kit/plugins/social-media-tools/
README.mdmodified reframe write-guide row (drop "12-section skeleton")CHANGELOG.mdmodified add v2.13.0 entry (house heading format)- skills/write-guide/
SKILL.mdmodified library-primary framing (5 refs) + §3 + shaping step + spine/depth contract + boundary note- references/
skeleton.mdmodified section library (incl. lines 7-10 reframe)exemplars.mdmodified five archetypes as starting points + picker + most-specific-wins heuristic
Diagram
Gather factsPick one archetypeDraw sections from the libraryApply the invariant spineSteps
Verify
grep -nE '12-section|12 skeleton|Every guide follows' SKILL.md returns nothing; the self-check bullet reads as a filler/coverage quality test, not a count of 12.Verify
Verify
grep 'default to the 12-section' exemplars.md returns nothing.Verify
Verify
Verify
grep -rnE 'fixed 12-section|12-section skeleton' CLAUDE.md kit/plugins/social-media-tools/README.md returns nothing.Verify
Tests
File: manual smoke check — invoke write-guide on two pinned topics; the skill is prose, so there is no automated runner.
Topics (pinned): (1) rule/system regression — re-derive a guide for the GitHub Pages publishing pipeline (the topic behind docs/guides/publish-docs-to-github-pages.md); (2) tutorial — a how-to such as "how to add a new archetype to write-guide".
Type: smoke test
Asserts (pass bar — topic-fit + spine + depth, NOT conformance to a fixed list): the tutorial run passes if it is shaped to the topic (the sections a how-to needs — goal, prerequisites, steps, pitfalls — present; sections that do not fit, such as an incident or numbered carve-outs, absent rather than padded in), carries the full invariant spine (provenance frame, Quick reference, Cross-references, six discipline rules), and meets the depth bar (≥1 verbatim-quoted source + ≥1 worked example). The rule/system run passes if it still naturally uses the deep-dive devices because they fit, and carries the same spine + depth. The test never requires conformance to a fixed archetype section list.
Re-run stability: invoke the same topic twice and confirm both runs carry the full spine, meet the depth bar, and stay shaped to the topic; structural wording may vary run-to-run (expected in a dynamic system) — the spine and depth must hold every time.
Run: invoke the skill per topic; check (a) the spine is present, (b) the depth bar is met, (c) no section that does not fit the topic was padded in, and (d) no section the topic needs is missing.
Acceptance Criteria
Verification
Re-read the write-guide files: SKILL.md frames the section library as the primary unit and adds a shaping step where the archetype is a starting point and the body is assembled freely; skeleton.md presents its sections as a catalog (incl. lines 7-10); exemplars.md defines five archetypes as non-binding starting points with a most-specific-wins heuristic. Confirm the six discipline rules and tone-rules.md are unchanged and that the spine + depth bar — not a fixed shape — is named as the enforced contract. Reframe and re-check the external surfaces (CLAUDE.md, README.md). Run the objective smoke test on the two pinned topics: each must be shaped to its topic, carry the full spine, and meet the depth bar — without conforming to a fixed archetype section list. Confirm marketplace.json shows social-media-tools 2.13.0, CHANGELOG.md has the v2.13.0 entry in house format, plugin.json has no version field, and the settings.json post-write JSON validation passes. As a coverage gate, run grep -rniE 'fixed 12-section|12-section skeleton|two exemplars|both archetypes|all twelve|default to the 12-section' kit/plugins/social-media-tools/skills/write-guide CLAUDE.md kit/plugins/social-media-tools/README.md and confirm it returns nothing (the historical CHANGELOG entry is excluded from scope).
Completion Checklist
Completion Report
No items to report — all requirements met.
Team Review (2026-06-19)
Reviewers: 5 core (architecture, completeness, testability, risk, conventions). UI reviewers skipped — no UI signals (Markdown/JSON skill-authoring change).
Executive summary. Sound, approve with revisions — no reviewer recommended rejection. The section-library + archetype + invariant-spine design was called "architecturally sound" and "a clean information-architecture pattern." Findings clustered on scope completeness (the "12-section" reframe missed several references and two external surfaces) and verification tightening, not on the approach.
Architecture. Design is sound and extensible. Flagged orphaned cross-file references the steps did not enumerate (SKILL.md:25, :81; skeleton.md:7-10) and archetype overlap without an arbitration rule. Recommended a most-specific-wins picker rule and broadening the sweep.
Completeness. Steps are specific, but file coverage was under-scoped: SKILL.md has five "12-section" references (Step 1 named three), and root CLAUDE.md:79 + README.md:33 were missing from the Files list. Recommended adding both external surfaces, a coverage criterion, and a pinned smoke-test topic.
Testability. The Tier-2 smoke-test approach is correct (no false demand for unit tests on prose). The objective test lacked an explicit pass bar and a concrete regression assertion. Recommended a strict pass bar, pinned topics, and a "no-diff" tone-rules criterion.
Risk. Medium. Highest: stale discovery surfaces (CLAUDE.md/README.md) shipping the old contract; incomplete SKILL.md sweep; change/recap overlapping documenting-plans (boundary deferred). Recommended a quality-floor bar in the spine and an interim boundary sentence. Versioning (MINOR 2.13.0) confirmed correct; the merge driver keeps the higher semver.
Conventions. Close fit. Version handling, the reference-file pattern, and the 141-line SKILL.md (≤500 budget) all align. Recommended pinning the CHANGELOG heading format and stating the description fields are deliberately unchanged.
Agreements & conflicts. Three reviewers independently confirmed the under-scoped reframe (amplified to highest priority). One soft conflict: Risk offered "hold change/recap" as an option, which conflicts with the "all three now" decision — resolved by keeping the archetype and adding a boundary sentence instead.
Highest-risk issues (priority order):
- Incomplete "12-section" sweep — SKILL.md:25/81, skeleton.md:7-10, exemplars.md:3/75/82-84 (Architecture + Completeness + Risk).
- Stale external surfaces not in scope — CLAUDE.md:79, README.md:33 (Completeness + Risk).
- Archetype-selection ambiguity for overlapping topics — needs an arbitration rule (Architecture + Risk).
- Quality-floor regression from loosening the fixed skeleton (Risk).
- Loose smoke-test pass bar (Testability).
Triage outcome — walkthrough mode; all 8 findings Accepted and applied:
- Accepted — Step 1 broadened to all five SKILL.md "12-section" references + grep verify.
- Accepted — Step 2 extended to skeleton.md lines 7-10.
- Accepted — Step 3 expanded: rewrite exemplars.md framing (3/75/82-84), most-specific-wins arbitration, kebab ids, synopsis depth.
- Accepted — new Step 6 reframes CLAUDE.md:79 + README.md:33; both added to the Files tree.
- Accepted — Step 4 names the Workflow §3 Structure wording change.
- Accepted — Step 5 adds the quality-floor depth bar + a change/recap↔documenting-plans boundary sentence (archetype kept, per "all three now").
- Accepted — Step 7 (was 6) pins the CHANGELOG house format + descriptions-unchanged note.
- Accepted — Tests pass bar + pinned topics + determinism; acceptance criteria ac8 (external-surface coverage) and ac9 (determinism) added; ac5 tightened to "no diff"; verification coverage grep added.
Modified / Rejected: none.
Result: Steps grew 6 → 7; acceptance criteria 7 → 9; Files +2; digest refreshed. Plan remains status: todo.