Add a new data field across the full FedProspect stack: Python ETL loader, MySQL DDL, C# entity/DTO/service, React TypeScript type, and UI component. Use this skill whenever the user wants to add a new column, property, or field that flows from ETL data through to the UI, or needs to add a field at any layer and wants to ensure all layers stay in sync.
Guides adding a new data field across all layers of the FedProspect stack, ensuring type consistency and no layer is missed.
Parse $ARGUMENTS:
| Argument | Example | Purpose |
|---|---|---|
| FieldName | estimated_value | snake_case field name (DB column name) |
| EntityName | opportunity | snake_case entity/table name |
| --type | decimal | Data type (default: string). Options: string, decimal, date, datetime, int, bool, json |
| --layers | all | Which layers to modify (default: all) |
Derive names:
estimated_value (snake_case)estimated_value (snake_case)EstimatedValueestimatedValue (camelCase)Estimated Value (Title Case)Read references/type-mapping.md for cross-layer type equivalences. Read references/layer-checklist.md for the step-by-step process.
In fed_prospector/etl/{entity}_loader.py:
_{ENTITY}_HASH_FIELDS list (if business-meaningful)_normalize_{entity}() with appropriate parser (parse_date, parse_decimal, etc.)_upsert_{entity}() cols listfed_prospector/db/schema/tables/{nn}_{entity}.sqlfed_prospector/db/schema/migrations/ with ALTER TABLEIn api/src/FedProspector.Core/Models/{Entity}.cs:
[Column(TypeName = "decimal(15,2)")])In api/src/FedProspector.Core/DTOs/{Entity}/:
In api/src/FedProspector.Infrastructure/Services/{Entity}Service.cs:
EstimatedValue = opp.EstimatedValue)In ui/src/types/api.ts:
estimatedValue?: number | null;)In the relevant page/component:
cd fed_prospector && python -m pytest tests/ -k "{entity}" -v
cd api && dotnet build && dotnet test
cd ui && npx tsc --noEmit
| Rule | Detail |
|---|---|
| Nullable by default | All new fields nullable unless explicitly required |
| Hash fields | Add to hash list ONLY if the field represents a business-meaningful change |
| Type consistency | Use the type-mapping reference — mismatches cause silent bugs |
| Naming | Python/MySQL: snake_case, C#: PascalCase, TypeScript: camelCase |
| Display fallback | Always use ?? '--' or ?? 'Unknown' for null display |
See references/layer-checklist.md for a condensed per-layer checklist.