mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
docs: prefer clean refactors over compat shims
This commit is contained in:
@@ -35,7 +35,9 @@ Skills own workflows; root owns hard policy and routing.
|
||||
- External official plugins own package/deps and are excluded from core dist; core uses registry-aware `facade-runtime` or generic contracts.
|
||||
- Externalizing a bundled plugin: update package excludes, official catalogs, docs, tests, and prove core runtime paths resolve installed plugin roots before root-dep removal.
|
||||
- Legacy config repair belongs in `openclaw doctor --fix`, not startup/load-time core migrations. Runtime paths use canonical contracts.
|
||||
- New seams: backward-compatible, documented, versioned. Third-party plugins exist.
|
||||
- Fix shape: prefer bounded owner-boundary refactors over local patches/shims when they remove stale abstractions, duplicate policy, or wrong ownership.
|
||||
- Compat default: no new internal shims, aliases, fallback APIs, or legacy names just to reduce diff. Migrate callers and delete old paths.
|
||||
- Public plugin API is the only compat exception: document/version breaks, aggressively deprecate unused SDK surface, and migrate ALL bundled/internal plugins to the modern API in the same change.
|
||||
- Channels are implementation under `src/channels/**`; plugin authors get SDK seams. Providers own auth/catalog/runtime hooks; core owns generic loop.
|
||||
- Hot paths should carry prepared facts forward: provider id, model ref, channel id, target, capability family, attachment class. Do not rediscover with broad plugin/provider/channel/capability loaders.
|
||||
- Do not fix repeated request-time discovery with scattered caches. Move the canonical fact earlier; reuse prepared runtime objects; delete duplicate lookup branches.
|
||||
|
||||
@@ -75,9 +75,9 @@ third-party plugins see.
|
||||
|
||||
## Expanding The Boundary
|
||||
|
||||
- If an extension needs a new seam, add a typed Plugin SDK subpath or additive
|
||||
export instead of reaching into core.
|
||||
- Keep new plugin-facing seams backwards-compatible and versioned. Third-party
|
||||
plugins consume this surface.
|
||||
- If an extension needs a new seam, add or replace a typed Plugin SDK subpath
|
||||
instead of reaching into core.
|
||||
- ALL bundled plugins must move to modern SDK seams in the same change. Do not
|
||||
keep extension-local compat paths for internal callers.
|
||||
- When intentionally expanding the contract, update the docs, exported subpath
|
||||
list, package exports, and API/contract checks in the same change.
|
||||
|
||||
@@ -76,7 +76,8 @@ can affect bundled plugins and third-party plugins.
|
||||
|
||||
## Expanding The Boundary
|
||||
|
||||
- Additive, backwards-compatible changes are the default.
|
||||
- SDK surface is too large. Do not add compat barrels, aliases, or fallback exports for convenience. Replace old entrypoints when cleaner.
|
||||
- Public third-party API is the only compat exception: document/version breaks, migrate ALL bundled/internal plugins first, then aggressively deprecate unused exports.
|
||||
- When adding or changing a public subpath, keep these aligned:
|
||||
- docs in `docs/plugins/*`
|
||||
- `scripts/lib/plugin-sdk-entrypoints.json`
|
||||
|
||||
Reference in New Issue
Block a user