Migration Intelligence 1.4.0
Migration Intelligence analyzes migrations first, structures fachliche decisions, and only allows residual rewrites when an explicit mapping exists. Deutsch: Migration Intelligence
source→target mappings. Therefore SAFE_REWRITE = 0.
v1.4.0 does not invent rewrite targets. That is intentional — not a missing feature.
.velin/migration/intelligence/ after
velinstyle migrate tailwind.
Status v1.4.0
Migration Intelligence is documented and technically prepared. Residual mappings currently have
no fachlich freigegebene source→target pairs. Therefore:
| Surface | Value |
|---|---|
| Catalog Entries | 0 (catalogVersion: 0.0.0-empty) |
| Manifest Entries | 0 |
| SAFE_REWRITE | 0 |
| Apply candidates | 0 |
THEME_CATALOG_READY | 0 (16 sources reviewed, 16 not freigegeben) |
PALETTE_CATALOG_READY | 0 (39 sources reviewed, 39 not freigegeben) |
That is a deliberate safety result — not a missing implementation status. Layers stay separate: Policy · Strategy · Acceptance · Catalog · Manifest · Apply.
Pipeline
Analysis (Classifier)
→ Groups
→ Decision Clusters
→ Policy
→ Strategy Blocks
→ User Actions
→ Acceptance (+ persistence)
→ Rewrite Catalog (fachlich)
→ Rewrite Manifest
→ Apply-Gate Preflight
→ Dry-Run
→ Apply (+ Snapshot / Rollback)
- Classifier / Groups: residual tokens are classified and grouped for review
- Decision Cluster / Policy: existing decision policies bound to residuals (no inventiert targets)
- Strategy Blocks / User Actions: enriched decision support (23 UA · 6 blocks) — Enrichment ≠ Mapping
- Acceptance: stores strategy decisions; never writes sources
- Catalog / Manifest / Apply: only after explicit freigegebene mappings
Hard separations
| Statement | Meaning |
|---|---|
| Analyse ≠ Acceptance | Reports explain residuals; Acceptance stores decisions |
| Acceptance ≠ Mapping | Strategy options are not token targets |
| Mapping ≠ Manifest | Catalog is fachlich; Manifest adds file/hash/occurrence |
| Manifest ≠ Apply | Apply needs GATE_READY + DRY_RUN_OK |
| ACCEPTED ≠ APPLIED | applied stays false until Apply Write succeeds |
| Enrichment ≠ Rewrite | Strategy Blocks mirror policies; they do not rewrite sources |
Pilot metrics (unchanged by Intelligence)
| Metric | Value |
|---|---|
| User Actions | 23 (1 clear · 18 fachlich · 4 info) |
| Strategy Blocks | 6/6 enriched |
| Rewrite Catalog entries | 0 (0.0.0-empty) |
| Manifest entries | 0 |
| SAFE_REWRITE | 0 |
| Apply candidates | 0 |
| Coverage | 806 / 559 / 74 / 173 / 69.4% / 351 |
| Tests (Intelligence + migrate CLI) | 94 (41 intelligence · 53 cli-migrate) |
| Tests (+ release-sync) | 102 (+ 8 release-sync) |
Six Strategy Blocks
All blocks are enriched from existing Decision Policies. safeMappingExists is false for every block. Enrichment does not create mappings.
THEME
- Policy:
POLICY_THEME_ROLE_MAP - Question: Welche VelinStyle Surface-/Text-Rollen entsprechen den vorhandenen Tailwind-Rollen?
- Options: A Velin Surface/Text/Border · B Projekt-CSS-Variablen behalten · C Gemischt nach Kontext
- Recommendation: A oder C — keine automatische Rollen-Zuordnung
- decisionStatus / confidence: REVIEW · CONDITIONAL
- p1Track: REQUIRES_P1_DESIGN ·
safeMappingExists: false - Why no auto-map: Role→Token table missing; context (page/card/sidebar) is not 1:1
STATE
- Policy:
POLICY_STATE_INTERACTION - Question: Wie sollen Hover-/Focus-/Dark-State-Regeln abgebildet werden?
- Options: A Component CSS · B Komponenten-State (JS) · C Gemischt
- Recommendation: Eine Strategie wählen; keine Auto-Umsetzung
- decisionStatus / confidence: REVIEW · CONDITIONAL
- p1Track: NO_AUTOMATION ·
safeMappingExists: false - Why no auto-map: No State engine; hover/focus/dark stay unresolved at P1
HALF_STEP
- Policy:
POLICY_HALF_STEP - Question: P1-Policy oder Custom-CSS?
- Options: A P1/Compat Half-Step · B Manuelle Scale · C Belassen · D Gap akzeptieren
- Recommendation: A als P1-Track prüfen; bis dahin C/D — nichts automatisch
- decisionStatus / confidence: NEEDS_POLICY · CONDITIONAL
- p1Track: POSSIBLE_P1_POLICY ·
safeMappingExists: false - Why no auto-map: Catalog requires P1 policy; no half-step rounding / nearest-token
PALETTE
- Policy:
POLICY_PALETTE_NO_TARGET - Question: Welche Zielrolle soll für diese Farben verwendet werden?
- Options: A Semantic Color · B Brand-CSS · C Solids vs Gradient-Stops getrennt
- Recommendation: Keine automatische Farbnäherung
- decisionStatus / confidence: REVIEW · CONDITIONAL
- p1Track: REQUIRES_P1_DESIGN ·
safeMappingExists: false - Why no auto-map: No per-color freigegebene targets; nearest-color forbidden
DIM_PX
- Policy:
POLICY_ARB_FIXED_DIMENSION_PX - Question: Policy für feste px-Werte und md:/lg:-Varianten?
- Options: A Design-Token manuell · B Arbitrary belassen · C Layout umbauen
- Recommendation: Keine automatische Näherung auf Velin-Spacing
- decisionStatus / confidence: REVIEW · CONDITIONAL
- p1Track: REQUIRES_P1_DESIGN ·
safeMappingExists: false - Why no auto-map: No scale table; nearest-px forbidden
TYPO
- Policy:
POLICY_ARB_TYPOGRAPHY_PX - Question: Fachliche Zielentscheidung für feste Fontgrößen?
- Options: A Typografie-Stufe manuell · B Projekt-CSS behalten
- Recommendation: Kein nearest-token Guessing
- decisionStatus / confidence: REVIEW · CONDITIONAL
- p1Track: NO_AUTOMATION ·
safeMappingExists: false - Why no auto-map: No
text-[10px]→velin-text-xsinvention
Acceptance
Store: .velin/migration/intelligence/acceptance.json · schemaVersion: 1
Acceptance stores developer decisions, not rewrite targets. Status values: OPEN · ACCEPTED · DEFERRED.
CLI: velinstyle migrate acceptance <project> --show · --ua …
| Field | Role |
|---|---|
userActionId / actionKey | Stable resume keys |
selectedOptionId | Chosen strategy option (A/B/C…) |
status | OPEN · ACCEPTED · DEFERRED |
decisionStatus | Mirrors policy review state (e.g. NEEDS_POLICY · REVIEW) |
acceptanceKind | e.g. CHOSE_OPTION |
decidedAt / user / note | Audit trail |
caseRefs / groupRefs | Linked cases/groups |
coverageSnapshot | Coverage at decision time |
applied | Always false until Apply Write succeeds |
Queue drift / orphans are reported on load; resume matches userActionId then actionKey. Acceptance never rewrites sources. ACCEPTED ≠ APPLIED.
Rewrite Catalog (fachlich)
catalogVersion: 0.0.0-emptyentries: 0- No Theme/State/Half-Step/Palette/Dim/Typo auto pairs
- THEME Freigabe: 16 sources · 16 nicht freigegeben ·
THEME_CATALOG_READY = 0 - PALETTE Freigabe: 39 sources · 39 nicht freigegeben ·
PALETTE_CATALOG_READY = 0 - Catalog alone does not raise SAFE_REWRITE
Rewrite Manifest
Separate file: rewrite-manifest.json (not acceptance). Pilot: 0 productive entries.
- Fields:
sourceToken,targetToken,mappingSource,file,fileContentHash(SHA-256),occurrence,applied mappingSourceallowlist:EXPLICIT_DEVELOPER_MAPPING·P1_CATALOG_MAPPING·CONTROLLED_CATALOG_MAPPING- Forbidden: HEURISTIC · NEAREST_TOKEN · SEMANTIC_GUESS · AI_GUESS · AUTO_INFERENCE
- Target allowlist /
velin-prefix · path/realpath containment - Acceptance↔Manifest relation checked; Acceptance does not invent targets
- CLI:
rewrite-manifest --show|--validate|--init|--add
Apply-Gate → Dry-Run → Apply
Load → Validate → Acceptance → Path → Target → MappingSource
→ Hash → TOCTOU → Conflict → Occurrence → Snapshot-Preflight
→ GATE_READY
Then:
Dry-Run → re-check Gate → Snapshot → TOCTOU → Write
→ Rollback on failure → applied:true only after success
- Scope today:
file-global-exactonly (position-exactblocked) - GATE_READY ≠ SAFE_REWRITE
- Without freigegebene mappings, Apply is not productively runnable
velinstyle migrate acceptance ./my-project --show
velinstyle migrate rewrite-manifest ./my-project --preflight
velinstyle migrate rewrite-manifest ./my-project --dry-run
# --apply only with GATE_READY + DRY_RUN_OK and explicit mappingsConscious non-goals in 1.4.0
- No heuristic residual rewrite mappings
- No nearest-token / nearest-color / px rounding / half-step rounding via Intelligence
- No automatic Theme/State/Palette/Typo/Dim targets
- No 4A / 4C / 4H Apply automation
- Intelligence does not change P1 Coverage
- P1/P2 remain frozen / unchanged
Later versions
Only after an explicit Design/Dev Catalog line: Manifest --add → Preflight → Dry-Run review → Apply.
Historical phase documents describe intermediate development states and were not rewritten after the fact.