Skip to content

docs: reserve polycentric observer-control schema family lane - #14

Merged
mdheller merged 1 commit into
mainfrom
polycentric-schema-capture-plan-20260409
Apr 9, 2026
Merged

docs: reserve polycentric observer-control schema family lane#14
mdheller merged 1 commit into
mainfrom
polycentric-schema-capture-plan-20260409

Conversation

@mdheller

@mdheller mdheller commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Reserves SourceOS-Linux/sourceos-spec as the canonical machine-readable contract home for the polycentric observer-control model being captured upstream in the SocioProphet standards canon.

What this PR does

  • adds docs/adr/ADR-0006-polycentric-observer-schema-family.md
  • declares the expected schema family and ownership split
  • makes the doctrine/schema boundary explicit across repos

Why here

sourceos-spec already serves as the canonical machine-readable specification layer for SourceOS metadata governance and the SociOS agent plane, so it is the correct downstream home for the schema family.

Upstream / downstream split

  • upstream doctrine: SocioProphet/socioprophet-standards-storage
  • machine-readable realization: this repo
  • transport binding: SocioProphet/TriTRPC
  • execution binding: SocioProphet/agentplane
  • runtime adoption: SocioProphet/prophet-platform

@mdheller
mdheller marked this pull request as ready for review April 9, 2026 15:13
@mdheller
mdheller merged commit d712aa1 into main Apr 9, 2026
4 checks passed
mdheller added a commit that referenced this pull request Aug 2, 2026
…side governance (task #14) (#251)

* feat(data): DataClass (OntoDT/OntoDQ) + TF-Lattice classifier — data-side governance (task #14)

The data-side counterpart to the glossary (biz-side, #250). A DataClass binds, fail-closed:
OntoDT datatype-ontology class (capture) + business GlossaryTerm (biz↔data) + ValidValues
domain (enum/range/regex) + an optional TF-Lattice wide-and-deep classifier that ASSIGNS the
class by inference (OntoDQ) and is a first-class CATALOGED model — modelRef→ModelManifest,
runRef→RunRecord, compute on Ray/TritFabric, monotonicFeatures lattice constraint, labels that
are GlossaryTerm URNs (assigned in the glossary). EntityField gains an optional dataClassRef.

Drift-guard (validate_data_class_examples.py, -resolved via a referencing registry):
ontological typing + glossary link + domain required; classifier labels are glossary terms,
model is cataloged, compute is ray/tritfabric; a field bound to a DataClass must share its
domain kind. 4 negative vectors; teeth-verified (bad-label, kind-mismatch). make validate ok;
dup-$id 346. Ties biz-glossary #250 ↔ DataClass ↔ EntityField ↔ model catalog ↔ Ray/TritFabric runs.

* feat(data): two-level classifier — per-class LOGISTIC + per-table SOFTMAX (LSA + doc2vec)

Per Charles: each class needs an individually-testable classifier, and each table needs a
softmax aligning a LSA bag-of-words embedding and a doc2vec sentence-encoder (the n-ary
logit→class examples).

- DataClass.classifier is now the PER-CLASS head: head=logistic (one-vs-rest, binary) + a
  REQUIRED evalRunRef (the individual per-class test) + threshold. A class with no eval run
  is untestable and refused.
- New TableClassifier: per-table head=softmax (n-ary), embeddings MUST include BOTH
  lsa-bag-of-words AND doc2vec-sentence-encoder, a cataloged ModelManifest with a run on
  Ray/TritFabric, assignsClasses = the N DataClasses.
- Validator enforces both + 2 new negative vectors. Teeth-verified (missing-doc2vec,
  missing-evalRunRef). make validate ok; dup-$id 347.

* fix(data): address Copilot review on DataClass (#251)

- DataClass.classifier now REQUIRES runRef + compute and both are non-null — a classifier is a
  fully cataloged model with a run on ray/tritfabric, not a partial block (fail-closed intent).
- EntityField: allOf if/then — dataClassRef present ⇒ validValues required, so schema-only
  validators also catch a field bound to a class without a declared domain.
- validate_data_class_examples.py: validate each collection against its INTENDED schema
  explicitly (never pick schema from the instance's own type — a mistyped doc could validate
  against the wrong schema).
- spec: reword 'binds four things, fail-closed if any missing' → three required + an optional
  fourth (assignment), matching the schema/validator.

make validate ok; dup-$id 347.

* fix(data): harden classifier validator — independent runRef check + type-guards (Copilot #251)

check_classifier now verifies classifier.runRef is a RunRecord URN independently (not just via
the schema pattern), consistent with how it checks modelRef, and guards against a non-dict
classifier/compute so a prior schema failure can't crash the validator. check_table_classifiers
skips non-dict embedding entries. The other four review items were already resolved in earlier
remediation (validate-by-intended-schema, schema requires runRef+compute, EntityField if/then
dataClassRef=>validValues, spec reworded 'three + optional fourth'). Teeth-verified.
mdheller added a commit that referenced this pull request Aug 3, 2026
…ained→reproduced (task #14) (#264)

The DataClass contract specified a TF-Lattice classifier + referenced a ModelManifest/RunRecord by
URN, but those URNs pointed at nothing (specified, not trained). This closes it:

- tools/train_dataclass_classifiers.py trains real per-class LOGISTIC (one-vs-rest) + per-table
  SOFTMAX heads, MONOTONE-constrained in monotonicFeatures (weight >=0 projection each GD step =
  the TF-Lattice essence — raising a monotone feature never lowers the class score). Deterministic
  (seeded, full-batch) so weights + ModelManifest.modelDigest are reproducible.
- Emits trained_model.json + a conformant ModelManifest (id=DataClass modelRef) + train/eval
  RunRecords (ids=runRef/evalRunRef), so the previously-dangling DataClass classifier refs RESOLVE.
- validate-trained-classifiers (recompute-don't-trust, in make validate): manifest digest matches
  the weight bytes; eval accuracy REPRODUCED from weights+fixture (an inflated claim fails); model
  verified genuinely monotone (perturb up -> score never drops); refs resolve; artifacts conform.
  Teeth-verified (tampered weights refused). numpy in the make recipe.
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