@williambeto/ai-workflow 2.4.0 → 2.4.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 +8 -0
- package/README.md +8 -0
- package/dist-assets/docs/QUICKSTART.md +6 -0
- package/dist-assets/docs/profiles/frontend-product.md +1 -0
- package/dist-assets/docs/profiles/frontend-utility.md +1 -0
- package/dist-assets/skills/frontend-design-system/SKILL.md +20 -4
- package/docs/getting-started/quickstart.md +6 -0
- package/package.json +1 -1
- package/src/core/validation/artifact-fidelity-gate.js +18 -4
- package/src/core/validation/visual-verifier.js +18 -2
- package/src/core/workflow-profiles.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [2.4.1] - 2026-06-21
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
- Hardened visual and accessibility quality gates.
|
|
5
|
+
- Enhanced `ArtifactFidelityGate` to check all skill folder path variations for `frontend-design-system`.
|
|
6
|
+
- Documented Playwright, browser, and Axe-core preconditions in README and quickstart documentation.
|
|
7
|
+
- Improved validation resiliency by warning instead of crashing when browser binaries are missing.
|
|
8
|
+
|
|
1
9
|
## [2.4.0] - 2026-06-20
|
|
2
10
|
|
|
3
11
|
### Added
|
package/README.md
CHANGED
|
@@ -47,6 +47,14 @@ The `aw` binary is an alias for the same CLI entrypoint as `ai-workflow`.
|
|
|
47
47
|
|
|
48
48
|
The CLI receives the natural request, classifies the intent, plans the workflow, switch/creates branch safely, delegates coding tasks to the OpenCode runtime adapter, validates changes, and runs bounded remediation if necessary before outputting the handoff summary.
|
|
49
49
|
|
|
50
|
+
### Visual & Accessibility (A11y) Requirements
|
|
51
|
+
|
|
52
|
+
For projects utilizing visual validation (screenshots) or accessibility audits (Axe-core), ensure you have:
|
|
53
|
+
- `playwright` (or `@playwright/test`) and `axe-core` installed under `devDependencies`.
|
|
54
|
+
- Browser binaries installed on the host machine by running `npx playwright install` (specifically Chromium).
|
|
55
|
+
|
|
56
|
+
If these dependencies or browser binaries are missing, the visual and accessibility validations will fail gracefully with warning logs or block depending on CLI validation options.
|
|
57
|
+
|
|
50
58
|
## Modes and profiles
|
|
51
59
|
|
|
52
60
|
| Mode | Use for | Primary evidence |
|
|
@@ -21,3 +21,9 @@ Write-capable work never runs on `main` or `master`. Existing relevant tests/bui
|
|
|
21
21
|
- `BLOCKED`
|
|
22
22
|
|
|
23
23
|
Workflow documents are optional unless they provide lasting value or full mode requires them.
|
|
24
|
+
|
|
25
|
+
## Visual & Accessibility Evidence Requirements
|
|
26
|
+
|
|
27
|
+
If your project utilizes visual validation (screenshots) or accessibility audits (Axe-core), ensure you have:
|
|
28
|
+
- `playwright` (or `@playwright/test`) and `axe-core` installed under `devDependencies`.
|
|
29
|
+
- Browser binaries installed on the host machine by running `npx playwright install`.
|
|
@@ -26,16 +26,28 @@ Evolve technical governance to guarantee real visual and frontend quality by enf
|
|
|
26
26
|
- Feedback on visual quality or layout defects
|
|
27
27
|
|
|
28
28
|
## Constraints
|
|
29
|
-
- **Visual Thesis & Deliberate Composition**: Layouts must be cohesive. Avoid generic grids, pill soup, or unorganized structures.
|
|
30
|
-
- **
|
|
29
|
+
- **Visual Thesis & Deliberate Composition**: Layouts must be cohesive. Avoid generic grids, pill soup, or unorganized structures. The first viewport must read as a single unified composition, not a cluttered dashboard (unless specifically requested).
|
|
30
|
+
- **Brand First**: On branded pages, the brand or product name must be a hero-level signal, not just nav text or an eyebrow. No headline should overpower the brand.
|
|
31
|
+
- **Brand Test**: If the first viewport could belong to another brand after removing the navigation/logo, the branding is too weak.
|
|
32
|
+
- **Typography Scale**: Maintain a single `<h1>` per page. Line heights must be balanced: 1.1-1.25 for headings, 1.5-1.7 for readable body text. Use expressive, purposeful fonts and avoid generic default stacks (e.g., plain system, Inter, Roboto, Arial) unless matching an existing design system.
|
|
33
|
+
- **Background Atmosphere**: Don't rely on flat, single-color backgrounds. Use smooth gradients, images, or subtle patterns to build a premium atmosphere.
|
|
34
|
+
- **Full-bleed Hero Only**: On landing pages and promotional surfaces, the hero image should be a dominant edge-to-edge visual plane or background by default. Do not use inset hero images, side-panel hero images, rounded media cards, tiled collages, or floating image blocks unless the existing design system clearly requires it.
|
|
35
|
+
- **Hero Budget**: The first viewport must contain only the brand, one headline, one short supporting sentence, one CTA group, and one dominant image. Do not place stats, schedules, event listings, address blocks, promos, "this week" callouts, metadata rows, or secondary marketing content in the first viewport.
|
|
36
|
+
- **No Hero Overlays**: Do not place detached labels, floating badges, promo stickers, info chips, or callout boxes on top of hero media.
|
|
37
|
+
- **No Card Abuse (Default No Cards)**: Never use cards in the hero. Cards are allowed only when they serve as a container for a user interaction. If removing a border, shadow, background, or radius does not hurt interaction or understanding, it should not be a card.
|
|
38
|
+
- **One Job Per Section**: Each page section must have one clear purpose, one headline, and one short supporting sentence.
|
|
39
|
+
- **Real Visual Anchor**: Imagery must show the product, place, atmosphere, or context. Decorative gradients and abstract backgrounds do not count as the main visual idea.
|
|
40
|
+
- **Reduce Clutter**: Avoid pill clusters, stat strips, icon rows, boxed promos, schedule snippets, and multiple competing text blocks.
|
|
41
|
+
- **Motion/Animations**: Use motion to create presence and hierarchy, not noise. Implement at least 2-3 intentional, subtle motions or transitions for visually led work.
|
|
42
|
+
- **React Patterns (when using React)**: Prefer modern React patterns including `useEffectEvent`, `startTransition`, and `useDeferredValue` when appropriate. Do not add `useMemo`/`useCallback` by default unless already used; follow the repository's React Compiler guidance.
|
|
31
43
|
- **Strict Design System / CSS Gate**:
|
|
32
44
|
- CSS tokens must define a primary palette, background, surface, text styles, and spacing scale.
|
|
33
45
|
- Exposing excessive inline styles (`style="..."`) is prohibited.
|
|
34
46
|
- CDN dependencies for visual libraries (Tailwind, Bootstrap) are blocked unless explicitly authorized.
|
|
35
|
-
- **Typography Scale**: Maintain a single `<h1>` per page. Line heights must be balanced: 1.1-1.25 for headings, 1.5-1.7 for readable body text.
|
|
36
47
|
- **Acessibilidade (A11y)**: Must achieve WCAG compliance. Contrast ratio must be at least 4.5:1 for body text (3:1 for headings/large text). Semantic HTML elements (`<header>`, `<main>`, `<footer>`, `<nav>`, `<section>`) must structure the layout.
|
|
37
48
|
- **Tokens de Cor & Spacing**: Spacing must adhere to an 8px-grid scale (e.g. 4px, 8px, 16px, 24px, 32px, 48px). Colors must use CSS custom properties: `--color-primary`, `--color-background`, `--color-surface`, `--color-text`.
|
|
38
49
|
- **Regras Anti-Output Fraco**: Prevent empty blocks, broken states, and plain gradient fills with no concrete content.
|
|
50
|
+
- **Exception**: If working within an existing website or design system, preserve the established patterns, structure, and visual language.
|
|
39
51
|
|
|
40
52
|
## Allowed tools
|
|
41
53
|
- `view_file` to inspect existing design tokens, components, and templates.
|
|
@@ -46,11 +58,15 @@ Evolve technical governance to guarantee real visual and frontend quality by enf
|
|
|
46
58
|
- Deploying raw HTML without CSS custom properties/tokens.
|
|
47
59
|
- Injecting raw CDN CSS/JS libraries into page headers without authorization.
|
|
48
60
|
- Committing unstyled layout states or missing loading/empty/error/success conditions.
|
|
61
|
+
- Placing cards, stats, event listings, address blocks, metadata rows, or secondary marketing clutter in the first viewport.
|
|
62
|
+
- Placing floating badges, chips, or labels on top of hero media.
|
|
63
|
+
- Using inset, side-panel, rounded media cards, or tiled collages for hero images.
|
|
64
|
+
- Using generic browser-default font stacks (Inter, Roboto, Arial, system) for branded layouts.
|
|
49
65
|
|
|
50
66
|
## Procedure
|
|
51
67
|
1. **Analyze existing Design Tokens**: Check if the project already has CSS variables or custom properties. Adapt to the project's tokens if found, otherwise define a default safe set (primary, background, surface, text, space-*, font-*).
|
|
52
68
|
2. **Draft Semantic Structure**: Build the UI skeleton using HTML5 semantic elements (`<header>`, `<main>`, etc.) with unique IDs for testing.
|
|
53
|
-
3. **Apply Spacing and
|
|
69
|
+
3. **Apply Spacing, Typography, and Motion Scales**: Implement the 8px grid system, a tight heading line-height / relaxed body line-height scale, expressive font selections, and at least 2-3 intentional motion animations.
|
|
54
70
|
4. **Implement UI States**: Ensure loading, empty, error, and success states are styled, fully functional, and visually robust.
|
|
55
71
|
5. **A11y Verification**: Verify WCAG contrast levels. Run validation commands with `npm run validate` or `npx aw validate --a11y` to check for accessibility violations.
|
|
56
72
|
6. **Collect Visual Evidence**: Capture desktop and mobile screenshots using `collect-evidence --visual-dist` to verify design fidelity.
|
|
@@ -15,3 +15,9 @@
|
|
|
15
15
|
Quick and standard work return a concise summary with branch, changed areas, observed validation, and limitations. Full/release/audit/security work may persist structured evidence.
|
|
16
16
|
|
|
17
17
|
Use `ai-workflow collect-evidence --mode=full` when a durable validation artefact is required. Do not use workflow files as substitutes for actual commands.
|
|
18
|
+
|
|
19
|
+
## Visual & Accessibility Evidence Requirements
|
|
20
|
+
|
|
21
|
+
If your project utilizes visual validation (screenshots) or accessibility audits (Axe-core), ensure you have:
|
|
22
|
+
- `playwright` (or `@playwright/test`) and `axe-core` installed under `devDependencies`.
|
|
23
|
+
- Browser binaries installed on the host machine by running `npx playwright install`.
|
package/package.json
CHANGED
|
@@ -330,10 +330,24 @@ export class ArtifactFidelityGate {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
async verifyFrontendFidelity(changedFiles) {
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
const skillPaths = [
|
|
334
|
+
path.join(this.cwd, ".agents/skills/frontend-design-system/SKILL.md"),
|
|
335
|
+
path.join(this.cwd, ".agents/skills/frontend_design_system/SKILL.md"),
|
|
336
|
+
path.join(this.cwd, ".ai-workflow/opencode/skills/frontend-design-system/SKILL.md"),
|
|
337
|
+
path.join(this.cwd, ".ai-workflow/opencode/skills/frontend_design_system/SKILL.md"),
|
|
338
|
+
path.join(this.cwd, "opencode/skills/frontend-design-system/SKILL.md"),
|
|
339
|
+
path.join(this.cwd, "opencode/skills/frontend_design_system/SKILL.md")
|
|
340
|
+
];
|
|
341
|
+
|
|
342
|
+
let hasDesignSystemSkill = false;
|
|
343
|
+
for (const p of skillPaths) {
|
|
344
|
+
const exists = await fs.access(p).then(() => true).catch(() => false);
|
|
345
|
+
if (exists) {
|
|
346
|
+
hasDesignSystemSkill = true;
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
337
351
|
if (!hasDesignSystemSkill) {
|
|
338
352
|
return null;
|
|
339
353
|
}
|
|
@@ -65,7 +65,15 @@ export class VisualVerifier {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
await this.startServer();
|
|
68
|
-
|
|
68
|
+
let browser;
|
|
69
|
+
try {
|
|
70
|
+
browser = await playwright.chromium.launch();
|
|
71
|
+
} catch (err) {
|
|
72
|
+
await this.closeServer();
|
|
73
|
+
throw new Error(
|
|
74
|
+
`Failed to launch Playwright Chromium. Please ensure browsers are installed using 'npx playwright install chromium'. Details: ${err.message}`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
69
77
|
const page = await browser.newPage();
|
|
70
78
|
|
|
71
79
|
const outputDir = path.join(this.cwd, ".evidence/visual");
|
|
@@ -107,7 +115,15 @@ export class VisualVerifier {
|
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
await this.startServer();
|
|
110
|
-
|
|
118
|
+
let browser;
|
|
119
|
+
try {
|
|
120
|
+
browser = await playwright.chromium.launch();
|
|
121
|
+
} catch (err) {
|
|
122
|
+
await this.closeServer();
|
|
123
|
+
throw new Error(
|
|
124
|
+
`Failed to launch Playwright Chromium. Please ensure browsers are installed using 'npx playwright install chromium'. Details: ${err.message}`
|
|
125
|
+
);
|
|
126
|
+
}
|
|
111
127
|
const page = await browser.newPage();
|
|
112
128
|
|
|
113
129
|
const outputDir = path.join(this.cwd, ".evidence/a11y");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const PROFILE_DEFINITIONS = Object.freeze({
|
|
2
2
|
"frontend-product": Object.freeze({
|
|
3
3
|
owner: "Astra",
|
|
4
|
-
skills: ["frontend-development", "ui-ux-design"],
|
|
4
|
+
skills: ["frontend-development", "ui-ux-design", "frontend-design-system"],
|
|
5
5
|
objective: "Deliver a user-facing product or marketing surface with truthful copy and deliberate visual composition.",
|
|
6
6
|
requiredChecks: ["tests", "typecheck", "build", "responsive-render", "primary-interaction", "truthfulness"],
|
|
7
7
|
forbiddenAssumptions: ["fixed SaaS section sequence", "mandatory pricing", "mandatory testimonials", "subjective premium score"]
|
|
8
8
|
}),
|
|
9
9
|
"frontend-utility": Object.freeze({
|
|
10
10
|
owner: "Astra",
|
|
11
|
-
skills: ["frontend-development", "ui-ux-design"],
|
|
11
|
+
skills: ["frontend-development", "ui-ux-design", "frontend-design-system"],
|
|
12
12
|
objective: "Deliver a focused user tool with a complete primary flow and clear operational states.",
|
|
13
13
|
requiredChecks: ["tests", "typecheck", "build", "responsive-render", "primary-interaction"],
|
|
14
14
|
forbiddenAssumptions: ["marketing sections", "pricing", "testimonials", "commercial narrative"]
|