2.0 KiB
2.0 KiB
Recipe Manager — Agentic Harness Task Plan (Workflow Stabilization)
Goal
Implement and validate a reliable automated workflow run + reporting + failure alert loop, in small isolated chunks.
Task 1 — Add scheduler script + npm script
Scope
- Create
scripts/schedule-workflow.tsthat:- Runs workflow in resume mode
- Generates morning report afterward
- Exits non-zero on hard failure
- Add npm script in
package.json:workflow:schedule:ts-node scripts/schedule-workflow.ts
Constraints
- Keep script focused (no external integrations yet)
- Reuse existing runner/report code
Success criteria
npm run workflow:scheduleexecutes without TypeScript/runtime errors- Commit with conventional commit message
Task 2 — Add failure-state detector utility
Scope
- Create
scripts/check-workflow-health.tsthat reads status file and exits:0for healthy (running|completed|idle)1for unhealthy (failed|blocked)
- Print concise machine-readable output for automations
Success criteria
- Script behavior validated by direct execution + simple tests (or assertions)
- Conventional commit
Task 3 — Add tests for schedule + health check scripts
Scope
- Add tests under
scripts/__tests__/:- scheduler happy path
- scheduler failure propagation
- health check status mapping
Success criteria
npm testpasses- Conventional commit
Task 4 — Wire lightweight local automation docs
Scope
- Update README/RUNBOOK with exact commands for periodic execution (cron/systemd example)
- Include troubleshooting for failed/blocked status
Success criteria
- Docs are accurate to current scripts
- Conventional commit
Task 5 — End-to-end verification pass
Scope
- Run:
npm run workflow:run -- --mode restartnpm run workflow:schedulenpm test
- Capture outputs in final summary
Success criteria
- All commands succeed
- Final conventional commit if needed