rachnasutra 0.4.0 → 0.5.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/CHANGELOG.md +22 -2
- package/CITATION.cff +2 -2
- package/Dockerfile +9 -0
- package/README.gu.md +35 -0
- package/README.md +14 -12
- package/ROADMAP.md +8 -1
- package/case-studies/clean-blog/fixes.diff +152 -152
- package/dist/audit.js +24 -6
- package/dist/browser.js +147 -0
- package/dist/cli.js +117 -17
- package/dist/report.js +23 -0
- package/dist/rules.js +176 -0
- package/dist/tw-color.js +36 -0
- package/docs/cli-reference.md +1 -1
- package/docs/compatibility.md +1 -1
- package/docs/status.md +13 -6
- package/documents/rachnasutra/00-overview.md +4 -4
- package/documents/rachnasutra/02-functional-specification.md +6 -6
- package/documents/rachnasutra/03-architecture.md +1 -1
- package/documents/rachnasutra/04-technical-reference.md +2 -2
- package/documents/rachnasutra/05-user-guide.md +1 -1
- package/documents/rachnasutra/06-audit-rules-reference.md +46 -1
- package/documents/rachnasutra/10-testing-and-evidence.md +22 -21
- package/documents/rachnasutra/11-deployment-and-ci.md +26 -6
- package/documents/rachnasutra/12-roadmap-and-status.md +13 -11
- package/documents/rachnasutra/13-maintainer-handbook.md +1 -1
- package/documents/rachnasutra/15-rule-examples.md +456 -0
- package/documents/rachnasutra/16-validation-and-benchmarks.md +3 -3
- package/examples/prime-session-example.md +2 -2
- package/fixtures/rule-cases.mjs +85 -70
- package/llms.txt +4 -3
- package/package.json +7 -2
- package/samples/broken-ui/latest.html +42 -30
- package/samples/broken-ui/latest.json +39 -14
- package/samples/broken-ui/latest.md +24 -13
- package/samples/broken-ui/latest.sarif +48 -10
- package/samples/good-ui/latest.html +1 -1
- package/samples/good-ui/latest.json +3 -3
- package/samples/good-ui/latest.md +2 -2
package/docs/status.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Implementation status
|
|
2
2
|
|
|
3
|
-
Last updated for 0.
|
|
3
|
+
Last updated for 0.5.1. Statuses: **implemented** (code + test), **adapter** (files follow documented layout, not smoke-tested in the live host), **planned** (no code), **not-available** (CLI reports it honestly).
|
|
4
4
|
|
|
5
5
|
| Area | Status | Notes |
|
|
6
6
|
|---|---|---|
|
|
7
|
-
| Static audit CLI,
|
|
7
|
+
| Static audit CLI, 33 rules | implemented | 140 tests; failing and passing case per rule in `fixtures/rule-cases.mjs` |
|
|
8
8
|
| Validation: ACT, axe-core, 12 real repositories, case study | implemented | `benchmarks/`, `documents/rachnasutra/16-validation-and-benchmarks.md` |
|
|
9
9
|
| Live host smoke tests | not done | `documents/rachnasutra/17-host-smoke-tests.md` |
|
|
10
10
|
| Measured contrast (literal CSS pairs, inline styles) | implemented | cascade, gradients, images not resolved |
|
|
@@ -17,8 +17,15 @@ Last updated for 0.2.0. Statuses: **implemented** (code + test), **adapter** (fi
|
|
|
17
17
|
| Claude Code, Cursor, Codex, Copilot hosts | adapter | not smoke-tested in live hosts |
|
|
18
18
|
| Gemini CLI host | experimental | path unconfirmed |
|
|
19
19
|
| Windsurf, Kiro, VS Code-specific adapters | planned | use generic Agent Skills copy |
|
|
20
|
-
| Browser audit (Playwright), axe-core, Lighthouse |
|
|
21
|
-
| Screenshot capture, visual baseline/compare |
|
|
22
|
-
|
|
|
23
|
-
|
|
|
20
|
+
| Browser audit (Playwright), axe-core, Lighthouse | implemented when Playwright is installed | `audit --mode browser` launches Edge or Chromium, writes `screenshot.png`, runs axe-core, and tries Lighthouse. Exit 3 only when the browser cannot start |
|
|
21
|
+
| Screenshot capture, visual baseline/compare | implemented when Playwright is installed | `visual baseline` and `visual compare`. Compare is byte-for-byte, not a perceptual diff |
|
|
22
|
+
| `history` over saved JSON reports | implemented | Counts only. Not a screenshot diff |
|
|
23
|
+
| Doctor lines for browser and visual | implemented | Printed as NOTE, not OK. Exit code stays 0 |
|
|
24
|
+
| `failOn: confirmed-critical` in config | implemented | Means confirmed high or confirmed critical. The name is historical |
|
|
25
|
+
| Docs page title | implemented | No longer repeats "RachnaSutra AI Documentation" |
|
|
26
|
+
| Dockerfile | implemented | `node:22-bookworm-slim`, CLI entrypoint. Not a browser image. GitHub Actions builds it on Ubuntu |
|
|
27
|
+
| Gujarati README | implemented | `README.gu.md`, short. Full docs stay English |
|
|
28
|
+
| Tailwind named colours, CSS modules, styled-components | implemented for a fixed palette | `text-gray-400` / `bg-white` and the scales in `src/tw-color.ts`. `.module.css` is normal CSS. `styled.x` and `css` template strings are extracted. Other CSS-in-JS is not |
|
|
29
|
+
| Report viewer dashboard | partial | self-contained HTML report, plus `history` counts |
|
|
30
|
+
| Server mode | planned | The Dockerfile runs the CLI. There is no long-running server |
|
|
24
31
|
| Spec folders (`packages/`, `workflows/`, `rules/`, `adapters/`) | deliberately not created | single-package layout until needed; no empty modules |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
RachnaSutra AI is an open-source UI/UX design engineering and auditing agent. It ships 13 portable Agent Skills, led by **RachnaSutra Prime**, and a keyless command-line tool that audits front-end source code for accessibility, responsive design, design-system, content and performance risks. This documentation set is written for four audiences: decision makers, product and design leads, engineers, and open-source contributors.
|
|
4
4
|
|
|
5
|
-
> **Note:** This documentation describes version 0.
|
|
5
|
+
> **Note:** This documentation describes version 0.5.1. The same pages are live at <https://shahvatsalofficial.github.io/rachnasutra/>. Every capability is labelled **implemented**, **adapter**, **planned** or **not-available**. Nothing planned is described as shipped. Browser mode runs when Playwright is installed. Live-host checks are not shipped.
|
|
6
6
|
|
|
7
7
|
## Start here
|
|
8
8
|
|
|
@@ -43,9 +43,9 @@ RachnaSutra AI is an open-source UI/UX design engineering and auditing agent. It
|
|
|
43
43
|
|
|
44
44
|
<div class="cards">
|
|
45
45
|
<div class="card"><b>13</b><span>Agent Skills, led by RachnaSutra Prime</span></div>
|
|
46
|
-
<div class="card"><b>
|
|
46
|
+
<div class="card"><b>33</b><span>deterministic static audit rules</span></div>
|
|
47
47
|
<div class="card"><b>4</b><span>report formats: JSON, Markdown, HTML, SARIF 2.1.0</span></div>
|
|
48
|
-
<div class="card"><b>
|
|
48
|
+
<div class="card"><b>140/140</b><span>automated tests passing (see evidence)</span></div>
|
|
49
49
|
<div class="card"><b>154</b><span>W3C ACT test cases benchmarked, results published including weaknesses</span></div>
|
|
50
50
|
<div class="card"><b>1,360</b><span>files from 12 public repositories audited as real-world evidence</span></div>
|
|
51
51
|
<div class="card"><b>0</b><span>runtime dependencies, no network, no telemetry</span></div>
|
|
@@ -54,7 +54,7 @@ RachnaSutra AI is an open-source UI/UX design engineering and auditing agent. It
|
|
|
54
54
|
|
|
55
55
|
## How the documentation is built
|
|
56
56
|
|
|
57
|
-
The Markdown files in `documents/rachnasutra/` are the source of truth. Run `node scripts/build-docs.mjs` to regenerate the HTML site in `documents/rachnasutra/html/`. The HTML is self-contained, works offline, supports light and dark themes, keyboard navigation, search and printing
|
|
57
|
+
The Markdown files in `documents/rachnasutra/` are the source of truth. Run `node scripts/build-docs.mjs` to regenerate the HTML site in `documents/rachnasutra/html/`. That folder is published to [shahvatsalofficial.github.io/rachnasutra](https://shahvatsalofficial.github.io/rachnasutra/). The HTML is self-contained, works offline, supports light and dark themes, keyboard navigation, search and printing. See the [Maintainer handbook](13-maintainer-handbook.md).
|
|
58
58
|
|
|
59
59
|
## Document conventions
|
|
60
60
|
|
|
@@ -34,11 +34,11 @@ These personas are **assumed**, not the result of user research.
|
|
|
34
34
|
| FR-08 | Re-audit and compare with a baseline by fingerprint (resolved, remaining, introduced) | implemented | fix verification test |
|
|
35
35
|
| FR-09 | Token inventory: custom properties, colours, font sizes, spacing, radii | implemented | CLI transcript |
|
|
36
36
|
| FR-10 | Install, uninstall and dry-run skills for five hosts with hash tracking and conflict handling | implemented | install tests |
|
|
37
|
-
| FR-11 |
|
|
37
|
+
| FR-11 | Run a browser audit when Playwright is installed. Exit 3 with no invented result when it is not | implemented | CLI test |
|
|
38
38
|
| FR-12 | Stable exit codes for CI | implemented | CLI test |
|
|
39
|
-
| FR-13 | Run offline with no model and no API key | implemented |
|
|
39
|
+
| FR-13 | Run the default audit offline with no model and no API key | implemented | default audit does not open a network connection. Browser mode uses localhost only |
|
|
40
40
|
| FR-14 | Thirteen skills with required sections and valid frontmatter | implemented | `rachnasutra verify` |
|
|
41
|
-
| FR-15 | Browser audit with
|
|
41
|
+
| FR-15 | Browser audit with a screenshot and axe-core | implemented when Playwright is installed | keyboard and screen-reader paths stay manual |
|
|
42
42
|
|
|
43
43
|
## Non-functional requirements
|
|
44
44
|
|
|
@@ -102,12 +102,12 @@ Each finding has: ID (`RS-0001` style), rule ID, category, title, severity, conf
|
|
|
102
102
|
| Criterion | Result |
|
|
103
103
|
|---|---|
|
|
104
104
|
| Clean install works without an API key | Met: no runtime dependencies, no key code |
|
|
105
|
-
| `doctor` states what is available and unavailable | Met:
|
|
106
|
-
| Static audit on a flawed fixture is deterministic and evidenced | Met:
|
|
105
|
+
| `doctor` states what is available and unavailable | Met: static audit can pass or fail. Browser and visual print NOTE because doctor does not launch a browser |
|
|
106
|
+
| Static audit on a flawed fixture is deterministic and evidenced | Met: 22 findings, identical across runs |
|
|
107
107
|
| JSON, Markdown, HTML reports validate and show coverage | Met: JSON validated against the contract in tests; coverage in every format |
|
|
108
108
|
| Generated skill files are valid | Met: 13 of 13 pass `verify` |
|
|
109
109
|
| No source changes or network use in default mode | Met: test asserts files unchanged and no reports directory created |
|
|
110
|
-
| Unit, integration and security tests pass | Met:
|
|
110
|
+
| Unit, integration and security tests pass | Met: 140 of 140 on the recorded run |
|
|
111
111
|
| README, contributor docs, security policy, licence present | Met |
|
|
112
112
|
| Accurate creator attribution, no fake endorsements | Met |
|
|
113
113
|
| One example reproduces a finding and its fix verification | Met: fix verification test and user guide journey 2 |
|
|
@@ -50,7 +50,7 @@ RachnaSutra AI is a single TypeScript package with no runtime dependencies. It c
|
|
|
50
50
|
|---|---|---|
|
|
51
51
|
| CLI | `src/cli.ts` | Argument parsing, command dispatch, exit codes, output |
|
|
52
52
|
| Audit orchestrator | `src/audit.ts` | Load config, walk files, run rules, sort, dedupe, fingerprint, assemble coverage and tokens |
|
|
53
|
-
| Rules | `src/rules.ts` | All
|
|
53
|
+
| Rules | `src/rules.ts` | All 33 rules and the rule catalogue |
|
|
54
54
|
| Colour maths | `src/color.ts` | Colour parsing and WCAG contrast ratio |
|
|
55
55
|
| Token inspector | `src/tokens.ts` | Counts of custom properties, colours, font sizes, spacing, radii |
|
|
56
56
|
| File system | `src/fsutil.ts` | Bounded, symlink-safe walk; `safeJoin`; text reading |
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
| Language | TypeScript 5.9 compiled to ES2022 modules |
|
|
8
8
|
| Runtime | Node.js 20 or newer |
|
|
9
9
|
| Runtime dependencies | None |
|
|
10
|
-
| Dev dependencies | `typescript`, `@types/node` |
|
|
10
|
+
| Dev dependencies | `typescript`, `@types/node`, and optional browser tools `playwright`, `@axe-core/playwright`, `lighthouse` |
|
|
11
11
|
| Entry point | `dist/cli.js` (bin `rachnasutra`) |
|
|
12
|
-
| Tests | `node --test` (runs `test/*.test.mjs`);
|
|
12
|
+
| Tests | `node --test` (runs `test/*.test.mjs`); 140 tests |
|
|
13
13
|
| Build | `npm run build` (`tsc`) |
|
|
14
14
|
|
|
15
15
|
## Result model
|
|
@@ -28,7 +28,7 @@ node dist/cli.js audit fixtures/intentionally-broken-ui
|
|
|
28
28
|
## Understand the console summary
|
|
29
29
|
|
|
30
30
|
```text
|
|
31
|
-
Scanned 2 file(s).
|
|
31
|
+
Scanned 2 file(s). 22 finding(s): 0 critical, 8 high, 8 medium, 5 low, 1 info.
|
|
32
32
|
RS-0001 [high/confirmed] RS-A11Y-001 index.html:11 - Image has no alt attribute
|
|
33
33
|
```
|
|
34
34
|
|
|
@@ -10,7 +10,7 @@ Each rule lists the trigger, the reason it matters, how to fix it, and what it c
|
|
|
10
10
|
|
|
11
11
|
### RS-A11Y-001 Image has no alt attribute
|
|
12
12
|
|
|
13
|
-
- **Trigger:** an `<img>` with no `alt` attribute and no prop spread, that is not hidden (`aria-hidden`, `hidden`, `display:none`), not presentational (`role="presentation"` or `none`) and has no `title`, `aria-label` or `aria-labelledby`.
|
|
13
|
+
- **Trigger:** an `<img>` with no `alt` attribute and no prop spread, that is not hidden (`aria-hidden`, `hidden`, `display:none`), not presentational (`role="presentation"` or `none`) and has no `title`, `aria-label` or `aria-labelledby`. The same rule fires for `role="img"` on a `div`, `span`, `svg`, `i` or `figure` when that element has no accessible name.
|
|
14
14
|
- **Why:** screen-reader users lose the information the image carries (1.1.1).
|
|
15
15
|
- **Fix:** add meaningful alt text, or `alt=""` if purely decorative.
|
|
16
16
|
- **Cannot see:** whether alt text is meaningful. **Confidence:** high.
|
|
@@ -101,6 +101,51 @@ Each rule lists the trigger, the reason it matters, how to fix it, and what it c
|
|
|
101
101
|
- **Why:** users cannot skip to primary content (1.3.1, 2.4.1).
|
|
102
102
|
- **Cannot see:** layouts that inject `<main>`. **Confidence:** medium (review).
|
|
103
103
|
|
|
104
|
+
### RS-A11Y-016 Duplicate id
|
|
105
|
+
|
|
106
|
+
- **Trigger:** the same `id` value appears twice in one file, outside code samples and template placeholders.
|
|
107
|
+
- **Why:** labels and `aria-labelledby` can point at the wrong element (1.3.1, 4.1.2). **Confidence:** high.
|
|
108
|
+
- **Cannot see:** the same id split across included files.
|
|
109
|
+
|
|
110
|
+
### RS-A11Y-017 Frame has no title
|
|
111
|
+
|
|
112
|
+
- **Trigger:** an `<iframe>` with no non-empty `title`, `aria-label` or `aria-labelledby`, and no prop spread.
|
|
113
|
+
- **Why:** the frame is announced with no name (4.1.2, 2.4.1). **Confidence:** high.
|
|
114
|
+
|
|
115
|
+
### RS-A11Y-018 Navigation with no skip link
|
|
116
|
+
|
|
117
|
+
- **Trigger:** an HTML document contains `<nav>` and no `href` that starts with `#`.
|
|
118
|
+
- **Why:** keyboard users cannot skip repeated navigation (2.4.1). **Confidence:** medium (review).
|
|
119
|
+
- **Cannot see:** a skip link that lives in another layout file.
|
|
120
|
+
|
|
121
|
+
### RS-A11Y-019 Email or telephone field has no autocomplete
|
|
122
|
+
|
|
123
|
+
- **Trigger:** `input type="email"` or `type="tel"` with no `autocomplete` attribute.
|
|
124
|
+
- **Why:** browsers cannot identify the input purpose (1.3.5). **Confidence:** medium (review).
|
|
125
|
+
- **Cannot see:** other personal fields such as a name typed as `type="text"`.
|
|
126
|
+
|
|
127
|
+
### RS-A11Y-020 Heading has no text
|
|
128
|
+
|
|
129
|
+
- **Trigger:** an `h1`–`h6` whose content has no text and no accessible name.
|
|
130
|
+
- **Why:** the heading outline has an empty entry (2.4.6, 1.3.1). **Confidence:** medium (review).
|
|
131
|
+
|
|
132
|
+
### RS-A11Y-021 Control border contrast below 3:1
|
|
133
|
+
|
|
134
|
+
- **Trigger:** a button, link or form-control selector with a literal border colour and a literal background in the same rule, ratio under 3:1.
|
|
135
|
+
- **Why:** the control edge can disappear (1.4.11). **Confidence:** medium (review).
|
|
136
|
+
- **Cannot see:** focus rings, icons, or colours from another rule.
|
|
137
|
+
|
|
138
|
+
### RS-A11Y-022 Empty lang on a part of the page
|
|
139
|
+
|
|
140
|
+
- **Trigger:** an element other than `<html>` has `lang=""`.
|
|
141
|
+
- **Why:** that passage can be pronounced with the wrong language (3.1.2). **Confidence:** high.
|
|
142
|
+
- **Cannot see:** a missing `lang` on a foreign phrase. Only an empty value is flagged. The page language is RS-A11Y-002.
|
|
143
|
+
|
|
144
|
+
### RS-A11Y-013 also reads utility colours
|
|
145
|
+
|
|
146
|
+
- **Trigger, in addition to CSS colour pairs:** one `class` or `className` with both `text-[#hex]` and `bg-[#hex]`, or a JSX `style={{ color, background }}` object with two literal colours.
|
|
147
|
+
- **Cannot see:** Tailwind named colours (`text-gray-400`), opacity modifiers, CSS variables and spreads. **Confidence:** medium (review).
|
|
148
|
+
|
|
104
149
|
## Responsive
|
|
105
150
|
|
|
106
151
|
### RS-RESP-001 No viewport meta tag
|
|
@@ -7,18 +7,18 @@ This page contains the recorded results of the automated test suite and sample r
|
|
|
7
7
|
| Item | Value |
|
|
8
8
|
|---|---|
|
|
9
9
|
| Command | `npm test` (build, then `node --test test/`) |
|
|
10
|
-
| Node.js | v24
|
|
10
|
+
| Node.js | v24 on this machine. CI also runs Node 20, 22, 24 and 26 |
|
|
11
11
|
| Operating system | Windows 11 (Git Bash) |
|
|
12
|
-
| Tests |
|
|
13
|
-
| Passed |
|
|
12
|
+
| Tests | 140 |
|
|
13
|
+
| Passed | 140 |
|
|
14
14
|
| Failed | 0 |
|
|
15
15
|
| Skipped | 0 |
|
|
16
|
-
| Duration | about
|
|
16
|
+
| Duration | about 34 seconds |
|
|
17
17
|
| Raw output | [test-results.txt](evidence/test-results.txt) |
|
|
18
18
|
|
|
19
19
|
Typecheck (`npm run typecheck`) and package verification (`node dist/cli.js verify`, 24 PASS lines, 0 FAIL) were also run clean on the same commit.
|
|
20
20
|
|
|
21
|
-
> **Note:** Locally the suite was run on Windows with Node 20, 22, 24 and 26. The blocking CI matrix is Windows and Linux on Node 20, 22, 24 and 26. macOS
|
|
21
|
+
> **Note:** Locally the suite was run on Windows with Node 20, 22, 24 and 26. The blocking CI matrix is Windows and Linux on Node 20, 22, 24 and 26. macOS is not in CI. GitHub queued `macos-15` for 15 minutes on run 42096695892, then cancelled both jobs before any step. That is a missing runner, not a failed test. No macOS result is claimed.
|
|
22
22
|
|
|
23
23
|
## What each test proves
|
|
24
24
|
|
|
@@ -49,13 +49,13 @@ Typecheck (`npm run typecheck`) and package verification (`node dist/cli.js veri
|
|
|
49
49
|
|
|
50
50
|
## Per-rule tests (added in 0.2.0)
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
The rule tests come from `fixtures/rule-cases.mjs`: for each of the 33 rules a failing input (the rule must fire, with file and line evidence) and a passing input (the rule must stay silent), plus guard inputs that look wrong but are correct, including regressions found by the benchmarks. The same inputs generate [Rule examples](15-rule-examples.md). Independent validation beyond the author's own fixtures is on [Validation and benchmarks](16-validation-and-benchmarks.md).
|
|
53
53
|
|
|
54
54
|
## Sample run 1: intentionally broken fixture
|
|
55
55
|
|
|
56
56
|
Command: `node dist/cli.js audit fixtures/intentionally-broken-ui`
|
|
57
57
|
|
|
58
|
-
Result: **
|
|
58
|
+
Result: **22 findings** (8 high, 8 medium, 5 low, 1 info) in 2 files.
|
|
59
59
|
|
|
60
60
|
| ID | Severity / status | Rule | Location | Title |
|
|
61
61
|
|---|---|---|---|---|
|
|
@@ -69,17 +69,18 @@ Result: **21 findings** (8 high, 7 medium, 5 low, 1 info) in 2 files.
|
|
|
69
69
|
| RS-0008 | high / confirmed | RS-A11Y-013 | styles.css:1 | Text contrast 2.85:1 is below 4.5:1 (#999999 on #ffffff) |
|
|
70
70
|
| RS-0009 | medium / confirmed | RS-A11Y-002 | index.html:2 | Document has no lang attribute |
|
|
71
71
|
| RS-0010 | medium / confirmed | RS-A11Y-006 | index.html:17 | Positive tabindex overrides natural focus order |
|
|
72
|
-
| RS-0011 | medium / confirmed | RS-A11Y-008 | index.html:
|
|
72
|
+
| RS-0011 | medium / confirmed | RS-A11Y-008 | index.html:2 | Document has no title |
|
|
73
73
|
| RS-0012 | medium / review-required | RS-A11Y-014 | styles.css:3 | Interactive target smaller than 24x24 CSS px |
|
|
74
|
-
| RS-0013 | medium /
|
|
75
|
-
| RS-0014 | medium /
|
|
76
|
-
| RS-0015 | medium / review-required | RS-RESP-
|
|
77
|
-
| RS-0016 |
|
|
78
|
-
| RS-0017 | low / review-required | RS-A11Y-
|
|
79
|
-
| RS-0018 | low /
|
|
80
|
-
| RS-0019 | low /
|
|
81
|
-
| RS-0020 | low /
|
|
82
|
-
| RS-0021 |
|
|
74
|
+
| RS-0013 | medium / review-required | RS-A11Y-019 | index.html:16 | email field has no autocomplete attribute |
|
|
75
|
+
| RS-0014 | medium / confirmed | RS-MOT-001 | styles.css:6 | No prefers-reduced-motion handling |
|
|
76
|
+
| RS-0015 | medium / review-required | RS-RESP-002 | styles.css:1 | Fixed width 1200px can overflow narrow viewports |
|
|
77
|
+
| RS-0016 | medium / review-required | RS-RESP-003 | styles.css:1 | No responsive CSS found |
|
|
78
|
+
| RS-0017 | low / review-required | RS-A11Y-009 | index.html:10 | Heading level skips from h1 to h3 |
|
|
79
|
+
| RS-0018 | low / review-required | RS-A11Y-015 | index.html:8 | No main landmark |
|
|
80
|
+
| RS-0019 | low / confirmed | RS-CONT-001 | index.html:14 | Vague link text "click here" |
|
|
81
|
+
| RS-0020 | low / review-required | RS-PERF-001 | index.html:11 | Image has no explicit width and height |
|
|
82
|
+
| RS-0021 | low / confirmed | RS-VIS-001 | styles.css:4 | Very small text (10px) |
|
|
83
|
+
| RS-0022 | info / review-required | RS-TRUST-001 | index.html:19 | Urgency or scarcity wording needs review |
|
|
83
84
|
|
|
84
85
|
Sample reports: [JSON](samples/broken-ui/latest.json), [Markdown](samples/broken-ui/latest.md), [HTML](samples/broken-ui/latest.html), [SARIF](samples/broken-ui/latest.sarif).
|
|
85
86
|
|
|
@@ -91,11 +92,11 @@ Result: **0 findings**. The fixture uses a language attribute, title, viewport,
|
|
|
91
92
|
|
|
92
93
|
A zero-finding result is not a conformance statement. It shows only that these static rules do not flag this input. Sample reports: [JSON](samples/good-ui/latest.json), [Markdown](samples/good-ui/latest.md), [HTML](samples/good-ui/latest.html).
|
|
93
94
|
|
|
94
|
-
## Sample run 3:
|
|
95
|
+
## Sample run 3: browser mode
|
|
95
96
|
|
|
96
|
-
Command: `node dist/cli.js
|
|
97
|
+
Command: `node dist/cli.js audit fixtures/intentionally-broken-ui --mode browser`
|
|
97
98
|
|
|
98
|
-
|
|
99
|
+
When Playwright and Edge or Chromium are installed, this writes `screenshot.png`, adds axe-core findings, and prints Lighthouse lab scores. Exit code 3 only when Playwright or a browser binary is missing, or the folder has no `index.html`. The message then says nothing was rendered. No score is invented.
|
|
99
100
|
|
|
100
101
|
## Sample run 4: token inventory
|
|
101
102
|
|
|
@@ -112,7 +113,7 @@ node dist/cli.js verify
|
|
|
112
113
|
node dist/cli.js audit fixtures/intentionally-broken-ui --format json,md,html,sarif --out reports
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
Expected:
|
|
116
|
+
Expected: 140 tests pass; `verify` prints only PASS lines; four report files are written.
|
|
116
117
|
|
|
117
118
|
## Coverage of the test suite
|
|
118
119
|
|
|
@@ -73,6 +73,24 @@ A Dockerfile is not included in 0.2.0. The CLI already runs headlessly, so a min
|
|
|
73
73
|
|
|
74
74
|
The tool is single-threaded and uses memory proportional to the largest files it reads.
|
|
75
75
|
|
|
76
|
+
## Container
|
|
77
|
+
|
|
78
|
+
`Dockerfile` uses `node:22-bookworm-slim`, runs `npm ci --ignore-scripts` and `npm run build`, and starts `node dist/cli.js`. Mount the project read-only and pass the audit command. The image has no browser. `.github/workflows/docker.yml` builds it on Ubuntu and runs `version`. This PC has no Docker, so the image was not built here. Example: `docker build -t rachnasutra .` then `docker run --rm -v "$PWD:/work:ro" -w /work rachnasutra audit /work`.
|
|
79
|
+
|
|
80
|
+
## Saved-report history
|
|
81
|
+
|
|
82
|
+
`rachnasutra history <directory>` reads every JSON audit in that directory and writes `history.md` and `history.html` next to them, or under `--out`. The table is finding counts. It does not open a browser and it does not diff screenshots.
|
|
83
|
+
|
|
84
|
+
## Doctor
|
|
85
|
+
|
|
86
|
+
`rachnasutra doctor` prints OK or FAIL for checks that can pass or fail. Browser audit, visual review and live host loading print NOTE. NOTE means doctor did not launch a browser and did not open a live IDE. It is not a pass. The process still exits 0 when every real check passed. `audit --mode browser` is a separate command.
|
|
87
|
+
|
|
88
|
+
`failOn` may be `confirmed-critical`. That value fails the command when a finding is confirmed and high, or confirmed and critical. The word critical in the name is historical. `ci` uses this gate by default.
|
|
89
|
+
|
|
90
|
+
## Documentation site
|
|
91
|
+
|
|
92
|
+
The HTML documentation is live at <https://shahvatsalofficial.github.io/rachnasutra/>. `.github/workflows/pages.yml` uploads `documents/rachnasutra/html/` with GitHub Pages. A push to `main` that changes the docs deploys it. `workflow_dispatch` can deploy the current `main` without a docs edit.
|
|
93
|
+
|
|
76
94
|
## Release and distribution
|
|
77
95
|
|
|
78
96
|
Install from npm. Node 20 or newer. No API key.
|
|
@@ -86,13 +104,15 @@ The package name is `rachnasutra`. It is public. The npm account that publishes
|
|
|
86
104
|
|
|
87
105
|
Maintainer publish, from a clean `main` after CI is green:
|
|
88
106
|
|
|
89
|
-
1. `
|
|
90
|
-
2.
|
|
91
|
-
3.
|
|
92
|
-
4.
|
|
93
|
-
5. `npm view rachnasutra version` must print the version you just published.
|
|
107
|
+
1. Bump `version` in `package.json` and `toolVersion()` in `src/audit.ts`. Add a `CHANGELOG.md` section. Commit and push. Wait until the Linux and Windows CI run is green.
|
|
108
|
+
2. Publish with GitHub Actions, not from a laptop. `.github/workflows/publish.yml` runs on **Actions → Publish → Run workflow**, and also when a tag `vX.Y.Z` is pushed. The tag must equal `package.json` `version`. The job refuses to publish a version that is already on npm. `prepublishOnly` still runs `npm test` and `npm run verify`.
|
|
109
|
+
3. One-time setup on npm, as `shahvatsal`. Open the `rachnasutra` package on npmjs.com, then **Settings → Trusted Publisher → GitHub Actions**. Set the repository owner to `shahvatsalofficial`, the repository to `rachnasutra`, and the workflow filename to `publish.yml`. Leave the environment name empty. Save. Do not create an `NPM_TOKEN` secret. The Action uses GitHub's short-lived OIDC token.
|
|
110
|
+
4. After that save, run the workflow, or push the tag: `git tag -a vX.Y.Z -m "vX.Y.Z"` then `git push origin vX.Y.Z`.
|
|
111
|
+
5. `npm view rachnasutra version` must print the version you just published.
|
|
112
|
+
|
|
113
|
+
A local `npm publish --access public` still works if `npm whoami` prints `shahvatsal`. npm will ask for a one-time password in that terminal. Do not paste the password or a token into chat.
|
|
94
114
|
|
|
95
|
-
Unpublish is only available for 72 hours, and only if nothing else depends on the version. Prefer a new patch version over an unpublish.
|
|
115
|
+
Unpublish is only available for 72 hours, and only if nothing else depends on the version. The publish workflow does not unpublish. Prefer a new patch version over an unpublish. Removing `0.0.0-stage` still needs `npm unpublish rachnasutra@0.0.0-stage` from a terminal, and npm will ask for the one-time password.
|
|
96
116
|
|
|
97
117
|
## Upgrade and rollback
|
|
98
118
|
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
| planned | No code yet |
|
|
11
11
|
| not-available | The CLI states it is unavailable and exits with code 3 |
|
|
12
12
|
|
|
13
|
-
## Capability status (0.
|
|
13
|
+
## Capability status (0.5.1)
|
|
14
14
|
|
|
15
15
|
| Area | Status | Notes |
|
|
16
16
|
|---|---|---|
|
|
17
|
-
| Static audit CLI,
|
|
17
|
+
| Static audit CLI, 33 rules | implemented | Tests and fixtures. Includes duplicate id, frame title, skip link, email/tel autocomplete, empty heading, non-text border contrast, empty lang, `role="img"`, Tailwind arbitrary hex and JSX style colours |
|
|
18
18
|
| Measured colour contrast | implemented | Literal values only |
|
|
19
19
|
| JSON, Markdown, HTML, SARIF reports | implemented | Escaping tested |
|
|
20
20
|
| Report contract and validation | implemented | `schemas/report.schema.json`, `validateReport` |
|
|
@@ -25,15 +25,17 @@
|
|
|
25
25
|
| Claude Code, Cursor, Codex, Copilot hosts | adapter | Not smoke-tested live |
|
|
26
26
|
| Gemini CLI host | experimental | Path unconfirmed |
|
|
27
27
|
| Windsurf, Kiro, others | planned | Copy `skills/` manually |
|
|
28
|
-
| Browser audit (Playwright) |
|
|
29
|
-
| axe-core integration |
|
|
30
|
-
| Lighthouse and Core Web Vitals |
|
|
31
|
-
| Screenshots and visual baselines |
|
|
32
|
-
| Container image |
|
|
28
|
+
| Browser audit (Playwright) | implemented when installed | `audit --mode browser`. Exit 3 if Playwright or a browser binary is missing |
|
|
29
|
+
| axe-core integration | implemented when installed | Runs inside the browser mode. Findings use `axe/` rule ids |
|
|
30
|
+
| Lighthouse and Core Web Vitals | partial | Browser mode attempts a lab run. Field data is not collected |
|
|
31
|
+
| Screenshots and visual baselines | implemented when installed | `visual baseline` and `visual compare` (byte compare) |
|
|
32
|
+
| Container image | implemented | `Dockerfile`, static CLI, no browser. Built on GitHub Actions Ubuntu. Not built on the maintainer PC |
|
|
33
33
|
| API or local-model provider modes | planned | Skills use the host model today |
|
|
34
|
-
| Report viewer dashboard | partial |
|
|
35
|
-
|
|
|
36
|
-
|
|
|
34
|
+
| Report viewer dashboard | partial | One HTML report per run, plus `history` counts |
|
|
35
|
+
| Rule examples and per-rule tests | implemented | 33 rules, 140 tests |
|
|
36
|
+
| `history` command | implemented | Markdown and HTML counts of saved JSON reports |
|
|
37
|
+
| Dockerfile | implemented | Static CLI only |
|
|
38
|
+
| Gujarati README | implemented | `README.gu.md` |
|
|
37
39
|
| ACT, axe-core and real-world validation | implemented | see [Validation and benchmarks](16-validation-and-benchmarks.md) |
|
|
38
40
|
| Live host smoke tests | not done | protocol in [Host smoke tests](17-host-smoke-tests.md) |
|
|
39
41
|
| Blind re-test on new repositories | planned | |
|
|
@@ -80,7 +82,7 @@ Semantic versioning. The report `schemaVersion` changes independently. Rule addi
|
|
|
80
82
|
|
|
81
83
|
| Gap | Impact | Plan |
|
|
82
84
|
|---|---|---|
|
|
83
|
-
| Cross-platform results | Local runs: Windows with Node 20, 22, 24 and 26. Linux is in the blocking CI matrix. macOS is
|
|
85
|
+
| Cross-platform results | Local runs: Windows with Node 20, 22, 24 and 26. Linux is in the blocking CI matrix. macOS is not run: GitHub cancels the job before a runner starts | Do not claim a macOS result |
|
|
84
86
|
| Spec folders (`packages/`, `workflows/`, `rules/`, `adapters/`) not created | None functionally; avoids empty modules | Split when browser module lands |
|
|
85
87
|
| Social preview image must be uploaded in the GitHub UI | Link previews show the default image until then | `assets/social-preview.png` is ready to upload |
|
|
86
88
|
| Host adapters unverified live | Install may need path tweaks for some hosts | Live smoke tests |
|
|
@@ -64,7 +64,7 @@ Guidelines: avoid heavy parsing dependencies; skip when props are spread; cap ou
|
|
|
64
64
|
|
|
65
65
|
Features of the generated site: sticky navigation, per-page table of contents, client-side search over all pages (press `/`), copy buttons on code, light and dark themes following the system with a manual toggle, responsive layout with a mobile menu, print stylesheet, skip link, visible focus, reduced-motion support, structured data (`TechArticle`) and canonical links.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
GitHub Pages publishes `documents/rachnasutra/html/` on every push to `main` that changes the docs. The workflow is `.github/workflows/pages.yml`. The live site is <https://shahvatsalofficial.github.io/rachnasutra/>. The build writes `.nojekyll` so GitHub serves the files as they are. No extra build runs on the host.
|
|
68
68
|
|
|
69
69
|
## Benchmarks
|
|
70
70
|
|