-
Notifications
You must be signed in to change notification settings - Fork 39
Improve LLM Notes #604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sundarshankar89
wants to merge
1
commit into
main
Choose a base branch
from
feature/improve_llmnotes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Improve LLM Notes #604
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| go 1.24 | ||
| go 1.24.0 | ||
|
|
||
| toolchain go1.24.2 | ||
|
|
||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| **llnotes** is a CLI tool that generates GitHub release notes using LLMs hosted on Databricks Model Serving. It's part of the databrickslabs/sandbox monorepo and uses the shared `go-libs` library for common functionality. | ||
|
|
||
| ## Monorepo Structure | ||
|
|
||
| This project exists within a Go workspace monorepo (`../go.work`). Key locations: | ||
| - **Application code**: `./llnotes/` (this directory) | ||
| - **Shared libraries**: `../go-libs/` - contains reusable packages including: | ||
| - `llnotes`: Core business logic for release notes generation | ||
| - `lite`: CLI framework for building commands | ||
| - `github`: GitHub API integration utilities | ||
| - `git`: Git operations helpers | ||
| - **Other projects**: `../acceptance/`, `../metascan/`, etc. | ||
|
|
||
| ## Build & Development Commands | ||
|
|
||
| ```bash | ||
| # Build the project (default target) | ||
| make | ||
|
|
||
| # Run linting | ||
| make lint | ||
|
|
||
| # Run tests | ||
| make test | ||
|
|
||
| # View test coverage in browser | ||
| make coverage | ||
|
|
||
| # Format code | ||
| make fmt | ||
|
|
||
| # Update dependencies and vendor folder | ||
| make vendor | ||
| ``` | ||
|
|
||
| **Important**: This project uses `go work vendor` (not `go mod vendor`) because it's part of a Go workspace. Always run `make vendor` instead of `go mod vendor`. | ||
|
|
||
| ## Running the Application | ||
|
|
||
| ### Authentication Setup | ||
|
|
||
| Before using llnotes, authenticate with both services: | ||
|
|
||
| ```bash | ||
| # Databricks authentication | ||
| databricks auth login https://....cloud.databricks.com/ | ||
|
|
||
| # GitHub authentication | ||
| gh auth login | ||
| ``` | ||
|
|
||
| ### Available Commands | ||
|
|
||
| ```bash | ||
| # Generate pull request description | ||
| llnotes pull-request --number <PR_NUMBER> | ||
|
|
||
| # Generate release notes for upcoming release | ||
| llnotes upcoming-release | ||
|
|
||
| # Generate release notes between two git references | ||
| llnotes diff --since <TAG_OR_COMMIT> --until <TAG_OR_COMMIT> | ||
|
|
||
| # Generate release announcement | ||
| llnotes announce --version <VERSION> | ||
| ``` | ||
|
|
||
| ### Configuration Flags | ||
|
|
||
| Common flags available across commands: | ||
| - `--model`: Serving chat model (default: "databricks-claude-sonnet-4-5") | ||
| - `--org`: GitHub organization (default: "databrickslabs") | ||
| - `--repo`: GitHub repository (default: "ucx") | ||
| - `--profile`: Databricks config profile | ||
| - GitHub authentication: `--github-token`, `--github-app-id`, `--github-app-installation-id`, etc. | ||
|
|
||
| Config is stored in `$HOME/.databricks/labs/llnotes/` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Command Structure | ||
|
|
||
| The application uses the `lite` framework (from `go-libs/lite`) for CLI scaffolding. Commands are registered in `main.go`: | ||
| - Each command follows the `lite.Command` pattern with `Name`, `Short`, `Flags`, and `Run` functions | ||
| - Commands interact with the core `llnotes` library (`../go-libs/llnotes/`) | ||
| - The `askFor()` helper provides interactive prompts for iterative refinement | ||
|
|
||
| ### Core Library (go-libs/llnotes) | ||
|
|
||
| The business logic lives in `../go-libs/llnotes/`: | ||
| - `pull_request.go`: PR description generation | ||
| - `release_notes.go`: Release notes from commits | ||
| - `diff.go`: Diff-based release notes | ||
| - `announce.go`: Release announcements | ||
| - `talk.go`: Interactive chat with LLM | ||
| - `chain.go`: Message chain management | ||
|
|
||
| ### Key Design Patterns | ||
|
|
||
| 1. **Conversation Chain**: Uses a message chain pattern (`chain.go`) to maintain context across LLM interactions | ||
| 2. **Interactive Mode**: `pull-request` and `announce` commands support iterative refinement through user prompts | ||
| 3. **Settings Configuration**: Central `Settings` struct manages GitHub and Databricks credentials, model selection, and repo details | ||
|
|
||
| ## Dependencies | ||
|
|
||
| - `github.com/databricks/databricks-sdk-go`: Databricks API SDK for model serving | ||
| - `github.com/databrickslabs/sandbox/go-libs`: Shared monorepo libraries | ||
| - `github.com/spf13/pflag`: CLI flag parsing | ||
| - `github.com/fatih/color`: Terminal color output | ||
|
|
||
| ## Testing | ||
|
|
||
| Tests use the standard Go testing framework with `gotestsum` for better output formatting: | ||
| - Test files would follow `*_test.go` naming convention | ||
| - Run with `make test` (includes coverage output to `coverage.txt`) | ||
| - Use `-short` flag to skip long-running tests |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to call it AGENTS.md and create
CLAUDE.mdsymlink - in this case it will work with more LLMs