---
title: The Three Pillars
description: How Shapes, Pulls, and Berries work together across the agentic engineering cycle.
nav: The Three Pillars
order: 3
---

Prehistoriq splits agentic engineering into three parts: **Shapes** before anyone writes code, **Pulls** while the team reviews the change, and **Berries** running underneath both.

:::loop-diagram

## 1. Shapes

Agents build fast, so the hard part is agreeing on what to build before anyone builds the wrong thing. GitHub issues cannot hold interactive prototypes or an agent's before-and-after checks, and meeting decisions fade before a pull request opens.

A **Shape** is a shared space where people and their agents turn a problem into an agreed spec with interactive prototypes and numbered must-haves.

:::shape-preview

### Problem and must-haves

A shape starts with a title and a few lines describing the problem. Anyone with read access to the repository can add numbered **must-haves** describing what must be true and what must not break. Each must-have keeps its number forever (`^12#point-3`), even if an earlier item is removed, so links and comments never drift.

### Conversation and interactive prototypes

People and their agents post in one timeline. A post can include findings, screenshots, before-and-after wipes, videos, diagrams, code, tables, and sandboxed clickable HTML prototypes. Each prototype sits in a dark tray with a one-line prompt telling reviewers what to try.

Click **Bring my agent** on the shape, a post, an item, or a thread to hand the context to your local agent. `p9q shape <n>` pulls the shape, saves its prototypes and media under `.p9q/shape-<n>/`, and lets the agent reply with `p9q shape <n> post`. Your local agent can also read a meeting transcript and turn its decisions directly into new shapes and attributed must-haves.

### Approvals and landing

Teammates approve the shape the same way they review a pull request. If the problem or must-haves change after someone approves, Prehistoriq marks their approval stale (`approved · 2 changes since`), because only approvals of the current words count. Every edit stays in **History** and can be restored.

When everyone asked approves the current revision and no change requests remain, the shape locks as **Agreed**. Its card switches to **Land** (`p9q land <n>`), which tells your agent to build the agreed shape, open a linked pull request, and run all six review categories. Merging the linked pull request moves the shape to **Built**.

Shapes move through `Idea`, `Discussing`, `Shaping`, `Signing`, `Agreed`, and close as `Built` or `Closed`. Any post, item, or comment can branch into a linked shape of its own.

## 2. Pulls

Pull requests written by agents grow quickly, and a raw diff cannot tell you whether the code ran, what the UI looks like, or how hard the change is to roll back.

**Pulls** lays out every pull request as six structured answers, multi-level code diffs with **Strata** on **Changes** (coming soon), and threads anchored directly to findings or code blocks.

:::pull-strip

### The six answers

Every pull request displays the same six tiles under its title, always in the same order:

| Tile         | Question                     | What the tile shows                                                                                         |
| ------------ | ---------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **What**     | What does this change do?    | Plain-English headline, summary, and diagrams or schema changes                                             |
| **Show me**  | What does it look like?      | Screenshots, before/after comparisons, flows, videos, or diagrams                                           |
| **Review**   | Is it built right?           | Findings grouped by severity (`blocker`, `major`, `minor`, `nit`) or clean check count                      |
| **Proof**    | Does it actually work?       | Passing and failing checks, terminal output, or metrics                                                     |
| **Undo**     | How hard is it to take back? | Each side effect classified as a door: `revert`, `work` (and whether the way back is written), or `one-way` |
| **Security** | Does it open a door?         | Security findings by severity or checklist items                                                            |

Every tile uses the same traffic lights: **pass** (clear), **warn** (merge after a look or small fix), **fail** (do not merge as is, or on Undo, a one-way door or unwritten rollback that needs an explicit yes), and **info** (neutral context on What).

### Three zoom levels

:::zoom-diagram

Each category section opens only as far as needed:

1. **Compact** shows one line with the category icon, verdict light, headline, and avatars of anyone discussing it. Passing checks default here, except **Show me**, which still previews its first visual.
2. **Summary** shows the summary plus every block's face: finding titles, one-sentence impact lines on blockers and majors, checklist labels, and visuals with captions. Warnings, failures, and **What** open here by default.
3. **Full** shows the full body, suggested fix, code snippets, and checklist notes. You open items one at a time or click **Expand all**.

### Strata across four diff levels `Coming soon`

Even with six answers, you still want to inspect the code itself when a change spans hundreds or thousands of lines. Reading a raw diff top to bottom forces you to reconstruct the structure in your head.

On the **Changes** tab beside **Overview**, **Strata** stacks three readable, syntax-highlighted pseudocode layers directly above the real code diff: **Outline**, **Detail**, **Fine detail**, and **Code**. You start at the outline of what each function does, drop into finer levels only where something looks risky, and read the exact lines of code underneath.

:::strata-preview

- **Whole-row change visibility** colors every row that covers changed lines, and every changed line maps to a colored row (or an explicit note when it has none)
- **Line-anchored threads across every level** keep comments pinned to the underlying code lines no matter which level you wrote them on. A thread appears in full on its own level and finer ones, collapses to a count badge on wider levels above, and stays put even if Strata is rebuilt
- **Graceful fallback** shows **Code** immediately before Strata is built (with a **Build Strata** button beside the level picker), and shows plain code when a PR has no functions to summarize

Strata is agreed in Shape 117 and is currently being built.

### Threads and GitHub reviews

Any run, block, or individual finding can hold a thread. Each thread saves a quote of what it pointed to, stays visible when its section is folded, and stays readable even after a newer run replaces the old one.

Click **Ask my agent** on any item to post your question and copy a `p9q discuss <thread>` prompt. Your agent checks your local checkout and posts its reply (markdown, code, screenshots, or diagrams) directly into that thread.

Because URLs mirror GitHub, replacing `github.com` with `prehistoriq.com` opens the matching Pulls page. Submitting **Approve** or **Request changes** posts straight to GitHub as your review so branch protection counts it, and the GitHub bot keeps one edited comment updated with the six lights and open threads.

## 3. Berries `Coming soon`

A pull request diff shows what changed, not how it was made. Reviewers cannot see which prompts led to which lines, what the agent asked and what the author answered, which models and skills did the work, or what was tried and dropped. Decisions made while coding never reach the shape, so the shape and the pull request drift apart unseen.

Raw transcripts on a developer's laptop do not solve that. They are long, private, can contain secrets, and miss code written through shell commands like `python3` or `sed` instead of direct edit tools.

**Berries** capture prompts, agent responses, tool calls, skill invocations, and working-tree diffs locally through `p9q`, link them to the lines, commits, pull requests, and shapes they produced, and show them where people already look.

:::berries-preview

### Where Berries appear

- **On Pulls ("How it was made")** with four reading depths (**Glance**, **Your words**, **Conversation**, and **Every step**) and a five-lane timeline (**Shape**, **You**, **Agent**, **GitHub**, **Production**) across **Shaping**, **Building**, **In review**, and **Shipping**, so reviewers understand how a PR was built without reading a raw transcript
- **On Shapes** where every session that worked on a shape links back to it, including planning sessions before any pull request existed, joining shaping work to implementation and surfacing decisions made along the way
- **In line blame** where working-tree diffs captured after tool calls attribute each line as `ai`, `human`, or `unknown` (falling back to `unknown` whenever a later overlapping edit obscures who wrote it)

### Privacy and local capture

:::berries-privacy

Berries keep private work out of Git and require nothing extra to install:

- **Nothing goes into Git** because prompts can hold secrets and Git cannot forget, so session text stays outside Git, stored in the EU and kept separate from the index
- **Hide and erase anytime** before or after a session is shared, deleting its text from storage
- **Installed with `p9q`** using a local spool under `~/.p9q/berries/` and agent hooks that work across clones and worktrees without slowing down or breaking sessions
- **Opt-in local preparation** where generating titles, extracting decisions, or redacting sensitive spans runs through a model harness (Claude Code, Codex, or Ollama) only after you enable it in `p9q setup`

:::callout
**Current status:** Shape posts, thread replies, and Pull reports already show who sent them, and the agent and model when `p9q` knows them. **Berries** capture, sync, and "How it was made" views are agreed in Shape 108 and not available yet.
:::

Ready to try it on a repository? Follow the [Quick Start](/docs/quickstart/) to install `p9q` and post your first six-answer pull request.
