Sync-Safe How-To Guide
This guide provides practical steps for maintaining a project instance while staying compatible with upstream core updates.
For Developers & AI Agents
1. Making a Change (Instance Mode)
When you need to modify a file that exists in the core repository:
Open the file (e.g.,
app/controllers/posts/posts_crud_controller.ts).Add your logic using the markers:
typescript// @custom-start [Task: Custom Redirect after Update] return response.redirect().toPath('/custom-success-page') // @custom-endVerify that the file still passes linting and tests.
Note for AI Agents: Unless you see the
Core:prefix in the user's request, you MUST use these markers for all modifications to core files.
2. Contributing to Core (Core Mode)
If you are a core maintainer or fixing a bug that should be shared with all users:
Prefix your request with
Core:when talking to AI agents.Make the change directly without markers.
Test thoroughly, as this change will affect all downstream projects.
For System Administrators
1. Syncing from Upstream
To bring in the latest features and security fixes from the upstream core:
# 1. Ensure clean git status
git status
# 2. Run the sync command
node ace core:sync (Latest stable)
node ace core:sync --beta (Latest beta tag)
node ace core:sync beta (Latest beta branch)
node ace core:sync v0.5.0 (Specific version)
2. Handling Merge Conflicts
If you see CONFLICT (content): Merge conflict in [filename]:
Open the file in your editor.
Locate your
@custom-startblock.If Git placed conflict markers (
<<<<<<<) around it, verify if the new core code should replace, complement, or be ignored in favor of your custom code.Resolve:
Keep your code within the markers.
Accept relevant core changes outside the markers.
Finish:
bashgit add [filename] git commit -m "chore: resolve core sync conflicts"
Best Practices
Atomic Blocks: Keep your
@custom-startblocks as small as possible. Wrapping an entire function is harder to merge than wrapping a single line or a small block.Task Names: Use descriptive task names in markers to help future developers (or yourself) understand why the customization exists.
Don't Marker New Files: If you create a file that doesn't exist in the core repo, don't use markers. It's implicitly "yours."