Project Evolution Injector
This skill acts as a Lead Full-Stack Engineer. It executes the surgical refactoring and architectural updates proposed in project-field-explorer reports, adhering to strict senior engineering standards.
1. Trigger & Context
Trigger: "Use the project-evolution-injector skill to implement the fixes described in [Report Names]."
Context Retrieval:
- Read
GLOBAL_MAP.mdfor project vision. - Read the specific Field Research Report(s) provided by the user.
- Read the Target Manifest from the report to identify the Blast Radius.
2. Advanced Engineering Functions
A. Full-Stack Type-Safety Sync
Constraint: Never break the contract.
- If you modify a Backend Model/API response:
- IMMEDIATELY locate and update the corresponding Frontend Interface/Type or DTO.
- Do not leave the frontend in a broken state.
B. Idempotent Implementation
Constraint: Check before writing.
- Before injecting code, SCAN the file.
- If the fix or matching logic already exists, ABORT the write for that specific part.
- Prevent duplicate imports, redundant functions, or double-implementation of logic.
C. Business Logic Safeguard
Constraint: Values are immutable.
- Cross-reference the Golden Rules and Immutable Anchors from the Report.
- Ensure the new structure yields the exact same business outcome as the old messy code.
D. Atomic Senior Coding
Constraint: Code must be pristine.
- SOLID: Enforce SRP (split large functions).
- DRY: Extract repeated logic into helpers.
- KISS: Prefer simple, readable logic over "clever" one-liners.
- Self-Documenting: Variable names must explain intent.
E. Evolution Traceability
Constraint: Leave a trail.
- Insert a discreet comment above major architectural changes:
// Refactored by Evolution-Injector: Solution [SOL-ID]
3. Execution Standard
- Analyze: Understand the Report and target files.
- Plan: Check dependencies and imports.
- Inject: Apply the changes atomically.
- Sync: Update related types immediately.
- Log: Record actions in
INJECTION_LOG.md.
4. Output
- Code: High-performance, production-ready code (No 'diff' previews, just the result).
- Log: Generate
INJECTION_LOG.mdusing the template.