generated from coulomb/repo-seed
Workplan refinement and examples
This commit is contained in:
52
examples/source-adapters/adapter-list.json
Normal file
52
examples/source-adapters/adapter-list.json
Normal 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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
2
examples/source-adapters/fake-adapter-pyproject.toml
Normal file
2
examples/source-adapters/fake-adapter-pyproject.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[project.entry-points."markitect_tool.source_adapters"]
|
||||
fake = "fake_adapter:fake_adapter_descriptor"
|
||||
35
examples/source-adapters/inspect-result.json
Normal file
35
examples/source-adapters/inspect-result.json
Normal 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": []
|
||||
}
|
||||
86
examples/source-adapters/normalized-document.json
Normal file
86
examples/source-adapters/normalized-document.json
Normal 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": []
|
||||
}
|
||||
7
examples/source-adapters/normalized-output.md
Normal file
7
examples/source-adapters/normalized-output.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Fake Source
|
||||
|
||||
A small normalized segment.
|
||||
|
||||
## Second Segment
|
||||
|
||||
Another deterministic segment.
|
||||
11
examples/source-adapters/sample.fake
Normal file
11
examples/source-adapters/sample.fake
Normal file
@@ -0,0 +1,11 @@
|
||||
title: Fake Source
|
||||
creator: Markitect Fixture
|
||||
language: en
|
||||
|
||||
# Fake Source
|
||||
|
||||
A small normalized segment.
|
||||
|
||||
## Second Segment
|
||||
|
||||
Another deterministic segment.
|
||||
Reference in New Issue
Block a user