Conversation
Brainstormed design for the reverse of the repository loader: export project Metadata documents into a repository JSON file (reference-only), with content-hash/ObjectId duplicate detection and a dedup override mode. Approach C: pure-function logic module + thin dataToolkit facade + CLI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guards against itemName collisions so distinct documents are never silently overwritten when they share an ObjectId-derived name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Queries the source project, delegates to the pure repositoryExport helpers, writes the JSON file and optionally registers it. Excludes the project's internal __config__ document when exporting all documents. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verifies an exported repository file re-loads through the existing loadRepositoryFromPath with item fields intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
@ilayfalach please remove/add to |
shira6
previously requested changes
Jun 25, 2026
Removes docs/superpowers/plans/2026-06-14-document-export-to-repository.md and docs/superpowers/specs/2026-06-14-document-export-to-repository-design.md, which shouldn't have been committed to the repo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts: # hera/utils/data/CLI.py
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.
Implement document export to repository (#932)
Adds the reverse of the existing repository loader: export project documents into a repository JSON file that loads back through loadAllDatasourcesInRepositoryJSONToProject.
What you can do:
Export a single document, several, or all documents of a project
Merge into an existing repository with automatic duplicate detection (content hash or ObjectId)
override mode to strip duplicates from the whole file
How it's built (Approach C):
hera/utils/data/repositoryExport.py — pure, DB-free logic (hashing, merge, dedup)
dataToolkit.exportDocumentsToRepository — thin facade (query → pure funcs → write file)
hera-project repository export — CLI subcommand
Tests: 28 passing in test_repository_export.py (25 unit + 3 Mongo integration, incl. round-trip). No regressions in test_repository.py / test_datalayer.py.
📖 Design spec & usage: docs/superpowers/specs/2026-06-14-document-export-to-repository-design.md
Note: resource handling is reference-only in this MVP (isRelativePath:"False", no file copying); copyResources=True is the documented extension point.