Skip to content

docs: DocIr = composition layer over the OGAR object graph (operator ruling, D-DOCIR-COMPOSITION)#217

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/review-medcare-rust-dt7MS
Jul 20, 2026
Merged

docs: DocIr = composition layer over the OGAR object graph (operator ruling, D-DOCIR-COMPOSITION)#217
AdaWorldAPI merged 1 commit into
mainfrom
claude/review-medcare-rust-dt7MS

Conversation

@claude

@claude claude Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What

Canonizes the 2026-07-20 operator ruling that moves the DA-4 editor boundary: DocIr is not merely the document model — it becomes the composition layer over the OGAR object graph. Documents become lenses through the object world, never boxes where copies of that world go to slowly decay.

New: docs/DOCIR-COMPOSITION-LAYER.md (verbatim-preserving doctrine) + DISCOVERY-MAP.md entry D-DOCIR-COMPOSITION [G].

The doctrine in brief

  • ObjectSlot — ActionText's attachment doctrine transplanted as typed projection portals: target: ObjectRef + class_view + FieldMask + WideFieldMask + ResolutionMode{Live, Revision, Snapshot} + snapshot fallback. ogar://app/class/id@{live|revision:N|sha256:…} is the SGID equivalent — the beyond-Rails move (dashboards live; signed/GoBD artifacts pinned; deleted objects fall back to snapshots).
  • Sharp responsibilities: ClassView = named semantic projection (WorkPackage.{compact-card, document-inline, inspector, print-summary, bim-overlay}); FieldMask = immediate fields; WideFieldMask = GraphQL-shaped traversal selection compiled into the radix/path machinery; FieldView = renderer-neutral presentation intent — Askama/Typst/Blitz/Vello render FieldView and never query domains (the hinge).
  • DocNode is composition-only — no Wall/WorkPackage/Patient variants; those belong to OGAR. The existing observation IR (ogar-doc-ir doc.v1 retina) is untouched and referenced through slots.
  • Trix donates editor authority (DocOp → DocIr → rerender; DOM/Typst/HTML never authoritative; CRDT-compatible later). Typst owns the paged projection (generated from render nodes — arbitrary Typst syntax never enters canon). Blitz stays behind the ProjectionRenderer trait (experimental, not load-bearing). Parley/Vello = precision canvas, inline boxes carrying object slots as references, never text. ogar-bim lands as semantic objects + ClassViews — one identity, several faces.
  • First vertical slice: OpenProject WorkPackage.description — 5 node kinds, 3 attachables (WorkPackage/User/Attachment) × 2 named ClassViews each, the same document rendered twice (Askama HTML + Typst PDF), then ONE BimObject.

Grounding + gates

Grounded against shipped bricks (WideFieldMask CODED per the #204/#205 arc, ogar-render-askama::field_view, ogar-a2ui-frame, document 0x080B #216, content-addressed Lance KV in medcare-rs). Implementation is explicitly gated on the OGAR-AS-IR.md read (this is an IR-surface change) and the named gaps are listed (ObjectSlot/ogar:// · composition DocNode · DocOp · FieldView + ProjectionRenderer · named multi-views per class · ogar-render-typst). Docs-only — no code change.


🤖 Generated with Claude Code

https://claude.ai/code/session_01Mwq1QKpw4zRd6oaGRoJhF2


Generated by Claude Code

…ruling)

Canonize the 2026-07-20 operator ruling that moves the boundary: DocIr is not
merely the OCR document model — it becomes the composition layer over the
OGAR object graph. Documents become lenses through the object world, never
boxes where copies decay.

The doctrine (docs/DOCIR-COMPOSITION-LAYER.md, verbatim-preserving):
- ObjectSlot = ActionText's attachment doctrine transplanted as typed
  projection portals (target + class_view + FieldMask + WideFieldMask +
  ResolutionMode{Live,Revision,Snapshot} + snapshot fallback), with
  ogar://app/class/id@{live|revision:N|sha256:...} as the SGID equivalent —
  the beyond-Rails move: dashboards live, signed/GoBD artifacts pinned.
- Sharp responsibilities: ClassView = named semantic projection; FieldMask =
  immediate fields; WideFieldMask = GraphQL-shaped traversal selection
  compiled into the radix/path machinery; FieldView = renderer-neutral
  presentation intent. The hinge: Askama/Typst/Blitz/Vello render FieldView
  and never query domains.
- DocNode is composition-only (no domain variants — those belong to OGAR);
  the existing observation IR (doc.v1 retina) is untouched, referenced via
  slots.
- Trix donates editor authority (DocOp -> DocIr -> rerender); Typst owns the
  paged projection generated from render nodes; Blitz stays behind the
  ProjectionRenderer trait; Parley/Vello = precision canvas with inline-box
  object slots; ogar-bim lands as semantic objects + ClassViews.
- First vertical slice: OpenProject WorkPackage.description, 3 attachables x
  2 named ClassViews, rendered twice (Askama HTML + Typst PDF), then one
  BimObject.

Grounded against shipped bricks (WideFieldMask, ogar-render-askama
field_view, ogar-a2ui-frame, document 0x080B, content-addressed Lance KV) and
gated on the OGAR-AS-IR read before any composition types land. DISCOVERY-MAP
entry D-DOCIR-COMPOSITION appended.

Generated by Claude Code
@AdaWorldAPI
AdaWorldAPI merged commit 6149a84 into main Jul 20, 2026
1 check passed
AdaWorldAPI pushed a commit that referenced this pull request Jul 20, 2026
Per the DocIr composition grounding (#217/#218) + operator ruling A1
("one ogar-doc crate; split axis is STATE not direction"): DocIr here is
the observation retina; the composition DocNode is a MODULE in this crate
family (never a sibling ogar-doc-compose) that references this observation
IR through an ObjectSlot (the A3 Klickwege ClassView x WideFieldMask brick
+ ObjectRef + ResolutionMode). Observation IR untouched — referenced,
never retyped in place. Doc-comment only.

Generated with Claude Code
AdaWorldAPI added a commit that referenced this pull request Jul 20, 2026
…re-jjzlig

docs: ground the DocIr composition layer (#217) + record the geometry chunk [S]
AdaWorldAPI pushed a commit that referenced this pull request Jul 20, 2026
…ionMode/ogar:// (W1, canon-free)

The first compilable brick of the DocIr composition layer (#217 doctrine,
#218 grounding), placed per operator ruling A1 ("one ogar-doc crate; split
axis is STATE not direction"): a `compose` MODULE beside the observation
IR, never a sibling crate. The observation IR is untouched.

- Closed 5-kind `DocNode` vocabulary — Document/Section/Paragraph/Text/
  ObjectSlot, exactly the doctrine §7 slice scope; Figure/Table/PageBreak
  are a `doc-compose.v2` bump, never a silent widening. Exhaustive enums
  (renderer gets a compile error on an unhandled kind). NO domain
  variants — a Wall/WorkPackage enters only through a slot (§3).
- `ObjectSlot{target, class_view (named view), field_mask: u64,
  wide_mask_words: Vec<u64>, resolution, fallback}` — the A3 brick
  (ClassView x WideFieldMask) made addressable. Masks travel in wire form
  (word w bit b => position w*64+b, positions >= 64 native — the
  ogar-a2ui-frame precedent), typed at the contract membrane; the module
  stays serde-only, zero canon dependency (lands ahead of mints, like the
  observation IR did).
- `ResolutionMode{Live, Revision(u64), Snapshot([u8;32])}` + strict
  `ogar://app/class/id@{live|revision:N|sha256:hex64}` parse/format —
  every malformed input is a refusal; a missing resolution suffix has NO
  default.
- Load gate + structural validation: version marker `doc-compose.v1`,
  closed-vocab serde rejection, out-of-range id refusal, cycle refusal
  (iterative DFS, no recursion).
- RBAC posture pinned per grounding SA4: slot masks are a REQUEST; the
  fail-closed `requested & role` intersection is the resolver's job
  (ClassRbac enforcement is probe-gated, never assumed).

9 new tests incl. the doctrine-§7 proof shape (WorkPackage.description
composing Text + User/WorkPackage/Attachment slots), all three ogar://
arms round-tripping, seven URI refusals, wide-position and snapshot-
fallback serde round-trips. 16/16 crate tests green; clippy/fmt clean.

Deferred, named: DocOp (§4 editor authority — next brick); the FieldView
enum widening + (ClassId, mode) named-view registry (ogar-render-askama /
ogar-class-view side); ogar-render-typst.

Ledger: W1 status appended to D-DOCIR-COMPOSITION (same commit, board
hygiene).

Generated with Claude Code
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