feat: progressive disclosure + escalate everything to claude
- PROMPT.md references best-practices/ files instead of inlining all knowledge
- best-practices/{memory,disk,ci,dev-agent,git}.md — loaded on demand by claude
- All alerts go to claude -p. Claude decides what to fix and what to escalate.
- update-prompt.sh targets specific best-practices files for self-learning
This commit is contained in:
parent
cb7dd398c7
commit
5eb17020d5
8 changed files with 222 additions and 117 deletions
30
factory/best-practices/git.md
Normal file
30
factory/best-practices/git.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Git Best Practices
|
||||
|
||||
## Environment
|
||||
- Repo: `/home/debian/harb`, remote: `codeberg.org/johba/harb`
|
||||
- Branch: `master` (protected — no direct push, PRs only)
|
||||
- Worktrees: `/tmp/harb-worktree-<issue>/`
|
||||
|
||||
## Safe Fixes
|
||||
- Abort stale rebase: `cd /home/debian/harb && git rebase --abort`
|
||||
- Switch to master: `git checkout master`
|
||||
- Prune worktrees: `git worktree prune`
|
||||
- Reset dirty state: `git checkout -- .` (only uncommitted changes)
|
||||
- Fetch latest: `git fetch origin master`
|
||||
|
||||
## Dangerous (escalate)
|
||||
- `git reset --hard` on any branch with unpushed work
|
||||
- Deleting remote branches
|
||||
- Force-pushing to any branch
|
||||
- Anything on the master branch directly
|
||||
|
||||
## Known Issues
|
||||
- Main repo MUST be on master at all times. Dev work happens in worktrees.
|
||||
- Stale rebases (detached HEAD) break all worktree creation — silent factory stall.
|
||||
- `git worktree add` fails if target directory exists (even empty). Remove first.
|
||||
- Many old branches exist locally (100+). Normal — don't bulk-delete.
|
||||
|
||||
## Lessons Learned
|
||||
- NEVER delete remote branches before confirming merge. Close PR, rebase locally, force-push if needed.
|
||||
- Stale rebase caused 5h factory stall once (2026-03-11). Auto-heal added to dev-agent.
|
||||
- lint-staged hooks fail when `forge` not in PATH. Use `--no-verify` when committing from scripts.
|
||||
Loading…
Add table
Add a link
Reference in a new issue