F000-frontend.plan.cspec
1 # F000-frontend.plan.cspec 2 # Master Implementation Plan for Frontend Domain 3 # Schema: plan-schema.cspec v1.0.0 4 5 plan_metadata: 6 component_id: frontend 7 component_ref: components/frontend.cspec 8 plan_version: 1.2.0 9 plan_status: in_progress 10 created: 2026-01-14 11 updated: 2026-01-14 12 13 wave_context: 14 topological_level: 5 15 is_root: false 16 upstream_components: [T001, T002, T003, D004, D005, D006, D007, D008] 17 downstream_components: [] 18 critical_path: false 19 cascade_group: frontend 20 21 # === PHASES ALIGNED WITH IMPLEMENTATION PLAN === 22 phases: 23 - phase_id: phase_1 24 name: "Foundation" 25 status: in_progress 26 blocked_by: 27 - dependency_ref: T001 28 reason: "Requires AX token types for wallet-core" 29 wait_for: interface_stable 30 - dependency_ref: T002 31 reason: "Requires DX token types for wallet-core" 32 wait_for: interface_stable 33 34 tasks: 35 - task_id: F-T001 36 name: "Initialize wallet-core repository" 37 description: "Create wallet-core Rust library with module structure" 38 target_files: 39 - path: wallet-core/Cargo.toml 40 action: create 41 - path: wallet-core/src/lib.rs 42 action: create 43 estimate: 44 effort: small 45 confidence: high 46 47 - task_id: F-T002 48 name: "Implement BIP39 mnemonic module" 49 description: "Mnemonic generation and validation (24 words)" 50 target_files: 51 - path: wallet-core/src/mnemonic/mod.rs 52 action: create 53 estimate: 54 effort: medium 55 confidence: high 56 risk: 57 level: low 58 factors: [well_specified_standard] 59 60 - task_id: F-T003 61 name: "Implement multi-curve key derivation" 62 description: "BLS12-377, secp256k1, ed25519 derivation from single seed" 63 target_files: 64 - path: wallet-core/src/derivation/mod.rs 65 action: create 66 - path: wallet-core/src/derivation/bls.rs 67 action: create 68 - path: wallet-core/src/derivation/secp.rs 69 action: create 70 - path: wallet-core/src/derivation/ed25519.rs 71 action: create 72 estimate: 73 effort: large 74 confidence: medium 75 risk: 76 level: high 77 factors: [cryptographic_correctness] 78 79 - task_id: F-T004 80 name: "Implement payment code generation" 81 description: "Aleo-native payment codes (acdc1 prefix, 81 bytes)" 82 target_files: 83 - path: wallet-core/src/payment_code/mod.rs 84 action: create 85 estimate: 86 effort: medium 87 confidence: medium 88 risk: 89 level: medium 90 factors: [format_specification] 91 92 - task_id: F-T005 93 name: "Implement FFI bindings foundation" 94 description: "cbindgen for iOS, JNI for Android, wasm-bindgen for web" 95 target_files: 96 - path: wallet-core/src/ffi/mod.rs 97 action: create 98 - path: wallet-core/src/ffi/c_api.rs 99 action: create 100 - path: wallet-core/src/ffi/jni.rs 101 action: create 102 - path: wallet-core/src/ffi/wasm.rs 103 action: create 104 estimate: 105 effort: large 106 confidence: medium 107 risk: 108 level: medium 109 factors: [platform_compatibility] 110 111 - task_id: F-T006 112 name: "Create design system tokens" 113 description: "Colors, typography, spacing, animation tokens" 114 target_files: 115 - path: acdc-design/tokens/colors.json 116 action: create 117 - path: acdc-design/tokens/typography.json 118 action: create 119 - path: acdc-design/tokens/spacing.json 120 action: create 121 - path: acdc-design/tokens/animation.json 122 action: create 123 estimate: 124 effort: small 125 confidence: high 126 127 - task_id: F-T007 128 name: "Setup i18n framework" 129 description: "Localization framework with English source strings" 130 target_files: 131 - path: acdc-i18n/_meta.json 132 action: create 133 - path: acdc-i18n/namespaces/common.json 134 action: create 135 - path: acdc-i18n/namespaces/wallet.json 136 action: create 137 estimate: 138 effort: small 139 confidence: high 140 141 - task_id: F-T008 142 name: "Setup CI/CD pipelines" 143 description: "Forgejo CI for wallet-core and design repos" 144 target_files: 145 - path: wallet-core/.forgejo/workflows/ci.yml 146 action: create 147 - path: acdc-design/.forgejo/workflows/ci.yml 148 action: create 149 estimate: 150 effort: small 151 confidence: high 152 153 # CI/Testing Infrastructure (added 2026-01-14) 154 - task_id: F-T008a 155 name: "Configure Rust CI pipeline template" 156 description: "Rust CI with cargo tarpaulin, FFI builds, critical path coverage" 157 target_files: 158 - path: infra/ci-templates/frontend/rust.yml 159 action: reference 160 verification: "CI passes for wallet-core with >=80% coverage" 161 estimate: 162 effort: small 163 confidence: high 164 165 - task_id: F-T008b 166 name: "Configure TypeScript CI pipeline template" 167 description: "TypeScript CI with vitest, playwright E2E, a11y testing" 168 target_files: 169 - path: infra/ci-templates/frontend/typescript.yml 170 action: reference 171 verification: "CI passes with coverage, E2E, and a11y checks" 172 estimate: 173 effort: small 174 confidence: high 175 176 - task_id: F-T008c 177 name: "Setup Storybook visual testing" 178 description: "Storybook with theme switching, Chromatic visual regression" 179 target_files: 180 - path: acdc-design/.storybook/main.ts 181 action: create 182 - path: acdc-design/.storybook/preview.tsx 183 action: create 184 - path: acdc-design/chromatic.config.json 185 action: create 186 verification: "Storybook builds and deploys to design.ac-dc.network" 187 estimate: 188 effort: medium 189 confidence: high 190 191 - task_id: F-T008d 192 name: "Configure test generation scripts" 193 description: "Auto-generate test stubs from cspec interface definitions" 194 target_files: 195 - path: scripts/frontend/generate-tests.sh 196 action: reference 197 - path: scripts/frontend/coverage-check.sh 198 action: reference 199 verification: "./scripts/frontend/generate-tests.sh F001 generates valid test stubs" 200 estimate: 201 effort: small 202 confidence: high 203 204 - task_id: F-T008e 205 name: "Configure MCP tools for frontend CI" 206 description: "frontend_ci_status, frontend_coverage, storybook_status tools" 207 target_files: 208 - path: .claude/mcp/server.py 209 action: modify 210 verification: "mcp frontend_ci_status returns repo status table" 211 estimate: 212 effort: small 213 confidence: high 214 215 - task_id: F-T008f 216 name: "Configure ADL contracts CI pipeline" 217 description: "ADL build, test, formal verification, testnet deploy" 218 target_files: 219 - path: infra/ci-templates/frontend/adl.yml 220 action: reference 221 verification: "ADL contracts build and test in CI" 222 estimate: 223 effort: small 224 confidence: medium 225 226 deliverables: 227 - deliverable_id: F-D001 228 name: "wallet-core library foundation" 229 type: code 230 verification: "cargo test --package wallet-core" 231 232 - deliverable_id: F-D002 233 name: "Design system tokens" 234 type: assets 235 verification: "Token files validate against schema" 236 237 - deliverable_id: F-D002a 238 name: "CI/Testing Infrastructure" 239 type: infrastructure 240 verification: "mcp frontend_ci_status shows all repos; mcp storybook_status shows deployment" 241 242 success_criteria: 243 - "BIP39 mnemonic generation/validation works" 244 - "Key derivation for all 3 curves functional" 245 - "Payment code generation produces valid acdc1 codes" 246 - "FFI bindings compile for all target platforms" 247 - "Design tokens complete for themes" 248 - "CI pipelines pass for all repos (>=80% coverage)" 249 - "Storybook deployed to design.ac-dc.network" 250 - "MCP tools operational for frontend CI monitoring" 251 252 - phase_id: phase_2 253 name: "Core Wallet" 254 status: pending 255 blocked_by: 256 - dependency_ref: F.phase_1 257 reason: "Requires wallet-core foundation" 258 wait_for: complete 259 260 tasks: 261 - task_id: F-T009 262 name: "Initialize acdc-wallet repository structure" 263 description: "Shared components, platform directories, stores" 264 target_files: 265 - path: acdc-wallet/shared/components/.gitkeep 266 action: create 267 - path: acdc-wallet/shared/hooks/.gitkeep 268 action: create 269 - path: acdc-wallet/shared/stores/.gitkeep 270 action: create 271 - path: acdc-wallet/platforms/ios/.gitkeep 272 action: create 273 - path: acdc-wallet/platforms/android/.gitkeep 274 action: create 275 - path: acdc-wallet/platforms/desktop/.gitkeep 276 action: create 277 - path: acdc-wallet/platforms/web/.gitkeep 278 action: create 279 estimate: 280 effort: small 281 confidence: high 282 283 - task_id: F-T010 284 name: "Implement onboarding flow" 285 description: "Seed generation, verification, setup completion" 286 target_files: 287 - path: acdc-wallet/shared/components/onboarding/ 288 action: create 289 estimate: 290 effort: medium 291 confidence: high 292 293 - task_id: F-T011 294 name: "Implement three-pocket wallet view" 295 description: "ALPHA, DX, sAX pocket components" 296 target_files: 297 - path: acdc-wallet/shared/components/wallet/ 298 action: create 299 estimate: 300 effort: large 301 confidence: medium 302 303 - task_id: F-T012 304 name: "Implement send/receive flows" 305 description: "ALPHA send, receive, QR generation" 306 target_files: 307 - path: acdc-wallet/shared/components/send/ 308 action: create 309 - path: acdc-wallet/shared/components/receive/ 310 action: create 311 estimate: 312 effort: medium 313 confidence: high 314 315 - task_id: F-T013 316 name: "Implement basic trading (simple mode)" 317 description: "Market buy/sell, basic limit orders" 318 target_files: 319 - path: acdc-wallet/shared/components/trading/simple/ 320 action: create 321 estimate: 322 effort: large 323 confidence: medium 324 325 - task_id: F-T014 326 name: "Implement settings screens" 327 description: "Account switcher, security, preferences" 328 target_files: 329 - path: acdc-wallet/shared/components/settings/ 330 action: create 331 estimate: 332 effort: medium 333 confidence: high 334 335 - task_id: F-T015 336 name: "CLI wallet commands" 337 description: "acdc wallet create/restore/balance/send/receive" 338 target_files: 339 - path: acdc-cli/src/commands/wallet.rs 340 action: create 341 estimate: 342 effort: medium 343 confidence: high 344 345 deliverables: 346 - deliverable_id: F-D003 347 name: "Wallet app (all platforms)" 348 type: code 349 verification: "E2E tests pass on all platforms" 350 351 - deliverable_id: F-D004 352 name: "CLI wallet commands" 353 type: code 354 verification: "acdc wallet --help works" 355 356 success_criteria: 357 - "Onboarding creates and verifies seed" 358 - "Three-pocket view shows ALPHA, DX, sAX" 359 - "Send/receive ALPHA works" 360 - "Simple trading mode functional" 361 - "CLI wallet commands operational" 362 363 - phase_id: phase_3 364 name: "Trading & Swaps" 365 status: pending 366 blocked_by: 367 - dependency_ref: F.phase_2 368 reason: "Requires core wallet" 369 wait_for: complete 370 - dependency_ref: D004 371 reason: "Requires spot engine" 372 wait_for: interface_stable 373 374 tasks: 375 - task_id: F-T016 376 name: "Implement pro trading mode" 377 description: "TradingView charts, all order types, depth of market" 378 target_files: 379 - path: acdc-wallet/shared/components/trading/pro/ 380 action: create 381 estimate: 382 effort: large 383 confidence: medium 384 risk: 385 level: medium 386 factors: [charting_integration] 387 388 - task_id: F-T017 389 name: "Implement market maker mode" 390 description: "Quick quote, bulk orders, inventory tracking" 391 target_files: 392 - path: acdc-wallet/shared/components/trading/mm/ 393 action: create 394 estimate: 395 effort: large 396 confidence: medium 397 398 - task_id: F-T018 399 name: "Implement P2P swap system" 400 description: "Public orderbook, private swap codes, direct wallet-to-wallet" 401 target_files: 402 - path: acdc-wallet/shared/components/swap/ 403 action: create 404 estimate: 405 effort: large 406 confidence: medium 407 risk: 408 level: high 409 factors: [adaptor_signatures] 410 411 - task_id: F-T019 412 name: "Implement swap code handling" 413 description: "Generate, share, scan swap1 codes" 414 target_files: 415 - path: wallet-core/src/swap_code/mod.rs 416 action: create 417 estimate: 418 effort: medium 419 confidence: high 420 421 - task_id: F-T020 422 name: "External chain integration" 423 description: "BTC, ETH, SOL send/receive/swap" 424 target_files: 425 - path: acdc-wallet/shared/components/external/ 426 action: create 427 estimate: 428 effort: large 429 confidence: low 430 risk: 431 level: high 432 factors: [cross_chain_complexity] 433 434 deliverables: 435 - deliverable_id: F-D005 436 name: "Pro trading mode" 437 type: code 438 verification: "Pro mode E2E tests pass" 439 440 - deliverable_id: F-D006 441 name: "P2P swap system" 442 type: code 443 verification: "Swap completion E2E test" 444 445 success_criteria: 446 - "Pro mode with TradingView charts" 447 - "Market maker mode functional" 448 - "P2P swaps with adaptor signatures" 449 - "Private swap codes work" 450 - "External chain basic support" 451 452 - phase_id: phase_4 453 name: "Governance & Operators" 454 status: pending 455 blocked_by: 456 - dependency_ref: F.phase_3 457 reason: "Requires trading infrastructure" 458 wait_for: complete 459 - dependency_ref: D008 460 reason: "Requires governance system" 461 wait_for: interface_stable 462 463 tasks: 464 - task_id: F-T021 465 name: "Implement governance UI in wallet" 466 description: "Proposals list, proposal detail, voting" 467 target_files: 468 - path: acdc-wallet/shared/components/governance/ 469 action: create 470 estimate: 471 effort: medium 472 confidence: high 473 474 - task_id: F-T022 475 name: "Implement governor console" 476 description: "Minimal web app for Central Bank Governors" 477 target_files: 478 - path: acdc-governor/web/ 479 action: create 480 estimate: 481 effort: large 482 confidence: medium 483 484 - task_id: F-T023 485 name: "Implement validator dashboard" 486 description: "Status, rewards, history for validators" 487 target_files: 488 - path: acdc-wallet/shared/components/validator/ 489 action: create 490 estimate: 491 effort: medium 492 confidence: high 493 494 - task_id: F-T024 495 name: "Implement prover dashboard" 496 description: "Status, rewards, stats for provers" 497 target_files: 498 - path: acdc-wallet/shared/components/prover/ 499 action: create 500 estimate: 501 effort: medium 502 confidence: high 503 504 - task_id: F-T025 505 name: "CLI governance/validator/prover commands" 506 description: "acdc gov/validator/prover commands" 507 target_files: 508 - path: acdc-cli/src/commands/governance.rs 509 action: create 510 - path: acdc-cli/src/commands/validator.rs 511 action: create 512 - path: acdc-cli/src/commands/prover.rs 513 action: create 514 estimate: 515 effort: medium 516 confidence: high 517 518 - task_id: F-T026 519 name: "Implement DX staking UI" 520 description: "Stake, unstake, claim dividends" 521 target_files: 522 - path: acdc-wallet/shared/components/staking/ 523 action: create 524 estimate: 525 effort: medium 526 confidence: high 527 528 deliverables: 529 - deliverable_id: F-D007 530 name: "Governance UI" 531 type: code 532 verification: "Voting E2E test" 533 534 - deliverable_id: F-D008 535 name: "Governor console" 536 type: code 537 verification: "Minting workflow E2E test" 538 539 success_criteria: 540 - "Governance tab shows for qualified DX holders" 541 - "Governor console minimal and functional" 542 - "Validator/prover dashboards show status" 543 - "CLI commands for operators work" 544 - "DX staking functional" 545 546 - phase_id: phase_5 547 name: "Public Utilities" 548 status: pending 549 blocked_by: 550 - dependency_ref: F.phase_4 551 reason: "Requires governance integration" 552 wait_for: complete 553 554 tasks: 555 - task_id: F-T027 556 name: "Implement ALPHA-Scanner" 557 description: "Block explorer with dashboard/explorer modes" 558 target_files: 559 - path: acdc-scanner/web/ 560 action: create 561 - path: acdc-scanner/api/ 562 action: create 563 - path: acdc-scanner/indexer/ 564 action: create 565 estimate: 566 effort: large 567 confidence: medium 568 569 - task_id: F-T028 570 name: "Implement developer portal" 571 description: "Docusaurus site with API docs, SDK guides" 572 target_files: 573 - path: acdc-docs/site/ 574 action: create 575 - path: acdc-docs/api/ 576 action: create 577 estimate: 578 effort: medium 579 confidence: high 580 581 - task_id: F-T029 582 name: "Implement testnet faucet" 583 description: "Faucet for test-ALPHA, test-DX, test-sAX" 584 target_files: 585 - path: acdc-docs/faucet/ 586 action: create 587 estimate: 588 effort: small 589 confidence: high 590 591 - task_id: F-T030 592 name: "Implement messenger app" 593 description: "Notification companion for governance, swaps" 594 target_files: 595 - path: acdc-messenger/ 596 action: create 597 estimate: 598 effort: large 599 confidence: medium 600 risk: 601 level: medium 602 factors: [security_isolation] 603 604 deliverables: 605 - deliverable_id: F-D009 606 name: "ALPHA-Scanner" 607 type: code 608 verification: "Scanner loads and displays network data" 609 610 - deliverable_id: F-D010 611 name: "Developer portal" 612 type: code 613 verification: "Docusaurus builds and serves" 614 615 - deliverable_id: F-D011 616 name: "Messenger app" 617 type: code 618 verification: "Notifications received" 619 620 success_criteria: 621 - "ALPHA-Scanner shows network status" 622 - "Developer portal accessible" 623 - "Testnet faucet dispenses tokens" 624 - "Messenger receives governance alerts" 625 626 - phase_id: phase_6 627 name: "Polish & Launch" 628 status: pending 629 blocked_by: 630 - dependency_ref: F.phase_5 631 reason: "Requires all utilities" 632 wait_for: complete 633 634 tasks: 635 - task_id: F-T031 636 name: "AI translations (20 languages)" 637 description: "Generate AI translations, mark for review" 638 target_files: 639 - path: acdc-i18n/namespaces/ 640 action: modify 641 estimate: 642 effort: medium 643 confidence: high 644 645 - task_id: F-T032 646 name: "Accessibility audit and fixes" 647 description: "WCAG 2.1 AA compliance" 648 target_files: 649 - path: acdc-wallet/shared/components/ 650 action: modify 651 estimate: 652 effort: medium 653 confidence: medium 654 655 - task_id: F-T033 656 name: "Security audits" 657 description: "wallet-core crypto review, platform security" 658 estimate: 659 effort: large 660 confidence: low 661 risk: 662 level: critical 663 factors: [external_dependency] 664 665 - task_id: F-T034 666 name: "Performance optimization" 667 description: "App launch, transaction, balance refresh times" 668 estimate: 669 effort: medium 670 confidence: medium 671 672 - task_id: F-T035 673 name: "App store submissions" 674 description: "iOS App Store, Google Play submissions" 675 estimate: 676 effort: medium 677 confidence: medium 678 risk: 679 level: medium 680 factors: [app_store_policies] 681 682 deliverables: 683 - deliverable_id: F-D012 684 name: "20 language translations" 685 type: assets 686 verification: "All namespaces have translations" 687 688 - deliverable_id: F-D013 689 name: "Security audit report" 690 type: documentation 691 verification: "Audit complete with no critical issues" 692 693 - deliverable_id: F-D014 694 name: "App store listings" 695 type: deployment 696 verification: "Apps approved and published" 697 698 success_criteria: 699 - "20 languages available" 700 - "WCAG 2.1 AA compliant" 701 - "Security audit passed" 702 - "Performance targets met" 703 - "Apps published to stores" 704 705 # === NEW REPOSITORIES === 706 new_repositories: 707 - name: wallet-core 708 purpose: Rust cryptographic library 709 language: rust 710 711 - name: acdc-wallet 712 purpose: Consumer wallet (all platforms) 713 language: typescript/rust 714 715 - name: acdc-governor 716 purpose: Institutional console 717 language: typescript 718 719 - name: acdc-messenger 720 purpose: Notification companion 721 language: typescript/rust 722 723 - name: acdc-cli 724 purpose: Command-line tools 725 language: rust 726 727 - name: acdc-scanner 728 purpose: Block explorer 729 language: typescript 730 731 - name: acdc-docs 732 purpose: Developer portal 733 language: markdown/typescript 734 735 - name: acdc-i18n 736 purpose: Localization resources 737 language: json 738 739 - name: acdc-design 740 purpose: Design tokens & components 741 language: json/typescript 742 743 - name: acdc-contracts 744 purpose: On-chain contracts 745 language: leo 746 747 complexity_assessment: 748 overall_complexity: very_high 749 750 risk_summary: 751 - risk_id: F-RISK-001 752 description: "wallet-core cryptographic bugs could lead to fund loss" 753 likelihood: low 754 impact: critical 755 mitigation: "External security audit; extensive test coverage; formal verification of key paths" 756 757 - risk_id: F-RISK-002 758 description: "Cross-platform FFI complexity" 759 likelihood: medium 760 impact: medium 761 mitigation: "Platform-specific testing; gradual rollout; fallback to web" 762 763 - risk_id: F-RISK-003 764 description: "App store rejection due to crypto policies" 765 likelihood: medium 766 impact: high 767 mitigation: "Early engagement with review teams; compliance preparation" 768 769 - risk_id: F-RISK-004 770 description: "P2P swap adaptor signature implementation" 771 likelihood: medium 772 impact: high 773 mitigation: "Reference implementation review; extensive testing" 774 775 dependencies_summary: 776 blocks: [] 777 blocked_by: [T001, T002, T003, D004, D005, D006, D007, D008] 778 parallel_candidates: [F008, F009] 779 780 # === TESTING INFRASTRUCTURE === 781 testing_infrastructure: 782 ci_pipelines: 783 templates: 784 rust: infra/ci-templates/frontend/rust.yml 785 typescript: infra/ci-templates/frontend/typescript.yml 786 design: infra/ci-templates/frontend/design.yml 787 adl: infra/ci-templates/frontend/adl.yml 788 features: 789 - coverage_enforcement: 80_percent_global_100_percent_critical 790 - visual_regression: chromatic_storybook 791 - accessibility: wcag_2.1_aa_enforcement 792 - e2e_testing: playwright 793 794 coverage: 795 global_threshold: 80 796 critical_path_threshold: 100 797 critical_paths: 798 - wallet-core/src/keys/** 799 - wallet-core/src/signing/** 800 - wallet-core/src/backup/** 801 tools: 802 rust: cargo-tarpaulin 803 typescript: vitest 804 adl: adl-test 805 regression_detection: enabled_2_percent_max_decrease 806 807 test_generation: 808 script: scripts/frontend/generate-tests.sh 809 source: cspec_interface_definitions 810 output: test_stubs_per_component 811 supported: [F001, F002, F003, F004, F005, F006, F007, F008, F009, F010] 812 813 visual_testing: 814 tool: storybook_chromatic 815 url: design.ac-dc.network 816 features: 817 - theme_switching: [light, dark, high_contrast, testnet] 818 - locale_preview: [en, ar, zh-CN, es, fr, de, ja, ko] 819 - visual_diff: chromatic_auto_capture 820 deployment: rsync_to_source_server 821 822 mcp_tools: 823 - name: frontend_ci_status 824 description: Check CI status for all frontend repos 825 - name: frontend_coverage 826 description: Get coverage metrics for frontend repos 827 - name: storybook_status 828 description: Check Storybook build and deployment status 829 830 changelog: 831 - version: 1.2.0 832 date: 2026-01-14 833 type: milestone 834 description: "CI/testing infrastructure complete: all repos have CI, E2E tests, Chromatic visual regression, coverage enforcement, test generation scripts, MCP monitoring tools" 835 836 - version: 1.1.0 837 date: 2026-01-14 838 type: enhancement 839 description: "Added CI/testing infrastructure (F-T008a-f), coverage monitoring, Storybook visual testing" 840 841 - version: 1.0.0 842 date: 2026-01-14 843 type: initial 844 description: "Initial frontend implementation plan from UI/UX Specification v1.0"