Input: Design documents from /specs/002-httpclient-http-api/
Prerequisites: plan.md (✓), research.md (✓), data-model.md (✓), contracts/ (✓), quickstart.md (✓)
1. Load plan.md from feature directory ✓
→ Tech stack: TypeScript 5.1+, Node.js 18.12+, Jest 29.7+
→ Libraries: axios, ethers, tweetnacl, https-proxy-agent, winston
→ Structure: src/core/http-client/, src/adapters/, src/types/
2. Load design documents ✓:
→ data-model.md: 6 entities (HttpClient, PlatformAccount, HTTPRequest, HTTPResponse, AuthenticationContext, PlatformConfiguration)
→ contracts/: http-client.contract.md, platform-adapter.contract.md
→ research.md: Adapter pattern, credential-manager integration, performance optimization
3. Generate tasks by category:
→ Setup: TypeScript environment, ESLint config, credential integration
→ Tests: Contract tests, integration scenarios, performance validation
→ Core: HTTP client refactor, platform adapters, authentication integration
→ Integration: Credential-manager connection, proxy support, logging
→ Polish: Performance benchmarks, documentation, quality validation
4. Apply task rules: Different files = [P], TDD order maintained
5. Number tasks sequentially (T001-T032)
6. Validate completeness ✓
[ID] [P?] Description
src/core/http-client/
module directory structure per plan.mdsrc/core/http-client/tsconfig.json
src/core/http-client/.eslintrc.json
tests/jest.config.http-client.js
CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation
tests/contract/http-client-core.contract.test.ts
tests/contract/http-client-batch.contract.test.ts
tests/contract/http-client-platform.contract.test.ts
tests/contract/platform-adapter-request.contract.test.ts
tests/contract/platform-adapter-auth.contract.test.ts
tests/contract/platform-adapter-proxy.contract.test.ts
tests/integration/pacifica-balance.integration.test.ts
tests/integration/multi-platform-concurrent.integration.test.ts
tests/integration/credential-auth.integration.test.ts
tests/integration/proxy-routing.integration.test.ts
src/types/httpClient.ts
src/types/httpClient.ts
src/types/platformAdapter.ts
src/types/httpClientCore.ts
src/core/http-client/HttpClientCore.ts
src/core/http-client/PlatformAdapterFactory.ts
src/core/http-client/AuthenticationManager.ts
src/adapters/pacifica/PacificaHttpAdapter.ts
src/adapters/aster/AsterHttpAdapter.ts
src/adapters/binance/BinanceHttpAdapter.ts
src/utils/universalHttpClient.ts
src/core/http-client/PlatformAdapterFactory.ts
src/core/http-client/AuthenticationManager.ts
src/core/http-client/ProxyManager.ts
src/core/http-client/PerformanceMonitor.ts
src/core/http-client/HttpLogger.ts
tests/performance/response-time.performance.test.ts
tests/unit/error-handling.unit.test.ts
tests/unit/connection-pool.unit.test.ts
specs/002-httpclient-http-api/quickstart.md
Critical Dependencies:
Implementation Dependencies:
Integration Dependencies:
# Phase 3.2: Launch contract tests together (all must fail initially)
Task: "Contract test IUniversalHttpClient.request() in tests/contract/http-client-core.contract.test.ts"
Task: "Contract test IUniversalHttpClient.batchRequest() in tests/contract/http-client-batch.contract.test.ts"
Task: "Contract test IUniversalHttpClient.registerPlatform() in tests/contract/http-client-platform.contract.test.ts"
Task: "Contract test IPlatformAdapter.request() in tests/contract/platform-adapter-request.contract.test.ts"
# Phase 3.3: Launch type definitions in parallel
Task: "Extend HttpClientRequest interface in src/types/httpClient.ts"
Task: "Define IPlatformAdapter interface in src/types/platformAdapter.ts"
Task: "Define IUniversalHttpClient interface in src/types/httpClientCore.ts"
# Phase 3.3: Launch platform adapters in parallel (after core interfaces)
Task: "Enhance PacificaAdapter with credential-manager integration in src/adapters/pacifica/PacificaHttpAdapter.ts"
Task: "Enhance AsterAdapter with credential-manager integration in src/adapters/aster/AsterHttpAdapter.ts"
Task: "Enhance BinanceAdapter with credential-manager integration in src/adapters/binance/BinanceHttpAdapter.ts"
# Phase 3.5: Launch polish tasks in parallel
Task: "Performance benchmark tests for <100ms response time in tests/performance/response-time.performance.test.ts"
Task: "Unit tests for error handling and retry logic in tests/unit/error-handling.unit.test.ts"
Task: "Unit tests for connection pooling in tests/unit/connection-pool.unit.test.ts"
src/core/credential-manager/
From Contracts:
From Data Model:
From Quickstart Scenarios:
From Research Decisions: