agent

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agent provides utilities for detecting and configuring AI agent instruction files.

Index

Constants

View Source
const InstructionText = `` /* 362-byte string literal not displayed */

InstructionText is the mandatory td usage instructions to add to agent files.

Variables

View Source
var KnownAgentFiles = []string{
	"AGENTS.md",
	"CLAUDE.md",
	"COPILOT.md",
	"CURSOR.md",
	".github/copilot-instructions.md",
}

KnownAgentFiles lists agent instruction files in priority order. AGENTS.md is preferred since td supports multiple agent types.

Functions

func DetectAgentFile

func DetectAgentFile(baseDir string) string

DetectAgentFile finds the first existing agent file in baseDir. Returns the full path if found, empty string if none exist.

func HasTDInstructions

func HasTDInstructions(path string) bool

HasTDInstructions checks if the file already contains td instructions.

func InstallInstructions

func InstallInstructions(path string) error

InstallInstructions adds td instructions to an agent file. Creates the file if it doesn't exist.

func PreferredAgentFile

func PreferredAgentFile(baseDir string) string

PreferredAgentFile returns the best agent file to use for installation. Priority: 1. If AGENTS.md exists, use it (td supports many agents) 2. If only CLAUDE.md exists, use it 3. If both or neither exist, prefer AGENTS.md

Types

This section is empty.

Jump to

Keyboard shortcuts

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