lean-agent-harness 1.4.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +13 -0
- package/CLAUDE.md +1 -1
- package/GLOSSARY.md +3 -3
- package/README.md +4 -4
- package/adapters/opencode/commands/{review.md → review-audit.md} +1 -1
- package/package.json +1 -1
- package/skills/orchestrate/SKILL.md +1 -1
- package/skills/review-audit/SKILL.md +32 -0
- package/skills/security-audit/SKILL.md +18 -8
- package/skills/security-audit/references/exclusions.md +19 -0
- package/adapters/opencode/commands/audit-code.md +0 -5
- package/skills/audit-code/SKILL.md +0 -14
- package/skills/code-review/SKILL.md +0 -42
- package/skills/review/SKILL.md +0 -22
- package/skills/review/agents/openai.yaml +0 -2
- /package/skills/{audit-code → review-audit}/agents/openai.yaml +0 -0
package/AGENTS.md
CHANGED
|
@@ -21,7 +21,7 @@ Single source of truth for all coding agents. Engineering rigor, deterministic e
|
|
|
21
21
|
* **State:** the plan and `- [ ]` checklist live in `.tasks/current.md` so a compacted session resumes without re-asking. Delete it after a clean `commit`.
|
|
22
22
|
* **Branch:** tracked work happens on `feature/<task-slug>`, never `main`/`master`.
|
|
23
23
|
|
|
24
|
-
Workflow skills (explicit invocation only): `plan-flow <task>` → `orchestrate` → `review` → `commit [hint]
|
|
24
|
+
Workflow skills (explicit invocation only): `plan-flow <task>` → `orchestrate` → `review-audit` → `commit [hint]`. Skills are referenced by name; each agent resolves them from its own skills directory.
|
|
25
25
|
|
|
26
26
|
## 3. Hard Rules
|
|
27
27
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ All notable changes to this project are documented here. Format based on [Keep a
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [2.0.0] - 2026-11-06
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Breaking:** the `review` workflow skill is now `review-audit` (command `/review-audit`), and `code-audit` and `code-review` are removed (see Removed). The workflow goes from five skills to four.
|
|
12
|
+
- `review-audit` no longer collides with the review commands built into the agents. It takes an optional effort level (`low|medium|high`), runs one reviewer per axis (Correctness, Readability & Bloat, Architecture & Boundaries, Safety & Performance), verifies each finding before reporting it, and lists security hotspots as WARNINGs for human review. It only reports; fixes stay in `orchestrate`.
|
|
13
|
+
- `security-audit` owns the scan scope (a path, else the whole workspace), verifies findings with a confidence threshold of 8 out of 10, reports an exploit scenario per finding, adds a data-exposure vector, and keeps its exclusions in `references/exclusions.md`.
|
|
14
|
+
|
|
15
|
+
### Removed
|
|
16
|
+
|
|
17
|
+
- The `code-audit` skill and its OpenCode command: a thin wrapper over `security-audit`, whose scope section now covers it. Use `security-audit` on a path instead of `/audit-code`.
|
|
18
|
+
- The `code-review` skill: its axes now live inside `review-audit`. Directories left over from an older install (`skills/review`, `skills/audit-code`, `skills/code-review`) are not deleted by the installer; remove them by hand.
|
|
19
|
+
|
|
7
20
|
## [1.4.0] - 2026-11-04
|
|
8
21
|
|
|
9
22
|
### Added
|
package/CLAUDE.md
CHANGED
|
@@ -9,5 +9,5 @@ Read and adhere strictly to:
|
|
|
9
9
|
## Fast Command Reference
|
|
10
10
|
- `/plan-flow <task>`: Read-only architecture analysis & ODD milestone checklist.
|
|
11
11
|
- `/orchestrate <task>`: Step-by-step implementation, RED-GREEN loop, and DoD validation.
|
|
12
|
-
- `/review [target]`: Risk-based git diff audit against SonarQube quality gates.
|
|
12
|
+
- `/review-audit [target]`: Risk-based git diff audit against SonarQube quality gates.
|
|
13
13
|
- `/commit [hint]`: Quality gate verification and atomic Conventional Commit.
|
package/GLOSSARY.md
CHANGED
|
@@ -20,12 +20,12 @@ Single source of truth for the domain vocabulary of this project. Both human eng
|
|
|
20
20
|
| **Slice** | One feature-complete ODD unit (e.g., migration + model + service + tests). | `- [ ] Slice N:` checklist item | No fragmented single-line micro-slices. |
|
|
21
21
|
| **DoD (Definition of Done)** | Verification gate: 0 linter/compiler errors, passing tests with cited terminal output, no debug residue, glossary-aligned naming, isolated `git status`. | `orchestrate` skill DoD; `commit` skill step 1 | Evidence without raw terminal output is invalid. |
|
|
22
22
|
| **RED / GREEN / REFACTOR** | Test-first cycle: prove the gap with a failing test, implement minimally to pass, refactor for SOLID. | `testing` skill | Never assert GREEN without running the runner. |
|
|
23
|
-
| **Workflow Skill** | A skill invoked explicitly (`plan-flow`, `orchestrate`, `review
|
|
23
|
+
| **Workflow Skill** | A skill invoked explicitly (`plan-flow`, `orchestrate`, `review-audit`, `commit`). It carries `disable-model-invocation: true`, so its description costs no standing tokens. | `skills/<name>/SKILL.md` | Role instructions (Planner, Orchestrator) live inside the skill; no separate agent or command files. |
|
|
24
24
|
| **Skill** | A self-contained Agent Skills playbook (`name` + `description` frontmatter) loaded on demand. | `skills/<name>/SKILL.md` | `name` equals the folder; keep each around 70 lines or fewer. |
|
|
25
25
|
| **Inline Task** | Work small enough to skip planning ceremony (≤ 1 file, < 30 lines, cosmetic). | `AGENTS.md` § 2 | Auditable through `git diff` alone. |
|
|
26
|
-
| **Risk Tier** | `low` or `high` tag on each planned slice. `high` = a high-risk item named in `AGENTS.md` § 2 (auth/authz, data migration or deletion, secrets/config, public interface, concurrency). | `Risk:` field in `plan-flow` output | High-risk slices get a fresh-context verifier (`orchestrate`) and review (`review`); low-risk slices keep the single DoD gate. |
|
|
26
|
+
| **Risk Tier** | `low` or `high` tag on each planned slice. `high` = a high-risk item named in `AGENTS.md` § 2 (auth/authz, data migration or deletion, secrets/config, public interface, concurrency). | `Risk:` field in `plan-flow` output | High-risk slices get a fresh-context verifier (`orchestrate`) and review (`review-audit`); low-risk slices keep the single DoD gate. |
|
|
27
27
|
| **Change Budget** | Limit of 400 changed lines per work unit. | `orchestrate` § Change budget (enforced by `commit`) | Rule text lives only in `orchestrate`. |
|
|
28
|
-
| **Blocker** | A review finding (Blocker or Critical) that blocks `commit` until fixed. | `review` verdict | WARNING and SUGGESTION never block and never trigger fixes. |
|
|
28
|
+
| **Blocker** | A review finding (Blocker or Critical) that blocks `commit` until fixed. | `review-audit` verdict | WARNING and SUGGESTION never block and never trigger fixes. |
|
|
29
29
|
| **Profile** | Installation subset: `full` (default) deploys every skill; `core` omits the skills listed in `profile-extras.txt`. | `--profile core|full` | Only the `skills` directory is filtered; rules and workflow skills always install; both installers must produce identical trees. |
|
|
30
30
|
| **Seed Glossary** | Minimal domain-glossary template deployed to client projects when they have none. | `templates/GLOSSARY.md` | At most 1500 bytes (token budget test); never overwrites an existing `GLOSSARY.md`. |
|
|
31
31
|
| **Source Override** | Testability hook: installers use `LAH_SOURCE` (shell) or `LAH_FAKE_HOME`/`LAH_FAKE_CWD` (CLI exports) in tests. | `install.sh`, `bin/cli.js` | Must never alter default behavior when unset. |
|
package/README.md
CHANGED
|
@@ -8,11 +8,11 @@ One rule file and one skill format for **Claude Code**, **Pi**, **OpenCode**, **
|
|
|
8
8
|
|
|
9
9
|
Everything ships as [Agent Skills](https://agentskills.io) (`skills/<name>/SKILL.md`, with `name` and `description` frontmatter) plus a single `AGENTS.md`. There are no separate command or subagent files, so there is nothing to translate per tool.
|
|
10
10
|
|
|
11
|
-
* **Domain skills** (`testing`, `security-audit`, `db-migration`, `diagnosing-bugs`, `
|
|
12
|
-
* **Workflow skills** (`plan-flow`, `orchestrate`, `review
|
|
11
|
+
* **Domain skills** (`testing`, `security-audit`, `db-migration`, `diagnosing-bugs`, `impeccable`, `humanizer`, `diagram-design`) load on demand when the task matches their description.
|
|
12
|
+
* **Workflow skills** (`plan-flow`, `orchestrate`, `review-audit`, `commit`) set `disable-model-invocation: true` (plus `agents/openai.yaml` for Codex). Claude Code, Pi, Cursor and Codex never offer them to the model, so their descriptions cost no tokens until you call them. OpenCode and Copilot ignore the flag and list them (one short line each). The Planner and Orchestrator roles live inside `plan-flow` and `orchestrate`. Slices tagged `Risk: high` are verified and reviewed in a fresh context; every `SKILL.md` stays under 3000 bytes and long detail loads from `references/`.
|
|
13
13
|
|
|
14
14
|
```text
|
|
15
|
-
plan-flow <task> → orchestrate → review [target] → commit [hint]
|
|
15
|
+
plan-flow <task> → orchestrate → review-audit [low|medium|high] [target] → commit [hint]
|
|
16
16
|
(read-only plan) (RED-GREEN, DoD) (audit git diff) (atomic commit) (security scan)
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -46,7 +46,7 @@ curl -fsSL https://raw.githubusercontent.com/lnardev/lean-agent-harness/main/ins
|
|
|
46
46
|
**Pinning and verifying the `curl` install.** The one-liner runs the `main` branch unless you pin it:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
curl -fsSL https://raw.githubusercontent.com/lnardev/lean-agent-harness/main/install.sh | LAH_VERSION=
|
|
49
|
+
curl -fsSL https://raw.githubusercontent.com/lnardev/lean-agent-harness/main/install.sh | LAH_VERSION=2.0.0 LAH_SHA256=<sha256-of-the-archive> bash -s -- --global --auto
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
`LAH_VERSION` downloads that release tag. `LAH_SHA256` makes the installer abort, before deploying anything, if the archive does not match. Without it the installer says that the checksum is not verified. GitHub does not publish archive checksums, so compute the value once from a copy you trust, for example `shasum -a 256` on the archive of that tag. GitHub's generated archives are not guaranteed to stay byte-identical over time, so if a previously valid checksum stops matching, recompute it from a trusted copy before assuming tampering.
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
description: Risk-based audit of uncommitted changes against quality gates before committing. Invoke explicitly.
|
|
3
3
|
argument-hint: "[target]"
|
|
4
4
|
---
|
|
5
|
-
Load the `review` skill and follow it. Arguments: $ARGUMENTS
|
|
5
|
+
Load the `review-audit` skill and follow it. Arguments: $ARGUMENTS
|
package/package.json
CHANGED
|
@@ -35,4 +35,4 @@ After the DoD, verify in a fresh context (subagent or new session; if the host h
|
|
|
35
35
|
## Failure
|
|
36
36
|
Apply the Circuit Breaker from `AGENTS.md`, reverting only this slice's files.
|
|
37
37
|
|
|
38
|
-
Mark `- [x]` in `.tasks/current.md`, advance, and when all are done ask the user to run `review`.
|
|
38
|
+
Mark `- [x]` in `.tasks/current.md`, advance, and when all are done ask the user to run `review-audit`.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-audit
|
|
3
|
+
description: Risk-based audit of uncommitted changes against quality gates before committing. Invoke explicitly.
|
|
4
|
+
argument-hint: [low|medium|high] [target]
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# review-audit
|
|
9
|
+
|
|
10
|
+
Arguments: optional effort level, then optional target (file, branch or PR). Default: **medium**.
|
|
11
|
+
|
|
12
|
+
* **low**: report only Blocker/Critical findings you are certain of.
|
|
13
|
+
* **medium**: add WARNING findings you verified in the code.
|
|
14
|
+
* **high**: add SUGGESTION findings and uncertain ones, each marked PLAUSIBLE.
|
|
15
|
+
|
|
16
|
+
1. Run `git diff` (or inspect the given target file/branch).
|
|
17
|
+
2. Check new symbols against `GLOSSARY.md` (skip if absent).
|
|
18
|
+
3. Review by axis: one reviewer per axis. Report only actionable defects, each with its exact structural remedy.
|
|
19
|
+
* **Correctness:** null dereferences, type coercion, resource leaks, off-by-one, inverted conditions, unchecked errors.
|
|
20
|
+
* **Readability & Bloat:** dead code and commented-out code, cyclomatic complexity > 10, nesting > 3 levels, functions > 30 lines, duplicated blocks, cryptic names (`data`, `temp`, `res`).
|
|
21
|
+
* **Architecture & Boundaries:** transport or DB logic leaking into domain layers, refactors that only shuffle lines, premature interfaces and shallow wrappers.
|
|
22
|
+
* **Safety & Performance:** injection, authorization gaps, unsanitized input at system borders (load `security-audit` if touching persistence/auth), unbounded queries, N+1, heavy work inside hot loops.
|
|
23
|
+
Security hotspots (crypto, CORS, cookies, regex on user input, deserialization, dependency/config changes) are not defects: list each once as a WARNING for human review, with the reason.
|
|
24
|
+
If the host has subagents, run the axis reviewers in parallel, each with only the diff and its axis. Otherwise run them sequential in this context and state that in the verdict.
|
|
25
|
+
4. Verify pass: re-read the cited code for every candidate finding and drop any you cannot reproduce from the code. Mark survivors CONFIRMED, or PLAUSIBLE when the level allows uncertain ones.
|
|
26
|
+
5. Verify the diff fulfils the planned slice with no scope creep.
|
|
27
|
+
If any slice is `Risk: high`, run this review in a fresh context (subagent or new session) so it does not judge code it just wrote; if the host has neither, state that the review ran in the authoring context.
|
|
28
|
+
Record the hash of the diff you judged (`git add -N <new files>`, then `git diff HEAD | git hash-object --stdin`) in the verdict; a later change to that hash needs a new review. If the work is already committed, `git diff HEAD` is empty and always hashes the same: hash `git diff <base>...HEAD` instead.
|
|
29
|
+
6. Verdict: any Blocker/Critical → list required fixes, each with the exact structural remedy, and block `commit`. Clean → approve and tell the user to run `commit`.
|
|
30
|
+
WARNING and SUGGESTION are listed once in the verdict. They never trigger fixes or another review round.
|
|
31
|
+
|
|
32
|
+
Report only. Never edit code in a review: fixes go through `orchestrate`, so the judged hash stays valid.
|
|
@@ -7,26 +7,36 @@ description: Static and architectural security review. Identifies injection risk
|
|
|
7
7
|
|
|
8
8
|
Inspect the codebase for concrete security defects where an untrusted principal crosses a real trust boundary or abuses application logic.
|
|
9
9
|
|
|
10
|
+
## Scope
|
|
11
|
+
|
|
12
|
+
The given path, else the whole workspace. Skip `.git`, `node_modules`, `.env*`, vendored code and binaries.
|
|
13
|
+
|
|
10
14
|
## Audit Vectors
|
|
11
15
|
|
|
12
16
|
1. **Authentication & Authorization:** Missing guards on routes/handlers, broken object-level authorization (IDOR), privilege escalation, unsafe token/session handling.
|
|
13
17
|
2. **Input Validation & Injection:** Raw SQL/NoSQL queries, unsanitized command execution (`os/exec`, `eval`), unescaped template rendering (XSS), path traversal (`../`).
|
|
14
18
|
3. **Secrets & Configurations:** Hardcoded API keys, exposed `.env` values, secrets leaked in logs or error traces, weak CORS policies, insecure crypto defaults.
|
|
15
19
|
4. **Data Boundaries & Deserialization:** Insecure deserialization, mass assignment vulnerabilities, improper SSRF protections on external fetches.
|
|
16
|
-
5. **Supply Chain & Dependencies:** Known CVEs
|
|
20
|
+
5. **Supply Chain & Dependencies:** Known CVEs reported by the project's auditor, deprecated packages, unsafe imports.
|
|
21
|
+
6. **Data Exposure:** PII or secrets in logs, API responses leaking fields, debug information in production.
|
|
22
|
+
|
|
23
|
+
## Verification
|
|
24
|
+
|
|
25
|
+
Verify pass: for each candidate, re-read the code and trace the data from the untrusted source to the sensitive sink. Give it a confidence from 1 to 10 and drop anything below 8. Apply `references/exclusions.md` before reporting. Subagents may verify findings in parallel; without them, verify sequentially and say so.
|
|
17
26
|
|
|
18
27
|
## Reporting Standard
|
|
19
28
|
|
|
20
|
-
|
|
21
|
-
- **Location:**
|
|
22
|
-
- **Vulnerability:**
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
29
|
+
Per finding:
|
|
30
|
+
- **Location:** file path and line range.
|
|
31
|
+
- **Vulnerability:** classification and mechanism of failure.
|
|
32
|
+
- **Severity:** Critical, High, Medium or Low, with the concrete blast radius.
|
|
33
|
+
- **Exploit Scenario:** the attacker's steps from untrusted input to impact. No path, no finding.
|
|
34
|
+
- **Surgical Fix:** minimal diff or exact remediation.
|
|
25
35
|
|
|
26
36
|
## Output Format
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
A Markdown matrix, then the exploit scenarios:
|
|
29
39
|
|
|
30
40
|
| Severity | Category | File:Line | Description | Remediation |
|
|
31
41
|
| :--- | :--- | :--- | :--- | :--- |
|
|
32
|
-
| High | Injection | `server/db.go:45` | Unsanitized query input | Use parameterized query |
|
|
42
|
+
| High | Injection | `server/db.go:45` | Unsanitized query input | Use parameterized query |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Exclusions
|
|
2
|
+
|
|
3
|
+
Do not report:
|
|
4
|
+
|
|
5
|
+
1. Denial of service, resource exhaustion, rate limiting, memory or CPU consumption.
|
|
6
|
+
2. Missing hardening or best practices with no concrete vulnerability.
|
|
7
|
+
3. Outdated third-party libraries, unless the project's own auditor (`npm audit`, `pip-audit`, `govulncheck`) flags them.
|
|
8
|
+
4. Race conditions or timing attacks that are only theoretical.
|
|
9
|
+
5. Regex injection, regex DoS, log spoofing, missing audit logs.
|
|
10
|
+
6. Path-only SSRF: it matters only if the host or protocol is controllable.
|
|
11
|
+
7. Findings in documentation or in test-only files.
|
|
12
|
+
8. Client-side missing auth checks: the server is responsible for them.
|
|
13
|
+
9. Memory-safety issues in memory-safe languages.
|
|
14
|
+
|
|
15
|
+
Trusted inputs:
|
|
16
|
+
|
|
17
|
+
* Environment variables and CLI flags are trusted. An attack that needs to control one is invalid.
|
|
18
|
+
* UUIDs are unguessable and need no validation.
|
|
19
|
+
* Logging non-PII data is not a finding. Logging secrets, passwords or PII is.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: audit-code
|
|
3
|
-
description: Deep static security audit of a path or the whole workspace. Invoke explicitly.
|
|
4
|
-
argument-hint: [path]
|
|
5
|
-
disable-model-invocation: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# audit-code
|
|
9
|
-
|
|
10
|
-
Scope: the given path, else the whole workspace. Skip `.git`, `node_modules`, `.env*`, vendored code, binaries.
|
|
11
|
-
|
|
12
|
-
1. Load the `security-audit` skill.
|
|
13
|
-
2. Scan: broken authn/authz (IDOR, missing guards), injection (SQL/NoSQL/XSS/command), hardcoded secrets, insecure deserialization, SSRF, unsanitized trust-boundary crossings, dependency CVEs.
|
|
14
|
-
3. Report a severity matrix (Critical/High/Med/Low) with `file:line`, failure mechanism, blast radius and the surgical fix. Every finding needs a concrete attack path; no theoretical issues.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review
|
|
3
|
-
description: Fast, multi-axis technical code review targeting SonarQube quality gates (Bugs, Code Smells), architectural debt, and diff hygiene.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Code Review
|
|
8
|
-
|
|
9
|
-
Evaluate diffs and PRs strictly against four technical axes. Focus on defects that fail SonarQube quality gates and produce technical debt. Propose the exact remedy, not just the critique.
|
|
10
|
-
|
|
11
|
-
## The Review Axes
|
|
12
|
-
|
|
13
|
-
1. **Correctness (SonarQube Bugs):**
|
|
14
|
-
- Null pointer dereferences, unhandled nil/null checks, and type-coercion bugs.
|
|
15
|
-
- Resource leaks: unclosed files, DB connections, HTTP request/response bodies.
|
|
16
|
-
- Logic defects: off-by-one errors, infinite loops, inverted conditions, unchecked error returns.
|
|
17
|
-
|
|
18
|
-
2. **Readability & Bloat (SonarQube Code Smells):**
|
|
19
|
-
- Dead code: unreachable branches, unused variables, orphan imports, commented-out legacy code.
|
|
20
|
-
- Cyclomatic complexity: deep nesting (>3 levels), massive switch statements without default cases.
|
|
21
|
-
- Duplication: identical logic blocks that must be consolidated.
|
|
22
|
-
- Naming: cryptic variable names without domain meaning (`data`, `temp`, `res`).
|
|
23
|
-
|
|
24
|
-
3. **Architecture & Boundaries:**
|
|
25
|
-
- Layer leaks: transport or DB logic leaking into domain/business layers.
|
|
26
|
-
- Relocated complexity: refactors that merely shuffle lines instead of eliminating branches.
|
|
27
|
-
- Unnecessary abstractions: premature interfaces, boilerplate wrappers with only one implementation.
|
|
28
|
-
|
|
29
|
-
4. **Safety & Performance:**
|
|
30
|
-
- Unbounded queries, N+1 patterns, unconstrained pagination.
|
|
31
|
-
- Input validation at system borders (complements `security-audit`).
|
|
32
|
-
- Heavy allocations or redundant calculations inside loops or hot paths.
|
|
33
|
-
|
|
34
|
-
## Findings Format
|
|
35
|
-
|
|
36
|
-
Report only actionable issues ordered by severity:
|
|
37
|
-
|
|
38
|
-
- **Critical:** Blocks merge / SonarQube red gate. Runtime crash, resource leak, or data corruption.
|
|
39
|
-
- **Required:** Must fix. Code smells, complexity spikes, unhandled boundary cases, broken invariants.
|
|
40
|
-
- **Nit / Optional:** Style suggestions, minor syntactic sugar. Non-blocking.
|
|
41
|
-
|
|
42
|
-
For every reported issue, prescribe the exact structural remedy: *extract helper*, *close resource with defer/finally*, *dispatch via map*, or *collapse redundant branch*.
|
package/skills/review/SKILL.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: review
|
|
3
|
-
description: Risk-based audit of uncommitted changes against quality gates before committing. Invoke explicitly.
|
|
4
|
-
argument-hint: [target]
|
|
5
|
-
disable-model-invocation: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# review
|
|
9
|
-
|
|
10
|
-
1. Run `git diff` (or inspect the given target file/branch).
|
|
11
|
-
2. Check new symbols against `GLOSSARY.md` (skip if absent).
|
|
12
|
-
3. Quality gates:
|
|
13
|
-
* **Bugs:** logic anomalies, unhandled null/undefined, resource leaks.
|
|
14
|
-
* **Vulnerabilities:** injection, authorization gaps, unsanitized input (load `security-audit` if touching persistence/auth).
|
|
15
|
-
* **Smells:** cyclomatic complexity > 10, functions > 30 lines, shallow wrappers, dead code.
|
|
16
|
-
4. Verify the diff fulfils the planned slice with no scope creep.
|
|
17
|
-
If any slice is `Risk: high`, run this review in a fresh context (subagent or new session) so it does not judge code it just wrote; if the host has neither, state that the review ran in the authoring context.
|
|
18
|
-
Record the hash of the diff you judged (`git add -N <new files>`, then `git diff HEAD | git hash-object --stdin`) in the verdict; a later change to that hash needs a new review. If the work is already committed, `git diff HEAD` is empty and always hashes the same: hash `git diff <base>...HEAD` instead.
|
|
19
|
-
5. Verdict: any Blocker/Critical → list required fixes and block `commit`. Clean → approve and tell the user to run `commit`.
|
|
20
|
-
WARNING and SUGGESTION are listed once in the verdict. They never trigger fixes or another review round.
|
|
21
|
-
|
|
22
|
-
For deeper multi-axis review rules use the `code-review` skill.
|
|
File without changes
|