Intent contract tagging, validation and semantic mapping for codebases.
Project description
Intract
AI Cost Tracking
- 🤖 LLM usage: $1.8471 (6 commits)
- 👤 Human dev: ~$439 (4.4h @ $100/h, 30min dedup)
Generated on 2026-05-31 using openrouter/qwen/qwen3-coder-next
Intract is an intent-contract layer for codebases and software delivery artifacts.
It lets you describe, validate and monitor intent across:
code
functions
classes
files
project manifests
API endpoints
Dockerfiles
CI/CD workflows
Kubernetes manifests
DevOps artifacts
Intract is not primarily a programming language. It is a contract system for short, portable intent declarations.
Quick example
# @intract.v1 scope:function intent:validate:user_permission priority:1 domain:security input:user,resource output:allowed effect:none forbid:write,network validate:input_presence,return_value,no_forbidden_effect meaning:"check whether user can modify resource without changing state"
def can_update_resource(user, resource):
return user.is_admin or resource.owner_id == user.id
Run:
python -m intract scan .
python -m intract validate .
Documentation
Start here:
- Docs index
- Getting Started
- Commands Reference
- Contract Format
- Manifest
intract.yaml - Architecture
- Validation Model
- Watch & Engine
- Plugins
- Integrations
- Roadmap
Important project locations
Core:
src/intract/src/intract/models.pysrc/intract/parser.pysrc/intract/signature.pysrc/intract/validation.py
Operational modules:
src/intract/cli.pysrc/intract/config.pysrc/intract/policy.pysrc/intract/git.pysrc/intract/watch.py
Analysis engine:
src/intract/engine/src/intract/engine/scanner.pysrc/intract/engine/analyzer.pysrc/intract/engine/assigner.pysrc/intract/engine/drift.pysrc/intract/engine/monitor.py
Plugins and integrations:
src/intract/plugins/src/intract/integrations/src/intract/integrations/planfile.pysrc/intract/artifacts.pysrc/intract/reporters/sarif.py
Schemas and templates:
schemas/intract.schema.jsontemplates/templates/intract.yamltemplates/pyproject-intract.tomltemplates/openapi.intract.yamltemplates/Dockerfile.intract
Examples:
examples/integration_tests/examples/integration_tests/01_python_pass/examples/integration_tests/02_typescript_violation_planfile/examples/integration_tests/03_watch_engine_drift/examples/integration_tests/run_examples.py
SDKs:
CI / packaging:
Installation
pip install -e .[dev]
Main commands
python -m intract scan .
python -m intract validate .
python -m intract check .
python -m intract check --staged
python -m intract check --changed --base main
python -m intract check . --format sarif --output intract.sarif
python -m intract check-manifest intract.yaml
python -m intract coverage .
python -m intract duplicates .
python -m intract graph . --format mermaid
python -m intract watch .
python -m intract tickets .
python -m intract artifact Dockerfile
python -m intract artifact openapi.yaml
python -m intract engine suggest .
python -m intract engine drift .
python -m intract engine run .
Run examples
python examples/integration_tests/run_examples.py
Expected:
example_01: pass
example_02: violation + planfile-compatible ticket
example_03: watch/engine/drift works
Project manifest
Generate:
python -m intract init .
Validate:
python -m intract check-manifest intract.yaml
python -m intract validate . --manifest intract.yaml
Pre-commit
Example .pre-commit-config.yaml:
repos:
- repo: local
hooks:
- id: intract
name: intract intent contracts
entry: intract check --staged
language: system
pass_filenames: false
SARIF / GitHub Code Scanning
python -m intract check . --format sarif --output intract.sarif
GitHub workflow:
License
Licensed under Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file intract-0.5.4.tar.gz.
File metadata
- Download URL: intract-0.5.4.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac37ac71956015f1654b30f36fa4e7ae0ca4e2856c278a9fccecac13825cb057
|
|
| MD5 |
4bcf4b3acea26eccbc2b895c13d55299
|
|
| BLAKE2b-256 |
2dffe26d5e26290edbcbe9ad925b7fce8f1af375fb3e75008693e5e4557b2683
|
File details
Details for the file intract-0.5.4-py3-none-any.whl.
File metadata
- Download URL: intract-0.5.4-py3-none-any.whl
- Upload date:
- Size: 75.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c0f5642202273ef2cbebf8c68c870af43ae4f039b0fcb6423bd9f6a3c928ce5
|
|
| MD5 |
a023d3e776eda65031051ee58cb2beda
|
|
| BLAKE2b-256 |
5570842da1811406a16dfeebe17e29c754b059858153ac3d2d59b60bcbf0ce7e
|