reviewer-harness 1.5.0 → 1.6.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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bin": {
4
4
  "reviewer-harness": "./bin/cli.js"
5
5
  },
6
- "description": "Your own AI harness — one master config that syncs guardrail rules, skills, and a local memory to Claude, OpenCode, Gemini, Cline, Freebuff, Copilot CLI, and Antigravity. No API key, no dependencies.",
6
+ "description": "Your own AI harness \u2014 one master config that syncs guardrail rules, skills, and a local memory to Claude, OpenCode, Gemini, Cline, Freebuff, Copilot CLI, and Antigravity. No API key, no dependencies.",
7
7
  "engines": {
8
8
  "node": ">=18"
9
9
  },
@@ -26,7 +26,7 @@
26
26
  "url": "https://github.com/xcell321/reviewer-harness.git"
27
27
  },
28
28
  "type": "module",
29
- "version": "1.5.0",
29
+ "version": "1.6.0",
30
30
  "files": [
31
31
  "bin",
32
32
  "lib",
@@ -34,4 +34,4 @@
34
34
  "agents",
35
35
  "commands"
36
36
  ]
37
- }
37
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: api-security
3
+ description: 12 API security rules — apply to every backend endpoint you build or review. No anonymous backdoors, no leaked secrets.
4
+ ---
5
+
6
+ ## Skill: api-security
7
+
8
+ When to use: building or reviewing any API — REST, GraphQL, or internal endpoints.
9
+
10
+ Apply these 12 rules to every endpoint. If a rule doesn't apply, say why.
11
+
12
+ ### Authentication & Access
13
+ 1. **Authenticate every call.** No anonymous backdoors. Every endpoint requires a valid credential — no "internal" or "debug" routes left open.
14
+ 2. **Check object access.** Verify the caller owns the resource: *your* ID, not anyone's ID. Never trust an ID from the request without checking ownership.
15
+ 3. **Use least-privilege keys.** Read-only keys where possible. Separate keys per environment. Never reuse an admin key for a client.
16
+
17
+ ### Input & Transport
18
+ 4. **Validate input.** Reject what you didn't expect. Whitelist shapes with a schema (e.g. Zod); never trust raw request bodies, query params, or headers.
19
+ 5. **HTTPS only.** No plain-text tokens, ever. Redirect HTTP to HTTPS. Set Secure cookies.
20
+ 6. **No secrets in URLs.** URLs end up in logs, browser history, and referrer headers. Put tokens in headers, never in query strings or paths.
21
+
22
+ ### Tokens & Sessions
23
+ 7. **Short-lived tokens.** Leaks expire fast. Access tokens in minutes, refresh tokens in days — never permanent. Rotate on sensitive actions.
24
+ 8. **Rate limit.** Slow down brute force. Throttle auth endpoints aggressively (e.g. 5 attempts/minute); throttle the rest by reasonable use.
25
+
26
+ ### Observability & Hygiene
27
+ 9. **Log auth failures.** Spot attacks early. Log failed logins, invalid tokens, and permission denials with IP and timestamp — but never log the secret itself.
28
+ 10. **Version your API.** Retire old weak endpoints. Keep `/v1`, `/v2` explicit; deprecate with a sunset date, don't silently change behavior.
29
+ 11. **Limit response data.** Send only what's needed. Don't return full user objects, internal IDs, or stack traces to clients. Filter fields per role.
30
+ 12. **Inventory endpoints.** You can't guard what you forgot. Keep a list of every route; audit it when adding features. Remove dead endpoints.
31
+
32
+ ### Quick check before shipping
33
+ - [ ] Every route has auth (or a documented reason it doesn't)
34
+ - [ ] IDs in requests are ownership-checked
35
+ - [ ] Inputs are schema-validated
36
+ - [ ] No secrets in URLs or logs
37
+ - [ ] Auth endpoints are rate-limited
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: ux-edge-states
3
+ description: 10 UX states beyond the happy path — design every screen for empty, loading, error, offline, and success. The real test is what the UI does when nothing goes right.
4
+ ---
5
+
6
+ ## Skill: ux-edge-states
7
+
8
+ When to use: building or reviewing any screen, page, or component.
9
+
10
+ Your product works when everything goes right. The real test is what it does when nothing does. Run every screen through these 10 states before calling it done.
11
+
12
+ ### States to design
13
+ 1. **Empty state.** What does the screen say before there is any data? Never show a blank page. Explain what's missing and give a clear next action ("No sessions yet — create one").
14
+ 2. **Loading state.** Make the wait feel short. Show a skeleton or spinner immediately; never freeze the UI with no feedback. For long waits, show progress.
15
+ 3. **Error state.** Say what went wrong *and how to fix it*. "Something went wrong" is not enough. Include the cause and the recovery step ("Connection failed — check the backend is running, then Retry").
16
+ 4. **No internet.** Never leave the user staring at a blank screen. Detect offline, show a clear banner, and queue actions for retry when back online.
17
+ 5. **Slow network.** Show progress, not a frozen spinner. Use timeouts with friendly messages; allow cancel. Distinguish "loading" from "stuck".
18
+ 6. **No search results.** Suggest something instead of a dead end. Show "No results for X" plus alternatives: clear filters, related items, or a create action.
19
+ 7. **Permission denied.** Explain why and give a way back. Don't just hide the button — tell the user what permission is missing and how to get it (or who to ask).
20
+ 8. **Session expired.** Save their work before logging out. Warn before expiry when possible; preserve form input and drafts across re-auth.
21
+ 9. **Form validation.** Flag the mistake the moment it happens, not after submit. Inline errors next to the field; explain the rule ("Password needs 8+ characters").
22
+ 10. **Success state.** Confirm it, celebrate it, then show what is next. A toast or checkmark plus the logical next action ("Session created — add your first terminal").
23
+
24
+ ### Quick check before shipping
25
+ - [ ] Empty: screen explains what's missing + next action
26
+ - [ ] Loading: immediate feedback, no frozen UI
27
+ - [ ] Error: cause + recovery step, not just "failed"
28
+ - [ ] Offline/slow: detected and communicated
29
+ - [ ] Validation: inline, immediate, explanatory
30
+ - [ ] Success: confirmed + next step shown
31
+
32
+ ### Anti-patterns
33
+ - Blank screens with no explanation.
34
+ - Generic "Something went wrong" with no recovery path.
35
+ - Spinners that never resolve and can't be cancelled.
36
+ - Losing user input on error, expiry, or navigation.
37
+ - Dead-end "no results" with no suggestions.