[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EKNPVWNWD4SQPX19D4J074":3,"skill-same:01M7EKNPVWNWD4SQPX19D4J074":68},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":27,"ownerDescription":28,"updatedAt":29,"install":30,"resources":43},"01M7EKNPVWNWD4SQPX19D4J074","plugin-architecture",null,"raillen\u002Fdaisy-code-editor","raillen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F50306048?v=4","01M7EKBDVVBSPF21PBPVJYMNYR","Raillen Santos","01M7EKBDWD12A1K9N9Y638FGX9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# Plugin Architecture\n\n## Purpose\nDesign and implement sandboxed extension points with versioned contracts and explicit permissions: capability-scoped plugin APIs, semver-guaranteed ABI stability, isolated execution with resource quotas, and safe hot-reload lifecycles for third-party and first-party extensions.\n\n## Use when\n- Adding extension points (commands, themes, file handlers, language backends) to an editor, CLI, game engine, or server.\n- Defining a plugin API contract with versioning, deprecation windows, and compatibility tests.\n- Sandboxing untrusted plugin code with permission manifests, filesystem\u002Fnetwork scoping, and CPU\u002Fmemory quotas.\n- Supporting install, update, disable, and hot-reload lifecycles without host restarts.\n\n## Do not use when\n- Exposing tools over Model Context Protocol to AI clients (use `mcp-integration` for the server surface, `mcp-tooling` for SDK work).\n- Reviewing dependency supply-chain risk without extension execution (use `supply-chain-security`).\n- Scripting one-off internal automation with no third-party code boundary (a plain module suffices; no plugin system needed).\n\n## Required context\n- Host capabilities to expose (command registry, file events, editor buffers) and explicit non-goals (no raw process spawn, no ambient network).\n- Trust tiers: first-party (in-tree), vetted marketplace, and untrusted sideloaded plugins with per-tier sandbox depth.\n- ABI and distribution constraints: language (WASM, JS isolated-vm, native dylib), packaging format, and signature requirements.\n- Compatibility promise: semver policy, deprecation window (e.g., 2 minor releases), and LTS host versions under test.\n\n## Procedure\n1. **Declare the capability contract first**: Write `plugin-api.d.ts` (or IDL) listing every host function a plugin may call, each tagged with its permission (`fs.read`, `net.fetch`, `ui.commands`); anything unlisted is unreachable by construction.\n2. **Enforce permission manifests**: Every plugin ships `plugin.json` declaring requested permissions with justification; the host prompts once at install and denies undeclared calls at runtime with a logged `PermissionDenied` error naming the missing scope.\n3. **Sandbox execution with quotas**: Run plugins in WASM sandboxes (or isolated JS realms) with 128 MB memory and 500 ms synchronous-call ceilings; filesystem access goes through a capability-scoped VFS rooted at the workspace, never the real cwd.\n4. **Version and deprecate explicitly**: Gate API surface by `apiVersion` (currently `2.4`); breaking changes bump major, additions bump minor, and removals ship only after 2 minor releases of `@deprecated` warnings verified by the compat suite.\n5. **Harden the lifecycle**: Implement install (signature verify via Sigstore), enable\u002Fdisable without restart, and hot-reload that disposes old handles (timers, listeners, file watches) within 1 s; fuzz the loader with 200 malformed manifests and assert zero host crashes.\n6. **Prove isolation and verify**: Run the hostile-plugin battery (infinite loop, 2 GB allocation attempt, path-traversal read of `\u002Fetc\u002Fpasswd`, socket to `169.254.169.254`) and assert all four are contained with host uptime intact; run `scripts\u002Fverify.sh` to confirm artifact completeness.\n\n## Decision rules\n- **Capabilities, not ambient authority**: Plugins receive only declared handles; ambient filesystem, network, and process APIs are never exposed.\n- **Manifest lies fail closed**: A permission used but not declared throws at call time; a permission declared but unused warns at review.\n- **No silent breaking changes**: Any host change breaking a compat-suite plugin blocks the release until migrated or reverted.\n- **Hot-reload must dispose**: Leaked timers, listeners, or file watches across reload fail the lifecycle gate.\n- **Signatures required for distribution**: Marketplace and auto-update channels accept only Sigstore-signed bundles; unsigned loads are dev-mode only with a banner.\n\n## Evidence required\n- API contract (IDL\u002Ftypes) with permission tags and semver changelog for the release.\n- Hostile-plugin battery log: all four attacks contained, host uptime and p99 command latency unaffected.\n- Compat-suite report across declared host versions with deprecation warnings verified.\n- Loader fuzz log: 200 malformed manifests, zero host crashes, all rejected with typed errors.\n- Completed `templates\u002Fplugin-architecture-spec.md` with contract and verdicts.\n- Passing execution log from `scripts\u002Fverify.sh`.\n\n## Output contract\n- Plugin architecture specification with capability contract, permission model, and lifecycle guarantees.\n- Sandboxed loader, manifest validator, and permission enforcement with hostile-battery tests.\n- Compat suite wired into CI across declared host versions.\n\n## Stop conditions\n- Hostile battery fully contained and loader fuzz clean with typed rejections.\n- Compat suite green across declared host versions with no silent breakage.\n- Token budget exhausted.\n- Blocked on external dependency.\n\n## Escalation rules\n- Escalate to the security owner if a sandbox escape, signature bypass, or permission-enforcement gap is found; freeze distribution until fixed.\n- Escalate to product when a requested plugin capability (e.g., raw sockets) conflicts with the sandbox policy; never widen the sandbox silently.\n- Escalate to the lead architect if ABI stability blocks a needed host refactor; negotiate a major bump with migration tooling.\n",{},"main","2e465213b972294984c8c9515a47f811e4b358da",".ai\u002Fskills\u002Fplugin-architecture","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor","https:\u002F\u002Fgithub.com\u002Fraillen","https:\u002F\u002Fraillen.com","\u003C\u003CMarketing & IT>>\r\n\r\n@poppy-team\r\n@wasd-lat ","2026-10-16 09:17:52",{"source":7,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add raillen\u002Fdaisy-code-editor --skill plugin-architecture",{"tool":36,"command":37},"bunx","bunx skills add raillen\u002Fdaisy-code-editor --skill plugin-architecture",{"tool":39,"command":40},"pnpm","pnpm dlx skills add raillen\u002Fdaisy-code-editor --skill plugin-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002FSKILL.md",true,[44,50,54,58,64],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"checks\u002Fplugin-architecture-checklist.md","REFERENCE","参考文档",2093,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Fchecks\u002Fplugin-architecture-checklist.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"manifest.json",2217,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Fmanifest.json",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fplugin-architecture-guide.md",3989,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Freferences\u002Fplugin-architecture-guide.md",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"scripts\u002Fverify.sh","SCRIPT","脚本",4127,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Fscripts\u002Fverify.sh",{"path":65,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":66,"sourceHtmlUrl":67},"templates\u002Fplugin-architecture-spec.md",2396,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Ftemplates\u002Fplugin-architecture-spec.md",[69,75,81,88,95,102],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EKQYSDAX3SGSCRF873Z8E2","zoom-reflow","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fzoom-reflow\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7EKQX0MWJNQD482GGZPGES4","wireframe-styleguide","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwireframe-styleguide\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7EKQS57FS6JYE6KWW6X5ADJ","visual-regression","Pixel-by-pixel snapshot testing, Playwright integration, dynamic content masking, deterministic font rendering, and cross-browser CI gates","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fvisual-regression\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M7EKQMFR7651NVH100P5781Z","ui-implementation","Component-driven UI implementation, multi-state matrix (default, hover, focus-visible, active, disabled, loading, empty, error), DTCG design tokens, responsive layout contracts, and accessibility tree mapping.","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fui-implementation\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M7EKQG3NVX6DPCYS6Q4PA71V","tui-editor-engine","Text buffer and editing semantics for a terminal code editor — index conversion, transaction-first editing, multi-cursor invariants, undo grouping, and large-file behaviour.","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftui-editor-engine\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M7EKQEJ993JGC72FE2KFY3ZZ","tree-sitter-context-indexing","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftree-sitter-context-indexing\u002FSKILL.md",[],[]]