ace-design 0.2.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.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/.ace-defaults/design/config.yml +9 -0
  3. data/.ace-defaults/design/contexts/app/component.md +3 -0
  4. data/.ace-defaults/design/contexts/app/view.md +3 -0
  5. data/.ace-defaults/design/contexts/app.md +3 -0
  6. data/.ace-defaults/design/contexts/project.md +7 -0
  7. data/.ace-defaults/design/contexts/site/component.md +3 -0
  8. data/.ace-defaults/design/contexts/site/view.md +3 -0
  9. data/.ace-defaults/design/contexts/site.md +3 -0
  10. data/.ace-defaults/design/presets/ace-vs-taste.yml +37 -0
  11. data/.ace-defaults/design/presets/fast.yml +18 -0
  12. data/.ace-defaults/design/presets/impeccable.yml +48 -0
  13. data/.ace-defaults/design/presets/superdesign.yml +48 -0
  14. data/.ace-defaults/design/presets/taste-v2.yml +46 -0
  15. data/.ace-defaults/design/presets/ui-ux-pro-max.yml +48 -0
  16. data/.ace-defaults/nav/protocols/guide-sources/ace-design.yml +8 -0
  17. data/.ace-defaults/nav/protocols/skill-sources/ace-design.yml +8 -0
  18. data/.ace-defaults/nav/protocols/tmpl-sources/ace-design.yml +8 -0
  19. data/.ace-defaults/nav/protocols/wfi-sources/ace-design.yml +8 -0
  20. data/CHANGELOG.md +37 -0
  21. data/LICENSE +21 -0
  22. data/README.md +119 -0
  23. data/Rakefile +12 -0
  24. data/browser/dependencies.mjs +20 -0
  25. data/browser/doctor.mjs +7 -0
  26. data/browser/inspect.mjs +61 -0
  27. data/browser/package-lock.json +71 -0
  28. data/browser/package.json +1 -0
  29. data/browser/preview.mjs +35 -0
  30. data/browser/source.mjs +14 -0
  31. data/docs/contexts.md +66 -0
  32. data/docs/inspiration.md +28 -0
  33. data/docs/intent-verification.md +73 -0
  34. data/docs/runner.md +108 -0
  35. data/docs/testing.md +18 -0
  36. data/docs/usage.md +38 -0
  37. data/exe/ace-design +19 -0
  38. data/handbook/benchmarks/app-booking/brief.md +8 -0
  39. data/handbook/benchmarks/app-booking/fixtures.json +46 -0
  40. data/handbook/benchmarks/app-inventory/brief.md +8 -0
  41. data/handbook/benchmarks/app-inventory/fixtures.json +38 -0
  42. data/handbook/benchmarks/app-support/brief.md +8 -0
  43. data/handbook/benchmarks/app-support/fixtures.json +41 -0
  44. data/handbook/benchmarks/site-community/brief.md +8 -0
  45. data/handbook/benchmarks/site-community/fixtures.json +41 -0
  46. data/handbook/benchmarks/site-course/brief.md +8 -0
  47. data/handbook/benchmarks/site-course/fixtures.json +41 -0
  48. data/handbook/benchmarks/site-studio/brief.md +8 -0
  49. data/handbook/benchmarks/site-studio/fixtures.json +38 -0
  50. data/handbook/catalog/app/error-recovery.md +11 -0
  51. data/handbook/catalog/app/status-feedback.md +11 -0
  52. data/handbook/catalog/app/task-first-density.md +11 -0
  53. data/handbook/catalog/shared/automated-a11y-boundary.md +11 -0
  54. data/handbook/catalog/shared/bounded-exploration.md +11 -0
  55. data/handbook/catalog/shared/context-before-style.md +11 -0
  56. data/handbook/catalog/shared/contextual-cards.md +11 -0
  57. data/handbook/catalog/shared/focus-visible.md +11 -0
  58. data/handbook/catalog/shared/responsive-reflow.md +11 -0
  59. data/handbook/catalog/site/critique-versus-defect.md +11 -0
  60. data/handbook/catalog/site/purposeful-links.md +11 -0
  61. data/handbook/catalog/site/subject-specific-hero.md +11 -0
  62. data/handbook/guides/design/process.g.md +20 -0
  63. data/handbook/skills/as-design-app/SKILL.md +21 -0
  64. data/handbook/skills/as-design-app-adjust/SKILL.md +23 -0
  65. data/handbook/skills/as-design-app-audit/SKILL.md +23 -0
  66. data/handbook/skills/as-design-app-implement/SKILL.md +22 -0
  67. data/handbook/skills/as-design-look-for-inspiration/SKILL.md +24 -0
  68. data/handbook/skills/as-design-site/SKILL.md +21 -0
  69. data/handbook/skills/as-design-site-adjust/SKILL.md +23 -0
  70. data/handbook/skills/as-design-site-audit/SKILL.md +23 -0
  71. data/handbook/skills/as-design-site-implement/SKILL.md +22 -0
  72. data/handbook/templates/design/benchmark-result.template.md +14 -0
  73. data/handbook/templates/design/brief.template.md +12 -0
  74. data/handbook/templates/design/feedback.template.md +8 -0
  75. data/handbook/templates/design/proposal.template.md +15 -0
  76. data/handbook/templates/design/source-ledger.template.md +5 -0
  77. data/handbook/workflow-instructions/design/adjust.wf.md +51 -0
  78. data/handbook/workflow-instructions/design/audit.wf.md +50 -0
  79. data/handbook/workflow-instructions/design/explore.wf.md +51 -0
  80. data/handbook/workflow-instructions/design/implement.wf.md +47 -0
  81. data/handbook/workflow-instructions/design/look-for-inspiration.wf.md +43 -0
  82. data/lib/ace/design/atoms/contracts.rb +36 -0
  83. data/lib/ace/design/cli/commands/adjust.rb +41 -0
  84. data/lib/ace/design/cli/commands/doctor.rb +18 -0
  85. data/lib/ace/design/cli/commands/explore.rb +42 -0
  86. data/lib/ace/design/cli/commands/inspect.rb +21 -0
  87. data/lib/ace/design/cli/commands/preset.rb +32 -0
  88. data/lib/ace/design/cli/commands/preview.rb +21 -0
  89. data/lib/ace/design/cli/commands/run_commands.rb +50 -0
  90. data/lib/ace/design/cli/commands/validate.rb +25 -0
  91. data/lib/ace/design/cli.rb +79 -0
  92. data/lib/ace/design/molecules/adjust_prompts.rb +40 -0
  93. data/lib/ace/design/molecules/agent_executor.rb +28 -0
  94. data/lib/ace/design/molecules/artifacts.rb +94 -0
  95. data/lib/ace/design/molecules/catalog.rb +36 -0
  96. data/lib/ace/design/molecules/context_document.rb +42 -0
  97. data/lib/ace/design/molecules/context_repository.rb +117 -0
  98. data/lib/ace/design/molecules/design_context.rb +96 -0
  99. data/lib/ace/design/molecules/design_prompts.rb +118 -0
  100. data/lib/ace/design/molecules/design_source.rb +89 -0
  101. data/lib/ace/design/molecules/preset.rb +120 -0
  102. data/lib/ace/design/molecules/runtime.rb +75 -0
  103. data/lib/ace/design/molecules/session.rb +123 -0
  104. data/lib/ace/design/molecules/skill_sources.rb +71 -0
  105. data/lib/ace/design/organisms/adjuster.rb +211 -0
  106. data/lib/ace/design/organisms/design_run.rb +394 -0
  107. data/lib/ace/design/organisms/generator.rb +127 -0
  108. data/lib/ace/design/organisms/inspector.rb +50 -0
  109. data/lib/ace/design/version.rb +6 -0
  110. data/lib/ace/design.rb +40 -0
  111. metadata +280 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d37d8d0a64624263443caca262cd611655266e79a92297907e2f7b97b60a29b8
4
+ data.tar.gz: df52ac9d0105eadcc42dffaefdc7ccf426c5573f36ef53803ad326b93432b0a3
5
+ SHA512:
6
+ metadata.gz: 3ec7f5799a786b3b7cd41ea9b4bf867c44b164407247654df55344cc5e0a2f05677e8f09b3dc7f721c0a9a071878ab23e48f80e3a731a7ec677ddd9a8e3be746
7
+ data.tar.gz: 52b28ea636aed64853402a4d2d6c4c6d3a09be7ad5e5c6cc71fef63b3cb8844cbec65c4911b9e9d603fdffbd3524993e0f71f22b739d09c440d8bfed22b13cdf
@@ -0,0 +1,9 @@
1
+ design:
2
+ node: node
3
+ runtime_dir: .ace-local/design/runtime
4
+ run_root: .ace-local/design
5
+ timeout: 45
6
+ model: role:assign-engineer
7
+ agent_timeout: 600
8
+ language: en
9
+ input: []
@@ -0,0 +1,3 @@
1
+ # Application component
2
+
3
+ Design one reusable element with a minimal host. Show representative states relevant to the brief, such as selected, focused, disabled, loading, empty or invalid; do not invent irrelevant states. Define local interactions and keyboard/focus behavior. Keep content data-driven and demonstrate constrained container widths. Do not build a full application shell.
@@ -0,0 +1,3 @@
1
+ # Application view
2
+
3
+ Design one representative working screen with a clear primary task, navigation context and a local interaction. Account for scanning, selection and contextual detail. Explore alternative compositions without building every route or feature.
@@ -0,0 +1,3 @@
1
+ # Application assumptions
2
+
3
+ Organize information around the user's task. Keep status, actionable next steps and recovery clear. Balance density against scanning effort; experienced users may need compact interfaces. Use progressive disclosure for secondary information without hiding routine actions.
@@ -0,0 +1,7 @@
1
+ # Shared design assumptions
2
+
3
+ Start from the audience, task, existing brand and constraints. Prefer concrete hierarchy and useful content over decorative novelty. Treat these as adaptable starting points, never universal aesthetic bans.
4
+
5
+ Preserve user intent and existing design language. Make primary actions identifiable; provide visible focus, meaningful labels, readable contrast and responsive reflow. Prefer familiar interaction patterns unless a departure helps the task. Respect reduced-motion needs.
6
+
7
+ During exploration use one language, common mock data, minimal runnable artifacts and a small scope. Production integration, complete states and engineering verification follow explicit direction selection.
@@ -0,0 +1,3 @@
1
+ # Website component
2
+
3
+ Design one reusable element in a minimal preview host, not a whole page. Make hierarchy and action understandable in context. Show applicable interaction states and responsive container behavior. Avoid embedding page-specific navigation, unrelated sections or business logic.
@@ -0,0 +1,3 @@
1
+ # Website view
2
+
3
+ Design the first viewport and one supporting section. Connect the heading, primary action and supporting evidence. Show the intended reading order and behavior at a narrow viewport. Keep exploration focused on one page-level story.
@@ -0,0 +1,3 @@
1
+ # Website assumptions
2
+
3
+ Make the offer, audience and next action understandable quickly. Establish a deliberate reading rhythm. Use concrete evidence and meaningful links. Adapt imagery, density and typography to the subject and brand rather than applying a generic landing-page formula.
@@ -0,0 +1,37 @@
1
+ {
2
+ "description": "Three fast ACE directions and one original Taste v2 direction.",
3
+ "verification": "candidate",
4
+ "surfaces": [
5
+ "site"
6
+ ],
7
+ "kinds": [
8
+ "view"
9
+ ],
10
+ "intents": [
11
+ "explore",
12
+ "reimagine"
13
+ ],
14
+ "concurrency": 4,
15
+ "timeout": 1800,
16
+ "variants": [
17
+ {
18
+ "id": "a",
19
+ "preset": "fast",
20
+ "focus": "Direct action and clear hierarchy"
21
+ },
22
+ {
23
+ "id": "b",
24
+ "preset": "fast",
25
+ "focus": "Editorial storytelling and photographic context"
26
+ },
27
+ {
28
+ "id": "c",
29
+ "preset": "fast",
30
+ "focus": "Evidence and trustworthy comparison"
31
+ },
32
+ {
33
+ "id": "d",
34
+ "preset": "taste-v2"
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,18 @@
1
+ concurrency: 3
2
+ description: Fast runnable ACE mockups with shared data and lightweight checks
3
+ verification: tested
4
+ artifact_types: [html]
5
+ process: ace
6
+ directions:
7
+ -
8
+ component: Immediate affordance, visible actions and efficient interaction
9
+ site: Direct action, clear offer and confident hierarchy
10
+ app: Fast queue workflow with efficient scanning and actions
11
+ -
12
+ component: Clear content hierarchy, contextual detail and explicit state feedback
13
+ site: Editorial storytelling with a strong reading rhythm
14
+ app: Contextual detail with a split workspace and supporting history
15
+ -
16
+ component: Calm presentation, progressive disclosure and flexible container behavior
17
+ site: Evidence and proof, concrete outcomes and trustworthy comparison
18
+ app: Calm overview with progressive disclosure and clear priorities
@@ -0,0 +1,48 @@
1
+ {
2
+ "description": "Design engineering across product UI and sites: hierarchy, typography, responsive behavior and visual quality.",
3
+ "verification": "candidate",
4
+ "evidence": [
5
+ "Pinned upstream instructions inspected; complete ACE integration smoke not yet verified."
6
+ ],
7
+ "process": "external",
8
+ "surfaces": [
9
+ "site",
10
+ "app"
11
+ ],
12
+ "kinds": [
13
+ "view",
14
+ "component"
15
+ ],
16
+ "intents": [
17
+ "explore",
18
+ "recreate",
19
+ "reimagine"
20
+ ],
21
+ "artifact_types": [
22
+ "html",
23
+ "image",
24
+ "url"
25
+ ],
26
+ "timeout": 1800,
27
+ "requirements": [
28
+ {
29
+ "name": "Shell",
30
+ "executable": "sh"
31
+ },
32
+ {
33
+ "name": "Impeccable launcher and rendered browser checks",
34
+ "notes": "Original launcher may download its binary; provider policy applies."
35
+ }
36
+ ],
37
+ "limitations": [
38
+ "Original workflow is not shortened to ACE fast mode. Required checks may need tools unavailable to a provider."
39
+ ],
40
+ "skills": [
41
+ {
42
+ "source": "https://github.com/pbakaus/impeccable.git",
43
+ "revision": "6af45ac9a5eb8792f033d3242f52e99812fd91fa",
44
+ "entry": ".agents/skills/impeccable/SKILL.md",
45
+ "role": "lead"
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "description": "Visual exploration, reproduction and iteration on the Superdesign canvas via its CLI.",
3
+ "verification": "candidate",
4
+ "evidence": [
5
+ "Pinned upstream instructions inspected; complete ACE integration smoke not yet verified."
6
+ ],
7
+ "process": "external",
8
+ "surfaces": [
9
+ "site",
10
+ "app"
11
+ ],
12
+ "kinds": [
13
+ "view",
14
+ "component"
15
+ ],
16
+ "intents": [
17
+ "explore",
18
+ "recreate",
19
+ "reimagine"
20
+ ],
21
+ "artifact_types": [
22
+ "html",
23
+ "image",
24
+ "url"
25
+ ],
26
+ "timeout": 1800,
27
+ "requirements": [
28
+ {
29
+ "name": "Node.js",
30
+ "executable": "node"
31
+ },
32
+ {
33
+ "name": "Superdesign authentication and service access",
34
+ "notes": "Original CLI uses its service and may invoke additional models; caller model selects the coding worker only."
35
+ }
36
+ ],
37
+ "limitations": [
38
+ "Original workflow is not shortened to ACE fast mode. Required checks may need tools unavailable to a provider."
39
+ ],
40
+ "skills": [
41
+ {
42
+ "source": "https://github.com/superdesigndev/superdesign-skill.git",
43
+ "revision": "f9f05cd988c247dce6c072eaf9ac6b162f2ffc4b",
44
+ "entry": "skills/superdesign/SKILL.md",
45
+ "role": "lead"
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "description": "Distinctive marketing pages with subject inventory, art direction, visual assets and critique.",
3
+ "verification": "candidate",
4
+ "evidence": [
5
+ "Pinned upstream instructions inspected; complete ACE integration smoke not yet verified."
6
+ ],
7
+ "process": "external",
8
+ "surfaces": [
9
+ "site"
10
+ ],
11
+ "kinds": [
12
+ "view"
13
+ ],
14
+ "intents": [
15
+ "explore",
16
+ "reimagine"
17
+ ],
18
+ "artifact_types": [
19
+ "html",
20
+ "image",
21
+ "url"
22
+ ],
23
+ "timeout": 1800,
24
+ "requirements": [
25
+ {
26
+ "name": "Node.js",
27
+ "executable": "node"
28
+ },
29
+ {
30
+ "name": "Browser inspection and image tools",
31
+ "notes": "Skill requires rendered checks and visual assets; worker must report unavailable tools."
32
+ }
33
+ ],
34
+ "limitations": [
35
+ "Original workflow is not shortened to ACE fast mode. Required checks may need tools unavailable to a provider.",
36
+ "Upstream excludes application UI. Use a separately named explicit adaptation for apps."
37
+ ],
38
+ "skills": [
39
+ {
40
+ "source": "https://github.com/Leonxlnx/taste-skill.git",
41
+ "revision": "f624f37a8c650b9cc550253104925efe4c8de246",
42
+ "entry": "skills/taste-skill/SKILL.md",
43
+ "role": "lead"
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "description": "Searchable UI/UX knowledge for accessibility, interaction, styles, typography and stack-specific implementation.",
3
+ "verification": "candidate",
4
+ "evidence": [
5
+ "Pinned upstream instructions and search scripts exercised in the 2026-10-16 mixed smoke. Browser checks blocked by provider policy; complete integration remains unverified."
6
+ ],
7
+ "process": "external",
8
+ "surfaces": [
9
+ "site",
10
+ "app"
11
+ ],
12
+ "kinds": [
13
+ "view",
14
+ "component"
15
+ ],
16
+ "intents": [
17
+ "explore",
18
+ "recreate",
19
+ "reimagine"
20
+ ],
21
+ "artifact_types": [
22
+ "html",
23
+ "image",
24
+ "url"
25
+ ],
26
+ "timeout": 1800,
27
+ "requirements": [
28
+ {
29
+ "name": "Python 3",
30
+ "executable": "python3"
31
+ },
32
+ {
33
+ "name": "Rendered browser verification",
34
+ "notes": "Original delivery checklist requires keyboard, responsive, motion and reflow checks; provider must support browser execution."
35
+ }
36
+ ],
37
+ "limitations": [
38
+ "Original workflow is not shortened to ACE fast mode. Required checks may need tools unavailable to a provider."
39
+ ],
40
+ "skills": [
41
+ {
42
+ "source": "https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git",
43
+ "revision": "56ea9cf174ed86786187daa9de0e6247cb0747e4",
44
+ "entry": ".claude/skills/ui-ux-pro-max/SKILL.md",
45
+ "role": "lead"
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,8 @@
1
+ name: ace-design
2
+ type: gem
3
+ description: Design guide resources
4
+ priority: 10
5
+ config:
6
+ relative_path: handbook/guides
7
+ pattern: "*.g.md"
8
+ enabled: true
@@ -0,0 +1,8 @@
1
+ name: ace-design
2
+ type: gem
3
+ description: Design skill resources
4
+ priority: 10
5
+ config:
6
+ relative_path: handbook/skills
7
+ pattern: "*/SKILL.md"
8
+ enabled: true
@@ -0,0 +1,8 @@
1
+ name: ace-design
2
+ type: gem
3
+ description: Design tmpl resources
4
+ priority: 10
5
+ config:
6
+ relative_path: handbook/templates
7
+ pattern: "*.template.md"
8
+ enabled: true
@@ -0,0 +1,8 @@
1
+ name: ace-design
2
+ type: gem
3
+ description: Design wfi resources
4
+ priority: 10
5
+ config:
6
+ relative_path: handbook/workflow-instructions
7
+ pattern: "*.wf.md"
8
+ enabled: true
data/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ## [0.2.0] - 2026-10-16
6
+
7
+ ### Added
8
+ - Repeatable `--prompt-append`, inherited session briefs and explicit base replacement, with frozen composition and effective dry-run output.
9
+ - Intent commands `explore`, `recreate` and `reimagine`, immutable image/URL/session sources, and a unified pinned preset catalog with original external processes and typed artifacts.
10
+ - Preset inspection, JSON output, model-free planning, and model-assisted unpublished profile proposals.
11
+ - Inherited project contexts with defaults.md, user.md and effective design.md, transactional AI-assisted adjust/refresh, inspectable reports, freshness checks and site/app adjust skills.
12
+ - View/component task scopes, packaged context defaults and immutable design assumptions in generation sessions.
13
+ - Preset-driven coding-agent generation with shared context/fixtures, per-variant prompts and model assignments, dry-run, status, resume, revision history and explicit selection.
14
+ - Site/app exploration, implementation and audit skills with a shared fast feedback process.
15
+ - Local session validation and loopback preview, pinned Playwright/axe inspection and runtime doctor.
16
+ - Curated contextual cards, six benchmark briefs and an inspiration-to-reviewed-change workflow.
17
+
18
+ ### Changed
19
+ - Replace `generate`, `--context` and `--design-context` with intent commands, `--input` and `--profile`; group project rules under `profile show/adjust/refresh`.
20
+ - Drive site/app exploration through the CLI runner; declare variable-count session variants and bind selection to both artifact and fixture hashes.
21
+ - Compare scaled desktop, tablet and mobile previews with collapsible direction notes.
22
+ - Create mockup sessions under `.ace-local/design/<base36-token>/` using ace-b36ts millisecond tokens.
23
+ - Give default inspection output directories a unique suffix to avoid same-timestamp collisions.
24
+
25
+ ### Fixed
26
+ - Require Node 22.12+ for the pinned inspection dependency and regenerate skills from canonical sources.
27
+ - Isolate embedded variants from gallery DOM access while retaining shared fixtures, and return not-found for directory requests.
28
+ - Preserve child exit status with surviving descendants, clean up interrupted captures, and reject fractional execution limits.
29
+ - Retry readonly profile reads safely when the first publisher creates the transaction lock.
30
+ - Validate missing shared inputs before session allocation and provide complete skill metadata and domain-specific benchmark fixtures.
31
+ - Reject runner sessions missing their task kind or frozen design digest with an actionable error and omit empty user-decision sections.
32
+ - Reuse fresh design ancestors during targeted adjustment and retain the exact published candidate for manual-edit recovery.
33
+ - Preserve the original worker failure or interrupt when diagnostic writes fail, and join every worker before releasing the session lock.
34
+ - Avoid re-raising a caller-handled exception after a successful run; retain recoverable state when final persistence fails.
35
+ - Preserve incomplete browser evidence when browser cleanup fails.
36
+ - Report missing, dangling and cyclic session symlinks as actionable session errors.
37
+ - Use `.template.md` filenames so all packaged design templates resolve through `tmpl://`.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Michal Czyz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # ace-design
2
+
3
+ Fast interactive design directions for websites and web applications, followed by production engineering and evidence-based review.
4
+
5
+ ## Skills
6
+
7
+ | Skill | Outcome |
8
+ | --- | --- |
9
+ | `/as-design-site` | Three lightweight website directions using one shared fixture |
10
+ | `/as-design-app` | Three lightweight web application directions using one shared fixture |
11
+ | `/as-design-site-adjust` / `/as-design-app-adjust` | Personalize and refresh inherited project design assumptions |
12
+ | `/as-design-site-implement` | Production site implementation from an explicit selection |
13
+ | `/as-design-app-implement` | Production app implementation from an explicit selection |
14
+ | `/as-design-site-audit` | Site audit with explicit browser/source coverage |
15
+ | `/as-design-app-audit` | App audit with explicit browser/source coverage |
16
+ | `/as-design-look-for-inspiration` | A researched, tested change prepared for review |
17
+
18
+ Mockup sessions live at `.ace-local/design/<base36-token>/`, using `ace-b36ts encode --format ms`. The session directory contains all variants, shared fixtures, gallery, feedback and selection. Gallery refresh reflects saved progress, not worker liveness; after a crash use `status` and explicitly `resume`. Embedded variants run without same-origin access to the gallery; the preview server exposes public mockup assets with CORS so shared-fixture requests still work. This is parent-page isolation, not a network security sandbox.
19
+
20
+ Explore → compare A/B/C → targeted feedback → select → engineer → verify. Exploration uses one language, mock data and minimal HTML/CSS/JS. Each direction runs in its own coding agent through ace-llm, with concurrency controlled by the design preset. Full review, real integrations, translations and production tests start after selection. Native platforms are intentionally separate future work.
21
+
22
+ ## Install and discover
23
+
24
+ The source package is not yet published. In this monorepo use `bundle install` and `bin/ace-design`. After publication, consumers can install `ace-design`, plus `ace-handbook` and `ace-bundle` for skills, and `ace-search` for knowledge retrieval. Runtime CLI depends only on its declared Ruby dependencies and Node for preview/browser work.
25
+
26
+ Register installed skills explicitly in the consuming project at `.ace/nav/protocols/skill-sources/ace-design.yml`:
27
+
28
+ ```yaml
29
+ name: ace-design
30
+ type: gem
31
+ priority: 10
32
+ config:
33
+ relative_path: handbook/skills
34
+ pattern: "*/SKILL.md"
35
+ enabled: true
36
+ ```
37
+
38
+ Then run `ace-handbook sync --provider agents`. Canonical sources ship in `handbook/skills`; generated skills belong in `.agents/skills`. The package also ships protocol registrations for `wfi://design/*`, `guide://design/process` and `tmpl://design/*`. In this checkout use `bundle exec ace-handbook sync --provider agents` (no handbook binstub is committed).
39
+
40
+ ## Project assumptions
41
+
42
+ Use `ace-design profile adjust --surface app --prompt "Keep routine actions visible"` to create inherited project contexts in `.ace-config/design/`. Each context has defaults.md, user.md and effective design.md. `profile refresh` brings in installed library changes without rewriting user decisions. `ace-design profile show --surface app --kind component` reads the effective assumptions. See [contexts and adjustment](docs/contexts.md) for named scopes, conflicts, dry-run and recovery.
43
+
44
+ ## Generate and iterate
45
+
46
+ ```sh
47
+ bin/ace-design explore --surface app --prompt "Customer support workspace" \
48
+ --preset fast --input docs/product.md \
49
+ --variant-prompt 'a=Fast, keyboard-friendly queue' \
50
+ --variant-prompt 'b=Prominent customer history' \
51
+ --variant-prompt 'c=Calm overview'
52
+ bin/ace-design status .ace-local/design/SESSION
53
+ bin/ace-design preview .ace-local/design/SESSION
54
+ bin/ace-design revise .ace-local/design/SESSION --variant b --prompt "Reduce density"
55
+ bin/ace-design select .ace-local/design/SESSION --variant b --decision "Keep split layout"
56
+ ```
57
+
58
+ `--kind view|component` selects a representative screen or a component in a minimal interactive host. `--profile app/component/data-table` selects a named project context; generation freezes its effective assumptions for every worker and later revision.
59
+
60
+ Commands return concise text by default; `--json` returns structured output. `--dry-run` resolves inputs without models or a session. `resume SESSION` retries unfinished workers. Exit 0 means success or a valid dry-run, 1 means invalid inputs/configuration, and 2 means incomplete execution. Ctrl-C preserves completed results and records interruption.
61
+
62
+ Default `fast` has three slots and concurrency three. Model selection defaults to `role:assign-engineer`, respecting the existing ace-llm configuration and execution policies. It requires a configured coding CLI and credentials. Use design `model`, `--model`, or per-slot selectors to customize it. This is an agent-capable CLI workflow; API-only text models are not supported as primary workers.
63
+
64
+ Preparation creates one shared dataset and differentiated briefs; `--fixtures FILE` preserves supplied JSON bytes instead. Explicit `--input` references are rendered once through ace-bundle with commands and model compression disabled. There is no implicit full-project bundle. `--language` chooses one language (default `en`). Only successful, validated worker artifacts are published; failed revisions keep the previous mockup. Browser inspection remains an explicit later step.
65
+
66
+ See [runner configuration and lifecycle](docs/runner.md) for custom variants, model assignments, extra prompts, evidence and recovery.
67
+
68
+ ## Local commands
69
+
70
+ ```sh
71
+ bin/ace-design --help
72
+ bin/ace-design validate
73
+ bin/ace-design validate .ace-local/design/8xff3p3z
74
+ bin/ace-design preview .ace-local/design/8xff3p3z --port 0
75
+ bin/ace-design doctor
76
+ bin/ace-design inspect http://127.0.0.1:3000 --surface app --out .ace-local/design/check-1
77
+ ```
78
+
79
+ Use unprefixed commands for an installed consumer outside this monorepo. Preview binds only `127.0.0.1`, prints a free port by default, serves session assets and stops on Ctrl-C. It needs Node 22+, but no npm packages or Playwright. Browser inspection needs the separate pinned runtime below. The explore/recreate/reimagine/revise commands launch coding agents through ace-llm. Skills guide the brief, variant-specific prompts, feedback and engineering handoff; the runner owns repeatable execution and artifacts.
80
+
81
+ Inspection returns 0 for clean automatic checks, 1 for findings and 2 for incomplete execution. Invalid inspect input also returns an error; no existing evidence is overwritten. Other commands return 0 on success and nonzero on error. `doctor` is read-only and reports missing setup. A clean report does not establish full accessibility, task completion, visual quality, performance or source correctness.
82
+
83
+ ## Browser setup
84
+
85
+ From this checkout:
86
+
87
+ ```sh
88
+ mkdir -p .ace-local/design/runtime
89
+ cp ace-design/browser/package.json ace-design/browser/package-lock.json .ace-local/design/runtime/
90
+ npm ci --ignore-scripts --prefix .ace-local/design/runtime
91
+ npx --prefix .ace-local/design/runtime playwright install chromium
92
+ bin/ace-design doctor
93
+ ```
94
+
95
+ For an installed gem, `ace-design doctor` reports `manifest_dir` and `runtime_dir`; copy package.json and package-lock.json from the reported manifest directory to the runtime directory, run npm ci there, and install Chromium there with the local Playwright command. Node 22.12+ is required for inspection. Linux hosts may additionally require Playwright system dependencies. Dependencies are pinned; mismatched versions fail explicitly.
96
+
97
+ Configuration follows the standard ACE cascade in `.ace/design/config.yml`:
98
+
99
+ ```yaml
100
+ design:
101
+ node: node
102
+ runtime_dir: .ace-local/design/runtime
103
+ run_root: .ace-local/design
104
+ timeout: 45
105
+ ```
106
+
107
+ Timeout is 1–300 seconds per viewport; the parent bounds the complete run. Runtime/run paths are relative to the invoking working directory. Inspect uses 390, 768 and 1440 pixel viewports, screenshots, axe WCAG-tagged checks, document overflow, image loading and JavaScript/page-load errors. It saves JSON and Markdown with coverage limitations. Image checks observe a bounded loading window: an image still loading is a finding, not proof of a permanently broken asset. A timed-out browser operation may leave partial screenshots; only artifacts listed in the final report are evidence. It has no authenticated-session injection: use an accessible local/test URL or report inaccessible states and verify them separately with an authorized browser session.
108
+
109
+ ## More
110
+
111
+ - [Session and feedback contract](docs/usage.md)
112
+ - [Inspiration sources and weekly prompt](docs/inspiration.md)
113
+ - [Verification and benchmark protocol](docs/testing.md)
114
+ - [Shared workflows](handbook/workflow-instructions/design/)
115
+ - [Curated cards](handbook/catalog/)
116
+
117
+ ## Intent and presets
118
+
119
+ Use `explore` for new directions, `recreate --from SOURCE` for faithful reproduction, and `reimagine --from SOURCE` for a different appearance with the same functions. Sources can be images, URLs or session variants. `preset list` and `preset show NAME` expose original external skills and comparison presets, requirements and verification evidence. See [runner](docs/runner.md). `--dry-run` is model-free and creates no session; `--json` gives machine-readable results.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test" << "lib"
8
+ t.test_files = FileList["test/**/*_test.rb"]
9
+ end
10
+
11
+ task spec: :test
12
+ task default: :test
@@ -0,0 +1,20 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import {createRequire} from 'node:module';
4
+ const expected = JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url),'utf8')).dependencies;
5
+ export function dependencies(directory) {
6
+ const [major, minor] = process.versions.node.split('.').map(Number);
7
+ if (major < 22 || (major === 22 && minor < 12)) throw new Error('Node 22.12+ is required for browser inspection');
8
+ const base = path.resolve(directory);
9
+ for (const [name,version] of Object.entries(expected)) {
10
+ const file = path.join(base,'node_modules',name,'package.json');
11
+ if (!fs.existsSync(file)) throw new Error(`Missing ${name}@${version}; copy packaged browser/package*.json to runtime_dir and run npm ci there`);
12
+ const installed = JSON.parse(fs.readFileSync(file,'utf8')).version;
13
+ if (installed !== version) throw new Error(`Expected ${name}@${version}, found ${installed}; run npm ci with the packaged lockfile`);
14
+ }
15
+ const require = createRequire(path.join(base,'package.json'));
16
+ const {chromium} = require('playwright');
17
+ if (!fs.existsSync(chromium.executablePath())) throw new Error('Chromium missing; run npx playwright install chromium in runtime_dir');
18
+ const axe = require('@axe-core/playwright');
19
+ return {chromium, AxeBuilder: axe.default || axe, versions: expected};
20
+ }
@@ -0,0 +1,7 @@
1
+ import {dependencies} from './dependencies.mjs';
2
+ try {
3
+ const {chromium,versions} = dependencies(process.argv[2]);
4
+ const browser = await chromium.launch({headless:true});
5
+ await browser.close();
6
+ console.log(JSON.stringify({ready:true,node:process.version,versions,browser:chromium.executablePath()}));
7
+ } catch(e) {console.log(JSON.stringify({ready:false,node:process.version,error:e.message}));process.exitCode=1;}
@@ -0,0 +1,61 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import {dependencies} from './dependencies.mjs';
4
+ const [url,surface,out,runtime,seconds='45'] = process.argv.slice(2);
5
+ const timeout = Number(seconds)*1000;
6
+ const report = {schema_version:1,url,surface,status:'incomplete',viewports:[],findings:[],errors:[],coverage:{automated:['axe WCAG 2.2 A/AA','document overflow','broken images','page load and JavaScript errors'],manual_required:['visual hierarchy','text clipping and overlays','keyboard task completion','required states and languages','brand and content fit'],source:'not inspected'}};
7
+ let browser;
8
+ const add = (rule,width,details) => report.findings.push({rule,width,...details});
9
+ try {
10
+ if(!['site','app'].includes(surface)) throw new Error('surface must be site or app');
11
+ const target=new URL(url);
12
+ if(!['http:','https:'].includes(target.protocol)||target.username||target.password) throw new Error('HTTP(S) URL without credentials required');
13
+ const {chromium,AxeBuilder,versions}=dependencies(runtime);
14
+ report.versions=versions;
15
+ browser=await chromium.launch({headless:true});
16
+ for (const [width,height] of [[390,844],[768,1024],[1440,900]]) {
17
+ const context=await browser.newContext({viewport:{width,height},reducedMotion:'reduce'});
18
+ const page=await context.newPage();
19
+ page.setDefaultTimeout(timeout);
20
+ page.setDefaultNavigationTimeout(timeout);
21
+ page.on('pageerror',e=>add('javascript-error',width,{message:e.message}));
22
+ let timer;
23
+ try {
24
+ const audit = async()=>{
25
+ const response=await page.goto(url,{waitUntil:'load'});
26
+ if(!response || response.status()>=400) throw new Error(`HTTP load failed: ${response?.status() ?? 'no response'}`);
27
+ await page.evaluate(()=>document.fonts.ready);
28
+ // Trigger lazy content once, with a bounded number of screens, then return to the top.
29
+ const screens=await page.evaluate(()=>Math.min(12,Math.ceil(document.body.scrollHeight/innerHeight)));
30
+ for(let i=1;i<screens;i++){await page.evaluate(y=>scrollTo(0,y),i*height);await page.waitForTimeout(80);}
31
+ await page.evaluate(()=>scrollTo(0,0));
32
+ const metrics=await page.evaluate(()=>({
33
+ overflow:document.documentElement.scrollWidth>innerWidth+1,
34
+ broken:[...document.images].filter(i=>i.complete && !i.naturalWidth).map(i=>i.getAttribute('src')),
35
+ pending:[...document.images].filter(i=>!i.complete).map(i=>i.getAttribute('src')),
36
+ title:document.title
37
+ }));
38
+ if(metrics.overflow)add('horizontal-overflow',width,{message:'Document exceeds viewport width'});
39
+ for(const src of metrics.broken)add('broken-image',width,{src});
40
+ for(const src of metrics.pending)add('image-not-loaded',width,{src});
41
+ const screenshot=`viewport-${width}.png`;
42
+ await page.screenshot({path:path.join(out,screenshot),fullPage:true,animations:'disabled',timeout});
43
+ const accessibility=await new AxeBuilder({page}).withTags(['wcag2a','wcag2aa','wcag21a','wcag21aa','wcag22aa']).analyze();
44
+ for(const violation of accessibility.violations)add('accessibility',width,{id:violation.id,impact:violation.impact,message:violation.help,help_url:violation.helpUrl,nodes:violation.nodes.map(n=>({target:n.target,summary:n.failureSummary}))});
45
+ report.viewports.push({width,height,screenshot,title:metrics.title,axe_incomplete:accessibility.incomplete.map(v=>({id:v.id,help:v.help})),status:'inspected'});
46
+ };
47
+ await Promise.race([audit(),new Promise((_,reject)=>{timer=setTimeout(()=>reject(new Error('Viewport inspection timed out')),timeout);})]);
48
+ } catch(e) {report.errors.push({width,message:e.message});}
49
+ finally {clearTimeout(timer);await context.close();}
50
+ }
51
+ report.status=report.errors.length || report.viewports.length!==3 ? 'incomplete' : report.findings.length ? 'findings' : 'pass';
52
+ } catch(e){report.errors.push({message:e.message});}
53
+ finally {
54
+ try {if(browser)await browser.close();}
55
+ catch(e){report.errors.push({message:`Browser cleanup failed: ${e.message}`});report.status='incomplete';}
56
+ fs.writeFileSync(path.join(out,'report.json'),JSON.stringify(report,null,2)+'\n');
57
+ const lines=[`# Design inspection: ${report.status}`,`\nSurface: ${surface}`,`\nURL: ${url}`,`\nViewports inspected: ${report.viewports.length}/3`,`\nFindings: ${report.findings.length}`,`\n## Findings`,...report.findings.map(f=>`- ${f.width}px ${f.rule}: ${f.message || f.src || f.id}`),`\n## Errors`,...report.errors.map(e=>`- ${e.width || 'runner'}: ${e.message}`),`\n## Coverage`,`\nAutomated: ${report.coverage.automated.join('; ')}.`,`\nStill requires review: ${report.coverage.manual_required.join('; ')}.`,`\nSource: not inspected. A pass only covers the automatic checks.`,...report.viewports.map(v=>`\n![${v.width}px](${v.screenshot})\nAxe checks requiring review: ${v.axe_incomplete.length}.`)];
58
+ fs.writeFileSync(path.join(out,'report.md'),lines.join('\n')+'\n');
59
+ console.log(JSON.stringify({status:report.status,report:path.join(out,'report.json')}));
60
+ process.exitCode=report.status==='pass'?0:report.status==='findings'?1:2;
61
+ }