hegel

Enable cross-language property-based testing with an imperative Draw API and server-backed shrinking.

6|1|Updated Nov 23, 2023
One-click install
npx skills add https://github.com/gmcabrita/dotfiles --skill hegel-gmcabrita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hegel
Source: https://github.com/gmcabrita/dotfiles/tree/main/.agents/skills/hegel
Command: npx skills add https://github.com/gmcabrita/dotfiles --skill hegel-gmcabrita

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Hegel enables cross-language property-based testing by providing an imperative Draw API (tc.draw) and server-backed shrinking, so developers can explore edge cases and ensure contracts hold across Rust, Go, C++, and more.

Core Features & Use Cases

  • Imperative Draw API (tc.draw) and standard assertions that work with existing language test runners.
  • Porting guidance and patterns to evolve unit tests into PBTs, including stateful model testing, dependent generation, and composite generators.
  • Rich reference material for multiple languages and practical patterns (round-trips, idempotence, parse robustness).

Quick Start

Write a test using tc.draw to generate inputs and run it with your project’s test framework.

Frequently Asked Questions about hegel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write property-based tests in Rust, Go, or C++ using an imperative draw API?

Property-based testing in Rust, Go, or C++ uses an imperative tc.draw API to generate inputs and standard assertions within existing language test runners, enabling edge case exploration across multiple languages.

How does server-backed shrinking work for cross-language property-based testing?

Server-backed shrinking supports cross-language property-based testing by automatically reducing failing test cases to minimal failing examples through an imperative draw API, ensuring robust contract validation across different programming environments.

What is the best way to port existing unit tests into property-based tests?

Porting existing unit tests into property-based tests involves applying provided porting guidance and patterns, utilizing composites and dependent generation to transform fixed inputs into dynamic generators within your current test framework.

Can I use tc.draw generators for stateful model testing across different languages?

The tc.draw generators fully support stateful model testing across different languages, allowing developers to execute dependent generation and imperative draws to validate complex state transitions and invariants.

What practical patterns are available for cross-language property-based testing?

Cross-language property-based testing provides rich reference material for practical patterns including round-trips, idempotence, and parse robustness, applicable across Rust, Go, and C++ development environments.

When should I use imperative draws instead of standard generators for property tests?

Imperative draws should be used for property tests when you need dependent generation, stateful model testing, or composite generators that require dynamic input decisions based on previously generated values within the test execution.