loc-qa
/loc-qa
Use when the user asks for a QA verdict on a plan or a change ("loc-qa", "loc-qa 018", "is plan 018 tested enough?"), and when loc-orchestrate has finished a plan's milestones. Runs the full test suite once, compares the tests with the plan's baseline copy, writes missing tests for the plan's criteria, runs the project's matching qa-* skills and ends with APPROVED or NOT APPROVED. Changes tests only.
- Author
- etobod ↗
- Repository
- masterskills ↗
- Licence
- MIT
- Last repository change
- 10.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when the user asks for a QA verdict on a plan or a change ("loc-qa", "loc-qa 018", "is plan 018 tested enough?"), and when loc-orchestrate has finished a plan's milestones. Runs the full test suite once, compares the tests with the plan's baseline copy, writes missing tests for the plan's criteria, runs the project's matching qa-* skills and ends with APPROVED or NOT APPROVED. Changes tests only.
Triggers from the description
Arguments
/loc-qa [plan <NNN> | <NNN>] [model]
Original author description
Use when the user asks for a QA verdict on a plan or a change ("loc-qa", "loc-qa 018", "is plan 018 tested enough?"), and when loc-orchestrate has finished a plan's milestones. Runs the full test suite once, compares the tests with the plan's baseline copy, writes missing tests for the plan's criteria, runs the project's matching qa-* skills and ends with APPROVED or NOT APPROVED. Changes tests only.
How it works
- 1. Scope
- 2. Full suite, once
- 3. Tests against the copy
- 4. Criteria have tests
- 4a. Tests run the real code
- 5. Project qa- skills
- 6. Verdict and QA file
- 7. Report
SKILL.md preview
---
name: loc-qa
description: Use when the user asks for a QA verdict on a plan or a change ("loc-qa", "loc-qa 018", "is plan 018 tested enough?"), and when loc-orchestrate has finished a plan's milestones. Runs the full test suite once, compares the tests with the plan's baseline copy, writes missing tests for the plan's criteria, runs the project's matching qa-* skills and ends with APPROVED or NOT APPROVED. Changes tests only.
argument-hint: "[plan <NNN> | <NNN>] [model]"
context: fork
agent: masterskills:qa
---
# loc-qa
A quality verdict for a plan: are its criteria really tested, did any test get weaker, does the whole suite pass? **Change test files only**: never production code, never `loc/TEST-PLAN.md`.
Run each command on its own, exactly as written: no `cd`, variables, `;` or `&&`, so the plugin's permissions cover it.
## 1. Scope
`$ARGUMENTS`:
- **`plan <NNN>` or `<NNN>`**: the plan in `loc/inbox/` or `loc/inbox/done/`, its state `loc/state/<NNN>.json`, its copy of the tests `loc/state/<NNN>/baseline/`. The QA file is `loc/state/<NNN>/qa.md`.
- **Nothing**: the plan whose state file has `phase: qa`; if none, the uncommitted changes, without plan checks; the QA file is `loc/state/qa-<YYYY-MM-DD>.md`.
- **`model`** anywhere: also run the model-behaviour layer (step 2).
Changed files, from the plan's first snapshot (`milestones[0].start`) or, without a plan, from `HEAD`:
```sh
sh "${CLAUDE_PLUGIN_ROOT}/scripts/py.sh" scripts/review_diff.py --from <start or HEAD> --out loc/state/<NNN>/qa.diff
```
Without a plan, `--out loc/state/qa.diff`.
Read `loc/TEST-PLAN.md` and the project's `CLAUDE.md` (`Commands`). No TEST-PLAN: the test command from `Commands` is the only layer, a gate.
## 2. Full suite, once
Each layer of TEST-PLAN section (a), in order:
- **gate** layer: run its command once. PASS or FAIL from the output. Missing command, a command that cannot start, or zero tests run: **SKIPPED** with the reason.
- **report** layer: run it; the result is **INFO**.
- **CI only**: do not run; **INFO** "CI only".
- **Model behaviour**: only with `model`; otherwise **SKIPPED** "not requested". When run, compare with the last line of `loc/state/qa-history.log` and append one line: `<date> <plan or -> <layer> <result summary>`. Its result is **INFO**.
## 3. Tests against the copy
With a plan and a copy:
```sh
sh "${CLAUDE_PLUGIN_ROOT}/scripts/py.sh" scripts/test_baseline.py --plan <NNN> --compare
```
For each `changed` or `removed` file, compare it with `loc/state/<NNN>/baseline/files/<path>`. A removed or loosened assertion, a new skip or expected-failure marker, or a deleted test is **FAIL** unless a deviation in the state file or the plan's `## Resolution` gives the reason. Added tests are fine. No copy: **INFO** "no baseline".
## 4. Criteria have tests
For every criterion ``- K<n>: … → `<test>` `` in the plan:
1. The named test exists and passed in step 2 → **PASS**.
2. It is missing → write it, following TEST-PLAN (e), and run it. At most 3 rounds for all missing tests together. It passes → **PASS** ("written by loc-qa"). It fails on its assertion → **FAIL**: the code does not meet the criterion; do not touch the code. Still broken after round 3 → **FAIL**.
3. `→ manual` → **INFO** with the performer. For `user (deferrable)` the milestone's `**Manual check:**` must be a point of the checks sheet (`checks.py --list`, or rated in `loc/inbox/done/`); if none is, add it (`loc-orchestrate` step 6) and list it.
A milestone that changed code without `**Criteria:**` → **INFO**. A gap in TEST-PLAN itself (section (b) says what to extend and nothing was) → a `deferred` file, never an edit:
```sh
sh "${CLAUDE_PLUGIN_ROOT}/scripts/py.sh" scripts/next_number.py --type deferred --slug "<few words>" --title "<title>" --source "loc-qa <NNN>" --what "<the work, with the milestone>" --why "<reason>" --when "<when to return>" --by loc-qa
```
The three texts go in this command, never as a later edit: a file left as the template is an empty promise.
## 4a. Tests run the real code
```sh
sh "${CLAUDE_PLUGIN_ROOT}/scripts/py.sh" scripts/test_copies.py
```
It lists functions a test file defines with the name and nearly the body of a function in the code (`fft` copied from `fourier.html`). Such a test passes whatever the code does. For each copy in a test this plan names or changed:
- Rewrite the test to run the real code: import it; for a script inside a page, read the page, take its `<script>` text and run it (Node: `readFileSync` and `vm.runInContext`, then the functions are on the context). Run it → **PASS** ("rewritten by loc-qa"). It now fails on its assertion → **FAIL**: the code does not do what the copy did.
- A deliberate mock (it replaces a dependency the test does not check) → **INFO** with the reason.
- Copies in tests this plan did not touch → **INFO**, one row.
## 5. Project `qa-*` skills
Find `.claude/skills/qa-*/SKILL.md` in the project and read each header:
- has `qa-paths:` (a list of globs) and a changed file matches one → `Skill(skill: "<name>")` with the changed files that match. Its report decides **PASS** or **FAIL**.
- has `qa-paths:`, nothing matches → **INFO** "no matching changes".
- no `qa-paths:` → **INFO** "available, not run", plus once: "add `qa-paths:` to its header to run it automatically".
## 6. Verdict and QA file
**APPROVED** only when there is no FAIL and no SKIPPED gate layer. SKIPPED is allowed only in optional layers (report, model behaviour, CI only).
Write the QA file in English:
```
# QA — plan <NNN>
**Verdict:** APPROVED | NOT APPROVED
**Date:** <date "+%Y-%m-%d %H:%M">
**Scope:** <from>..<to>, <n> changed files
| Check | Status | Proof or reason |
|---|---|---|
| layer unit: `python -m pytest -q` | PASS | `42 passed` |
| K2 → `tests/test_export.py::test_empty` | FAIL | `AssertionError: …` |
| qa-docs | INFO | available, not run |
```
Then the rows for tests written by `loc-qa` (file and name) and new `deferred` files.
## 7. Report
Return: the verdict, the QA file's path, each FAIL and SKIPPED with its reason, tests written, new inbox files. The caller records the `qa` gate; do not edit the state file.
Versions
The database has no other skills named loc-qa.
Database snapshot: 13.11.2026 · package version b84599a02e27 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100loc-review
Use when the user asks for a review of changes ("loc-review", "review what changed", "review plan 018"), and when loc-orchestrate finishes a plan. Runs the rubber-duck critic and code-review in parallel, checks the project's invariants. After a plan it fixes the findings; on its… - 100loc-orchestrate
Use when the user asks to execute a plan from loc/inbox/ (e.g. "loc-orchestrate 018", "execute plan 018"), or to resume one that has a state file in loc/state/. Builds it milestone by milestone with a proof and a code-review per milestone, then a final review. - 100scout-loc
Count lines of code with `scout loc`, a `cloc` wrapper that can replay the count over git history. Trigger when the question is about size rather than count, e.g. "how many lines of Swift do we have?", "how did the codebase grow over two years?", "lines of code per module", "how… - 100test-plan
Use when the user wants a test plan, QA plan, or release checklist, or asks how a feature, PR, or release should be tested. - 100retro
Weekly retrospective with session analytics, LOC metrics, pattern detection, and persistent history. Use to reflect on how work went over a week. For what shipped/broke as a timeline use /pulse; for raw session numbers use /scorecard. - 100spec
Plan a non-trivial change before implementation. Use when work needs repository research, locked interfaces, security invariants, dependency-aware subtasks, executable acceptance criteria, and explicit approval. Consumes unknowns-map.md when available, writes plan.md, and stops…