Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,047 changes: 1,047 additions & 0 deletions .claude/board/AGENT_ORCHESTRATION_LOG.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> **Auto-injected at session start via SessionStart hook.**
> Updated after every merged PR.
> **Last updated:** 2026-05-07 (PR #353 merged: palantir-parity-cascade v2 capstone + SoA DTO entropy ledger + #352 post-merge governance). Prior: 2026-05-07 (PR #352 merged: lance-graph-ontology v5 + ogit-cascade v1 plans). Prior: 2026-05-06 (splat-osint-ingestion-v1 PR 1+2 of 6 in flight). Prior: 2026-04-21 post PR #243.
> **Last updated:** 2026-05-07 (PR #354 merged: governance close-out for #353; cross-repo coordinated landing complete with OGIT#2 + woa-rs#2 + MedCare-rs#109). Prior: 2026-05-07 (PR #353 merged). Prior: 2026-05-07 (PR #352 merged). Prior: 2026-05-06 (splat-osint-ingestion-v1 PR 1+2 of 6 in flight). Prior: 2026-04-21 post PR #243.
>
> Purpose: prevent new sessions from hallucinating structure that
> already exists or proposing features already shipped. Read this
Expand All @@ -14,6 +14,7 @@

| PR | Merged | Title | What it added |
|---|---|---|---|
| **#354** | 2026-05-07 | gov: #353 post-merge + cross-repo adjacent-landings | Pure governance close-out. PR_ARC entry for #353 + LATEST_STATE row. Documents the 5-PR coordinated landing across 4 repos: lance-graph #352/#353/#354 + OGIT #2 (woa+medcare bridges unblocked for OGIT-O(1)) + woa-rs #2 (cross-repo `--features ontology` integration) + MedCare-rs #109 (`?source=lance` exercising Zone 2 → Zone 3 rewriter chain). Locks: append-only board hygiene durability across 4 sequential prepends; cross-repo coordinated-landing recipe. |
| **#353** | 2026-05-07 | plan: palantir-parity-cascade v2 + SoA DTO entropy ledger + #352 post-merge governance | Three artifacts. **v2 capstone** (262 lines): integrates 4 prior Foundry parity docs. Pillar 0 carry-forward: Foundry parity IS SoA-as-canon parity. Column H (PR #272 SHIPPED) is already the Foundry Object Type bridge. 15 D-PARITY-V2 deliverables. **SoA DTO entropy ledger** (210 lines, append-only knowledge): 22 DTOs classified across 4 tiers (sensor → engine → contract → callcenter). Buckets: 9 bare-metal / 7 SoA-glue / 6 bridge-projection (3 OPEN). `ResonanceDto` IS the SoA. Codec cascade columns all OPEN today. **#352 post-merge governance**: PR_ARC + LATEST_STATE updates. |
| **#352** | 2026-05-07 | plan: lance-graph-ontology v5 + ogit-cascade v1 | Two-plan PR. **v5** (177 lines): 15 deliverables for ontology crate post-merge follow-on (D-1 dcterms:source, D-2 SpoBridge::promote_to_spo, D-9 ontology-aware MUL thresholds). 4 ratifications (smb-ontology export-only, D-9 above D-2, MulThresholdProfile in lance-graph-contract, OGIT-fork upstream non-PR). **v1 cascade** (209 lines): 15 D-CASCADE deliverables for SoA-as-canon + Zone 1/2/3 + BioPortal arsenal + bridge collapse. **Pillar 0**: OntologyRegistry IS the SoA, schema IS the DTO + name→row index. **Codec cascade per row** (target state, NOT YET WIRED — D-CASCADE-V1-7): identity Vsa16kF32 → CAM-PQ 6 B → Base17 34 B → palette key 4 B → Scent 1 B + qualia 18×f32 + meta 8 B + edge 8 B, every step O(1). |
| **#243** | *(open)* | D5+D7 categorical-algebraic inference | `thinking_styles.rs` (490 LOC, 12 tests), `free_energy.rs` (347 LOC, 7 tests), `role_keys.rs` bind/unbind/recovery (295 LOC, 14 tests), `content_fp.rs` (98 LOC, 5 tests), `markov_bundle.rs` (250 LOC, 8 tests), `trajectory.rs` (298 LOC, 4 tests). Plans: `categorical-algebraic-inference-v1.md` (496 lines). Knowledge: `paper-landscape-grammar-parsing.md`, `session-2026-04-21-categorical-click.md`. CLAUDE.md § The Click (P-1). 12 epiphanies. |
Expand Down
20 changes: 20 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@

---

## #354 — gov: #353 post-merge + adjacent-landings (#109, OGIT#2, woa-rs#2) (merged 2026-05-07)

**Confidence (2026-05-07):** governance-only PR, no plan / knowledge / code changes. Append-only board hygiene confirmed working — merged cleanly, no past entries edited. **Status:** Merged to `main` as `a6797ad`.

**Added:**
- `.claude/board/PR_ARC_INVENTORY.md` — full Added/Locked/Deferred entry for #353 prepended.
- `.claude/board/LATEST_STATE.md` — `#353` row prepended; "Last updated" advanced.

**Locked:**
- **Append-only board hygiene works in practice** — the prepend pattern survived 4 sequential PR landings (#352, #353, #354, plus prior splat-osint) without any past-entry mutation. Confidence-line-only mutability policy is durable.
- **Cross-repo coordinated landing pattern** is documented as a 5-PR-in-a-day recipe: lance-graph plans → OGIT TTL → woa-rs/medcare-rs consumer integration → lance-graph governance close-out.

**Deferred:** none — pure governance.

**Docs:** none added — only board updates.

**Resolves ledger rows:** none. **Closes the governance loop** for the #352 → #353 → #354 sequence.

---

## #353 — plan: palantir-parity-cascade v2 + SoA DTO entropy ledger + #352 post-merge governance (merged 2026-05-07)

**Confidence (2026-05-07):** plan-only, pre-execution. Pillar 0 carry-forward (Foundry parity IS SoA-as-canon parity) is the architectural anchor; v2 integrates 4 prior Foundry parity docs without duplicating. SoA DTO ledger formalizes 22 DTOs across 4 tiers as the canonical classification artifact. **Status:** Merged to `main` as `4d0c2d9`.
Expand Down
156 changes: 156 additions & 0 deletions .claude/knowledge/business-thinking-ogit-triangle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Business-Thinking-OGIT Triangle (append-only knowledge)

> **Status:** D-PARITY-V2-2 (palantir-parity-cascade-v2 §"Business Logic ↔ Thinking-style ↔ OGIT").
> **Authored:** 2026-05-07.
> **READ BY:** crewai-rust (agent dispatch), n8n-rs (workflow routing),
> lance-graph-planner (strategy selection), business-logic
> module authors when proposing new operations.
> **Append-only:** new operations append rows; rows already published
> are never edited. Confidence/correction notes append below the table
> as dated entries.
>
> **Iron rule of this doc:** every row cites a real `*.ttl` under
> `/home/user/OGIT/NTO/<Namespace>/verbs/` AND a real
> `lance_graph_contract::thinking::ThinkingStyle` variant. If a row
> appears that fails either check, it is invalid and must be reverted
> in a follow-up dated entry.

## The triangle (recap from the v2 plan)

```
Thinking style
(lance_graph_contract::thinking::ThinkingStyle, 36 variants)
│ dispatches
Business operation ──┼── OGIT verb
(industry case) │ (OGIT/NTO/<Namespace>/verbs/<verb>.ttl)
│ describes
OGIT entities
(OGIT/NTO/<Namespace>/entities/*.ttl, the
ogit:from / ogit:to of the verb)
```

Each row carries `(operation_name, thinking_style, ogit_verb,
ogit_entities[])`. The ThinkingStyle is the closest cluster member
from the 36 styles — picked by reading
`crates/lance-graph-contract/src/thinking.rs` and matching the verb's
`dcterms:description` to one of the six clusters
(Analytical / Creative / Empathic / Direct / Exploratory / Meta) and
then to the specific style inside that cluster.

## Routing table — WorkOrder namespace (12 rows, v2 D-PARITY-V2-9 first batch)

The 12 verbs below are the WorkOrder NTO verbs in OGIT (per
`/home/user/OGIT/NTO/WorkOrder/verbs/*.ttl`). Each row maps a
business operation to its dispatched ThinkingStyle and the OGIT
subject/object entities the verb connects.

| # | Operation (business) | ThinkingStyle | Cluster | OGIT verb (TTL) | OGIT entities (`from` → `to`) |
|---|---|---|---|---|---|
| 1 | Issue order | `Pragmatic` | Direct | `OGIT/NTO/WorkOrder/verbs/Issued.ttl` | `ogit.WorkOrder:Customer` → `ogit.WorkOrder:Order` |
| 2 | Assign user to order | `Methodical` | Analytical | `OGIT/NTO/WorkOrder/verbs/Assigned.ttl` | `ogit.WorkOrder:User` → `ogit.WorkOrder:Order` |
| 3 | Add line item | `Systematic` | Analytical | `OGIT/NTO/WorkOrder/verbs/HasPosition.ttl` | `ogit.WorkOrder:Order` → `ogit.WorkOrder:Position` |
| 4 | Record work activity | `Investigative` | Exploratory | `OGIT/NTO/WorkOrder/verbs/HasActivity.ttl` | `ogit.WorkOrder:Order` → `ogit.WorkOrder:Activity` |
| 5 | Attach picture | `Precise` | Analytical | `OGIT/NTO/WorkOrder/verbs/HasPicture.ttl` | `ogit.WorkOrder:Order` → `ogit.WorkOrder:Picture` |
| 6 | Audit history | `Reflective` | Meta | `OGIT/NTO/WorkOrder/verbs/HasHistory.ttl` | `ogit.WorkOrder:Order` → `ogit.WorkOrder:HistoryEntry` |
| 7 | Reference catalogue article | `Analytical` | Analytical | `OGIT/NTO/WorkOrder/verbs/RefersToArticle.ttl` | `ogit.WorkOrder:Position` → `ogit.WorkOrder:Article` |
| 8 | Authenticate portal user | `Critical` | Analytical | `OGIT/NTO/WorkOrder/verbs/AccessesPortal.ttl` | `ogit.WorkOrder:CustomerPortalUser` → `ogit.WorkOrder:Customer` |
| 9 | Custody password vault | `Sovereign` | Meta | `OGIT/NTO/WorkOrder/verbs/OwnsPasswords.ttl` | `ogit.WorkOrder:Customer` → `ogit.WorkOrder:PasswordEntry` |
| 10 | Log billable time | `Concise` | Direct | `OGIT/NTO/WorkOrder/verbs/LogsTime.ttl` | `ogit.WorkOrder:User` → `ogit.WorkOrder:TimeSheet` |
| 11 | Record vehicle trip | `Logical` | Analytical | `OGIT/NTO/WorkOrder/verbs/Drives.ttl` | `ogit.WorkOrder:User` → `ogit.WorkOrder:LogbookEntry` |
| 12 | Partition by tenant | `Frank` | Direct | `OGIT/NTO/WorkOrder/verbs/BelongsToTenant.ttl` | many entity classes → `ogit.WorkOrder:Tenant` (mandatory partition) |

### Per-row rationale

1. **Issue order** — `Pragmatic`: Customer issuing an Order is a
transactional commit. The Direct cluster's `Pragmatic` variant is
the cluster member that emphasises "act on what is, not what
could be"; it dispatches the convergent path that commits the
transaction with minimal deliberation.
2. **Assign user to order** — `Methodical`: allocating a user to an
Order is a structured scheduling step. The Analytical cluster's
`Methodical` variant captures "step-by-step with explicit
preconditions" — exactly resource assignment shape.
3. **Add line item** — `Systematic`: composing Positions onto an
Order is decomposition of a whole into parts. `Systematic` (also
Analytical) is the cluster member that builds wholes from parts.
4. **Record work activity** — `Investigative`: Activities log what
happened during work execution; the Exploratory cluster's
`Investigative` variant is "uncovering and recording observed
facts" — matches activity logging better than Methodical's
prescriptive shape.
5. **Attach picture** — `Precise`: pictures are visual evidence;
`Precise` (Analytical) emphasises lossless capture, which is the
correct disposition for photo documentation.
6. **Audit history** — `Reflective`: HistoryEntry is metacognition
over the Order's own past — a reading-back of state transitions.
The Meta cluster's `Reflective` variant fires when the system
reasons about its own previous decisions.
7. **Reference catalogue article** — `Analytical`: catalog lookups
are pure joins. The Analytical cluster's namesake `Analytical`
variant dispatches the standard join cost model.
8. **Authenticate portal user** — `Critical`: every portal login is
a gating decision; `Critical` (Analytical) is the cluster member
that fires on yes/no security predicates and surfaces failure
immediately.
9. **Custody password vault** — `Sovereign`: vault custody is a
final-authority operation — there is no further appeal once the
Customer accepts custody. `Sovereign` (Meta) is the cluster
member that owns the buck-stops-here disposition.
10. **Log billable time** — `Concise`: time entry is a one-shot
commit with no narrative; the Direct cluster's `Concise` variant
emphasises minimal payload. Distinct from `Pragmatic` (Issue
order) by virtue of being information-thin rather than
action-thin.
11. **Record vehicle trip** — `Logical`: a Fahrtenbuch (logbook)
entry is a structured sequence (start → route → end) with
business-vs-private flag. `Logical` (Analytical) is the
sequential-reasoning cluster member that models "this leads to
that" routing.
12. **Partition by tenant** — `Frank`: every multi-tenant entity
must declare its tenant. `Frank` (Direct) is the cluster member
that asserts assignment without deliberation — exactly the
shape of mandatory partitioning at row creation.

## Confidence / corrections (append below)

- **2026-05-07 (initial publication):** rows 1-12 are the closest
cluster picks given the 36-variant taxonomy in
`lance_graph_contract::thinking`. None has been validated against
real dispatch traces; treat them as **CONJECTURE** until a
reasoning probe confirms the cluster choice survives a real
workload. The cluster (column 4) is the more durable claim; the
specific variant within the cluster (column 3) is the more
fragile one.

## Cross-references

- `.claude/plans/palantir-parity-cascade-v2.md` §"Business Logic ↔
Thinking-style ↔ OGIT (the third triangle)" — the architectural
framing this doc fills in.
- `.claude/plans/ogit-cascade-supabase-callcenter-v1.md` Pillar 1 —
OGIT as the universal SPO-G lingua franca; this doc is the
routing table on top.
- `crates/lance-graph-contract/src/thinking.rs` — the canonical 36
ThinkingStyle variants in 6 clusters (Analytical 0..5,
Creative 6..11, Empathic 12..17, Direct 18..23, Exploratory
24..29, Meta 30..35).
- `OGIT/NTO/WorkOrder/verbs/*.ttl` — the 12 verb TTL files cited
per row.
- `crewai-rust` agent dispatch + `n8n-rs` workflow routing — the
consumers that read this routing table.

## Out of scope (this batch)

- **Healthcare / SMB / CallCenter namespaces** — populate in v3
(after the 12-row WorkOrder pattern is validated).
- **Verb-on-verb composition** (e.g. "Issue order then Assign
user") — currently covered by `UnifiedStep.depends_on` per
D-PARITY-V2-6 (LF-12 Pipeline DAG), not by this routing table.
- **Field modulation per operation** — `FieldModulation` already
travels with `ThinkingStyle`; per-operation overrides would be a
separate column in this table only if dispatch traces show the
default modulation is wrong.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"crates/lance-graph-rbac",
"crates/lance-graph-ontology",
"crates/bgz-tensor",
"tools/dto-class-check",
]
exclude = [
# Python bindings (upstream-inherited, opt-in via --manifest-path)
Expand Down
26 changes: 21 additions & 5 deletions crates/cognitive-shader-driver/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use lance_graph_contract::collapse_gate::{GateDecision, MergeMode, ALPHA_SATURAT
use lance_graph_contract::grammar::free_energy::{FreeEnergy, EPIPHANY_MARGIN};
use lance_graph_contract::grammar::inference::NarsInference;
use lance_graph_contract::grammar::thinking_styles::{GrammarStyleAwareness, ParamKey, ParseOutcome};
use lance_graph_contract::mul::{MulAssessment, SituationInput};
use lance_graph_contract::mul::{MulAssessment, MulThresholdProfile, SituationInput};
use lance_graph_contract::thinking::ThinkingStyle;
use p64_bridge::cognitive_shader::CognitiveShader;

Expand Down Expand Up @@ -302,14 +302,30 @@ impl ShaderDriver {
};
let mul = MulAssessment::compute(&situation);

// D-CASCADE-V1-7: ctx_id resolves via BindSpace.entity_type +
// optional OntologyRegistry handle; per-row context column is
// Wave-3.5 follow-up (gate is one-per-dispatch today).
let ctx_id: u32 = passed_rows.first().copied().and_then(|r| {
let etid = self.bindspace.entity_type[r as usize];
if etid == 0 { return None; }
self.bindspace.ontology().and_then(|reg| {
reg.enumerate_first_with_entity_type_id(etid)
.map(|row| row.ontology_context_id())
})
Comment on lines +311 to +314
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Wire real ontology context IDs into MUL gating

For Healthcare/Medical rows this still selects the default MUL profile, because row.ontology_context_id() is always 0 for registry-created rows: RegistryState::append builds SchemaPtr::new(...) and the only with_context_id uses in the repo are tests. As a result the newly added MEDICAL/CALLCENTER thresholds are never reached in real dispatches even when BindSpace.entity_type resolves a row.

Useful? React with 👍 / 👎.

}).unwrap_or(0);
let profile = MulThresholdProfile::for_context(ctx_id);
let trust_below_floor = (mul.trust.value as f32) < profile.trust_min;

// Gate decision: catastrophic F blocks; MUL veto on
// unskilled-overconfident downgrades any would-be Flow to Hold;
// epiphany holds (preserve the contradiction); homeostasis flows.
// unskilled-overconfident OR sub-profile trust downgrades any
// would-be Flow to Hold; epiphany holds (preserve the contradiction);
// homeostasis flows.
let gate = if free_energy.is_catastrophic() {
GateDecision::BLOCK
} else if mul.is_unskilled_overconfident() {
} else if mul.is_unskilled_overconfident() || trust_below_floor {
// MUL veto: the system "feels confident" while DK / trust
// textures flag the gap. Hold rather than commit.
// textures flag the gap, OR trust falls below the
// ontology-context profile's floor. Hold rather than commit.
GateDecision::HOLD
} else if is_epiphany {
GateDecision::HOLD
Expand Down
Loading
Loading