{
  "markdown": "<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/logo-dark.png\">\n    <img src=\"assets/logo.png\" width=\"220\" alt=\"Panda, the lazy but reliable senior engineer\">\n  </picture>\n</p>\n\n<h1 align=\"center\">Panda</h1>\n\n<p align=\"center\">\n  <em>Lazy enough to avoid unnecessary code. Reliable enough to ship the right code.</em>\n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/Codex-plugin-111111?style=flat-square\" alt=\"Codex plugin\">\n  <img src=\"https://img.shields.io/badge/Claude_Code-plugin-111111?style=flat-square\" alt=\"Claude Code plugin\">\n  <img src=\"https://img.shields.io/badge/license-MIT-111111?style=flat-square\" alt=\"MIT license\">\n</p>\n\n<p align=\"center\">\n  <strong>English</strong> | <a href=\"README.zh-CN.md\">简体中文</a>\n</p>\n\n> [!IMPORTANT]\n> **Panda is a derivative project based on [Ponytail](https://github.com/DietrichGebert/ponytail) by Dietrich Gebert.**\n> It was created by studying and adapting Ponytail under the MIT License. Dietrich Gebert and the Ponytail project do not maintain or endorse this fork.\n\nPanda is a set of rules, skills, plugins, and lifecycle hooks for AI coding\nagents. It gives Codex, Claude Code, Copilot, Gemini, and other agents the\ninstincts of a lazy but dependable senior engineer: understand the system\nfirst, reuse what already works, and write only the code the task actually\nneeds.\n\nLazy about implementation. Never lazy about correctness.\n\nCurrent release: **Panda 5.0.7**, based on the **Ponytail 4.9.0** upstream\nbaseline. Panda versions track this derivative project independently.\n\n## Core capabilities\n\n- **Minimal implementation:** Understand the real flow, reuse existing capabilities, and add only the minimum compliant code.\n- **Surgical Changes:** Keep every changed line tied to the request, its necessary call chain, or required verification; do not casually refactor, format, clean up, or modify unrelated modules.\n- **Project-rule discovery:** Before implementation, check the active repository and target-file scope for applicable instruction entry points and their task-relevant references.\n- **Quality boundaries:** Never trade security, correctness, company and project rules, or required tests for fewer lines.\n\n## What Panda adds to Ponytail\n\nPanda keeps Ponytail's reuse-first, anti-over-engineering approach and adds four company-oriented guardrails:\n\n| Addition | Effect |\n|---|---|\n| **Company safety baseline** | Transactions, idempotency, authorization, concurrency controls, logging, monitoring, and required tests cannot be simplified away. |\n| **Project-rule discovery** | Before selecting an implementation, the agent checks applicable `AGENTS.md`, `CLAUDE.md`, and other native rule entry points instead of relying only on rules the host happened to preload. |\n| **Fixed precedence** | Company safety and quality boundaries > current-project rules > Panda's minimization advice. |\n| **Surgical Changes** | Requirement A changes only the code required for A, its necessary call chain, and verification; unrelated module B is not casually refactored, formatted, or cleaned up. |\n\nThese are Agent instructions and self-checks, not a filesystem sandbox or hard code-level blocker. They reduce scope drift while still allowing necessary cross-module root-cause fixes.\n\n## The Panda\n\nYou know this engineer. Quiet. Unhurried. Possibly holding bamboo.\n\nYou show Panda fifty lines of new framework code. Panda looks through the\nrepository, finds the helper that already exists, removes forty-eight lines,\nand goes back to doing nothing.\n\nThat is the point.\n\nPanda does not mean careless code or code golf. It means avoiding speculative\nabstractions, duplicate implementations, unnecessary dependencies, and layers\nthat exist only because an AI agent wanted its answer to look impressive.\n\n## Before / after\n\nYou ask for a date picker. The agent installs a library, creates a wrapper,\nadds a stylesheet, writes timezone glue, and introduces a new maintenance\nsurface.\n\nWith Panda:\n\n```html\n<!-- panda: the browser already has one -->\n<input type=\"date\">\n```\n\nThe same rule applies to backend systems: reuse the current Facade, Service,\nFactory, cache, configuration, validation, and transaction patterns before\ninventing a parallel architecture.\n\n## How it works\n\nBefore writing code, Panda stops at the first rung that holds:\n\n```text\n1. Does this need to exist?       -> no: skip it (YAGNI)\n2. Already in this repository?    -> reuse it\n3. Standard library does it?      -> use it\n4. Native platform feature?       -> use it\n5. Installed dependency does it?  -> use it\n6. A very small implementation?   -> write that\n7. Only then                      -> add the minimum necessary code\n```\n\nThe ladder runs only after the agent understands the affected flow and the\ncurrent project's rules. Panda shortens the solution, not the investigation.\n\nPanda never simplifies away security, authorization, trust-boundary\nvalidation, error handling, data integrity, transactions, idempotency,\nconcurrency controls, compatibility, logging, monitoring, accessibility, or\nrequired tests.\n\n## Install\n\nNode.js must be available on `PATH` for lifecycle hooks. The skills still work\nwithout hooks, but automatic activation will not.\n\n### Codex\n\n```bash\ncodex plugin marketplace add xgzng/panda-plugin\ncodex plugin add panda@panda\n```\n\nRun `codex` and open `/hooks`, review and trust its three lifecycle hooks, and\nstart a new thread.\n\nThis same install also covers the Codex desktop app: restart the app after\ninstalling and it picks up the plugin.\n\nOn Windows, if PowerShell blocks `codex.ps1`, run the same two commands with\n`codex.cmd` instead. This changes only the executable name, not the install\nprocess.\n\n### Claude Code\n\nRun these as two separate prompts:\n\n```text\n/plugin marketplace add xgzng/panda-plugin\n/plugin install panda@panda\n```\n\nThe same steps work in the Claude Code Desktop app's Code tab: type the two\n`/plugin` commands above into the prompt box, or click the **+** button, choose\n**Plugins** -> **Add plugin**, and manage marketplaces from **Customize** in\nthe sidebar.\n\n### Other agents\n\nPanda retains Ponytail's adapters for GitHub Copilot CLI, Gemini CLI,\nOpenCode, Pi, Qoder, Hermes, OpenClaw, Grok, Cursor, Windsurf, Cline, Kiro,\nDevin, and instruction-file compatible agents. See\n[`docs/agent-portability.md`](docs/agent-portability.md) for the file and\ncommand mapping.\n\n## Skills\n\n| Skill | Purpose |\n|---|---|\n| `panda` | Use during development to find the smallest compliant implementation. |\n| `panda-review` | Review the current diff for over-engineering before commit or merge. |\n| `panda-audit` | Audit the whole repository for unnecessary complexity. |\n| `panda-debt` | Collect deliberate `panda:` simplification markers into a debt ledger. |\n| `panda-gain` | Show Ponytail's published upstream benchmark as reference data. |\n| `panda-help` | Display the command and mode reference. |\n\nCodex examples:\n\n```text\n$panda:panda\n$panda:panda-review\n$panda:panda-audit\n```\n\n## Using Panda with SDD\n\nPanda works alongside SDD tools such as OpenSpec and Superpowers. Their roles\nare complementary:\n\n- OpenSpec defines requirements, specifications, tasks, and acceptance criteria.\n- Superpowers drives discovery, planning, test-driven development, and verification.\n- Panda enforces company safety boundaries, current-project rules, reuse, and the\n  smallest correct implementation.\n\nPanda also constrains the change surface: every changed line must serve the\nrequest or a necessary call chain. It does not opportunistically refactor,\nreformat, or clean up unrelated code, and it checks the final diff for scope\ndrift. This is Agent guidance and self-review, not a hard Git enforcement rule.\n\nAfter installation with trusted hooks, Panda stays active in the default `full`\nmode. It does not need to be invoked or switched at every SDD stage. Panda does\nnot start or replace OpenSpec or Superpowers; invoke `panda-review` explicitly\nafter implementation to check the diff for over-engineering.\n\nRecommended flow:\n\n```text\nOpenSpec: Explore / Propose -> Design / Tasks -> Apply -> Verify / Archive\nPanda:    Enforce company boundaries, project rules, reuse, and complexity throughout\n\nSuperpowers: Brainstorm -> Plan -> Build / TDD -> Verify\nPanda:       Enforce company boundaries, project rules, reuse, and complexity throughout\n\nBefore commit: panda-review\n```\n\n## Modes\n\nThe default is `full`, and the selected mode persists for the current session.\nSwitch only when changing the enforcement level or disabling Panda, not between\ndevelopment stages.\n\n| Mode | Behaviour | Codex, current session | Claude Code, current session |\n|---|---|---|---|\n| `lite` | Build the requested solution and briefly identify the simpler alternative. | `$panda:panda lite` | `/panda lite` |\n| `full` | Enforce the reuse and minimum-implementation ladder. Default. | `$panda:panda full` | `/panda full` |\n| `ultra` | Challenge speculative requirements and prefer deletion before addition. | `$panda:panda ultra` | `/panda ultra` |\n| `off` | Disable persistent Panda guidance. | `$panda:panda off` | `/panda off` |\n\nCall `$panda:panda` in Codex or `/panda` in Claude Code without an argument to\nshow the current mode. Session switches last until the session ends.\n\nTo change the default for new sessions permanently:\n\n```text\nCodex: $panda:panda default lite\nClaude Code: /panda default lite\n```\n\nSet the default with `PANDA_DEFAULT_MODE=lite|full|ultra|off`, or create:\n\n```json\n{ \"defaultMode\": \"full\" }\n```\n\nConfiguration paths:\n\n- Windows: `%APPDATA%\\panda\\config.json`\n- macOS/Linux: `~/.config/panda/config.json`\n\nLegacy `PONYTAIL_*` environment variables remain accepted for compatibility\nwith upstream configuration and future merges.\n\n## Project rules\n\nPanda does not scan every repository on the machine. Before choosing an\nimplementation or editing files, it checks the active repository and target-file\nscope for native project-rule entry points such as `AGENTS.md`, `CLAUDE.md`,\n`.github/copilot-instructions.md`, `.cursor/rules/`, `GEMINI.md`, and\n`.windsurf/rules/`. It reuses instructions already supplied by the host; otherwise\nit reads applicable entry points and only task-relevant files they explicitly\nreference. It does not recursively scan arbitrary rule directories.\n\nThe shared company boundaries live in\n[`rules/company-core.md`](rules/company-core.md).\n\nPrecedence:\n\n1. Company safety and quality boundaries.\n2. Current-project rules and architecture.\n3. Panda's minimization advice.\n\n## Upstream benchmark\n\n> [!NOTE]\n> The following figures are **Ponytail's published upstream benchmark results**. They are not measurements of Panda, this fork, or any company repository, and they are not a promise of future savings.\n\nThe upstream agentic benchmark used real Claude Code sessions against the same\nagent without the skill:\n\n| Compared with no-skill baseline | Added LOC | Tokens | Cost | Time | Safety tier |\n|---|---:|---:|---:|---:|---:|\n| **Ponytail upstream result** | **-54%** | **-22%** | **-20%** | **-27%** | **20/20 passed** |\n\nThe largest reductions appeared where agents had obvious over-building traps,\nsuch as date pickers and color pickers. Tasks that were already minimal showed\nlittle or no reduction. See the bundled upstream write-up at\n[`benchmarks/results/2026-06-18-agentic.md`](benchmarks/results/2026-06-18-agentic.md)\nand the original [Ponytail repository](https://github.com/DietrichGebert/ponytail).\n\n## Update and uninstall\n\nRefresh the Git marketplace and reinstall the cached version:\n\n```bash\ncodex plugin marketplace upgrade panda\ncodex plugin remove panda\ncodex plugin add panda@panda\n```\n\nUninstall:\n\n```bash\nnode scripts/uninstall.js\ncodex plugin remove panda\ncodex plugin marketplace remove panda\n```\n\nRun the cleanup script before removing the plugin if you also want its local\nmode/configuration state removed.\n\n## Development\n\n```bash\nnode scripts/check-rule-copies.js\nnpm test\n```\n\nPublic skill names use Panda. Some internal Hook filenames, `.ponytail-active`,\nand the `ponytail-mcp` directory intentionally retain upstream-compatible\nnames to make future Ponytail merges smaller and preserve existing sessions.\n\n## Origin and license\n\nPanda is based on **[Ponytail](https://github.com/DietrichGebert/ponytail)**,\ncreated by **Dietrich Gebert**. This repository studies, adapts, and extends\nPonytail with Panda branding and company-oriented engineering boundaries.\n\nPonytail is distributed under the [MIT License](LICENSE). The original\ncopyright and license notice are preserved. Benchmark material in this\nrepository belongs to and describes the upstream Ponytail project; Panda does\nnot claim those results as its own.\n\nSee [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) for the explicit\nthird-party attribution.\n\nPanda is an independent derivative and is not maintained, sponsored, or\nendorsed by Dietrich Gebert or the Ponytail project.\n",
  "bytes": 12944,
  "sha": "d22fa1389fca32bbb4703f0c5852d8328d9013103be69c7cf1bdd9361ea9c3a7",
  "repo_slug": "xgzng/panda-plugin",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_xgzng_panda_plugin_feb1e39b/readme"
}