feat: generate sources#19
Open
rickliujh wants to merge 8 commits into
Open
Conversation
Rename PRInfo to ChangeSet, DiffProvider to ChangeSource, and ParsePRRef to ParseSourceRef. Pure rename with no behavior change, preparing for commit and snapshot sources alongside PR/MR generation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Accept multiple source references on the CLI and squash their changesets in the order given (spec rules CS1-CS5): per-file old content from the first source, new content from the last, with rename-chain tracking, continuity warnings, repo consistency checks, and metadata from the last source. Modules generated from sources without PR metadata degrade gracefully: missing head branch synthesizes loom/<name>, missing provider omits the pr operation, missing repo URL omits spec.target. Adds specs/generate-sources.md describing the multi-source design (PRs, commit ranges, local snapshots). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Generate modules from a single commit or commit range using git only — no provider API. Works against any git host (GitHub, GitLab, Bitbucket, Gitea, bare SSH remotes) and authenticates with the user's git credentials. Reference grammar: <repo>@<sha> or <repo>@<base>...<head>, where <repo> is a short-form repo (github:o/r), any git URL, or a local checkout path. Commit and compare URLs are accepted as sugar. Remote repos are cloned bare with --filter=blob:none so cost scales with changed files, with a full-clone fallback for servers without partial clone support. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Generate modules from the current state of files in a local checkout. A local path ref with --include globs captures matched files: without --base every file becomes a template (stamp-out module); with --base the working tree — including uncommitted and untracked files — is diffed against that git ref so modified YAML still produces SMP patches (transform module). Repo URL, base branch, and provider are read from the checkout's git remote when available; modules without a remote degrade per the generate-sources spec. --name is required when generating from local files only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Single-commit parent resolution relies on full history in the bare partial clone rather than a depth-2 fetch, and the error table gains the no-changes and repo-root-with-base conditions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
--include/--exclude/--base are invocation-wide, so multiple snapshot refs would silently share them; same-repo composition (CS3) makes multiple snapshots redundant anyway. Error out instead of guessing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Capture the committed tree of a repository without a local checkout via the canonical snapshot:<repo-or-path>[@<ref>] form — git-native like the commit source (bare partial clone, user's git credentials, any host). A bare local path stays sugar for the working-tree snapshot; @<ref> pins the committed tree at a tag/branch/SHA for both local and remote forms, listed via git ls-tree with symlinks and submodules skipped. Ranges are rejected: snapshots capture one state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewrite the generate guide and CLI reference for the new source kinds: git-native commit/range refs, local and remote snapshots with --include/--exclude/--base, source composition, and the degraded git-ops behavior for sources without PR metadata. Drop the documented but never-implemented --exclude-git-ops flag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
No description provided.