Conversation
Pulls docs/architecture, e2e helpers, ts-plugins (any artifact map) from effect-app/shared per project-side .shared.json. Caches the shared repo at ~/.cache/effa/shared/<slug>, checks out the pinned ref, walks the artifact map honoring an `exclude` list, then updates `synced_at`. MVP: read-only sync, overwrites destination files. Caller reviews via `git status` post-sync. Follow-ups: `sync status`, `sync push`, conflict detection. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sync-diff: compares each tracked file against the cache copy at the pinned ref, reports M (modified locally), D (missing from project), E (excluded). sha256-based comparison. sync-push: detects modified files, creates a fresh branch off the pinned ref in the cache clone, copies project files in, commits, and pushes to origin. Optional `--pr` opens a PR via `gh pr create`. Refactored sync-shared.ts to share `ensureCache` + `walkArtifacts` helpers across the three subcommands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@effect-app/cli
effect-app
@effect-app/eslint-codegen-model
@effect-app/eslint-shared-config
@effect-app/infra
@effect-app/vue
@effect-app/vue-components
commit: |
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.
Summary
Add three subcommands to the
effaCLI for syncing content (architecture docs, e2e helpers, ts-plugins) fromeffect-app/sharedinto consuming projects.effa sync— pull artifacts per project-side.shared.jsonlockfile. Caches the shared repo at~/.cache/effa/shared/<slug>, checks out the pinned ref, copies files into project paths (honoringexcludelist).effa sync-diff— sha256 compare each tracked file against the cache copy. ReportsM(modified locally) /D(missing from project) /E(excluded).effa sync-push [--pr] [-m msg] [--branch name]— detect modified files, create a branch off the pinned ref in the cache, copy modified files in, commit, push. Optional--propens a PR viagh pr create.Architecture
src/sync-shared.ts—syncShared,syncDiff,syncPush+ shared helpersensureCache,walkArtifacts.src/index.tsas three flat subcommands (matches existingsync-effectconvention).{ "repo": "github.com/effect-app/shared", "ref": "<sha>", "artifacts": { "<src-in-shared>": "<dest-in-project>" }, "exclude": ["<src-path>"] }Validation
effect-app/boilerplate(companion PR Sync infrastructure: adopt effect-app/shared content boilerplate#51).effa syncis idempotent; second run produces no diff.effa sync-diffcorrectly reports drift for excluded/missing files.Test plan
pnpm buildcleaneffa syncin a project with.shared.jsoneffa sync-diff(should be clean post-sync)effa sync-push --prw/ a test edit (creates branch + PR upstream)Notes
MVP:
effa syncoverwrites destination files (no conflict detection beyondsync-diffreporting). Caller reviews viagit statuspost-sync. Follow-ups: 3-way merge / safer overwrite mode, templates-diff support.🤖 Generated with Claude Code