peajes-transformaciones-motor

Applies Strategy, Builder, and Adapter patterns to transform provider Excel columns into standardized Peajes pasada records.

Updated Jan 31, 2023
One-click install
npx skills add https://github.com/Briian3306/Transporte --skill peajes-transformaciones-motor-briian3306
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: peajes-transformaciones-motor
Source: https://github.com/Briian3306/Transporte/tree/main/ibarra-app/.agents/skills/peajes-transformaciones-motor
Command: npx skills add https://github.com/Briian3306/Transporte --skill peajes-transformaciones-motor-briian3306

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Raw Excel columns from heterogeneous toll providers arrive in inconsistent formats, and this Skill guides the implementation of the Peajes transformation engine that adapts them into the standardized Pasada-Columns model across Angular preview and Supabase persistence. ## Core Features & Use Cases - Strategy Registry: Maps stable algorithm codes (BORRAR_ESPACIOS, FORMATEAR_FECHA_HORA, CALCULAR_IMPORTE_NETO, and more) to atomic TransformStrategy implementations, rejecting unknown codes per RN-20. - Pipeline Builder: Expands combined algorithms like NORMALIZAR_PATENTE into ordered atomic steps and validates duplicate orden values per RN-18. - Provider Adapters: Normalizes provider-specific headers (Demo today, extensible via IProviderAdapter) with compatibility detection before execution. - Use Case: When wiring Paso 3 transformaciones to preview how a provider's FECHA, HORA, DOMINIO, and TARIFA columns become FECHA_HORA, PATENTE_ID, and IMPORTE_NETO, use this Skill to build and validate the pipeline through PeajesMotorTransformacionService. ## Quick Start Ask the agent to build and validate a transformation pipeline for the Demo provider columns using PeajesMotorTransformacionService and show the Paso 3 preview output.

Frequently Asked Questions about peajes-transformaciones-motor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new column transformation algorithm to the Peajes motor?▼

Register the atomic strategy in ESTRATEGIAS_ATOMICAS, add its code to ALGORITMO_CODIGOS, and insert a matching row in the peajes_algoritmos_catalogo SQL table. The StrategyRegistry resolves codes at runtime and throws on unknown codes per RN-20.

How do combined algorithms like NORMALIZAR_PATENTE work in the pipeline?▼

Combined algorithms are stored in algoritmos_combinados with ordered steps in algoritmo_combinado_pasos. PipelineBuilder expands them into flat PasoEjecucion entries using orden * 1000 + paso.orden, so NORMALIZAR_PATENTE becomes BORRAR_ESPACIOS, ELIMINAR_GUIONES, then CONVERTIR_MAYUSCULAS.

Can the transformation engine execute algorithm code stored in jsonb?▼

No, the engine never executes code from jsonb. Only strategy codes registered in the StrategyRegistry can run, which is enforced by RN-20 through the registry's resolve and tiene methods.

How do I onboard a new toll provider with different Excel columns?▼

Implement or extend a provider adapter following the IProviderAdapter interface with expected columns, semantic mapping, and default transformations. Then run detectarCompatibilidad (RF-13), build a default plantilla with PipelineBuilder validation, and verify with the Paso 3 preview and motor.verify.ts.

Why does pipeline validation fail with duplicate orden errors?▼

RN-18 requires unique ascending orden values per plantilla column. PipelineBuilder and validarDefinicionPlantilla reject duplicates, and a SQL unique constraint on (plantilla_id, nombre_columna, orden) enforces it at persistence.