This file is the canonical source of truth for repo-wide agent instructions.
- Applies to the whole repository unless a closer
AGENTS.mdoverrides it for a subtree. CLAUDE.mdis a compatibility entrypoint that imports this file. Do not maintain a second independent copy of the same rules.- Keep this file limited to repo-wide guidance. Package-specific implementation details belong in package-level instruction files.
- Monorepo: pnpm workspaces + lerna (independent versioning)
- Primary stack: Vue 3, Vite, JavaScript/TypeScript
- Package manager:
pnpmonly for interactive work in this repo - Designer app:
designer-demo/ - Local mock backend:
mockServer/
- Inspect the affected package, its
package.json, and the nearest instruction file before editing. - Keep changes scoped. Do not normalize unrelated files or rename fixtures just for consistency.
- Prefer targeted package-level validation over whole-repo commands when possible.
- Treat
pnpm lintandpnpm formatas mutating commands, not read-only verification. - Do not invoke
npmoryarndirectly for normal repo work. Existing package scripts may still shell out internally; leave that alone unless the task is specifically about package scripts.
pnpm install
pnpm dev
pnpm build:plugin
pnpm build:alpha
pnpm --filter @opentiny/tiny-engine-dsl-vue test:unitpnpm lint # ESLint with --fix
pnpm format # Prettier --writeCanonical script definitions live in:
package.jsonpackages/*/package.json.github/workflows/push-check.yml.github/workflows/Release.yml
Run the smallest sufficient verification for the change surface, then expand if the change is broad or risky.
- Docs-only changes: No code verification required unless the docs change commands or workflow descriptions that should be checked against source files.
packages/vue-generator/**: Run the affected testcase orpnpm --filter @opentiny/tiny-engine-dsl-vue test:unit. If generator behavior changes, run the fulltest:unitsuite before handoff and inspect any changedexpected/*.vuefiles.- Published library packages under
packages/**: Run the package-localtestscript if one exists. Runpnpm build:pluginwhen build output or published package behavior may be affected. designer-demo/**or shared packages consumed by the demo: Runpnpm build:alpha.- Cross-package build or release-facing changes:
Run
pnpm build:pluginandpnpm build:alpha. - Config, workspace, CI, or release script changes: Verify the directly affected command(s) after approval.
- Read any source file
- Run targeted tests and builds
- Edit implementation files inside existing packages
- Add or update tests that match the scope of the change
- Update docs that reflect current repo behavior
- Changing workspace, lerna, pnpm, ESLint, Prettier, or TypeScript configuration
- Modifying CI workflows, release scripts, or publish flows
- Upgrading major dependencies or changing pinned overrides
- Reordering or adding/removing default vue-generator attribute hooks
- Large-scale edits to generated mappings or vendored patches
When asking first, include:
- what you want to change
- why the current rules or implementation are insufficient
- what verification you would run after approval
- Use
npmoryarndirectly for routine repo commands - Skip hooks with
--no-verify - Hardcode versions for workspace packages
- Edit
patches/without understanding the upstream issue and the patch purpose - Rewrite generated expectations or snapshots without validating the new output first
- Bug fix: Add or update a regression test when behavior changes.
- Refactor: Preserve behavior and prove it with targeted verification.
- Snapshot or generated output change: Explain why the output changed and list the affected fixture directories.
- Commit or PR work:
Only do it if asked. Use Conventional Commits and target
developunless the user specifies otherwise.
pnpm installis enforced bypreinstall; npm and yarn are rejected for direct repo usage.pnpm lintwrites fixes. Use it deliberately.- CI relies on
build:pluginandbuild:alpha, not only lint or unit tests. - Test directories such as
test/,expected/, andoutput/are not always linted; do not treat lint success as fixture validation.