# Where to Find Ponytail's Core Instruction Set: Complete File Guide

> Locate Ponytail's core instruction set within the DietrichGebert/ponytail repository. Discover files for Copilot, human-readable principles, and JS hooks.

- Repository: [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail)
- Tags: api-reference
- Published: 2026-09-04

---

**Ponytail's core instruction set is defined across three specific files in the DietrichGebert/ponytail repository: [`.github/copilot-instructions.md`](https://github.com/DietrichGebert/ponytail/blob/main/.github/copilot-instructions.md) for Copilot-based tools, [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) for human-readable principles, and [`hooks/ponytail-instructions.js`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/ponytail-instructions.js) for programmatic runtime injection.**

Ponytail is an open-source coding assistant framework that codifies "lazy senior developer" principles through its instruction set architecture. The repository distributes its core rules—governing **YAGNI**, **stdlib-first development**, and **smallest correct change** methodologies—across multiple files to accommodate different integration methods and agent hosts.

## The Three Locations of the Core Instruction Set

### Copilot Fallback Rules ([`.github/copilot-instructions.md`](https://github.com/DietrichGebert/ponytail/blob/main/.github/copilot-instructions.md))

Located in the `.github` directory, this markdown file serves as the always-on instruction set for Copilot-based agents. The Copilot CLI and other tools that support only a simple instructions-only mode read this file directly when no plugin is installed. It provides the baseline lazy-senior-dev behavior without requiring runtime JavaScript execution.

### Primary Agent Rules ([`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md))

The [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) file contains the primary, human-readable instruction set shipped with Ponytail. This file summarizes the essential architectural principles including *YAGNI* (You Aren't Gonna Need It), *stdlib first*, and *smallest correct change*. Many third-party adapters—including those for Cursor, Windsurf, Qoder, and CodeWhale—copy this file into their own rules directories to replicate Ponytail's behavior without loading the full plugin ecosystem.

### Runtime Instruction Builder ([`hooks/ponytail-instructions.js`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/ponytail-instructions.js))

For dynamic integration scenarios, [`hooks/ponytail-instructions.js`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/ponytail-instructions.js) programmatically constructs instruction text for runtime injection. This JavaScript module pulls rule text from the markdown sources and prepends mode-specific prefixes such as `full`, `lite`, and `ultra`. Hosts including Claude Code, OpenCode, pi, and Grok import this module via `require('./hooks/ponytail-instructions')` to inject the core instruction set into each chat turn.

## Loading the Core Instruction Set Programmatically

Host implementations can access Ponytail's rules using either the JavaScript builder or by directly reading the markdown source.

**JavaScript Implementation:**

```javascript
// Example: loading Ponytail instructions in a custom host
const { getPonytailInstructions } = require('./hooks/ponytail-instructions');

// Choose a mode (off | lite | full | ultra)
const mode = 'full';

// Retrieve the instruction text for the selected mode
const instructions = getPonytailInstructions(mode);

// Inject the instructions into the system prompt (or into the chat turn)
output.system.push(instructions);

```

**Python Implementation:**

```python

# Example: loading Ponytail instructions in a Python‑based host

from pathlib import Path

def load_instructions(mode: str = "full") -> str:
    # The core instruction text lives in AGENTS.md

    agents_path = Path(__file__).parent.parent / "AGENTS.md"
    return agents_path.read_text(encoding="utf-8")

instructions = load_instructions()

# Use `instructions` wherever the host builds its system prompt

```

## Instruction Modes and the Slash Command

The core instruction set supports four distinct operating modes configured via the `getPonytailInstructions` function: **off**, **lite**, **full**, and **ultra**. These modes determine the strictness and verbosity of the guidance injected into system prompts. The `/ponytail` slash command defined in [`commands/ponytail.toml`](https://github.com/DietrichGebert/ponytail/blob/main/commands/ponytail.toml) enables users to switch between these modes dynamically, triggering the appropriate instruction subset for the current development context.

## Summary

- **[`.github/copilot-instructions.md`](https://github.com/DietrichGebert/ponytail/blob/main/.github/copilot-instructions.md)** provides the fallback rule set for Copilot CLI and instructions-only tool chains.
- **[`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md)** contains the human-readable source of truth for YAGNI and stdlib-first principles.
- **[`hooks/ponytail-instructions.js`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/ponytail-instructions.js)** exports `getPonytailInstructions(mode)` to build runtime instructions with mode-specific prefixes.
- Four configuration modes control behavior: **off**, **lite**, **full**, and **ultra**.
- Integration is supported across Claude Code, Cursor, Windsurf, and other AI coding assistants.

## Frequently Asked Questions

### What is the difference between AGENTS.md and copilot-instructions.md?

[`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) serves as the comprehensive, human-readable source document that many adapters copy directly into their rules directories, while [`.github/copilot-instructions.md`](https://github.com/DietrichGebert/ponytail/blob/main/.github/copilot-instructions.md) is specifically positioned for GitHub Copilot's automatic discovery mechanism. The Copilot file acts as a simplified fallback when the JavaScript runtime builder cannot be loaded.

### How do I switch between instruction modes in Ponytail?

Use the `/ponytail` slash command defined in [`commands/ponytail.toml`](https://github.com/DietrichGebert/ponytail/blob/main/commands/ponytail.toml) to toggle between **off**, **lite**, **full**, and **ultra** modes. Alternatively, programmatic hosts can call `getPonytailInstructions(mode)` from [`hooks/ponytail-instructions.js`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/ponytail-instructions.js) with the desired mode string to retrieve the appropriately prefixed instruction set.

### Can I use Ponytail's core instruction set with Cursor or Windsurf?

Yes. Cursor, Windsurf, and similar editors that cannot load the full JavaScript plugin typically copy [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) directly into their rules or context directories. This file contains the complete lazy-senior-dev principles without requiring the runtime builder module.

### Where is the getPonytailInstructions function defined?

The `getPonytailInstructions` function is defined in [`hooks/ponytail-instructions.js`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/ponytail-instructions.js). This module concatenates rule text from the markdown instruction files and applies mode-specific prefixes before returning the final instruction string for system prompt injection.