Skip to content

Commit 47f44c1

Browse files
committed
Audit > Accessibility expansion, data/component/API context surfaces, doc + skill refresh
Audit > Accessibility now paints per-violation overlays on the iframe (impact-colored, lifecycle-bound to the active scan), adds a tab-order overlay with numbered badges and tab/visual-mismatch detection, and an Accessibility section in the inspector showing computed name/role/contrast/ARIA. a11y_fix tasks always carry element_context plus a per-element a11y block (computed name, role, tabindex, focus indicator, contrast, ARIA attrs); apply-skill replaces the generic a11y paragraph with a per-rule playbook covering color-contrast, label, button-name, landmark, heading-order, aria-*, tabindex/tab-order, and document-head rules. Bridge gains resolve:by-selectors, compute:accessibility-info, compute:tab-order, scroll:into-view; useA11yHighlights mirrors the useDataHighlights rAF pattern. Plus the data/component/API tooling that landed alongside: code-context/component-context/component-examples/component-usage/data-context/data-source-* server modules, api-schema-resolver/scanner, binding-analysis package, matching MCP tools (annotask_get_code_context, annotask_get_data_*, annotask_get_api_*, annotask_resolve_endpoint) and CLI commands. Shell adds DataSourcesPage, DataSourceDetailPane, ComponentsPage, FlowDiagram, useDataHighlights / useDataSources / useProjectComponents / useComponentContextCapture composables. Docs (README, SETUP, docs/*) refreshed; AGENTS.md, CLAUDE.md updated; old ContextOverlay removed.
1 parent 24af3e9 commit 47f44c1

94 files changed

Lines changed: 14270 additions & 1081 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Annotask
22

3-
Visual UI design tool for web apps (Vue, React, Svelte, SolidJS, Astro, plain HTML/htmx). Developers make visual changes in the browser and Annotask generates structured reports that AI agents can apply to source code. Works with Vite and Webpack.
3+
Visual UI design and review tool for web apps (Vue, React, Svelte, SolidJS, Astro, plain HTML/htmx). Developers can annotate the UI, inspect and edit styles live, audit runtime issues, and let AI agents apply the resulting structured tasks to source code. Works with Vite and Webpack.
44

55
## MCP Server
66

@@ -14,8 +14,18 @@ Annotask includes an MCP server that starts automatically with the dev server at
1414
| `annotask_create_task` | Create a new pending task |
1515
| `annotask_delete_task` | Delete a task and its screenshot |
1616
| `annotask_get_design_spec` | Design spec summary, or full tokens for a `category` (colors, typography, etc.) |
17-
| `annotask_get_components` | Search component libraries by name. Returns up to 20 results per library |
17+
| `annotask_get_components` | Search component libraries by name, library, category, or usage state |
18+
| `annotask_get_component` | Get full detail for one component by name |
19+
| `annotask_get_component_examples` | Get real in-repo usage examples for a component |
1820
| `annotask_get_screenshot` | Task screenshot as base64 PNG |
21+
| `annotask_get_code_context` | Ground a task to current source context (excerpt, symbol, imports, hash) |
22+
| `annotask_get_data_context` | Resolve task data context |
23+
| `annotask_get_data_sources` | List detected data libraries and project data sources |
24+
| `annotask_get_data_source_examples` | Get real in-repo usage examples for a data source |
25+
| `annotask_get_data_source_details` | Get definition-level detail for a data source |
26+
| `annotask_get_api_schemas` | List discovered OpenAPI, GraphQL, tRPC, and JSON Schema sources |
27+
| `annotask_get_api_operation` | Fetch one API operation by path |
28+
| `annotask_resolve_endpoint` | Match a concrete URL to a known API operation |
1929

2030
### Applying tasks via MCP
2131

@@ -56,6 +66,15 @@ annotask update-task <id> --status=<status> # Update task status
5666
annotask screenshot <id> # Download a task's screenshot
5767
annotask components [search] # List components (add --mcp for JSON)
5868
annotask component <Name> # Show component props
69+
annotask code-context <id> # Ground task to current source excerpt
70+
annotask component-examples Button # Real in-repo component usage examples
71+
annotask data-context <id> # Resolve task data context
72+
annotask data-sources # List data libraries + project data sources
73+
annotask data-source-examples useUserQuery # Real in-repo data-source usages
74+
annotask data-source-details useUserQuery # Definition-level data-source detail
75+
annotask api-schemas # Discovered API schemas
76+
annotask api-operation /users --method=GET # One resolved API operation
77+
annotask resolve-endpoint /api/users/42 # Match a concrete URL to a known schema
5978
annotask init-skills # Install agent skills into project
6079
annotask init-mcp # Write editor MCP config (--editor=claude|cursor|vscode|windsurf|all)
6180
annotask mcp # Start MCP stdio server (proxies to dev server)
@@ -69,7 +88,8 @@ that matches the `annotask_*` MCP tool responses (`visual` stripped,
6988
Options: `--port=N`, `--host=H`, `--server=URL` (override server.json),
7089
`--mfe=NAME` (filter by MFE), `--output=PATH` (screenshot), `--mcp`,
7190
`--detail` (tasks), `--status=STATUS` (tasks), `--category=NAME` (design-spec),
72-
`--library=NAME` / `--limit=N` / `--offset=N` (components).
91+
`--library=NAME` / `--limit=N` / `--offset=N` (components), `--context-lines=N`,
92+
`--refresh`, `--used-only`, `--kind=K`, `--method=M`, `--schema-location=L`, `--search=Q`.
7393

7494
## Annotask API
7595

@@ -80,6 +100,21 @@ Options: `--port=N`, `--host=H`, `--server=URL` (override server.json),
80100
- `PATCH /__annotask/api/tasks/:id` — Update task status
81101
- `DELETE /__annotask/api/tasks/:id` — Delete a task and its screenshot
82102
- `GET /__annotask/api/design-spec` — Design spec (tokens, framework, breakpoints)
103+
- `GET /__annotask/api/components` — Component library catalog
104+
- `GET /__annotask/api/component-usage` — Project component usage index
105+
- `GET /__annotask/api/component-examples/:name` — In-repo component usage examples
106+
- `GET /__annotask/api/code-context/:taskId` — Ground task to current source context
107+
- `GET /__annotask/api/source-excerpt` — Direct source excerpt by file/line
108+
- `GET /__annotask/api/data-context/:taskId` — Stored or resolved task data context
109+
- `GET /__annotask/api/data-context/probe|resolve|element` — Shell data-context helpers
110+
- `GET /__annotask/api/data-sources` — Project data-source catalog
111+
- `GET /__annotask/api/data-source-examples/:name` — In-repo data-source usage examples
112+
- `GET /__annotask/api/data-source-details/:name` — Definition-level data-source detail
113+
- `GET /__annotask/api/data-source-bindings/:name` — Binding graph for highlights
114+
- `GET /__annotask/api/api-schemas` — API schema catalog
115+
- `GET /__annotask/api/api-operation` — One API operation by path
116+
- `GET /__annotask/api/resolve-endpoint` — Resolve a concrete URL to a known operation
117+
- `GET|POST /__annotask/api/performance` — Performance snapshots
83118
- `POST /__annotask/api/screenshots` — Upload a screenshot
84119
- `GET /__annotask/screenshots/:filename` — Serve a screenshot
85120
- `GET /__annotask/api/status` — Health check
@@ -210,6 +245,7 @@ Users create custom themes via Settings > Appearance > "+ Create Custom Theme".
210245
- **A11y checker** — axe-core WCAG scanning with one-click fix task creation (locally bundled, no CDN)
211246
- **Error monitoring** — Console error/warn capture with deduplication, bounded memory, one-click fix tasks
212247
- **Performance monitoring** — Web Vitals, DOM/resource/bundle analysis, interaction recording, perf score, one-click fix tasks
248+
- **Data view** — Discovered data sources, schema matching, page highlights, and `api_update` task creation
213249
- **Screenshots** — Snipping tool captures regions or full page, attached to tasks, served via API, auto-cleaned on accept (max 4MB)
214250
- **Task detail drawer** — Slide-out detail view with markdown rendering, inline editing, screenshot lightbox, element/file display, interaction log, JSON view, delete button
215251
- **Task lifecycle**`pending → in_progress → review → accepted/denied` with `needs_info` (agent asks questions) and `blocked` (agent can't apply) statuses, resolution messages, live status updates
@@ -228,16 +264,22 @@ Users create custom themes via Settings > Appearance > "+ Create Custom Theme".
228264

229265
## Task Types
230266

267+
Canonical list — `TASK_TYPES` in `src/schema.ts` is the single source of truth. HTTP, MCP, and CLI creation boundaries enforce this allow-list via `z.enum(TASK_TYPES)`.
268+
231269
| Type | Source | Description |
232270
|------|--------|-------------|
233271
| `annotation` | Pins, arrows, notes, text highlights | User intent described in `description`, optional `action` and `context` |
272+
| `section_request` | Drawn sections | New content area with `description` and `placement` |
234273
| `style_update` | Inspector style/class edits | CSS changes in `context.changes` array with `property`, `before`, `after` |
235274
| `theme_update` | Theme page token edits | Design token changes with `category`, `role`, `before`, `after`, `cssVar` |
236-
| `section_request` | Drawn sections | New content area with `description` and `placement` |
237275
| `a11y_fix` | A11y panel violations | WCAG fix with `rule`, `impact`, `help`, `elements` in `context` |
276+
| `error_fix` | Errors tab "Fix" action | Console error/warning with `level`, `occurrences`, `errorId` in `context` |
277+
| `perf_fix` | Perf tab "Fix" action | Performance finding with `metric`, `value`, `unit`, `severity`, `category`, `findingId` in `context` |
278+
| `api_update` | Data view | Backend-contract edits for in-repo data sources; `context` carries `data_source_name`, `data_source_kind`, `schema_location`, `schema_kind`, `endpoint`, and desired change metadata |
238279

239280
## Task Lifecycle
240281

241282
```
242283
pending → in_progress (agent locks) → review (agent done) → accepted (removed) or denied (with feedback)
284+
└→ needs_info (agent asks) / blocked (cannot apply)
243285
```

CLAUDE.md

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Annotask
22

3-
Visual UI design tool for web apps (Vue, React, Svelte, SolidJS, Astro, plain HTML/htmx). Developers make visual changes in the browser and Annotask generates structured reports that AI agents can apply to source code. Works with Vite and Webpack.
3+
Visual UI design and review tool for web apps (Vue, React, Svelte, SolidJS, Astro, plain HTML/htmx). Developers can annotate the UI, inspect and edit styles live, audit runtime issues, and let AI agents apply the resulting structured tasks to source code. Works with Vite and Webpack.
44

55
## MCP Server
66

@@ -14,8 +14,18 @@ Annotask includes an MCP server that starts automatically with the dev server at
1414
| `annotask_create_task` | Create a new pending task |
1515
| `annotask_delete_task` | Delete a task and its screenshot |
1616
| `annotask_get_design_spec` | Design spec summary, or full tokens for a `category` (colors, typography, etc.) |
17-
| `annotask_get_components` | Search component libraries by name. Returns up to 20 results per library |
17+
| `annotask_get_components` | Search component libraries by name, library, category, or usage state |
18+
| `annotask_get_component` | Get full detail for one component by name |
19+
| `annotask_get_component_examples` | Get real in-repo usage examples for a component |
1820
| `annotask_get_screenshot` | Task screenshot as base64 PNG |
21+
| `annotask_get_code_context` | Ground a task to current source context (excerpt, symbol, imports, hash) |
22+
| `annotask_get_data_context` | Resolve task data context |
23+
| `annotask_get_data_sources` | List detected data libraries and project data sources |
24+
| `annotask_get_data_source_examples` | Get real in-repo usage examples for a data source |
25+
| `annotask_get_data_source_details` | Get definition-level detail for a data source |
26+
| `annotask_get_api_schemas` | List discovered OpenAPI, GraphQL, tRPC, and JSON Schema sources |
27+
| `annotask_get_api_operation` | Fetch one API operation by path |
28+
| `annotask_resolve_endpoint` | Match a concrete URL to a known API operation |
1929

2030
### Applying tasks via MCP
2131

@@ -56,6 +66,15 @@ annotask update-task <id> --status=<status> # Update task status
5666
annotask screenshot <id> # Download a task's screenshot
5767
annotask components [search] # List components (add --mcp for JSON)
5868
annotask component <Name> # Show component props
69+
annotask code-context <id> # Ground task to current source excerpt
70+
annotask component-examples Button # Real in-repo component usage examples
71+
annotask data-context <id> # Resolve task data context
72+
annotask data-sources # List data libraries + project data sources
73+
annotask data-source-examples useUserQuery # Real in-repo data-source usages
74+
annotask data-source-details useUserQuery # Definition-level data-source detail
75+
annotask api-schemas # Discovered API schemas
76+
annotask api-operation /users --method=GET # One resolved API operation
77+
annotask resolve-endpoint /api/users/42 # Match a concrete URL to a known schema
5978
annotask init-skills # Install agent skills into project
6079
annotask init-mcp # Write editor MCP config (--editor=claude|cursor|vscode|windsurf|all)
6180
annotask mcp # Start MCP stdio server (proxies to dev server)
@@ -69,7 +88,8 @@ that matches the `annotask_*` MCP tool responses (`visual` stripped,
6988
Options: `--port=N`, `--host=H`, `--server=URL` (override server.json),
7089
`--mfe=NAME` (filter by MFE), `--output=PATH` (screenshot), `--mcp`,
7190
`--detail` (tasks), `--status=STATUS` (tasks), `--category=NAME` (design-spec),
72-
`--library=NAME` / `--limit=N` / `--offset=N` (components).
91+
`--library=NAME` / `--limit=N` / `--offset=N` (components), `--context-lines=N`,
92+
`--refresh`, `--used-only`, `--kind=K`, `--method=M`, `--schema-location=L`, `--search=Q`.
7393

7494
## Annotask API
7595

@@ -80,6 +100,21 @@ Options: `--port=N`, `--host=H`, `--server=URL` (override server.json),
80100
- `PATCH /__annotask/api/tasks/:id` — Update task status
81101
- `DELETE /__annotask/api/tasks/:id` — Delete a task and its screenshot
82102
- `GET /__annotask/api/design-spec` — Design spec (tokens, framework, breakpoints)
103+
- `GET /__annotask/api/components` — Component library catalog
104+
- `GET /__annotask/api/component-usage` — Project component usage index
105+
- `GET /__annotask/api/component-examples/:name` — In-repo component usage examples
106+
- `GET /__annotask/api/code-context/:taskId` — Ground task to current source context
107+
- `GET /__annotask/api/source-excerpt` — Direct source excerpt by file/line
108+
- `GET /__annotask/api/data-context/:taskId` — Stored or resolved task data context
109+
- `GET /__annotask/api/data-context/probe|resolve|element` — Shell data-context helpers
110+
- `GET /__annotask/api/data-sources` — Project data-source catalog
111+
- `GET /__annotask/api/data-source-examples/:name` — In-repo data-source usage examples
112+
- `GET /__annotask/api/data-source-details/:name` — Definition-level data-source detail
113+
- `GET /__annotask/api/data-source-bindings/:name` — Binding graph for highlights
114+
- `GET /__annotask/api/api-schemas` — API schema catalog
115+
- `GET /__annotask/api/api-operation` — One API operation by path
116+
- `GET /__annotask/api/resolve-endpoint` — Resolve a concrete URL to a known operation
117+
- `GET|POST /__annotask/api/performance` — Performance snapshots
83118
- `POST /__annotask/api/screenshots` — Upload a screenshot
84119
- `GET /__annotask/screenshots/:filename` — Serve a screenshot
85120
- `GET /__annotask/api/status` — Health check
@@ -105,6 +140,16 @@ Use `/annotask-apply` to fetch and apply pending visual changes to source code.
105140

106141
## Shell Architecture
107142

143+
The shell has **3 top-level tabs** (see `useShellNavigation.ts`):
144+
145+
| Tab | Internal id | Sub-sections |
146+
|-----|-------------|--------------|
147+
| **Annotate** | `editor` | — (pins, arrows, sections, highlights) |
148+
| **Design** | `design` | `tokens` / `inspector` / `components` |
149+
| **Audit** | `develop` | `a11y` / `data` / `libraries` / `perf` / `errors` |
150+
151+
The "Audit" tab uses internal id `develop` (the label was renamed but the id was kept to avoid a breaking localStorage migration). Tab state lives in `useShellNavigation` (`shellView`, `designSection`, `developSection`, `activePanel`), persisted to localStorage and migrated from legacy ids (`theme`, `components`, `data`, `perf`, `a11y`) on first run.
152+
108153
`App.vue` is the shell orchestrator — it wires composables together and handles bridge events. **Do not add business logic directly to App.vue.** Extract new concerns into composables under `src/shell/composables/`.
109154

110155
Key composables:
@@ -210,6 +255,7 @@ Users create custom themes via Settings > Appearance > "+ Create Custom Theme".
210255
- **A11y checker** — axe-core WCAG scanning with one-click fix task creation (locally bundled, no CDN)
211256
- **Error monitoring** — Console error/warn capture with deduplication, bounded memory, one-click fix tasks
212257
- **Performance monitoring** — Web Vitals, DOM/resource/bundle analysis, interaction recording, perf score, one-click fix tasks
258+
- **Data view** — Discovered data sources, schema matching, page highlights, and `api_update` task creation
213259
- **Screenshots** — Snipping tool captures regions or full page, attached to tasks, served via API, auto-cleaned on accept (max 4MB)
214260
- **Task detail drawer** — Slide-out detail view with markdown rendering, inline editing, screenshot lightbox, element/file display, interaction log, JSON view, delete button
215261
- **Task lifecycle**`pending → in_progress → review → accepted/denied` with `needs_info` (agent asks questions) and `blocked` (agent can't apply) statuses, resolution messages, live status updates
@@ -228,16 +274,22 @@ Users create custom themes via Settings > Appearance > "+ Create Custom Theme".
228274

229275
## Task Types
230276

277+
Canonical list — `TASK_TYPES` in `src/schema.ts` is the single source of truth. HTTP, MCP, and CLI creation boundaries enforce this allow-list via `z.enum(TASK_TYPES)`.
278+
231279
| Type | Source | Description |
232280
|------|--------|-------------|
233281
| `annotation` | Pins, arrows, notes, text highlights | User intent described in `description`, optional `action` and `context` |
282+
| `section_request` | Drawn sections | New content area with `description` and `placement` |
234283
| `style_update` | Inspector style/class edits | CSS changes in `context.changes` array with `property`, `before`, `after` |
235284
| `theme_update` | Theme page token edits | Design token changes with `category`, `role`, `before`, `after`, `cssVar` |
236-
| `section_request` | Drawn sections | New content area with `description` and `placement` |
237285
| `a11y_fix` | A11y panel violations | WCAG fix with `rule`, `impact`, `help`, `elements` in `context` |
286+
| `error_fix` | Errors tab "Fix" action | Console error/warning with `level`, `occurrences`, `errorId` in `context` |
287+
| `perf_fix` | Perf tab "Fix" action | Performance finding with `metric`, `value`, `unit`, `severity`, `category`, `findingId` in `context` |
288+
| `api_update` | Data view | Backend-contract edits for in-repo data sources; `context` carries `data_source_name`, `data_source_kind`, `schema_location`, `schema_kind`, `endpoint`, and desired change metadata |
238289

239290
## Task Lifecycle
240291

241292
```
242293
pending → in_progress (agent locks) → review (agent done) → accepted (removed) or denied (with feedback)
294+
└→ needs_info (agent asks) / blocked (cannot apply)
243295
```

0 commit comments

Comments
 (0)