Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ac8826d
fix: show real platform adapter status on Settings page (#1031)
lolipoplol Apr 10, 2026
30848b9
bd init: initialize beads issue tracking
lolipoplol Apr 10, 2026
d50162a
fix: separate memory system from beads issue tracking
lolipoplol Apr 10, 2026
a63ca2e
feat(telegram): add forum topic support
lolipoplol Apr 10, 2026
fef52c6
feat: add /setproject command to bind codebase to conversation
lolipoplol Apr 10, 2026
88c9714
fix(setproject): use internal conversation ID, not platform ID
lolipoplol Apr 10, 2026
26f28c6
feat: add /compact and /resume for session context management
lolipoplol Apr 10, 2026
0a0a304
refactor: use settingSources instead of hardcoded Obsidian path
lolipoplol Apr 10, 2026
46bf9c1
fix(compact): fallback to message history when session expired
lolipoplol Apr 10, 2026
e906e68
feat: auto-compact on expired sessions with transparent retry
lolipoplol Apr 10, 2026
b1d8db3
fix: broaden session expiry detection for auto-compact
lolipoplol Apr 10, 2026
6935a72
feat: persist messages for all platforms + session log hint
lolipoplol Apr 10, 2026
420611c
feat: shared memory via Obsidian session logs (CLI + Archon unified)
lolipoplol Apr 10, 2026
008634f
docs: unified memory architecture design spec
lolipoplol Apr 10, 2026
0dc618c
docs: unified memory architecture implementation plan
lolipoplol Apr 10, 2026
b743e15
feat: add computeMemoryPath and loadMemoryIndex utilities
lolipoplol Apr 10, 2026
2331966
feat: replace context_summary with MEMORY.md in prompt injection
lolipoplol Apr 10, 2026
db65e0a
docs: update /resume description to reflect shared memory
lolipoplol Apr 10, 2026
3d9187c
fix: encode spaces in memory path + remove dead auto-compact code
lolipoplol Apr 10, 2026
7a20214
feat: save session log to Obsidian on /reset and auto-compact
lolipoplol Apr 10, 2026
d37896f
fix: critical review fixes — path encoding, recursion guard, persist …
lolipoplol Apr 10, 2026
1062620
docs: slim CLAUDE.md by extracting duplicated sections to rule files
lolipoplol Apr 13, 2026
a392407
merge: sync with upstream dev (73 commits)
lolipoplol Apr 13, 2026
067cab6
fix: adapt our code to upstream provider API changes
lolipoplol Apr 13, 2026
4f1d75a
fix: update /reset test for session-log behavior + prettierignore .be…
lolipoplol Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .archon/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
worktree:
baseBranch: dev

assistants:
claude:
settingSources:
- project
- user

docs:
path: packages/docs-web/src/content/docs
72 changes: 72 additions & 0 deletions .beads/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Dolt database (managed by Dolt, not git)
dolt/

# Runtime files
bd.sock
bd.sock.startlock
sync-state.json
last-touched
.exclusive-lock

# Daemon runtime (lock, log, pid)
daemon.*

# Interactions log (runtime, not versioned)
interactions.jsonl

# Push state (runtime, per-machine)
push-state.json

# Lock files (various runtime locks)
*.lock

# Credential key (encryption key for federation peer auth — never commit)
.beads-credential-key

# Local version tracking (prevents upgrade notification spam after git ops)
.local_version

# Worktree redirect file (contains relative path to main repo's .beads/)
# Must not be committed as paths would be wrong in other clones
redirect

# Sync state (local-only, per-machine)
# These files are machine-specific and should not be shared across clones
.sync.lock
export-state/
export-state.json

# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
ephemeral.sqlite3
ephemeral.sqlite3-journal
ephemeral.sqlite3-wal
ephemeral.sqlite3-shm

# Dolt server management (auto-started by bd)
dolt-server.pid
dolt-server.log
dolt-server.lock
dolt-server.port
dolt-server.activity

# Corrupt backup directories (created by bd doctor --fix recovery)
*.corrupt.backup/

# Backup data (auto-exported JSONL, local-only)
backup/

# Per-project environment file (Dolt connection config, GH#2520)
.env

# Legacy files (from pre-Dolt versions)
*.db
*.db?*
*.db-journal
*.db-wal
*.db-shm
db.sqlite
bd.db
# NOTE: Do NOT add negation patterns here.
# They would override fork protection in .git/info/exclude.
# Config files (metadata.json, config.yaml) are tracked by git by default
# since no pattern above ignores them.
81 changes: 81 additions & 0 deletions .beads/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Beads - AI-Native Issue Tracking

Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.

## What is Beads?

Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.

**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)

## Quick Start

### Essential Commands

```bash
# Create new issues
bd create "Add user authentication"

# View all issues
bd list

# View issue details
bd show <issue-id>

# Update issue status
bd update <issue-id> --claim
bd update <issue-id> --status done

# Sync with Dolt remote
bd dolt push
```

### Working with Issues

Issues in Beads are:
- **Git-native**: Stored in Dolt database with version control and branching
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
- **Branch-aware**: Issues can follow your branch workflow
- **Always in sync**: Auto-syncs with your commits

## Why Beads?

✨ **AI-Native Design**
- Built specifically for AI-assisted development workflows
- CLI-first interface works seamlessly with AI coding agents
- No context switching to web UIs

🚀 **Developer Focused**
- Issues live in your repo, right next to your code
- Works offline, syncs when you push
- Fast, lightweight, and stays out of your way

🔧 **Git Integration**
- Automatic sync with git commits
- Branch-aware issue tracking
- Dolt-native three-way merge resolution

## Get Started with Beads

Try Beads in your own projects:

```bash
# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash

# Initialize in your repo
bd init

# Create your first issue
bd create "Try out Beads"
```

## Learn More

- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
- **Quick Start Guide**: Run `bd quickstart`
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)

---

*Beads: Issue tracking that moves at the speed of thought* ⚡
54 changes: 54 additions & 0 deletions .beads/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Beads Configuration File
# This file configures default behavior for all bd commands in this repository
# All settings can also be set via environment variables (BD_* prefix)
# or overridden with command-line flags

# Issue prefix for this repository (used by bd init)
# If not set, bd init will auto-detect from directory name
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
# issue-prefix: ""

# Use no-db mode: JSONL-only, no Dolt database
# When true, bd will use .beads/issues.jsonl as the source of truth
# no-db: false

# Enable JSON output by default
# json: false

# Feedback title formatting for mutating commands (create/update/close/dep/edit)
# 0 = hide titles, N > 0 = truncate to N characters
# output:
# title-length: 255

# Default actor for audit trails (overridden by BEADS_ACTOR or --actor)
# actor: ""

# Export events (audit trail) to .beads/events.jsonl on each flush/sync
# When enabled, new events are appended incrementally using a high-water mark.
# Use 'bd export --events' to trigger manually regardless of this setting.
# events-export: false

# Multi-repo configuration (experimental - bd-307)
# Allows hydrating from multiple repositories and routing writes to the correct database
# repos:
# primary: "." # Primary repo (where this database lives)
# additional: # Additional repos to hydrate from (read-only)
# - ~/beads-planning # Personal planning repo
# - ~/work-planning # Work planning repo

# JSONL backup (periodic export for off-machine recovery)
# Auto-enabled when a git remote exists. Override explicitly:
# backup:
# enabled: false # Disable auto-backup entirely
# interval: 15m # Minimum time between auto-exports
# git-push: false # Disable git push (export locally only)
# git-repo: "" # Separate git repo for backups (default: project repo)

# Integration settings (access with 'bd config get/set')
# These are stored in the database, not in this file:
# - jira.url
# - jira.project
# - linear.url
# - linear.api-key
# - github.org
# - github.repo
2 changes: 2 additions & 0 deletions .beads/hooks/applypatch-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .beads/hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
22 changes: 22 additions & 0 deletions .beads/hooks/h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env sh
[ "$HUSKY" = "2" ] && set -x
n=$(basename "$0")
s=$(dirname "$(dirname "$0")")/$n

[ ! -f "$s" ] && exit 0
Comment on lines +4 to +6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

missing=0
while IFS= read -r hook_path; do
  hook_name="$(basename "$hook_path")"
  case "$hook_name" in
    h|husky.sh) continue ;;
  esac

  target="$(dirname "$(dirname "$hook_path")")/$hook_name"
  if [ -f "$target" ]; then
    printf 'OK      %s -> %s\n' "$hook_path" "$target"
  else
    printf 'MISSING %s -> %s\n' "$hook_path" "$target"
    missing=1
  fi
done < <(fd -t f . .beads/hooks)

exit "$missing"

Repository: coleam00/Archon

Length of output: 116


🏁 Script executed:

# Examine the hook helper script
cat -n .beads/hooks/h

# List all hook files
ls -la .beads/hooks/ 2>/dev/null || echo "Directory not found"

# Check if parent-level scripts exist
ls -la .beads/ 2>/dev/null || echo "Parent directory check"

Repository: coleam00/Archon

Length of output: 2255


🏁 Script executed:

# Check what target scripts exist in parent .beads directory
echo "=== Checking for target scripts in .beads/ ==="
ls -la .beads/ | grep -v '^d' | grep -v '^total'

echo ""
echo "=== Expected target scripts for each hook ==="
cd .beads/hooks
for hook_file in *; do
  case "$hook_file" in
    h|husky.sh) continue ;;
  esac
  target=".beads/$hook_file"
  if [ -f "../$hook_file" ]; then
    echo "$hook_file has target: ../$hook_file"
  else
    echo "$hook_file MISSING target: ../$hook_file"
  fi
done

Repository: coleam00/Archon

Length of output: 1065


🏁 Script executed:

# Search for the actual target scripts that the hooks expect to call
echo "=== Searching for hook target scripts in repository root ==="
find . -maxdepth 1 -type f \( -name "pre-commit" -o -name "post-commit" -o -name "post-merge" \) 2>/dev/null

echo ""
echo "=== All shell scripts in root ==="
find . -maxdepth 1 -type f -name "*.sh" 2>/dev/null

echo ""
echo "=== Checking if hooks are git hooks installed in .git/hooks ==="
if [ -d ".git/hooks" ]; then
  ls -la .git/hooks/ 2>/dev/null | head -20
else
  echo ".git/hooks not found in sandbox"
fi

echo ""
echo "=== Examining one of the small hook files to understand the shimming pattern ==="
cat .beads/hooks/pre-commit
</script>

Repository: coleam00/Archon

Length of output: 1420


🏁 Script executed:

# Let me check if the beads integration code is actually reached
# by understanding the sourcing behavior

echo "=== Checking the flow in detail ==="
echo "When a git hook runs .beads/hooks/pre-commit:"
echo "1. .beads/hooks/pre-commit sources h via: . \$(dirname \"\$0\")/h"
echo "2. h tries to execute target at .beads/pre-commit"
echo "3. If target doesn't exist, h calls 'exit 0'"
echo ""
echo "Question: Does 'exit 0' in a sourced script terminate the parent?"
echo ""
echo "=== Checking if there are beads hook handlers elsewhere ==="
fd -t f "hooks" . --exclude node_modules 2>/dev/null | grep -E "(run|handler)" | head -20

echo ""
echo "=== Check .bd directory or beads config ==="
if [ -d ".bd" ]; then
  find .bd -type f | head -10
else
  echo ".bd directory not found"
fi

echo ""
echo "=== Examine beads config ==="
cat .beads/config.yaml

Repository: coleam00/Archon

Length of output: 2612


🏁 Script executed:

# Verify critical behavior: what happens when exit 0 is called in a sourced script?
# This is the key to understanding if hooks are truly bypassed

echo "=== Test: Does 'exit' in sourced script terminate parent? ==="
# Create test files to verify
mkdir -p /tmp/test_sourcing
cd /tmp/test_sourcing

cat > helper.sh << 'EOF'
#!/bin/sh
echo "In helper before exit"
exit 0
echo "In helper after exit (should not print)"
EOF

cat > main.sh << 'EOF'
#!/bin/sh
echo "Main: before sourcing"
. ./helper.sh
echo "Main: after sourcing (should not print if exit terminates parent)"
EOF

chmod +x helper.sh main.sh
sh main.sh
echo "Exit code: $?"

# Now go back and verify the actual hook behavior in the repository
cd - > /dev/null
echo ""
echo "=== Simulating actual git hook execution ==="
echo "When git runs: .git/hooks/pre-commit (symlink to .beads/hooks/pre-commit)"
echo "The script does: . \$(dirname \"\$0\")/h"
echo ""
echo "Inside h (line 6): [ ! -f \"\$s\" ] && exit 0"
echo "Since .beads/pre-commit doesn't exist, this exits with 0"
echo ""
echo "This means the BEADS INTEGRATION code in .beads/hooks/pre-commit is NEVER reached"
echo "because exit 0 in the sourced h script terminates the parent script immediately."

Repository: coleam00/Archon

Length of output: 599


Critical: Git hooks are non-functional due to missing target scripts causing premature exit.

Line 6 exits with status 0 when the target script is absent. Since no target scripts exist in .beads/ (only .beads/hooks/), every hook immediately exits before reaching the BEADS integration code. This silently disables hook functionality.

The .beads/hooks/pre-commit and other hook shims contain BEADS integration logic (lines 7–21+) that will never execute because the sourced h script terminates the parent before reaching that code.

Ensure target scripts are installed at .beads/pre-commit, .beads/post-merge, .beads/post-checkout, etc., or restructure the hook architecture to conditionally load BEADS integration only when targets exist.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.beads/hooks/h around lines 4 - 6, The hook shim script h currently calls
exit (terminating the parent hook) when a target script is missing, so BEADS
integration in the actual hook shims (pre-commit, post-merge, post-checkout)
never runs; fix by either ensuring target scripts are installed at
.beads/pre-commit, .beads/post-merge, .beads/post-checkout, etc., or change the
logic in h to avoid exiting the parent: detect the intended .beads/<hook> target
and if it doesn't exist, do not call exit — instead return (or skip sourcing) so
the calling hook shim can continue to run its BEADS integration code; update h
and the hook shims (pre-commit, post-merge, post-checkout) to use this
conditional load pattern.


if [ -f "$HOME/.huskyrc" ]; then
echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh"
fi
i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh"
[ -f "$i" ] && . "$i"

[ "${HUSKY-}" = "0" ] && exit 0

export PATH="node_modules/.bin:$PATH"
sh -e "$s" "$@"
c=$?

[ $c != 0 ] && echo "husky - $n script failed (code $c)"
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
exit $c
9 changes: 9 additions & 0 deletions .beads/hooks/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
echo "husky - DEPRECATED
Please remove the following two lines from $0:
#!/usr/bin/env sh
. \"\$(dirname -- \"\$0\")/_/husky.sh\"
They WILL FAIL in v10.0.0
"
2 changes: 2 additions & 0 deletions .beads/hooks/post-applypatch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
26 changes: 26 additions & 0 deletions .beads/hooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"

# --- BEGIN BEADS INTEGRATION v1.0.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run post-checkout "$@"
_bd_exit=$?
if [ $_bd_exit -eq 124 ]; then
echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
else
bd hooks run post-checkout "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-checkout'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.0.0 ---
2 changes: 2 additions & 0 deletions .beads/hooks/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
26 changes: 26 additions & 0 deletions .beads/hooks/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"

# --- BEGIN BEADS INTEGRATION v1.0.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run post-merge "$@"
_bd_exit=$?
if [ $_bd_exit -eq 124 ]; then
echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
else
bd hooks run post-merge "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-merge'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.0.0 ---
2 changes: 2 additions & 0 deletions .beads/hooks/post-rewrite
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .beads/hooks/pre-applypatch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .beads/hooks/pre-auto-gc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
26 changes: 26 additions & 0 deletions .beads/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"

# --- BEGIN BEADS INTEGRATION v1.0.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run pre-commit "$@"
_bd_exit=$?
if [ $_bd_exit -eq 124 ]; then
echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
else
bd hooks run pre-commit "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-commit'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.0.0 ---
2 changes: 2 additions & 0 deletions .beads/hooks/pre-merge-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
26 changes: 26 additions & 0 deletions .beads/hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"

# --- BEGIN BEADS INTEGRATION v1.0.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run pre-push "$@"
_bd_exit=$?
if [ $_bd_exit -eq 124 ]; then
echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
else
bd hooks run pre-push "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-push'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.0.0 ---
Comment on lines +2 to +26
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that hook wrapper code is unreachable due to `exit` in sourced helper.

set -euo pipefail

echo "== .beads/hooks/h (look for exit statements) =="
sed -n '1,80p' .beads/hooks/h

echo
echo "== .beads/hooks/pre-push (source first, integration after) =="
sed -n '1,80p' .beads/hooks/pre-push

echo
echo "== Cross-check all added hook wrappers with same pattern =="
for f in pre-push post-merge prepare-commit-msg pre-commit post-checkout; do
  echo "--- .beads/hooks/$f ---"
  sed -n '1,40p' ".beads/hooks/$f"
done

Repository: coleam00/Archon

Length of output: 5826


Beads integration block is unreachable due to unconditional exit in sourced helper.

On line 2, . "$(dirname "$0")/h" sources a Husky helper that always exits (line 19: exit $c). Since sourcing executes the script in the current shell context, this unconditional exit terminates the hook before lines 4–26 run. The Beads integration block never executes.

This pattern affects all five hook files: pre-push, post-merge, prepare-commit-msg, pre-commit, and post-checkout. Either the Beads integration must be inserted before sourcing h, or h must be sourced only after the Beads integration block completes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.beads/hooks/pre-push around lines 2 - 26, The beads integration block is
never reached because the Husky helper is sourced unconditionally (".
\"$(dirname \"$0\")/h\"") and that helper calls "exit $c", terminating the hook;
move the entire beads block (the lines between "# --- BEGIN BEADS INTEGRATION
v1.0.0 ---" and "# --- END BEADS INTEGRATION v1.0.0 ---") above the sourcing of
the Husky helper in each hook (pre-push, post-merge, prepare-commit-msg,
pre-commit, post-checkout), or alternatively avoid sourcing the helper into the
current shell by executing it in a subshell/isolated context instead of ".
\"$(dirname \"$0\")/h\"" so that the helper's "exit $c" cannot abort the rest of
the hook; adjust all five hook files consistently.

2 changes: 2 additions & 0 deletions .beads/hooks/pre-rebase
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
Loading