dev-annotate 0.1.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.
@@ -0,0 +1,19 @@
1
+ interface SizePreset {
2
+ label: string;
3
+ pen: number;
4
+ font: number;
5
+ }
6
+ interface DevAnnotationOptions {
7
+ /** Upload endpoint. Default '/api/dev/save-annotation'. */
8
+ endpoint?: string;
9
+ /** Color palette. */
10
+ colors?: string[];
11
+ /** Size presets (S/M/L). */
12
+ sizes?: SizePreset[];
13
+ /** Keyboard shortcut to toggle the panel. Default 'a'. */
14
+ shortcutKey?: string;
15
+ /** Base z-index for the UI layers. Default 100000. */
16
+ zIndexBase?: number;
17
+ }
18
+
19
+ export type { DevAnnotationOptions as D };
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "dev-annotate",
3
+ "version": "0.1.0",
4
+ "description": "Dev-only on-screen annotation tool: scribble on the live page, take an OS screenshot, upload it for an AI agent to read.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "keywords": ["annotation", "screenshot", "dev-tool", "design-review", "ai", "nuxt"],
8
+ "engines": { "node": ">=20" },
9
+ "bin": { "dev-annotate": "dist/cli.js" },
10
+ "exports": {
11
+ ".": { "import": "./dist/core/client.js", "types": "./dist/core/client.d.ts" },
12
+ "./server": { "import": "./dist/server/index.js", "types": "./dist/server/index.d.ts" },
13
+ "./nuxt": { "import": "./dist/nuxt/module.js", "types": "./dist/nuxt/module.d.ts" }
14
+ },
15
+ "files": ["dist", "templates", "README.md", "LICENSE"],
16
+ "scripts": {
17
+ "build": "tsup",
18
+ "typecheck": "tsc --noEmit",
19
+ "test": "vitest run",
20
+ "prepublishOnly": "tsup"
21
+ },
22
+ "peerDependencies": { "h3": "*", "@nuxt/kit": "*" },
23
+ "peerDependenciesMeta": {
24
+ "h3": { "optional": true },
25
+ "@nuxt/kit": { "optional": true }
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^22.10.2",
29
+ "tsup": "^8.5.1",
30
+ "typescript": "^5.7.3",
31
+ "vitest": "^3.2.4",
32
+ "jsdom": "^25.0.0",
33
+ "h3": "^1.13.0",
34
+ "@nuxt/kit": "^3.14.0"
35
+ }
36
+ }
@@ -0,0 +1,31 @@
1
+ # Reviewing on-screen annotations (for AI agents)
2
+
3
+ This project uses `dev-annotate`. A human scribbles on the live page in the
4
+ browser, takes an OS screenshot, and uploads it. Your job is to read that
5
+ annotated screenshot and act on it.
6
+
7
+ ## Workflow
8
+
9
+ 1. Get the latest annotated screenshot path:
10
+ ```
11
+ npx dev-annotate latest
12
+ ```
13
+ For several recent ones: `npx dev-annotate latest -n 3`
14
+ 2. Open/read that image file. The red pen / text / numbered pins are the
15
+ human's instructions on the real UI.
16
+ 3. Locate the corresponding code, make the fix, and verify (build / run /
17
+ screenshot) before reporting.
18
+ 4. After the change is confirmed, clean up processed screenshots:
19
+ ```
20
+ npx dev-annotate clean --all --yes
21
+ ```
22
+ 5. To wait for the next annotation in a long-running loop:
23
+ ```
24
+ npx dev-annotate watch
25
+ ```
26
+
27
+ ## Notes
28
+ - Screenshots live under `.playwright-mcp/design-review/annotated-*.{png,jpg,webp}`
29
+ by default (override with `--dir`).
30
+ - Treat an annotation as intent, not pixels: confirm the underlying cause
31
+ before changing how something looks.