Skip to content

feat(learning): add repo-based learning support#3

Open
MatteoDiPaolo wants to merge 2 commits into
mainfrom
feat/repo-based-learning
Open

feat(learning): add repo-based learning support#3
MatteoDiPaolo wants to merge 2 commits into
mainfrom
feat/repo-based-learning

Conversation

@MatteoDiPaolo
Copy link
Copy Markdown
Contributor

Summary

  • Lessons can now be tied to an existing repo: /learn analyzes the project (file tree, dependencies, source patterns) and tailors milestones to what's actually there instead of starting from scratch.
  • /new-learning gains a --repo <path> flag that cross-references the topic with repo state and generates milestones building on existing code; backlog items get an optional — **repo:** <path> segment.
  • /learn step 3 distinguishes existing-repo vs fresh-project; new step 3.5 produces a repo summary fed into milestone generation; step 4 adds a repo-aware delivery section covering guided/challenge modes and incidental observations.

Test plan

  • Run /new-learning "X" --repo <path> and confirm the proposed milestones reference real files from the repo and the saved backlog item carries the repo: segment.
  • Run /learn against a backlog item with a repo field — confirm it auto-uses the path and produces a sensible repo summary before milestone delivery.
  • Run /learn against a backlog item without a repo field — confirm it prompts "existing repo or fresh?" and handles both branches.
  • In a hands-on session with a repo, verify guided mode writes/edits real files and challenge mode references real file paths.
  • Run a reading-mode lesson and confirm step 3.5 is skipped.

🤖 Generated with Claude Code

Allow lessons to be tied to an existing repo so /learn analyzes the
project (file tree, dependencies, source patterns) and tailors milestones
to what's actually in the repo. Add a --repo flag to /new-learning that
generates ideas building on top of existing code, and an optional repo
segment in the backlog format. /learn step 3 now distinguishes existing
repo vs fresh project, with a new step 3.5 producing a repo summary that
feeds milestone generation; step 4 adds a repo-aware delivery section
covering guided/challenge modes and incidental observations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread skills/new-learning/SKILL.md Outdated
3. Add input validation, error handling, and integration tests
```

**Repo-based proposal format** (when `--repo` was provided):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be extracted as reference. wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — extracted both worked examples (standard + repo-based) to skills/new-learning/references/proposal-formats.md in a2ad555. Kept the formal field structure and the one-line repo-context rule inline since those are load-bearing for step 4. SKILL.md is now 96 lines. PTAL when you have a sec.

Copy link
Copy Markdown

@aldorea aldorea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know wdyt

Move both worked examples (standard + repo-based) out of SKILL.md into
references/proposal-formats.md, leaving the formal field structure and
the one-line repo-context rule inline. Trims SKILL.md from 119 to 96
lines and consolidates the example shapes in one place so the format
can evolve without touching the skill body.

Per review feedback from @aldorea on PR #3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants