360 Secure SkillHub
360 安全技能中心

architecture-paradigm-microkernel

该 Skill 是一份微内核(插件)架构范式指南,说明何时采用、核心服务与插件契约设计、扩展加载与沙箱、SDK 和发布治理,并给出 ADR、权限模型、验证流水线及兼容性矩阵等交付要求。内容仅为文本指导,不包含可执行实现或工具调用。

分类:开发
athola
athola
热度 45.73
最近更新 2026-12-01 06:00:18

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add athola/nm-archetypes-architecture-paradigm-microkernel
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
architecture-paradigm-microkernel
description
Microkernel architecture with a minimal core and plugins
version
1.10.3
triggers
["architecture","microkernel","plugin","extensibility","platform-design","third parties extend a platform's core"]
metadata
{"openclaw":{"homepage":"https://github.com/athola/claude-night-market/tree/master/plugins/archetypes","emoji":"🏗️"}}
source
claude-night-market
source_plugin
archetypes

Night Market Skill: ported from claude-night-market/archetypes. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

The Microkernel (Plugin) Architecture Paradigm

When To Use

  • Building extensible systems with plugin architectures
  • Products requiring customer-specific customizations

When NOT To Use

  • Monolithic applications without plugin extensibility needs
  • Systems where all features are core and tightly coupled by design

When to Employ This Paradigm

  • When building platforms, Integrated Development Environments (IDEs), data ingestion pipelines, or marketplaces where third parties need to extend core functionality.
  • When the core system requires extreme stability, while extensions and features must evolve and change rapidly.
  • When isolating optional dependencies and sandboxing untrusted code provided by plugins is critical.

Adoption Steps

  1. Define Core Services: Clearly delineate the minimal responsibilities of the microkernel, such as scheduling, component lifecycle management, core domain primitives, and messaging.
  2. Specify the Plugin Contract: Design and document the formal contract for all plugins, including registration procedures, capability descriptors, lifecycle hooks (e.g., start, stop), and the permission model.
  3. Build the Extension Loader and Sandbox: Implement the mechanisms for loading extensions, performing version compatibility checks, negotiating capabilities, and isolating plugins to prevent failures from cascading.
  4. Provide a Software Development Kit (SDK): To facilitate plugin development, provide an SDK with project templates, testing harnesses, and compatibility-checking tools.
  5. Govern the Release Process: Maintain a clear compatibility matrix between core and plugin versions. Implement an automated regression test suite that validates core functionality against a variety of plugins.

Key Deliverables

  • An Architecture Decision Record (ADR) describing the division of responsibilities between the core and plugins, along with the governance model for plugin development and certification.
  • Formal documentation for the security and permission model, detailing what capabilities are available to plugins.
  • An automated plugin validation pipeline that performs linting, runs tests, and executes the plugin within a sandbox environment.

Risks & Mitigations

  • Uncontrolled Plugin Proliferation:
    • Mitigation: Without a curation process, the maintenance cost of supporting numerous plugins can become unsustainable. Enforce a formal certification process or a marketplace-style review for all third-party plugins.
  • Version Skew Between Core and Plugins:
    • Mitigation: Use semantic versioning (SemVer) rigorously for both the core and the plugins. Where necessary, provide abstraction layers or "shims" to maintain backward compatibility with older plugins.
  • Core System Bloat:
    • Mitigation: There is often pressure to add feature logic to the stable core. Aggressively resist this temptation. The core should remain minimal, with new features implemented as plugins whenever possible.

Concrete Components

Vocabulary for the tools and abstractions an implementation of this paradigm tends to carry. Not dependencies, and not tools: frontmatter.

  • plugin-loader: discovers, validates, and activates plugins at runtime
  • sandbox-executor: runs each plugin in an isolated context with a constrained capability set
  • sdk-generator: produces language-specific SDKs from the kernel's stable interface

Exit Criteria

  • An ADR documents the microkernel's minimal responsibilities, the plugin contract (registration, capability descriptors, lifecycle hooks), and the permission model.
  • A formal plugin SDK or specification (templates, testing harness, compatibility checker) exists before any third-party plugin development begins.
  • An automated plugin validation pipeline (lint, test, sandbox execution) is operational and gates plugin certification.
  • A compatibility matrix between core versions and supported plugin API versions is published and updated whenever the core plugin contract changes.