merge-executor
Read the MERGE_PROMPT.md instruction file generated by openlogos merge <slug>, and merge each delta file from the change proposal into the main documents one by one, ensuring changes are applied accurately.
Phase & Trigger
Section titled “Phase & Trigger”- Phase: Cross-phase (Delta workflow)
- Trigger conditions:
- User has run
openlogos merge <slug>and wants AI to execute the merge - User mentions “execute merge”, “merge the deltas”
- User mentions “read MERGE_PROMPT.md and execute”
- User has run
Prerequisites
Section titled “Prerequisites”logos/changes/<slug>/MERGE_PROMPT.mdexists (generated byopenlogos merge)- The delta files and target main documents referenced in MERGE_PROMPT.md all exist
If MERGE_PROMPT.md does not exist, prompt the user to run openlogos merge <slug> first.
What It Does
Section titled “What It Does”- Parse merge instructions from MERGE_PROMPT.md
- Read each delta file and interpret ADDED / MODIFIED / REMOVED markers
- Precisely locate the corresponding sections in the main document
- Execute the merge operation
- Output a change summary per file
Delta Markers
Section titled “Delta Markers”| Marker | Operation |
|---|---|
ADDED | Insert new content at the specified position |
MODIFIED | Replace the same-named section in the main document |
REMOVED | Delete the corresponding section from the main document |
Execution Steps
Section titled “Execution Steps”Step 1: Read Merge Instructions
Section titled “Step 1: Read Merge Instructions”Parse MERGE_PROMPT.md to extract: change proposal name, each delta file’s path, target document path, and operation type.
Step 2: Process Each Delta
Section titled “Step 2: Process Each Delta”For each delta file in order:
- Read the delta file — understand the markers and content
- Read the target main document — locate sections to modify
- Execute the merge (ADDED / MODIFIED / REMOVED)
- Show a modification summary and wait for user confirmation
Step 3: Output Change Report
Section titled “Step 3: Output Change Report”Merge complete:- [file path 1]: added x sections, modified y sections, deleted z sections- [file path 2]: ...
Please verify, then run `openlogos archive <slug>` to archive the proposal.Merge Principles
Section titled “Merge Principles”- Maintain format consistency — merged content matches the existing format, indentation, and heading levels
- Do not alter unrelated content — only modify parts specified by the delta
- Ask on conflict — if a referenced section cannot be found, pause and ask the user
- Confirm after each file — show summary, wait for confirmation before proceeding
Outputs
Section titled “Outputs”- Directly modifies main documents in
logos/resources/(in-place editing) - Does not modify any files in
logos/changes/ - Does not create new files unless a delta specifies adding a completely new document
Best Practices
Section titled “Best Practices”- Read everything before acting — understand the full picture before merging
- MODIFIED is the most error-prone — section titles may have minor differences requiring fuzzy matching
- Preserve change traces — update “last updated” timestamps where applicable
- Delta order matters — requirement documents before API documents to maintain upstream-downstream consistency
Related Skills
Section titled “Related Skills”- Previous:
change-writer— write the change proposal - After merge: Run
openlogos archive <slug>to archive