Two root causes found for ca/cb corpus parity failures: 1. _avg_path_len_from used unweighted BFS (hop count) but Perl's Graph::average_path_length uses weighted Dijkstra with centroid-to-centroid edge distances. This caused wrong edge removal in has_circulation, giving wrong stack corner counts (2 instead of 3 for lr in ca9e80c5). 2. Entrance corner logic used _public_access (any street boundary) but Perl's Entrances() picks the best entrance route — a stair only gets entrance corners if no higher-priority non-stair C leaf has public access. Also includes homemaker-py-hgg storey/building checks previously uncommitted: stair fit, circ connectivity, roof-garden, public-access tracking, has_circulation, corners_in_use, stack_corners_in_use, check_space_counts with failure stacking. All 4 debug corpus prefixes: ratio=1.000000. 39 tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
Project Instructions for AI Agents
This file provides instructions and context for AI coding agents working on this project.
Beads Issue Tracker
This project uses bd (beads) for issue tracking. Run bd prime to see full workflow context and commands.
Quick Reference
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete work
Rules
- Use
bdfor ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists - Run
bd primefor detailed command reference and session close protocol - Use
bd rememberfor persistent knowledge — do NOT use MEMORY.md files
Session Completion
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) - Tests, linters, builds
- Update issue status - Close finished work, update in-progress items
- PUSH TO REMOTE - This is MANDATORY:
git pull --rebase bd dolt push 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
Build & Test
Add your build and test commands here
# Example:
# npm install
# npm test
Architecture Overview
Add a brief overview of your project architecture
Conventions & Patterns
Oracle (urb-fitness.pl)
urb-fitness.pl is in PATH. To score a .dom file you must cd to the directory containing the .dom file first — the script resolves patterns.config, costs.config, and writes .score/.fails relative to cwd:
cd /home/bruno/src/urb/examples/programme-house
urb-fitness.pl cf0b8a77e8b2325f92a7e7d150184a55.dom
The score is written to <file>.dom.score and failures to <file>.dom.fails; the numeric score is also printed to stderr.