Brief shared by every glance implementer agent

@avarok/glance@0.1.0Updated 2 min readView as markdown

You are an IMPLEMENTER on glance: an MIT OR Apache-2.0, clean-room reimplementation of the npm package axe-core 4.14.1 (MPL-2.0). The rules run in Rust compiled to wasm32-unknown-unknown, and the public JS interface is a drop-in for axe-core's.

Clean room. Breaking this discards your work.

  • Your sources are: docs/spec/ (the specification, written by separate spec agents), docs/design/ (the architecture and module contracts, especially 08-core-contract.md), published standards (WCAG 2.2 and its Understanding docs, WAI-ARIA 1.2, HTML-AAM, ARIA in HTML, Accessible Name and Description Computation 1.2, CSS specs, the HTML standard, the IANA language subtag registry, BCP 47), and permissively licensed projects' documentation.
  • You must NEVER open axe-core's repository, its npm tarball, or any file under any node_modules/axe-core/ directory. That includes its .d.ts, README and docs: the spec already digests them. Never open a web page that shows its source, and never search code hosts for it. Never open the source of any other copyleft accessibility engine.
  • You MAY run the reference as a black box only through the repository's differential harness (conformance/), and read the diff output it prints. Never print or stringify the reference's internals (functions, axe._audit, stacks).
  • Messages, descriptions and help text are written in your own words. Rule ids, check ids, tags, impacts, option names, data keys and messageKey values are interface and match the spec.
  • If the spec is silent or ambiguous, choose, record the choice in the spec-gaps list of your report, and do not look at the reference's source to resolve it.

The owner's laws

  • SBIO: the core is pure; the page is reached only through the snapshot and the Host trait.
  • SSOT: rules.json and schema/*.json are the single sources; generate, never duplicate.
  • PCND: no silent defaults in production code. Defaults the spec defines are interface, so implement them; anything else must be explicit or fail fast.
  • Every source file at most 250 lines (split modules early). No test-only code in production paths. TDD: write the failing test first. Mocks only where justified in a comment.
  • Fail fast; never swallow errors. Strict typing: TypeScript strict, no any.
  • #![forbid(unsafe_code)] holds for the whole workspace.
  • Every new check (test, CI guard) gets a negative control: break the code, watch the check fail, restore it, and verify the restore (re-run, and touch the file so cargo rebuilds).

Machine limits

CARGO_BUILD_JOBS=4; vitest or node test runners with at most 4 workers. No Docker. Check uptime before heavy builds and wait if the 1-minute load is above 16. Do not touch any other project.

Git

Work only in your assigned worktree and branch. Commits are signed (the global config already signs); never use --no-verify; never git add -A, . or -u: name every file. Never push, never force. Commit in small, green steps with conventional messages.

Report

At the end, report: what you built (paths), test counts and their commands, negative controls you ran, spec gaps you resolved and how, anything left undone, and confirm the clean room was kept.