LAYER 01 · Build the mental model

Why everything is a plugin

Not to maximize plugin count, but to give every effect an owner and every capability a replacement point

13 min2 source anchorsupstream@47f9438
behavior = plugin + contract + lifecycle
The question this chapter resolves

If sessions, tools, and even the agent loop are plugins, what remains as the core?

Build intuition

A monolithic framework is a ship with welded compartments. A Cordis plugin tree is closer to standardized spacecraft modules: each declares interfaces, connection points, and separation procedures; composition changes the mission.

MECHANISM

Mechanism

Cordis keeps a small kernel for contexts, mounting, service registration, event dispatch, and effect cleanup. Concrete agent behavior comes from plugins on the tree.

Extensions listen at documented events or register services; they do not add provider-specific branches to agent-loop.

Step 1 of 4

Mount plugin

The plugin receives a context and config.

INVARIANTS

What extensions must preserve

  • First-party and third-party capabilities use the same plugin contract
  • Unloading must leave no listener, service, or background task behind
  • Extensions depend on public services/events, not the concrete loop
FAILURE MODES

The tempting wrong turns

  • ×Treating plugins as third-party UI widgets
  • ×Registering side effects without a disposer
  • ×Depending on accidental load order instead of declared requirements
VERIFY IN SOURCE

Do not trust the conclusion—verify it

These anchors are pinned to official deepseek-harness@47f9438; account for later breaking changes when reading current upstream.

KNOWLEDGE CHECK

Pause for ten seconds before revealing

Why is clean removal as important as installation?

Why the next chapter follows

With the plugin claim established, we now map the six planes that tell each plugin where it belongs.

Learn DeepSeek Harness

An independent learning project. Explanations derive from source; upstream remains authoritative.