@spences10/pi-svelte-guardrails 0.0.7 → 0.0.9

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 (2) hide show
  1. package/README.md +20 -3
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -1,8 +1,14 @@
1
1
  # @spences10/pi-svelte-guardrails
2
2
 
3
- Pi extension that blocks agents from writing discouraged Svelte
4
- patterns. In `my-pi`, this guardrail is built in and enabled by
5
- default. In vanilla Pi, install it explicitly with this package.
3
+ [![built with Vite+](https://img.shields.io/badge/built%20with-Vite+-646CFF?logo=vite&logoColor=white)](https://viteplus.dev)
4
+ [![tested with Vitest](https://img.shields.io/badge/tested%20with-Vitest-6E9F18?logo=vitest&logoColor=white)](https://vitest.dev)
5
+ [![npm version](https://img.shields.io/npm/v/@spences10/pi-svelte-guardrails?color=CB3837&logo=npm&logoColor=white)](https://www.npmjs.com/package/@spences10/pi-svelte-guardrails)
6
+ [![license](https://img.shields.io/npm/l/@spences10/pi-svelte-guardrails)](https://www.npmjs.com/package/@spences10/pi-svelte-guardrails)
7
+
8
+ Catch discouraged Svelte patterns before they land in your codebase.
9
+ `pi-svelte-guardrails` blocks common agent mistakes and points the
10
+ model toward current Svelte 5 practices while edits are still cheap to
11
+ fix.
6
12
 
7
13
  By default, blocks `$effect` in `.svelte` `write`/`edit` tool calls
8
14
  and bash writes, then tells the agent to prefer `$derived`, event
@@ -68,3 +74,14 @@ the pattern. The current default remains `block`.
68
74
  When a tool result says a write was blocked, the target file was not
69
75
  created or modified. Rewrite the change without `$effect` and run the
70
76
  write/edit again before reporting success.
77
+
78
+ ## Development
79
+
80
+ Package scripts build transitive workspace dependencies first, then
81
+ run local tools through Vite+ with `vp exec`.
82
+
83
+ ```bash
84
+ pnpm --filter @spences10/pi-svelte-guardrails run check
85
+ pnpm --filter @spences10/pi-svelte-guardrails run test
86
+ pnpm --filter @spences10/pi-svelte-guardrails run build
87
+ ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spences10/pi-svelte-guardrails",
3
- "version": "0.0.7",
4
- "description": "Pi extension that blocks discouraged Svelte patterns before agents write them",
3
+ "version": "0.0.9",
4
+ "description": "Svelte 5 guardrails for Pi that block discouraged agent-written patterns before they land in code",
5
5
  "keywords": [
6
6
  "agent-guardrails",
7
7
  "pi",
@@ -47,13 +47,13 @@
47
47
  },
48
48
  "scripts": {
49
49
  "build": "pnpm --filter \"$npm_package_name^...\" run build:self && pnpm run build:self",
50
- "build:self": "tsc -p tsconfig.build.json",
50
+ "build:self": "vp exec tsc -p tsconfig.build.json",
51
51
  "check": "pnpm --filter \"$npm_package_name^...\" run build:self && pnpm run check:self",
52
- "check:self": "tsc --noEmit -p tsconfig.json",
52
+ "check:self": "vp exec tsc --noEmit -p tsconfig.json",
53
53
  "test": "pnpm --filter \"$npm_package_name^...\" run build:self && pnpm run test:self",
54
- "test:self": "vitest run",
55
- "test:watch": "vitest",
56
- "coverage:self": "vitest run --coverage",
54
+ "test:self": "vp exec vitest run",
55
+ "test:watch": "vp exec vitest",
56
+ "coverage:self": "vp exec vitest run --coverage",
57
57
  "coverage": "pnpm --filter \"$npm_package_name^...\" run build:self && pnpm run coverage:self"
58
58
  }
59
59
  }