relationship-semantics-change
Use when changing relationship edge creation, traversal, labels, inverse derivation, household inference, or relationship queries.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 2
01 前言 Front Matter
- name
- relationship-semantics-change
- license
- MIT
- description
- Use when changing relationship edge creation, traversal, labels, inverse derivation, household inference, or relationship queries.
02 资源文件 1
- 参考文档references/semantics.md2.5 KB
03 SKILL.md 正文
Relationship semantics change
Outcome: a relationship change that preserves one stored direction, a derived
inverse, and the confirmed-only rule everywhere an edge is read. Read
backend/AGENTS.md (Domain notes), docs/adrs/0001-neutral-hub-and-spoke-contact-model.md
and the semantics reference before editing.
Steps
- Decide what is stored: one edge direction from source to target. The inverse
is derived from
backend/models/relationship_type_registry.go, never stored twice. - Add or change the registry entry, not a second token list. The registry drives validation, inverse derivation and the vCard RELATED projection.
- Keep
status: confirmedas the only fact.suggestededges are review material and are never projected, graphed or treated as real. - Household inference reads current memberships only; it is an inference, not a stored relationship. Check the household paths you touched.
- If traversal or projection changes, update the graph ceilings in
frontend/src/utils/graphBudget.tsand its test infrontend/src/utils/graphBudget.test.ts. - If deletion reaches edges, register the cascade in
backend/services/contact_delete.go(ADR 0035) and assert it withUnscoped()where hard-deleted rows must be distinguished. - Cover the new access path's ownership boundary;
backend/routes/authorization_matrix_test.gois the live-router cross-route tripwire (ownership_matrix_test.gocovers body-carried IDs).
DoD
cd backend && go test ./models/... ./services/... ./controllers/...
cd frontend && npx vitest run src/utils/graphBudget.test.ts
Report any check you could not run; never imply it passed.
Stop and ask
- The change would store both directions or infer the inverse from a label.
- An edge type has no RFC 6350 home and the proposal is to invent one.
- A query would traverse
suggestedor above-normalsensitivity. - The change alters the health-score or household rules without an ADR update.
Canonical detail: docs/adrs/0023-relationship-health-score.md,
backend/models/relationship_type_registry.go, backend/services/graph_traversal.go.
04 同仓库更多 Skills
valid
Use when exercising a well-formed skill fixture in the agent-context tests.
unregistered-dod
Use when a fixture must carry a DoD command no Suite registers.
orphan-reference
Use when a fixture must exercise an unlinked reference file.
missing-reference
Use when a fixture must link to a reference file that does not exist.
missing-description
暂无简介
long-reference
Use when a fixture must exceed the reference line maximum.