SemText

Reference · NPL

<npl-poa>

NPL element

PromptLingo reference ↗

You write the tree, the reasoning with weights, and the option that was picked. The element shows all three parts; it never draws the tree for you.

Shows a plan as a decision tree, plus the reasons each path was weighed. You write the tree, the reasoning with weights, and the option that was picked. The element shows all three parts; it never draws the tree for you. One of `lr` | `td`; declares the intended flow and mirrors to `data-direction` (dual-form contract, `data-` wins, mirror deferred past parse via afterParse). The fence's own `graph LR`/`graph TD` line remains the renderer's source of truth — authored source is never rewritten. Anything other than `lr`/`td` falls back to `lr` with an author-facing warning. per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2)

Example

npl-poa.html
source
1 <npl-poa direction="lr">
2 <pre><code class="language-mermaid">graph LR
3 A{Decision} -->|"90%"| B[Path B]
4 A -->|"40%"| C[Path C]</code></pre>
5 <reasoning>
6 A --[90%]--> B: why this path is weighted high
7 A --[40%]--> C: why this is less preferred
8 </reasoning>
9 <selected>Path B — 90% weight; lowest migration cost.</selected>
10 </npl-poa>
render

Live render boots with JavaScript — the authored source is alongside.

variant: direction="td"

The top-down flow — the fence's own `graph TD` line stays the renderer's source of truth; `direction` declares the intended flow and mirrors to `data-direction`.

variant: direction="td"
npl-poa-td.html
source
1 <npl-poa direction="td">
2 <pre><code class="language-mermaid">graph TD
3 A{Decision} -->|"70%"| B[Path B]
4 A -->|"30%"| C[Path C]</code></pre>
5 <reasoning>
6 A --[70%]--> B: highest expected value
7 A --[30%]--> C: fallback if B is blocked
8 </reasoning>
9 <selected>Path B — 70% weight; highest expected value.</selected>
10 </npl-poa>
render

Live render boots with JavaScript — the authored source is alongside.

Source: spec/schema/npl/npl-poa.md