Skip to content

feat: Typed Data Access & Disambiguation Policy — ontology enforcement across Stackbilt repos #69

@stackbilt-admin

Description

@stackbilt-admin

Motivation

Three related concepts are floating independently across the ecosystem:

  1. CodeBeast DATA_AUTHORITY sensitivity class (codebeast#9) — auditing raw D1 usage across repos
  2. AEGIS disambiguation firewall (aegis#344) — halting on undefined data concepts instead of guessing
  3. Ontology enforcement — ensuring all repos use canonical business term definitions

These need a unified policy layer, owned by Charter as the governance tool.

Proposal

Define a typed-data-access policy in Charter that:

1. Canonical Term Registry

  • Define business terms (tenant, user, subscription, credit, tier) with types and ownership
  • Each term maps to a source-of-truth service (e.g., tenant → stackbilt-auth, credit → QuotaService)
  • Terms are versioned and enforced at commit-time via Charter governance hooks

2. DATA_AUTHORITY Sensitivity Class

  • Tag data access patterns by sensitivity: public, internal, auth_scoped, billing_sensitive
  • CodeBeast enforces: raw D1 queries touching auth_scoped data must go through the owning service's RPC
  • Violations flagged as issues with remediation guidance

3. Disambiguation Protocol

  • When AEGIS encounters an undefined data concept, it MUST halt and ask rather than guess
  • Undefined = not in the canonical term registry
  • Applies to: task execution, self-improvement proposals, autonomous goal work

Implementation

  1. Add typed-data-access.adf policy module to Charter
  2. Define term registry schema (YAML/JSON in .ai/ per repo)
  3. Add Charter governance check: new code referencing unregistered terms → warning
  4. Wire CodeBeast sensitivity scan to use the registry
  5. Wire AEGIS disambiguation firewall to check terms against registry

Related

  • codebeast#9 — DATA_AUTHORITY sensitivity class
  • aegis#344 — disambiguation firewall
  • aegis#334 — adversarial reasoning (complementary quality layer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:p2Nice to have this cycletype:featureNew capability or extension point

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions