Help us shape the future of Go! Take the 2026 Go Developer Survey

worktree

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package worktree reads the git working tree to ground the relay (§19.1): the unified diff of the change under review, the changed code paths, and the arc footprint (paths + area labels) an execution turn leaves. Every read is best-effort — outside a git repo it yields nothing, never an error — so the relay stays drivable without a repository. The step and run command shells both use it, keeping the relay engine itself free of version-control I/O.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureFootprint

func CaptureFootprint(repoDir string, arc *adh.Arc)

CaptureFootprint records what an execution turn touched (§19.1, §19.3): the changed paths ground the cold critic on the real change, and the areas they fall under become labels so the arc's context routes. Best-effort — outside a git repo it is a no-op. Derived labels union with any already declared, preserving hand-set ones.

func ChangedCodePaths

func ChangedCodePaths(repoDir string) ([]string, bool)

ChangedCodePaths reports the working tree's changed paths under repoDir, excluding the harness's own .adh/ state. The bool is false when there is no git repo — the read is best-effort and never fatal.

func Diff

func Diff(repoDir string, paths []string) string

Diff renders the change under review at paths as a unified diff for the critic's grounding (§19.1). Best-effort — outside a git repo it is empty — and capped, so a huge change cannot bloat the prompt (the truncation is marked, never silent).

Types

This section is empty.

Jump to

Keyboard shortcuts

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