The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
Device Notifications Without Jev: Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: A harness agent's finished turn alerts the devices and a Swarm agent's is silent, decided by fixed rules with no Jev call.
Architecture: createTierDecider drops the Jev step and ends with two rules (Swarm -> silent, else alert). TierInput gains swarm. One shared check decides whether an agent is a Swarm agent, used by the recaps service and by the devices service.
Tech Stack: TypeScript, vitest (cli/).
Spec: docs/superpowers/specs/2026-11-02-device-notify-no-jev-design.md
Global Constraints
- Rule order:
failed-> alert (rule:failed);subagent-> silent;onScreen-> silent; empty recap -> silent (rule:empty);swarm-> silent (rule:swarm); otherwise -> alert (rule:turn). - No Jev client is created, passed or called for this decision;
HARNESS_NOTIFY_SMARTis removed. fallbackTierstays exported (used bylib/commander.ts).- A Swarm agent: its registry row has
swarmSkill(any role), or it runs on a Harness Team account machine. - Log lines keep their shape:
notify · <agent> · <tier> · rule:<name> · <detail> · <ms>msand the day's counts. src/servicesstays at 100% per-file coverage (npm run test:core). Do not editcli/src/lib/e2ee/core.ts.
Review Focus
- An agent whose row has
swarmSkillwith rolebuddyorlead(not onlyagent) is silent. Test in Task 2. - A remote agent's card that arrives without a tier (older machine) still gets a decision and never throws. Test in Task 2.
- A failed Swarm turn: the existing
rule:swarm-workerpath forturn.erroris unchanged. Test in Task 2. - A Jev decision model installed locally (
jev:engine ids inlib/localModels.ts) is not touched by this change. commander.tsstill settles a superseded turn withfallbackTier. Test in Task 1 (existing commander spec stays green).
Task 1: Rules-only tier decider
Files:
- Modify:
cli/src/lib/notifyTier.ts - Test:
cli/src/lib/notifyTier.spec.ts
Interfaces:
Produces:
TierInputwithswarm: boolean;createTierDecider(opts: { now?: () => number; log: (line: string) => void; tally?: ReturnType<typeof createTally> }): (input: TierInput) => Promise<TierDecision>;fallbackTier,isTier,createTallyunchanged.Step 1: Write the failing tests in
notifyTier.spec.ts(replace the Jev cases):a harness agent's finished turn alerts->{ tier: 'alert', by: 'rule:turn' }.a Swarm agent's finished turn is silent(swarm: true) ->{ tier: 'silent', by: 'rule:swarm' }.the fixed rules come first:failed+swarm-> alertrule:failed;subagent,onScreen, empty recap -> silent with their rule.takes no Jev:createTierDecidercalled with only{ log }decides; the module no longer exportstierState.
Step 2: Run
cd cli && npx vitest run src/lib/notifyTier.spec.ts. Expected: FAIL (rule:turn/rule:swarmmissing).Step 3: Implement: remove the Jev import,
QUESTIONS,tierState,WINDOW_MS/recent,RECAP_MAX, budget and timeout; after the fixed rules returnrule('silent', 'swarm')forinput.swarm, elserule('alert', 'turn'). Update the file's header comment.Step 4: Run the same spec and
npx vitest run src/lib/commander.spec.ts. Expected: PASS.Step 5: Commit
fix(cli): device notifications follow fixed rules, not Jev: a harness turn alerts, a Swarm turn is silent.
Task 2: Tell Swarm agents in both deciders
Files:
- Modify:
cli/src/services/recaps.ts:35,52-64,105-111,cli/src/services/devices.ts:62,100,378-401,420-427 - Test:
cli/src/services/recaps.spec.ts,cli/src/services/devices.spec.ts
Interfaces:
Consumes: Task 1's
createTierDecider({ log })andTierInput.swarm.Produces: in
devices.ts,swarmAgent(event: DialEvent): boolean(anyswarmSkillrole, or a Team machine) beside the existingswarmWorker(unchanged, stillrole === 'agent'for theturn.errorrule); inrecaps.ts, the session's row read throughcore.agentsto setswarm.Step 1: Write the failing tests:
- recaps.spec:
decides a Swarm agent's turn silentfor rows withswarmSkill.rolelead,buddy,agent;decides a harness agent's turn alert; remove theHARNESS_NOTIFY_SMARTcases and assert no Jev client is built. - devices.spec: a card without an upstream tier for a local Swarm agent (any role) and for an agent on a Team machine ->
summarysent with tiersilent; for a harness agent ->alert; a remote agent's card without a tier still gets a tier;turn.errorfor a Swarm worker still logsrule:swarm-worker. Remove theHARNESS_NOTIFY_SMARTcase.
- recaps.spec:
Step 2: Run
cd cli && npx vitest run src/services/recaps.spec.ts src/services/devices.spec.ts. Expected: FAIL.Step 3: Implement: build the decider with
createTierDecider({ log })in both services (dropcreateJevDecideand the env check; fix the two doc comments); passswarmfrom the row (swarmSkillpresent) or a Team machine.Step 4: Run the same specs, then
npm run test:coreandnpx tsc --noEmit. Expected: PASS, 100% coverage.Step 5: Commit
fix(cli): Swarm agents' finished turns are silent on devices; drop the Jev decider.