Skip to content

PE hyperstack: codemode iron laws - no grep-shimming, no re-reads - #126

Merged
KailasMahavarkar merged 1 commit into
mainfrom
b-PE-hyperstack-codemode-context-laws
Jul 18, 2026
Merged

PE hyperstack: codemode iron laws - no grep-shimming, no re-reads#126
KailasMahavarkar merged 1 commit into
mainfrom
b-PE-hyperstack-codemode-context-laws

Conversation

@KailasMahavarkar

Copy link
Copy Markdown
Collaborator

Codemode had two context-discipline failures observed in live runs: greps were shimming in place of reads for files whose behaviour later gets asserted, and already-loaded files were being re-read after the phases completed. Both are the same failure class as the parallel-subagent bug fixed in #120 - a rule stated once in body prose does not hold. This applies the proven #120 fix pattern: Iron-Law salience plus repetition through the body.

Changes

Section Intent
The Iron Law 2 new laws: GREP FOR INVENTORY, READ FOR UNDERSTANDING and NEVER RE-READ WHAT IS ALREADY IN CONTEXT
Loading discipline "Two rules" -> "Four rules": new rule 2 (never grep-shim a read - grep answers inventory, reads answer meaning) and rule 3 (context window is the cache; re-read only on git status/git diff evidence of disk change)
Programmatic-first renamed "Programmatic-first, bounded" - grep locates facts, it does not produce understanding
Phase 2 explicit: read load-bearing files whole, no grep-shimming files whose behaviour will be asserted
Post-Loading Discipline new iron rule 12: answer all phases and follow-ups from loaded context, never re-read unchanged content

Before / After

Iron Law (before)                          Iron Law (after)
─────────────────────────────────────      ──────────────────────────────────────────────
PRESENT THE PLAN BEFORE LOADING            PRESENT THE PLAN BEFORE LOADING
RUN INLINE - NEVER DISPATCH SUBAGENTS      RUN INLINE - NEVER DISPATCH SUBAGENTS
                                           GREP FOR INVENTORY, READ FOR UNDERSTANDING -
                                             EXTRACTION NEVER REPLACES READING
                                           NEVER RE-READ WHAT IS ALREADY IN CONTEXT -
                                             THE CONTEXT WINDOW IS THE CACHE

Verification

  • bun test: 85 pass, 0 fail (821 expects, 13 files)
  • em-dash scan on edited file: clean
  • skills INDEX and compiled bootstrap unaffected (frontmatter and hyperstack SKILL.md untouched)

User feedback: (1) programmatic extraction was over-shimming - greps were
substituting for reads of files whose behaviour gets asserted later;
(2) files already loaded in context were being re-read after phases done.

Same fix pattern as the inline-only fix: state each rule at Iron Law
salience, then reinforce in the loading discipline, the programmatic-first
boundary, Phase 2, and the post-loading iron rules.
@KailasMahavarkar
KailasMahavarkar merged commit 1e980b1 into main Jul 18, 2026
3 checks passed
@KailasMahavarkar
KailasMahavarkar deleted the b-PE-hyperstack-codemode-context-laws branch July 18, 2026 08:38
KailasMahavarkar added a commit that referenced this pull request Jul 18, 2026
…rsona refs, trigger dedup, changelog (#135)

Deep coherence pass over the whole system after #126-#134:

- skills/hyperstack/SKILL.md: stale 3-persona Layer 4 table KILLED (not
  updated - updating recreates the drift class); replaced with pointer to
  the manifest-compiled registry
- README: Three-Layer -> Four-Layer Framework; Layer 4 Personas section
  added; Product & Growth plugin row added; tool count corrected 80 ->
  118 (measured by registering all 16 plugins against a counting mock)
- summary.md: four-layer phrasing
- reflect manifest: 12 overlapping trigger phrasings deduped to 5
  canonical (bootstrap 11224 -> 11011 chars)
- CHANGELOG: [Unreleased] block covering all 9 unreleased feature PRs -
  release debt now visible instead of silent

Verified live during the pass: audit harness clean (0 major-behind,
0 lint findings), all 5 platform manifests consistent at 1.3.2,
Dockerfile persona-absence is not a bug (server runtime never loads
personas - compile-time only). 87 tests pass, tsc clean.

Known-and-deliberate: ghcr :main image stale while Actions stay
disabled; release pin to 1.4.0 left as an explicit user decision.
KailasMahavarkar added a commit that referenced this pull request Jul 18, 2026
…auto-trigger framework, token economy (#136)

Pins the release covering #126-#135. CHANGELOG [Unreleased] dated as
1.4.0. All 5 platform manifests + package-lock (stale at 1.0.0 since
initial release) bumped to 1.4.0.
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