agemon 0.1.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +732 -28
  2. package/assets/skills/architecture/agemon-architecture/LICENSE +21 -0
  3. package/assets/skills/architecture/agemon-architecture/NOTICE.md +9 -0
  4. package/assets/skills/architecture/agemon-architecture/SKILL.md +275 -0
  5. package/assets/skills/code-quality/agemon-clean-code/LICENSE +21 -0
  6. package/assets/skills/code-quality/agemon-clean-code/NOTICE.md +9 -0
  7. package/assets/skills/code-quality/agemon-clean-code/SKILL.md +78 -0
  8. package/assets/skills/code-quality/agemon-house-rules/SKILL.md +103 -0
  9. package/assets/skills/commit/agemon-commit/SKILL.md +87 -0
  10. package/assets/skills/design/agemon-design/LICENSE +21 -0
  11. package/assets/skills/design/agemon-design/NOTICE.md +9 -0
  12. package/assets/skills/design/agemon-design/SKILL.md +391 -0
  13. package/assets/skills/design/agemon-design/references/accessibility.md +182 -0
  14. package/assets/skills/design/agemon-design/references/agents.md +63 -0
  15. package/assets/skills/design/agemon-design/references/ai-chat.md +158 -0
  16. package/assets/skills/design/agemon-design/references/brief.md +186 -0
  17. package/assets/skills/design/agemon-design/references/color.md +216 -0
  18. package/assets/skills/design/agemon-design/references/components.md +91 -0
  19. package/assets/skills/design/agemon-design/references/copy.md +300 -0
  20. package/assets/skills/design/agemon-design/references/craft-intent.md +160 -0
  21. package/assets/skills/design/agemon-design/references/dashboard.md +131 -0
  22. package/assets/skills/design/agemon-design/references/dataviz.md +197 -0
  23. package/assets/skills/design/agemon-design/references/finish-bar.md +243 -0
  24. package/assets/skills/design/agemon-design/references/forms.md +192 -0
  25. package/assets/skills/design/agemon-design/references/heuristics.md +403 -0
  26. package/assets/skills/design/agemon-design/references/inspiration.md +287 -0
  27. package/assets/skills/design/agemon-design/references/layout.md +236 -0
  28. package/assets/skills/design/agemon-design/references/loops.md +155 -0
  29. package/assets/skills/design/agemon-design/references/metadata.md +98 -0
  30. package/assets/skills/design/agemon-design/references/modern-css.md +448 -0
  31. package/assets/skills/design/agemon-design/references/motion.md +434 -0
  32. package/assets/skills/design/agemon-design/references/personas.md +206 -0
  33. package/assets/skills/design/agemon-design/references/principles-catalog.md +299 -0
  34. package/assets/skills/design/agemon-design/references/recipe-auth.md +88 -0
  35. package/assets/skills/design/agemon-design/references/recipe-dashboard.md +130 -0
  36. package/assets/skills/design/agemon-design/references/recipe-landing.md +122 -0
  37. package/assets/skills/design/agemon-design/references/responsive.md +168 -0
  38. package/assets/skills/design/agemon-design/references/review.md +340 -0
  39. package/assets/skills/design/agemon-design/references/sound.md +150 -0
  40. package/assets/skills/design/agemon-design/references/spec.md +123 -0
  41. package/assets/skills/design/agemon-design/references/stack.md +522 -0
  42. package/assets/skills/design/agemon-design/references/state-design.md +188 -0
  43. package/assets/skills/design/agemon-design/references/themes.md +229 -0
  44. package/assets/skills/design/agemon-design/references/tokens.md +350 -0
  45. package/assets/skills/design/agemon-design/references/typography.md +246 -0
  46. package/assets/skills/design/agemon-design-dashboard/LICENSE +21 -0
  47. package/assets/skills/design/agemon-design-dashboard/NOTICE.md +9 -0
  48. package/assets/skills/design/agemon-design-dashboard/SKILL.md +113 -0
  49. package/assets/skills/design/agemon-design-editorial/LICENSE +21 -0
  50. package/assets/skills/design/agemon-design-editorial/NOTICE.md +9 -0
  51. package/assets/skills/design/agemon-design-editorial/SKILL.md +98 -0
  52. package/assets/skills/design/agemon-design-minimal/LICENSE +21 -0
  53. package/assets/skills/design/agemon-design-minimal/NOTICE.md +9 -0
  54. package/assets/skills/design/agemon-design-minimal/SKILL.md +97 -0
  55. package/assets/skills/geo-seo/geo/LICENSE +21 -0
  56. package/assets/skills/geo-seo/geo/NOTICE.md +18 -0
  57. package/assets/skills/geo-seo/geo/SKILL.md +145 -0
  58. package/assets/skills/geo-seo/geo-audit/LICENSE +21 -0
  59. package/assets/skills/geo-seo/geo-audit/NOTICE.md +17 -0
  60. package/assets/skills/geo-seo/geo-audit/SKILL.md +371 -0
  61. package/assets/skills/geo-seo/geo-audit/references/ai-visibility.md +233 -0
  62. package/assets/skills/geo-seo/geo-audit/references/content.md +329 -0
  63. package/assets/skills/geo-seo/geo-audit/references/platform-analysis.md +294 -0
  64. package/assets/skills/geo-seo/geo-audit/references/schema.md +383 -0
  65. package/assets/skills/geo-seo/geo-audit/references/technical.md +368 -0
  66. package/assets/skills/geo-seo/geo-brand-mentions/LICENSE +21 -0
  67. package/assets/skills/geo-seo/geo-brand-mentions/NOTICE.md +15 -0
  68. package/assets/skills/geo-seo/geo-brand-mentions/SKILL.md +459 -0
  69. package/assets/skills/geo-seo/geo-citability/LICENSE +21 -0
  70. package/assets/skills/geo-seo/geo-citability/NOTICE.md +14 -0
  71. package/assets/skills/geo-seo/geo-citability/SKILL.md +320 -0
  72. package/assets/skills/geo-seo/geo-content/LICENSE +21 -0
  73. package/assets/skills/geo-seo/geo-content/NOTICE.md +14 -0
  74. package/assets/skills/geo-seo/geo-content/SKILL.md +352 -0
  75. package/assets/skills/geo-seo/geo-crawlers/LICENSE +21 -0
  76. package/assets/skills/geo-seo/geo-crawlers/NOTICE.md +15 -0
  77. package/assets/skills/geo-seo/geo-crawlers/SKILL.md +388 -0
  78. package/assets/skills/geo-seo/geo-llmstxt/LICENSE +21 -0
  79. package/assets/skills/geo-seo/geo-llmstxt/NOTICE.md +14 -0
  80. package/assets/skills/geo-seo/geo-llmstxt/SKILL.md +433 -0
  81. package/assets/skills/geo-seo/geo-platform-optimizer/LICENSE +21 -0
  82. package/assets/skills/geo-seo/geo-platform-optimizer/NOTICE.md +14 -0
  83. package/assets/skills/geo-seo/geo-platform-optimizer/SKILL.md +282 -0
  84. package/assets/skills/geo-seo/geo-report/LICENSE +21 -0
  85. package/assets/skills/geo-seo/geo-report/NOTICE.md +14 -0
  86. package/assets/skills/geo-seo/geo-report/SKILL.md +406 -0
  87. package/assets/skills/geo-seo/geo-report-pdf/LICENSE +21 -0
  88. package/assets/skills/geo-seo/geo-report-pdf/NOTICE.md +20 -0
  89. package/assets/skills/geo-seo/geo-report-pdf/SKILL.md +153 -0
  90. package/assets/skills/geo-seo/geo-report-pdf/templates/geo-report-template.html +548 -0
  91. package/assets/skills/geo-seo/geo-schema/LICENSE +21 -0
  92. package/assets/skills/geo-seo/geo-schema/NOTICE.md +16 -0
  93. package/assets/skills/geo-seo/geo-schema/SKILL.md +396 -0
  94. package/assets/skills/geo-seo/geo-technical/LICENSE +21 -0
  95. package/assets/skills/geo-seo/geo-technical/NOTICE.md +15 -0
  96. package/assets/skills/geo-seo/geo-technical/SKILL.md +566 -0
  97. package/assets/skills/performance/agemon-performance/NOTICE.md +1 -0
  98. package/assets/skills/performance/agemon-performance/SKILL.md +76 -0
  99. package/assets/skills/security/agemon-security/LICENSE +21 -0
  100. package/assets/skills/security/agemon-security/NOTICE.md +8 -0
  101. package/assets/skills/security/agemon-security/SKILL.md +356 -0
  102. package/assets/skills/self-review/agemon-review-intake/LICENSE +21 -0
  103. package/assets/skills/self-review/agemon-review-intake/NOTICE.md +9 -0
  104. package/assets/skills/self-review/agemon-review-intake/SKILL.md +205 -0
  105. package/assets/skills/self-review/agemon-review-request/LICENSE +21 -0
  106. package/assets/skills/self-review/agemon-review-request/NOTICE.md +9 -0
  107. package/assets/skills/self-review/agemon-review-request/SKILL.md +104 -0
  108. package/assets/skills/self-review/agemon-review-request/code-reviewer.md +188 -0
  109. package/assets/skills/self-review/agemon-root-cause/LICENSE +21 -0
  110. package/assets/skills/self-review/agemon-root-cause/NOTICE.md +10 -0
  111. package/assets/skills/self-review/agemon-root-cause/SKILL.md +283 -0
  112. package/assets/skills/self-review/agemon-root-cause/condition-based-waiting-example.ts +158 -0
  113. package/assets/skills/self-review/agemon-root-cause/condition-based-waiting.md +115 -0
  114. package/assets/skills/self-review/agemon-root-cause/defense-in-depth.md +122 -0
  115. package/assets/skills/self-review/agemon-root-cause/find-polluter.sh +72 -0
  116. package/assets/skills/self-review/agemon-root-cause/root-cause-tracing.md +169 -0
  117. package/assets/skills/self-review/agemon-root-cause/test-academic.md +14 -0
  118. package/assets/skills/self-review/agemon-root-cause/test-pressure-1.md +58 -0
  119. package/assets/skills/self-review/agemon-root-cause/test-pressure-2.md +68 -0
  120. package/assets/skills/self-review/agemon-root-cause/test-pressure-3.md +69 -0
  121. package/assets/skills/self-review/agemon-verify-before-done/LICENSE +21 -0
  122. package/assets/skills/self-review/agemon-verify-before-done/NOTICE.md +9 -0
  123. package/assets/skills/self-review/agemon-verify-before-done/SKILL.md +120 -0
  124. package/assets/skills/team-lead/agemon-plan-rfc/SKILL.md +317 -0
  125. package/assets/skills/team-lead/prd-generator/SKILL.md +437 -0
  126. package/assets/skills/team-lead/skill-headofit-audit/SKILL.md +72 -0
  127. package/assets/skills/team-lead/skill-incident-rca/SKILL.md +66 -0
  128. package/assets/skills/team-lead/skill-meeting-lifecycle/SKILL.md +63 -0
  129. package/assets/skills/team-lead/skill-obsidian-vault-sync/SKILL.md +69 -0
  130. package/assets/skills/team-lead/skill-prd-decomposer/SKILL.md +71 -0
  131. package/assets/skills/team-lead/skill-sec-check/SKILL.md +70 -0
  132. package/assets/skills/team-lead/skill-task-extractor/SKILL.md +79 -0
  133. package/assets/skills/team-lead/skill-tech-spike/SKILL.md +57 -0
  134. package/assets/skills/team-lead/skill-techlead-reviewer/SKILL.md +81 -0
  135. package/assets/tools/code-review-graph-constraints.txt +1418 -0
  136. package/assets/tools/package-lock.json +111 -0
  137. package/assets/tools/package.json +6 -0
  138. package/dist/chunk-5LATHJYU.js +4026 -0
  139. package/dist/chunk-5LATHJYU.js.map +1 -0
  140. package/dist/fake-subprocess-2BETWZVZ.js +666 -0
  141. package/dist/fake-subprocess-2BETWZVZ.js.map +1 -0
  142. package/dist/index.js +21101 -1956
  143. package/dist/index.js.map +1 -1
  144. package/package.json +30 -17
@@ -0,0 +1,155 @@
1
+ # Loop Engine
2
+
3
+ Run→evaluate→fix one→re-evaluate→stop. A loop is not a review pass — it iterates until a binary gate passes or the budget runs out. A loop NEVER hard-depends on a renderer, NEVER auto-installs anything, and ALWAYS degrades with an explicit notice when visual evaluation is unavailable. The budget is non-negotiable: when it is exhausted the engine stops and reports, even if the gate has not passed.
4
+
5
+ ---
6
+
7
+ ## Engine Contract
8
+
9
+ Every preset declares all five fields. None is optional.
10
+
11
+ | Field | Allowed values | Description |
12
+ |-------|---------------|-------------|
13
+ | `target` | `new-build` \| `existing-surface` \| `user-screenshot` | The artifact being evaluated |
14
+ | `lens` | one or more reference file paths / sections | Reference content that drives evaluation |
15
+ | `gate` | `checklist-all-green` \| `zero-critical` \| `zero-off-system` | Binary pass condition |
16
+ | `renderer` | `required` \| `none` | Renderer dependency level — `required` degrades to code-only if unavailable; `none` means static analysis only (always available) |
17
+ | `budget` | integer 1–5 (default 3, hard cap 5) | Maximum iterations allowed |
18
+
19
+ ---
20
+
21
+ ## The Loop
22
+
23
+ The agent executes this numbered procedure for every iteration:
24
+
25
+ 1. **Read** the target AND `.ui-craft/brief.md` §6 (learned constraints = override registry). Brief §6 overrides preset gates; the a11y/correctness floor is never overridden.
26
+ 2. **Detect renderer** (see Renderer Detection Ladder below) and emit the pre-flight cost notice — preset name, budget, "will run up to N iterations; each iteration runs one full evaluate → fix → re-evaluate cycle." MUST emit before any iteration begins.
27
+ 3. **Evaluate** the target through the preset's lens → produce a severity-ranked findings list.
28
+ 4. **Select ONE highest-impact fix.** Ranking: Critical before Major; tiebreaker within the same tier = earlier-numbered finish-bar pass / earlier-listed state in the state-design lattice / earlier-cited finding in the brief; for token-consistency: within the same tier, apply layer order — primitive token violations before semantic, semantic before component. MUST NOT apply more than one fix per iteration.
29
+ 5. **Apply** the selected fix.
30
+ 6. **Re-evaluate** — run the gate check on the updated state.
31
+ 7. **Stop** when the gate passes OR the iteration count reaches the budget, whichever comes first. On budget exhaustion: STOP, print final gate state, and list all open findings as "Unresolved within budget:". MUST NOT silently extend the budget.
32
+
33
+ **Anti-thrash rule:** a fix that introduces a new violation is caught in the NEXT iteration — no inline re-validation. It counts against the budget.
34
+
35
+ ---
36
+
37
+ ## Renderer Detection Ladder
38
+
39
+ Probe in this order; stop at the first match:
40
+
41
+ 1. `playwright` / `@playwright/test` / `puppeteer` in `package.json` devDependencies → use it.
42
+ 2. Existing e2e / visual harness file (`playwright.config.*`, `cypress.config.*`, `cypress/`, `.storybook/test-runner*`) → use it.
43
+ 3. Agent-browser tool present in the current agent session → **announce before launch** ("I will invoke agent-browser for visual evaluation — proceeding unless you say stop") then use it.
44
+ 4. `npx playwright screenshot` — **OPT-IN ONLY.** Present as a choice; NEVER auto-run. If the user declines → rung 5.
45
+ 5. **NONE** → degrade to code-only reasoning. Emit verbatim:
46
+
47
+ > "renderer: none — evaluating code only; visual rendering unverified. Findings cover structure, tokens, and code-level anti-slop signals. Confidence: partial."
48
+
49
+ ---
50
+
51
+ ## Honesty / Confidence Contract
52
+
53
+ Every loop report MUST state:
54
+
55
+ - **Renderer tier** used (rung number from the detection ladder above).
56
+ - **Whether visual evaluation occurred.**
57
+ - **Confidence level** — `full` (renderer present), `partial` (code-only or renderer degraded).
58
+ - **Iteration count vs budget** — e.g., "2 of 3 iterations used."
59
+ - **Unresolved findings** — any finding still open when the loop stops.
60
+
61
+ **`target = user-screenshot` → EVALUATE-ONLY mode:**
62
+ - Produce a severity-ranked findings report.
63
+ - MUST NOT apply any fixes.
64
+ - MUST NOT run fix iterations.
65
+ - MUST NOT claim the gate passed or failed.
66
+ - MUST state: "Target is a screenshot — findings reported; no fix iterations run."
67
+
68
+ **`visual-anti-slop` with renderer=none** is the SAME preset degraded — not a separate preset. Report the gate as "partial — visual rendering unverified."
69
+
70
+ ---
71
+
72
+ ## Anti-thrash + Budget Rules
73
+
74
+ - **One fix per iteration.** The ranking above is mandatory — it prevents oscillation.
75
+ - The iteration counter is tracked in the report ("iteration 2 of 3").
76
+ - Budget exhausted → STOP, print final gate state + "Unresolved within budget:" list. The user must explicitly raise the budget; the engine MUST NOT auto-extend.
77
+ - Brief §6 constraints override preset gates. The a11y/correctness floor is never overridden by brief constraints.
78
+
79
+ ---
80
+
81
+ ## Preset Catalog
82
+
83
+ | Preset | target | lens | gate | renderer | maps to |
84
+ |--------|--------|------|------|----------|---------|
85
+ | `visual-anti-slop` | new-build \| existing-surface | SKILL.md Anti-Slop Test + finish-bar.md Pass 1 + Pass 9 | zero-critical (Major: absent or explicitly user-confirmed — no self-accept, silence ≠ accepted) | required — degrades to code-only | `/finalize` |
86
+ | `state-coverage` | new-build \| existing-surface | state-design.md lattice, knob-gated to CRAFT_LEVEL | checklist-all-green (all required states present) | none | `/unhappy` |
87
+ | `token-consistency` | new-build \| existing-surface | tokens.md 3-layer contract + SKILL.md Anti-Slop Minor items | zero-off-system | none (static scan) | `/tokens audit` |
88
+
89
+ ---
90
+
91
+ ## visual-anti-slop — eliminate AI-template signals until the gate passes
92
+
93
+ **Lens:** SKILL.md Anti-Slop Test (Critical + Major items) + `finish-bar.md` Pass 1 (hierarchy) + Pass 9 (pixel honesty).
94
+ **Gate:** all Critical Anti-Slop items absent AND all Major items absent or explicitly user-confirmed. A Major is "accepted" ONLY when the user explicitly confirms it (during pre-flight or mid-loop); absent explicit confirmation it stays OPEN and counts against the gate. No self-accept, no "not found on re-eval = accepted".
95
+ **Renderer:** required — degrades to code-only (partial confidence) if unavailable. The gate is reported as "partial — visual rendering unverified" when renderer=none. MUST NOT claim full pass on visual criteria without a renderer.
96
+ **Highest-impact ranking:** Critical Anti-Slop findings first; within Major, earlier-numbered finish-bar pass wins.
97
+ **Example run:**
98
+
99
+ - Pre-flight: "visual-anti-slop, budget 3, will run up to 3 iterations; each iteration runs one full evaluate → fix → re-evaluate cycle."
100
+ - Iter 1: Critical — identical card grid detected → refactor to asymmetric layout. Re-evaluate.
101
+ - Iter 2: Major — uniform border-radius on all elements → vary by element role. Re-evaluate.
102
+ - Gate passes (0 Critical, 0 unaccepted Major). Stop at 2/3 iterations.
103
+
104
+ ---
105
+
106
+ ## state-coverage — iterate until all required states are present
107
+
108
+ **Lens:** `state-design.md` state lattice, knob-gated to CRAFT_LEVEL (per state-design.md lattice — see the CRAFT_LEVEL table there for the full threshold definition).
109
+ **Gate:** all required states (per the CRAFT_LEVEL knob, as defined in state-design.md) present as explicit designs or stubs.
110
+ **Renderer:** none — code analysis only; always available.
111
+ **Highest-impact ranking:** missing required states ordered by position in the state-design lattice (idle → loading → empty → error → partial → success → conflict → offline).
112
+ **Example run:**
113
+
114
+ - Pre-flight: "state-coverage, budget 3, will run up to 3 iterations; each iteration runs one full evaluate → fix → re-evaluate cycle."
115
+ - Iter 1: CRAFT_LEVEL 6 → required: idle/loading/empty/error/success. Missing: empty, error. Highest-impact = empty (lattice position). Stub empty state with copy + CTA. Re-evaluate.
116
+ - Iter 2: Missing: error. Stub error state with cause + retry. Re-evaluate.
117
+ - Gate passes (all required states present). Stop at 2/3 iterations.
118
+
119
+ ---
120
+
121
+ ## token-consistency — iterate until zero off-system values remain
122
+
123
+ **Lens:** `tokens.md` 3-layer contract (per tokens.md 3-layer contract — see that file for canonical layer definitions) + SKILL.md Anti-Slop Minor items for hardcoded values.
124
+ **Gate:** zero off-system values — any color, radius, or spacing value not drawn from the project's token system.
125
+ **Renderer:** none — static code scan; always available.
126
+ **Highest-impact ranking:** Critical token violations (raw hex colors) before Major (arbitrary radii, magic spacing); tiebreaker = order of appearance in the file.
127
+ **Example run:**
128
+
129
+ - Pre-flight: "token-consistency, budget 3, will run up to 3 iterations; each iteration runs one full evaluate → fix → re-evaluate cycle."
130
+ - Iter 1: Off-system values found: `#3B82F6` (hex color), `border-radius: 6px` (magic value). Highest-impact = hex color → replace with `var(--accent)`. Re-evaluate.
131
+ - Iter 2: Remaining: `border-radius: 6px` → replace with `var(--radius-sm)`. Re-evaluate.
132
+ - Gate passes (zero off-system values). Stop at 2/3 iterations.
133
+
134
+ ---
135
+
136
+ ## Choosing / Adding a Preset
137
+
138
+ | Use case | Preset |
139
+ |----------|--------|
140
+ | Surface looks AI-generated; fix visual slop | `visual-anti-slop` |
141
+ | Edge-case states are missing (loading, error, empty) | `state-coverage` |
142
+ | Hardcoded colors, radii, or spacing bypass the token system | `token-consistency` |
143
+
144
+ **Preset block template** (drop-in for future presets — mirror this file's style):
145
+
146
+ ```
147
+ ## <preset-name> — <one-line intent>
148
+ **Lens:** <reference file(s) + exact section(s)>
149
+ **Gate:** <binary pass condition>
150
+ **Renderer:** <none | required | gated — degrades to code-only at lower confidence>
151
+ **Highest-impact ranking:** <tier order + tiebreaker>
152
+ **Example run:** <3-5 line trace: iter 1 finding→fix, iter 2 …, stop reason>
153
+ ```
154
+
155
+ Add the new preset row to the Preset Catalog table above. All five template fields are required.
@@ -0,0 +1,98 @@
1
+ # Metadata
2
+
3
+ Page metadata quality — correctness of what's already being emitted, not SEO strategy. For keyword strategy, content structure, or ranking tactics, defer to an SEO skill; this file is about the mechanical contract between what a page claims about itself and what actually ships.
4
+
5
+ ---
6
+
7
+ ## When to Read This
8
+
9
+ Read when a task touches `<title>`, `<meta>` tags, canonical URLs, Open Graph / Twitter Card tags, structured data (JSON-LD), or favicons — building a new page template, auditing an existing site, or wiring up a metadata API in a framework (Next.js `generateMetadata`, Remix `meta`, etc.).
10
+
11
+ ---
12
+
13
+ ## Social Sharing Tags
14
+
15
+ Any page that could get pasted into Slack, X, LinkedIn, or iMessage needs `og:title`, `og:image`, and `twitter:card` present at minimum. Drop one and the platform improvises — usually a generic card, sometimes a broken one.
16
+
17
+ ```html
18
+ <meta property="og:title" content="Page title" />
19
+ <meta property="og:description" content="One or two sentences." />
20
+ <meta property="og:image" content="https://example.com/og/page-slug.png" />
21
+ <meta property="og:url" content="https://example.com/page-slug" />
22
+ <meta name="twitter:card" content="summary_large_image" />
23
+ ```
24
+
25
+ Tags existing in the page source proves nothing about how a card actually renders. Crawlers for these platforms can't resolve `localhost`, so the only real test is pasting a live deployed link into the destination (or its dedicated preview debugger) and reading what comes back.
26
+
27
+ ---
28
+
29
+ ## Deterministic Metadata
30
+
31
+ Nothing feeding a title, description, or JSON-LD block should trace back to an unstable input — no `Math.random()`, no `Date.now()`, no client-only state read before first paint.
32
+
33
+ Two distinct failures follow from ignoring this:
34
+ - **Hydration mismatch** — the server-rendered value and the client's first pass disagree, and the framework flags it.
35
+ - **A stuck preview cache** — social platforms fetch a URL's metadata once and cache the result. If that single fetch happened to capture a randomized or time-sensitive value, every future share of that link shows the same wrong preview, with no external way to force a refresh.
36
+
37
+ Pull metadata only from route params, fetched content, or build-time constants.
38
+
39
+ ---
40
+
41
+ ## Identity Consistency
42
+
43
+ Title, description, canonical URL, and `og:url` all describe one page — a contradiction between any two of them (a title selling one thing, a description written for another) is a bug, not a stylistic quirk.
44
+
45
+ Settle on the page's single canonical form up front — trailing slash or not, `www` or not, query params stripped or kept — and reuse that exact string in the canonical tag, the sitemap, internal links, and the Open Graph URL. Letting any of these drift from the others leaves crawlers guessing which version is authoritative, which can split ranking signal across what should be one page.
46
+
47
+ ---
48
+
49
+ ## Non-Production Indexing
50
+
51
+ Preview deployments, staging environments, and branch builds ship with search indexing turned off:
52
+
53
+ ```html
54
+ <meta name="robots" content="noindex, nofollow" />
55
+ ```
56
+
57
+ Wire this to the environment itself — a build-time flag, not a checkbox a person remembers to tick — because the one deploy someone forgets is exactly the one that matters. An indexed staging URL then competes with the real page in search results and can surface content before it's meant to be public.
58
+
59
+ ---
60
+
61
+ ## Structured Data (JSON-LD)
62
+
63
+ Structured data should restate facts that already exist elsewhere on the page, not add new ones for the crawler's benefit.
64
+
65
+ ```json
66
+ {
67
+ "@context": "https://schema.org",
68
+ "@type": "Product",
69
+ "name": "Actual product name",
70
+ "offers": {
71
+ "@type": "Offer",
72
+ "price": "49.00",
73
+ "priceCurrency": "USD"
74
+ }
75
+ }
76
+ ```
77
+
78
+ Don't fabricate organization details that aren't published anywhere, a price the product doesn't actually charge, a review count nobody left, or a `ratingValue` backed by zero reviews. Search engines diff structured data against the visible page and penalize the mismatch — and beyond the penalty, a made-up rating is a false claim presented to users as fact. No reviews yet means the `AggregateRating` block gets omitted, not filled with placeholder numbers.
79
+
80
+ ---
81
+
82
+ ## Favicons & Touch Icons
83
+
84
+ A single `favicon.ico` doesn't cover the surfaces that request icons — browsers, home-screen bookmarks, and OS task switchers each ask for a different size, and any size that isn't supplied falls back to an unstyled default glyph.
85
+
86
+ ```html
87
+ <link rel="icon" href="/favicon.ico" sizes="32x32" />
88
+ <link rel="icon" href="/icon.svg" type="image/svg+xml" />
89
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" />
90
+ <link rel="manifest" href="/site.webmanifest" />
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Cross-References
96
+
97
+ - `accessibility.md` — semantic structure that structured data and screen readers both depend on.
98
+ - `responsive.md` — `og:image` dimensions and safe-area concerns for share-preview screenshots.