Persistent worktrees (server, client, copy, audio, visual, ci, planning,
maintenance) caused agents crossing boundaries, stuck agents leaving
uncommitted work, and index.lock collisions. Replaced with ephemeral
sprint branches (sprint-{N}/{team}) and worktrees created on demand.
Changes:
- New start-sprint script replaces start-session (dynamic tabs per active team)
- Sprint teardown integrated into sprint-start skill (A1c step)
- SR_DB_PATH env var for database access from any directory
- CLAUDE.md team boundaries rewritten (scope-based, not directory-based)
- Agent Rule 0 updated to team scope dirs instead of worktree isolation
- PR review uses git show instead of cross-directory reads
- Briefing template updated for sprint-{N}/{team} branch naming
- Deleted worktree-update skill (obsolete)
- Removed WORKTREE_TEAM env var and cross-directory Read permissions
- All 8 persistent worktrees removed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
914 B
Bash
Executable File
25 lines
914 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copy the shared database into git-tracked docs/backups/ for disaster recovery.
|
|
# Only runs on the main branch — called via `make db-backup`.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
WORKTREE_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
# Database path: SR_DB_PATH env var (absolute), or fallback to parent directory heuristic.
|
|
DB_PATH="${SR_DB_PATH:-$(dirname "$WORKTREE_ROOT")/settledreach.db}"
|
|
BACKUP_PATH="$WORKTREE_ROOT/docs/backups/settledreach.db.backup"
|
|
|
|
branch="$(git -C "$WORKTREE_ROOT" branch --show-current)"
|
|
if [ "$branch" != "main" ]; then
|
|
echo "error: db-backup only runs on the main branch (currently on '$branch')" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f "$DB_PATH" ]; then
|
|
echo "error: shared database not found at $DB_PATH" >&2
|
|
exit 1
|
|
fi
|
|
|
|
cp "$DB_PATH" "$BACKUP_PATH"
|
|
echo "ok: backed up $(du -h "$BACKUP_PATH" | cut -f1) to docs/backups/settledreach.db.backup"
|