Skip to content

feat(vocab): LIVE dogfood — run the currency loop on the estate's own vocab (task #13) - #257

Merged
mdheller merged 2 commits into
mainfrom
feat/vocab-currency-dogfood
Aug 2, 2026
Merged

feat(vocab): LIVE dogfood — run the currency loop on the estate's own vocab (task #13)#257
mdheller merged 2 commits into
mainfrom
feat/vocab-currency-dogfood

Conversation

@mdheller

@mdheller mdheller commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Point the governed loop at real data

Runs the merged vocab-currency loop over this repo's own vocabulary: every approved GlossaryTerm in examples/ (fixed / LSA) vs specs/*.md (open / LDA). It answers honestly whether our approved vocab is current with our own specifications.

It isn't — and that's the point. With 2 approved terms (release-gate, promote-to-platform) against 14 specs, divergence starts ~0.98. The governed loop connects what it can, then — unable to reach currency within its 8-iteration bound — escalates-human with concrete proposals rather than pretending currency. Exactly the fail-closed behavior on real incomplete vocab.

It writes each proposed draft GlossaryTerm to build/vocab-currency-proposals/<slug>.json (gitignored) — the real artifacts ontogenesis ingests. Surfaced domain terms include contract, runtime, source, schema, policy, device, mpcc, slot.

Scope

  • make vocab-currency-dogfood — informational (exit 0), not in the validate gate (the estate vocab is legitimately incomplete today; failing CI on it would be wrong).
  • Corpus is Markdown-cleaned + generic-prose stoplisted (in the dogfood, not the core loop) so domain terms surface over filler.
  • Enforcement stays on known-good fixtures in validate-vocab-currency-loop.

Next: the ontogenesis side ingests these build/vocab-currency-proposals/*.json (upstream-JSON→Turtle generator pattern, mirroring knowledge-commons-canon.ttl).

…cab (task #13)

tools/dogfood_vocab_currency.py runs the governed loop over THIS repo's real vocabulary — every
approved GlossaryTerm in examples/ (fixed/LSA) vs specs/*.md (open/LDA) — answering honestly
whether our approved vocab is current with our specs. It is not: 2 approved terms vs 14 specs,
divergence ~0.98, and the governed loop escalates-human (can't reach currency in its 8-iteration
bound) with concrete draft proposals rather than pretending currency. Writes each proposed draft
GlossaryTerm to build/vocab-currency-proposals/<slug>.json (gitignored) — the artifacts ontogenesis
ingests. Informational (make vocab-currency-dogfood, exit 0, NOT in the validate gate); corpus is
Markdown-cleaned + generic-prose stoplisted so domain terms surface (contract/runtime/schema/
policy/device/mpcc/slot). Enforcement stays on fixtures in validate-vocab-currency-loop.
Copilot AI review requested due to automatic review settings August 2, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an on-demand “live dogfood” runner that executes the existing vocab-currency GovernedLoop against this repository’s real corpus (approved GlossaryTerms in examples/ vs specs/*.md) and emits draft GlossaryTerm proposal artifacts into build/vocab-currency-proposals/ for downstream ingestion.

Changes:

  • Introduces tools/dogfood_vocab_currency.py to build a real glossary/corpus, run the loop, persist proposed draft terms, and print a JSON report.
  • Wires an informational make vocab-currency-dogfood target (not part of make validate) and documents it in the spec.
  • Updates changelog and gitignore to reflect the new dogfood workflow/artifacts.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/dogfood_vocab_currency.py New dogfood runner that scans repo specs/examples, runs the vocab-currency loop, and writes proposal artifacts + a JSON summary.
specs/vocab-currency-loop.md Documents the new live dogfood command and intended behavior/artifact outputs.
Makefile Adds vocab-currency-dogfood target (on-demand, informational).
CHANGELOG.md Records the addition of the live dogfood runner.
.gitignore Ignores the generated proposals directory under build/.

Comment thread tools/dogfood_vocab_currency.py Outdated
Comment on lines +70 to +71
for f in sorted(glob.glob(str(ROOT / "specs" / "*.md"))):
docs.append({"id": Path(f).stem, "text": clean_markdown(Path(f).read_text(encoding="utf-8"))})
Comment thread tools/dogfood_vocab_currency.py Outdated
Comment on lines +63 to +64
if isinstance(it, dict) and str(it.get("id", "")).startswith("urn:srcos:glossary:"):
by_id[it["id"]] = it
Comment thread specs/vocab-currency-loop.md Outdated
Comment on lines +36 to +42
whether our own approved vocab is current with our own specs. On today's estate (2 approved terms
vs 14 specs) it is not: divergence starts ~0.98 and the governed loop, unable to reach currency in
its 8-iteration bound, **escalates-human** with concrete draft proposals rather than pretending
currency. It writes each proposed draft `GlossaryTerm` to `build/vocab-currency-proposals/<slug>.json`
— the exact artifacts ontogenesis ingests. Informational (exit 0), corpus-configured (Markdown
cleaned, generic prose words stoplisted so DOMAIN terms surface); the ENFORCEMENT stays in
`validate-vocab-currency-loop` on known-good fixtures.
Comment thread CHANGELOG.md Outdated
## [Unreleased]

### Added
- Vocab-currency loop — LIVE dogfood on the estate's own vocab (`make vocab-currency-dogfood`): `tools/dogfood_vocab_currency.py` runs the governed loop over this repo's approved `GlossaryTerm`s (fixed/LSA) vs `specs/*.md` (open/LDA). On today's estate (2 approved terms vs 14 specs) divergence starts ~0.98 and the governed loop escalates-human (can't reach currency in its bound), writing real draft `GlossaryTerm` proposals to `build/vocab-currency-proposals/` — the artifacts ontogenesis ingests. Informational (exit 0); Markdown-cleaned + generic-word stoplisted so domain terms surface. Enforcement stays on fixtures in `validate-vocab-currency-loop`.
Comment on lines +110 to +111
if __name__ == "__main__":
raise SystemExit(main())
…de metrics

- real_corpus() now skips an unreadable/undecodable spec with a warning instead of crashing.
- real_glossary() requires type==GlossaryTerm (or untyped bundle entry), so a doc merely
  carrying a glossary-namespaced id but typed otherwise isn't miscounted as a term.
- reworded the 'always exits 0' claim to its honest meaning: it doesn't gate on the currency
  OUTCOME (exit 0 whether current or escalated); a genuine IO error still surfaces.
- softened volatile hard-coded metrics (term/spec counts, ~0.98 divergence) in the spec +
  CHANGELOG to qualitative statements marked point-in-time.
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.

2 participants