aletheia-self-pbt | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / aletheia-self-pbt

aletheia-self-pbt

maintained by f4ah6o

star 0 account_tree 0 verified_user MIT License
bolt View GitHub

name: aletheia-self-pbt description: Sub skill for pbt-workflow-guide. Self-dogfooding workflow for the f4ah6o/aletheia.mbt repo, covering PBT generation, template updates, and validation.

Aletheia Self PBT

Overview

Self-dogfooding workflow for the f4ah6o/aletheia.mbt MoonBit repo. This skill covers the complete pipeline: analyzer/patterns/generator/cli. The tool validates its own quality using comprehensive property-based testing with 50+ tests and 100% pass rate.

Role in the Root Workflow

This is a sub skill of pbt-workflow-guide. Use it only when the target repository is f4ah6o/aletheia.mbt (this repo).

Use this skill when changing Aletheia's analyzer/patterns/generator/cli pipeline or regenerating this repo's .pbt.md files. For using Aletheia on other repos, use aletheia-pbt. For PBT design guidance (patterns, generators, shrinking, state machines), use pbt-workflow-guide.

v0.4.0 Enhancement Plan (Complete)

The comprehensive PBT enhancement plan has been completed across 6 phases:

  • Phase 1: Enhanced shrinking system with advanced strategies
  • Phase 2: Statistics integration for test insights
  • Phase 3: Enhanced invariant detection for collections
  • Phase 4: Size parameter control for recursive types
  • Phase 5: Stateful PBT workflow enhancements
  • Phase 6: Documentation and example improvements

Workflow

  1. Generate or sync PBT templates

    • Full regenerate: Run ./scripts/self_pbt.sh from repo root.
      • This script runs: generate → sync → moon info → moon fmt
    • Sync existing files: Run moon run src/aletheia -- sync ./src
  2. Review generated files

    • Check src/aletheia.pbt.md, src/cli/cli.pbt.md, and src/parser/parser.pbt.md for template correctness.
    • Keep templates as mbt nocheck until the property logic is valid; switch to mbt check only after validating semantics.
    • If you still have .pbt.mbt.md, rename to .pbt.md to avoid MoonBit treating it as source.
    • For generation filtering, you can configure moon.mod.json:
      • pbt_generic_names: comma-separated generic package names to avoid in output names (default src,main,module).
      • pbt_min_cases: minimum test case count to generate (default 1).
      • pbt_min_roundtrip, pbt_min_idempotent, pbt_min_pipeline, pbt_min_invariant, pbt_min_oracle: per-pattern minimums (default 0).
    • Use moon run src/aletheia -- generate ./src --explain to see skipped packages and reasons.
  3. Update detection/template logic (as needed)

    • Pattern detection: src/patterns/patterns.mbt
    • Signature extraction/type inference: src/analyzer/function_extractor.mbt
    • Property templates: src/generator/property_gen.mbt
    • CLI wiring: src/cli/main.mbt
  4. Verify

    • Run moon test (or moon test --update if snapshots intentionally change).
    • Review *.mbti diffs generated by moon info.

Important: Always Run Before Committing

Always run ./scripts/self_pbt.sh before committing PBT changes.

This script ensures:

  • Generated test files are properly formatted with moon fmt
  • PBT templates are synchronized correctly
  • Interface files (*.mbti) are updated via moon info

Self-Testing Coverage

The tool validates itself with comprehensive property-based tests:

  • Total Tests: 50+
  • Pass Rate: 100%
  • Pattern Coverage: All 5 pattern types (Round-Trip, Idempotent, Producer-Consumer, Invariant, Oracle)
  • State Machine Testing: Full stateful PBT workflow validation

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 0
GitHub Forks 0
Created Jan 2026
Last Updated 4 months ago
tools tools automation tools

Related Skills

specs-gen
chevron_right
pr

pr

MoonshotAI
star 6.1k
chevron_right
docker-expert
chevron_right
glm-coding-agent
chevron_right
drafting-pr
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.