Skip to content

openlogos merge

Scan delta files in a change proposal, map them to their target resource directories, and generate a MERGE_PROMPT.md that AI can read and execute.

Terminal window
openlogos merge <slug>
ArgumentRequiredDescription
slugYesThe change proposal slug (must exist in logos/changes/)
  1. Recursively scans logos/changes/<slug>/deltas/ for files organized by category
  2. Maps each category to a target resource directory (preserving nested subdirectory paths):
Delta categoryTarget directory
deltas/prd/logos/resources/prd/
deltas/api/logos/resources/api/
deltas/database/logos/resources/database/
deltas/scenario/logos/resources/scenario/
deltas/test/logos/resources/test/

Nested paths are preserved. For example, deltas/prd/3-technical-plan/1-architecture/core-arch.md maps to logos/resources/prd/3-technical-plan/1-architecture/core-arch.md.

  1. Reads proposal.md content for context
  2. Generates logos/changes/<slug>/MERGE_PROMPT.md with structured merge instructions
  3. Writes a MERGE_PROMPT_GENERATED marker file to advance the proposal step to merge-generated
📋 Merge Summary:
- Change proposal: fix-redirect-bug
- Delta files: 3
deltas/prd/01-requirements-delta.md → logos/resources/prd/
deltas/api/openapi-delta.yaml → logos/resources/api/
deltas/scenario/S02-redirect-delta.json → logos/resources/scenario/
✓ logos/changes/fix-redirect-bug/MERGE_PROMPT.md
💡 Tell AI: "Read logos/changes/fix-redirect-bug/MERGE_PROMPT.md and execute merge"
After merge, run `openlogos archive fix-redirect-bug` to archive the proposal.

The prompt contains:

  1. Proposal context — the full content of proposal.md
  2. Delta file list — each delta with its source path, target directory, and action
  3. Execution requirements for the AI:
    • Process each delta file one by one
    • Handle ADDED / MODIFIED / REMOVED markers
    • Preserve original formatting and style
    • Update timestamps
    • Report a summary after each file
    • Remind the user to run openlogos archive

Delta files use markers to indicate what should change in the target document:

## ADDED: Section Name
[New content to insert]
## MODIFIED: Section Name
[Replacement content for an existing section]
## REMOVED: Section Name
[This section should be deleted from the main document]

If deltas/ is empty or contains no recognized files, the command writes a SPEC_MERGED marker file and exits cleanly:

✓ No delta files in logos/changes/<slug>/deltas/ — nothing to merge.

This is not an error. Code-only changes (refactors, bug fixes that don’t touch specs) are valid proposals that skip the merge step. The SPEC_MERGED marker advances the proposal step to coding so the workflow can continue.

ErrorCauseFix
Missing change proposal nameNo slug providedProvide a slug: openlogos merge fix-redirect-bug
Change proposal 'X' not foundNo directory at logos/changes/<slug>/Check spelling, or create with openlogos change first
logos/logos.config.json not foundNot in project rootcd to project root
  • change — Previous step: create the proposal and delta structure
  • archive — Next step: archive the proposal after AI executes the merge