SARA stands for Solution Architecture Requirement for Alignment.
SARA is a command-line tool that manages Architecture documents and Requirements as an interconnected knowledge graph, providing a single source of truth for all teams and contributors in your organization.

Expand contents
In complex organizations, requirements and architecture documents are often scattered across teams, tools, and repositories. SARA brings everyone together by creating a unified knowledge graph that ensures:
SARA deliberately uses plain Markdown files with YAML frontmatter instead of proprietary formats. This is a conscious decision:
Your requirements are too important to be trapped in a proprietary system. And your documentation should work harder - write once, trace everywhere.
cargo install sara-cli
# Clone the repository
git clone https://github.com/cledouarec/sara.git
cd sara
# Build and install
cargo install --path sara-cli
# Verify installation
sara --version

| Command | Description |
|---|---|
sara check |
Parse documents and validate graph integrity |
sara diff <REF1> <REF2> |
Compare graphs between Git references |
sara edit <ID> |
Edit existing document metadata by item ID |
sara init <FILE> |
Initialize metadata in a Markdown file |
sara query <ID> |
Query items and traceability chains |
sara report coverage |
Generate coverage report |
sara report matrix |
Generate traceability matrix |
sara schema |
Export the active model schema as YAML |
Most commands support multiple output formats:
# Text output (default)
sara report coverage
# JSON output
sara report coverage --format json
# CSV output
sara report matrix --format csv -o matrix.csv
Sara uses a TOML configuration file (sara.toml by default):
# Optional: YAML file defining a custom domain model
model_schema = "model.yaml"
[repositories]
paths = [
"./docs",
"../other-repo/specs"
]
[validation]
strict_mode = false # Enable strict validation (non-critical issues become errors)
[output]
colors = true
emojis = true
[templates]
paths = ["./templates"] # Custom template directories (.tera document overrides)
| Variable | Description |
|---|---|
SARA_CONFIG |
Path to configuration file |
NO_COLOR |
Disable colored output when set |
Out of the box, Sara recognizes 10 document types forming a requirements hierarchy. They are the built-in default of a fully data-driven model: you can extend or redefine them with a custom model schema.
| Type | YAML Value | Description |
|---|---|---|
| Solution | solution |
Customer-facing solution |
| Use Case | use_case |
Customer/market need |
| Scenario | scenario |
Abstract system behavior |
| System Requirement | system_requirement |
Quantifiable system-level need |
| System Architecture | system_architecture |
Platform implementation |
| Hardware Requirement | hardware_requirement |
Hardware-specific need |
| Software Requirement | software_requirement |
Software-specific need |
| HW Detailed Design | hardware_detailed_design |
Hardware implementation |
| SW Detailed Design | software_detailed_design |
Software implementation |
| Architecture Decision Record | architecture_decision_record |
Cross-cutting design decision |
erDiagram
Solution {
string id PK
string name
string description
}
UseCase {
string id PK
string name
string description
string[] refines FK
}
Scenario {
string id PK
string name
string description
string[] refines FK
}
SystemRequirement {
string id PK
string name
string description
string specification
string[] derives_from FK
string[] depends_on FK
}
SystemArchitecture {
string id PK
string name
string description
string platform
string[] satisfies FK
}
HardwareRequirement {
string id PK
string name
string description
string specification
string[] derives_from FK
string[] depends_on FK
}
SoftwareRequirement {
string id PK
string name
string description
string specification
string[] derives_from FK
string[] depends_on FK
}
HardwareDetailedDesign {
string id PK
string name
string description
string[] satisfies FK
}
SoftwareDetailedDesign {
string id PK
string name
string description
string[] satisfies FK
}
ArchitectureDecisionRecord {
string id PK
string name
string description
string status
string[] deciders
string[] justifies FK
string[] supersedes FK
}
Solution ||--o{ UseCase : "is_refined_by"
UseCase ||--o{ Scenario : "is_refined_by"
Scenario ||--o{ SystemRequirement : "derives"
SystemRequirement ||--o{ SystemArchitecture : "is_satisfied_by"
SystemArchitecture ||--o{ HardwareRequirement : "derives"
SystemArchitecture ||--o{ SoftwareRequirement : "derives"
HardwareRequirement ||--o{ HardwareDetailedDesign : "is_satisfied_by"
SoftwareRequirement ||--o{ SoftwareDetailedDesign : "is_satisfied_by"
SystemRequirement }o--o{ SystemRequirement : "depends_on"
HardwareRequirement }o--o{ HardwareRequirement : "depends_on"
SoftwareRequirement }o--o{ SoftwareRequirement : "depends_on"
ArchitectureDecisionRecord ||--o{ SystemArchitecture : "justifies"
ArchitectureDecisionRecord ||--o{ SoftwareDetailedDesign : "justifies"
ArchitectureDecisionRecord ||--o{ HardwareDetailedDesign : "justifies"
ArchitectureDecisionRecord }o--o{ ArchitectureDecisionRecord : "supersedes"
Relationships are what transform isolated documents into a connected knowledge graph. They establish traceability between items, enabling impact analysis, coverage tracking, and requirement validation.
SARA uses semantic relationship names that reflect the nature of the connection:
| Relationship | Direction | Usage |
|---|---|---|
refines / is_refined_by |
Upstream / Downstream | Solution ↔ Use Case ↔ Scenario |
derives_from / derives |
Upstream / Downstream | Scenario ↔ System Requirement, System Architecture ↔ HW/SW Requirement |
satisfies / is_satisfied_by |
Upstream / Downstream | System Requirement ↔ System Architecture, HW/SW Requirement ↔ Detailed Design |
depends_on / is_required_by |
Peer (same type) | Requirement ↔ Requirement (same level dependencies) |
justifies / justified_by |
Upstream / Downstream | ADR ↔ System Architecture, Detailed Design |
supersedes / superseded_by |
Peer (same type) | ADR ↔ ADR |
Relationships are defined in the YAML frontmatter using reference fields:
---
id: "SYSREQ-001"
type: system_requirement
name: "Authentication Response Time"
# Upstream: where this requirement comes from
derives_from:
- "SCEN-001"
- "SCEN-002"
# Downstream: what implements this requirement
is_satisfied_by:
- "SYSARCH-001"
# Peer: dependencies on other requirements of the same type
depends_on:
- "SYSREQ-002" # Must have session management before auth timing
---
Requirements can depend on other requirements of the same type using depends_on / is_required_by. This is useful for:
---
id: "SWREQ-RETRY"
type: software_requirement
name: "Retry Logic with Exponential Backoff"
derives_from:
- "SYSARCH-COMM"
depends_on:
- "SWREQ-LOGGING" # Retry events must be logged
- "SWREQ-CONFIG" # Retry params come from config
---
ADRs capture significant design decisions and link them to the artifacts they justify. They have a lifecycle status and track decision-makers:
---
id: "ADR-001"
type: architecture_decision_record
name: "Use JWT for Authentication"
status: accepted
deciders:
- "Alice Smith"
- "Bob Johnson"
# Design artifacts this decision justifies
justifies:
- "SYSARCH-AUTH"
- "SWDD-AUTH-SERVICE"
---
# Context
We need a stateless authentication mechanism for our microservices.
# Decision
Use JWT (JSON Web Tokens) for authentication between services.
# Consequences
- Stateless: no session storage needed
- Tokens can be validated without database lookup
- Must handle token expiration and refresh
When a decision is replaced, use supersedes to maintain the decision history:
---
id: "ADR-002"
type: architecture_decision_record
name: "Switch to OAuth 2.0 with JWT"
status: accepted
deciders:
- "Alice Smith"
supersedes:
- "ADR-001" # This ADR replaces the previous auth decision
justifies:
- "SYSARCH-AUTH"
- "SWDD-AUTH-SERVICE"
---
You only need to define the relationship in one direction - SARA automatically infers the reverse link:
```yaml
id: "SCEN-001" derives: - "SYSREQ-001"