prompt

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package prompt builds LLM prompts from git history.

It ships a single hardcoded review template as plain Go strings — one template does not justify //go:embed or text/template machinery. Custom user templates (text/template) are post-MVP. The template requires the model to end with a fenced `risk` JSON block (§7.1), parsed back in internal/llm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildReview

func BuildReview(r Review) (system, user string)

BuildReview renders the system and user messages for a review. The user message carries the commit metadata (subjects, authors, bodies, file lists) followed by the full unified diff in a fenced block.

Types

type Review

type Review struct {
	Range   string
	Commits []gitlog.Commit
	Diff    string
}

Review is the input for building a review prompt.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL