docs(markdown): apply the plugin architecture review to AST-036 - #6338
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 02:57
303c62b to
d2ff014
Compare
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 03:06
d2ff014 to
adc4c74
Compare
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 03:49
adc4c74 to
75e50c7
Compare
cixzhang
marked this pull request as ready for review
September 16, 2026 03:50
cixzhang
requested review from
imdreamrunner and
josephfarina
as code owners
September 16, 2026 03:50
This was referenced Sep 16, 2026
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 04:37
75e50c7 to
576c017
Compare
This was referenced Sep 16, 2026
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
3 times, most recently
from
September 16, 2026 10:59
a68dc33 to
95ccda1
Compare
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 11:59
95ccda1 to
71ee095
Compare
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 12:15
71ee095 to
64d4c5a
Compare
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 18:10
64d4c5a to
bcb3570
Compare
cixzhang
force-pushed
the
docs/markdown-transform-plugins
branch
from
September 16, 2026 18:10
bcb3570 to
8ac3bc1
Compare
Contributor
Author
|
/approve-spec 8ac3bc1 |
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.
User need
Markdown builders need one understandable extension model that supports parser syntax and document-wide semantic transformation without making each use case a separate protocol phase.
Decision
The protocol exposes only:
syntaxfor source constructs the parser cannot already represent;transformfor document-wide semantic changes;renderersfor extension nodes.Text matching, semantic fences, and source decoration are helper-authored transforms. The canonical document is a strictly typed, MDAST-aligned tree shared by parsing, transformation, Markdown rendering, and Outline projection.
Zero-breaking gate
Existing parser signatures/results,
components,inlinePlugins, math, citations, autolinks, DOM/accessibility, heading and Outline identity, navigation/resource policy, streaming reuse, and no-plugin behavior remain unchanged. Inline transforms remain phrasing-only.components.codealways wins over semantic-fence helper output.Limited Remark profile
A separate tree-shakeable adapter may run synchronous transform-only Remark plugins over the explicit node/field matrix in AST-036. Async work, parser/compiler hooks, processor state, raw HTML, forged positions, and unsupported nodes fail closed to the last valid readable document. Compatibility is proven per plugin, never inferred from package identity.
Evidence contract
AST-036 now includes:
Scope
This PR changes authoritative knowledge records only. Runtime work is split into separately reviewable implementation PRs after this specification lands.
Validation
node scripts/check-knowledge.mjsgit diff --checkUpdate — architecture review applied (2026-09-16)
An architecture review of this protocol and its implementation stack was adopted in full as approved direction. AST-036 keeps FR1–FR24 unchanged in number and meaning so existing citations resolve; everything new is FR25–FR41 and DEC-5…DEC-11.
'none','phrasing','flow', or a narrowing{allow, min?, max?}allowlist. Core parses a container's inner source span and validates children, so a callout holds real Markdown instead of a literal string. Plugins never build children from raw source. The released top-level heading-identity traversal is deliberately unchanged: a heading inside a container behaves like one inside a blockquote.dependsOnturns a reading plugin's ordering assumption into a validated, diagnosable one.onPluginDiagnosticchannel covers admission, syntax, transform, render, and adapter phases in development and production. Admission and version skew degrade instead of throwing, refused thenables are neutralized, and entry identity survives a duplicated Core copy.inlinePluginscodemod migration after parity, a consumer-facing compatibility summary, and footnotes/definitions kept as Core scope rather than a plugin surface.Owner records updated alongside:
component:MarkdownFR17–FR22 and DEC-3, andmodule:Outline/parseOutlineFromMarkdownFR4, FR7–FR9, and DEC-2.