Input: Design documents from /Users/he/projects/binance-api/specs/001-credential-manager/
Prerequisites: plan.md ✅, research.md ✅, data-model.md ✅, contracts/ ✅, quickstart.md ✅
1. Load plan.md from feature directory ✅
→ Extract: TypeScript/Node.js, tweetnacl, js-sha3, crypto, AccountRegistry pattern
→ Structure: src/core/credential-manager/ (AccountRegistry简化模式)
2. Load design documents:
→ data-model.md: HedgingAccountPool, AccountStatus, module integration entities
→ contracts/: credential-manager.ts (ICredentialManager), pacifica-signer.ts
→ research.md: @noble/ed25519, file watching, platform detection decisions
→ quickstart.md: basic usage, signing, hot-reload, multi-platform scenarios
3. Generate tasks by category ✅:
→ Setup: TypeScript project, dependencies, AccountRegistry structure
→ Tests: contract tests (TDD), integration tests, performance tests
→ Core: types, hedging models, signer strategies, unified interface
→ Integration: file watching, platform detection, module interaction
→ Polish: unit tests, performance verification, examples
4. Apply task rules ✅:
→ Different files = [P] parallel execution
→ Tests before implementation (TDD)
→ AccountRegistry simplification pattern (no over-design)
→ Module interaction capabilities for trading system
5. Number tasks sequentially (T001-T039) ✅
6. Generate dependency graph with hedging priorities ✅
7. Create parallel execution examples ✅
8. SUCCESS: Tasks ready for hedging account management implementation
[ID] [P?] Description
src/core/credential-manager/
integrated into existing structuretests/
(contract/, integration/, unit/, performance/) following existing patternssrc/types/credential.ts
and src/types/platformAdapter.ts
src/examples/
for hedging usage examplesed25519
, js-sha3, crypto, chokidarCRITICAL: These tests MUST be written and MUST FAIL before ANY implementation
# Launch T006-T010 together (different contract test files):
Task: "Contract test for ICredentialManager interface in tests/contract/credential-manager.contract.test.ts"
Task: "Contract test for IPacificaSigner interface in tests/contract/pacifica-signer.contract.test.ts"
Task: "Contract test for signer strategies in tests/contract/signer-strategies.contract.test.ts"
Task: "Contract test for AccountRegistry in tests/contract/account-registry.contract.test.ts"
Task: "Contract test for HedgingAccountPool in tests/contract/hedging-account-pool.contract.test.ts"
# Launch T016-T020 together (different type/model files):
Task: "Create credential types in src/types/credential.ts based on data-model.md"
Task: "Create platform adapter types in src/types/platformAdapter.ts"
Task: "Implement AccountRegistry in src/core/credential-manager/AccountRegistry.ts using simplified pattern"
Task: "Implement HedgingAccountPool model in src/core/credential-manager/HedgingAccountPool.ts"
Task: "Implement AccountStatus model in src/core/credential-manager/AccountStatus.ts"
# Launch T021-T025 together (different signer strategy files):
Task: "Implement PacificaSigner strategy in src/core/credential-manager/signers/PacificaSigner.ts"
Task: "Implement AsterSigner strategy in src/core/credential-manager/signers/AsterSigner.ts"
Task: "Implement BinanceSigner strategy in src/core/credential-manager/signers/BinanceSigner.ts"
Task: "Implement platform detection utils in src/core/credential-manager/PlatformDetector.ts"
Task: "Implement config validator in src/core/credential-manager/ConfigValidator.ts"
Applied during main() execution
From Contracts:
From Data Model (data-model.md):
From User Stories (quickstart.md):
Ordering Applied:
GATE: Checked before completion