@kinqs/brainrouter-mcp-server 0.3.4
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/.env.example +144 -0
- package/README.md +56 -0
- package/agents/README.md +120 -0
- package/agents/code-reviewer.md +97 -0
- package/agents/security-auditor.md +101 -0
- package/agents/test-engineer.md +95 -0
- package/dist/__tests__/agent_mode.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.js +170 -0
- package/dist/__tests__/crypto.test.d.ts +1 -0
- package/dist/__tests__/crypto.test.js +28 -0
- package/dist/__tests__/host-integrations.test.d.ts +1 -0
- package/dist/__tests__/host-integrations.test.js +82 -0
- package/dist/__tests__/integration.test.d.ts +1 -0
- package/dist/__tests__/integration.test.js +50 -0
- package/dist/__tests__/loader.test.d.ts +1 -0
- package/dist/__tests__/loader.test.js +89 -0
- package/dist/__tests__/neural-spark.test.d.ts +1 -0
- package/dist/__tests__/neural-spark.test.js +112 -0
- package/dist/__tests__/pagination.test.d.ts +1 -0
- package/dist/__tests__/pagination.test.js +23 -0
- package/dist/__tests__/redaction.test.d.ts +1 -0
- package/dist/__tests__/redaction.test.js +17 -0
- package/dist/__tests__/registry.test.d.ts +1 -0
- package/dist/__tests__/registry.test.js +56 -0
- package/dist/__tests__/retry.test.d.ts +1 -0
- package/dist/__tests__/retry.test.js +30 -0
- package/dist/__tests__/skill-activation.test.d.ts +1 -0
- package/dist/__tests__/skill-activation.test.js +112 -0
- package/dist/__tests__/working-memory.test.d.ts +1 -0
- package/dist/__tests__/working-memory.test.js +200 -0
- package/dist/__tests__/workspace-paths.test.d.ts +1 -0
- package/dist/__tests__/workspace-paths.test.js +56 -0
- package/dist/__tests__/writer.test.d.ts +1 -0
- package/dist/__tests__/writer.test.js +94 -0
- package/dist/api/auth/crypto.d.ts +4 -0
- package/dist/api/auth/crypto.js +54 -0
- package/dist/api/middleware/auth.d.ts +12 -0
- package/dist/api/middleware/auth.js +90 -0
- package/dist/api/pagination.d.ts +18 -0
- package/dist/api/pagination.js +32 -0
- package/dist/api/routes/auth.d.ts +1 -0
- package/dist/api/routes/auth.js +130 -0
- package/dist/api/routes/chat-completions.d.ts +7 -0
- package/dist/api/routes/chat-completions.js +474 -0
- package/dist/api/routes/contradictions.d.ts +1 -0
- package/dist/api/routes/contradictions.js +28 -0
- package/dist/api/routes/evidence.d.ts +1 -0
- package/dist/api/routes/evidence.js +59 -0
- package/dist/api/routes/governance.d.ts +1 -0
- package/dist/api/routes/governance.js +95 -0
- package/dist/api/routes/graph.d.ts +1 -0
- package/dist/api/routes/graph.js +25 -0
- package/dist/api/routes/hooks.d.ts +1 -0
- package/dist/api/routes/hooks.js +88 -0
- package/dist/api/routes/memories.d.ts +1 -0
- package/dist/api/routes/memories.js +92 -0
- package/dist/api/routes/persona.d.ts +1 -0
- package/dist/api/routes/persona.js +9 -0
- package/dist/api/routes/scenes.d.ts +1 -0
- package/dist/api/routes/scenes.js +35 -0
- package/dist/api/routes/skills.d.ts +1 -0
- package/dist/api/routes/skills.js +14 -0
- package/dist/api/routes/stats.d.ts +1 -0
- package/dist/api/routes/stats.js +8 -0
- package/dist/api/routes/users.d.ts +1 -0
- package/dist/api/routes/users.js +82 -0
- package/dist/api/routes/working.d.ts +1 -0
- package/dist/api/routes/working.js +88 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +492 -0
- package/dist/integrations/claude-code.d.ts +12 -0
- package/dist/integrations/claude-code.js +35 -0
- package/dist/integrations/codex.d.ts +12 -0
- package/dist/integrations/codex.js +34 -0
- package/dist/integrations/generic-mcp.d.ts +52 -0
- package/dist/integrations/generic-mcp.js +118 -0
- package/dist/loader.d.ts +29 -0
- package/dist/loader.js +200 -0
- package/dist/memory/capture.d.ts +35 -0
- package/dist/memory/capture.js +230 -0
- package/dist/memory/config.d.ts +2 -0
- package/dist/memory/config.js +3 -0
- package/dist/memory/engine.d.ts +203 -0
- package/dist/memory/engine.js +626 -0
- package/dist/memory/llm-semaphore.d.ts +41 -0
- package/dist/memory/llm-semaphore.js +81 -0
- package/dist/memory/memory-type-config.d.ts +11 -0
- package/dist/memory/memory-type-config.js +65 -0
- package/dist/memory/pipeline/cognitive-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/cognitive-contradiction.js +59 -0
- package/dist/memory/pipeline/cognitive-dedup.d.ts +23 -0
- package/dist/memory/pipeline/cognitive-dedup.js +38 -0
- package/dist/memory/pipeline/cognitive-extractor.d.ts +21 -0
- package/dist/memory/pipeline/cognitive-extractor.js +183 -0
- package/dist/memory/pipeline/contextual-focus-builder.d.ts +13 -0
- package/dist/memory/pipeline/contextual-focus-builder.js +135 -0
- package/dist/memory/pipeline/focus-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/focus-direction-shift.js +27 -0
- package/dist/memory/pipeline/graph-builder.d.ts +11 -0
- package/dist/memory/pipeline/graph-builder.js +88 -0
- package/dist/memory/pipeline/graph-recall.d.ts +13 -0
- package/dist/memory/pipeline/graph-recall.js +55 -0
- package/dist/memory/pipeline/identity-distiller.d.ts +15 -0
- package/dist/memory/pipeline/identity-distiller.js +40 -0
- package/dist/memory/pipeline/l1-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/l1-contradiction.js +66 -0
- package/dist/memory/pipeline/l1-dedup.d.ts +23 -0
- package/dist/memory/pipeline/l1-dedup.js +39 -0
- package/dist/memory/pipeline/l1-extractor.d.ts +21 -0
- package/dist/memory/pipeline/l1-extractor.js +180 -0
- package/dist/memory/pipeline/l2-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/l2-direction-shift.js +27 -0
- package/dist/memory/pipeline/l2-scene.d.ts +15 -0
- package/dist/memory/pipeline/l2-scene.js +140 -0
- package/dist/memory/pipeline/l3-distiller.d.ts +15 -0
- package/dist/memory/pipeline/l3-distiller.js +40 -0
- package/dist/memory/pipeline/neural-spark.d.ts +27 -0
- package/dist/memory/pipeline/neural-spark.js +78 -0
- package/dist/memory/pipeline/skill-prewarm.d.ts +63 -0
- package/dist/memory/pipeline/skill-prewarm.js +127 -0
- package/dist/memory/pipeline/task-queue.d.ts +54 -0
- package/dist/memory/pipeline/task-queue.js +117 -0
- package/dist/memory/prompts/cognitive-contradiction.d.ts +1 -0
- package/dist/memory/prompts/cognitive-contradiction.js +25 -0
- package/dist/memory/prompts/cognitive-extraction.d.ts +10 -0
- package/dist/memory/prompts/cognitive-extraction.js +114 -0
- package/dist/memory/prompts/core-identity.d.ts +6 -0
- package/dist/memory/prompts/core-identity.js +60 -0
- package/dist/memory/prompts/focus-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/focus-direction-shift.js +32 -0
- package/dist/memory/prompts/focus-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/focus-scene-cluster.js +33 -0
- package/dist/memory/prompts/focus-scene.d.ts +7 -0
- package/dist/memory/prompts/focus-scene.js +40 -0
- package/dist/memory/prompts/graph-extraction-batch.d.ts +14 -0
- package/dist/memory/prompts/graph-extraction-batch.js +54 -0
- package/dist/memory/prompts/graph-extraction.d.ts +2 -0
- package/dist/memory/prompts/graph-extraction.js +53 -0
- package/dist/memory/prompts/l1-contradiction-batch.d.ts +16 -0
- package/dist/memory/prompts/l1-contradiction-batch.js +47 -0
- package/dist/memory/prompts/l1-contradiction.d.ts +1 -0
- package/dist/memory/prompts/l1-contradiction.js +25 -0
- package/dist/memory/prompts/l1-extraction.d.ts +10 -0
- package/dist/memory/prompts/l1-extraction.js +114 -0
- package/dist/memory/prompts/l2-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/l2-direction-shift.js +32 -0
- package/dist/memory/prompts/l2-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/l2-scene-cluster.js +33 -0
- package/dist/memory/prompts/l2-scene.d.ts +7 -0
- package/dist/memory/prompts/l2-scene.js +40 -0
- package/dist/memory/prompts/l3-persona.d.ts +6 -0
- package/dist/memory/prompts/l3-persona.js +60 -0
- package/dist/memory/recall.d.ts +47 -0
- package/dist/memory/recall.js +427 -0
- package/dist/memory/redaction.d.ts +1 -0
- package/dist/memory/redaction.js +24 -0
- package/dist/memory/retry.d.ts +13 -0
- package/dist/memory/retry.js +53 -0
- package/dist/memory/scheduler.d.ts +9 -0
- package/dist/memory/scheduler.js +16 -0
- package/dist/memory/skill-hints-loader.d.ts +30 -0
- package/dist/memory/skill-hints-loader.js +100 -0
- package/dist/memory/store/embedding.d.ts +16 -0
- package/dist/memory/store/embedding.js +68 -0
- package/dist/memory/store/reranker.d.ts +24 -0
- package/dist/memory/store/reranker.js +83 -0
- package/dist/memory/store/sqlite.d.ts +167 -0
- package/dist/memory/store/sqlite.js +1816 -0
- package/dist/memory/store/types.d.ts +101 -0
- package/dist/memory/store/types.js +1 -0
- package/dist/memory/types.d.ts +207 -0
- package/dist/memory/types.js +7 -0
- package/dist/memory/validation.d.ts +441 -0
- package/dist/memory/validation.js +129 -0
- package/dist/memory/working/canvas.d.ts +5 -0
- package/dist/memory/working/canvas.js +43 -0
- package/dist/memory/working/offload.d.ts +71 -0
- package/dist/memory/working/offload.js +211 -0
- package/dist/memory/working/step-log.d.ts +16 -0
- package/dist/memory/working/step-log.js +35 -0
- package/dist/registry.d.ts +34 -0
- package/dist/registry.js +305 -0
- package/dist/resolver.d.ts +17 -0
- package/dist/resolver.js +126 -0
- package/dist/scripts/validate-foreign-workspace-path.d.ts +1 -0
- package/dist/scripts/validate-foreign-workspace-path.js +39 -0
- package/dist/tools/agent_memory_tools.d.ts +485 -0
- package/dist/tools/agent_memory_tools.js +793 -0
- package/dist/tools/create_skill.d.ts +46 -0
- package/dist/tools/create_skill.js +46 -0
- package/dist/tools/get_doc.d.ts +21 -0
- package/dist/tools/get_doc.js +24 -0
- package/dist/tools/get_persona.d.ts +15 -0
- package/dist/tools/get_persona.js +20 -0
- package/dist/tools/get_reference.d.ts +15 -0
- package/dist/tools/get_reference.js +20 -0
- package/dist/tools/get_skill.d.ts +34 -0
- package/dist/tools/get_skill.js +65 -0
- package/dist/tools/get_template_doc.d.ts +21 -0
- package/dist/tools/get_template_doc.js +24 -0
- package/dist/tools/list_docs.d.ts +15 -0
- package/dist/tools/list_docs.js +16 -0
- package/dist/tools/list_skills.d.ts +18 -0
- package/dist/tools/list_skills.js +17 -0
- package/dist/tools/list_template_docs.d.ts +15 -0
- package/dist/tools/list_template_docs.js +16 -0
- package/dist/tools/memory-engineering.d.ts +225 -0
- package/dist/tools/memory-engineering.js +284 -0
- package/dist/tools/memory-explain.d.ts +34 -0
- package/dist/tools/memory-explain.js +109 -0
- package/dist/tools/memory-governance.d.ts +171 -0
- package/dist/tools/memory-governance.js +224 -0
- package/dist/tools/memory-hooks.d.ts +67 -0
- package/dist/tools/memory-hooks.js +102 -0
- package/dist/tools/memory-working.d.ts +98 -0
- package/dist/tools/memory-working.js +101 -0
- package/dist/tools/memory_capture_turn.d.ts +66 -0
- package/dist/tools/memory_capture_turn.js +85 -0
- package/dist/tools/memory_consolidate.d.ts +55 -0
- package/dist/tools/memory_consolidate.js +176 -0
- package/dist/tools/memory_contradictions.d.ts +53 -0
- package/dist/tools/memory_contradictions.js +52 -0
- package/dist/tools/memory_graph_query.d.ts +51 -0
- package/dist/tools/memory_graph_query.js +35 -0
- package/dist/tools/memory_mark_cited.d.ts +43 -0
- package/dist/tools/memory_mark_cited.js +63 -0
- package/dist/tools/memory_recall.d.ts +77 -0
- package/dist/tools/memory_recall.js +81 -0
- package/dist/tools/memory_register_skill_hints.d.ts +49 -0
- package/dist/tools/memory_register_skill_hints.js +55 -0
- package/dist/tools/memory_resolve_session.d.ts +24 -0
- package/dist/tools/memory_resolve_session.js +133 -0
- package/dist/tools/memory_search.d.ts +146 -0
- package/dist/tools/memory_search.js +84 -0
- package/dist/tools/search_skills.d.ts +18 -0
- package/dist/tools/search_skills.js +17 -0
- package/dist/tools/update_doc.d.ts +24 -0
- package/dist/tools/update_doc.js +35 -0
- package/dist/tools/update_skill.d.ts +30 -0
- package/dist/tools/update_skill.js +80 -0
- package/dist/types.d.ts +81 -0
- package/dist/types.js +4 -0
- package/dist/writer.d.ts +30 -0
- package/dist/writer.js +220 -0
- package/docs/TEMPLATE ONLY +1 -0
- package/docs/api/API.md +64 -0
- package/docs/api/security/SECURITY.md +58 -0
- package/docs/deployment/DockerDeployment.md +30 -0
- package/docs/design/Design.md +59 -0
- package/docs/design/themes/apple.md +101 -0
- package/docs/design/themes/dieter-grid.md +100 -0
- package/docs/design/themes/gallery-white.md +100 -0
- package/docs/design/themes/pinterest.md +101 -0
- package/docs/design/themes/realty-open-house.md +101 -0
- package/docs/design/themes/vodafone.md +101 -0
- package/docs/hooks/Hooks.md +30 -0
- package/docs/schema/Schema.md +35 -0
- package/docs/strategy/ScalingStrategy.md +19 -0
- package/package.json +88 -0
- package/references/accessibility-checklist.md +160 -0
- package/references/orchestration-patterns.md +370 -0
- package/references/performance-checklist.md +153 -0
- package/references/security-checklist.md +134 -0
- package/references/testing-patterns.md +236 -0
- package/skills/agent/adr-skill/SKILL.md +299 -0
- package/skills/agent/agentic-engineering-workflow/SKILL.md +95 -0
- package/skills/agent/bootstrap-skill/SKILL.md +103 -0
- package/skills/agent/context-engineering/SKILL.md +307 -0
- package/skills/agent/debugging-and-error-recovery/SKILL.md +308 -0
- package/skills/agent/developer-growth-analysis/SKILL.md +328 -0
- package/skills/agent/doubt-driven-skill/SKILL.md +249 -0
- package/skills/agent/handover-skill/SKILL.md +112 -0
- package/skills/agent/idea-refine-skill/SKILL.md +185 -0
- package/skills/agent/idea-refine-skill/examples.md +238 -0
- package/skills/agent/idea-refine-skill/frameworks.md +99 -0
- package/skills/agent/idea-refine-skill/refinement-criteria.md +113 -0
- package/skills/agent/interview-skill/SKILL.md +226 -0
- package/skills/agent/planning-skill/SKILL.md +270 -0
- package/skills/agent/skill-authoring/SKILL.md +189 -0
- package/skills/agent/source-driven-skill/SKILL.md +197 -0
- package/skills/agent/spec-driven-skill/SKILL.md +221 -0
- package/skills/agent/sync-skill/SKILL.md +92 -0
- package/skills/agent/using-agent-skills/SKILL.md +189 -0
- package/skills/api/a11y-skill/SKILL.md +88 -0
- package/skills/api/api-skill/SKILL.md +123 -0
- package/skills/api/auth-skill/SKILL.md +80 -0
- package/skills/api/debug-skill/SKILL.md +535 -0
- package/skills/api/performance-skill/SKILL.md +100 -0
- package/skills/api/testing-skill/SKILL.md +100 -0
- package/skills/codebase/code-review-and-quality/SKILL.md +228 -0
- package/skills/codebase/code-simplification/SKILL.md +352 -0
- package/skills/codebase/code-structure-cleanup/SKILL.md +142 -0
- package/skills/codebase/concerns-skill/SKILL.md +89 -0
- package/skills/codebase/conventions-skill/SKILL.md +95 -0
- package/skills/codebase/doc-management-skill/SKILL.md +47 -0
- package/skills/codebase/git-workflow-skill/SKILL.md +312 -0
- package/skills/communication/1-3-1-rule/SKILL.md +120 -0
- package/skills/design/brutalist-skill/SKILL.md +131 -0
- package/skills/design/concept-diagrams/SKILL.md +387 -0
- package/skills/design/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/skills/design/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/skills/design/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/skills/design/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/skills/design/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/skills/design/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/skills/design/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/skills/design/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/skills/design/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/skills/design/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/skills/design/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/skills/design/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/skills/design/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/skills/design/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/skills/design/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/skills/design/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/skills/design/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/skills/design/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/skills/design/concept-diagrams/templates/template.html +174 -0
- package/skills/design/gpt-tasteskill/SKILL.md +114 -0
- package/skills/design/minimalist-skill/SKILL.md +116 -0
- package/skills/design/output-skill/SKILL.md +87 -0
- package/skills/design/redesign-skill/SKILL.md +213 -0
- package/skills/design/soft-skill/SKILL.md +132 -0
- package/skills/design/stitch-skill/EXAMPLE.md +121 -0
- package/skills/design/stitch-skill/SKILL.md +222 -0
- package/skills/design/taste-skill/SKILL.md +269 -0
- package/skills/devops/ci-cd-skill/SKILL.md +402 -0
- package/skills/devops/docker-skill/SKILL.md +297 -0
- package/skills/devops/domain-skill/SKILL.md +234 -0
- package/skills/lifecycle/changelog-generator/SKILL.md +135 -0
- package/skills/lifecycle/incremental-skill/SKILL.md +257 -0
- package/skills/lifecycle/migration-skill/SKILL.md +218 -0
- package/skills/lifecycle/shipping-skill/SKILL.md +321 -0
- package/skills/memory/agent-memory/SKILL.md +122 -0
- package/skills/qa/browser-testing-skill/SKILL.md +314 -0
- package/skills/ux/adversarial-ux-skill/SKILL.md +168 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: alpha
|
|
3
|
+
name: Realty Open House
|
|
4
|
+
description: Open-house listing: linen warm, brass accents.
|
|
5
|
+
colors:
|
|
6
|
+
primary: "#1E1914"
|
|
7
|
+
secondary: "#8A7E6C"
|
|
8
|
+
tertiary: "#A57D46"
|
|
9
|
+
neutral: "#F2ECDE"
|
|
10
|
+
surface: "#FBF5E6"
|
|
11
|
+
on-primary: "#FBF5E6"
|
|
12
|
+
typography:
|
|
13
|
+
display:
|
|
14
|
+
fontFamily: Cormorant Garamond
|
|
15
|
+
fontSize: 5rem
|
|
16
|
+
fontWeight: 400
|
|
17
|
+
letterSpacing: "-0.015em"
|
|
18
|
+
h1:
|
|
19
|
+
fontFamily: Cormorant Garamond
|
|
20
|
+
fontSize: 2.6rem
|
|
21
|
+
fontWeight: 400
|
|
22
|
+
body:
|
|
23
|
+
fontFamily: Inter
|
|
24
|
+
fontSize: 1rem
|
|
25
|
+
lineHeight: 1.65
|
|
26
|
+
label:
|
|
27
|
+
fontFamily: Inter
|
|
28
|
+
fontSize: 0.72rem
|
|
29
|
+
fontWeight: 500
|
|
30
|
+
letterSpacing: "0.2em"
|
|
31
|
+
rounded:
|
|
32
|
+
sm: 2px
|
|
33
|
+
md: 4px
|
|
34
|
+
lg: 6px
|
|
35
|
+
spacing:
|
|
36
|
+
sm: 8px
|
|
37
|
+
md: 16px
|
|
38
|
+
lg: 32px
|
|
39
|
+
components:
|
|
40
|
+
button-primary:
|
|
41
|
+
backgroundColor: "{colors.tertiary}"
|
|
42
|
+
textColor: "{colors.on-primary}"
|
|
43
|
+
rounded: "{rounded.md}"
|
|
44
|
+
padding: 12px 20px
|
|
45
|
+
card:
|
|
46
|
+
backgroundColor: "{colors.surface}"
|
|
47
|
+
textColor: "{colors.primary}"
|
|
48
|
+
rounded: "{rounded.lg}"
|
|
49
|
+
padding: 24px
|
|
50
|
+
---
|
|
51
|
+
## Overview
|
|
52
|
+
|
|
53
|
+
A premium real-estate palette: linen warmth, brass accent, tall serif display.
|
|
54
|
+
|
|
55
|
+
## Colors
|
|
56
|
+
|
|
57
|
+
The palette is built around high-contrast neutrals and a single accent that drives interaction.
|
|
58
|
+
|
|
59
|
+
- **Primary (`#1E1914`):** Headlines and core text.
|
|
60
|
+
- **Secondary (`#8A7E6C`):** Borders, captions, and metadata.
|
|
61
|
+
- **Tertiary (`#A57D46`):** The sole driver for interaction. Reserve it.
|
|
62
|
+
- **Neutral (`#F2ECDE`):** The page foundation.
|
|
63
|
+
|
|
64
|
+
## Typography
|
|
65
|
+
|
|
66
|
+
- **display:** Cormorant Garamond 5rem
|
|
67
|
+
- **h1:** Cormorant Garamond 2.6rem
|
|
68
|
+
- **body:** Inter 1rem
|
|
69
|
+
- **label:** Inter 0.72rem
|
|
70
|
+
|
|
71
|
+
## Do's and Don'ts
|
|
72
|
+
|
|
73
|
+
- **Do** use Tertiary for exactly one action per screen.
|
|
74
|
+
- **Do** let Neutral carry the composition — negative space is a feature.
|
|
75
|
+
- **Don't** introduce gradients. This system is flat on purpose.
|
|
76
|
+
- **Don't** mix Tertiary with alternate accents; the single-accent rule is load-bearing.
|
|
77
|
+
|
|
78
|
+
## AI Agent Instructions: Taste Skill Integration
|
|
79
|
+
|
|
80
|
+
When generating code or designing interfaces based on this system, the AI Agent **MUST** also apply the advanced frontend engineering principles defined in the Taste Skill framework.
|
|
81
|
+
|
|
82
|
+
1. **Apply the Skill:** Read and follow the directives outlined in `../../skills/design/taste-skill/SKILL.md` (or the equivalent `design-taste-frontend` skill).
|
|
83
|
+
2. **Merge Logic:**
|
|
84
|
+
- Use the **Colors**, **Typography**, and **Spacing** defined in this `Design.md` document as your absolute source of truth for all design tokens.
|
|
85
|
+
- Use the **Taste Skill** directives for layout engineering, motion (e.g., Framer Motion), anti-slop bias correction, and modern component architecture.
|
|
86
|
+
3. **Active Baseline Configuration for this Design:**
|
|
87
|
+
- `DESIGN_VARIANCE`: 3 (Traditional, elegant grids and structured property layouts).
|
|
88
|
+
- `MOTION_INTENSITY`: 4 (Warm, soft transitions and high-quality image reveals).
|
|
89
|
+
- `VISUAL_DENSITY`: 3 (Spacious, high-quality feel with balanced linen/brass tones).
|
|
90
|
+
|
|
91
|
+
### Available Taste Skill Modules
|
|
92
|
+
The following modules are available in `../../skills/design/`. The AI should refer to the corresponding `SKILL.md` files when specific stylistic variations or task optimizations are needed:
|
|
93
|
+
- **`taste-skill`**: The main design skill for premium frontend code. Covers layout, typography, colors, spacing, and motion.
|
|
94
|
+
- **`gpt-taste`**: Elite Awwwards-level frontend design and GSAP motion skill for premium, deterministic, anti-slop UI generation.
|
|
95
|
+
- **`soft-skill`**: Focuses on an expensive, soft UI look with premium fonts, whitespace, depth, and smooth animations.
|
|
96
|
+
- **`minimalist-skill`**: Enforces clean, editorial-style interfaces (Notion/Linear style) with strict monochrome palettes.
|
|
97
|
+
- **`brutalist-skill`**: Raw mechanical interfaces, Swiss typography, extreme scale contrast.
|
|
98
|
+
- **`redesign-skill`**: For upgrading existing projects by auditing and fixing design problems.
|
|
99
|
+
- **`output-skill`**: Prevents AI from being lazy, skipping code blocks, or using placeholder comments.
|
|
100
|
+
- **`stitch-skill`**: Google Stitch-compatible semantic design rules for premium AI UI generation.
|
|
101
|
+
- **`concept-diagrams`**: Unified visual language for creating minimal, SVG-based architecture and concept diagrams.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: alpha
|
|
3
|
+
name: Vodafone
|
|
4
|
+
description: Monumental uppercase display. Vodafone-red chapter bands.
|
|
5
|
+
colors:
|
|
6
|
+
primary: "#0D0D0D"
|
|
7
|
+
secondary: "#6D6D6D"
|
|
8
|
+
tertiary: "#E60000"
|
|
9
|
+
neutral: "#F4F4F4"
|
|
10
|
+
surface: "#FFFFFF"
|
|
11
|
+
on-primary: "#FFFFFF"
|
|
12
|
+
typography:
|
|
13
|
+
display:
|
|
14
|
+
fontFamily: Archivo Black
|
|
15
|
+
fontSize: 6rem
|
|
16
|
+
fontWeight: 900
|
|
17
|
+
letterSpacing: "-0.025em"
|
|
18
|
+
h1:
|
|
19
|
+
fontFamily: Archivo Black
|
|
20
|
+
fontSize: 2.8rem
|
|
21
|
+
fontWeight: 900
|
|
22
|
+
body:
|
|
23
|
+
fontFamily: Inter
|
|
24
|
+
fontSize: 1rem
|
|
25
|
+
lineHeight: 1.6
|
|
26
|
+
label:
|
|
27
|
+
fontFamily: Inter
|
|
28
|
+
fontSize: 0.74rem
|
|
29
|
+
fontWeight: 700
|
|
30
|
+
letterSpacing: "0.1em"
|
|
31
|
+
rounded:
|
|
32
|
+
sm: 2px
|
|
33
|
+
md: 4px
|
|
34
|
+
lg: 6px
|
|
35
|
+
spacing:
|
|
36
|
+
sm: 8px
|
|
37
|
+
md: 16px
|
|
38
|
+
lg: 32px
|
|
39
|
+
components:
|
|
40
|
+
button-primary:
|
|
41
|
+
backgroundColor: "{colors.tertiary}"
|
|
42
|
+
textColor: "{colors.on-primary}"
|
|
43
|
+
rounded: "{rounded.md}"
|
|
44
|
+
padding: 12px 20px
|
|
45
|
+
card:
|
|
46
|
+
backgroundColor: "{colors.surface}"
|
|
47
|
+
textColor: "{colors.primary}"
|
|
48
|
+
rounded: "{rounded.lg}"
|
|
49
|
+
padding: 24px
|
|
50
|
+
---
|
|
51
|
+
## Overview
|
|
52
|
+
|
|
53
|
+
Vodafone: monumental all-caps display, saturated red chapter bands on white, uncompromising sans.
|
|
54
|
+
|
|
55
|
+
## Colors
|
|
56
|
+
|
|
57
|
+
The palette is built around high-contrast neutrals and a single accent that drives interaction.
|
|
58
|
+
|
|
59
|
+
- **Primary (`#0D0D0D`):** Headlines and core text.
|
|
60
|
+
- **Secondary (`#6D6D6D`):** Borders, captions, and metadata.
|
|
61
|
+
- **Tertiary (`#E60000`):** The sole driver for interaction. Reserve it.
|
|
62
|
+
- **Neutral (`#F4F4F4`):** The page foundation.
|
|
63
|
+
|
|
64
|
+
## Typography
|
|
65
|
+
|
|
66
|
+
- **display:** Archivo Black 6rem
|
|
67
|
+
- **h1:** Archivo Black 2.8rem
|
|
68
|
+
- **body:** Inter 1rem
|
|
69
|
+
- **label:** Inter 0.74rem
|
|
70
|
+
|
|
71
|
+
## Do's and Don'ts
|
|
72
|
+
|
|
73
|
+
- **Do** use Tertiary for exactly one action per screen.
|
|
74
|
+
- **Do** let Neutral carry the composition — negative space is a feature.
|
|
75
|
+
- **Don't** introduce gradients. This system is flat on purpose.
|
|
76
|
+
- **Don't** mix Tertiary with alternate accents; the single-accent rule is load-bearing.
|
|
77
|
+
|
|
78
|
+
## AI Agent Instructions: Taste Skill Integration
|
|
79
|
+
|
|
80
|
+
When generating code or designing interfaces based on this system, the AI Agent **MUST** also apply the advanced frontend engineering principles defined in the Taste Skill framework.
|
|
81
|
+
|
|
82
|
+
1. **Apply the Skill:** Read and follow the directives outlined in `../../skills/design/taste-skill/SKILL.md` (or the equivalent `design-taste-frontend` skill).
|
|
83
|
+
2. **Merge Logic:**
|
|
84
|
+
- Use the **Colors**, **Typography**, and **Spacing** defined in this `Design.md` document as your absolute source of truth for all design tokens.
|
|
85
|
+
- Use the **Taste Skill** directives for layout engineering, motion (e.g., Framer Motion), anti-slop bias correction, and modern component architecture.
|
|
86
|
+
3. **Active Baseline Configuration for this Design:**
|
|
87
|
+
- `DESIGN_VARIANCE`: 4 (Structured, monumental layouts with bold chapter bands).
|
|
88
|
+
- `MOTION_INTENSITY`: 7 (Snappy, fast transitions to match the bold, high-energy brand).
|
|
89
|
+
- `VISUAL_DENSITY`: 6 (High impact, large typography, and moderate information density).
|
|
90
|
+
|
|
91
|
+
### Available Taste Skill Modules
|
|
92
|
+
The following modules are available in `../../skills/design/`. The AI should refer to the corresponding `SKILL.md` files when specific stylistic variations or task optimizations are needed:
|
|
93
|
+
- **`taste-skill`**: The main design skill for premium frontend code. Covers layout, typography, colors, spacing, and motion.
|
|
94
|
+
- **`gpt-taste`**: Elite Awwwards-level frontend design and GSAP motion skill for premium, deterministic, anti-slop UI generation.
|
|
95
|
+
- **`soft-skill`**: Focuses on an expensive, soft UI look with premium fonts, whitespace, depth, and smooth animations.
|
|
96
|
+
- **`minimalist-skill`**: Enforces clean, editorial-style interfaces (Notion/Linear style) with strict monochrome palettes.
|
|
97
|
+
- **`brutalist-skill`**: Raw mechanical interfaces, Swiss typography, extreme scale contrast.
|
|
98
|
+
- **`redesign-skill`**: For upgrading existing projects by auditing and fixing design problems.
|
|
99
|
+
- **`output-skill`**: Prevents AI from being lazy, skipping code blocks, or using placeholder comments.
|
|
100
|
+
- **`stitch-skill`**: Google Stitch-compatible semantic design rules for premium AI UI generation.
|
|
101
|
+
- **`concept-diagrams`**: Unified visual language for creating minimal, SVG-based architecture and concept diagrams.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Custom Hooks
|
|
2
|
+
|
|
3
|
+
This document provides an overview of all the custom React hooks available in the `@the project/hooks` package. These hooks encapsulate the core business logic, API interactions, and state management used across both the Web and Mobile clients.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🏗️ Architecture
|
|
8
|
+
|
|
9
|
+
The hook layer sits between the UI components and the `@the project/sdk` services. Hooks are designed to be:
|
|
10
|
+
- **Composable**: Build complex logic from simpler hooks.
|
|
11
|
+
- **Reusable**: Share logic between different platforms (Web/Mobile).
|
|
12
|
+
- **Testable**: Easily mockable for unit testing.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 🛠️ Core Hooks
|
|
17
|
+
|
|
18
|
+
### Auth
|
|
19
|
+
- `useAuth`: Handles login, logout, and current user state.
|
|
20
|
+
- `useSession`: Manages JWT refresh and session persistence.
|
|
21
|
+
|
|
22
|
+
### Data Fetching
|
|
23
|
+
- `useResource`: Generic hook for fetching and caching resources.
|
|
24
|
+
- `useMutation`: Wrapper for creating/updating/deleting data.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 📦 SDK Integration
|
|
29
|
+
|
|
30
|
+
For modules like **Storage** and **Analytics**, the logic is handled via the `@the project/sdk` services. Hooks provide a reactive interface to these services.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Database Schema
|
|
2
|
+
|
|
3
|
+
This document describes the data models and relationships for the project.
|
|
4
|
+
|
|
5
|
+
## 🗄️ Database Type
|
|
6
|
+
- Primary: [e.g., PostgreSQL, MongoDB, Appwrite]
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 🗺️ Entity Relationship Diagram
|
|
11
|
+
(Link to diagram or describe relationships here)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📑 Collections / Tables
|
|
16
|
+
|
|
17
|
+
### `users`
|
|
18
|
+
| Field | Type | Description |
|
|
19
|
+
| :--- | :--- | :--- |
|
|
20
|
+
| `id` | UUID | Primary Key |
|
|
21
|
+
| `email` | String | Unique email |
|
|
22
|
+
| `name` | String | Display name |
|
|
23
|
+
| `createdAt` | DateTime | Creation timestamp |
|
|
24
|
+
|
|
25
|
+
### `resources`
|
|
26
|
+
| Field | Type | Description |
|
|
27
|
+
| :--- | :--- | :--- |
|
|
28
|
+
| `id` | UUID | Primary Key |
|
|
29
|
+
| `ownerId` | UUID | FK to users.id |
|
|
30
|
+
| `status` | Enum | [DRAFT, PUBLISHED] |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 🛡️ Security Rules
|
|
35
|
+
- [Describe RLS or ACL policies here]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Scaling Strategy
|
|
2
|
+
|
|
3
|
+
Roadmap for handling growth and ensuring system performance at scale.
|
|
4
|
+
|
|
5
|
+
## 📈 Phase 1: MVP (0 - 1k Users)
|
|
6
|
+
- **Architecture**: Monolithic / Single Cluster.
|
|
7
|
+
- **Database**: Single instance.
|
|
8
|
+
- **Caching**: Local memory.
|
|
9
|
+
|
|
10
|
+
## 🚀 Phase 2: Growth (1k - 100k Users)
|
|
11
|
+
- **Load Balancing**: Traefik / Nginx.
|
|
12
|
+
- **Database**: Read replicas.
|
|
13
|
+
- **Caching**: Redis / Distributed cache.
|
|
14
|
+
- **Storage**: S3 / CDN.
|
|
15
|
+
|
|
16
|
+
## 🌎 Phase 3: Global Scale (100k+ Users)
|
|
17
|
+
- **Infrastructure**: Multi-region deployment.
|
|
18
|
+
- **Database**: Horizontal sharding.
|
|
19
|
+
- **Messaging**: RabbitMQ / Kafka for async tasks.
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kinqs/brainrouter-mcp-server",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "BrainRouter MCP server — the cognitive memory engine. Exposes recall, capture, focus scenes, persona, contradictions, skills, and graph queries as MCP tools for any MCP-speaking agent.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"brainrouter-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"skills",
|
|
13
|
+
"agents",
|
|
14
|
+
"references",
|
|
15
|
+
"docs",
|
|
16
|
+
"README.md",
|
|
17
|
+
".env.example"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prepack": "node scripts/prepack.mjs",
|
|
21
|
+
"postpack": "node scripts/postpack.mjs",
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"dev": "tsx watch src/index.ts",
|
|
24
|
+
"dev:http": "tsx watch src/index.ts -- --http --port 3747",
|
|
25
|
+
"start": "node dist/index.js",
|
|
26
|
+
"start:http": "node dist/index.js --http --port 3747",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"setup:mcp": "node scripts/setup-mcp.js",
|
|
29
|
+
"bench:longmemeval": "npx tsx benchmark/longmemeval-bench.ts fts",
|
|
30
|
+
"bench:longmemeval:hybrid": "npx tsx benchmark/longmemeval-bench.ts hybrid",
|
|
31
|
+
"bench:quality": "npx tsx benchmark/quality-eval.ts",
|
|
32
|
+
"bench:scale": "npx tsx benchmark/scale-eval.ts",
|
|
33
|
+
"bench:load": "npx tsx benchmark/load-100k-bench.ts",
|
|
34
|
+
"bench:real-embeddings": "npx tsx benchmark/real-embeddings-eval.ts",
|
|
35
|
+
"bench:e2e": "npx tsx benchmark/end-to-end-bench.ts",
|
|
36
|
+
"bench:download": "npx tsx benchmark/lib/dataset-loader.ts",
|
|
37
|
+
"bench:overnight": "npx tsx benchmark/run-overnight.ts",
|
|
38
|
+
"setup:admin": "node scripts/setup-admin.js"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.11.0",
|
|
42
|
+
"dotenv": "^16.4.5",
|
|
43
|
+
"express": "^5.2.1",
|
|
44
|
+
"glob": "^11.0.0",
|
|
45
|
+
"gray-matter": "^4.0.3",
|
|
46
|
+
"sqlite-vec": "^0.1.9",
|
|
47
|
+
"zod": "^3.22.4",
|
|
48
|
+
"@kinqs/brainrouter-types": "^0.3.4"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=22.0.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/express": "^5.0.6",
|
|
55
|
+
"@types/node": "^22.0.0",
|
|
56
|
+
"@xenova/transformers": "^2.17.2",
|
|
57
|
+
"tsx": "^4.7.0",
|
|
58
|
+
"typescript": "^5.4.0",
|
|
59
|
+
"vitest": "^1.4.0"
|
|
60
|
+
},
|
|
61
|
+
"keywords": [
|
|
62
|
+
"ai",
|
|
63
|
+
"agent",
|
|
64
|
+
"mcp",
|
|
65
|
+
"model-context-protocol",
|
|
66
|
+
"memory",
|
|
67
|
+
"cognitive-memory",
|
|
68
|
+
"llm",
|
|
69
|
+
"rag",
|
|
70
|
+
"embeddings",
|
|
71
|
+
"graphrag",
|
|
72
|
+
"brainrouter"
|
|
73
|
+
],
|
|
74
|
+
"license": "MIT",
|
|
75
|
+
"author": "BrainRouter contributors",
|
|
76
|
+
"homepage": "https://github.com/kinqsradiollc/BrainRouter#readme",
|
|
77
|
+
"repository": {
|
|
78
|
+
"type": "git",
|
|
79
|
+
"url": "git+https://github.com/kinqsradiollc/BrainRouter.git",
|
|
80
|
+
"directory": "brainrouter"
|
|
81
|
+
},
|
|
82
|
+
"bugs": {
|
|
83
|
+
"url": "https://github.com/kinqsradiollc/BrainRouter/issues"
|
|
84
|
+
},
|
|
85
|
+
"publishConfig": {
|
|
86
|
+
"access": "public"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Accessibility Checklist
|
|
2
|
+
|
|
3
|
+
Quick reference for WCAG 2.1 AA compliance. Use alongside the `frontend-ui-engineering` skill.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Essential Checks](#essential-checks)
|
|
8
|
+
- [Common HTML Patterns](#common-html-patterns)
|
|
9
|
+
- [Testing Tools](#testing-tools)
|
|
10
|
+
- [Quick Reference: ARIA Live Regions](#quick-reference-aria-live-regions)
|
|
11
|
+
- [Common Anti-Patterns](#common-anti-patterns)
|
|
12
|
+
|
|
13
|
+
## Essential Checks
|
|
14
|
+
|
|
15
|
+
### Keyboard Navigation
|
|
16
|
+
- [ ] All interactive elements focusable via Tab key
|
|
17
|
+
- [ ] Focus order follows visual/logical order
|
|
18
|
+
- [ ] Focus is visible (outline/ring on focused elements)
|
|
19
|
+
- [ ] Custom widgets have keyboard support (Enter to activate, Escape to close)
|
|
20
|
+
- [ ] No keyboard traps (user can always Tab away from a component)
|
|
21
|
+
- [ ] Skip-to-content link at top of page - visible (at least) on keyboard focus
|
|
22
|
+
- [ ] Modals trap focus while open, return focus on close
|
|
23
|
+
|
|
24
|
+
### Screen Readers
|
|
25
|
+
- [ ] All images have `alt` text (or `alt=""` for decorative images)
|
|
26
|
+
- [ ] All form inputs have associated labels (`<label>` or `aria-label`)
|
|
27
|
+
- [ ] Buttons and links have descriptive text (not "Click here")
|
|
28
|
+
- [ ] Icon-only buttons have `aria-label`
|
|
29
|
+
- [ ] Page has one `<h1>` and headings don't skip levels
|
|
30
|
+
- [ ] Dynamic content changes announced (`aria-live` regions)
|
|
31
|
+
- [ ] Tables have `<th>` headers with scope
|
|
32
|
+
|
|
33
|
+
### Visual
|
|
34
|
+
- [ ] Text contrast ≥ 4.5:1 (normal text) or ≥ 3:1 (large text, 18px+)
|
|
35
|
+
- [ ] UI components contrast ≥ 3:1 against background
|
|
36
|
+
- [ ] Color is not the only way to convey information
|
|
37
|
+
- [ ] Text resizable to 200% without breaking layout
|
|
38
|
+
- [ ] No content that flashes more than 3 times per second
|
|
39
|
+
|
|
40
|
+
### Forms
|
|
41
|
+
- [ ] Every input has a visible label
|
|
42
|
+
- [ ] Required fields indicated (not by color alone)
|
|
43
|
+
- [ ] Error messages specific and associated with the field
|
|
44
|
+
- [ ] Error state visible by more than color (icon, text, border)
|
|
45
|
+
- [ ] Form submission errors summarized and focusable
|
|
46
|
+
- [ ] Known fields use autocomplete (for example `type="email" autocomplete="email"`)
|
|
47
|
+
|
|
48
|
+
### Content
|
|
49
|
+
- [ ] Language declared (`<html lang="en">`)
|
|
50
|
+
- [ ] Page has a descriptive `<title>`
|
|
51
|
+
- [ ] Links distinguish from surrounding text (not by color alone)
|
|
52
|
+
- [ ] Touch targets ≥ 44x44px on mobile
|
|
53
|
+
- [ ] Meaningful empty states (not blank screens)
|
|
54
|
+
|
|
55
|
+
## Common HTML Patterns
|
|
56
|
+
|
|
57
|
+
### Buttons vs. Links
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<!-- Use <button> for actions -->
|
|
61
|
+
<button onClick={handleDelete}>Delete Task</button>
|
|
62
|
+
|
|
63
|
+
<!-- Use <a> for navigation -->
|
|
64
|
+
<a href="/tasks/123">View Task</a>
|
|
65
|
+
|
|
66
|
+
<!-- NEVER use div/span as buttons -->
|
|
67
|
+
<div onClick={handleDelete}>Delete</div> <!-- BAD -->
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Form Labels
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<!-- Explicit label association -->
|
|
74
|
+
<label htmlFor="email">Email address</label>
|
|
75
|
+
<input id="email" type="email" required />
|
|
76
|
+
|
|
77
|
+
<!-- Implicit wrapping -->
|
|
78
|
+
<label>
|
|
79
|
+
Email address
|
|
80
|
+
<input type="email" required />
|
|
81
|
+
</label>
|
|
82
|
+
|
|
83
|
+
<!-- Hidden label (visible label preferred) -->
|
|
84
|
+
<input type="search" aria-label="Search tasks" />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### ARIA Roles
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<!-- Navigation -->
|
|
91
|
+
<nav aria-label="Main navigation">...</nav>
|
|
92
|
+
<nav aria-label="Footer links">...</nav>
|
|
93
|
+
|
|
94
|
+
<!-- Status messages -->
|
|
95
|
+
<div role="status" aria-live="polite">Task saved</div>
|
|
96
|
+
|
|
97
|
+
<!-- Alert messages -->
|
|
98
|
+
<div role="alert">Error: Title is required</div>
|
|
99
|
+
|
|
100
|
+
<!-- Modal dialogs -->
|
|
101
|
+
<dialog aria-modal="true" aria-labelledby="dialog-title">
|
|
102
|
+
<h2 id="dialog-title">Confirm Delete</h2>
|
|
103
|
+
...
|
|
104
|
+
</dialog>
|
|
105
|
+
|
|
106
|
+
<!-- Loading states -->
|
|
107
|
+
<div aria-busy="true" aria-label="Loading tasks">
|
|
108
|
+
<Spinner />
|
|
109
|
+
</div>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Accessible Lists
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<ul role="list" aria-label="Tasks">
|
|
116
|
+
<li>
|
|
117
|
+
<input type="checkbox" id="task-1" aria-label="Complete: Buy groceries" />
|
|
118
|
+
<label htmlFor="task-1">Buy groceries</label>
|
|
119
|
+
</li>
|
|
120
|
+
</ul>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Testing Tools
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Automated audit
|
|
127
|
+
npx axe-core # Programmatic accessibility testing
|
|
128
|
+
npx pa11y # CLI accessibility checker
|
|
129
|
+
|
|
130
|
+
# In browser
|
|
131
|
+
# Chrome DevTools → Lighthouse → Accessibility
|
|
132
|
+
# Chrome DevTools → Elements → Accessibility tree
|
|
133
|
+
|
|
134
|
+
# Screen reader testing
|
|
135
|
+
# macOS: VoiceOver (Cmd + F5)
|
|
136
|
+
# Windows: NVDA (free) or JAWS
|
|
137
|
+
# Linux: Orca
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Quick Reference: ARIA Live Regions
|
|
141
|
+
|
|
142
|
+
| Value | Behavior | Use For |
|
|
143
|
+
|-------|----------|---------|
|
|
144
|
+
| `aria-live="polite"` | Announced at next pause | Status updates, saved confirmations |
|
|
145
|
+
| `aria-live="assertive"` | Announced immediately | Errors, time-sensitive alerts |
|
|
146
|
+
| `role="status"` | Same as `polite` | Status messages |
|
|
147
|
+
| `role="alert"` | Same as `assertive` | Error messages |
|
|
148
|
+
|
|
149
|
+
## Common Anti-Patterns
|
|
150
|
+
|
|
151
|
+
| Anti-Pattern | Problem | Fix |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| `div` as button | Not focusable, no keyboard support | Use `<button>` |
|
|
154
|
+
| Missing `alt` text | Images invisible to screen readers | Add descriptive `alt` |
|
|
155
|
+
| Color-only states | Invisible to color-blind users | Add icons, text, or patterns |
|
|
156
|
+
| Autoplaying media | Disorienting, can't be stopped | Add controls, don't autoplay |
|
|
157
|
+
| Custom dropdown with no ARIA | Unusable by keyboard/screen reader | Use native `<select>` or proper ARIA listbox |
|
|
158
|
+
| Removing focus outlines | Users can't see where they are | Style outlines, don't remove them |
|
|
159
|
+
| Empty links/buttons | "Link" announced with no description | Add text or `aria-label` |
|
|
160
|
+
| `tabindex > 0` | Breaks natural tab order | Use `tabindex="0"` or `-1` only |
|