@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,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 4
|
|
3
|
+
name: v3-1-skos-fixture
|
|
4
|
+
description: Test fixture exercising v3.1 SKOS predicates (related, broader, narrower) and the ADR 0006 split between boundary (routing-layer) and disjoint_with (OWL class-disjointness). Used by scripts/__tests__/test-v3-1-skos-runtime.js to verify that the manifest generator, lint, and router all recognize the full predicate set. Not a production skill.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
type: capability
|
|
7
|
+
category: testing
|
|
8
|
+
scope: portable
|
|
9
|
+
owner: skill-graph-maintainer
|
|
10
|
+
freshness: 2026-05-04
|
|
11
|
+
license: MIT
|
|
12
|
+
stability: experimental
|
|
13
|
+
|
|
14
|
+
triggers:
|
|
15
|
+
- test fixture
|
|
16
|
+
keywords:
|
|
17
|
+
- fixture
|
|
18
|
+
- v3-1
|
|
19
|
+
- SKOS
|
|
20
|
+
- predicate
|
|
21
|
+
examples:
|
|
22
|
+
- "Used by scripts/__tests__/test-v3-1-skos-runtime.js to assert manifest entries"
|
|
23
|
+
- "Used by scripts/skill-lint.js relation-target test (related/broader/narrower)"
|
|
24
|
+
- "Used by scripts/skill-graph-route.js Stage 4b broader-recall test"
|
|
25
|
+
anti_examples:
|
|
26
|
+
- "DO NOT use as a real authored skill — fixture only"
|
|
27
|
+
|
|
28
|
+
relations:
|
|
29
|
+
related:
|
|
30
|
+
- documentation
|
|
31
|
+
- testing-strategy
|
|
32
|
+
broader:
|
|
33
|
+
- debugging
|
|
34
|
+
narrower:
|
|
35
|
+
- a11y
|
|
36
|
+
boundary:
|
|
37
|
+
- skill: skill-router
|
|
38
|
+
reason: "skill-router owns dispatch decisions; this fixture only exercises predicates"
|
|
39
|
+
disjoint_with:
|
|
40
|
+
- skill: refactor
|
|
41
|
+
reason: "Formal OWL example — fixture and refactor name disjoint conceptual classes"
|
|
42
|
+
verify_with:
|
|
43
|
+
- lint-overlay
|
|
44
|
+
depends_on:
|
|
45
|
+
- graph-audit
|
|
46
|
+
|
|
47
|
+
eval_artifacts: none
|
|
48
|
+
eval_state: untested
|
|
49
|
+
routing_eval: absent
|
|
50
|
+
|
|
51
|
+
drift_check:
|
|
52
|
+
last_verified: 2026-05-04
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
# v3.1 SKOS Fixture
|
|
56
|
+
|
|
57
|
+
> Test fixture exercising the full v3.1 predicate set. Not a production skill.
|
|
58
|
+
|
|
59
|
+
## Domain Context
|
|
60
|
+
|
|
61
|
+
This fixture exists to verify that the runtime — `generate-manifest.js`, `skill-lint.js`,
|
|
62
|
+
`skill-graph-route.js`, and the lint-target resolver — iterates the complete v3.1 predicate
|
|
63
|
+
set defined in ADR 0001 (SKOS additions: `related`, `broader`, `narrower`) and ADR 0006
|
|
64
|
+
(`boundary` canonical for routing-layer; `disjoint_with` separate orthogonal relation
|
|
65
|
+
for formal OWL class-disjointness).
|
|
66
|
+
|
|
67
|
+
The companion test `scripts/__tests__/test-v3-1-skos-runtime.js` builds a manifest entry
|
|
68
|
+
from this file and asserts every predicate above appears in the resulting `relations`
|
|
69
|
+
block, with relation-target validation passing for all eight references.
|
|
70
|
+
|
|
71
|
+
## Coverage
|
|
72
|
+
|
|
73
|
+
Predicates exercised:
|
|
74
|
+
|
|
75
|
+
- `related` — symmetric SKOS associative relation (skos:related)
|
|
76
|
+
- `broader` — SKOS generalisation (skos:broader); triggers Stage 4b parent recall in router
|
|
77
|
+
- `narrower` — SKOS specialisation (skos:narrower)
|
|
78
|
+
- `boundary` — routing-layer asymmetric handoff (sg:disjointOwnership)
|
|
79
|
+
- `disjoint_with` — formal OWL class-disjointness (owl:disjointWith)
|
|
80
|
+
- `verify_with` — PROV-O informational influence (prov:wasInformedBy)
|
|
81
|
+
- `depends_on` — DCMI requirement (dcterms:requires)
|
|
82
|
+
|
|
83
|
+
`adjacent` is intentionally NOT exercised here — that's covered by the back-compat
|
|
84
|
+
fixture (a separate test asserting the deprecated alias still validates).
|
|
85
|
+
|
|
86
|
+
## Workflow
|
|
87
|
+
|
|
88
|
+
This skill has no workflow — it is a fixture, not a procedure.
|
|
89
|
+
|
|
90
|
+
## Verification
|
|
91
|
+
|
|
92
|
+
`scripts/__tests__/test-v3-1-skos-runtime.js` exits 0 only when this fixture round-trips
|
|
93
|
+
cleanly through the manifest generator and lint relation-target check.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Skill Graph Marketplace Export
|
|
2
|
+
|
|
3
|
+
This directory is generated from the canonical Skill Metadata Protocol source in `skills/`.
|
|
4
|
+
Do not edit generated files here by hand; run `node scripts/export-marketplace-skills.js` from the canonical repo.
|
|
5
|
+
|
|
6
|
+
Canonical source repo: https://github.com/jacob-balslev/skill-graph
|
|
7
|
+
Release target repo: jacob-balslev/skills
|
|
8
|
+
Generated public skills: 140
|
|
9
|
+
|
|
10
|
+
Each skill under `skills/<name>/SKILL.md` is a plain Agent Skills-compatible export.
|
|
11
|
+
Protocol fields are preserved as string values under `metadata`, with factual Skill Graph provenance.
|
|
12
|
+
|
|
13
|
+
After the release target is published, install with:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx skills add jacob-balslev/skills
|
|
17
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: a11y
|
|
3
|
+
description: "Use when building or reviewing interactive UI, forms, navigation, or dynamic content. Covers semantic HTML, keyboard access, focus management, labeling, state-change announcement, and reduced-motion / high-contrast preferences. Do NOT use for color-palette creation, visual branding, feedback-state staging, or prose reading-level accessibility - those belong to `visual-design-foundations`, `interaction-feedback`, and documentation respectively."
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: "Markdown, Git, any web stack"
|
|
6
|
+
allowed-tools: Read Grep
|
|
7
|
+
metadata:
|
|
8
|
+
metadata: "{\"schema_version\":6,\"version\":\"1.0.0\",\"type\":\"capability\",\"category\":\"quality\",\"domain\":\"quality/accessibility\",\"scope\":\"portable\",\"owner\":\"skill-graph-maintainer\",\"freshness\":\"2026-04-18\",\"drift_check\":\"{\\\\\\\"last_verified\\\\\\\":\\\\\\\"2026-04-18\\\\\\\"}\",\"eval_artifacts\":\"present\",\"eval_state\":\"passing\",\"routing_eval\":\"present\",\"stability\":\"experimental\",\"keywords\":\"[\\\\\\\"accessibility\\\\\\\",\\\\\\\"a11y\\\\\\\",\\\\\\\"keyboard navigation\\\\\\\",\\\\\\\"screen reader\\\\\\\",\\\\\\\"focus management\\\\\\\",\\\\\\\"keyboard not working\\\\\\\",\\\\\\\"tab order\\\\\\\",\\\\\\\"missing aria label\\\\\\\",\\\\\\\"screen reader says\\\\\\\",\\\\\\\"reduced motion\\\\\\\",\\\\\\\"high contrast\\\\\\\",\\\\\\\"semantic html\\\\\\\",\\\\\\\"form labels\\\\\\\",\\\\\\\"form fields\\\\\\\",\\\\\\\"aria-label\\\\\\\",\\\\\\\"assistive tech\\\\\\\",\\\\\\\"assistive technology\\\\\\\",\\\\\\\"accessible labels\\\\\\\",\\\\\\\"proper labels\\\\\\\"]\",\"triggers\":\"[\\\\\\\"a11y-skill\\\\\\\"]\",\"paths\":\"[\\\\\\\"**/*.{html,tsx,jsx,vue,svelte}\\\\\\\",\\\\\\\"**/*.css\\\\\\\",\\\\\\\"!**/*.test.{ts,tsx,js,jsx}\\\\\\\",\\\\\\\"!**/dist/**\\\\\\\",\\\\\\\"!**/node_modules/**\\\\\\\"]\",\"examples\":\"[\\\\\\\"this modal is keyboard-trapped — users can't Escape to close it\\\\\\\",\\\\\\\"screen reader doesn't announce when the form validation state changes\\\\\\\",\\\\\\\"add proper labels to these form fields so assistive tech can read them\\\\\\\",\\\\\\\"review this dropdown menu for arrow-key navigation and focus return\\\\\\\"]\",\"anti_examples\":\"[\\\\\\\"rewrite this error message at a 6th-grade reading level\\\\\\\",\\\\\\\"clean up this accessibility code without changing how it behaves\\\\\\\"]\",\"relations\":\"{\\\\\\\"boundary\\\\\\\":[{\\\\\\\"skill\\\\\\\":\\\\\\\"refactor\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"refactor is behavior-preserving code modification; a11y is observable user-facing behavior\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"diagnosis\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"diagnosis classifies failure symptoms (Logic / Runtime / Performance / etc.) for triage; a11y owns assistive-tech behavior. The phrase 'rewrite this error message...' is a documentation/UX concern, not a diagnosis or a11y concern — diagnosis is named here so the router excludes it from a11y's positive scope.\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"visual-design-foundations\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"visual-design-foundations owns palette, typography, spacing, and visual craft; a11y owns whether the resulting interaction is perceivable, operable, understandable, and robust\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"interaction-feedback\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"interaction-feedback owns feedback-state staging; a11y owns whether those state changes are announced and operable\\\\\\\"}],\\\\\\\"related\\\\\\\":[\\\\\\\"interaction-patterns\\\\\\\",\\\\\\\"form-ux-architecture\\\\\\\",\\\\\\\"interaction-feedback\\\\\\\",\\\\\\\"design-system-architecture\\\\\\\"],\\\\\\\"verify_with\\\\\\\":[\\\\\\\"testing-strategy\\\\\\\"]}\",\"portability\":\"{\\\\\\\"readiness\\\\\\\":\\\\\\\"scripted\\\\\\\",\\\\\\\"targets\\\\\\\":[\\\\\\\"skill-md\\\\\\\"]}\",\"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/a11y/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/a11y/SKILL.md
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Accessibility
|
|
16
|
+
|
|
17
|
+
## Coverage
|
|
18
|
+
|
|
19
|
+
- Semantic HTML: choosing the right primitive elements so structure is meaningful to assistive technology
|
|
20
|
+
- Keyboard access: making every interaction reachable and operable without a pointing device
|
|
21
|
+
- Focus management: keeping focus visible, predictable, and correctly placed after navigation and state changes
|
|
22
|
+
- Labeling and naming: ensuring every interactive element has a programmatic name that matches its visible label
|
|
23
|
+
- State and change announcement: communicating dynamic updates (loading, errors, success) to assistive technology
|
|
24
|
+
- Reduced-motion and high-contrast preferences: respecting user settings that affect interaction perception
|
|
25
|
+
|
|
26
|
+
## Philosophy
|
|
27
|
+
|
|
28
|
+
Accessible interaction is structural, not cosmetic. It is decided by the primitive you picked, the focus order you wrote, and the label that ships or doesn't — not by the audit that runs after. Teams that treat accessibility as a finishing pass pay for it twice: once in remediation work that was cheaper to avoid, and again when assistive-technology users hit the failure and bounce. The correct default is to build with those users in scope from the first commit, not after the first lawsuit.
|
|
29
|
+
|
|
30
|
+
## Primitive Selection
|
|
31
|
+
|
|
32
|
+
The single highest-leverage accessibility decision is picking the right HTML primitive before styling. A wrong primitive cannot be rescued by ARIA; the right primitive usually needs no ARIA at all.
|
|
33
|
+
|
|
34
|
+
| User intent | Correct primitive | Wrong primitives (common mistakes) |
|
|
35
|
+
| ------------------------------------ | ----------------------------------------------- | ------------------------------------------------------- |
|
|
36
|
+
| Trigger an action on the same page | `<button type="button">` | `<a href="#">`, `<div onclick>`, `<span role="button">` |
|
|
37
|
+
| Navigate to a different URL | `<a href="…">` | `<button onclick=navigate>`, `<div onclick>` |
|
|
38
|
+
| Group related form controls | `<fieldset>` + `<legend>` | `<div>` with a heading above it |
|
|
39
|
+
| Label a form control | `<label for="…">` (or wrapping `<label>`) | `<div>` text next to the input, `placeholder` only |
|
|
40
|
+
| Show a collapsible section | `<details>` + `<summary>` | `<div>` with JS toggle and no ARIA |
|
|
41
|
+
| Present tabular data | `<table>` + `<th scope="…">` | `<div>` grid, CSS grid with no semantic role |
|
|
42
|
+
| Announce a status change | `<output>` or `role="status"` live region | Toast that only renders visually |
|
|
43
|
+
| Interactive widget not covered above | Native element + tested keyboard + ARIA pattern | Custom `<div>` with ad-hoc `role` and handlers |
|
|
44
|
+
|
|
45
|
+
### When ARIA is appropriate
|
|
46
|
+
|
|
47
|
+
Only when no native primitive fits the interaction, and only when you also ship the keyboard behavior that matches the role. Adding `role="button"` to a `<div>` without Enter/Space handlers is worse than either the correct `<button>` or the untyped `<div>` alone.
|
|
48
|
+
|
|
49
|
+
## Evals
|
|
50
|
+
|
|
51
|
+
This skill ships a comprehension-eval artifact at [`examples/evals/a11y.json`](https://github.com/jacob-balslev/skill-graph/blob/main/examples/evals/a11y.json). The `Verification` checklist below is the authoring gate for a new interactive component; the eval file is how this skill is graded by `scripts/skill-audit.js --graded`. Do not conflate them — the checklist is for implementers, the eval is for the grader.
|
|
52
|
+
|
|
53
|
+
## Verification
|
|
54
|
+
|
|
55
|
+
- [ ] Interactive elements use the right semantic primitives
|
|
56
|
+
- [ ] Keyboard-only flows remain usable
|
|
57
|
+
- [ ] Focus is visible and lands in the correct place
|
|
58
|
+
- [ ] Labels and state changes are perceivable
|
|
59
|
+
- [ ] User preferences (reduced motion, high contrast) are respected
|
|
60
|
+
|
|
61
|
+
## Do NOT Use When
|
|
62
|
+
|
|
63
|
+
| Use instead | When |
|
|
64
|
+
| --------------- | -------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `documentation` | The task is prose structure or reading-level clarity, not interaction accessibility |
|
|
66
|
+
| `refactor` | The task is behavior-preserving code cleanup — refactoring does not change what assistive tech perceives |
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: acid-fundamentals
|
|
3
|
+
description: "Use when reasoning about the four ACID properties of database transactions — Atomicity, Consistency, Isolation, Durability — as foundational concepts beneath any transactional system: what each property formally guarantees, the difference between the property the database claims and the property the application gets (depending on isolation level, replication mode, and configuration), the relationship between ACID and BASE (the alternative model in many NoSQL systems), why 'C' is the most contested letter (database consistency vs application invariants), and the historical record (Härder & Reuter 1983, the Gray-Reuter transaction model, Gray's Turing lecture). Do NOT use for choosing isolation levels for a specific workload (use transaction-isolation), distributed-system CAP tradeoffs (use cap-theorem-tradeoffs), database query design (use query-optimization), or zero-downtime migration mechanics (use database-migration)."
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: Read Grep
|
|
6
|
+
metadata:
|
|
7
|
+
metadata: "{\"schema_version\":6,\"version\":\"1.0.0\",\"type\":\"capability\",\"category\":\"engineering\",\"domain\":\"engineering/data\",\"scope\":\"reference\",\"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\":\"[\\\\\\\"ACID\\\\\\\",\\\\\\\"atomicity\\\\\\\",\\\\\\\"consistency\\\\\\\",\\\\\\\"isolation\\\\\\\",\\\\\\\"durability\\\\\\\",\\\\\\\"transaction\\\\\\\",\\\\\\\"BASE\\\\\\\",\\\\\\\"Härder Reuter\\\\\\\",\\\\\\\"Gray transaction model\\\\\\\",\\\\\\\"transactional guarantee\\\\\\\"]\",\"triggers\":\"[\\\\\\\"is this database ACID\\\\\\\",\\\\\\\"what does consistency mean\\\\\\\",\\\\\\\"ACID vs BASE\\\\\\\",\\\\\\\"is my transaction atomic\\\\\\\",\\\\\\\"what's the durability guarantee\\\\\\\"]\",\"examples\":\"[\\\\\\\"explain what ACID guarantees a database does and does not provide to the application\\\\\\\",\\\\\\\"decide whether ACID or BASE is the right model for a new system\\\\\\\",\\\\\\\"diagnose a data-loss incident — likely a durability or atomicity failure\\\\\\\",\\\\\\\"explain why the 'C' in ACID is not the same as application consistency\\\\\\\"]\",\"anti_examples\":\"[\\\\\\\"choose an isolation level for a workload (use transaction-isolation)\\\\\\\",\\\\\\\"reason about availability vs consistency in a distributed system (use cap-theorem-tradeoffs)\\\\\\\",\\\\\\\"design a database schema (use data-modeling)\\\\\\\"]\",\"relations\":\"{\\\\\\\"related\\\\\\\":[\\\\\\\"transaction-isolation\\\\\\\",\\\\\\\"cap-theorem-tradeoffs\\\\\\\",\\\\\\\"data-modeling\\\\\\\",\\\\\\\"replication-patterns\\\\\\\"],\\\\\\\"boundary\\\\\\\":[{\\\\\\\"skill\\\\\\\":\\\\\\\"transaction-isolation\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"transaction-isolation owns the choice and semantics of isolation levels (read uncommitted, read committed, repeatable read, serializable, snapshot) — the 'I' of ACID specifically as a tunable. This skill owns ACID as the four-property foundational frame; transaction-isolation owns one of the four in operational depth.\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"cap-theorem-tradeoffs\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"cap-theorem-tradeoffs owns the distributed-systems frame (consistency, availability, partition tolerance) which uses 'consistency' in a different sense than the C in ACID. This skill owns the single-system transactional frame; cap-theorem-tradeoffs owns the distributed frame; conflating them is the most common misconception in this space.\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"data-modeling\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"data-modeling owns schema design and entity structure; this skill owns the transactional-guarantee semantics that any data model relies on at runtime.\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"replication-patterns\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"replication-patterns owns the patterns for keeping multiple replicas in agreement; this skill owns the single-node transactional model from which distributed replication is a generalization (and often a relaxation of).\\\\\\\"}],\\\\\\\"verify_with\\\\\\\":[\\\\\\\"transaction-isolation\\\\\\\",\\\\\\\"cap-theorem-tradeoffs\\\\\\\"]}\",\"mental_model\":\"|\",\"purpose\":\"|\",\"boundary\":\"|\",\"analogy\":\"ACID is to a database transaction what the four corners of a legal contract are to an agreement — Atomicity is the signing block (all parties sign together or no contract exists), Consistency is the boilerplate clauses (every clause must be satisfied for the contract to be valid), Isolation is the negotiating-room rule (other negotiations cannot read your draft until both sides initial each page), and Durability is the safe in the law office (once signed, the contract survives the office burning down).\",\"misconception\":\"|\",\"concept\":\"{\\\\\\\"definition\\\\\\\":\\\\\\\"ACID is the acronym for four properties that a database transaction either provides or does not provide, defining the contract between the database and the application using it: Atomicity (the transaction either entirely happens or entirely does not — there is no partial state visible after a failure), Consistency (the transaction takes the database from one valid state to another valid state per the database's defined integrity constraints), Isolation (concurrent transactions do not see each other's intermediate states; each transaction observes the database as if it were the only transaction), Durability (once the transaction commits, its effects survive any subsequent failure including power loss). The four properties were codified by Härder and Reuter (1983) based on Jim Gray's earlier transaction model and have become the foundational vocabulary for relational and many NoSQL database systems. The strategic value of the ACID frame is that it names the four orthogonal guarantees the application can rely on, so that when a database advertises 'ACID compliance' or claims to relax some property, the conversation has precise vocabulary.\\\\\\\",\\\\\\\"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/acid-fundamentals/SKILL.md\"}"
|
|
8
|
+
skill_graph_source_repo: "https://github.com/jacob-balslev/skill-graph"
|
|
9
|
+
skill_graph_protocol: Skill Metadata Protocol v4
|
|
10
|
+
skill_graph_project: Skill Graph
|
|
11
|
+
skill_graph_canonical_skill: skills/acid-fundamentals/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# ACID Fundamentals
|
|
15
|
+
|
|
16
|
+
## Coverage
|
|
17
|
+
|
|
18
|
+
The four foundational transactional properties — Atomicity, Consistency, Isolation, Durability — that define the contract between a database and the application using it. Covers what each property formally guarantees, the implementation mechanisms underneath each (write-ahead logging for atomicity; locking and MVCC for isolation; constraint checking for consistency; synchronous storage flush for durability), the configuration-dependent strength of each property, the BASE alternative model for systems that trade ACID guarantees for availability, the C-of-ACID vs C-of-CAP distinction that is the most-frequently-confused concept in the space, and the historical record from Gray's transaction model through Härder & Reuter's 1983 formalization.
|
|
19
|
+
|
|
20
|
+
## Philosophy
|
|
21
|
+
|
|
22
|
+
ACID is the precise vocabulary the database industry uses to describe transactional guarantees. Before ACID, claims were vague; after ACID, a system's behavior on each of four orthogonal axes is the conversation. The strategic value of the frame is *not* the acronym itself but the discipline of asking, for any database in any configuration, what each property actually guarantees and what the application can rely on.
|
|
23
|
+
|
|
24
|
+
The frame's defining property is that it names four *orthogonal* axes. A system can be atomic without being isolated; it can be durable without being consistent in the CAP sense; it can be consistent (database constraints satisfied) without being consistent across replicas. The four-letter frame is not a one-dimensional rating; it is a vector.
|
|
25
|
+
|
|
26
|
+
The discipline is in the configuration. "Postgres is ACID" is a vague claim; "Postgres at read committed isolation with synchronous_commit on with foreign-key constraints enforced gives us A, I (at read-committed level), D, and C" is the precise statement. Knowing what your specific database guarantees in your specific configuration is operational hygiene; assuming the default is a class of incident.
|
|
27
|
+
|
|
28
|
+
## The Four Properties — Precise Definitions
|
|
29
|
+
|
|
30
|
+
| Property | Guarantee | Implementation |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Atomicity | All-or-nothing per transaction; no partial state visible after failure | Write-ahead logging + rollback/redo |
|
|
33
|
+
| Consistency | Database integrity constraints satisfied across the transaction | Foreign keys, NOT NULL, unique indexes, CHECK constraints, triggers |
|
|
34
|
+
| Isolation | Concurrent transactions appear serialized | Locking, MVCC, serializable snapshot isolation |
|
|
35
|
+
| Durability | Committed effects survive failure | Synchronous WAL flush, replication to durable storage |
|
|
36
|
+
|
|
37
|
+
Each property is graded. Atomicity is essentially binary. Isolation has five+ levels (see `transaction-isolation`). Durability has multiple configurations (local sync, local async, replicated sync, quorum). Consistency has database-level rules vs application-level rules.
|
|
38
|
+
|
|
39
|
+
## The Two C's — ACID vs CAP
|
|
40
|
+
|
|
41
|
+
| Property | What it means | Example |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| ACID Consistency | Database integrity constraints satisfied | FK reference resolves; UNIQUE constraint holds |
|
|
44
|
+
| CAP Consistency | All replicas agree on the current value | All replicas return the same balance for account #1234 |
|
|
45
|
+
|
|
46
|
+
A database can be ACID-Consistent and CAP-Inconsistent (constraints hold; replicas disagree). A database can be CAP-Consistent and ACID-Inconsistent (replicas agree; foreign key was violated). They are different concepts with the same letter and are the most-confused pair in the space.
|
|
47
|
+
|
|
48
|
+
## ACID vs BASE
|
|
49
|
+
|
|
50
|
+
| Property | ACID | BASE |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| A | Atomicity per transaction | Basically Available |
|
|
53
|
+
| C | Database-level Consistency | Soft state |
|
|
54
|
+
| I | Isolation between concurrent transactions | (no I in BASE) |
|
|
55
|
+
| D | Durability | Eventually consistent |
|
|
56
|
+
| Trade | Strong guarantees, limited throughput/availability under partition | High throughput/availability, weaker correctness guarantees |
|
|
57
|
+
| Typical use | Transactional cores: orders, payments, accounts | High-throughput non-transactional: streams, analytics, caches |
|
|
58
|
+
| Examples | Postgres, Oracle, SQL Server, MongoDB transactions | Cassandra, Riak (default), DynamoDB (default) |
|
|
59
|
+
|
|
60
|
+
Most production architectures use both, picking per component.
|
|
61
|
+
|
|
62
|
+
## Configuration Matters
|
|
63
|
+
|
|
64
|
+
Three configuration knobs that change what your database actually guarantees:
|
|
65
|
+
|
|
66
|
+
| Knob | Default in Postgres | Effect when changed |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `synchronous_commit` | `on` (durable) | `off` → commit acknowledged before WAL flush; last few commits lost on crash |
|
|
69
|
+
| Isolation level | `read committed` | `serializable` is strongest; `read uncommitted` allows dirty reads |
|
|
70
|
+
| Replication mode | none | Synchronous replication = D guarantees include replica; async = primary-only |
|
|
71
|
+
|
|
72
|
+
Knowing your production configuration — not assuming the default — is operational hygiene.
|
|
73
|
+
|
|
74
|
+
## Verification
|
|
75
|
+
|
|
76
|
+
After applying this skill, verify:
|
|
77
|
+
- [ ] The team can name what each ACID property guarantees and what it does not, distinct from the CAP properties.
|
|
78
|
+
- [ ] The current database's configuration is known: isolation level, durability config, replication mode. The team is not relying on assumed defaults.
|
|
79
|
+
- [ ] ACID's C and CAP's C are distinguished in design discussions. Using "consistency" without qualifier produces confused decisions.
|
|
80
|
+
- [ ] Application-level invariants (business rules) are recognized as the application's responsibility, not delegated to the database's ACID consistency.
|
|
81
|
+
- [ ] For systems that mix ACID and BASE components, the boundary is explicit: which data lives in which model and why.
|
|
82
|
+
- [ ] Cross-transaction atomicity (sagas, two-phase commit) is recognized as a different problem from in-transaction atomicity. ACID does not solve cross-transaction coordination.
|
|
83
|
+
- [ ] Production incidents that involve data loss or corruption are diagnosed against the specific ACID property that failed — and against the configuration that determined the failure boundary.
|
|
84
|
+
|
|
85
|
+
## Do NOT Use When
|
|
86
|
+
|
|
87
|
+
| Instead of this skill | Use | Why |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| Choosing an isolation level for a specific workload | `transaction-isolation` | transaction-isolation owns the I axis in operational depth |
|
|
90
|
+
| Reasoning about replica agreement, availability under partition | `cap-theorem-tradeoffs` | CAP is the distributed-systems frame; this is the single-system frame |
|
|
91
|
+
| Designing the database schema or entity model | `data-modeling` | data-modeling owns design; this owns runtime guarantees |
|
|
92
|
+
| Applying a zero-downtime migration | `database-migration` | database-migration owns migration mechanics |
|
|
93
|
+
| Designing patterns for replicated systems | `replication-patterns` | replication is the operational layer above single-node ACID |
|
|
94
|
+
| Choosing between ACID and BASE for a new system | `cap-theorem-tradeoffs` + this skill | cap-theorem provides the distributed frame; this provides the transactional frame |
|
|
95
|
+
|
|
96
|
+
## Key Sources
|
|
97
|
+
|
|
98
|
+
- Härder, T., & Reuter, A. (1983). ["Principles of Transaction-Oriented Database Recovery"](https://dl.acm.org/doi/10.1145/289.291). *ACM Computing Surveys*, 15(4), 287-317. The canonical paper that coined the ACID acronym and consolidated the transaction model.
|
|
99
|
+
- Gray, J. (1981). ["The Transaction Concept: Virtues and Limitations"](https://jimgray.azurewebsites.net/papers/thetransactionconcept.pdf). *VLDB 1981*. The foundational paper on the transaction concept that Härder & Reuter built on.
|
|
100
|
+
- Gray, J., & Reuter, A. (1992). *Transaction Processing: Concepts and Techniques*. Morgan Kaufmann. The canonical textbook on transaction processing; deep treatment of all four ACID properties and their implementation.
|
|
101
|
+
- Kleppmann, M. (2017). *Designing Data-Intensive Applications*. O'Reilly. Chapter 7 (Transactions) provides modern practitioner treatment of ACID, BASE, and the configuration-dependent nature of transactional guarantees.
|
|
102
|
+
- PostgreSQL Global Development Group. ["PostgreSQL Documentation — Transaction Isolation"](https://www.postgresql.org/docs/current/transaction-iso.html). Reference for Postgres's specific implementation of isolation levels and the durability/consistency configuration surface.
|
|
103
|
+
- Pritchett, D. (2008). ["BASE: An Acid Alternative"](https://queue.acm.org/detail.cfm?id=1394128). *ACM Queue*. The canonical practitioner essay defining BASE as the alternative model for high-throughput distributed systems.
|
|
104
|
+
- Bailis, P., & Ghodsi, A. (2013). ["Eventual Consistency Today: Limitations, Extensions, and Beyond"](https://queue.acm.org/detail.cfm?id=2462076). *ACM Queue*. Modern treatment of the consistency models on the BASE side, including extensions to eventual consistency.
|
|
105
|
+
- Brewer, E. (2012). ["CAP Twelve Years Later: How the 'Rules' Have Changed"](https://ieeexplore.ieee.org/document/6133253). *IEEE Computer*, 45(2), 23-29. Brewer's revisit of CAP; useful for grounding the ACID-vs-CAP distinction.
|
|
106
|
+
- Berenson, H., Bernstein, P., Gray, J., Melton, J., O'Neil, E., & O'Neil, P. (1995). ["A Critique of ANSI SQL Isolation Levels"](https://dl.acm.org/doi/10.1145/568271.223785). *SIGMOD 1995*. Foundational paper on the practical issues with isolation-level definitions; required reading for understanding the I axis.
|