Skip to content
Agentmart
Submit a tool

interface-implementation

Checklist and architectural rules for implementing new assistant interfaces (CLI, Slack, web, etc.).

Skill by cedricziel

IndexedMIT★ 6
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cedricziel-interface-implementation

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Checklist and architectural rules for implementing new assistant interfaces (CLI, Slack, web, etc.). Every interface MUST use the Orchestrator to ensure consistent behaviour: system prompt, tools, skills, memory, and the full ReAct loop. Use this skill when adding, reviewing, or fixing an interface.

Use cases: frontend, productivity, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/interface-implementation

What's inside

Skill name
interface-implementation
Description
Checklist and architectural rules for implementing new assistant interfaces (CLI, Slack, web, etc.). Every interface MUST use the Orchestrator to ensure consistent behaviour: system prompt, tools, skills, memory, and the full ReAct loop. Use this skill when adding, reviewing, or fixing an interface.
License
MIT
Instructions
229 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Interface Implementation Guide

All assistant interfaces **MUST** route user messages through the
`Orchestrator` (`assistant-runtime`). Direct `LlmProvider::chat_streaming()`
calls bypass the system prompt, tools, skills, memory, and ReAct loop —
producing a "dumb chatbot" instead of the full assistant.

## Architecture invariant

```text
User message
  -> Interface (transport layer)
    -> Orchestrator.submit_turn()        <-- REQUIRED
      -> Worker dispatches to one of:
         run_turn()                      (default)
         run_turn_streaming()            (with token sink)
         run_turn_with_tools()           (with extension tools)
      -> System prompt (MemoryLoader)
      -> Tool specs (ToolExecutor + extensions)
      -> Skills XML (SkillRegistry)
      -> ReAct loop (multi-iteration tool calling)
    <- TurnResult { answer, attachments }
  <- Interface renders / delivers response
```

An interface that calls `llm.chat_streaming()` directly violates this
invariant and MUST be fixed.

---

## Checklist for a new interface

### 1. Add an `Interface` variant

In `crates/core/src/types.rs`, add a variant to the `Interface` enum:

```rust
pub enum Interface {
    Cli,
    Signal,
    Mcp,
    Slack,
    Mattermost,
    Web,           // <-- new
    Scheduler,
}
```

### 2. Bootstrap the full dependency chain

Every interface needs these components, in order:

```text
AssistantConfig        (load from ~/.assistant/config.toml)
  -> StorageLayer      (SQLite, migrations)
  -> SkillRegistry     (load embedded + dir-scanned skills)
  -> LlmProvider       (Ollama / Anthropic / OpenAI)
  -> ToolExecutor      (storage, llm, registry, config)
  -> MessageBus        (if config.bus.kind == "nats": NatsMessageBus::connect(&config.bus), else storage.message_bus())
  -> Orchestrator      (llm, storage, executor, registry, bus, config)
  -> executor.set_subagent_runner(orchestrator)   // break init cycle
```

The `assistant_runtime::bootstrap` module provides shared helpers:

- `load_config(path)` — loads config TOML
- `skill_dirs(config, project_root)` — returns skill search directories
- `AutoDenyConfirmation` — for non-interactive interfaces

### 3. Spawn the worker

The orchestrator's bus-based processing requires a background worker:

```rust
let worker_orch = orchestrator.clone();
tokio::spawn(async move {
    worker_orch.run_worker("web-worker").await;
});
```

Without this, `submit_turn()` will publish to the bus but nothing will
claim and process the request.

### 4. Manage conversations

Each logical conversation needs a stable `Uuid`:

| Interface  | Key                             | Strategy                    |
| ---------- | ------------------------------- | --------------------------- |
| CLI        | session                         | `Uuid::new_v4()` at startup |
| Slack      | `(channel_id, thread_ts)`       | HashMap                     |
| Mattermost | `(channel_id, root_post_id)`    | LRU cache (10k)             |
| Signal     | sender phone number             | HashMap                     |
| Web UI     | conversation UUID from database | `ConversationStore` rows    |

The orchestrator creates the conversation record lazily inside
`prepare_history()` via `create_conversation_with_id()` (upsert).

### 5. Choose a delivery mode

| Mode                | Registration call             | Worker method           | Use case                  |
| ------------------- | ----------------------------- | ----------------------- | ------------------------- |
| **Streaming**       | `register_token_sink(id, tx)` | `run_turn_streaming()`  | CLI, Signal, Web UI (SSE) |
| **Extension tools** | `register_extensions(id, ..)` | `run_turn_with_tools()` | Slack, Mattermost         |
| **Fire-and-forget** | (none)                        | `run_turn()`            | Scheduler, MCP            |

For web interfaces, streaming via `register_token_sink` is the natural
fit — pipe tokens to SSE events.

### 6. Submit the turn

```rust
// For streaming:
orchestrator.register_token_sink(conversation_id, token_tx).await;

// For extension tools:
orchestrator.register_extensions(conversation_id, tools, attachments).await;

// Then submit (always):

From cedricziel/assistant, MIT.

More from cedricziel/assistant

Signals

Stars
6
Forks
1
Open issues
14
Last commit (this folder)
Apr 7, 2026 (6 months ago)
Last release
May 26, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from cedricziel

Cite this page

interface-implementation skill. Agent Mart. https://agentmart.dev/skills/cedricziel-interface-implementation (last updated 2026-10-24)