Cron Safety Integration Example¶
Goal¶
Wrap a scheduled Hermes task with maturity staging, state tracking, idempotency, compact errors, and hard stops.
Recommended Layout¶
Before the Cron Runs¶
- Confirm the task has passed the 4-condition test.
- Start at L1 and define the promotion criteria before automation begins.
- Create
STATE.mdfromtemplates/STATE.md.template. - Define idempotency keys for every side effect.
- Define the hard stops that force downgrade to L1.
Runtime Flow¶
cron trigger
-> read STATE.md
-> check maturity level
-> check idempotency keys
-> run deterministic collection steps
-> call LLM only for judgment or synthesis
-> run Maker/Checker gate when output quality matters
-> write STATE.md after each side effect
-> compact and classify errors
Promotion Rules¶
| From | To | Requirement |
|---|---|---|
| L1 | L2 | Reports are useful for at least one week |
| L2 | L3 | Human approvals are boring and consistently safe |
| L3 | L1 | Any hard stop, unsafe write, or repeated quality failure |
Example Hard Stops¶
- Output path is outside the approved report directory.
- The source returns malformed data for more than half of items.
- The Checker score falls below the pass threshold twice in a row.
STATE.mdcannot be read or written.