handoff

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package handoff produces local AI-ready conflict prompts and append-only audit log entries. No external API calls are made.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAudit

func AppendAudit(outputDir string, entry core.AuditEntry) error

AppendAudit appends one MergeResult-derived entry to audit.json.

func AppendDrift added in v0.6.0

func AppendDrift(outputDir string, record DriftRecord) error

AppendDrift appends one record to drift.json under outputDir.

Types

type DriftRecord added in v0.6.0

type DriftRecord struct {
	Timestamp string      `json:"timestamp"`
	File      string      `json:"file"`
	Strategy  string      `json:"strategy"`
	Drift     grove.Drift `json:"drift"`
}

DriftRecord is one row in `.git/fuse/drift.json`: the structural code-graph delta one merge produced. Same posture as the audit log — advisory, local-first, append-only — and the evidence shape the stale-context loop consumes: intersect Drift with another agent's working set to tell it exactly which symbols shifted underneath it.

type Generator

type Generator struct {
	OutputDir string // typically <gitDir>/fuse
}

Generator writes prompts under .git/fuse/.

func NewGenerator

func NewGenerator(outputDir string) (*Generator, error)

NewGenerator returns a Generator writing to outputDir, creating it if absent.

func (*Generator) Write

func (g *Generator) Write(in PromptInputs) (string, error)

Write emits a Markdown prompt and JSON payload pair; returns the Markdown file path.

type PromptInputs

type PromptInputs struct {
	FilePath        string
	Language        core.LanguageKey
	ConflictType    core.ConflictType
	Severity        core.ConflictSeverity
	Confidence      float64
	Conflicts       []core.SymbolConflict
	BreakingChanges []core.BreakingChange
	Dependencies    []string
	Dependents      []string
}

PromptInputs is the data needed to build a Markdown handoff prompt.

Jump to

Keyboard shortcuts

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