declarative Markdown workflow layer

This commit is contained in:
2026-05-04 12:35:59 +02:00
parent 33fa602fe5
commit 0bc63aab9f
19 changed files with 1854 additions and 11 deletions

View File

@@ -0,0 +1,55 @@
# ADR Release Notes Workflow
```yaml workflow
metadata:
id: adr-release-notes
title: ADR Release Notes
version: "1"
owner: documentation
intent:
summary: Build release notes from accepted ADR decisions.
inputs:
adrs:
glob: adrs/*.md
where:
frontmatter.status: accepted
extract:
decisions:
selector: sections[heading=Decision]
statuses:
selector: frontmatter.status
steps:
render:
kind: template
template: templates/release-notes.md
data:
title: ADR Release Notes
decisions: ${sources.adrs.extracts.decisions}
outputs:
release_notes:
path: out/release-notes.md
content: ${steps.render.markdown}
permissions:
filesystem:
read: [adrs, templates]
write: [out]
network: false
resources:
cpu: local
timeouts:
workflow: 30s
retry_policies:
default:
max_attempts: 1
escalation_rules:
output_review:
when: before_publish
responsible: human
observability:
events: [workflow.started, workflow.step.completed, workflow.output.ready]
responsibilities:
agent:
may_run_deterministic_steps: true
human:
approves_publication: true
```

View File

@@ -0,0 +1,14 @@
---
status: accepted
---
# Record Contract Framework
## Context
Document generation needs clear semantic contracts.
## Decision
Use Markdown-native contracts with deterministic assertions before optional
assisted assessments.

View File

@@ -0,0 +1,13 @@
---
status: accepted
---
# Record Cache Backend
## Context
Repeated query and context workflows benefit from cached parsed structure.
## Decision
Use an optional local SQLite backend for snapshots, metadata, JSON, and FTS.

View File

@@ -0,0 +1,24 @@
# Assisted Review Workflow
```yaml workflow
metadata:
id: assisted-review-boundary
intent:
summary: Show an optional assisted-generation boundary.
steps:
review:
kind: assisted
optional: true
prompt_text: Review the generated Markdown for clarity.
data:
rubric: concise
outputs:
review:
path: out/review.md
content: ${steps.review.skipped}
permissions:
assisted_generation: false
responsibilities:
human:
approves_assisted_use: true
```

View File

@@ -0,0 +1,6 @@
# Source
```python
def example():
return "markitect"
```

View File

@@ -0,0 +1,32 @@
# Source Snippets Workflow
```yaml workflow
metadata:
id: source-snippets
title: Source Snippets
intent:
summary: Extract code fences from Markdown documents into a generated note.
inputs:
docs:
file: snippets/source.md
extract:
code:
selector: blocks[type=code]
steps:
render:
kind: template
template: templates/snippets.md
data:
snippets: ${sources.docs.extracts.code}
outputs:
snippets:
path: out/snippets.md
content: ${steps.render.markdown}
permissions:
filesystem:
read: [snippets, templates]
write: [out]
responsibilities:
agent:
may_run_deterministic_steps: true
```

View File

@@ -0,0 +1,3 @@
# {{title}}
{{decisions}}

View File

@@ -0,0 +1,3 @@
# Extracted Snippets
{{snippets}}