jade-core-batch-processor
Enforces Rule-by-Rule Sequential Batching — processes exactly ONE rule_id batch at a time. For the selected rule_id, prepares all per-file tasks from the flag index, tracks per-file completion, and pe
SKILL.md.claude/skills/jade-core-batch-processor/SKILL.md
GitHubJADE Rule Batch Processor
Objective
Process exactly ONE rule_id at a time. No next rule until the current rule's
batch is fully processed, verified, and committed (by the orchestrator).
Sequential Batching Policy
One rule at a time. The orchestrator feeds a single
rule_id. This skill produces the per-file task list for that rule and tracks each file's completion. It does NOT dispatch the next rule.Per-file task list. For the selected
rule_id, query04-flag-index.jsonfor all flagged entries. Group entries by file. Each file becomes a task with its own status (PENDING,IN_PROGRESS,DONE,SKIPPED,FAILED).No cross-rule parallelism. Files flagged under different
rule_idvalues are never processed together. Each rule is a self-contained batch.Atomic outputs. All writes use tmp-file + atomic replace. Status JSON is updated after every file completion so the batch can be resumed if interrupted.
Halt on failure. If a file task fails, mark it
FAILED, update the batch status, and return a non-zero exit code. The orchestrator handles halting.
Required Input
artifacts/04-flag-index.json— produced by jade-core-scannerartifacts/05-rule-queue.json— produced by orchestrator (validates rule_id exists)rule_id(CLI argument)artifacts/03.5-knowledge-graph.json— optional; adds impact context only
Produced Artifacts
artifacts/05-rule-batch-{rule_id}.json— per-file task list with statusesartifacts/05-rule-batch-status.json— aggregate completion tracker
The files list remains limited to files directly flagged for the requested rule.
Each entry is marked transform_scope: "DIRECT".
When graph metadata is available, impact_only records sorted dependent files and
their graph paths/reasons, source artifact, and source identity. Graph diagnostics
are retained as additive metadata and warnings; they never change direct task
selection. Each impact entry is marked transform_scope: "IMPACT_ONLY"; these
files never change total_files or dispatch.
Script
Use scripts/rule_batch_runner.py with the required arguments.