-// instructions reads the user's instructions from instructions.md. A missing
-// file means no instructions.
-func (a *Agent) instructions() (string, error) {
- data, err := os.ReadFile(filepath.Join(a.dir, agentInstructionsFileName))
- if err != nil && !errors.Is(err, os.ErrNotExist) {
- return "", fmt.Errorf("read instructions: %w", err)
- }
-
- return string(data), nil
-}
-
-// AgentConfig holds the settings of the config.json of an agent. ID is random,
-// made once when the file is made, and never changes. The cache key comes from
-// the ID, so a rename keeps the prompt cache and two agents with one name do
-// not share a key. Workdir is the directory where the commands of the agent
-// run. Responsibility and Parent are set together for a child agent.
-type AgentConfig struct {
- Name string `json:"name"`
- ID string `json:"id"`
- Model string `json:"model"`
- Effort string `json:"effort"`
- Workdir string `json:"workdir"`
- Responsibility string `json:"responsibility,omitempty"`
- Parent string `json:"parent,omitempty"`
-}
-