rachnasutra 0.5.1 → 0.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/CHANGELOG.md +38 -1
- package/CITATION.cff +2 -2
- package/README.gu.md +1 -1
- package/README.md +5 -5
- package/dist/audit.js +117 -18
- package/dist/baseline.js +52 -0
- package/dist/browser.js +35 -5
- package/dist/cli.js +140 -27
- package/dist/fsutil.js +11 -4
- package/dist/redact.js +17 -7
- package/dist/report.js +51 -17
- package/dist/rules.js +70 -19
- package/dist/verify.js +35 -7
- package/docs/cli-reference.md +16 -3
- package/docs/status.md +2 -2
- package/documents/rachnasutra/00-overview.md +13 -2
- package/documents/rachnasutra/01-executive-summary.md +4 -2
- package/documents/rachnasutra/02-functional-specification.md +1 -1
- package/documents/rachnasutra/03-architecture.md +4 -0
- package/documents/rachnasutra/04-technical-reference.md +12 -7
- package/documents/rachnasutra/05-user-guide.md +53 -3
- package/documents/rachnasutra/07-skills-and-agents.md +2 -0
- package/documents/rachnasutra/08-security-and-privacy.md +2 -1
- package/documents/rachnasutra/10-testing-and-evidence.md +9 -5
- package/documents/rachnasutra/11-deployment-and-ci.md +2 -0
- package/documents/rachnasutra/12-roadmap-and-status.md +2 -2
- package/documents/rachnasutra/13-maintainer-handbook.md +5 -1
- package/documents/rachnasutra/16-validation-and-benchmarks.md +12 -2
- package/documents/rachnasutra/18-quick-tour.md +120 -0
- package/documents/rachnasutra/19-real-world-scenarios.md +251 -0
- package/llms.txt +2 -0
- package/package.json +4 -2
- package/samples/broken-ui/latest.html +96 -73
- package/samples/broken-ui/latest.json +236 -25
- package/samples/broken-ui/latest.md +2 -2
- package/samples/broken-ui/latest.sarif +1 -1
- package/samples/good-ui/latest.html +27 -7
- package/samples/good-ui/latest.json +4 -3
- package/samples/good-ui/latest.md +2 -2
|
@@ -8,7 +8,7 @@ This page answers one question: **how do we know the audit is right?** Test fixt
|
|
|
8
8
|
|
|
9
9
|
| Evidence | What was done | Headline result |
|
|
10
10
|
|---|---|---|
|
|
11
|
-
| Per-rule tests | A failing and a passing input for every one of the 33 rules, plus false-positive guards |
|
|
11
|
+
| Per-rule tests | A failing and a passing input for every one of the 33 rules, plus false-positive guards | 158 automated tests pass; all examples published in [Rule examples](15-rule-examples.md) |
|
|
12
12
|
| W3C ACT test cases | 154 test cases from the ACT Rules Community Group, mapped to 10 rules | Precision 71%, recall 65% after fixes (53% and 38% on the first run) |
|
|
13
13
|
| axe-core comparison | The same 109 ACT cases run through axe-core 4.10.2 and RachnaSutra | axe-core is better: 92% precision and 83% recall, against 81% and 73% |
|
|
14
14
|
| Real-world audit | 12 public repositories, 1,360 files, 767 findings; 3 rounds of manual spot checks | Round 1: 77% strict precision, 93% lenient; seven false-positive patterns found and fixed |
|
|
@@ -20,6 +20,10 @@ This page answers one question: **how do we know the audit is right?** Test fixt
|
|
|
20
20
|
|
|
21
21
|
## 2. W3C ACT Rules test cases
|
|
22
22
|
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
23
27
|
The ACT Rules Community Group publishes machine-readable test cases (CC BY 4.0) with expected outcomes `passed`, `failed` and `inapplicable`. Ten ACT rules map to ten RachnaSutra checks. Each case page is audited in static mode. A `failed` case where our rule fires is a true positive; a `passed` or `inapplicable` case where it fires is a false positive.
|
|
24
28
|
|
|
25
29
|
### First run, before any change
|
|
@@ -78,6 +82,8 @@ Full lists of missed and false-alarm cases: [act.md](../../benchmarks/results/ac
|
|
|
78
82
|
|
|
79
83
|
## 3. Comparison with axe-core
|
|
80
84
|
|
|
85
|
+

|
|
86
|
+
|
|
81
87
|
axe-core 4.10.2 (run in jsdom) and RachnaSutra were run on the same inputs for the seven rules both can express.
|
|
82
88
|
|
|
83
89
|
| ACT rule | Cases | RachnaSutra P / R | axe-core P / R |
|
|
@@ -97,6 +103,8 @@ On 509 real HTML files the two tools agreed on most findings; the differences ar
|
|
|
97
103
|
|
|
98
104
|
## 4. Real-world audit of public repositories
|
|
99
105
|
|
|
106
|
+

|
|
107
|
+
|
|
100
108
|
Twelve public repositories were cloned at depth 1 and audited statically; no code from them was executed.
|
|
101
109
|
|
|
102
110
|
| Repository | Files scanned | Findings |
|
|
@@ -119,6 +127,8 @@ Commits and per-rule counts are in [real-world.md](../../benchmarks/results/real
|
|
|
119
127
|
|
|
120
128
|
### Manual precision check
|
|
121
129
|
|
|
130
|
+

|
|
131
|
+
|
|
122
132
|
Findings were sampled at random (seeded, up to 6 per rule) and each was read in its source context. Labels: **TP** (real pattern, plausible concern), **CD** (context-dependent: template, runtime text, intentional demo, or a policy difference) and **FP** (wrong claim or mis-parse).
|
|
123
133
|
|
|
124
134
|
| Round | What was sampled | Labelled | TP | CD | FP | Strict precision | Lenient precision |
|
|
@@ -166,7 +176,7 @@ The 17 remaining findings were reviewed and deliberately not changed: ten focus-
|
|
|
166
176
|
## Reproduce
|
|
167
177
|
|
|
168
178
|
```bash
|
|
169
|
-
npm install && npm test #
|
|
179
|
+
npm install && npm test # 158 tests
|
|
170
180
|
npm run examples # regenerate rule examples
|
|
171
181
|
node benchmarks/act.mjs # ACT benchmark (needs network)
|
|
172
182
|
# axe-core comparison (installs axe-core and jsdom in a throwaway folder):
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Five-minute tour
|
|
2
|
+
|
|
3
|
+
This page takes you from nothing to a fixed, verified page in about five minutes. Every command and every output below was run for real on the sample pages in this repository; nothing is mocked. You need Node.js 20 or newer. You do **not** need an account, an API key or a network connection after the first download.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Step 1. Run the audit
|
|
8
|
+
|
|
9
|
+
Point the tool at any folder that contains front-end source (HTML, CSS, JSX, TSX, Vue, Svelte, Astro). It only reads files.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx rachnasutra audit .
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
You get a short summary in the terminal and three report files next to where you ran the command:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
Wrote:
|
|
19
|
+
rachnasutra-reports/latest.md
|
|
20
|
+
rachnasutra-reports/latest.html
|
|
21
|
+
rachnasutra-reports/latest.json
|
|
22
|
+
Scanned 2 file(s). 22 finding(s): 0 critical, 8 high, 8 medium, 5 low, 1 info.
|
|
23
|
+
RS-0001 [high/confirmed] RS-A11Y-001 index.html:11 - Image has no alt attribute
|
|
24
|
+
RS-0002 [high/confirmed] RS-A11Y-003 index.html:5 - Viewport meta disables or limits zoom
|
|
25
|
+
RS-0003 [high/confirmed] RS-A11Y-004 index.html:13 - Button has no accessible name
|
|
26
|
+
RS-0007 [high/confirmed] RS-A11Y-013 index.html:20 - Text contrast 2.32:1 is below 4.5:1 (#aaaaaa on #ffffff)
|
|
27
|
+
...
|
|
28
|
+
Not evaluated: browser runtime, visual review, screen-reader and keyboard testing, Core Web Vitals (lab and field).
|
|
29
|
+
This is not a WCAG conformance statement.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> **Note:** Your source files are never changed. The only files written are the reports in `rachnasutra-reports/`, which is git-ignored. Use `--no-report` if you want the summary only.
|
|
33
|
+
|
|
34
|
+
Read each finding line like this: `RS-0001` is the stable ID, `[high/confirmed]` is severity and status, `RS-A11Y-001` is the rule, `index.html:11` is the exact file and line.
|
|
35
|
+
|
|
36
|
+
## Step 2. Open the HTML report
|
|
37
|
+
|
|
38
|
+
Open `rachnasutra-reports/latest.html` in any browser. It is one self-contained file: no scripts, no network, works offline, has Auto, Light, Dark and Mix themes and severity filters, and is itself built to be accessible.
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
The report is built in a fixed order, so once you have read one you can read them all:
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
### Why some findings say "confirmed" and some "review required"
|
|
49
|
+
|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
**Confirmed** means the tool saw the problem in the file, or measured it (for example a contrast ratio of 2.32:1). Fix those. **Review required** means a person should look, because something outside the file (a component wrapper, a template) might already handle it.
|
|
53
|
+
|
|
54
|
+
## Step 3. Fix the top items
|
|
55
|
+
|
|
56
|
+
The three highest-impact fixes in the sample, with the exact change:
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<!-- before -->
|
|
60
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
61
|
+
<img src="hero.jpg">
|
|
62
|
+
<button class="icon-btn"></button>
|
|
63
|
+
|
|
64
|
+
<!-- after -->
|
|
65
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
66
|
+
<img src="hero.jpg" alt="Hero banner" width="640" height="360">
|
|
67
|
+
<button class="icon-btn" aria-label="Open menu"></button>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Want a ready-made ordered to-do list first? Ask for a fix plan. It changes nothing:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx rachnasutra plan-fixes --report rachnasutra-reports/latest.json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Step 4. Prove it worked
|
|
77
|
+
|
|
78
|
+
Re-run against the baseline report you just saved. The tool matches findings by a fingerprint, so line-number changes do not confuse it:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx rachnasutra verify --report rachnasutra-reports/latest.json .
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
Baseline 22 -> current 18
|
|
86
|
+
Resolved: 4 Remaining: 18 Introduced: 0
|
|
87
|
+
resolved RS-A11Y-001 index.html:11
|
|
88
|
+
resolved RS-A11Y-003 index.html:5
|
|
89
|
+
resolved RS-A11Y-004 index.html:13
|
|
90
|
+
resolved RS-PERF-001 index.html:11
|
|
91
|
+
Static re-check only; manual accessibility and visual verification are still needed.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Four fixed, nothing new broken (`Introduced: 0`). If a change introduces a new finding the command exits with code 4, so a script or CI job notices.
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
98
|
+
## Step 5. Keep it fixed
|
|
99
|
+
|
|
100
|
+
Add one line to your CI so a confirmed high-severity problem can never be merged again:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx rachnasutra ci .
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
## What to do next
|
|
109
|
+
|
|
110
|
+
| I want to... | Go to |
|
|
111
|
+
|---|---|
|
|
112
|
+
| See realistic situations and the exact commands for each | [Real-world scenarios](19-real-world-scenarios.md) |
|
|
113
|
+
| Learn every command and option | [User guide](05-user-guide.md) |
|
|
114
|
+
| Understand what each rule checks and where it can be wrong | [Audit rules reference](06-audit-rules-reference.md) |
|
|
115
|
+
| Let my AI IDE do the review and the edits safely | [Skills and agents](07-skills-and-agents.md) |
|
|
116
|
+
| Decide whether I can trust the results | [Validation and benchmarks](16-validation-and-benchmarks.md) |
|
|
117
|
+
|
|
118
|
+
## Before you share a report or claim "accessible"
|
|
119
|
+
|
|
120
|
+
A clean report means the static rules found nothing. It does **not** mean the interface is accessible. Before any claim, also run these by hand: a keyboard-only pass of every key flow, a screen-reader pass, 200% zoom and 320 px width reflow, reduced-motion and high-contrast modes. The report's Limitations section lists exactly what was not tested.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# Real-world scenarios
|
|
2
|
+
|
|
3
|
+
Seven situations that people actually face, each with the exact commands to run, what you will see, and what to do next. The people are illustrative and invented. The commands are real, and the outputs shown come from running them on the sample pages and public repositories documented in [Validation and benchmarks](16-validation-and-benchmarks.md).
|
|
4
|
+
|
|
5
|
+
## Find your situation
|
|
6
|
+
|
|
7
|
+
| If this sounds like you | Read |
|
|
8
|
+
|---|---|
|
|
9
|
+
| "We launch Friday and nobody has checked accessibility." | [1. The week-before-launch check](#1-the-week-before-launch-check) |
|
|
10
|
+
| "Every sprint someone breaks something we already fixed." | [2. Stop regressions in pull requests](#2-stop-regressions-in-pull-requests) |
|
|
11
|
+
| "I must give a client a report they can actually read." | [3. A report a client can read](#3-a-report-a-client-can-read) |
|
|
12
|
+
| "The old site has hundreds of findings. Where do I even start?" | [4. A legacy site with hundreds of findings](#4-a-legacy-site-with-hundreds-of-findings) |
|
|
13
|
+
| "Our colours and spacing are a mess across 40 stylesheets." | [5. Taming a design system](#5-taming-a-design-system) |
|
|
14
|
+
| "I use Claude Code, Cursor or Copilot and want it to do this for me." | [6. Let your AI IDE run the review](#6-let-your-ai-ide-run-the-review) |
|
|
15
|
+
| "I need runtime proof, not only source checks, before sign-off." | [7. Before a sign-off: add a real browser](#7-before-a-sign-off-add-a-real-browser) |
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. The week-before-launch check
|
|
22
|
+
|
|
23
|
+
> **Note:** Priya is a front-end developer. The marketing site ships Friday. Nobody has looked at accessibility and she has one afternoon.
|
|
24
|
+
|
|
25
|
+
**Goal:** find and fix the few problems that block the most people, then prove it.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx rachnasutra audit .
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
She opens `rachnasutra-reports/latest.html`, reads **Fix these first**, and sees the five confirmed problems with file and line. On the sample page those are a missing `alt`, a viewport that blocks zoom, an icon button with no name, a clickable `div`, and a removed focus outline.
|
|
32
|
+
|
|
33
|
+
She fixes them in about forty minutes, then proves it:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx rachnasutra verify --report rachnasutra-reports/latest.json .
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
Baseline 22 -> current 18
|
|
41
|
+
Resolved: 4 Remaining: 18 Introduced: 0
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Four fixed, nothing new broken. She saves `latest.md` into the pull request description so the reviewer sees what changed and why.
|
|
45
|
+
|
|
46
|
+
**What she does not claim:** "accessible". She schedules a keyboard pass and a screen-reader pass for Thursday, using the Limitations list in the report as her checklist.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 2. Stop regressions in pull requests
|
|
51
|
+
|
|
52
|
+
> **Note:** Marcus leads a team of eight. Accessibility fixes keep being undone by unrelated changes.
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
**Goal:** make a regression impossible to merge without anyone having to remember.
|
|
57
|
+
|
|
58
|
+
Add one workflow:
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
name: UI audit
|
|
62
|
+
on: [pull_request]
|
|
63
|
+
permissions:
|
|
64
|
+
contents: read
|
|
65
|
+
jobs:
|
|
66
|
+
rachnasutra:
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v7
|
|
70
|
+
- uses: actions/setup-node@v7
|
|
71
|
+
with:
|
|
72
|
+
node-version: 22
|
|
73
|
+
- run: npx --yes rachnasutra ci .
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`ci` exits `1` when it finds a confirmed high or critical problem, and the job goes red:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
$ npx rachnasutra ci fixtures/intentionally-broken-ui -> exit 1
|
|
80
|
+
$ npx rachnasutra ci fixtures/good-ui -> exit 0
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**The legacy trap.** An old codebase already has findings, so the gate would fail on day one. Marcus instead blocks only **new** findings. On `main` he stores the report as a build artifact; on pull requests he downloads it and runs:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx rachnasutra verify --report baseline/latest.json .
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`verify` exits `4` only when the change **introduces** findings. Old debt is tracked; new debt is refused.
|
|
90
|
+
|
|
91
|
+
**Bonus:** `npx rachnasutra export --format sarif . > rachnasutra.sarif` produces SARIF 2.1.0 that GitHub code scanning displays as inline annotations.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 3. A report a client can read
|
|
96
|
+
|
|
97
|
+
> **Note:** Aisha runs a small agency. Her client is a non-technical marketing director who asked, "Is our new site accessible?"
|
|
98
|
+
|
|
99
|
+
**Goal:** give an honest, readable answer without legal overreach.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npx rachnasutra audit ./site --out client-report --format html,md
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
She sends `client-report/latest.html`. It opens in any browser, needs nothing installed, and starts with four plain sentences that explain what confirmed and review required mean. Its coverage table says plainly what was **not** tested.
|
|
106
|
+
|
|
107
|
+
She adds one paragraph of her own:
|
|
108
|
+
|
|
109
|
+
> The automated review found 4 confirmed problems that we are fixing this week. Automated tools cover only part of accessibility, so we will also test with a keyboard and a screen reader before launch. This report is not a conformance certificate.
|
|
110
|
+
|
|
111
|
+
**Show progress, not just a snapshot.** After each fix round she saves the JSON report in a folder and runs:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx rachnasutra history client-report/history
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`history` writes `history.md` and `history.html` with finding counts per saved report, so the client sees the line going down.
|
|
118
|
+
|
|
119
|
+
> **Important:** Never present the report as a VPAT, a WCAG certificate, or legal advice. See [Legal and compliance](09-legal-and-compliance.md).
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 4. A legacy site with hundreds of findings
|
|
124
|
+
|
|
125
|
+
> **Note:** Daniel inherited a ten-year-old documentation site. The first audit reports hundreds of findings and the team panics.
|
|
126
|
+
|
|
127
|
+

|
|
128
|
+
|
|
129
|
+
**Goal:** turn an overwhelming list into a short, ordered plan.
|
|
130
|
+
|
|
131
|
+
1. **Cut the noise you will never fix.** Vendored code and generated files do not count. Create `rachnasutra.config.json`:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"exclude": ["vendor", "public/legacy", "docs/examples"],
|
|
136
|
+
"disableRules": ["RS-CONT-002"],
|
|
137
|
+
"failOn": "high"
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Check it:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx rachnasutra config validate .
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
2. **Work by severity, not by file.** Confirmed high findings first: they are measured or deterministic, so they are almost never false alarms.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npx rachnasutra audit .
|
|
151
|
+
npx rachnasutra plan-fixes --report rachnasutra-reports/latest.json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
3. **Ratchet.** After each batch of fixes run `verify --report`. The "Resolved" number goes up and "Introduced" stays at zero. Save each JSON so `history` can chart the trend.
|
|
155
|
+
|
|
156
|
+
4. **Know your false positives.** Many "findings" on a docs site are deliberate demo markup: a button with no label shown as a CSS example, placeholder text in a screenshot mock. Mark rules you decide to ignore in `disableRules` and write down why in your team notes.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 5. Taming a design system
|
|
161
|
+
|
|
162
|
+
> **Note:** Sofia maintains the design system. Forty stylesheets define colours slightly differently and nobody knows how many greys exist.
|
|
163
|
+
|
|
164
|
+
**Goal:** get a numbered inventory, then a migration plan.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
npx rachnasutra design-system inspect .
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
On the good sample:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
CSS custom properties: 4
|
|
174
|
+
Literal colour share (literal vs var()): 56%
|
|
175
|
+
Top colours: #0b5cadx2, #ffffffx2, #1d1b19x1
|
|
176
|
+
Font sizes: 1remx1
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Read it as: only 4 CSS variables exist and 56% of colour usage is still a literal hex value, so changing the brand colour means editing many files. The command also writes `tokens.md` and `tokens.html` to `rachnasutra-reports/` for the design review.
|
|
180
|
+
|
|
181
|
+
Rule `RS-TOK-001` fires when a project has twelve or more distinct hard-coded colours and no custom properties at all. Sofia uses the inventory to:
|
|
182
|
+
|
|
183
|
+
- group near-duplicate colours into one token each,
|
|
184
|
+
- check each text and background token pair for contrast,
|
|
185
|
+
- plan the rename with a deprecation path so nothing breaks.
|
|
186
|
+
|
|
187
|
+
The `rachnasutra-tokens` skill ([Skills and agents](07-skills-and-agents.md)) can draft the migration plan from the inventory.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## 6. Let your AI IDE run the review
|
|
192
|
+
|
|
193
|
+
> **Note:** Kenji uses Claude Code all day and would rather ask than memorise commands.
|
|
194
|
+
|
|
195
|
+

|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
npx rachnasutra skills install --host claude --target . --dry-run
|
|
199
|
+
npx rachnasutra skills install --host claude --target .
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The dry run lists exactly which files will be created. Then, inside the IDE:
|
|
203
|
+
|
|
204
|
+
> Use rachnasutra-prime to review this project's UI. Stay read-only.
|
|
205
|
+
|
|
206
|
+
Prime states its scope ("read-only; browser and screenshots not available"), runs `rachnasutra audit` as evidence, picks only the specialists the task needs, and presents ranked findings with file and line. Nothing is edited until Kenji approves a plan, at which point `rachnasutra-canvas` makes small diffs and `rachnasutra-verify` proves the result.
|
|
207
|
+
|
|
208
|
+
A worked example of such a session, with the real CLI output, is in [examples/prime-session-example.md](../../examples/prime-session-example.md).
|
|
209
|
+
|
|
210
|
+
> **Note:** The skill files are validated by tests, but loading them inside each live IDE has not been verified yet. See [Host smoke tests](17-host-smoke-tests.md) for the protocol and the current status.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 7. Before a sign-off: add a real browser
|
|
215
|
+
|
|
216
|
+
> **Note:** Elena is the accessibility lead. The static report is clean, but the release needs runtime evidence.
|
|
217
|
+
|
|
218
|
+
Static rules read source text. They cannot see a colour that only appears after the cascade, or an element a script adds. Browser mode adds that evidence:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
npm install --save-dev playwright
|
|
222
|
+
npx rachnasutra audit --mode browser .
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
It opens the page in a real browser (Microsoft Edge or Chromium), saves a screenshot, runs axe-core and a Lighthouse lab run, then runs the static audit. It exits with code `3` if Playwright is not installed, and never invents a result.
|
|
226
|
+
|
|
227
|
+
To catch visual surprises between releases:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
npx rachnasutra visual baseline .
|
|
231
|
+
# ...change something...
|
|
232
|
+
npx rachnasutra visual compare .
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
`visual compare` screenshots again and reports whether the bytes differ from the saved baseline. It tells you **that** something changed, not whether the change is good.
|
|
236
|
+
|
|
237
|
+
Elena ends with the manual list: keyboard-only walkthrough, screen reader, 200% zoom and 320 px reflow. Tools find a portion of issues; people find the rest.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## The pattern behind every scenario
|
|
242
|
+
|
|
243
|
+

|
|
244
|
+
|
|
245
|
+
| Principle | What it means for you |
|
|
246
|
+
|---|---|
|
|
247
|
+
| Evidence first | Every finding has a file, a line and an excerpt, so you can check it in seconds |
|
|
248
|
+
| Honest coverage | The report says what was not tested; nothing unrun is shown as a pass |
|
|
249
|
+
| Safe by default | Source files are never changed, nothing leaves your machine, secrets are redacted |
|
|
250
|
+
| Proof, not promises | `verify` shows resolved, remaining and introduced findings |
|
|
251
|
+
| People still matter | The tool finds a portion of problems; manual testing finds the rest |
|
package/llms.txt
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
## Start here
|
|
6
6
|
- [Live documentation](https://shahvatsalofficial.github.io/rachnasutra/): searchable HTML site
|
|
7
7
|
- [README](README.md): overview, install, CLI, proof, FAQ, limits
|
|
8
|
+
- [Five-minute tour](documents/rachnasutra/18-quick-tour.md): run, read, fix, verify with real output
|
|
9
|
+
- [Real-world scenarios](documents/rachnasutra/19-real-world-scenarios.md): launch week, PR gate, client report, legacy site, design system, AI IDE, browser sign-off
|
|
8
10
|
- [Documentation overview](documents/rachnasutra/00-overview.md): index of the full documentation set
|
|
9
11
|
- [Executive summary](documents/rachnasutra/01-executive-summary.md): what it is, what is proven, what is not claimed
|
|
10
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rachnasutra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "RachnaSutra AI: open-source UI/UX design, accessibility and responsive audit agent skills for Claude Code, Cursor, Codex, Copilot and Gemini CLI, plus an evidence-first, keyless CLI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-ux",
|
|
@@ -78,7 +78,9 @@
|
|
|
78
78
|
"samples": "npm run build && node dist/cli.js audit fixtures/intentionally-broken-ui --format json,md,html,sarif --out samples/broken-ui && node dist/cli.js audit fixtures/good-ui --format json,md,html --out samples/good-ui && node scripts/sanitize-paths.mjs samples",
|
|
79
79
|
"examples": "npm run build && node scripts/gen-rule-examples.mjs",
|
|
80
80
|
"prepare": "npm run build",
|
|
81
|
-
"prepublishOnly": "npm test && npm run verify"
|
|
81
|
+
"prepublishOnly": "npm test && npm run verify",
|
|
82
|
+
"diagrams": "npm run build && node scripts/gen-diagrams.mjs",
|
|
83
|
+
"images": "node scripts/capture-images.mjs"
|
|
82
84
|
},
|
|
83
85
|
"devDependencies": {
|
|
84
86
|
"@axe-core/playwright": "^4.11.0",
|