UNPKG

shipdeck

Version:

Ship MVPs in 48 hours. Fix bugs in 30 seconds. The command deck for developers who ship.

87 lines (64 loc) 2.68 kB
# Task 001: Anthropic API Integration ## 1. Task Overview ### Task Title **Title:** Integrate Anthropic SDK for AI-powered code execution ### Goal Statement **Goal:** Enable Shipdeck Ultimate to execute actual AI-powered code generation through the Anthropic API, transforming it from a template generator to a real MVP builder. This is the foundation that enables our 48-hour guarantee. --- ## 2. Strategic Analysis ### Problem Context Currently, Shipdeck generates templates but doesn't execute AI tasks. We need to integrate the Anthropic SDK to enable actual code generation and execution. ### Recommendation Implement direct Anthropic API integration with proper authentication, token management, and streaming responses. --- ## 3. Technical Requirements ### Functional Requirements - User can provide Anthropic API key via environment variable or config - System executes AI agents with real Claude API calls - Token usage tracking and cost estimation - Streaming responses for real-time progress - Error handling for API limits and failures ### Non-Functional Requirements - **Performance:** Sub-second response initiation - **Security:** Secure API key storage, never exposed in logs - **Reliability:** Retry logic for transient failures - **Cost Management:** Token usage tracking and limits --- ## 4. Implementation Plan ### Phase 1: SDK Integration - [ ] Install @anthropic-ai/sdk package - [ ] Create lib/ultimate/anthropic-client.js module - [ ] Implement authentication with API key management - [ ] Add configuration for model selection (Claude 3.5 Sonnet) ### Phase 2: Agent Execution Layer - [ ] Create lib/ultimate/agent-executor.js - [ ] Implement prompt construction from templates - [ ] Add streaming response handler - [ ] Implement token counting and cost calculation ### Phase 3: Configuration Management - [ ] Add API key configuration commands - [ ] Create config validation - [ ] Implement usage limits and quotas - [ ] Add cost estimation features ### Phase 4: Testing - [ ] Test with simple "Hello World" generation - [ ] Verify token counting accuracy - [ ] Test error handling scenarios - [ ] Validate streaming responses --- ## 5. Success Criteria - [ ] API key can be configured and validated - [ ] Simple prompt generates actual code via Claude API - [ ] Token usage is tracked and displayed - [ ] Errors are handled gracefully with clear messages - [ ] Cost estimates are accurate within 5% --- ## 6. Dependencies - @anthropic-ai/sdk npm package - Valid Anthropic API key for testing - Claude 3.5 Sonnet API access --- ## 7. Estimated Effort **Priority:** P0 (Critical - Week 1) **Complexity:** Medium **Duration:** 2-3 days