shadowgraph_maintain
Execute time-based maintenance to mark due decisions stale, expire facts, and evaluate reopen rules for accurate decision memory.
Instructions
Run time-based maintenance: make due decisions stale, expire due facts, then evaluate reopen rules. shadowgraph_review only evaluates reopen rules, shadowgraph_validate only reports, shadowgraph_update_status cannot set stale. Writes, and depends on the clock: a repeat at the same instant finds nothing to do but still commits a revision.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| now | No | ISO 8601 instant to treat as the current time. Defaults to the real clock; supplying it makes the run deterministic. | |
| facts | No | Fact key/value overrides evaluated instead of the stored facts of the same key. Stored facts are used for every key not listed here, so reopen rules still work after a restart. | |
| changedFacts | No | Fact keys that just changed. Only string-form reopenWhen rules match this list; it is an ephemeral signal, not durable state. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | Yes | The instant maintenance ran against. | |
| due | Yes | Decisions due for reconsideration after the run. | |
| reviewSignals | Yes | Every persisted review signal after the run, open and acknowledged alike. | |
| agedDecisionIds | Yes | Compatibility alias of staleDecisionIds for older callers. | |
| staleDecisionIds | Yes | Decisions moved to stale because they passed reviewAfter. |