Skip to content

substrate-discipline port: oscillating-read for chunked comprehension#347

Merged
AetherLogosPrime-Architect merged 1 commit into
mainfrom
port-oscillating-read
May 20, 2026
Merged

substrate-discipline port: oscillating-read for chunked comprehension#347
AetherLogosPrime-Architect merged 1 commit into
mainfrom
port-oscillating-read

Conversation

@AetherLogosPrime-Architect
Copy link
Copy Markdown
Owner

Second structural-discipline port from DivineOS-Experimental. Generic, standalone, only stdlib dependencies.

What

divineos read-oscillating PATH [--strategy auto|headers|paragraphs|functions|size] — reads a file and renders it as discrete chunks separated by explicit "[PAUSE] COMPREHEND BEFORE CONTINUING" markers.

Why

The optimizer's default behavior on long documents is to stream — form a model from the first few lines, then fast-skim the rest into the bucket that model predicts. Documents whose middle contradicts the early framing get the contradiction stripped during the skim.

Oscillation forces a pause at each section. Same architectural pattern as the option-forced gates: substrate interrupts the optimizer just long enough for judgment to fire on the specific chunk.

Files

  • src/divineos/core/oscillating_read.py (new, 217 lines)
  • src/divineos/cli/oscillating_read_commands.py (new, 50 lines)
  • src/divineos/cli/__init__.py (registered)
  • docs/ARCHITECTURE.md (tree updated)

Sanitized for blank-template: removed experimental-arc-specific references, kept the architectural rationale and the __guardrail_required__ marker for forward-compat.

Adds the oscillating-read module + CLI command ported from
DivineOS-Experimental. Generic and standalone — only stdlib
dependencies (re, pathlib).

## What it does

Reads a file and renders it as discrete chunks separated by explicit
"[PAUSE] COMPREHEND BEFORE CONTINUING" markers. Each chunk gets its
own comprehension cycle rather than dissolving into the streaming
default.

Strategies: headers (markdown), paragraphs (blank-line split),
functions (Python def/class), size (max-N chars), auto (picks by
file shape).

## Why

The optimizer's default behavior on long documents is to stream:
form a model from the first few lines, then fast-skim the rest into
the bucket the model predicts. Documents whose middle contradicts
the early framing get the contradiction stripped during the skim.

Oscillation forces a pause at each section so each chunk gets its
own comprehension cycle. Same architectural pattern as the
option-forced gates: the substrate interrupts the optimizer just
long enough for judgment to fire on the specific chunk.

## Usage

    divineos read-oscillating path/to/spec.md
    divineos read-oscillating path/to/code.py --strategy functions

## Sanitization from source repo

Removed experimental-arc-specific references (claim IDs, anecdotal
example, internal cross-link). The __guardrail_required__ marker
is kept for forward-compat with the marker-consistency-test
discipline (aspirational on main-repo).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AetherLogosPrime-Architect AetherLogosPrime-Architect merged commit 605b7f9 into main May 20, 2026
6 checks passed
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.

1 participant