problem_specification

Convert informal problem statements into formal specifications with inputs, outputs, invariants, and contracts.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/tnn1t1s/iterator --skill problem-specification
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: problem_specification
Source: https://github.com/tnn1t1s/iterator/tree/main/.claude/skills/CS500/problem_specification
Command: npx skills add https://github.com/tnn1t1s/iterator --skill problem-specification

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Extracts formal problem definitions from vague requirements. Identifies type constraints, invariants, assumptions, and contracts.

Core Features & Use Cases

  • Formalize Inputs/Outputs: Define types, constraints, and guarantees.
  • Invariants & Contracts: Document pre/post conditions and exceptions.
  • Traceable Questions: Pose research questions to guide analysis.

Quick Start

Convert a vague problem statement into a formal k-way merge specification.

Frequently Asked Questions about problem_specification

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

FAQPage Schema
How do I convert vague requirements into a formal problem specification?

Formal specifications transform informal requirements into precise PROBLEM blocks with explicit INPUTS, OUTPUTS, INVARIANTS, ASSUMPTIONS, and CONTRACT sections. This defines type constraints, preconditions, postconditions, and resource semantics needed for algorithm design and verification without prescribing implementation details.

What should a formal specification include for algorithm design?

A complete specification captures type constraints on inputs and outputs, preconditions and postconditions, invariants that must hold throughout execution, assumptions about the problem domain, contracts defining expected behavior, and research questions guiding analysis. This ensures all parties have aligned expectations before coding.

When do I need to formalize requirements instead of starting implementation?

Formalization is critical when requirements are ambiguous, multiple implementations might fit, or correctness verification is essential. Explicit specifications catch misunderstandings early, enable cross-skill integration, and provide a contract for testing and proof that implementation matches intent.

How do invariants and contracts help with verification?

Invariants document conditions that remain true across algorithm execution, while contracts specify preconditions clients must satisfy and postconditions the algorithm guarantees. Together they form a verifiable interface enabling formal proof, automated testing, and integration confidence.

Can formal specifications guide algorithm selection and comparison?

Yes. By posing explicit research questions within a specification, you clarify which properties matter—time complexity, space bounds, fault tolerance—enabling systematic comparison of candidate algorithms against the contract rather than ad-hoc choices.

What's the difference between informal requirements and formal specifications?

Informal requirements use natural language and often leave gaps in type definitions, edge cases, and guarantees. Formal specifications eliminate ambiguity by explicitly stating types, constraints, invariants, assumptions, and contracts in structured notation suitable for verification and integration.