Skip to content

feat(NTO/WorkOrder): add WorkOrder namespace from AdaWorldAPI/WoA transcode (15 entities + 12 verbs)#1

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/create-graph-ontology-crate-gkuJG
May 7, 2026
Merged

feat(NTO/WorkOrder): add WorkOrder namespace from AdaWorldAPI/WoA transcode (15 entities + 12 verbs)#1
AdaWorldAPI merged 1 commit into
masterfrom
claude/create-graph-ontology-crate-gkuJG

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

Adds the WorkOrder namespace under NTO/, transcoded from
AdaWorldAPI/WoA's SQLAlchemy
models.py. 15 entity TTLs + 12 distinct verb TTLs, all OGIT-shaped,
all dcterms:source-annotated back to the originating Python class.

This is purely additive to the fork. WorkOrder-specific terms live
in this fork only; the upstream almatoai/OGIT repository is not
affected. The session that produced this PR ran a 12-agent specialist
ensemble (workspace-primer, container-architect, family-codec-smith,
bus-compiler, ripple-architect, host-glove-designer, scenario-world,
mirror-kernel-synthesist, truth-architect, palette-engineer,
certification-officer, perspective-weaver) plus an integration-lead
meta-agent that validated end-to-end before this PR opened.

What lands

Entities (15) under NTO/WorkOrder/entities/:

  • Tenant (42 triples) — multi-tenant root.
  • Customer (96 triples) — Kunde + supplier roles.
  • Order (80 triples) — workorder / offer / order / invoice / credit
    via docType discriminator (the source WorkOrder.doc_type enum is
    preserved as a single class with the variant tracked in the
    description and docType predicate).
  • Article (58 triples) — Artikelstamm.
  • Position (40), Activity (29), Picture (29), HistoryEntry (30).
  • User (75), LogbookEntry (93), NumberSequence (33), Setting (37).
  • CustomerPortalUser (35), PasswordEntry (75), TimeSheet (61).

Verbs (12) under NTO/WorkOrder/verbs/, anti-flattening preserved
(every relationship is a distinct verb, not a generic related):

  • Issued — Customer → Order
  • HasPosition / HasActivity / HasPicture / HasHistory — Order → children
  • Assigned — User ↔ Order
  • RefersToArticle — Position → Article
  • AccessesPortal — CustomerPortalUser → Customer
  • OwnsPasswords — Customer → PasswordEntry
  • LogsTime — User → TimeSheet
  • Drives — User → LogbookEntry
  • BelongsToTenant — multi-source → Tenant via 6 from-to pairs

Shape and conventions

Each entity follows the NTO/Network/entities/IPAddress.ttl reference
shape: a rdfs:Class ; rdfs:subClassOf ogit:Entity ; ogit:scope "NTO" ; ogit:parent ogit:Node with mandatory / optional / indexed attribute
lists and ogit:allowed [ ogit:relates | ogit:belongs ... ] clauses.

Each verb is a rdfs:Class ; rdfs:subClassOf ogit:Verb with an
ogit:from-to list per spec.

Namespace IRI: ogit.WorkOrder: <http://www.purl.org/ogit/WorkOrder/>.
Field-scoped predicates camelCased (passwordHash, mustChangePw,
settingKey/settingValue, lastLogin, passwortEnc, notizenEnc,
privatAnteil, startKm, endeKm, timerStart, abgerechnet, …).
Global predicates reused where they fit (ogit:id, ogit:name,
ogit:status, ogit:email, ogit:created-at).

dcterms:source = "AdaWorldAPI/WoA/models.py:<ClassName>" is set on
every class, plus per-attribute models.py:<ClassName>.<field>
provenance pointers where new predicates were introduced.

Validation

  • All 27 TTL files parse cleanly via pyoxigraph 0.5.8 TURTLE
    parser. Zero syntax errors. 989 total triples.
  • Round-trip verified through
    lance-graph-ontology::OntologyRegistry::hydrate_once_sync
    on the consumer branch claude/create-graph-ontology-crate-gkuJG
    in AdaWorldAPI/lance-graph — see new test
    hydrate_workorder_namespace_from_real_ogit in
    crates/lance-graph-ontology/tests/hydrate_real_ogit.rs. All 15
    entities resolve through the registry; WoaBridge scope-locks the
    namespace correctly.
  • Carrier-method doctrine and SPO-1 federation (Option B) decisions
    documented in the consumer repo's
    .claude/DECISION_SPO_ARIGRAPH.md.

Test plan

  • All 27 TTL files validated via pyoxigraph (no syntax errors).
  • WorkOrder namespace hydrates through lance-graph-ontology
    registry against the real OGIT fork.
  • WoaBridge::new(registry) constructs and g_lock() matches
    registry.namespace_id("WorkOrder").
  • Every verb is a distinct relationship (anti-flattening
    preserved) — no collapse into a generic related predicate.
  • dcterms:source provenance present on every class.
  • Reviewer to confirm no overlap with planned upstream OGIT
    namespaces (almatoai/OGIT); WorkOrder is fork-only by design.

Out of scope

  • dcterms:source literal values are captured by the consumer's TTL
    parser but not yet threaded through to
    MappingProposal::source_uri. Tracked as TTL-PROBE-5 in the
    consumer repo's TECH_DEBT — does not affect this PR's TTL
    correctness.
  • PARSER-1 entropy row (4–6 parsers across the consumer workspace)
    is by design (cold-path vs hot-path); consolidation is post-migration
    work, not a blocker for this fork PR.

https://claude.ai/code/session_01WevBiZ3jzVocu8fBpTY8sq


Generated by Claude Code

…nscode

Adds 15 entities + 12 verbs transcoded from the AdaWorldAPI/WoA work-order
domain into OGIT NTO/WorkOrder/ as TTL.

Entities:
  Activity, Article, Customer, CustomerPortalUser, HistoryEntry,
  LogbookEntry, NumberSequence, Order, PasswordEntry, Picture,
  Position, Setting, Tenant, TimeSheet, User

Verbs:
  AccessesPortal, Assigned, BelongsToTenant, Drives, HasActivity,
  HasHistory, HasPicture, HasPosition, Issued, LogsTime, OwnsPasswords,
  RefersToArticle

All 27 files pass pyoxigraph 0.5.8 turtle parse validation.
@AdaWorldAPI AdaWorldAPI merged commit 490566b into master May 7, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3871d37cb0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +7 to +8
a rdfs:Class;
rdfs:subClassOf ogit:Verb;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Declare WorkOrder verbs as object properties

All newly added WorkOrder verbs use a rdfs:Class; rdfs:subClassOf ogit:Verb, while the repo's established verb shape is a owl:ObjectProperty; rdfs:subPropertyOf ogit:Verb across the existing NTO/SGO verb files. Consumers that discover relationships using the existing ObjectProperty/subPropertyOf convention will skip these 12 WorkOrder relationships even though the Turtle syntax parses cleanly.

Useful? React with 👍 / 👎.

Comment on lines +20 to +24
ogit.WorkOrder:geraet
ogit.WorkOrder:beschreibung
ogit.WorkOrder:logbuch
ogit.WorkOrder:intern
ogit:created-at
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Define the referenced WorkOrder attributes

Several attributes in these new entity attribute lists are never declared as rdfs:Property anywhere in the added namespace: for this entity geraet, logbuch, and intern are unresolved, and ogit:created-at is also not an existing global attribute (the repo uses ogit:createdAt). The same unresolved-reference pattern appears in HistoryEntry, Position, and Picture, so ontology consumers can load the entities but cannot resolve metadata/provenance for those attributes.

Useful? React with 👍 / 👎.

AdaWorldAPI pushed a commit that referenced this pull request May 7, 2026
…ch validator

Follow-up to commit 13a8d3f. The codex-recommended flat depth-3
layout (NTO/Medical/<NAME>.ttl) passes single-file validator
invocation (java -jar bin/ogit-validator.jar <one-file>) but FAILS
batch invocation through ./validate.sh.

agent-ogit-validator-fix empirically verified: validate.sh's xargs-
batch pipeline triggers a path.subpath(2, getNameCount-1) extraction
that requires >= 4 path components. Depth-3 fails with "Directory
mismatch: <NAME>.ttl should be under directory Medical". Depth-4
(NTO/Medical/namespaces/<NAME>.ttl) yields "Validation successful".

Moved the 10 BioPortal namespace stubs (git mv preserves history):

  NTO/Medical/ICD10CM.ttl  -> NTO/Medical/namespaces/ICD10CM.ttl
  NTO/Medical/RxNorm.ttl   -> NTO/Medical/namespaces/RxNorm.ttl
  NTO/Medical/LOINC.ttl    -> NTO/Medical/namespaces/LOINC.ttl
  NTO/Medical/FMA.ttl      -> NTO/Medical/namespaces/FMA.ttl
  NTO/Medical/RadLex.ttl   -> NTO/Medical/namespaces/RadLex.ttl
  NTO/Medical/SNOMED.ttl   -> NTO/Medical/namespaces/SNOMED.ttl
  NTO/Medical/MONDO.ttl    -> NTO/Medical/namespaces/MONDO.ttl
  NTO/Medical/HPO.ttl      -> NTO/Medical/namespaces/HPO.ttl
  NTO/Medical/DRON.ttl     -> NTO/Medical/namespaces/DRON.ttl
  NTO/Medical/CHEBI.ttl    -> NTO/Medical/namespaces/CHEBI.ttl

The depth-4 layout still satisfies the codex P1 finding (file basename
== subject IRI local name). The new `namespaces/` parent segment is
canonical OGIT shape (mirrors `entities/`, `verbs/`, `enumerations/`).

SQL stubs at NTO/Medical/sql_mirror/<NAME>.ttl are already at depth-4
(4 components: NTO + Medical + sql_mirror + file) and pass the batch
validator after the metadata enrichment in commit fe551f0.

Verification:
- validate.sh on this checkout: ZERO errors mention Medical/ or sql_mirror/
- Other validate.sh errors (WorkOrder verbs Issued/HasPosition/
  AccessesPortal/OwnsPasswords basename mismatch + Tenant.ttl missing
  dcterms:valid/dcterms:creator/ogit:allowed) are pre-existing in the
  v4-shipped WorkOrder namespace from prior OGIT PR #1 + PR #2 merges.
  Out of scope for this PR; tracked as separate cleanup work.

Together with commits 13a8d3f (initial flat layout) and fe551f0
(SQL stub metadata enrichment), this closes both codex P1 findings
on #3.

https://claude.ai/code/session_01WevBiZ3jzVocu8fBpTY8sq
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