annotask 0.0.5 → 0.0.7
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/README.md +24 -8
- package/dist/chunk-2PL37QTY.js +1043 -0
- package/dist/chunk-2PL37QTY.js.map +1 -0
- package/dist/chunk-4J7F2BC5.js +61 -0
- package/dist/chunk-4J7F2BC5.js.map +1 -0
- package/dist/chunk-DPJXWLPB.js +61 -0
- package/dist/chunk-DPJXWLPB.js.map +1 -0
- package/dist/chunk-DQBM2VFQ.js +465 -0
- package/dist/chunk-DQBM2VFQ.js.map +1 -0
- package/dist/chunk-FMNBQLJZ.js +61 -0
- package/dist/chunk-FMNBQLJZ.js.map +1 -0
- package/dist/chunk-LGNV6UH3.js +488 -0
- package/dist/chunk-LGNV6UH3.js.map +1 -0
- package/dist/chunk-TBBJTSMJ.js +496 -0
- package/dist/chunk-TBBJTSMJ.js.map +1 -0
- package/dist/cli.js +44 -1
- package/dist/index.js +2 -2
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/shell/assets/index-B-SRjSQF.js +59 -0
- package/dist/shell/assets/{index-En0AXNAK.css → index-CeF02UAx.css} +1 -1
- package/dist/shell/index.html +2 -2
- package/dist/standalone.js +2 -2
- package/dist/vendor/axe-core.min.js +12 -0
- package/dist/vendor/html2canvas.min.js +20 -0
- package/dist/webpack.js +3 -3
- package/package.json +8 -3
- package/skills/annotask-apply/SKILL.md +27 -31
- package/skills/annotask-init/SKILL.md +42 -6
- package/dist/shell/assets/index-Dko9s8T0.js +0 -59
- package/skills/annotask-watch/SKILL.md +0 -45
|
@@ -16,37 +16,18 @@ Annotask is a visual markup tool that integrates with Vite and Webpack. The user
|
|
|
16
16
|
|
|
17
17
|
## Steps
|
|
18
18
|
|
|
19
|
-
### 0.
|
|
20
|
-
|
|
21
|
-
Read `.annotask/server.json` in the **current working directory only** (never search parent directories):
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
cat .annotask/server.json
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This returns `{ "url": "http://localhost:PORT", "port": PORT }`. Use the `url` value as `BASE_URL` for all API calls below.
|
|
28
|
-
|
|
29
|
-
If the file contains a `"mfe"` field (e.g. `"mfe": "@myorg/my-mfe"`), this project is a **micro-frontend** and the server is running on a remote root shell. Save the `mfe` value as `MFE_FILTER` — you will use it to filter tasks in step 1.
|
|
30
|
-
|
|
31
|
-
If the file does not exist, probe for a running server:
|
|
19
|
+
### 0. Check server status
|
|
32
20
|
|
|
33
21
|
```bash
|
|
34
|
-
|
|
35
|
-
curl -s http://localhost:5173/__annotask/api/status
|
|
22
|
+
annotask status
|
|
36
23
|
```
|
|
37
24
|
|
|
38
|
-
|
|
25
|
+
If this fails, the Annotask dev server isn't running. Ask the user to start it.
|
|
39
26
|
|
|
40
27
|
### 1. Fetch pending tasks
|
|
41
28
|
|
|
42
|
-
If `MFE_FILTER` is set (from step 0), append it as a query parameter to filter tasks for this project:
|
|
43
|
-
|
|
44
29
|
```bash
|
|
45
|
-
|
|
46
|
-
curl -s $BASE_URL/__annotask/api/tasks
|
|
47
|
-
|
|
48
|
-
# With MFE filter (micro-frontend setup):
|
|
49
|
-
curl -s $BASE_URL/__annotask/api/tasks?mfe=$MFE_FILTER
|
|
30
|
+
annotask tasks
|
|
50
31
|
```
|
|
51
32
|
|
|
52
33
|
Response:
|
|
@@ -62,13 +43,24 @@ Response:
|
|
|
62
43
|
"file": "src/components/Header.vue",
|
|
63
44
|
"line": 5,
|
|
64
45
|
"action": "text_edit",
|
|
65
|
-
"context": { "element_tag": "header" }
|
|
46
|
+
"context": { "element_tag": "header" },
|
|
47
|
+
"screenshot": "screenshot-1711800000-ab3kf.png"
|
|
66
48
|
}
|
|
67
49
|
]
|
|
68
50
|
}
|
|
69
51
|
```
|
|
70
52
|
|
|
71
|
-
Each task has: `id`, `type`, `status`, `description` (what to do), `file`, `line`, `component`, and optionally `action` and `
|
|
53
|
+
Each task has: `id`, `type`, `status`, `description` (what to do), `file`, `line`, `component`, and optionally `action`, `context` with element details, and `screenshot` with a filename.
|
|
54
|
+
|
|
55
|
+
### Screenshot reference
|
|
56
|
+
|
|
57
|
+
Some tasks include a `screenshot` field. The screenshot shows exactly what the user sees in the browser. To view it:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
annotask screenshot TASK_ID
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This downloads the PNG to `.annotask/screenshots/`. Use it as visual context alongside the task description and source code.
|
|
72
64
|
|
|
73
65
|
### 2. Process each pending task
|
|
74
66
|
|
|
@@ -80,10 +72,12 @@ Filter for `status: "pending"` tasks. For each:
|
|
|
80
72
|
|
|
81
73
|
- **`annotation` with no action**: This is a free-text note. Read `description` and apply your best judgment to the source code. If `context.to_element` is present, this is an arrow annotation referencing two elements.
|
|
82
74
|
|
|
83
|
-
- **`style_update`**: Apply CSS property
|
|
75
|
+
- **`style_update`**: Apply CSS property changes. The `context.changes` array contains each change with `property`, `before`, and `after` values. Use scoped styles, inline styles, or Tailwind classes based on project patterns.
|
|
84
76
|
|
|
85
77
|
- **`section_request`**: Create a new section in the template near the referenced element. The `description` field describes what content to create. `placement` gives spatial hints.
|
|
86
78
|
|
|
79
|
+
- **`a11y_fix`**: Fix an accessibility violation. The `context` contains `rule` (axe rule ID), `impact`, `help` (what to fix), `helpUrl` (WCAG reference), and `elements` array with `html` snippets, `selector`, `fix` suggestions, and source `file`/`line`/`component`.
|
|
80
|
+
|
|
87
81
|
- **`theme_update`**: A design token value change from the Theme page. The `context` object contains:
|
|
88
82
|
- `category`: which token category (`colors`, `typography.families`, `typography.scale`, `spacing`, `borders.radius`)
|
|
89
83
|
- `role`: semantic role name (e.g., `primary`, `background`, `heading`)
|
|
@@ -102,12 +96,10 @@ Filter for `status: "pending"` tasks. For each:
|
|
|
102
96
|
|
|
103
97
|
### 3. Mark tasks as ready for review
|
|
104
98
|
|
|
105
|
-
After applying each task
|
|
99
|
+
After applying each task:
|
|
106
100
|
|
|
107
101
|
```bash
|
|
108
|
-
|
|
109
|
-
-H "Content-Type: application/json" \
|
|
110
|
-
-d '{"status": "review"}'
|
|
102
|
+
annotask update-task TASK_ID --status=review
|
|
111
103
|
```
|
|
112
104
|
|
|
113
105
|
### 4. Report to the user
|
|
@@ -125,7 +117,11 @@ If there are tasks with `status: "denied"` and a `feedback` field, the user reje
|
|
|
125
117
|
|
|
126
118
|
## Also check the live report
|
|
127
119
|
|
|
128
|
-
|
|
120
|
+
```bash
|
|
121
|
+
annotask report
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
This returns both the live report (current session markup) and tasks. Use it as additional context — it shows what's on the user's screen right now. But tasks are the source of truth for what to apply.
|
|
129
125
|
|
|
130
126
|
## Task lifecycle
|
|
131
127
|
|
|
@@ -122,7 +122,36 @@ Search for:
|
|
|
122
122
|
|
|
123
123
|
Use roles: `sm`, `md`, `lg`, `xl`, `full` (match by name or ascending size).
|
|
124
124
|
|
|
125
|
-
### 6.
|
|
125
|
+
### 6. Scan breakpoints
|
|
126
|
+
|
|
127
|
+
Detect responsive breakpoints from whatever styling system the project uses. Output as a flat object mapping name → min-width value.
|
|
128
|
+
|
|
129
|
+
**Sources (check in order):**
|
|
130
|
+
|
|
131
|
+
1. **Tailwind v4** (>= 4): Look in CSS files for `@theme` blocks defining `--breakpoint-*` custom properties, or `@custom-media` rules.
|
|
132
|
+
|
|
133
|
+
2. **Tailwind v3** (< 4): Read `tailwind.config.{js,ts,mjs}`. Extract `theme.screens` or `theme.extend.screens`. Default Tailwind screens: `{ "sm": "640px", "md": "768px", "lg": "1024px", "xl": "1280px", "2xl": "1536px" }` — use these as fallback if Tailwind is detected but no custom screens are defined.
|
|
134
|
+
|
|
135
|
+
3. **Bootstrap**: Check for `bootstrap` in package.json. Default Bootstrap breakpoints: `{ "sm": "576px", "md": "768px", "lg": "992px", "xl": "1200px", "xxl": "1400px" }`.
|
|
136
|
+
|
|
137
|
+
4. **CSS custom properties**: Search `:root` for variables containing `breakpoint`, `screen`, `bp` in the name (e.g., `--bp-mobile: 480px`).
|
|
138
|
+
|
|
139
|
+
5. **CSS `@media` patterns**: Scan `.css`, `.scss`, `.vue` files for `@media` queries with `min-width` or `max-width`. Extract the 3–6 most common breakpoint values and assign roles by ascending size: `sm`, `md`, `lg`, `xl`, `2xl`.
|
|
140
|
+
|
|
141
|
+
**Output example:**
|
|
142
|
+
```json
|
|
143
|
+
"breakpoints": {
|
|
144
|
+
"sm": "640px",
|
|
145
|
+
"md": "768px",
|
|
146
|
+
"lg": "1024px",
|
|
147
|
+
"xl": "1280px",
|
|
148
|
+
"2xl": "1536px"
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
If no breakpoints are detected, omit the `breakpoints` field (don't include an empty object).
|
|
153
|
+
|
|
154
|
+
### 7. Detect icon library
|
|
126
155
|
|
|
127
156
|
Check `package.json` dependencies for:
|
|
128
157
|
|
|
@@ -136,7 +165,7 @@ Check `package.json` dependencies for:
|
|
|
136
165
|
|
|
137
166
|
Read the version from package.json.
|
|
138
167
|
|
|
139
|
-
###
|
|
168
|
+
### 8. Detect component library
|
|
140
169
|
|
|
141
170
|
Check `package.json` dependencies for:
|
|
142
171
|
|
|
@@ -157,7 +186,7 @@ grep -rh "from '${package}" --include='*.vue' --include='*.ts' --include='*.js'
|
|
|
157
186
|
|
|
158
187
|
Extract component names from the imports. Read the version from package.json.
|
|
159
188
|
|
|
160
|
-
###
|
|
189
|
+
### 9. Write design spec
|
|
161
190
|
|
|
162
191
|
Create `.annotask/design-spec.json`:
|
|
163
192
|
|
|
@@ -190,6 +219,13 @@ Create `.annotask/design-spec.json`:
|
|
|
190
219
|
{ "role": "md", "value": "8px", "cssVar": "--radius-md", "source": "var(--radius-md)", "sourceFile": "src/assets/main.css", "sourceLine": 25 }
|
|
191
220
|
]
|
|
192
221
|
},
|
|
222
|
+
"breakpoints": {
|
|
223
|
+
"sm": "640px",
|
|
224
|
+
"md": "768px",
|
|
225
|
+
"lg": "1024px",
|
|
226
|
+
"xl": "1280px",
|
|
227
|
+
"2xl": "1536px"
|
|
228
|
+
},
|
|
193
229
|
"icons": {
|
|
194
230
|
"library": "lucide",
|
|
195
231
|
"version": "0.300.0"
|
|
@@ -202,11 +238,11 @@ Create `.annotask/design-spec.json`:
|
|
|
202
238
|
}
|
|
203
239
|
```
|
|
204
240
|
|
|
205
|
-
###
|
|
241
|
+
### 10. Clean up old config
|
|
206
242
|
|
|
207
243
|
If `.annotask/config.json` exists, delete it — it's been replaced by `design-spec.json`.
|
|
208
244
|
|
|
209
|
-
###
|
|
245
|
+
### 11. Update .gitignore
|
|
210
246
|
|
|
211
247
|
Check if `.gitignore` contains `.annotask/`. If not, append:
|
|
212
248
|
```
|
|
@@ -214,7 +250,7 @@ Check if `.gitignore` contains `.annotask/`. If not, append:
|
|
|
214
250
|
.annotask/
|
|
215
251
|
```
|
|
216
252
|
|
|
217
|
-
###
|
|
253
|
+
### 12. Report to user
|
|
218
254
|
|
|
219
255
|
Tell the user:
|
|
220
256
|
- What was detected (framework, number of color/typography/spacing tokens, libraries)
|