Imported from metacurb/vue-whiteboard-composable (
AGENTS.md). Install upstream withnpx skills add metacurb/vue-whiteboard-composable. Copyright stays with the author.
AGENTS.md
Project Context
- This repository publishes
vue-whiteboard-composable, a Vue 3 composable for SVG whiteboard drawing. - The repo also contains a Vite-powered demo app used for local verification and GitHub Pages deployment.
- Package manager:
pnpm - Preferred local runtime: Node.js
24to match CI
Repository Map
src/composables/useWhiteboard.ts: primary composable implementationsrc/types/whiteboard.ts: exported whiteboard typessrc/utils/whiteboard.ts: helper logic for SVG/history serializationsrc/utils/whiteboard.test.ts: Vitest coverage for utility behaviorsrc/index.ts: public package entry pointsrc/App.vue,src/components/*: demo app and manual test surfacevite.config.ts: library build configvite.config.demo.ts: demo build config.github/workflows/*.yml: CI and release automationrelease-please-config.jsonand.release-please-manifest.json: release-please versioning and changelog config
Working Rules For Agents
- Keep changes aligned with a published library first and the demo app second.
- Do not break the public exports from
src/index.tswithout explicit instruction. - Treat
README.mdas part of the public contract. If usage or API changes, update it. - Prefer adding or updating tests when changing history, serialization, export, or type behavior.
- Validate demo-facing changes in
src/App.vueandsrc/components/*when modifying interactions. - Do not commit built output in
dist/unless the user explicitly asks for it. - Prefer
pnpmcommands overnpmoryarn.
Validation
Use the smallest relevant set of checks for the change:
pnpm lintfor linting and autofixespnpm testfor Vitestpnpm buildfor exported library or build config changespnpm build:demowhen changing demo-only build behavior
Release Flow
release-pleaseowns version bumps and changelog updates..github/workflows/release-please.ymlruns on pushes tomainand maintains the release PR.- Merging the release PR creates the tag and a draft GitHub release.
- Publishing the GitHub release triggers
.github/workflows/release.yml. .github/workflows/release.ymlpublishes the package to npm from the released tag and deploys the demo to GitHub Pages.
Commit And PR Conventions
- Use Conventional Commits for all commit messages and PR titles.
- Prefer squash merge commit titles that also follow Conventional Commits, because release automation and changelog quality depend on clear commit history.
- Use one of these types when the change should appear in release notes:
feat: new user-facing functionalityfix: bug fixesperf: performance improvementsrefactor: internal changes that should appear underChangeddeps: dependency updates that should appear underChanged
- Use
chore,docs,test, andcifor changes that should not trigger a release by themselves.
Format
- Use
type: short summary - Optional scope is allowed:
type(scope): short summary - Breaking changes must use
!or aBREAKING CHANGE:footer
Examples
feat: add pressure-sensitive stroke sizingfix: preserve redo history after importing saved stateperf: reduce redraw work during pointer moverefactor: simplify whiteboard serialization helpersdeps: update vite to latest compatible versiondocs: clarify demo and library build commands
Release Notes Mapping
feat->Addedfix->Fixedperf,refactor,deps->Changed
Notes For Agents
- Do not use emoji prefixes in commit messages or PR titles.
- Do not invent non-standard types when a standard type fits.
- If a change is not releasable, prefer
chore,docs,test, orci.