Prompt file imported from ZoeLocke/108-moves (
.github/prompts/copy-steps-to-duplicate-titles.prompt.md). Copyright stays with the author.
For each file in content/moves/*/index.md, sorted by the numeric folder name ascending, do the following:
- Parse the frontmatter of every file to extract
titleandsteps. - Build a lookup table of first-seen title → steps array, but only record an entry when the steps array for that title is non-empty (i.e. it contains at least one item). Process files in ascending numeric folder order so the earliest-numbered file wins.
- For every file whose
titlealready exists in the lookup table and whose ownstepsarray is currently empty (steps: []), replace the emptysteps: []with the steps array from the lookup table entry. Write the replacement in inline array format on one line only, e.g.steps: [Step one, Step two]. Items must be plain text without any quotes — commas alone separate items. - Formatting requirements are strict: keep
stepsas a single-line inline array in all edits, do not add quotes or double-quotes around items, do not convert it to YAML block-list style (steps:with- itemlines), and preserve all other frontmatter fields exactly as they are. - After all updates are complete, output a list of every file path that was changed, grouped by the shared title. If no files were changed, say so explicitly.