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

@@ -0,0 +1,30 @@
classes:
base-prd:
slots:
sections:
- Problem
- Decision
assertions:
tone: plain
audience: product
enterprise:
extends:
- base-prd
slots:
sections:
- Compliance
assertions:
audience: enterprise buyers
merge_policies:
sections: append
assertions: deep_merge
enterprise-prd:
extends:
- enterprise
slots:
sections:
- Rollout
merge_policies:
sections: append

15
examples/literate/app.md Normal file
View File

@@ -0,0 +1,15 @@
# Literate App Example
This example explains the helper before showing the application entry point.
```python {#helpers}
def helper():
return "ready"
```
```python {#main tangle="src/app.py"}
<<helpers>>
def main():
return helper()
```

View File

@@ -0,0 +1,17 @@
---
title: Legacy Explode Successor
---
Opening material that used to be easy to lose in section-only exports.
# Overview
The successor explode flow preserves preamble, headings, order, and frontmatter.
## Detail
Nested sections remain addressable and roundtrip through the manifest.
# Follow-Up
Later sections keep their document order.

View File

@@ -0,0 +1,12 @@
# Legacy Literate Successor
```python {#config}
CONFIG = {"ready": True}
```
```python {#main tangle="src/app.py"}
<<config>>
def main():
return CONFIG["ready"]
```

View File

@@ -0,0 +1,3 @@
# Path Include
<!-- mkt:include path="standard/clauses.md" selector="sections[heading~=Warranty]" -->

View File

@@ -0,0 +1,13 @@
---
title: Legacy Transclusion Successor
namespaces:
std: ./standard
---
# Contract Draft
The old broad transclusion idea is now split into path includes and
reference-backed processors.
```mkt-include {#payment-clause ref="std:clauses.md#payment"}
```

View File

@@ -0,0 +1,9 @@
# Standard Clauses
## Payment {#payment}
Payment is due within 30 days.
## Warranty {#warranty}
Warranty begins on the effective date.

View File

@@ -0,0 +1,26 @@
---
title: Reference Context
namespaces:
std: ./standard
---
# Reference Context
This document declares the namespaces used by reference examples.
## Local Overview
Local sections can be addressed with `#local-overview`.
<!-- mkt:region id="summary-snippet" tags="reuse summary" -->
This named region can be resolved with `#region:summary-snippet` or
`#tag:summary`.
<!-- /mkt:region -->
```python {#example-loader tags="code demo" tangle="src/example_loader.py"}
def load_example():
return "ready"
```
```mkt-include {#payment-example ref="std:clauses.md#payment-terms"}
```

View File

@@ -0,0 +1,9 @@
# Standard Clauses
## Payment Terms {#payment-terms}
Payment is due within 30 days unless a governing contract says otherwise.
## Warranty
The warranty period starts on the effective date.