enigma-cli 1.35.3 → 1.35.5

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/README.md CHANGED
@@ -85,7 +85,9 @@ enigma compress [file] Compress JSON/logs/text to fewer tokens (reversible via C
85
85
  enigma verify Check that work reported as finished actually is: scans the change for
86
86
  unfinished work and runs your verification command. parity <src> <dst>
87
87
  compares a codebase against a port of it. --json emits one document;
88
- exits 1 on findings, 2 when the check could not run. Also runs at turn end
88
+ exits 1 on findings, 2 when the check could not run. Also runs at turn
89
+ end, where it additionally checks the reply itself against your
90
+ output-style level
89
91
  enigma mcp Run the context-compression MCP server over stdio
90
92
  enigma dashboard|dash Open the local dashboard (manage enigma; see savings) in your browser (http://enigma,
91
93
  or http://localhost:24282 if :80/hosts is unavailable)
@@ -481,6 +483,11 @@ other safety-critical replies. Only the selected level's rules are deployed, so
481
483
  asking for "normal mode" lifts the compression for the rest of the session while
482
484
  changing level takes `enigma config output-style <level>` and an agent restart.
483
485
 
486
+ Set to anything but `off`, it is also enforced: the `enigma verify` turn-end
487
+ hook scans the reply itself for filler, an announcing-the-work preamble, and
488
+ padded table rows, and denies the stop on the ones it can catch without false
489
+ positives (`enigma guardrails stats` reports how often a reply broke the level).
490
+
484
491
  Claude Code's status bar shows an `[ENIGMA]` badge at all times; while the mode is
485
492
  active it appends the level (`[ENIGMA:FULL]`, `[ENIGMA:LITE]`, `[ENIGMA:ULTRA]`).
486
493
  enigma wires this into `settings.json` during `enigma install`, only when you have
@@ -151,14 +151,15 @@ model while review keeps the strong one.
151
151
  - `auto-fix` - mechanical, low-risk; authorize on your own judgment with
152
152
  `--action fix`.
153
153
  - `no-op` - informational; nothing to do.
154
- - `ask-user` - a judgment call only the user can make. STOP and escalate it
155
- (see below) before responding.
154
+ - `ask-user` - the review could not settle it mechanically. Apply the
155
+ escalation bar below before deciding whether it is really the user's call.
156
156
 
157
157
  The gate object also carries `fix_policy`, the user's standing answer to "who
158
158
  decides?". Follow it - the `help` line spells out what it means for the gate in
159
159
  front of you, and it is the user's setting, not a suggestion:
160
160
  - `assisted` (default) - anything mechanical was already settled before this
161
- gate reached you, so what is left is the judgment call. Escalate it.
161
+ gate reached you. Escalate what is left only if it clears the bar below;
162
+ otherwise fix it yourself.
162
163
  - `ask` - the user wants every finding put to them, `auto-fix` ones included.
163
164
  Relay them and let the user choose instead of authorizing anything yourself.
164
165
  - `auto` - the user asked you to settle everything. Respond without checking back.
@@ -194,11 +195,27 @@ acknowledge those and list each fix.
194
195
 
195
196
  ## Escalate ask-user findings
196
197
 
197
- A finding marked `ask-user` is the user's decision, not yours. Relay it verbatim
198
- (its `id`, `file`, full `description`) - do not paraphrase or pre-judge - ask how
199
- to proceed, then translate their answer into the matching `respond` call. The
200
- exceptions are `fix_policy: auto` and `--yes` (below), both of which are standing
201
- consent to drive every gate unattended.
198
+ **"Should I fix this?" is not an escalation.** Under `assisted` the user already
199
+ said fix, and ask about the rest - the rest being a genuine doubt, not permission
200
+ to repair a defect the review just proved. A finding clears the bar only when the
201
+ answer is not already yes:
202
+
203
+ - fixing it would contradict what the user asked for, or undo a decision they
204
+ made deliberately;
205
+ - fixing it changes agreed product behavior, or breaks something else;
206
+ - the fix is a very large change, not a repair.
207
+
208
+ Everything else - a bug, a regression, a rollback that reopens what the change
209
+ closed, a missing guard - you authorize yourself with `--action fix` and real
210
+ `--instructions`. Recommending a fix and then asking permission for it is the
211
+ same question twice: if your own answer is "fix it", respond `fix`. Under `ask`
212
+ the bar does not apply: everything goes back to the user. Under `auto`, nothing
213
+ does.
214
+
215
+ When a finding does clear the bar, relay it verbatim (its `id`, `file`, full
216
+ `description`) - do not paraphrase or pre-judge - ask how to proceed, then
217
+ translate the answer into the matching `respond` call. Batch every such finding
218
+ into ONE question rather than one gate per round trip.
202
219
 
203
220
  If you have clear consent to drive the whole run automatically, pass `--yes` to
204
221
  `axi run` or `axi respond`: it treats every actionable finding (auto-fix and
@@ -98,13 +98,13 @@ Prose to the user is compressed at level **{{output-level}}**. It shapes the ANS
98
98
  <!-- enigma:gate:start -->
99
99
  ### AI Quality Gate (Automatic)
100
100
 
101
- - The AI quality gate is active. When you finish a code task and the changes are committed, drive the gate yourself before reporting the work done - on WHATEVER branch the work is on, the default branch included. The user should not have to ask for it or run any setup command.
102
- - Skip automatic driving only when: the user told you to skip it, the repo's `.enigma.json` sets `gate: false`, there is nothing committed to validate, or `axi run` refuses the branch as protected (`gate-protected-branches`) - then say so and leave the work unvalidated rather than switching branches on your own. To stop it for good the user runs `/gate off` (this project) or `enigma config gate off -g` (everywhere); offer that instead of quietly not running it.
103
- - Those are the only exits and each has to be NAMED. Asking is not one of them: the gate being on is already the decision, so "the gate has not run, tell me if you want me to launch it" ends a turn on a question with one answer. Ending unvalidated and silent is worse. `enigma verify` denies the stop both ways - on a message that reports the gate as skipped, and on commits no run ever saw.
104
- - On the default branch the pipeline opens no PR and its push lands directly on that branch. That is the intended behavior there; report it as the outcome instead of waiting for a PR link.
105
- - If the repo is not initialized yet (`enigma gate axi` says so), run `enigma gate init` once yourself, then proceed - an uninitialized repo is a setup step you can perform, never a reason to stop or ask. If `enigma gate` itself misbehaves, `enigma gate doctor` reports why.
106
- - Drive it through the `/gate` workflow (`enigma gate axi run --intent "<what the user set out to accomplish>"`). A gate it hands back carries `fix_policy`, the user's standing answer to who decides - follow it: under `assisted` (the default) escalate the `ask-user` findings verbatim, under `ask` put every finding to the user before authorizing anything, under `auto` settle them all yourself. Do NOT pass `--yes` (the setting is how the user grants that) and do NOT merge the PR yourself - on `checks-passed`, leave the PR ready and ask the user to review and merge it.
107
- - While a run is active never edit code to fix a finding; the pipeline owns the fixes (respond with `--action fix`). The full command reference lives in the gate skill / `/gate` command.
101
+ - The AI quality gate is active. When you finish a code task and the changes are committed, drive the gate yourself before reporting the work done - on WHATEVER branch the work is on, the default branch included. The user should not have to ask for it.
102
+ - Skip automatic driving only when: the user told you to skip it, the repo's `.enigma.json` sets `gate: false`, there is nothing committed to validate, or `axi run` refuses the branch as protected (`gate-protected-branches`) - then say so and leave the work unvalidated rather than switching branches on your own. To stop it for good the user runs `/gate off` (this project) or `enigma config gate off -g` (everywhere); offer that instead of silently skipping it.
103
+ - Those are the only exits and each has to be NAMED. Asking is not one of them: the gate being on is already the decision, so "tell me if you want me to launch it" ends a turn on a question with one answer. Ending unvalidated and silent is worse. `enigma verify` denies the stop both ways - on a message that reports the gate as skipped, and on commits no run ever saw.
104
+ - On the default branch the pipeline opens no PR and its push lands directly on that branch. That is intended there; report it as the outcome instead of waiting for a PR link.
105
+ - If the repo is not initialized yet (`enigma gate axi` says so), run `enigma gate init` once yourself, then proceed - it is a setup step you can perform, never a reason to stop or ask. If `enigma gate` misbehaves, `enigma gate doctor` reports why.
106
+ - Drive it through the `/gate` workflow (`enigma gate axi run --intent "<what the user set out to accomplish>"`). A gate it hands back carries `fix_policy`, the user's standing answer to who decides: under `assisted` (the default) escalate only what contradicts the request, undoes a deliberate decision, changes agreed behavior, or needs a very large change, and fix the rest yourself ("should I fix this?" is never the question); under `ask` put every finding to the user first; under `auto` settle them all yourself. Do NOT pass `--yes` (the setting is how the user grants it) and do NOT merge the PR yourself - on `checks-passed`, leave it ready for the user to review and merge.
107
+ - While a run is active never edit code to fix a finding; the pipeline owns the fixes (respond with `--action fix`). Full command reference: the gate skill / `/gate` command.
108
108
  <!-- enigma:gate:end -->
109
109
 
110
110
  ---
@@ -98,13 +98,13 @@ Prose to the user is compressed at level **{{output-level}}**. It shapes the ANS
98
98
  <!-- enigma:gate:start -->
99
99
  ### AI Quality Gate (Automatic)
100
100
 
101
- - The AI quality gate is active. When you finish a code task and the changes are committed, drive the gate yourself before reporting the work done - on WHATEVER branch the work is on, the default branch included. The user should not have to ask for it or run any setup command.
102
- - Skip automatic driving only when: the user told you to skip it, the repo's `.enigma.json` sets `gate: false`, there is nothing committed to validate, or `axi run` refuses the branch as protected (`gate-protected-branches`) - then say so and leave the work unvalidated rather than switching branches on your own. To stop it for good the user runs `/gate off` (this project) or `enigma config gate off -g` (everywhere); offer that instead of quietly not running it.
103
- - Those are the only exits and each has to be NAMED. Asking is not one of them: the gate being on is already the decision, so "the gate has not run, tell me if you want me to launch it" ends a turn on a question with one answer. Ending unvalidated and silent is worse. `enigma verify` denies the stop both ways - on a message that reports the gate as skipped, and on commits no run ever saw.
104
- - On the default branch the pipeline opens no PR and its push lands directly on that branch. That is the intended behavior there; report it as the outcome instead of waiting for a PR link.
105
- - If the repo is not initialized yet (`enigma gate axi` says so), run `enigma gate init` once yourself, then proceed - an uninitialized repo is a setup step you can perform, never a reason to stop or ask. If `enigma gate` itself misbehaves, `enigma gate doctor` reports why.
106
- - Drive it through the `/gate` workflow (`enigma gate axi run --intent "<what the user set out to accomplish>"`). A gate it hands back carries `fix_policy`, the user's standing answer to who decides - follow it: under `assisted` (the default) escalate the `ask-user` findings verbatim, under `ask` put every finding to the user before authorizing anything, under `auto` settle them all yourself. Do NOT pass `--yes` (the setting is how the user grants that) and do NOT merge the PR yourself - on `checks-passed`, leave the PR ready and ask the user to review and merge it.
107
- - While a run is active never edit code to fix a finding; the pipeline owns the fixes (respond with `--action fix`). The full command reference lives in the gate skill / `/gate` command.
101
+ - The AI quality gate is active. When you finish a code task and the changes are committed, drive the gate yourself before reporting the work done - on WHATEVER branch the work is on, the default branch included. The user should not have to ask for it.
102
+ - Skip automatic driving only when: the user told you to skip it, the repo's `.enigma.json` sets `gate: false`, there is nothing committed to validate, or `axi run` refuses the branch as protected (`gate-protected-branches`) - then say so and leave the work unvalidated rather than switching branches on your own. To stop it for good the user runs `/gate off` (this project) or `enigma config gate off -g` (everywhere); offer that instead of silently skipping it.
103
+ - Those are the only exits and each has to be NAMED. Asking is not one of them: the gate being on is already the decision, so "tell me if you want me to launch it" ends a turn on a question with one answer. Ending unvalidated and silent is worse. `enigma verify` denies the stop both ways - on a message that reports the gate as skipped, and on commits no run ever saw.
104
+ - On the default branch the pipeline opens no PR and its push lands directly on that branch. That is intended there; report it as the outcome instead of waiting for a PR link.
105
+ - If the repo is not initialized yet (`enigma gate axi` says so), run `enigma gate init` once yourself, then proceed - it is a setup step you can perform, never a reason to stop or ask. If `enigma gate` misbehaves, `enigma gate doctor` reports why.
106
+ - Drive it through the `/gate` workflow (`enigma gate axi run --intent "<what the user set out to accomplish>"`). A gate it hands back carries `fix_policy`, the user's standing answer to who decides: under `assisted` (the default) escalate only what contradicts the request, undoes a deliberate decision, changes agreed behavior, or needs a very large change, and fix the rest yourself ("should I fix this?" is never the question); under `ask` put every finding to the user first; under `auto` settle them all yourself. Do NOT pass `--yes` (the setting is how the user grants it) and do NOT merge the PR yourself - on `checks-passed`, leave it ready for the user to review and merge.
107
+ - While a run is active never edit code to fix a finding; the pipeline owns the fixes (respond with `--action fix`). Full command reference: the gate skill / `/gate` command.
108
108
  <!-- enigma:gate:end -->
109
109
 
110
110
  ---
@@ -7,6 +7,6 @@
7
7
  "minimalCode"
8
8
  ],
9
9
  "updated": "2026-07-17T00:17:02+02:00",
10
- "cliVersion": "1.35.3",
10
+ "cliVersion": "1.35.5",
11
11
  "sha": "3f0dcc28341bb0407860534f7ce9314cfc91b5e673f8f3d13b89d61851ed75f6"
12
12
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "On-demand over-engineering review - diff review, whole-repo audit, and enigma: debt-marker ledger (tags delete/stdlib/native/yagni/shrink, line/dep scoring); lists cuts, applies nothing.",
6
6
  "updated": "2026-06-16T11:24:30+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "f742a2be3f328b9ea1ff9a35a449177c2cbec35ad16e46f7054b7a873a2ab017"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Backend/API architecture: controller-service-repository layering, modern TypeScript project configuration (module resolution, strict flags, @/* path alias), API and request optimization (batching, avoiding redundant calls, skipping no-op writes), server-side caching (Redis), and Zod boundary validation.",
6
6
  "updated": "2026-08-02T19:59:01+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "652637f818b4ce4f4d5d83fa68fa57fe7842e32fb179523958c5496af54bb938"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Ciphera code style conventions (formatting, naming, imports incl. namespace imports for wide module surfaces, path-alias specifiers and no file extensions, comments, code-level anti-patterns; TypeScript-first, language-agnostic).",
6
6
  "updated": "2026-08-02T19:59:01+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "3beb0383a9cb0331ef8a579308a2517d24d57a8ba33751ad17d16d0a4f66e344"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Pre-delivery self-review gate, prioritized review dimensions, and change-quality criteria.",
6
6
  "updated": "2026-08-02T04:15:47+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "b35f0bb4a29f2346d9a1b00a4bfee9557a9b6a44116d9e6e59abcd945466dbcb"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Core engineering execution policy and harness orchestration (highest-authority rules), including the generalization rule that treats a named example as a class to sweep and fix.",
6
6
  "updated": "2026-08-02T04:28:51+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "95091678d4e72e3a9b1ef3ad0514e503a2a631f0d134bf772b4a1b3c66881995"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Senior database architecture policy: engine selection (PostgreSQL by default, SQLite only for local-first/embedded stores), ORM selection (Prisma in TypeScript/JavaScript), query optimization, anti-duplication/normalization, scalability, and RGPD/GDPR encryption.",
6
6
  "updated": "2026-08-04T18:33:27+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "26fddc14caf697e830448a2cc453ddc470fe83d098d50bd67b278effba63274e"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Reproduce-isolate-fix debugging methodology with root-cause discipline and regression verification.",
6
6
  "updated": "2026-08-02T04:15:47+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "968876bcac9ce6e5a20be05c89ac97191b112c9e08679a8dc506d150c375fec4"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Dependency and supply-chain security: lockfiles and reproducible installs, version pinning, vulnerability auditing, vetting/minimizing packages, vendoring, and SBOM/provenance.",
6
6
  "updated": "2026-06-01T00:45:28+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "6375d835c2aef2c9bd31ce116444dc3d796f510f9970a213aa3ac4696d7e21b9"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Transactional email: React Email templates instead of hand-written HTML tables, server-side rendering, one send module behind the provider SDK, plain-text alternatives, idempotent background sending, link safety, and deliverability (SPF/DKIM/DMARC, bounce suppression, unsubscribe).",
6
6
  "updated": "2026-07-30T19:29:19+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "c9724fdbcdbeab99573be3fd44d4cdd97c2a394d99f3c4395f118f17356b00ed"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one.",
6
6
  "updated": "2026-07-29T01:18:36+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "9e30ee7d8a1a1e8c6e7f4e043857cd01841c68a427752e45bc0cad9ec5cfa279"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Frontend architecture: reusable components, abstraction thresholds, state management, no-op detection (skip any operation whose result equals current state, not just form saves; dirty means different from the loaded snapshot, not touched), instant first paint (render the shell, load data async, skeletons), perceived performance (prefetch on intent, debounce/throttle, cancel stale requests, avoid waterfalls, lazy widgets), large-list rendering (infinite scroll is the preferred default, pagination the deliberate exception when the design or the user calls for it, virtualization, skeletons, progressive loading), data views that ship their own affordances by default (a log, expense, transaction or history table is not done when the rows render: fuse.js search, the filters its column kinds imply, a date range, sort, filter state in the URL, and an export of the filtered set), every reference to an entity being a way into it (a name, id, project or path in a row links to that record, reveals it in a hover card, or at minimum copies and filters by it, never inert text; machine codes get human labels and raw payloads are never dumped into a cell), optimistic UI with rollback, visual restraint (one card level, spacing before borders, one elevation scale), icon actions (repeated row/card actions are icon-only buttons with aria-label plus title, not text labels), responsive/adaptive layout (fluid units, breakpoints, no overlap/overflow, viewport meta, touch targets), form fields that declare their keyboard and casing (autocapitalize/autocomplete/inputmode per field kind, set once in the shared Input, normalized on blur), variable-length text (min-width:0 in flex/grid, wrap vs truncate, long unbroken strings, worst-case content checks), auth screens (breached-password feedback, strength meter, cookie consent before login/register), and AI chat/agent interfaces via Vercel's AI Elements registry instead of hand-rolled message threads.",
6
6
  "updated": "2026-08-04T14:11:26+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "e5fbf094be2e7a00e40d02fd7611b7333b1249d7ac951029b8944e359135aa21"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Git & contribution policy (senior engineering standards).",
6
6
  "updated": "2026-08-04T20:04:42+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "f55f4ed5474d5c6e7fd0804d88ac38fb3c9c3cd863519645d1415c02f4416db7"
9
9
  }
@@ -7,6 +7,6 @@
7
7
  "logoColorPolicy"
8
8
  ],
9
9
  "updated": "2026-07-17T00:17:02+02:00",
10
- "cliVersion": "1.35.3",
10
+ "cliVersion": "1.35.5",
11
11
  "sha": "09cdbefd98625b02a7d03685e5deed128238ff8454a83fe22279610fe3ef8ddf"
12
12
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Application and AI-agent security: secrets, authn/authz (least privilege), credential flows with breach-checked passwords (Have I Been Pwned), OWASP Top 10, transport/crypto baseline, cookies and consent, secure logging, and agent/MCP/tool-use safety.",
6
6
  "updated": "2026-08-02T19:59:01+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "3201b6d41437626eb7bf45648c0d7f8c419dc4de87fbd9d4ca83c5ae3b6b6edf"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Create new skills, modify and improve existing skills, and measure skill performance with evals and benchmarks.",
6
6
  "updated": "2026-08-03T00:16:54+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "a49f6166f57d734e0f13487332da37903e925f32257447856af0fbd6a5f1dc84"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Exhaustive completion discipline for long/multi-item tasks - inventory, coverage ledger, verified done.",
6
6
  "updated": "2026-08-02T04:15:47+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "4c2197954135dd3375f32d839238b82a95c0e93e976ddf5a9cbc4a0cf0146e97"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Concise, realistic technical copy - UI microcopy, descriptions, hints, empty/error states, and README/doc prose that informs without over-explaining or restating the obvious, and never uses a typographic dash.",
6
6
  "updated": "2026-07-28T20:30:23+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "a4b792103eb1f9dad93b9d70ea79dc18fe9cbbc318facf5adb47ae5907d842f9"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Test strategy, coverage gates, deterministic tests, mocking discipline, regression-first bug fixing, and test-suite organization (layout by type/domain, mirrored paths, file naming, fixture/helper placement).",
6
6
  "updated": "2026-06-16T17:11:49+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "3bdf591057b760f674fb2b1425f63acb426cda2c4f042e1a74c5a5d3807df664"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Strict frontend + backend schema validation, normalization before validation (shared normalizers: trim, lowercase email, capitalize names, canonicalize links and handles), schema consistency, and safe client-facing error handling.",
6
6
  "updated": "2026-08-01T17:44:16+02:00",
7
- "cliVersion": "1.35.3",
7
+ "cliVersion": "1.35.5",
8
8
  "sha": "225e1e26f4a49fac70714b1bebc104ea42143203cc8fcc9e3330b29f05b6e025"
9
9
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "enigma-darwin-arm64": "7806087b53324b06105fe76f16191f79e16bb25a00b8c7fbae4c09d2ebcfaa79",
3
- "enigma-linux-arm64": "0a34fb5662b3523253d87098b93281be8fd57006e920846840f806a5eb1228cd",
4
- "enigma-linux-x64": "c9dfc40e4d568557ae3e91ea54ce71698ce23825406eb34d43183c6d9c75b303",
5
- "enigma-win32-x64.exe": "9d1add8d345b8e41f766eb016fa2b2295952e55f65053264a5f5e33bc13e4835"
2
+ "enigma-darwin-arm64": "d7d63db677ae99b63effa0b77934b215a249ac20fe5947fc15726e09efbed287",
3
+ "enigma-linux-arm64": "bc34aa1d504ac722b3175ee244d18790939293f7f46f3dad1902bf36c2812a26",
4
+ "enigma-linux-x64": "02ef0201bea472f239a48785157588366e7a4ac8917b61eda297a3679e8ff66f",
5
+ "enigma-win32-x64.exe": "2d6cdf067e8af9821e58c66cedd28a681b4e513f970ad4dba2d180406a8cd502"
6
6
  }
@@ -1963,6 +1963,7 @@ Fix the above before continuing.
1963
1963
  }
1964
1964
  var LEDGER_MAX_BYTES = 512 * 1024;
1965
1965
  var LEDGER_KEEP = 2e3;
1966
+ var LEDGER_KEEP_REPLY = 200;
1966
1967
  function ledgerPath() {
1967
1968
  return process.env.ENIGMA_GUARDRAILS_LOG || join(homedir(), ".enigma", "guardrail-log.jsonl");
1968
1969
  }
@@ -1978,20 +1979,21 @@ function recordedToday(day) {
1978
1979
  }
1979
1980
  function recordFindings(findings, outcome, stage = "edit") {
1980
1981
  if (!findings.length) return;
1981
- const at = (/* @__PURE__ */ new Date()).toISOString();
1982
- const seen = stage === "diff" || outcome !== "blocked" ? recordedToday(at.slice(0, 10)) : null;
1983
- const rows = [];
1984
- for (const f of findings) {
1985
- if (seen) {
1986
- const key = ledgerKey(f.ruleId, outcome, f.file, f.line);
1987
- if (seen.has(key)) continue;
1988
- seen.add(key);
1989
- }
1990
- rows.push(JSON.stringify({ at, rule: f.ruleId, severity: f.severity, outcome, stage, file: f.file, line: f.line }));
1991
- }
1992
- if (!rows.length) return;
1993
- const path = ledgerPath();
1994
1982
  try {
1983
+ const at = (/* @__PURE__ */ new Date()).toISOString();
1984
+ const dedupe = stage !== "reply" && !(stage === "edit" && outcome === "blocked");
1985
+ const seen = dedupe ? recordedToday(at.slice(0, 10)) : null;
1986
+ const rows = [];
1987
+ for (const f of findings) {
1988
+ if (seen) {
1989
+ const key = ledgerKey(f.ruleId, outcome, f.file, f.line);
1990
+ if (seen.has(key)) continue;
1991
+ seen.add(key);
1992
+ }
1993
+ rows.push(JSON.stringify({ at, rule: f.ruleId, severity: f.severity, outcome, stage, file: f.file, line: f.line }));
1994
+ }
1995
+ if (!rows.length) return;
1996
+ const path = ledgerPath();
1995
1997
  mkdirSync(dirname(path), { recursive: true });
1996
1998
  let size = 0;
1997
1999
  try {
@@ -1999,15 +2001,38 @@ function recordFindings(findings, outcome, stage = "edit") {
1999
2001
  } catch {
2000
2002
  }
2001
2003
  if (size > LEDGER_MAX_BYTES) {
2002
- const kept = readFileSync(path, "utf8").split("\n").filter(Boolean).slice(-LEDGER_KEEP);
2003
- writeFileSync(path, `${kept.join("\n")}
2004
- `);
2004
+ const kept = rotateLedger(readFileSync(path, "utf8"));
2005
+ writeFileSync(path, kept.length ? `${kept.join("\n")}
2006
+ ` : "");
2005
2007
  }
2006
2008
  appendFileSync(path, `${rows.join("\n")}
2007
2009
  `);
2008
2010
  } catch {
2009
2011
  }
2010
2012
  }
2013
+ function rotateLedger(text) {
2014
+ const lines = text.split("\n").filter(Boolean);
2015
+ const kept = [];
2016
+ let conventions = 0;
2017
+ let replies = 0;
2018
+ for (let i = lines.length - 1; i >= 0; i--) {
2019
+ const line = lines[i];
2020
+ let reply = false;
2021
+ try {
2022
+ reply = JSON.parse(line)?.stage === "reply";
2023
+ } catch {
2024
+ }
2025
+ if (reply) {
2026
+ if (replies >= LEDGER_KEEP_REPLY) continue;
2027
+ replies++;
2028
+ } else {
2029
+ if (conventions >= LEDGER_KEEP) continue;
2030
+ conventions++;
2031
+ }
2032
+ kept.push(line);
2033
+ }
2034
+ return kept.reverse();
2035
+ }
2011
2036
  function eachLedgerEntry(sinceDays, visit) {
2012
2037
  let text;
2013
2038
  try {
@@ -2027,15 +2052,27 @@ function eachLedgerEntry(sinceDays, visit) {
2027
2052
  }
2028
2053
  }
2029
2054
  }
2055
+ function isConvention(entry) {
2056
+ return entry.stage !== "reply";
2057
+ }
2030
2058
  function readLedger(sinceDays = 0) {
2031
2059
  const out = [];
2032
- eachLedgerEntry(sinceDays, (entry) => out.push(entry));
2060
+ eachLedgerEntry(sinceDays, (entry) => {
2061
+ if (isConvention(entry)) out.push(entry);
2062
+ });
2063
+ return out;
2064
+ }
2065
+ function readReplyLedger(sinceDays = 0) {
2066
+ const out = [];
2067
+ eachLedgerEntry(sinceDays, (entry) => {
2068
+ if (!isConvention(entry)) out.push(entry);
2069
+ });
2033
2070
  return out;
2034
2071
  }
2035
2072
  function countLedger(sinceDays = 0) {
2036
2073
  let count = 0;
2037
- eachLedgerEntry(sinceDays, () => {
2038
- count++;
2074
+ eachLedgerEntry(sinceDays, (entry) => {
2075
+ if (isConvention(entry)) count++;
2039
2076
  });
2040
2077
  return count;
2041
2078
  }
@@ -2121,6 +2158,7 @@ export {
2121
2158
  missingWindowsHide,
2122
2159
  pageAwaitWithoutBoundary,
2123
2160
  readLedger,
2161
+ readReplyLedger,
2124
2162
  recordFindings,
2125
2163
  runGuardrailsHook,
2126
2164
  runGuardrailsScan,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enigma-cli",
3
- "version": "1.35.3",
3
+ "version": "1.35.5",
4
4
  "description": "Everything you need to work with a coding agent: install shared policy skills for Claude Code, OpenAI Codex and opencode, and set up portable git security hooks.",
5
5
  "type": "module",
6
6
  "bin": {