anchors recode
Rename an identity code and propagate it across the project.
Swaps an identity code (e.g. TCDT → TCTX) across every surface: • the @anchors header (code:/ref:, comma-separated lists included); • derived scenario-codes (CODEX-B01, CODEX-S02, CODE-DS-*, CODEX-VR, CODE-FP01b…); • bare mentions of the code in cross-references from other units.
DRY-RUN by default: shows each occurrence classified, writes nothing. --apply writes andrebuilds the map (the graph is reindexed from the headers, the source of truth).
When anchors.yaml declares a `recode:` block, it also: • swaps the testID prefix derived from the code (recode.test_id: lower); • renames (git mv) the files whose name matches recode.file_patterns for the code.Without that block, no testID and no file name is touched.
Validates: NEW must not already belong to another unit (collision); OLD must exist; bothmust have a length declared in code_lengths.
anchors recode TCDT TCTX # dry-run: what would change anchors recode TCDT TCTX --apply # applies + rebuilds the mapanchors recode <old> <new> [flags]| Flag | Padrão | O que faz |
|---|---|---|
--apply |
writes the changes (without this, it is a dry-run) | |
--root |
. |
project root |
O mapa e seus sinais — família
Seção intitulada “O mapa e seus sinais — família”Comandos da mesma família — o que distingue cada um:
| Comando | O que faz |
|---|---|
anchors map |
Operate the dependency map (anchors.graph.yaml) |
anchors ingest |
Ingest test signals (JUnit/lcov) the project generated and bind them to the map |
anchors test |
Run the test suites declared in anchors.yaml and ingest the reports |
anchors mutation |
Run the mutation suites declared in anchors.yaml and ingest the reports |
anchors keep-evidence |
Declare that a change proves nothing new, keeping the files’ evidence fresh |
anchors stamp |
Write the missing @contract stamps on test doubles (never rewrites an existing one) |
anchors recode |
Rename an identity code and propagate it across the project |
anchors renumber |
Renumber the revisions this branch added when the base already took their number |
anchors generated-paths |
The paths of DERIVED files — whoever conflicts in them rebuilds |
anchors merge-progress |
Progress merge driver: unites both sides, [x] beats [ ] |