@fringetools/cli 0.6.0 → 0.6.1

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/README.md CHANGED
@@ -29,7 +29,7 @@ Prefer a permanent command? `npm install -D @fringetools/cli`, then `npx fringe
29
29
  | `fringe verify [--handoff file] [--json]` | **Proof it was done.** Re-checks everything the hand-off covered and reports `complete` / `partial` / `regressed`: errors fixed, remaining, introduced, and how many findings were silenced with `fringe-ignore` since. Exit `0` only when `complete` (`fringe/verify.v1`). |
30
30
  | `fringe plan [dir\|file] [--scan url] [--json] [--limit n]` | **Fix order for a repo with many findings**: P0 (errors in shared components or critical paths) → P1 (other errors, mechanical first) → P2 review → P3 polish, each cluster with its fix recipe. Never gates (exit 0). `--scan <url>` adds the live page's runtime findings to the same plan (one cluster per axe rule, with element selectors). `--json` = `fringe/plan.v1`. |
31
31
  | `fringe explain [FR-203]` | Why a rule matters, the preferred fix and the tempting fix to avoid. No id lists all 36 rules. |
32
- | `fringe explain pattern [form]` | Build-time best-practice checklist for a component type (`form`, `modal`, `navigation`, `data-view`); each item is marked *verified* (a rule checks it) or *judged*. |
32
+ | `fringe explain pattern [name]` | Build-time best-practice checklist for a component type: `form`, `auth` (sign in and sign up), `checkout`, `table`, `modal`, `navigation`, `data-view`. 48 items; each is marked *verified* (a static rule, or `by scan` for a running page) or *judged*. |
33
33
  | `fringe check --json` | Full report as JSON, schema `fringe/check.v1` (stack, files, findings, counts, score). |
34
34
  | `fringe check --claude-hook` | **For Claude Code hooks.** Silent when clean; on errors prints `{"decision":"block","reason":…}` (exit 0) so the agent sees and fixes them. |
35
35
  | `fringe check --hook` | One-line `fringe/hook.v1` JSON for CI / pre-commit. Exits `1` on errors. Claude Code does **not** feed this back — use `--claude-hook` for agents. Wins over `--json`. |
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "./chunk-JJI65ERU.js";
4
+ } from "./chunk-BCK7LSHQ.js";
5
5
 
6
6
  // src/bin.ts
7
7
  process.exitCode = await runCli(process.argv.slice(2));
@@ -4,7 +4,7 @@ import { existsSync as existsSync5, readFileSync as readFileSync11, statSync } f
4
4
  import { dirname as dirname3, join as join12, resolve } from "path";
5
5
 
6
6
  // src/version.ts
7
- var VERSION = "0.6.0";
7
+ var VERSION = "0.6.1";
8
8
 
9
9
  // src/check.ts
10
10
  import { readFileSync as readFileSync5 } from "fs";
@@ -2090,7 +2090,7 @@ var PATTERNS = {
2090
2090
  title: "Form",
2091
2091
  items: [
2092
2092
  { text: "Every field has a visible <label> bound with htmlFor/id", rules: ["FR-203"] },
2093
- { text: "Right input type and autocomplete (email, tel, current-password, new-password, name)", rules: ["FR-216"] },
2093
+ { text: "Right input type and autocomplete (email, tel, current-password, new-password, name) (Fringe checks email, phone and password fields)", rules: ["FR-216"] },
2094
2094
  { text: "Required fields are marked in text, not by color alone" },
2095
2095
  { text: "Errors appear next to the field in words, linked with aria-describedby and aria-invalid; focus moves to the first error on submit" },
2096
2096
  { text: "The submit button shows a pending state and cannot be double-submitted" },
@@ -2118,6 +2118,48 @@ var PATTERNS = {
2118
2118
  { text: "Tap targets are large enough", rules: ["FR-305"] }
2119
2119
  ]
2120
2120
  },
2121
+ auth: {
2122
+ title: "Sign in and sign up",
2123
+ items: [
2124
+ { text: "Every field has a visible <label> bound with htmlFor/id (no placeholder-only fields)", rules: ["FR-203"] },
2125
+ { text: "Right input types and autocomplete: username or email, current-password (sign in), new-password (sign up), one-time-code for codes (Fringe checks email, phone and password fields)", rules: ["FR-216"] },
2126
+ { text: "Social and single-sign-on buttons carry text naming the provider, not just a logo", rules: ["FR-202"] },
2127
+ { text: '"Forgot password" is a real link with descriptive text', rules: ["FR-217"] },
2128
+ { text: "Password rules are shown before typing, not only after a failure; the user can reveal the password with a named toggle" },
2129
+ { text: 'A failed sign-in says "email or password is incorrect" (never which one), keeps the email, and moves focus to the message' },
2130
+ { text: "The submit button shows a pending state and cannot be double-submitted; pasting a password is allowed" },
2131
+ { text: "The page has a title and a language (checked on full HTML pages), and keyboard focus never gets stuck (checked by scan)", rules: ["FR-218", "FR-401"] },
2132
+ { text: "The whole flow, including the reveal toggle and any code entry, works with the keyboard alone" }
2133
+ ]
2134
+ },
2135
+ checkout: {
2136
+ title: "Checkout and payment",
2137
+ items: [
2138
+ { text: "Every field has a visible label", rules: ["FR-203"] },
2139
+ { text: "Address and card fields use the standard autocomplete tokens (name, street-address, postal-code, cc-number, cc-exp, cc-csc)" },
2140
+ { text: "The full price, including shipping, tax and any recurring cost, is visible before the pay button", rules: ["FR-214"] },
2141
+ { text: "No pre-checked marketing or consent boxes", rules: ["FR-211"] },
2142
+ { text: "No fake countdowns or manufactured urgency", rules: ["FR-210"] },
2143
+ { text: "Declining an upsell or add-on is a neutral choice with neutral wording", rules: ["FR-212"] },
2144
+ { text: "A payment failure says what failed in plain words, keeps the cart and the entered details, and offers a retry", rules: ["FR-215"] },
2145
+ { text: 'The pay button states the action and amount ("Pay $42.00"), shows a pending state, and cannot charge twice' },
2146
+ { text: "Order-summary changes (quantity, coupon, shipping) are announced to screen readers (aria-live)" },
2147
+ { text: "Progress through the steps is shown, and going back never loses what was entered" },
2148
+ { text: "Tap targets are large enough on a phone", rules: ["FR-305"] }
2149
+ ]
2150
+ },
2151
+ table: {
2152
+ title: "Data table",
2153
+ items: [
2154
+ { text: "A real <table> with <th> headers (scope set) and a caption or accessible name" },
2155
+ { text: "Sortable headers are buttons, and the sorted column carries aria-sort" },
2156
+ { text: 'Row-action icon buttons have names ("Delete invoice 1042"), and each row checkbox is labelled', rules: ["FR-202", "FR-203"] },
2157
+ { text: "Loading, empty (with a next step) and error (with a retry) states", rules: ["FR-208", "FR-215"] },
2158
+ { text: "Filters and the search box are labelled", rules: ["FR-203"] },
2159
+ { text: "A wide table scrolls inside its own container instead of making the whole page scroll sideways at 320px", rules: ["FR-404"] },
2160
+ { text: "Updated results after a filter or sort are announced (aria-live), and keyboard focus is not lost" }
2161
+ ]
2162
+ },
2121
2163
  "data-view": {
2122
2164
  title: "Data view (list, table, dashboard)",
2123
2165
  items: [
@@ -2132,7 +2174,7 @@ function renderPatterns(name) {
2132
2174
  if (!name) return Object.entries(PATTERNS).map(([k, p2]) => `${k.padEnd(11)} ${p2.title}`).join("\n");
2133
2175
  const p = PATTERNS[name.toLowerCase()];
2134
2176
  if (!p) return void 0;
2135
- const mark = (i) => i.rules ? `[verified: ${i.rules.join(", ")}]` : "[judged]";
2177
+ const mark = (i) => i.rules ? `[verified${i.rules.every((r) => /^FR-40[0-5]$/.test(r)) ? " by scan" : ""}: ${i.rules.join(", ")}]` : "[judged]";
2136
2178
  return [
2137
2179
  `${p.title}: build it like this`,
2138
2180
  ...p.items.map((i) => `- ${i.text} ${mark(i)}`),
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runCli
3
- } from "./chunk-JJI65ERU.js";
3
+ } from "./chunk-BCK7LSHQ.js";
4
4
  export {
5
5
  runCli
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fringetools/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,7 @@ Command: use `fringe` if it is on the PATH, otherwise `npx -y @fringetools/cli@0
9
9
 
10
10
  Ponytail trims your code. Fringe handles your edges. Work the ladder in order.
11
11
 
12
- 0. **Building a form, modal, navigation or data view?** Run `fringe explain pattern <form|modal|navigation|data-view>` first: a short best-practice checklist, each item marked verified (Fringe checks it) or judged (you decide and say why).
12
+ 0. **Building a form, sign-in, checkout, table, modal, navigation or data view?** Run `fringe explain pattern <form|auth|checkout|table|modal|navigation|data-view>` first: a short best-practice checklist, each item marked verified (Fringe checks it) or judged (you decide and say why).
13
13
  1. **Flow (judged).** Before building, ask what the user can skip. Cut steps, screens or options nobody needs. Write each decision with its evidence to `.fringe/manifest.json`: `{"flows":[{"action":"cut"|"kept","what":"...","evidence":"..."}]}`. No evidence, no cut.
14
14
  2. **Edges (verified, gates).** After every edit the hook runs `fringe check --claude-hook` and feeds errors back to you. Fix every listed finding. If there is no hook, run `fringe check --hook` yourself from the project root and do not finish while `block` is `true`.
15
15
  On a repo with many existing findings, run `fringe plan` and work it batch by batch (shared components first, since one fix clears many uses), re-running `fringe check` after each batch. `fringe explain <rule>` gives the recipe and what to avoid.
@@ -31,6 +31,7 @@ Fringe checks agent-written frontends for accessibility, state, dark-pattern and
31
31
  | `handoff` / `verify` | Work order for another agent or CI, and proof it was done (complete / partial / regressed) |
32
32
  | `rules` | Per rule: open / baselined / silenced, to spot rules that do not suit this repo |
33
33
  | `init --for <agents>` / `--git` | Rules file for Codex, Cursor, Copilot, Gemini…; commit gate for any agent |
34
+ | `explain pattern <name>` | Checklist for form, auth, checkout, table, modal, navigation, data-view |
34
35
  | `explain [FR-203]` | Why a rule matters and how to fix it well |
35
36
  | `check --record [--manifest f]` | Append the run to `.fringe/ledger.jsonl` |
36
37
  | `init` | Add the hook and install the skills |