named_bullets
named_bullets renders a JSON object as a Markdown bullet list where each item uses a bold label followed by a scalar value.
Shape
{
"op": "named_bullets",
"path": ".",
"fields": [
{
"path": "name",
"label": "name"
}
]
}
Behavior
pathselects the object to render.fieldslists the object members to output.- Each field is rendered as
- **label:** value. - Field order is preserved exactly as written in the plan.
Requirements
pathmust resolve to a JSON object.fieldsmust not be empty.- Each
fields[].pathmust resolve relative to the selected object. - Each resolved field value must be a scalar JSON value.
Validation
Validation fails when:
- the directive
pathdoes not resolve to an object - a listed field does not exist
- a listed field resolves to an object or array
The current implementation also uses this directive for coverage checking. A plan that uses named_bullets must still cover all scalar leaf values in the input JSON.
Example
Input JSON:
{
"name": "Alice",
"role": "Engineer"
}
Plan:
{
"version": 1,
"directives": [
{
"op": "named_bullets",
"path": ".",
"fields": [
{
"path": "name",
"label": "name"
},
{
"path": "role",
"label": "role"
}
]
}
]
}
Output Markdown:
- **name:** Alice
- **role:** Engineer