generated from coulomb/repo-seed
Contract framework with markdown-native contracts utilizing fenced YAML blocks
This commit is contained in:
52
examples/contracts/adr.contract.md
Normal file
52
examples/contracts/adr.contract.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: ADR Contract
|
||||
version: "1.0"
|
||||
---
|
||||
|
||||
# ADR Contract
|
||||
|
||||
```yaml contract
|
||||
id: adr-contract-v1
|
||||
document:
|
||||
type: adr
|
||||
title: Architecture Decision Record
|
||||
fields:
|
||||
status:
|
||||
type: string
|
||||
required: true
|
||||
enum: [proposed, accepted, superseded]
|
||||
metrics:
|
||||
document:
|
||||
words:
|
||||
min: 40
|
||||
max: 900
|
||||
severity: warning
|
||||
sections:
|
||||
- id: context
|
||||
title: Context
|
||||
presence: required
|
||||
level: 2
|
||||
order:
|
||||
before: decision
|
||||
assertions:
|
||||
- id: context-names-problem
|
||||
contains_any: [problem, motivation, constraint]
|
||||
severity: warning
|
||||
guidance: Explain why the decision exists.
|
||||
- id: decision
|
||||
title: Decision
|
||||
presence: required
|
||||
level: 2
|
||||
assertions:
|
||||
- id: decision-commits
|
||||
matches: "\\b(choose|adopt|use|will)\\b"
|
||||
severity: error
|
||||
guidance: State the actual decision, not only background.
|
||||
- id: consequences
|
||||
title: Consequences
|
||||
presence: recommended
|
||||
level: 2
|
||||
- id: deprecated
|
||||
title: Deprecated Approach
|
||||
presence: forbidden
|
||||
```
|
||||
Reference in New Issue
Block a user