Skip to content

Migrate cognitive layer from rustynum into ndarray hpc/ - #8

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/migrate-cognitive-layer-Th8ZS
Mar 16, 2026
Merged

AdaWorldAPI merged 1 commit into
masterfrom
claude/migrate-cognitive-layer-Th8ZS

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Port 11 modules from rustynum-core, rustynum-bnn, rustynum-clam, and rustynum-arrow into ndarray's hpc/ module, wiring all SIMD operations through the existing bitwise.rs dispatch (VPOPCNTDQ → AVX2 → scalar).

Core types: Fingerprint, Plane, Node, Seal, Cascade+PackedDatabase, BF16Truth, Causality, Blackboard, BNN, CLAM tree, Arrow bridge.

Also adds 4 agent definitions, 5 knowledge docs, 5 transcoded prompts, and 7 end-to-end integration tests. 319 lib tests passing, clippy clean.

https://claude.ai/code/session_01CLTZ1H5b51iHarkNgEdC5f

Port 11 modules from rustynum-core, rustynum-bnn, rustynum-clam, and
rustynum-arrow into ndarray's hpc/ module, wiring all SIMD operations
through the existing bitwise.rs dispatch (VPOPCNTDQ → AVX2 → scalar).

Core types: Fingerprint<N>, Plane, Node, Seal, Cascade+PackedDatabase,
BF16Truth, Causality, Blackboard, BNN, CLAM tree, Arrow bridge.

Also adds 4 agent definitions, 5 knowledge docs, 5 transcoded prompts,
and 7 end-to-end integration tests. 319 lib tests passing, clippy clean.

https://claude.ai/code/session_01CLTZ1H5b51iHarkNgEdC5f
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI
AdaWorldAPI merged commit 24f1345 into master Mar 16, 2026
AdaWorldAPI pushed a commit that referenced this pull request Mar 30, 2026
Tactics 1-12 from the 34-tactic integration plan, adapted to ndarray:
  styles::rte  — #1  Recursive Thought Expansion (Hofstadter)
  styles::htd  — #2  Hierarchical Thought Decomposition (CLAM)
  styles::smad — #3  Structured Multi-Agent Debate (NARS revision)
  styles::tcp  — #5  Thought Chain Pruning (Berry-Esseen)
  styles::irs  — #9  Iterative Roleplay Synthesis (XOR binding)
  styles::mcp  — #10 Meta-Cognition (Brier score calibration)
  styles::tca  — #12 Temporal Context (Reichenbach tense)

Plus additions to existing modules:
  causal_diff.rs — #4  reverse_trace() (Pearl Rung 3)
  bgz17_bridge.rs — #6  inject_noise() (simulated annealing)
  nars.rs — #7  adversarial_critique(), #11 detect_contradiction()
  cascade.rs — #8  adaptive_resolution()

Every tactic is fn(Base17, NarsTruth) → result. No LLM prompting.
16 tests passing. API: crate::hpc::styles::rte::expand() etc.

https://claude.ai/code/session_01M3at4EuHVvQ8S95mSnKgtK
AdaWorldAPI pushed a commit that referenced this pull request May 13, 2026
…rtho

f32-to-usize cast is UB in Rust for negative / NaN / out-of-range values
(reference §5.5.1). Previously project_ortho cast `(pos*scale + offset) as
usize` directly with only a post-cast `.min(screen_w-1)` clamp, which can
trigger UB on negative inputs — a real hazard once Bevy's
target-cpu=x86-64-v4 enables strict provenance.

Fix: clamp in the float domain to [0, screen_dim - 1] BEFORE the cast, so
the cast input is always finite, non-negative, and within usize range.

Also adds AGENT_LOG.md (CCA2A file blackboard) used by the 12-agent fleet
that surfaced this bug + the broader polyfill-violation audit.

Reported-by: agent #8 framebuffer (sonnet) in fleet review.
AdaWorldAPI pushed a commit that referenced this pull request Sep 4, 2026
… section

Two hygiene gaps, both found while closing out the #293/#294/#295 arc.

1. Board backfill. `.claude/blackboard.md` and `.claude/board/AGENT_LOG.md`
   contained ZERO mentions of the W1.5 signature primitives — all three PRs
   landed with no board entry, in violation of CLAUDE.md's Agent Protocol
   ("write decisions to the blackboard, not just to chat"). A session reading
   the blackboard would not have known signature_pde or randomized_signature
   existed. Entries added for #293, #294 and #295, carrying the decisions,
   the measured numbers, and the loose ends.

2. Contract-section correction. The W1.5 section of
   `.claude/knowledge/vertical-simd-consumer-contract.md` still described all
   three primitives as future work "gated on jc Pillar 11 activation". That
   gate opened 2026-05-07 (lance-graph jc/src/lib.rs:26), and #6 and #7 have
   shipped. The section is regraded in place with the workspace's existing
   ⊘-blockquote convention: original sketches kept verbatim, each followed by
   a correction block, rather than silently rewritten.

The correction worth carrying forward: this doc's API sketches have now been
wrong the same way TWICE. Both #6 and #7 were sketched as f32/F32x16 while
the real consumer (lance-graph crates/sigker) is f64/Vec<f64>, so both
shipped on F64x8. #294 additionally found the sketch wrong about buffer
ownership (projections are materialized once per encoder and reused, not
re-derived per step) and about shape (k is runtime, so the hot path is a
k×k GEMV, not a single-register update). W1.5-#8's `I16x16` sketch is
therefore marked UNVERIFIED — 2-for-2 miss rate — and must be read off
crates/sigker/src/log_signature.rs before any implementation starts.

Also recorded: W1.5-#8 is unblocked, not deferred; and #295 merged ~5s after
leaving draft, so its 100% docstring figure is a manual /// scan rather than
bot-confirmed.

Markdown only — no source, tests, or build files touched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
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