Priority 1 (Critical): Database files removed from git tracking - Added **/.aphoria/db/ and **/.aphoria/wal/ to .gitignore - Removed 7 database files from dogfood/dbpool/.aphoria/db/ - Database files are runtime state (like target/), not source code - Prevents repository bloat and incorrect content type in git Priority 2 (Housekeeping): Dated documentation archived - Created archive/ structure with fixes/ and deprecated/ subdirectories - Moved SYSTEMATIC-FIXES-2026-02-10.md to archive/fixes/ - Moved SYSTEMATIC-FIXES-COMPLETE.md to archive/fixes/ - Moved PROJECT2-QUICKSTART-DEPRECATED.md to archive/deprecated/ - Moved PROJECT2-READY.md to archive/deprecated/ - Moved verify-project2-ready.sh to archive/deprecated/ - Created archive/README.md documenting archival policy These files are preserved for historical reference but no longer clutter the main dogfood directory. See archive/README.md for details. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .aphoria | ||
| docs | ||
| eval | ||
| eval-archive-2026-02-09 | ||
| scripts | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| CHECKLIST.md | ||
| CLAUDE.md | ||
| DAY2-COMPLETE.md | ||
| DAY3-FINDINGS.md | ||
| DOGFOOD-COMPLETE.md | ||
| LESSONS-LEARNED.md | ||
| plan.md | ||
| README.md | ||
| RESET-2026-02-09.md | ||
| scan-output-v1.txt | ||
| SCAN-REPORT-v1.md | ||
| scan-results-v1.json | ||
| scan-results-v2.json | ||
| scan-results-v3.json | ||
| STATE-2026-02-10.md | ||
| verify-results-v1.json | ||
Database Connection Pool (dbpool) - Aphoria Dogfood Exercise
Status: 🎯 READY FOR NEXT TEAM RUN (Reset: 2026-02-09)
What This Is
A 5-day dogfood exercise to demonstrate Aphoria's code-level truth linting by:
- Creating authoritative claims about database connection pools
- Writing intentionally violating code
- Using Aphoria to detect all violations
- Fixing violations incrementally
- Documenting the success story
Quick Start
Before you begin, run the pre-flight validator:
./scripts/validate-setup.sh
This checks all prerequisites and shows you exactly what to fix.
Then read the execution guide:
cat CHECKLIST.md # Day-by-day execution checklist with templates
cat CLAUDE.md # Development commands and architecture
cat plan.md # Complete 5-day plan with detailed schedule
What's Been Reset
This directory has been cleaned up from a previous run:
✅ Kept (Ready to Use)
-
Documentation (updated based on team evaluation)
CHECKLIST.md- Fixed Day 1 structure, added 27 claim checkboxes, practice bridgeCLAUDE.md- Development commands, architecture referenceplan.md- Complete 5-day scheduledocs/claim-extraction-example.md- Complete walkthrough with worked examplesdocs/flywheel-setup.md- NEW: Flywheel configuration guidedocs/sources/- Authority source documents (HikariCP, PostgreSQL, OWASP)
-
Configuration
.aphoria/config.toml- Pre-configured with flywheel settings (persistent mode, aggregation enabled).claude/- Claude Code skills and configuration
-
Tools
scripts/validate-setup.sh- Pre-flight validation script
-
Previous Run Analysis (for reference)
eval/- Evaluation reports from 2026-02-09 run documenting what went wrong
❌ Removed (Will Be Created During Exercise)
src/- Implementation code (Day 2)tests/- Test suite (Day 2)Cargo.toml- Rust manifest (Day 2)scan-results-*.json- Scan outputs (Day 3+)IMPLEMENTATION-SUMMARY.md- Moved toeval/
Documentation Improvements
Based on team evaluation (see eval/EVALUATION-REPORT-2026-02-09.md), the following fixes were applied:
🔧 What Was Fixed
- Day 1 Heading Clarity - Changed from "Information Needed" to "Create 25-30 Claims"
- Success Criteria Visible - Added verification command at top of Day 1
- 27 Checkbox Items - All claims now have checkboxes (vs prose that was skipped)
- Practice Bridge - Added 3 practice claims after reading example
- Step Numbers - Clear Step 1, 2, 3, 4 structure for Day 1
- Flywheel Documentation - New
docs/flywheel-setup.mdguide - Day 3 Flywheel Setup - Added critical configuration section before scanning
📊 Expected Impact
- Previous run: Team created 0/27 claims, thought Day 1 was 90% complete
- Expected now: 85-90% completion rate with clear checkboxes and deliverables
Day-by-Day Overview
| Day | Focus | Key Deliverable | Time |
|---|---|---|---|
| Day 1 | Corpus Building | 25-30 claims created via CLI | 4-6 hours |
| Day 2 | Implementation | Working code with 7-8 intentional violations | 4-5 hours |
| Day 3 | Scanning | Initial scan showing all violations | 2-3 hours |
| Day 4 | Remediation | Progressive fixes with re-scans | 4-5 hours |
| Day 5 | Documentation | Success story, demo materials | 3-4 hours |
Total: ~20 hours (5 days at 4 hours/day)
Success Metrics
After completion, you should have:
- ✅ 25-30 claims in corpus database
- ✅ 7-8 violations detected in initial scan
- ✅ 100% detection accuracy (no false positives/negatives)
- ✅ Scan performance ≤0.3s (ephemeral mode)
- ✅ Progressive fixes showing improvement
- ✅ Final clean scan (0 violations)
- ✅ Compelling success story
- ✅ Live demo materials
Prerequisites
Run ./scripts/validate-setup.sh to verify:
- Aphoria CLI installed (
aphoria --version) - StemeDB API running on
:18180 - Corpus database accessible at
~/.aphoria/corpus-db/ - Corpus API returns data
jqJSON processor installed- Rust toolchain available
- Aphoria extractors detect patterns
Important Notes
-
Read
docs/claim-extraction-example.mdfirst (Day 1)- 15-20 minutes to understand claim extraction
- Prevents creating garbage "observations" instead of real claims
-
Configure flywheel before Day 3 (see
docs/flywheel-setup.md)- Switch from ephemeral to persistent mode
- Enable pattern aggregation
- Demonstrates learning capability
-
Intentional violations are educational (Day 2)
- You're deliberately writing bad code to test detection
- This is normal and expected for dogfooding
-
Save all scan results (Day 3-4)
scan-results-v1.jsonthroughscan-results-v6.json- Needed for before/after evidence in Day 5 documentation
Getting Help
- Aphoria CLI issues: Check
applications/aphoria/README.md - API issues: Verify
http://localhost:18180/health - Corpus issues: Query
curl 'http://localhost:18180/v1/aphoria/corpus' - Common issues: See
CHECKLIST.mdtroubleshooting section
What Makes This Different
This dogfood exercise demonstrates:
- Real authority sources (HikariCP, PostgreSQL, OWASP)
- Verifiable violations (connection exhaustion, credential exposure, validation gaps)
- Prevented incidents (estimated $50K+ in production outages)
- Production-ready output (final code is genuinely deployable)
Next Steps
- Run pre-flight validation:
./scripts/validate-setup.sh - Read Day 1 checklist:
cat CHECKLIST.md | head -300 - Start with claim extraction example:
cat docs/claim-extraction-example.md - Begin Day 1: Follow CHECKLIST.md to create 25-30 claims
Last Reset: 2026-02-09 (after team evaluation) Documentation Version: v2 (includes fixes from evaluation gaps) Ready for: Fresh team run with improved documentation