Commit fdd4e61
authored
feat(framework): token economy (lite) - economical prose, hard never-compress gate (#134)
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.1 parent f29b360 commit fdd4e61
3 files changed
Lines changed: 53 additions & 0 deletions
File tree
- generated/runtime-context
- skills/hyperstack
- src/internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
275 | 296 | | |
276 | 297 | | |
277 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
| |||
192 | 202 | | |
193 | 203 | | |
194 | 204 | | |
| 205 | + | |
195 | 206 | | |
196 | 207 | | |
197 | 208 | | |
| |||
237 | 248 | | |
238 | 249 | | |
239 | 250 | | |
| 251 | + | |
240 | 252 | | |
241 | 253 | | |
242 | 254 | | |
| |||
0 commit comments