AGENT SKILL

rule-script-runner

Runs the registered rule scripts on the diff during feature-development checks, aggregates findings into the rules report with a hash cache, and decides whether checks is blocked: deterministic findings block under strict mode, heuristic ones go to review. Use when the checks stage runs with rule_compliance in warn or strict mode.

License 许可
MIT
所属仓库
Eliyce/paqad-ai
最近更新
2026-11-13
Stars
★ 8
Forks
0

01 前言 Front Matter

name
rule-script-runner
metadata
{ "cacheable": "false", "model_tier": "fast", "paqad-meta": "skill.meta.yaml", "output_format": "json" }
description
Runs the registered rule scripts on the diff during feature-development checks, aggregates findings into the rules report with a hash cache, and decides whether checks is blocked: deterministic findings block under strict mode, heuristic ones go to review. Use when the checks stage runs with rule_compliance in warn or strict mode.

02 资源文件 4

03 SKILL.md 正文

What It Does

During feature-development.checks, runs every script registered in docs/instructions/rules/rule-script-map.yml against the changed files (diff-scoped) and aggregates the findings:

  • deterministic findings → block the checks stage under mode: strict.
  • heuristic findings → informational; routed to the review stage alongside adversarial-review. They never block.
  • A script declaring requires.binaries that are missing emits a clean "missing dependency" result and is skipped: it never crashes the stage.

Results are written to .paqad/scripts/rules/.cache/report.json, hash-cached on rule_files_hash × script_files_hash × target_files_hash so unchanged inputs re-use the cached report.

Use This When

  • Invoked from feature-development.checks after the project command checks, when checks.rule_compliance.mode is warn or strict.
  • Never invoked directly by the user; it is a workflow sub-step.

Inputs

  • docs/instructions/rules/rule-script-map.yml (read-only).
  • The registered .paqad/scripts/rules/**/*.mjs scripts.
  • The changed-files list (diff) for scope: changed-files; whole-tree enumeration otherwise.
  • checks.rule_compliance.mode from feature-development.yaml.

Procedure

  1. Read checks.rule_compliance.mode from feature-development.yaml. If off, skip entirely.
  2. Run the runner:
    node scripts/run.mjs <project-root> <mode> [changed-file ...]
    
    Exit 0 = stage may proceed. Exit 1 = mode: strict and a deterministic finding blocks the stage.
  3. Surface blocking deterministic findings as the stage failure with file:line and message. Pass heuristic findings to the review stage.

Output Contract

  • .paqad/scripts/rules/.cache/report.json written (or re-used from cache).
  • JSON RunReport on stdout: results, counts (deterministic / heuristic / skipped), and blocking.
  • Non-zero exit only when mode: strict and at least one deterministic finding exists.

Escalate / Stop Conditions

  • Under mode: strict, stop the checks stage on any deterministic finding.
  • Never block on heuristic findings: they inform review only.
  • A missing declared binary is reported and the single script skipped; the stage is never crashed by it.
  • If rule-script-map.yml is absent, the runner returns an empty, non-blocking report.

Resources

  • references/run-contract.md: mode + exit-code + diff-scope contract.
  • runtime/base/skills/rule-script-runner/agents/openai.yaml: agent interface metadata.
  • src/rule-scripts/runner.ts: the execution + aggregation + hash-cache engine.

04 同仓库更多 Skills

Eliyce
Eliyce/paqad-ai

sample-skill

Sample bundled skill fixture

★ 8
Eliyce
Eliyce/paqad-ai

processing-invoices

Turns a supplier invoice into one ledger line. Use when a supplier invoice arrives and needs booking.

★ 8
Eliyce
Eliyce/paqad-ai

processing-invoices

Turns a supplier invoice into one ledger line. Use when a supplier invoice arrives and needs booking.

★ 8
Eliyce
Eliyce/paqad-ai

understand-idea

Chat and Claude Code: Step 1 of the discover journey: clarifies the goal, who benefits, success and constraints into the idea block. Use when the journey directs it to step 1, not directly.

★ 8
Eliyce
Eliyce/paqad-ai

size-work

Chat and Claude Code: Suggest a size for a ticket from comparable finished work, as a labelled suggestion the team still owns. Use it when someone asks "how big is this?", "roughly how much work is ABC-12?", or wants a backlog item sized. It finds the team's sizing scale at first use, picks two to five of the closest finished tickets with links, and gives a size or range with the drivers behind it and a confidence of low, medium or high, lowered and explained when the area's documents are template text. Every result is labelled a suggested size, never a date or a commitment. It writes nothing into the size field unless the user says "set it", and it refuses to overwrite an existing size unless the user asks to replace it. Produces the sizing block of the record.

★ 8
Eliyce
Eliyce/paqad-ai

refine-ticket

Chat and Claude Code: Improve one or more existing tracker tickets without losing the author's intent. Use it when someone wants a ticket read, diagnosed and tidied up ("this ticket is vague", "fix up ABC-12", "split this, it's too big"). It reads each ticket in full and snapshots it with its last-updated time, says what is wrong with evidence, and proposes a field-by-field before and after change set limited to summary, description, labels, parent, links and new child tickets on a split. It writes nothing until an explicit "apply it" bound to that exact change set, re-checks the ticket for conflicting edits just before writing, never replaces rich descriptions with plain text, never deletes or closes a ticket, and reads each ticket back after applying. Produces the existing and changes blocks of the record.

★ 8