{"data":{"slug":"discovered-2b1b9b5b56f2890c77ddc1efae508879976bfd09f9ccb899","title":"Nj Supervise","summary":"Brief and verify delegated workers to ensure they are actually working. Provides checks for four common failures, including drift, undercount, corruption, and estimate discipline. Use when spawning subagents or teammates for batch processing tasks.","url":"https:\/\/skillshunter.net\/skills\/discovered-2b1b9b5b56f2890c77ddc1efae508879976bfd09f9ccb899","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-2b1b9b5b56f2890c77ddc1efae508879976bfd09f9ccb899","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-2b1b9b5b56f2890c77ddc1efae508879976bfd09f9ccb899.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-2b1b9b5b56f2890c77ddc1efae508879976bfd09f9ccb899\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before using, ensure named write paths are claimed at runtime with `relay.py claim` and that output files are written atomically. The first deliverable is a script run at the wake event, which checks liveness via mtime of the output file.","instructions":"---\nname: nj-supervise\ndescription: How to brief a delegated worker and how to know it is actually working. Use whenever spawning subagents or teammates for a batch of units - audits, sweeps, per-service fixes, migrations, any fan-out. Covers the brief's mandatory clauses, the four checks that detect parking\/drift\/undercount, and the director's own estimate discipline. Triggers - delegate this, run workers on each X, fan out, how do I know the agent is working, worker KPI, the agent says running but nothing happens, my estimate slipped.\n---\n\n# Supervising delegated workers\n\nDerived from one measured session (PROJ, 2026-09-20, 9 Sonnet workers, 46 videos),\nthen attacked by `nj-kit:nj-devil` and grounded by `nj-researcher`. It exists so the\nsame four failures are not rediscovered per project.\n\n## The four failures this prevents\n\nEvery one was invisible in the worker's own report and visible on disk.\n\n| # | What happened | Cost |\n|---|---|---|\n| P1 | Two workers ended turns with a backgrounded job; reported \"running\" while output mtime was frozen | ~20 min each, the largest single loss |\n| P2 | A worker returned **0** findings for a unit whose real answer was **47** \u2014 a hardcoded path silently excluded everything before scoring | Would have shipped a clean bill on a broken unit |\n| P3 | A worker edited the **shared** script other live workers were reading | Corrupts a whole batch, not one unit |\n| P4 | The director estimated 20 min off a 1-unit pilot; actual 90 min, and never volunteered the slip | User had to ask five times |\n\nSits under `nj-delegate` \u00a70 (NJ Governance v4): the Lead decides and spends turns on\nreceipts, not on progress; Sonnet leads supervise their own Haiku helpers the same way.\nEverything below is **deterministic supervision** \u2014 artefact checks a script can run \u2014 which v4\nkeeps and encourages; what it bans is waking the Lead to interpret \"still running\", and any\ncron watchdog or monitor polling. Named write paths are claimed at runtime (`relay.py claim`)\nand checked across briefs (`check_governance.py --run`) (\u00a70.6).\n\n## Part 1 \u2014 the brief\n\nNine clauses. Omit one and you get the matching failure back.\n\n1. **Named write paths.** \"Your writes are limited to: `<exact paths>`. Anything\n   else is drift.\" A worker that needs to change shared tooling gets its **own\n   copy**; never the file another live worker reads. (P3)\n2. **Write per unit, atomically.** \"After each unit, append to your output file \u2014\n   write a temp file and rename, never edit in place.\" Incremental writing is\n   what makes liveness checkable at all; atomic rename is what stops the race\n   the incremental writing would otherwise create. (P1, P3)\n3. **A stall bound, not just a total budget.** \"If you produce no new output for\n   `<~6x the median unit time>`, stop and report the cause.\" A total budget is a\n   claim about the future and is unfalsifiable from a snapshot; a stall bound is\n   checkable now. (Lamport 1977 on liveness; SQS visibility timeouts.)\n4. **Finish inside your turn.** \"Never end a turn with your own work still running. No\n   background jobs of your own, no monitors, no polling.\" Say it, but do not trust it \u2014 see\n   Part 2, check A. Saying it twice did not work. (P1) Dispatch mode is stated once, in\n   `nj-delegate` \u00a70.3a and `reference\/runtime-map.md` (Sonnet leads in the background, a lead's\n   Haiku helpers in one foreground batch); the worker's completion is the trigger, so this clause\n   is what makes the trigger mean \"done\". Every brief carries the `FOCUS` line: a mid-run message\n   that does not start `AMEND:` is not a task.\n5. **Budgets are ceilings, never targets.** Token and tool-call limits mean\n   \"name the cause and stop\", never \"aim for this\". Any effort number a worker\n   knows it is scored on gets padded. (Goodhart; Campbell; Strathern 1997.)\n6. **One report, at the end: a receipt of \u2264 25 lines plus the stage detail file.**\n   STATUS \/ FINDING \/ EVIDENCE \/ FILES-SYMBOLS \/ RISK \/ NEXT ACTION and a CHANGED\n   list from `git status`, in the final message; everything else goes in the detail\n   file the brief's RESUME line names, and no other report file. Plus: **a positive\n   sample before any sweep** \u2014 prove the method reproduces one known-true case\n   before spending the batch on it.\n7. **Hierarchy, not delegation.** Sonnet lead: \"You may brief Haiku helpers only (never a Sonnet or\n   Opus agent), in ONE foreground batch; with `ITEMS` >= 6 you must brief at least HELPERS_REQUIRED;\n   read every helper receipt before your one report.\" Haiku helper: \"You have no `Agent` tool and\n   never spawn, brief or instruct anyone; write one report file and stop.\" The clause texts are\n   `HIERARCHY:` in `nj-delegate\/templates\/worker-brief.md` and `NO_SPAWN:` in `helper-brief.md`.\n   The gates are `check_governance.py --brief` (exactly one clause, matching the model) and\n   `relay.py verify` over the spawn log (illegal nesting, helpers required); the receipt's\n   `helpers_spawned` is a claim the log must match.\n8. **Graded facts, and the right to refuse one.** Every factual claim in the brief is `[V]`\n   (cited), `[A]` (falsifiable inference) or `[U]` (to establish). \"If a `[V]` claim is false,\n   reply `CHALLENGE: <claim> \u2014 <counter-evidence>` and stop that line; you are never obliged to\n   disprove an `[A]`.\" This is clause 8 because of a measured failure: on 2026-09-20 a Lead\n   wrote an inference as a verified fact and a worker burned a whole pass disproving it. A\n   supervision standard that only watches workers will never catch that one.\n9. **Rules by path, changed in every brief.** The brief names the rule file; it does not restate\n   it. A rule change goes to every shared brief and every running worker (`AMEND:`) before any new\n   dispatch. Credentials are never written to disk; deletions go through `nj-safe-delete`. Full protocol:\n   `nj-delegate\/templates\/worker-brief.md` \u00a7 \"Rule changes, secrets, deletions\". (2026-10-12 lessons 1, 16)\n\n## Part 2 \u2014 the checks\n\nFour, against artefacts, in one command. **When:** once, at the wake event\n(worker complete, blocker, stall timeout) \u2014 never as a periodic Lead turn. If\nliveness is in doubt at the wake, check A is one script run once; v4 has no cron watchdog and no\nmonitor polling.\n\n**A. Liveness \u2014 mtime.** `stat -c %y` each worker's output file, once, at the wake.\nNo write within the stall bound = parked, whatever the worker says.\nThis is the only available proxy for a worker being alive: unlike an OTP\nprocess, an LLM worker emits no death signal, so absence-of-artefact is all\nthere is \u2014 which is exactly why clause 3 must give it a bound to compare to.\n\n**B. Scope \u2014 file list.** At report time, list what the worker actually wrote\nand compare to its named paths. One `ls`. Do not try to infer drift from\neffort signals; those are gameable, a file list is not.\n\n**C. Sibling deviation, both directions.** A unit whose output is far from its\nsiblings' is a bug until explained \u2014 and **zero is only the loudest case**.\nP2 was caught at 0-vs-47; a 12-vs-47 would have shipped. Ask for the cause,\nnot a re-run.\n\n**D. Read one gate line, not the report.** Artefact-based: value is earned at a\ncheckable artefact \u2014 a passing gate, a delivered file, a row count \u2014 never at a\nworker's narrative of its own progress.\n\n**What is deliberately NOT a check:** tokens-per-unit, calls-per-unit, or rows-\nper-unit against the batch median. At n=2\u20134 workers the \"median\" is one raw data\npoint, and unit sizes differ 10x; today's two legitimate workers (6.9k vs 14.1k\ntokens\/unit) already trip a 2x rule. Below ~8\u201310 samples use a fixed ceiling,\nnot a statistical outlier test.\n\n## Part 3 \u2014 the director's own discipline\n\nThe checks above watch workers. These watch the director, which is where P4 lived.\n\n- **A 1-unit pilot is an n=1 inside-view estimate.** Say so when giving it.\n  Re-forecast from the median of *completed* units as they land, and keep the\n  class comparable \u2014 do not mix blocked units and clean units in one median.\n- **Announce a slip unprompted, at the first missed mark**, with the cause.\n  \"The estimate is void because both workers were parked\" is a report;\n  waiting to be asked is not.\n- **Measure progress by artefacts, not by whether agents are alive.**\n  \"Still running\" is not progress. Rows on disk are.\n- **Reach for the cheapest instrument that answers the question.** Check what the\n  pipeline already records before rendering, decoding or re-running anything.\n  In the source session, ~70 min of video decode was spent to infer what the\n  build's own checkpoint files already stated; every finding that survived came\n  from JSON and audio reads that took seconds.\n\n## The brief itself\n\nUse `nj-delegate\/templates\/worker-brief.md`: it carries all nine clauses as gated\nfields (`check_governance.py --brief`). Clause 2 (write per unit, atomically) goes in\nits RESUME line; the positive sample (clause 6) goes in GATES. There is no second\nskeleton here on purpose \u2014 two skeletons drifted apart once (prompt audit, 2026-09-29).\n\n## Sources\n\n`nj-researcher` checkpoint, 2026-09-20: Lamport (liveness\/safety, 1977); SQS\nvisibility-timeout and dead-letter practice; Erlang\/OTP supervision trees (noted\nas *not* transferring \u2014 no death signal from an LLM worker); Goodhart\/Campbell,\nStrathern 1997; Flyvbjerg on reference-class forecasting and the planning\nfallacy; small-sample limits of median\/MAD (derived, not cited). Adversarial\npass: `nj-kit:nj-devil`, same date \u2014 it is what removed the three effort metrics\nand forced the director section.\n","use_cases":["Verify that delegated workers are processing units correctly during audits or migrations","Detect silent failures such as zero findings returned when expected","Ensure atomic writes to prevent corruption of shared scripts","Track estimate discipline and detect slippage in time estimates"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/NJ-Burrito\/NJ-Kit\/blob\/2644ffdccb94c9eb0a65b23624abe9795e005faa\/nj-plugin\/skills\/nj-supervise\/SKILL.md","source_commit":"2644ffdccb94c9eb0a65b23624abe9795e005faa","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:52:12.000000Z","updated_at":"2026-11-29T10:53:39.000000Z","seo_title":"Nj Supervise - Delegated Worker Supervision Tool","seo_description":"Ensure delegated workers are performing as expected with Nj Supervise. Detects four common failures and provides deterministic checks for liveness, drift, undercount, and","seo_keywords":["delegated worker supervision","worker liveness check","atomic write verification","estimate discipline","nj-supervise tool"]}}