stemedb/applications/aphoria/dogfood/msgqueue
jml 9bfa626203 docs: reorganize documentation structure for clarity
Major documentation restructure to improve discoverability and reduce duplication.

## Changes

**Deleted (Archived/Consolidated)**:
- Removed duplicate getting started guides
- Archived outdated planning documents
- Consolidated corpus and configuration docs
- Removed obsolete vision/spec files (superseded by vision.md)
- Cleaned up scrapyard and old PDFs

**New Structure**:
- docs/about/ - Project overview and introduction
- docs/guides/ - User guides (moved from root)
- docs/specs/ - Technical specifications
- docs/sdk/ - SDK documentation (Go)
- docs/references/ - API references
- docs/archive/ - Archived historical docs
- applications/aphoria/docs/advanced/ - Advanced topics
- applications/aphoria/docs/reference/ - CLI reference
- applications/aphoria/docs/archive/ - Archived aphoria docs

**Updated**:
- README.md - New root README with clear navigation
- CONTRIBUTING.md - Contribution guidelines
- CLAUDE.md - Updated paths to new structure
- roadmap.md - Added recent completions

## Files Changed
- 57 files changed
- 1,977 insertions(+)
- 961 deletions(-)

**Net change**: +1,016 lines (added CONTRIBUTING.md, README.md, reorganized content)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 07:33:40 +00:00
..
.aphoria feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
docs/sources feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
eval feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
src feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
Cargo.toml feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
claims-template.toml feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
DAY1-SUMMARY.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
DAY2-SUMMARY.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
DAY3-IMPLEMENTATION-SUMMARY.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
DAY3-READY.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
FIXES-APPLIED.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
plan.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
README.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
RESET-SUMMARY.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
scan-output-v3.txt feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
scan-results-v3-final.json feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
scan-results-v3.json feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
scan-v1.json feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
scan-v2.json feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
SETUP-NOTES.md docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00

Dogfood: Message Queue Consumer Library

Hypothesis: Async connection patterns + resource limits from httpclient/dbpool corpora transfer to message queue consumers with 50%+ pattern reuse, demonstrating cross-domain flywheel strength.

Corpus Overlap: httpclient + dbpool → ~50% pattern reuse expected

Target Metrics:

  • Time savings: ≥60% vs manual
  • Pattern reuse: ≥50% of claims (11+/22)
  • Detection rate: ≥90% of violations (8/8)
  • Naming errors: <2

Why This Domain?

Message queue consumers test whether patterns learned in HTTP/DB contexts transfer to async messaging:

  • Async patterns from httpclient (timeout, retry, TLS)
  • Resource limits from dbpool (max connections, lifecycle, cleanup)
  • New patterns unique to messaging (backpressure, ack_timeout, prefetch)

This validates cross-domain flywheel adaptability - the core hypothesis of knowledge compounding.


Quick Start

  1. Read the plan: plan.md (detailed 5-day workflow)
  2. Start Day 1: Use /aphoria-suggest --corpus httpclient,dbpool to discover reusable patterns
  3. Follow the workflow: Track metrics daily, write summaries
  4. Reference examples: See dogfood/httpclient/ for complete example

Status

  • Day 1: Claims extraction (~5 min) - 22 claims, 50% reused, 0 naming errors
  • Day 2: Implementation (~45 min) - 8 violations embedded, 13/13 tests pass, 680 LOC
  • [⚠️] Day 3: Scanning (~70 min) - ⚠️ 7 extractors created but not matching claims (concept path alignment issue)
  • Day 4: Remediation (2-4 hrs) - Target: 0 conflicts final scan
  • Day 5: Documentation (2-3 hrs) - Target: Comprehensive report

Day 3 Status: Followed proper 6-phase workflow. Created 7 declarative extractors (+7 observations), but 0 conflicts detected due to concept path alignment issues. See DAY3-SUMMARY.md for details and recovery options.


Expected Pattern Reuse

From httpclient Corpus (6 patterns):

  • timeoutconsumer/timeout
  • tls/certificate_validationtls/certificate_validation
  • metrics/enabledmetrics/enabled
  • retry/max_attemptsretry/max_attempts
  • retry/backoff_strategyretry/backoff_strategy
  • async/runtimeasync/runtime

From dbpool Corpus (5 patterns):

  • max_connectionsconnection/max_connections
  • connection_lifecycleconnection/lifecycle
  • cleanupconnection/cleanup
  • idle_timeoutconnection/idle_timeout
  • pool_sizeconnection/pool_size

New for Message Queue (11 patterns):

  • consumer/prefetch_count
  • consumer/ack_mode
  • consumer/ack_timeout
  • queue/max_size
  • consumer/backpressure_strategy
  • connection/heartbeat_interval
  • consumer/requeue_limit
  • queue/durable
  • consumer/exclusive
  • connection/recovery_strategy
  • consumer/dead_letter_queue

Total: 22 claims (11 reused = 50% reuse rate)


Violations to Embed (Day 2)

  1. timeout = 0 → Indefinite blocking
  2. Unbounded queue → OOM under load
  3. prefetch_count = u16::MAX → Resource exhaustion
  4. Auto-ack without processing → Data loss
  5. No requeue limit → Infinite retry loops
  6. verify_tls = false → MITM attacks
  7. No connection pooling → Resource exhaustion
  8. Synchronous processing → Throughput collapse

Files

msgqueue/
├── README.md                    # This file
├── plan.md                      # Detailed 5-day workflow
├── .aphoria/
│   ├── config.toml              # Persistent mode, corpus enabled
│   └── claims.toml              # (empty, fill on Day 1)
├── docs/
│   └── sources/                 # Authority sources
│       ├── amqp-spec.md         # AMQP protocol (Tier 1)
│       ├── rabbitmq-docs.md     # RabbitMQ vendor docs (Tier 2)
│       └── lapin-library.md     # Rust library (Tier 3)
├── src/                         # (create on Day 2)
│   └── .gitkeep
├── claims-template.toml         # Batch claim import (22 claims)
└── DAY1-SUMMARY.md              # (create after Day 1)

References

  • Plan: plan.md (start here)
  • Authority sources: docs/sources/ (use for provenance)
  • Complete example: dogfood/httpclient/ (gold standard)
  • Alternative: dogfood/dbpool/ (connection management patterns)
  • Skills:
    • /aphoria-suggest - Day 1 pattern discovery
    • /aphoria-claims - Day 1 claim authoring
    • /aphoria-custom-extractor-creator - Day 3 extractor generation

Success Criteria

Metric Target Validates
Pattern reuse ≥50% Cross-domain flywheel works
Time savings ≥60% Automation value proven
Detection rate ≥90% Scanning pipeline functional
Naming errors <2 Corpus conventions established

Ready to start Day 1! Follow plan.md and track metrics daily.