@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.
Files changed (330) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/LICENSE +200 -0
  3. package/NOTICE +62 -0
  4. package/README.md +398 -0
  5. package/SKILL_GRAPH.md +443 -0
  6. package/bin/skill-graph.js +374 -0
  7. package/docs/ADOPTION.md +117 -0
  8. package/docs/CONFORMANCE.md +66 -0
  9. package/docs/PRIMER.md +384 -0
  10. package/docs/QUICKSTART-30MIN.md +333 -0
  11. package/docs/ROUTING-METRICS.md +120 -0
  12. package/docs/SKILL-MD-FORMAT-COMPATIBILITY.md +127 -0
  13. package/docs/SKILL_AUDIT_CHECKLIST.md +199 -0
  14. package/docs/SKILL_AUDIT_LOOP.md +195 -0
  15. package/docs/SKILL_METADATA_PROTOCOL.md +609 -0
  16. package/docs/_archived/marketplace-publication-priority-2026-05-18.md +239 -0
  17. package/docs/adr/0001-predicate-set.md +69 -0
  18. package/docs/adr/0002-json-ld-context.md +82 -0
  19. package/docs/adr/0003-ontoclean-rigidity-tags.md +65 -0
  20. package/docs/adr/0004-persistent-identifiers.md +74 -0
  21. package/docs/adr/0005-freshness-consolidation.md +70 -0
  22. package/docs/adr/0006-revise-predicate-rename.md +105 -0
  23. package/docs/adr/0007-audit-loop-cadence.md +99 -0
  24. package/docs/adr/0008-skill-surface-split-and-curation-policy.md +93 -0
  25. package/docs/category-consumers.md +168 -0
  26. package/docs/concept-map.md +194 -0
  27. package/docs/diagrams/drift-states.mmd +21 -0
  28. package/docs/diagrams/manifest-pipeline.mmd +25 -0
  29. package/docs/diagrams/routing-harness.mmd +41 -0
  30. package/docs/diagrams/starter-graph.mmd +53 -0
  31. package/docs/field-decision-guide.md +315 -0
  32. package/docs/field-rationale.md +211 -0
  33. package/docs/field-reference.generated.md +624 -0
  34. package/docs/field-reference.md +1426 -0
  35. package/docs/glossary.md +190 -0
  36. package/docs/head-noun-glossary.md +63 -0
  37. package/docs/images/audit-phases.png +0 -0
  38. package/docs/images/drift-states.png +0 -0
  39. package/docs/images/graded-mode.png +0 -0
  40. package/docs/images/manifest-pipeline.png +0 -0
  41. package/docs/images/routing-harness.png +0 -0
  42. package/docs/images/skill-anatomy.png +0 -0
  43. package/docs/images/starter-graph.png +0 -0
  44. package/docs/images/system-model.png +0 -0
  45. package/docs/integrations/github-actions.md +155 -0
  46. package/docs/manifest-field-mapping.md +443 -0
  47. package/docs/marketplace-publication-queue.generated.md +240 -0
  48. package/docs/marketplace-release-agent-prompt.md +82 -0
  49. package/docs/marketplace-skill-candidate-list.md +272 -0
  50. package/docs/marketplace-syndication.md +222 -0
  51. package/docs/migration-sample-review.md +155 -0
  52. package/docs/migrations/v4-to-v5.md +168 -0
  53. package/docs/migrations/v5-to-v6.md +221 -0
  54. package/docs/name-exceptions.yaml +37 -0
  55. package/docs/plans/marketplace-p1-public-migration-plan.md +41 -0
  56. package/docs/plans/multi-root-workspace.md +148 -0
  57. package/docs/plans/scripts-roadmap.md +107 -0
  58. package/docs/plans/v4-schema-bump.md +160 -0
  59. package/docs/plans/wave-2-extraction.md +122 -0
  60. package/docs/positioning-vs-marketplaces.md +175 -0
  61. package/docs/proposals/skill-audit-loop-positioning.md +160 -0
  62. package/docs/quality-doctrine.md +138 -0
  63. package/docs/recommended-skills.md +150 -0
  64. package/docs/research/skill-comprehension-eval-research.md +1830 -0
  65. package/docs/research/skill-retrieval-evidence.md +66 -0
  66. package/docs/skill-metadata-protocol.md +471 -0
  67. package/docs/skills-sh-maintainer-cleanup-request.md +80 -0
  68. package/examples/audits/a11y/findings.md +52 -0
  69. package/examples/audits/a11y/scorecard.md +21 -0
  70. package/examples/audits/a11y/verdict.md +44 -0
  71. package/examples/audits/debugging/findings.md +59 -0
  72. package/examples/audits/debugging/scorecard.md +22 -0
  73. package/examples/audits/debugging/verdict.md +33 -0
  74. package/examples/audits/documentation/findings.md +59 -0
  75. package/examples/audits/documentation/scorecard.md +22 -0
  76. package/examples/audits/documentation/verdict.md +33 -0
  77. package/examples/evals/a11y.json +140 -0
  78. package/examples/evals/api-design.json +52 -0
  79. package/examples/evals/code-review.json +52 -0
  80. package/examples/evals/data-modeling.json +52 -0
  81. package/examples/evals/database-migration.json +52 -0
  82. package/examples/evals/debugging.json +118 -0
  83. package/examples/evals/dependency-architecture.json +52 -0
  84. package/examples/evals/design-system-architecture.json +52 -0
  85. package/examples/evals/error-tracking.json +52 -0
  86. package/examples/evals/event-contract-design.json +52 -0
  87. package/examples/evals/form-ux-architecture.json +52 -0
  88. package/examples/evals/framework-fit-analysis.json +52 -0
  89. package/examples/evals/graph-audit.json +139 -0
  90. package/examples/evals/information-architecture.json +52 -0
  91. package/examples/evals/interaction-feedback.json +52 -0
  92. package/examples/evals/interaction-patterns.json +52 -0
  93. package/examples/evals/layout-composition.json +52 -0
  94. package/examples/evals/lint-overlay.json +117 -0
  95. package/examples/evals/microcopy.json +52 -0
  96. package/examples/evals/observability-modeling.json +52 -0
  97. package/examples/evals/pattern-recognition.json +96 -0
  98. package/examples/evals/performance-engineering.json +52 -0
  99. package/examples/evals/refactor.json +128 -0
  100. package/examples/evals/semiotics.json +52 -0
  101. package/examples/evals/skill-infrastructure.json +96 -0
  102. package/examples/evals/skill-router.json +140 -0
  103. package/examples/evals/skill-router.routing.json +113 -0
  104. package/examples/evals/system-interface-contracts.json +52 -0
  105. package/examples/evals/task-analysis.json +52 -0
  106. package/examples/evals/testing-strategy.json +118 -0
  107. package/examples/evals/type-safety.json +249 -0
  108. package/examples/evals/visual-design-foundations.json +52 -0
  109. package/examples/evals/webhook-integration.json +52 -0
  110. package/examples/exports/a11y.skill-md.md +80 -0
  111. package/examples/exports/debugging.skill-md.md +80 -0
  112. package/examples/exports/refactor.skill-md.md +78 -0
  113. package/examples/exports/testing-strategy.skill-md.md +81 -0
  114. package/examples/projects/markdown-static-site/README.md +115 -0
  115. package/examples/projects/markdown-static-site/skills/content-source-router/SKILL.md +131 -0
  116. package/examples/projects/markdown-static-site/skills/image-optimization-pipeline-config/SKILL.md +132 -0
  117. package/examples/projects/markdown-static-site/skills/link-rot-detection/SKILL.md +103 -0
  118. package/examples/projects/markdown-static-site/skills/markdown-post-frontmatter-validation/SKILL.md +133 -0
  119. package/examples/projects/markdown-static-site/skills/migrate-posts-to-v2-frontmatter/SKILL.md +140 -0
  120. package/examples/projects/saas-stripe-postgres/README.md +208 -0
  121. package/examples/projects/saas-stripe-postgres/db/migrations/0004_canonicalize_orders.sql +37 -0
  122. package/examples/projects/saas-stripe-postgres/db/schema.sql +112 -0
  123. package/examples/projects/saas-stripe-postgres/skills/migrate-orders-to-canonical-schema/SKILL.md +149 -0
  124. package/examples/projects/saas-stripe-postgres/skills/nextjs-server-action-validation/SKILL.md +154 -0
  125. package/examples/projects/saas-stripe-postgres/skills/payment-provider-router/SKILL.md +153 -0
  126. package/examples/projects/saas-stripe-postgres/skills/postgres-rls-pattern/SKILL.md +163 -0
  127. package/examples/projects/saas-stripe-postgres/skills/stripe-webhook-signature-verification/SKILL.md +137 -0
  128. package/examples/protocol/skill-metadata-template.md +301 -0
  129. package/examples/protocol/skills.manifest.sample.json +13245 -0
  130. package/examples/skill-metadata-template.md +317 -0
  131. package/examples/skills.manifest.sample.json +13519 -0
  132. package/examples/tests/v3-1-skos-fixture/SKILL.md +93 -0
  133. package/marketplace/README.md +17 -0
  134. package/marketplace/skills/a11y/SKILL.md +66 -0
  135. package/marketplace/skills/acid-fundamentals/SKILL.md +106 -0
  136. package/marketplace/skills/agent-engineering/SKILL.md +386 -0
  137. package/marketplace/skills/agent-eval-design/SKILL.md +55 -0
  138. package/marketplace/skills/ai-native-development/SKILL.md +294 -0
  139. package/marketplace/skills/api-design/SKILL.md +60 -0
  140. package/marketplace/skills/architecture-decision-records/SKILL.md +55 -0
  141. package/marketplace/skills/background-jobs/SKILL.md +265 -0
  142. package/marketplace/skills/bounded-context-mapping/SKILL.md +55 -0
  143. package/marketplace/skills/cap-theorem-tradeoffs/SKILL.md +127 -0
  144. package/marketplace/skills/client-server-boundary/SKILL.md +187 -0
  145. package/marketplace/skills/code-review/SKILL.md +120 -0
  146. package/marketplace/skills/color-system-design/SKILL.md +43 -0
  147. package/marketplace/skills/component-architecture/SKILL.md +126 -0
  148. package/marketplace/skills/compression/SKILL.md +112 -0
  149. package/marketplace/skills/conceptual-modeling/SKILL.md +181 -0
  150. package/marketplace/skills/connection-pooling/SKILL.md +105 -0
  151. package/marketplace/skills/constraint-awareness/SKILL.md +287 -0
  152. package/marketplace/skills/content-monitor/SKILL.md +209 -0
  153. package/marketplace/skills/context-engineering/SKILL.md +320 -0
  154. package/marketplace/skills/context-graph/SKILL.md +174 -0
  155. package/marketplace/skills/context-management/SKILL.md +174 -0
  156. package/marketplace/skills/context-window/SKILL.md +239 -0
  157. package/marketplace/skills/contract-testing/SKILL.md +120 -0
  158. package/marketplace/skills/cron-scheduling/SKILL.md +223 -0
  159. package/marketplace/skills/dark-mode-implementation/SKILL.md +47 -0
  160. package/marketplace/skills/data-modeling/SKILL.md +59 -0
  161. package/marketplace/skills/data-modeling-fundamentals/SKILL.md +117 -0
  162. package/marketplace/skills/database-migration/SKILL.md +429 -0
  163. package/marketplace/skills/debugging/SKILL.md +67 -0
  164. package/marketplace/skills/dependency-architecture/SKILL.md +58 -0
  165. package/marketplace/skills/design-module-composition/SKILL.md +43 -0
  166. package/marketplace/skills/design-system-architecture/SKILL.md +61 -0
  167. package/marketplace/skills/design-thinking/SKILL.md +44 -0
  168. package/marketplace/skills/diagnosis/SKILL.md +296 -0
  169. package/marketplace/skills/diff-analysis/SKILL.md +188 -0
  170. package/marketplace/skills/e2e-test-design/SKILL.md +113 -0
  171. package/marketplace/skills/entity-relationship-modeling/SKILL.md +218 -0
  172. package/marketplace/skills/epistemic-grounding/SKILL.md +112 -0
  173. package/marketplace/skills/error-boundary/SKILL.md +235 -0
  174. package/marketplace/skills/error-tracking/SKILL.md +261 -0
  175. package/marketplace/skills/eval-driven-development/SKILL.md +147 -0
  176. package/marketplace/skills/evaluation/SKILL.md +113 -0
  177. package/marketplace/skills/event-contract-design/SKILL.md +60 -0
  178. package/marketplace/skills/event-storming/SKILL.md +56 -0
  179. package/marketplace/skills/form-ux-architecture/SKILL.md +60 -0
  180. package/marketplace/skills/framework-fit-analysis/SKILL.md +59 -0
  181. package/marketplace/skills/frontend-architecture/SKILL.md +43 -0
  182. package/marketplace/skills/generative-ui/SKILL.md +118 -0
  183. package/marketplace/skills/graph-audit/SKILL.md +81 -0
  184. package/marketplace/skills/guardrails/SKILL.md +118 -0
  185. package/marketplace/skills/hooks-patterns/SKILL.md +185 -0
  186. package/marketplace/skills/http-semantics/SKILL.md +136 -0
  187. package/marketplace/skills/ideation/SKILL.md +41 -0
  188. package/marketplace/skills/indexing-strategy/SKILL.md +108 -0
  189. package/marketplace/skills/information-architecture/SKILL.md +59 -0
  190. package/marketplace/skills/integration-test-design/SKILL.md +111 -0
  191. package/marketplace/skills/intent-recognition/SKILL.md +136 -0
  192. package/marketplace/skills/interaction-feedback/SKILL.md +59 -0
  193. package/marketplace/skills/interaction-patterns/SKILL.md +59 -0
  194. package/marketplace/skills/journey-mapping/SKILL.md +41 -0
  195. package/marketplace/skills/keywords/SKILL.md +213 -0
  196. package/marketplace/skills/knowledge-modeling/SKILL.md +232 -0
  197. package/marketplace/skills/layout-composition/SKILL.md +59 -0
  198. package/marketplace/skills/linguistics/SKILL.md +429 -0
  199. package/marketplace/skills/lint-overlay/SKILL.md +76 -0
  200. package/marketplace/skills/mental-models/SKILL.md +126 -0
  201. package/marketplace/skills/merge-queue/SKILL.md +94 -0
  202. package/marketplace/skills/methodology/SKILL.md +317 -0
  203. package/marketplace/skills/microcopy/SKILL.md +232 -0
  204. package/marketplace/skills/middleware-patterns/SKILL.md +363 -0
  205. package/marketplace/skills/mobile-responsive-ux/SKILL.md +287 -0
  206. package/marketplace/skills/mutation-testing/SKILL.md +112 -0
  207. package/marketplace/skills/naming-conventions/SKILL.md +112 -0
  208. package/marketplace/skills/observability-modeling/SKILL.md +59 -0
  209. package/marketplace/skills/ontology-modeling/SKILL.md +67 -0
  210. package/marketplace/skills/owasp-security/SKILL.md +153 -0
  211. package/marketplace/skills/pattern-recognition/SKILL.md +472 -0
  212. package/marketplace/skills/performance-budgets/SKILL.md +185 -0
  213. package/marketplace/skills/performance-engineering/SKILL.md +58 -0
  214. package/marketplace/skills/performance-testing/SKILL.md +125 -0
  215. package/marketplace/skills/printify/SKILL.md +42 -0
  216. package/marketplace/skills/prioritization/SKILL.md +118 -0
  217. package/marketplace/skills/problem-framing/SKILL.md +41 -0
  218. package/marketplace/skills/problem-locating-solving/SKILL.md +203 -0
  219. package/marketplace/skills/project-knowledge-extraction/SKILL.md +54 -0
  220. package/marketplace/skills/prompt-craft/SKILL.md +134 -0
  221. package/marketplace/skills/prompt-injection-defense/SKILL.md +132 -0
  222. package/marketplace/skills/property-based-testing/SKILL.md +100 -0
  223. package/marketplace/skills/prototyping/SKILL.md +43 -0
  224. package/marketplace/skills/query-optimization/SKILL.md +144 -0
  225. package/marketplace/skills/real-time-updates/SKILL.md +324 -0
  226. package/marketplace/skills/ref-patterns/SKILL.md +284 -0
  227. package/marketplace/skills/refactor/SKILL.md +65 -0
  228. package/marketplace/skills/rendering-models/SKILL.md +142 -0
  229. package/marketplace/skills/replication-patterns/SKILL.md +110 -0
  230. package/marketplace/skills/research-synthesis/SKILL.md +41 -0
  231. package/marketplace/skills/route-handler-design/SKILL.md +347 -0
  232. package/marketplace/skills/schema-evolution/SKILL.md +140 -0
  233. package/marketplace/skills/security-fundamentals/SKILL.md +139 -0
  234. package/marketplace/skills/semantic-center/SKILL.md +194 -0
  235. package/marketplace/skills/semantic-relations/SKILL.md +250 -0
  236. package/marketplace/skills/semantics/SKILL.md +366 -0
  237. package/marketplace/skills/semiotics/SKILL.md +230 -0
  238. package/marketplace/skills/seo-strategy/SKILL.md +260 -0
  239. package/marketplace/skills/server-actions-design/SKILL.md +243 -0
  240. package/marketplace/skills/server-components-design/SKILL.md +190 -0
  241. package/marketplace/skills/sharding-strategy/SKILL.md +123 -0
  242. package/marketplace/skills/shopify/SKILL.md +42 -0
  243. package/marketplace/skills/skill-infrastructure/SKILL.md +320 -0
  244. package/marketplace/skills/skill-router/SKILL.md +71 -0
  245. package/marketplace/skills/skill-scaffold/SKILL.md +105 -0
  246. package/marketplace/skills/snapshot-testing/SKILL.md +120 -0
  247. package/marketplace/skills/spec-driven-development/SKILL.md +148 -0
  248. package/marketplace/skills/state-machine-modeling/SKILL.md +56 -0
  249. package/marketplace/skills/state-management/SKILL.md +134 -0
  250. package/marketplace/skills/streaming-architecture/SKILL.md +194 -0
  251. package/marketplace/skills/summarization/SKILL.md +156 -0
  252. package/marketplace/skills/suspense-patterns/SKILL.md +265 -0
  253. package/marketplace/skills/system-interface-contracts/SKILL.md +59 -0
  254. package/marketplace/skills/task-analysis/SKILL.md +201 -0
  255. package/marketplace/skills/taxonomy-design/SKILL.md +66 -0
  256. package/marketplace/skills/test-coverage-strategy/SKILL.md +108 -0
  257. package/marketplace/skills/test-doubles-design/SKILL.md +98 -0
  258. package/marketplace/skills/test-driven-development/SKILL.md +96 -0
  259. package/marketplace/skills/testing-strategy/SKILL.md +67 -0
  260. package/marketplace/skills/theme-system-design/SKILL.md +43 -0
  261. package/marketplace/skills/tool-call-flow/SKILL.md +229 -0
  262. package/marketplace/skills/tool-call-strategy/SKILL.md +292 -0
  263. package/marketplace/skills/transaction-isolation/SKILL.md +98 -0
  264. package/marketplace/skills/type-safety/SKILL.md +177 -0
  265. package/marketplace/skills/typography-system/SKILL.md +43 -0
  266. package/marketplace/skills/usability-testing/SKILL.md +43 -0
  267. package/marketplace/skills/user-research/SKILL.md +43 -0
  268. package/marketplace/skills/vercel-composition-patterns/SKILL.md +157 -0
  269. package/marketplace/skills/version-control/SKILL.md +233 -0
  270. package/marketplace/skills/visual-design-foundations/SKILL.md +59 -0
  271. package/marketplace/skills/visual-hierarchy/SKILL.md +43 -0
  272. package/marketplace/skills/webhook-integration/SKILL.md +331 -0
  273. package/marketplace/skills/writing-humanizer/SKILL.md +380 -0
  274. package/package.json +67 -0
  275. package/schemas/manifest.schema.json +811 -0
  276. package/schemas/manifest.v2.schema.json +164 -0
  277. package/schemas/manifest.v3.schema.json +758 -0
  278. package/schemas/manifest.v4.schema.json +755 -0
  279. package/schemas/manifest.v5.schema.json +755 -0
  280. package/schemas/manifest.v6.schema.json +811 -0
  281. package/schemas/skill.context.jsonld +279 -0
  282. package/schemas/skill.schema.json +919 -0
  283. package/schemas/skill.v2.schema.json +201 -0
  284. package/schemas/skill.v3.schema.json +827 -0
  285. package/schemas/skill.v4.schema.json +822 -0
  286. package/schemas/skill.v5.schema.json +830 -0
  287. package/schemas/skill.v6.schema.json +946 -0
  288. package/schemas/vocabulary/keywords.json +180 -0
  289. package/schemas/vocabulary/workspace_tags.json +23 -0
  290. package/scripts/__tests__/migrate-skill-v2-to-v3.test.js +161 -0
  291. package/scripts/__tests__/migrate-skill-v3-to-v4.test.js +158 -0
  292. package/scripts/__tests__/test-export-parser-drift.js +149 -0
  293. package/scripts/__tests__/test-marketplace-export.js +114 -0
  294. package/scripts/__tests__/test-router-paths.js +82 -0
  295. package/scripts/__tests__/test-stability-promotion.js +244 -0
  296. package/scripts/__tests__/test-v3-1-alias-contract.js +109 -0
  297. package/scripts/__tests__/test-v3-1-skos-runtime.js +116 -0
  298. package/scripts/backfill-schema-version.js +198 -0
  299. package/scripts/build-field-reference.js +160 -0
  300. package/scripts/build-retrieval-baseline.js +511 -0
  301. package/scripts/check-markdown-links.js +211 -0
  302. package/scripts/check-protocol-consistency.js +979 -0
  303. package/scripts/export-marketplace-skills.js +610 -0
  304. package/scripts/export-skill.js +374 -0
  305. package/scripts/generate-manifest.js +787 -0
  306. package/scripts/lib/alias-contract.js +83 -0
  307. package/scripts/lib/audit-prompt-builder.js +771 -0
  308. package/scripts/lib/mock-grader.js +134 -0
  309. package/scripts/lib/parse-frontmatter.js +429 -0
  310. package/scripts/lib/roots.js +119 -0
  311. package/scripts/lint/check-archetype-sections.js +185 -0
  312. package/scripts/lint/check-category-enum.js +83 -0
  313. package/scripts/lint/check-routing-eval.js +146 -0
  314. package/scripts/lint/check-routing-quality.js +211 -0
  315. package/scripts/lint/check-stability-promotion.js +220 -0
  316. package/scripts/lint/format-code-frame.js +206 -0
  317. package/scripts/marketplace-install.js +125 -0
  318. package/scripts/migrate-category-to-enum.js +169 -0
  319. package/scripts/migrate-skill-v2-to-v3.js +424 -0
  320. package/scripts/migrate-skill-v3-to-v4.js +200 -0
  321. package/scripts/migrate-skill-v5-to-v6.js +304 -0
  322. package/scripts/restructure-by-category.js +85 -0
  323. package/scripts/seed-publication-classification.js +282 -0
  324. package/scripts/skill-audit.js +893 -0
  325. package/scripts/skill-graph-drift.js +483 -0
  326. package/scripts/skill-graph-route.js +766 -0
  327. package/scripts/skill-graph-routing-eval.js +393 -0
  328. package/scripts/skill-lint.js +1317 -0
  329. package/scripts/skill-overlap.js +213 -0
  330. package/scripts/verify-skill-md-export.js +201 -0
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: security-fundamentals
3
+ description: "Use when reasoning about the security properties any application must satisfy: threat modeling (assets, threats, adversaries, surfaces), Saltzer and Schroeder's eight design principles (1975), input validation discipline, authentication vs authorization, secrets handling, secure-by-default, least-privilege, the OWASP Top 10 as recurring vulnerability classes, and defense in depth. Covers cross-cutting decisions about trust boundaries, where validation belongs, where authn/authz checks live, and how to bound blast radius. Do NOT use for LLM-specific prompt-injection (use prompt-injection-defense), cryptographic primitive implementation (use vendor libs), security-scanning tools (use security-scanning), credential-encryption schemes (use credential-encryption), GDPR/regulatory compliance (use gdpr-compliance), or the social/organizational side of security (out of scope)."
4
+ license: MIT
5
+ allowed-tools: Read Grep
6
+ metadata:
7
+ metadata: "{\"schema_version\":6,\"version\":\"1.0.0\",\"type\":\"capability\",\"category\":\"quality\",\"domain\":\"quality/security\",\"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\":\"[\\\\\\\"security fundamentals\\\\\\\",\\\\\\\"threat modeling\\\\\\\",\\\\\\\"input validation\\\\\\\",\\\\\\\"authentication\\\\\\\",\\\\\\\"authorization\\\\\\\",\\\\\\\"authn\\\\\\\",\\\\\\\"authz\\\\\\\",\\\\\\\"least privilege\\\\\\\",\\\\\\\"defense in depth\\\\\\\",\\\\\\\"secure by default\\\\\\\",\\\\\\\"OWASP Top 10\\\\\\\",\\\\\\\"Saltzer and Schroeder\\\\\\\",\\\\\\\"secrets handling\\\\\\\",\\\\\\\"attack surface\\\\\\\",\\\\\\\"trust boundary\\\\\\\",\\\\\\\"principle of least privilege\\\\\\\"]\",\"triggers\":\"[\\\\\\\"is this secure\\\\\\\",\\\\\\\"where should validation happen\\\\\\\",\\\\\\\"authentication vs authorization\\\\\\\",\\\\\\\"what could go wrong here\\\\\\\",\\\\\\\"threat model\\\\\\\",\\\\\\\"OWASP\\\\\\\",\\\\\\\"do I need to check permissions here\\\\\\\"]\",\"examples\":\"[\\\\\\\"audit a route handler for authn, authz, and input validation\\\\\\\",\\\\\\\"decide where to validate inbound data when the same shape comes in through multiple endpoints\\\\\\\",\\\\\\\"decide whether a piece of data is a secret, a credential, or non-sensitive — and what handling each requires\\\\\\\",\\\\\\\"produce a threat model for a new feature before any code is written\\\\\\\"]\",\"anti_examples\":\"[\\\\\\\"implement HMAC verification for a Shopify webhook (use webhook-integration)\\\\\\\",\\\\\\\"configure a SAST scanner for the CI pipeline (use security-scanning)\\\\\\\",\\\\\\\"store an OAuth refresh token in an encrypted column (use credential-encryption)\\\\\\\",\\\\\\\"respond to a GDPR data-subject-access request (use gdpr-compliance)\\\\\\\",\\\\\\\"defend an LLM agent against prompt injection (use prompt-injection-defense)\\\\\\\"]\",\"relations\":\"{\\\\\\\"related\\\\\\\":[\\\\\\\"type-safety\\\\\\\",\\\\\\\"api-design\\\\\\\",\\\\\\\"http-semantics\\\\\\\",\\\\\\\"prompt-injection-defense\\\\\\\"],\\\\\\\"boundary\\\\\\\":[{\\\\\\\"skill\\\\\\\":\\\\\\\"type-safety\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"type-safety provides compile-time guarantees about the SHAPE of data inside the program; security-fundamentals provides the runtime discipline that decides what to trust and what to validate at the system's TRUST BOUNDARIES. The two compose: validate at the boundary, then trust the type inside.\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"api-design\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"api-design owns the external surface contract (endpoints, methods, schemas); this skill owns the security properties any such surface must enforce regardless of design choices (authn, authz, input validation, rate limiting).\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"prompt-injection-defense\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"prompt-injection-defense owns the LLM-specific threat class where untrusted text is interpreted as instructions by a model; this skill owns the general security framing that prompt injection specializes from. Prompt injection is one row in the OWASP LLM Top 10; this skill covers the broader discipline.\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"http-semantics\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"http-semantics owns the protocol-level meaning of methods, status codes, and headers; this skill owns the security properties that protocol must enforce at every endpoint (authn, authz, rate limiting, validation). They compose: HTTP gives the protocol; this skill gives the security discipline applied to it.\\\\\\\"}],\\\\\\\"verify_with\\\\\\\":[\\\\\\\"type-safety\\\\\\\",\\\\\\\"api-design\\\\\\\"]}\",\"mental_model\":\"|\",\"purpose\":\"|\",\"boundary\":\"|\",\"analogy\":\"Security fundamentals is to a software system what structural engineering is to a building — load-bearing walls, fire egress, electrical isolation, foundation depth are not features added after the building works; they are properties of the design from the first sketch, and retrofitting them costs ten times more and produces worse results than designing them in. A building that survives an earthquake does so because of decisions made at the structural-engineering stage, not because of decorations added later.\",\"misconception\":\"|\",\"concept\":\"{\\\\\\\"definition\\\\\\\":\\\\\\\"Security fundamentals are the cross-cutting design principles, threat-modeling discipline, and recurring vulnerability classes that determine whether a system can be trusted to handle data, identity, and authority safely under adversarial conditions. The discipline is upstream of any specific vulnerability or vendor tool: it asks 'what are we protecting,' 'from whom,' 'what could go wrong,' and 'what's the cost if it does' before any implementation choice is made. Security fundamentals are not a feature added after the system works; they are a property of the design from the first commit, encoded in trust boundaries, validation choices, default permissions, and the placement of authentication and authorization checks. The discipline acknowledges that perfect security is impossible (any system can be attacked given sufficient resources and time), so the goal is to make attacks expensive, traceable, and limited in blast radius — defense in depth rather than perimeter security, least privilege rather than convenience, secure defaults rather than opt-in protections.\\\\\\\",\\\\\\\"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/security-fundamentals/SKILL.md\",\"skill_graph_export_description\":\"shortened for Agent Skills 1024-character description limit; canonical source keeps the full routing contract\",\"skill_graph_canonical_description_length\":\"1212\"}"
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/security-fundamentals/SKILL.md
12
+ ---
13
+
14
+ # Security Fundamentals
15
+
16
+ ## Coverage
17
+
18
+ The cross-cutting design principles, threat-modeling discipline, and recurring vulnerability classes that determine whether a system can safely handle data, identity, and authority under adversarial conditions. Covers the foundational discipline upstream of any specific vulnerability or tool: Shostack's four threat-modeling questions, Saltzer and Schroeder's eight design principles (1975), trust boundaries, the authentication/authorization distinction, input validation as a boundary discipline, defense in depth, least privilege, and the OWASP Top 10 as a working enumeration of recurring failure classes. Does NOT cover the implementation of specific cryptographic primitives, the configuration of specific scanners, the regulatory artifacts of compliance regimes, the LLM-specific specialization to prompt injection, or the organizational/social side of security.
19
+
20
+ ## Philosophy
21
+
22
+ Security is a property of the design, not a feature added after the system works. The cost of designing security in is small; the cost of retrofitting it is order-of-magnitude larger and produces worse results. The discipline of security fundamentals is the discipline of paying these costs early — at the threat-modeling stage, at the trust-boundary stage, at the authentication-design stage — before the system has accumulated the structural debt that makes retrofitting expensive.
23
+
24
+ The discipline does not promise prevention of attacks. Any non-trivial system will be attacked; some attacks will succeed. The goal is to make attacks expensive, slow, traceable, and limited in blast radius. Every design choice is evaluated by what it costs the defender vs what it costs the attacker. Secure-by-default choices cost the defender slightly more code upfront but cost the attacker a working exploit; opt-in security features cost the defender nothing upfront but cost the attacker very little when the developer inevitably forgets. The discipline is the deliberate placement of costs on the attacker rather than the defender.
25
+
26
+ For agents writing code, the discipline is what lets the agent reason about a security-relevant change without having to read the entire system. An agent that knows the trust boundaries, the authn/authz distinction, and the input-validation discipline can look at a new endpoint and ask: 'where is this endpoint receiving data from?' 'Is the data validated at the boundary?' 'Is authentication checked?' 'Is authorization checked at the moment of the privileged action?' 'What's the blast radius if any of these fail?' These questions produce the right code without the agent having to recall every OWASP entry.
27
+
28
+ ## The Four Threat-Modeling Questions (Shostack)
29
+
30
+ | Question | What it produces | Common failure |
31
+ |---|---|---|
32
+ | **What are we working on?** | The system diagram, asset inventory, data classification, trust boundaries | Skipped; analysis proceeds against an unstated model |
33
+ | **What can go wrong?** | The threat list: STRIDE categories, attacker scenarios, abuse cases | Jumped to mitigation without enumerating threats |
34
+ | **What are we going to do about it?** | The mitigations: design choices, controls, monitoring | The bulk of effort goes here; without the first two, mitigations are random |
35
+ | **Did we do a good job?** | Verification: tests, reviews, ongoing monitoring | Declared without testing; threat model never revisited |
36
+
37
+ A team that answers all four iteratively, with each system change, is doing security fundamentals. A team that answers only three, or answers them once, is doing security theater.
38
+
39
+ ## Saltzer & Schroeder's Eight Principles (1975)
40
+
41
+ These predate every modern technology and remain canonical because they describe properties, not implementations.
42
+
43
+ | Principle | One-line gloss | What it forbids |
44
+ |---|---|---|
45
+ | **Economy of mechanism** | Keep it simple | Sprawling, complex security architectures with many components |
46
+ | **Fail-safe defaults** | Deny by default; permit by exception | "is_admin defaults to true" patterns |
47
+ | **Complete mediation** | Check every access; never cache "I checked this earlier" | First-request-only auth checks; trust-on-session |
48
+ | **Open design** | Don't depend on secrecy of the design (Kerckhoffs) | Security through obscurity; secret algorithms |
49
+ | **Separation of privilege** | Require multiple independent conditions for sensitive operations | Single-credential vault access for irreversible actions |
50
+ | **Least privilege** | Minimum permissions per entity | Service accounts with admin keys; over-scoped tokens |
51
+ | **Least common mechanism** | Minimize shared mechanism across users | Global state that leaks information between requests |
52
+ | **Psychological acceptability** | Security users will bypass is not security | Onerous policies that drive workarounds (sticky-note passwords) |
53
+
54
+ ## The Authn / Authz Distinction
55
+
56
+ | Concern | Question it answers | Verified by | Where it lives | When it runs |
57
+ |---|---|---|---|---|
58
+ | **Authentication** | "Who are you?" | Credentials (password, token, certificate, MFA) | Auth middleware, login flow | At session establishment |
59
+ | **Authorization** | "Are you allowed to do this?" | Policy against identity (RBAC, ABAC, ACLs) | At every privileged action | Every request to a protected resource |
60
+
61
+ Conflating these is the #1 issue in the OWASP Top 10. The pattern: authenticate at the entry point; authorize at every privileged action. Never short-circuit authorization on the basis of having a valid session.
62
+
63
+ ## Input Validation As Boundary Discipline
64
+
65
+ The pattern, in order:
66
+
67
+ 1. **Define expectations.** Every input has an explicit shape, range, and meaning expectation. Document it as a schema (Zod, JSON Schema, OpenAPI).
68
+ 2. **Validate at the boundary.** Validation happens at the entry point of the request, not three function calls in. The earlier validation fails, the less the system has done with bad data.
69
+ 3. **Parse, don't validate (Alexis King).** Convert the untrusted value into a typed, validated value once; trust the typed form everywhere downstream. This composes with `type-safety` — the type system carries the validation forward.
70
+ 4. **Treat validation failure as a response-shaped outcome.** Return a structured error (400 Bad Request with field-level detail) rather than throwing in the middle of business logic.
71
+ 5. **Log validation failures.** Repeated validation failures from a specific source may be probing for vulnerabilities; logged failures feed monitoring.
72
+
73
+ | Boundary | Untrusted source | Validation discipline |
74
+ |---|---|---|
75
+ | User → application | HTTP request bodies, form inputs, query params, headers | Schema-based parsing at the entry point |
76
+ | External API → application | Webhook payloads, third-party responses, OAuth callbacks | Signature verification + schema validation |
77
+ | Database → application | (Trust your DB, but validate cross-tenant) | Org-scoped queries; row-level security |
78
+ | Client → server (API) | API requests | Schema validation + authn + authz |
79
+ | Process boundary (microservices) | Inter-service calls | mTLS or signed tokens + schema validation |
80
+ | Untrusted file → application | Uploaded files | Type detection, size limits, sandbox parsing |
81
+ | LLM → application (tool calls) | Tool arguments produced by LLM | Treat as untrusted; validate against tool schema |
82
+
83
+ ## Defense In Depth — Layered Controls
84
+
85
+ | Layer | Purpose | Failure mode when missing |
86
+ |---|---|---|
87
+ | **Network** | Firewall, segmentation, WAF | Direct exposure of internal services to internet |
88
+ | **Identity** | Authn, MFA, SSO | Credential stuffing, account takeover |
89
+ | **Application authz** | RBAC/ABAC, per-action checks | Broken access control (OWASP A01) |
90
+ | **Input validation** | Schema parse, sanitize | Injection (OWASP A03) |
91
+ | **Data encryption** | At-rest, in-transit, end-to-end | Cryptographic failure (OWASP A02) |
92
+ | **Output encoding** | Escape on output (XSS, log forging) | XSS, log poisoning |
93
+ | **Rate limiting** | Throttling, anomaly detection | Brute force, scraping, DoS |
94
+ | **Logging & monitoring** | Audit trails, alerts | Undetected breach (OWASP A09) |
95
+ | **Incident response** | Playbooks, forensics, recovery | Slow response when attacks succeed |
96
+
97
+ The property of defense in depth is the *composition* — no single layer is the security; the security is what remains when one layer fails.
98
+
99
+ ## Verification
100
+
101
+ After applying this skill, verify:
102
+ - [ ] A threat model exists for the system or feature, answering all four Shostack questions; it is dated and reviewed at meaningful intervals.
103
+ - [ ] Trust boundaries are explicitly enumerated; each boundary has a validation discipline applied.
104
+ - [ ] Authentication is required at every entry point that needs identity; authorization is checked at every privileged action — not just at session start.
105
+ - [ ] Input validation happens at the trust boundary, returns structured errors, and is logged.
106
+ - [ ] Sensitive data has been classified (public, internal, confidential, restricted, secrets); each tier has handling rules; secrets are never logged or stored unencrypted.
107
+ - [ ] Service-to-service calls use mTLS or signed tokens; no service trusts another solely on network position.
108
+ - [ ] Defaults are fail-safe (deny by default; permit by explicit exception with justification).
109
+ - [ ] Every entity (user, service, process) has minimum-necessary permissions; service accounts do not have admin keys; tokens are scoped to the minimum action set.
110
+ - [ ] Sensitive actions are logged with sufficient detail to reconstruct what happened; logs are protected from modification.
111
+ - [ ] Monitoring is in place to detect anomalies and failed validations; alerts are tested.
112
+ - [ ] Cryptographic primitives are implemented by well-reviewed libraries, not custom code; keys are managed (rotation, escrow, scoped access).
113
+ - [ ] Compliance documentation (where applicable) is downstream of the security property, not a substitute for it.
114
+
115
+ ## Do NOT Use When
116
+
117
+ | Instead of this skill | Use | Why |
118
+ |---|---|---|
119
+ | Defending an LLM agent against prompt injection | `prompt-injection-defense` | prompt-injection-defense owns the LLM-specific specialization; this skill is the broader framing |
120
+ | Encrypting stored credentials (envelope encryption, KMS) | `credential-encryption` | credential-encryption owns the specific patterns for stored secrets |
121
+ | Choosing and configuring a SAST/DAST/dependency scanner | `security-scanning` | security-scanning owns the tooling discipline |
122
+ | GDPR / data-subject rights / regulatory artifacts | `gdpr-compliance` | gdpr-compliance owns the legal framing of data protection; this skill owns the underlying security |
123
+ | Implementing a specific cryptographic primitive (AES, RSA, hashing) | Well-reviewed crypto library docs (libsodium, BouncyCastle, native APIs) | Implementation is library territory; this skill is upstream of "which primitive" |
124
+ | Webhook signature verification for a specific platform (Shopify, Stripe) | `webhook-integration` | webhook-integration owns vendor-specific patterns; this skill provides the framing |
125
+ | Social engineering, phishing, organizational security awareness | (no skill — out of scope) | Organizational security is a separate discipline |
126
+ | Penetration testing methodology | (no skill — out of scope) | A specialized professional discipline |
127
+
128
+ ## Key Sources
129
+
130
+ - Saltzer, J. H., & Schroeder, M. D. (1975). ["The Protection of Information in Computer Systems"](https://www.cs.virginia.edu/~evans/cs551/saltzer/). *Proceedings of the IEEE, 63*(9), 1278–1308. The foundational paper on security design principles; the eight principles articulated here remain canonical across every subsequent technology shift.
131
+ - Shostack, A. (2014). *Threat Modeling: Designing for Security*. Wiley. The canonical modern reference on threat modeling, including the four-question framework and STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege).
132
+ - OWASP. [OWASP Top 10 (2021)](https://owasp.org/Top10/). The most-cited working enumeration of recurring web application vulnerability classes; updated periodically as the threat landscape shifts.
133
+ - OWASP. [OWASP Top 10 for LLM Applications](https://owasp.org/www-project-top-10-for-large-language-model-applications/). The LLM-specific specialization, including prompt injection (LLM01), excessive agency (LLM08), and insecure plugin design (LLM07).
134
+ - Anderson, R. (2020). *Security Engineering: A Guide to Building Dependable Distributed Systems* (3rd ed.). Wiley. The comprehensive treatment of security engineering across cryptography, access control, authentication, and large-system architecture; the discipline's modern textbook.
135
+ - Kerckhoffs, A. (1883). "La cryptographie militaire." *Journal des sciences militaires*, IX, 5–83. The foundational articulation of "security must not depend on the secrecy of the design" — the principle Saltzer & Schroeder generalized as "open design."
136
+ - NIST. [Special Publication 800-63B: Digital Identity Guidelines — Authentication and Lifecycle Management](https://pages.nist.gov/800-63-3/sp800-63b.html). The reference standard for authentication: password requirements, MFA categorization (memorized secrets, OOB devices, OTPs, cryptographic keys), session management.
137
+ - Lampson, B. W. (1973). "A Note on the Confinement Problem." *Communications of the ACM, 16*(10), 613–615. The foundational paper on confinement — the question of whether a program can be prevented from leaking information it has access to.
138
+ - King, A. (2019). ["Parse, don't validate"](https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/). Modern articulation of the validation discipline: convert untrusted data to typed values once at the boundary, then trust the type.
139
+ - Bell, D. E., & LaPadula, L. J. (1973). "Secure Computer Systems: Mathematical Foundations." MITRE technical report. The Bell-LaPadula model — foundational work on formal access-control models that underpin modern RBAC/ABAC systems.
@@ -0,0 +1,194 @@
1
+ ---
2
+ name: semantic-center
3
+ description: "Use when you need to explain how parts of a system, feature, concept, page, workflow, or problem connect; identify the single most important part of something; untangle dense dependencies into a core plus typed relations; or answer 'what is the load-bearing part?' without drifting into implementation or task prioritization. Provides a five-step workflow — classify the unit of analysis, find the single primary part using removal/governance/purpose/weight/decision tests, map secondary parts via typed relations (dependency, input/output, parent/child, owner/owned, cause/effect, constraint/enabler, and others), produce a structured output, and reduce the whole to one final sentence — that forces explanation through one-primary reduction rather than flat lists or chronology. Do NOT use for implementation work (use the relevant domain skill), choosing what to do next (use a prioritization skill), or formal architectural-ownership design (use a domain-modeling skill)."
4
+ license: MIT
5
+ compatibility: "Domain-agnostic explanation method. The five-step workflow, the five primary-part tests, and the typed-relation taxonomy apply to systems, features, modules, workflows, concepts, decisions, or problems in any stack — substitute the relevant domain vocabulary for the structural skeleton."
6
+ allowed-tools: Read Grep
7
+ metadata:
8
+ metadata: "{\"schema_version\":6,\"version\":\"1.0.0\",\"type\":\"workflow\",\"category\":\"foundations\",\"domain\":\"foundations/semantics\",\"scope\":\"portable\",\"owner\":\"skill-graph-maintainer\",\"freshness\":\"2026-05-06\",\"drift_check\":\"{\\\\\\\"last_verified\\\\\\\":\\\\\\\"2026-05-06\\\\\\\"}\",\"eval_artifacts\":\"planned\",\"eval_state\":\"unverified\",\"routing_eval\":\"absent\",\"stability\":\"experimental\",\"keywords\":\"[\\\\\\\"semantic center\\\\\\\",\\\\\\\"semantic-center workflow\\\\\\\",\\\\\\\"one-primary-part reduction\\\\\\\",\\\\\\\"removal test\\\\\\\",\\\\\\\"governance test\\\\\\\",\\\\\\\"load-bearing part\\\\\\\",\\\\\\\"typed relation map\\\\\\\",\\\\\\\"center-finding method\\\\\\\",\\\\\\\"structural importance\\\\\\\",\\\\\\\"single primary part\\\\\\\",\\\\\\\"figure-ground reduction\\\\\\\",\\\\\\\"explanation structure\\\\\\\",\\\\\\\"relation typing rules\\\\\\\",\\\\\\\"supporting-relation map\\\\\\\",\\\\\\\"analysis-vs-prioritization distinction\\\\\\\"]\",\"examples\":\"[\\\\\\\"what is the most important part of this dashboard, and how do the surrounding widgets relate to it?\\\\\\\",\\\\\\\"explain how the order, fulfillment, and payment systems relate — what is the semantic center of that flow?\\\\\\\",\\\\\\\"break down the query-tier system; what is the governing part and how do the others depend on it?\\\\\\\",\\\\\\\"we need to understand the onboarding flow, not implement it — what is the primary part and how do the steps relate around it?\\\\\\\",\\\\\\\"a skill system has frontmatter, body, and references — which part is the semantic center, and what roles do the others play?\\\\\\\",\\\\\\\"untangle these dense module dependencies into one core plus typed relations\\\\\\\",\\\\\\\"explain at a high level how this system hangs together\\\\\\\"]\",\"anti_examples\":\"[\\\\\\\"implement the new chart component for the reports page\\\\\\\",\\\\\\\"which task should I work on next from the board?\\\\\\\",\\\\\\\"design bounded contexts and aggregate ownership for the domain\\\\\\\",\\\\\\\"review this PR for code quality and missing tests\\\\\\\",\\\\\\\"decide kebab-case vs camelCase for new database columns\\\\\\\",\\\\\\\"rewrite this UI button label to be specific and action-oriented\\\\\\\"]\",\"relations\":\"{\\\\\\\"boundary\\\\\\\":[{\\\\\\\"skill\\\\\\\":\\\\\\\"task-analysis\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"task-analysis decomposes a route or flow around the user's top task and friction dimensions (UX-goal-driven decomposition); semantic-center decomposes a system or concept around its single load-bearing part (structural-importance reduction) — the same 'what's the primary thing on this page?' prompt routes by whether the lens is the user's goal or the structural importance of the parts\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"conceptual-modeling\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"conceptual-modeling builds out a full concept structure (entities, attributes, relationships, invariants); semantic-center reduces a concept structure to one primary part plus typed relations to it — the same 'how do these concepts relate?' prompt routes by whether the user wants the full model or the load-bearing reduction\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"pattern-recognition\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"pattern-recognition surfaces recurring pattern classes across many instances; semantic-center forces one-primary reduction within a single instance — the same 'how does this hang together?' prompt routes by whether the unit of analysis is many instances (pattern) or one instance (center)\\\\\\\"}],\\\\\\\"related\\\\\\\":[\\\\\\\"intent-recognition\\\\\\\",\\\\\\\"diagnosis\\\\\\\",\\\\\\\"knowledge-modeling\\\\\\\"],\\\\\\\"verify_with\\\\\\\":[\\\\\\\"code-review\\\\\\\"]}\",\"portability\":\"{\\\\\\\"readiness\\\\\\\":\\\\\\\"scripted\\\\\\\",\\\\\\\"targets\\\\\\\":[\\\\\\\"skill-md\\\\\\\"]}\",\"lifecycle\":\"{\\\\\\\"stale_after_days\\\\\\\":365,\\\\\\\"review_cadence\\\\\\\":\\\\\\\"quarterly\\\\\\\"}\",\"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/semantic-center/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/semantic-center/SKILL.md
13
+ ---
14
+
15
+ # Semantic Center
16
+
17
+ ## Coverage
18
+
19
+ A structured explanatory workflow for identifying the *semantic center* of any system, feature, concept, page, workflow, decision, or problem and mapping how surrounding parts relate to it. Covers (1) **unit-of-analysis classification** (system / feature / module / page / workflow / concept / data model / decision / problem); (2) **primary-part identification** via the five tests (removal, governance, purpose, weight, decision) ranked by priority; (3) **typed secondary-part relation mapping** using a fixed taxonomy of relation types (dependency, input/output, parent/child, source/consumer, cause/effect, owner/owned, trigger/result, semantic grouping, constraint/enabler, sequence/timeline, contrast/tradeoff); (4) **structured-output production** following a fixed skeleton; and (5) **final one-sentence reduction** in a fixed grammatical form. Includes a "codebase analysis mode" overlay for analyzing a real implementation surface (grep, read primary file, follow data path, read tests) and an anti-pattern catalog (everything-is-important flattening, visibility-as-importance, proximity-as-relation, chronology-instead-of-structure, symmetric-relation blur).
20
+
21
+ ## Philosophy
22
+
23
+ Most explanations fail because they present everything at the same weight. A user asks "how does this work?" and receives a chronological walkthrough or a laundry list, neither of which tells them what the system *depends on*. Until one part is named as load-bearing, the explanation is not structurally useful — the reader still has to do the reduction work themselves.
24
+
25
+ The core rule is: **prefer one primary part and typed supporting relations over multiple co-equal "important" parts.** When more than one thing seems important, the removal test or the governance test usually breaks the tie. If it doesn't, state the tension explicitly rather than hiding it behind a list. The five-step workflow exists to force that reduction every time, not as an aesthetic preference but as a structural one.
26
+
27
+ This skill is for *explanation*, not for execution. It tells you which part of a system carries the most semantic load. It does not tell you which task to start next (a prioritization concern), how to design the bounded contexts and aggregates of the system (a domain-modeling concern), or how to implement any of it (a domain skill concern).
28
+
29
+ ## Workflow
30
+
31
+ The skill is the five-step workflow below. Each step produces explicit output. Steps run in order; a missing step downstream usually means the analysis short-circuited at the previous step.
32
+
33
+ ```text
34
+ Step 1: Classify the unit of analysis
35
+ Step 2: Find the single most important part
36
+ Step 3: Map secondary parts in relation to the primary part
37
+ Step 4: Produce the structured output
38
+ Step 5: Reduce to one sentence
39
+ ```
40
+
41
+ ### Step 1 — Classify the Unit of Analysis
42
+
43
+ Before analyzing, explicitly state what kind of thing this is. The category shapes which relation types and tests are most likely to matter.
44
+
45
+ | Category | Examples |
46
+ |----------|---------|
47
+ | **System** | Auth pipeline, reconciliation engine, webhook chain |
48
+ | **Feature** | Order detail page, onboarding flow, CSV export |
49
+ | **Module** | Financial calculator, query-tier system, skill injector |
50
+ | **Page / Screen** | Dashboard, orders list, settings page |
51
+ | **Workflow** | Deploy pipeline, PR review cycle, task protocol |
52
+ | **Concept** | Data provenance, margin calculation, multi-tenancy |
53
+ | **Data model** | Order → line items → costs |
54
+ | **Decision** | Build vs buy, monolith vs microservice |
55
+ | **Problem** | Race condition, data inconsistency, bottleneck |
56
+
57
+ **Rule:** say explicitly, "This is a [category]." If you cannot pick a category, the unit of analysis is too vague — narrow it before continuing.
58
+
59
+ ### Step 2 — Find the Primary Part
60
+
61
+ Use these tests, in priority order. The first test that produces a clear winner is the test you cite.
62
+
63
+ | Test | Question | What it reveals |
64
+ |------|----------|----------------|
65
+ | **Removal test** | If removed, what breaks first? | Load-bearing dependency |
66
+ | **Governance test** | What constrains or governs the rest? | Authority source |
67
+ | **Purpose test** | What best explains the point of the whole? | Semantic anchor |
68
+ | **Weight test** | What carries the most semantic load? | Core concept |
69
+ | **Decision test** | What anchors downstream choices? | Decision root |
70
+
71
+ **Rules:**
72
+
73
+ - Prefer one primary part. If the removal test is genuinely tied between two, name the tie explicitly rather than hiding it behind a list.
74
+ - Distinguish importance from visibility — the loudest element is not necessarily the most load-bearing.
75
+ - Distinguish importance from recency — the most recently changed part is rarely the semantic center.
76
+
77
+ ### Step 3 — Map Secondary Parts
78
+
79
+ List secondary parts only in relation to the primary part. Every secondary part must have an explicit relation type from the taxonomy below.
80
+
81
+ | Relation Type | Meaning |
82
+ |--------------|---------|
83
+ | **dependency** | Secondary depends on the primary |
84
+ | **input/output** | Primary consumes or produces the secondary |
85
+ | **parent/child** | Structural containment |
86
+ | **source/consumer** | Data or event flow direction |
87
+ | **cause/effect** | Causal chain |
88
+ | **owner/owned** | Authority relationship |
89
+ | **trigger/result** | Event-driven relationship |
90
+ | **semantic grouping** | Family of concepts around the center |
91
+ | **constraint/enabler** | What limits or unlocks the primary |
92
+ | **sequence/timeline** | Temporal ordering only when no stronger structural relation exists |
93
+ | **contrast/tradeoff** | Competing alternative or tension |
94
+
95
+ **Rules:**
96
+
97
+ - Every secondary part must have an explicit relation type from this list.
98
+ - Proximity is not a relation. Two parts being "near each other" in the codebase is not a structural relationship — name the actual relation or drop the part.
99
+ - Chronology is not enough when a stronger structural relation exists. Use sequence/timeline only as a last resort.
100
+ - Symmetric "A and B both explain each other" is not allowed — choose the dominant direction.
101
+
102
+ ### Step 4 — Structured Output
103
+
104
+ Use this output skeleton verbatim. Each `H2:` label below becomes a real `##` heading in the produced analysis document.
105
+
106
+ ```text
107
+ H2: Unit of Analysis
108
+ [Category]: [Name]
109
+
110
+ H2: Primary Part
111
+ [Name of the single most important part]
112
+
113
+ H2: Why This Is the Primary Part
114
+ [Which test(s) it passes and why]
115
+
116
+ H2: Secondary Parts
117
+ - [Part A] — [role]
118
+ - [Part B] — [role]
119
+
120
+ H2: Relation Map
121
+ - Primary → Part A: [relation type] — [explanation]
122
+ - Part B → Primary: [relation type] — [explanation]
123
+
124
+ H2: Simplest Explanation
125
+ [2-3 sentences]
126
+
127
+ H2: Important Distinction
128
+ [What people most often confuse]
129
+
130
+ H2: Common Misunderstanding
131
+ [What goes wrong and why]
132
+
133
+ H2: Naming Recommendation
134
+ [If naming is misleading, suggest better names]
135
+ ```
136
+
137
+ ### Step 5 — Final Reduction
138
+
139
+ End with exactly one sentence in this form:
140
+
141
+ > The core is **[X]**, and everything else matters because it [supports / depends on / constrains / expresses / feeds / consumes] **X**.
142
+
143
+ If you cannot write this sentence in one line, the analysis is not yet finished — return to Step 2.
144
+
145
+ ### Codebase Analysis Mode (Overlay)
146
+
147
+ When the unit of analysis is a real repo surface rather than a pure concept, add these steps before Step 2:
148
+
149
+ 1. Grep for the entity or surface name across the codebase.
150
+ 2. Read the primary implementation file.
151
+ 3. Follow the data or event path one hop in each direction.
152
+ 4. Read tests if they exist.
153
+
154
+ Then add to the structured output:
155
+
156
+ - `## Key Files` — list the files that participate in the analyzed unit
157
+ - `## Verified Against` — list the artifacts that confirmed the analysis (grep results, test names, log lines)
158
+
159
+ ### Anti-Patterns
160
+
161
+ | Anti-Pattern | Problem | Fix |
162
+ |--------------|---------|-----|
163
+ | **"Everything is important"** | No real reduction happened | Apply the removal test rigorously |
164
+ | **Visibility = importance** | The loudest element gets mistaken for the most load-bearing | Ask what breaks if it disappears |
165
+ | **Relation = proximity** | Nearby parts get treated as semantically connected | Name the actual relation type or drop the part |
166
+ | **Chronology instead of structure** | Timeline replaces architecture | Map dependencies and constraints first; use timeline only as last resort |
167
+ | **Symmetric relation blur** | "A and B both explain each other" | Choose the dominant direction |
168
+ | **Drift into prioritization** | Analysis turns into a what-to-do-next list | Stop at Step 5; prioritization is a different skill |
169
+
170
+ ## Verification
171
+
172
+ After delivering a semantic-center analysis, verify:
173
+
174
+ - [ ] Exactly one primary part was identified (a stated tie counts as one, not two)
175
+ - [ ] Every secondary part has an explicit relation type from the taxonomy
176
+ - [ ] No relation is just proximity dressed up as structure
177
+ - [ ] No symmetric "A and B both explain each other" relations remain
178
+ - [ ] The "Important Distinction" is non-obvious rather than a restatement of the primary part
179
+ - [ ] The final reduction is exactly one sentence in the prescribed form
180
+ - [ ] The output stays in explanation mode rather than drifting into implementation or prioritization
181
+ - [ ] If codebase analysis mode was used, `## Key Files` and `## Verified Against` are present and grounded in actual reads
182
+
183
+ ## Do NOT Use When
184
+
185
+ | Instead, use | Why |
186
+ |---|---|
187
+ | `task-analysis` | The unit of analysis is a route or flow and the question is "what is the user's top task?" Task-analysis owns goal-driven UX decomposition; semantic-center owns structural-importance reduction. |
188
+ | `conceptual-modeling` | You need a *full* concept model (all entities, attributes, relationships, invariants), not a single load-bearing reduction. Conceptual-modeling owns the full model; semantic-center owns the reduction. |
189
+ | `pattern-recognition` | The unit of analysis is *many instances* and the question is "what recurring pattern is this?" Pattern-recognition owns cross-instance pattern classes; semantic-center owns within-instance one-primary reduction. |
190
+ | `intent-recognition` | The task is parsing an ambiguous user prompt to recover the intent, not analyzing a system. Intent-recognition is upstream of any system analysis. |
191
+ | `documentation` | You are writing or restructuring a doc artifact, not analyzing a system. Documentation owns the artifact; semantic-center may produce content that goes into the artifact. |
192
+ | (a prioritization skill) | The question is "what should we work on next?" Prioritization is operational ranking; semantic-center is conceptual load-bearing. |
193
+ | (a domain-modeling skill) | The task is formal architecture: bounded contexts, aggregates, ownership boundaries. Domain-modeling owns formal model design; semantic-center is a quick structural explanation. |
194
+ | (the relevant domain skill) | The task is implementation, debugging, or shipping code. Semantic-center explains structure; it does not build. |
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: semantic-relations
3
+ description: "Use when typing edges in a knowledge graph or concept map, resolving synonym/antonym/polysemy/homonym confusion, testing whether a connection is IS-A, PART-OF, causal, thematic, or vague, explaining adjacent concepts, or auditing whether hierarchy and skill-boundary decisions use the wrong relation type. Covers taxonomic, associative, and thematic relations plus symmetry, asymmetry, transitivity, reflexivity, and irreflexivity. Do NOT use for formal ontology axioms with reasoning constraints, database foreign-key or junction-table design, or operational data correspondence across systems."
4
+ license: MIT
5
+ compatibility: "Vocabulary-layer skill, stack- and storage-agnostic. The relation taxonomy and the substitution / property tests apply to any knowledge graph, concept map, taxonomy, or naming system; downstream implementation skills (ontology, ER modeling, relational mapping) consume the typed relations defined here."
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 relations\\\\\\\",\\\\\\\"relation typing\\\\\\\",\\\\\\\"IS-A relation\\\\\\\",\\\\\\\"PART-OF relation\\\\\\\",\\\\\\\"hypernymy hyponymy\\\\\\\",\\\\\\\"meronymy holonymy\\\\\\\",\\\\\\\"synonymy versus polysemy\\\\\\\",\\\\\\\"thematic role analysis\\\\\\\",\\\\\\\"relation property check\\\\\\\",\\\\\\\"knowledge-graph edge typing\\\\\\\",\\\\\\\"substitution test\\\\\\\",\\\\\\\"relation-vocabulary discipline\\\\\\\",\\\\\\\"typed-edge taxonomy\\\\\\\",\\\\\\\"conceptual-relation analysis\\\\\\\",\\\\\\\"adjacency-vs-boundary disambiguation\\\\\\\",\\\\\\\"generic related-to anti-pattern\\\\\\\"]\",\"examples\":\"[\\\\\\\"our codebase uses customer, client, buyer, and user in different modules — which relation analysis tells us whether this is synonymy, near-synonymy, or distinct domain language?\\\\\\\",\\\\\\\"a new graph schema uses related_to for every edge — which semantic relation types should replace it so traversal and reasoning stay meaningful?\\\\\\\",\\\\\\\"is a refund a kind of payment, part of a payment, or the result of a payment action?\\\\\\\",\\\\\\\"two skills seem close: one owns structure design and one owns assignment into that structure — is that adjacency, a boundary, or a deeper taxonomic relation?\\\\\\\",\\\\\\\"the word status appears across payments, orders, and fulfillment — how should relation analysis expose the polysemy and guide disambiguation?\\\\\\\",\\\\\\\"type these knowledge-graph edges so traversal is meaningful instead of generic\\\\\\\",\\\\\\\"test whether 'every line item is an order' passes the IS-A substitution test\\\\\\\"]\",\"anti_examples\":\"[\\\\\\\"I need formal OWL axioms, class restrictions, and reasoning semantics on a knowledge base\\\\\\\",\\\\\\\"I need the physical database foreign keys and junction-table design for these relationships\\\\\\\",\\\\\\\"I need to connect external IDs from one platform to canonical IDs in our system operationally\\\\\\\",\\\\\\\"I need the broader representation choice between graph, frames, rules, or hybrid knowledge systems\\\\\\\",\\\\\\\"I need to analyze icon metaphors, color connotation, and UI sign systems\\\\\\\",\\\\\\\"rename this function across all call-sites in the repo\\\\\\\"]\",\"relations\":\"{\\\\\\\"boundary\\\\\\\":[{\\\\\\\"skill\\\\\\\":\\\\\\\"linguistics\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"linguistics owns the rules of word form (morphology, polysemy resolution at the identifier level, audience register); semantic-relations owns the typing of meaning connections between concepts (IS-A, PART-OF, thematic roles, relation properties) — the same 'what's the relationship between these two terms?' prompt routes by whether the lens is the term form/morphology or the typed connection between meanings\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"conceptual-modeling\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"conceptual-modeling builds the full concept structure (which entities, which attributes, which relationships exist); semantic-relations supplies the relation-typing vocabulary used inside that structure (whether a relationship is taxonomic, mereological, thematic, causal) — the same 'model these concepts' prompt routes by whether the user wants the structure built or the relation types named\\\\\\\"},{\\\\\\\"skill\\\\\\\":\\\\\\\"knowledge-modeling\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"knowledge-modeling chooses the representation paradigm (graph, frames, rules, hybrid) for a knowledge surface; semantic-relations chooses the relation vocabulary used inside whatever paradigm is picked — the same 'design how to represent this knowledge' prompt routes by whether the trigger is the representation choice or the relation typing\\\\\\\"}],\\\\\\\"related\\\\\\\":[\\\\\\\"linguistics\\\\\\\",\\\\\\\"pattern-recognition\\\\\\\",\\\\\\\"semantic-center\\\\\\\"],\\\\\\\"verify_with\\\\\\\":[\\\\\\\"linguistics\\\\\\\",\\\\\\\"code-review\\\\\\\"]}\",\"portability\":\"{\\\\\\\"readiness\\\\\\\":\\\\\\\"scripted\\\\\\\",\\\\\\\"targets\\\\\\\":[\\\\\\\"skill-md\\\\\\\"]}\",\"lifecycle\":\"{\\\\\\\"stale_after_days\\\\\\\":365,\\\\\\\"review_cadence\\\\\\\":\\\\\\\"quarterly\\\\\\\"}\",\"mental_model\":\"|\",\"purpose\":\"|\",\"boundary\":\"|\",\"analogy\":\"Semantic-relations is to a knowledge graph what road-sign verbs are to a transit map — `motorway`, `slip road`, `roundabout`, `level crossing`, `bridge`, `tunnel` are each typed connections with their own rules of traversal (one-way / two-way / yields / stops). A map that labels every road `connector` is nearly useless for navigation; a map that labels them precisely lets the driver reason about which routes are even possible. The vocabulary is not decoration — it is the load-bearing semantics that makes the map a tool rather than an illustration.\",\"misconception\":\"|\",\"concept\":\"{\\\\\\\"definition\\\\\\\":\\\\\\\"Semantic relations are the *typed connections* between concepts in a meaning structure: IS-A (hypernymy/hyponymy), PART-OF (holonymy/meronymy), synonymy, antonymy, polysemy, homonymy, metonymy, and the thematic role relations (agent, patient, instrument, location, source, goal, cause, result). Drawn from lexical semantics (Lyons, Cruse), Princeton WordNet, the W3C SKOS vocabulary, and cognitive-semantics work on thematic roles (Fillmore 1968, Jackendoff 1990), it treats every edge in a knowledge graph, concept map, or hierarchy as a relation of a *named kind* rather than a generic association.\\\\\\\",\\\\\\\"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/semantic-relations/SKILL.md\",\"skill_graph_export_description\":\"shortened for Agent Skills 1024-character description limit; canonical source keeps the full routing contract\",\"skill_graph_canonical_description_length\":\"1113\"}"
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/semantic-relations/SKILL.md
13
+ ---
14
+
15
+ # Semantic Relations
16
+
17
+ ## Coverage
18
+
19
+ Semantic relation analysis as a typed-connection discipline. Covers four families of relations and their properties:
20
+
21
+ - **Taxonomic relations** — hypernymy / hyponymy (IS-A) with the substitution test, transitivity, asymmetry, and inheritance; holonymy / meronymy (PART-OF) with six part-whole types (component-integral, member-collection, portion-mass, stuff-object, feature-activity, place-area)
22
+ - **Associative relations** — synonymy, near-synonymy, antonymy (complementary, gradable, relational), polysemy, homonymy, metonymy
23
+ - **Thematic relations** (role-based) — agent, patient, instrument, location, source, goal, cause, result, temporal, beneficiary
24
+ - **Relation properties** — symmetry, asymmetry, transitivity, reflexivity, irreflexivity
25
+
26
+ Application surfaces include knowledge-graph edge typing, naming disambiguation (synonymy vs polysemy vs homonymy), skill / module boundary analysis (adjacent vs boundary vs verify-with), category / hierarchy sanity checks, and relation-aware explanation of how concepts connect. Includes a six-item anti-pattern catalog (generic `related_to` edges, circular IS-A, conflated PART-OF and IS-A, synonym sprawl, untyped polysemy, property-free relation definitions) and a six-item verification checklist.
27
+
28
+ ## Philosophy
29
+
30
+ Every complex system depends on relation quality, not just node quality. Most knowledge-system failures are not failures to name the things; they are failures to *type the connection between things*. A graph with only `related_to` edges is nearly useless for reasoning. A naming audit that cannot separate synonymy from polysemy suggests the wrong fix. A skill system that cannot tell adjacency from boundary loads the wrong context.
31
+
32
+ The discipline is: **name the relation, then test whether the name is the right kind of relation.** If "A is B" fails the substitution test, it is not hypernymy. If a part-whole relation changes lifecycle semantics, it is not just loose association. If two words share one form but multiple related meanings, that is polysemy, not synonymy. Precision here compounds into every other knowledge and modeling skill — the quality of every downstream representation depends on whether the relations were typed correctly upstream.
33
+
34
+ This skill is the *vocabulary layer*. It does not own the formal axioms (an ontology skill), the storage shape (an ER-modeling skill), the cross-system data correspondence (a relational-mapping skill), or the broader knowledge-representation paradigm (a knowledge-modeling skill). It owns the question: *what kind of relation is this?*
35
+
36
+ ---
37
+
38
+ ## 1. Taxonomic Relations (Hierarchical)
39
+
40
+ ### Hypernymy / Hyponymy (IS-A)
41
+
42
+ | Term | Definition | Example |
43
+ |------|-----------|---------|
44
+ | **Hypernym** | The more general category | Vehicle is a hypernym of Car |
45
+ | **Hyponym** | The more specific category | Car is a hyponym of Vehicle |
46
+ | **Co-hyponyms** | Same-level members of a category | Car, Truck, Motorcycle are co-hyponyms of Vehicle |
47
+
48
+ Properties:
49
+
50
+ - **Transitive** — if A is-a B and B is-a C, then A is-a C
51
+ - **Asymmetric** — if A is-a B, then B is NOT a A
52
+ - **Inheritance** — hyponyms inherit properties of hypernyms
53
+
54
+ Rules:
55
+
56
+ - Every IS-A claim must pass the **substitution test**: "Every [hyponym] is a [hypernym]." If that sentence sounds wrong, it is probably not hypernymy.
57
+ - Distinguish IS-A from role labels. A buyer is not a *type of* order; a buyer is an actor *related to* an order.
58
+ - Co-hyponyms should be mutually exclusive unless the model explicitly allows overlap.
59
+
60
+ ### Holonymy / Meronymy (PART-OF)
61
+
62
+ | Term | Definition | Example |
63
+ |------|-----------|---------|
64
+ | **Holonym** | The whole | Order is holonym of LineItem |
65
+ | **Meronym** | The part | LineItem is meronym of Order |
66
+
67
+ Types of part-whole:
68
+
69
+ | Type | Part can exist alone? | Example |
70
+ |------|----------------------|---------|
71
+ | **Component-integral** | No | Engine is component of Car |
72
+ | **Member-collection** | Yes | Tree is member of Forest |
73
+ | **Portion-mass** | No | Slice is portion of Pie |
74
+ | **Stuff-object** | No | Wood is stuff of Table |
75
+ | **Feature-activity** | No | Payment is feature of Checkout |
76
+ | **Place-area** | Yes | Room is place in Building |
77
+
78
+ Rules:
79
+
80
+ - PART-OF is not the same as IS-A. "Every line item is an order" fails; "a line item is part of an order" passes.
81
+ - Part-whole relations carry lifecycle implications that influence later ER modeling and API design, but those implementation choices belong to the downstream implementation skills.
82
+ - Do not assume every part-of relation is fully transitive in practical reasoning.
83
+
84
+ ---
85
+
86
+ ## 2. Associative Relations (Non-Hierarchical)
87
+
88
+ ### Synonymy and Antonymy
89
+
90
+ | Relation | Definition | Software impact |
91
+ |----------|-----------|-----------------|
92
+ | **Synonymy** | Different words, same meaning | `customer`, `client`, `buyer` may collapse into one canonical term |
93
+ | **Near-synonymy** | Similar but not identical meaning | `error`, `failure`, `fault` may need explicit distinctions |
94
+ | **Antonymy** | Opposite meaning | `credit` vs `debit`, `active` vs `inactive` |
95
+ | **Complementary antonymy** | Binary opposition, no middle | `true` / `false` |
96
+ | **Gradable antonymy** | Scale with degrees | `high` / `low` |
97
+ | **Relational antonymy** | Paired roles | `buyer` / `seller`, `parent` / `child` |
98
+
99
+ Rules:
100
+
101
+ - Synonymy is usually a naming-governance problem: pick one canonical label and route aliases to it.
102
+ - Near-synonyms must not be flattened if the codebase or domain uses them differently.
103
+ - Antonym pairs should be consistent within one domain surface; avoid mixing `inactive`, `disabled`, and `off` unless the distinctions are real.
104
+
105
+ ### Polysemy and Homonymy
106
+
107
+ | Relation | Definition | Software impact |
108
+ |----------|-----------|-----------------|
109
+ | **Polysemy** | One form, multiple related meanings | `order` can mean purchase, sequence, or command |
110
+ | **Homonymy** | One form, unrelated meanings | `bank` as finance vs river bank |
111
+
112
+ Rules:
113
+
114
+ - Polysemy is common in code and product language. Qualify the meaning with context when one bare term can mislead.
115
+ - Homonymy usually requires stronger renaming than polysemy because the meanings are unrelated.
116
+ - If two meanings are related and historically or structurally connected, treat it as polysemy, not accidental duplication.
117
+
118
+ ### Metonymy
119
+
120
+ | Relation | Definition | Example |
121
+ |----------|-----------|---------|
122
+ | **Metonymy** | One concept stands in for a closely related concept | `shipped` used to denote an order's *current state* rather than the act itself |
123
+
124
+ Rules:
125
+
126
+ - Metonymic shortcuts are acceptable only when the intended meaning remains obvious in context.
127
+ - Audit status labels and event names for places where a metonym has become more confusing than helpful.
128
+
129
+ ---
130
+
131
+ ## 3. Thematic Relations (Role-Based)
132
+
133
+ | Role | Definition | Example |
134
+ |------|-----------|---------|
135
+ | **Agent** | The entity that performs the action | Customer places order |
136
+ | **Patient** | The entity affected by the action | Order is placed by customer |
137
+ | **Instrument** | The means by which the action is performed | Payment processed via payment provider |
138
+ | **Location** | Where the action occurs | Order placed in storefront |
139
+ | **Source** | Where something comes from | Shipment from warehouse |
140
+ | **Goal** | Where something goes | Delivery to customer address |
141
+ | **Cause** | What triggers the action | Webhook triggers order sync |
142
+ | **Result** | What the action produces | Payment produces receipt |
143
+ | **Temporal** | When the action occurs | Order placed on 2026-03-29 |
144
+ | **Beneficiary** | Who benefits from the action | Refund issued for customer |
145
+
146
+ Rules:
147
+
148
+ - Use thematic roles when an action or event relation is more precise than simple association.
149
+ - Distinguish the actor from the instrument and from the cause; they are often conflated in loose architecture explanations.
150
+ - Event naming and API design improve when the thematic role is clear.
151
+
152
+ ---
153
+
154
+ ## 4. Relation Properties
155
+
156
+ | Property | Definition | Test |
157
+ |----------|-----------|------|
158
+ | **Symmetric** | If A relates to B, then B relates to A | `sibling_of` |
159
+ | **Asymmetric** | If A relates to B, then B does NOT relate to A the same way | `is_a` |
160
+ | **Transitive** | If A → B and B → C, then A → C | `ancestor_of` |
161
+ | **Reflexive** | A relates to itself | `equal_to` |
162
+ | **Irreflexive** | A cannot relate to itself | `parent_of` |
163
+
164
+ Rules:
165
+
166
+ - Relation names are incomplete without relation properties.
167
+ - If the relation direction matters, state it explicitly instead of assuming readers infer it.
168
+ - Property mismatches are a common source of bad graph or hierarchy design.
169
+
170
+ ---
171
+
172
+ ## 5. Application
173
+
174
+ ### Knowledge-Graph Edge Typing
175
+
176
+ | Bad (vague) | Better (typed) | Why |
177
+ |-------------|----------------|-----|
178
+ | `A -- related_to -- B` | `A -- is_a -- B` | Preserves hierarchy meaning |
179
+ | `A -- linked_to -- B` | `A -- causes -- B` | Preserves causal meaning |
180
+ | `A -- see_also -- B` | `A -- adjacent_to -- B` | Makes proximity type explicit |
181
+ | `A -- has -- B` | `A -- composed_of -- B` | Separates part-whole from loose ownership |
182
+
183
+ ### Skill-Boundary Analysis
184
+
185
+ | Skill-system relation | Semantic relation analogue |
186
+ |-----------------------|----------------------------|
187
+ | `related` (formerly `adjacent`) | Associative or thematic proximity |
188
+ | `boundary` | Scope separation between neighboring categories or co-hyponyms |
189
+ | `verify_with` | Instrumental relation: one skill is used to validate another |
190
+
191
+ ### Naming Disambiguation
192
+
193
+ When two names conflict:
194
+
195
+ 1. Identify the relation: synonymy, near-synonymy, polysemy, homonymy, or antonym mismatch.
196
+ 2. If synonymy: pick one canonical label and redirect aliases.
197
+ 3. If polysemy: qualify with context.
198
+ 4. If homonymy: rename one of the terms outright.
199
+
200
+ ---
201
+
202
+ ## 6. Anti-Patterns
203
+
204
+ | Anti-Pattern | Problem | Fix |
205
+ |--------------|---------|-----|
206
+ | **Generic `related_to` edges** | No semantic information; poor reasoning and poor graph traversal | Type the edge with a specific relation |
207
+ | **Circular IS-A** | A is-a B is-a C is-a A | Keep the hierarchy acyclic and substitution-valid |
208
+ | **Conflated PART-OF and IS-A** | Treating a component as a subtype | Apply the substitution test first |
209
+ | **Synonym sprawl** | Several labels for one concept | Canonical term + explicit aliases |
210
+ | **Untyped polysemy** | One term overloaded across domains | Qualify the term or split the concept |
211
+ | **Property-free relation definitions** | Named relation with no symmetry/transitivity reasoning | State the relation properties explicitly |
212
+
213
+ ---
214
+
215
+ ## Verification
216
+
217
+ After applying this skill, verify:
218
+
219
+ - [ ] Every conceptual or graph edge has a typed relation rather than a vague generic link
220
+ - [ ] IS-A relationships pass the substitution test
221
+ - [ ] PART-OF relationships are not being mistaken for type hierarchy
222
+ - [ ] Synonymy, polysemy, and homonymy are distinguished before renaming
223
+ - [ ] Relation properties (symmetry, asymmetry, transitivity, reflexivity) are explicit when they matter
224
+ - [ ] Boundary claims with neighboring skills or modules still hold under the substitution / governance test
225
+
226
+ ## Do NOT Use When
227
+
228
+ | Instead, use | Why |
229
+ |---|---|
230
+ | `linguistics` | Analyzing word morphology, polysemy at the identifier level, audience register, or blame-free phrasing. Linguistics covers word-form rules; semantic-relations covers meaning-connection types. |
231
+ | `conceptual-modeling` | Building the full concept structure (entities, attributes, relationships, invariants). Conceptual-modeling owns structure; semantic-relations owns the relation-typing vocabulary used inside it. |
232
+ | `knowledge-modeling` | Choosing the representation paradigm — graph vs frames vs rules vs hybrid — for a knowledge surface. Knowledge-modeling chooses the paradigm; semantic-relations chooses the relation vocabulary inside it. |
233
+ | (an ontology skill) | Building formal ontologies with class/property axioms, restrictions, and reasoning semantics. Ontology formalizes; semantic-relations supplies the relation vocabulary before formalization. |
234
+ | (an entity-relationship-modeling skill) | Designing database foreign keys, junction tables, and physical schema constraints. ER modeling implements physical relationships; semantic-relations analyzes conceptual ones. |
235
+ | (a relational-mapping skill) | Mapping entities between different systems or platforms operationally. Relational mapping is operational data correspondence, not conceptual relation typing. |
236
+ | (a taxonomy skill) | Designing hierarchy or facet structures themselves. Taxonomy owns the structural classification system; semantic-relations owns the relation meanings used within and around it. |
237
+ | (a semiotics skill) | Auditing iconography, color connotation, or interface sign systems. Semiotics handles signs in interfaces; semantic-relations handles concept-to-concept meaning relations. |
238
+
239
+ ## Key Sources
240
+
241
+ - Cruse, D. A. (1986). *Lexical Semantics*. Cambridge University Press. The canonical treatment of word-meaning relationships: synonymy, antonymy, hyponymy, meronymy, and the substitution-test discipline that grounds taxonomic-claim validation.
242
+ - Lyons, J. (1977). *Semantics* (2 vols.). Cambridge University Press. Comprehensive structural-semantics textbook covering sense relations, lexical fields, and the relational view of meaning.
243
+ - Miller, G. A. (1995). "WordNet: A Lexical Database for English." *Communications of the ACM*, 38(11), 39-41. The reference paper for Princeton WordNet — the largest empirically-grounded catalog of semantic relations between English lexemes; the working model for any taxonomic / mereological / antonymy relation system at scale.
244
+ - Fellbaum, C. (Ed.). (1998). *WordNet: An Electronic Lexical Database*. MIT Press. The collected technical account of WordNet's relation set, design decisions, and applications.
245
+ - Winston, M. E., Chaffin, R., & Herrmann, D. (1987). "A Taxonomy of Part-Whole Relations." *Cognitive Science*, 11(4), 417-444. The reference paper for the six PART-OF subtypes (component-integral, member-collection, portion-mass, stuff-object, feature-activity, place-area). Foundation for any mereological analysis.
246
+ - Fillmore, C. J. (1968). "The Case for Case." In E. Bach & R. T. Harms (Eds.), *Universals in Linguistic Theory*. Holt, Rinehart and Winston. The foundational paper for thematic / case roles (agent, patient, instrument, location, source, goal); the linguistics origin of the role catalog still used in event modeling.
247
+ - Jackendoff, R. (1990). *Semantic Structures*. MIT Press. Modern cognitive-semantics treatment of thematic roles, conceptual structure, and the relationship between semantic and syntactic categories.
248
+ - W3C. [SKOS Simple Knowledge Organization System Reference](https://www.w3.org/TR/skos-reference/) (2009). The lightweight RDF vocabulary for broader/narrower/related and prefLabel/altLabel; the minimum-viable formalism for transmissible semantic relations.
249
+ - W3C. [OWL 2 Web Ontology Language: Primer (Second Edition)](https://www.w3.org/TR/owl2-primer/) (2012). Object properties and their characteristics — functional, inverse-functional, transitive, symmetric, asymmetric, reflexive, irreflexive — for the formal end of the relation-typing spectrum.
250
+ - Storey, V. C. (1993). "Understanding Semantic Relationships." *VLDB Journal*, 2(4), 455-488. Survey of semantic relations in data-modeling contexts; the bridge from linguistic relation analysis to information-systems design.