Clarify scheduler completion publish flow

This commit is contained in:
thePR0M3TH3AN committed 2026-02-14 15:46:38 -05:00
1 parent c9596fea21
commit 136493b721
3 files changed
+53 -4

No files matched your search

+2 -1
View File
@@ -34,7 +34,8 @@
"lock:lock": "node bin/torch-lock.mjs lock",
"dashboard:serve": "node bin/torch-lock.mjs dashboard",
"build": "node build.mjs",
"lint": "eslint ."
"lint": "eslint .",
"lock:complete": "node bin/torch-lock.mjs complete"
},
"dependencies": {
"nostr-tools": "2.19.4",
+24 -2
View File
@@ -50,7 +50,18 @@ MUST 3: Run these commands in this order:
Exit 0 = lock acquired, proceed. Exit 3 = race lost, go back to step 3.
6) Execute selected prompt from src/prompts/daily/
7) Run repository checks (for example: npm run lint)
8) Create `_completed.md` or `_failed.md`, commit, push
8) Publish completion before writing `_completed.md`:
AGENT_PLATFORM=<platform> npm run lock:complete -- --agent <agent-name> --cadence daily
(Equivalent command allowed: torch-lock complete --agent <agent-name> --cadence daily)
- Exit 0: continue.
- Exit non-zero: fail the run, write `_failed.md` with a clear completion-publish failure reason and retry guidance, then stop.
9) Only after step 8 succeeds, write final task log (`_completed.md` for success, `_failed.md` for failure), commit, push
Worked example (required order):
- `AGENT_PLATFORM=codex npm run lock:lock -- --agent content-audit-agent --cadence daily`
- execute selected prompt work
- `AGENT_PLATFORM=codex npm run lock:complete -- --agent content-audit-agent --cadence daily` (complete, permanent)
- write `task-logs/daily/<timestamp>__content-audit-agent__completed.md`
MUST 4: If all daily agents are excluded, stop and write `_failed.md` with this exact reason: `All roster tasks currently claimed by other agents`.
```
@@ -101,7 +112,18 @@ MUST 3: Run these commands in this order:
Exit 0 = lock acquired, proceed. Exit 3 = race lost, go back to step 3.
6) Execute selected prompt from src/prompts/weekly/
7) Run repository checks (for example: npm run lint)
8) Create `_completed.md` or `_failed.md`, commit, push
8) Publish completion before writing `_completed.md`:
AGENT_PLATFORM=<platform> npm run lock:complete -- --agent <agent-name> --cadence weekly
(Equivalent command allowed: torch-lock complete --agent <agent-name> --cadence weekly)
- Exit 0: continue.
- Exit non-zero: fail the run, write `_failed.md` with a clear completion-publish failure reason and retry guidance, then stop.
9) Only after step 8 succeeds, write final task log (`_completed.md` for success, `_failed.md` for failure), commit, push
Worked example (required order):
- `AGENT_PLATFORM=codex npm run lock:lock -- --agent bug-reproducer-agent --cadence weekly`
- execute selected prompt work
- `AGENT_PLATFORM=codex npm run lock:complete -- --agent bug-reproducer-agent --cadence weekly` (complete, permanent)
- write `task-logs/weekly/<timestamp>__bug-reproducer-agent__completed.md`
MUST 4: If all weekly agents are excluded, stop and write `_failed.md` with this exact reason: `All roster tasks currently claimed by other agents`.
```
+27 -1
View File
@@ -88,4 +88,30 @@ Use this document for all scheduler runs.
8. Execute `<prompt_dir>/<prompt-file>` end-to-end.
9. Create exactly one final status file (`_completed.md` or `_failed.md`), run repo checks, commit, and push.
9. Run repository checks (for example: `npm run lint`).
10. Publish completion before writing final success log:
```bash
AGENT_PLATFORM=<platform> \
npm run lock:complete -- --agent <agent-name> --cadence <cadence>
```
(Equivalent invocation is allowed: `torch-lock complete --agent <agent-name> --cadence <cadence>`.)
- Exit `0`: completion published successfully; continue to step 11.
- Exit non-zero: **fail the run**, write `_failed.md` with a clear reason that completion publish failed and retry guidance (for example: `Retry npm run lock:complete -- --agent <agent-name> --cadence <cadence> after verifying relay connectivity`), then stop.
11. Create final task log only after step 10 succeeds:
- `_completed.md` MUST be created only after completion publish succeeds.
- `_failed.md` is required when step 10 fails, and should include the failure reason and next retry action.
12. Commit and push.
Worked post-task example (MUST order):
1. `AGENT_PLATFORM=codex npm run lock:lock -- --agent content-audit-agent --cadence daily`
2. Execute `src/prompts/daily/content-audit-agent.md`
3. `AGENT_PLATFORM=codex npm run lock:complete -- --agent content-audit-agent --cadence daily` (complete, permanent)
4. Write `task-logs/daily/2026-02-14T10-00-00Z__content-audit-agent__completed.md`