@skill-graph/cli 0.5.6
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/CHANGELOG.md +247 -0
- package/LICENSE +200 -0
- package/NOTICE +62 -0
- package/README.md +398 -0
- package/SKILL_GRAPH.md +443 -0
- package/bin/skill-graph.js +374 -0
- package/docs/ADOPTION.md +117 -0
- package/docs/CONFORMANCE.md +66 -0
- package/docs/PRIMER.md +384 -0
- package/docs/QUICKSTART-30MIN.md +333 -0
- package/docs/ROUTING-METRICS.md +120 -0
- package/docs/SKILL-MD-FORMAT-COMPATIBILITY.md +127 -0
- package/docs/SKILL_AUDIT_CHECKLIST.md +199 -0
- package/docs/SKILL_AUDIT_LOOP.md +195 -0
- package/docs/SKILL_METADATA_PROTOCOL.md +609 -0
- package/docs/_archived/marketplace-publication-priority-2026-05-18.md +239 -0
- package/docs/adr/0001-predicate-set.md +69 -0
- package/docs/adr/0002-json-ld-context.md +82 -0
- package/docs/adr/0003-ontoclean-rigidity-tags.md +65 -0
- package/docs/adr/0004-persistent-identifiers.md +74 -0
- package/docs/adr/0005-freshness-consolidation.md +70 -0
- package/docs/adr/0006-revise-predicate-rename.md +105 -0
- package/docs/adr/0007-audit-loop-cadence.md +99 -0
- package/docs/adr/0008-skill-surface-split-and-curation-policy.md +93 -0
- package/docs/category-consumers.md +168 -0
- package/docs/concept-map.md +194 -0
- package/docs/diagrams/drift-states.mmd +21 -0
- package/docs/diagrams/manifest-pipeline.mmd +25 -0
- package/docs/diagrams/routing-harness.mmd +41 -0
- package/docs/diagrams/starter-graph.mmd +53 -0
- package/docs/field-decision-guide.md +315 -0
- package/docs/field-rationale.md +211 -0
- package/docs/field-reference.generated.md +624 -0
- package/docs/field-reference.md +1426 -0
- package/docs/glossary.md +190 -0
- package/docs/head-noun-glossary.md +63 -0
- package/docs/images/audit-phases.png +0 -0
- package/docs/images/drift-states.png +0 -0
- package/docs/images/graded-mode.png +0 -0
- package/docs/images/manifest-pipeline.png +0 -0
- package/docs/images/routing-harness.png +0 -0
- package/docs/images/skill-anatomy.png +0 -0
- package/docs/images/starter-graph.png +0 -0
- package/docs/images/system-model.png +0 -0
- package/docs/integrations/github-actions.md +155 -0
- package/docs/manifest-field-mapping.md +443 -0
- package/docs/marketplace-publication-queue.generated.md +240 -0
- package/docs/marketplace-release-agent-prompt.md +82 -0
- package/docs/marketplace-skill-candidate-list.md +272 -0
- package/docs/marketplace-syndication.md +222 -0
- package/docs/migration-sample-review.md +155 -0
- package/docs/migrations/v4-to-v5.md +168 -0
- package/docs/migrations/v5-to-v6.md +221 -0
- package/docs/name-exceptions.yaml +37 -0
- package/docs/plans/marketplace-p1-public-migration-plan.md +41 -0
- package/docs/plans/multi-root-workspace.md +148 -0
- package/docs/plans/scripts-roadmap.md +107 -0
- package/docs/plans/v4-schema-bump.md +160 -0
- package/docs/plans/wave-2-extraction.md +122 -0
- package/docs/positioning-vs-marketplaces.md +175 -0
- package/docs/proposals/skill-audit-loop-positioning.md +160 -0
- package/docs/quality-doctrine.md +138 -0
- package/docs/recommended-skills.md +150 -0
- package/docs/research/skill-comprehension-eval-research.md +1830 -0
- package/docs/research/skill-retrieval-evidence.md +66 -0
- package/docs/skill-metadata-protocol.md +471 -0
- package/docs/skills-sh-maintainer-cleanup-request.md +80 -0
- package/examples/audits/a11y/findings.md +52 -0
- package/examples/audits/a11y/scorecard.md +21 -0
- package/examples/audits/a11y/verdict.md +44 -0
- package/examples/audits/debugging/findings.md +59 -0
- package/examples/audits/debugging/scorecard.md +22 -0
- package/examples/audits/debugging/verdict.md +33 -0
- package/examples/audits/documentation/findings.md +59 -0
- package/examples/audits/documentation/scorecard.md +22 -0
- package/examples/audits/documentation/verdict.md +33 -0
- package/examples/evals/a11y.json +140 -0
- package/examples/evals/api-design.json +52 -0
- package/examples/evals/code-review.json +52 -0
- package/examples/evals/data-modeling.json +52 -0
- package/examples/evals/database-migration.json +52 -0
- package/examples/evals/debugging.json +118 -0
- package/examples/evals/dependency-architecture.json +52 -0
- package/examples/evals/design-system-architecture.json +52 -0
- package/examples/evals/error-tracking.json +52 -0
- package/examples/evals/event-contract-design.json +52 -0
- package/examples/evals/form-ux-architecture.json +52 -0
- package/examples/evals/framework-fit-analysis.json +52 -0
- package/examples/evals/graph-audit.json +139 -0
- package/examples/evals/information-architecture.json +52 -0
- package/examples/evals/interaction-feedback.json +52 -0
- package/examples/evals/interaction-patterns.json +52 -0
- package/examples/evals/layout-composition.json +52 -0
- package/examples/evals/lint-overlay.json +117 -0
- package/examples/evals/microcopy.json +52 -0
- package/examples/evals/observability-modeling.json +52 -0
- package/examples/evals/pattern-recognition.json +96 -0
- package/examples/evals/performance-engineering.json +52 -0
- package/examples/evals/refactor.json +128 -0
- package/examples/evals/semiotics.json +52 -0
- package/examples/evals/skill-infrastructure.json +96 -0
- package/examples/evals/skill-router.json +140 -0
- package/examples/evals/skill-router.routing.json +113 -0
- package/examples/evals/system-interface-contracts.json +52 -0
- package/examples/evals/task-analysis.json +52 -0
- package/examples/evals/testing-strategy.json +118 -0
- package/examples/evals/type-safety.json +249 -0
- package/examples/evals/visual-design-foundations.json +52 -0
- package/examples/evals/webhook-integration.json +52 -0
- package/examples/exports/a11y.skill-md.md +80 -0
- package/examples/exports/debugging.skill-md.md +80 -0
- package/examples/exports/refactor.skill-md.md +78 -0
- package/examples/exports/testing-strategy.skill-md.md +81 -0
- package/examples/projects/markdown-static-site/README.md +115 -0
- package/examples/projects/markdown-static-site/skills/content-source-router/SKILL.md +131 -0
- package/examples/projects/markdown-static-site/skills/image-optimization-pipeline-config/SKILL.md +132 -0
- package/examples/projects/markdown-static-site/skills/link-rot-detection/SKILL.md +103 -0
- package/examples/projects/markdown-static-site/skills/markdown-post-frontmatter-validation/SKILL.md +133 -0
- package/examples/projects/markdown-static-site/skills/migrate-posts-to-v2-frontmatter/SKILL.md +140 -0
- package/examples/projects/saas-stripe-postgres/README.md +208 -0
- package/examples/projects/saas-stripe-postgres/db/migrations/0004_canonicalize_orders.sql +37 -0
- package/examples/projects/saas-stripe-postgres/db/schema.sql +112 -0
- package/examples/projects/saas-stripe-postgres/skills/migrate-orders-to-canonical-schema/SKILL.md +149 -0
- package/examples/projects/saas-stripe-postgres/skills/nextjs-server-action-validation/SKILL.md +154 -0
- package/examples/projects/saas-stripe-postgres/skills/payment-provider-router/SKILL.md +153 -0
- package/examples/projects/saas-stripe-postgres/skills/postgres-rls-pattern/SKILL.md +163 -0
- package/examples/projects/saas-stripe-postgres/skills/stripe-webhook-signature-verification/SKILL.md +137 -0
- package/examples/protocol/skill-metadata-template.md +301 -0
- package/examples/protocol/skills.manifest.sample.json +13245 -0
- package/examples/skill-metadata-template.md +317 -0
- package/examples/skills.manifest.sample.json +13519 -0
- package/examples/tests/v3-1-skos-fixture/SKILL.md +93 -0
- package/marketplace/README.md +17 -0
- package/marketplace/skills/a11y/SKILL.md +66 -0
- package/marketplace/skills/acid-fundamentals/SKILL.md +106 -0
- package/marketplace/skills/agent-engineering/SKILL.md +386 -0
- package/marketplace/skills/agent-eval-design/SKILL.md +55 -0
- package/marketplace/skills/ai-native-development/SKILL.md +294 -0
- package/marketplace/skills/api-design/SKILL.md +60 -0
- package/marketplace/skills/architecture-decision-records/SKILL.md +55 -0
- package/marketplace/skills/background-jobs/SKILL.md +265 -0
- package/marketplace/skills/bounded-context-mapping/SKILL.md +55 -0
- package/marketplace/skills/cap-theorem-tradeoffs/SKILL.md +127 -0
- package/marketplace/skills/client-server-boundary/SKILL.md +187 -0
- package/marketplace/skills/code-review/SKILL.md +120 -0
- package/marketplace/skills/color-system-design/SKILL.md +43 -0
- package/marketplace/skills/component-architecture/SKILL.md +126 -0
- package/marketplace/skills/compression/SKILL.md +112 -0
- package/marketplace/skills/conceptual-modeling/SKILL.md +181 -0
- package/marketplace/skills/connection-pooling/SKILL.md +105 -0
- package/marketplace/skills/constraint-awareness/SKILL.md +287 -0
- package/marketplace/skills/content-monitor/SKILL.md +209 -0
- package/marketplace/skills/context-engineering/SKILL.md +320 -0
- package/marketplace/skills/context-graph/SKILL.md +174 -0
- package/marketplace/skills/context-management/SKILL.md +174 -0
- package/marketplace/skills/context-window/SKILL.md +239 -0
- package/marketplace/skills/contract-testing/SKILL.md +120 -0
- package/marketplace/skills/cron-scheduling/SKILL.md +223 -0
- package/marketplace/skills/dark-mode-implementation/SKILL.md +47 -0
- package/marketplace/skills/data-modeling/SKILL.md +59 -0
- package/marketplace/skills/data-modeling-fundamentals/SKILL.md +117 -0
- package/marketplace/skills/database-migration/SKILL.md +429 -0
- package/marketplace/skills/debugging/SKILL.md +67 -0
- package/marketplace/skills/dependency-architecture/SKILL.md +58 -0
- package/marketplace/skills/design-module-composition/SKILL.md +43 -0
- package/marketplace/skills/design-system-architecture/SKILL.md +61 -0
- package/marketplace/skills/design-thinking/SKILL.md +44 -0
- package/marketplace/skills/diagnosis/SKILL.md +296 -0
- package/marketplace/skills/diff-analysis/SKILL.md +188 -0
- package/marketplace/skills/e2e-test-design/SKILL.md +113 -0
- package/marketplace/skills/entity-relationship-modeling/SKILL.md +218 -0
- package/marketplace/skills/epistemic-grounding/SKILL.md +112 -0
- package/marketplace/skills/error-boundary/SKILL.md +235 -0
- package/marketplace/skills/error-tracking/SKILL.md +261 -0
- package/marketplace/skills/eval-driven-development/SKILL.md +147 -0
- package/marketplace/skills/evaluation/SKILL.md +113 -0
- package/marketplace/skills/event-contract-design/SKILL.md +60 -0
- package/marketplace/skills/event-storming/SKILL.md +56 -0
- package/marketplace/skills/form-ux-architecture/SKILL.md +60 -0
- package/marketplace/skills/framework-fit-analysis/SKILL.md +59 -0
- package/marketplace/skills/frontend-architecture/SKILL.md +43 -0
- package/marketplace/skills/generative-ui/SKILL.md +118 -0
- package/marketplace/skills/graph-audit/SKILL.md +81 -0
- package/marketplace/skills/guardrails/SKILL.md +118 -0
- package/marketplace/skills/hooks-patterns/SKILL.md +185 -0
- package/marketplace/skills/http-semantics/SKILL.md +136 -0
- package/marketplace/skills/ideation/SKILL.md +41 -0
- package/marketplace/skills/indexing-strategy/SKILL.md +108 -0
- package/marketplace/skills/information-architecture/SKILL.md +59 -0
- package/marketplace/skills/integration-test-design/SKILL.md +111 -0
- package/marketplace/skills/intent-recognition/SKILL.md +136 -0
- package/marketplace/skills/interaction-feedback/SKILL.md +59 -0
- package/marketplace/skills/interaction-patterns/SKILL.md +59 -0
- package/marketplace/skills/journey-mapping/SKILL.md +41 -0
- package/marketplace/skills/keywords/SKILL.md +213 -0
- package/marketplace/skills/knowledge-modeling/SKILL.md +232 -0
- package/marketplace/skills/layout-composition/SKILL.md +59 -0
- package/marketplace/skills/linguistics/SKILL.md +429 -0
- package/marketplace/skills/lint-overlay/SKILL.md +76 -0
- package/marketplace/skills/mental-models/SKILL.md +126 -0
- package/marketplace/skills/merge-queue/SKILL.md +94 -0
- package/marketplace/skills/methodology/SKILL.md +317 -0
- package/marketplace/skills/microcopy/SKILL.md +232 -0
- package/marketplace/skills/middleware-patterns/SKILL.md +363 -0
- package/marketplace/skills/mobile-responsive-ux/SKILL.md +287 -0
- package/marketplace/skills/mutation-testing/SKILL.md +112 -0
- package/marketplace/skills/naming-conventions/SKILL.md +112 -0
- package/marketplace/skills/observability-modeling/SKILL.md +59 -0
- package/marketplace/skills/ontology-modeling/SKILL.md +67 -0
- package/marketplace/skills/owasp-security/SKILL.md +153 -0
- package/marketplace/skills/pattern-recognition/SKILL.md +472 -0
- package/marketplace/skills/performance-budgets/SKILL.md +185 -0
- package/marketplace/skills/performance-engineering/SKILL.md +58 -0
- package/marketplace/skills/performance-testing/SKILL.md +125 -0
- package/marketplace/skills/printify/SKILL.md +42 -0
- package/marketplace/skills/prioritization/SKILL.md +118 -0
- package/marketplace/skills/problem-framing/SKILL.md +41 -0
- package/marketplace/skills/problem-locating-solving/SKILL.md +203 -0
- package/marketplace/skills/project-knowledge-extraction/SKILL.md +54 -0
- package/marketplace/skills/prompt-craft/SKILL.md +134 -0
- package/marketplace/skills/prompt-injection-defense/SKILL.md +132 -0
- package/marketplace/skills/property-based-testing/SKILL.md +100 -0
- package/marketplace/skills/prototyping/SKILL.md +43 -0
- package/marketplace/skills/query-optimization/SKILL.md +144 -0
- package/marketplace/skills/real-time-updates/SKILL.md +324 -0
- package/marketplace/skills/ref-patterns/SKILL.md +284 -0
- package/marketplace/skills/refactor/SKILL.md +65 -0
- package/marketplace/skills/rendering-models/SKILL.md +142 -0
- package/marketplace/skills/replication-patterns/SKILL.md +110 -0
- package/marketplace/skills/research-synthesis/SKILL.md +41 -0
- package/marketplace/skills/route-handler-design/SKILL.md +347 -0
- package/marketplace/skills/schema-evolution/SKILL.md +140 -0
- package/marketplace/skills/security-fundamentals/SKILL.md +139 -0
- package/marketplace/skills/semantic-center/SKILL.md +194 -0
- package/marketplace/skills/semantic-relations/SKILL.md +250 -0
- package/marketplace/skills/semantics/SKILL.md +366 -0
- package/marketplace/skills/semiotics/SKILL.md +230 -0
- package/marketplace/skills/seo-strategy/SKILL.md +260 -0
- package/marketplace/skills/server-actions-design/SKILL.md +243 -0
- package/marketplace/skills/server-components-design/SKILL.md +190 -0
- package/marketplace/skills/sharding-strategy/SKILL.md +123 -0
- package/marketplace/skills/shopify/SKILL.md +42 -0
- package/marketplace/skills/skill-infrastructure/SKILL.md +320 -0
- package/marketplace/skills/skill-router/SKILL.md +71 -0
- package/marketplace/skills/skill-scaffold/SKILL.md +105 -0
- package/marketplace/skills/snapshot-testing/SKILL.md +120 -0
- package/marketplace/skills/spec-driven-development/SKILL.md +148 -0
- package/marketplace/skills/state-machine-modeling/SKILL.md +56 -0
- package/marketplace/skills/state-management/SKILL.md +134 -0
- package/marketplace/skills/streaming-architecture/SKILL.md +194 -0
- package/marketplace/skills/summarization/SKILL.md +156 -0
- package/marketplace/skills/suspense-patterns/SKILL.md +265 -0
- package/marketplace/skills/system-interface-contracts/SKILL.md +59 -0
- package/marketplace/skills/task-analysis/SKILL.md +201 -0
- package/marketplace/skills/taxonomy-design/SKILL.md +66 -0
- package/marketplace/skills/test-coverage-strategy/SKILL.md +108 -0
- package/marketplace/skills/test-doubles-design/SKILL.md +98 -0
- package/marketplace/skills/test-driven-development/SKILL.md +96 -0
- package/marketplace/skills/testing-strategy/SKILL.md +67 -0
- package/marketplace/skills/theme-system-design/SKILL.md +43 -0
- package/marketplace/skills/tool-call-flow/SKILL.md +229 -0
- package/marketplace/skills/tool-call-strategy/SKILL.md +292 -0
- package/marketplace/skills/transaction-isolation/SKILL.md +98 -0
- package/marketplace/skills/type-safety/SKILL.md +177 -0
- package/marketplace/skills/typography-system/SKILL.md +43 -0
- package/marketplace/skills/usability-testing/SKILL.md +43 -0
- package/marketplace/skills/user-research/SKILL.md +43 -0
- package/marketplace/skills/vercel-composition-patterns/SKILL.md +157 -0
- package/marketplace/skills/version-control/SKILL.md +233 -0
- package/marketplace/skills/visual-design-foundations/SKILL.md +59 -0
- package/marketplace/skills/visual-hierarchy/SKILL.md +43 -0
- package/marketplace/skills/webhook-integration/SKILL.md +331 -0
- package/marketplace/skills/writing-humanizer/SKILL.md +380 -0
- package/package.json +67 -0
- package/schemas/manifest.schema.json +811 -0
- package/schemas/manifest.v2.schema.json +164 -0
- package/schemas/manifest.v3.schema.json +758 -0
- package/schemas/manifest.v4.schema.json +755 -0
- package/schemas/manifest.v5.schema.json +755 -0
- package/schemas/manifest.v6.schema.json +811 -0
- package/schemas/skill.context.jsonld +279 -0
- package/schemas/skill.schema.json +919 -0
- package/schemas/skill.v2.schema.json +201 -0
- package/schemas/skill.v3.schema.json +827 -0
- package/schemas/skill.v4.schema.json +822 -0
- package/schemas/skill.v5.schema.json +830 -0
- package/schemas/skill.v6.schema.json +946 -0
- package/schemas/vocabulary/keywords.json +180 -0
- package/schemas/vocabulary/workspace_tags.json +23 -0
- package/scripts/__tests__/migrate-skill-v2-to-v3.test.js +161 -0
- package/scripts/__tests__/migrate-skill-v3-to-v4.test.js +158 -0
- package/scripts/__tests__/test-export-parser-drift.js +149 -0
- package/scripts/__tests__/test-marketplace-export.js +114 -0
- package/scripts/__tests__/test-router-paths.js +82 -0
- package/scripts/__tests__/test-stability-promotion.js +244 -0
- package/scripts/__tests__/test-v3-1-alias-contract.js +109 -0
- package/scripts/__tests__/test-v3-1-skos-runtime.js +116 -0
- package/scripts/backfill-schema-version.js +198 -0
- package/scripts/build-field-reference.js +160 -0
- package/scripts/build-retrieval-baseline.js +511 -0
- package/scripts/check-markdown-links.js +211 -0
- package/scripts/check-protocol-consistency.js +979 -0
- package/scripts/export-marketplace-skills.js +610 -0
- package/scripts/export-skill.js +374 -0
- package/scripts/generate-manifest.js +787 -0
- package/scripts/lib/alias-contract.js +83 -0
- package/scripts/lib/audit-prompt-builder.js +771 -0
- package/scripts/lib/mock-grader.js +134 -0
- package/scripts/lib/parse-frontmatter.js +429 -0
- package/scripts/lib/roots.js +119 -0
- package/scripts/lint/check-archetype-sections.js +185 -0
- package/scripts/lint/check-category-enum.js +83 -0
- package/scripts/lint/check-routing-eval.js +146 -0
- package/scripts/lint/check-routing-quality.js +211 -0
- package/scripts/lint/check-stability-promotion.js +220 -0
- package/scripts/lint/format-code-frame.js +206 -0
- package/scripts/marketplace-install.js +125 -0
- package/scripts/migrate-category-to-enum.js +169 -0
- package/scripts/migrate-skill-v2-to-v3.js +424 -0
- package/scripts/migrate-skill-v3-to-v4.js +200 -0
- package/scripts/migrate-skill-v5-to-v6.js +304 -0
- package/scripts/restructure-by-category.js +85 -0
- package/scripts/seed-publication-classification.js +282 -0
- package/scripts/skill-audit.js +893 -0
- package/scripts/skill-graph-drift.js +483 -0
- package/scripts/skill-graph-route.js +766 -0
- package/scripts/skill-graph-routing-eval.js +393 -0
- package/scripts/skill-lint.js +1317 -0
- package/scripts/skill-overlap.js +213 -0
- package/scripts/verify-skill-md-export.js +201 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: semantics
|
|
3
|
+
description: "Use when naming artifacts across code, APIs, design tokens, commits, HTTP/status signals, UI labels, error codes, or branded types, especially when a name feels ambiguous or misleading. Covers cross-domain meaning-encoding: naming smells, DDD ubiquitous language, SemVer, conventional commits, branded types, semantic design tokens/CSS/APIs, semantic UI affordances, and naming anti-patterns. Do NOT use for word morphology/polysemy (use linguistics), casing formats (use naming-conventions), typed concept relations (use semantic-relations), or in-product UI-text patterns (use microcopy)."
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: "Cross-domain naming and meaning skill, stack-agnostic. The naming-smells catalogue, SemVer rules, conventional-commit format, three-layer token architecture, HTTP-status semantics, REST/GraphQL conventions, and anti-pattern catalog apply to any codebase; example identifiers use generic e-commerce framings — substitute the equivalents from your domain."
|
|
6
|
+
allowed-tools: Read Grep
|
|
7
|
+
metadata:
|
|
8
|
+
metadata: "{\"schema_version\":6,\"version\":\"1.1.0\",\"type\":\"capability\",\"category\":\"foundations\",\"domain\":\"foundations/semantics\",\"scope\":\"portable\",\"owner\":\"skill-graph-maintainer\",\"freshness\":\"2026-05-16\",\"drift_check\":\"{\\\\\\\"last_verified\\\\\\\":\\\\\\\"2026-05-16\\\\\\\"}\",\"eval_artifacts\":\"planned\",\"eval_state\":\"unverified\",\"routing_eval\":\"absent\",\"comprehension_state\":\"present\",\"stability\":\"experimental\",\"keywords\":\"[\\\\\\\"semantic naming\\\\\\\",\\\\\\\"semantic drift detection\\\\\\\",\\\\\\\"branded type design\\\\\\\",\\\\\\\"semantic versioning rules\\\\\\\",\\\\\\\"conventional commit type choice\\\\\\\",\\\\\\\"HTTP status semantic signaling\\\\\\\",\\\\\\\"design-token semantic layer\\\\\\\",\\\\\\\"naming smells catalogue\\\\\\\",\\\\\\\"DDD ubiquitous language\\\\\\\",\\\\\\\"semantic affordance naming\\\\\\\",\\\\\\\"semantic UI signal\\\\\\\",\\\\\\\"semantic API contract\\\\\\\",\\\\\\\"parse-do-not-validate pattern\\\\\\\",\\\\\\\"three-layer token architecture\\\\\\\",\\\\\\\"meaning-encoding identifier\\\\\\\",\\\\\\\"semantic-vs-syntactic distinction\\\\\\\",\\\\\\\"cargo-cult naming anti-pattern\\\\\\\"]\",\"examples\":\"[\\\\\\\"a function named process(data) actually reconciles revenue with production cost — what semantic rename would make the operation self-explanatory without reading the implementation?\\\\\\\",\\\\\\\"our API returns HTTP 200 with { success: false, error: 'User not found' } — is that syntactically valid but semantically wrong, and what should the response signal be instead?\\\\\\\",\\\\\\\"we named a token --light-blue and now dark mode plus rebranding broke its meaning — what semantic token pattern should replace it?\\\\\\\",\\\\\\\"a variable called provider could mean payment, fulfillment, or auth in three different modules — how should semantics resolve that ambiguity?\\\\\\\",\\\\\\\"I need to choose between feat(billing): add email notifications and chore(billing): add email notifications — which commit message is semantically correct?\\\\\\\",\\\\\\\"should this ID be a branded type or a plain string, and what does parse-don't-validate mean for it?\\\\\\\",\\\\\\\"audit this database schema for unitless financial columns and timestamp-naming drift\\\\\\\"]\",\"anti_examples\":\"[\\\\\\\"should onboarding be hyphenated, and how does English compound morphology affect that decision?\\\\\\\",\\\\\\\"what does margin mean in finance reporting versus CSS layout — give me the canonical definition?\\\\\\\",\\\\\\\"what casing should a new database timestamp column use — kebab, snake, or camel?\\\\\\\",\\\\\\\"audit whether this button has the correct aria-label and focus semantics for screen readers\\\\\\\",\\\\\\\"decide whether these entities should live in a strict hierarchy or a faceted taxonomy\\\\\\\",\\\\\\\"draft the empty-state copy for a freshly connected storefront with no orders yet\\\\\\\"]\",\"relations\":\"{\\\\\\\"boundary\\\\\\\":[{\\\\\\\"skill\\\\\\\":\\\\\\\"linguistics\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"linguistics owns word-form rules (morphology, compound-word ordering, abbreviation policy, audience register, blame-free phrasing); semantics owns meaning encoding (what the name communicates, semantic drift, branded types, HTTP-status semantics, SemVer signaling) — the same 'is this name good?' prompt routes by whether the trigger is the form of the word or the meaning the name encodes\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"naming-conventions\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"naming-conventions owns the deterministic casing/format choice per artifact kind (kebab vs camel vs snake vs Pascal); semantics owns the meaning encoding behind the name — the same 'what should I call this?' prompt routes by whether the user wants the format rule or the meaning-encoding decision\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"semantic-relations\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"semantic-relations owns the typed-connection vocabulary between concepts (IS-A, PART-OF, thematic roles); semantics owns the meaning encoding for an individual identifier or signal — the same 'what does this mean?' prompt routes by whether the trigger is the relation between things or the encoding of one thing\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"microcopy\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"microcopy owns specific in-product UI-text patterns (button labels, empty states, tooltips, dialogs, toasts); semantics owns the underlying meaning-encoding rules that apply to any name or signal — the same 'rewrite this UI text' prompt routes by whether the trigger is the UX-pattern surface or the cross-domain meaning rule\\\\\\\"}],\\\\\\\"related\\\\\\\":[\\\\\\\"linguistics\\\\\\\",\\\\\\\"semantic-relations\\\\\\\",\\\\\\\"microcopy\\\\\\\"],\\\\\\\"verify_with\\\\\\\":[\\\\\\\"a11y\\\\\\\",\\\\\\\"code-review\\\\\\\"]}\",\"portability\":\"{\\\\\\\"readiness\\\\\\\":\\\\\\\"scripted\\\\\\\",\\\\\\\"targets\\\\\\\":[\\\\\\\"skill-md\\\\\\\"]}\",\"lifecycle\":\"{\\\\\\\"stale_after_days\\\\\\\":365,\\\\\\\"review_cadence\\\\\\\":\\\\\\\"quarterly\\\\\\\"}\",\"mental_model\":\"|\",\"purpose\":\"|\",\"boundary\":\"|\",\"analogy\":\"Semantics is to code what road signage is to driving — the sign isn't the road, but bad signage causes crashes even when the road is fine. A `--light-blue` token that breaks on dark mode is the equivalent of 'Turn Left at the Big Tree' as a road sign: it worked when the tree was there; the semantics depended on the world, not the sign system.\",\"misconception\":\"|\",\"concept\":\"{\\\\\\\"definition\\\\\\\":\\\\\\\"Semantics — applied to software — is the discipline of *meaning encoding* in identifiers and signals: function names, variable names, design tokens, HTTP status codes, version numbers, commit messages, branded types, and the small textual artefacts that communicate intent to humans and machines. Drawing from Domain-Driven Design's *ubiquitous language* (Evans 2003), Don Norman's affordance theory, semantic versioning, and the broader tradition that treats names as contracts, it commits to the view that every visible identifier is a micro-decision whose meaning compounds across the codebase.\\\\\\\",\\\\\\\"mental_model\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"purpose\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"boundary\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"taxonomy\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"analogy\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"misconception\\\\\\\":\\\\\\\"|\\\\\\\"}\",\"skill_graph_source_repo\":\"https://github.com/jacob-balslev/skill-graph\",\"skill_graph_protocol\":\"Skill Metadata Protocol v5\",\"skill_graph_project\":\"Skill Graph\",\"skill_graph_canonical_skill\":\"skills/semantics/SKILL.md\"}"
|
|
9
|
+
skill_graph_source_repo: "https://github.com/jacob-balslev/skill-graph"
|
|
10
|
+
skill_graph_protocol: Skill Metadata Protocol v4
|
|
11
|
+
skill_graph_project: Skill Graph
|
|
12
|
+
skill_graph_canonical_skill: skills/semantics/SKILL.md
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Semantics
|
|
16
|
+
|
|
17
|
+
## Coverage
|
|
18
|
+
|
|
19
|
+
Cross-domain semantic thinking for all naming and meaning decisions:
|
|
20
|
+
|
|
21
|
+
- **Naming in code** — the fundamental what + why principle, naming smells (Peter Hilton's seven categories), DDD ubiquitous language, scalar/count/collection/boolean rules
|
|
22
|
+
- **Semantic versioning** — SemVer 2.0.0 (MAJOR.MINOR.PATCH), what counts as breaking, SemVer vs CalVer, pre-release tags
|
|
23
|
+
- **Semantic commit messages** — Conventional Commits format, type catalog (`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`), breaking-change syntax, the SemVer-from-commits automation chain
|
|
24
|
+
- **Semantic CSS** — purpose-not-appearance class names, BEM (`.block__element--modifier`), three-layer design-token architecture (primitive → semantic → component)
|
|
25
|
+
- **Semantic data modeling** — column-naming rules (unit suffixes, boolean prefixes, timestamp suffixes), semantic types beyond primitives, branded TypeScript types, parse-don't-validate
|
|
26
|
+
- **Semantic UI / UX** — Don Norman affordances and signifiers, semantic color (with the never-color-alone rule), microcopy semantics
|
|
27
|
+
- **Semantic APIs** — REST resource naming (nouns + HTTP verbs, plural collections, kebab-case, max-2-nesting), HTTP status codes as semantic signals (the never-200-with-error-body rule), GraphQL naming
|
|
28
|
+
- **Universal anti-patterns** — generic names, semantic drift, misleading names, appearance-based names, abbreviation ambiguity, cargo-cult naming
|
|
29
|
+
|
|
30
|
+
## Philosophy
|
|
31
|
+
|
|
32
|
+
Every name is a micro-decision that compounds across the codebase. A function called `process(data)` forces every future reader to open the implementation to understand its purpose. A design token called `--light-blue` breaks the moment someone adds dark mode. An API returning HTTP 200 with an error body confuses every consumer. These are not style preferences — they are semantic failures that create real debugging time and real misunderstandings.
|
|
33
|
+
|
|
34
|
+
This skill exists because naming quality degrades silently. No test catches `handleRefresh()` being reused for too many unrelated actions. No linter flags `--big-spacing`. No CI gate rejects `employee2`. Without explicit semantic rules loaded at decision time, agents default to the first name that compiles rather than the name that communicates. The discipline is to make meaning a first-class artifact, not a residue.
|
|
35
|
+
|
|
36
|
+
The mental model: a `Sign` (the name) acquires meaning from its `Referent` (what it points to) and from `Convention` (the shared agreement). `Affordance` (what the name implies you can do) is the bridge between sign and user expectation. **Semantic drift** happens when referents change but signs do not — a silent lie in the code, the kind no test catches.
|
|
37
|
+
|
|
38
|
+
> Semantics is to code what road signage is to driving — the sign isn't the road, but bad signage causes crashes even when the road is fine.
|
|
39
|
+
|
|
40
|
+
## When to Use
|
|
41
|
+
|
|
42
|
+
- Naming variables, functions, classes, files, or database columns
|
|
43
|
+
- Designing API endpoints, error codes, or status systems
|
|
44
|
+
- Choosing CSS class names or design-token names
|
|
45
|
+
- Writing commit messages or versioning releases
|
|
46
|
+
- Designing UI labels, error messages, or microcopy quality bars
|
|
47
|
+
- Modeling data with domain language and branded types
|
|
48
|
+
- Reviewing code for naming quality
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 1. Semantic Naming in Code
|
|
53
|
+
|
|
54
|
+
### The Fundamental Principle
|
|
55
|
+
|
|
56
|
+
A name must encode **what** something is and **why** it exists. The reader should never need to read the implementation to understand the purpose.
|
|
57
|
+
|
|
58
|
+
### Rules
|
|
59
|
+
|
|
60
|
+
| Rule | Bad | Good | Why |
|
|
61
|
+
|------|-----|------|-----|
|
|
62
|
+
| Use full words | `calc()`, `mgr`, `btn` | `calculateProfitAndMargin()`, `manager`, `button` | Abbreviations are ambiguous (`auth` = authentication or authorization?) |
|
|
63
|
+
| Encode intent | `data`, `info`, `result` | `unpaidInvoices`, `customerProfile`, `validationErrors` | Generic names carry zero information |
|
|
64
|
+
| Use domain language | `UserRequestsProduct` | `customerPlacesOrder` | Match stakeholder vocabulary (DDD ubiquitous language) |
|
|
65
|
+
| Name the distinction | `employee`, `employee2` | `manager`, `recentHire` | Numeric suffixes hide the actual difference |
|
|
66
|
+
| Scalars need qualifiers | `store = "text"` | `storeName = "text"` | `store` implies an object, not a string |
|
|
67
|
+
| Counts need suffixes | `products = 0` | `productCount = 0` | `products` implies a collection |
|
|
68
|
+
| Collections use plurals | `orderList` | `orders` | The data structure already implies "list" |
|
|
69
|
+
| Booleans read as questions | `active` | `isActive`, `hasOrders`, `canEdit` | Reads naturally in conditionals |
|
|
70
|
+
|
|
71
|
+
### Naming Smells (Peter Hilton's catalog)
|
|
72
|
+
|
|
73
|
+
1. **Meaningless** — `foo`, `bar`, `tmp`, `x`
|
|
74
|
+
2. **Abstract** — `data`, `object`, `thing`, `item`
|
|
75
|
+
3. **Numeric suffixes** — `employee2` hides the distinction
|
|
76
|
+
4. **Abbreviations** — `acc` (accumulator? accuracy? account?)
|
|
77
|
+
5. **Vague verbs** — `get`, `process`, `handle`, `manage` say nothing about behavior
|
|
78
|
+
6. **Type-encoded** — `array`, `string`, `int` as variable names
|
|
79
|
+
7. **Weasel suffixes** — `Info`, `Data`, `Manager`, `Helper`, `Utils`, `Base`, `Entity`
|
|
80
|
+
|
|
81
|
+
### DDD Ubiquitous Language
|
|
82
|
+
|
|
83
|
+
Core domain classes (entities, value objects, events, services) must use business terminology. Zero tolerance for weasel words. Technical terms are acceptable only in infrastructure classes where no domain equivalent exists.
|
|
84
|
+
|
|
85
|
+
**Translation tax**: every time a developer mentally translates between code vocabulary and business vocabulary, cognitive overhead accumulates — and it compounds across teams and codebase lifetime.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 2. Semantic Versioning (SemVer 2.0.0)
|
|
90
|
+
|
|
91
|
+
### Format: `MAJOR.MINOR.PATCH`
|
|
92
|
+
|
|
93
|
+
| Increment | When | Example |
|
|
94
|
+
|-----------|------|---------|
|
|
95
|
+
| **MAJOR** | Backward-incompatible API changes | Removing a method, changing return type |
|
|
96
|
+
| **MINOR** | New backward-compatible functionality | Adding an endpoint, new optional param |
|
|
97
|
+
| **PATCH** | Backward-compatible bug fixes only | Fixing a calculation, patching a security issue |
|
|
98
|
+
|
|
99
|
+
### What Constitutes a Breaking Change
|
|
100
|
+
|
|
101
|
+
- Removing a public method, class, endpoint, or field
|
|
102
|
+
- Changing return types or parameter types
|
|
103
|
+
- Changing default behavior users depend on
|
|
104
|
+
- Renaming public APIs without aliases
|
|
105
|
+
- Changing serialization format
|
|
106
|
+
- **NOT breaking**: adding optional params, new endpoints, new types
|
|
107
|
+
|
|
108
|
+
### SemVer vs CalVer
|
|
109
|
+
|
|
110
|
+
| Aspect | SemVer | CalVer |
|
|
111
|
+
|--------|--------|--------|
|
|
112
|
+
| Encodes | API compatibility intent | Release timeline |
|
|
113
|
+
| Best for | Libraries, APIs, packages | OS releases, browsers, enterprise |
|
|
114
|
+
| Weakness | Subjective "what's breaking?" | No compatibility signal |
|
|
115
|
+
|
|
116
|
+
### Pre-release tags
|
|
117
|
+
|
|
118
|
+
`1.0.0-alpha.1`, `1.0.0-beta.2`, `1.0.0-rc.1`
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 3. Semantic Commit Messages (Conventional Commits)
|
|
123
|
+
|
|
124
|
+
### Format: `type(scope): description`
|
|
125
|
+
|
|
126
|
+
| Type | Purpose | SemVer Bump |
|
|
127
|
+
|------|---------|------------|
|
|
128
|
+
| `feat` | New feature | MINOR |
|
|
129
|
+
| `fix` | Bug fix | PATCH |
|
|
130
|
+
| `docs` | Documentation only | — |
|
|
131
|
+
| `style` | Formatting, no logic change | — |
|
|
132
|
+
| `refactor` | Code change, no feature/fix | — |
|
|
133
|
+
| `perf` | Performance improvement | PATCH |
|
|
134
|
+
| `test` | Adding/fixing tests | — |
|
|
135
|
+
| `build` | Build system, dependencies | — |
|
|
136
|
+
| `ci` | CI configuration | — |
|
|
137
|
+
| `chore` | Maintenance, no source change | — |
|
|
138
|
+
|
|
139
|
+
**Breaking changes** — add `!` after the type or `BREAKING CHANGE:` in the footer → MAJOR bump.
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
feat(auth)!: replace session tokens with JWT
|
|
143
|
+
|
|
144
|
+
BREAKING CHANGE: Session-based auth removed. All clients must use Bearer tokens.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Automation chain**: Conventional Commits → semantic-release → changelog → publish. Fully automated versioning from commit messages.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 4. Semantic CSS
|
|
152
|
+
|
|
153
|
+
### Class Names Describe Purpose, Not Appearance
|
|
154
|
+
|
|
155
|
+
| Bad (appearance) | Good (purpose) |
|
|
156
|
+
|-----------------|----------------|
|
|
157
|
+
| `.red-text` | `.error-message` |
|
|
158
|
+
| `.left-sidebar` | `.navigation` |
|
|
159
|
+
| `.big-button` | `.primary-action` |
|
|
160
|
+
| `.mt-4` (alone) | `.card__spacing` (with utility supplement) |
|
|
161
|
+
|
|
162
|
+
### BEM: `.block__element--modifier`
|
|
163
|
+
|
|
164
|
+
Names encode component structure. `.card__title` belongs to `.card` without reading HTML.
|
|
165
|
+
|
|
166
|
+
### Design-Token Naming: Three-Layer Architecture
|
|
167
|
+
|
|
168
|
+
```css
|
|
169
|
+
/* Layer 1: Primitive (raw values, no meaning) */
|
|
170
|
+
--blue-500: oklch(0.62 0.18 260);
|
|
171
|
+
--spacing-4: 1rem;
|
|
172
|
+
|
|
173
|
+
/* Layer 2: Semantic (purpose-driven) */
|
|
174
|
+
--color-text-primary: var(--grey-900);
|
|
175
|
+
--color-bg-danger: var(--red-100);
|
|
176
|
+
--spacing-component-gap: var(--spacing-4);
|
|
177
|
+
|
|
178
|
+
/* Layer 3: Component (scoped to specific component) */
|
|
179
|
+
--button-bg-hover: var(--color-bg-interactive-hover);
|
|
180
|
+
--card-border-radius: var(--radius-md);
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Rule**: UI code references *semantic* tokens. Semantic tokens reference *primitives*. Primitives hold raw values. Never skip a layer.
|
|
184
|
+
|
|
185
|
+
**Anti-patterns**: `--light-blue` (breaks on rebrand), `--color-1` (meaningless), `--homepage-hero-cta-bg` (too coupled to one location).
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 5. Semantic Data Modeling
|
|
190
|
+
|
|
191
|
+
### Column-Naming Rules
|
|
192
|
+
|
|
193
|
+
| Rule | Bad | Good |
|
|
194
|
+
|------|-----|------|
|
|
195
|
+
| Describe what, not where | `external_price` | `retail_price_cents` |
|
|
196
|
+
| Include unit | `weight` | `weight_grams` |
|
|
197
|
+
| Include precision | `revenue` | `revenue_cents` (integer) |
|
|
198
|
+
| Boolean prefix | `active` | `is_active` |
|
|
199
|
+
| Timestamp suffix | `created` | `created_at` |
|
|
200
|
+
|
|
201
|
+
### Semantic Types (Beyond Primitives)
|
|
202
|
+
|
|
203
|
+
A raw `string` can hold an email, URL, SQL query, or credit-card number — semantically different despite identical type. Semantic types make illegal states unrepresentable:
|
|
204
|
+
|
|
205
|
+
| Semantic Type | Underlying | Why Distinct |
|
|
206
|
+
|--------------|------------|--------------|
|
|
207
|
+
| `Money` | `{ amount: number, currency: string }` | Prevents mixing currencies |
|
|
208
|
+
| `Email` | validated `string` | Ensures format, enables operations |
|
|
209
|
+
| `OrderId` | branded `string` | Prevents passing a `UserId` where `OrderId` expected |
|
|
210
|
+
| `Percentage` | `number` (0–100 or 0–1) | Prevents 50 vs 0.5 confusion |
|
|
211
|
+
|
|
212
|
+
### Branded Types in TypeScript
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
type OrderId = string & { readonly __brand: 'OrderId' };
|
|
216
|
+
type UserId = string & { readonly __brand: 'UserId' };
|
|
217
|
+
|
|
218
|
+
function getOrder(id: OrderId): Order { /* ... */ }
|
|
219
|
+
|
|
220
|
+
// Compile error: UserId is not assignable to OrderId
|
|
221
|
+
getOrder(userId);
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Parse, Don't Validate
|
|
225
|
+
|
|
226
|
+
Instead of checking data after the fact, parse it into a type that *guarantees* validity:
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
// Bad: validate then trust
|
|
230
|
+
function processEmail(input: string) {
|
|
231
|
+
if (!isValidEmail(input)) throw new Error('Invalid email');
|
|
232
|
+
sendEmail(input); // input is still just string
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Good: parse into semantic type
|
|
236
|
+
function parseEmail(input: string): Email | null {
|
|
237
|
+
return isValidEmail(input) ? (input as Email) : null;
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 6. Semantic UI / UX
|
|
244
|
+
|
|
245
|
+
### Affordances and Signifiers (Don Norman)
|
|
246
|
+
|
|
247
|
+
- **Affordance** — what an object allows you to do (a button affords pressing)
|
|
248
|
+
- **Signifier** — what communicates the affordance (the button's raised appearance, shadow, cursor change)
|
|
249
|
+
|
|
250
|
+
Semantic UI ensures signifiers match affordances: clickable things look clickable, draggable things look draggable, disabled things look disabled.
|
|
251
|
+
|
|
252
|
+
### Semantic Color
|
|
253
|
+
|
|
254
|
+
| Color | Western Meaning | Risk |
|
|
255
|
+
|-------|----------------|------|
|
|
256
|
+
| Red | Danger, error, stop, loss | Green/red pair fails for ~8% of males (deuteranopia) |
|
|
257
|
+
| Green | Success, go, profit, safe | See above |
|
|
258
|
+
| Yellow / Amber | Warning, caution, pending | Low contrast on white backgrounds |
|
|
259
|
+
| Blue | Information, link, trust | Overloaded — can mean anything neutral |
|
|
260
|
+
| Grey | Disabled, inactive, secondary | Must have sufficient contrast |
|
|
261
|
+
|
|
262
|
+
**Rule**: color must never be the *sole* differentiator. Always pair with icon, text, or shape.
|
|
263
|
+
|
|
264
|
+
### Microcopy Semantics
|
|
265
|
+
|
|
266
|
+
- **Button labels** — verbs with clear objects: "Save changes" not "Submit"
|
|
267
|
+
- **Error messages** — name what broke + how to fix: "Password must be 8+ characters" not "Invalid input"
|
|
268
|
+
- **Confirmations** — name what will happen: "Delete 3 orders permanently?" not "Are you sure?"
|
|
269
|
+
- **Empty states** — explain value + provide action — not just "No data"
|
|
270
|
+
|
|
271
|
+
For the full UX-text pattern catalog (button label rules, empty-state structure, tooltip rules, dialog rules, toast rules), use the dedicated `microcopy` skill — semantics owns only the underlying meaning rule.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 7. Semantic APIs
|
|
276
|
+
|
|
277
|
+
### REST Resource Naming
|
|
278
|
+
|
|
279
|
+
| Rule | Bad | Good |
|
|
280
|
+
|------|-----|------|
|
|
281
|
+
| Nouns, not verbs | `/getOrders` | `/orders` |
|
|
282
|
+
| Plural for collections | `/order` | `/orders` |
|
|
283
|
+
| HTTP method = verb | `POST /createUser` | `POST /users` |
|
|
284
|
+
| Kebab-case | `/orderItems` | `/order-items` |
|
|
285
|
+
| Max 2 nesting levels | `/a/1/b/2/c/3` | `/orders/123/items` |
|
|
286
|
+
|
|
287
|
+
### HTTP Status Codes as Semantic Signals
|
|
288
|
+
|
|
289
|
+
| Family | Semantic Meaning | Responsibility |
|
|
290
|
+
|--------|------------------|---------------|
|
|
291
|
+
| 2xx | Success | Server fulfilled the request |
|
|
292
|
+
| 3xx | Redirect | Client must follow |
|
|
293
|
+
| 4xx | Client error | Client's fault |
|
|
294
|
+
| 5xx | Server error | Server's fault |
|
|
295
|
+
|
|
296
|
+
**Never return HTTP 200 with an error body.** The status code IS the semantic signal.
|
|
297
|
+
|
|
298
|
+
### GraphQL Naming
|
|
299
|
+
|
|
300
|
+
- Types: PascalCase (`Order`, `LineItem`)
|
|
301
|
+
- Fields: camelCase (`totalRevenue`, `createdAt`)
|
|
302
|
+
- Mutations: verb + noun (`createOrder`, `updateShippingAddress`)
|
|
303
|
+
- Enums: SCREAMING_SNAKE (`ORDER_STATUS`, `PAYMENT_METHOD`)
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## 8. Universal Anti-Patterns
|
|
308
|
+
|
|
309
|
+
| Anti-Pattern | Domains Affected | Fix |
|
|
310
|
+
|--------------|------------------|-----|
|
|
311
|
+
| **Generic names** (`data`, `info`, `utils`, `misc`, `helpers`) | Code, files, folders, CSS, API | Replace with domain-specific purpose |
|
|
312
|
+
| **Semantic drift** (name no longer matches behavior) | Code, API, DB, tokens | Rename in same commit as behavior change |
|
|
313
|
+
| **Misleading names** (`isReady` returns a promise, not a boolean) | Code, API | Name must match return type and behavior |
|
|
314
|
+
| **Appearance-based names** (`.red`, `leftColumn`, `bigFont`) | CSS, tokens, components | Name purpose, not presentation |
|
|
315
|
+
| **Abbreviation ambiguity** (`auth`, `temp`, `proc`, `val`) | All domains | Use full words; abbreviate only universals (`id`, `url`, `api`) |
|
|
316
|
+
| **Cargo-cult naming** (copying patterns without understanding) | All domains | Every name must be justified for *this* context |
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Verification
|
|
321
|
+
|
|
322
|
+
After applying this skill, verify:
|
|
323
|
+
|
|
324
|
+
```text
|
|
325
|
+
SEMANTICS CHECK
|
|
326
|
+
===============
|
|
327
|
+
[ ] Every name encodes what + why (no data/info/temp/misc)
|
|
328
|
+
[ ] Domain language matches stakeholder vocabulary
|
|
329
|
+
[ ] No abbreviation ambiguity (auth, proc, val, acc)
|
|
330
|
+
[ ] Booleans read as questions (is/has/can/should)
|
|
331
|
+
[ ] CSS classes describe purpose, not appearance
|
|
332
|
+
[ ] Design tokens use the 3-layer architecture (primitive → semantic → component)
|
|
333
|
+
[ ] API endpoints use nouns, HTTP methods as verbs
|
|
334
|
+
[ ] HTTP status codes match semantic meaning (no 200 with error body)
|
|
335
|
+
[ ] Commit messages follow Conventional Commits format
|
|
336
|
+
[ ] Color is never the sole status differentiator
|
|
337
|
+
[ ] Semantic types prevent illegal states (branded types for IDs)
|
|
338
|
+
[ ] Version bumps match SemVer rules (breaking = MAJOR)
|
|
339
|
+
[ ] Currency-as-integer columns end in `_cents` (or equivalent unit suffix)
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
## Do NOT Use When
|
|
343
|
+
|
|
344
|
+
| Instead, use | Why |
|
|
345
|
+
|---|---|
|
|
346
|
+
| `linguistics` | Word morphology, compound-word ordering, polysemy resolution at the identifier level, audience register, blame-free phrasing. Linguistics owns the form rules; semantics owns the meaning encoding. |
|
|
347
|
+
| `naming-conventions` | Deciding the casing format for an artifact kind (kebab vs camel vs snake vs Pascal). Naming-conventions owns the convention; semantics owns the meaning encoding under it. |
|
|
348
|
+
| `semantic-relations` | Typing the connection *between* two concepts (IS-A, PART-OF, thematic, causal). Semantic-relations owns the relation vocabulary; semantics owns the encoding of one identifier or signal. |
|
|
349
|
+
| `microcopy` | The specific UX-text pattern (button labels, empty states, tooltips, dialogs, toasts). Microcopy owns the patterns; semantics owns the cross-domain meaning rule applied to many surfaces. |
|
|
350
|
+
| `a11y` | Accessibility-label auditing (aria-label correctness, focus-state semantics, screen-reader announcement). A11y owns accessibility contracts; semantics owns naming-quality contracts. |
|
|
351
|
+
| `code-review` | Reviewing a specific PR for correctness, security, or quality across many concerns. Code-review uses semantics as one input; it does not own the meaning rules. |
|
|
352
|
+
| (a glossary skill) | Defining the canonical meaning of a domain term. A glossary owns the definition; semantics owns the consistent application of the definition in names and signals. |
|
|
353
|
+
| (a taxonomy skill) | Designing the classification structure itself (hierarchy vs facet, IS-A vs PART-OF tree shape). Taxonomy owns the structure; semantics owns the names inside it. |
|
|
354
|
+
|
|
355
|
+
## Key Sources
|
|
356
|
+
|
|
357
|
+
- Evans, E. (2003). *Domain-Driven Design: Tackling Complexity in the Heart of Software*. Addison-Wesley. The canonical statement of *ubiquitous language* — that domain code must use the same terms as domain experts — and the value-object pattern for encoding meaning in types.
|
|
358
|
+
- Norman, D. A. (2013). *The Design of Everyday Things* (Revised and Expanded Edition). Basic Books. The foundational affordance / signifier framework; applied directly to the discipline of matching identifier names to actual behavior.
|
|
359
|
+
- Hilton, P. (2017). ["Naming Smells."](https://hilton.org.uk/blog/naming-smells) Seven categories of names that destroy readability: meaningless, abstract, numeric-suffix, abbreviation, vague-verb, type-encoded, weasel-suffix. The practitioner reference for naming review.
|
|
360
|
+
- Preston-Werner, T. [Semantic Versioning 2.0.0](https://semver.org/). The normative specification for MAJOR.MINOR.PATCH; the convention that makes API-compatibility intent machine-readable across package ecosystems.
|
|
361
|
+
- [Conventional Commits 1.0.0](https://www.conventionalcommits.org/). The specification for `type(scope): description` commit messages; the foundation for automated changelog generation and SemVer-from-commits tooling.
|
|
362
|
+
- King, A. (2019). ["Parse, don't validate."](https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/) The reference statement of the parse-don't-validate pattern; encode meaning in types rather than checking it at use sites.
|
|
363
|
+
- IETF. [RFC 9110: HTTP Semantics](https://datatracker.ietf.org/doc/html/rfc9110). The normative specification of HTTP status code semantics (2xx / 4xx / 5xx) and the body-vs-status separation of concerns.
|
|
364
|
+
- Martin, R. C. (2008). *Clean Code: A Handbook of Agile Software Craftsmanship*. Prentice Hall. Chapter 2 ("Meaningful Names") is one of the most widely cited practitioner statements of naming discipline.
|
|
365
|
+
- Fowler, M. (2010). ["DomainLanguage."](https://martinfowler.com/bliki/DomainLanguage.html) The bridge between DDD's ubiquitous-language principle and day-to-day engineering practice.
|
|
366
|
+
- Hejlsberg, A., et al. Microsoft. [TypeScript Handbook — Branded Types pattern](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html). The implementation surface for branded types and other meaning-encoding patterns in TypeScript.
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: semiotics
|
|
3
|
+
description: "Use when designing or auditing icon systems, colors/badges/shapes, visual metaphors, interface signs, or naming-plus-visual surfaces that users misread. Covers semiotic reasoning across icon/index/symbol, signifier/signified, denotation/connotation/myth, color/shape/position/iconography, affordances, code/API signifiers, and semiotic-coherence audits. Do NOT use for actual UI wording (use `microcopy`), palette/typography craft (use `visual-design-foundations`), accessibility or contrast compliance (use `a11y`), formal class hierarchies, or word morphology rules."
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: "Stack-agnostic sign-system analysis. The Peirce / Saussure / Barthes models, color-as-sign rules, iconography principles, and affordance taxonomy apply to any UI; example surfaces use generic e-commerce framings — substitute the equivalents from your domain."
|
|
6
|
+
allowed-tools: Read Grep
|
|
7
|
+
metadata:
|
|
8
|
+
metadata: "{\"schema_version\":6,\"version\":\"1.1.0\",\"type\":\"capability\",\"category\":\"design\",\"domain\":\"design/semantics\",\"scope\":\"portable\",\"owner\":\"skill-graph-maintainer\",\"freshness\":\"2026-05-16\",\"drift_check\":\"{\\\\\\\"last_verified\\\\\\\":\\\\\\\"2026-05-16\\\\\\\"}\",\"eval_artifacts\":\"present\",\"eval_state\":\"unverified\",\"routing_eval\":\"absent\",\"comprehension_state\":\"present\",\"stability\":\"experimental\",\"keywords\":\"[\\\\\\\"sign-system analysis\\\\\\\",\\\\\\\"icon polysemy\\\\\\\",\\\\\\\"signifier signified mapping\\\\\\\",\\\\\\\"denotation versus connotation\\\\\\\",\\\\\\\"affordance signifier match\\\\\\\",\\\\\\\"icon-index-symbol trichotomy\\\\\\\",\\\\\\\"visual metaphor clarity\\\\\\\",\\\\\\\"color connotation audit\\\\\\\",\\\\\\\"cross-surface sign drift\\\\\\\",\\\\\\\"semiotic coherence audit\\\\\\\",\\\\\\\"anti-affordance design\\\\\\\",\\\\\\\"icon-system consistency\\\\\\\",\\\\\\\"abstract-mark opacity\\\\\\\",\\\\\\\"sign-conflict detection\\\\\\\",\\\\\\\"visual-meaning audit\\\\\\\",\\\\\\\"code-and-api semiotics\\\\\\\"]\",\"examples\":\"[\\\\\\\"our dashboard uses green for both revenue increase and cost increase, so users read both as good — what semiotic failure is that and how should we correct it?\\\\\\\",\\\\\\\"we use a gear icon for settings on one page and preferences on another — is this just a naming issue, or an interface sign conflict?\\\\\\\",\\\\\\\"a disabled button still looks clickable because only the color changed — which signifier or affordance rule is failing?\\\\\\\",\\\\\\\"we need an icon for reconciliation in a financial workflow — which metaphors are available, and when must text stay paired with the icon?\\\\\\\",\\\\\\\"an API function is named processData() — from a sign-system perspective, what is wrong with that name?\\\\\\\",\\\\\\\"audit this status-badge color system for denotation vs connotation conflicts\\\\\\\",\\\\\\\"explain why users keep clicking a non-interactive label that looks like a link\\\\\\\"]\",\"anti_examples\":\"[\\\\\\\"I need formal class hierarchies, axioms, and what-exists rules for our knowledge base\\\\\\\",\\\\\\\"I need physical database schema design and relationship constraints\\\\\\\",\\\\\\\"I need the relation type between two concepts — synonymy, polysemy, or meronymy\\\\\\\",\\\\\\\"draft the exact wording for a button label or tooltip after the sign system is chosen\\\\\\\",\\\\\\\"give me the live color-token values, APCA contrast math, and palette enforcement\\\\\\\",\\\\\\\"explain the morphology rule behind verb-first function names\\\\\\\"]\",\"relations\":\"{\\\\\\\"boundary\\\\\\\":[{\\\\\\\"skill\\\\\\\":\\\\\\\"semantics\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"semantics owns meaning encoding for individual textual identifiers and signals (function names, design tokens, HTTP status codes, branded types, SemVer, conventional commits); semiotics owns sign-system analysis for visual + textual sign systems (icons, color as sign, affordances, signifier/signified mappings) — the same 'what does this mean?' prompt routes by whether the trigger is one identifier's encoding or a multi-channel sign system\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"microcopy\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"microcopy owns the actual UI wording (button labels, empty states, tooltips, dialogs); semiotics owns the sign-system reasoning that determines what the words and accompanying visual signs should communicate — the same 'fix this UI element' prompt routes by whether the trigger is the wording itself or the sign system the wording sits inside\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"semantic-relations\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"semantic-relations owns the typed connections between concepts (IS-A, PART-OF, thematic roles); semiotics owns the signifier-to-signified mapping in interface and naming surfaces — the same 'how does this relate to that?' prompt routes by whether the trigger is a conceptual relation type or a sign-system relationship\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"visual-design-foundations\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"visual-design-foundations owns visual craft decisions such as palette, type, spacing, and hierarchy; semiotics owns what those signs communicate\\\\\\\"}],\\\\\\\"related\\\\\\\":[\\\\\\\"linguistics\\\\\\\",\\\\\\\"a11y\\\\\\\",\\\\\\\"intent-recognition\\\\\\\",\\\\\\\"visual-design-foundations\\\\\\\"],\\\\\\\"verify_with\\\\\\\":[\\\\\\\"a11y\\\\\\\",\\\\\\\"code-review\\\\\\\"]}\",\"portability\":\"{\\\\\\\"readiness\\\\\\\":\\\\\\\"scripted\\\\\\\",\\\\\\\"targets\\\\\\\":[\\\\\\\"skill-md\\\\\\\"]}\",\"lifecycle\":\"{\\\\\\\"stale_after_days\\\\\\\":365,\\\\\\\"review_cadence\\\\\\\":\\\\\\\"quarterly\\\\\\\"}\",\"mental_model\":\"|\",\"purpose\":\"|\",\"boundary\":\"|\",\"analogy\":\"Semiotics is to interface design what choreography is to a play — the words are the script, but the actor's stance, hand position, gaze direction, and proximity to other actors are the choreography. A line that lands flat with the wrong choreography lands well with the right one; same words, different signs. A disabled button that uses only a paler color (signifier too quiet) is a stage actor whispering an exit cue the audience cannot hear.\",\"misconception\":\"|\",\"concept\":\"{\\\\\\\"definition\\\\\\\":\\\\\\\"Semiotics is the study of *sign systems* — how signifiers (perceivable forms: icons, colors, shapes, positions, words) point to signifieds (concepts, states, actions) via convention, resemblance, or causal connection. Applied to interfaces, it is the discipline of designing and auditing the multi-channel sign systems through which a product communicates with its users. Drawing from Peirce's icon/index/symbol trichotomy, Saussure's signifier/signified dyad, Barthes' denotation/connotation/myth layering, and Norman's affordance theory, it treats every interface element as a sign whose meaning is constructed, not given.\\\\\\\",\\\\\\\"mental_model\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"purpose\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"boundary\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"taxonomy\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"analogy\\\\\\\":\\\\\\\"|\\\\\\\",\\\\\\\"misconception\\\\\\\":\\\\\\\"|\\\\\\\"}\",\"skill_graph_source_repo\":\"https://github.com/jacob-balslev/skill-graph\",\"skill_graph_protocol\":\"Skill Metadata Protocol v5\",\"skill_graph_project\":\"Skill Graph\",\"skill_graph_canonical_skill\":\"skills/semiotics/SKILL.md\"}"
|
|
9
|
+
skill_graph_source_repo: "https://github.com/jacob-balslev/skill-graph"
|
|
10
|
+
skill_graph_protocol: Skill Metadata Protocol v4
|
|
11
|
+
skill_graph_project: Skill Graph
|
|
12
|
+
skill_graph_canonical_skill: skills/semiotics/SKILL.md
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Semiotics
|
|
16
|
+
|
|
17
|
+
## Coverage
|
|
18
|
+
|
|
19
|
+
Semiotic analysis as the study of sign systems in software interfaces and communication. Covers:
|
|
20
|
+
|
|
21
|
+
- **Foundational models** — Peirce's icon / index / symbol trichotomy; Saussure's signifier / signified dyad; Barthes' denotation / connotation / myth layers
|
|
22
|
+
- **Visual semiotics for interfaces** — color as sign (denotation + connotation, with the never-color-alone rule), shape and position as sign channels (top-left, top-right, bottom-right, circle, triangle, pill)
|
|
23
|
+
- **Iconography as a sign system** — consistency, metaphor clarity, pairing rules, system coherence; common breakdowns (icon polysemy, opacity, cultural collision, obsolete metaphor)
|
|
24
|
+
- **Affordance theory** — real affordance, perceived affordance, signifier, anti-affordance; the rule that disabled states need a strong anti-affordance
|
|
25
|
+
- **Code and API semiotics** — naming, variable, endpoint, and error-message signs; the rule that vague names like `processData()` are signifier failures even when the implementation works
|
|
26
|
+
- **Semiotic-coherence audit** — the checklist for reviewing a surface across color, icon, affordance, and cross-surface consistency
|
|
27
|
+
|
|
28
|
+
The skill operates *above* microcopy execution and color-token math, and *below* formal ontology. It owns the question "what does this sign communicate to a user?", not "what should the button say?", "what hex value is this?", or "what class hierarchy do these things belong to?".
|
|
29
|
+
|
|
30
|
+
## Philosophy
|
|
31
|
+
|
|
32
|
+
Every interface element is already communicating, whether the designer intended it to or not. Semiotics exists to make that communication explicit and coherent. A button that looks clickable but is disabled, a green badge that signals "good" when the metric is actually worsening, or a gear icon that means different things on different pages are not visual quirks; they are sign failures that erode user trust one micro-misread at a time.
|
|
33
|
+
|
|
34
|
+
The core rule is: **one signifier should point clearly to one intended signified within a given system context.** The more a sign drifts, the more users (and agents) are forced to infer meaning from guesswork rather than from the system itself. Sign drift compounds — a single ambiguous icon is a small cost; ten ambiguous icons across a product is a learned distrust of the entire surface.
|
|
35
|
+
|
|
36
|
+
This skill is sign *analysis*, not visual *craft*. It tells you whether a sign communicates the right meaning. It does not tell you how to lay out the screen, what hex value to use, what class hierarchy to formalize, or what wording to put on a button. Each of those belongs to a different skill in the design / language / data cluster.
|
|
37
|
+
|
|
38
|
+
## When to Use
|
|
39
|
+
|
|
40
|
+
- Designing or auditing icon systems
|
|
41
|
+
- Checking whether a color, badge, or shape communicates the wrong judgment
|
|
42
|
+
- Explaining why users misread a button, state, or symbol
|
|
43
|
+
- Choosing or critiquing visual metaphors for abstract concepts
|
|
44
|
+
- Auditing naming and interface signs together when a surface feels semantically off
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 1. Foundations — How Signs Work
|
|
49
|
+
|
|
50
|
+
### Peirce's Trichotomy
|
|
51
|
+
|
|
52
|
+
| Sign type | Relationship to meaning | UI example | Strength |
|
|
53
|
+
|-----------|------------------------|------------|----------|
|
|
54
|
+
| **Icon** | Resembles what it represents | Magnifying glass = search | Intuitive but culturally variable |
|
|
55
|
+
| **Index** | Causally connected to meaning | Loading spinner = something is happening | Direct but context-dependent |
|
|
56
|
+
| **Symbol** | Arbitrary convention | Red = danger, hamburger = menu | Efficient once learned |
|
|
57
|
+
|
|
58
|
+
Rules:
|
|
59
|
+
|
|
60
|
+
- Prefer icons for first-use discoverability.
|
|
61
|
+
- Prefer symbols for expert fluency when the convention is already learned.
|
|
62
|
+
- Use indexes when the system needs to signal that a process or state is actively occurring.
|
|
63
|
+
|
|
64
|
+
### Saussure's Dyad
|
|
65
|
+
|
|
66
|
+
| Component | Definition | Application |
|
|
67
|
+
|-----------|-----------|-------------|
|
|
68
|
+
| **Signifier** | The perceivable form | Color, shape, text, icon, animation |
|
|
69
|
+
| **Signified** | The concept or meaning | Action, state, category, judgment |
|
|
70
|
+
|
|
71
|
+
Rules:
|
|
72
|
+
|
|
73
|
+
- The same signifier should not point to multiple signifieds within one product surface unless that ambiguity is deliberate and documented.
|
|
74
|
+
- Changing the signifier can break learned meaning even if the redesign seems visually improved.
|
|
75
|
+
|
|
76
|
+
### Barthes' Three Layers
|
|
77
|
+
|
|
78
|
+
| Layer | What it is | Example |
|
|
79
|
+
|-------|-----------|---------|
|
|
80
|
+
| **Denotation** | Literal reading | Up arrow = increase |
|
|
81
|
+
| **Connotation** | Associated judgment / cultural meaning | Green = positive / good |
|
|
82
|
+
| **Myth** | Systemic or ideological framing | Growth as inherently desirable |
|
|
83
|
+
|
|
84
|
+
Rules:
|
|
85
|
+
|
|
86
|
+
- Separate direction from judgment in financial UI. An *increase* is not always *good*.
|
|
87
|
+
- A sign can be denotationally correct while still semantically wrong because the connotation misleads.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 2. Visual Semiotics for Interfaces
|
|
92
|
+
|
|
93
|
+
### Color as Sign
|
|
94
|
+
|
|
95
|
+
| Color | Common denotation | Common connotation | Risk |
|
|
96
|
+
|-------|-------------------|--------------------|------|
|
|
97
|
+
| Red | Error, stop, danger | Bad, urgent, loss | Overuse dulls alarm meaning |
|
|
98
|
+
| Green | Success, active, up | Good, growth, healthy | Wrong when used for *undesirable* increases |
|
|
99
|
+
| Yellow / Amber | Warning, caution | Attention needed | Easily confused with error |
|
|
100
|
+
| Blue | Information, trust, link | Calm, corporate, neutral authority | Can become semantically empty if overused |
|
|
101
|
+
| Grey | Inactive, secondary, disabled | Neutral, quiet | May fail as an anti-affordance if too subtle |
|
|
102
|
+
|
|
103
|
+
Rules:
|
|
104
|
+
|
|
105
|
+
- Color should not be the *only* sign channel for important meaning.
|
|
106
|
+
- Audit color decisions at both denotation and connotation levels.
|
|
107
|
+
- Live token values, contrast compliance, and visual craft belong to `a11y` or `visual-design-foundations`; semiotics evaluates only whether the *sign* itself is coherent.
|
|
108
|
+
|
|
109
|
+
### Shape and Position as Sign
|
|
110
|
+
|
|
111
|
+
| Sign channel | Common reading |
|
|
112
|
+
|--------------|----------------|
|
|
113
|
+
| Top-left placement | Primary or first-scanned element |
|
|
114
|
+
| Top-right placement | Tools, account, utility actions |
|
|
115
|
+
| Bottom-right placement | Primary CTA in a dialog |
|
|
116
|
+
| Circle | Status, avatar, completion |
|
|
117
|
+
| Triangle / arrow | Direction, expansion, movement |
|
|
118
|
+
| Pill / badge | Category, state, count |
|
|
119
|
+
|
|
120
|
+
Rules:
|
|
121
|
+
|
|
122
|
+
- Position and shape carry meaning even without text; treat them as part of the sign system.
|
|
123
|
+
- If a layout or component breaks a strong convention, ensure the surrounding cues are strong enough to retrain the interpretation.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 3. Iconography as a Sign System
|
|
128
|
+
|
|
129
|
+
| Principle | Rule |
|
|
130
|
+
|-----------|------|
|
|
131
|
+
| **Consistency** | Same concept = same icon across the product |
|
|
132
|
+
| **Metaphor clarity** | The metaphor should be legible without specialist training |
|
|
133
|
+
| **Pairing** | Abstract or unfamiliar icons need text pairing until learned |
|
|
134
|
+
| **System coherence** | Use one icon family unless there is a compelling reason not to |
|
|
135
|
+
|
|
136
|
+
Common breakdowns:
|
|
137
|
+
|
|
138
|
+
- **Icon polysemy** — one icon means several things
|
|
139
|
+
- **Opacity** — abstract mark with no clear signified
|
|
140
|
+
- **Cultural collision** — metaphor fails outside one audience's assumptions
|
|
141
|
+
- **Obsolete metaphor** — the convention is still learned by some but dead to others (e.g., the floppy-disk save icon)
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 4. Affordance Theory
|
|
146
|
+
|
|
147
|
+
| Concept | Application |
|
|
148
|
+
|---------|-------------|
|
|
149
|
+
| **Real affordance** | What the element can actually do |
|
|
150
|
+
| **Perceived affordance** | What the element appears to allow |
|
|
151
|
+
| **Signifier** | The cue that tells the user action is possible |
|
|
152
|
+
| **Anti-affordance** | The cue that tells the user action is *not* possible |
|
|
153
|
+
|
|
154
|
+
Rules:
|
|
155
|
+
|
|
156
|
+
- If an element looks interactive, it should be interactive.
|
|
157
|
+
- Disabled states need a strong anti-affordance, not just a mild color change.
|
|
158
|
+
- Semiotic failures most often appear when the signifier and the true affordance disagree.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 5. Code and API Semiotics
|
|
163
|
+
|
|
164
|
+
Semiotics also applies to textual and code-facing signs.
|
|
165
|
+
|
|
166
|
+
| Sign surface | Semiotic question |
|
|
167
|
+
|--------------|-------------------|
|
|
168
|
+
| Function name | Does the signifier actually tell me what the behavior is? |
|
|
169
|
+
| Variable name | Does the label point clearly to the value's meaning? |
|
|
170
|
+
| API endpoint | Does the route name communicate the resource / action correctly? |
|
|
171
|
+
| Error message | Does it communicate both what happened and how to respond? |
|
|
172
|
+
|
|
173
|
+
**Rule**: a vague name like `processData()` is a signifier failure even when the implementation works. The reader has to *open the function* to learn its meaning — which is exactly the inference cost a good sign eliminates.
|
|
174
|
+
|
|
175
|
+
This overlaps with `semantics` (which owns identifier-level meaning encoding); semiotics adds the sign-system lens — *is the same concept signed consistently across both code names and visual interface elements?*
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 6. Semiotic-Coherence Audit
|
|
180
|
+
|
|
181
|
+
Use this checklist when reviewing a surface:
|
|
182
|
+
|
|
183
|
+
- Does each color carry one stable meaning across the product?
|
|
184
|
+
- Does each icon represent one intended concept?
|
|
185
|
+
- Do interactive elements look interactive?
|
|
186
|
+
- Do disabled states look unavailable rather than merely quiet?
|
|
187
|
+
- Are abstract concepts paired with enough textual support?
|
|
188
|
+
- Is the same concept being signed consistently across UI and code-facing surfaces?
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Evals
|
|
193
|
+
|
|
194
|
+
This skill ships a comprehension-eval artifact at [`examples/evals/semiotics.json`](https://github.com/jacob-balslev/skill-graph/blob/main/examples/evals/semiotics.json). The checklist below is the authoring gate for sign-system decisions; the eval file is the grader surface.
|
|
195
|
+
|
|
196
|
+
## Verification
|
|
197
|
+
|
|
198
|
+
After applying this skill, verify:
|
|
199
|
+
|
|
200
|
+
- [ ] No signifier points to multiple unintended signifieds within the same system context
|
|
201
|
+
- [ ] Important interface meanings are not encoded through color alone
|
|
202
|
+
- [ ] Interactive and non-interactive states have distinct affordance signals
|
|
203
|
+
- [ ] Icon metaphors are coherent, learnable, and consistent across surfaces
|
|
204
|
+
- [ ] Direction (denotation) and judgment (connotation) are separated in financial / metric UI
|
|
205
|
+
- [ ] Code-facing signs (function, variable, endpoint names) are not vague signifier failures
|
|
206
|
+
|
|
207
|
+
## Do NOT Use When
|
|
208
|
+
|
|
209
|
+
| Instead, use | Why |
|
|
210
|
+
|---|---|
|
|
211
|
+
| `microcopy` | Drafting the actual button labels, empty states, tooltips, or toasts. Microcopy owns the wording; semiotics owns the sign system the wording lives inside. |
|
|
212
|
+
| `semantics` | Deciding the meaning encoding of a single identifier, design token, HTTP status code, or commit type. Semantics owns identifier-level meaning; semiotics owns the multi-channel sign system. |
|
|
213
|
+
| `semantic-relations` | Typing the connection between two concepts (IS-A, PART-OF, thematic, causal). Semantic-relations owns concept-to-concept relations; semiotics owns sign-to-meaning mappings. |
|
|
214
|
+
| `linguistics` | Word morphology, compound-word ordering, abbreviation policy. Linguistics owns word-form rules; semiotics owns broader sign systems including visual ones. |
|
|
215
|
+
| `a11y` | Auditing aria-label correctness, focus management, screen-reader semantics. A11y owns accessibility contracts; semiotics may inform them but does not own them. |
|
|
216
|
+
| `visual-design-foundations` | Palette, typography, spacing, hierarchy, craft quality, and motion feel. Visual-design-foundations owns visual craft; semiotics asks what the visual element *signifies*. |
|
|
217
|
+
| (an ontology skill) | Formal class hierarchies, existence axioms, reasoning constraints. Ontology owns formal classification; semiotics owns sign meaning in interfaces. |
|
|
218
|
+
|
|
219
|
+
## Key Sources
|
|
220
|
+
|
|
221
|
+
- Peirce, C. S. (1931-1958). *Collected Papers of Charles Sanders Peirce* (8 vols.). Harvard University Press. The original statement of the icon / index / symbol trichotomy; the foundational typology of sign-to-referent relations that all later interface-semiotics work builds on.
|
|
222
|
+
- Saussure, F. de (1916). *Cours de linguistique générale* / *Course in General Linguistics*. Payot. The signifier/signified dyad and the principle that meaning is constituted by systems of contrast — the structural foundation for sign-system analysis.
|
|
223
|
+
- Barthes, R. (1957). *Mythologies*. Éditions du Seuil. The three-layer denotation / connotation / myth analysis; the canonical demonstration that signs carry cultural and ideological meaning beyond literal reading.
|
|
224
|
+
- Eco, U. (1976). *A Theory of Semiotics*. Indiana University Press. The systematic treatment of semiotics as a discipline; cultural codes, sign-production, and the constructed-meaning principle.
|
|
225
|
+
- Norman, D. A. (2013). *The Design of Everyday Things* (Revised and Expanded Edition). Basic Books. The foundational text on affordances and signifiers for interface design; the discipline of matching visual cues to actual interaction possibilities.
|
|
226
|
+
- Gibson, J. J. (1979). *The Ecological Approach to Visual Perception*. Houghton Mifflin. The original psychological account of affordances — what the environment offers to a perceiver — that Norman adapted to design.
|
|
227
|
+
- Nielsen Norman Group. ["Icon Usability"](https://www.nngroup.com/articles/icon-usability/). Empirical UX research on icon polysemy, opacity, and the icon-plus-text pairing rule; the practitioner reference for icon-system design.
|
|
228
|
+
- W3C. [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/) — Use of Color (Success Criterion 1.4.1). The international standard expression of the never-color-alone principle.
|
|
229
|
+
- Frutiger, A. (1989). *Signs and Symbols: Their Design and Meaning*. Watson-Guptill. The reference work on visual sign design from typography to pictograms; foundational for icon-system vocabulary work.
|
|
230
|
+
- Krug, S. (2014). *Don't Make Me Think, Revisited*. New Riders. The practitioner statement of the cognitive-cost principle in interface signs; the empirical observation that users do not read signs analytically — they pattern-match, and the sign system must support that.
|