agemon 0.1.0 → 6.3.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.
- package/README.md +983 -30
- package/assets/skills/architecture/agemon-architecture/LICENSE +21 -0
- package/assets/skills/architecture/agemon-architecture/NOTICE.md +9 -0
- package/assets/skills/architecture/agemon-architecture/SKILL.md +275 -0
- package/assets/skills/code-quality/agemon-clean-code/LICENSE +21 -0
- package/assets/skills/code-quality/agemon-clean-code/NOTICE.md +9 -0
- package/assets/skills/code-quality/agemon-clean-code/SKILL.md +78 -0
- package/assets/skills/code-quality/agemon-house-rules/SKILL.md +103 -0
- package/assets/skills/commit/agemon-commit/SKILL.md +87 -0
- package/assets/skills/design/agemon-design/LICENSE +21 -0
- package/assets/skills/design/agemon-design/NOTICE.md +43 -0
- package/assets/skills/design/agemon-design/SKILL.md +128 -0
- package/assets/skills/design/agemon-design/references/accessibility.md +182 -0
- package/assets/skills/design/agemon-design/references/actions.md +215 -0
- package/assets/skills/design/agemon-design/references/ai-chat.md +158 -0
- package/assets/skills/design/agemon-design/references/brief.md +190 -0
- package/assets/skills/design/agemon-design/references/color.md +216 -0
- package/assets/skills/design/agemon-design/references/components.md +91 -0
- package/assets/skills/design/agemon-design/references/copy.md +300 -0
- package/assets/skills/design/agemon-design/references/core-rules.md +166 -0
- package/assets/skills/design/agemon-design/references/craft-intent.md +162 -0
- package/assets/skills/design/agemon-design/references/dashboard.md +131 -0
- package/assets/skills/design/agemon-design/references/dataviz.md +197 -0
- package/assets/skills/design/agemon-design/references/finish-bar.md +243 -0
- package/assets/skills/design/agemon-design/references/forms.md +192 -0
- package/assets/skills/design/agemon-design/references/heuristics.md +319 -0
- package/assets/skills/design/agemon-design/references/inspiration.md +287 -0
- package/assets/skills/design/agemon-design/references/layout.md +236 -0
- package/assets/skills/design/agemon-design/references/loops.md +155 -0
- package/assets/skills/design/agemon-design/references/metadata.md +98 -0
- package/assets/skills/design/agemon-design/references/modern-css.md +448 -0
- package/assets/skills/design/agemon-design/references/motion.md +434 -0
- package/assets/skills/design/agemon-design/references/personas.md +206 -0
- package/assets/skills/design/agemon-design/references/preset-dashboard.md +109 -0
- package/assets/skills/design/agemon-design/references/preset-editorial.md +94 -0
- package/assets/skills/design/agemon-design/references/preset-minimal.md +93 -0
- package/assets/skills/design/agemon-design/references/principles-catalog.md +299 -0
- package/assets/skills/design/agemon-design/references/recipe-auth.md +88 -0
- package/assets/skills/design/agemon-design/references/recipe-dashboard.md +130 -0
- package/assets/skills/design/agemon-design/references/recipe-landing.md +120 -0
- package/assets/skills/design/agemon-design/references/responsive.md +168 -0
- package/assets/skills/design/agemon-design/references/review.md +340 -0
- package/assets/skills/design/agemon-design/references/routing.md +143 -0
- package/assets/skills/design/agemon-design/references/sound.md +150 -0
- package/assets/skills/design/agemon-design/references/spec.md +123 -0
- package/assets/skills/design/agemon-design/references/stack.md +522 -0
- package/assets/skills/design/agemon-design/references/stage-assets.md +106 -0
- package/assets/skills/design/agemon-design/references/stage-build.md +46 -0
- package/assets/skills/design/agemon-design/references/stage-critique.md +34 -0
- package/assets/skills/design/agemon-design/references/stage-directions.md +44 -0
- package/assets/skills/design/agemon-design/references/stage-intake.md +34 -0
- package/assets/skills/design/agemon-design/references/stage-verify.md +44 -0
- package/assets/skills/design/agemon-design/references/state-design.md +188 -0
- package/assets/skills/design/agemon-design/references/tells-2026-11.md +32 -0
- package/assets/skills/design/agemon-design/references/themes.md +233 -0
- package/assets/skills/design/agemon-design/references/third-party-licenses.md +323 -0
- package/assets/skills/design/agemon-design/references/tokens.md +350 -0
- package/assets/skills/design/agemon-design/references/typography.md +248 -0
- package/assets/skills/design/agemon-design/scripts/audit-page.js +532 -0
- package/assets/skills/design/agemon-design/scripts/check-source.mjs +358 -0
- package/assets/skills/design/agemon-design/scripts/deal.mjs +231 -0
- package/assets/skills/design/agemon-design/scripts/inventory.mjs +676 -0
- package/assets/skills/essentials/web-design-guidelines/LICENSE +21 -0
- package/assets/skills/essentials/web-design-guidelines/NOTICE.md +14 -0
- package/assets/skills/essentials/web-design-guidelines/SKILL.md +18 -0
- package/assets/skills/essentials/web-design-guidelines/references/guidelines.md +184 -0
- package/assets/skills/essentials/writing-guidelines/LICENSE +21 -0
- package/assets/skills/essentials/writing-guidelines/NOTICE.md +14 -0
- package/assets/skills/essentials/writing-guidelines/SKILL.md +18 -0
- package/assets/skills/essentials/writing-guidelines/references/guidelines.md +250 -0
- package/assets/skills/founder/agemon-founder-board/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-board/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-board/SKILL.md +111 -0
- package/assets/skills/founder/agemon-founder-board/lenses.md +84 -0
- package/assets/skills/founder/agemon-founder-brand/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-brand/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-brand/SKILL.md +77 -0
- package/assets/skills/founder/agemon-founder-cfo/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-cfo/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-cfo/SKILL.md +109 -0
- package/assets/skills/founder/agemon-founder-cfo/example.json +27 -0
- package/assets/skills/founder/agemon-founder-cfo/unit_economics.py +270 -0
- package/assets/skills/founder/agemon-founder-competitors/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-competitors/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-competitors/SKILL.md +84 -0
- package/assets/skills/founder/agemon-founder-consumer/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-consumer/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-consumer/SKILL.md +126 -0
- package/assets/skills/founder/agemon-founder-consumer/customer.example.json +34 -0
- package/assets/skills/founder/agemon-founder-consumer/panel.py +424 -0
- package/assets/skills/founder/agemon-founder-consumer/pitch.example.md +3 -0
- package/assets/skills/founder/agemon-founder-launch/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-launch/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-launch/SKILL.md +65 -0
- package/assets/skills/founder/agemon-founder-marketing/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-marketing/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-marketing/SKILL.md +80 -0
- package/assets/skills/founder/agemon-founder-offer/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-offer/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-offer/SKILL.md +75 -0
- package/assets/skills/founder/agemon-founder-ops/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-ops/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-ops/SKILL.md +77 -0
- package/assets/skills/founder/agemon-founder-plan/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-plan/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-plan/SKILL.md +88 -0
- package/assets/skills/founder/agemon-founder-plan/compile.py +178 -0
- package/assets/skills/founder/agemon-founder-pricing/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-pricing/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-pricing/SKILL.md +92 -0
- package/assets/skills/founder/agemon-founder-pricing/van_westendorp.py +172 -0
- package/assets/skills/geo-seo/geo/LICENSE +21 -0
- package/assets/skills/geo-seo/geo/NOTICE.md +18 -0
- package/assets/skills/geo-seo/geo/SKILL.md +145 -0
- package/assets/skills/geo-seo/geo-audit/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-audit/NOTICE.md +17 -0
- package/assets/skills/geo-seo/geo-audit/SKILL.md +371 -0
- package/assets/skills/geo-seo/geo-audit/references/ai-visibility.md +233 -0
- package/assets/skills/geo-seo/geo-audit/references/content.md +329 -0
- package/assets/skills/geo-seo/geo-audit/references/platform-analysis.md +294 -0
- package/assets/skills/geo-seo/geo-audit/references/schema.md +383 -0
- package/assets/skills/geo-seo/geo-audit/references/technical.md +368 -0
- package/assets/skills/geo-seo/geo-brand-mentions/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-brand-mentions/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-brand-mentions/SKILL.md +459 -0
- package/assets/skills/geo-seo/geo-citability/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-citability/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-citability/SKILL.md +320 -0
- package/assets/skills/geo-seo/geo-content/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-content/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-content/SKILL.md +352 -0
- package/assets/skills/geo-seo/geo-crawlers/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-crawlers/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-crawlers/SKILL.md +388 -0
- package/assets/skills/geo-seo/geo-llmstxt/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-llmstxt/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-llmstxt/SKILL.md +433 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/SKILL.md +282 -0
- package/assets/skills/geo-seo/geo-report/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-report/SKILL.md +406 -0
- package/assets/skills/geo-seo/geo-report-pdf/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report-pdf/NOTICE.md +20 -0
- package/assets/skills/geo-seo/geo-report-pdf/SKILL.md +153 -0
- package/assets/skills/geo-seo/geo-report-pdf/templates/geo-report-template.html +548 -0
- package/assets/skills/geo-seo/geo-schema/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-schema/NOTICE.md +16 -0
- package/assets/skills/geo-seo/geo-schema/SKILL.md +396 -0
- package/assets/skills/geo-seo/geo-technical/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-technical/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-technical/SKILL.md +566 -0
- package/assets/skills/output-style/agemon-adhd/LICENSE +21 -0
- package/assets/skills/output-style/agemon-adhd/NOTICE.md +13 -0
- package/assets/skills/output-style/agemon-adhd/SKILL.md +138 -0
- package/assets/skills/performance/agemon-performance/NOTICE.md +1 -0
- package/assets/skills/performance/agemon-performance/SKILL.md +76 -0
- package/assets/skills/security/agemon-security/LICENSE +21 -0
- package/assets/skills/security/agemon-security/NOTICE.md +8 -0
- package/assets/skills/security/agemon-security/SKILL.md +356 -0
- package/assets/skills/security/agemon-security-audit/AI-AND-LLM.md +83 -0
- package/assets/skills/security/agemon-security-audit/ATTACK-CLASSES.md +130 -0
- package/assets/skills/security/agemon-security-audit/CLIENT-SIDE.md +83 -0
- package/assets/skills/security/agemon-security-audit/CLOUD-AND-DEPLOYMENT.md +86 -0
- package/assets/skills/security/agemon-security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -0
- package/assets/skills/security/agemon-security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -0
- package/assets/skills/security/agemon-security-audit/HUNTING.md +251 -0
- package/assets/skills/security/agemon-security-audit/LICENSE +21 -0
- package/assets/skills/security/agemon-security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -0
- package/assets/skills/security/agemon-security-audit/NOTICE.md +12 -0
- package/assets/skills/security/agemon-security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -0
- package/assets/skills/security/agemon-security-audit/RECONNAISSANCE.md +156 -0
- package/assets/skills/security/agemon-security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -0
- package/assets/skills/security/agemon-security-audit/SKILL.md +192 -0
- package/assets/skills/security/agemon-security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -0
- package/assets/skills/security/agemon-security-audit/VALIDATION-AND-REPORTING.md +186 -0
- package/assets/skills/security/agemon-security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -0
- package/assets/skills/security/agemon-security-audit/report-schema.json +461 -0
- package/assets/skills/security/agemon-security-audit/validate-coverage-ledger.cjs +872 -0
- package/assets/skills/security/agemon-security-audit/validate-findings.cjs +773 -0
- package/assets/skills/self-review/agemon-review-intake/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-intake/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-intake/SKILL.md +205 -0
- package/assets/skills/self-review/agemon-review-request/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-request/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-request/SKILL.md +104 -0
- package/assets/skills/self-review/agemon-review-request/code-reviewer.md +188 -0
- package/assets/skills/self-review/agemon-root-cause/LICENSE +21 -0
- package/assets/skills/self-review/agemon-root-cause/NOTICE.md +10 -0
- package/assets/skills/self-review/agemon-root-cause/SKILL.md +283 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting-example.ts +158 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting.md +115 -0
- package/assets/skills/self-review/agemon-root-cause/defense-in-depth.md +122 -0
- package/assets/skills/self-review/agemon-root-cause/find-polluter.sh +72 -0
- package/assets/skills/self-review/agemon-root-cause/root-cause-tracing.md +169 -0
- package/assets/skills/self-review/agemon-root-cause/test-academic.md +14 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-1.md +58 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-2.md +68 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-3.md +69 -0
- package/assets/skills/self-review/agemon-verify-before-done/LICENSE +21 -0
- package/assets/skills/self-review/agemon-verify-before-done/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-verify-before-done/SKILL.md +120 -0
- package/assets/skills/team-lead/agemon-plan-rfc/SKILL.md +317 -0
- package/assets/skills/team-lead/prd-generator/SKILL.md +437 -0
- package/assets/skills/team-lead/skill-headofit-audit/SKILL.md +72 -0
- package/assets/skills/team-lead/skill-incident-rca/SKILL.md +66 -0
- package/assets/skills/team-lead/skill-meeting-lifecycle/SKILL.md +63 -0
- package/assets/skills/team-lead/skill-obsidian-vault-sync/SKILL.md +69 -0
- package/assets/skills/team-lead/skill-prd-decomposer/SKILL.md +71 -0
- package/assets/skills/team-lead/skill-sec-check/SKILL.md +70 -0
- package/assets/skills/team-lead/skill-task-extractor/SKILL.md +79 -0
- package/assets/skills/team-lead/skill-tech-spike/SKILL.md +57 -0
- package/assets/skills/team-lead/skill-techlead-reviewer/SKILL.md +81 -0
- package/assets/skills/workflow/agemon-brainstorming/LICENSE +21 -0
- package/assets/skills/workflow/agemon-brainstorming/NOTICE.md +14 -0
- package/assets/skills/workflow/agemon-brainstorming/SKILL.md +287 -0
- package/assets/skills/workflow/agemon-brainstorming/builder-check-prompt.md +23 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/LICENSE +21 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/SKILL.md +167 -0
- package/assets/skills/workflow/agemon-executing-plans/LICENSE +21 -0
- package/assets/skills/workflow/agemon-executing-plans/NOTICE.md +15 -0
- package/assets/skills/workflow/agemon-executing-plans/SKILL.md +322 -0
- package/assets/skills/workflow/agemon-executing-plans/scripts/task-done +55 -0
- package/assets/skills/workflow/agemon-executing-plans/scripts/task-start +32 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/LICENSE +21 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/SKILL.md +225 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/LICENSE +21 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/NOTICE.md +15 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/SKILL.md +339 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/code-reviewer.md +198 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/implementer-prompt.md +154 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/re-review-prompt.md +116 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/batching.md +11 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/cannot-verify.md +10 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/final-review.md +49 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/fix-loop.md +77 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/handling-reports.md +15 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/preflight.md +26 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/resuming.md +12 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/role-scout.md +18 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/role-worker.md +19 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/review-package +64 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/sdd-repo +54 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/sdd-workspace +110 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/task-brief +108 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/task-reviewer-prompt.md +209 -0
- package/assets/skills/workflow/agemon-test-driven-development/LICENSE +21 -0
- package/assets/skills/workflow/agemon-test-driven-development/NOTICE.md +14 -0
- package/assets/skills/workflow/agemon-test-driven-development/SKILL.md +330 -0
- package/assets/skills/workflow/agemon-test-driven-development/writing-good-tests.md +198 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/LICENSE +21 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/SKILL.md +167 -0
- package/assets/skills/workflow/agemon-writing-plans/LICENSE +21 -0
- package/assets/skills/workflow/agemon-writing-plans/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-writing-plans/SKILL.md +204 -0
- package/assets/tools/code-review-graph-constraints.txt +1418 -0
- package/assets/tools/package-lock.json +111 -0
- package/assets/tools/package.json +6 -0
- package/dist/chunk-ZZBF3GOV.js +3451 -0
- package/dist/chunk-ZZBF3GOV.js.map +1 -0
- package/dist/fake-subprocess-IV4ML77S.js +636 -0
- package/dist/fake-subprocess-IV4ML77S.js.map +1 -0
- package/dist/index.js +23836 -1945
- package/dist/index.js.map +1 -1
- package/package.json +37 -17
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Layout & Composition
|
|
2
|
+
|
|
3
|
+
Spatial reasoning, grouping principles, and hierarchy discipline. Tools (Flex, Grid) come last.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Gestalt Grouping Principles
|
|
8
|
+
|
|
9
|
+
Perception organizes visual fields before conscious thought. Five laws govern how elements are read as groups:
|
|
10
|
+
|
|
11
|
+
**Proximity** — Elements closer together are perceived as related. Spacing is the primary grouping signal. Use it before borders, cards, or background fills.
|
|
12
|
+
|
|
13
|
+
**Similarity** — Elements that share shape, color, or size are perceived as the same kind of thing. Color-coding a column in a table exploits this; inconsistent icon weights break it.
|
|
14
|
+
|
|
15
|
+
**Common Region** — Elements inside a shared boundary (card, background, border) form a group. Use sparingly — every card is a visual tax. Ask: does this content need isolation, or does proximity alone suffice?
|
|
16
|
+
|
|
17
|
+
**Continuity** — The eye follows a line or curve through a layout. Aligning elements along an axis creates an implied path that guides the scan.
|
|
18
|
+
|
|
19
|
+
**Closure** — The eye completes incomplete shapes. Use this to reduce clutter: a partially-visible element (card cropped at viewport edge) signals "more exists" without a label.
|
|
20
|
+
|
|
21
|
+
### The primary rule: use spacing before structure
|
|
22
|
+
|
|
23
|
+
Before reaching for a card, background swatch, or divider line, try creating the group with spacing alone. If it reads, stop there. Structure adds visual weight and complexity — earn it.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Spacing Rhythm
|
|
28
|
+
|
|
29
|
+
The most violated rule in UI. State it as an invariant:
|
|
30
|
+
|
|
31
|
+
> **Space within a group < space between groups < space between sections.**
|
|
32
|
+
|
|
33
|
+
Concrete: a form label 4px above its input, inputs in the same form 16px apart, the form itself 48px from the next section. If any of these relationships inverts, the grouping breaks.
|
|
34
|
+
|
|
35
|
+
### Scale
|
|
36
|
+
|
|
37
|
+
Use tokens from a defined set. Values come from the scale — never arbitrary.
|
|
38
|
+
|
|
39
|
+
```css
|
|
40
|
+
--space-xs: 0.25rem; /* 4px — label-to-input, icon-to-label */
|
|
41
|
+
--space-sm: 0.5rem; /* 8px — items within a group */
|
|
42
|
+
--space-md: 1rem; /* 16px — related components */
|
|
43
|
+
--space-lg: 1.5rem; /* 24px — sibling sections */
|
|
44
|
+
--space-xl: 2rem; /* 32px — component-to-component */
|
|
45
|
+
--space-2xl: 3rem; /* 48px — section separations */
|
|
46
|
+
--space-3xl: 4rem; /* 64px — major page regions */
|
|
47
|
+
--space-4xl: 6rem; /* 96px — hero-to-content, above-fold breathing room */
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Use `gap` for sibling spacing — eliminates margin collapse and is the correct mental model.
|
|
51
|
+
|
|
52
|
+
Use `clamp()` for fluid spacing: `clamp(var(--space-lg), 4vw, var(--space-3xl))` scales without breakpoints.
|
|
53
|
+
|
|
54
|
+
**WHEN IT BREAKS:** Very dense data tables and compact UI patterns (command palettes, menus) compress this rhythm deliberately. At 100% zoom the hierarchy still holds — the scale values shrink proportionally. Never collapse two adjacent levels to the same value.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Visual Hierarchy
|
|
59
|
+
|
|
60
|
+
### The Squint Test
|
|
61
|
+
|
|
62
|
+
Stand back, defocus your eyes, or apply a blur filter to the design. The image resolves to blobs of light and dark, size and contrast — text becomes unreadable. What you see is the page at the perceptual level of a first glance (~200ms).
|
|
63
|
+
|
|
64
|
+
At that level:
|
|
65
|
+
|
|
66
|
+
1. One thing should dominate — the primary action or headline.
|
|
67
|
+
2. A secondary cluster should appear next — supporting information.
|
|
68
|
+
3. The page structure (navigation, footer, sidebar) should be lowest in perceived weight.
|
|
69
|
+
|
|
70
|
+
Why it works: the human visual system applies a low-pass spatial frequency filter before conscious reading. The squint test simulates that filter. If hierarchy fails the squint test, users experience visual noise even if they cannot articulate why.
|
|
71
|
+
|
|
72
|
+
### Measurable Ratios
|
|
73
|
+
|
|
74
|
+
Four levels is the practical maximum for most UI. Beyond that, distinctions collapse.
|
|
75
|
+
|
|
76
|
+
| Level | Role | Signal |
|
|
77
|
+
|-------|------|--------|
|
|
78
|
+
| Primary | Page-defining element (hero headline, main CTA) | Largest, highest contrast, most visual weight |
|
|
79
|
+
| Secondary | Supporting structure (subheadings, section labels) | Minimum 1.5x smaller or lighter than primary |
|
|
80
|
+
| Tertiary | Body content, field labels, card titles | Readable, not competing |
|
|
81
|
+
| Quaternary | Metadata, timestamps, captions | Muted, clearly subordinate |
|
|
82
|
+
|
|
83
|
+
**Minimum 1.5x difference between adjacent levels** to create a clear distinction. A 1.2x difference reads as an accident, not a decision.
|
|
84
|
+
|
|
85
|
+
**WHEN IT BREAKS:** Typography pairs can carry hierarchy at identical size using weight + tracking — a 400/700 weight pair at 14px is a clear two-level system. In that case the size ratio rule yields to the type system. See `typography.md`.
|
|
86
|
+
|
|
87
|
+
### Hierarchy Tools (use in this order)
|
|
88
|
+
|
|
89
|
+
1. **Space** — generous whitespace isolates the primary element before you touch anything else
|
|
90
|
+
2. **Size** — scale differences above 1.5x register immediately
|
|
91
|
+
3. **Weight** — font-weight, border-weight, shadow depth
|
|
92
|
+
4. **Color** — last resort; adds semantic load and accessibility risk
|
|
93
|
+
|
|
94
|
+
Using all four at once creates noise. Mature interfaces use one or two.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### Serial Position Effect
|
|
99
|
+
|
|
100
|
+
First and last items in a sequence are remembered best (primacy + recency). Put the critical item first or last in nav lists, onboarding steps, and feature rows — never buried mid-sequence. Mid-list is where options go to be forgotten.
|
|
101
|
+
|
|
102
|
+
## Composition Strategies
|
|
103
|
+
|
|
104
|
+
### Symmetry vs. Asymmetry
|
|
105
|
+
|
|
106
|
+
Symmetry signals stability, formality, and confidence. Use it for hero sections, authentication flows, landing page headers.
|
|
107
|
+
|
|
108
|
+
Asymmetry signals energy, modernity, and movement. Use it for editorial layouts, feature showcases, dashboards with a dominant primary panel.
|
|
109
|
+
|
|
110
|
+
Avoid the default of centered-everything — it reads as unsophisticated because it makes no compositional decision. Left-aligned layouts with deliberate asymmetric weight distribution feel more considered.
|
|
111
|
+
|
|
112
|
+
### Focal Point
|
|
113
|
+
|
|
114
|
+
Every layout needs exactly one focal point — the element the eye arrives at first. If you have two competing elements at the same visual weight, one of them is wrong. Remove hierarchy from one or subordinate it spatially.
|
|
115
|
+
|
|
116
|
+
### Optical Center vs. Geometric Center
|
|
117
|
+
|
|
118
|
+
The geometric center of a rectangle is at 50% vertical. The optical center is 5–8% above that. Content positioned at the optical center feels balanced; content at true geometric center reads as slightly low.
|
|
119
|
+
|
|
120
|
+
This matters most for:
|
|
121
|
+
- Modal dialogs — vertically centered modals in a viewport look sunken; use `align-items: center` with a slight upward offset or top-biased margins
|
|
122
|
+
- Icon placement within a bounding box — a 24×24 icon with a visually tall glyph needs a −1px vertical nudge
|
|
123
|
+
- Above-the-fold hero sections — weight the primary element in the upper optical zone
|
|
124
|
+
|
|
125
|
+
### Rule of Thirds (use only with hero imagery)
|
|
126
|
+
|
|
127
|
+
The rule of thirds creates dynamic tension by placing subjects at grid intersections rather than center. In interfaces without strong photographic content it adds complexity without benefit. Reserve it for editorial layouts and landing pages with full-bleed images.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Alignment Discipline
|
|
132
|
+
|
|
133
|
+
- **Max 1-2 alignment types per section.** Every additional alignment axis is another anchor the eye must re-find; mixed left/center/right in one view reads as unplanned.
|
|
134
|
+
- **Mixed text sizes on one line align to the shared baseline**, not to vertical centers — center-aligning a 24px number next to a 13px label makes the label float.
|
|
135
|
+
- **Truncate the middle, not the end**, when items share long prefixes ("Quarterly report — … — Q3 2026"): the differentiating ends are what users scan for.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Choosing Layout Tools
|
|
140
|
+
|
|
141
|
+
**Flexbox — 1D.** Rows of items, nav bars, button groups, component internals. Default choice for the majority of components.
|
|
142
|
+
|
|
143
|
+
**Grid — 2D.** Page structure, dashboards, anything requiring row AND column coordination. Reach for it when flex with `flex-wrap` forces workarounds.
|
|
144
|
+
|
|
145
|
+
```css
|
|
146
|
+
/* Responsive without breakpoints — flex */
|
|
147
|
+
.group { display: flex; flex-wrap: wrap; gap: var(--space-md); }
|
|
148
|
+
|
|
149
|
+
/* Responsive without breakpoints — grid */
|
|
150
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Don't default to Grid when Flex would be simpler. Don't reach for JS measurement when CSS layout solves it.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Breaking Monotony
|
|
158
|
+
|
|
159
|
+
- Don't default to card grids for everything — spacing creates grouping naturally
|
|
160
|
+
- Cards only when content is truly distinct and actionable — never nest cards inside cards
|
|
161
|
+
- Vary card sizes, span columns, or mix cards with non-card content
|
|
162
|
+
- Asymmetric compositions break the centered-content default when the content supports it
|
|
163
|
+
- Never template the "big metric + small label + stat row + gradient" pattern — it's a design cliché
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Depth & Elevation
|
|
168
|
+
|
|
169
|
+
### Z-Index Scale (Semantic)
|
|
170
|
+
```css
|
|
171
|
+
--z-dropdown: 10;
|
|
172
|
+
--z-sticky: 20;
|
|
173
|
+
--z-modal-backdrop: 30;
|
|
174
|
+
--z-modal: 40;
|
|
175
|
+
--z-toast: 50;
|
|
176
|
+
--z-tooltip: 60;
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Never use arbitrary values (999, 9999). Use elevation to reinforce hierarchy, not as decoration.
|
|
180
|
+
|
|
181
|
+
### Shadow Scale
|
|
182
|
+
```css
|
|
183
|
+
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
|
|
184
|
+
--shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
|
|
185
|
+
--shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
|
|
186
|
+
--shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 8px 10px rgba(0,0,0,0.04);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Always layered (ambient + direct light). Higher elevation = larger spread + lower opacity, not just a bigger number.
|
|
190
|
+
|
|
191
|
+
**Dark mode breaks layered shadows.** A dark shadow cast on a dark surface has nowhere to show up — the layered ambient+direct recipe above effectively disappears. Don't stack darker shadows to compensate; collapse elevation to a single subtle light ring instead — a 1px, low-alpha white inset or outset border (`0 0 0 1px rgba(255,255,255,0.08)`-ish) reads as "raised" against a dark surface the way a shadow does against a light one.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Optical Adjustments
|
|
196
|
+
|
|
197
|
+
- **±1px nudges** when geometric centering looks visually off-center — common with icons inside buttons, badges, avatars
|
|
198
|
+
- **Nested radii:** child ≤ parent. Use `calc(var(--radius-parent) - var(--padding))` to keep concentric curves
|
|
199
|
+
- **Icon/text lockups:** adjust weight, size, spacing, or color — one lever at a time until they feel unified
|
|
200
|
+
|
|
201
|
+
### Concentric Radius Arithmetic
|
|
202
|
+
|
|
203
|
+
The relationship that keeps nested corners visually parallel: **outer radius = inner radius + the gap between the two edges.** Worked example on the token scale — an inner surface using `--radius-xl` (14px) sitting inside 6px of padding needs an outer radius of `14 + 6 = 20px`, which lands exactly on `--radius-2xl`. Skip the arithmetic and the outer curve either pinches tighter than the inner one (looks accidental) or bows out looser (looks sloppy) — concentric only reads as intentional when the two curves share a center point.
|
|
204
|
+
|
|
205
|
+
**Exception:** past roughly 24px of padding, the two surfaces read far enough apart that concentric math stops mattering — at that distance, treat inner and outer as separate surfaces with independently chosen radii rather than chasing an arithmetic relationship the eye can no longer perceive.
|
|
206
|
+
|
|
207
|
+
### Optical Alignment Recipes
|
|
208
|
+
|
|
209
|
+
- **Icon-leading buttons need asymmetric padding** — trim roughly 2px off the icon side of the button's padding. An icon's own whitespace (the space inside its bounding box between the glyph and its edge) reads as extra padding the eye already counts, so equal padding on both sides looks lopsided toward the icon.
|
|
210
|
+
- **Triangular and asymmetric glyphs need a nudge toward their visual mass.** Play icons, carets, and similar shapes have most of their ink weight off-center within their bounding box — a 1-2px nudge in the direction the shape "leans" corrects the optical imbalance a perfectly centered bounding box leaves behind.
|
|
211
|
+
- **When an SVG is persistently off-balance across every context it's used in**, fix the path's `viewBox` centering at the source rather than compensating with margin on every instance. Per-instance margin hacks drift out of sync the next time the icon is resized or reused elsewhere; a corrected `viewBox` fixes it everywhere at once.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Style-to-CSS Reference
|
|
216
|
+
|
|
217
|
+
| Property | Minimal Clean | Soft Modern | Sharp Geometric | Rich Editorial | Dark Premium | Playful Bold |
|
|
218
|
+
|----------|---------------|-------------|-----------------|----------------|--------------|--------------|
|
|
219
|
+
| `border-radius` | 2-4px | 8-16px | 0px | 2-4px | 4-8px | 12-20px |
|
|
220
|
+
| Shadows | None or barely-there | Layered (ambient + direct) | None — use borders | Subtle, warm | Subtle glow, inset | Bold, offset |
|
|
221
|
+
| Borders | `rgba(0,0,0,0.06)` 1px | Soft, same hue as shadow | 1px crisp, high-contrast | Thin, warm-tinted | `rgba(255,255,255,0.08)` | Thick, colored |
|
|
222
|
+
| Spacing | Generous whitespace | Comfortable, padded | Tight, precise | Generous, editorial | Moderate | Loose, breathing |
|
|
223
|
+
| Weight range | 400-600 | 400-600 | 400-800 | 300-700 | 400-700 | 500-800 |
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Never
|
|
228
|
+
|
|
229
|
+
- Arbitrary spacing outside your defined scale
|
|
230
|
+
- All spacing equal across a section — variety creates hierarchy
|
|
231
|
+
- Wrap everything in cards — not everything needs a container
|
|
232
|
+
- Nest cards inside cards
|
|
233
|
+
- Center everything — left-aligned asymmetry reads as more intentional
|
|
234
|
+
- Default to Grid when Flex would be simpler
|
|
235
|
+
- Arbitrary z-index values (999, 9999)
|
|
236
|
+
- Two adjacent hierarchy levels at the same visual weight — decide which leads
|
|
@@ -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 its stop condition holds or the budget runs out. A stop condition is an objective check (items present, values found by search) or a count of severity-ranked findings; a general impression never passes it. 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 stop condition has not been met.
|
|
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` | Stop condition: an objective check or a severity-finding count, never an overall impression |
|
|
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 the brief's §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** — re-run the stop-condition 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 | core-rules.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 | pre-ship pass |
|
|
86
|
+
| `state-coverage` | new-build \| existing-surface | state-design.md lattice, knob-gated to CRAFT_LEVEL | checklist-all-green (all required states present) | none | `/agemon-design harden` |
|
|
87
|
+
| `token-consistency` | new-build \| existing-surface | tokens.md 3-layer contract + core-rules.md Anti-Slop Minor items | zero-off-system | none (static scan) | `/agemon-design tokens` audit |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## visual-anti-slop — eliminate AI-template signals until the gate passes
|
|
92
|
+
|
|
93
|
+
**Lens:** core-rules.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) + core-rules.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.
|