Skip to content

Commit fc731e8

Browse files
Merge pull request #52 from SpillwaveSolutions/fix/known-rels-ager-vocabulary
fix: widen KNOWN_RELS to cover all four sibling plugins' typed relations
2 parents e4b71ca + c3c1a10 commit fc731e8

8 files changed

Lines changed: 416 additions & 8 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"name": "okf-graph-eng",
1212
"source": "./",
1313
"description": "Graph engineering for OKF repos \u2014 impact analysis, agent/harness graphs, progressive disclosure, typed edges, TicketLink/worklog bridges. Works in Claude Code and Grok Build.",
14-
"version": "0.4.0",
14+
"version": "0.4.1",
1515
"author": {
1616
"name": "Rick Hightower"
1717
},

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "okf-graph-eng",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Graph engineering for OKF repos — impact analysis, agent/harness graphs, progressive disclosure, typed edges, TicketLink/worklog bridges, and curation. Works in Claude Code and Grok Build.",
55
"author": {
66
"name": "Rick Hightower",

.grok-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "okf-plugin-marketplace",
33
"description": "Optional native Grok marketplace metadata. Grok Build already loads Claude plugins with zero config; this file pins identity for Grok marketplace listings.",
4-
"version": "0.4.0",
4+
"version": "0.4.1",
55
"plugins": [
66
{
77
"name": "okf-graph-eng",
88
"source": ".",
99
"description": "OKF graph engineering — impact analysis, agent graphs, progressive disclosure. Claude-compatible.",
10-
"version": "0.4.0",
10+
"version": "0.4.1",
1111
"compatibility": {
1212
"claude_plugin": true,
1313
"zero_config": true

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
Notable changes to **okf-graph-eng**. Newest first. Released sections are
44
frozen — corrections go in the next release's notes.
55

6+
## 0.4.1 — 2026-08-10
7+
8+
### Fixed
9+
10+
- **`KNOWN_RELS` only knew 11 of the ~170 typed relations the four sibling
11+
capture plugins declare, so `validate` buried real typos in noise on any
12+
bundle built with them.** Each of `okf-agent-graph` (AGER),
13+
`project-knowledge-capture` (PKC), `system-architecture-capture` (SAC),
14+
and `data-engineering-knowledge-capture` (DEKC) declares its own
15+
typed-edge vocabulary — in `docs/AGER_SPEC.md` / `docs/typed-edges.md`,
16+
cross-checked against each plugin's own `DEFAULT_RELATIONS` constant and,
17+
for SAC, its `schemas/types.json` relation registry (the one
18+
`sac_validate.py` actually loads at runtime, which turned out to be more
19+
complete than SAC's own prose doc — it was missing the entire C4 vocabulary
20+
and 6 code-structure relations). `KNOWN_RELS` is now `CORE_RELS |
21+
AGER_RELS | PKC_RELS | SAC_RELS | DEKC_RELS` (11 + 26 + 15 + 84 + 38 = 161
22+
after de-duplication), each a named, source-cited `frozenset` instead of
23+
one flat literal. On the field-ops-knowledge-base project's two live
24+
bundles this took `non-standard rel (allowed but uncommon)` info lines
25+
from 8 → 0 (`knowledge/`, mostly PKC's `originates_from`) and 14 → 0
26+
(`agent-graph/`, AGER — already fixed by the first half of this change).
27+
The drift-guard test now parses each installed sibling plugin's live
28+
vocabulary source at test time (`test_known_rels_covers_sibling_plugin_vocabularies`)
29+
instead of comparing two hardcoded literals, so a future plugin release
30+
adding a relation fails the test instead of silently degrading back into
31+
info-line noise; it falls back to a subset sanity check when the sibling
32+
plugins aren't installed (e.g. in CI). (#51)
33+
634
## 0.4.0 — 2026-08-10
735

836
### Fixed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Works in **Claude Code** and **Grok Build** (zero-config: Grok Build reads Claud
88
|---|---|
99
| **Plugin name** | `okf-graph-eng` |
1010
| **Repo** | [SpillwaveSolutions/okf-plugin](https://github.com/SpillwaveSolutions/okf-plugin) |
11-
| **Version** | 0.4.0 |
11+
| **Version** | 0.4.1 |
1212
| **License** | MIT |
1313

1414
## Why this plugin

marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"name": "okf-graph-eng",
88
"source": "./",
99
"description": "Graph engineering for OKF repos",
10-
"version": "0.4.0"
10+
"version": "0.4.1"
1111
}
1212
]
1313
}

scripts/okf-graph.py

Lines changed: 220 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@
3333
# The quantifier is `+`, not `*`, so an empty label stays unmatched as before.
3434
LINK_RE = re.compile(r"\[((?:\[[^\[\]]*\]|[^\]])+)\]\(([^)]+)\)")
3535

36-
# Common typed-edge relations (non-breaking; Markdown links remain canonical)
37-
KNOWN_RELS = frozenset(
36+
# Common typed-edge relations (non-breaking; Markdown links remain canonical).
37+
#
38+
# Split by declaring plugin so provenance stays legible and adding a plugin's
39+
# next release is a one-frozenset diff instead of a search through a 150+
40+
# entry flat literal. KNOWN_RELS itself is the union — that's the only name
41+
# other code should reference.
42+
CORE_RELS = frozenset(
3843
{
3944
"depends_on",
4045
"routes_to",
@@ -50,6 +55,219 @@
5055
}
5156
)
5257

58+
# okf-agent-graph (AGER) 0.5.0, docs/AGER_SPEC.md "## Typed edges (AGER
59+
# additions)" (same 31 rels also tabulated in
60+
# skills/ager-author/references/typed-edges.md). 5 of AGER's 31 rels already
61+
# overlap CORE_RELS (depends_on, implements, related_to, routes_to, uses);
62+
# these are the other 26. Kept in sync by
63+
# test_known_rels_covers_ager_vocabulary in tests/test_okf_graph.py.
64+
AGER_RELS = frozenset(
65+
{
66+
"aggregates_from",
67+
"appends_to",
68+
"binds_secret",
69+
"blocks",
70+
"budgets",
71+
"compensates_with",
72+
"controlled_by",
73+
"delegates_to",
74+
"derived_from",
75+
"fans_in_from",
76+
"fans_out_to",
77+
"guards",
78+
"handoffs_to",
79+
"isolates_context",
80+
"judges",
81+
"models_with",
82+
"on_failure",
83+
"output_of",
84+
"rate_limited_by",
85+
"reads_from",
86+
"records_to",
87+
"retries_with",
88+
"retrieves_from",
89+
"spawns",
90+
"triggered_by",
91+
"writes_to",
92+
}
93+
)
94+
95+
# project-knowledge-capture (PKC) 0.6.0, docs/typed-edges.md. Extensions
96+
# beyond CORE_RELS only (`released_in` is already in CORE_RELS, listed there
97+
# as an alias of PKC's `lands_in`). Matches pkc_common.py DEFAULT_RELATIONS
98+
# exactly — no doc/code drift found for this plugin.
99+
PKC_RELS = frozenset(
100+
{
101+
"answers",
102+
"assumes",
103+
"blocks",
104+
"decides",
105+
"designed_by",
106+
"discovered_in",
107+
"exposes",
108+
"informs",
109+
"invalidates",
110+
"lands_in",
111+
"mitigates",
112+
"originates_from",
113+
"satisfies",
114+
"validates",
115+
"verified_by",
116+
}
117+
)
118+
119+
# system-architecture-capture (SAC) 0.3.0, schemas/types.json
120+
# relations.sac (the structured registry sac_validate.py itself loads at
121+
# runtime as its known-rels source), not docs/typed-edges.md. The prose doc
122+
# undercounts by 12: it omits the whole C4 vocabulary (c4_contains,
123+
# c4_delivers, c4_implements, c4_uses, c4_view_of, zooms_into — documented
124+
# instead in docs/c4-integration.md) and a handful of code-structure rels
125+
# (defines, has_field, invokes, owns_capability, source_of, syncs_with) that
126+
# only appear in sac_common.py DEFAULT_RELATIONS / schemas/types.json.
127+
# schemas/types.json's "sac" bucket is a strict superset of both the doc
128+
# table and DEFAULT_RELATIONS (after subtracting the rels SAC inherits from
129+
# PKC, which PKC_RELS above already covers), so it's used as-is here.
130+
SAC_RELS = frozenset(
131+
{
132+
"alerts_on",
133+
"authenticates_via",
134+
"authorizes_with",
135+
"backed_by",
136+
"backs_up",
137+
"belongs_to_domain",
138+
"builds",
139+
"c4_contains",
140+
"c4_delivers",
141+
"c4_implements",
142+
"c4_uses",
143+
"c4_view_of",
144+
"caches",
145+
"calls",
146+
"calls_function",
147+
"complies_with",
148+
"configures",
149+
"connects_to",
150+
"consumes_api",
151+
"consumes_event",
152+
"contains",
153+
"contains_module",
154+
"controls",
155+
"declared_in",
156+
"defines",
157+
"depends_on_package",
158+
"deploys_to",
159+
"diagrams",
160+
"dlq_for",
161+
"emits",
162+
"encrypts_with",
163+
"exposes_api",
164+
"exposes_ui",
165+
"extends",
166+
"flagged_by",
167+
"flows_to",
168+
"for_channel",
169+
"has_class",
170+
"has_field",
171+
"has_function",
172+
"has_method",
173+
"hosted_on",
174+
"illustrated_by",
175+
"impacts",
176+
"implements_interface",
177+
"in_context",
178+
"indexes",
179+
"instantiates",
180+
"integrates_with",
181+
"invokes",
182+
"journeys_through",
183+
"measured_by",
184+
"migrates",
185+
"models",
186+
"observed_by",
187+
"owned_by",
188+
"owns_capability",
189+
"part_of",
190+
"produces_artifact",
191+
"provisions",
192+
"publishes_event",
193+
"publishes_to",
194+
"reads_from",
195+
"registers_schema",
196+
"replicates_to",
197+
"runs_in",
198+
"schedules",
199+
"secured_by",
200+
"secured_by_waf",
201+
"served_by",
202+
"served_by_cdn",
203+
"source_of",
204+
"stores_in",
205+
"streams_to",
206+
"subscribes",
207+
"subscribes_to",
208+
"syncs_with",
209+
"tested_by",
210+
"triggers",
211+
"trusts",
212+
"visualizes",
213+
"wireframes",
214+
"writes_to",
215+
"zooms_into",
216+
}
217+
)
218+
219+
# data-engineering-knowledge-capture (DEKC) 0.2.0, docs/typed-edges.md UNION
220+
# dekc_common.py DEFAULT_RELATIONS — the two disagree in both directions and
221+
# neither is a superset, so this is the union rather than a pick. The doc
222+
# has 4 rels the code doesn't (documented_by, has_wireframe, validated_by,
223+
# wireframes); the code (which dekc_link.py's own CLI help calls "documented
224+
# relations") has 4 the doc doesn't (aggregates, computes, documents_diagram,
225+
# joins).
226+
DEKC_RELS = frozenset(
227+
{
228+
"aggregates",
229+
"belongs_to_domain",
230+
"businessizes",
231+
"cataloged_in",
232+
"computes",
233+
"consumes_stream",
234+
"contains",
235+
"defines",
236+
"derived_from",
237+
"documented_by",
238+
"documents_diagram",
239+
"feeds",
240+
"glosses",
241+
"has_wireframe",
242+
"implements_contract",
243+
"ingested_by",
244+
"ingests_from",
245+
"joins",
246+
"lands_as",
247+
"lands_into",
248+
"layered_as",
249+
"measures",
250+
"models",
251+
"part_of_lake",
252+
"part_of_mart",
253+
"promotes_to",
254+
"publishes",
255+
"quality_of",
256+
"queries",
257+
"reads_from",
258+
"sourced_from",
259+
"stored_in",
260+
"transforms_to",
261+
"validated_by",
262+
"validates",
263+
"visualizes",
264+
"wireframes",
265+
"writes_to",
266+
}
267+
)
268+
269+
KNOWN_RELS = CORE_RELS | AGER_RELS | PKC_RELS | SAC_RELS | DEKC_RELS
270+
53271
HIGH_IMPACT_TYPES = frozenset({"AgentNode", "Workflow", "Harness", "SharedState"})
54272
MEDIUM_IMPACT_TYPES = frozenset({"Dataset", "Table", "Metric", "API", "ToolCapability"})
55273

0 commit comments

Comments
 (0)