# Ponytail + Archcore

> Connect Ponytail + Archcore so your agent cuts only the code no project decision needs and records the decisions you settle as draft ADRs.

Instruction revision: e649d9aa73f4c2376ffbe827571f0dfd06747b514dab8268a3de28620a84ddcb
Instruction text: https://archcore.ai/integrations/ponytail/cooperation.md
Source: https://github.com/archcore-ai/landing — src/recipes/ponytail/cooperation.md (unpublished)

## Tools

- Archcore — Keeps project decisions [in Git](https://docs.archcore.ai/) so the agent checks them before it cuts code and records the ones you settle.
- Ponytail — Pushes the agent toward the [shortest working change](https://github.com/DietrichGebert/ponytail) and flags code that can be deleted.

## How Ponytail + Archcore work together

Ponytail + Archcore lets your agent cut code hard without cutting what a project
decision requires. Ponytail pushes each change toward the shortest working diff.
Archcore gives the agent the accepted decisions to check first, and a place to
save the ones you settle.

Say Ponytail's review flags a one-implementation interface as dead weight, but
an accepted ADR says partner packages implement it. The agent finds the ADR,
keeps the interface, and still cuts the unused factory next to it.

See the [benchmark note](/integration-evidence/2026-09-26-ponytail.md) and the
[recheck note](/integration-evidence/2026-10-22-ponytail.md) for what was
measured. Modes and installation are on the
[Ponytail project](https://github.com/DietrichGebert/ponytail) page.

## From a simplification to a kept decision

The instructions ask your agent to:

1. **Check decisions before cutting.** Before Ponytail's rules or review remove code, the agent searches Archcore for records that name it.
2. **Keep what a decision requires.** If an accepted record needs the code, it stays, and the agent cites the record. Everything else gets the shortest working diff.
3. **Record what you settle.** If your request settles a decision, like dropping a feature, the agent saves it as a draft ADR (architecture decision record) in .archcore/. The next session finds the reason there, not in chat history.

Both tools must already be set up. Ponytail keeps its rules and review; Archcore keeps the decisions.


## Example

Request: “The owner decided to drop gift wrapping: the supplier contract ended. Remove it from the quotation library, so quote() no longer takes gift_wrap or returns extras. Keep the tests passing.”

1. **Archcore:** The agent searches Archcore for the touched symbols and finds the integer-cents ADR. The removal does not conflict with it.
2. **Ponytail:** Ponytail's rules keep the diff short: the agent deletes the gift-wrap registry, the argument, the extras field and its test.
3. **Agent:** The agent runs the tests before it reports.
4. **Archcore:** Your request settles a decision, so the agent saves it as .archcore/shop/drop-gift-wrapping.adr.md with your reason.
5. **Agent:** A later session that searches for gift wrapping finds the draft ADR. You accept or reject it in review.

This is what the instructions ask for, not a recorded run. The same request passed 30 of 30 benchmark runs across three models; the later-session step was not run.


## Benefits & limits

### Cut code without losing project decisions.

With the instructions, the agent kept code an accepted ADR requires and recorded settled decisions as draft ADRs. Without them, it recorded 0 of 15 such decisions.

### Ponytail's review meets an accepted decision

The agent kept the interface the ADR requires and cut the unused factory next to it: 20 of 20 runs with claude-sonnet-5, 10 of 10 with claude-sonnet-5-5.

Without the instructions, claude-opus-5-5 kept the interface too, so the gain depends on the model.

### You settle a decision in the request

The agent saved the decision as a draft ADR in every run with the instructions, and in none without them.

Decisions made in the middle of a longer conversation were not tested.

### Limits

Tested in Claude Code on one small Python project with three models. Larger repositories were not tested.


## Known limits

- Tested with Claude Code 2.1.283 and 2.1.306, Ponytail 4.10.0 and 5.3.2, Archcore 0.10.6 and 0.13.1. Other hosts were not tested.
- Five single-turn tasks and one five-turn feature on one small Python project.
- Nothing enforces the instructions. Review the code and the draft ADRs before you accept them.
