Dependencies
| Module | Description | Status |
|---|---|---|
| parser | Markdown parser | ✅ Complete |
| patterns | Pattern detection (Round-Trip, Idempotent, Producer-Consumer, Invariant, Oracle) | ✅ Complete |
| generator | PBT code generation with frequency-based generators | ✅ Complete |
| cli | CLI command parser | ✅ Complete |
| analyzer | Function extractor and arbitrary detector | ✅ Complete |
| pbt | PBT runtime with shrinking | ✅ Complete |
| pbt_sync | PBT synchronization | ✅ Complete |
| dogfooding | Self-testing | ✅ Complete |
| state_machine | State machine testing | ✅ Complete |
# Run all tests
moon test
# Type check
moon check
# CLI help
moon run src/aletheia
# Generate PBT targets
moon run src/aletheia -- generate ./src
# Generate with JSON summary (dry-run)
moon run src/aletheia -- generate ./src --dry-run --format json
# Analyze with detailed explanations
moon run src/aletheia -- analyze ./src --explain
# Sync PBT markdown (default: src/aletheia.pbt.mbt.md)
moon run src/aletheia -- sync
# Self-apply PBT generation (template output)
./scripts/self_pbt.sh
# self_pbt.sh runs generate/sync + moon info + moon fmt
# Development batch check
./scripts/dev-check.sh# Recommended PBT development workflow
# 1. Edit markdown
vim src/aletheia.pbt.mbt.md
# 2. Regenerate test files
./scripts/self_pbt.sh
# 3. Run tests
moon test
# 4. Review changes
git status
git diff
# 5. Commit (both markdown and generated test files)
git add src/aletheia.pbt.mbt.md src/*/pbt_generated_test.mbt
git commit -m "feat: add PBT tests for XYZ"# Try plugin locally (general use)
claude --plugin-dir ./plugins/aletheia-pbt
# Try plugin locally (self-apply)
claude --plugin-dir ./plugins/aletheia-self-pbt
# Add marketplace and install (within Claude Code)
/plugin marketplace add .
/plugin install aletheia-pbt@f4ah6o-plugins
/plugin install aletheia-self-pbt@f4ah6o-pluginssrc/
├── aletheia.pbt.mbt.md # PBT targets/properties aggregation
├── aletheia/ # CLI entry point
├── analyzer/ # Function extractor and arbitrary detector
├── ast/ # AST definitions
├── cli/ # CLI command processing
├── dogfooding/ # Self-testing (Dogfooding)
├── generator/ # PBT code generation
├── parser/ # Markdown parser
├── patterns/ # Pattern detection
├── pbt/ # PBT runtime
├── pbt_sync/ # PBT synchronization
└── state_machine/ # State machine testing# Running generate multiple times produces identical results
moon run src/aletheia -- generate ./src
moon run src/aletheia -- generate ./src # No diff
# Manual edits outside markers are preserved
echo "## Manual Notes" >> src/aletheia.pbt.mbt.md
moon run src/aletheia -- generate ./src
grep "Manual Notes" src/aletheia.pbt.mbt.md # Manual Notes still present# Generate first time
moon run src/aletheia -- generate ./src
cp src/aletheia.pbt.mbt.md /tmp/original.md
# Generate second time
moon run src/aletheia -- generate ./src
# Compare - should have no differences
diff /tmp/original.md src/aletheia.pbt.mbt.mdDependencies