annotask 0.0.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 (60) hide show
  1. package/README.md +191 -0
  2. package/dist/chunk-2TUWBFQG.js +882 -0
  3. package/dist/chunk-2TUWBFQG.js.map +1 -0
  4. package/dist/chunk-3VLTLTEO.js +53 -0
  5. package/dist/chunk-3VLTLTEO.js.map +1 -0
  6. package/dist/chunk-53D2PE43.js +105 -0
  7. package/dist/chunk-53D2PE43.js.map +1 -0
  8. package/dist/chunk-6UQW2W7S.js +358 -0
  9. package/dist/chunk-6UQW2W7S.js.map +1 -0
  10. package/dist/chunk-6VYCY34B.js +848 -0
  11. package/dist/chunk-6VYCY34B.js.map +1 -0
  12. package/dist/chunk-B7IKW7UB.js +792 -0
  13. package/dist/chunk-B7IKW7UB.js.map +1 -0
  14. package/dist/chunk-BDMOC2BG.js +794 -0
  15. package/dist/chunk-BDMOC2BG.js.map +1 -0
  16. package/dist/chunk-CFBRU3DQ.js +332 -0
  17. package/dist/chunk-CFBRU3DQ.js.map +1 -0
  18. package/dist/chunk-CWA33RDQ.js +21 -0
  19. package/dist/chunk-CWA33RDQ.js.map +1 -0
  20. package/dist/chunk-DGUM43GV.js +11 -0
  21. package/dist/chunk-DGUM43GV.js.map +1 -0
  22. package/dist/chunk-EAT6V4LF.js +358 -0
  23. package/dist/chunk-EAT6V4LF.js.map +1 -0
  24. package/dist/chunk-FBXNRXMY.js +849 -0
  25. package/dist/chunk-FBXNRXMY.js.map +1 -0
  26. package/dist/chunk-LKRKKLOT.js +61 -0
  27. package/dist/chunk-LKRKKLOT.js.map +1 -0
  28. package/dist/chunk-STOP7QF3.js +61 -0
  29. package/dist/chunk-STOP7QF3.js.map +1 -0
  30. package/dist/chunk-T6TKVAAA.js +332 -0
  31. package/dist/chunk-T6TKVAAA.js.map +1 -0
  32. package/dist/chunk-VCC7UV6G.js +291 -0
  33. package/dist/chunk-VCC7UV6G.js.map +1 -0
  34. package/dist/chunk-XR26XVHT.js +21 -0
  35. package/dist/chunk-XR26XVHT.js.map +1 -0
  36. package/dist/chunk-XZNNRBUW.js +311 -0
  37. package/dist/chunk-XZNNRBUW.js.map +1 -0
  38. package/dist/cli.js +248 -0
  39. package/dist/index.d.ts +9 -0
  40. package/dist/index.js +171 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/server.d.ts +50 -0
  43. package/dist/server.js +15 -0
  44. package/dist/server.js.map +1 -0
  45. package/dist/shell/assets/index-BD3nZNWX.js +59 -0
  46. package/dist/shell/assets/index-DwbhEo-C.css +1 -0
  47. package/dist/shell/index.html +13 -0
  48. package/dist/standalone.d.ts +10 -0
  49. package/dist/standalone.js +9 -0
  50. package/dist/standalone.js.map +1 -0
  51. package/dist/webpack-loader.d.ts +3 -0
  52. package/dist/webpack-loader.js +59 -0
  53. package/dist/webpack-loader.js.map +1 -0
  54. package/dist/webpack.d.ts +11 -0
  55. package/dist/webpack.js +63 -0
  56. package/dist/webpack.js.map +1 -0
  57. package/package.json +78 -0
  58. package/skills/annotask-apply/SKILL.md +133 -0
  59. package/skills/annotask-init/SKILL.md +230 -0
  60. package/skills/annotask-watch/SKILL.md +45 -0
@@ -0,0 +1,230 @@
1
+ # annotask-init
2
+
3
+ Initialize Annotask for this project by scanning the codebase and generating `.annotask/design-spec.json`.
4
+
5
+ ## When to use
6
+
7
+ Use this skill when the user says any of:
8
+ - "initialize Annotask" / "init Annotask"
9
+ - "set up Annotask" / "configure Annotask"
10
+ - "scan my project for Annotask"
11
+ - `/annotask-init`
12
+
13
+ ## What it does
14
+
15
+ Scans the project to detect the framework, design tokens (colors, typography, spacing, borders), icon library, and component library. Writes `.annotask/design-spec.json` which Annotask reads to populate the Theme page with editable design tokens.
16
+
17
+ ## Output schema
18
+
19
+ Every token uses this shape:
20
+
21
+ ```json
22
+ {
23
+ "role": "primary",
24
+ "value": "#3b82f6",
25
+ "cssVar": "--color-primary",
26
+ "source": "var(--color-primary)",
27
+ "sourceFile": "src/assets/main.css",
28
+ "sourceLine": 12
29
+ }
30
+ ```
31
+
32
+ - `role` — semantic name (see vocabularies below)
33
+ - `value` — resolved value (hex color, font string, size, etc.)
34
+ - `cssVar` — the CSS custom property name, if backed by one. Omit if not a CSS variable.
35
+ - `source` — human-readable provenance: `var(--x)`, `tailwind.config:colors.primary`, `@theme:--color-primary`
36
+ - `sourceFile` — relative path to the file where the value is defined
37
+ - `sourceLine` — line number in that file
38
+
39
+ ## Steps
40
+
41
+ ### 1. Detect framework
42
+
43
+ Check `package.json` dependencies:
44
+ - `vue` → name "vue", read version
45
+ - `react` / `react-dom` → name "react"
46
+ - `svelte` → name "svelte"
47
+
48
+ Check for styling:
49
+ - `tailwindcss` in devDependencies or dependencies → add "tailwind" to styling array
50
+ - Look for `<style scoped>` in `.vue` files → add "scoped-css"
51
+ - Look for CSS module imports (`.module.css`) → add "css-modules"
52
+
53
+ ### 2. Scan colors
54
+
55
+ **Find color sources:**
56
+
57
+ 1. **CSS variables**: Search for `:root` declarations across CSS files and Vue `<style>` blocks. Extract `--variable-name: value` pairs.
58
+
59
+ 2. **Tailwind v4** (version >= 4): Search for `@theme` blocks in CSS files. Extract custom properties defined within them.
60
+
61
+ 3. **Tailwind v3** (version < 4): Read `tailwind.config.js`, `tailwind.config.ts`, or `tailwind.config.mjs`. Extract `theme.extend.colors`. Convert to flat key-value pairs.
62
+
63
+ **Classify into semantic roles using this fixed vocabulary:**
64
+
65
+ | Role | Match heuristics (in variable/key name) |
66
+ |------|----------------------------------------|
67
+ | `primary` | primary, brand |
68
+ | `secondary` | secondary |
69
+ | `accent` | accent |
70
+ | `background` | bg, background |
71
+ | `surface` | surface, card |
72
+ | `text` | text, foreground, fg (but not text-muted) |
73
+ | `text-muted` | text-muted, muted, subtle |
74
+ | `border` | border, divider, separator |
75
+ | `danger` | danger, error, destructive, red |
76
+ | `warning` | warning, amber, yellow (semantic) |
77
+ | `success` | success, green (semantic) |
78
+ | `info` | info, blue (semantic) |
79
+
80
+ If a variable doesn't match any heuristic, use a descriptive role name derived from the variable name (e.g., `--sidebar-bg` → role `sidebar-bg`).
81
+
82
+ **Limits**: Maximum 30 color tokens. Prioritize semantic roles first, then most-used custom colors.
83
+
84
+ ### 3. Scan typography
85
+
86
+ **Font families**: Search for:
87
+ - CSS variables containing `font`, `family` in `:root` or `@theme`
88
+ - `fontFamily` in Tailwind config
89
+ - Direct `font-family` declarations on `body`, `html`, `h1`-`h6` elements
90
+
91
+ Classify as:
92
+ - `heading` — used on h1-h6 or named heading/display
93
+ - `body` — used on body/html or named sans/body/base
94
+ - `mono` — monospace, code, named mono
95
+
96
+ **Font scale**: Search for:
97
+ - CSS variables containing `font-size`, `text-` size names
98
+ - `fontSize` in Tailwind config
99
+ - `@theme` size definitions
100
+
101
+ Use roles: `xs`, `sm`, `base`, `lg`, `xl`, `2xl`, `3xl`, `4xl` (match by name or by ascending size order).
102
+
103
+ **Weights**: Scan component files for `font-weight` values and Tailwind weight classes (`font-bold`, `font-semibold`, etc.). List unique weights as strings: `["400", "500", "600", "700"]`.
104
+
105
+ ### 4. Scan spacing
106
+
107
+ Search for:
108
+ - CSS variables containing `space`, `gap`, `margin`, `padding`, `size`
109
+ - `spacing` in Tailwind config
110
+ - `@theme` spacing definitions
111
+
112
+ Use roles: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl` (match by name or ascending size).
113
+
114
+ **Limits**: Maximum 12 spacing tokens.
115
+
116
+ ### 5. Scan border radius
117
+
118
+ Search for:
119
+ - CSS variables containing `radius`, `rounded`
120
+ - `borderRadius` in Tailwind config
121
+ - `@theme` radius definitions
122
+
123
+ Use roles: `sm`, `md`, `lg`, `xl`, `full` (match by name or ascending size).
124
+
125
+ ### 6. Detect icon library
126
+
127
+ Check `package.json` dependencies for:
128
+
129
+ | Package | Library name |
130
+ |---------|-------------|
131
+ | `lucide-vue-next` or `lucide-react` | lucide |
132
+ | `@heroicons/vue` or `@heroicons/react` | heroicons |
133
+ | `@fortawesome/vue-fontawesome` or `@fortawesome/react-fontawesome` | fontawesome |
134
+ | `@phosphor-icons/vue` or `@phosphor-icons/react` | phosphor |
135
+ | `@tabler/icons-vue` or `@tabler/icons-react` | tabler |
136
+
137
+ Read the version from package.json.
138
+
139
+ ### 7. Detect component library
140
+
141
+ Check `package.json` dependencies for:
142
+
143
+ | Package | Library name |
144
+ |---------|-------------|
145
+ | `primevue` | PrimeVue |
146
+ | `vuetify` | Vuetify |
147
+ | `element-plus` | Element Plus |
148
+ | `@headlessui/vue` | Headless UI |
149
+ | `radix-vue` | Radix Vue |
150
+ | `naive-ui` | Naive UI |
151
+ | `@shadcn/ui` or `shadcn-vue` | shadcn/ui |
152
+
153
+ If found, scan `src/` for import statements to find used components:
154
+ ```bash
155
+ grep -rh "from '${package}" --include='*.vue' --include='*.ts' --include='*.js' src/ | sort -u
156
+ ```
157
+
158
+ Extract component names from the imports. Read the version from package.json.
159
+
160
+ ### 8. Write design spec
161
+
162
+ Create `.annotask/design-spec.json`:
163
+
164
+ ```json
165
+ {
166
+ "version": "1.0",
167
+ "framework": {
168
+ "name": "vue",
169
+ "version": "3.5.0",
170
+ "styling": ["tailwind", "scoped-css"]
171
+ },
172
+ "colors": [
173
+ { "role": "primary", "value": "#3b82f6", "cssVar": "--color-primary", "source": "var(--color-primary)", "sourceFile": "src/assets/main.css", "sourceLine": 5 },
174
+ { "role": "background", "value": "#0b1120", "cssVar": "--bg", "source": "var(--bg)", "sourceFile": "src/assets/main.css", "sourceLine": 3 }
175
+ ],
176
+ "typography": {
177
+ "families": [
178
+ { "role": "body", "value": "Inter, sans-serif", "cssVar": "--font-sans", "source": "var(--font-sans)", "sourceFile": "src/assets/main.css", "sourceLine": 10 }
179
+ ],
180
+ "scale": [
181
+ { "role": "base", "value": "1rem", "cssVar": "--text-base", "source": "var(--text-base)", "sourceFile": "src/assets/main.css", "sourceLine": 15 }
182
+ ],
183
+ "weights": ["400", "500", "600", "700"]
184
+ },
185
+ "spacing": [
186
+ { "role": "sm", "value": "8px", "cssVar": "--space-sm", "source": "var(--space-sm)", "sourceFile": "src/assets/main.css", "sourceLine": 20 }
187
+ ],
188
+ "borders": {
189
+ "radius": [
190
+ { "role": "md", "value": "8px", "cssVar": "--radius-md", "source": "var(--radius-md)", "sourceFile": "src/assets/main.css", "sourceLine": 25 }
191
+ ]
192
+ },
193
+ "icons": {
194
+ "library": "lucide",
195
+ "version": "0.300.0"
196
+ },
197
+ "components": {
198
+ "library": "PrimeVue",
199
+ "version": "4.5.4",
200
+ "used": ["DataTable", "Column", "InputText", "Tag", "Button"]
201
+ }
202
+ }
203
+ ```
204
+
205
+ ### 9. Clean up old config
206
+
207
+ If `.annotask/config.json` exists, delete it — it's been replaced by `design-spec.json`.
208
+
209
+ ### 10. Update .gitignore
210
+
211
+ Check if `.gitignore` contains `.annotask/`. If not, append:
212
+ ```
213
+ # Annotask (generated)
214
+ .annotask/
215
+ ```
216
+
217
+ ### 11. Report to user
218
+
219
+ Tell the user:
220
+ - What was detected (framework, number of color/typography/spacing tokens, libraries)
221
+ - That they can open the **Theme** page in Annotask to view and edit tokens
222
+ - That they can re-run `/annotask-init` to rescan
223
+
224
+ ## Notes
225
+
226
+ - This skill is idempotent — re-running overwrites the design spec with fresh data
227
+ - The design spec is gitignored because it's generated and may vary per developer
228
+ - If detection fails for any section, use empty defaults (empty array, null) rather than omitting the field
229
+ - All top-level fields are required — use empty values for missing data
230
+ - When a token has a CSS variable backing, always populate the `cssVar` field — this enables live preview in the Theme page
@@ -0,0 +1,45 @@
1
+ # annotask-watch
2
+
3
+ Watch for Annotask design changes in real-time and describe what the user is doing.
4
+
5
+ ## When to use
6
+
7
+ Use this skill when the user says things like:
8
+ - "watch my Annotask changes"
9
+ - "monitor Annotask"
10
+ - "what am I changing in Annotask?"
11
+ - `/annotask-watch`
12
+
13
+ ## How it works
14
+
15
+ Connect to the Annotask WebSocket and stream changes as the user makes them visually.
16
+
17
+ ## Steps
18
+
19
+ 0. **Discover server URL** — read `.annotask/server.json` in the current working directory only (never parent directories):
20
+ ```bash
21
+ cat .annotask/server.json
22
+ ```
23
+ Use the `port` and `url` values. If not found, probe `curl -s http://localhost:24678/__annotask/api/status` then `curl -s http://localhost:5173/__annotask/api/status`. **Do NOT read server.json from parent or sibling directories.**
24
+
25
+ 1. **Start watching** by running in the background:
26
+ ```bash
27
+ npx @annotask/cli watch --port=PORT
28
+ ```
29
+ Or if the CLI isn't installed, poll the HTTP API:
30
+ ```bash
31
+ curl -s $BASE_URL/__annotask/api/report
32
+ ```
33
+
34
+ 2. **Describe what you see** — as changes come in, summarize them in plain language:
35
+ - "You changed the background color of table cells in PlanetTable.vue to a dark red (#2a1a1a)"
36
+ - "You increased the font size of the header title to 28px"
37
+ - "You adjusted the gap between flex items in the nav to 16px"
38
+
39
+ 3. **Suggest next steps** — after the user seems done (they say "apply these" or "looks good"), use the `/annotask-apply` skill to apply the changes to source code.
40
+
41
+ ## Notes
42
+
43
+ - This is a passive monitoring mode — don't modify any files until explicitly asked
44
+ - Focus on summarizing the intent, not the raw hex values
45
+ - Group related changes together ("You restyled the table rows with a darker background and larger text")