Skip to content

OKF schema: dedicated cluster field + controlled topic vocabulary - #4

Merged
tbfangel merged 2 commits into
mainfrom
okf/cluster-field-and-topic-vocabulary
Jul 5, 2026
Merged

tbfangel merged 2 commits into
mainfrom
okf/cluster-field-and-topic-vocabulary

Conversation

@tbfangel

@tbfangel tbfangel commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Data-model cleanup of the OKF bundle, as groundwork for a planned local viewer. Two independent problems fixed; no card content changed beyond frontmatter.

Phase 1 — cluster is now a dedicated field

The thematic cluster was previously smuggled into tags[0] (a fragile positional overload). It's now a dedicated cluster: frontmatter field on all 426 cards (396 concept + 30 synthesis). Per-cluster counts are identical before/after.

  • New docs/schema.md — the house-style schema, extracted from CLAUDE.md (which now links to it), mirroring the Repodo monorepo's docs/schema.md.
  • validate_okf.py keys card↔synthesis correspondence off cluster and requires it non-empty.
  • Reworded every tags[0] reference in README.md, the web-resource-crawler agent, and the /sync + /ask skills.

Phase 2 — topic tags are now a controlled vocabulary

tags[1:] were free-form LLM output: 1255 distinct tags, 77% used exactly once, with heavy overlap. Consolidated to a 222-slug controlled vocabulary in docs/topics.md (13 themes).

  • Every card's tags rewritten through the mapping (avg 5.07 → 3.8 tags/card; no card left tagless).
  • validate_okf.py now rejects any card tag not present in docs/topics.md, so the sprawl can't return; /sync and the crawler draw tags from the list or propose additions.

Notes

  • Reviewer judgment calls in docs/topics.md (a few instance→category folds, e.g. money/currency→value-objects); crud and serverless were kept as their own topics per review (cards tagged crud also carry databases).
  • python3 scripts/validate_okf.py → OK — all invariants satisfied.

🤖 Generated with Claude Code

tbfangel and others added 2 commits July 5, 2026 22:58
…ulary

Groundwork for a bundle viewer, fixing two data-model problems in the cards.

Phase 1 — promote the thematic cluster out of the tags[0] positional hack
into a dedicated `cluster:` frontmatter field across all 426 cards. Extract
the card schema from CLAUDE.md into docs/schema.md. Update validate_okf.py to
key card<->synthesis correspondence off `cluster`, and reword README, the
web-resource-crawler agent, and the /sync + /ask skills.

Phase 2 — consolidate 1255 free-form, LLM-generated topic tags (77% used once)
into a 222-slug controlled vocabulary in docs/topics.md. Rewrite every card's
`tags` through the mapping and have validate_okf.py reject any tag outside the
vocabulary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`rust` was its own heading with only one slug; move it under the broader
languages heading. Vocabulary unchanged (222 slugs); no card changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tbfangel
tbfangel merged commit d38ec46 into main Jul 5, 2026
2 checks passed
@tbfangel
tbfangel deleted the okf/cluster-field-and-topic-vocabulary branch July 5, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant