sage-interpreter

Interpret SAGE specs and generate implementations, tests, or documentation.

4|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/lememta/sage-lang --skill sage-interpreter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sage-interpreter
Source: https://github.com/lememta/sage-lang/tree/main
Command: npx skills add https://github.com/lememta/sage-lang --skill sage-interpreter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Interpreting SAGE specs can be tedious and error-prone when moving across levels of formality. This skill provides a consistent, human-friendly and machine-friendly interpretation that can generate implementations, tests, or improvements from the given spec.

Core Features & Use Cases

  • Interpret Level 0 natural language, Level 1 structured specs, and Level 2 formal refinements.
  • Generate code, tests, or documentation from the spec, while preserving decisions marked with !!
  • Explain a spec in plain language to facilitate refinement discussions and design decisions.
  • Provide quick-start prompts and templates to accelerate spec-driven development.

Quick Start

Provide a SAGE spec file to the skill and request a code generation pass (implementation, tests, or refinement) for immediate results.

Frequently Asked Questions about sage-interpreter

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

FAQPage Schema
How do I generate code and tests from a SAGE specification?

To generate code and tests from a SAGE specification, provide the spec file and request a generation pass. The interpreter processes formality levels 0–2 to output concrete implementations, tests, or documentation while preserving decisions marked with !!.

What are SAGE spec formality levels and how do they affect interpretation?

SAGE spec formality levels range from 0 for natural language to 1 for structured specs and 2 for formal refinements. The interpreter validates contracts, invariants, and termination hints present at higher levels to ensure accurate structured outputs for downstream tooling.

Can I explain a structured specification in plain language for design discussions?

Yes, you can explain a structured specification in plain language to facilitate refinement discussions. The interpreter translates formal SAGE specs into human-friendly descriptions and suggests improvements to clarify design decisions.

How do I preserve explicit design decisions when interpreting specs?

To preserve explicit design decisions when interpreting specs, mark them with the !! symbol in the SAGE file. The interpreter ensures these marked decisions remain intact across all generated implementations, tests, and documentation artifacts.

What is the best way to validate contracts and invariants in a specification?

The best way to validate contracts and invariants in a specification is by using formal Level 2 SAGE refinements. The interpreter automatically validates contracts, invariants, and termination hints when present during the interpretation pass.