Origit Console

chore: Origit session auto-commit hook (one Bob session = one commit)

Timotejcommitted 26 Sep 2026 15:45 UTC 139b1ff891038e1b866a85e9a8beeaabe714d229 parent d899879

Origit record

hash verified Raw JSON
Actor
human · config b0aece1f5c4b
Session
human:Timotej:2026-09-26T15:45:48Z · 26 Sep 2026 15:45 UTC → 26 Sep 2026 15:45 UTC
Author
Timotej
Approver
bernard · 26 Sep 2026 15:45 UTC
Tests
not run
Record hash
aed94974b61991f276b32b9232ef43d6c076b2384b5d77f7f071dcb3e3328b64

Read 0

Nothing recorded.

Wrote 0

Nothing.

Changes

2 file(s)
Show diff
diff --git a/.bob/hooks/origit-session-commit.sh b/.bob/hooks/origit-session-commit.sh
new file mode 100755
index 0000000..8f955f2
--- /dev/null
+++ b/.bob/hooks/origit-session-commit.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Origit session commit — Bob Stop hook. One agent session = one commit = one sealed record.
+# Enabled per repo with: git config origit.autocommit true   (origit init sets it)
+top=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
+for c in "$ORIGIT_BIN" "$(git config --get origit.bin 2>/dev/null)" "$(command -v origit 2>/dev/null)" "$top/origit/.venv/bin/origit" "$top/.venv/bin/origit"; do
+  if [ -n "$c" ] && [ -x "$c" ]; then "$c" session-commit --root . 2>>.origit/hook-errors.log; exit 0; fi
+done
+exit 0
diff --git a/.bob/settings.json b/.bob/settings.json
index 290d53d..d5d783e 100644
--- a/.bob/settings.json
+++ b/.bob/settings.json
@@ -1,16 +1,55 @@
 {
   "hooks": {
     "SessionStart": [
-      { "hooks": [ { "type": "command", "command": "sh .bob/hooks/origit-trace.sh", "timeout": 5 } ] }
+      {
+        "hooks": [
+          {
+            "type": "command",
+            "command": "sh .bob/hooks/origit-trace.sh",
+            "timeout": 5
+          }
+        ]
+      }
     ],
     "PreToolUse": [
-      { "matcher": ".*", "hooks": [ { "type": "command", "command": "sh .bob/hooks/origit-trace.sh", "timeout": 5 } ] }
+      {
+        "matcher": ".*",
+        "hooks": [
+          {
+            "type": "command",
+            "command": "sh .bob/hooks/origit-trace.sh",
+            "timeout": 5
+          }
+        ]
+      }
     ],
     "PostToolUse": [
-      { "matcher": ".*", "hooks": [ { "type": "command", "command": "sh .bob/hooks/origit-trace.sh", "timeout": 5 } ] }
+      {
+        "matcher": ".*",
+        "hooks": [
+          {
+            "type": "command",
+            "command": "sh .bob/hooks/origit-trace.sh",
+            "timeout": 5
+          }
+        ]
+      }
     ],
     "Stop": [
-      { "hooks": [ { "type": "command", "command": "sh .bob/hooks/origit-trace.sh", "timeout": 5 } ] }
+      {
+        "hooks": [
+          {
+            "type": "command",
+            "command": "sh .bob/hooks/origit-trace.sh",
+            "timeout": 5
+          },
+          {
+            "type": "command",
+            "command": "sh .bob/hooks/origit-session-commit.sh",
+            "timeout": 90
+          }
+        ]
+      }
     ]
   }
-}
+}
\ No newline at end of file