Workplan refinement and examples

This commit is contained in:
2026-05-14 21:49:43 +02:00
parent 28ce4b3f65
commit f8f20c7c32
13 changed files with 726 additions and 23 deletions

View File

@@ -0,0 +1,52 @@
{
"count": 1,
"adapters": [
{
"id": "source.fake",
"kind": "source-adapter",
"version": "1",
"name": "Fake Source Adapter",
"summary": "Contract-test adapter for plain fixture sources.",
"operations": [
"read"
],
"media_types": [
"text/x.markitect-fake"
],
"extensions": [
".fake"
],
"capabilities": [
{
"id": "source",
"kind": "read"
},
{
"id": "markdown",
"kind": "normalize"
},
{
"id": "diagnostics",
"kind": "emit"
},
{
"id": "provenance",
"kind": "emit"
},
{
"id": "filesystem",
"kind": "read"
}
],
"safety": {
"reads_files": true,
"writes_files": false,
"network": false,
"external_process": false
},
"docs": [
"docs/source-adapter-contract.md"
]
}
]
}

View File

@@ -0,0 +1,2 @@
[project.entry-points."markitect_tool.source_adapters"]
fake = "fake_adapter:fake_adapter_descriptor"

View File

@@ -0,0 +1,35 @@
{
"valid": true,
"asset": {
"uri": "examples/source-adapters/sample.fake",
"path": "examples/source-adapters/sample.fake",
"name": "sample.fake",
"media_type": "text/x.markitect-fake",
"extension": ".fake",
"size": 128,
"digest": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
},
"adapter": {
"id": "source.fake",
"version": "1",
"options": {}
},
"metadata": {
"title": "Fake Source",
"creators": [
"Markitect Fixture"
],
"language": "en",
"identifiers": {
"fixture": "fake-source-001"
}
},
"capabilities": [
"read"
],
"quality": {
"lossiness": "none",
"confidence": 1.0
},
"diagnostics": []
}

View File

@@ -0,0 +1,86 @@
{
"valid": true,
"document": {
"schema_version": "markitect.source.v1",
"document_id": "source.fake:fake-source-001",
"asset": {
"uri": "examples/source-adapters/sample.fake",
"path": "examples/source-adapters/sample.fake",
"name": "sample.fake",
"media_type": "text/x.markitect-fake",
"extension": ".fake",
"size": 128,
"digest": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
},
"metadata": {
"title": "Fake Source",
"creators": [
"Markitect Fixture"
],
"language": "en",
"identifiers": {
"fixture": "fake-source-001"
}
},
"markdown": "# Fake Source\n\nA small normalized segment.\n\n## Second Segment\n\nAnother deterministic segment.",
"segments": [
{
"segment_id": "seg-0001",
"order": 0,
"heading": "Fake Source",
"heading_level": 1,
"markdown": "# Fake Source\n\nA small normalized segment.",
"anchors": [
"fake-source"
],
"provenance": [
{
"source_uri": "examples/source-adapters/sample.fake",
"source_path": "examples/source-adapters/sample.fake",
"anchor": "fake-source",
"section": "Fake Source"
}
]
},
{
"segment_id": "seg-0002",
"order": 1,
"heading": "Second Segment",
"heading_level": 2,
"markdown": "## Second Segment\n\nAnother deterministic segment.",
"anchors": [
"second-segment"
],
"provenance": [
{
"source_uri": "examples/source-adapters/sample.fake",
"source_path": "examples/source-adapters/sample.fake",
"anchor": "second-segment",
"section": "Second Segment"
}
]
}
],
"quality": {
"lossiness": "none",
"confidence": 1.0,
"skipped_items": 0,
"warnings": 0
},
"diagnostics": [],
"provenance": [
{
"source_uri": "examples/source-adapters/sample.fake",
"source_path": "examples/source-adapters/sample.fake",
"digest": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
}
],
"adapter": {
"id": "source.fake",
"version": "1",
"options": {}
},
"cache_key": "source-normalize:sha256:2222222222222222222222222222222222222222222222222222222222222222"
},
"diagnostics": []
}

View File

@@ -0,0 +1,7 @@
# Fake Source
A small normalized segment.
## Second Segment
Another deterministic segment.

View File

@@ -0,0 +1,11 @@
title: Fake Source
creator: Markitect Fixture
language: en
# Fake Source
A small normalized segment.
## Second Segment
Another deterministic segment.