Skip to content

PE hyperstack: token economy (lite) register with hard never-compress gate - #134

Merged
KailasMahavarkar merged 1 commit into
mainfrom
f-PE-hyperstack-token-economy
Jul 18, 2026
Merged

PE hyperstack: token economy (lite) register with hard never-compress gate#134
KailasMahavarkar merged 1 commit into
mainfrom
f-PE-hyperstack-token-economy

Conversation

@KailasMahavarkar

Copy link
Copy Markdown
Collaborator

Adds a Token Economy (lite) register to the Hyperstack bootstrap: economical prose by default, with a hard never-compress gate so economy cannot eat visuals, evidence, code, or safety content. Lite means fewer words, never broken words - grammar stays intact (distinct from any user-level caveman tooling).

Design

Decision Rationale
Doctrine, not a mode modes add state + drift; a default register in the injected bootstrap is always on, "verbose" lifts it per answer
Hard NEVER list is the load-bearing part LLMs over-apply compression rules; the gate carries Iron-Law-grade wording ("over-committing economy here is a bug, not thrift")
Marker-guarded Token Economy + NEVER compress markers - the section cannot silently drop from the bootstrap
Compiler tolerance extractOptionalSection lets synthetic test sources omit the section; real absence still fails compile via markers

The gate

Compress ONLY: preamble, restating, hedging, narration, connective prose, option lists without a verdict.

NEVER compress: diagrams/tables/visuals (full padding rules), evidence (command output, errors, verification lines, numbers, ids), code/config, security + irreversible-action warnings, anything whose omission could change a decision.

Seam-closers from the live test: visuals are mandated where they beat prose (not just protected once they exist); user brevity requests ("SHORT", "minimal tokens") compress prose only - they never touch the NEVER list; clarity beats economy on conflict.

Pressure-test evidence

Scenario: docker ENOSPC error, user demands "minimal tokens" and "keep it SHORT" twice, but asks for storage-flow explanation + fix commands.

  • Prose: 7 sentences total.
  • Kept full: storage-flow box diagram, live df + docker system df evidence (agent ran the commands), 4 fix commands + verify step, destructive image prune -a warning.
  • ~75% of response lines were uncompressed visual/evidence/command content - economy landed entirely on prose glue.
  • Self-report's 2 exploitable seams both closed in this PR.

Verification

  • bun test: 87 pass, 0 fail
  • bun run compile:context: succeeds with new markers enforced
  • em-dash sweep: clean

…compress gate

Default output register compiled into every session's bootstrap: say it
once, fewer words, grammar intact (lite, not caveman - words never break).

Compress ONLY prose glue: preamble, restating, hedging, narration,
option lists without a verdict.

NEVER compress (hard gate, marker-guarded): diagrams/tables/visuals
(padding rules stay), evidence (command output, errors, verification
lines, numbers, ids), code/config, security + irreversible-action
warnings, anything whose omission could change a decision.

Seams closed from live pressure test: visuals are mandated where they
beat prose (gate protects them once they exist AND requires them);
user brevity requests compress prose only - they never touch the NEVER
list; clarity beats economy on conflict.

Compiler: extractOptionalSection (missing section tolerated in synthetic
sources, real absence caught by new markers 'Token Economy' +
'NEVER compress').

Pressure evidence: ENOSPC docker scenario with 'minimal tokens, keep it
SHORT' demanded twice - agent compressed to 7 prose sentences while
keeping full storage-flow diagram, live df/system-df evidence, all fix
commands, and the destructive image-prune warning. 87 tests pass.
@KailasMahavarkar
KailasMahavarkar merged commit fdd4e61 into main Jul 18, 2026
@KailasMahavarkar
KailasMahavarkar deleted the f-PE-hyperstack-token-economy branch July 18, 2026 09:54
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.
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