vibe-step-3-shared-types
Create shared TypeScript types in src/types/common.ts
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Step 3: Shared Types
Define all shared TypeScript types that components will consume.
Prerequisites
Read docs/orchestration/progress.json and verify:
-
step-1b-init-projectstatus iscompleted
If not, tell the user to run /vibe-step-1b-init-project first.
Reference Docs
Read this for type definitions:
-
docs/orchestration/06-technical-specifications.md— Shared types section
Step 1: Write Common Types
Write src/types/common.ts with all shared types from 06-technical-specifications.md:
/** Status of an individual agent step */
export type AgentStepStatus = 'pending' | 'active' | 'completed' | 'failed';
/** Overall agent operational status */
export type AgentStatus = 'idle' | 'running' | 'completed' | 'failed' | 'waiting' | 'connecting';
/** Semantic confidence level derived from numeric score */
export type ConfidenceLevel = 'low' | 'medium' | 'high';
/** Status of a human approval gate */
export type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired';
/** Represents a single step in an agent workflow */
export interface AgentStep {
id: string;
status: AgentStepStatus;
label: string;
description?: string;
confidence?: number; // 0-100
timestamp?: Date;
reasoning?: string;
errorMessage?: string;
}
/** Utility: derive confidence level from numeric score */
export function getConfidenceLevel(score: number): ConfidenceLevel {
if (score >= 80) return 'high';
if (score >= 40) return 'medium';
return 'low';
}
Step 2: Update Entry Point
Read src/index.ts and add type re-exports:
export type { AgentStep, AgentStepStatus, AgentStatus, ConfidenceLevel, ApprovalStatus } from './types/common';
export { getConfidenceLevel } from './types/common';
Step 3: Update Progress
Read docs/orchestration/progress.json, set globalSteps.step-3-shared-types.status to "completed", set completedAt to current ISO timestamp, update lastUpdated, write back.
Exit Criteria
-
src/types/common.tsexports all shared types:AgentStepStatus,AgentStatus,ConfidenceLevel,ApprovalStatus,AgentStep,getConfidenceLevel -
src/index.tsre-exports all types - No
anytypes used - All types have JSDoc comments
- Progress updated
- Confirm to user: "Shared types created. If step 2 is also done, run
/vibe-step-4-component PlanCardnext."
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-03-11
- Index updated
- 2026-03-11
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!