Upgrade brief β shared spec for all content agents
You are writing pages for web-framework-components.com, a spec-authoritative engineering
reference on Web Components & framework-agnostic UI architecture. Audience: UI engineers,
design-system builders, frontend architects, framework maintainers. Tone: precise, production-grade,
normative-spec-grounded, zero marketing fluff. Every claim must be technically correct (real APIs,
real selectors, real version numbers). Code must be complete and runnable β NO ... ellipsis
placeholders.
File & format conventions (CRITICAL β match exactly)
- Each page is a Markdown file at
content/<path>/index.md. The build auto-derives the page title from the first# H1and the meta description from the first paragraph β so the first paragraph must be a strong, standalone 1β2 sentence summary (no link in the very first sentence is ideal; keep it clean prose). - Do not add YAML frontmatter unless you need a custom
seoTitle(optional). Title comes from H1. - Breadcrumbs, the auto βRelated in this sectionβ list, and JSON-LD schema are generated by the
build β you do NOT write them. You DO write a manual
## Relatedblock at the end (see below). - Use
##/###headings. One#H1 only, at the top.
Forbidden vocabulary (a linter WILL fail the build)
NEVER use these words/phrases in visible prose (they are internal SEO/IA jargon):
pillar, cluster, long-tail / long tail / longtail, hub and spoke, content silo /
topic silo, supporting page, pillar content, internal linking structure/strategy.
Also avoid the bare phrases βthis pillarβ, βthe clusterβ, etc. Say instead: section, topic
area, overview, guide, deep-dive, family of pages, parent section.
(A literal Kafka/DB/server βclusterβ would be fine, but our content rarely needs it β avoid the word.)
Page anatomy by type
Pillar (~4000β4500 words) β top-level index.md directly under a section
- Architectural overview paragraph (why this domain matters for framework-agnostic systems)
- Spec authority block: normative W3C/WHATWG/CSS-WG references governing the domain
3β6. Four domain concepts β EACH with: an inline link to a child topic page, a runnable code
example, and a Debugging Pitfall callout (a
**Debugging Pitfall:**bold-led paragraph) - Cross-domain integration (how these primitives compose with the other sections)
- Production validation & contract testing
- Distribution & publishing implications
- Conclusion (architectural synthesis)
## Relatedblock linking all child topic pages + the other sections
Cluster / topic page (~3000β3500 words) β index.md one level under a section
Open the first paragraph with an inline up-link to the parent section. Then:
- Concept definition & spec grounding (cite the governing spec, link parent section)
- Browser engine integration points (parse/render/style engine timing, phases, thread model)
- Core API surface (a syntax table OR annotated code block of all options/attributes/params)
- Production implementation pattern (complete, self-contained, commented code)
- Common failure modes & debugging steps (2β4 numbered pitfalls, root cause + concrete fix)
- Framework interop (React, Vue, Angular, SSR differences)
- Performance & memory implications (benchmarks, observer teardown, bundle size, leak vectors)
- Browser compatibility & polyfill strategy (real version numbers, support matrix, degradation)
## Relatedblock: 3β5 links to sibling topic pages + parent up-link
Long-tail / deep-dive page (~1800β2200 words) β deepest index.md
- Problem statement with a minimal reproducible example (the gotcha/tradeoff, in code)
- Root-cause analysis (normative spec clause or engine behavior that explains why)
- Production-safe fix or pattern (complete corrected code, commented)
- Verification step (console output, DevTools inspection, or test assertion to confirm the fix)
- When to use / when to avoid (a decision table or bullet list)
## Relatedblock: parent topic up-link, grandparent section, 2β3 sibling deep-dive links
Interlinking rules (mandatory)
Hyperlink the FIRST prose mention of any concept that has its own page on the site, woven into the
sentence (not βclick hereβ). Example: the [Custom Element Registry & Definition](/core-architecture-lifecycle-management/custom-element-registry-definition/) ensures deterministic instantiation.
Use ONLY URLs from the site map below β never invent a URL. Every page ends with a ## Related
bullet list (3β5 items) of the exact form:
## Related
- [Title](/url/) β short reason.
- [Title](/url/) β short reason.
Custom SVG visual (every page gets exactly ONE)
Author one original inline SVG that explains the hardest concept on the page (architecture/data-flow, sequence, state machine, comparison matrix, or timeline). Place it right after the first paragraph (pillars/clusters) or near the relevant section (deep-dives). Rules that MUST hold (a headless renderer checks these):
- Responsive:
viewBox="0 0 W H",style="width:100%;height:auto;max-width:...", NO fixed pixel width attr. - Accessible:
role="img"+aria-labelledbypointing at a<title>and<desc>. - Set an explicit
font-size(in user units, ~11β18) and explicitfillon EVERY<text>. Keep label strings short so they never overflow the box. - Give every
id(gradients, markers, refs) a page-unique prefix so two SVGs never collide. Everyurl(#id)/href="#id"reference must resolve to a defined id in the same SVG. - Use the site palette below as literal hex (text fills must be light, e.g.
#e8eeff/#b7c4ef). - Escape
&as&inside text.
Palette: bg #0a1022, surface #0f1833, card #121d3d, deep #1a2a55, text #e8eeff,
text-soft #b7c4ef, brand #5a7bff, brand-2 #1cc8ff/#8fd9ff, accent #7c4dff/#c79cff,
ok #8ff0c2/#29c587, warn #ffbf7a/#ffa83e, border #2b3d73.
Proven SVG skeleton (copy this structure; pass pfx- ids are examples β change the prefix):
<svg viewBox="0 0 880 300" role="img" aria-labelledby="pfx-t pfx-d" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;max-width:880px;margin:1.6rem auto;display:block;font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#e8eeff;">
<title id="pfx-t">Short title</title>
<desc id="pfx-d">One-sentence description of the diagram.</desc>
<defs>
<linearGradient id="pfx-grad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#1a2a55"/><stop offset="1" stop-color="#121d3d"/>
</linearGradient>
<marker id="pfx-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
<path d="M0 0 L10 5 L0 10 z" fill="#5a7bff"/>
</marker>
</defs>
<rect x="20" y="40" width="180" height="80" rx="12" fill="url(#pfx-grad)" stroke="#2b3d73" stroke-width="1.5"/>
<text x="110" y="76" text-anchor="middle" font-size="16" font-weight="700" fill="#e8eeff">Label</text>
<text x="110" y="98" text-anchor="middle" font-size="12" fill="#b7c4ef">sub label</text>
<line x1="202" y1="80" x2="236" y2="80" stroke="#5a7bff" stroke-width="2.5" marker-end="url(#pfx-arrow)"/>
</svg>
Code rules
- Complete & runnable; real APIs only. Use real Shadow DOM selectors where relevant:
:host,:host([attr]),:host-context(),::slotted(),::part(). - Each Debugging Pitfall is its own bold-led paragraph:
**Debugging Pitfall:** .... - Browser-support tables use real version numbers. Prefer ES2022+ (private
#fields,static observedAttributes,AbortControllerfor listener teardown).
FULL SITE MAP (use these exact URLs for links)
Sections (top level):
/core-architecture-lifecycle-management/β Core Architecture & Lifecycle Management/styling-theming-css-encapsulation/β Styling, Theming & CSS Encapsulation/distribution-testing-tooling/β Distribution, Testing & Tooling
Core Architecture & Lifecycle Management:
/core-architecture-lifecycle-management/custom-element-registry-definition/β Custom Element Registry & Definition/core-architecture-lifecycle-management/custom-element-registry-definition/how-to-define-custom-elements-without-frameworks/
/core-architecture-lifecycle-management/shadow-dom-construction-modes/β Shadow DOM Construction & Modes.../shadow-dom-construction-modes/open-vs-closed-shadow-dom-tradeoffs/.../shadow-dom-construction-modes/using-declarative-shadow-dom/(NEW).../shadow-dom-construction-modes/sharing-styles-with-adoptedstylesheets/(NEW).../shadow-dom-construction-modes/serializing-shadow-roots-with-gethtml/(NEW)
/core-architecture-lifecycle-management/event-composition-bubbling/β Event Composition & Bubbling.../event-composition-bubbling/composing-custom-events-across-shadow-boundaries/
/core-architecture-lifecycle-management/lifecycle-callbacks-deep-dive/β Lifecycle Callbacks Deep Dive.../lifecycle-callbacks-deep-dive/understanding-connectedcallback-execution-order/
/core-architecture-lifecycle-management/attribute-reflection-property-sync/β Attribute Reflection & Property Sync.../attribute-reflection-property-sync/syncing-html-attributes-to-javascript-properties/
/core-architecture-lifecycle-management/framework-integration-adapters/β Framework Integration & Adapters (NEW).../framework-integration-adapters/bridging-custom-events-to-react/(NEW).../framework-integration-adapters/mapping-named-slots-in-vue/(NEW).../framework-integration-adapters/projecting-angular-content-into-web-components/(NEW)
/core-architecture-lifecycle-management/form-associated-custom-elements/β Form-Associated Custom Elements (NEW).../form-associated-custom-elements/participating-in-native-form-submission/(NEW).../form-associated-custom-elements/exposing-custom-validity-states-to-css/(NEW)
/core-architecture-lifecycle-management/accessibility-and-focus-management/β Accessibility & Focus Management (NEW).../accessibility-and-focus-management/delegating-focus-across-shadow-boundaries/(NEW).../accessibility-and-focus-management/exposing-aria-semantics-with-elementinternals/(NEW)
Styling, Theming & CSS Encapsulation:
/styling-theming-css-encapsulation/css-scoping-in-shadow-dom/β CSS Scoping in Shadow DOM.../css-scoping-in-shadow-dom/diagnosing-css-specificity-conflicts/(NEW).../css-scoping-in-shadow-dom/controlling-cascade-with-css-layers/(NEW)
/styling-theming-css-encapsulation/css-variables-custom-properties/β CSS Variables & Custom Properties.../css-variables-custom-properties/implementing-design-tokens-with-css-custom-properties/
/styling-theming-css-encapsulation/part-and-slotted-selectors/β Part & Slotted Selectors.../part-and-slotted-selectors/styling-nested-slots-with-slotted-combinators/
/styling-theming-css-encapsulation/performance-optimization-for-styles/β Performance Optimization for Styles.../performance-optimization-for-styles/optimizing-style-recalculation-in-large-component-trees/
/styling-theming-css-encapsulation/scoped-styles-constructable-stylesheets/β Scoped Styles & Constructable Stylesheets.../scoped-styles-constructable-stylesheets/using-cssstylesheet-for-dynamic-component-theming/.../scoped-styles-constructable-stylesheets/sharing-constructable-stylesheets-across-components/(NEW)
/styling-theming-css-encapsulation/theme-inheritance-light-dom-styling/β Theme Inheritance & Light DOM Styling.../theme-inheritance-light-dom-styling/inheriting-global-themes-in-isolated-components/
Distribution, Testing & Tooling:
/distribution-testing-tooling/packaging-and-publishing/β Packaging & Publishing (NEW).../packaging-and-publishing/configuring-package-json-exports/(NEW).../packaging-and-publishing/tree-shaking-side-effect-free-libraries/(NEW)
/distribution-testing-tooling/contract-and-visual-testing/β Contract & Visual Testing (NEW).../contract-and-visual-testing/visual-regression-testing-shadow-dom/(NEW).../contract-and-visual-testing/contract-testing-custom-event-payloads/(NEW)
/distribution-testing-tooling/polyfills-and-progressive-enhancement/β Polyfills & Progressive Enhancement (NEW).../polyfills-and-progressive-enhancement/polyfilling-custom-elements-in-legacy-browsers/(NEW).../polyfills-and-progressive-enhancement/graceful-degradation-without-javascript/(NEW)
/distribution-testing-tooling/server-side-rendering-hydration/β Server-Side Rendering & Hydration (NEW).../server-side-rendering-hydration/rendering-declarative-shadow-dom-on-the-server/(NEW).../server-side-rendering-hydration/avoiding-hydration-mismatches/(NEW)