DS7

Brand first, then components, then pages. A web architecture standard that AI agents can follow without long briefings.
npm install -D @ai.all/ds7
npx ds7 init
DS7 is a set of rules, templates and reference documents for fast, multilingual Nuxt 4 / Vue 3 sites. AI agents start from the root ALL.md, which routes them to the DS7 rules in ds7/ALL.md and to the rules of your project.
Requirements
- Node.js 18 or newer.
- A project folder where you run the command. DS7 writes
ds7/ and the agent entrypoints there.
- A web project that follows the stack in
ds7/SPEC.md (Nuxt 4, Vue 3, Tailwind CSS v4). The rules are written for that stack.
Related
Quick start
npm i -D @ai.all/ds7
npx ds7 # install the standard; `npx ds7 --yes` skips the questions
npx ds7 doctor # where the project stands and what to do next
npx ds7 check # the five quality gates
Installing DS7 also installs @ai.all/ui and @ai.all/aiall. Init wires the UI kit into standard Nuxt 4 projects so the Brandbook is available at /ui. Build the Nuxt app with development dependencies installed.
Then write your project's own values in the root ALL.md, below the packs block, and the settings of the commands in ds7.config.json (CONFIG.md).
A project that already has its own scripts in tools/ can see which ones a ds7 command replaces with npx ds7 adopt.
Commands
Set up and keep up to date
| Command |
What it does |
npx ds7 |
Install: the standard in ds7/, the AI-ALL pack, docs/ templates, ds7.config.json, starter skills, npm scripts and a CI workflow (none when your CI already runs the checks). Existing files are kept. |
npx ds7 update |
Replace ds7/ with this version. Local edits are kept: patches in ds7/local/patches/ are applied again, and an edit without a patch is saved to ds7/local/edited/. |
npx ds7 patch <file> |
Record an edit of a vendored file as a patch that every update applies again. |
npx ds7 sync |
Restore the agent entrypoints (aiall sync). |
npx ds7 doctor |
Where the project stands, what the settings switch off, which optional packages are installed, what to do next (--json). |
npx ds7 adopt |
Which local tools/ scripts a ds7 command replaces (--write rewrites the npm scripts that only call them). |
npx ds7 skills link |
Link the skills of .agents/skills into .claude/skills. |
npx ds7 hooks |
Install the commit-msg hook that checks Conventional Commits. |
npx ds7 pages |
GitHub Pages under a base path: the asset() helper and a deploy workflow. |
Check the source
| Command |
What it does |
npx ds7 check |
Gates 1 to 5: class names and layers, colour tokens, locale keys, repository hygiene, file layout. --strict fails on a new issue, --json, --update-baseline. |
npx ds7 guard |
Gate 1 on its own, every finding listed. |
npx ds7 layout |
Files sit where the layout rules say and no import crosses a layer. |
npx ds7 graph |
The code map docs/SITE-GRAPH.md; ask it with --uses X, --of /route, --css class. |
npx ds7 docs |
What the documents mention (scripts, paths, links, skills) exists. |
npx ds7 css |
Dead classes and orphan stylesheets; repeated selectors and blocks as advice. css diff [rev] proves a CSS refactor changed no rule. |
npx ds7 unused |
Components, exports, data files and public assets nothing refers to. |
Check the build (after npm run generate)
| Command |
What it does |
npx ds7 audit |
html, seo, a11y, perf over .output/public; name one to run one. audit html --base /repo/ proves no path leaves a base path. |
npx ds7 console |
Console errors, exceptions and failed requests of every page in a browser. Needs Playwright. |
npx ds7 lab |
LCP, CLS and blocking in a browser; --axe for accessibility. Needs Playwright. |
npx ds7 psi <url> |
PageSpeed Insights scores and field data of a live URL. |
Images
| Command |
What it does |
npx ds7 images |
Responsive WebP variants of the large pictures (--check). Needs sharp. |
npx ds7 images optimize |
Re-encode each WebP once, recorded so it never runs twice (--dry, --check). Needs sharp. |
npx ds7 images strip |
Remove hidden metadata (C2PA, EXIF, XMP, text chunks) without touching pixels (--check). |
npx ds7 images dupes |
The same picture saved twice, also as a near copy. |
Every checking command accepts --json, and --update-baseline to accept the findings of today in ds7-baseline.json: they are shown as known, new ones still fail. Every check can be configured or switched off in ds7.config.json; see CONFIG.md.
Files
| File |
Owner |
init |
update |
ds7/** |
the standard |
copies, keeps existing |
overwrites, then applies ds7/local/patches/ |
ds7/aiall-pack.json, ds7/VERSION, ds7/FILES |
the CLI |
writes |
writes |
ds7/local/** |
the project: notes, recurring rules, patches |
starter README.md and RECURRING-RULES.md |
never written (except edited/, see above) |
docs/BRAND.md, docs/ARCHITECTURE.md, docs/DECISIONS.md, docs/METRICS.md |
the project |
creates if missing |
not changed |
docs/SITE-GRAPH.md |
generated by ds7 graph |
creates if missing |
not changed |
ds7.config.json |
settings of the commands; its presence turns on Gate 5 |
creates if missing |
not changed |
ds7-baseline.json |
accepted findings, written by --update-baseline |
not created |
not changed |
.github/workflows/ds7.yml |
CI: gates, graph, docs, build and audits |
creates if missing and no workflow runs the checks |
not changed |
.agents/skills/*/SKILL.md |
starter skills: project-rules, project-graph, seo-page, search-quality, code-audit, add-language |
creates if missing |
not changed |
Makefile |
project automation |
creates if missing |
not changed |
ALL.md (root) |
AI-ALL; the text below the packs block is yours |
created by AI-ALL |
not changed by DS7 |
AGENTS.md, CLAUDE.md, GEMINI.md, ... |
AI-ALL |
created by AI-ALL |
not changed by DS7 |
update copies files and does not delete: a file removed from the standard stays in ds7/ until you delete it (the CHANGELOG says when one is removed).
CI
init writes .github/workflows/ds7.yml. A site can instead call the reusable workflow of this repository, which runs the checks, the build and the audits, and can deploy to GitHub Pages:
jobs:
site:
uses: ai-all-ai/ds7/.github/workflows/site.yml@v2.6.0
with:
pages: true
permissions:
contents: read
pages: write
id-token: write
Inputs: node-version (default from .nvmrc), check (check:strict), build (generate), audit (audit, empty to skip), pages (false), noindex (true: the Pages copy is a preview closed to search engines).
Git
- Commit
ds7/, docs/BRAND.md, the root ALL.md and the agent entrypoints (AGENTS.md, CLAUDE.md, GEMINI.md, ...).
- Commit
ds7/: a .gitignore rule such as /ds[0-9]*/ must not hide it (ds7 doctor warns). On init, DS7 adds the local intake folders (ds5/, .ds5/, *.tmp-pv) to .gitignore. Add project-specific rules for node_modules/, .nuxt/, .output/, dist/, logs, and .env files.
- Never commit secrets. Keep them in a git-ignored
.env or in the host's environment, and list only their names in .env.example. See ds7/09-security-errors/SECURITY-AND-ERRORS.md.
Contributing and security
Contribution rules: CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md.
Upgrading to 2.5
- If you changed files under
ds7/, record each edit first: npx ds7 patch <file>. An edit you forget is not lost: update saves it to ds7/local/edited/.
npm i -D @ai.all/ds7@2.5 and npx ds7 update.
npx ds7 doctor: it lists what is missing and which settings are in use.
npx ds7 check. Gate 3 now compares full key paths of TS locales and may find keys the old check missed. Add them, or record them with npx ds7 check --update-baseline and fix them later.
is- state classes now show as advice. Keep them with "guard": { "stateClasses": "allow" }, or move to dash modifiers (.menu.-open) at your pace.
- Optional:
npx ds7 skills link, npx ds7 hooks, and the reusable workflow from the CI section.
Every setting and its off switch: CONFIG.md. All changes: CHANGELOG.md.
Upgrading from DS7 1.x
DS7 1.x wrote ALL.md and ALL.project.md to the project root. From this version the standard is the ds7 pack of AI-ALL. update does not delete or rewrite your files, and it prints a warning for each one that needs a manual step:
- Move the project values from
ALL.project.md into the root ALL.md, below the packs block.
- Delete
ALL.project.md.
- In the root
ALL.md, remove the copied DS7 rules and keep the packs block.
- Run
npx @ai.all/ds7 update and then npx @ai.all/aiall check.
Build order
- Foundations: tokens in
theme.css.
- Brandbook: every token and base atom on
/ui.
- Atoms and molecules, built from the brandbook.
- Sections and pages, built from components.
A value that is not a token does not appear in a component. A pattern that is not in the brandbook is not finished.
What you get