{
  "company": "Apex Instruments",
  "asOf": "2026-09-08",
  "title": "The sync ritual",
  "trigger": "Any change to any source file, including a change made by an agent.",
  "note": "Seven steps in a fixed order. Each one can stop the run. A stopped run is a normal outcome, not a failure, and the run says where it stopped and what it had already done.",
  "steps": [
    {
      "step": 1,
      "name": "Record the change",
      "does": "Writes a changelog entry naming the file, the person or route that changed it, and the kind of change, before anything else reads it.",
      "checks": "That the change has an author. A change with no author is a change nobody can be asked about.",
      "stops": "An anonymous write stops the ritual at step 1 and the file is restored from the previous build."
    },
    {
      "step": 2,
      "name": "Rank the source",
      "does": "Works out where the changed file sits in the article 1 order of authority, and which files outrank it.",
      "checks": "That the change does not contradict anything that outranks it.",
      "stops": "A working draft that contradicts an approved facts file stops here and is filed as a question rather than propagated."
    },
    {
      "step": 3,
      "name": "Check the decisions log",
      "does": "Reads every live decision that touches the changed subject, including the chain behind any superseded one.",
      "checks": "That no LOCKED decision is being moved by the change, and that no ACTIVE decision now disagrees with the data.",
      "stops": "A change that would move a LOCKED decision stops with the article number and the decision id. A disagreement with an ACTIVE decision does not stop the run, it files a question and continues."
    },
    {
      "step": 4,
      "name": "Sweep the placeholders",
      "does": "Finds every placeholder in every file that was waiting on the fact this change supplies, and fills them in one pass.",
      "checks": "That every placeholder it filled now holds a value with a citation, and that no placeholder was filled with a guess.",
      "stops": "A placeholder that cannot be filled from the change stops the sweep for that file, leaves the placeholder visible, and files a numbered question."
    },
    {
      "step": 5,
      "name": "Regenerate the cards",
      "does": "Rewrites the card for the changed source and any card that quoted a figure from it.",
      "checks": "That every regenerated card still points at a source that exists, and that its size has not grown past the card budget.",
      "stops": "A card that no longer fits the budget stops here rather than being trimmed automatically, because deciding what to drop is the one part of card writing that is not mechanical."
    },
    {
      "step": 6,
      "name": "Reproof what moved",
      "does": "Runs the proof route over every piece that cites the changed source, not over everything.",
      "checks": "Every figure against its source, the voice rules, and the confidentiality rules in article 6.",
      "stops": "A failed proof stops the piece, not the run. The run continues and reports the failed pieces at the end with the reason for each."
    },
    {
      "step": 7,
      "name": "Close the loop",
      "does": "Updates the register, marks any question this change answered, and writes the run report with what was touched and what stopped.",
      "checks": "That the number of files touched matches the number the run planned to touch.",
      "stops": "A mismatch between planned and touched stops the report from being marked clean, and the difference is named in the report rather than being reconciled quietly."
    }
  ],
  "closing": "The ritual is only worth having because of the stops. A sync that always finishes is a sync that is not checking anything."
}
