feat(cli): component-md transformer - deterministic single-file markdown reference#180
Open
nathanacurtis wants to merge 1 commit into
Open
feat(cli): component-md transformer - deterministic single-file markdown reference#180nathanacurtis wants to merge 1 commit into
nathanacurtis wants to merge 1 commit into
Conversation
…arkdown reference Emits component.md per component from api.yaml + variants.yaml: overview with variant axes and contents manifest, props (slot constraints, code-only markers, examples), bindings incl. variant-scoped with When column, states classification with unclassified-value rows, anatomy with element-presence pivot, layout trees with diffs vs default, element styles incl. content, typography, element×property color map, numbered variant deltas with instanceOf/content rows and resolution rule, exact-cover-minimized invalid combinations, linked subcomponent files, instance-example configurations, and provenance. Token references render verbatim with resolved rawValue when the spec carries it. Hardened via three-lens adversarial review (React / SwiftUI / Compose consumers) against 134 fixture components across two workspaces; byte-deterministic across repeated runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
component-mdtransformer tospecs transformthat emits a deterministic, single-filecomponent.mdper component, projected verbatim fromapi.yaml+variants.yaml(+examples.yamlwhen present). Zero LLM calls, byte-reproducible, ~15ms per component.This is the first concrete step on RFC 0001 (Component Dictionary): the
{c}.mdoutput, shaped as atransformtransformer alongsidecontractandcss.Sections emitted
processing.statesclassification with web selectors, contract inclusion, andunclassifiedrows for unmapped enum values+ added − removeddiffcontent/instanceOfswap rows, layout diffs, Color cross-referencescomponent.mdfiles (recursive)Validation
packages/cli/tests/unit/transforms/ComponentMd.test.ts); full CLI suite passes (439)instanceOfswaps, dropped elementcontent, variant-scoped bindings, unstated delta resolution rule) fixedspecs-testingbranchtest/component-mdDocs
New page
site/src/content/docs/cli/transforms/component-md.md; rows added to the transforms index andtransformcommand reference.🤖 Generated with Claude Code