Skip to content
Back to skills

696 Plugin Architecture Db7e7947

ASecurity

**Status**: Accepted **Date**: 2024-12-27

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
businesspythontesting

Works with

  • mcp

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 696-plugin-architecture_db7e7947 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 696 Plugin Architecture Db7e7947?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 696 Plugin Architecture Db7e7947
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-696-plugin-architecture-db7e7947/badge)](https://www.skillsdirectory.com/skills/tools-only-696-plugin-architecture-db7e7947)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# ADR 006: Plugin Architecture from Day One

**Status**: Accepted
**Date**: 2024-12-27

## Context

Colin needs to support multiple input sources (files, MCP, remote Colin), output formats (markdown, skills, RAG), and materialization strategies (DAG, BFS). These are natural extension points.

## Decision

Define plugin protocols from day one, even though MVP only uses default implementations:

### InputPlugin
```python
class InputPlugin(Protocol):
    scheme: str  # "file", "mcp", "colin"
    async def fetch(self, uri: str) -> RefResult: ...
    async def hash(self, uri: str) -> str: ...
```

### OutputPlugin
```python
class OutputPlugin(Protocol):
    name: str  # "markdown", "skill", "rag"
    async def emit(self, doc: CompiledDocument, output_dir: Path) -> list[Path]: ...
```

### MaterializationPlugin
```python
class MaterializationPlugin(Protocol):
    name: str  # "dag", "bfs", "streaming"
    async def materialize(
        self,
        changed: set[str],
        graph: DependencyGraph,
        compile_fn: Callable[[str], Awaitable[CompiledDocument]],
    ) -> list[str]: ...
```

### MVP Defaults
- Input: `file` (local `.colin` files)
- Output: `markdown` (raw markdown to `dist/`)
- Materialization: `dag` (topological sort, fails on cycles)

## Rationale

1. **Clean interfaces**: Protocols define the contract before implementation
2. **Testable**: Can swap stub implementations for testing
3. **Future-proof**: Adding MCP or Skills is just a new plugin
4. **Type safe**: Protocol-based for static type checking

## Consequences

- Slightly more code upfront (protocols + implementations)
- Engine is decoupled from specific implementations
- Clear extension points for future features

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.