Agent skill
rough-draft-interface
Phase 1 - Define the structural contracts of the system
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/rough-draft-interface
SKILL.md
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}-patternstype-conventionscoding-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
- File paths - List all files that will be created or modified
- Class and function signatures - Names, parameters, return types
- Public API contracts - How components interact with each other
- Type definitions - Custom types, interfaces, enums
Process
# Read design doc
cat .collab/<name>/documents/design.md
For each component identified in design:
- Define the file path where it will live
- List all public functions/methods with signatures
- Define input/output types
- 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:
## 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
// src/auth/service.ts
class AuthService {
authenticate(email: string, password: string): Promise<AuthResult>
validateToken(token: string): Promise<User | null>
revokeToken(token: string): Promise<void>
}
// src/auth/middleware.ts
function requireAuth(req: Request, res: Response, next: NextFunction): void
function requireRole(role: string): Middleware
Component Interactions
middleware.requireAuthcallsservice.validateTokenservice.authenticatereturns tokens stored in Redis
## Verification Gate
Before moving to Phase 2, run verification:
```bash
# Trigger verify-phase hook
./hooks/verify-phase.sh interface <collab-name>
Checklist:
- All files from design are listed
- All public interfaces have signatures
- Parameter types are explicit (no
any) - Return types are explicit
- Component interactions are documented
GATE: Do NOT proceed until this checklist passes.
If Interface phase doesn't apply (e.g., pure config changes, docker setup):
- Document explicitly: "N/A - [reason why interface phase doesn't apply]"
- Add this to the design doc Interface Definition section
- You still MUST proceed through pseudocode, skeleton, and executing-plans
- Skipping to implementation is NEVER allowed
Update state on success:
Tool: mcp__plugin_mermaid-collab_mermaid__update_session_state
Args: { "project": "<cwd>", "session": "<name>", "phase": "rough-draft/pseudocode" }
Note: lastActivity is automatically updated by the MCP tool.
Completion
At the end of this skill's work, call complete_skill:
Tool: mcp__plugin_mermaid-collab_mermaid__complete_skill
Args: { "project": "<cwd>", "session": "<session>", "skill": "rough-draft-interface" }
Handle response:
- If
action == "clear": Invoke skill: collab-clear - If
next_skillis not null: Invoke that skill - If
next_skillis null: Workflow complete
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?