feat(repo-memory): add format-json option to pretty-print JSON files before commit#39540
Draft
Copilot wants to merge 2 commits into
Draft
feat(repo-memory): add format-json option to pretty-print JSON files before commit#39540Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add option to format JSON repo memory for readability
feat(repo-memory): add format-json option to pretty-print JSON files before commit
Jun 16, 2026
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI agents frequently write JSON memory files as single-line blobs even when instructed otherwise, making them hard to review or manually correct in the repository. A new
format-json: trueoption onrepo-memoryentries forces all.jsonfiles to be pretty-printed (2-space indent, trailing newline) before they are committed to the memory branch.Changes
RepoMemoryEntrystruct — newFormatJSON boolfield (format-jsonYAML key)extractRepoMemoryConfig— parsesformat-jsonin both object and array config pathsbuildPushRepoMemoryJob— emitsFORMAT_JSON: 'true'env var on the push step only when enabled (omitted otherwise, no-op default)push_repo_memory.cjs— after files are copied but beforegit add, recursively formats.jsonfiles viaJSON.stringify(parsed, null, 2); invalid JSON files are skipped with a warning rather than failing the pushformat-jsonboolean added to both the object and array-itemrepo-memoryschema variantsformat-jsondocumented in the advanced config example and option descriptionsExample
Or per-entry in array notation: