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

agentinstructions

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package agentinstructions discovers bounded, workspace-scoped AGENTS.md guidance. It has no mutable workspace state and never executes instructions or file contents.

Index

Constants

View Source
const (
	Filename       = "AGENTS.md"
	MaxFileBytes   = 64 << 10
	MaxTotalBytes  = 128 << 10
	MaxDirectories = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Scope       string `json:"scope"`
	Path        string `json:"path"`
	Status      string `json:"status"`
	Content     string `json:"content,omitempty"`
	SHA256      string `json:"sha256,omitempty"`
	SizeBytes   int64  `json:"size_bytes,omitempty"`
	Reason      string `json:"reason,omitempty"`
	DuplicateOf string `json:"duplicate_of,omitempty"`
}

type Options

type Options struct {
	Home       string
	DefaultDir string
	Workdir    string
}

type Snapshot

type Snapshot struct {
	Workdir       string `json:"workdir"`
	WorkspaceRoot string `json:"workspace_root"`
	Files         []File `json:"files"`
}

func Load

func Load(ctx context.Context, options Options) (Snapshot, error)

Load reads fresh content on each request. Missing optional files are normal; unreadable or invalid files are reported without including partial instructions.

Jump to

Keyboard shortcuts

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