Feature/GitHub ingest#2
Open
bluegreenstone wants to merge 2 commits into
Open
Conversation
Automate producing the notebooks "context" markdown by cloning a course repo over SSH instead of hand-downloading it, and — new — include the repo's helper.py module(s) as context. - New .claude/skills/generate-spec/scripts/ingest_repo.py (stdlib only): clones a repo (SSH/https/local), renders every .ipynb cell-by-cell in the existing context.md format under a Lesson Map, and appends a de-duplicated "Helper Module Context" section. Helper defs (functions and classes) are extracted via ast; identical/symlinked copies collapse; same-name-but-different-body collisions keep both, flagged inline. Output is guarded to materials/notebooks/ and never touches transcripts/. - generate-spec SKILL.md: additive optional Step 2 — a repo argument triggers ingestion; no argument behaves exactly as before. Transcripts remain a manual drop. - new-course SKILL.md: mention the /generate-spec <repo-ssh-url> shortcut. - .gitignore: ignore .idea/ and Python bytecode. Verified end-to-end against a local fixture (symlink collapse, conflict flagging, zero-helper, clone failure, output guards) and against the real course repo (5 notebooks, helper.py surfacing 22 deduped defs). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover the new /generate-spec repo argument: accepted sources (SSH, HTTPS, local path/file://), what ingest_repo.py renders, and its scope guarantees (notebooks-only writes, manual transcripts, idempotent).
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.
Add optional git-repo notebook ingestion to /generate-spec
/generate-spec now accepts an optional git repo argument (/generate-spec ). When given one, it runs a deterministic ingest step before generating the spec, so notebooks no longer have to be downloaded and copied in by hand.
What the ingest does (.claude/skills/generate-spec/scripts/ingest_repo.py, stdlib-only):
Guardrails:
Also: