Markdown for LLMs
Inherit an explicit context
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Inherit an explicit context
## Intention
I want to lift the common axes of a case into a named profile.
The zone and mode are stated once in the profile instead of being repeated in every case.
## Incorrect form and why it stays silent
Two records of the same axis at the same level do not mean override: that is LDC-E1207.
```law title="Incorrect form"
context profile Review {
timezone "Asia/Almaty";
timezone "UTC";
mode compliance;
}
```
## Correct form
The profile sets the shared fields; the case sets the dates. Each standalone tests file repeats the Review declaration: a profile is a transport input and does not enter the compiled program. Override is lawful between levels, not inside one block.
```law
language "law.core" version "0.2";
package recipes.n.r05 version "0.1.0";
namespace "urn:recipe:n-package:05";
context profile Review {
timezone "Asia/Almaty";
mode compliance;
}
relation accepted();
assert accepted() { valid [@2026-01-01, @2027-01-01); }
case ReviewCase {
context extends Review {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
}
}
```
## Frozen execution scene
| Facts | Question | Answer |
|---|---|---|
| Dated fact, Review profile | accepted() | TRUE_ONLY |
| Same fact, legal_time before the window in the child context | accepted() | NEITHER, ASSERTION_OUTSIDE_VALID |
```law
test "profile materializes" {
given {
context extends Review {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
}
}
evaluate truth(accepted());
expect truth_status == TRUE_ONLY;
}
```
```law
test "child date shifts applicability" {
given {
context extends Review {
legal_time @2025-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
}
}
evaluate truth(accepted());
expect truth_status == NEITHER;
expect issue(ASSERTION_OUTSIDE_VALID);
}
```
## Counterfactual
The `teaches` mutation adds a second timezone inside the profile. The second scene changes the date at the child level and pins a different outcome.
## Boundary
A profile does not choose an unpinned calendar and does not read the OS clock. The profile version/hash and dependencies are pinned by the package; runtime receives the materialized fields.
## Pitfall
A repeated timezone is rejected, and a child date moves the answer from Established to Not established, not refuted. This is not a “last key wins” rule.