formal-agent

A tool that converts natural-language requirements into precise, checkable specifications. Formal specifications use exact rules or mathematical notation so that software behavior can be validated before implementation.

In plain words
What is it for?
Use it to create, validate, and model-check specifications in supported formats, and to produce specifications that can guide test generation.
Why use it?
It reduces ambiguity between requirements and tests by making expected behavior explicit. It can also expose the limits of an older proof-of-concept interface, which is not current evidence that a model checker actually ran.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/itdojp/ae-framework/formal-agent
Clone the repo
git clone --depth 1 https://github.com/itdojp/ae-framework
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,515 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.06515
Opus 5 $0.00000 $0.03257
Sonnet 5 $0.00000 $0.01303
Haiku 4.5 $0.00000 $0.00651

Measured yesterday against content hash 70901d7811f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

formal-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/legacy/agents/formal-agent.md · 988 lines

How it starts

The opening of the file, as written. The whole thing — 988 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Formal Agent - Phase 2 of ae-framework

🌍 Language / 言語: English | 日本語

Historical document / 履歴文書: This page preserves the retired PoC interface, including enableModelChecking and model_check, for historical context only. Those paths did not constitute actual checker execution and are not current Assurance evidence. Use docs/quality/formal-runbook.md for the current scaffold/execution boundary. / このページは廃止済み PoC interface を履歴として保存しています。enableModelCheckingmodel_check は実 checker execution または現在の Assurance Evidence ではありません。現行境界は docs/quality/formal-runbook.md を参照してください。


English

The Formal Agent is a critical component of the ae-framework that bridges Phase 1 (Intent) and Phase 3 (Tests) by converting requirements into formal, verifiable specifications. It provides comprehensive capabilities for generating, validating, and model-checking formal specifications across multiple notations and formats.

Overview

The Formal Agent transforms natural language requirements into mathematically precise specifications that can be validated, verified, and used to generate tests. It supports multiple formal specification languages and provides integrated validation and model checking capabilities.

Key Capabilities

  • Formal Specification Generation: TLA+, Alloy, Z notation
  • API Specification Creation: OpenAPI, AsyncAPI, GraphQL schemas
  • State Machine Generation: FSM definitions with invariants
  • Contract Specification: Design by Contract (preconditions, postconditions, invariants)
  • Property-based Specifications: For property-based testing
  • Formal Verification: Model checking and property verification
  • Specification Validation: Consistency and correctness checking
  • Diagram Generation: UML, sequence, state, class, and component diagrams

Architecture

The Formal Agent consists of two main components:

  1. Core Agent (src/agents/formal-agent.ts): The main business logic
  2. MCP Server Wrapper (src/mcp-server/formal-server.ts): Model Context Protocol server for tool integration

Read the full file on GitHub · 988 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 988 lines · 0 tokens per session scan A 70901d7811f2

Subscribe to this mod's changes

formal-agent is an agent published in the GitHub repository itdojp/ae-framework (2 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 6,515 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

playwright-test-generator

Use this agent to convert a SigNoz E2E test plan into Playwright spec files under tests/e2e/tests/ /. Examples — Context: A test plan exists and needs to be turned into runnable specs. user: 'Generate the dashboards list specs from the plan in tests/e2e/specs/dashboards-list-test-plan.md' assistant: 'Using the…

SigNoz/signoz · 0 tokens

playwright-test-healer

Use this agent to debug and fix failing SigNoz E2E Playwright tests. Examples — Context: A spec is red. user: 'tests/e2e/tests/dashboards/list.spec.ts is failing, fix it' assistant: 'Using the healer agent to debug each failing scenario and adjust the spec.' Context: After a frontend change a previously-green spec…

SigNoz/signoz · 0 tokens

playwright-test-planner

Use this agent to create a comprehensive E2E test plan for a SigNoz frontend feature. Examples — Context: A new feature has shipped and we need test coverage. user: 'Plan E2E tests for the alerts list page' assistant: 'I'll use the planner agent to read the relevant frontend source, navigate the page in a real…

SigNoz/signoz · 0 tokens

codex

Production OpenAI-Codex-capable rootfs/initramfs.

the-void-ia/void-box · 0 tokens

claude

Production Claude-capable rootfs/initramfs.

the-void-ia/void-box · 0 tokens

doc-style

Markdown documentation prose — RFCs, ADRs, files under docs/, and READMEs — follows the same one-paragraph-per-line rule as commit messages. Write each paragraph on a single line; do not hard-wrap prose to a fixed column. The renderer reflows it to the reader's display width, whereas manual mid-paragraph line breaks…

the-void-ia/void-box · 0 tokens