/speckit.implement T034 T035 — complete 1.x migration
- User
/speckit.implement T034 T035 — complete 1.x migration
Assistant
Let me read the speckit implement command and the referenced tasks.
Assistant
Let me understand the existing migration code and what needs to be implemented for T034 and T035.
Assistant
Now let me look at the existing tests, rename module, and schema to understand the full picture.
Assistant
Let me check the schema module and look at the BIDS schema for deprecation rules.
Assistant
Now I have a clear picture. Let me implement both tasks.
Assistant
Now let me implement both handlers. First, I need to understand how the file scanning works for suffix deprecation — I need to scan actual BIDS files (not just JSON sidecars).
Assistant
Now I'll implement both T034 and T035 by editing
migrate.py. Let me add the suffix deprecation rules, the deprecated template identifiers, and the corresponding scan/apply functions.Assistant
Now add suffix deprecation rules after the enum renames section:
Assistant
Now add the scan and apply functions for suffix deprecation and deprecated templates. Let me add them after the existing
_scan_for_doi_formatfunction:Assistant
Now add the apply function for suffix deprecation and wire both new categories into the orchestrator:
Assistant
Now wire the new categories into the orchestrator's scanner and applier dicts:
Assistant
Now let me add the tests for both T034 and T035:
Assistant
Now let me run the tests to see if they pass:
Assistant
All 19 tests pass. Now let me run the full tox suite:
Assistant
Lint failures — trailing commas. Let me see the full lint output:
Assistant
Let me fix all the lint issues:
Assistant
Now fix the unused variable and f-string issues:
Assistant
Now fix the long lines in the deprecated template scanner:
Assistant
Now fix the test lint issues:
Assistant
All tox environments pass. Let me update the task list and the tasks file.
Assistant
Now mark T034 and T035 as done in the tasks file:
Assistant
Done. Here's a summary of what was implemented:
T034: Suffix deprecation handler
Added to
src/bids_utils/migrate.py:_phase→_part-phase_bold: Auto-fixable. Scans for files withphasesuffix, addspart=phaseentity and changes suffix tobold, delegating the actual rename torename_file().T2star: Flagged as non-auto-fixable (ambiguous: could beT2starworT2starmap).FLASH: Flagged as non-auto-fixable (removed from BIDS entirely).PD: Flagged as non-auto-fixable (ambiguous: could bePDworPDmap).
New functions:
_scan_bids_files(),_scan_for_suffix_deprecation(), .