xiaohongshu
xiaohongshu
aurora-origin-merge
Handles .origin.ts file merges after Aurora CLI regeneration. Provides step-by-step workflow to surgically merge new schema code into files with custom modifications, preserving all business logic. Trigger: After aurora load back module creates .origin files, or when merging regenerated code with...
Full skill instructions
Use this skill when:
.origin.ts files after regeneration.origin.ts files in the codebase after running aurora load back moduleAlways combine with:
aurora-cli skill (triggers the regeneration)aurora-cqrs skill (understand editable zones vs generated zones)prettier skill (format after merge)Aurora tracks every generated file via SHA1 hash in *-lock.json files. When you regenerate:
File hash matches lock?
│
YES → Overwrite safely (no custom code)
│
NO → File has custom modifications
└→ Create filename.origin.ts (new generated version)
Keep filename.ts intact (your custom code)
Before touching any .origin file, you MUST determine what changed in the YAML schema.
# Check if YAML has uncommitted changes
git diff HEAD -- cliter/<bc>/<module>.aurora.yaml
HEAD# Flujo A: YAML not committed yet
git show HEAD:cliter/<bc>/<module>.aurora.yaml > /tmp/old-schema.yaml
# Flujo B: YAML already committed
PREV_COMMIT=$(git log -2 --format="%H" -- cliter/<bc>/<module>.aurora.yaml | tail -1)
git show $PREV_COMMIT:cliter/<bc>/<module>.aurora.yaml > /tmp/old-schema.yaml
# Compare to get delta
diff /tmp/old-schema.yaml cliter/<bc>/<module>.aurora.yaml
| Delta | Action |
|---|---|
| New field in YAML | Merge from .origin into existing files |
| Removed field in YAML | Remove from existing files |
| Changed field type/properties | Update in existing files |
| No change for a field | DO NOT touch |
GOLDEN RULE: Only merge code related to fields that CHANGED in the YAML delta. Never touch code for fields that didn't change.
fd ".origin.ts"
Read BOTH files side by side:
For each change identified in Step 0, apply the appropriate merge rule. See Merge Rules by File Type for detailed rules per file type.
rm path/to/file.origin.ts
fd ".origin.ts"
# Should return empty
CRITICAL: Aurora generates parameters in the EXACT order defined in .aurora.yaml. When merging, the new field MUST be inserted in the correct position.
This order MUST be reflected in:
register() parameters in Aggregateregister() arguments in Mapper's makeAggregate()Response constructor parametersResponse constructor arguments in Mapper's makeResponse()How to determine position: Look at the .origin file — Aurora already generated the correct order.
.origin.ts files remain (fd ".origin.ts" returns empty).aurora.yaml field ordernpx prettier --write <files>)npx tsc --noEmit)| Mistake | Prevention |
|---|---|
| Skipping YAML delta detection | ALWAYS diff YAML before merging |
| Adding intentionally removed fields | Check YAML delta — if field is NOT new, don't add it |
| Replacing entire file with .origin | Always compare first |
| Forgetting new imports | Check .origin imports section |
| Wrong parameter order | Match YAML field order |
| Leaving .origin files in codebase | Always delete after merge |
| Not running Prettier after merge | Run prettier on modified files |
How many .origin files?
│
1 file ─────────────── Simple merge
│
2-5 files ──────────── Medium merge (review each)
│
5+ files ───────────── Complex merge (plan first)
Does the existing file have custom logic?
│
NO (just stale hash) → Replace entirely with .origin content
│
YES, simple → Quick surgical merge
│
YES, complex (50+ lines) → Careful line-by-line merge
│
YES, very complex (500+ lines) → Read ENTIRE file, merge minimally
fd ".origin.ts" # Find all .origin files
code -d path/to/file.ts path/to/file.origin.ts # Compare side by side
fd ".origin.ts" -x rm {} # Delete all after merge
npx tsc --noEmit # Check TypeScript compiles
npx prettier --write "src/@app/**/*.ts" # Format merged files
| Skill | When to Use Together |
|---|---|
aurora-cli | Triggers regeneration that creates .origin files |
aurora-cqrs | Understand editable zones vs generated zones |
aurora-schema | Understanding YAML field order for parameter positioning |
prettier | Format files after merge |
conventional-commits | Commit after successful merge |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience