extension for ref resolve, explode, implode, weave, tangle

This commit is contained in:
2026-05-04 02:25:49 +02:00
parent 8203f50fd5
commit 65bfc1aebf
39 changed files with 3959 additions and 25 deletions

View File

@@ -3,7 +3,7 @@ id: MKTT-WP-0010
type: workplan
title: "Content References, Processors, and Literate Workflows"
domain: markitect
status: todo
status: done
owner: markitect-tool
topic_slug: markitect
planning_priority: P1
@@ -55,7 +55,7 @@ See `docs/content-reference-literate-workflow-research.md`.
```task
id: MKTT-WP-0010-T001
status: todo
status: done
priority: high
state_hub_task_id: "f70d2b9d-151b-46c6-9613-bd6bdbf164e7"
```
@@ -66,11 +66,18 @@ resolver inputs/outputs, and error cases.
Output: reference model docs, examples, and tests for path, namespace, selector,
and ID resolution.
Initial implementation completed with a `reference` extension package,
frontmatter namespace loading, root-bounded path resolution, existing query
selector reuse, heading/section/block fragment IDs, CLI access via
`mkt ref resolve`, reference docs, examples, and tests. Region/tag/fenced-block
addressing continues in P10.3; processor dependency/provenance use continues in
P10.2 and P10.5.
## P10.2 - Add token-safe transforms and operation provenance
```task
id: MKTT-WP-0010-T002
status: todo
status: done
priority: high
state_hub_task_id: "e35639b7-756f-4993-8b3c-2e58b23e0eca"
```
@@ -80,11 +87,17 @@ structured operation provenance, dependency edges, source spans, and diagnostics
Output: token-safe transform implementation and provenance result envelope.
Initial implementation completed with token-safe heading shifts, include
markers that stay literal inside fenced or indented code blocks, additive
`OperationProvenance` events on transform/include results, dependency edges for
resolved includes, docs, and regression tests. Rich structured diagnostics and
source maps continue through P10.3, P10.4, and P10.5.
## P10.3 - Implement named regions and addressable block selectors
```task
id: MKTT-WP-0010-T003
status: todo
status: done
priority: high
state_hub_task_id: "98cafe28-a364-48f1-ae55-cb47c71d9441"
```
@@ -94,11 +107,17 @@ selection by ID/tag/line range where appropriate.
Output: region parser/resolver, CLI examples, and source-snippet tests.
Initial implementation completed as reference-layer extensions: named
`mkt:region` comments, region tags, fenced-block IDs and tags from info-string
attributes, `#line:start-end` ranges, convenience ID lookup ordering, docs,
examples, and tests. Deeper source maps and processor-owned block semantics
continue in P10.5 and P10.6.
## P10.4 - Reimplement reversible explode/implode variants
```task
id: MKTT-WP-0010-T004
status: todo
status: done
priority: high
state_hub_task_id: "67f77aa1-a7ee-485c-891e-6ae7ecc52067"
```
@@ -111,11 +130,16 @@ reference and processor model is stable.
Output: `mkt explode`, `mkt implode`, manifest schema, roundtrip tests.
Initial implementation completed with a separate `explode` extension package,
manifest-first flat and hierarchical variants, exact roundtrip implode,
non-empty output protection, CLI commands, docs, and tests. Semantic variants
remain deferred until processor and content-class semantics are stable.
## P10.5 - Define processor registry for fenced blocks
```task
id: MKTT-WP-0010-T005
status: todo
status: done
priority: high
state_hub_task_id: "eb7cde08-8a73-4163-ac54-19a2bc7b5f88"
```
@@ -126,11 +150,18 @@ and return generated content/files, diagnostics, dependencies, and provenance.
Output: processor registry API, deterministic built-in processors, and tests.
Initial implementation completed with a deterministic `processor` extension
package, fenced-block discovery, explicit registry, context/policy envelope,
result files/diagnostics/dependencies/provenance, built-in identity,
uppercase, and reference-backed include processors, CLI `mkt process`, docs,
examples, and tests. Arbitrary code or LLM execution remains intentionally
outside this deterministic registry floor.
## P10.6 - Implement literate weave/tangle MVP
```task
id: MKTT-WP-0010-T006
status: todo
status: done
priority: high
state_hub_task_id: "090fcc38-758b-4414-b941-40f217eb17ca"
```
@@ -141,11 +172,16 @@ cross-references.
Output: `mkt tangle`, `mkt weave`, chunk-reference diagnostics, examples.
Initial implementation completed with a `literate` extension package, named
fenced code chunks, `tangle` targets, noweb-style `<<chunk-id>>` expansion,
missing/cyclic chunk diagnostics, deterministic file writing, woven chunk
index output, CLI `mkt tangle`/`mkt weave`, docs, examples, and tests.
## P10.7 - Design content class composition and multi-inheritance
```task
id: MKTT-WP-0010-T007
status: todo
status: done
priority: medium
state_hub_task_id: "220e6b27-2d7b-4c22-b5e8-304198ecfea8"
```
@@ -156,11 +192,16 @@ diagnostics.
Output: architecture note, examples, and a small deterministic resolver spike.
Initial implementation completed with a `content_class` extension package,
C3-style deterministic linearization, explicit slot merge policies, conflict
diagnostics, CLI `mkt class resolve`, docs, examples, and tests. Markdown
instantiation and snippet injection remain deferred to later integration work.
## P10.8 - Add migration examples from markitect-main
```task
id: MKTT-WP-0010-T008
status: todo
status: done
priority: high
state_hub_task_id: "287637d3-1997-43b2-b97d-10587d565cec"
```
@@ -169,3 +210,9 @@ Translate the relevant old explode/implode, transclusion, and spaces reference
graph tests into successor-style fixtures and examples.
Output: migration test inventory, example documents, and parity notes.
Initial implementation completed with WP-0010 migration parity notes,
successor-style examples for explode/implode, path include, reference-backed
transclusion, and literate tangling, plus tests that exercise these examples.
Legacy platform, database, infospace, rendering, and provider-specific
behaviors remain intentionally out of scope.