Skip to main content

diatagma

Spec-driven story coordination for humans and AI agents.

Markdown spec files are the source of truth. Diatagma provides an MCP server for AI agents and a web dashboard for humans — both read and write the same plain markdown files with YAML frontmatter.

Features

  • Spec-driven workflow — write spec → derive tests from behavior → implement → verify
  • Plain markdown specs — prefixed, numbered files in a .tasks/ directory with structured YAML frontmatter
  • Typed file extensions — .story.md, .epic.md, .spike.md for instant identification
  • MCP server — AI agents create, query, claim, and update stories via typed tools
  • Web dashboard — kanban board, filterable list, dependency graph, inline editing (React + Litestar)
  • Dependency DAG — networkx-powered blocking/unblocking with cycle detection
  • Priority scoring — WSJF-style composite ranking (business value, story points, blockers, age, due dates)
  • No database — filesystem is the source of truth, SQLite is just a read cache
  • Changelog — append-only audit trail of all mutations with agent attribution
  • ADR + research docs — architectural decisions and spike findings as traceable knowledge
  • Configurable — templates, schemas, priority weights, sprints, lifecycle hooks

Quick Start

# Install
uv add diatagma

# Initialize a .tasks/ directory in your project
diatagma init

# Start the web dashboard
diatagma serve

# Start the MCP server (for AI agent integration)
diatagma mcp

Spec File Format

---
id: CORE-042
title: "Implement retry logic for API calls"
status: in-progress
type: feature
tags: [api, resilience]
business_value: 300
story_points: 5
parent: CORE-040
sprint: "Sprint 3"
assignee: claude-agent-abc
due_date: 2026-04-15
dependencies: [CORE-041]
created: 2026-03-27
---

## Description

Add exponential backoff retry logic to all external API calls.

## Context

Production incidents showed cascading failures when upstream APIs had transient errors.
See [ADR-005](docs/adr/005-retry-strategy.md) for the chosen approach.

## Behavior

### Scenario: Transient API failure recovers

- **Given** an external API call that fails with a 503
- **When** the retry logic is triggered
- **Then** it retries up to 3 times with exponential backoff and jitter

### Scenario: Persistent failure trips circuit breaker

- **Given** 5 consecutive API failures
- **When** the next call is attempted
- **Then** the circuit breaker opens and fails fast for 30 seconds

## Constraints

- Max 3 retries with jitter
- Circuit breaker timeout: 30s

## Verification

- [ ] All external API calls use retry with exponential backoff
- [ ] Circuit breaker opens after 5 consecutive failures
- [ ] Retry metrics exposed via logging

## References

- [ADR-005: Retry Strategy](docs/adr/005-retry-strategy.md)
- [Research: Circuit Breaker Patterns](docs/research/260320_circuit-breaker-patterns.md)

## Implementation Notes

Directory Structure

.tasks/
├── .gitignore              # Always ignores .cache/
├── .cache/                 # SQLite read cache (gitignored)
├── config/
│   ├── settings.yaml       # Tool behavior settings
│   ├── prefixes.yaml       # Prefix definitions
│   ├── schema.yaml         # Frontmatter validation rules
│   ├── priority.yaml       # WSJF scoring weights
│   ├── sprints.yaml        # Sprint boundaries
│   ├── hooks.yaml          # Lifecycle hooks
│   └── templates/
│       ├── story.md        # Story body template
│       ├── epic.md         # Epic body template
│       └── spike.md        # Spike/research template
├── roadmap.md              # Phased roadmap with narrative
├── changelog.md            # Append-only mutation log
├── backlog/                # Not yet scheduled
├── archive/                # Completed/cancelled
├── CORE-042-retry-logic.story.md
├── CORE-040-api-hardening.epic.md
└── ...

docs/
├── spec.md                 # Product specification
├── architecture.md         # System architecture + diagrams
├── adr/                    # Architecture Decision Records
│   ├── 001-slug.md
│   └── template.md
└── research/               # Date-prefixed research docs
    └── YYMMDD_slug.md

License

Apache 2.0

Metadata

Release files for diatagma 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diatagma 0.2.0
File Size Uploaded
diatagma-0.2.0.tar.gz 308.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for diatagma 0.2.0
File Interpreter ABI Platform
diatagma-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 401.0 kB

Release files / diatagma-0.2.0.tar.gz

Download URL diatagma-0.2.0.tar.gz
Size 308.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1b079c306332cacd267d5aee289f532df03181200e42064a3014162f2d42ba6a
BLAKE2b-256 checksum
How to use checksums
2e3ea1c9356fb325f509cba49cc7727e416ace078dbe425865fc6edcf077e261
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / diatagma-0.2.0-py3-none-any.whl

Download URL diatagma-0.2.0-py3-none-any.whl
Size 92.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78e15bac91731ac411dfe7ce60605a58a40c05bafbd7a6761d6ce7a6fb6f5d83
BLAKE2b-256 checksum
How to use checksums
bf2122376e503f78c6cf0a09453ad2212f9ea21c4fd3ce153c3d37b4ef2390c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page