heimdall-agent 1.0.0 → 1.1.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 (231) hide show
  1. package/README.md +57 -26
  2. package/README.pt-BR.md +429 -0
  3. package/agents/cloud-engineer.md +77 -0
  4. package/agents/code-sentinel.md +66 -35
  5. package/agents/database-architect.md +31 -25
  6. package/agents/frontend-designer.md +30 -28
  7. package/agents/mobile-designer.md +25 -24
  8. package/agents/modernizer.md +66 -0
  9. package/agents/orchestrator.md +94 -93
  10. package/agents/reviewer.md +100 -71
  11. package/agents/security-auditor.md +27 -27
  12. package/agents/tester.md +97 -90
  13. package/commands/grill-me.md +20 -4
  14. package/commands/orchestrate.md +16 -0
  15. package/commands/orchestrator.md +16 -0
  16. package/commands/plan.md +17 -1
  17. package/config/agents.json +21 -3
  18. package/config/mcp.json +72 -0
  19. package/config/models.json +26 -16
  20. package/config/profiles.json +2 -4
  21. package/config/skills.json +210 -100
  22. package/docs/SKILLS.md +341 -245
  23. package/docs/designs/old/2026-10-31 plan-lifecycle-backlog-and-clean-code-skill.md +87 -0
  24. package/docs/designs/old/2026-11-02 skill-upstream-audit-and-update.md +105 -0
  25. package/docs/designs/old/2026-11-05 communication-doctrine-bluf-ste.md +94 -0
  26. package/docs/designs/old/2026-11-06-cloud-engineer-and-resilience-synthesis.md +67 -0
  27. package/docs/designs/old/2026-11-06-herdr-native-agent-orchestration.md +45 -0
  28. package/docs/runs/skill-audit/add_progressive_disclosure.cjs +30 -0
  29. package/docs/runs/skill-audit/check_heimdall_skills.ps1 +9 -0
  30. package/docs/runs/skill-audit/compare_classics.ps1 +26 -0
  31. package/docs/runs/skill-audit/compare_taste.ps1 +12 -0
  32. package/docs/runs/skill-audit/customization-report.json +380 -0
  33. package/docs/runs/skill-audit/diff_pending_skills.cjs +94 -0
  34. package/docs/runs/skill-audit/fetch_and_apply_skill.cjs +58 -0
  35. package/docs/runs/skill-audit/fetch_and_apply_taste_v2.cjs +65 -0
  36. package/docs/runs/skill-audit/inspect_pending_skills.cjs +71 -0
  37. package/docs/runs/skill-audit/inventory.json +308 -0
  38. package/docs/runs/skill-audit/list_local_taste.ps1 +1 -0
  39. package/docs/runs/skill-audit/phase5-update-plan.json +595 -0
  40. package/docs/runs/skill-audit/phase5-update-plan.md +138 -0
  41. package/docs/runs/skill-audit/probe.ps1 +16 -0
  42. package/docs/runs/skill-audit/probe_classics_branches.ps1 +3 -0
  43. package/docs/runs/skill-audit/probe_commits.ps1 +15 -0
  44. package/docs/runs/skill-audit/probe_repos.ps1 +17 -0
  45. package/docs/runs/skill-audit/probe_sentry_sec.ps1 +3 -0
  46. package/docs/runs/skill-audit/probe_sentry_sweep.ps1 +5 -0
  47. package/docs/runs/skill-audit/probe_snyk.ps1 +3 -0
  48. package/docs/runs/skill-audit/probe_snyk_recipes.ps1 +5 -0
  49. package/docs/runs/skill-audit/probe_taste_branches.ps1 +8 -0
  50. package/docs/runs/skill-audit/probe_taste_v19.ps1 +3 -0
  51. package/docs/runs/skill-audit/probe_user_repos.ps1 +19 -0
  52. package/docs/runs/skill-audit/prune_taste_skills.cjs +22 -0
  53. package/docs/runs/skill-audit/run_phase1_2.cjs +142 -0
  54. package/docs/runs/skill-audit/run_phase6_verification.cjs +107 -0
  55. package/docs/runs/skill-audit/show_16_details.ps1 +25 -0
  56. package/docs/runs/skill-audit/show_20_skills.ps1 +28 -0
  57. package/docs/runs/skill-audit/show_classics_diff.cjs +37 -0
  58. package/docs/runs/skill-audit/sync_agent_markdowns.cjs +30 -0
  59. package/docs/runs/skill-audit/taste-skill-upstream.md +542 -0
  60. package/docs/runs/skill-audit/update-manifest.md +88 -0
  61. package/docs/runs/skill-audit/update_config_skills.cjs +52 -0
  62. package/docs/runs/skill-audit/update_registry_phase7.cjs +83 -0
  63. package/docs/runs/skill-audit/upstream-status.json +563 -0
  64. package/docs/runs/skill-audit/verification-results.json +252 -0
  65. package/doctrine/AGENTS.md +39 -77
  66. package/hooks/git/pre-commit +11 -0
  67. package/hooks/heimdall-hook.cjs +81 -2
  68. package/hooks/herdr-agent-state.ps1 +55 -0
  69. package/hooks/hooks.json +0 -11
  70. package/lib/catalog-sync.cjs +162 -0
  71. package/lib/hermes-context.cjs +57 -0
  72. package/lib/model-context.cjs +123 -0
  73. package/lib/path-discovery.cjs +94 -0
  74. package/package.json +7 -3
  75. package/playbooks/01-interactive-grilling-gate.md +14 -1
  76. package/playbooks/02-fast-code-deep-verification.md +3 -2
  77. package/playbooks/03-adversarial-code-review.md +3 -3
  78. package/playbooks/05-canonical-plan-template.md +32 -18
  79. package/playbooks/06-model-registry-matrix.md +24 -13
  80. package/playbooks/07-legacy-code-modernization.md +74 -0
  81. package/playbooks/08-backlog-and-change-request-flow.md +122 -0
  82. package/setup.mjs +592 -172
  83. package/skills/antislop/SKILL.md +76 -56
  84. package/skills/antislop/VERSION +1 -0
  85. package/skills/antislop-copywriting/SKILL.md +372 -372
  86. package/skills/antislop-human/LICENSE-web-quality-skills +21 -0
  87. package/skills/antislop-human/SKILL.md +204 -147
  88. package/skills/antislop-human/contrast-check.py +168 -165
  89. package/skills/antislop-human/contrast-mcp.py +6 -3
  90. package/skills/antislop-human/references/A11Y-PATTERNS.md +249 -0
  91. package/skills/antislop-human/references/WCAG.md +127 -0
  92. package/skills/antislop-ui/LICENSE-web-quality-skills +21 -0
  93. package/skills/antislop-ui/SKILL.md +344 -304
  94. package/skills/antislop-ui/references/CORE-WEB-VITALS.md +181 -0
  95. package/skills/antislop-ui/references/WEB-BASELINE.md +28 -0
  96. package/skills/brainstorming/SKILL.md +274 -265
  97. package/skills/brainstorming/builder-check-prompt.md +23 -0
  98. package/skills/brainstorming/scripts/frame-template.html +213 -213
  99. package/skills/brainstorming/scripts/server.cjs +723 -723
  100. package/skills/brandkit/SKILL.md +798 -798
  101. package/skills/brutalist-skill/SKILL.md +93 -92
  102. package/skills/caveman/README.md +68 -0
  103. package/skills/caveman/SKILL.md +73 -38
  104. package/skills/claude-collaborator/SKILL.md +24 -44
  105. package/skills/clean-code/SKILL.md +152 -0
  106. package/skills/cloudflare-security-audit/AI-AND-LLM.md +83 -83
  107. package/skills/cloudflare-security-audit/ATTACK-CLASSES.md +130 -130
  108. package/skills/cloudflare-security-audit/CLIENT-SIDE.md +83 -83
  109. package/skills/cloudflare-security-audit/CLOUD-AND-DEPLOYMENT.md +86 -86
  110. package/skills/cloudflare-security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -84
  111. package/skills/cloudflare-security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -89
  112. package/skills/cloudflare-security-audit/HUNTING.md +251 -251
  113. package/skills/cloudflare-security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -101
  114. package/skills/cloudflare-security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -81
  115. package/skills/cloudflare-security-audit/RECONNAISSANCE.md +156 -156
  116. package/skills/cloudflare-security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -78
  117. package/skills/cloudflare-security-audit/SKILL.md +192 -192
  118. package/skills/cloudflare-security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -73
  119. package/skills/cloudflare-security-audit/VALIDATION-AND-REPORTING.md +186 -186
  120. package/skills/cloudflare-security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -105
  121. package/skills/cloudflare-security-audit/report-schema.json +461 -461
  122. package/skills/cloudflare-security-audit/validate-coverage-ledger.cjs +872 -872
  123. package/skills/cloudflare-security-audit/validate-coverage-ledger.test.cjs +740 -740
  124. package/skills/cloudflare-security-audit/validate-findings.cjs +773 -773
  125. package/skills/cloudflare-security-audit/validate-findings.test.cjs +652 -652
  126. package/skills/codex-collaborator/SKILL.md +24 -45
  127. package/skills/communication-doctrine/SKILL.md +89 -0
  128. package/skills/diagnosing-superpowers/SKILL.md +1 -1
  129. package/skills/diagnosing-superpowers/references/github-issues.md +3 -3
  130. package/skills/diagnosing-superpowers/templates/issue.md +23 -4
  131. package/skills/executing-plans/SKILL.md +0 -52
  132. package/skills/executing-plans/scripts/task-done +52 -52
  133. package/skills/executing-plans/scripts/task-start +28 -28
  134. package/skills/gemini-collaborator/SKILL.md +24 -56
  135. package/skills/herdr/SKILL.md +243 -0
  136. package/skills/image-to-code-skill/SKILL.md +1228 -1228
  137. package/skills/imagegen-frontend-mobile/SKILL.md +1465 -1465
  138. package/skills/imagegen-frontend-web/SKILL.md +987 -987
  139. package/skills/karpathy-guidelines/SKILL.md +67 -67
  140. package/skills/mcp-engineering/SKILL.md +74 -0
  141. package/skills/minimalist-skill/SKILL.md +87 -85
  142. package/skills/output-skill/SKILL.md +49 -49
  143. package/skills/ponytail/SKILL.md +36 -52
  144. package/skills/postgres-best-practices/SKILL.md +30 -52
  145. package/skills/postgres-best-practices/references/backup-restore.md +372 -0
  146. package/skills/postgres-best-practices/references/bulk-loading.md +315 -0
  147. package/skills/postgres-best-practices/references/connection-pooling.md +310 -0
  148. package/skills/postgres-best-practices/references/hot-standby.md +221 -0
  149. package/skills/postgres-best-practices/references/indexing.md +318 -0
  150. package/skills/postgres-best-practices/references/logical-replication.md +610 -0
  151. package/skills/postgres-best-practices/references/major-version-upgrades.md +334 -0
  152. package/skills/postgres-best-practices/references/performance-diagnostics.md +553 -0
  153. package/skills/postgres-best-practices/references/query-optimization.md +294 -0
  154. package/skills/postgres-best-practices/references/query-patterns.md +566 -0
  155. package/skills/postgres-best-practices/references/schema-design.md +362 -0
  156. package/skills/postgres-best-practices/references/security-roles.md +489 -0
  157. package/skills/postgres-best-practices/references/transaction-isolation.md +344 -0
  158. package/skills/progressive-disclosure/SKILL.md +68 -0
  159. package/skills/pstack-discipline/SKILL.md +40 -0
  160. package/skills/receiving-code-review/SKILL.md +2 -23
  161. package/skills/requesting-code-review/SKILL.md +7 -36
  162. package/skills/soft-skill/SKILL.md +99 -98
  163. package/skills/stitch-skill/DESIGN.md +121 -121
  164. package/skills/stitch-skill/SKILL.md +185 -184
  165. package/skills/strix-security/SKILL.md +54 -53
  166. package/skills/subagent-driven-development/SKILL.md +28 -260
  167. package/skills/subagent-driven-development/references/batching.md +11 -0
  168. package/skills/subagent-driven-development/references/cannot-verify.md +10 -0
  169. package/skills/subagent-driven-development/references/final-review.md +47 -0
  170. package/skills/subagent-driven-development/references/fix-loop.md +77 -0
  171. package/skills/subagent-driven-development/references/handling-reports.md +15 -0
  172. package/skills/subagent-driven-development/references/preflight.md +26 -0
  173. package/skills/subagent-driven-development/references/resuming.md +12 -0
  174. package/skills/subagent-driven-development/scripts/review-package +53 -53
  175. package/skills/subagent-driven-development/scripts/sdd-workspace +87 -82
  176. package/skills/subagent-driven-development/scripts/task-brief +43 -43
  177. package/skills/systematic-debugging/SKILL.md +283 -306
  178. package/skills/taste-skill/SKILL.md +542 -1206
  179. package/skills/taste-skill/references/app-screens.md +1199 -0
  180. package/skills/taste-skill/references/colour.md +141 -0
  181. package/skills/taste-skill/references/copy.md +177 -0
  182. package/skills/taste-skill/references/critique.md +182 -0
  183. package/skills/taste-skill/references/imagery.md +791 -0
  184. package/skills/taste-skill/references/layout.md +292 -0
  185. package/skills/taste-skill/references/motion.md +980 -0
  186. package/skills/taste-skill/references/research.md +356 -0
  187. package/skills/taste-skill/references/scenes.md +174 -0
  188. package/skills/taste-skill/references/tells.md +115 -0
  189. package/skills/taste-skill/references/type.md +170 -0
  190. package/skills/test-driven-development/SKILL.md +330 -337
  191. package/skills/thermo/SKILL.md +67 -0
  192. package/skills/threat-modeling/SKILL.md +55 -0
  193. package/skills/trailofbits-audit-context/SKILL.md +72 -72
  194. package/skills/trailofbits-insecure-defaults/commands/audit.md +35 -0
  195. package/skills/trailofbits-insecure-defaults/references/debug-features.json +13 -13
  196. package/skills/trailofbits-insecure-defaults/references/debug-features.md +75 -75
  197. package/skills/trailofbits-insecure-defaults/references/default-credentials.json +12 -12
  198. package/skills/trailofbits-insecure-defaults/references/default-credentials.md +76 -76
  199. package/skills/trailofbits-insecure-defaults/references/fail-open-security.json +11 -11
  200. package/skills/trailofbits-insecure-defaults/references/fail-open-security.md +70 -70
  201. package/skills/trailofbits-insecure-defaults/references/fallback-secrets.json +11 -11
  202. package/skills/trailofbits-insecure-defaults/references/fallback-secrets.md +70 -70
  203. package/skills/trailofbits-insecure-defaults/references/permissive-access.json +13 -13
  204. package/skills/trailofbits-insecure-defaults/references/permissive-access.md +62 -62
  205. package/skills/trailofbits-insecure-defaults/references/weak-crypto.json +13 -13
  206. package/skills/trailofbits-insecure-defaults/references/weak-crypto.md +71 -71
  207. package/skills/trailofbits-triage-brocards/SKILL.md +208 -208
  208. package/skills/verification-before-completion/SKILL.md +0 -14
  209. package/skills/writing-plans/SKILL.md +11 -15
  210. package/skills/writing-skills/SKILL.md +21 -303
  211. package/skills/writing-skills/references/CLAUDE_MD_TESTING.md +189 -0
  212. package/skills/writing-skills/references/anthropic-best-practices.md +1150 -0
  213. package/skills/writing-skills/references/bulletproofing.md +80 -0
  214. package/skills/writing-skills/references/discovery.md +201 -0
  215. package/skills/writing-skills/references/flowcharts.md +37 -0
  216. package/skills/writing-skills/references/graphviz-conventions.dot +172 -0
  217. package/skills/writing-skills/references/persuasion-principles.md +187 -0
  218. package/skills/writing-skills/references/testing-skills-with-subagents.md +384 -0
  219. package/tools/{claude-bridge.ps1 → archive/claude-bridge.ps1} +10 -7
  220. package/tools/{codex-bridge.ps1 → archive/codex-bridge.ps1} +1 -1
  221. package/tools/{gemini-bridge.ps1 → archive/gemini-bridge.ps1} +12 -19
  222. package/skills/gpt-tasteskill/SKILL.md +0 -74
  223. package/skills/taste-skill-v1/SKILL.md +0 -226
  224. /package/tools/{claude-bridge.cmd → archive/claude-bridge.cmd} +0 -0
  225. /package/tools/{claude-bridge.sh → archive/claude-bridge.sh} +0 -0
  226. /package/tools/{codex-bridge.cmd → archive/codex-bridge.cmd} +0 -0
  227. /package/tools/{codex-bridge.sh → archive/codex-bridge.sh} +0 -0
  228. /package/tools/{codexcli-bridge.cmd → archive/codexcli-bridge.cmd} +0 -0
  229. /package/tools/{codexcli-bridge.ps1 → archive/codexcli-bridge.ps1} +0 -0
  230. /package/tools/{gemini-bridge.cmd → archive/gemini-bridge.cmd} +0 -0
  231. /package/tools/{gemini-bridge.sh → archive/gemini-bridge.sh} +0 -0
@@ -0,0 +1,181 @@
1
+ # Core Web Vitals (LCP, INP, CLS)
2
+
3
+ > Reference for antislop. Adapted from the MIT-licensed web-quality-skills by Addy Osmani (https://github.com/addyosmani/web-quality-skills); see LICENSE-web-quality-skills in the skill folder.
4
+
5
+ Targeted optimization for the three Core Web Vitals using field data to identify user impact and browser traces to diagnose causes.
6
+
7
+ ## Measure before optimizing
8
+
9
+ When a runnable URL is available, prefer this sequence:
10
+
11
+ 1. Check page-level CrUX p75 data, with a clearly labeled origin fallback when page data is unavailable.
12
+ 2. Record a browser performance trace under stated conditions. With Chrome DevTools MCP, trace summaries can include CrUX alongside the observed lab metrics.
13
+ 3. Analyze only the insights associated with the failing metric, then inspect the implicated code and resources.
14
+ 4. Re-run equivalent lab measurements after the fix. Do not claim an immediate field improvement; CrUX and first-party RUM need new user visits.
15
+
16
+ If only source code is available, identify likely causes but do not claim that LCP, INP, or CLS is failing without runtime evidence.
17
+
18
+ ## The three metrics
19
+
20
+ | Metric | Measures | Good | Needs work | Poor |
21
+ |--------|----------|------|------------|------|
22
+ | **LCP** | Loading | ≤ 2.5s | 2.5s to 4s | > 4s |
23
+ | **INP** | Interactivity | ≤ 200ms | 200ms to 500ms | > 500ms |
24
+ | **CLS** | Visual Stability | ��� 0.1 | 0.1 to 0.25 | > 0.25 |
25
+
26
+ Google measures at the **75th percentile**: 75% of page visits must meet "Good" thresholds.
27
+
28
+ These are the numbers R-40 keeps out of the Hard Gate. They describe real visits, so compare a page against them only with a real measurement in hand, and report "not measured" otherwise (R-36).
29
+
30
+ ---
31
+
32
+ ## LCP: Largest Contentful Paint
33
+
34
+ LCP measures when the largest visible content element renders. Usually this is:
35
+ - Hero image or video
36
+ - Large text block
37
+ - Background image
38
+ - `<svg>` element
39
+
40
+ ### Common LCP issues
41
+
42
+ **1. Slow server response (TTFB > 800ms)**
43
+ ```
44
+ Fix: CDN, caching, optimized backend, edge rendering
45
+ ```
46
+
47
+ **2. Render-blocking resources**
48
+ ```html
49
+ <!-- ❌ Blocks rendering -->
50
+ <link rel="stylesheet" href="/all-styles.css">
51
+
52
+ <!-- ✅ Critical CSS inlined, rest deferred -->
53
+ <style>/* Critical above-fold CSS */</style>
54
+ <link rel="preload" href="/styles.css" as="style"
55
+ onload="this.onload=null;this.rel='stylesheet'">
56
+ ```
57
+
58
+ **3. Slow resource load times**
59
+ ```html
60
+ <!-- ❌ LCP image is discovered only after a stylesheet loads -->
61
+ <div class="hero"></div>
62
+
63
+ <!-- ✅ Discoverable in initial HTML and prioritized -->
64
+ <link rel="preload" href="/hero.webp" as="image" fetchpriority="high">
65
+ <img src="/hero.webp" alt="Hero" fetchpriority="high">
66
+ ```
67
+
68
+ Prefer a discoverable `<img>` with `fetchpriority="high"`. Add the preload only when the trace shows that the resource would otherwise be discovered late; duplicate or speculative preloads can compete for bandwidth.
69
+
70
+ **4. Client-side rendering delays**
71
+ ```javascript
72
+ // ❌ Content loads after JavaScript
73
+ useEffect(() => {
74
+ fetch('/api/hero-text').then(r => r.json()).then(setHeroText);
75
+ }, []);
76
+
77
+ // ✅ Server-side or static rendering
78
+ // Use SSR, SSG, or streaming to send HTML with content
79
+ export async function getServerSideProps() {
80
+ const heroText = await fetchHeroText();
81
+ return { props: { heroText } };
82
+ }
83
+ ```
84
+
85
+ **5. Make navigations instant with the Speculation Rules API**
86
+
87
+ For sites with predictable same-origin journeys, prerendering a likely next page can make a successful subsequent navigation much faster. Treat this as a measured navigation optimization, not a substitute for fixing the current page's LCP.
88
+
89
+ ```html
90
+ <script type="speculationrules">
91
+ {
92
+ "prerender": [{
93
+ "where": { "href_matches": "/*" },
94
+ "eagerness": "moderate"
95
+ }]
96
+ }
97
+ </script>
98
+ ```
99
+
100
+ Current Chrome behavior is specific enough to guide the choice:
101
+
102
+ | `eagerness` | Trigger |
103
+ |-------------|---------|
104
+ | `conservative` | Pointer or touch down |
105
+ | `moderate` | Desktop: 200ms hover, or earlier pointer down; mobile: viewport heuristics |
106
+ | `eager` | Chrome 143+: desktop 10ms hover; mobile 50ms after the anchor enters the viewport |
107
+ | `immediate` | As soon as the rules are observed |
108
+
109
+ Start conservatively and measure prediction hit rate, transferred bytes, server load, and navigation improvement before expanding the rules. Recheck [Chrome's maintained eagerness documentation](https://developer.chrome.com/docs/web-platform/prerender-pages#eagerness) before hardcoding timing-sensitive behavior.
110
+
111
+ Caveats:
112
+ - **Bandwidth/CPU cost.** Each prerender is roughly a full page load. Scope `where` carefully (`href_matches` patterns, exclude logout/checkout) and avoid `immediate` outside small sites.
113
+ - **Side effects fire early.** Analytics, ads, and any code that runs on load will fire when the prerender starts, not when the user navigates. Gate side effects on the [`prerenderingchange` event](https://developer.chrome.com/docs/web-platform/prerender-pages#detect_when_a_page_is_prerendered_or_used_for_a_full_navigation) or `document.prerendering`.
114
+ - **Chromium-only.** Safari and Firefox ignore the script, it's a progressive enhancement, never a regression.
115
+
116
+ ### LCP optimization checklist
117
+
118
+ ```markdown
119
+ - [ ] TTFB < 800ms (use CDN, edge caching)
120
+ - [ ] LCP resource is discoverable in initial HTML and prioritized; preload only if the trace shows late discovery
121
+ - [ ] LCP image optimized (WebP/AVIF, correct size)
122
+ - [ ] Critical CSS inlined (< 14KB)
123
+ - [ ] No render-blocking JavaScript in <head>
124
+ - [ ] Fonts don't block text rendering (font-display: swap)
125
+ - [ ] LCP element in initial HTML (not JS-rendered)
126
+ - [ ] Speculation Rules added for likely-next navigations (moderate eagerness)
127
+ ```
128
+
129
+ ### LCP element identification
130
+
131
+ This snippet diagnoses the current page session. It is not field data.
132
+
133
+ ```javascript
134
+ // Find your LCP element
135
+ new PerformanceObserver((list) => {
136
+ const entries = list.getEntries();
137
+ const lastEntry = entries[entries.length - 1];
138
+ console.log('LCP element:', lastEntry.element);
139
+ console.log('LCP time:', lastEntry.startTime);
140
+ }).observe({ type: 'largest-contentful-paint', buffered: true });
141
+ ```
142
+
143
+ ---
144
+
145
+ ## INP: Interaction to Next Paint
146
+
147
+ INP measures responsiveness across clicks, taps, and key presses during a visit. Diagnose its input delay, processing time, and presentation delay separately; a slow interaction may involve main-thread contention before the handler, expensive application work, or delayed rendering after it.
148
+
149
+ When field INP is poor or a trace identifies a slow interaction, read [web.dev on optimizing INP](https://web.dev/articles/optimize-inp) for trace interpretation, yielding patterns, and third-party and rendering causes.
150
+
151
+ ---
152
+
153
+ ## CLS: Cumulative Layout Shift
154
+
155
+ CLS measures unexpected layout shifts across a page visit. Use field attribution or a trace to identify the shifted node and the trigger; do not assume the visible victim caused the shift.
156
+
157
+ When field CLS is poor or a trace reports shifts, read [web.dev on optimizing CLS](https://web.dev/articles/optimize-cls) for reserved-space patterns, dynamic content, and font and animation fixes.
158
+
159
+ ---
160
+
161
+ ## Measurement sources
162
+
163
+ | Source | Use |
164
+ |--------|-----|
165
+ | Browser performance trace (Chrome DevTools MCP: `performance_start_trace`) | Observe one load or interaction and diagnose focused insights; use included CrUX context when available |
166
+ | CrUX or Search Console | Prioritize aggregated real-user outcomes at p75 |
167
+ | Lighthouse CLI or PageSpeed Insights | Controlled lab fallback when DevTools tools are unavailable |
168
+ | First-party RUM | Segment current production experience by route, device, release, and attribution |
169
+ | Raw `PerformanceObserver` | Inspect one page session during debugging |
170
+
171
+ Do not route performance through Chrome DevTools MCP's `lighthouse_audit`; that capability intentionally covers non-performance Lighthouse categories. Do not compare a single lab value directly with a field p75 as if they were equivalent samples.
172
+
173
+ When adding or reviewing production collection, read [the `web-vitals` library documentation](https://github.com/GoogleChrome/web-vitals). Prefer the `web-vitals` library because raw browser APIs do not by themselves implement every Core Web Vital's lifecycle and reporting rules.
174
+
175
+ ---
176
+
177
+ ## References
178
+
179
+ - [web.dev LCP](https://web.dev/articles/lcp) and [optimizing LCP](https://web.dev/articles/optimize-lcp)
180
+ - [web.dev INP](https://web.dev/articles/inp)
181
+ - [web.dev CLS](https://web.dev/articles/cls)
@@ -0,0 +1,28 @@
1
+ # Web Baseline
2
+
3
+ > Reference for antislop. Adapted from the MIT-licensed web-quality-skills by Addy Osmani (https://github.com/addyosmani/web-quality-skills); see LICENSE-web-quality-skills in the skill folder.
4
+
5
+ Page basics and security defaults. This is an optional checklist, not a Hard Gate rule: run it when the task asks for a production-ready page or a web-quality review. None of it shows in a screenshot, which is why it is easy to skip.
6
+
7
+ ## Document basics
8
+
9
+ - `<!doctype html>` first, so the page never renders in quirks mode.
10
+ - `<meta charset="utf-8">` first in `<head>`.
11
+ - `<meta name="viewport" content="width=device-width, initial-scale=1">` (zoom stays allowed, R-39).
12
+ - Valid, semantic HTML with no duplicate `id`.
13
+
14
+ ## Runtime
15
+
16
+ Console errors are already R-35.
17
+
18
+ - No deprecated APIs: `document.write`, synchronous XHR, `unload` listeners.
19
+ - Scroll and touch listeners are `{ passive: true }` where they do not call `preventDefault`.
20
+
21
+ ## Security defaults
22
+
23
+ - HTTPS for every resource, with no mixed `http://` content.
24
+ - External links opened in a new tab carry `rel="noopener noreferrer"`.
25
+ - No secrets, API keys, or tokens in client code; they stay on the server.
26
+ - `textContent` or a sanitizer instead of `innerHTML` or `eval` with untrusted input.
27
+ - Third-party scripts and styles from a CDN you do not control are pinned with Subresource Integrity.
28
+ - Permissions (location, notifications, camera) are requested after a user action, never on page load.