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",
"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 ¶
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. If only CLAUDE.md exists, use it 3. If both or neither exist, prefer AGENTS.md
Types ¶
This section is empty.