{"owner":"didi","repo":"LogicFlow","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# AGENTS.md\n\nThis file is the repository entry point for agents and contributors working in LogicFlow. Use it to answer three questions before editing anything:\n\n1. Where should this change live?\n2. What boundaries must remain intact?\n3. What is the smallest meaningful validation for this change?\n\n## 1. Repository Shape\n\nLogicFlow is a pnpm monorepo with three main product surfaces and several support packages.\n\n- `packages/core`: graph editor runtime, built-in shapes, interaction model, rendering, and extension hooks.\n- `packages/engine`: graph execution engine for browser and Node.js environments. It does not depend on `packages/core`.\n- `packages/extension`: optional editor plugins, BPMN support, built-in UI components, and shared materials built on top of `packages/core`.\n- `packages/layout`: automatic layout helpers built around the public core graph model.\n- `packages/react-node-registry`: React-backed custom node rendering.\n- `packages/vue-node-registry`: Vue-backed custom node rendering.\n- `examples/`: runnable demos used for focused verification.\n- `sites/docs`: documentation site and docs examples.\n\nDefault rule: change the narrowest package that owns the behavior. Do not patch examples to compensate for package bugs.\n\n## 2. Working Contract\n\n- Use `pnpm` only.\n- Prefer minimal, local changes over broad refactors.\n- Edit source files in `src` rather than generated outputs in `dist`, `es`, or `lib`.\n- Preserve public API compatibility unless the task explicitly requires a breaking change.\n- Reuse package-local patterns before introducing new abstractions.\n- If a change crosses package boundaries, document that dependency in the PR.\n- Treat examples as verification targets, not as the primary place to implement shared behavior.\n- When writing or updating documentation, use natural human phrasing and reading flow; avoid overly AI-like tone, repetitive template language, or mechanical wording.\n- **Use TDD (Test-Driven Development) for all feature and bugfix work.** Write or update the failing test first, confirm it fails for the right reason, then implement the minimum code to make it pass, then refactor. Do not write implementation code before a corresponding test exists.\n\n## 3. Task Routing\n\nUse this section to decide where to start reading and editing.\n\n### Editor behavior and graph interaction\n\nStart in `packages/core`.\n\nTypical work:\n- node or edge drag behavior\n- selection, keyboard, history, snapline, zoom, viewport behavior\n- graph state transitions and event emission\n- built-in node or edge rendering\n\nPrimary code areas:\n- `packages/core/src/LogicFlow.tsx`\n- `packages/core/src/model`\n- `packages/core/src/view`\n- `packages/core/src/view/behavior`\n- `packages/core/src/history`\n- `packages/core/src/event`\n\n### Execution semantics\n\nStart in `packages/engine`.\n\nTypical work:\n- execution scheduling\n- node execution lifecycle\n- resume, interrupt, recorder, or platform-specific behavior\n- browser versus Node execution support\n\nPrimary code areas:\n- `packages/engine/src/FlowModel.ts`\n- `packages/engine/src/Scheduler.ts`\n- `packages/engine/src/nodes`\n- `packages/engine/src/recorder`\n- `packages/engine/src/platform`\n\n### Plugins, BPMN, built-in editor add-ons\n\nStart in `packages/extension`.\n\nTypical work:\n- BPMN elements or adapters\n- context menu, mini-map, control panel, drag-and-drop panel\n- group, pool, dynamic-group, node resize, flow-path, auto-layout integration\n- built-in materials such as curved edges or selection helpers\n\nPrimary code areas:\n- `packages/extension/src/bpmn`\n- `packages/extension/src/bpmn-adapter`\n- `packages/extension/src/components`\n- `packages/extension/src/materials`\n- `packages/extension/src/tools`\n- `packages/extension/src/pool`\n\n### Automatic layout\n\nStart in `packages/layout`.\n\nThis package should stay focused on layout algorithms and layout-facing adaptation. Do not move core editor state logic here.\n\n### Framework-backed custom nodes\n\nStart in `packages/react-node-registry` or `packages/vue-node-registry`.\n\nThese packages bridge framework components into the core node system. Keep framework-specific rendering concerns here rather than inside `packages/core`.\n\n### Demos and documentation\n\nUse `examples/` and `sites/docs` to verify or document package behavior.\n\nKeep the fix in the owning package unless the task is explicitly demo-only or docs-only.\n\n## 4. Stable Package Boundaries\n\nThese boundaries should remain true unless the repository is intentionally being redesigned.\n\n- `packages/core` owns editor state, rendering, interaction, registration, and extension hooks.\n- `packages/engine` owns execution and must remain usable without `packages/core`.\n- `packages/extension` depends on public core extension points; it should not require private core internals to function.\n- `packages/layout` should consume graph data or public core models, not duplicate editor behavior.\n- React and Vue node registry packages are adapters, not alternate graph engines.\n- Packages layered on top of `packages/core` should treat `@logicflow/core` as the host runtime provided by the consumer. Do not introduce or restore hard runtime dependencies that bundle a second copy of core unless the package truly cannot function as an extension.\n- Framework adapter packages should treat framework runtimes such as `react`, `react-dom`, and `vue` as consumer-provided peers rather than silently bundling their own copies.\n\n## 5. Validation Strategy\n\nRun the smallest meaningful validation for the area you touched.\n\n- `packages/core`: build the package and verify with the nearest editor example, usually `examples/feature-examples`.\n- `packages/engine`: run package tests first; use engine examples when behavior is environment-specific.\n- `packages/extension`: build the package and verify the relevant feature in `examples/feature-examples` or another targeted demo.\n- framework integration packages: verify with `examples/next-app`, `examples/vue3-app`, or another matching app.\n- docs changes: verify in `sites/docs`.\n\nRepository-level commands that are stable enough to rely on:\n\n```sh\npnpm build\npnpm test\npnpm run lint:ts\npnpm prettier\n```\n\nPackage-level workflow that usually matches source changes:\n\n```sh\n# 终端 1：packages 热更新\npnpm run dev\n\n# 终端 2：example demo\ncd examples/<closest-example> && pnpm dev\n```\n\nDo not claim validation you did not run.\n\n## 6. Commit And PR Expectations\n\nCommit messages follow the Angular-style convention documented in `CONTRIBUTING.md`:\n\n```text\n<type>(<scope>): <subject>\n```\n\nBefore opening a PR, make sure the description covers:\n\n1. What changed.\n2. Why the change is needed.\n3. How it was verified.\n4. Any compatibility risk, migration note, or reviewer focus area.\n\nUse `.github/workflows/PULL_REQUEST_TEMPLATE.md` as the PR template source of truth.\n\n## 7. Public API, Docs, And Release Notes\n\nWhen a change introduces or modifies **user-facing behavior**, treat documentation and release notes as part of the same task—not a follow-up.\n\n### Update the docs site\n\nIf the change adds a feature, plugin option, public method, config field, or changes documented behavior, update the matching pages under `sites/docs` (usually both `.zh.md` and `.en.md` for extension tutorials).\n\nDo not ship package-only behavior without a docs counterpart when users are expected to discover or configure it through the docs.\n\n### Default behavior changes need visible warnings\n\nIf a change alters **default** runtime behavior (even when the API shape stays compatible), the docs must call this out prominently—use a blockquote, bold lead-in, or equivalent stand-out formatting near the option or behavior description. State:\n\n1. what the new default is;\n2. what older versions did;\n3. how to opt in/out or migrate.\n\nPrefer **opt-in strict modes** or **unchanged defaults with new options** over silent default flips in minor releases.\n\n### CHANGELOG and changesets\n\nThis monorepo uses [Changesets](https://github.com/changesets/changesets) (`.changeset/`, `pnpm changeset`, `pnpm changeset version`) to drive version bumps and `CHANGELOG.md` updates. See `CONTRIBUTING.md` for the release flow.\n\n**During implementation (feature/fix PRs):**\n\n- **Prefer** interactive `pnpm changeset`: select package(s), bump level (`patch` / `minor` / `major`), enter the user-visible summary. The CLI writes `.changeset/<random-name>.md`.\n- **When there is no TTY** (agents, CI, automation): hand-write `.changeset/<descriptive-name>.md` with the **same format** as the CLI output. A semantic filename (e.g. `fix-grid-options-shorthand.md`) is fine and easier to review than a random slug.\n- Set affected package(s) and bump level in the YAML frontmatter; put the changelog text in the body (Fixed / Added / Changed, API names, compatibility notes).\n- Validate pending changesets before opening a PR: `pnpm exec changeset status` (lists packages and bump levels; does not modify files).\n- **Do not** run `pnpm changeset version` in an implementation PR — that bumps `package.json`, rewrites `CHANGELOG.md`, and deletes consumed changeset files (release-only).\n- **Do not** edit `packages/*/CHANGELOG.md` for unreleased work — changesets does not read `## Unreleased`; manual entries are easy to duplicate or leave orphaned.\n\nHand-written changeset template:\n\n```markdown\n---\n'@logicflow/core': patch\n---\n\nfix: short user-visible summary\n```\n\nOnly list packages you actually changed. Dependents may receive a transitive patch at release time via `updateInternalDependencies` in `.changeset/config.json` — you do not need to add every downstream package to the frontmatter.\n\n**What happens if you edit CHANGELOG manually anyway:**\n\n- `pnpm changeset version` (release / Version Packages PR) only consumes `.changeset/*.md` files, bumps `package.json`, and **prepends a new version section** to each affected `CHANGELOG.md`.\n- A hand-written `## Unreleased` block is **not** merged into that release; it stays at the top until someone removes it.\n- If the same fix is described in both a changeset and CHANGELOG, readers see **duplicate** entries after release.\n- Appending to an **already published** version header (e.g. `## 2.2.2`) is wrong: that version is already on npm.\n\n**At release:**\n\n- Run `pnpm changeset version` (or merge the Changesets bot PR). This applies all pending changesets, updates changelogs, and deletes the consumed `.changeset/*.md` files.\n- Then `pnpm publish:only` (see `CONTRIBUTING.md`).\n\nIf the docs site maintains its own changelog (`sites/docs/CHANGELOG.md`), align entries when the release is user-visible there too.\n\n## 8. Architecture Index\n\nRead these documents before making structural changes in the corresponding package:\n\n- `packages/core/ARCHITECTURE.md`\n- `packages/engine/ARCHITECTURE.md`\n- `packages/extension/ARCHITECTURE.md`\n- `packages/layout/ARCHITECTURE.md`\n\nUse these repository files as supporting references when the architecture docs are not specific enough:\n\n- `README.md`\n- `CONTRIBUTING.md`\n- `package.json`\n- `turbo.json`\n- `lerna.json`\n\n## 9. What Not To Put Here\n\nThis file is intentionally not a full architecture manual.\n\nDo not turn it into:\n- a file-by-file code walkthrough\n- a temporary task checklist\n- a dump of unstable implementation details\n- a replacement for package-level architecture docs\n\nIf a future task needs more agent-specific behavior, add narrower instructions under `.github/` instead of expanding this file into package internals.\n"},"files":{"AGENTS.md":"# AGENTS.md\n\nThis file is the repository entry point for agents and contributors working in LogicFlow. Use it to answer three questions before editing anything:\n\n1. Where should this change live?\n2. What boundaries must remain intact?\n3. What is the smallest meaningful validation for this change?\n\n## 1. Repository Shape\n\nLogicFlow is a pnpm monorepo with three main product surfaces and several support packages.\n\n- `packages/core`: graph editor runtime, built-in shapes, interaction model, rendering, and extension hooks.\n- `packages/engine`: graph execution engine for browser and Node.js environments. It does not depend on `packages/core`.\n- `packages/extension`: optional editor plugins, BPMN support, built-in UI components, and shared materials built on top of `packages/core`.\n- `packages/layout`: automatic layout helpers built around the public core graph model.\n- `packages/react-node-registry`: React-backed custom node rendering.\n- `packages/vue-node-registry`: Vue-backed custom node rendering.\n- `examples/`: runnable demos used for focused verification.\n- `sites/docs`: documentation site and docs examples.\n\nDefault rule: change the narrowest package that owns the behavior. Do not patch examples to compensate for package bugs.\n\n## 2. Working Contract\n\n- Use `pnpm` only.\n- Prefer minimal, local changes over broad refactors.\n- Edit source files in `src` rather than generated outputs in `dist`, `es`, or `lib`.\n- Preserve public API compatibility unless the task explicitly requires a breaking change.\n- Reuse package-local patterns before introducing new abstractions.\n- If a change crosses package boundaries, document that dependency in the PR.\n- Treat examples as verification targets, not as the primary place to implement shared behavior.\n- When writing or updating documentation, use natural human phrasing and reading flow; avoid overly AI-like tone, repetitive template language, or mechanical wording.\n- **Use TDD (Test-Driven Development) for all feature and bugfix work.** Write or update the failing test first, confirm it fails for the right reason, then implement the minimum code to make it pass, then refactor. Do not write implementation code before a corresponding test exists.\n\n## 3. Task Routing\n\nUse this section to decide where to start reading and editing.\n\n### Editor behavior and graph interaction\n\nStart in `packages/core`.\n\nTypical work:\n- node or edge drag behavior\n- selection, keyboard, history, snapline, zoom, viewport behavior\n- graph state transitions and event emission\n- built-in node or edge rendering\n\nPrimary code areas:\n- `packages/core/src/LogicFlow.tsx`\n- `packages/core/src/model`\n- `packages/core/src/view`\n- `packages/core/src/view/behavior`\n- `packages/core/src/history`\n- `packages/core/src/event`\n\n### Execution semantics\n\nStart in `packages/engine`.\n\nTypical work:\n- execution scheduling\n- node execution lifecycle\n- resume, interrupt, recorder, or platform-specific behavior\n- browser versus Node execution support\n\nPrimary code areas:\n- `packages/engine/src/FlowModel.ts`\n- `packages/engine/src/Scheduler.ts`\n- `packages/engine/src/nodes`\n- `packages/engine/src/recorder`\n- `packages/engine/src/platform`\n\n### Plugins, BPMN, built-in editor add-ons\n\nStart in `packages/extension`.\n\nTypical work:\n- BPMN elements or adapters\n- context menu, mini-map, control panel, drag-and-drop panel\n- group, pool, dynamic-group, node resize, flow-path, auto-layout integration\n- built-in materials such as curved edges or selection helpers\n\nPrimary code areas:\n- `packages/extension/src/bpmn`\n- `packages/extension/src/bpmn-adapter`\n- `packages/extension/src/components`\n- `packages/extension/src/materials`\n- `packages/extension/src/tools`\n- `packages/extension/src/pool`\n\n### Automatic layout\n\nStart in `packages/layout`.\n\nThis package should stay focused on layout algorithms and layout-facing adaptation. Do not move core editor state logic here.\n\n### Framework-backed custom nodes\n\nStart in `packages/react-node-registry` or `packages/vue-node-registry`.\n\nThese packages bridge framework components into the core node system. Keep framework-specific rendering concerns here rather than inside `packages/core`.\n\n### Demos and documentation\n\nUse `examples/` and `sites/docs` to verify or document package behavior.\n\nKeep the fix in the owning package unless the task is explicitly demo-only or docs-only.\n\n## 4. Stable Package Boundaries\n\nThese boundaries should remain true unless the repository is intentionally being redesigned.\n\n- `packages/core` owns editor state, rendering, interaction, registration, and extension hooks.\n- `packages/engine` owns execution and must remain usable without `packages/core`.\n- `packages/extension` depends on public core extension points; it should not require private core internals to function.\n- `packages/layout` should consume graph data or public core models, not duplicate editor behavior.\n- React and Vue node registry packages are adapters, not alternate graph engines.\n- Packages layered on top of `packages/core` should treat `@logicflow/core` as the host runtime provided by the consumer. Do not introduce or restore hard runtime dependencies that bundle a second copy of core unless the package truly cannot function as an extension.\n- Framework adapter packages should treat framework runtimes such as `react`, `react-dom`, and `vue` as consumer-provided peers rather than silently bundling their own copies.\n\n## 5. Validation Strategy\n\nRun the smallest meaningful validation for the area you touched.\n\n- `packages/core`: build the package and verify with the nearest editor example, usually `examples/feature-examples`.\n- `packages/engine`: run package tests first; use engine examples when behavior is environment-specific.\n- `packages/extension`: build the package and verify the relevant feature in `examples/feature-examples` or another targeted demo.\n- framework integration packages: verify with `examples/next-app`, `examples/vue3-app`, or another matching app.\n- docs changes: verify in `sites/docs`.\n\nRepository-level commands that are stable enough to rely on:\n\n```sh\npnpm build\npnpm test\npnpm run lint:ts\npnpm prettier\n```\n\nPackage-level workflow that usually matches source changes:\n\n```sh\n# 终端 1：packages 热更新\npnpm run dev\n\n# 终端 2：example demo\ncd examples/<closest-example> && pnpm dev\n```\n\nDo not claim validation you did not run.\n\n## 6. Commit And PR Expectations\n\nCommit messages follow the Angular-style convention documented in `CONTRIBUTING.md`:\n\n```text\n<type>(<scope>): <subject>\n```\n\nBefore opening a PR, make sure the description covers:\n\n1. What changed.\n2. Why the change is needed.\n3. How it was verified.\n4. Any compatibility risk, migration note, or reviewer focus area.\n\nUse `.github/workflows/PULL_REQUEST_TEMPLATE.md` as the PR template source of truth.\n\n## 7. Public API, Docs, And Release Notes\n\nWhen a change introduces or modifies **user-facing behavior**, treat documentation and release notes as part of the same task—not a follow-up.\n\n### Update the docs site\n\nIf the change adds a feature, plugin option, public method, config field, or changes documented behavior, update the matching pages under `sites/docs` (usually both `.zh.md` and `.en.md` for extension tutorials).\n\nDo not ship package-only behavior without a docs counterpart when users are expected to discover or configure it through the docs.\n\n### Default behavior changes need visible warnings\n\nIf a change alters **default** runtime behavior (even when the API shape stays compatible), the docs must call this out prominently—use a blockquote, bold lead-in, or equivalent stand-out formatting near the option or behavior description. State:\n\n1. what the new default is;\n2. what older versions did;\n3. how to opt in/out or migrate.\n\nPrefer **opt-in strict modes** or **unchanged defaults with new options** over silent default flips in minor releases.\n\n### CHANGELOG and changesets\n\nThis monorepo uses [Changesets](https://github.com/changesets/changesets) (`.changeset/`, `pnpm changeset`, `pnpm changeset version`) to drive version bumps and `CHANGELOG.md` updates. See `CONTRIBUTING.md` for the release flow.\n\n**During implementation (feature/fix PRs):**\n\n- **Prefer** interactive `pnpm changeset`: select package(s), bump level (`patch` / `minor` / `major`), enter the user-visible summary. The CLI writes `.changeset/<random-name>.md`.\n- **When there is no TTY** (agents, CI, automation): hand-write `.changeset/<descriptive-name>.md` with the **same format** as the CLI output. A semantic filename (e.g. `fix-grid-options-shorthand.md`) is fine and easier to review than a random slug.\n- Set affected package(s) and bump level in the YAML frontmatter; put the changelog text in the body (Fixed / Added / Changed, API names, compatibility notes).\n- Validate pending changesets before opening a PR: `pnpm exec changeset status` (lists packages and bump levels; does not modify files).\n- **Do not** run `pnpm changeset version` in an implementation PR — that bumps `package.json`, rewrites `CHANGELOG.md`, and deletes consumed changeset files (release-only).\n- **Do not** edit `packages/*/CHANGELOG.md` for unreleased work — changesets does not read `## Unreleased`; manual entries are easy to duplicate or leave orphaned.\n\nHand-written changeset template:\n\n```markdown\n---\n'@logicflow/core': patch\n---\n\nfix: short user-visible summary\n```\n\nOnly list packages you actually changed. Dependents may receive a transitive patch at release time via `updateInternalDependencies` in `.changeset/config.json` — you do not need to add every downstream package to the frontmatter.\n\n**What happens if you edit CHANGELOG manually anyway:**\n\n- `pnpm changeset version` (release / Version Packages PR) only consumes `.changeset/*.md` files, bumps `package.json`, and **prepends a new version section** to each affected `CHANGELOG.md`.\n- A hand-written `## Unreleased` block is **not** merged into that release; it stays at the top until someone removes it.\n- If the same fix is described in both a changeset and CHANGELOG, readers see **duplicate** entries after release.\n- Appending to an **already published** version header (e.g. `## 2.2.2`) is wrong: that version is already on npm.\n\n**At release:**\n\n- Run `pnpm changeset version` (or merge the Changesets bot PR). This applies all pending changesets, updates changelogs, and deletes the consumed `.changeset/*.md` files.\n- Then `pnpm publish:only` (see `CONTRIBUTING.md`).\n\nIf the docs site maintains its own changelog (`sites/docs/CHANGELOG.md`), align entries when the release is user-visible there too.\n\n## 8. Architecture Index\n\nRead these documents before making structural changes in the corresponding package:\n\n- `packages/core/ARCHITECTURE.md`\n- `packages/engine/ARCHITECTURE.md`\n- `packages/extension/ARCHITECTURE.md`\n- `packages/layout/ARCHITECTURE.md`\n\nUse these repository files as supporting references when the architecture docs are not specific enough:\n\n- `README.md`\n- `CONTRIBUTING.md`\n- `package.json`\n- `turbo.json`\n- `lerna.json`\n\n## 9. What Not To Put Here\n\nThis file is intentionally not a full architecture manual.\n\nDo not turn it into:\n- a file-by-file code walkthrough\n- a temporary task checklist\n- a dump of unstable implementation details\n- a replacement for package-level architecture docs\n\nIf a future task needs more agent-specific behavior, add narrower instructions under `.github/` instead of expanding this file into package internals.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# AGENTS.md\n\nThis file is the repository entry point for agents and contributors working in LogicFlow. Use it to answer three questions before editing anything:\n\n1. Where should this change live?\n2. What boundaries must remain intact?\n3. What is the smallest meaningful validation for this change?\n\n## 1. Repository Shape\n\nLogicFlow is a pnpm monorepo with three main product surfaces and several support packages.\n\n- `packages/core`: graph editor runtime, built-in shapes, interaction model, rendering, and extension hooks.\n- `packages/engine`: graph execution engine for browser and Node.js environments. It does not depend on `packages/core`.\n- `packages/extension`: optional editor plugins, BPMN support, built-in UI components, and shared materials built on top of `packages/core`.\n- `packages/layout`: automatic layout helpers built around the public core graph model.\n- `packages/react-node-registry`: React-backed custom node rendering.\n- `packages/vue-node-registry`: Vue-backed custom node rendering.\n- `examples/`: runnable demos used for focused verification.\n- `sites/docs`: documentation site and docs examples.\n\nDefault rule: change the narrowest package that owns the behavior. Do not patch examples to compensate for package bugs.\n\n## 2. Working Contract\n\n- Use `pnpm` only.\n- Prefer minimal, local changes over broad refactors.\n- Edit source files in `src` rather than generated outputs in `dist`, `es`, or `lib`.\n- Preserve public API compatibility unless the task explicitly requires a breaking change.\n- Reuse package-local patterns before introducing new abstractions.\n- If a change crosses package boundaries, document that dependency in the PR.\n- Treat examples as verification targets, not as the primary place to implement shared behavior.\n- When writing or updating documentation, use natural human phrasing and reading flow; avoid overly AI-like tone, repetitive template language, or mechanical wording.\n- **Use TDD (Test-Driven Development) for all feature and bugfix work.** Write or update the failing test first, confirm it fails for the right reason, then implement the minimum code to make it pass, then refactor. Do not write implementation code before a corresponding test exists.\n\n## 3. Task Routing\n\nUse this section to decide where to start reading and editing.\n\n### Editor behavior and graph interaction\n\nStart in `packages/core`.\n\nTypical work:\n- node or edge drag behavior\n- selection, keyboard, history, snapline, zoom, viewport behavior\n- graph state transitions and event emission\n- built-in node or edge rendering\n\nPrimary code areas:\n- `packages/core/src/LogicFlow.tsx`\n- `packages/core/src/model`\n- `packages/core/src/view`\n- `packages/core/src/view/behavior`\n- `packages/core/src/history`\n- `packages/core/src/event`\n\n### Execution semantics\n\nStart in `packages/engine`.\n\nTypical work:\n- execution scheduling\n- node execution lifecycle\n- resume, interrupt, recorder, or platform-specific behavior\n- browser versus Node execution support\n\nPrimary code areas:\n- `packages/engine/src/FlowModel.ts`\n- `packages/engine/src/Scheduler.ts`\n- `packages/engine/src/nodes`\n- `packages/engine/src/recorder`\n- `packages/engine/src/platform`\n\n### Plugins, BPMN, built-in editor add-ons\n\nStart in `packages/extension`.\n\nTypical work:\n- BPMN elements or adapters\n- context menu, mini-map, control panel, drag-and-drop panel\n- group, pool, dynamic-group, node resize, flow-path, auto-layout integration\n- built-in materials such as curved edges or selection helpers\n\nPrimary code areas:\n- `packages/extension/src/bpmn`\n- `packages/extension/src/bpmn-adapter`\n- `packages/extension/src/components`\n- `packages/extension/src/materials`\n- `packages/extension/src/tools`\n- `packages/extension/src/pool`\n\n### Automatic layout\n\nStart in `packages/layout`.\n\nThis package should stay focused on layout algorithms and layout-facing adaptation. Do not move core editor state logic here.\n\n### Framework-backed custom nodes\n\nStart in `packages/react-node-registry` or `packages/vue-node-registry`.\n\nThese packages bridge framework components into the core node system. Keep framework-specific rendering concerns here rather than inside `packages/core`.\n\n### Demos and documentation\n\nUse `examples/` and `sites/docs` to verify or document package behavior.\n\nKeep the fix in the owning package unless the task is explicitly demo-only or docs-only.\n\n## 4. Stable Package Boundaries\n\nThese boundaries should remain true unless the repository is intentionally being redesigned.\n\n- `packages/core` owns editor state, rendering, interaction, registration, and extension hooks.\n- `packages/engine` owns execution and must remain usable without `packages/core`.\n- `packages/extension` depends on public core extension points; it should not require private core internals to function.\n- `packages/layout` should consume graph data or public core models, not duplicate editor behavior.\n- React and Vue node registry packages are adapters, not alternate graph engines.\n- Packages layered on top of `packages/core` should treat `@logicflow/core` as the host runtime provided by the consumer. Do not introduce or restore hard runtime dependencies that bundle a second copy of core unless the package truly cannot function as an extension.\n- Framework adapter packages should treat framework runtimes such as `react`, `react-dom`, and `vue` as consumer-provided peers rather than silently bundling their own copies.\n\n## 5. Validation Strategy\n\nRun the smallest meaningful validation for the area you touched.\n\n- `packages/core`: build the package and verify with the nearest editor example, usually `examples/feature-examples`.\n- `packages/engine`: run package tests first; use engine examples when behavior is environment-specific.\n- `packages/extension`: build the package and verify the relevant feature in `examples/feature-examples` or another targeted demo.\n- framework integration packages: verify with `examples/next-app`, `examples/vue3-app`, or another matching app.\n- docs changes: verify in `sites/docs`.\n\nRepository-level commands that are stable enough to rely on:\n\n```sh\npnpm build\npnpm test\npnpm run lint:ts\npnpm prettier\n```\n\nPackage-level workflow that usually matches source changes:\n\n```sh\n# 终端 1：packages 热更新\npnpm run dev\n\n# 终端 2：example demo\ncd examples/<closest-example> && pnpm dev\n```\n\nDo not claim validation you did not run.\n\n## 6. Commit And PR Expectations\n\nCommit messages follow the Angular-style convention documented in `CONTRIBUTING.md`:\n\n```text\n<type>(<scope>): <subject>\n```\n\nBefore opening a PR, make sure the description covers:\n\n1. What changed.\n2. Why the change is needed.\n3. How it was verified.\n4. Any compatibility risk, migration note, or reviewer focus area.\n\nUse `.github/workflows/PULL_REQUEST_TEMPLATE.md` as the PR template source of truth.\n\n## 7. Public API, Docs, And Release Notes\n\nWhen a change introduces or modifies **user-facing behavior**, treat documentation and release notes as part of the same task—not a follow-up.\n\n### Update the docs site\n\nIf the change adds a feature, plugin option, public method, config field, or changes documented behavior, update the matching pages under `sites/docs` (usually both `.zh.md` and `.en.md` for extension tutorials).\n\nDo not ship package-only behavior without a docs counterpart when users are expected to discover or configure it through the docs.\n\n### Default behavior changes need visible warnings\n\nIf a change alters **default** runtime behavior (even when the API shape stays compatible), the docs must call this out prominently—use a blockquote, bold lead-in, or equivalent stand-out formatting near the option or behavior description. State:\n\n1. what the new default is;\n2. what older versions did;\n3. how to opt in/out or migrate.\n\nPrefer **opt-in strict modes** or **unchanged defaults with new options** over silent default flips in minor releases.\n\n### CHANGELOG and changesets\n\nThis monorepo uses [Changesets](https://github.com/changesets/changesets) (`.changeset/`, `pnpm changeset`, `pnpm changeset version`) to drive version bumps and `CHANGELOG.md` updates. See `CONTRIBUTING.md` for the release flow.\n\n**During implementation (feature/fix PRs):**\n\n- **Prefer** interactive `pnpm changeset`: select package(s), bump level (`patch` / `minor` / `major`), enter the user-visible summary. The CLI writes `.changeset/<random-name>.md`.\n- **When there is no TTY** (agents, CI, automation): hand-write `.changeset/<descriptive-name>.md` with the **same format** as the CLI output. A semantic filename (e.g. `fix-grid-options-shorthand.md`) is fine and easier to review than a random slug.\n- Set affected package(s) and bump level in the YAML frontmatter; put the changelog text in the body (Fixed / Added / Changed, API names, compatibility notes).\n- Validate pending changesets before opening a PR: `pnpm exec changeset status` (lists packages and bump levels; does not modify files).\n- **Do not** run `pnpm changeset version` in an implementation PR — that bumps `package.json`, rewrites `CHANGELOG.md`, and deletes consumed changeset files (release-only).\n- **Do not** edit `packages/*/CHANGELOG.md` for unreleased work — changesets does not read `## Unreleased`; manual entries are easy to duplicate or leave orphaned.\n\nHand-written changeset template:\n\n```markdown\n---\n'@logicflow/core': patch\n---\n\nfix: short user-visible summary\n```\n\nOnly list packages you actually changed. Dependents may receive a transitive patch at release time via `updateInternalDependencies` in `.changeset/config.json` — you do not need to add every downstream package to the frontmatter.\n\n**What happens if you edit CHANGELOG manually anyway:**\n\n- `pnpm changeset version` (release / Version Packages PR) only consumes `.changeset/*.md` files, bumps `package.json`, and **prepends a new version section** to each affected `CHANGELOG.md`.\n- A hand-written `## Unreleased` block is **not** merged into that release; it stays at the top until someone removes it.\n- If the same fix is described in both a changeset and CHANGELOG, readers see **duplicate** entries after release.\n- Appending to an **already published** version header (e.g. `## 2.2.2`) is wrong: that version is already on npm.\n\n**At release:**\n\n- Run `pnpm changeset version` (or merge the Changesets bot PR). This applies all pending changesets, updates changelogs, and deletes the consumed `.changeset/*.md` files.\n- Then `pnpm publish:only` (see `CONTRIBUTING.md`).\n\nIf the docs site maintains its own changelog (`sites/docs/CHANGELOG.md`), align entries when the release is user-visible there too.\n\n## 8. Architecture Index\n\nRead these documents before making structural changes in the corresponding package:\n\n- `packages/core/ARCHITECTURE.md`\n- `packages/engine/ARCHITECTURE.md`\n- `packages/extension/ARCHITECTURE.md`\n- `packages/layout/ARCHITECTURE.md`\n\nUse these repository files as supporting references when the architecture docs are not specific enough:\n\n- `README.md`\n- `CONTRIBUTING.md`\n- `package.json`\n- `turbo.json`\n- `lerna.json`\n\n## 9. What Not To Put Here\n\nThis file is intentionally not a full architecture manual.\n\nDo not turn it into:\n- a file-by-file code walkthrough\n- a temporary task checklist\n- a dump of unstable implementation details\n- a replacement for package-level architecture docs\n\nIf a future task needs more agent-specific behavior, add narrower instructions under `.github/` instead of expanding this file into package internals.\n","category":"root","tokens":2858}]}