Skip to content

Skill templates should be composable references, not a mandatory pipeline #294

Description

@yayashuxue

Problem

The skill currently treats its templates as a mandatory pipeline the agent has to run, rather than as components the user's agent can pick up. Examples in SKILL.md / authoring/:

  • authoring/README.md: "What every generated doc must go through"voice.md is "Always applied. Not a choice."
  • SKILL.md "Authoring contract": "required reading before you write doc HTML … there is no switch, and no doc is exempt."
  • SKILL.md "Default styling — DO NOT re-style the doc": the overlay's reading template is framed as the one right answer; deviating needs a justification.
  • /tdoc new is a numbered step list (read voice → write index.htmlmeta.jsoncomments.json → open browser) that the agent is expected to execute in order, on every doc.

That is an orchestration layer baked into the skill. It assumes tdoc's agent is the agent. In practice the user already has their own agent / skills / house style (/document-release, /retro, a team voice guide, a design system), and tdoc's job is to be the doc surface + comment loop underneath that — not to overrule it.

Proposal

Reframe every template the skill ships as a reference / inspiration, not a required step:

  1. voice.md, style/, structure/ → a library of building blocks. Each entry says what it is good for and when you might reach for it. None of them is a floor. The agent (or the user's agent calling bin/tdoc-new) composes from them, swaps in its own, or ignores them.
  2. Default reading template → "a good default", not "DO NOT re-style". Keep the hard invariants that actually protect the product (CSP / no host JS, :where() compatibility contract, viewport meta, body background, comment-anchor stability). Everything that is taste (typography scale, "reading docs should not override the template") moves to a recommended section.
  3. /tdoc new steps → split "what tdoc needs" from "how we'd write it". The storage contract (~/tdocs/<slug>/v1/index.html, meta.json, comments.json, last-line URL on stdout) stays normative. The authoring advice (read voice, pick CSS-only interactivity, etc.) becomes guidance the user's agent can take or leave.
  4. Wording pass. Replace must / required / always / never / no doc is exempt with recommended / start from / consider wherever the rule is about quality of the output rather than correctness of the system. Keep MUST only for invariants.
  5. Make the split visible in the file layout, e.g. authoring/ = references & inspiration, and a short CONTRACT.md (or a section in SKILL.md) that lists the handful of real invariants.

Why

  • Users bring their own agent. A skill that insists on its own pipeline fights it instead of composing with it.
  • bin/tdoc-new already exists as the "programmatic entry for agents in other skills" — the docs should match that posture everywhere, not only in that one section.
  • A template that reads as inspiration gets copied and adapted; one that reads as a mandate gets worked around or silently ignored.

Out of scope

Removing the templates. They are good. The change is in how they are positioned, not whether they exist.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions