loki-mode 7.94.0 → 7.96.0

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/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Autonomous spec-driven build system with a built-in trust layer. It does not call work done until it is verified (RARV-C closure loop, 8 quality gates, completion council, verified-completion evidence gate). Triggers on "Loki Mode". Takes a spec (PRD, GitHub issue, OpenAPI doc, etc.) to deployed product with minimal human intervention. Provider-agnostic. Requires --dangerously-skip-permissions flag.
4
4
  ---
5
5
 
6
- # Loki Mode v7.94.0
6
+ # Loki Mode v7.96.0
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -408,4 +408,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
408
408
 
409
409
  ---
410
410
 
411
- **v7.94.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
411
+ **v7.96.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 7.94.0
1
+ 7.96.0
@@ -348,6 +348,19 @@ hook_pre_healing_modify() {
348
348
  [[ "${LOKI_HEAL_MODE:-false}" != "true" ]] && return 0
349
349
  [[ -z "$file_path" ]] && return 0
350
350
 
351
+ # Fail CLOSED if the friction map is absent. Without it the friction safety
352
+ # gate below cannot run, so deleting (or never producing) friction-map.json
353
+ # would otherwise BYPASS protection and let unclassified institutional
354
+ # knowledge be destroyed -- and _heal_snapshot_save would still run, masking
355
+ # the gap. The map is produced by the archaeology phase (the phase gate
356
+ # blocks archaeology -> stabilize until friction-map.json has >=1 entry), so
357
+ # any modify in stabilize/isolate/modernize legitimately has one. Block
358
+ # before any friction check or snapshot proceeds.
359
+ if [[ ! -f "$heal_dir/friction-map.json" ]]; then
360
+ echo "HOOK_BLOCKED: friction-map.json missing at ${heal_dir}/friction-map.json. Run the archaeology phase first (loki heal <path> --phase archaeology) to catalog friction before modifying files in healing mode."
361
+ return 1
362
+ fi
363
+
351
364
  # Check if file has friction points
352
365
  if [[ -f "$heal_dir/friction-map.json" ]]; then
353
366
  local blocked
package/autonomy/run.sh CHANGED
@@ -17150,6 +17150,30 @@ else:
17150
17150
  if [ "$_completion_claimed" = 1 ] && type ensure_completion_test_evidence &>/dev/null; then
17151
17151
  ensure_completion_test_evidence || true
17152
17152
  fi
17153
+ # TRUST MOAT (fail-CLOSED): each completion gate below is armed only
17154
+ # when its function is loadable (`type fn && ! fn`). If the council
17155
+ # library failed to source, those `type` probes are FALSE, so every
17156
+ # gate arm is silently skipped and a completion claim sails straight to
17157
+ # the accept branch UNVERIFIED -- a fake-green. Before the gate chain,
17158
+ # verify the core gate functions exist; if any is missing, the library
17159
+ # is incomplete and we CANNOT verify completion, so we refuse the claim
17160
+ # (force another iteration) rather than pass ungated. This never fires
17161
+ # in a healthy install (functions are sourced) and only triggers on a
17162
+ # genuinely broken/partial load -- exactly when failing open is unsafe.
17163
+ if [ "$_completion_claimed" = 1 ]; then
17164
+ _gates_loadable=1
17165
+ for _gate_fn in council_checklist_gate council_evidence_gate council_heldout_gate council_assumption_ledger_gate; do
17166
+ if ! type "$_gate_fn" &>/dev/null; then
17167
+ log_error "Completion gate unavailable: ${_gate_fn} (council library incomplete or failed to load)."
17168
+ _gates_loadable=0
17169
+ fi
17170
+ done
17171
+ if [ "$_gates_loadable" -eq 0 ]; then
17172
+ log_error "Cannot verify completion: required council gates are missing. Refusing the completion claim (fail-closed) and continuing to iterate."
17173
+ _completion_claimed=0
17174
+ fi
17175
+ unset _gates_loadable _gate_fn
17176
+ fi
17153
17177
  if [ -n "$_gate_block_for_completion" ] && [ "$_completion_claimed" = 1 ]; then
17154
17178
  log_warn "Completion claim rejected: code review is BLOCKED for this iteration (Critical/High findings). Fix review issues before completion."
17155
17179
  log_warn " Review details under .loki/quality/reviews/ ; gate_failures=${gate_failures}"
@@ -17749,7 +17773,24 @@ check_human_intervention() {
17749
17773
  if type ensure_completion_test_evidence &>/dev/null; then
17750
17774
  ensure_completion_test_evidence || true
17751
17775
  fi
17752
- if type council_checklist_gate &>/dev/null && ! council_checklist_gate; then
17776
+ # TRUST MOAT (fail-CLOSED, parity with the default route ~17153): each gate
17777
+ # arm below is `type fn && ! fn`, so a missing gate fn (council library
17778
+ # failed to source) silently skips that gate and the chain can reach
17779
+ # council_vote and force-approve completion UNGATED -- a fake-green. Probe
17780
+ # the core gate fns first; if any is missing, refuse the force-review
17781
+ # approval and fall through to continue iterating. No-op on healthy loads.
17782
+ _frgate_loadable=1
17783
+ for _frgate_fn in council_checklist_gate council_evidence_gate council_heldout_gate council_assumption_ledger_gate; do
17784
+ if ! type "$_frgate_fn" &>/dev/null; then
17785
+ log_error "Council force-review: gate unavailable: ${_frgate_fn} (council library incomplete)."
17786
+ _frgate_loadable=0
17787
+ fi
17788
+ done
17789
+ if [ "$_frgate_loadable" -eq 0 ]; then
17790
+ log_error "Council force-review: required gates missing; refusing force approval (fail-closed)."
17791
+ unset _frgate_loadable _frgate_fn
17792
+ elif type council_checklist_gate &>/dev/null && ! council_checklist_gate; then
17793
+ unset _frgate_loadable _frgate_fn
17753
17794
  log_info "Council force-review: blocked by checklist hard gate"
17754
17795
  elif type council_evidence_gate &>/dev/null && ! _evidence_gate_and_surface; then
17755
17796
  log_info "Council force-review: blocked by evidence hard gate"
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "7.94.0"
10
+ __version__ = "7.96.0"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try: