Skip to content

feat(skills): add PRD/structure/design refs, sharpen ui-review - #27

Open
JiangWeixian wants to merge 7 commits into
mainfrom
hotfix/productmd
Open

feat(skills): add PRD/structure/design refs, sharpen ui-review#27
JiangWeixian wants to merge 7 commits into
mainfrom
hotfix/productmd

Conversation

@JiangWeixian

@JiangWeixian JiangWeixian commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add references/structure.md to the write-docs skill for PRODUCT.md's Structure layer — site maps, cross-feature journeys, and an explicit boundary against FEATURES.md's per-feature Flow.
  • Add first-class DESIGN.md support via a new references/designmd.md, following the Google Labs design.md alpha spec (verified against the live spec before writing).
  • Add first-class PRD.md support via a new references/prdmd.md — a self-contained, initiative-scoped spec modeled on a real-world PRD, distinct from PRODUCT.md's living five-layer model.
  • Extend references/features.md with an optional per-feature Flow subsection, a Glossary section, and a document-level Out of Scope section, based on a real-world FEATURES.md case study.
  • Sharpen the ui-review skill's Figma implementation-fidelity comparison: exact-value extraction, explicit coverage enumeration, comparison-table verdicts, and report persistence for a working Regression mode.

Changes

write-docs skill

  • skills/write-docs/references/structure.md (new) — Reader Questions, Site Map (text tree vs. mermaid graph guidance), Flow template, Evidence Rules, boundary vs. FEATURES.md, Self-Check. Aligned terminology with Jesse James Garrett's Elements of User Experience (Site Map = Information Architecture's output).
  • skills/write-docs/references/designmd.md (new) — required-reading live-fetch of the alpha spec, <designmd_facts_source> gate (no invented tokens), lint gate (npx @google/design.md lint must exit 0), no-visual-surface gate, Recommended Shape, Front Matter, Components whitelist, Self-Check.
  • skills/write-docs/references/prdmd.md (new) — modeled directly on a real PRD from this org's own practice, not a generic template. Covers Background, Product Goals, Users & Scenarios, Product Principles, Scope, User Flows, Interaction Rules, Display Rules, States & Exception Handling, Compatibility Requirements, Acceptance Criteria, and qualitative-by-default Success Determination. Every section stands alone without requiring PRODUCT.md/FEATURES.md to exist.
  • skills/write-docs/references/features.md — optional ### Flow subsection (scoped to one feature's internal steps), optional ## Glossary, document-level ## Out of Scope.
  • skills/write-docs/references/product.md — link Structure section to structure.md for detailed guidance.
  • skills/write-docs/SKILL.md — route DESIGN.md, PRD.md, and structure.md through required reading, file organization, canonical filenames, self-check, and common mistakes.

ui-review skill

  • skills/ui-review/references/implementation-fidelity.md — add "Reading Exact Values" (prefer Figma Dev Mode/API/MCP over screenshot eyeballing; label visual estimates when exact extraction isn't available), "Coverage: Enumerate Before Comparing" (explicit design-reference checklist with a <compared>/<total> ratio and named skips), and require coverage verdicts as a design-vs-live comparison table instead of a prose verdict, so a claim like "mostly consistent" can't hide an undisclosed delta.
  • skills/ui-review/SKILL.md — persist each report to .ui-review/reports/<date>-<scope>.md; wire Regression mode to look up and diff against the most recent matching report instead of silently skipping the comparison when no baseline exists.

Changesets

  • .changeset/structure-designmd-references.md — minor bump for supermario.
  • .changeset/prdmd-and-ui-review-fidelity.md — minor bump for supermario.

Test Plan

  • Verified designmd.md's claims about the Google Labs design.md alpha spec against the live spec (docs/spec.md, README.md) rather than from memory.
  • Ran the spec's own verification checklist for designmd.md: file line count within target range, all 6 SKILL.md routing locations present (grep -n "DESIGN" SKILL.md), opening pattern matches readme.md's shape, no spec duplication, live-fetch URLs present, both gates present.
  • prdmd.md modeled on and cross-checked against a real PRD example (docs/product/repository-branch-mention-prd.md) rather than a generic template; verified all 11 SKILL.md PRD wiring points via grep -n "PRD" SKILL.md.
  • ui-review changes verified against a real run: a Codex session using the updated skill with the superfigma MCP against a live page produced a report using exact Figma token values, an explicit 10/12 coverage enumeration with named skips, and correctly flagged an intentional design deviation instead of treating it as a bug.
  • pnpm changeset status confirms supermario is flagged for a minor bump with no other packages affected.

Feature-level flow diagrams and product-level site maps/journeys were
sharing FEATURES.md with no boundary, causing overlap. Add
structure.md as the detail template for PRODUCT.md's Structure
layer, and extend features.md with Flow, Glossary, and document-level
Out of Scope sections, based on a real FEATURES.md case study.
Site Map guidance previously left the format open (tree/table/list)
with no clear rule. Depth alone was tempting people toward mermaid
for deep hierarchies that a plain text tree already handles fine.
Add the real criterion: use a text tree by default; switch to a
mermaid graph only when a page has more than one parent and the map
is no longer a tree.
…with IA

Adopt the feat/designmd plan: add references/designmd.md for
writing/editing/auditing DESIGN.md against Google Labs' design.md
alpha spec (live-fetch required reading, facts-source gate, lint
gate, no-visual-surface gate), verified against the real spec before
writing. Wire DESIGN.md into SKILL.md's routing, self-check, and
common mistakes.

Also align structure.md's terminology with Garrett's Elements of
User Experience: name Information Architecture explicitly as what
Site Map produces, and note Skeleton as the still-undocumented layer
that presents this structure on screen.
Required before the PR — the branch touches skills/write-docs
content (structure.md, designmd.md, features.md, product.md,
SKILL.md) with no prior changeset covering it.
Add first-class PRD.md support: a self-contained initiative-spec
reference modeled directly on a real PRD from this org's own
practice (docs/product/repository-branch-mention-prd.md), not a
generic template. Covers Background, Product Goals, Users &
Scenarios, Product Principles, Scope, User Flows, Interaction Rules,
Display Rules, States & Exception Handling, Compatibility
Requirements, Acceptance Criteria, and Success Determination
(qualitative by default, no invented metrics). Every section stands
alone without requiring PRODUCT.md or FEATURES.md to exist. Wire
PRD.md into SKILL.md's routing, fact-scanning, self-check, and
common mistakes.
…rsistence

Real-world use surfaced three gaps in implementation-fidelity.md's
Figma comparison: values were being eyeballed from screenshots
instead of read exactly, the review checklist was prose that got
skimmed rather than enumerated, and coverage verdicts could hide a
real gap behind a hedge word like "mostly consistent" with no
disclosed delta.

Add Reading Exact Values (prefer Figma Dev Mode/API/MCP over visual
estimation, label estimates when that's all that's available),
Coverage: Enumerate Before Comparing (explicit checklist with a
compared/total ratio and named skips), and require coverage rows as
a design-vs-live comparison table instead of a verdict sentence, so
a claim of "match" or "difference" always has both raw values next
to it. Wire report persistence to .ui-review/reports/ and fix
Regression mode, which previously had no baseline to diff against.

Verified against a real run: a Codex session using this skill with
the superfigma MCP against a live page produced a report that used
exact Figma token values, an explicit 10/12 coverage enumeration
with named skips, and correctly flagged an intentional design
deviation instead of treating it as a bug.
…idelity work

Covers the two commits since the last changeset: prdmd.md
(PRD.md support) and the ui-review Figma fidelity sharpening.
@JiangWeixian JiangWeixian changed the title feat(write-docs): add structure.md and designmd.md references feat(skills): add PRD/structure/design refs, sharpen ui-review Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant