Skip to content

Commit 915a7e2

Browse files
committed
docs(readme): reposition as architecture governance tool and add demo gif
1 parent 69c0812 commit 915a7e2

2 files changed

Lines changed: 23 additions & 33 deletions

File tree

README.md

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
<p align="center">
6-
<strong>Architecture Testing & Architecture-as-Code</strong>
6+
<strong>Architecture Governance & Architecture-as-Code</strong>
77
</p>
88

99
<p align="center">
@@ -20,36 +20,42 @@
2020

2121
---
2222

23-
> **Warning:** Experimental. Expect breaking changes.
23+
> **Warning:** Experimental. Expect breaking changes until release 0.1.0
2424
25-
Pacta enforces architectural rules in your codebase. Define layers, set boundaries, catch violations in CI.
25+
Pacta is an architecture governance tool that helps teams define architectural intent, gain insights through metrics and historical trends, detect architectural drift, and evolve codebases safely without blocking delivery.
26+
27+
```bash
28+
pip install pacta
29+
```
30+
31+
<p align="center">
32+
<img src="https://raw.githubusercontent.com/akhundMurad/pacta/main/assets/demo.gif" alt="Pacta Demo" width="700">
33+
</p>
2634

2735
Supported languages:
36+
2837
- Python
2938
- Java (coming soon)
3039
- Go (coming soon)
3140
- C# (coming soon)
3241

33-
```bash
34-
pip install pacta
35-
pacta scan . --model architecture.yml --rules rules.pacta.yml
36-
```
37-
3842
## Why?
3943

40-
Codebases rot. The "clean architecture" you designed becomes spaghetti after a few quarters. Pacta catches violations early — in PRs, not post-mortems.
44+
Codebases rot. Architecture degrades through small changes no one tracks. Pacta turns architecture into something measurable, reviewable, and enforceable — catching drift early, not months later.
4145

4246
## What it does
4347

44-
- **Static analysis** — parses Python AST, builds import graph
48+
- **Static analysis** — parses Python AST, builds a system graph
4549
- **Layer enforcement** — domain can't import from infra, etc.
46-
- **Baseline mode** — fail only on *new* violations, not legacy debt
4750
- **Snapshots** — version your architecture like code
51+
- **Baseline mode** — fail only on *new* violations, not legacy debt
4852
- **History tracking** — view architecture evolution over time
4953
- **Trend analysis** — track violations, nodes, edges over time with charts
5054

5155
## Quick example
5256

57+
> This is a minimal example. See the docs for advanced rules, baselines, and history.
58+
5359
Define your layers in `architecture.yml`:
5460

5561
```yaml
@@ -96,7 +102,7 @@ $ pacta scan . --model architecture.yml --rules rules.pacta.yml
96102
Domain layer must not import from Infrastructure
97103
```
98104

99-
## Baseline workflow
105+
### Baseline workflow
100106

101107
Got legacy violations? Save a baseline and only fail on new ones:
102108

@@ -108,34 +114,18 @@ pacta scan . --model architecture.yml --rules rules.pacta.yml --save-ref baselin
108114
pacta scan . --model architecture.yml --rules rules.pacta.yml --baseline baseline
109115
```
110116

111-
## History tracking
117+
### History tracking
112118

113-
Every scan creates a content-addressed snapshot. View your architecture evolution:
119+
Every scan creates a content-addressed snapshot. Inspect how your architecture evolves over time:
114120

115121
```bash
116122
# View timeline
117123
$ pacta history show --last 5
118124
119-
Architecture Timeline (5 entries)
120-
============================================================
121-
a1b2c3d4 2025-01-22 abc1234 main 42 nodes 87 edges 2 violations (latest)
122-
e5f6g7h8 2025-01-20 def5678 main 42 nodes 85 edges 4 violations
123-
...
124-
125-
# View trends over time
126-
$ pacta history trends . --metric violations
127-
128-
# Export chart as image (requires pacta[viz])
129-
$ pacta history trends . --output trends.png
130-
131-
# Export for external tools
132-
pacta history export --format json > history.json
125+
# View trends over time (violations, nodes, edges, coupling)
126+
$ pacta history trends .
133127
```
134128

135-
<p align="center">
136-
<img src="https://raw.githubusercontent.com/akhundMurad/pacta/main/assets/trends-example.png" alt="Trends Chart" width="600">
137-
</p>
138-
139129
## Docs
140130

141131
- [CLI Reference](https://akhundmurad.github.io/pacta/cli/)
@@ -149,7 +139,7 @@ pacta history export --format json > history.json
149139
- [x] Trend analysis with chart export
150140
- [ ] Architecture visualization (Mermaid, D2)
151141
- [ ] Health metrics (drift score, instability)
152-
- [ ] Proprietary hosted service with:
142+
- [ ] Optional hosted service (future):
153143
- Cross-repository insights
154144
- Historical trend analysis
155145
- Team-level governance and reporting

assets/demo.gif

411 KB
Loading

0 commit comments

Comments
 (0)