A plugin authoring guide without a working example leaves developers with no reference implementation to validate their understanding. ISO 25010 maintainability.analysability requires that the system behavior be understandable; a worked example is the fastest path from zero to a functioning plugin. Without one, developers commonly misconfigure lifecycle methods, miss required manifest fields, or wire hooks incorrectly — producing broken plugins that erode trust in the system, not in their implementation.
Low because the absence of a working example plugin forces every plugin author to start from first principles, increasing the error rate on first-time implementations and slowing ecosystem growth.
Create a minimal but complete example plugin in examples/hello-world-plugin/ or src/plugins/example/. The example must be runnable, not just a stub.
// examples/hello-world-plugin/src/index.ts
export default {
name: 'hello-world',
version: '1.0.0',
async init(context) { context.logger.info('hello-world: initialized'); },
async activate() { context.hooks.on('before:request', (ctx) => {
context.logger.info(`Request to ${ctx.request.url}`);
}); },
async deactivate() {},
async destroy() {}
};
ID: plugin-extension-architecture.discovery-docs.example-plugin
Severity: low
What to look for: Check for a working example plugin that demonstrates the plugin system's capabilities. Look for:
examples/ or example-plugins/ directory with a complete, working pluginnpx create-my-plugin)Pass criteria: Count all example/reference plugins in the codebase. A complete, working example plugin exists — either in the repository, in documentation with full source code, or as a template/scaffold. The example demonstrates the core plugin capabilities: registration, lifecycle, and hook usage.
Fail criteria: No example plugin. Plugin authors must start from scratch with only API reference documentation (if that exists). OR an example exists but is outdated, broken, or incomplete (e.g., only shows the manifest, not the implementation).
Skip (N/A) when: The plugin system is so new that example plugins haven't been created yet AND the system has fewer than 3 total plugins. Even then, this should be a priority — mark as fail with a note that it should be created.
Detail on fail: "No example plugin exists in the repository. The docs/ directory mentions plugins but provides no working example. A plugin author would need to study the 3 existing plugins' source code to understand how to structure their own."
Remediation: Create an example plugin in src/plugins/example/ or examples/hello-world-plugin/:
// examples/hello-world-plugin/src/index.ts
export default { name: 'hello-world', version: '1.0.0', onInit: () => console.log('Hello from plugin!') }