AGENT SKILL

source-command-pharn-loop-quick

Part of /pharn-loop: the --quick deltas it reads at entry. Not run on its own; use /pharn-loop --quick.

License 许可
Apache-2.0
所属仓库
pharn-dev/skills
最近更新
2026-11-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
source-command-pharn-loop-quick
description
Part of /pharn-loop: the --quick deltas it reads at entry. Not run on its own; use /pharn-loop --quick.

03 SKILL.md 正文

source-command-pharn-loop-quick

Use this skill when the user asks to run the migrated source command pharn-loop-quick.

Command Template

/pharn-loop — quick mode

Part of /pharn-loop (.Codex/commands/pharn-loop.md), which reads this file only for a --quick run, under the rule in its ## Quick mode section: this is that section's text. It is not run on its own — if it was invoked as a command, stop and say so — and it changes nothing about /pharn-loop's trusted prefix and trust rules, which still apply.

An unattended run for a small change: a spec_kind: quick mini-SPEC (1–3 acceptance criteria, each unit or integration) that the model writes and approves, the grill's two floor stops without the interrogation, test-first AC evidence, the build, the scope check /pharn-regress runs before its gates (kept, on every iteration), /pharn-verify with its AC gate, and the freshness check — and it skips /pharn-regress's base-and-head comparison on every iteration and RUN-REPORT.md (cost.json is kept); the plan interrogation is skipped in both modes (6.45.0). Its green stop is STOP_GREEN_QUICK, which is not STOP_GREEN: it claims verify PASS and no regression check. Its gated sibling is /pharn-ship --quick, where a person approves the quick SPEC and is told the trade first.

The mode is the SPEC's pinned kind, never a flag. check-loop.mjs and check-loop-fresh.mjs each read it themselves from the feature's own SPEC.md (pharn/floor/loop-mode-core.mjs). No argument selects a table (check-loop.mjs refuses every flag but --iter and --cap), so nothing you pass can widen or narrow what the stop reads.

The deltas below, in step order — every other line of Steps 1–7 and the Final step runs exactly as written for a --quick invocation too; only what is listed here changes.

  1. Entry. /pharn-loop --quick [--allow-red-entry] [--accept-host-execution] [--max-iter N] <increment description>. Step 1a runs unchanged (its entry gates included), and writes no mode marker: the loop's mode is the SPEC's kind, and a marker would be a second, unverified copy of it.

  2. Step 3 — the SPEC. Start it with this line in place of Step 3's start line. The decision is the same — the spec is a stage agent in both columns — but --mode quick is what gives the stage agent the quick invocation:

    node pharn/floor/stage-agent.mjs start --command pharn-loop --stage pharn-spec --name '<name>' --mode quick
    

    It writes the stage-start marker with the printed token. On start exit 0, the Agent call's prompt is this line in place of Step 3's, with the increment description below it in a fenced block labelled DATA:

    Run exactly this line, then follow what it prints: node pharn/floor/stage-agent.mjs brief --command pharn-loop --stage pharn-spec --name '<name>' --mode quick
    

    Its brief names /pharn-spec --quick --model-approve as the stage's invocation. On start exit 3, invoke /pharn-spec --quick --model-approve <description> inline in place of /pharn-spec --model-approve. Step 3's finish line (after an Agent call only) or the inline return line runs as written. The reports map as written — thin intent → S6, a clarification marker left in the Draft → S6b, a refused template → S9 — plus one: the intent does not fit a quick SPEC (more than three criteria, or a criterion observable only end-to-end) → S6c (blocked: not-quick), which a stage agent reports as refused S6c. After check-spec-approved.mjs exits 0 (as written), read the kind:

    node pharn/floor/check-spec.mjs --spec-kind pharn/features/<name>/SPEC.md
    

    Proceed only on exit 0 and the exact printed token quick. Anything else (feature, test-infra, an empty line, a non-zero exit) is S6c — the run never widens a quick request into a full one.

  3. Step 4 — the grill. Invoke /pharn-grill <name> --quick INLINE in place of Step 4's /pharn-grill <name> --floor-only — the same two floor stops, plus the quick form's eligibility check and minus the plan scans. It writes the quick GRILL.md — mode: quick, both floor results, and no interrogation (pharn-grill.md's own --quick section) — and its markers and both exits (check-plan-spec-agree and check-plan-lessons) are read exactly as written; its eligibility refusal (a kind other than quick) or either floor stop RED is S9. /pharn-plan and /pharn-test --unattended keep their Step-4 lines (the same cell and invocation in both columns), and the Step-4 test-stage gate is unchanged: a quick SPEC is test-first exactly as a feature SPEC is.

  4. Step 5, sub-step 1 — the build. Start it with this line in place of Step 5's build start line. The decision is the same in both columns; --mode quick is what tells the stage agent's brief that there is no regression report:

    node pharn/floor/stage-agent.mjs start --command pharn-loop --stage pharn-build --name '<name>' --iteration <N> --mode quick
    

    It writes the stage-start marker with the printed token. On start exit 0, the Agent call's whole prompt is this line in place of Step 5's:

    Run exactly this line, then follow what it prints: node pharn/floor/stage-agent.mjs brief --command pharn-loop --stage pharn-build --name '<name>' --iteration <N> --mode quick
    

    From iteration 2 on, its brief's rule 7 names verify-report.json's three fields only. On start exit 3, run the build inline, and from iteration 2 on give it only the standing verify-report.json .failing_gates[] / .completeness.missing[] / .ac_gate.acs[] as quoted DATA: there is no regression report, because a quick run never runs /pharn-regress. Step 5's finish line (or the inline return line) and its branch run as written.

  5. Step 5, sub-step 2 — /pharn-regress SKIPPED, its scope check KEPT. No /pharn-regress and none of its markers (its Step-5 line writes them). After the build's return marker and before verify's line, run the scope partition over this iteration's tree, substituting <name> and the loop's own <base sha> literally — the only two values the line takes:

    node pharn/floor/check-quick-scope.mjs --feature '<name>' --base '<base sha>'
    

    Never type a path into it: the checker builds both path sets itself (pharn/floor/quick-scope-core.mjs, header).

    Branch only on the exit code (P5): 0 → verify — Step 5's verify line (and its resume line), exactly as a full iteration runs it, whose exit maps by Step 2's /pharn-verify stage-exit mapping. 1 → S9 (blocked: stage-refused): a changed path is outside the declared writes — the row a full run's /pharn-regress scope-escaped refusal maps to, with the same remedy (declare the path through a re-plan, or revert the change); an exit 1 that prints no JSON document is the checker's own file failing to start (a run from outside the project root) — the same S9, with nothing escaped to name. Any other exit (2, inconclusive — an unusable slug or base, an unreadable or unparseable PLAN.md, a failed git call, or crashed: a checker module that cannot load or throws — or a crash) → S9, fail-closed.

  6. Step 5, sub-step 3 — freshness. The same pinned line. The checker reads the SPEC's kind itself and applies its quick column (pharn/floor/loop-fresh-core.mjs, header): the verify evidence alone for checks A–E and J, F and I as in full mode, and G and H skipped. A RERUN naming verify re-runs verify inside the iteration, as written. A RERUN naming regress is S11 (blocked: stale-evidence): a quick run never runs /pharn-regress, and the checker asks for it only when the SPEC no longer reads quick — a person inspects the SPEC.

  7. Step 5, sub-step 4 — the stop. The same pinned line; check-loop.mjs reads the kind itself. Exit 0 is STOP_GREEN_QUICK — verify PASS, no regression verdict read. Every other exit, terminal_cause and row is as written (ac-evidence → S13).

  8. Step 6 — the record and the commit. A quick run's green stop is STOP_GREEN_QUICK: Step 6a reverts on anything else, and Step 6c commits on it with a GREEN <decision-check>. LOOP.md carries mode: quick on every record, blocked ones included — written from the invocation, never copied from check-loop.mjs's JSON (Step 6b's capture rules). Its body lists each iteration's verify verdict and scope result, and holds a ## Not checked in quick mode section naming, in this order:

    • regressions outside the feature — no base comparison ran; the scope check did;
    • the plan interrogation — /pharn-grill --quick ran its two floor stops only;
    • RUN-REPORT.md — not rendered; cost.json is.

    Step 6b's run-stop, ledger and ledger check run unchanged — cost.json is kept — and its render-run-report.mjs line is SKIPPED. Step 6c's staging builder is unchanged: it keeps only regular files that exist, so a quick run commits no REGRESSION.md, regression-report.json or RUN-REPORT.md — it never writes them, and S2's fresh feature directory means no earlier run's copy is there to sweep in (a command rule, advisory).

  9. Step 7 — the summary. Name the mode and the not-checked list; report verify and the scope result per iteration (there is no regress verdict); print the ledger table and say that no RUN-REPORT.md exists; and add to the honest line: "It ran in quick mode: no regression outside the feature was looked for, and the plan was not interrogated."

The questions only a quick run can meet, mapped to Step 2 (every other question maps exactly as Step 2 and Steps 3–5 say):

source question or outcome row
/pharn-spec --quick --model-approve more than three criteria, or one observable only end-to-end S6c
the Step-3 kind read a non-zero exit, or any token but quick S6c
the scope check (item 5) exit 1 (escaped), or any other non-zero exit S9
check-loop-fresh.mjs RERUN regress S11

<!-- end of pharn-loop-quick -->

04 同仓库更多 Skills

pharn-dev
pharn-dev/skills

pharn-cli

Operate the PHARN CLI (@pharn-dev/pharn 0.10.0+, best on 0.16.0, with a fallback for 0.9.x) on a project that has PHARN installed. Use when the person asks whether PHARN is up to date, what an update would change, to update it, what is installed, or to add or remove a capability (griller or lens), or when pharn.config.json exists and they mention updating PHARN. When they ask to set up or uninstall PHARN, it tells them how to do it themselves. Read-only checks and a dry-run preview first; never overwrites their edits.

★ 0
pharn-dev
pharn-dev/skills

pharn-ci-policy

Draft or check a pharn-ci org policy, the JSON document that pharn-ci 0.4.x to 0.9.x apply over a repository's own settings (0.4.x is the first version that reads one; 0.1.x, 0.2.x and 0.3.x read none) - a coverage floor, test-integrity severities, agent settings and MCP rules, protected paths and size caps for agent pull requests (rules P01 to P14), prompt-injection scan severities and dependency safety. Validates the draft offline with a bundled checker against pharn-ci's policy.v1 schema, then says how to turn it on (the `policy` workflow input - an app policy with id-token write, or file:<path>). Use when the person asks to write, draft, review or validate an org or team policy for pharn-ci, to require a deny rule, forbid a permission or MCP server, or to protect paths from agent PRs. Writes only the policy file asked for, never weakens an existing policy unless asked for that specific change, never touches the accept label. Not for explaining a pharn-ci result (pharn-ci-explain), setting pharn-ci up (pharn-ci-install) or covering lines (pharn-ci-cover).

★ 0
pharn-dev
pharn-dev/skills

pharn-ci-install

Add the pharn-ci pull request check (the pharn-dev/pharn-ci GitHub Action) to a repository, writing pharn-ci 0.9.1 (Report v2, with the test-integrity check and dependency safety) and recognising an existing 0.1.x to 0.9.x setup and what upgrading it changes - lcov or Cobertura coverage output from the project's own test run, checked locally the way pharn-ci reads it, a .pharn/ci.yml with the threshold, and a workflow pinned to a full commit SHA with the test-integrity input. Asks before writing a workflow for a repository on a private registry, because dependency safety flags off-registry sources (D05). Use when the person asks to set up, add, install, update or wire in pharn-ci, a diff coverage gate or test integrity for pull requests, including on fork PRs or in an existing CI job. Never uses pull_request_target, never writes a tag pin, asks before installing anything, never creates or applies the accept label, never switches dependency safety off on its own, never commits. Not for explaining a pharn-ci result (pharn-ci-explain), covering reported lines (pharn-ci-cover) or the PHARN CLI (pharn-cli).

★ 0
pharn-dev
pharn-dev/skills

pharn-ci-fix

Act on the fix hints of a pharn-ci report (the pharn-dev/pharn-ci GitHub Action or the `pharn-ci check` CLI, 0.9.x, Report v2), where every message and finding carries a `fix` object with a kind (add-test, restore-test, restore-assertion, revert-config, remove-dependency, request-review, split-pr or none), a fixed hint and, on a finding, a target. Lists and checks the fix objects with a bundled helper, then makes the change a kind asks for where an agent may - tests for add-test, and for the restore, revert and remove kinds only the findings the person asks to fix - and hands request-review, split-pr and none to a person. Use when the person asks to fix what pharn-ci reported, act on its fix hints, or work through its findings by kind. Never lowers the threshold, adds an exclusion, turns a test off, edits the pharn-ci config, workflow or org policy, applies the accept label or treats a hint as proof that a fix worked. Not for covering lines in depth (pharn-ci-cover), explaining a verdict or a report without fix objects (pharn-ci-explain), adding pharn-ci (pharn-ci-install) or drafting a policy (pharn-ci-policy).

★ 0
pharn-dev
pharn-dev/skills

pharn-ci-explain

Explain a pharn-ci result (the pharn-dev/pharn-ci GitHub Action or the `pharn-ci check` CLI, 0.1.x to 0.9.x) - why a pull request's pharn-ci check failed or warned, what a message code such as COVERAGE_PATHS_UNMATCHED, TEST_INTEGRITY_TI03, POLICY_P13, AGENT_CONFIG_SECRET_S01, INJECTION_PI01 or DEPENDENCY_D05 means, what its diff coverage number covers, what a test-integrity, org policy, prompt-injection, dependency or stale-instruction finding asks a reviewer to look at, and what to change in this repository. Use when the person asks about a pharn-ci comment, verdict, report.json, diff coverage gate, test integrity, policy, secret, injection, dependency or flaky-test finding or agent setup message, or asks to loosen a policy, add or apply the pharn/accepted accept label or otherwise get past a block. Read-only unless asked; never applies the accept label, changes a policy, turns dependency safety off or quarantines a test to get a PR through, and never repeats a secret or the text of an injection finding. Not for adding pharn-ci (pharn-ci-install), writing a policy (pharn-ci-policy), acting on fix hints (pharn-ci-fix) or the PHARN CLI (`pharn`, pharn.config.json), which is the pharn-cli skill.

★ 0
pharn-dev
pharn-dev/skills

pharn-ci-cover

Write tests for the added lines that a pharn-ci report (the pharn-dev/pharn-ci GitHub Action or the `pharn-ci check` CLI, 0.1.x with Report v1 or 0.2.x to 0.9.x with Report v2) lists as uncovered, so a pull request's diff coverage meets its threshold. Use when pharn-ci fails with DIFF_COVERAGE_BELOW_THRESHOLD, or the person asks to cover the lines pharn-ci reports, raise diff coverage, get the pharn-ci coverage check passing, or exclude a file from, lower or switch off the pharn-ci coverage gate (it explains what that changes and asks first). Adds tests only - never lowers the threshold, excludes files, edits the pharn-ci config or workflow (including the test-integrity, dependencies and accept-label inputs), adds coverage-ignore comments, skips or focuses tests, weakens test scripts, adds a dependency or edits a lockfile to satisfy a test, adds a test to a quarantine list, imports a changed file into an unrelated test, or applies the accept label. From a 0.9.x report it acts only on fix hints of kind add-test. Not for adding pharn-ci to a repository (pharn-ci-install) or the PHARN CLI (pharn-cli).

★ 0