This project uses bd (beads) for issue tracking. Run bd onboard to get started.
- Hypothesis First: Before implementing, state what you expect to happen
- Small Experiments: Test assumptions with minimal code
- Measure & Document: Record outcomes in issue comments
- Iterate: Refine based on experimental results
Example workflow:
bd new "Experiment: Test if List.reverse is O(n)" -t task -l experiment
# Write minimal test code
# Measure and document findings
bd close <id> -r "Confirmed O(n) via benchmarks"Commit frequently in logical increments:
| Stage | Commit Message Prefix | Example |
|---|---|---|
| Setup | chore: |
chore: add lakefile.toml |
| WIP | wip: |
wip: draft List.sort theorem |
| Feature | feat: |
feat: prove sort_idempotent |
| Fix | fix: |
fix: correct termination proof |
| Refactor | refactor: |
refactor: extract common tactics |
| Docs | docs: |
docs: add tactic cheatsheet |
Progressive stages:
- Skeleton (compiles, uses
sorry) - Draft (partial proofs)
- Complete (all proofs done)
- Polished (clean, documented)
Use PERT (Program Evaluation and Review Technique) for task estimates:
Expected = (Optimistic + 4×Likely + Pessimistic) / 6
When creating issues, use the -e flag with minutes:
# For a task estimated at: O=30m, L=60m, P=120m
# PERT = (30 + 240 + 120) / 6 = 65 minutes
bd new "Prove commutativity of addition" -t task -e 65bd ready # Find available work
bd show <id> # View issue details
bd update <id> -s in_progress # Claim work
bd close <id> # Complete work
bd sync # Sync with git- Use org-mode (
.org) for all documentation - Exceptions: AGENTS.md, CLAUDE.md (for tooling compatibility)
- Lean files:
.leanfor proofs and code
When ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.
MANDATORY WORKFLOW:
- File issues for remaining work - Create issues for anything that needs follow-up
- Run quality gates (if code changed) -
gmake check, verify proofs compile - Update issue status - Close finished work, update in-progress items
- PUSH TO REMOTE - This is MANDATORY:
git pull --rebase bd sync git push git status # MUST show "up to date with origin" - Clean up - Clear stashes, prune remote branches
- Verify - All changes committed AND pushed
- Hand off - Provide context for next session
CRITICAL RULES:
- Work is NOT complete until
git pushsucceeds - NEVER stop before pushing - that leaves work stranded locally
- NEVER say "ready to push when you are" - YOU must push
- If push fails, resolve and retry until it succeeds