Contract framework with markdown-native contracts utilizing fenced YAML blocks
This commit is contained in:
parent
3cfda33bc9
commit
e3e13ee45a
36 changed files with 2877 additions and 13 deletions
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
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue