Back to Skills

rough-draft-interface

verified

Phase 1 - Define the structural contracts of the system

View on GitHub

Marketplace

mermaid-collab-dev

ben-mad-jlp/claude-mermaid-collab

Plugin

mermaid-collab

Repository

ben-mad-jlp/claude-mermaid-collab

skills/rough-draft-interface/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ben-mad-jlp/claude-mermaid-collab/blob/main/skills/rough-draft-interface/SKILL.md -a claude-code --skill rough-draft-interface

Installation paths:

Claude
.claude/skills/rough-draft-interface/
Powered by add-skill CLI

Instructions

## Step 0: Query Kodex

Query project knowledge for type conventions and patterns.

### Topic Inference (Interface Focus)

From work item context, build candidates:
- `{item-keyword}-types`
- `{item-keyword}-patterns`
- `type-conventions`
- `coding-standards`

### Example

```
Tool: mcp__plugin_mermaid-collab_mermaid__kodex_query_topic
Args: { "project": "<cwd>", "name": "type-conventions" }
```

Display found topics as context before defining interfaces.

# Phase 1: Interface

Define the structural contracts of the system.

## What to Produce

1. **File paths** - List all files that will be created or modified
2. **Class and function signatures** - Names, parameters, return types
3. **Public API contracts** - How components interact with each other
4. **Type definitions** - Custom types, interfaces, enums

## Process

```bash
# Read design doc
cat .collab/<name>/documents/design.md
```

**For each component identified in design:**
1. Define the file path where it will live
2. List all public functions/methods with signatures
3. Define input/output types
4. Document how it connects to other components

## Output Format

**Create per-item interface documents** instead of adding to design.md:

For each work item N, create `interface-item-N.md`:

```
Tool: mcp__plugin_mermaid-collab_mermaid__create_document
Args: {
  "project": "<cwd>",
  "session": "<session>",
  "name": "interface-item-N",
  "content": "<interface content for item N>"
}
```

**Document structure:**

```markdown
## Interface Definition

### File Structure
- `src/auth/types.ts` - Core type definitions
- `src/auth/service.ts` - Authentication service
- `src/auth/middleware.ts` - Express middleware

### Type Definitions

```typescript
// src/auth/types.ts
interface User {
  id: string;
  email: string;
  role: 'admin' | 'user';
}

interface AuthResult {
  success: boolean;
  user?: User;
  error?: string;
}
```

### Function Signatures

```typescript
// src/auth/service.ts
class AuthService {
  authentic

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3414 chars