Class DecisionTreeBlockProcessor

java.lang.Object
org.asciidoctor.extension.BaseProcessor
org.asciidoctor.extension.BlockProcessor
network.ike.docs.koncept.DecisionTreeBlockProcessor
All Implemented Interfaces:
org.asciidoctor.extension.Processor

@Name("decision-tree") @Contexts(":listing") @ContentModel(":raw") public class DecisionTreeBlockProcessor extends org.asciidoctor.extension.BlockProcessor
The [decision-tree] block in the documentation build (dev-decision-tree-blocks): the static projection of the block the assistant surface renders live. It reads the block store-free (DecisionTreeSource), rolls it back at a health price (DecisionTreeRollback), sweeps every stated value one way (DecisionTreeSweep), and puts in the block's place what Komet draws: the tree as decision analysts draw it, left to right, a square where someone chooses, a circle where the world decides, a triangle where the consequences are counted, the rolled-back cost at every glyph, the chosen alternative heavy (DecisionTreeFigures); beneath it the tornado of the sweep, one bar per value; then the worked table, where each orange callout's number is computed from the inputs, generated rather than maintained.
[decision-tree, health-price=100000, symbol="$", title="Should this patient have a scan in year 2?"]
----
decision: k:ScanNow[Scan now?] @id=…
  …
----
The figures are drawn from the same geometry the live diagram lays out, with label widths estimated rather than measured: as self-contained SVG, inline on the html5 family, so the text stays text and a wide tree scrolls, and as a content-addressed file on Prawn and DocBook, where an image block is what those converters place; on the Typst backend as native Typst drawing code (DecisionFigureTypst), handed to the converter in a passthrough block with the role typst, so the print pipeline draws the figure with the document's own text and never through an embedded image. A block with no root decision renders as a literal block, so the text is visible, never dropped; a block with gaps renders with them named in a note.

A block that names a model, [decision-tree, model=<id>], is a rendering of the [graphlet-model] block before it (dev-decision-point-knowledge, settled 2026-11-06): it holds no structure and no number, only how the model is viewed, the standpoint it is rolled back from and the cohort it is counted out for. It draws the model's tree, ledger and sentences and the worked table, and no tornado: that is the [tornado, model=<id>] block's; and no table of assumptions: the model block draws its own parameters. A block with a body of its own still reads as before, tornado beneath.

  • Field Summary

    Fields inherited from class org.asciidoctor.extension.BlockProcessor

    name
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new block processor instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    process(org.asciidoctor.ast.StructuralNode parent, org.asciidoctor.extension.Reader reader, Map<String,Object> attributes)
     

    Methods inherited from class org.asciidoctor.extension.BlockProcessor

    getName, setName

    Methods inherited from class org.asciidoctor.extension.BaseProcessor

    createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createDocument, createList, createList, createList, createListItem, createListItem, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createSection, createSection, createSection, createSection, createSection, createTable, createTable, createTableCell, createTableCell, createTableCell, createTableCell, createTableColumn, createTableColumn, createTableRow, getConfig, log, newCursor, newCursor, newCursor, newReader, newReader, newReader, newReader, parseContent, setConfig, unwrap, updateConfig

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DecisionTreeBlockProcessor

      public DecisionTreeBlockProcessor()
      Creates a new block processor instance.
  • Method Details

    • process

      public Object process(org.asciidoctor.ast.StructuralNode parent, org.asciidoctor.extension.Reader reader, Map<String,Object> attributes)
      Specified by:
      process in class org.asciidoctor.extension.BlockProcessor