Documentation
¶
Overview ¶
Package agent provides utilities for detecting and configuring AI agent instruction files.
Index ¶
Constants ¶
const InstructionText = `` /* 362-byte string literal not displayed */
InstructionText is the mandatory td usage instructions to add to agent files.
Variables ¶
var KnownAgentFiles = []string{
"AGENTS.md",
"CLAUDE.md",
"CLAUDE.local.md",
"GEMINI.md",
"GEMINI.local.md",
"CODEX.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 AnyFileHasTDInstructions ¶ added in v0.39.0
AnyFileHasTDInstructions checks all known agent files in baseDir for td instructions. Returns true if any file already contains the instructions (dedup check).
func DetectAgentFile ¶
DetectAgentFile finds the first existing agent file in baseDir. Returns the full path if found, empty string if none exist.
func HasTDInstructions ¶
HasTDInstructions checks if the file already contains td instructions.
func InstallInstructions ¶
InstallInstructions adds td instructions to an agent file. Creates the file if it doesn't exist.
func PreferredAgentFile ¶
PreferredAgentFile returns the best agent file to use for installation. Priority: 1. If AGENTS.md exists, use it (td supports many agents) 2. Use the first existing known agent file 3. If none exist, prefer AGENTS.md for new installations
Types ¶
This section is empty.