@prom.codes/saver 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +9 -9
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -34,26 +34,26 @@ var SAVER_RUNTIMES = [
|
|
|
34
34
|
];
|
|
35
35
|
var BLOCK_START = "<!-- prom-saver:start -->";
|
|
36
36
|
var BLOCK_END = "<!-- prom-saver:end -->";
|
|
37
|
-
var NEVER_COMPRESS = `**Never
|
|
37
|
+
var NEVER_COMPRESS = `**Never cut substance (all levels) \u2014 these are never "filler":**
|
|
38
38
|
- Code, diffs, commit messages, CLI commands, API names, file paths and exact error strings \u2014 verbatim.
|
|
39
|
-
- Load-bearing caveats, trade-offs, warnings
|
|
40
|
-
- Destructive, irreversible or multi-step sequences \u2014 spell those out in full.
|
|
41
|
-
- **Anything you will need on a later turn \u2014 your own working context.** What you write IS your memory of this turn; condensing a recap
|
|
39
|
+
- Load-bearing caveats, trade-offs, warnings, negations ("not"/"only"/"unless"/"before"), and \u2014 for risky or destructive work \u2014 safer alternatives, precautions, dependency/foreign-key checks and backup/rollback advice. If it changes correctness or safety, keep it.
|
|
40
|
+
- Destructive, irreversible or multi-step sequences \u2014 spell those out in full, including every step the task needs to actually work (e.g. a "without downtime" procedure keeps the dual-running / grace-period steps).
|
|
41
|
+
- **Anything you will need on a later turn \u2014 your own working context.** What you write IS your memory of this turn; condensing a recap is never a reason to drop a file path, value, decision, finding or error you may act on again. When unsure whether a detail matters later, keep it.`;
|
|
42
42
|
var LEVEL_BODY = {
|
|
43
|
-
lite: `
|
|
44
|
-
balanced: `Lead with the answer or the action
|
|
45
|
-
aggressive: `Telegraphic prose: drop articles and filler, minimal hedging, the shortest wording
|
|
43
|
+
lite: `Drop ceremony and filler from your prose: no greetings, apologies, sign-offs, restating the question, or "I will now\u2026" preamble. Otherwise write normally.`,
|
|
44
|
+
balanced: `Lead with the answer or the action; cut preamble, sign-offs and play-by-play self-narration. Don't restate the question or pad. When several examples would be near-duplicates, give one. When recapping long tool or command output, keep the lines that carry meaning (failures, errors, the decision) and drop the noise. But include every step, caveat and precaution the answer needs to be correct and safe \u2014 if removing something would let a competent reviewer call the answer wrong, incomplete or unsafe, it stays. Lean, not terse: shorter because there is less filler, never because there is less help.`,
|
|
45
|
+
aggressive: `Telegraphic prose: drop articles and filler, minimal hedging, the shortest unambiguous wording; recap tool output as the load-bearing lines only. Opt-in \u2014 more savings, more risk: the carve-outs below are hard limits, and you MUST fall back to "balanced" for any code-generation, debugging or destructive/irreversible work, where losing a single detail is costly.`
|
|
46
46
|
};
|
|
47
47
|
function ruleBlockFor(level) {
|
|
48
48
|
return `## prom.codes Saver \u2014 efficient output (level: ${level})
|
|
49
49
|
|
|
50
|
-
Cut token cost
|
|
50
|
+
Cut token cost by writing less FILLER \u2014 without cutting quality or losing context. This shapes ONLY how you PHRASE your own messages: never code, commands, tool inputs, what you do, or what you need to remember. Trim ceremony, restating, padding and redundant examples; keep all substance.
|
|
51
51
|
|
|
52
52
|
${LEVEL_BODY[level]}
|
|
53
53
|
|
|
54
54
|
${NEVER_COMPRESS}
|
|
55
55
|
|
|
56
|
-
Correctness, safety, completeness and your own working context come FIRST; saving tokens comes second. If the two ever conflict, do not compress.`;
|
|
56
|
+
Correctness, safety, completeness and your own working context come FIRST; saving tokens comes second. If the two ever conflict, do not compress \u2014 cut filler, never substance.`;
|
|
57
57
|
}
|
|
58
58
|
function withMarkers(block) {
|
|
59
59
|
return `${BLOCK_START}
|