Skill: Sync
Purpose
Aligns a Moqui artifact (XML, Groovy, etc.) with its corresponding Blueprint. It acts as the "Enforcer" of Spec-Driven Development.
Logic
- •Target Identification: Accept a base name (e.g., 'huddle'). If NO name is supplied, default to the active custom component (e.g., 'huddle'). Resolve the blueprint and artifact accordingly.
- •Resource Resolution: - Follow
global-blueprint-v1.1to find the mirrored.mdblueprint in.agent/blueprints/.- •Load all relevant project rules from
.agent/rules/.
- •Load all relevant project rules from
- •Drift Analysis: - Read the current code of the artifact.
- •Compare it against the "Live Instructions" in the blueprint.
- •Execution: - Re-generate or patch the artifact to match the blueprint's requirements exactly.
- •Remove any deprecated elements (e.g., "Home" subscreens) forbidden by rules.
- •Completion: - Append a "Sync Complete" entry to the blueprint's History section.