[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78FFXZCGC4ZMKNZHT2HJRQH":3,"skill-same:01M78FFXZCGC4ZMKNZHT2HJRQH":69},{"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":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":28,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M78FFXZCGC4ZMKNZHT2HJRQH","plugin-architecture",null,"poppyTM\u002Foride","poppyTM","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F339400917?v=4","01M78F6YNKFR5S5JQR27X9F09Z","Poppy Team","01M78F6YP8ZZTRES9X8Q2ZAD21",1,"MIT","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\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","1cd515630b8ceb57777d466bee4970fe7c2e30e0",".ai\u002Fskills\u002Fplugin-architecture",0,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride","https:\u002F\u002Fgithub.com\u002FpoppyTM","https:\u002F\u002Fpoppy.lat","Construímos linguagens de programação e ferramentas para quem lê código com o mesmo cuidado com que escreve.","2026-09-30 10:15:52",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add poppyTM\u002Foride --skill plugin-architecture",{"tool":37,"command":38},"bunx","bunx skills add poppyTM\u002Foride --skill plugin-architecture",{"tool":40,"command":41},"pnpm","pnpm dlx skills add poppyTM\u002Foride --skill plugin-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002FSKILL.md",true,[45,51,55,59,65],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"checks\u002Fplugin-architecture-checklist.md","REFERENCE","参考文档",2093,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Fchecks\u002Fplugin-architecture-checklist.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"manifest.json",2217,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Fmanifest.json",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fplugin-architecture-guide.md",3989,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Freferences\u002Fplugin-architecture-guide.md",{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"scripts\u002Fverify.sh","SCRIPT","脚本",4127,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Fscripts\u002Fverify.sh",{"path":66,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":67,"sourceHtmlUrl":68},"templates\u002Fplugin-architecture-spec.md",2396,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fplugin-architecture\u002Ftemplates\u002Fplugin-architecture-spec.md",[70,76,82,89,96,103],{"skillNo":71,"name":72,"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":73,"categories":74,"keywords":75,"publishedAt":18},"01M78FHQN254KEH0DETXT5JM29","zoom-reflow","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fzoom-reflow\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"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":79,"categories":80,"keywords":81,"publishedAt":18},"01M78FHP1880S695V8GQEE0RXK","wireframe-styleguide","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwireframe-styleguide\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M78FHHYM6AN2H819FABW01DZ","visual-regression","Pixel-by-pixel snapshot testing, Playwright integration, dynamic content masking, deterministic font rendering, and cross-browser CI gates","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fvisual-regression\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M78FHE53D8DD0QVRY5C37DA4","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\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fui-implementation\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":18},"01M78FHBJ1KXFF734GFE509TBJ","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\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftui-editor-engine\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"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":106,"categories":107,"keywords":108,"publishedAt":18},"01M78FH9X6CPJX1H61ZDWTTVW8","tree-sitter-context-indexing","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftree-sitter-context-indexing\u002FSKILL.md",[],[]]