{
  "type": "document",
  "pos": {
    "line": 1,
    "column": 1
  },
  "endLine": 76,
  "meta": {
    "filename": "/Users/andreaferrarelli/code/noma/examples/word-review-loop.noma",
    "title": "Word Review Loop Demo",
    "author": "ferax564",
    "date": "2026-06-04T00:00:00.000Z"
  },
  "children": [
    {
      "type": "frontmatter",
      "data": {
        "title": "Word Review Loop Demo",
        "author": "ferax564",
        "date": "2026-06-04T00:00:00.000Z"
      },
      "raw": "title: Word Review Loop Demo\nauthor: ferax564\ndate: 2026-06-04",
      "pos": {
        "line": 1,
        "column": 1
      },
      "endLine": 5
    },
    {
      "type": "section",
      "id": "word-review-loop-demo",
      "level": 1,
      "title": "Word Review Loop Demo",
      "children": [
        {
          "type": "paragraph",
          "content": "This document is source-controlled Noma that can be handed to a reviewer as a\nWord package. The review controls, comments, and change requests stay tied to\nstable block IDs so an agent can reconcile the returned document without a\nfull-file rewrite.",
          "pos": {
            "line": 9,
            "column": 1
          },
          "endLine": 12
        },
        {
          "type": "directive",
          "name": "page_setup",
          "attrs": {
            "size": "letter",
            "margins": "0.7in 0.85in 0.75in 0.85in"
          },
          "children": [],
          "pos": {
            "line": 14,
            "column": 1
          },
          "endLine": 15
        },
        {
          "type": "directive",
          "name": "header",
          "attrs": {},
          "children": [
            {
              "type": "paragraph",
              "content": "Word review loop - confidential draft",
              "pos": {
                "line": 18,
                "column": 1
              },
              "endLine": 18
            }
          ],
          "pos": {
            "line": 17,
            "column": 1
          },
          "endLine": 19,
          "body": "Word review loop - confidential draft"
        },
        {
          "type": "directive",
          "name": "footer",
          "attrs": {},
          "children": [
            {
              "type": "paragraph",
              "content": "Noma source -> DOCX handoff -> extracted review data",
              "pos": {
                "line": 22,
                "column": 1
              },
              "endLine": 22
            }
          ],
          "pos": {
            "line": 21,
            "column": 1
          },
          "endLine": 23,
          "body": "Noma source -> DOCX handoff -> extracted review data"
        },
        {
          "type": "section",
          "id": "review-controls",
          "level": 2,
          "title": "Review Controls",
          "children": [
            {
              "type": "directive",
              "name": "grid",
              "attrs": {
                "columns": 3,
                "min": "13rem",
                "gap": "0.8rem",
                "wide": true,
                "compact": true
              },
              "children": [
                {
                  "type": "directive",
                  "name": "control",
                  "attrs": {
                    "id": "review_decision",
                    "type": "select",
                    "default": "revise",
                    "options": "approve=Approve,revise=Revise,block=Block",
                    "label": "Reviewer decision"
                  },
                  "children": [],
                  "pos": {
                    "line": 28,
                    "column": 1
                  },
                  "endLine": 29,
                  "id": "review_decision"
                },
                {
                  "type": "directive",
                  "name": "control",
                  "attrs": {
                    "id": "legal_ready",
                    "type": "toggle",
                    "default": false,
                    "label": "Ready for legal"
                  },
                  "children": [],
                  "pos": {
                    "line": 31,
                    "column": 1
                  },
                  "endLine": 32,
                  "id": "legal_ready"
                },
                {
                  "type": "directive",
                  "name": "control",
                  "attrs": {
                    "id": "confidence_score",
                    "type": "slider",
                    "min": 0,
                    "max": 100,
                    "step": 5,
                    "default": 70,
                    "label": "Reviewer confidence",
                    "unit": "%"
                  },
                  "children": [],
                  "pos": {
                    "line": 34,
                    "column": 1
                  },
                  "endLine": 35,
                  "id": "confidence_score"
                }
              ],
              "pos": {
                "line": 27,
                "column": 1
              },
              "endLine": 36
            },
            {
              "type": "directive",
              "name": "computed_table",
              "attrs": {
                "id": "review_scorecard",
                "label": "Confidence scenarios",
                "formula": "round(confidence_score * stage / 3, 0)",
                "domain": "stage:1..3",
                "unit": "%",
                "variable_label": "Review stage",
                "value_label": "Effective confidence"
              },
              "children": [
                {
                  "type": "paragraph",
                  "content": "The table exports as native HTML and DOCX table rows while remaining computed\nfrom the editable controls.",
                  "pos": {
                    "line": 39,
                    "column": 1
                  },
                  "endLine": 40
                }
              ],
              "pos": {
                "line": 38,
                "column": 1
              },
              "endLine": 41,
              "id": "review_scorecard",
              "body": "The table exports as native HTML and DOCX table rows while remaining computed\nfrom the editable controls."
            }
          ],
          "pos": {
            "line": 25,
            "column": 1
          },
          "endLine": 41
        },
        {
          "type": "section",
          "id": "renewal-terms",
          "level": 2,
          "title": "Renewal Terms",
          "children": [
            {
              "type": "directive",
              "name": "decision",
              "attrs": {
                "id": "renewal-terms-decision",
                "owner": "Commercial",
                "status": "draft"
              },
              "children": [
                {
                  "type": "paragraph",
                  "content": "Adopt a two-year renewal with a 60-day opt-out window and pricing protection\nfor seats already committed in the current order form.",
                  "pos": {
                    "line": 46,
                    "column": 1
                  },
                  "endLine": 47
                }
              ],
              "pos": {
                "line": 45,
                "column": 1
              },
              "endLine": 48,
              "id": "renewal-terms-decision",
              "body": "Adopt a two-year renewal with a 60-day opt-out window and pricing protection\nfor seats already committed in the current order form."
            },
            {
              "type": "directive",
              "name": "comment",
              "attrs": {
                "id": "comment-legal-window",
                "for": "renewal-terms-decision",
                "author": "Legal",
                "date": "2026-06-04"
              },
              "children": [
                {
                  "type": "paragraph",
                  "content": "Confirm whether the opt-out clock starts at signature or production launch.",
                  "pos": {
                    "line": 51,
                    "column": 1
                  },
                  "endLine": 51
                }
              ],
              "pos": {
                "line": 50,
                "column": 1
              },
              "endLine": 52,
              "id": "comment-legal-window",
              "body": "Confirm whether the opt-out clock starts at signature or production launch."
            },
            {
              "type": "directive",
              "name": "change_request",
              "attrs": {
                "id": "cr-renewal-terms",
                "for": "renewal-terms-decision",
                "status": "open",
                "priority": "high"
              },
              "children": [
                {
                  "type": "paragraph",
                  "content": "Replace \"60-day opt-out window\" with the final legal trigger once counsel\nconfirms the timing.",
                  "pos": {
                    "line": 55,
                    "column": 1
                  },
                  "endLine": 56
                }
              ],
              "pos": {
                "line": 54,
                "column": 1
              },
              "endLine": 57,
              "id": "cr-renewal-terms",
              "body": "Replace \"60-day opt-out window\" with the final legal trigger once counsel\nconfirms the timing."
            },
            {
              "type": "directive",
              "name": "table",
              "attrs": {
                "id": "handoff-matrix",
                "title": "Review handoff matrix",
                "header": true,
                "align": "l,l,l"
              },
              "children": [
                {
                  "type": "paragraph",
                  "content": "Area | Owner | Return signal\nCommercial terms | Commercial | `review_decision`\nLegal readiness | Legal | `legal_ready`\nRisk confidence | Strategy | `confidence_score`",
                  "pos": {
                    "line": 60,
                    "column": 1
                  },
                  "endLine": 63
                }
              ],
              "pos": {
                "line": 59,
                "column": 1
              },
              "endLine": 64,
              "id": "handoff-matrix",
              "body": "Area | Owner | Return signal\nCommercial terms | Commercial | `review_decision`\nLegal readiness | Legal | `legal_ready`\nRisk confidence | Strategy | `confidence_score`"
            }
          ],
          "pos": {
            "line": 43,
            "column": 1
          },
          "endLine": 64
        },
        {
          "type": "section",
          "id": "agent-reconciliation",
          "level": 2,
          "title": "Agent Reconciliation",
          "children": [
            {
              "type": "directive",
              "name": "agent_task",
              "attrs": {
                "id": "extract-word-review",
                "assignee": "agent",
                "status": "todo"
              },
              "children": [
                {
                  "type": "paragraph",
                  "content": "Run `noma docx-data dist/examples/word-review-loop.docx`, inspect reviewer\ncontrol values, and apply source updates only to blocks referenced by changed\ncontrols or review annotations.",
                  "pos": {
                    "line": 69,
                    "column": 1
                  },
                  "endLine": 71
                }
              ],
              "pos": {
                "line": 68,
                "column": 1
              },
              "endLine": 72,
              "id": "extract-word-review",
              "body": "Run `noma docx-data dist/examples/word-review-loop.docx`, inspect reviewer\ncontrol values, and apply source updates only to blocks referenced by changed\ncontrols or review annotations."
            },
            {
              "type": "directive",
              "name": "export_button",
              "attrs": {
                "format": "llm",
                "target": "document"
              },
              "children": [
                {
                  "type": "paragraph",
                  "content": "Label: Copy agent handoff context",
                  "pos": {
                    "line": 75,
                    "column": 1
                  },
                  "endLine": 75
                }
              ],
              "pos": {
                "line": 74,
                "column": 1
              },
              "endLine": 76,
              "body": "Label: Copy agent handoff context"
            }
          ],
          "pos": {
            "line": 66,
            "column": 1
          },
          "endLine": 76
        }
      ],
      "pos": {
        "line": 7,
        "column": 1
      },
      "endLine": 76,
      "aliases": [
        "word-review-loop"
      ]
    }
  ]
}