docs← Back to article

Markdown for LLMs

Protect a provision and its descendants

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# Protect a provision and its descendants

## Intent

I want to forbid changing a provision in a given window.

## Wrong form and why it stays silent

The end of an exclusive window must not be treated as protected; inside the window a descendant is protected.

```text title="Incorrect form"
effective @2026-06-30
```

## Correct form

```law
language "law.core" version "0.2";
package recipe.i05 version "1.0.0";
namespace "urn:recipe:i-sources:05";
source Act { kind policy; }
edition Prev of Act { language ru; officiality unofficial; materialization_status ABSTRACT_ONLY; in_force [@2026-01-01, infinity); }
edition Next of Act { language ru; officiality unofficial; materialization_status ABSTRACT_ONLY; in_force [@2026-01-01, infinity); }
fragment Old in Prev { kind article; locator "article/2/paragraph/1"; text ru unofficial """Первый текст."""; }
fragment New in Next { kind article; locator "article/2/paragraph/1"; text ru unofficial """Второй текст."""; }
entrenchment Core { source Act; locator "article/2"; window [@2026-01-01, @2026-07-01); }
revision Change { previous Prev; next Next; relation amends; effective @2026-07-01; op replace { locator "article/2/paragraph/1"; language ru; text """Второй текст."""; } }
```

## Frozen execution scene

| Variant | Result |
|---|---|
| descendant, 1 July | allowed |
| descendant, 30 June | E5301 |
| article/20, 30 June | allowed |
| effective missing | E5301 |

```python
>>> import runpy
>>> checks = runpy.run_path("docs/recipes/i-sources/resources/check.py")
>>> checks["migration"](https://github.com/arxohq/law/blob/master/docs/recipes/i-sources/5)
True
```

## Counterfactual

The `teaches` mutation reproduces `LDC-E5301`. Additional variants are checked by the shown adapter call.

## Boundary

Text protection does not detect a semantic conflict of a new standalone provision. Conflicting literals are needed for that.

## Pitfall

The check covers the domain and the window; the example repeats the segment bound of article/2 versus article/20.