Skip to main content

Spec-driven development with full traceability

Project description

cion

Most spec-to-code tools generate code and documentation separately, then try to link them after the fact. cion asks the model to produce the traceability graph as it generates — every class and method comes out already tagged with the requirement that justifies it. The links are structural, not scraped. That means impact analysis and coverage are computed from data the model committed to, not from pattern-matching on what it happened to produce.


Install

pip install "cion-cli[anthropic]"   # Claude
pip install "cion-cli[openai]"      # GPT-4o
pip install "cion-cli[ollama]"      # local models via Ollama

See it in 60 seconds

$ cat requirements.txt
The system is a task management API.
Users can create tasks with a title and due date.
Tasks have a status: todo, in_progress, or done.
Users can list tasks filtered by status.
Users can delete a task by ID.

$ cion run requirements.txt
OK  Traceability graph → graph.json
✓   Written: output/task.py
✓   Written: output/task_repository.py
✓   Written: output/task_service.py
✓   Written: output/task_controller.py

Done!  Run cion coverage or cion trace to inspect the graph.
$ cion trace
Traceability Graph
├── REQ-001  Users can create tasks with a title and due date
│   ├── CLS-001  Task
│   │   └── task.py
│   └── CLS-003  TaskService
│       └── task_service.py
├── REQ-003  Tasks have a status: todo, in_progress, or done
│   └── CLS-001  Task
│       └── task.py
├── REQ-005  Users can list tasks filtered by status
│   ├── CLS-002  TaskRepository
│   │   └── task_repository.py
│   └── CLS-003  TaskService
│       └── task_service.py
└── REQ-007  Users can delete a task by ID
    ├── CLS-002  TaskRepository
    │   └── task_repository.py
    └── CLS-003  TaskService
        └── task_service.py
$ cion impact REQ-001
REQ-001  Users can create tasks with a title and due date
├── Classes (2)
│   ├── Task
│   └── TaskService
├── Methods (3)
│   ├── Task.__init__
│   ├── TaskService.create_task
│   └── TaskController.create_task_endpoint
└── Files (2)
    ├── task.py
    └── task_service.py

Commands

Command What it does
cion run REQUIREMENTS_FILE Full pipeline: parse → class diagram → code
cion trace Requirement → class → file tree
cion coverage Table showing which classes and files cover each requirement
cion impact REQ-ID Everything that changes if this requirement is modified

cion run options: --provider / -p (anthropic · openai · ollama), --model / -m, --output-dir / -o, --graph / -g.


How it works

Three chained LLM calls with structured JSON output:

  1. Parse — plain text → requirements[] with sequential IDs and priorities
  2. Classes — requirements → class diagram; every class and method carries traces_to: [REQ-...]
  3. Code — class diagram → Python files; each file carries traces_to (class IDs) and req_traces (requirement IDs)

The traceability graph (graph.json) is built during generation. cion trace, cion coverage, and cion impact query it directly — no heuristics, no re-parsing the generated source.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cion_cli-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cion_cli-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file cion_cli-0.1.0.tar.gz.

File metadata

  • Download URL: cion_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cion_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 caaeac2298d28115fc71b56258392e70784cf451f7c32dc90d85663f1d5854ba
MD5 8a6a96c48f6924fd7e4430f96613d737
BLAKE2b-256 934c7514e01d490c4b833dd51a552e12f572bef288cf9cdb1882796ef1f27caa

See more details on using hashes here.

Provenance

The following attestation bundles were made for cion_cli-0.1.0.tar.gz:

Publisher: python-publish.yml on cristian-ion/cion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cion_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cion_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cion_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8a2a3369515570b6f827ae1c81fc254be7366cd78e20f5c3309bccc54e59759
MD5 1c9bfdb1df4e0d247014cb8eb38c4fa0
BLAKE2b-256 c471cc001a01d32186dd558f86d99c49461ad7294fca240eb0034f7b749ccea0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cion_cli-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on cristian-ion/cion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page