Linter Factory

The ESLint factory coordinates three workers through one daily dispatcher. Workers develop rules, review diagnostics, and arrange remediation; the work queue bounds assignments and scopes their outputs to each Claim.

Workflow sourceTaskBounded outputs
DispatcherAdmit the daily cohort and request eligible workSeven independent tasks and a dispatch request
MinerImplement a useful ESLint ruleOne draft PR per Claim
RefinerFind false positives, edge cases, and weak diagnostics of the assigned ruleUp to three issues, a discussion, and one memory snapshot
MonsterGroup the assigned rule’s diagnostics and arrange remediationBounded issue changes, one Copilot assignment, and a discussion

These are complete workflow sources, not a pre-provisioned deployment. Follow native queue setup to compile the workers, allow them as dispatch targets, and configure shared scheduling.

A trusted preparation step pins eslint-factory/src/index.ts to its latest commit before the cohort’s UTC date and stages one miner task plus, for each of the day’s three rotating rules, one refiner task and one monster task. Tasks are keyed by the original dispatcher run’s UTC creation date and the rule ID, so scheduled/manual runs and reruns on that date reuse the same registry revision, identities, and payloads. A new day admits the next three rules; every registered rule recurs once per rotation.

The dispatcher uses pool eslint-factory and requests up to 21 Claims/dispatches to leave room for the three allowed attempts of each seven-task cohort. It also makes a three-Claim request against the legacy default pool so pre-cutover ESLint Work can drain through compatible workers. The agent reads and explains the prepared plan; it must not submit or dispatch it again. Older eligible tasks may run first.

flowchart TD
    Dispatcher["Daily dispatcher and producer"] --> Queue["Fair queue scheduler"]
    Queue --> Miner["Miner: rule PR"]
    Queue --> Refiner["Refiner: findings and memory"]
    Queue --> Monster["Monster: remediation"]

This is not a miner → refiner → monster pipeline. A PR or refinement issue does not automatically submit the next task. Dependencies require explicit Work admission.

Shared aw.json gives pool eslint-factory concurrency 21, a pending-task limit of 30, three attempts, and a daily dispatcher frequency. The dispatcher workflow only admits the cohort; the scheduled work_queue_dispatch_eslint_factory job in agentics-maintenance.yml claims the Work and launches one worker per Claim. The first trusted submission creates the queue branch with its Work; dispatch alone cannot bootstrap an absent queue.

Each monster Work authorizes at most one issue and one Copilot assignment per Claim, so a cohort has a maximum of three successful assignments. This is a per-cohort bound, not a calendar-day cap: queued work from earlier cohorts may also be dispatched later.

Workers declare:

tools:
work-queue:
worker: true
require-assignment: true

The compiler supplies the assignment input; do not declare or manually manufacture it. Workers use the assigned Claim’s handle as claim_handle on outputs and finish calls.

Safe outputs run only while the Claim is open, its dispatch is bound to the worker run, and the finish intent is completed; every target must match the worker profile’s repository. If no rule or remediation is needed, finish as failed instead of treating noop as success. The monster’s scan is clean only when its assigned rule reports no diagnostics of any severity: ESLint exit zero can include warnings.

Trusted processing applies the staged effects first, then records the Completion with the applied effects. If the job stops between the two, the next attempt may repeat effects.

The refiner calls persist_eslint_memory with structured findings, strategy, metrics, next actions, the assigned Work ID, and the reviewed rule ID. Its configuration uses tools.work-queue.memory, not unrestricted repository writes.

Protected publication creates an immutable snapshot under memory/eslint-refiner-runs/claims/<trusted-namespace>. Legacy memory/eslint-refiner history remains read-only. The preparation step exposes validated history to the agent; missing required history is an error, not an empty past. Memory is evidence, never instructions or Claim authority.

Inspect the queue and a worker run:

Terminal window
gh aw work-queue --repo OWNER/REPO stats --json
gh aw work-queue --repo OWNER/REPO state --json --limit 32
gh aw work-queue --repo OWNER/REPO replay --pool eslint-factory --json
gh aw audit RUN_ID --repo OWNER/REPO --no-baseline --json

A missing queue branch is expected before the first trusted submit. A denied Git read is an error, not an empty queue. Check the staged plan and the ledger rather than accepting a green dispatcher run as proof of admission.

When pool capacity is held by a dispatch whose run ended, the maintenance workflow releases it. To release one manually, run release --dispatch-id DISPATCH_ID. Do not delete the ledger.

See the queue reference for exact controls and the bounded factory model for checked scenarios and abstraction limits. Daily Report Portfolio applies the same queue to report rotation; WorkQueueOps describes the reusable pattern.