Skip to content

feat: modular hook pipeline, obsidian management, alpha banner#12

Merged
0xNyk merged 3 commits into
mainfrom
feat/hook-pipeline-v2
Mar 16, 2026
Merged

feat: modular hook pipeline, obsidian management, alpha banner#12
0xNyk merged 3 commits into
mainfrom
feat/hook-pipeline-v2

Conversation

@0xNyk

@0xNyk 0xNyk commented Mar 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Modular Python hook pipeline replacing 368-line bash stop hook with 9-checker pipeline including test verification, heuristic rationalization detection, and Ollama LLM eval
  • Obsidian config management via lacp-obsidian CLI (8 commands: status, audit, apply, backup, restore, plugins, graph-config, optimize)
  • Brain enhancements: obsidian config drift detection in brain-doctor, config guard step in brain-expand, --activate/--consolidate flags
  • Doctor improvements: ollama daemon/model checks, Docker/OrbStack detection
  • 3 new apply-profile profiles: quality-gate-v2, session-start, pretool-guard
  • Alpha banner on README + GitHub Sponsors/FUNDING.yml

New Hook Files

Hook Event Purpose
stop_quality_gate.py Stop 9-checker pipeline with test verification + Ollama
session_start.py SessionStart Unified hook with git context + test cmd caching
pretool_guard.py PreToolUse Co-author, scp/root, rm -rf, exfiltration guards
detect_session_changes.py (library) Transcript file-change scanner
hook_telemetry.py (library) JSONL telemetry with rotation

Test plan

  • lacp test --quick — passes
  • python3 hooks/test_stop_hook.py — 21/21 pass
  • scripts/ci/test-obsidian-cli.sh — 10/10 pass
  • All Python files compile cleanly
  • All bash scripts pass bash -n syntax check
  • apply-profile --dry-run for quality-gate-v2, session-start, pretool-guard — all OK
  • No secrets or hardcoded user paths

0xNyk added 3 commits March 16, 2026 17:08
- Add prominent alpha release warning to README header
- Add FUNDING.yml for Buy Me A Coffee + Solana donations
- Add Support the Project section to README TOC and body
- Document Obsidian Configuration Management (lacp-obsidian CLI)
- Document Mycelium Network Memory mechanisms
- Add test-obsidian-cli.sh and test-brain-memory.sh to Testing section
- Update lacp-claude-hooks profile list in command reference
- Update brain-doctor and brain-expand descriptions
- lacp-obsidian CLI: status, audit, apply, backup, restore, plugins,
  graph-config, optimize (8 commands, 452 lines)
- Obsidian manifest.json for declarative vault config
- Optimization engine with size-based profiles (small/medium/large)
- brain-doctor: add obsidian config drift detection (section 11)
- brain-expand: add step 0.5 obsidian config guard, --activate and
  --consolidate flags, enhanced memory consolidation support
- doctor: add ollama daemon/model checks, docker/OrbStack detection
- consolidation.json config for memory consolidation parameters
- test-obsidian-cli.sh (10 tests), test-brain-memory.sh (24 tests)
- gitignore obsidian config snapshots
Replace 368-line bash stop hook with modular Python (9-checker pipeline):
- Loop guard, circuit breaker, trivial message filter
- 8 heuristic rationalization patterns (ported from bash)
- Work detector via direct import of detect_session_changes
- NEW: test verification — catches false "tests pass" claims
- Ollama LLM evaluation (urllib.request, no curl dependency)
- Ralph-wiggum cooperation (block → allow+systemMessage)

New hooks:
- stop_quality_gate.py: modular stop hook with test verification
- session_start.py: unified SessionStart with git context + test cmd cache
- pretool_guard.py: co-author guard, scp/root block (ported from exec_guard)
- detect_session_changes.py: transcript scanner (library, imported directly)
- hook_telemetry.py: JSONL telemetry with rotation (library, imported directly)

New apply-profile profiles in lacp-claude-hooks:
- quality-gate-v2: Python stop hook + deps
- session-start: replaces 3 SessionStart entries with unified hook
- pretool-guard: cleans 4 redundant PreToolUse + PermissionRequest entries

21 unit tests for all checkers (test_stop_hook.py).
Legacy bash hooks preserved for backwards compatibility.
@0xNyk 0xNyk merged commit efd5549 into main Mar 16, 2026
@0xNyk 0xNyk deleted the feat/hook-pipeline-v2 branch March 16, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant