mint-backend-dev

Implement Python/FastAPI backend logic for MINT rules_engine calculations and API endpoints.

Updated Jan 25, 2026
One-click install
npx skills add https://github.com/MINT-IA/MINT --skill mint-backend-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mint-backend-dev
Source: https://github.com/MINT-IA/MINT/tree/main/.claude/skills/mint-backend-dev
Command: npx skills add https://github.com/MINT-IA/MINT --skill mint-backend-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps engineers implement and maintain MINT's Python/FastAPI backend logic so financial calculations, APIs, and schemas remain correct, testable, and compliant with project contracts.

Core Features & Use Cases

  • Rules engine development: Add pure, deterministic calculation functions in services/backend/app/services/rules_engine.py with legal sources and disclaimers in docstrings.
  • API & schema work: Extend Pydantic v2 models, wire endpoints in api/v1/endpoints, and keep tools/openapi/mint.openapi.canonical.json synchronized with SOT.md.
  • Testing & contracts: Write pytest golden tests with hardcoded expected values and use TestClient for endpoint tests; update SOT.md and OpenAPI when models or behaviors change.
  • Use Case: Add a new financial scenario that computes retirement projections, expose it via a REST endpoint, validate responses with schemas, and provide exact expected test vectors.

Quick Start

Implement a new scenario by adding an enum to schemas/scenario.py, creating a pure calculation function in services/rules_engine.py with the legal source in the docstring, wiring the endpoint, adding the response schema, writing pytest tests with hardcoded expected values, and updating the OpenAPI canonical file and SOT.md.

Frequently Asked Questions about mint-backend-dev

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

FAQPage Schema
How do I add a new financial calculation scenario to a FastAPI backend?

To add a new financial calculation scenario in FastAPI, define an enum in the scenario schema, create a pure deterministic function in the rules engine, wire the endpoint, add Pydantic v2 response models, and write pytest golden tests with hardcoded expected values.

How do I keep OpenAPI specs synchronized when updating Pydantic v2 schemas?

Synchronize OpenAPI specs by updating the canonical JSON file and SOT.md whenever Pydantic v2 models or API behaviors change, ensuring the API contract reflects the latest schema definitions and endpoint modifications.

What is the best way to test financial calculation functions in a rules engine?

Test financial calculation functions by writing pytest golden tests with hardcoded expected values to verify deterministic outputs, and use FastAPI TestClient to validate endpoint responses against the defined Pydantic v2 schemas.

Do I need to include legal sources in financial calculation function docstrings?

Yes, pure deterministic calculation functions in the rules engine require legal sources and disclaimers included directly in their docstrings to maintain compliance guardrails for financial calculations.

Can I use this approach for non-deterministic financial computations?

No, this approach requires pure deterministic calculation functions to ensure predictable pytest golden test outcomes, meaning non-deterministic financial computations do not fit the expected testing and contract model.

What are the limitations when extending Pydantic v2 models for financial APIs?

Extending Pydantic v2 models requires simultaneously updating OpenAPI canonical files and SOT.md documentation, and all schema changes must pass pytest golden tests with hardcoded expected values to maintain contract compliance.