## 1. Project Scaffolding & Entry Point - [x] 1.1 Create main.py entry point with argparse subcommand pattern - [x] 1.2 Set up UTF-8 encoding for stdout/stderr - [x] 1.3 Set up logging to log/adt_tools.log ## 2. SAP ADT Connection - [x] 2.1 Implement ADTClient with HTTP Basic Auth + CSRF Token - [x] 2.2 Support stateful/stateless session modes - [x] 2.3 Implement context manager (`with ADTClient(...) as client:`) - [x] 2.4 Disable SSL verification warnings ## 3. Configuration Loading - [x] 3.1 Implement config.ini parsing with ConfigParser - [x] 3.2 Support environment variable override (SAP_HOST, SAP_CLIENT, SAP_USER, SAP_PASSWORD) - [x] 3.3 Support config file search order (--config → current dir → script dir) - [x] 3.4 Default client to "100" when not specified ## 4. Object Type Registry - [x] 4.1 Define ObjectTypeConfig with URI templates, content types, has_source flag - [x] 4.2 Register 10 ABAP object types (report, class, interface, function, functiongroup, domain, dataelement, table, structure, tabletype) - [x] 4.3 Implement parse_object_name for URI expansion - [x] 4.4 Handle function type special naming (GROUP/MODULE format) - [x] 4.5 Handle tabletype uppercase naming ## 5. Download Command - [x] 5.1 Implement object existence check (HEAD/GET) - [x] 5.2 Implement source code download with LF normalization - [x] 5.3 Auto-create output directory - [x] 5.4 Print source code preview (first 20 lines) ## 6. Sync Command - [x] 6.1 Implement full pipeline: lock → write → unlock → syntax check → activate - [x] 6.2 Auto-create object when not exists - [x] 6.3 Support --corr_nr for transport request binding - [x] 6.4 Handle lock failure with transport request selection - [x] 6.5 Report progress per step with ✓/✗ indicators ## 7. Create Command - [x] 7.1 Implement default template generation per type - [x] 7.2 Support --source for custom source code - [x] 7.3 Support --definition for DDIC JSON definitions - [x] 7.4 Support --corr_nr for transport request in creation - [x] 7.5 Support --path for project manifest update ## 8. Info Command - [x] 8.1 Query object metadata via ADT GET - [x] 8.2 Parse ADT core XML for name, type, description, status, author - [x] 8.3 Validate response name matches request name - [x] 8.4 Display status as ✓ 已激活 or ⚠️ 未激活 ## 9. Delete Command - [x] 9.1 Check object existence before deletion - [x] 9.2 Require user "yes" confirmation - [x] 9.3 Execute lock → DELETE → unlock flow - [x] 9.4 Support --path for manifest update ## 10. Error Handling - [x] 10.1 Define unified exception hierarchy (SapCliError base + 11 subtypes) - [x] 10.2 Exit with code 1 and user-friendly message on SapCliError