# How to Compound Feedback with Plannotator
Source: https://docs.plannotator.ai/code-context/compound-with-plannotator
Use Plannotator's local compound skill to find repeated plan-review feedback and turn it into review instructions backed by your own archive.
Plannotator's local `plannotator-compound` skill analyzes your saved plan-review history and produces a report of recurring feedback patterns. You can then turn well-supported patterns into instructions for future planning sessions.
The skill works with files already on your computer. It reads denied-plan files under `${PLANNOTATOR_DATA_DIR:-~/.plannotator}/plans/` when they are available. If that archive has no denied plans, it can fall back to Claude Code `ExitPlanMode` outcomes under `~/.claude/projects/`.
## Install the skill
The compound skill is an optional extra. Install the extra Plannotator skills with the [Skills CLI](https://skills.sh/):
```bash theme={null}
npx skills add backnotprop/plannotator/apps/skills/extra
```
Run the skill from an agent that supports installed skills:
```text theme={null}
/plannotator-compound # Claude Code
$plannotator-compound # Codex
```
Kiro CLI receives the extra skills through the normal Plannotator installer.
## What the skill reads
The first source is the local Plannotator plan archive:
```text theme={null}
${PLANNOTATOR_DATA_DIR:-~/.plannotator}/plans/
```
The analysis reads `*-denied.md` files. Each denied file contains the plan and the feedback returned during review. It ignores separate annotation files so the same feedback is not counted twice. Approved plans are counted for summary statistics, but their contents are not part of the denial-pattern analysis.
If no Plannotator denial archive exists, the skill can read human-authored `ExitPlanMode` denial reasons from Claude Code's local JSONL history. These stored outcomes are plans that a person returned for revision. The raw transcripts stay local.
The skill reads review history that may contain private plans, comments, paths, and repository details. Review the generated report before sharing it.
## Run a compound analysis
Choose the Plannotator archive or Claude Code history. The skill uses the Plannotator archive by default. If neither source exists, choose a directory when prompted.
Review the plan counts, date range, and revision rate that the skill reports.
Inspect the recurring reasons, requests, and structural preferences that the skill finds in the selected plans.
The skill writes a self-contained HTML report into the plans directory. The report includes counts, source quotes, changes over time, and candidate prompt instructions.
Keep only patterns supported by several examples. Remove one-off preferences, obsolete decisions, and instructions that belong to one repository or task.
If the skill finds an earlier compound report, it asks whether to analyze the full archive or only review files newer than that report. An incremental run with fewer than three new denials warns that the evidence may be too thin.
## Optionally add instructions to future plans
After showing the report, the skill asks whether to save candidate instructions in an optional local instruction file:
```text theme={null}
${PLANNOTATOR_DATA_DIR:-~/.plannotator}/hooks/compound/enterplanmode-improve-hook.txt
```
Plannotator calls this file a hook. It adds the instructions to future planning sessions before the agent writes a plan. If the file already exists, the skill asks whether to replace it, merge the new instructions with it, or keep it.
Enabling the hook is optional. Read the instructions first. Delete or revise them when your repository, architecture, or review standards change.
## What the report can establish
The report can show repeated feedback in the selected local archive. It cannot prove that every pattern should become a permanent rule.
Use these checks before adding an instruction:
* Does the report cite several independent examples?
* Is the pattern still current?
* Does it apply broadly, or only to one project or task?
* Would a deterministic lint rule or test enforce it more reliably?
* Can a future maintainer trace the instruction back to source evidence?
Keep the report and the resulting instruction separate. The archive is evidence. The instruction is a maintained interpretation that you may revise or delete.
## Where to put a reusable instruction
Put repository-wide guidance in `AGENTS.md` or `CLAUDE.md` only when it should affect most work in that scope. Put narrower instructions in a directory-level file or a task-specific skill. The guide to [writing a good AGENTS.md](/learn/ai-development/how-to-write-a-good-agents-md) explains how to keep repository guidance small and verifiable.
The compound skill does not sync feedback across a team, create organization-wide rules, or publish a hosted knowledge base. It analyzes the local files available to the agent that runs it.
Use Plannotator's plan-review loop to return specific comments and revisions to your coding agent.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# Code Review with Plannotator
Source: https://docs.plannotator.ai/code-review/index
Review local changes, GitHub pull requests, and GitLab merge requests with open-source Plannotator, then return precise feedback to coding agents.
Open-source Plannotator opens code changes in a local browser review interface. Inspect the diff, annotate exact lines or ranges, suggest replacements, and return structured feedback to the coding agent working on the change.
## Review local changes
Run `plannotator review` inside a changed project. Plannotator detects supported Git, GitButler, Jujutsu, and Perforce workspaces and opens the comparison in your browser. Use the [local change review guide](/open-source/workflows/local-changes) for provider defaults, comparison controls, and feedback behavior.
Local review does not commit, merge, or deploy code. **Approve** returns the configured approval message to the active agent session. **Send Feedback** returns your annotations and overall comments.
## Review pull requests and merge requests
Open a GitHub pull request or GitLab merge request with the supported Plannotator command. The local interface shows the hosted change and can collect supported screenshots, video, HTML, and Markdown from the review conversation.
GitHub or GitLab remains the system of record for hosted comments, review status, and the merge decision. GitHub documents the underlying [pull request review model](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews). See [pull request and merge request review](/open-source/workflows/pull-requests) and [review artifacts](/learn/code-review/review-pull-request-artifacts).
## Use optional AI review
Plannotator can launch configured review agents to analyze a change. Treat their findings as review leads. Verify each claim against the current code and revision before acting on it. The [agent reviews guide](/open-source/workflows/agent-reviews) explains configuration, scope, and limits.
## Choose a review path
| Need | Use |
| - | - |
| Return feedback on uncommitted or local changes | [Local change review](/open-source/workflows/local-changes) |
| Inspect a GitHub PR or GitLab MR | [Pull request and merge request review](/open-source/workflows/pull-requests) |
| Ask a configured AI reviewer to inspect a change | [Agent reviews](/open-source/workflows/agent-reviews) |
The Learn section explains [revision diffs](/learn/code-review/what-is-a-revision-diff), [review artifacts](/learn/code-review/what-are-code-review-artifacts), and [why AI-generated pull requests can be harder to review](/learn/code-review/why-ai-generated-pull-requests-are-harder-to-review).
*Reviewed August 3, 2026. Maintained by the Plannotator documentation team.*
# ADR vs RFC vs Technical Specification
Source: https://docs.plannotator.ai/compare/adr-vs-rfc-vs-technical-specification
Choose an ADR, software RFC, or technical specification by the decision, discussion, authority, lifecycle, and maintenance record you need.
Use an ADR to preserve one significant architectural choice and its consequences. Use an RFC to circulate a proposal that needs broad discussion before adoption. Use a technical specification to define behavior and design that implementers and maintainers need to keep true.
## The decision table
| Question | ADR | RFC | Technical specification |
| - | - | - | - |
| Main job | Record a choice | Propose and discuss a direction | Define required behavior and design |
| Typical status | Proposed, accepted, rejected, deprecated, superseded | Draft, in discussion, accepted, rejected, withdrawn | Draft, accepted, implemented, superseded |
| Best scope | One architecturally significant decision | A proposal with organization-wide or cross-team consequences | One system, feature, protocol, or durable behavior contract |
| Alternatives | Records the important considered options | Invites comparison and disagreement | May link ADRs for choices rather than repeat all debate |
| After acceptance | Usually remains historical decision memory | Produces follow-up decisions, specifications, and plans | Stays current or is explicitly superseded |
| Implementation tasks | Link a plan | Link a plan after decision | Link or derive a plan; do not make the spec a task log |
## Use an ADR for “why this choice?”
An ADR captures the context, decision, and consequences of one significant design choice. The [ADR community](https://adr.github.io/) and [MADR](https://adr.github.io/madr/) provide established definitions and formats.
Example: “Use a time-bounded database lease for job claims.” The record explains why process locks fail, what alternatives were considered, and what monitoring becomes necessary.
Use the [ADR template](/templates/architecture-decision-record).
## Use an RFC for “should we adopt this proposal?”
An RFC is a discussion vehicle. It gives reviewers a concrete proposal, motivation, alternatives, compatibility effects, rollout, and open questions. An accepted RFC often produces ADRs for durable architecture choices and a specification for maintained behavior.
Example: “Introduce expiring anonymous share links.” Reviewers need to discuss security, user recovery, abuse, migration, and whether expiry is fixed or activity-based.
Use the [software RFC template](/templates/software-rfc).
## Use a technical specification for “what must remain true?”
A technical specification defines observable requirements, non-goals, design, interfaces, data, failure behavior, security, compatibility, rollout, and verification. It should be maintained when the system changes.
Example: “Expired and unknown share links return the same public response, and expired links do not read document content.” That statement can become a requirement with a corresponding integration proof.
Use the [technical specification template](/templates/technical-specification).
## A useful document chain
```text theme={null}
RFC proposal
→ accepted architecture choices in ADRs
→ maintained behavior in a technical specification
→ current implementation sequence in a coding plan
→ returned evidence in an agent handoff
```
Not every change needs the whole chain. A small internal choice may need only an ADR and a pull request. A broad proposal may need all five records. Use the smallest set that leaves no ambiguity about the current authority.
For shared discussion, [Workspaces](https://help.plannotator.ai/workspaces/review-plans-and-technical-decisions) uses the same underlying document workflow for plans, specifications, ADRs, RFCs, and handoffs.
*Reviewed July 18, 2026. Written and maintained by the Plannotator documentation team. Format guidance is based on primary ADR sources and common software proposal practice; the example chain is Plannotator's editorial recommendation.*
# GitHub Spec Kit vs Kiro Specs
Source: https://docs.plannotator.ai/compare/github-spec-kit-vs-kiro-specs
Compare GitHub Spec Kit and Kiro Specs by artifact set, workflow modes, requirement style, task structure, tool coupling, persistence, and reuse rights.
Choose GitHub Spec Kit when you want an open, tool-portable feature directory with a constitution and extended technical artifacts. Choose Kiro Specs when you want an integrated requirements, design, and tasks workflow inside Kiro, including requirements-first, design-first, and quick-plan modes.
**Sources:** [`github/spec-kit` at `57cc518d`](https://github.com/github/spec-kit/tree/57cc518d63d6f10da3dd93df1ebcadda87c59374) and the [official Kiro Specs documentation](https://kiro.dev/docs/specs/), captured July 18, 2026. Spec Kit is MIT. Kiro does not publish an open template license in the reviewed documentation, so this site paraphrases Kiro and links to the official source.
## Artifact and workflow comparison
| Dimension | GitHub Spec Kit | Kiro Specs |
| - | - | - |
| Primary artifact set | Constitution, spec, plan, research, data model, contracts, quickstart, tasks | Requirements or bug analysis, design, tasks |
| Default sequence | Specify, Plan, Tasks, Implement | Requirements-first, design-first, or quick plan |
| Requirement structure | Independently testable user stories, scenarios, requirement IDs, measurable outcomes | User stories, acceptance criteria, EARS-style behaviors, functional requirements, edge cases |
| Planning constraints | Constitution checks and technical context | Kiro steering and the selected spec workflow |
| Task structure | Stable task IDs, parallel markers, user-story labels, exact paths | Discrete tasks managed in the Kiro spec interface |
| Tool coupling | Open repository toolkit with support for many coding agents | Kiro IDE and web product workflow |
| Persistence | Explicit guidance for living or historical spec strategies | Files live under `.kiro/specs/`; the product can update them in place |
## Choose GitHub Spec Kit when
* a repository-owned feature directory should work across supported agents;
* a project constitution should constrain every feature plan;
* research, data model, contracts, and quickstart deserve separate artifacts; or
* stable requirement and task IDs help trace implementation.
The official [Spec Kit documentation](https://github.github.com/spec-kit/) explains the core workflow, and the project's templates make the exact structure inspectable.
## Choose Kiro Specs when
* Kiro is already the team's planning and implementation environment;
* the same three-file artifact set is enough;
* requirements-first and design-first entry points are both useful; or
* quick plan should create the artifacts without intermediate gates.
The [requirements-first guide](https://kiro.dev/docs/specs/feature-specs/requirements-first/) and [quick-plan guide](https://kiro.dev/docs/specs/quick-plan/) document those modes.
## Rights matter for a template gallery
Spec Kit's MIT license permits reuse with its notice. Kiro's public content terms do not provide the same open-template permission. That difference does not judge product quality, but it changes what a documentation site can safely redistribute. Plannotator links to Kiro's official artifacts instead of copying them.
## Inspect both same-case outputs
* [Complete generated Spec Kit artifact tree](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/github-spec-kit/raw): the planning flow produced the constitution, specification, plan, supporting technical artifacts, and tasks.
* [Manual, source-faithful Kiro example](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/kiro-specs/manual): the three files follow Kiro's public artifact model but were not generated by Kiro because the vendor workflow required unavailable authentication.
Read the full [GitHub Spec Kit](/frameworks/github-spec-kit) and [Kiro Specs](/frameworks/kiro-specs) profiles, or start with the original [technical specification template](/templates/technical-specification).
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. GitHub and Kiro are not affiliated with or endorsed by Plannotator.*
# Software Planning Comparisons
Source: https://docs.plannotator.ai/compare/index
Use evidence-backed comparisons to choose between planning frameworks and document formats without rankings or unsupported quality claims.
These comparisons answer a concrete choice using official repositories or documentation captured on July 18, 2026. They compare artifact models and workflows, not popularity or a universal “best” method.
Choose between a defined design-to-execution method and a durable project-state system.Choose between an open feature directory and an integrated three-file spec workflow.Choose the document that matches the decision, discussion, or maintained contract.Use this supporting guide to separate product intent, maintained technical design, and the current execution sequence.
Each page states its sources, observed differences, and the decision each format supports. A source change can invalidate a comparison, so the capture date is part of the evidence.
*Reviewed July 18, 2026. Researched and maintained by the Plannotator documentation team.*
# PRD vs Technical Specification vs Implementation Plan
Source: https://docs.plannotator.ai/compare/prd-vs-technical-specification-vs-implementation-plan
Choose a PRD, technical specification, or implementation plan by whether you need product intent, technical design, or an execution sequence.
Use a PRD to define what product outcome is needed and why. Use a technical specification to define how the system should behave and be designed. Use an implementation plan to sequence the current work. Link them instead of forcing all three jobs into one document.
## The practical comparison
| Question | PRD | Technical specification | Implementation plan |
| - | - | - | - |
| Main job | Establish product intent | Define maintained behavior and design | Establish the current execution sequence |
| Primary reader | Product, design, engineering, research, stakeholders | Engineers, operators, security, maintainers | Implementers and reviewers of this change |
| Typical contents | Users, journeys, goals, non-goals, requirements, acceptance, metrics | Architecture, interfaces, data, failures, security, compatibility, verification | Affected areas, ordered steps, dependencies, risks, tests |
| Should choose implementation details? | Only when a true product constraint requires one | Yes, at the level needed to preserve behavior and design | Uses accepted design to name concrete work |
| Lifecycle | Updated while product intent changes; then superseded deliberately | Maintained with the system or explicitly superseded | Usually completed, abandoned, or replaced after the change |
| Key review question | Are we solving the right problem with a testable boundary? | Is the design correct, safe, operable, and maintainable? | Can this sequence implement and verify the accepted design? |
## One requirement through all three documents
```text theme={null}
PRD
FR-4: An owner can choose an expiry when creating a guest link.
Technical specification
Store an optional expiry timestamp, evaluate it in the access resolver before
reading content, and make expired and unknown public responses equivalent.
Implementation plan
1. Add the expiry field and migration.
2. Enforce expiry in the shared access resolver.
3. Add the Share-dialog control.
4. Prove response equivalence and existing-link compatibility.
```
The documents remain traceable without repeating every paragraph. If evidence changes the product boundary, update the PRD. If implementation evidence changes the accepted design, update the technical specification or its linked ADR. If only the order of work changes, update the plan.
## Judge the document by its role, not its name
Some teams call the product-intent artifact a product specification, feature specification, or product brief. Some use “technical plan” for both design and sequencing. Do not manufacture a distinction from the filename alone. Inspect the document’s actual authority, contents, and lifecycle.
The separation here is supported by two inspectable source models:
* BMad Method’s pinned [PRD template](https://github.com/bmad-code-org/BMAD-METHOD/blob/717479bc3f50f38119fd958b9e577a8bde2e0184/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-template.md) holds product intent before separate architecture, epics, and stories.
* GitHub Spec Kit’s pinned [feature specification](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/spec-template.md), [implementation plan](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/plan-template.md), and [task list](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/tasks-template.md) assign different work to different artifacts.
For a concrete same-case artifact, inspect the [generated BMad express technical specification for reliable webhook delivery](https://github.com/plannotator/spec-planning-frameworks/blob/main/examples/bmad-method/raw/_bmad-output/specs/spec-reliable-webhook-delivery/SPEC.md). This run produced a technical specification, not a PRD.
## Choose the smallest complete set
* Use only a PRD when product scope needs agreement but design has not started.
* Add a technical specification when behavior or design must remain authoritative beyond one change.
* Add an implementation plan when the work spans enough systems or risk that sequence and validation need review.
* For a small reversible change, one well-written plan may carry enough product context. State that choice explicitly.
Copy the [PRD template](/templates/product-requirements-document), [technical specification template](/templates/technical-specification), or [AI coding plan template](/templates/ai-coding-plan). Read [What is a product requirements document?](/learn/planning/what-is-a-product-requirements-document) for the review workflow.
*Reviewed July 19, 2026. Written and maintained by the Plannotator documentation team.*
# Superpowers vs GSD for AI Coding Plans
Source: https://docs.plannotator.ai/compare/superpowers-vs-gsd
Compare Superpowers and GSD Core by unit of work, artifact location, lifecycle, task grain, human checkpoints, verification, and session continuity.
Choose Superpowers when you want a defined path from reviewed design to a detailed, code-level implementation plan and execution. Choose GSD Core when work spans many sessions and the repository must preserve project, phase, verification, and handoff state.
**Sources:** [`obra/superpowers` at `d884ae04`](https://github.com/obra/superpowers/tree/d884ae04edebef577e82ff7c4e143debd0bbec99) and [`open-gsd/gsd-core` at `50efae13`](https://github.com/open-gsd/gsd-core/tree/50efae13ce74f02a5b0253ce0c205c5eac2a99e3), reviewed July 18, 2026. Both repositories use MIT licenses.
## The practical difference
| Dimension | Superpowers | GSD Core |
| - | - | - |
| Primary unit | Design and implementation plan | Project, milestone, phase, and plan |
| Main location | `docs/superpowers/specs/` and `docs/superpowers/plans/` | `.planning/` with project and phase state |
| Lifecycle | Brainstorm, review design, plan, execute, review, verify, finish branch | Discuss, plan, execute, verify, ship across phases and milestones |
| Task grain | Exact files, interfaces, test setup, commands, expected output, commit | Phase plans supported by context, research, summaries, verification, and UAT |
| Human checkpoint | Design acceptance before implementation planning | Decisions during discussion plus verification and UAT records |
| Continuity | The design and plan survive into execution | State, roadmap, phase artifacts, summaries, and continuation files survive |
| Maintenance cost | Keep the design and plan accurate | Keep an entire project-state tree coherent |
## Choose Superpowers when
* one feature or change is ready for design refinement;
* the team wants implementation steps precise enough for a separate agent session;
* test-first execution and verification are part of the desired method; and
* repository plans should name exact code boundaries.
The official [writing-plans skill](https://github.com/obra/superpowers/blob/d884ae04edebef577e82ff7c4e143debd0bbec99/skills/writing-plans/SKILL.md) shows the expected task precision.
## Choose GSD Core when
* work spans multiple phases, milestones, or context windows;
* research, decisions, current state, execution summaries, verification, and UAT all need durable files;
* the next session must be able to resume from a documented current state and next action; and
* the team will actively remove or update stale state.
The official [planning-artifacts reference](https://github.com/open-gsd/gsd-core/blob/50efae13ce74f02a5b0253ce0c205c5eac2a99e3/docs/reference/planning-artifacts.md) defines that state tree.
## Inspect both same-case outputs
* [Superpowers generated design](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/superpowers/raw): the design completed, but both implementation-plan attempts stalled.
* [GSD generated `.planning/` tree](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/gsd/raw/.planning): project setup and phase context completed, but the phase-plan run was interrupted before it produced a plan.
## Can you combine them?
A team could use GSD to organize a milestone and use a detailed repository plan for one phase. That combination is an inference, not an official lifecycle published by either source. If you combine them, name which artifact controls current state and avoid duplicating the same plan in two places.
For a neutral starting point, use the [AI coding plan template](/templates/ai-coding-plan). Read the full [Superpowers](/frameworks/superpowers) and [GSD Core](/frameworks/gsd) profiles before adopting either method.
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. The compared projects are not affiliated with or endorsed by Plannotator.*
# Architecture Decision Record Formats
Source: https://docs.plannotator.ai/frameworks/adr-formats
Compare MADR, Michael Nygard's ADR form, and a minimal decision-memory form by structure, review need, and durable value.
Choose an ADR form by how much decision analysis needs to survive. MADR makes drivers, options, consequences, and confirmation explicit. Michael Nygard's form keeps status, context, decision, and consequences. A minimal memory form can preserve only the surprising tradeoff and reason.
**Source stamps:** [MADR at `835fc94`](https://github.com/adr/madr/tree/835fc94baa37887774b1cddddb2ae874881e703b), the maintained [Nygard template record](https://github.com/joelparkerhenderson/architecture-decision-record/tree/b7654d64ecbcfaf8bce04678b568ea3483c91a94/locales/en/templates/decision-record-template-by-michael-nygard), and [`mattpocock/skills` at `9603c1cc`](https://github.com/mattpocock/skills/tree/9603c1cc8118d08bc1b3bf34cf714f62178dea3b), reviewed July 18, 2026.
## Structural comparison
| Form | Typical sections | Use when |
| - | - | - |
| MADR full | Context, drivers, options, outcome, consequences, confirmation, option pros and cons | The choice needs explicit option analysis and later confirmation |
| MADR minimal | Context, decision, consequences | The team wants MADR conventions with less ceremony |
| Nygard | Title, status, context, decision, consequences | A concise, stable architecture log is enough |
| Minimal decision memory | Title plus one to three sentences for context, choice, and reason | The durable value is one surprising, hard-to-reverse tradeoff |
MADR publishes [full, minimal, bare, and bare-minimal variants](https://adr.github.io/madr/). Its repository also [uses MADR for its own decisions](https://github.com/adr/madr/blob/835fc94baa37887774b1cddddb2ae874881e703b/docs/decisions/0000-use-markdown-architectural-decision-records.md). The Nygard form is widely represented as status, context, decision, and consequences.
## One decision at three levels of detail
**Decision:** use a database lease for queued jobs.
* A full MADR record compares database leases, process locks, and queue-owned visibility timeouts against crash recovery and multi-worker coordination.
* A Nygard record explains the duplicate-claim problem, chooses the conditional database lease, and records recovery and monitoring consequences.
* A minimal record says that process locks do not coordinate or survive restart, so the system uses a time-bounded conditional database lease.
None is automatically better. Use the smallest form that preserves the decision future maintainers would otherwise repeat.
## Reuse notes
MADR is available under MIT or CC0. The maintained ADR example collection contains mixed source licenses, so this site does not import it as one template pack. Our [ADR template](/templates/architecture-decision-record) is original and cites the source traditions that informed it.
See [ADR vs RFC vs technical specification](/compare/adr-vs-rfc-vs-technical-specification) before deciding whether an ADR is the correct document at all.
*Reviewed July 18, 2026. Researched and maintained by the Plannotator documentation team.*
# What Is a PRFAQ? Amazon's Working Backwards Method Explained
Source: https://docs.plannotator.ai/frameworks/amazon-working-backwards-prfaq
A PRFAQ combines a future press release with customer and internal FAQs. Learn how Amazon's Working Backwards method uses it before product requirements and technical design.
PRFAQ means **Press Release and Frequently Asked Questions**. In Amazon's Working Backwards method, a team writes a future customer-facing press release and an FAQ before product development to test who the customer is, what problem matters, what outcome the product should deliver, and which assumptions or risks still need evidence.
AWS says Amazon product teams write the press release before requesting a budget, assembling a team, or writing code. The FAQ then covers customer questions and internal questions that affect the decision. This page explains those public facts without implying Amazon endorsement or reproducing an internal template.
## The three parts of a PRFAQ
| Part | Job | Questions it should answer |
| - | - | - |
| Future press release | Describe the proposed launch from the customer's point of view | Who is the customer? What problem changes? Why is the outcome worth choosing? How does the customer start? |
| Customer FAQ | Test the future customer experience | How does it work? What does it cost? What happens when it fails? How are privacy, security, support, and migration handled? |
| Internal FAQ | Test whether the organization should and can pursue the idea | What evidence supports it? What are the risks, costs, dependencies, alternatives, feasibility limits, and success conditions? |
AWS's [product-management account of Working Backwards](https://aws.amazon.com/executive-insights/content/product-management-at-amazon/) describes a one-page press release followed by an FAQ whose first half covers customer questions and whose second half covers internal questions. The exact section names and formatting used by other teams vary.
## What the future press release does
The future press release states the desired launch as though the product already exists. It forces the author to name a customer, a problem, a useful outcome, and a believable path to value in language a customer can understand.
It is not a real announcement and should not become unsupported sales copy. Every claim about the problem, demand, behavior change, price, or reliability creates a question that the FAQs must answer with evidence or mark as unresolved.
AWS says the press release comes before budget, staffing, or code and must fit on one page. Its purpose is to simplify and focus the idea for the end customer. An [AWS account of the Cloud Development Kit](https://aws.amazon.com/blogs/opensource/working-backwards-the-story-behind-the-aws-cloud-development-kit/) also says Amazon uses the PRFAQ mechanism to work backwards from customer needs when creating products and services.
## Customer FAQs versus internal FAQs
Customer FAQs stay in the future customer's language. They should cover the questions that would affect adoption or trust, such as use, value, price, privacy, security, reliability, compatibility, support, and recovery.
Internal FAQs test the idea against current reality. They should cover evidence, alternatives, costs, staffing, technical uncertainty, operational load, legal or security constraints, measurement, and conditions that would stop or narrow the work.
Do not move every difficult customer question into the internal section. A customer still needs an answer about data handling or failure behavior. The internal FAQ can then explain what the team must prove or build to make that customer answer true.
## The writing and review cycle
1. Gather customer evidence before writing the future outcome. Use interviews, observed behavior, support records, usage data, experiments, and current alternatives.
2. Draft the press release in customer language. Keep the idea narrow enough that a reader can identify the customer, problem, outcome, and first use.
3. Write the customer FAQs. Treat each unclear or unsupported answer as a research question, not a reason to add vague confidence.
4. Write the internal FAQs. State the riskiest assumptions, feasibility gaps, costs, dependencies, alternatives, and stop conditions.
5. Review the document with the functions that own those claims. Ask for comments on exact text and record unanswered questions.
6. Revise the document and the supporting research. Proceed, narrow, revise, or park the idea when the evidence supports that decision.
Official AWS guidance says teams share these documents internally for perspective and use continuing customer feedback during development. The more detailed cycle of multiple drafts, cross-functional reviews, silent reading, discussion, and another revision is described by the [Working Backwards guide](https://workingbackwards.com/resources/working-backwards-pr-faq/) written by former Amazon practitioners. Those meeting details are a practitioner convention, not a requirement for every team that uses a PRFAQ.
## Evidence a reviewer should demand
| Claim in the PRFAQ | Useful evidence | Review challenge |
| - | - | - |
| The customer has this problem | Interviews, observed work, usage data, support cases, incident records | Is the sample relevant, and does the evidence show the stated problem rather than a nearby one? |
| The problem is worth solving now | Frequency, severity, cost, delay, abandonment, willingness to change | What happens if the team does nothing for six months? |
| The proposed outcome is better | Prototype use, behavior tests, comparison with current alternatives | Did customers change behavior, or did they only say the idea sounded useful? |
| The customer journey is believable | Task tests, mockups, workflow observation, migration or setup proof | Where does the customer first get value, and where are they likely to stop? |
| The product can be built and operated | Technical spike, dependency proof, security review, cost model, support plan | Which unknown could invalidate the promised experience? |
| The business can sustain it | Price research, unit-cost model, adoption assumptions, staffing needs | Which variable has the greatest effect on viability? |
| The result can be measured | Baseline, metric definition, target, observation window, counter-metric | Could the metric rise while the customer outcome gets worse? |
A reviewer should be able to trace every material number and future claim to evidence, an owner, or an explicit test. An unanswered question can remain in a draft. A confident answer with no support is harder to review.
## When to move beyond the PRFAQ
Proceed when the customer and problem are clear, the future outcome is useful, the major assumptions have evidence or bounded tests, and no known feasibility, security, legal, or business issue makes the promise false. The PRFAQ can still contain open questions if their owners and decision paths are explicit.
| Next document | Create it when | What it adds |
| - | - | - |
| Product requirements document | The idea has earned continued work and the product boundary needs agreement | Users, journeys, goals, non-goals, observable requirements, acceptance criteria, and success measures |
| Technical specification | The team must define behavior or design that should remain true during and after implementation | Architecture, interfaces, data, failure behavior, security, compatibility, rollout, and verification |
| Implementation plan | The product boundary and enough design are accepted to sequence the current change | Affected systems, ordered work, dependencies, risks, and validation |
AWS Prescriptive Guidance says teams can plan epics or user stories from the PRFAQ and target customer journey. Plannotator's document boundaries are practical editorial guidance rather than universal Amazon terminology. Use the [complete PRFAQ template and fictional example](/templates/prfaq), then move accepted product intent into the [PRD template](/templates/product-requirements-document). The [PRD, technical specification, and implementation plan comparison](/compare/prd-vs-technical-specification-vs-implementation-plan) explains the later documents.
## Where PRFAQ practices vary
The public core is stable: start from the customer, write a future press release, answer customer and internal questions, review the idea, and do this before product development. Other details vary by team and source.
| Practice | How to treat it |
| - | - |
| `PRFAQ`, `PR/FAQ`, or `PR FAQ` spelling | Different spellings of the same document name |
| Exact page count | A useful constraint in some sources, not a universal public Amazon rule |
| Required headings or paragraph order | Template choices that should serve the decision rather than be copied as doctrine |
| Fictional customer or executive quotes | A common way to make the proposed benefit concrete, not evidence that a real customer agrees |
| Silent reading time and meeting format | Review conventions described by practitioners, adaptable to team size and context |
| Appendix contents | Supporting evidence when readers need it, not a place to hide the technical specification or implementation plan |
| Final decision label | Proceed, revise, narrow, or park are clear choices; each organization can name its decision process differently |
Marcelo Calbucci's [PRFAQ 101](https://www.theprfaq.com/prfaq-101) is another practitioner framework. It explicitly separates the press release, customer FAQs, internal FAQs, and an optional appendix, and says a PRFAQ precedes rather than replaces a PRD. Its page limits and formatting rules belong to that framework, not to an official Amazon standard.
Start with copyable Markdown, one complete fictional software example, and reviewer notes for the claims that need evidence.
## Sources and independence
Primary Amazon and AWS sources used here are [The Secrets to AWS Product Management](https://aws.amazon.com/executive-insights/content/product-management-at-amazon/), [AWS Well-Architected guidance on customer needs](https://docs.aws.amazon.com/wellarchitected/latest/devops-guidance/oa.ti.6-prioritize-customer-needs-to-deliver-optimal-business-outcomes.html), the [AWS product strategy guide](https://docs.aws.amazon.com/pdfs/prescriptive-guidance/latest/strategy-product-development/strategy-product-development.pdf), and the [AWS CDK Working Backwards account](https://aws.amazon.com/blogs/opensource/working-backwards-the-story-behind-the-aws-cloud-development-kit/). Practitioner conventions are labeled and linked separately.
Amazon, AWS, Working Backwards, and the PRFAQ Framework are named for identification. Plannotator is not affiliated with or endorsed by Amazon, AWS, Working Backwards, or PRFAQ Lab.
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team.*
# BMad Method Framework Profile
Source: https://docs.plannotator.ai/frameworks/bmad-method
A source-backed profile of the BMad Method: adaptive delivery tracks, product briefs, PRDs, architecture, epics, stories, and sprint state.
The BMad Method is a role-oriented AI development method that can span discovery, product definition, architecture, epics, stories, implementation, and verification. It offers Quick Flow, BMad Method, and Enterprise tracks so the planning inventory can change with project scope.
**Source stamp:** [`bmad-code-org/BMAD-METHOD` at `717479bc`](https://github.com/bmad-code-org/BMAD-METHOD/tree/717479bc3f50f38119fd958b9e577a8bde2e0184), reviewed July 18, 2026. Repository license: MIT. BMad has separate trademark terms; this page uses the name only for identification.
## Representative artifact tree
```text theme={null}
_bmad-output/
planning-artifacts/
product-brief.md
prd.md
architecture.md
epics.md
project-context.md
implementation-artifacts/
stories/
sprint-status.yaml
```
The official [getting-started tutorial](https://github.com/bmad-code-org/BMAD-METHOD/blob/717479bc3f50f38119fd958b9e577a8bde2e0184/docs/tutorials/getting-started.md) explains the tracks. The repository publishes source templates for the [product brief](https://github.com/bmad-code-org/BMAD-METHOD/blob/717479bc3f50f38119fd958b9e577a8bde2e0184/src/bmm-skills/1-analysis/bmad-product-brief/assets/brief-template.md), [PRD](https://github.com/bmad-code-org/BMAD-METHOD/blob/717479bc3f50f38119fd958b9e577a8bde2e0184/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-template.md), architecture, epics, stories, and sprint status.
## Workflow and conventions
The method uses specialized roles and guided workflows. Its current PRD structure includes stable journey and functional-requirement IDs, glossary terms, non-goals, MVP boundaries, success metrics, counter-metrics, open questions, and assumptions. The architecture document defines the system structure and technical boundaries. Epics and stories divide that design into delivery work. `project-context.md` can carry stack versions and implementation rules.
The result is broader than a feature specification or coding plan. Product, architecture, and delivery artifacts are separate objects, and the selected track determines how much of the method applies.
## Inspect the same-case output
Inspect the [generated BMad express technical specification and memory log for reliable webhook delivery](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/bmad-method/raw). The express specification flow completed. The run did not attempt BMad's full PRD, architecture, epics, and stories path.
## Choose BMad when
* the work begins before implementation planning and needs product discovery or a PRD;
* role-oriented workflows help the team divide analysis, product, architecture, and delivery;
* epics and stories are the preferred execution model; and
* the team wants the planning depth to change with the selected track.
Choose a smaller framework when the real job is one feature directory, one repository plan, or one architectural decision. The Plannotator-authored [PRD template](/templates/product-requirements-document) supplies one reusable artifact without adopting the full method, and [PRD vs technical specification vs implementation plan](/compare/prd-vs-technical-specification-vs-implementation-plan) explains the downstream boundary.
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. BMad is named nominatively; Plannotator is not affiliated with or endorsed by BMad Code, LLC.*
# GitHub Spec Kit Framework Profile
Source: https://docs.plannotator.ai/frameworks/github-spec-kit
A source-backed profile of GitHub Spec Kit: constitution, feature specification, plan, research, data model, contracts, tasks, and implementation.
GitHub Spec Kit is an open toolkit for spec-driven development. Its core sequence is Specify, Plan, Tasks, and Implement, with a project constitution and optional clarification and analysis. Each feature keeps a directory of Markdown artifacts that feed the next phase.
**Source stamp:** [`github/spec-kit` at `57cc518d`](https://github.com/github/spec-kit/tree/57cc518d63d6f10da3dd93df1ebcadda87c59374), reviewed July 18, 2026. Repository license: MIT.
## Artifact tree
```text theme={null}
.specify/
memory/constitution.md
templates/
specs/feature-name/
spec.md
plan.md
research.md
data-model.md
quickstart.md
contracts/
tasks.md
```
The official templates cover the [constitution](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/constitution-template.md), [specification](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/spec-template.md), [plan](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/plan-template.md), and [tasks](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/tasks-template.md).
## Workflow and conventions
The constitution records principles, constraints, quality gates, and governance. The feature specification uses independently testable user stories, scenarios, edge cases, requirement IDs, assumptions, and measurable outcomes. The plan captures technical context and checks the design against the constitution before producing supporting research, data, contract, and quickstart artifacts.
Tasks use stable IDs such as `T001`, optional parallel markers, user-story labels, and exact paths. This makes dependencies and coverage visible without requiring one continuous prose plan.
## Review and persistence
Specification quality can be checked before implementation planning, and the plan can be analyzed against requirements and the constitution. Spec Kit's [persistence guidance](https://github.github.com/spec-kit/concepts/spec-persistence.html) discusses living specs and flow-forward or flow-back updates instead of prescribing one universal maintenance rule.
## Inspect the same-case output
Inspect the [complete generated Spec Kit artifact tree for reliable webhook delivery](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/github-spec-kit/raw). It contains the constitution, specification, checklist, plan, research, data model, contracts, quickstart, and 69-task list produced by the planning flow.
## Choose Spec Kit when
* a feature directory should be portable across supported coding agents;
* requirements, design, tasks, and supporting technical artifacts need distinct roles;
* a project constitution should constrain feature plans; and
* stable requirement and task IDs help review and traceability.
Spec Kit calls its product-intent artifact a feature specification rather than a PRD. See [PRD vs technical specification vs implementation plan](/compare/prd-vs-technical-specification-vs-implementation-plan) for the role-based distinction, [GitHub Spec Kit vs Kiro Specs](/compare/github-spec-kit-vs-kiro-specs) for the framework comparison, and the Plannotator-authored [technical specification template](/templates/technical-specification).
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. GitHub and Spec Kit are named for identification; Plannotator is not affiliated with or endorsed by GitHub.*
# GSD Core Planning Framework Profile
Source: https://docs.plannotator.ai/frameworks/gsd
A source-backed profile of GSD Core: durable project state, milestones, phases, plans, execution summaries, verification, UAT, and handoff files.
GSD Core organizes long-running agent work around a durable `.planning/` directory. The project, roadmap, requirements, current state, phase context, research, plans, summaries, verification, UAT, and handoff files carry work across sessions.
**Source stamp:** [`open-gsd/gsd-core` at `50efae13`](https://github.com/open-gsd/gsd-core/tree/50efae13ce74f02a5b0253ce0c205c5eac2a99e3), reviewed July 18, 2026. Repository license: MIT.
## Artifact tree
```text theme={null}
.planning/
PROJECT.md
ROADMAP.md
REQUIREMENTS.md
STATE.md
config.json
codebase/
phases/NN-slug/
NN-CONTEXT.md
NN-DISCUSSION-LOG.md
NN-RESEARCH.md
NN-VALIDATION.md
NN-PP-PLAN.md
NN-PP-SUMMARY.md
NN-VERIFICATION.md
NN-UAT.md
.continue-here.md
```
The official [planning-artifacts reference](https://github.com/open-gsd/gsd-core/blob/50efae13ce74f02a5b0253ce0c205c5eac2a99e3/docs/reference/planning-artifacts.md) defines these roles. The repository also publishes its [templates](https://github.com/open-gsd/gsd-core/tree/50efae13ce74f02a5b0253ce0c205c5eac2a99e3/gsd-core/templates) and dogfoods ADRs, including a [plan-drift guard decision](https://github.com/open-gsd/gsd-core/blob/50efae13ce74f02a5b0253ce0c205c5eac2a99e3/docs/adr/22-plan-drift-guard.md).
## Workflow and task grain
The recurring lifecycle is discuss, plan, execute, verify, and ship. A roadmap divides a milestone into phases. Phase context and research inform one or more plans. Execution summaries and verification records describe what happened. `STATE.md` and continuation files show the next session where work stopped and what remains.
GSD's unit is broader than one implementation plan. It keeps project and milestone memory alongside the plan, making file maintenance part of the method.
## Review and handoff conventions
Discussion captures human decisions before planning. Verification and UAT have their own artifacts. A phase can leave an explicit continuation record rather than relying on chat history. These files preserve continuity, but stale files can mislead later sessions if the team does not maintain them.
## Inspect the same-case output
Inspect the [generated GSD `.planning/` tree for reliable webhook delivery](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/gsd/raw/.planning). It includes the project, requirements, roadmap, state, configuration, and phase context. The phase-plan run stalled and was interrupted, so no completed phase plan is included.
## Choose GSD Core when
* work spans many sessions or phases;
* the repository should carry explicit project state;
* research, execution summaries, verification, and UAT need separate records; and
* the team will maintain the planning tree as work changes.
For a smaller single-feature method, compare [Superpowers vs GSD](/compare/superpowers-vs-gsd) or inspect [GitHub Spec Kit](/frameworks/github-spec-kit). For long-running work more generally, read [What are long-horizon tasks for AI agents?](/learn/ai-development/what-are-long-horizon-tasks-for-ai-agents).
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. GSD Core is named for identification; Plannotator is not affiliated with or endorsed by its maintainers.*
# AI Coding Planning Frameworks
Source: https://docs.plannotator.ai/frameworks/index
Choose among source-backed AI coding and planning frameworks, including Amazon Working Backwards, by artifact model, workflow, task grain, review points, and tool coupling.
Choose a framework by the artifact and workflow you need, not by a universal score. Some methods organize one implementation plan. Others maintain project state, feature specifications, issue graphs, or a full product-delivery sequence.
The public [comparison repository](https://github.com/plannotator/spec-planning-frameworks#readme) applies each framework to the same reliable-webhook-delivery brief. It preserves generated files, tool versions, interrupted runs, and known limits for five runnable frameworks. Kiro uses a manual, source-faithful example because its authenticated workflow was unavailable.
| Framework | Primary unit | Main artifacts | Useful when |
| - | - | - | - |
| [Superpowers](/frameworks/superpowers) | Design and implementation plan | Repository specs and code-level plans | You want a defined path from design review to detailed execution |
| [GSD Core](/frameworks/gsd) | Project, milestone, phase, and plan | A durable `.planning/` tree | Work spans sessions and needs explicit state, phases, and verification |
| [GitHub Spec Kit](/frameworks/github-spec-kit) | Feature | Constitution, spec, plan, tasks, supporting artifacts | You want an open feature directory with structured requirements and tasks |
| [Kiro Specs](/frameworks/kiro-specs) | Feature or bug | Requirements or bug analysis, design, tasks | You want an IDE-integrated three-file specification workflow |
| [Matt Pocock's skills](/frameworks/matt-pocock-skills) | Issue, question, spec, or ticket | Issue-tracker artifacts and focused skills | You want composable planning skills inside an existing engineering process |
| [BMad Method](/frameworks/bmad-method) | Product initiative through story | Brief, PRD, architecture, epics, stories | You need a broader role-oriented product and delivery method |
| [Amazon Working Backwards PRFAQ](/frameworks/amazon-working-backwards-prfaq) | Proposed product or feature | Future press release, customer FAQ, internal FAQ | You want to test customer value before writing detailed requirements |
| [ADR formats](/frameworks/adr-formats) | Architectural decision | One Markdown decision record | You need to preserve a significant choice and its consequences |
## How to choose
Ask five questions:
1. Is the main object a feature, project phase, issue graph, delivery program, or decision?
2. Should artifacts live in the repository, an issue tracker, or an IDE-managed directory?
3. Does the team want a prescribed sequence or composable procedures?
4. Should tasks name exact code edits or remain outcome-focused?
5. What review and verification record must survive into the next session?
The profiles describe observed source behavior at a pinned commit or capture date. They do not claim that one framework produces better code. For direct decisions, see [Superpowers vs GSD](/compare/superpowers-vs-gsd) and [GitHub Spec Kit vs Kiro Specs](/compare/github-spec-kit-vs-kiro-specs).
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team.*
# Kiro Specs Framework Profile
Source: https://docs.plannotator.ai/frameworks/kiro-specs
A source-backed profile of Kiro Specs: requirements-first, design-first, and quick-plan workflows with requirements, design, and task artifacts.
Kiro Specs is an IDE and web workflow that produces three primary artifacts: requirements or bug analysis, technical design, and tasks. Teams can begin with requirements, begin with the design, or use a quick plan that creates the same artifact set without gates between phases.
**Source stamp:** [official Kiro Specs documentation](https://kiro.dev/docs/specs/), captured July 18, 2026. Kiro's published content terms do not provide an open template license, so this page paraphrases and links rather than copying templates.
## Artifact tree
```text theme={null}
.kiro/specs/feature-name/
requirements.md # or bugfix.md
design.md
tasks.md
```
The official [requirements-first guide](https://kiro.dev/docs/specs/feature-specs/requirements-first/) describes user stories, acceptance criteria, EARS-style system behavior, functional requirements, and edge cases. Design covers architecture, components, sequences, data models, interfaces, error handling, and testing. The task file provides discrete implementation work.
## Workflow variants
| Mode | Starting point | Review shape |
| - | - | - |
| Requirements-first | User behavior and acceptance criteria | Requirements lead into design and tasks |
| Design-first | Technical direction | Design leads, then requirements and tasks are reconciled |
| Quick plan | Clarifying questions and one pass | Produces the three artifacts without phase gates |
Kiro's [steering](https://kiro.dev/docs/steering/) supplies persistent project guidance outside the feature directory. In chat, the spec artifacts can be brought back into context for implementation or validation.
## Review and handoff conventions
The artifact set gives reviewers separate places to challenge expected behavior, technical design, and execution tasks. On the web, users can refine artifacts before running all or selected tasks and can download the Markdown. In the IDE, the files remain in the repository's `.kiro/specs/` directory.
## Inspect a source-faithful example
Inspect the [manual, source-faithful Kiro three-file example for reliable webhook delivery](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/kiro-specs/manual). It was not generated by Kiro. The comparison could not run the vendor workflow without Kiro authentication, so the original example follows the public artifact model and labels that limit in every file.
## Choose Kiro Specs when
* the team already works in Kiro and wants integrated artifact editing and task execution;
* three consistent files are enough for the feature;
* requirements-first and design-first entry points are both useful; or
* a quick-plan mode should remove intermediate gates.
Use [GitHub Spec Kit vs Kiro Specs](/compare/github-spec-kit-vs-kiro-specs) for the direct choice. Plannotator does not redistribute Kiro templates; use the official product to create them.
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. Kiro is named for identification; Plannotator is not affiliated with or endorsed by AWS.*
# Matt Pocock's AI Engineering Skills Profile
Source: https://docs.plannotator.ai/frameworks/matt-pocock-skills
A source-backed profile of Matt Pocock's AI engineering skills for specs, tickets, wayfinding, domain modeling, ADRs, and issue-centered planning.
Matt Pocock's public skills repository provides focused procedures that can fit into an existing engineering process. Rather than requiring one universal lifecycle, different skills produce specifications, issue tickets, uncertainty maps, domain language, and small decision records.
**Source stamp:** [`mattpocock/skills` at `9603c1cc`](https://github.com/mattpocock/skills/tree/9603c1cc8118d08bc1b3bf34cf714f62178dea3b), reviewed July 18, 2026. Repository license: MIT.
## Representative artifacts
| Skill | Main output |
| - | - |
| `to-spec` | Problem statement, solution, user stories, implementation and testing decisions, out of scope, further notes |
| `to-tickets` | Tracer-bullet tickets with outcome, acceptance criteria, and blockers |
| `wayfinder` | One map issue plus question issues that expose the known frontier and remaining fog |
| Domain modeling | Context glossary, avoided synonyms, context map, and small ADRs when a durable tradeoff exists |
Issue-tracker output is the default model, with a local `.scratch//issues/` fallback for ticket files. `to-tickets` favors vertical slices and uses expand, migrate, and contract for broad refactors that do not fit that grain.
## Workflow and task grain
`to-spec` focuses on decisions and testing seams. It generally avoids exact file paths and large code snippets unless a prototype excerpt carries an important decision. `to-tickets` turns the accepted specification into independently useful work with explicit dependencies. `wayfinder` handles earlier uncertainty by separating decisions, questions, agent research, human input, and work that is not precise enough to schedule.
The domain-modeling skill recommends a very small ADR only for a surprising, hard-to-reverse tradeoff. A separate `CONTEXT.md` can preserve preferred terms and terms to avoid.
## Inspect the same-case output
Inspect the [generated specification and 11 local tickets for reliable webhook delivery](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/matt-pocock-skills/raw). The run completed the specification and dependency-aware local-ticket flow without creating remote issues.
## Choose these skills when
* the team wants composable procedures rather than a required end-to-end method;
* an issue tracker is the shared planning memory;
* uncertain work should be mapped before it becomes implementation tickets; and
* outcome-focused tickets are more useful than code-level instructions.
The official repository describes these as skills for engineering work. A real `CONTEXT.md` example exists in the linked Course Video Manager project, but that repository has no clear reuse license; this site links and paraphrases it rather than copying it.
See the [AI coding plan template](/templates/ai-coding-plan), [ADR formats](/frameworks/adr-formats), and [coding-agent handoff template](/templates/agent-handoff).
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. Matt Pocock's name is used for identification; Plannotator is not affiliated with or endorsed by him.*
# Superpowers Planning Framework Profile
Source: https://docs.plannotator.ai/frameworks/superpowers
A source-backed profile of Superpowers: brainstorming, reviewed design, repository plans, code-level task grain, TDD, execution, and verification.
Superpowers is a skills-based software-development method that moves from brainstorming to a reviewed design, a detailed repository plan, implementation, review, and branch completion. Its distinctive planning choice is code-level precision: tasks name files, interfaces, verification commands, expected output, and commits.
**Source stamp:** [`obra/superpowers` at `d884ae04`](https://github.com/obra/superpowers/tree/d884ae04edebef577e82ff7c4e143debd0bbec99), reviewed July 18, 2026. Repository license: MIT.
## Artifact tree
```text theme={null}
docs/superpowers/
specs/
YYYY-MM-DD-topic-design.md
plans/
YYYY-MM-DD-feature.md
```
The [brainstorming skill](https://github.com/obra/superpowers/blob/d884ae04edebef577e82ff7c4e143debd0bbec99/skills/brainstorming/SKILL.md) produces the design. The [writing-plans skill](https://github.com/obra/superpowers/blob/d884ae04edebef577e82ff7c4e143debd0bbec99/skills/writing-plans/SKILL.md) produces the implementation plan. The project publishes [real specs](https://github.com/obra/superpowers/tree/d884ae04edebef577e82ff7c4e143debd0bbec99/docs/superpowers/specs) and [real plans](https://github.com/obra/superpowers/tree/d884ae04edebef577e82ff7c4e143debd0bbec99/docs/superpowers/plans) in the same format.
## Workflow and task grain
1. Explore the problem through questions and alternative approaches.
2. Present the design in reviewable sections and obtain agreement.
3. Write an implementation plan that another engineer or agent can execute.
4. Execute with the method's testing and review skills.
5. Verify the result before completion and finish the branch deliberately.
A plan task includes exact files, consumed and produced interfaces, a failing test or verification setup, implementation instructions, a command with expected output, and a commit. The source targets short steps and rejects vague placeholders such as “add validation.”
## Review and handoff conventions
The main human checkpoint is design acceptance before implementation planning. The written plan is intended to survive into a separate execution session. Verification and review are separate procedures, not a sentence at the end of the plan.
## Inspect the same-case output
Inspect the [generated Superpowers design for reliable webhook delivery](https://github.com/plannotator/spec-planning-frameworks/tree/main/examples/superpowers/raw). The design completed, but two implementation-plan attempts stalled. The repository does not present the missing plan as complete.
## Choose Superpowers when
* the team wants one repeatable path from design through execution;
* an implementation-ready repository plan is valuable;
* exact file and verification instructions reduce ambiguity; and
* the team accepts a method that shapes more than the planning document.
Choose a different model when planning should stay in an issue tracker, when the problem is still too uncertain for code-level tasks, or when a broader product-delivery program is the real need.
See [Superpowers vs GSD](/compare/superpowers-vs-gsd) and the Plannotator-authored [AI coding plan template](/templates/ai-coding-plan).
*Reviewed July 19, 2026. Researched and maintained by the Plannotator documentation team. Superpowers is named for identification; Plannotator is not affiliated with or endorsed by its maintainers.*
# Plannotator Art Gallery
Source: https://docs.plannotator.ai/gallery
Browse Plannotator illustrations for AI coding plans, agent instructions, review artifacts, revision diffs, and living documentation workflows.
## Featured
## Planning and documents
## Agent instructions and context
## Code review
*Reviewed July 29, 2026. Maintained by the Plannotator documentation team.*
# Plannotator Documentation and Learning
Source: https://docs.plannotator.ai/index
Choose open-source Plannotator documentation, Workspaces, automation guides, planning templates, framework profiles, comparisons, or practical AI-development guides.
Use this site to learn the local open-source tool, understand Plannotator products, or improve the documents and workflows that guide agent-assisted development.
Install Plannotator, choose your agent, annotate plans and documents, review code, configure feedback, and troubleshoot local sessions.
Share and review product requirements documents (PRDs), technical specs, coding plans, ADRs, and RFCs with your team and coding agents.
Connect Plannotator to your coding agent, customize its feedback, and add annotations from scripts and other tools.
Copy practical templates, inspect source-backed planning frameworks, and compare formats and methods.
Write better plans and agent instructions, collaborate on documents, review code, and work with coding agents.
Visit the main site for the short product overview and commercial information.
## Find the right starting point
| If you want to | Start here |
| - | - |
| Run Plannotator on your computer | [Install the open-source tool](/open-source/start/installation) |
| Send plan or document feedback to a coding agent | [Annotate your first plan](/open-source/start/quickstart) |
| Customize or automate Plannotator | [Use agents and automation](/open-source/reference/) |
| Share a technical decision with people and agents | [Open Workspaces Help](https://help.plannotator.ai/workspaces/review-plans-and-technical-decisions) |
| Improve a reusable planning document | [Choose a template](/templates/) |
| Choose a structured agent-planning method | [Compare planning frameworks](/frameworks/) |
| Understand a planning or review practice | [Browse Learn](/learn/) |
## Open source on GitHub
View the source, report an issue, or star the repository.
*Reviewed July 18, 2026. Maintained by the Plannotator documentation team.*
# Claude Artifacts: Examples and How to Use Them
Source: https://docs.plannotator.ai/learn/ai-development/claude-artifacts
Learn what Claude Artifacts are, how to create and share them, which forms they support, and how to review exported HTML or Markdown.
**Claude Artifacts** are substantial, standalone outputs that Claude opens in a dedicated pane beside a conversation. An artifact can be a Markdown document, code snippet, single-page HTML site, SVG image, diagram, flowchart, or interactive React component. You can revise an artifact and switch between versions. You can also inspect or download its source, then publish or share the version you choose. Anthropic documents the current behavior in [What are artifacts and how do I use them?](https://support.claude.com/en/articles/9487310-what-are-artifacts-and-how-do-i-use-them).
Claude uses the Artifacts name in Claude, Claude Desktop, and Claude Code. This guide starts with the artifact pane in Claude and Claude Desktop. Claude Code artifacts are live pages published from a coding session, with different file, version, and sharing rules described below.
## How to use Claude Artifacts
1. **Enable the required capability.** Claude currently requires **Code execution and file creation** under **Settings > Capabilities**. Team and Enterprise owners manage the capability for their organization.
2. **Ask for a standalone result.** Describe the object you need, such as a comparison dashboard, implementation plan, diagram, calculator, prototype, or code walkthrough. Claude may also create an artifact without an explicit request when the output is substantial and self-contained.
3. **Revise the artifact in conversation.** Ask Claude to change it. Markdown artifacts also support selecting text and choosing **Edit with Claude**. Use the version selector to return to an earlier result.
4. **Inspect or export it.** The artifact controls let you view the underlying code, copy the content, or download the file for use outside the conversation.
5. **Publish or share the intended version.** Access rules depend on your plan and on whether the artifact came from Claude or Claude Code. Check the version and audience before copying the link.
Anthropic says Claude generally creates an artifact when the content is significant, self-contained, likely to be edited or reused, and able to stand without the rest of the conversation. Its help article describes “typically over 15 lines” as a signal, not a minimum that every useful artifact must meet.
## Claude Artifacts examples and supported forms
The supported forms describe what Claude can place in the artifact pane. The examples below are representative uses, not a fixed gallery or a claim that one format is best for every task.
| Supported form | Example | What to verify |
| - | - | - |
| Markdown or plain-text document | Research brief, plan, checklist, report, or operating guide | Sources, assumptions, missing decisions, and whether the document still matches current work |
| Code snippet | Data transform, configuration example, or small function | Whether it runs in the real project and satisfies its tests, types, and security rules |
| Single-page HTML website | Interactive explainer, dashboard, calculator, timeline, or comparison | Source data, keyboard use, external requests, and whether presentation hides missing evidence |
| SVG image | System map, process drawing, or scalable diagram | Labels, relationships, reading order, and accessibility outside the visual rendering |
| Diagram or flowchart | Architecture flow, decision tree, or sequence | Whether every connection exists in the cited source material |
| Interactive React component | Prototype, game, form, teaching tool, or configuration explorer | Real product behavior, state handling, accessibility, and deployment assumptions |
AI features, MCP connections, and persistent storage extend what an artifact can do. They are capabilities, not additional file formats. Anthropic's current help article says AI-powered artifacts run on its infrastructure, MCP access requires each viewer to authenticate and approve the connection, and persistent storage can be personal or shared.
For the broader category beyond Anthropic's product, see [What is an AI artifact?](/learn/ai-development/what-is-an-ai-artifact).
## How HTML and interactive Claude Artifacts work
HTML earns its place when the reader needs layout, comparison, visualization, or interaction. Markdown remains the clearer default for a linear document that people need to edit, diff, and preserve. [When should AI coding agents produce HTML instead of Markdown?](/learn/code-context/ai-agent-html-vs-markdown) gives the full format decision, including accessibility, Git, and sandboxing tradeoffs.
Claude and Claude Code use different artifact models:
| Behavior | Claude and Claude Desktop | Claude Code |
| - | - | - |
| Main surface | Dedicated artifact pane beside chat | Live page published from a coding session |
| Common source forms | Markdown, text, code, single-page HTML, SVG, diagrams, and React | A project file ending in `.html`, `.htm`, or `.md` |
| Update model | Ask Claude to revise, then use the version selector | Claude edits the project file and republishes to the same URL |
| Runtime | May use Claude-powered behavior, approved MCP connections, and published-artifact storage | One self-contained page with no backend; a strict Content Security Policy blocks ordinary external requests |
| Outside data | Each viewer approves and authenticates their MCP connections | Declared MCP connectors are the only live-data exception to the external-request block |
The [Claude Code artifacts reference](https://code.claude.com/docs/en/artifacts) documents additional limits: one page, no backend, no relative multi-page site, a rendered size of 16 MiB or less, and no external scripts, stylesheets, fonts, images, `fetch`, XHR, or WebSocket requests. Claude Code can inline assets and can call declared MCP connectors through the viewing person's account.
A Claude Code artifact is therefore a review or communication page, not a deployed application. If the work needs its own database, authentication, server routes, or durable application behavior, it needs ordinary application infrastructure.
## How versions work
In Claude and Claude Desktop, artifact updates appear as versions in the version selector. Editing an earlier chat message creates a different conversation branch with its own artifacts. It does not rewrite the existing conversation's artifact history.
Before publishing or sharing, select the version the recipient should receive. The [publishing and sharing guide](https://support.claude.com/en/articles/9547008-publish-and-share-artifacts) explicitly includes this check in both workflows.
Claude Code keeps one artifact URL across updates. Each publish creates a new version, and the Share control can expose one selected version or follow the latest version. A new Claude Code session needs the artifact URL to update the existing page; without it, the session creates a new artifact.
Version history records artifact changes. It does not prove that a walkthrough still matches the current code revision, that a dashboard used current data, or that a prototype reflects the shipped application. Record the source revision, dataset, or decision date inside consequential artifacts.
## How publishing and sharing work
Claude uses **publish** for public access and **share** for restricted access. The exact choice depends on the product surface and plan.
| Surface and plan | Current access behavior |
| - | - |
| Claude Free, Pro, or Max | Publishing creates a public link. Anyone with the link can view and use basic interactions without an account. Customizing the artifact or using AI-powered features requires signing in. |
| Claude Team or Enterprise | Sharing is limited to authenticated members of the organization. A viewer also needs access to the originating project when the artifact came from a project. |
| Claude Code Pro or Max | A new artifact is private to its author. The author can publish a public link that does not require a Claude account. |
| Claude Code Team or Enterprise | Organization sharing is available. Public sharing is available only when an Owner enables it. An artifact that calls connectors cannot use a public link. |
Published Claude artifacts can also be embedded on allowed domains. The publisher chooses which domains may embed the artifact.
Check these two sharing effects before you publish:
* Sharing a Claude artifact inside a Team or Enterprise organization also gives viewers access to attachments and files from the conversation that created it.
* Unpublishing a consumer artifact revokes the link, prevents that same artifact from being published again, and permanently deletes its associated personal and shared storage data when persistent storage was used.
Product behavior changes. Recheck Anthropic's [publish and share artifacts](https://support.claude.com/en/articles/9547008-publish-and-share-artifacts) page before documenting a sensitive distribution workflow.
## Safety and review limits
A working artifact still needs review.
* **Public means reachable by anyone with the link.** Remove secrets, private source material, customer data, and hidden attachments before publishing.
* **Connected actions use the viewer's account.** MCP access requires approval, but an artifact may still read or change data through the tools the viewer authorizes. Inspect the declared connection and the action before approving it.
* **Shared storage is shared by design.** Anthropic displays a confirmation when an artifact first uses shared storage. Do not enter sensitive information until you understand whether the artifact uses personal or shared storage.
* **Polish is not evidence.** Verify diagrams, calculations, code references, and conclusions against the underlying source. A visually convincing artifact can be wrong or selective.
* **A version can become stale.** A published walkthrough may describe an earlier commit, investigation state, or decision even when the page still loads correctly.
* **Exported HTML is active content.** Once downloaded and opened elsewhere, it can contain scripts and network requests. Use an isolated viewer and inspect the source before granting it access to local files, credentials, or trusted application origins.
For file creation and code execution more broadly, Anthropic's [security guidance](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude) explains why network access changes the risk of data leaving its sandboxed environment.
## Export and annotate a Claude Artifact with Plannotator
Plannotator does not have a native Claude Artifacts integration. The workflow is a manual, file-based handoff: export the artifact, open the local file in Plannotator, and return structured feedback to the coding agent that started the review.
1. Select the intended version in the Claude artifact pane.
2. Download or copy the source.
3. Save the result as a local `.md`, `.html`, or `.htm` file. Keep multi-file exports and local support assets together in one folder.
4. Open the file or folder:
```bash theme={null}
plannotator annotate claude-artifact.md
plannotator annotate claude-artifact.html
plannotator annotate ./claude-artifact-folder/
```
5. For HTML, choose the review surface that matches the question:
```bash theme={null}
# Review layout and interaction in the sandboxed HTML viewer
plannotator annotate claude-artifact.html
# Remove scripts and annotate a Markdown conversion of the content
plannotator annotate claude-artifact.html --markdown
```
6. Add comments to selected text or elements.
7. Choose **Send Feedback**. When a supported coding agent opened the review, Plannotator returns the structured annotations to that agent. A direct CLI run prints the feedback to standard output.
Plannotator's HTML viewer uses a sandboxed iframe with an opaque origin, but it does not block outbound network requests made by the page. Use the Markdown conversion for untrusted HTML. You can also disconnect from the network when the review does not need live resources.
The complete workflow is in [Annotate any web page or HTML file](/learn/annotate-any-web-page-or-html-file) and [Annotate HTML in Plannotator](/open-source/workflows/html).
This workflow reviews a local export. Plannotator does not become a generic HTML host, publish the Claude artifact, or attach comments directly to the live Claude page.
Install the local feedback tool and connect it to Claude Code, Codex, or another supported coding agent.
Organize many local agent files in a separate experimental workspace when the problem is finding outputs, not returning one review to an agent.
## Frequently asked questions
### Are Claude Artifacts the same as AI artifacts?
Claude Artifacts is Anthropic's product name. An AI artifact is the broader category of reusable AI-produced documents, applications, images, reports, media, and other outputs.
### Can Claude Artifacts contain HTML and JavaScript?
Yes. Claude supports single-page HTML and interactive React artifacts. Claude Code artifacts can use inline HTML, CSS, and JavaScript, but its published viewer blocks ordinary external requests and provides no backend.
### Can someone view a published Claude Artifact without an account?
Yes for a public link on a supported consumer plan. Basic viewing and interaction do not require an account. Organization-shared artifacts require the viewer to sign in with the appropriate organization account.
### Can I download a Claude Artifact?
Yes. The artifact pane provides controls to view the source, copy the content, and download files. Check the selected version before exporting.
### Does Plannotator annotate the live Claude Artifact?
No. Export the HTML or document first, then open the local file in Plannotator. This preserves a clear boundary between the Claude artifact and the separate review session.
## Primary sources
* [Anthropic: What are artifacts and how do I use them?](https://support.claude.com/en/articles/9487310-what-are-artifacts-and-how-do-i-use-them)
* [Anthropic: Publish and share artifacts](https://support.claude.com/en/articles/9547008-publish-and-share-artifacts)
* [Anthropic: Share session output as artifacts in Claude Code](https://code.claude.com/docs/en/artifacts)
* [Anthropic: Create and edit files with Claude](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude)
*Last reviewed July 19, 2026. Maintained by the Plannotator project.*
# What an AI Agent Night Shift Looks Like for Teams
Source: https://docs.plannotator.ai/learn/ai-development/how-teams-run-ai-agent-night-shift
A practical team workflow for turning approved plans into code, product artifacts, tests, screenshots, and a morning review packet while AI agents work overnight.
An AI agent night shift is an asynchronous team workflow. During the day, the team agrees on a bounded goal, the context that should guide it, and the limits on what agents may do. Overnight, agents work across dependent stages. In the morning, the team reviews the returned code and artifacts before deciding what to revise, approve, or run next.
My first successful night shift ran for more than twelve hours. It was a `/goal` run using GPT-5.6 Sol with Ultra. It returned software, images, product work, and launch material. Teammates reviewed those outputs and used them to define a larger second goal.
## The Night Shift started as a developer workflow
[Jamon Holmgren's Night Shift](https://jamon.dev/night-shift) describes a focused solo pattern: write and approve detailed specifications during the day, let agents implement them while you are away, then review the commits and documentation in the morning.
A team night shift keeps that boundary and expands the work around it. Product, design, engineering, customer-facing teammates, security, operations, and go-to-market may all contribute to the goal or its constraints. The morning handoff must support their different review responsibilities.
The pattern does not depend on darkness. It can run during a weekend, a meeting block, or across time zones. What matters is the boundary between two periods of human attention.
## Why long-running AI agents make this practical
The first run combined three Codex concepts:
* **GPT-5.6 Sol** was the model used for complex, open-ended work.
* **Ultra** was the execution setting, including delegation of suitable work to subagents.
* **`/goal`** gave the run one persistent objective and completion target.
Anthropic describes a similar direction for [Claude Fable 5](https://www.anthropic.com/claude/fable), including long-running asynchronous work, planning across stages, selective delegation, and reviewable deliverables.
These capabilities are useful when the work forms a [long-horizon task](/learn/ai-development/what-are-long-horizon-tasks-for-ai-agents): one coherent objective whose later stages depend on decisions, experiments, or changes made earlier. Runtime alone does not make a task long-horizon. The agent must preserve state, verify progress, recover from failed approaches, and continue toward one definition of done.
## One person approved the first run. The team set the second goal.
The first night shift did not begin with a new company process. One person set a bounded goal and authorized the run. The resulting software, images, product work, and launch material gave teammates something concrete to inspect.
That changed the next conversation. The team could react to real output instead of debating an abstract possibility. Teammates contributed more context and ambition, then helped define the next night's goal.
Useful output can create momentum, but excitement is not a shipping verdict. The team still needs to decide whether the work is correct, coherent, and worth carrying forward.
## Prepare the run together
Requests enter a team with unresolved questions. A customer may describe a problem without knowing the right product behavior. A design direction may conflict with an operating constraint. An implementation may be possible in several ways, each with different costs and risks.
During the day, the team handles the decisions that require shared judgment:
* understand the customer or internal request;
* inspect the product, codebase, and current behavior;
* compare product, design, and technical approaches;
* choose the brand and customer story when they are part of the goal;
* define scope, constraints, and unacceptable outcomes;
* identify observable acceptance criteria;
* name the people who must review the result.
Agents can investigate the repository, answer questions, create prototypes, and compare options during this phase. The team resolves consequential disagreements before the overnight run begins.
Record the approved handoff in a form that people and agents can inspect:
| The team approves | The handoff records |
| - | - |
| Exact scope | The approved plan or context version |
| Constraints | Systems, files, data, and environments the agent may touch |
| Definition of done | Required behavior and validation |
| Evidence | Tests, screenshots, traces, videos, HTML, or documents to return |
| Stop conditions | Decisions and failures that must come back to a person |
| Review ownership | Named morning reviewers and the expected decision |
An individual developer may handle a small, reversible task faster in a normal agent conversation. Shared preparation earns its cost when the work crosses people, systems, or business decisions.
## Execute one goal across several functions
A cross-functional night shift should produce a connected body of work, not a folder of unrelated agent output.
Research informs product choices. Product choices shape the implementation. Working software produces screenshots, traces, documentation, launch material, and review evidence. Each stage uses what the earlier stage learned.
A practical run can:
1. confirm a clean, passing baseline;
2. load the approved context and relevant project documentation;
3. work in an isolated branch, worktree, or sandbox;
4. create a test and validation plan;
5. implement and inspect the work in bounded stages;
6. produce the required code, design, product, documentation, and launch artifacts;
7. run focused and end-to-end validation;
8. update the living documentation affected by the change;
9. stop and return a question when the answer would exceed the approved context.
Use parallel agents for genuinely separable work. Tightly coupled decisions are often easier to preserve when one agent advances the main sequence and delegates selected research, testing, or asset work.
This workflow can also support forward-deployed engineering: a product and engineering team working closely with a customer from discovery and technical scoping through a reviewable implementation, demonstration, and documentation set.
## What belongs in the morning review packet?
The morning review packet should let teammates understand and verify the work without reconstructing the private agent session.
Include:
* the authorizing goal and exact approved context version;
* the exact revision or set of revisions;
* a map of what changed and why;
* test, typecheck, lint, build, and CI results as applicable;
* screenshots of important interface states;
* product or demo video when motion matters;
* Playwright video or traces when browser behavior needs inspection;
* generated images, documents, HTML, or Markdown explainers with their intended use;
* failed approaches, deviations, unresolved questions, and risks;
* proposed updates to maintained product and technical documentation.
[Playwright traces](https://playwright.dev/docs/trace-viewer-intro) can preserve actions, page state, console output, network activity, errors, source, and DOM snapshots. They are useful because reviewers can inspect the behavior behind a polished demo. Tests, revisions, screenshots, and other [code review artifacts](/learn/code-review/what-are-code-review-artifacts) support the summary's claims.
The summary is an index. It does not certify the work.
## Review the result and set the next goal
Different teammates inspect different parts of the morning packet:
* engineering reviews the exact code and validation;
* product checks whether the agreed outcome was built;
* design reviews the behavior and experience, not only screenshots;
* customer-facing teammates confirm that the result answers the real request;
* owners resolve open questions and approve, revise, or stop the work.
Record what the team learned alongside its verdict. Use those findings to revise the current work or set the next goal. Repeated runs without review create a backlog of disconnected output.
If an agent pushes more revisions after review begins, use a [revision diff](/learn/code-review/what-is-a-revision-diff) to see the cumulative change since the last completed review.
## Start with one bounded night
The first team experiment should have:
* one approved feature, product slice, or customer workflow;
* one isolated execution environment;
* one required morning review packet;
* one named review group;
* no autonomous production deployment.
Judge the run by the quality and speed of the morning decision. The team should be able to understand the result, inspect the evidence, and decide what happens next. Tokens, commits, changed lines, and runtime do not measure that outcome.
A night shift is a poor candidate when the requirements remain disputed, the agent has destructive production access, tests and documentation cannot guide unattended work, or the task requires the agent to invent business policy. The agent should stop when it reaches an unapproved decision boundary.
## Where Plannotator fits
Open-source Plannotator gives you local review points before and after a long-running agent task. Use [plan review](/open-source/workflows/plan-review) to annotate the proposed work and return feedback before implementation. Use [code review](/open-source/workflows/local-changes) to inspect the returned local changes, or open a [pull request or merge request](/open-source/workflows/pull-requests) when the agent pushed one.
Plannotator does not schedule the agent or enforce a team authorization process. It opens the current plan, document, or diff for review and sends your decision or comments back to the active agent session.
## Frequently asked questions
### Does an AI agent night shift have to run overnight?
No. It is asynchronous execution between two periods of focused human work. A weekend, a meeting block, or work across time zones can use the same boundary.
### Can teams use Codex, Claude Code, Cursor, or another agent?
Yes. The workflow needs durable context, isolated execution, controlled permissions, inspectable evidence, and human review. It does not depend on one vendor.
### Should the agent merge or deploy when it finishes?
Not by default. A first team night shift should return reviewable work. Merge and deployment authority are separate decisions with a larger blast radius.
### What should happen when the agent needs a new decision?
It should stop that part of the work, preserve what it learned, and return a specific question. It should not invent product policy or expand its own scope.
### Is the Night Shift only for code?
No. The useful output may include code, product copy, design exploration, research, reports, documentation, screenshots, browser traces, and demo videos. Each artifact should support the approved goal and a real morning decision.
Learn what makes a task long-horizon and how to prepare the objective, checkpoints, memory, validation, and review boundary.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# Why AI Agents Ignore Instructions and How to Test Them
Source: https://docs.plannotator.ai/learn/ai-development/how-to-test-ai-agent-instructions
Learn why AGENTS.md, CLAUDE.md, and SKILL.md guide AI agents without enforcing behavior, and how to test required actions, prohibited actions, and final state.
AGENTS.md, CLAUDE.md, and SKILL.md can improve an AI agent's work, but they do not enforce behavior. If a rule must not be broken, use permissions, hooks, protected branches, tests, or CI to check it. Then inspect what the agent did instead of trusting its final summary.
This does not make instruction files useless. They are good places for repository facts, commands, boundaries, and reusable procedures. Problems begin when a team treats Markdown in the model's context as a control system.
## Instruction files guide the agent
The files serve different jobs:
| File or control | Best use | What it does not guarantee |
| - | - | - |
| `AGENTS.md` | Repository guidance shared across compatible coding agents | That every instruction will affect every action |
| `CLAUDE.md` | Persistent project instructions for Claude Code | Strict compliance with every rule |
| `SKILL.md` | A reusable procedure and supporting resources for a particular kind of task | That the agent will select, load, or complete every step correctly |
| Hooks, permissions, tests, and CI | Deterministic checks around commands, files, code, and final state | Good judgment in cases the check does not cover |
The [AGENTS.md open format](https://agents.md/) describes the file as a README for agents. The [Agent Skills specification](https://agentskills.io/specification) separates a skill's discoverable metadata from the full instructions and resources loaded when the skill is used.
Anthropic is explicit about the limit of its own format: [Claude Code treats CLAUDE.md as context, not enforced configuration](https://code.claude.com/docs/en/memory). Its documentation recommends concise, specific instructions and hooks for actions that must run at a fixed point.
An agent that misses a rule is not necessarily refusing it. The file may not have loaded, two instructions may conflict, the rule may be vague, or the agent may lose track of it during a long sequence of tool calls. Diagnosis comes before rewriting.
## What the HANDBOOK.md benchmark tested
The 2026 paper [HANDBOOK.md: A Benchmark for Long-Context Agentic Instruction Following](https://arxiv.org/html/2607.25398) tested whether long policy documents continued to govern agents during multi-step work.
The benchmark contains:
* 65 tasks across finance, human resources, insurance, logistics, and medical billing;
* 10 fictional companies with a different policy for every task;
* handbooks ranging from 20 to 124 pages, or about 8,300 to 79,400 tokens;
* 82 tools spanning files, email, Slack, calendars, Jira, and Shopify;
* 824 deterministic criteria that checked required actions and prohibited actions.
An average task took about 17 agent steps and 30 tool calls. The strongest of 30 tested model configurations passed 36.2 percent of trials under strict grading, where one missed requirement failed the whole trial. Most frontier configurations passed fewer than 25 percent.
Scores rose sharply when the researchers allowed one failed criterion. Agents often completed most of the work but missed one requirement. In real work, that missed requirement might be the approval, safety check, or prohibition that mattered most.
The researchers found four recurring failure patterns:
1. **The immediate request overrode the standing policy.** A plausible message inside the environment persuaded the agent to take an action the handbook prohibited.
2. **The agent performed a check and ignored the result.** Retrieval succeeded, but the later action did not follow the retrieved rule.
3. **The agent skipped verification.** It acted as if a required condition had passed without checking it.
4. **The final report claimed compliance.** The agent said it followed the policy even when the recorded actions showed otherwise.
The [benchmark code and task environments](https://github.com/surge-ai/handbook) are public.
## What the benchmark does not prove
HANDBOOK.md did not test short, native AGENTS.md or CLAUDE.md files inside Codex or Claude Code. The policies were longer PDF, Word, and HTML documents used through a shared OpenHands-based harness.
The study also did not include a human baseline or a short-policy control that isolated document length as the cause of failure. Its tasks were synthetic, deliberately difficult, and scored all-or-nothing. Context compaction did not trigger during the evaluated tasks.
Do not turn the 36.2 percent result into a prediction for your repository. Use it as evidence for a narrower conclusion: an instruction can be available to an agent without reliably controlling the agent's later actions.
The [Hacker News discussion about the paper](https://news.ycombinator.com/item?id=49096969) contains many reports of agents forgetting rules, skipping tests, or claiming work was complete. Those comments show that the problem feels familiar to practitioners. They do not establish why a particular model or agent failed.
## Test the behavior you care about
A useful instruction-following test has three parts:
1. A realistic task.
2. Observable requirements and prohibitions.
3. A verifier that inspects actions and final state.
Suppose your AGENTS.md says:
```md theme={null}
- Read `api/spec.yaml` before changing an API route.
- Never edit files under `packages/api/generated/` by hand.
- Run the focused API tests before finishing.
- Do not push a branch unless the user asks.
```
Turn those sentences into a test contract:
```md theme={null}
# Instruction-following test: update one API handler
## Task
Change the response returned by one existing API route.
## Must happen
- Read `api/spec.yaml` before editing the route.
- Run the focused API test command.
## Must not happen
- Do not edit `packages/api/generated/`.
- Do not push a branch.
- Do not change unrelated routes.
## Expected final state
- Only the allowed source and test files changed.
- The focused tests exit successfully.
- The Git remote state is unchanged.
## Required evidence
- Files read before the first edit.
- Commands executed and their exit codes.
- Final `git diff`.
- Final branch and remote status.
```
The test fails if the agent produces the correct API response but edits a generated file or pushes without permission. Task completion and instruction compliance are separate results.
## Check actions and final state
An agent's final message is useful for orientation. It is weak evidence on its own.
Check the parts of the environment that can prove or disprove the claim:
| Claim | Better evidence |
| - | - |
| "I ran the tests." | Command transcript and exit code |
| "I changed only the requested files." | Final `git diff` and status |
| "I did not push." | Local branch state compared with the remote |
| "I used the approved dependency." | Lockfile, imports, and dependency manifest |
| "I followed the migration process." | New migration file, schema state, and migration test |
| "I asked for approval." | Recorded approval before the protected action |
This is why HANDBOOK.md inspected the resulting files and mock services instead of asking another model whether the answer looked compliant.
For repeated evaluations, record the tool sequence as well as the final state. Two agents can reach the same result through different paths, and one path may include a prohibited side effect that the final files no longer reveal.
## Put hard rules at the action boundary
Use an instruction when the agent needs judgment. Use a deterministic control when the system can decide from known facts.
| Requirement | Suitable control |
| - | - |
| Read the relevant design document before choosing an approach | AGENTS.md, CLAUDE.md, or a task skill |
| Use a particular command after every file edit | Hook |
| Never run a destructive command | Tool permission or command wrapper |
| Never modify a protected path | Filesystem permission, hook, or CI check |
| Do not merge without review | Protected branch and required review |
| Generated files must match their source | Generation check in CI |
| A response must preserve a product invariant | Automated test |
Anthropic's [hooks guide](https://code.claude.com/docs/en/hooks-guide) describes hooks as commands that run at lifecycle events so a required action does not depend on the model choosing to perform it.
Controls still need tests. A hook can use the wrong path, a CI job can omit a package, and a permission rule can allow a command through an unexpected shell. Test the control with one allowed action and one action it should block.
## Run more than one trial
Model output varies, and instruction failures often appear after the task becomes longer or noisier. One successful run does not establish reliability.
Start with a small set:
1. Run the task in a fresh session with only the required context.
2. Repeat it to detect inconsistent behavior.
3. Add realistic distractors such as old documentation, a failed test, or an authoritative-looking request that conflicts with the rule.
4. Run a longer version that requires several tool calls before the protected action.
5. Compare strict compliance, task success, and the number of missed criteria.
Strict compliance should remain the release gate for hard requirements. A near-miss score is useful for debugging because it shows whether the agent missed one rule or misunderstood the whole task.
## Fix the right layer after a failure
When an agent fails a test, use the failure to choose the fix.
### The file was not loaded
Check the filename, location, scope, and product-specific discovery rules. Start a fresh session after changing an instruction file. Ask the product to show which instruction sources it loaded when that diagnostic is available.
### The instruction was vague
Replace "be careful with migrations" with an observable rule:
```md theme={null}
Migrations are append-only after they reach `main`. Create a new migration
instead of editing an existing file.
```
### Instructions conflicted
Inspect root, nested, personal, and tool-specific files. Remove stale rules and state which source wins when two scopes overlap.
### The rule applied only to one task
Move the procedure to a skill or task document and keep a short pointer in the standing instructions. See [How to Write a Good AGENTS.md](/learn/ai-development/how-to-write-a-good-agents-md) for scoping and maintenance guidance.
### The rule described a hard boundary
Enforce it with permissions, hooks, protected branches, tests, or CI. Keep a short explanation in the instruction file if the agent still needs to understand the boundary.
### The failure appeared late in the task
Reduce unrelated context, split the work, or add a check immediately before the protected action. A larger context window may hold the rule without making its influence uniform. See [What Is Context Rot?](/learn/ai-development/what-is-context-rot).
## A practical starting point
Choose one repository rule that has failed before. Write one test with:
* one realistic task;
* two required actions;
* two prohibited actions;
* a final-state check;
* evidence that does not depend on the agent's summary.
Run it several times. If the agent misses a hard boundary even once, move that boundary into a deterministic control and rerun the test.
Keep AGENTS.md and CLAUDE.md focused on commands, constraints, and verification the agent cannot infer safely.
Keep long-running agent work focused, current, and easy to verify.
*Last reviewed July 29, 2026. Maintained by the Plannotator project.*
# How to Write a Good AGENTS.md (or CLAUDE.md)
Source: https://docs.plannotator.ai/learn/ai-development/how-to-write-a-good-agents-md
Learn what to put in AGENTS.md or CLAUDE.md, how coding agents load repository instructions, and how to improve results without bloating the agent's context.
A good **AGENTS.md** gives a coding agent the smallest set of repository-specific instructions it needs to work correctly. It should explain the commands, constraints, and verification steps the agent cannot safely infer from the code. It should not try to summarize the entire codebase or teach the agent general software engineering.
If your team uses Claude Code, the equivalent file is [**CLAUDE.md**](/learn/ai-development/what-is-a-claude-file). The filename and loading rules differ, but the writing principle is the same: include only durable guidance that should influence almost every task in that scope.
The best test for every line is simple:
> Would removing this instruction cause the agent to make a specific, recurring mistake?
If the answer is no, remove it or move it to documentation that the agent can read when relevant.
## What is AGENTS.md?
AGENTS.md is a plain Markdown file containing instructions for AI coding agents. The [open AGENTS.md format](https://agents.md/) describes it as a README for agents: a predictable place for build steps, tests, conventions, and other project guidance.
The file is normally committed to Git. That makes the instructions reviewable by the team and available to every supported agent that works in the repository. There are no required headings or fields.
AGENTS.md does not contain the agent, model, or task. It changes the context the agent receives before working on a task. In practice, it sits between the agent's built-in instructions and the repository it must understand.
## What is the difference between AGENTS.md and CLAUDE.md?
AGENTS.md is an open format supported by a growing set of coding tools. CLAUDE.md is Claude Code's native project-memory file.
| File | Primary use | How it is scoped | Important behavior |
| - | - | - | - |
| `AGENTS.md` | Shared repository guidance for Codex and other compatible agents | Root file plus more specific files in nested directories | Codex combines applicable files from the repository root to the working directory. More specific guidance appears later and takes precedence. |
| `CLAUDE.md` | Persistent project instructions for Claude Code | User, project, parent, and nested directory files | Claude Code reads the project file at the start of a conversation and loads more specific child instructions when it works in those directories. |
Anthropic's [Claude Code best practices](https://code.claude.com/docs/en/best-practices) recommend checking the project-level CLAUDE.md into Git so the team can maintain it together. OpenAI's [Codex documentation](https://learn.chatgpt.com/docs/agent-configuration/agents-md) explains how Codex discovers and combines AGENTS.md files.
If your team uses both formats, you can keep one canonical file and create a symbolic link:
```bash theme={null}
ln -s AGENTS.md CLAUDE.md
```
Use separate files only when the tools need genuinely different guidance. Duplicating the same instructions in two independent files creates another place for them to drift.
## How coding agents use repository instructions
Repository instructions are added to the agent's working context. The model can use them while it explores the repository, makes a plan, edits files, runs commands, and decides whether the task is complete.
For Codex, discovery happens once when a run starts. Codex reads global guidance from `~/.codex`, then walks from the project root toward the current working directory. In each directory it checks `AGENTS.override.md` before `AGENTS.md`. Applicable files are combined from broad to specific, with the closer file taking precedence. The default combined project-instruction limit is 32 KiB.
Claude Code reads CLAUDE.md at the start of each conversation. It can combine a user-level file, a project file, parent-directory files, and more specific child files. CLAUDE.md can also import another file with `@path/to/file` syntax.
That hierarchy matters most in a monorepo. The root should contain rules shared by the whole repository. A package-level file should contain only the guidance that changes inside that package.
Instruction scope
Put each instruction as close as possible to the work it governs
Global
\~/.codex/AGENTS.md
Personal defaults that apply across repositories.
↓
Repository
/AGENTS.md
Shared tooling, boundaries, and completion checks.
↓
Package
/apps/web/AGENTS.md
Only the rules that change for this package.
A nested file should narrow or override broader guidance, not repeat it.
## What should you put in AGENTS.md?
Include facts that materially change how the agent should work and are difficult to infer reliably.
### One sentence about the repository
State what the repository produces and any boundary that changes engineering decisions.
```md theme={null}
This repository contains the API and browser application for a multi-tenant
document collaboration product. The raw-file service is a separate deployment
and must not render or transform user content.
```
The second sentence earns its place because it prevents a plausible architectural mistake. A long directory tour does not.
### Exact setup, build, and test commands
Name non-obvious tools and commands. Explain when to run them and what successful completion requires.
```md theme={null}
## Commands
- Install dependencies with `pnpm install` from the repository root.
- Run focused tests with `pnpm test --filter ` while developing.
- Before finishing, run `pnpm lint`, `pnpm typecheck`, and the tests for every changed package.
```
Commands are high-value instructions because the agent cannot always infer the team's preferred package manager, test scope, or final verification gate.
### Repository-specific constraints
Include boundaries that are easy to violate and expensive to repair.
```md theme={null}
## Boundaries
- Never edit generated files under `packages/api/generated/` by hand. Update
`api/spec.yaml`, then run `pnpm generate:api`.
- Database migrations are append-only after they reach `main`.
- Do not add a production dependency without explicit approval.
```
Each rule names an action, a scope, and, where useful, the correct alternative.
### A definition of done
Tell the agent how it can prove the work is complete.
```md theme={null}
## Before finishing
- Run the checks that cover the changed behavior.
- For a UI change, capture the rendered page at desktop and mobile widths.
- Report the commands you ran and any check you could not run.
```
Verification is more useful than a vague instruction to “write high-quality code.” A test, build, screenshot, or request transcript gives the agent a result it can inspect and improve.
### Pointers to authoritative guidance
Link to detailed documentation when it applies only to some tasks.
```md theme={null}
## Task-specific guidance
- For API changes, read `docs/api-contract.md` before editing routes.
- For database work, follow `docs/migrations.md`.
- For frontend accessibility, follow `docs/accessibility.md`.
```
This is progressive disclosure. The agent starts with a small map and loads the relevant detail when the task requires it.
Matt Pocock's [AGENTS.md guide](https://www.aihero.dev/a-complete-guide-to-agents-md) recommends the same pattern: keep the root file focused, then point to narrower documentation and skills that load only when the work needs them.
## What should you leave out?
### Information the agent can discover safely
Do not list every directory, dependency, or common language convention. Agents can inspect a repository tree, read `package.json`, follow imports, and observe local code patterns.
The 2026 paper [Evaluating AGENTS.md](https://arxiv.org/abs/2602.11988) found that repository overviews did not help agents reach task-relevant files faster. Generated files were often redundant with documentation already present in the repository.
### Rules a deterministic tool can enforce
Use a formatter for formatting, a linter for static rules, tests for behavior, and permissions or hooks for hard safety boundaries. A model instruction is advisory.
Anthropic makes this distinction explicit: CLAUDE.md guidance influences behavior, while [Claude Code hooks](https://code.claude.com/docs/en/best-practices#set-up-hooks) run deterministic scripts. If a command must run after every edit, or one directory must never be modified, an enforceable mechanism is safer than a sentence in a context file.
### Task-specific workflows
Do not load a release procedure, database playbook, or security-review checklist into every coding session. Put reusable workflows in separate docs or agent skills, then tell the agent when to use them.
### Frequently changing facts
Release versions, temporary status, current incidents, and detailed file maps become stale quickly. Stale guidance is worse than missing guidance because the agent treats it as an active instruction.
### Generic aspirations
Instructions such as “write clean code,” “follow best practices,” or “be concise” rarely change the resulting work. Replace them with a repository-specific behavior or remove them.
## Can a large AGENTS.md hurt agent performance?
Yes. A context file consumes input space and attention before the agent reads the task or repository. More instructions can also cause more exploration, tests, and reasoning steps.
The [Evaluating AGENTS.md](https://arxiv.org/abs/2602.11988) study tested several coding agents on real repository tasks. In that evaluation:
* developer-written context files improved task success by about 4 percent on average;
* LLM-generated context files reduced success by about 3 percent on average;
* context files increased exploration, testing, and inference cost, with generated files raising cost by more than 20 percent in the reported settings;
* agents generally followed the instructions, which means unnecessary instructions still consumed work.
Those results do not prove that AGENTS.md is useless. The benchmark focused heavily on Python repositories and measured issue resolution rather than every aspect of software quality. It does show that comprehensiveness is not a safe goal. A longer file can make an agent more thorough while making the task slower, more expensive, or less likely to succeed.
Philipp Schmid's [practical analysis](https://www.philschmid.de/writing-good-agents) reaches a similar conclusion from the study: describe the non-obvious tooling and purpose that change agent behavior, but avoid generated directory tours, generic style rules, and requirements that apply only to occasional tasks.
Anthropic gives similar practical advice for CLAUDE.md: keep it short, include only broadly applicable information, and move occasional domain knowledge into skills or separate files. Its documentation warns that a bloated CLAUDE.md can make the model ignore the instructions that matter.
This is one form of [context rot](/learn/ai-development/what-is-context-rot). The file may still fit inside the context window, but useful guidance competes with duplicated, irrelevant, or stale material.
## A practical AGENTS.md template
This template is intentionally small. Add a section only when your repository has a real need for it.
```md theme={null}
# Repository instructions
This repository contains [one-sentence purpose and critical boundary].
## Commands
- Install: `[exact command]`
- Develop: `[exact command]`
- Focused tests: `[exact command with package or test placeholder]`
- Before finishing: `[lint, typecheck, build, or test commands]`
## Boundaries
- [A repository-specific action the agent must avoid, plus the alternative.]
- [A change that requires approval.]
## Verification
- [What proves backend behavior works.]
- [What proves frontend behavior works.]
- Report any check that could not be run.
## Task-specific guidance
- For [task type], read `[path]`.
- For [task type], follow `[path]`.
```
For a monorepo, keep shared instructions at the root and add a shorter AGENTS.md inside a package only when that package has different commands or constraints.
## How to improve an existing AGENTS.md
Review the file against real agent behavior rather than adding every rule someone can imagine.
1. **Find instructions that apply only sometimes.** Move them to task-specific documentation or a skill.
2. **Delete facts the repository already makes obvious.** Directory listings and dependency summaries are common sources of duplication.
3. **Replace vague rules with observable behavior.** Name the command, file, boundary, or verification result.
4. **Find conflicts.** Check root, nested, override, user, and tool-specific instruction files.
5. **Test representative tasks.** Ask the agent which instructions it loaded, then observe whether it chooses the right tools and checks.
6. **Review the file after failures.** If the agent repeatedly makes the same repository-specific mistake, decide whether the fix belongs in instructions, docs, tests, linting, permissions, or product code.
Do not treat the file as an append-only list of past frustrations. Every new rule should justify the permanent context it consumes.
## How do you verify that the file is being used?
With Codex, start a fresh run in the target directory and ask it to list or summarize its active instruction sources. OpenAI documents commands for checking the root and a nested directory in its [AGENTS.md guide](https://learn.chatgpt.com/docs/agent-configuration/agents-md#verify-your-setup). If guidance looks stale, restart the run because Codex builds the instruction chain when the run begins.
With Claude Code, use `/memory` to inspect loaded memory files. Test from the project root and from a package with its own CLAUDE.md. Check that the agent can state the applicable commands and constraints without inventing additional rules.
Verification should also cover behavior. Give the agent a small representative task and check whether it:
* chooses the expected package manager and commands;
* reads the linked task-specific document when relevant;
* respects the nearest scoped instruction file;
* runs the stated checks before finishing;
* avoids boundaries that should be enforced elsewhere.
For a repeatable pass/fail method, see [Why AI Agents Ignore Instructions and How to Test Them](/learn/ai-development/how-to-test-ai-agent-instructions).
## Should an AI generate AGENTS.md for you?
An agent can help inspect a repository and propose a draft, but a human should decide what remains in permanent context.
The benchmark evidence is a reason to be skeptical of generated completeness. In the 2026 evaluation, LLM-generated context files tended to lower task success and raise cost. Anthropic's `/init` command can provide a starting point for CLAUDE.md, but its own best-practices guide tells teams to refine the result, keep it concise, and remove anything the model can infer.
Use generation as an inventory step, not as approval. Ask the agent to identify non-standard commands, safety boundaries, and verification paths. Then delete aggressively, confirm every command, and review the file like production configuration.
## Who should maintain AGENTS.md?
The team that owns the repository should maintain it through normal code review. Changes affect future agent work, so an instruction deserves the same scrutiny as a test configuration or build script.
Review the file when:
* a command or repository boundary changes;
* a nested package gains different tooling;
* several agent runs repeat the same avoidable mistake;
* an instruction becomes enforceable through code or tooling;
* the file grows without evidence that the new rules help.
Builder's [CLAUDE.md guide](https://www.builder.io/blog/claude-md-guide) recommends using code review as one maintenance signal: when a reviewer catches a repeated, repository-specific mistake, decide whether the lesson belongs in CLAUDE.md. The useful part is the evidence from real work. The dangerous part is adding every correction forever without pruning older rules.
A good AGENTS.md is not a complete description of the codebase. It is a short, maintained operating guide that helps an agent begin in the right place, use the right tools, and show evidence before it stops.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# Stay in the Loop and Own the Quality You Ship
Source: https://docs.plannotator.ai/learn/ai-development/stay-in-the-loop-own-quality
Use local plan, document, and code review with open-source Plannotator while Git, GitHub, or GitLab remains the record of the work and shipping decision.
Review the agent's direction before implementation and its changes afterward. Focus human attention on product intent, consequential risks, and the shipping decision.
In the illustration, “approved context” means a reviewed issue, specification, or plan. Workspaces does not add an approval gate.
## Own more than test output
Agents can investigate, implement, test, and explain. People still have to decide whether the result is valuable, safe, operable, and understandable.
| Quality question | Evidence to inspect |
| - | - |
| Does this solve the intended user or operator problem? | Request, plan, product behavior, current screenshots or examples |
| Does it preserve important technical boundaries? | Diff, tests, data and API contracts, security and migration proof |
| Can the team run and reverse it safely? | Rollout, observability, failure handling, rollback or recovery steps |
| Will future people and agents understand the accepted behavior? | Maintained documentation, ADRs, specifications, and source links |
## Define quality before the agent writes code
Passing tests is necessary, but it does not prove that a change solves the right problem. Before implementation, make the expected result reviewable:
* What should change for the user or operator?
* What is out of scope?
* Which architecture, security, data, or compatibility constraints apply?
* What evidence should the agent return?
* What would make you stop, revise the plan, or roll back the change?
For a small, reversible fix, those answers may fit in the agent conversation. For a consequential change, ask for a plan and review it before the agent proceeds.
Open-source Plannotator can pause supported agents in plan mode. Add comments or edit the Markdown, select **Send Feedback**, and use Plan Diff when the agent submits a revision. Select **Approve** when the current local plan is ready for implementation.
Plannotator's approval controls the active agent session. It does not identify a reviewer or create a shared authorization record. If the decision must be visible to other people, save the exact plan in Git, an issue, or another project system.
When several people or agents need to work in one shared planning document, use [Plannotator Workspaces](https://help.plannotator.ai/workspaces/review-plans-and-technical-decisions). It does not turn version history into named approval or authorization.
## Let the agent work between review points
After you approve the direction, the agent can investigate, implement, test, and explain the change. Ask it to stop when it reaches a decision the plan did not cover, such as an unsafe migration, an incompatible API, or a product behavior that still needs human judgment.
This keeps routine execution moving while preventing the agent from silently choosing a consequential new direction.
## Review the code, not only the handoff
When implementation is complete, compare the returned summary with the actual diff and validation evidence.
Use `plannotator review` for local changes. Plannotator opens a browser diff viewer where you can comment on exact lines or ranges, suggest replacements, and return structured feedback to the active agent session. **Approve** returns the configured code-review approval message; it does not commit, merge, or deploy the change.
For a GitHub pull request or GitLab merge request, open the provider URL with the supported Plannotator review command. Inspect the current diff and any supported artifacts, then use GitHub or GitLab to record comments, review status, and the final merge decision.
Check at least:
* whether the code matches the requested behavior;
* whether the change stays within scope;
* whether tests cover the important success and failure paths;
* whether migrations, security boundaries, and compatibility claims are supported by evidence;
* whether generated screenshots, HTML, reports, or recordings match the current revision; and
* whether maintained documentation now describes the implemented behavior.
An agent can help find bugs or explain unfamiliar code. Verify its findings against the repository and current revision before acting on them.
## Use separate sessions when several people review
Each person runs a separate local review session. Sessions do not share cursor position, annotations, reviewer identity, or review state.
Coordinate multi-person review through the repository provider:
1. Identify the exact commit or pull request revision under review.
2. Record comments and requested changes in GitHub, GitLab, or the project's normal review system.
3. Ask the agent to update the branch.
4. Review the new revision rather than relying on the previous summary.
5. Record the final verdict and merge state in the provider.
For local-only work, commit or otherwise identify a checkpoint before handing the change to another reviewer. Separate Plannotator sessions can then inspect the same repository state without pretending they share live annotations.
## Use the lightest review that controls the risk
More process does not automatically improve quality.
| Change | Useful review path |
| - | - |
| Small, reversible local edit | Focused tests and local diff review |
| Agent plan with uncertain scope | Plan review, feedback, then Plan Diff |
| Change headed for GitHub or GitLab | Provider pull request or merge request plus code review |
| Visual or behavior change | Code diff plus current screenshots, recording, or HTML evidence |
| Security, data, migration, or public API change | Detailed plan, relevant owners in the project's normal system, and targeted code review |
Choose review depth based on the consequence of a mistake, not the amount of code or AI used.
## Keep the record where future work will find it
Local Plannotator sessions return useful feedback to the active agent, but the session is not the long-term record for a project. Preserve what matters in the systems already used to maintain the software:
* commit the implemented code and current documentation to Git;
* keep pull request or merge request discussion with the hosted change;
* record unresolved work in an issue or task tracker; and
* update maintained documentation when the accepted behavior changes.
This gives the next person or agent current repository evidence instead of requiring access to an earlier private session.
Annotate the proposed direction, send feedback, and compare the next version.
Inspect the current diff and return line-specific feedback to the agent.
Open hosted changes in Plannotator while the provider remains the system of record.
Annotate supporting plans, reports, specifications, and rendered artifacts.
## Frequently asked questions
### Can several people review the same change with Plannotator OSS?
They can each open the same repository revision or hosted pull request in separate sessions. Use GitHub, GitLab, or another project system to share comments and record the final state.
### Does Plannotator merge or deploy approved code?
No. Local approval returns a result to the agent session. Your repository and provider controls determine what is committed, merged, or deployed.
### Should every AI-generated change have a formal plan?
No. Use plan review when the proposed direction needs scrutiny before implementation. Small changes may be easier to verify directly in the diff.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# What Are Long-Horizon Tasks for AI Agents?
Source: https://docs.plannotator.ai/learn/ai-development/what-are-long-horizon-tasks-for-ai-agents
Long-horizon tasks require AI agents to sustain progress across dependent steps, context windows, and checkpoints. Learn how they differ from long-running jobs and how teams prepare them.
A long-horizon task gives an AI agent one coherent objective with dependent stages. Later work uses context, decisions, experiments, or changes produced earlier. The agent must preserve state, make incremental progress, verify its work, recover from failed approaches, and continue toward one definition of done across many steps or context windows.
Runtime alone does not make a task long-horizon. A slow command or one thousand independent summaries may consume hours without requiring sustained reasoning. Migrating a coupled system, debugging a complex failure, or building and validating a complete product slice can qualify because each stage changes what must happen next.
## A task horizon is not a stopwatch
[METR's task-completion time horizon](https://metr.org/time-horizons/) estimates the duration a human expert would need for tasks an AI agent can complete at a stated reliability level. It measures task difficulty using human-expert completion time. It does not measure how long an agent process remains open.
Keep these measures separate:
| Measure | What it describes |
| - | - |
| Human task-completion time | How long a skilled person would need for the task |
| AI wall-clock runtime | How long the agent process runs |
| Context-window length | How much information the model can use at once |
| Agent sessions | How many working sessions continue the objective |
| Parallel workers | How many agents work on separable parts at the same time |
A twelve-hour run may contain a long-horizon task, but duration does not prove it.
Compare two jobs:
* **Long batch:** summarize one thousand unrelated documents.
* **Long-horizon task:** investigate, design, build, test, and explain one product change where every stage depends on the work before it.
The first job can be divided into independent units. The second must preserve a growing body of decisions, evidence, and system state.
Task structure
Two kinds of long-running work
Long-running batch
Many separate outputs
Independent units
No shared state required
Failures stay local
Long-horizon task
One definition of done
Dependent stages
Decisions carry forward
Recovery uses saved state
## What makes an AI agent task long-horizon?
Long-horizon work has:
* one coherent outcome;
* dependent stages;
* accumulated state and decisions;
* feedback that changes the next action;
* checkpoints that preserve recoverable progress;
* delayed but observable verification;
* one shared definition of done.
A failed experiment may eliminate one approach. A migration result may expose another system that must change. The agent must carry those findings forward instead of restarting each stage from the original prompt.
## Examples of long-horizon agent tasks
Suitable examples include:
* migrating a large system while preserving behavior;
* debugging a coupled numerical or production failure;
* building and validating a complete product slice;
* conducting research where each experiment changes the next experiment;
* producing coordinated code, design, documentation, screenshots, demo material, and launch assets for one product goal;
* investigating and implementing a customer-specific workflow in a forward-deployed engineering engagement.
These are not automatically suitable for unattended execution. They still need clear permissions, recoverable environments, useful feedback, and human decision boundaries.
## What does not qualify?
These may run for a long time without becoming long-horizon tasks:
* a very long prompt;
* one slow build, query, training job, or command;
* a large batch of independent classifications or summaries;
* a recurring report that starts fresh each time;
* a chat that remains open overnight;
* unrelated agents producing disconnected outputs.
Parallelism is an execution choice. It does not create a long horizon by itself.
## Why long-running AI agents are becoming practical
Current agent products combine stronger models with execution systems that preserve an objective, use tools, delegate selected work, inspect results, and return artifacts for review.
OpenAI positions GPT-5.6 Sol for complex, open-ended work. [Goal mode](https://learn.chatgpt.com/docs/long-running-work) gives a Codex task a persistent objective, constraints, and completion criteria. Ultra can use [subagents](https://learn.chatgpt.com/docs/agent-configuration/subagents) for separable work.
Anthropic positions [Claude Fable 5](https://www.anthropic.com/claude/fable) for ambitious, long-running asynchronous projects. In an agent harness such as Claude Code, it can plan across stages, delegate selected work, check its results, and continue for extended sessions.
Neither system guarantees a production-quality outcome. The result still depends on the task, context, execution environment, feedback, verification, and human review.
## Why agents lose the plot over long work
[Anthropic's long-running agent harness research](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) documents recurring failures:
* attempting the entire project in one pass;
* exhausting the context window in the middle of a change;
* leaving partial work undocumented;
* repeating approaches that already failed;
* reporting completion after partial progress;
* testing implementation details without validating the user flow;
* allowing parallel agents to collide on shared dependencies.
Context compaction helps a model continue a conversation, but it does not automatically preserve the exact system state, failed approaches, validation evidence, or next action another session needs.
## How to prepare a long-horizon task
Give the agent a durable operating record instead of relying on the initial prompt and chat history.
| Required element | What the team records |
| - | - |
| Outcome | The result the agent must produce |
| Context | Relevant product, customer, design, code, and business information |
| Constraints | Permitted systems, actions, data, and approaches |
| Progress memory | Decisions, completed work, failures, and next steps |
| Checkpoints | Recoverable and reviewable increments |
| Test oracle | Tests, reference behavior, measurements, or other success signals |
| Evidence | Code revisions, screenshots, traces, videos, documents, or reports |
| Decision boundary | Questions and risks that must return to people |
| Definition of done | Conditions that make the result ready for review |
Keep the environment recoverable. Use version control, isolated branches or worktrees, repeatable setup commands, and checkpoints that another session can inspect. Each stage should leave the project clean enough for the next stage to continue without reconstructing the work.
[Anthropic's research on long-running Claude](https://www.anthropic.com/research/long-running-Claude) recommends well-scoped work, explicit success criteria, progress memory, a test oracle, Git coordination, and occasional human oversight. Its examples also produced test gaps and mistakes, which is why the returned evidence still needs review.
## Should one agent work sequentially or use subagents?
Use subagents for separable work such as independent research, test analysis, asset exploration, or a review of a finished change. Keep tightly coupled work sequential when every decision changes the downstream system.
One main agent can preserve the objective and project state while delegating bounded tasks. Several agents can work in parallel when their outputs have clear interfaces and isolated workspaces.
Do not treat more agents as proof of a longer or better task. Parallel agents that edit the same dependencies can create collisions and contradictory decisions.
## What should the agent return?
Completion should mean ready for informed human review. A useful handoff can include:
* the authorizing goal and exact version;
* exact code revisions;
* a map of the consequential changes;
* validation results and anything skipped or failing;
* screenshots, recordings, traces, and interactive explainers;
* failed approaches and unresolved questions;
* proposed updates to living documentation.
The [AI coding agent handoff](/learn/code-context/ai-coding-agent-handoff) should connect each claim to revision-bound evidence. [Code review artifacts](/learn/code-review/what-are-code-review-artifacts) help reviewers inspect behavior that the diff cannot show. If code changes after a completed review, a [revision diff](/learn/code-review/what-is-a-revision-diff) isolates what moved. The [AI software factory guide](/learn/ai-development/what-is-an-ai-software-factory) shows how planning, execution, evidence, review, and learning can form one repeatable operating loop.
## The Night Shift is one team pattern
The [AI agent Night Shift](/learn/ai-development/how-teams-run-ai-agent-night-shift) is one way to give dependent work uninterrupted time between two periods of human attention. The schedule does not define the task.
## Where Plannotator fits
Open-source Plannotator does not run or schedule long-horizon agents. It lets you [review the plan](/open-source/workflows/plan-review) before execution and [review the returned changes](/open-source/workflows/local-changes) afterward. Plan version history and revision diffs help you check what changed between feedback rounds.
## Frequently asked questions
### How long must a task run to count as long-horizon?
There is no universal wall-clock threshold. Long-horizon tasks have sustained dependencies across their stages. Formal evaluations may report a human-expert task-completion horizon at a particular success rate.
### What is the difference between long-horizon and long-running?
Long-horizon describes the structure and difficulty of the task. Long-running describes the execution workflow that keeps an agent working through it.
### Does long-horizon mean fully autonomous?
No. An agent can work asynchronously inside strict permissions, stop for important decisions, and return its result for review.
### Do long-horizon tasks require subagents?
No. Subagents help with separable work. Tightly coupled tasks may be better served by one sequential agent that delegates only selected tasks.
### Can Codex and Claude perform long-horizon tasks?
OpenAI and Anthropic provide models and agent workflows for long-running, multi-step work. Results still depend on the task, execution system, context, verification, and review boundary.
### Should a long-running agent merge or deploy its own work?
Not by default. Integration and deployment authority are separate decisions with their own permissions and blast radius.
See how teams approve one goal, let agents work asynchronously, and review the returned code and artifacts together.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# What Are Rich References for AI Agents?
Source: https://docs.plannotator.ai/learn/ai-development/what-are-rich-references
Rich references give AI agents concrete context such as repositories, HTML prototypes, specs, tests, and rubrics instead of longer prompt instructions.
As AI models improve, getting better results can require less prompt scaffolding and better context. Instead of writing a longer rulebook, give the agent concrete material that shows what you want it to build and what good work looks like.
Anthropic calls these materials **rich references**. They can include repositories, existing code, reference websites, wireframes, HTML prototypes, specifications, test suites, reference implementations, and rubrics that describe your team's standards.
## Why better models can need fewer instructions
The message you type is only one part of an agent's context. The model may also receive a system prompt, repository instructions, skills, memory, tool definitions, and files it opens while working.
In [The new rules of context engineering for Claude 5 generation models](https://claude.com/blog/the-new-rules-of-context-engineering-for-claude-5-generation-models), Anthropic reports that it removed more than 80 percent of Claude Code's system prompt for newer Claude models with no measurable loss on its coding evaluations. The team found that many older instructions were now overconstraining the model or conflicting with one another.
The article describes several related changes:
* Replace rigid rules with guidance that lets the model use judgment.
* Design clear tools and interfaces instead of teaching every use through examples.
* Load detailed guidance when it becomes relevant instead of putting everything up front.
* Keep repository instruction files lightweight.
* Give the model richer references instead of relying only on written plans and specifications.
This is a report about Anthropic's experience with newer Claude models, not proof that every model or task needs fewer instructions. Safety boundaries and important constraints still belong in the context. Do not assume that more prompt technique produces a better result when the model could learn more from the work itself.
## What is a rich reference?
A rich reference is concrete material that an agent can inspect and use while it works.
The word **rich** does not mean long, complicated, or heavily structured. It means the reference contains more useful information than a prose description alone.
| Reference | What it gives the agent |
| - | - |
| Repository or codebase | Existing architecture, conventions, naming, and implementation patterns |
| Reference website | A working example of layout, behavior, and interaction |
| Wireframe or HTML prototype | Spatial structure and interface behavior the agent can inspect directly |
| Product or technical specification | Requirements, constraints, and expected outcomes |
| Test suite | Executable examples of the behavior that must pass |
| Reference implementation | Existing code that demonstrates how the result should work |
| Rubric | The team's standards for judging quality |
A Markdown plan can still be a good reference. Anthropic's point is not that plans or specifications are obsolete. Newer models can also work from more expressive material.
## Why richer references can beat longer prompts
Suppose you want an agent to build a settings page. Give it concrete sources for the layout, repository conventions, required behavior, test cases, and quality bar:
* an HTML wireframe showing the layout;
* an existing settings page that demonstrates the product's conventions;
* the specification for the new behavior;
* tests for the important states; and
* a design rubric describing what your team accepts.
Anthropic specifically recommends code when possible because it gives the model high-fidelity instructions in a form it understands well. The article also says that an HTML mockup will generally communicate a design better than a prose description or screenshot.
## Examples of rich references
### Building a user interface
```text theme={null}
Build the API key settings page.
References:
- wireframes/api-keys.html shows the intended layout and interaction states.
- apps/web/settings/profile.tsx shows the existing settings-page conventions.
- specs/api-keys.md defines creation, display, and revocation behavior.
- tests/api-keys.spec.ts covers the required states.
- rubrics/product-ui.md defines our accessibility and visual-quality standards.
```
The agent still receives a clear task. The references provide the detail that would otherwise turn the prompt into a small design document.
### Porting existing behavior
```text theme={null}
Port the retry behavior from the reference repository into this service.
References:
- reference-repo/src/retry.ts is the implementation to study.
- src/network/request.ts is the integration point in this repository.
- tests/network/retry.test.ts defines the behavior we need to preserve.
- rubrics/typescript.md defines our local TypeScript standards.
```
The source function communicates the algorithm. The target repository communicates local conventions. The tests and rubric make the acceptance bar visible.
### Designing an API
An API task might use a product specification, an existing API with similar behavior, a test suite, and a team rubric for API design. The specification states the outcome. The existing API demonstrates conventions. The tests define observable behavior. The rubric helps the agent evaluate naming, errors, pagination, and compatibility.
## How to give an agent rich references
1. **State the outcome.** Tell the agent what it needs to build, change, or decide.
2. **Choose a small set of useful references.** Include only the material that helps with this task.
3. **Explain each reference's role when it is not obvious.** Say whether it defines behavior, demonstrates style, provides an example, or sets the quality bar.
4. **Let the agent inspect the material.** Do not rewrite the entire reference into the prompt.
5. **Verify the result against the references.** Run the tests, compare the implementation with the prototype, and apply the rubric.
## What to avoid
Rich references do not fix an unclear task. The agent still needs to know the intended outcome.
Avoid:
* attaching a whole repository when one package or implementation is the useful example;
* providing several references that disagree without saying which one controls;
* treating example code as a requirement when the agent is only meant to learn from it;
* writing a rubric with generic advice such as "make it high quality";
* using references to hide a decision the team has not made; and
* removing safety rules or hard product constraints just because the model has better judgment.
## Where Plannotator fits
[Open-source Plannotator](/open-source/) lets you review plans, Markdown, HTML, local code changes, pull requests, and merge requests with the coding agent that produced them. A team can review an HTML prototype or implementation plan before the agent builds from it, then review the resulting change against the same material.
[Plannotator Workspaces](https://help.plannotator.ai/workspaces/) is the separate commercial product for sharing plans and technical documents across teammates and agents. A workspace can keep a main plan beside specifications, HTML prototypes, wireframes, and team guidance.
Plannotator does not decide which context an agent needs. It gives people and agents a shared place to inspect and discuss the material they are using.
## Frequently asked questions
### Is a rich reference just a link?
No. The useful part is the material the agent can inspect. A link may be how the agent reaches a repository, prototype, specification, test suite, or rubric.
### Do rich references replace prompts?
No. The prompt should still state the task, outcome, and important constraints. References carry the detailed context that is easier to show than describe.
### Do I need every type of reference?
No. Use the smallest useful set. A code change might need only the target file, a similar implementation, and its tests. A user-interface task may benefit from an HTML prototype and a design rubric.
### Are Markdown plans and specifications no longer useful?
They are still useful. Rich references expand the available formats. They do not require teams to stop writing plans or specifications.
### Is "rich references" an industry standard?
No. Anthropic used the phrase in its July 2026 article and [the accompanying X article](https://x.com/trq212/status/2080710971228918066). It is a useful description, not a formal protocol or specification.
See when a visual HTML artifact communicates more than a text-only document.
*Drafted and last reviewed July 24, 2026. Maintained by the Plannotator documentation team.*
# What Is a Claude File? How CLAUDE.md Works
Source: https://docs.plannotator.ai/learn/ai-development/what-is-a-claude-file
A CLAUDE.md file gives Claude Code project instructions. Learn when Claude loads it, how nested files work, and how it differs from auto memory.
A **Claude file** usually means `CLAUDE.md`: a plain Markdown file that gives Claude Code instructions about a project. Claude adds the file to its context, then uses it while it reads code, plans work, edits files, and runs commands.
`CLAUDE.md` is not a model, a database, or a hidden configuration format. It is a document for guidance that should apply across many tasks.
## When does Claude Code load CLAUDE.md?
Claude Code looks for instruction files when a session starts. It also loads more specific files when it begins working in a nested directory.
| Location | When Claude loads it | Scope |
| - | - | - |
| `~/.claude/CLAUDE.md` | At the start of every session | Every project for one user |
| `./CLAUDE.md` or `./.claude/CLAUDE.md` | At the start of a session launched in that project | The project and its files |
| `./CLAUDE.local.md` | At the start of a session, after the shared file at the same level | One user's local copy of the project |
| `apps/web/CLAUDE.md` | When Claude reads a file inside `apps/web` | That directory and its children |
| A file imported with `@path/to/file` | When the CLAUDE.md that imports it loads | The same scope as the importing file |
Claude also reads applicable `CLAUDE.md` files in parent directories. This lets a monorepo keep shared instructions at the root and package-specific instructions closer to each package. Anthropic documents the full search order in its [Claude Code memory guide](https://code.claude.com/docs/en/memory).
## How often does Claude read the file?
Claude loads the applicable files when a session starts. It does not reread every `CLAUDE.md` before every reply.
If you edit the file during a session, Claude picks up the change after the next `/compact` or when you open `/memory`. Otherwise, start a new session. After compaction, Claude restores the root instructions. It reloads a nested file when it next reads a file in that directory.
An imported file also consumes context. Imports can reduce duplication, but they do not make the imported text free.
## Which CLAUDE.md file wins?
Claude combines the files it finds from broad scope to narrow scope. A file closer to the current work appears later in the combined context, but it does not erase the broader file.
Do not rely on conflicting instructions. Keep shared rules at the project root. Put only the differences in nested or local files.
## Is CLAUDE.md the same as memory?
No. Claude Code uses the word *memory* for more than one feature, but the files have different owners and jobs.
| Source | Who writes it | What it should contain | Where it lives |
| - | - | - | - |
| `CLAUDE.md` | You and your team | Stable commands, constraints, and project guidance | The repository or your home directory |
| Auto memory | Claude Code | Notes Claude chooses to keep across sessions | `~/.claude/projects//memory/` |
| Conversation history | You and Claude | The current task and its working context | The current or resumed session |
Treat `CLAUDE.md` as standing instructions, not as a diary of past sessions. Auto memory is machine-local. Claude loads the first 200 lines of its `MEMORY.md` at startup and reads linked topic files when needed. The [Claude Code memory guide](https://code.claude.com/docs/en/memory) explains both systems.
## Can Claude ignore CLAUDE.md?
Yes. Claude Code adds `CLAUDE.md` as a user message after its system prompt. The file guides the model, but it does not enforce a rule.
Use [hooks](https://code.claude.com/docs/en/hooks) or permissions when a check must run every time. Use `CLAUDE.md` to explain what good work looks like and which commands Claude should use.
## How can you check what Claude loaded?
Run `/memory` in Claude Code. It lists the instruction files loaded for the session and lets you open them. For deeper debugging, the [`InstructionsLoaded` hook](https://code.claude.com/docs/en/hooks#instructionsloaded) can log each loaded instruction file.
## What should go in CLAUDE.md?
Include facts Claude cannot safely infer from the repository:
* build and test commands;
* rules that differ from common defaults;
* files or directories it must not change;
* checks required before work is complete;
* links to detailed docs Claude should read only when needed.
Keep it short. Remove general advice and facts the code already makes clear. For a writing checklist and examples, read [How to Write a Good AGENTS.md (or CLAUDE.md)](/learn/ai-development/how-to-write-a-good-agents-md).
## How is CLAUDE.md different from AGENTS.md?
Claude Code reads `CLAUDE.md` by default. It does not load `AGENTS.md` by name.
If your team uses both Claude Code and agents that support `AGENTS.md`, keep one source of truth. A `CLAUDE.md` file can import the shared file with `@AGENTS.md`, or you can use a symbolic link where your tools and operating systems support one. Anthropic describes this setup in its [CLAUDE.md context guide](https://support.claude.com/en/articles/14553240-give-claude-context-claude-md-and-better-prompts).
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# What Is a Coding-Agent Field Guide?
Source: https://docs.plannotator.ai/learn/ai-development/what-is-a-coding-agent-field-guide
A coding-agent field guide turns repeated review corrections into evidence-backed project lessons that agents load only for relevant work.
A coding-agent field guide is a small, project-specific collection of lessons derived from reviewed work. Each lesson records a mistake or surprise, the accepted behavior, the evidence behind it, where it applies, and how to verify it.
Agents read a short index, then open only the entries relevant to the current task. This keeps repeated corrections available without adding every lesson to `AGENTS.md`, a memory file, or the prompt for every session.
Use the open-source [coding-agent field guide starter](https://github.com/plannotator/coding-agent-field-guide) to add this workflow to a repository. It uses Markdown, repository instructions, and review evidence. It does not require a vendor-specific runtime.
## What belongs in a field guide
A field-guide entry should come from an observed project case. It needs:
* a commit, pull request, issue, test, contract, decision, or other inspectable source;
* the project-specific behavior that surprised the reviewer;
* guidance narrow enough to apply without becoming a universal rule;
* a good example and a bad example with different behavior;
* a verification method;
* exceptions and applicable scope;
* a human decision before the entry becomes active.
Most review comments should not become entries. Fix the current task and stop unless the correction is likely to recur or protects a consequential project boundary.
## How it differs from other agent context
| Artifact | What it should contain |
| - | - |
| `AGENTS.md` or `CLAUDE.md` | Small, always-loaded commands, constraints, and pointers |
| Memory | Persisted facts, preferences, or session state |
| Skill | A repeatable workflow, sometimes with scripts or tools |
| Runbook | An operational procedure |
| Retrospective | Analysis of one event |
| Conversation archive | Raw history for replay or audit |
| Field guide | Reviewed project lessons loaded only when relevant |
The field guide does not replace these artifacts. Its root instruction is usually a short pointer:
```md theme={null}
## Project field guide
Use `field-guide/index.md` to find project-specific lessons derived from
reviewed work. Read only entries relevant to the current task.
Treat current code, tests, contracts, and accepted decisions as authoritative
when they conflict with the guide.
```
The index says what each entry is for and where it applies. The entry contains the evidence and detail. An agent working on a responsive header should not load a lesson about asynchronous job persistence. In a broader [AI software factory](/learn/ai-development/what-is-an-ai-software-factory), field-guide entries preserve reusable operating rules from reviewed work while current code, tests, contracts, and decisions remain authoritative.
## Turn reviewed work into one lesson
Use this sequence after the work has reached an accepted result:
1. State the correction in one sentence.
2. Confirm that it is project-specific and likely to matter again.
3. Search the current index for a duplicate or conflict.
4. Check current code, tests, contracts, and decisions.
5. Decide whether the lesson belongs in the guide or in a stronger artifact.
6. Draft the smallest guidance that explains the behavior and consequence.
7. Add evidence, scope, examples, verification, and exceptions.
8. Leave the entry as a draft.
9. Have a person accept, revise, reject, merge, or graduate it.
10. Add only accepted entries to the active index.
The [distillation workflow](https://github.com/plannotator/coding-agent-field-guide/blob/main/starter/workflows/distill-reviewed-session.md) provides the copyable version.
## Graduate enforceable lessons
Some corrections should not remain advisory Markdown.
Graduate a lesson when a stronger artifact can enforce or explain it:
| Lesson | Stronger destination |
| - | - |
| A path form must always be rejected | Test and shared predicate |
| Generated code must satisfy a mechanical rule | Linter or formatter |
| A value can occupy only valid states | Type or schema |
| Every change must pass the same command | CI check |
| A task follows a repeatable procedure | Skill or runbook |
| A behavior is part of the product contract | Contract or decision record |
A superseded field-guide entry can remain as a short lifecycle example that points to the stronger artifact. Future agents should follow the test, type, contract, or current code rather than treating the historical entry as the authority.
## Keep deterministic checks separate from judgment
Tests, builds, type checks, lint, and contract checks answer different questions from a review rubric.
A required failing check must block acceptance. A high rubric rating cannot offset it. Use anchored judgment dimensions for qualities such as scope, evidence, risk, correctness, test quality, and failure behavior, then state why each rating applies.
The repository includes exercised [plan-review](https://github.com/plannotator/coding-agent-field-guide/blob/main/starter/rubrics/plan-review.md) and [code-review](https://github.com/plannotator/coding-agent-field-guide/blob/main/starter/rubrics/code-review.md) rubrics. Their evaluation fixtures show adequate and inadequate work for the same bounded cases.
## A public Plannotator example
The repository applies the method to three public Plannotator OSS changes:
* feedback copied back to an agent must preserve whether the person reviewed a plan, file, or message;
* a long-running Guided Review result must remain attached to the pull request or worktree where it started;
* a Windows cross-drive path returned by `path.relative()` must not be treated as repository-relative.
The third lesson graduated into a shared helper and regression test. The [worked example](https://github.com/plannotator/coding-agent-field-guide/tree/main/examples/backnotprop-plannotator) links each claim to its public issue, pull request, commit, and tests.
Plannotator is the example, not a dependency. Feedback from another review surface can enter the same workflow.
## Set up the starter
1. Copy the repository's [`starter/field-guide`](https://github.com/plannotator/coding-agent-field-guide/tree/main/starter/field-guide) directory into your project.
2. Add the [`AGENTS.md` fragment](https://github.com/plannotator/coding-agent-field-guide/blob/main/starter/AGENTS.md.fragment) to your repository instructions.
3. Copy the two workflows and the rubrics your team will use.
4. Keep the index short.
5. Add no active entry until a person verifies its evidence, scope, and exceptions.
The starter uses Markdown and one small YAML source manifest in the worked example. It has no CLI, database, vector search, hosted memory service, or vendor-specific runtime.
## Using Plannotator feedback
[Plannotator OSS](https://github.com/backnotprop/plannotator) lets a person review plans, documents, local changes, pull requests, and merge requests, then return comments to the coding agent.
That returned feedback can be one input to the distillation step. Use the final accepted change and current project sources as evidence. Do not publish raw conversations, private code, credentials, customer information, or comments that a public source cannot support.
## Sources and limits
The method combines several documented practices:
* Cursor described an experimental Field Guide used by an agent swarm, including a short injected index and records of surprising encounters. ([Cursor](https://cursor.com/blog/agent-swarm-model-economics))
* ThePrimeagen described recording human corrections in Markdown with commit references and having agents retrieve relevant lessons. His thread does not say that he uses Plannotator. ([Thread](https://x.com/ThePrimeagen/status/2081066227619836308?s=20))
* Anthropic recommends lightweight repository instructions, progressive disclosure, rich references, deterministic checks, and independent verification. ([Context engineering](https://claude.com/blog/the-new-rules-of-context-engineering-for-claude-5-generation-models), [verification loops](https://claude.com/blog/building-verification-loops-in-claude-code-with-skills))
* OpenAI and Google document task-specific evaluation, deterministic checks, human judgment, model graders, and grader-gaming risks. ([OpenAI](https://developers.openai.com/api/docs/guides/evaluation-best-practices), [Google](https://google.github.io/agents-cli/guide/evaluation/))
Saving a lesson changes the context available to a future agent. It does not train or fine-tune the model. A field guide can also become stale, reward its own wording, or retrieve an irrelevant lesson. Keep current project sources authoritative, record disagreements, and audit the guide after material project changes.
## Frequently asked questions
### Is a field guide the same as agent memory?
No. Memory may preserve facts, preferences, or session state. A field guide contains reviewed project lessons with evidence, scope, verification, and explicit status.
### Should a field guide replace `AGENTS.md`?
No. Keep hard constraints, required commands, and a pointer in `AGENTS.md`. Put detailed lessons behind the field-guide index so agents can load them only when relevant.
### Should every review comment become an entry?
No. Most comments should fix only the current task. Preserve a lesson when it is likely to recur, protects a consequential boundary, and cannot be enforced more clearly elsewhere.
### Can an agent create entries automatically?
An agent can draft an entry from reviewed work and durable sources. A person should decide whether to accept, revise, reject, merge, or graduate it.
### Does a field guide improve the model?
It changes the model's task context. It does not prove that the model itself improved. Measure repeated corrections, relevant and irrelevant retrievals, context cost, and maintenance time before claiming that the workflow helped.
# What Is an AI Artifact? Definition and Examples
Source: https://docs.plannotator.ai/learn/ai-development/what-is-an-ai-artifact
An AI artifact is a reusable output created by an AI system, such as a document, image, application, plan, report, video, or code walkthrough. Learn how artifacts differ from chat responses and how people use them.
An **AI artifact** is an output created or substantially assembled by an AI system that becomes a separate thing people can inspect, edit, run, share, review, or reuse. Examples include a research report, implementation plan, image, slide deck, interactive prototype, dashboard, code walkthrough, test report, or product video.
The term does not describe one file format or one company's feature. It describes the role the output plays after the model produces it.
A sentence in a chat is usually a response. A structured plan saved for a team, an HTML explainer opened in a browser, or a video attached to a product review can become an artifact.
## What makes an AI output an artifact?
There is no universal technical standard for AI artifacts. Products use the word differently, and some products provide the same experience under names such as *canvas*, *document*, or *preview*. Two practical tests are especially useful:
1. **It can be inspected independently.** Someone can review the artifact itself instead of reconstructing it from the surrounding conversation.
2. **It supports further work.** People or agents can edit, share, reference, approve, publish, or build on it.
An artifact does not need to satisfy every condition perfectly. A generated image downloaded from a chat may have no version history, but it is still a reusable output. A live incident page may update continuously and preserve a much richer lifecycle.
## What are common examples of AI artifacts?
AI systems now produce artifacts across most forms of knowledge work.
| Artifact type | Examples | What it helps people do |
| - | - | - |
| Documents | Plans, specifications, reports, briefs, research summaries, meeting notes | Read, edit, approve, and preserve reasoning |
| Visuals | Images, diagrams, annotated screenshots, presentations, design explorations | Compare options and understand spatial or visual information |
| Interactive work | HTML explainers, dashboards, calculators, prototypes, small applications | Explore information, test an idea, or use a purpose-built interface |
| Software work | Source code, pull request walkthroughs, architecture maps, release checklists | Understand, implement, and review a change |
| Evidence | Test reports, browser traces, benchmark charts, recordings, validation summaries | Check whether a claim about the work is supported |
| Media | Audio, video, animation, product demos | Communicate behavior, narrative, or a finished experience |
The same output can play several roles. An HTML file might be a prototype during planning, a shared explainer during implementation, and review evidence when the work is ready to ship.
## How are people using AI artifacts today?
Different products reveal different parts of the pattern.
### Claude Artifacts separate substantial work from chat
Anthropic uses **Artifacts** as a product name. Claude places substantial standalone content in a dedicated surface beside the conversation so people can edit, reuse, and share it. Anthropic's examples include documents, visualizations, tools, games, and interactive applications. See [What are artifacts and how do I use them?](https://support.claude.com/en/articles/9487310-what-are-artifacts-and-how-do-i-use-them).
Our [Claude Artifacts guide](/learn/ai-development/claude-artifacts) covers supported forms, representative examples, HTML behavior, versions, publishing, sharing, and the manual workflow for annotating an exported file.
Claude Code applies the idea to agent work. It can publish a session's output as a live page, such as a pull request walkthrough, system explainer, dashboard, incident timeline, or release checklist. The page can update at the same link as the session progresses and retain version history. See [Claude Code now supports artifacts](https://claude.com/blog/artifacts-in-claude-code).
### Coding tools are making agent output easier to find
Visual Studio Code's preview [Artifacts panel](https://code.visualstudio.com/docs/chat/chat-artifacts) collects resources such as plans, screenshots, documents, links, and agent-selected files beside a chat or agent session. It can surface outputs by file pattern or media type, accept an artifact list set by an agent, and keep subagent artifacts grouped by their source.
This solves a basic problem: an agent may create useful work without making that work easy to rediscover. A plan buried in a transcript and a plan listed as a named project resource contain similar text, but they do not provide the same working experience.
### Other products use similar ideas without the artifact name
[ChatGPT Canvas](https://help.openai.com/en/articles/9930697-what-is-the-canvas-feature-in-chatgpt-and-how-do-i-use-it) gives writing and code a separate editing surface with inline feedback, version restoration, rendered HTML or React previews, and export options. [Gemini Canvas](https://blog.google/products-and-platforms/products/gemini/gemini-collaboration-features/) similarly lets people create, edit, and share documents and code while previewing generated prototypes.
These products do not need to call every output an artifact to participate in the same shift. The useful work is moving out of an undifferentiated chat stream and into a form designed for editing, viewing, sharing, or execution.
## How is an AI artifact different from a chat response?
| Chat response | AI artifact |
| - | - |
| Read in conversational order | Opened as its own object or surface |
| Depends heavily on surrounding messages | Carries enough structure to inspect independently |
| Often temporary and difficult to find later | Saved, linked, downloaded, published, or indexed |
| Optimized for answering the next turn | Shaped for a specific job, audience, or decision |
| Usually reviewed by the person in the chat | Can be shared with teammates or passed to another agent |
The boundary is contextual. A Markdown response pasted into a repository may become the team's specification. A generated chart becomes an artifact when someone saves it for a report or review. A code block becomes an artifact when it is written to a file, tested, and handed to another person or agent.
## When is an AI artifact more useful than another answer?
An artifact is useful when the work needs a shape that chat does not provide well.
### The information is large or spatial
A long investigation may need a timeline, dependency map, annotated source, or filterable table. Breaking that material into conversational messages makes relationships harder to see.
### People need to compare or interact with the output
A designer might need six interface directions side by side. An engineer might need controls for testing animation values. An operator might need a dashboard that filters incidents by service and time range. The interaction is part of the explanation.
### A team needs one shared object
A plan can move through comments and approval. A report can become a handoff. A prototype can help product, design, and engineering discuss the same behavior. The artifact gives the group something specific to point at and revise.
### The output supports a consequential decision
Screenshots, recordings, traces, test results, and benchmark reports can show whether completed work behaves as claimed. Our guide to [code review artifacts](/learn/code-review/what-are-code-review-artifacts) explains how that evidence fits beside a code diff.
## Why is HTML becoming a common AI artifact format?
AI can generate documents in many formats, but HTML is becoming useful when an artifact needs hierarchy, visual density, or interaction.
An HTML artifact can combine prose, tables, code, images, SVG diagrams, responsive layouts, filters, tabs, and small controls in one portable page. A coding agent can build that page from repository files, connected tools, test output, and session context.
Claude Code engineer Thariq Shihipar describes this workflow in [The unreasonable effectiveness of HTML](https://claude.com/blog/using-claude-code-the-unreasonable-effectiveness-of-html). His examples include implementation plans, design explorations, pull request explainers, incident reports, and purpose-built editing interfaces. Our [HTML versus Markdown guide](/learn/code-context/ai-agent-html-vs-markdown) covers the practical tradeoffs, including source review, accessibility, security, and version history.
HTML is not automatically the right format. Markdown remains easier to diff and maintain for text-first documents. A PNG is better for a fixed image. A video is better for motion. The artifact's job should determine its format.
## Are AI artifacts the same as build artifacts?
Not necessarily.
GitHub defines a [workflow artifact](https://docs.github.com/en/actions/concepts/workflows-and-actions/workflow-artifacts) as a file or collection of files produced during a workflow run and retained after the job completes. Examples include logs, test results, screenshots, binaries, performance output, and coverage reports.
An AI artifact is defined here by its relationship to AI-produced work. A workflow artifact is defined by its relationship to an automated workflow. The categories can overlap. For example, a coding agent may trigger a browser test whose workflow uploads screenshots and a trace. Those files are workflow artifacts, agent outputs, and potential review evidence at the same time.
## What can go wrong with AI artifacts?
Polished output can look more authoritative than it is. The main risks are operational, not cosmetic.
* **It may be wrong.** A diagram can omit an important dependency. A report can misread its sources. A prototype can demonstrate behavior that the implementation does not provide.
* **It may become stale.** A walkthrough of one code revision may no longer describe the current branch. A plan may survive after the team changes the decision.
* **Its provenance may be unclear.** Reviewers may not know which sources, tools, model, prompts, or execution results contributed to it.
* **It may expose sensitive information.** Reports, screenshots, traces, and generated pages can contain source code, customer data, credentials, or internal discussion.
* **It may depend on hidden infrastructure.** An interactive page can stop working when a package, network request, account, or hosted runtime disappears.
* **It may be difficult to find again.** Saving more outputs does not help if they remain scattered across chats, repositories, downloads, and temporary links.
Treat an artifact as a claim with a lifecycle. Identify what it is for, what source material it represents, when it was produced, who can access it, and how long it should remain authoritative.
## How should a team review an AI artifact?
Use questions that match the artifact's job:
1. **What decision or task does this artifact support?** A plan, prototype, validation report, and finished media asset require different review standards.
2. **Which sources and version does it represent?** Link the code revision, dataset, request, or other source record when accuracy depends on it.
3. **What can a reviewer verify directly?** Preserve underlying tests, source files, citations, and execution results instead of relying only on the artifact's summary.
4. **What does the artifact leave out?** A polished walkthrough may cover the intended path while omitting failure states, accessibility, security, or operational behavior.
5. **Where will it live?** Decide whether the artifact is temporary exploration, durable documentation, review evidence, or a maintained product surface.
An artifact can reduce the work required to understand a complicated result. It should not reduce the standard of evidence used to accept that result.
## How current products organize artifacts
Current products provide features such as:
* artifacts that update while an agent continues working;
* outputs grouped by project, session, agent, or subagent;
* version history and stable links;
* direct editing and annotation;
* artifacts connected to the plans, code, tasks, and evidence they describe;
* one artifact becoming useful context for the next agent or workflow.
Open-source Plannotator can [review Markdown and text documents](/open-source/workflows/documents), [render and annotate HTML](/open-source/workflows/html), and collect supported artifacts referenced in a [pull request or merge request](/open-source/workflows/pull-requests). AI artifacts remain more useful when they are understandable and reachable after the session that created them.
The experimental [Artifact Server](/open-source/artifact-server) project provides a local workspace for indexing, previewing, editing, and organizing files created or used by agents.
## Frequently asked questions
### Is every AI-generated response an artifact?
Not usually. A short conversational answer is simply a response. It becomes artifact-like when it is saved or presented as a distinct object that can be edited, shared, reviewed, run, or reused.
### Are AI artifacts only a Claude feature?
No. Anthropic uses **Artifacts** as a product name, but ChatGPT Canvas, Gemini Canvas, VS Code's Artifacts panel, coding-agent outputs, and generated files provide related experiences. The general term is broader than any one product.
### Can an AI artifact be interactive?
Yes. An artifact can be an HTML explainer, dashboard, prototype, calculator, game, or small application. Interactivity is useful when the reader needs to explore options or manipulate information rather than only read it.
### Can an AI artifact be wrong?
Yes. An artifact is generated output, not proof of correctness. Review its sources, version, assumptions, and underlying evidence before using it for an important decision.
### Should teams keep every artifact an agent creates?
No. Keep artifacts that support a decision, preserve useful context, demonstrate behavior, document current knowledge, or can be reused. Temporary explorations and redundant outputs can be discarded according to the team's retention rules.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# What Is an AI Software Factory? How Agent-Native Software Delivery Works
Source: https://docs.plannotator.ai/learn/ai-development/what-is-an-ai-software-factory
An AI software factory is a repeatable delivery system that turns intent and context into agent-executed, evidence-backed software changes, then learns from the result.
An **AI software factory** is a repeatable software-delivery system that turns a signal into explicit intent, grounded context, an executable plan, implemented changes, verification evidence, a shipping decision, and lessons for the next cycle. AI agents can perform much of the execution, but the system also defines inputs, controls, evidence, decision rights, and feedback. One coding agent, one specification workflow, or one CI/CD pipeline is only a component.
The phrase does not have one accepted agent-native definition. This guide offers a vendor-neutral operating model based on primary sources and established software-delivery practices. It does not describe a Plannotator product architecture.
## From software factories to agent-native delivery
“Software factory” predates coding agents. A 2006 Microsoft article described a software factory as a collection of tools, reusable code, documentation, reference implementations, templates, and guidance that automates accepted patterns and standards. The emphasis was industrialized reuse and consistent construction, not autonomous agents. ([Microsoft](https://learn.microsoft.com/en-us/archive/msdn-magazine/2006/december/service-station-web-service-software-factory))
The term later became common in enterprise delivery programs. In AWS's BMW case study, “Software Factory” means a shared set of processes, methods, and tools supporting thousands of developers and a large continuous-integration workload. Those figures describe BMW's program as reported by AWS. They are not benchmarks for every factory. ([AWS](https://aws.amazon.com/solutions/case-studies/software-factory-bmw/))
The current agent-native use keeps the repeatability and control, but changes who can perform the work. Agents can inspect repositories, draft plans, edit code, run tools, collect evidence, and revise their work. That makes context quality, delegated authority, stop conditions, evaluation, and traceable decisions part of the production system.
### Is an AI software factory the same as DevOps or platform engineering?
No. DevOps is a set of cultural and technical practices that joins software development and operations. Platform engineering builds and maintains an internal platform, often with paved paths that developers can use safely. CI/CD automates integration, testing, packaging, and delivery. ([Google Cloud on DevOps and platform engineering](https://cloud.google.com/discover/platform-engineering-vs-devops), [Google Cloud on CI/CD](https://cloud.google.com/blog/topics/developers-practitioners/devops-and-cicd-google-cloud-explained))
An AI software factory can use all three. Its distinguishing scope is the controlled path from an incoming signal through intent, context, agent work, proof, judgment, shipping, and learning. In addition to “Can this change build and deploy?”, it asks “Why should it exist, what authority did the agent have, what evidence supports the result, and what should the next run learn?”
## Why one agent, specification workflow, or pipeline is not a factory
A coding agent can complete a bounded task without a standard intake, durable evidence, shipping authority, or feedback loop. A specification-driven workflow can structure intent and plans without executing or operating the resulting software. A CI/CD pipeline can test and deploy a change without deciding whether the change serves the right user problem.
Calling any one of these a factory hides the missing controls.
| System | Primary job | Typical boundary | What it does not establish by itself |
| - | - | - | - |
| Coding agent | Inspect, edit, run tools, and return work | One task or session | Standard intake, decision rights, durable evidence, release policy, or organizational learning |
| Specification-driven workflow | Turn a request into requirements, design, and tasks | Intent through implementation plan | Execution, independent proof, deployment, operations, or feedback |
| CI/CD pipeline | Integrate, build, test, package, and deliver changes | Commit through release | User intent, contextual grounding, plan quality, or ambiguous product judgment |
| AI software factory | Operate the full controlled delivery loop | Signal through learning | A guarantee of correctness, good strategy, or safe autonomy |
The factory contains tools and workflows. It is not the name of one tool.
## How an AI software factory works
The eight-stage model below is Plannotator's independent editorial synthesis. It is not copied from a vendor architecture and is not a list of Plannotator product capabilities.
Eight-stage agent-native delivery loop
Each stage produces an inspectable input for the next. Learn feeds the next Signal, Intent, Context, or gate.
1. Signal
Capture a user need, incident, support pattern, obligation, or measured opportunity.
2. Intent
State the desired result, scope, constraints, owner, and observable acceptance criteria.
3. Context
Select current code, data, decisions, examples, conflicts, and freshness notes.
4. Plan
Order the changes, dependencies, risks, verification steps, and stop conditions.
5. Execute
Let agents and people make the bounded changes with least-privilege tools and checkpoints.
6. Prove
Run tests and scenarios, capture receipts, and expose failures instead of summarizing them away.
7. Judge and ship
Apply policy and risk-based judgment, then release, revise, reject, or hold.
8. Learn
Turn outcomes into better tests, context, instructions, templates, policies, and signals.
### 1. Signal
A signal is evidence that something may deserve work: a user complaint, an incident, a repeated manual step, a failing service-level objective, a security requirement, or a measured product opportunity. A model-generated idea is also only a signal. It is not approved intent.
Good intake preserves the source, urgency, affected users, and uncertainty. It rejects work that has no owner or no plausible result.
### 2. Intent
Intent turns the signal into a bounded outcome. It names the user problem, desired result, scope, constraints, owner, and acceptance criteria. A [product requirements document](/learn/planning/what-is-a-product-requirements-document) can carry product intent for a substantial change. A smaller task may need only a few explicit criteria.
Acceptance criteria should describe observable behavior. “Improve imports” is not enough. “An admin can preview a 100,000-row import without changing billing data” can be planned and proved.
### 3. Context
Context is selected evidence, not a repository dump. Include the current code paths, interfaces, data rules, accepted decisions, representative examples, known conflicts, and freshness notes that affect the task.
[Rich references](/learn/ai-development/what-are-rich-references) are useful when an agent needs exact prototypes, tests, code examples, or rubrics. The context packet should say which source wins when a stale plan conflicts with current code or an accepted decision.
### 4. Plan
The plan converts intent and context into ordered changes, dependencies, risks, verification steps, and stop conditions. Larger work benefits from an explicit, reviewable plan because errors are cheaper to find before execution.
Use an [AI coding plan](/templates/ai-coding-plan) for the next implementation pass. Use a [technical specification](/templates/technical-specification) for durable behavior and design, an [ADR](/templates/architecture-decision-record) for one consequential architecture choice, or an [RFC](/templates/software-rfc) when a proposal needs broader discussion. These documents have different jobs.
### 5. Execute
Execution may involve one agent, several specialized agents, people, or a mix. The factory defines what each actor can change, which tools it can use, how work is isolated, what checkpoints exist, and when it must stop.
[Long-horizon tasks](/learn/ai-development/what-are-long-horizon-tasks-for-ai-agents) need durable state, explicit handoffs, bounded retries, and recovery after interruption. More runtime is not a substitute for clearer intent or fresher context.
### 6. Prove
Proof links the result to the acceptance criteria. It can include tests, screenshots, accessibility checks, benchmark receipts, migration rehearsals, deploy evidence, and unresolved failures. A generated summary is an index to evidence, not the evidence itself.
Deterministic checks should fail deterministically. Judgment belongs in an anchored rubric with reasons and source links. A [coding-agent field guide](/learn/ai-development/what-is-a-coding-agent-field-guide) can preserve reviewed, project-specific lessons, but enforceable rules should graduate into tests, types, schemas, linters, or policy.
### 7. Judge and ship
This stage combines hard policy with a decision appropriate to the risk. The result may be release, staged rollout, revision, rejection, or hold. The decision record should name the evidence reviewed, the unresolved risks, the decision maker, and the scope of the decision.
Shipping is not always deployment. It can mean merging a library change, enabling a feature for a cohort, publishing a package, completing a migration, or deliberately deciding not to proceed.
### 8. Learn
The learning loop starts with observed outcomes. A failure might create a regression test, a corrected source, a narrower permission, a new stop condition, a better example, or a revised intake rule. A successful pattern might become a reusable skill or paved path.
Saving a transcript or adding more text to a knowledge base is not automatically learning. The lesson must change a future input, control, or decision, and it needs an owner who can remove it when it becomes stale.
## What documents and controls does a software factory need?
The smallest useful control surface is often six Markdown files:
```text theme={null}
software-factory-control-packet/
├── 01-intent.md
├── 02-context.md
├── 03-plan.md
├── 04-review-rubric.md
├── 05-evidence.md
└── 06-decision-log.md
```
The packet separates six jobs:
| File | Job |
| - | - |
| `01-intent.md` | User problem, desired result, scope, constraints, owner, and acceptance criteria |
| `02-context.md` | Source links, code paths, decisions, examples, conflicts, and freshness |
| `03-plan.md` | Ordered changes, dependencies, risks, verification steps, and stop conditions |
| `04-review-rubric.md` | Risk-based checks for intent, correctness, security, operability, and maintainability |
| `05-evidence.md` | Test receipts, screenshots, benchmarks, deploy proof, and unresolved failures |
| `06-decision-log.md` | Choices, rejected alternatives, rationale, author, date, and supersession state |
Copy the complete [software factory control packet template and worked example](/templates/software-factory-control-packet). It is intentionally plain Markdown. A team can version it beside the work without adopting another platform.
The six files are not mandatory categories for every task. A one-line fix with a precise regression test may need only an issue, diff, and test receipt. Use the packet when work spans multiple actors, sessions, systems, or review decisions and the cost of losing the reasoning is greater than the cost of maintaining six small files.
## Where should humans review?
Human review is useful where risk or ambiguity exceeds what a deterministic gate can settle. It does not follow that every change needs a person at every stage.
Use automated gates for questions with stable, machine-checkable answers:
* Does the build, type check, test suite, contract check, or migration rehearsal pass?
* Does the change stay within an allowed path, permission, budget, or dependency policy?
* Does the artifact contain the required fields and evidence links?
* Did the release remain within error-rate, latency, or data-integrity thresholds?
Use human judgment when the answer depends on contested intent, novel tradeoffs, or material consequences:
* Is this the right user problem and is the proposed scope acceptable?
* Does a security, privacy, financial, legal, or irreversible data risk remain?
* Is the evidence representative enough to support the shipping decision?
* Should the team accept a known limitation, change policy, or stop the work?
A low-risk dependency patch with passing tests and a trusted automated policy may flow through without individual review. A billing migration or authentication change may need human judgment at intent, plan, and release. The control should follow the consequence of being wrong, not a ritual review count.
## Worked example: a resumable billing import
The following company, product, people, metrics, results, and identifiers are fictional. They illustrate traceability and do not report a Plannotator customer or product capability.
**Quay Billing** is a fictional subscription-billing product. Its fictional operations team wants a resumable bulk price-adjustment import for billing administrators. The change touches a browser interface, an API, durable job state, tenant authorization, audit events, performance, and staged rollout.
### Intent and acceptance criteria
| ID | Acceptance criterion |
| - | - |
| AC-1 | An admin can preview a CSV with up to 100,000 rows or 50 MB, see row-level errors, and make no billing changes. |
| AC-2 | Confirming a valid preview applies each adjustment exactly once across retries and worker restarts. |
| AC-3 | Only an administrator from the same tenant can start, confirm, cancel, or read an import; start, confirm, cancel, and completion events are audited. |
| AC-4 | The interface reports progress, supports cancellation before commit, exports rejected rows, and passes the defined keyboard and screen-reader checks. |
| AC-5 | On the fixed fictional staging dataset, preview p95 is below 90 seconds and apply p95 is below five minutes. |
| AC-6 | The feature can roll out at 5%, 25%, and 100% with a kill switch; recovery after database failover is proved before 100%. |
### Plan, rubric, and stop conditions
The fictional plan creates an immutable upload record, a resumable validation job, a preview API, an idempotent apply ledger, an admin interface, audit events, and staged-release controls. Each implementation step names the acceptance criteria and verification it supports.
The rubric treats data integrity, tenant isolation, and recovery as blocking. Accessibility and operability have named checks. The plan stops if a retry duplicates an adjustment, cross-tenant access succeeds, cancellation can leave a partial commit, or the fixed benchmark exceeds its limit twice.
### Evidence and decision
| Evidence | Result | Criteria |
| - | - | - |
| E-1 preview integration suite and database snapshot | Fictional pass: 100,000 rows parsed, 217 rejected, zero billing rows changed | AC-1 |
| E-2 retry and restart fault-injection suite | Fictional pass: 84,913 valid adjustments, 84,913 unique ledger entries | AC-2 |
| E-3 authorization matrix and audit-event assertions | Fictional pass: cross-tenant and non-admin requests denied; four required event types recorded | AC-3 |
| E-4 desktop/mobile screenshots, keyboard script, and screen-reader notes | Fictional pass against the packet's defined checks | AC-4 |
| E-5 fixed-dataset benchmark | Fictional pass: preview p95 71 seconds; apply p95 4 minutes 12 seconds | AC-5 |
| E-6 staged rollout and failover rehearsal | Fictional partial: 5% and 25% stable; failover rehearsal not yet run | AC-6 unresolved |
The fictional decision log records: proceed to 25%, keep the kill switch armed, and hold 100% rollout until E-6 contains a passing failover receipt. The packet does not turn an unresolved criterion into a green summary. It carries the open result into the shipping decision.
The [full copyable example](/templates/software-factory-control-packet#completed-fictional-example-quay-billing) includes all six files.
## How should a factory learn from failures?
Start by classifying where the failure entered the loop:
| Failure | Likely correction |
| - | - |
| Wrong problem selected | Improve Signal evidence or Intent decision rights |
| Agent used stale architecture | Fix Context freshness and source precedence |
| Work expanded unexpectedly | Narrow Plan scope, permissions, or stop conditions |
| Tests passed but behavior failed | Add a representative scenario or acceptance criterion to Prove |
| Unsafe change reached users | Tighten Judge and ship policy, rollout controls, or recovery |
| Same correction recurs | Graduate the lesson into a test, type, policy, template, skill, or field-guide entry |
Do not reward the system for producing more artifacts. Measure whether the correction reduces repeated failures, false blocks, time to useful evidence, or recovery cost. Keep a counterexample and a removal condition for learned rules so one incident does not become permanent bureaucracy.
## How current vendor models differ
Several vendors now use “software factory” for agent-native delivery, but their published emphases differ:
* **Factory.ai** describes standardized intake, context, planning, execution, review, delivery, and observability. Its architecture article keeps people focused on intent, review, and policy, and recommends explicit reviewable plans for larger work. ([Architecture](https://factory.ai/articles/what-is-a-software-factory-architecture), [category guide](https://factory.ai/articles/what-is-a-software-factory))
* **8090** centers continuous context flow through a knowledge base, a unified assembly line, a factory floor plan with ownership, reusable roles and skills, and lifecycle feedback. Its article also says some parts remain experimental. ([8090](https://www.8090.ai/blog/the-software-factory-production-system))
* **StrongDM** describes people defining intent, scenarios, and constraints while agents generate and validate software. It argues that scenario validation can replace code review within its own model. That is StrongDM's position, not a general result established by this guide. ([StrongDM](https://www.strongdm.com/blog/the-strongdm-software-factory-building-software-with-ai))
These accounts show an emerging category, not a settled standard. The eight-stage model in this guide is an editorial synthesis designed to make assumptions and controls inspectable. It does not rename any vendor's architecture.
## Limits of the category and the search evidence
“AI software factory” can overstate the maturity of a workflow. Repeatable inputs do not guarantee good intent. More agent autonomy does not guarantee lower cost or higher quality. Evaluation can miss real behavior, feedback can reinforce the wrong objective, and a documented control can still be ignored.
The search evidence behind this page is also limited. Query-volume and competition estimates are provider-modeled, change over time, and do not establish real adoption or reader intent. Much of the current agent-native literature comes from vendors describing their own systems. This guide therefore uses vendor sources only for what those vendors say, separates historical examples from the proposed model, and makes no universal productivity claim.
Evaluate a factory with local evidence: lead time to a proved result, escaped defects, repeated corrections, rollback and recovery performance, human attention required, false blocks, cost, and user outcomes. Record the baseline and the conditions of the measurement.
## Where Plannotator fits
Plannotator can be the shared planning and human-judgment surface inside a larger software factory. On the product surfaces that support them, people and agents can inspect plans, PRDs, specifications, ADRs, Markdown, HTML, folders, annotations, comments, and versions.
Plannotator is **not** an end-to-end software factory. It does not provide autonomous execution, model routing, CI/CD, deployment, monitoring, scenario validation, or a complete control plane. Those responsibilities remain with the agents, development tools, delivery systems, and operating controls a team chooses.
See the current shared-review workflow, or start with the open-source [document review workflow](/open-source/workflows/documents).
## Frequently asked questions
### What is an AI software factory in one sentence?
It is a repeatable delivery system that connects signal, intent, context, planning, agent execution, proof, shipping judgment, and learning through explicit controls and evidence.
### How is it different from a coding agent?
A coding agent performs work. A software factory defines how work enters, what context and authority the agent receives, how the result is proved and judged, and what changes after success or failure.
### Is it the same as CI/CD or platform engineering?
No. CI/CD and platform engineering can be important factory components. They do not by themselves establish user intent, agent context, plan quality, evidence sufficiency, or learning across the whole delivery loop.
### Does every change need human review?
No. Low-risk, well-bounded changes can pass trusted automated gates. Human judgment is most useful where intent is ambiguous or the consequences involve security, privacy, money, legal obligations, irreversible data, or a large user impact.
### What is the minimum control packet?
For substantial multi-stage work, use intent, context, plan, review rubric, evidence, and decision-log files. For a small, reversible change, use fewer artifacts if the issue, diff, checks, and decision remain clear.
*Published and last reviewed July 27, 2026. Written and maintained by the Plannotator documentation team.*
# What Is an LLM Codebase Wiki? Pros, Cons, and Whether You Need One
Source: https://docs.plannotator.ai/learn/ai-development/what-is-an-llm-codebase-wiki
An LLM codebase wiki uses AI to generate and maintain documentation about a software repository. Learn how codebase wikis work, where they help, where they create cost or context rot, and how they compare with spec-driven development.
An **LLM codebase wiki** is AI-generated documentation that explains a software repository through architecture pages, system maps, feature summaries, diagrams, source links, and searchable answers. It gives engineers and coding agents a faster way to find where important logic lives and how parts of the repository connect.
Not every repository needs one. A codebase wiki is most useful when engineers and agents repeatedly spend time rediscovering the same architecture. It is less useful when the repository is small, its maintained documentation already works, or nobody checks the generated pages for errors.
A generated wiki can help people navigate a codebase. It should not silently become the authoritative record of how the software is supposed to behave. Approved specifications, contracts, decision records, code, tests, and runtime evidence answer questions that a generated summary cannot answer on its own.
## What does an LLM codebase wiki contain?
Most codebase wikis are generated from source files, repository structure, configuration, and Git history. Depending on the product and repository, the output can include:
* an architecture overview;
* descriptions of major systems and modules;
* request, data, and control-flow diagrams;
* entry points and important source files;
* feature and API summaries;
* setup and contribution guidance;
* links from explanations to the code they describe;
* a question-and-answer interface for people or agents.
The wiki becomes a derived view of the repository. A generator scans the code, plans a documentation structure, writes or updates pages, and makes those pages available through a website, Markdown directory, coding agent, or search tool.
Some systems regenerate the entire wiki. Others compare the current revision with a previous commit and update only the affected pages. Either approach can reduce the time spent writing an initial architecture guide. Neither approach proves that the resulting explanation is complete or correct.
## Where did the LLM wiki idea come from?
Andrej Karpathy's [LLM Wiki proposal](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) describes a general pattern for building personal knowledge bases with language models. It is broader than software documentation.
Karpathy separates the system into three layers:
1. **Raw sources** remain immutable and authoritative.
2. **The wiki** contains LLM-generated summaries, concept pages, comparisons, and links.
3. **A schema file** such as `AGENTS.md` tells the agent how to ingest sources, answer questions, and maintain the wiki.
In that model, the LLM owns the synthesis layer. The person curates sources, reviews important updates, and decides which questions deserve further investigation. The wiki preserves useful synthesis so the model does not have to reconstruct the same connections during every conversation.
Codebase-wiki products apply a similar idea to repositories. The source material is code and Git history. The compiled layer is a set of architecture pages, diagrams, and searchable explanations. LangChain's introduction to [OpenWiki](https://www.langchain.com/blog/introducing-openwiki-an-open-source-agent-for-repo-documentation) explicitly cites Karpathy's pattern, Cognition's DeepWiki, and Factory's AutoWiki as related work.
## How current codebase wikis work
The products share a category but make different choices about generation, storage, and agent access.
| Product or pattern | What it generates | How it stays current | How agents use it | Operational limit |
| - | - | - | - | - |
| [Cognition DeepWiki](https://docs.devin.ai/work-with-devin/deepwiki) | Architecture diagrams, summaries, source links, and repository pages | Regenerated repository snapshots | Ask Devin, Devin sessions, and MCP | Large repositories may need a human-authored `.devin/wiki.json` to prevent important areas from being omitted |
| [Factory AutoWiki](https://factory.ai/news/wiki) | Structured pages, architecture explanations, visuals, and narrated walkthroughs | On demand or through CI on every push | Factory Droids read the same wiki presented to engineers | Generation and review still consume compute and team attention |
| [LangChain OpenWiki](https://www.langchain.com/blog/introducing-openwiki-an-open-source-agent-for-repo-documentation) | A Markdown codebase wiki | Scheduled updates based on Git diffs | `AGENTS.md` or `CLAUDE.md` points the agent to the wiki | Hundreds of pages still require routing and retrieval rather than automatic loading |
| Karpathy's LLM Wiki pattern | An interlinked synthesis over immutable sources | Ingest, query, and periodic lint operations | A schema file defines the agent's maintenance rules | The original pattern is for general knowledge work, not specifically source code |
Kapa belongs to an adjacent category. Its [knowledge platform](https://docs.kapa.ai/) indexes documentation, source code, support tickets, community discussions, and other product knowledge for customers, employees, and agents. It shows the broader demand for maintained organizational context, but its primary job is not to generate a wiki from one repository.
## What are the advantages of an AI-generated codebase wiki?
### Faster orientation in unfamiliar code
A source-linked architecture page can show a new engineer where requests enter the system, which service owns a particular workflow, and where data is stored. This is especially useful in old repositories, large monorepos, and systems divided across several repositories.
The same map can help a coding agent decide which files to inspect before proposing a change. Without a map, each new session may spend time rebuilding an incomplete model of the repository from filenames, searches, and scattered documentation.
### Reusable explanations
Repository exploration produces useful conclusions: which components own a feature, how an authorization check flows through the system, or why one package depends on another. A maintained wiki can preserve those conclusions instead of leaving them in chat transcripts that the next engineer or agent will never see.
### A shared starting point for people and agents
Factory and Cognition both present wiki content to engineers and their coding agents. That can reduce a common coordination failure where a person reads one set of documentation while the agent relies on different instructions or guesses from the source tree.
The benefit depends on traceability. An explanation that links to exact source files and a named repository revision can be inspected. An uncited paragraph is harder to distinguish from a plausible but incorrect summary.
### Documentation versions tied to code
Factory treats AutoWiki as a build artifact and records the commit, branch, and timestamp for each run. This is a useful model for generated documentation. A derived artifact can be rebuilt, compared, or discarded without pretending that every generated sentence was approved by the team.
## What can go wrong with an LLM codebase wiki?
### Regeneration does not guarantee accuracy
A scheduled job can finish successfully and still preserve a wrong interpretation. The generator may mistake a compatibility shim for the preferred architecture, describe a test fixture as production behavior, or infer a product rule from an implementation detail.
Fresh prose can be wrong in a new way. Teams need to distinguish *recently generated* from *reviewed and supported by evidence*.
### Automatic coverage still needs human direction
DeepWiki supports a `.devin/wiki.json` file containing repository notes and an explicit page structure. Its documentation recommends this for large repositories when automatic planning misses important folders or components.
The steering file is useful, but it also reveals where the maintenance work moved. A person still has to identify what matters, recognize gaps, specify the intended coverage, and review the next generation.
### Maintenance cost changes form
LLMs reduce the manual work of drafting summaries and updating cross-references. The remaining cost includes:
* generation and model usage;
* CI jobs and storage;
* review of changed documentation;
* adjustments to page structure and steering rules;
* investigation of missing or contradictory claims;
* access control for sensitive architecture;
* recovery when generated updates create noisy diffs.
Cognition's [2026 release notes](https://docs.devin.ai/release-notes/2026) expose expected ACU ranges and a cost breakdown for DeepWiki generation. Documentation generation has a measurable compute budget in addition to review time.
### Generated prose can acquire false authority
Well-formatted pages and clean diagrams can look settled even when they represent one model's interpretation. A wiki can flatten uncertainty, omit rejected alternatives, or make two conflicting implementations appear to follow one coherent design.
Readers need to know whether a page is generated, which revision it describes, what sources support it, and whether a responsible person has reviewed it.
### Security boundaries become easier to cross
A codebase wiki can collect sensitive architecture, service relationships, authentication flows, internal hostnames, and operational details into one searchable surface. Information that was previously difficult to assemble may become easy to browse or share. Repository permissions, wiki permissions, generated exports, and agent access must follow the same security boundaries as the underlying code.
## Can a codebase wiki cause context rot?
Yes. A codebase wiki reduces repeated exploration only when it routes the agent to a small, current set of relevant pages. Copying a large wiki into the prompt, or repeatedly loading broad sections of it, can make the model less reliable even when the input remains within its advertised context window.
Chroma's [Context Rot](https://www.trychroma.com/research/context-rot) evaluation tested 18 models and found increasingly unreliable, nonuniform performance as input length grew, including on controlled tasks. The earlier [Lost in the Middle](https://arxiv.org/abs/2307.03172) study found that models often used relevant information less reliably when it appeared in the middle of a long input.
Matt Pocock uses the practical term [attention degradation](https://www.aihero.dev/ai-coding-dictionary/attention-degradation) for the same failure during long agent sessions. The dedicated [context rot guide](/learn/ai-development/what-is-context-rot) covers the research and mitigation steps.
Context-window capacity is not the same as useful attention. A wiki can make retrieval worse before the model reads a page:
* similar page titles can produce ambiguous search results;
* broad summaries can retrieve several systems when the task concerns one;
* old and current behavior can appear together without clear version labels;
* generated cross-links can lead the agent through a growing chain of secondary summaries;
* an instruction such as “read the wiki” provides no boundary for when the agent should stop.
OpenWiki uses a narrower pattern. It adds a short reference to `AGENTS.md` or `CLAUDE.md`, then lets the coding agent open relevant wiki pages when it needs repository context. This avoids loading hundreds of pages into every run. It does not prove that the agent selected the right pages, that those pages are current, or that a concise source file would not have been cheaper to inspect directly.
A useful wiki needs a concise index, scoped page summaries, links to primary sources, a named repository revision, and routing instructions that explain which pages apply to which work. The agent should load the smallest useful set and return to code, tests, specifications, or decision records when a wiki claim affects the change.
## What does context curation cost?
Generated documentation moves maintenance work into generation, routing, and review. OpenWiki's example [GitHub Actions workflow](https://github.com/langchain-ai/openwiki/blob/main/examples/openwiki-update.yml) runs once a day and opens a pull request with documentation changes. Each refresh still has several costs:
| Cost | Where it appears |
| - | - |
| Model inference | Initial generation, repository analysis, diff interpretation, and rewritten pages |
| CI and storage | Scheduled jobs, traces, generated files, branches, and pull requests |
| Human review | Checking changed explanations, missing coverage, source links, and false claims |
| Retrieval design | Maintaining the index, page boundaries, summaries, and agent-routing instructions |
| Failure recovery | Correcting stale pages or investigating a change made from the wrong context |
If updates only add pages and cross-links, retrieval becomes noisier. If updates run too rarely, the wiki becomes stale. If they run on every small change, model and review costs may exceed the navigation time saved. OpenWiki documents the automation pattern, but it does not establish that continuous generation is cost-effective across repositories.
## Compiling knowledge can discard the facts you need
An LLM codebase wiki compresses source material into an easier form. Compression creates a second risk before retrieval begins: the generated page may omit a rare constraint or exception.
The 2026 [WiCER study](https://arxiv.org/abs/2605.07068) calls this the *compilation gap*. In its benchmark, blind compilation produced a 53 to 60 percent catastrophic-failure rate. An iterative process that tested the compiled wiki with diagnostic questions recovered much of the lost quality.
Other research reports promising results. [Retrieval as Reasoning](https://arxiv.org/abs/2605.25480) found that a self-evolving LLM Wiki outperformed several retrieval and graph baselines on the authors' multi-hop and structured multi-document tests. A separate [progressive-disclosure study](https://arxiv.org/abs/2607.04576) found that page summaries and targeted retrieval reduced answer-generation cost in its corpus, although narrower evidence introduced a small correctness and completeness trade-off. That study also reports a failed judge-reliability threshold and limits its conclusions to one corpus and answering model.
The research supports testing and targeted access, not blind faith in generated summaries. A team should probe what the wiki failed to preserve, not only whether the pages read well.
## A codebase wiki is not a specification
Wikis, specifications, decision records, and implementation plans preserve different information.
| Artifact | Question it should answer |
| - | - |
| Generated codebase wiki | Where does this logic live, and how do the visible parts connect? |
| Current specification or contract | What should the system do, including constraints and acceptance criteria? |
| Architecture decision record or accepted RFC | What did the team decide, why, and what consequences did it accept? |
| Change plan | How will this particular change be implemented and verified? |
| Code, tests, and runtime evidence | What has actually been implemented, and what behavior can be demonstrated? |
Source analysis can reveal that an API uses a particular database or that a request passes through three services. It usually cannot recover a rejected alternative, a legal constraint discussed in a meeting, or the reason the team accepted a slower but safer design.
[Architectural decision records](https://docs.aws.amazon.com/prescriptive-guidance/latest/architectural-decision-records/adr-process.html) preserve the context, decision, and consequences of consequential choices. Accepted records remain immutable and can be superseded by later decisions. A generated wiki can link to those records. It should not rewrite their history to fit the latest code.
## A wiki does not replace specifications
A codebase wiki describes implementation after enough code exists to analyze. Specifications record intended behavior before implementation. [GitHub Spec Kit](https://github.github.com/spec-kit/) and [OpenSpec](https://github.com/Fission-AI/OpenSpec) both make requirements and plans reviewable before an agent writes code.
Matt Pocock's [engineering skills](https://github.com/mattpocock/skills/blob/main/skills/engineering/README.md) also separate domain context and architecture decisions from implementation tasks. In [one issue](https://github.com/mattpocock/skills/issues/130), users reported that `CONTEXT.md` had grown beyond 500 lines and mixed domain truth with implementation details. The suggested correction was to keep it concise and remove implementation detail.
Spec-driven development has its own failure modes. Teams can accumulate abandoned specifications, confuse historical plans with current requirements, or add templates that nobody reviews. A file named `spec.md` is not authoritative merely because it exists. The team must define ownership, approval, verification, and whether completed feature records remain historical or update a living specification.
[How to keep codebase documentation current when AI agents write code](/learn/code-context/living-documentation-for-ai-agents) explains how accepted intent, implementation discoveries, and verified behavior can flow into maintained documentation without rewriting the original decision history.
## A practical structure for codebase knowledge
One document does not need to answer every repository question. A team can give each record a bounded role:
| Repository question | Preferred source |
| - | - |
| What should the product do? | Approved current specification or contract |
| Why did we choose this design? | Accepted ADR or RFC with supersession status |
| What has been implemented? | Code, tests, runtime evidence, and generated contracts |
| Where does this logic live? | Source-linked codebase wiki or code search |
| What should an agent read first? | Concise `AGENTS.md` or `CLAUDE.md` routing instructions |
The instruction file should identify the current sources and explain when to use them. It should not contain the entire knowledge base.
The generated wiki should include source links, a repository revision, and a visible generated or reviewed status. It can summarize approved specifications and decision records as long as it links back to them and preserves their authority. When the implementation contradicts an approved specification, the wiki should expose the disagreement instead of choosing a winner.
Plans and decision records can accumulate into a useful history, but they should not become an unlabeled pile. Current specifications explain intended behavior. Immutable decision records explain how the team reached it. Completed plans show how particular changes were executed. The wiki helps people find the relevant record.
## Do you need an LLM codebase wiki?
Consider adding one when:
* the codebase is large, old, unfamiliar, or split across repositories;
* onboarding and cross-team navigation are recurring costs;
* agents repeatedly rediscover the same architecture and entry points;
* generated explanations link to source and a named repository revision;
* the team can review consequential pages and correct missing coverage;
* regeneration costs less than the repeated exploration it replaces.
You probably do not need one when:
* the repository is easy to navigate directly;
* current product, technical, API, and operational documentation already works;
* types, tests, contracts, and a concise instruction file answer most questions;
* nobody reads or reviews the generated pages;
* generated updates create more churn than useful knowledge;
* the actual problem is ambiguous or unapproved intent.
Start with concise agent instructions, current specifications and contracts, and a decision log. Add a generated wiki when repeated navigation cost becomes visible. Treat it as a derived repository map until the team deliberately reviews and promotes a claim into an authoritative document.
## Frequently asked questions
### What is the difference between an LLM wiki and an LLM codebase wiki?
An LLM wiki is a general pattern in which a language model compiles sources into a maintained, interlinked knowledge base. An LLM codebase wiki applies that pattern to a software repository and usually emphasizes architecture, modules, source links, and coding-agent access.
### Is DeepWiki the same as an LLM wiki?
DeepWiki is Cognition's codebase-wiki product. It automatically indexes repositories and generates architecture diagrams, documentation, source links, and searchable answers. Karpathy's LLM Wiki is a broader knowledge-management pattern rather than one codebase product.
### Do AI coding agents need a codebase wiki?
No. Agents need relevant, current context. In a small or well-documented repository, code search, tests, contracts, and concise instructions may provide enough context. A wiki becomes useful when it reduces recurring exploration in a larger or less familiar system.
### Can a codebase wiki replace technical documentation?
It can replace some manually written repository overviews. It should not replace approved specifications, API contracts, runbooks, security policies, or decision records unless the team has reviewed the generated content and intentionally assigned it that role.
### What is the difference between a codebase wiki and spec-driven development?
A codebase wiki usually describes an existing implementation. Spec-driven development records intended behavior, constraints, plans, and acceptance criteria before implementation. Teams can use both: specifications guide the change, while the wiki helps engineers and agents locate the affected code.
### How do you keep an AI-generated codebase wiki current?
Regenerate it from a named repository revision, use Git diffs to identify affected pages, preserve source links, and review consequential changes. Automated refresh reduces manual drafting but does not verify that the interpretation is correct.
### Can an LLM codebase wiki cause context rot?
Yes. Loading too many pages or low-signal summaries can make relevant information harder for the model to use. Keep agent instructions short, route to a small set of relevant pages, and preserve direct links to source, specifications, and decision records.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# What Is Context Rot? Why AI Agents Get Worse Over Time
Source: https://docs.plannotator.ai/learn/ai-development/what-is-context-rot
Context rot is the decline in an AI agent's reliability as its working context grows. Learn why it happens, why larger context windows do not fully solve it, and how to reduce it.
**Context rot** is the gradual decline in an AI model's reliability as the information in its working context grows. The model may still be inside its advertised context-window limit, yet become worse at finding the right fact, following an earlier instruction, or connecting information spread across the session.
For an AI agent, context includes more than your latest message. It can include the system prompt, chat history, files, tool instructions, tool results, retrieved documents, plans, errors, and the agent's own previous work. All of that competes to influence the next answer or action.
Context rot does not mean the model has literally decayed. It means the working set has become harder to use well.
## Think of context as a desk, not a filing cabinet
A large filing cabinet can hold more documents. A large desk can also hold more documents, but covering every inch of it does not necessarily help you make one decision.
The model needs the right material on its desk for the current step. A concise specification, the relevant source files, and one failed test may be more useful than the entire repository, a long transcript, every tool result, and several outdated plans.
This is the practical distinction:
* **Context capacity** is how much the model can accept.
* **Effective context** is how much of that material the model can use reliably for the task.
The first number appears on a model card. The second depends on the model, the task, the position and similarity of relevant information, the amount of distracting material, and how the agent manages its working state.
## Context windows grew from thousands to millions of tokens
GPT-3 was trained with a [2,048-token context window](https://arxiv.org/pdf/2005.14165). Anthropic expanded Claude from 9,000 to [100,000 tokens in 2023](https://www.anthropic.com/news/100k-context-windows). Google introduced a [one-million-token Gemini 1.5 Pro window in 2024](https://blog.google/innovation-and-ai/products/google-gemini-next-generation-model-february-2024/). By 2026, [Claude Fable 5 supported 1M tokens](https://platform.claude.com/docs/en/about-claude/models/overview). The [GPT-5.6 family supported 1.05M](https://developers.openai.com/api/docs/models).
Context-window capacity
From 2,048 tokens to today's million-token frontier
2020 · GPT-3
2,048
tokens
2023 · Claude
100K
tokens
2024 · Gemini 1.5 Pro
1M
tokens
2026 · Fable 5 and GPT-5.6
1M+
tokens
Advertised capacity grew more than 500 times between GPT-3 and GPT-5.6. Useful attention did not become uniform by the same factor.
Larger windows are genuinely useful. They let models inspect longer documents, more code, extended video, and richer histories in one request. They also delay the hard limit where old material must be removed or summarized.
They do not guarantee that every included detail will influence the result equally well.
## Context rot can start before the window is full
A context window has a hard boundary: the maximum input the model accepts. Context rot is usually a performance gradient before that boundary.
Three problems can overlap:
### Relevant information becomes harder to select
The model may need to find one constraint among many similar notes, connect facts that use different words, or distinguish the current decision from an older one. This is harder than retrieving an exact phrase from an otherwise unrelated document.
### Distracting context is not neutral
Old plans, repeated instructions, failed approaches, broad tool output, and almost-correct examples can compete with the current task. A related but wrong statement may be more distracting than completely unrelated text.
### Long sessions accumulate contradictions
An agent produces new state on every turn. It reads files, runs commands, receives errors, writes plans, revises plans, and explains its actions. If obsolete conclusions remain beside current ones, the model must infer which version still applies.
That is why adding more explanation can make a struggling session briefly better, then worse. The repeated instruction receives fresh emphasis, but the session also grows.
## What does the research show?
There is no single benchmark that captures every real agent workflow. Several lines of research point to the same practical warning.
* Chroma's [Context Rot evaluation](https://www.trychroma.com/research/context-rot) tested 18 models. Performance became increasingly unreliable as input length grew, even when the researchers held the task itself constant. The effect varied by model, input structure, semantic similarity, and distractors.
* [Lost in the Middle](https://arxiv.org/abs/2307.03172) found that models often used relevant information more reliably when it appeared near the beginning or end of a long input than when it appeared in the middle.
* [RULER](https://arxiv.org/abs/2404.06654) moved beyond simple retrieval to multi-hop tracing and aggregation. Nearly all evaluated models declined as context grew, and only half maintained satisfactory performance at 32,000 tokens despite advertising windows of at least that size.
* [NoLiMa](https://arxiv.org/abs/2502.05167) removed obvious word overlap between a question and the relevant passage. Eleven of thirteen evaluated models fell below half of their strong short-context baselines at 32,000 tokens.
These tests do not say long context is useless. They show that fitting information into the window and using it reliably are different achievements.
They also should not be read as a 2026 model leaderboard. The studies establish recurring long-context failure patterns, but most predate Claude Fable 5 and GPT-5.6. Current frontier models are more capable, and teams should measure them on their own tasks rather than assume an older benchmark score still describes today's model.
## What does softmax have to do with it?
Most modern language models use an attention mechanism to decide how strongly parts of the input should influence one another. Softmax helps turn many possible relationships into a weighted distribution.
The paper [Softmax Is Not Enough](https://arxiv.org/abs/2410.01104) proves a narrower result: learned softmax circuits can lose sharpness when they must choose across more items than they saw during training, even on a simple maximum-selection task. The authors describe this as a problem of sharp size generalization.
In plain language, a selection that was decisive across a short list can become less decisive as the list grows.
That is one useful explanation for why more possible inputs can make selection harder. It is not proof that softmax alone causes every long-session failure. Training distribution, position handling, retrieval quality, task complexity, contradictory information, and the agent harness also matter.
## Why do AI agents seem to get worse over time?
Long-running agents create context while they work. A coding agent may begin with a clear task and a few files, then accumulate search results, source files, test logs, screenshots, failed patches, review feedback, and its own explanations.
Matt Pocock calls the practical symptom [attention degradation](https://www.aihero.dev/ai-coding-dictionary/attention-degradation). The model has not changed, but constraints that worked earlier begin to slip. The agent may ask a question that was already answered, ignore a file it read, repeat a failed approach, or introduce code that conflicts with an earlier decision.
Mike Ramos uses two pop-culture metaphors in [50 First Dates with Mr. Meeseeks](https://backnotprop.com/blog/50-first-dates-with-mr-meeseeks/):
* The model is like a person who must watch a briefing tape to reconstruct what happened before. The current context is that tape.
* A chat is like a short-lived worker created for one task. Keeping the same worker around indefinitely can produce increasingly strange behavior.
The metaphors are intentionally simple, but the operating advice is sound: do not mistake a long transcript for durable memory, and do not keep one session alive merely because it contains history.
Agent products may add memory, compaction, files, search, or summaries. Those features can improve continuity. The underlying model still acts on the material loaded for the current inference. Stored knowledge helps only when the right part returns at the right time.
## Will better models solve context rot?
They can reduce it. Claude Fable 5 and GPT-5.6 are designed for ambitious long-running work and ship with roughly million-token windows. Newer models often handle longer inputs, more distractors, and more complex retrieval better than earlier models.
That progress does not turn a long transcript into reliable memory. The same million-token request can contain current instructions, obsolete plans, repeated tool output, and several plausible but conflicting answers. More capacity gives the model room to receive them all; it does not decide which ones the team still trusts.
Current agent products are also managing context instead of relying on one ever-growing prompt. Anthropic's [context-window documentation](https://platform.claude.com/docs/en/build-with-claude/context-windows) recommends compaction for conversations approaching the limit, while its broader [context-engineering guidance](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents) recommends structured notes, just-in-time retrieval, and focused subagents. Anthropic says [Claude Fable 5](https://www.anthropic.com/claude/fable) can work for days and delegate to subagents. OpenAI's [GPT-5.6](https://openai.com/index/gpt-5-6/) `ultra` setting coordinates four agents by default for demanding tasks.
Long-running systems still need to divide work, preserve durable state, and keep irrelevant intermediate material out of the coordinating agent's working context.
## How to reduce context rot in an AI agent
The practical goal is to replace an undifferentiated pile of session history with a small, current set of sources and a verifiable handoff.
### Give one session one coherent job
Do not use a single chat as the permanent home for unrelated planning, implementation, debugging, review, and launch work. Start a fresh session when the objective changes materially.
### Keep the current truth outside the transcript
Record the accepted plan, active constraints, current status, failed approaches, and definition of done in maintained files or artifacts. A new agent should not have to reconstruct them from hundreds of conversational turns.
### Retrieve context just in time
Give the agent a concise map of available sources, then let it open the relevant files, specifications, or decisions. Avoid loading an entire wiki or repository when the task concerns one subsystem.
### Remove obsolete tool output
Raw logs and tool results are useful while diagnosing a problem. After the conclusion is recorded, the full output may become noise. Keep the finding and a pointer to the evidence.
### Compact with a verification step
A summary can omit the fact that matters later. After compaction, check that the objective, constraints, decisions, unresolved risks, modified files, test results, and next action survived.
### Use focused subagents for bounded investigations
A subagent can explore one question in a clean context and return a short result to the main task. This keeps detailed search trails out of the coordinating agent's working set.
### Test the workflow, not only the model
Measure wrong-file edits, repeated questions, ignored constraints, recovery after compaction, and the accuracy of handoffs. The effective context window belongs to the entire agent system, not only the model API.
For a concrete test built around required actions, prohibited actions, and final state, see [Why AI Agents Ignore Instructions and How to Test Them](/learn/ai-development/how-to-test-ai-agent-instructions).
## When should you start a fresh agent session?
Reset or hand off when the agent:
* repeatedly ignores a constraint it followed earlier;
* asks for information already present;
* confuses current and superseded plans;
* repeats an approach that already failed;
* keeps adding patches without restoring a coherent design;
* cannot state the current objective, system state, and next verification step clearly.
Do not paste the entire old transcript into the new session. Give the new agent a concise handoff with the objective, current state, decisions, evidence, open questions, and next action. Link to primary files so it can retrieve detail as needed.
For longer work, see [What Are Long-Horizon Tasks for AI Agents?](/learn/ai-development/what-are-long-horizon-tasks-for-ai-agents) and [AI Coding Agent Handoffs](/learn/code-context/ai-coding-agent-handoff).
## Frequently asked questions
### Is context rot the same as reaching the context-window limit?
No. The limit is the maximum amount of input a model accepts. Context rot is declining reliability as the working context grows, and it can appear well before the limit.
### Is context rot the same as hallucination?
No. A hallucination is an unsupported or false output. Context rot can contribute to hallucinations, but it also appears as missed instructions, weak retrieval, repeated work, or inconsistent reasoning.
### Does a one-million-token context window prevent context rot?
No. It increases capacity. It does not guarantee uniform use of every token or equal performance across all long-context tasks.
### Is attention degradation another name for context rot?
They overlap. Context rot names the broader observed decline as input grows. Attention degradation is a useful practitioner term for the way important signals lose influence inside an increasingly crowded session.
### Should I always start a new chat for every task?
Not necessarily. A coherent task benefits from continuity. Start fresh when the objective changes, the session becomes noisy, or the agent can no longer state and follow the current constraints reliably.
### Can retrieval or a codebase wiki solve context rot?
They can reduce unnecessary context when they route the agent to a small, current set of sources. They can make the problem worse when they return broad, stale, overlapping, or contradictory material. See [What Is an LLM Codebase Wiki?](/learn/ai-development/what-is-an-llm-codebase-wiki).
Learn how teams preserve state, verification, checkpoints, and human review across dependent agent work.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# How to Annotate a Website or HTML File
Source: https://docs.plannotator.ai/learn/annotate-any-web-page-or-html-file
Use Plannotator to annotate a URL, local HTML file, or supported folder and return structured feedback to a coding agent. Use App Notes for live pages.
Use Plannotator when a coding agent needs structured feedback on a URL, local HTML file, or folder of documents. Plannotator imports the source into its review UI, where you can highlight text, add comments, and send the annotations to the active agent session.
Use the free, local-first [App Notes browser extension](https://chromewebstore.google.com/detail/app-notes/lkknpieefdjpoancolcioblkpgnhpffl) when you need to click and annotate elements directly on an arbitrary live web page. Plannotator does not place an annotation overlay on the live DOM.
This workflow was added in [Plannotator pull request #545](https://github.com/backnotprop/plannotator/pull/545). The [original short demo](https://d17ygohy796f9l.cloudfront.net/videos/annotate-url.mp4) shows a URL moving into the annotation editor.
## Choose the right website annotation workflow
* **Plannotator:** Import a documentation URL, render a local HTML file, or browse a supported folder, then return annotations to a coding agent.
* **App Notes:** Attach notes to elements on an arbitrary live website, then copy or export the notes from your browser.
App Notes is a separate browser workflow. It does not send notes through a Plannotator annotation session.
## Annotate a URL, HTML file, or folder with Plannotator
Run the CLI directly:
```bash theme={null}
plannotator annotate https://docs.stripe.com/api
plannotator annotate docs/guide.html
plannotator annotate ./docs/
```
In Claude Code and other agents that install the slash command, run:
```text theme={null}
/plannotator-annotate guide.html
```
Codex can run `!plannotator annotate guide.html` or invoke `$plannotator-annotate`. The [agent guides](/open-source/agents) show the exact command for each supported agent.
Plannotator handles each source differently:
| Source | Default behavior |
| - | - |
| URL ending in `.md` or `.mdx` | Fetch the Markdown source directly |
| Other HTTP or HTTPS URL | Fetch through Jina Reader and convert to Markdown |
| Local `.html` or `.htm` | Render the HTML in a sandboxed iframe |
| Folder | Open a file browser for `.md`, `.mdx`, `.txt`, `.html`, and `.htm` files |
Plannotator imports a URL into its annotation UI. The converted page may not preserve every layout, control, or interaction from the live site.
Use `--markdown` to convert a local HTML file to Markdown instead of rendering it:
```bash theme={null}
plannotator annotate docs/guide.html --markdown
```
`--render-html` remains accepted for compatibility, but local HTML already renders as HTML by default.
## Annotate a live website with App Notes
Install [App Notes from the Chrome Web Store](https://chromewebstore.google.com/detail/app-notes/lkknpieefdjpoancolcioblkpgnhpffl) when you need to comment on the live page rather than an imported copy. Turn on annotation mode, click a page element, and add a note. Notes remain available as you move between pages on the site, and you can copy or export them when the review is finished.
App Notes keeps its notes in browser extension storage and has no Plannotator account, analytics, advertising, or cloud storage. Its [source and release packages are available on GitHub](https://github.com/plannotator/app-notes); the [latest release](https://github.com/plannotator/app-notes/releases/latest) includes separate Chrome and Firefox packages with checksums.
## Fetch a page without Jina Reader
Plannotator uses [Jina Reader](https://jina.ai/reader/) by default for ordinary web pages. Jina handles many JavaScript-rendered pages and returns Markdown with navigation and boilerplate removed.
Use direct fetch and local conversion for one run:
```bash theme={null}
plannotator annotate https://example.com/guide --no-jina
```
You can also disable Jina Reader in the environment or local config:
```bash theme={null}
export PLANNOTATOR_JINA=0
```
```json theme={null}
{ "jina": false }
```
Set `JINA_API_KEY` if you want Plannotator to authenticate its Jina Reader requests. The request and page content leave your computer when Jina Reader is used.
## Open the source safely
Raw local HTML runs inside a sandboxed iframe with an opaque origin. Scripts are allowed so interactive artifacts can work. The page can still request external images, fonts, scripts, or APIs, so open untrusted HTML only when you accept that network boundary.
Converted Markdown does not reproduce every layout or interaction. Use raw HTML when the presentation or behavior is part of the review. Use `--markdown` when the text and document structure matter more than the rendered page.
When you select **Send Feedback**, Plannotator returns the selected text, comments, deletions, and global feedback to the active agent session. It does not edit the remote page or the local HTML file.
Review iframe security, local support assets, pinpoint comments, and HTML version history.
Browse supported files in one session and return the combined feedback to your agent.
See the annotation types and inspect the Markdown returned to an agent.
Pick the format that best supports the review question and source of truth.
*Originally published April 12, 2026, by backnotprop. Last reviewed July 19, 2026. Maintained by the Plannotator project.*
# When Should AI Coding Agents Produce HTML Instead of Markdown?
Source: https://docs.plannotator.ai/learn/code-context/ai-agent-html-vs-markdown
Learn when AI coding agents should use HTML artifacts instead of Markdown, with practical tradeoffs for review, security, accessibility, and Git.
AI coding agents should produce **Markdown by default for linear, editable documents** and **self-contained HTML when layout, comparison, interaction, or visualization materially improves understanding**. HTML earns its extra cost only when it helps someone answer a question that would be slower or less clear in prose.
A polished page can still be difficult to edit, noisy to diff, inaccessible, unsafe to render, or more persuasive than accurate. Choose the format that gives reviewers the clearest evidence for the decision they need to make.
## The short decision framework
Start with Markdown. Use HTML when at least one of the following capabilities is central to the work rather than decorative.
| What the team needs to do | Better default | Why |
| - | - | - |
| Read and edit an implementation plan in sequence | Markdown | The source is concise, portable, and easy to review as text |
| Compare several approaches against the same criteria | HTML | A stable grid or synchronized views make differences visible at once |
| Try a UI state, animation, or configuration | HTML | Controls and immediate feedback expose behavior that prose can only describe |
| Explain a system with a spatial map tied to code | HTML | Diagrams, callouts, and linked details can preserve relationships |
| Record an approved decision or durable operating rule | Markdown | The decision should remain readable without a browser or generated interface |
| Walk through a large change with annotated code and evidence | HTML | A purpose-built layout can connect diff regions, screenshots, and test output |
| Work in an unknown viewer or repository-only workflow | Markdown | Plain text has the fewest rendering and security assumptions |
Ask whether the document would still accomplish its main job if its CSS and JavaScript were removed. If yes, Markdown is probably enough. If the job depends on comparing, exploring, manipulating, or seeing relationships, HTML may be justified.
## Why agents are making HTML useful now
An agent can assemble a one-off interface from repository files, Git history, tests, and screenshots without requiring a team to build an internal application.
In [“The unreasonable effectiveness of HTML,”](https://claude.com/blog/using-claude-code-the-unreasonable-effectiveness-of-html) Claude Code engineer Thariq Shihipar describes using HTML for plans, code review, prototypes, explainers, and one-off editing interfaces. His examples use SVG, rendered diffs, controls, and structured layouts to make dense material inspectable.
Visual Studio Code’s preview [Artifacts panel](https://code.visualstudio.com/docs/chat/chat-artifacts) collects plans, screenshots, documents, and agent-selected files beside a conversation; a rule can surface `*.html` files as web pages. This keeps the output findable after the message that created it scrolls away.
Use HTML as an inspection interface. Its polish does not prove that the agent understood the problem.
## Five engineering examples
### 1. An implementation plan
Keep an implementation plan in Markdown when reviewers need to edit the problem, non-goals, changes, rollout, and validation in sequence. A text diff should show exactly what changed before approval.
Add HTML when the problem is spatial: a migration across five services, several rollout paths, or a state machine that is hard to follow linearly. A reviewer could select a service in a system map to reveal its API changes, failure modes, and rollback steps.
Keep the Markdown in Git or the project's normal system when the decision needs a durable record, and use HTML to interrogate it. For the local review loop, see [how to review, revise, and approve an AI coding plan](/learn/code-context/approve-ai-coding-plan-before-execution).
### 2. A comparison of alternatives
Markdown works for two short alternatives. HTML helps when a team must compare several designs against the same constraints.
An agent could render four tenancy models in aligned columns with common rows for isolation, migration work, operator burden, cost, and recovery. Selecting a constraint could emphasize where they differ.
End with an export such as **Copy decision as Markdown**. The accepted choice should not be trapped inside browser state.
### 3. A UI prototype
Request HTML for a visual change when the team needs to try responsive layouts, loading states, keyboard flow, or animation timings before merging product code.
Treat it as a prototype, not implementation evidence. It does not prove the real application uses the correct component, data flow, accessibility behavior, or performance characteristics. Record the selected behavior, then verify the implementation.
For a staged workflow that keeps one brief fixed, see [how to move from an HTML wireframe through a visual mockup to an interactive prototype](/learn/code-context/html-wireframes-and-prototypes-for-coding-agents).
### 4. An architecture explainer
Keep the stable explanation of responsibilities and boundaries in Markdown. HTML can add an explorable graph: select a request path, reveal each owning service, open its source, and compare normal and failure flows.
Keep a linear reading order, source links, and a text description of the boundaries. Identify the repository revision so a future reader can recognize staleness.
### 5. Code-review evidence
An agent reviewing a large pull request could render relevant diff sections with margin annotations, test results, and screenshots. HTML helps because the review question crosses several formats.
The walkthrough remains evidence beside the diff. It does not replace the pull request, tests, or reviewer judgment. It should name the exact commit it describes and make its underlying sources visible. Our guide to [code review artifacts](/learn/code-review/what-are-code-review-artifacts) explains how screenshots, recordings, HTML, reports, and other evidence fit beside code.
The open-source Plannotator app can collect supported HTML attached to a hosted pull request or merge request, render it in a restricted viewer, and keep selected-text feedback with the ordinary review draft. See the [Artifact Gallery workflow](/learn/code-review/review-pull-request-artifacts).
## What Markdown still does better
Markdown's constraints make documents easier to review, edit, and preserve.
* **Source readability:** reviewers can read it in a terminal, editor, or pull-request diff without running it.
* **Focused changes:** a sentence-level edit usually produces a small text diff. Generated HTML often mixes content changes with markup, styles, and layout churn.
* **Direct editing:** people can correct a sentence without reconstructing an interface.
* **Portability:** Markdown travels across repositories, docs generators, issue trackers, and agent context windows.
* **Lower execution risk:** plain Markdown does not need JavaScript, network access, or a privileged browser origin to communicate prose.
* **Durable context:** plans, rules, and handoffs survive changes to the rendering tool.
Markdown also makes incompleteness harder to hide. A sparse section looks sparse. HTML can fill the same gap with cards, color, and whitespace without adding evidence.
## Costs of generated HTML
### Source review and version history
HTML remains text, so Git can diff it. Generated pages can still be poor review material because reformatting, repeated utility classes, inline SVG paths, and bundled scripts can obscure a one-sentence change.
Keep the file unminified. Use stable formatting. Separate structured data from presentation where practical. If the artifact records a team decision, export that decision to Markdown or JSON so reviewers do not have to infer it from DOM changes.
### Security and sandboxing
An HTML file is active content. It can execute scripts, submit forms, open windows, embed other pages, and make network requests. “Self-contained” describes packaging; it does not make the file trustworthy.
GitHub accepts `.html` and `.htm` as [pull-request and issue attachments](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files), with access following repository visibility. That provides transport, not permission to run the file with the authority of your development tools or review application.
Render agent-produced HTML as untrusted. OWASP recommends using a [sandboxed iframe for untrusted content](https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#sandboxed-frames). A hosting system should add a restrictive [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/sandbox), isolate the artifact from application credentials and storage, and grant only the capabilities the page needs. If a static page communicates the idea, disable scripts and network access entirely.
### Accessibility
Visual structure does not guarantee accessible structure. A grid of styled `
` elements may look like a comparison table while giving a screen reader none of the row and column relationships.
Ask for semantic headings, landmarks, tables, labels, alternative text, and native controls. W3C guidance explains why [headings must convey a meaningful hierarchy](https://www.w3.org/WAI/tips/writing/) and why [data tables need programmatic header relationships](https://www.w3.org/WAI/tutorials/tables/). Interactive pages also need a complete keyboard path; native HTML controls provide behavior that custom clickable elements do not get for free.
Test the result at the viewport sizes the team supports, with keyboard-only navigation, and with the team’s normal accessibility checks. If the page cannot provide an equivalent linear explanation, it is a poor replacement for Markdown.
### Presentation quality and accuracy
Agents can create crowded dashboards, ornamental diagrams, inconsistent controls, and charts that exaggerate weak differences. Review the information design, not only the prose.
Verify every claim against the repository, tests, or source data. An elegant architecture map can be wrong, and polished presentation can make a weak claim more persuasive.
## A practical request for an HTML artifact
When HTML is justified, give the coding agent a small contract:
* state the review question the page must help answer;
* make one self-contained, unminified file;
* identify source files, data, and the repository revision;
* use semantic HTML and a complete keyboard path;
* avoid external network requests and third-party scripts;
* keep important conclusions available in a linear text view;
* export any user-made choice as Markdown, JSON, or a copyable prompt;
* label assumptions, missing evidence, and generated examples;
* exclude secrets and customer data.
Then include the artifact in the agent’s completion package rather than leaving it in a temporary chat. The companion guide to [AI coding agent handoffs](/learn/code-context/ai-coding-agent-handoff) explains what else the team should receive after implementation.
## Limitations
No format guarantees understanding. A short Markdown plan can omit the decisive constraint. An interactive HTML explainer can guide reviewers toward the agent’s preferred conclusion. Either can become stale after the implementation changes.
Some teams cannot host or share active HTML safely. Markdown plus committed SVG, screenshots, or reports may provide most of the value with fewer assumptions.
Choose the format as one part of the review path. Teams still need to connect the requested change, approved context, implementation, validation evidence, and final decision. See [how teams understand AI-generated code before shipping it](/learn/code-context/understand-ai-generated-code-before-shipping) for that complete workflow.
## Frequently asked questions
### Is HTML better than Markdown for AI coding agents?
Not generally. Markdown is better for most editable plans, decisions, and handoffs. HTML is better when the task depends on spatial comparison, visualization, interaction, or direct manipulation.
### Should an implementation plan be HTML or Markdown?
Use Markdown for the authoritative plan. Add an HTML explainer when a system map, prototype, or multi-option comparison materially helps reviewers test the proposal. Link the two and identify which file carries the approved decision.
### Can I attach an HTML artifact to a GitHub pull request?
Yes. GitHub supports HTML file attachments in pull-request conversations. Repository visibility controls who can access the uploaded file. Treat attached HTML as untrusted active content and use a safe viewer rather than opening it with privileged application access.
### How do I make an AI-generated HTML artifact safe to review?
Remove secrets, external dependencies, and unnecessary scripts. Render it in an isolated sandbox with a restrictive Content Security Policy. Do not give it access to review-application credentials, local development secrets, or a trusted same-origin context.
### How do I keep an HTML artifact reviewable in Git?
Keep it unminified and deterministically formatted, avoid unrelated style churn, separate content data from presentation where practical, and export durable decisions to a simpler text format. Always record which code revision and source data the page represents.
## Which format should an agent use?
Use Markdown when the team needs to **read, edit, diff, and preserve a document**. Use HTML when the team needs to **compare, explore, manipulate, or see relationships**.
When a workflow needs both, Markdown holds the durable decision while HTML provides a focused interface for understanding it.
Open documents and folders in Plannotator, or use the HTML guide when the rendered page is part of the review.
*Last reviewed July 29, 2026. Maintained by the Plannotator project.*
# What Should an AI Coding Agent Hand Back After It Changes Code?
Source: https://docs.plannotator.ai/learn/code-context/ai-coding-agent-handoff
A practical team handoff contract for AI-generated code: the request, exact revision, change map, validation evidence, risks, and documentation impact.
After changing code, an AI coding agent should hand back a compact index to the request, patch, and evidence. Use a short handoff for a reversible edit and add evidence when the change affects more systems or carries more risk.
For a small, reversible edit, those facts may fit in six lines. A cross-cutting authorization change may need an approved plan, migration output, screenshots, and rollout notes. Choose evidence based on the consequences of the change, not the amount of AI used to produce it.
## What the patch and summary leave out
The Git diff is the implementation record. It does not say which request authorized the work, which paths the agent exercised, which assumptions remain unresolved, or whether a polished screenshot belongs to the current revision.
A prose summary helps a reviewer get oriented, but it is still an interpretation of the patch. GitHub recommends that pull request authors provide the purpose, an overview, links to context, and guidance about where to begin reviewing. Authors should also review, build, and test their changes before requesting review. See [GitHub's guidance for making changes easier to review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/helping-others-review-your-changes).
GitHub and Codex already expose parts of this record. GitHub lets reviewers query a Copilot-created pull request's session logs to ask what changed, what was validated, and why. OpenAI's Codex reports citations, terminal logs, and test results. See [GitHub's pull request exploration guide](https://docs.github.com/en/copilot/tutorials/explore-pull-requests) and [OpenAI's introduction to Codex](https://openai.com/index/introducing-codex/). Both vendors still instruct users to review agent-created code before integration. GitHub says to [review Copilot's pull requests thoroughly](https://docs.github.com/en/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output).
Use the handoff as a stable index into the request, code, and evidence a reviewer needs to decide. The diff, CI results, and agent logs remain the source records.
Evidence topology
One index, six source records
Approved request
Intent and constraints
Exact revision
SHA, diff, change map
Validation
Checks and runtime proof
Review artifacts
UI, video, traces
Handoff index
Points to evidence
Risks and questions
What remains unresolved
Documentation
Maintained truth changed
## The compact agent handoff contract
Use six required fields. Add conditional evidence only when it applies.
| Field | What the agent must provide |
| - | - |
| **Request** | The issue, request, or [reviewed plan](/learn/code-context/approve-ai-coding-plan-before-execution) that authorized the work, including its revision or date when relevant. State material deviations. |
| **Revision** | The repository, branch or pull request, and exact head commit SHA being handed over. |
| **Change map** | The user-visible behavior and affected components, with a suggested review order for a multi-file change. |
| **Validation** | The exact checks run, their results, and anything skipped, unavailable, or still failing. |
| **Open questions and risks** | Unresolved decisions, assumptions, known failure modes, and any follow-up that must happen before or after merge. Say **none identified** when appropriate; do not omit the field. |
| **Documentation impact** | The maintained product or technical documents updated by the change, or a brief reason that no durable documentation changed. |
Add these fields only when they apply:
* **Review artifacts:** screenshots, recordings, HTML walkthroughs, traces, benchmark results, or migration evidence that make behavior inspectable. Explain which claim each artifact supports.
* **Data and rollout:** schema changes, compatibility window, backfill, deployment order, feature flag, rollback trigger, and operator ownership.
* **Security and privacy:** changed trust boundaries, permissions, secrets, customer data, threat assumptions, and the responsible reviewer.
* **Follow-up work:** deferred cleanup or monitoring with an owner and a concrete issue, not vague “future improvements.”
Use this template:
```text theme={null}
Request:
Revision:
Changed:
Validated:
Open questions / risks:
Documentation:
Conditional evidence:
Rollout / rollback:
Follow-up:
```
Put the fields in a pull request template if that makes them easier to complete. The agent can populate them, but the person or team presenting the change for review owns their accuracy.
## Make validation evidence specific and revision-bound
“Tests pass” is not useful evidence without scope. A reviewer needs to know whether the agent ran one targeted unit test, the repository's complete test suite, a browser flow, or only a type-check. Record the command or named CI job and its result:
* `pnpm test --filter authorization`: 42 passed;
* `pnpm typecheck`: passed;
* checkout browser flow at mobile and desktop widths: passed, screenshots attached;
* production-like migration rehearsal: not run; staging database unavailable.
Tie that evidence to the handed-off SHA. GitHub status checks are reported against commits, and its Checks view can display results for different commits in the same pull request. See [GitHub's status-check documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks).
When the agent pushes another commit, the code under review changes. The handoff and any manually produced evidence may need to change with it. A [revision diff](/learn/code-review/what-is-a-revision-diff) helps a returning reviewer isolate what moved since the last checkpoint instead of assuming an earlier test report or screenshot still applies.
Do not paste every successful log into the pull request. Link to full CI output and surface the evidence that changes the decision. State plainly when a check failed, was skipped, or cannot reproduce the target environment.
## Use artifacts to show behavior the diff cannot show
Visual and operational changes often need more than textual test output. A UI change may need before-and-after screenshots and a short recording. A parser change may need a table of difficult inputs and outputs. A data migration may need rehearsal counts, timing, and rejected-row samples.
These [code review artifacts](/learn/code-review/what-are-code-review-artifacts) provide evidence beside the patch. Claude Code, for example, can publish session artifacts such as pull request walkthroughs, system explainers, and release checklists. Anthropic describes them as pages built from the codebase, connected tools, and session context. See [Anthropic's Claude Code artifacts announcement](https://claude.com/blog/artifacts-in-claude-code).
An artifact is not proof merely because it looks complete. Identify its source, revision, and supported claim. Reviewers must still inspect the underlying behavior and code. For format guidance, read [When Should AI Coding Agents Produce HTML Instead of Markdown?](/learn/code-context/ai-agent-html-vs-markdown).
## Small-change fast path
Suppose an agent fixes an off-by-one error in pagination, changes one implementation file, and adds one regression test. No API contract, customer-visible workflow, or maintained architecture document changes.
The handoff can stay compact:
> **Request:** Fix issue #184: page 2 repeats the final item from page 1.
> **Revision:** PR #219 at `71be993`.
> **Changed:** Corrected the cursor offset in `pagination.ts`; added the boundary case in `pagination.test.ts`.
> **Validated:** Targeted test file, 18 passed; type-check passed.
> **Open questions / risks:** None identified.
> **Documentation:** None; the public behavior now matches the existing API documentation.
These six lines identify the request, code, and validation claim. A formal planning package or long session transcript would not help the reviewer decide whether to merge this fix.
## Use the full handoff for a cross-cutting change
Now suppose a team replaces a synchronous customer-data export endpoint with a queued export service. The implementation touches the public API, a jobs table, a background worker, encrypted object storage, download authorization, the account UI, audit events, retention cleanup, and operator documentation.
A useful handoff might say:
* **Request:** Export-service plan version 6, approved by product, data, and security. The agent deviated from emailing export files after the security review required a short-lived authenticated download.
* **Revision:** Pull request head `c4a912e` in the API repository plus `7b21d0a` in the web repository.
* **Change map:** Read the export state machine first, then the jobs migration, worker, object-storage adapter, download authorization, account UI, and retention cleanup.
* **Validation:** Unit and integration suites passed; the migration was rehearsed against a sanitized production-shape snapshot; expired and cross-organization download links were rejected; the browser flow passed with screenshots attached. Queue-saturation testing was not run because the staging capacity was unavailable.
* **Open questions and risks:** Download links expire after 24 hours. Rollback disables new export requests but allows already queued jobs to finish. Security review and an alert on failed retention cleanup remain required before launch.
* **Documentation:** Updated `PRODUCT.md` with the customer-visible lifecycle, `TECH.md` with the storage and authorization boundaries, and the operator runbook with rollout, rollback, queue recovery, and retention steps.
Several teams must verify different claims and operate the export service, so the handoff needs more evidence. It remains a map, not an agent transcript. The project's issue, plan, or review system records what was authorized; the handoff records what the agent produced and any deviations. Plannotator's [local plan review loop](/learn/code-context/approve-ai-coding-plan-before-execution) can help refine the plan before that external record is made. After merge, durable decisions should enter [living codebase documentation](/learn/code-context/living-documentation-for-ai-agents).
For the complete path from request through team decision, implementation evidence, and shipping, read [How Teams Understand AI-Generated Code Before Shipping It](/learn/code-context/understand-ai-generated-code-before-shipping).
## What a handoff cannot establish
* It is authored by the same agent that may have misunderstood the request or missed a failure. Treat its claims as review leads, not independent verification.
* Passing tests demonstrate only the paths and assertions they cover. They do not prove the change satisfies the product decision.
* A commit SHA identifies code, not every external dependency, service response, or mutable artifact used during validation.
* Logs and artifacts can expose secrets or customer data. Redact and retain them according to the repository's access rules.
* A large handoff cannot rescue a pull request that is too broad to review. Split the implementation when reviewers cannot form a reliable mental model.
Anthropic's long-running agent harnesses used structured updates alongside Git history so the next session could resume the work. A team handoff uses the same practice to prepare an implementation for review. See [Anthropic's long-running agent harness research](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents).
## Frequently asked questions
### What should an AI coding agent include in a pull request?
Include the authorizing request, exact head revision, a change map, validation commands and results, unresolved questions and risks, and documentation impact. Add screenshots, HTML, migration evidence, rollout instructions, or security notes only when the change requires them.
### How detailed should an AI coding agent handoff be?
Use the smallest handoff that lets another engineer verify the work without reconstructing the agent session. A local fix may need six short lines; a cross-service migration needs more evidence.
### Should the agent include every command and log?
No. Include decision-relevant commands and results, note anything skipped or failing, and link to complete logs when useful. Large pasted logs hide signal and can leak sensitive data.
### How can a reviewer verify an agent's handoff?
Confirm the request and revision, inspect the diff in the suggested order, open the linked evidence, check that CI belongs to the current commit, and rerun consequential validation when appropriate. Resolve discrepancies against the code and executable behavior, not the agent's prose.
### Who owns the accuracy of an AI coding agent handoff?
The person or team delegating the change owns the handoff presented for review. The agent can draft and update it, but it should not certify its own work as correct or ready to merge.
## Check the handoff
A reviewer should be able to identify the exact request and revision, inspect the supporting evidence, see what remains uncertain, and find any documentation impact without reopening the private agent session.
Open the current local changes in Plannotator and compare the handoff with the actual diff and validation evidence.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# How to Approve AI Coding Plans Before Execution
Source: https://docs.plannotator.ai/learn/code-context/approve-ai-coding-plan-before-execution
Review an AI coding plan in local open-source Plannotator, send precise feedback, compare revisions with Plan Diff, and approve only the current plan.
Approve an AI coding plan only when it states the intended outcome, boundaries, important implementation choices, risks, and validation well enough for the agent to proceed. Open-source Plannotator can show a supported coding agent's plan in your browser and return **Approve** or **Send Feedback** to that local session. Some agents wait for your decision. On Claude Code 2.1.287 or later and on Pi, the agent ends its turn and your decision arrives later as a message.
**Approve** answers only the active local agent session. It does not record reviewer identity or authorization.
Keep a shared authorizing record in Git, an issue, a pull request, or another document system when the decision must be available to the team.
## Decide how much review the change deserves
| Change | Useful planning record |
| - | - |
| Small, reversible correction | A short plan in the agent conversation may be enough |
| Cross-cutting feature | A reviewed coding plan with scope, dependencies, and validation |
| Durable behavior or protocol | A technical specification plus a current implementation plan |
| Significant architecture choice | An ADR linked from the specification or plan |
| Broad proposal needing discussion | An RFC before implementation planning |
Start with the [AI coding plan template](/templates/ai-coding-plan). If the document needs to stay current after implementation, use the [technical specification template](/templates/technical-specification) as a separate maintained record.
If the request still contains major unknowns, use the [iterative planning workflow](/learn/planning/how-to-plan-with-ai-coding-agents) to explore the codebase, interview the human, and test the riskiest assumption before submitting a plan for approval.
## What happens during plan review
For agents that support automatic plan review, the plan-mode hook starts Plannotator and opens the proposed Markdown in your browser. You can:
* select text and add a comment;
* mark text for deletion;
* edit the Markdown directly;
* add overall feedback;
* approve the current plan; or
* send feedback to the agent.
Choose **Approve** when the current plan needs no changes. Plannotator returns an approval result to the agent session so the agent can continue.
Choose **Send Feedback** when you added comments, deletions, edits, or overall feedback. Plannotator formats that feedback and returns it to the agent. The agent can then revise and submit another plan.
Approving with unsent annotations does not turn those annotations into implementation instructions. Use **Send Feedback** when you want the agent to act on them.
## Review the plan before you approve it
A useful plan gives you enough information to find a wrong assumption before the agent changes code. Check the parts that could change the implementation:
* intended behavior and explicit non-goals;
* affected files, services, data, or APIs;
* security and compatibility constraints;
* migration, rollout, and rollback steps where relevant;
* tests and other evidence the agent should produce;
* unresolved questions that require a decision.
Small, reversible changes may need only a short plan. Security, data, migration, infrastructure, and public API changes usually need more detail because an incorrect direction is expensive to undo.
The Rust project's [RFC process](https://rust-lang.github.io/rfcs/) is a useful source of review questions for consequential design changes. Warp's public [APP-2527 specification](https://github.com/warpdotdev/warp/tree/master/specs/APP-2527) shows one way to separate product behavior from technical implementation. You do not need to copy either structure. Use only the sections that help you verify the proposed work.
## Use Plan Diff for revised plans
Plannotator saves each arriving plan to local version history before opening the review. When the agent submits a revision, select the `+N/-M` badge to compare it with the previous version.
Use the rendered view to inspect changed sections in context. Use the raw view when the exact Markdown matters. The Version Browser lets you choose an older stored version as the comparison base.
Before approving a revision, check that it:
1. addresses the feedback you sent;
2. keeps decisions that were already correct;
3. does not introduce a new unsupported assumption; and
4. still describes the version the agent is about to implement.
If other people need to review the plan or cite the decision later, commit the exact Markdown to Git or review it in the issue, pull request, or document system your project already uses.
The [Workspaces plan and technical-decision workflow](https://help.plannotator.ai/workspaces/review-plans-and-technical-decisions) covers the separate job of sharing one plan or specification with several people and agents. Its versions record document change, not named approval.
## Keep the reviewed plan tied to the implementation
An agent may discover that the plan cannot work as written. Ask it to stop and return to plan review when new evidence changes a consequential decision, such as:
* an incompatible API client;
* an unsafe migration path;
* a missing authorization boundary;
* a requirement that conflicts with current behavior; or
* validation that cannot demonstrate the promised result.
Review the revised plan with Plan Diff, then approve the current version or send another round of feedback. Do not rely on an earlier approval after the plan has materially changed.
Plan review also does not replace code review. After implementation, inspect the actual diff, run the relevant checks, and compare the result with the plan.
## A practical review loop
1. Let the supported agent enter plan mode and open Plannotator.
2. Read the proposed behavior, scope, constraints, and validation steps.
3. Add comments or edit the plan where it is incomplete or incorrect.
4. Select **Send Feedback**.
5. When the agent resubmits, open Plan Diff and inspect the changes.
6. Select **Approve** only when the current plan is ready for implementation.
7. Review the resulting code separately.
See supported agents, plan history, feedback controls, and Plan Diff behavior.
## Frequently asked questions
### What happens when the plan changes after I approve it?
Treat the changed plan as a new proposal. Review its diff and decide again before the agent implements the new direction.
### Can the agent review its own plan?
The agent can critique the plan, investigate the repository, and surface uncertainty. You still choose **Approve** or **Send Feedback** in the local review.
### Should every task use plan review?
No. Use it when reviewing the direction will reduce meaningful implementation risk. A small, reversible edit may be faster to verify in the code diff.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# HTML Wireframes and Prototypes for Coding Agents
Source: https://docs.plannotator.ai/learn/code-context/html-wireframes-and-prototypes-for-coding-agents
Design the interface yourself and iterate in the browser before anyone writes production code. Use a coding agent and one HTML file to test structure, visual direction, and interaction.
You do not have to wait for a designer or a Figma pass to make the idea visible. A coding agent can turn the brief into an HTML interface, revise it with you in the browser, and keep iterating until the team knows what to build.
Plannotator packages this workflow for coding agents in [Effective HTML](https://github.com/plannotator/effective-html), its open-source skill repository.
An **HTML wireframe** is a low-fidelity web page used to test structure, content, and task order. Make one when a coding agent and reviewer still need to decide what belongs on the screen.
An **HTML mockup** applies visual hierarchy, spacing, color, typography, and responsive layout to the agreed structure. Make one when the team needs to judge appearance before it spends time on behavior.
An **HTML prototype** adds the smallest useful interactions and state changes. Make one when reviewers need to click through a flow, test a transition, or see how the interface responds to input.
## Design the interface before you code it
The browser becomes the design surface. Ask the agent to move a section, change the hierarchy, try another visual direction, or wire the critical interaction. You see each revision immediately, while changing course still means editing one HTML file.
For a bounded screen or flow, one HTML file can take the place of separate sketch, static mockup, and clickable-demo passes. Reviewers work against the actual hierarchy and behavior in the browser instead of waiting for the idea to be rebuilt in another tool. Move into a dedicated design tool when the work needs its component libraries, vector editing, multiplayer workflows, or formal design handoff.
Judge efficiency across the whole loop. HTML may use more tokens than a Markdown plan. It can still save tokens overall if the visible artifact prevents an implementation pass on the wrong structure or behavior. Stop when the artifact answers the current question. Many tasks need only a wireframe or a focused prototype.
Anthropic engineer Thariq Shihipar describes this working style in [The unreasonable effectiveness of HTML](https://claude.com/blog/using-claude-code-the-unreasonable-effectiveness-of-html). He uses HTML to compare options, expand ideas into mockups, and then write an implementation plan. The format is valuable because it keeps the human engaged with the choices instead of handing those choices to the agent.
[Geoffrey Litt argues that understanding is now the bottleneck](https://www.geoffreylitt.com/2026/07/02/understanding-is-the-new-bottleneck.html) when agents can produce code faster than people can follow it. He uses explainers, interactive figures, and shared Notion pages to help people build intuition and participate in the next decision. An HTML wireframe or prototype serves the same purpose before implementation: it gives a person, a team, and an agent one visible object to question together.
## How do an HTML wireframe, mockup, and prototype differ?
| Review question | HTML wireframe | HTML mockup | HTML prototype |
| - | - | - | - |
| **Purpose** | Decide what the interface contains and how the task is ordered | Decide how the agreed structure should look and respond to screen size | Test the important behavior, states, and transitions |
| **Fidelity** | Low. Real labels and content, restrained presentation | Medium to high. Representative visual system and responsive layout | Only as high as the tested flow requires |
| **Interaction** | Links or controls may be inert | Usually static, even if controls look finished | Working controls for the chosen scenario |
| **Time and cost** | Lowest. Usually the fastest way to test a bounded screen | More visual iteration and breakpoint work, but no production components yet | More state logic and testing, but only for the chosen flow |
| **Best review questions** | Is anything missing? Is the order right? Is the primary task clear? | Is the hierarchy clear? Is the layout readable and consistent? | Can a user complete the task? Are state changes and recovery paths clear? |
| **Do not decide yet** | Final color, typography, animation, component implementation | Production data flow, authorization, performance, final edge-case behavior | Production architecture or whether the shipped code passes its real checks |
Use only the stages that answer an open question. A team may stop at a wireframe because the structure is settled. It may jump from a sketch to a prototype when behavior is the main uncertainty.
## Start with one product brief
The brief is the first alignment boundary. Keep the same brief through all three stages. Changing the problem while increasing fidelity makes it hard to tell whether feedback concerns the product or the presentation.
This guide uses a fictional release-readiness page for Atlas Mobile 4.8:
* A release manager must decide whether one release candidate can go to production.
* The page must show the commit, owner, four required checks, supporting evidence, open risks, reviewer notes, and current decision.
* The page starts blocked because the iOS smoke test failed.
* A passing rerun changes the release from blocked to ready and enables the release action.
* The prototype must not start a real deployment, authenticate a user, or load live build data.
The exercise stops at the release decision. The agent does not need to invent authentication, live data, or deployment behavior to answer it.
## Keep the artifact structure visible
Store the brief, state model, HTML, and review notes together:
```text theme={null}
html-wireframes-prototypes/
├── brief.md
├── release-readiness.html
├── states.md
└── review-notes.md
```
The example uses one self-contained HTML file with `wireframe`, `mockup`, and `prototype` modes. Separate files also work, but shared content can drift unless the agent updates each copy deliberately.
The supporting files have distinct jobs:
* `brief.md` fixes the user, task, required information, behavior, and non-goals.
* `release-readiness.html` contains the visible artifact and the prototype logic.
* `states.md` names each state, its trigger, visible result, and available action.
* `review-notes.md` separates accepted decisions from open questions.
## Stage 1: make the HTML wireframe
Use real headings, labels, controls, and representative content. Low fidelity does not mean unlabeled gray boxes. Reviewers need enough detail to judge whether the screen supports the task.
The release wireframe includes:
* a header with the release candidate, commit, and owner;
* a summary of checks passed, open risks, and release state;
* four named checks with evidence;
* a reviewer-notes area;
* a blocked decision and its next action.
It leaves out the final palette, shadows, rounded corners, animation, and production components. The primary question is whether a release manager can find the information needed to decide.
The focused view below exposes grouping, measurement, and hierarchy without suggesting that the surface design is finished.
Give the agent a bounded instruction:
```text theme={null}
Read brief.md and states.md. Create one self-contained, responsive HTML wireframe.
Use semantic headings, sections, lists, and native controls. Use real copy from
the brief. Keep the presentation grayscale and restrained. Show the blocked
state, but do not implement interactions yet.
Review target: content, information hierarchy, task order, and missing states.
Do not choose final colors, typography, animation, or component architecture.
```
Review the wireframe with questions that can change its structure:
* Does the page answer “Can this build go to production?” without another screen?
* Are machine results and reviewer notes visibly separate?
* Is the failed check specific enough to investigate?
* Is the next action clear while release remains blocked?
* What information could be removed without weakening the decision?
If the structure is still open, ask the agent for two or three materially different wireframes in one HTML file. Compare them in one review, choose one, and discard the rest. This is faster than styling the first plausible idea and learning later that its structure was wrong.
## Stage 2: turn it into an HTML mockup
Freeze the structure before styling it. The mockup should preserve the same information, order, and states unless the visual pass exposes a structural problem.
For the release example, the mockup adds:
* Plannotator-adjacent violet, blue, and orange accents;
* a stronger visual distinction between evidence, notes, and the decision;
* readable spacing and type hierarchy;
* a compact desktop summary that becomes a single column on narrow screens;
* visible pass, fail, blocked, and ready colors with text labels.
Keep the release logic out of the mockup. Its controls can remain inert because the review question is visual.
```text theme={null}
Use the approved wireframe as the source. Preserve its content, DOM order,
labels, and states.
Apply the product's existing color, type, spacing, border, and focus tokens.
Create a responsive layout for wide desktop and narrow mobile widths. Keep pass,
fail, blocked, and ready understandable without color alone.
Review target: hierarchy, scanability, contrast, responsive behavior, and fit
with the existing design system. Do not add new product behavior.
```
Compare the mockup with the wireframe rather than reviewing it in isolation. Any missing field or changed task order should be an explicit decision, not a side effect of styling.
This is the cheapest point to reject a visual direction. The next pass should change CSS and layout, not rewrite production components.
## Stage 3: make the interactive HTML prototype
Add only the behavior needed to answer the unresolved interaction question. For Atlas Mobile, that question is: what changes after a reviewer records a passing smoke-test rerun?
The prototype implements one flow:
1. The page starts with 3 of 4 checks passed and the release blocked.
2. The reviewer records a passing iOS smoke test.
3. The failed check changes to pass.
4. The summary changes to 4 of 4.
5. The decision announces that the release is ready.
6. The production-release action becomes available.
Keep authorization, live data, persistence, audit history, real network requests, and deployment behavior out of this prototype. The local save flow simulates an evidence-service failure and retry so reviewers can test error feedback and recovery without calling a real service.
Once reviewers accept the transition, the artifact becomes a concrete reference for implementation. The coding agent can inspect the state names, visible results, and accepted interaction instead of inferring them again from prose.
The focused prototype view keeps one interaction path in frame: the blocked state, the action and its keyboard focus, the visible feedback, and the ready result.
```text theme={null}
Preserve the approved mockup. Implement only the blocked-to-ready flow in
states.md.
Use native buttons and a complete keyboard path. Announce the decision change
through an aria-live status. Keep the release action disabled until all four
checks pass. Make the final action explain that this is a prototype rather than
starting a real release.
Review target: trigger, state transition, feedback, focus behavior, keyboard
operation, and the point where the real system would take over.
```
W3C's [WCAG 2.2 keyboard requirements](https://www.w3.org/TR/WCAG22/#keyboard-accessible) apply to prototypes too. A clickable mockup that cannot be operated from a keyboard may hide a problem the production team later has to undo.
## Why does HTML make this loop faster?
HTML combines the plan and the visible result in one inspectable file. A static picture can show appearance. A prose plan can describe behavior. HTML can show both, then let a reviewer test the transition that connects them.
That shortens the distance between an idea, evidence, and a revision:
* **Inspectable:** Browser developer tools expose the DOM, CSS, dimensions, roles, names, and focus behavior. Chrome documents how its [Inspect mode reveals element and accessibility properties](https://developer.chrome.com/docs/devtools/inspect-mode).
* **Editable:** Reviewers or agents can change the source with ordinary text tools and track those changes in Git.
* **Responsive:** One artifact can use flexible layout and media queries instead of maintaining separate desktop and mobile pictures. MDN explains the relevant [responsive-design techniques](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/CSS_layout/Responsive_Design).
* **Runnable:** A browser can exercise controls, state changes, validation, and focus order without building the production application.
* **Reviewable:** A team can annotate the rendered page, inspect the source diff, and hand exact feedback back to a person or coding agent.
Use HTML when the reviewer needs to see structure and behavior together. Use a paper sketch, a short Markdown decision, or a static image when one of them answers the question with less work.
The existing [HTML versus Markdown guide](/learn/code-context/ai-agent-html-vs-markdown) explains when HTML earns its extra source and security cost.
## How should a person or coding agent review the artifact?
Name the stage before giving feedback. “The page feels wrong” does not tell the agent which decisions may change.
Use these targets:
| Stage | Exact feedback targets |
| - | - |
| Wireframe | Missing information, wrong grouping, task order, primary action, decision boundary, and failure paths |
| Mockup | Visual hierarchy, spacing, type scale, contrast, responsive reflow, design-system fit, and whether state meaning survives without color |
| Prototype | Trigger, state transition, loading and error behavior, keyboard path, focus movement, status announcements, reversibility, and handoff to the real system |
A useful comment names the location, observed problem, requested change, and acceptance check:
> Prototype, blocked-to-ready transition: the summary stays at 3 / 4 after the smoke test passes. Update it to 4 / 4, announce the ready state, and keep the release action disabled until both changes occur.
Another coding agent can review the same targets. Ask it to compare the artifact with `brief.md` and `states.md`, report contradictions, and test the named flow. Do not ask it whether the interface is “good.” Give it the same bounded questions a human reviewer receives.
End the review with explicit decisions:
* **Structure accepted:** required content, grouping, task order, and primary action are settled.
* **Visual direction accepted:** hierarchy, responsive behavior, and state treatment are settled.
* **Tested behavior accepted:** the named trigger, transition, feedback, and recovery path are settled.
* **Production questions recorded:** data, permissions, failures, performance, and implementation details remain visible rather than being guessed.
Implementation can now begin from an agreed reference. If one of those decisions is still open, revise the artifact first.
To review the rendered file with [Plannotator](https://plannotator.ai/):
```bash theme={null}
plannotator annotate release-readiness.html
```
Plannotator renders local HTML in a sandboxed iframe and can return selected-text or pinpoint feedback to the active coding-agent session. Its sandbox still permits the HTML to make outbound requests, so keep review artifacts self-contained and inspect untrusted scripts. See the current [open-source HTML annotation workflow](/open-source/workflows/html).
The broader [website and HTML annotation guide](/learn/annotate-any-web-page-or-html-file) covers URL imports, folders, and the separate live-page workflow.
## Where does Effective HTML fit?
[Effective HTML](https://github.com/plannotator/effective-html) is the companion skill repository for producing self-contained HTML artifacts. Its current [`html` skill](https://github.com/plannotator/effective-html/tree/main/skills/html) covers explainers, comparisons, decks, and prototypes, and its bundled examples include prototype animation and interaction.
Effective HTML now includes the dedicated [`html-wireframe`](https://github.com/plannotator/effective-html/tree/main/skills/html-wireframe) skill for low-fidelity structure and the [`html-prototype`](https://github.com/plannotator/effective-html/tree/main/skills/html-prototype) skill for styled mockups and working interaction. Together they package this progression directly, from restrained structural choices to focused interaction tests.
Use Effective HTML to give an agent a stronger visual starting point and a repeatable way to create the artifact. Pair it with the brief, state model, review questions, and acceptance checks so each revision answers an explicit product question.
## Choose the next tool by the unresolved question
Keep working in HTML while reviewers are deciding structure, visual direction, or a bounded interaction. Switch when the next question depends on a capability the artifact does not have.
* Move to Figma or another shared design tool when the work depends on its component libraries, vector editing, multiplayer design workflows, or formal handoff.
* Move to production code when the question depends on real data, framework components, permissions, performance, or integrations.
* Record the accepted decision in Markdown when it needs to remain readable and editable without the browser artifact.
* Start with paper or a whiteboard when drawing the first structure is faster than asking an agent to build it.
Choose the least expensive artifact that makes the current uncertainty testable.
## Frequently asked questions
### Is an HTML wireframe the same as an HTML mockup?
No. An HTML wireframe tests structure, content, and task order with restrained presentation. An HTML mockup applies a representative visual system to that structure so reviewers can judge hierarchy, spacing, color, typography, and responsive layout.
### What makes an HTML mockup a prototype?
The artifact becomes a prototype when its behavior is part of the review. Working controls, transitions, validation, loading, errors, or recovery paths let reviewers test what happens, not only how the screen looks.
### Should a coding agent start with a wireframe?
Start with a wireframe when the content, grouping, or flow is uncertain. Skip it when the product already has an approved structure and the open question is visual or interactive.
### Is this a hosted AI wireframe generator?
No. This is a file-based workflow for people and coding agents. Effective HTML provides skills and examples for creating HTML artifacts. Plannotator opens and annotates the resulting files. Neither is presented here as an online AI wireframe generator.
### Can a prototype become the production interface?
Sometimes. A prototype built with the production framework and components may be ready to integrate. A standalone HTML artifact is usually the reference for the accepted behavior, which the team then connects to the application's data, permissions, tests, security boundaries, and performance requirements.
*Published July 29, 2026, by the Plannotator documentation team. Last reviewed July 29, 2026. Maintained by the Plannotator project.*
# How to Keep Codebase Documentation Current When AI Agents Write Code
Source: https://docs.plannotator.ai/learn/code-context/living-documentation-for-ai-agents
A practical workflow for keeping codebase documentation current as AI coding agents plan, implement, test, and revise software.
To keep codebase documentation current when AI agents write code, update it as part of the same change as the implementation. Start from current repository context, approve the intended change, capture material discoveries while the agent works, verify the result against executable behavior, and merge the documentation update with the code. Keep the original RFC as history. Use the maintained product and technical documents to explain what is true now.
A large retrospective written after the pull request is less reliable. The agent may have to reconstruct intent from stale plans, partial chat history, and code it did not personally execute.
## Separate current documentation from historical records
Living documentation records the behavior and constraints that future engineers and agents should trust. It might include:
* a `PRODUCT.md` that explains user-visible behavior and product boundaries;
* a `TECH.md` that explains system components, data flow, and operational constraints;
* an API contract generated from, or checked against, the implementation;
* a searchable handbook under `docs/`;
* runbooks for deploying, observing, and recovering the system;
* repository instructions for coding agents.
It should not contain every discussion that produced the system. Review threads, RFCs, plans, and agent progress logs remain useful, but they answer historical questions: What did we propose? Which alternatives did we reject? What happened during execution?
Maintained documentation answers a different question:
> If I need to change or operate this system today, what should I believe?
A repository can accumulate detailed feature directories without identifying which one describes current behavior. Maintainers need to designate the current source.
GitHub's [Spec Kit persistence guidance](https://github.github.com/spec-kit/concepts/spec-persistence.html) makes this choice explicit. A team can keep feature artifacts as immutable history, continuously reconcile them with implementation discoveries, or treat a living specification as the contract. Whichever model a team chooses, contributors need to know which documents are historical and which are authoritative.
Documentation roles
Two records, two questions
Current documentation
What is true now?
PRODUCT.md
TECH.md
API contract
Handbook and runbooks
Decision history
How did we get here?
RFC and approved plan
Review thread
Progress log
Superseded decisions
Link current truth to its rationale without forcing agents to reconstruct the present from old discussions.
## Put documentation in the implementation loop
Spec-driven tools already create structured context before code. GitHub Spec Kit, for example, uses a [Spec → Plan → Tasks → Implement workflow](https://github.github.com/spec-kit/). Those artifacts help an agent avoid jumping directly from an issue to a patch.
Once implementation begins, code exposes details the plan could not know: an old client depends on undocumented behavior, a database invariant differs from the architecture diagram, or a browser interaction fails in a state the acceptance criteria missed.
Feed those discoveries back into the maintained documents without rewriting history:
Link the change request to the current product, technical, API, and operational documents. If those sources disagree before work starts, resolve the disagreement or name it as part of the requested change.
Review the consequential product and engineering decisions before broad agent execution. Pin the exact version in Git or the project system when other people need a durable record. [How to Approve AI Coding Plans Before Execution](/learn/code-context/approve-ai-coding-plan-before-execution) explains Plannotator's local feedback, Plan Diff, and Approve loop.
When an agent finds a material contradiction or missing decision, record it in the pull request or live draft while the evidence is available. Do not bury a changed product rule inside a code comment or an agent chat.
Run the relevant unit, integration, contract, migration, and end-to-end checks. Review the implementation and its [code review artifacts](/learn/code-review/what-are-code-review-artifacts), such as screenshots, browser traces, or test output. A generated explanation is a claim until executable behavior supports it.
Edit only the maintained pages affected by the accepted behavior. Link to the historical RFC for rationale instead of copying its entire narrative into the handbook.
Keep the approved request, important deviations, implementation revision, validation evidence, and final decision connected. Mark superseded documents clearly rather than deleting the evidence or leaving two sources that both appear current.
GitHub's guidance for [evolving Spec Kit artifacts](https://github.github.com/spec-kit/guides/evolving-specs.html) tells teams to decide whether an implementation discovery changes intended behavior, implementation strategy, task breakdown, or only code, then reconcile the artifacts that now disagree.
## A repository-based example
Consider a team replacing a single-request upload API with resumable uploads for large files. Its repository contains:
```text theme={null}
docs/
PRODUCT.md
TECH.md
uploads.md
operations/upload-recovery.md
specs/
017-resumable-uploads/
RFC.md
PLAN.md
VALIDATION.md
```
The RFC proposes multipart upload sessions, resumable offsets, a 24-hour cleanup rule, and compatibility for clients that still send one request. Product, API, storage, and operations owners record the accepted revision in their project system. A coding agent implements against that checkpoint.
During retry testing, the agent finds that the mobile client reuses an idempotency key after a network timeout, behavior absent from both the plan and `uploads.md`. The discovery changes the compatibility contract and the server state machine.
The team should not let the agent invent retry semantics or rewrite the documentation to match the easiest implementation. It should return the discovery for a decision and approve the new direction. The agent then implements the idempotency rule and provides a handoff naming the exact revision, tests, risks, and documentation impact. See [What Should an AI Coding Agent Hand Back After It Changes Code?](/learn/code-context/ai-coding-agent-handoff).
Before merge, reviewers check four things together:
1. Contract and retry tests demonstrate the accepted upload and resume behavior.
2. Expiration, cleanup, storage-failure, and rollback behavior match the reviewed plan.
3. `docs/PRODUCT.md`, `docs/TECH.md`, and `docs/uploads.md` describe the shipped system.
4. `specs/017-resumable-uploads/RFC.md` remains an immutable decision record and links to the final implementation.
The RFC explains how the team reached the result. The maintained documents explain how uploads work after it ships. Tests and running behavior determine whether either explanation is accurate.
Warp offers a concrete example of splitting feature intent from implementation detail: its public [APP-2527 specification](https://github.com/warpdotdev/warp/tree/master/specs/APP-2527) contains separate `PRODUCT.md` and `TECH.md` files. A team still needs a convention for carrying accepted behavior into whichever documentation future contributors read first.
## Repository files make the maintenance rule enforceable
Keeping documentation near code enables several maintenance checks:
* A pull request can show code and documentation changes together.
* `CODEOWNERS` or required reviewers can route affected documents to the right owners.
* CI can build the documentation, check links, validate schemas, and test code samples.
* Git history can show when an explanation changed and which implementation changed with it.
* Agent instructions can identify the maintained documents that must be read before a particular system is modified.
[mdBook](https://rust-lang.github.io/mdBook/) is one lightweight example: it turns repository Markdown into a navigable, searchable site. Its CLI can also [test Rust code samples](https://rust-lang.github.io/mdBook/cli/index.html), allowing teams to check some documentation claims automatically.
Repository placement also gives coding agents normal file access. Clear entry points are still required. A large `docs/` tree with contradictory pages gives an agent more material but no reliable source.
## Verify generated documentation
An agent can inventory changed files, draft release notes, update examples, and identify stale documents. It can also confidently describe behavior the program does not have.
Anthropic's work on [long-running coding-agent harnesses](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) found that progress files and Git history helped later sessions recover context, but it also found agents could mark work complete without proper end-to-end testing. Explicit browser testing exposed failures that code inspection and narrower checks missed.
Check generated documentation against:
* the approved request for intended behavior;
* the code diff for the mechanism;
* tests and runtime evidence for observed behavior;
* domain owners for product and operational meaning.
The agent's narrative is a draft, not independent proof.
For dense comparisons or interactive explanations, an agent may produce HTML alongside durable Markdown. [When Should AI Coding Agents Produce HTML Instead of Markdown?](/learn/code-context/ai-agent-html-vs-markdown) explains when that improves understanding and when it merely adds maintenance cost.
## Skip documentation updates when behavior does not change
Not every edit changes durable behavior. A typo fix, local refactor, dependency patch with no contract change, or test-only cleanup may require no handbook update.
Use one short question in the pull request or agent handoff:
> Does this change alter a user-visible behavior, public or internal contract, system constraint, operating procedure, or fact that future contributors rely on?
If the answer is no, record **no durable documentation impact** and continue. Do not make the agent perturb an unrelated page merely to satisfy a checklist.
If the answer is yes, name the exact maintained files and update them with the implementation. A small documentation impact field is enough to identify the required work without adding a separate approval process.
## Limitations
Living documentation cannot make every repository fact current automatically.
* Some behavior exists only at runtime or in external infrastructure.
* Tests can be incomplete or encode the wrong expectation.
* Generated API references may be accurate but still fail to explain intent.
* A document owner can approve prose without noticing a contradictory implementation.
* Fast-moving teams may accept temporary drift during incidents or migrations.
* Historical records can expose sensitive design or security details and may need access controls.
Readers should be able to identify which source is current, how the team verified it, and where to look when code and documentation disagree.
## Frequently asked questions
### What is living documentation for AI coding agents?
It is maintained product, technical, API, and operational context that changes with the system and is available to both people and agents. It describes current behavior rather than only preserving the plan for one completed feature.
### Should an RFC be updated after implementation?
Usually, preserve an approved RFC as decision history and update separate maintained documentation with the shipped behavior. If your team intentionally uses a living-spec model, revise the specification and keep its derived plan and tasks consistent. State the convention explicitly.
### Should an AI agent update documentation automatically?
It can draft the update and identify likely affected pages. A reviewer should compare the draft with the approved request, code, tests, and observed behavior before treating it as current documentation.
### How do you prevent codebase documentation from becoming stale?
Put a documentation-impact decision in the implementation and review workflow, update affected documents in the same pull request, assign owners, and add automated checks for build failures, broken links, schemas, and executable examples where those checks are possible.
### Does every AI-generated code change need a documentation update?
No. Changes that do not alter durable behavior, contracts, constraints, or operating procedures should use the fast path and record that there is no documentation impact.
### Are repository Markdown files enough for coding agents?
They work well as a default because they are portable, versioned, searchable, and easy for agents to read. They are not enough when the files conflict, lack clear ownership, omit runtime facts, or cannot express a comparison or interaction that would be clearer in another artifact.
## When a consequential change is complete
Treat a consequential change as complete when the code, executable evidence, and maintained explanation agree. If they do not agree, record the remaining disagreement.
The workflow in [How Teams Understand AI-Generated Code Before Shipping It](/learn/code-context/understand-ai-generated-code-before-shipping) shows how teams check that agreement. Future engineers and agents can start from the system the team operates while retaining the original request and decision trail for historical context.
Open Markdown, text, HTML, or a folder in Plannotator and return annotations to the active coding agent.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# How Teams Understand AI-Generated Code Before Shipping It
Source: https://docs.plannotator.ai/learn/code-context/understand-ai-generated-code-before-shipping
A practical workflow for understanding AI-generated code by connecting the approved request, implementation, evidence, review, and final team decision.
A team understands AI-generated code before shipping it when reviewers can connect the **requested change**, the **context the team approved**, the **actual implementation**, the **evidence that demonstrates its behavior**, and the **decision to ship**. An AI summary can help reviewers find those pieces, but it cannot establish that they agree.
Product, engineering, and operations each inspect the part they own, then explain what they accepted.
Small, reversible changes do not need a formal process merely because an AI agent wrote them. A developer can often work conversationally with a capable model, inspect the patch, run focused tests, and use an ordinary review. Add more structure when several people need the same context, the change is consequential, or the implementation is too large for one person to hold comfortably.
## What an AI summary can and cannot establish
GitHub Copilot can [summarize a pull request and explain changes in specific files or lines](https://docs.github.com/en/copilot/tutorials/explore-pull-requests). For an agent-created pull request, it can also use the agent's session logs to explain what changed, what was validated, and why.
A reviewer can use that summary to identify affected subsystems, important files, claimed behavior, and validation performed.
The summary may still omit a risky edge case, describe intended rather than actual behavior, or accurately describe code that implements the wrong decision. GitHub's own guidance tells authors to include purpose, additional context, requested review depth, and a useful reading order. See [Helping others review your changes](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/helping-others-review-your-changes).
Use the summary to decide where to look. Use the request, code, tests, runtime behavior, and discussion to decide whether the change is correct.
## Treat understanding as one inspectable chain
A team can inspect six concrete objects:
| Object | The question it answers |
| - | - |
| Request for change | What outcome does the team want, and why? |
| Approved context | Which exact decisions, constraints, and validation requirements may the agent act on? |
| Implementation | What code, data, APIs, and operational behavior changed? |
| Review artifacts | What screenshots, recordings, HTML, test output, or other evidence demonstrate the result? |
| Current revision | Which exact version has each reviewer inspected? |
| Team decision | What did the responsible reviewers accept, reject, or record as a known risk? |
Code that implements an obsolete plan is still wrong for the current request. A screenshot from an earlier revision does not demonstrate the code being approved. A reviewer who read revision 3 has not reviewed revision 5. The team needs shared, versioned context instead of one developer's private agent conversation.
## A worked example: changing account deletion
Suppose a company currently deletes customer accounts immediately. The team wants a 30-day recovery period without weakening the promise that a deleted user loses access at once.
This touches authentication, stored data, background work, and support operations. “Add recoverable account deletion” is not enough context to authorize an implementation.
### 1. The team approves the behavior before code exists
Product, identity, and data owners review a shared plan. Version 4 says:
* `DELETE /v1/account` returns `202 Accepted` and marks the account `pending_deletion`;
* all browser sessions, API keys, and refresh tokens stop working immediately;
* a deletion worker permanently removes eligible records after 30 days;
* support can restore the account during that window, with an audit event;
* retained payment records stay inaccessible to the user;
* migration, rollback, and queue-failure tests are required.
The project records the named owners' decision on version 4 in its normal system. The coding agent receives that exact checkpoint, not whichever draft happens to be newest. Plannotator can help [review and compare the local plan drafts](/learn/code-context/approve-ai-coding-plan-before-execution), but it does not create the identity or authorization record.
### 2. The agent produces a change map
The agent's pull request changes the account route, token validation, account table, deletion worker, OpenAPI file, and support tooling. Its handoff names the approved plan and current commit, then points reviewers to the important paths:
```text theme={null}
apps/api/routes/delete-account.ts
packages/auth/validate-session.ts
workers/account-deletion.ts
db/migrations/0142_pending_deletion.sql
openapi/account.yaml
```
The identity owner can begin at token invalidation while the data owner traces retention and deletion. Not every reviewer must read every file in the same order.
Use the reusable completion format in [What Should an AI Coding Agent Hand Back After It Changes Code?](/learn/code-context/ai-coding-agent-handoff).
### 3. Reviewers follow the risky paths into the code
The identity reviewer traces `DELETE /v1/account` through the database state change and every credential check. The data reviewer follows the worker through deletion and retained records. The operator checks retries, idempotency, metrics, and rollback.
They use the agent's explanation to locate code, then verify its claims. Reviewers move between high-level intent and concrete state transitions, failure paths, and neighboring invariants until the behavior is coherent.
A Microsoft field study found that code and change understanding was central to modern review. Review also produced knowledge transfer, team awareness, alternative solutions, and defect detection. See [Expectations, Outcomes, and Challenges of Modern Code Review](https://www.microsoft.com/en-us/research/publication/expectations-outcomes-and-challenges-of-modern-code-review/).
### 4. Artifacts make behavior inspectable
The agent attaches a browser recording, state-transition diagram, focused test output, and small HTML report for comparing failure paths. HTML earns its place because the review depends on several states and outcomes; the linear plan remains Markdown. [When Should AI Coding Agents Produce HTML Instead of Markdown?](/learn/code-context/ai-agent-html-vs-markdown) covers that choice.
Each file supports a specific claim. The recording demonstrates the flow, the tests identify exercised cases, and the report compares queue, token, and restoration paths. [What Are Code Review Artifacts?](/learn/code-review/what-are-code-review-artifacts) explains how evidence beside the diff becomes part of the review.
### 5. A finding changes the implementation
The identity reviewer discovers that access tokens are rejected immediately, but a refresh token can still mint a new access token until the deletion worker runs. The implementation contradicts the approved plan.
The approved context already settled the expected behavior. The agent fixes refresh-token validation, adds a regression test, and updates the change map.
The correction arrives with three other commits. A reviewer who already inspected the first revision should see the cumulative change from that checkpoint to the current head. [What Is a Revision Diff?](/learn/code-review/what-is-a-revision-diff) describes how that comparison avoids rereading unchanged work.
### 6. The team decides and preserves what remains true
The identity, data, and API reviewers approve the current revision after checking the fix and refreshed evidence. After merge, the accepted lifecycle, retention rule, and recovery behavior update maintained product and technical documentation. [How to Keep Codebase Documentation Current When AI Agents Write Code](/learn/code-context/living-documentation-for-ai-agents) covers that final step.
## A practical review sequence
Use these seven review actions:
Read the issue, RFC, or approved plan first. Identify the behavior, non-goals, and constraints the code must preserve.
Record both the approved context version and the code revision under review. If either changes materially, make that change visible.
Ask for affected boundaries, entry points, validation, and uncertainty. Give reviewers a reading order based on risk and ownership.
Follow consequential paths across state transitions, side effects, failures, and rollback. Inspect surrounding code where the diff depends on an invariant.
Match artifacts to the current revision. Ask what each proves and what it leaves untested.
Keep discussion attached to the relevant code or artifact. After new pushes, compare against each reviewer's last checkpoint rather than assuming the previous review still applies.
Tie approval to the reviewed revision. Move accepted product and technical decisions into the documentation that the next person or agent will read.
## Divide review by ownership without losing context
Reviewers do not need identical mental models. Each owner can inspect a different part of the change as long as every decision refers to the same request and revision.
The product owner verifies the requested experience. Security examines credential and data boundaries. The service owner traces failure behavior. Together they check one revision against one approved request.
GitHub pull request reviews already support named reviewers, line comments, suggestions, approvals, and requests for changes. GitHub also advises reviewers to understand a pull request's motivation and linked context before evaluating the diff. See [Reviewing proposed changes in a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request).
VS Code's preview [Artifacts panel](https://code.visualstudio.com/docs/chat/chat-artifacts) can surface plans, screenshots, documents, and agent-produced resources beside a conversation. Teams can use that panel while preserving the route from request to evidence to decision across their other review tools.
## Know the limits
This workflow improves traceability, but it does not prove correctness.
* An approved plan can contain a bad decision.
* Reviewers can misunderstand unfamiliar code or accept weak evidence.
* Tests demonstrate selected behavior, not every production condition.
* Generated explanations and polished artifacts can be stale or wrong.
* A small diff can carry large consequences, while a large mechanical diff may need less interpretation.
* More process can consume attention without improving a routine, reversible change.
Keep changes focused, assign review by consequence, preserve exact checkpoints where they matter, and make uncertainty visible.
## Frequently asked questions
### Is an AI-generated pull request summary enough for code review?
No. It is useful orientation, but reviewers still need to compare the implementation with the requested behavior, inspect risky code paths, evaluate current evidence, and make a decision about an exact revision.
### How do you review AI-generated code you did not write?
Start with the intended outcome and constraints. Use the agent's change map to find entry points, then trace state changes, side effects, failures, and validation through the actual code. Ask for evidence where runtime behavior is easier to inspect than infer.
### Are passing tests enough to trust AI-generated code?
No. Passing tests show that selected assertions passed in a particular environment. Reviewers still need to judge whether the tests cover the approved behavior, whether important paths are missing, and whether the implementation preserves system constraints.
### Should every AI-generated change require a formal plan?
No. A small, reversible change may need only a clear request, focused tests, and ordinary review. An approved plan becomes valuable when several people or agents need one decision, or when product, security, data, API, migration, or operational consequences are substantial.
### What if the generated change is too large to understand?
Reduce or partition it before treating a summary as a substitute for review. Separate independent behavior, establish a safe reading order, and require evidence for each consequential slice. If reviewers cannot connect the code to the approved request, the change is not ready to ship.
Compare the agent's handoff with the current local diff and return line-specific feedback.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# Review Pull Request Artifacts Beside the Code
Source: https://docs.plannotator.ai/learn/code-review/review-pull-request-artifacts
Plannotator gathers screenshots, GIFs, videos, HTML, and Markdown from GitHub pull requests and GitLab merge requests into one artifact gallery beside the code diff.
Plannotator gathers supported screenshots, GIFs, videos, HTML files, and Markdown documents from a hosted GitHub pull request or GitLab merge request into one **Artifacts** gallery beside the code diff.
The gallery preserves where each artifact appeared, who posted it, and when it entered the conversation. Reviewers can inspect the evidence without searching through the description, comments, review replies, and resolved threads.
## Pull request evidence gets scattered
GitHub and GitLab already let people attach files to a pull request or merge request. A developer might put screenshots in the description, add a recording after another push, and share an HTML explainer in a review reply. An agent might contribute a Markdown walkthrough or another validation image later.
The files remain in the conversation, but the reviewer has to find them before evaluating them. Long discussions make that harder, especially when some evidence sits inside resolved threads or several people add artifacts at different times.
Plannotator reads the hosted review conversation and builds a focused gallery from the supported attachments it finds. It does not move the original files or erase their context. Each gallery item links back to the description, comment, review, or thread where it appeared.
## Review each medium with the right anchor
A useful comment should point to the part of the evidence that caused it. Plannotator changes the annotation control to match the artifact.
### Select text in HTML and Markdown
HTML explainers render inside Plannotator's restricted viewer. Reviewers can select the exact sentence or rendered section they want to discuss. Markdown documents use the same text-selection workflow.
Agent-produced HTML can contain scripts, frames, and network requests. Plannotator treats remote HTML as untrusted content and renders it in a sandbox rather than giving it the authority of the review application. See [when AI coding agents should produce HTML instead of Markdown](/learn/code-context/ai-agent-html-vs-markdown) for the format and security tradeoffs.
### Pin a comment to an image or GIF
Click the relevant point on a screenshot or GIF, then leave the note. The review keeps the point with the comment, so another person does not have to infer which control, pixel, or visual state the reviewer meant.
### Comment at a video timestamp
Pause a video at the relevant moment and comment on that timestamp. The note stays attached to the playback position, which makes feedback such as “the menu flickers here” reproducible.
Every supported artifact can also receive a note about the artifact as a whole.
## Keep the source and route the feedback
The gallery shows the artifact's author, conversation location, and original source link. That provenance helps reviewers distinguish evidence from the pull request author, another reviewer, or an agent participating in the conversation.
Artifact feedback joins the same review draft as code annotations. When the review is ready, Plannotator can post the feedback to the GitHub pull request or GitLab merge request with links to the original artifact and conversation. A local reviewer can instead send the structured feedback directly to the coding agent working on the change.
## Hide reviewed evidence without deleting it
Reviewers can hide an artifact after inspecting it and restore hidden artifacts later. Hiding only changes the local gallery view. It does not delete the attachment or alter the hosted review conversation.
## What the Artifact Gallery does not collect
The gallery has a deliberate boundary:
* It appears for hosted GitHub pull requests and GitLab merge requests because those reviews have a description and conversation to inspect.
* It does not appear for local diff reviews.
* It collects supported images, GIFs, videos, HTML, and Markdown referenced in the hosted conversation.
* It does not automatically import GitHub Actions workflow artifacts.
* It does not prove that an artifact still matches the current head revision. Reviewers should check when the evidence was produced after the code changes.
GitHub and GitLab remain the systems of record for the review conversation. Plannotator gives the code and its supporting evidence one surface for inspection and feedback.
Open a hosted pull request or merge request in Plannotator and review its supported artifacts beside the diff.
Learn how screenshots, recordings, HTML, documents, and validation output support a code review decision.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# What Are Code Review Artifacts? Screenshots, Video, HTML, and AI Evidence
Source: https://docs.plannotator.ai/learn/code-review/what-are-code-review-artifacts
Code review artifacts are screenshots, recordings, HTML, reports, and other evidence reviewed beside a code diff. Learn what GitHub supports and why AI makes these artifacts more important.
A **code review artifact** is reviewable evidence attached to a proposed change that the code diff cannot communicate well by itself. It might be a screenshot, screen recording, HTML prototype, Markdown report, test result, architecture diagram, or benchmark visualization.
The code diff shows **what changed**. Artifacts help show **what the change does, why it was made, and how it was validated**.
A code review artifact can be created by a person, an AI coding agent, or a CI workflow. Its role in the review matters more than who produced it.
## A pull request is becoming more than a patch
Consider a pull request that changes a checkout flow. The author or coding agent might provide:
* a before-and-after screenshot;
* a short recording of the updated interaction;
* an HTML prototype showing the possible states;
* a Markdown explanation of the implementation;
* a browser-test report or failure trace from CI.
None of these files replaces the code. They answer questions that are difficult to settle by reading the patch alone:
* Does the new layout work at mobile widths?
* What happens between clicking **Pay** and seeing confirmation?
* Does the loading state match the intended design?
* Which paths did the automated test exercise?
* What tradeoff did the author make and why?
The reviewer needs both the patch and the evidence required to evaluate it.
## Why is the word “artifact” confusing?
Software teams already use *artifact* in several ways. AI products have added another meaning.
Our broader guide to [AI artifacts](/learn/ai-development/what-is-an-ai-artifact) explains how documents, images, applications, media, and other agent outputs become reusable objects beyond a chat. In code review, the artifact has a narrower job: it helps a reviewer understand or validate a proposed change.
| Term | Meaning | Relationship to code review |
| - | - | - |
| Claude Artifact | A substantial, self-contained AI output intended to be viewed, changed, reused, or shared outside the conversation | It becomes review evidence when it explains or demonstrates a proposed change |
| GitHub pull request attachment | A file uploaded into a pull request description or comment | It places evidence in the review conversation |
| GitHub Actions artifact | Files produced and retained by a workflow run, such as logs, screenshots, coverage, or binaries | It is automated evidence that may help validate a change |
| Code review artifact | Any self-contained evidence a reviewer needs beside the diff | This describes the artifact’s role, regardless of its origin |
Anthropic did not invent the general software term. Its [Artifacts product](https://support.claude.com/en/articles/9487310-what-are-artifacts-and-how-do-i-use-them) made a particular form of AI output more visible: a standalone document, application, diagram, visualization, or interactive page that can be inspected separately from the chat that produced it.
## What can GitHub already do?
GitHub already lets people attach a wide range of files to pull requests. You can drag a file into a pull request description or comment, and GitHub uploads it immediately and inserts an anonymized URL into the Markdown text.
GitHub supports common media such as PNG, GIF, JPEG, SVG, MP4, MOV, and WebM. Pull request comments also accept HTML, Markdown, PDFs, office documents, JSON, logs, notebooks, patches, archives, audio, and many development-file formats. See GitHub’s current [file attachment documentation](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files).
GitHub applies the repository’s visibility to uploaded files:
* files uploaded to public repositories can be accessed without authentication;
* files uploaded to private or internal repositories require repository access.
This is already enough for a small evidence set. An author can put two screenshots in the description and a reviewer can discuss them in a comment.
The workflow becomes harder when evidence arrives at different times and in different places. A screenshot may be in the description, a recording in a later comment, an HTML explainer in a review reply, and a coverage report under a workflow run. A reviewer has to discover the evidence before evaluating it.
That is the distinction: GitHub provides the file transport. A dedicated artifact surface organizes the evidence as something to review.
## Are GitHub Actions artifacts the same thing?
Not exactly.
GitHub defines a [workflow artifact](https://docs.github.com/en/actions/concepts/workflows-and-actions/workflow-artifacts) as a file or collection of files produced during a workflow run and retained after the job completes. GitHub’s examples include:
* log files and core dumps;
* test results and failure screenshots;
* compiled binaries and archives;
* stress-test output and code-coverage reports.
Those files are artifacts of the build or test process. They become code review artifacts when a reviewer needs them as evidence for the pull request.
The distinction matters operationally. Workflow artifacts live under the workflow run, require repository read access to download, and expire according to GitHub’s retention settings. GitHub currently keeps build logs and workflow artifacts for 90 days by default. A screenshot uploaded into the pull request conversation has a different location and lifecycle.
## Why are AI coding agents making artifacts more important?
Coding agents produce more than source code. They can run browsers, reproduce bugs, execute tests, inspect logs, create diagrams, compare designs, and explain the work they performed.
GitHub Copilot coding agent, for example, can use a browser to validate a web application and [include captured screenshots in its pull request](https://github.blog/changelog/2025-07-02-copilot-coding-agent-now-has-its-own-web-browser/). GitHub also preserves agent session logs and links agent-authored commits back to those logs so reviewers and auditors can trace how a change was produced.
Claude Code now treats PR walkthroughs, system explainers, dashboards, incident timelines, and release checklists as [shareable session artifacts](https://claude.com/blog/artifacts-in-claude-code). These pages can combine codebase context, connected tools, test output, and the agent’s explanation in one visual surface.
Trustworthy evidence can reduce the work of understanding a large agent-created change. A polished explanation can also be wrong, stale, or selectively reassuring. Use artifacts to investigate the change, not as a reason to stop reading the code.
## Why is HTML becoming a common AI artifact format?
Markdown remains useful for durable, text-first documents. HTML becomes attractive when the explanation needs visual hierarchy, spatial layout, or interaction.
In [“The unreasonable effectiveness of HTML,”](https://claude.com/blog/using-claude-code-the-unreasonable-effectiveness-of-html) Claude Code engineer Thariq Shihipar describes using HTML for dense technical outputs that people are more likely to read and understand. A single HTML file can combine:
* tables and side-by-side comparisons;
* rendered code and annotated diffs;
* SVG diagrams and architecture maps;
* screenshots and visual states;
* tabs, filters, sliders, or small purpose-built controls;
* responsive layouts for large reports.
His code-review example is direct: create an HTML artifact that explains a pull request, renders the actual diff, adds margin annotations, and color-codes findings by severity.
That makes HTML more than a document format. It can be a temporary inspection interface built for one change.
HTML is active content. An uploaded page can contain scripts, network requests, frames, and other behavior. A review system must treat arbitrary HTML as untrusted and render it inside a restricted sandbox rather than giving it the review application’s authority.
Reviewers should also know whether an HTML artifact is a static explanation, an interactive prototype, or a live page backed by changing data. A visually convincing page is not automatically reproducible evidence.
## What makes an attachment genuinely reviewable?
Uploading a file is the beginning, not the complete review workflow. Useful code review artifacts need several properties.
### Discoverability
The reviewer should be able to see the relevant evidence set without searching a long conversation or opening unrelated workflow runs.
### Provenance
The artifact should show who or what produced it, where it came from, and when it entered the review. Agent-generated evidence should retain the agent identity and the human who initiated the work.
### Safe, format-aware inspection
Different evidence needs different treatment. Images need spatial inspection. Video needs playback and timestamps. Markdown needs readable rendering and text selection. HTML needs isolation.
### Anchored discussion
Comments should be able to refer to a point, region, timestamp, quotation, or whole artifact. “The flicker around 00:14” is more useful when the comment is actually attached to 00:14.
### A relationship to the code revision
Reviewers need to know which version of the code the evidence demonstrates. A screenshot captured before three later pushes may no longer describe the current pull request.
### Access, retention, and deletion
Artifact visibility should follow the review’s access rules. Teams should also know how long the bytes remain, whether an external link can expire, and what happens to the discussion when an attachment is deleted.
### An auditable decision
For consequential changes, the durable record includes the file, its origin, the comments it received, which concerns were resolved, and the human review decision that followed.
## How does Plannotator handle code review artifacts?
The open-source Plannotator code-review app gathers supported images, GIFs, video, HTML, and Markdown referenced in a hosted GitHub pull request or GitLab merge request into one **Artifacts** view beside the diff.
The review behavior follows the format:
* images and GIFs can receive point or whole-artifact comments;
* video can receive timestamped or whole-video comments;
* Markdown can receive quoted-text or whole-document comments;
* HTML can receive selected-text or whole-page comments and is rendered inside a restricted sandbox.
The source remains visible, so a reviewer can tell whether an artifact came from the change-request description, a comment, a review, or a review thread. Plannotator preserves the author, timestamp when available, and a link to the original conversation. Reviewers can hide evidence they have already inspected and restore it later.
Artifact notes join the ordinary review draft. They can be posted to the GitHub or GitLab review with links back to the original evidence, or sent directly to the local coding agent.
This is deliberately not a claim that every hosted upload becomes a Plannotator artifact. The current focused set is images, GIFs, video, HTML, and Markdown found in the hosted conversation. GitHub Actions artifacts are not automatically imported. Local diff reviews do not have an artifact gallery because they do not have a hosted PR or MR conversation to collect from. Artifacts are currently associated with the review rather than pinned to a particular Git revision.
GitHub or GitLab remains the system of record for the change request. Plannotator provides a focused surface for inspecting and discussing supported evidence beside the code. See [how to review pull request artifacts in Plannotator](/learn/code-review/review-pull-request-artifacts) for the released workflow.
See how Plannotator collects hosted PR and MR evidence, preserves its source, and anchors feedback to text, image points, and video timestamps.
## Common failure modes
Artifacts improve review only when reviewers understand their limits.
* **Stale evidence:** the artifact demonstrates an earlier revision of the code.
* **Broken or expired links:** externally hosted evidence disappears or its access rules change.
* **Unsafe active content:** HTML or SVG is rendered with more authority than it should receive.
* **Missing provenance:** the reviewer cannot tell whether a person, agent, or workflow created the output.
* **Presentation bias:** a polished walkthrough makes the change feel safer than the underlying implementation is.
* **Incomplete validation:** a successful screenshot or test report demonstrates one path, not every relevant behavior.
* **Evidence overload:** a large pile of generated reports increases review work instead of directing attention.
A good artifact reduces uncertainty. It should not bury the reviewer in output.
## Frequently asked questions
### Are code review artifacts the same as build artifacts?
No. A build artifact is output produced by a build or workflow. It becomes a code review artifact only when a reviewer needs to inspect it as evidence for the proposed change.
### Does GitHub support code review artifacts?
GitHub supports many file attachments in pull request descriptions and comments, and GitHub Actions retains workflow artifacts. Those capabilities provide the underlying files. A dedicated review-artifact surface adds organization, format-aware inspection, provenance, and anchored discussion.
### Do artifacts replace the code diff?
No. The code diff remains the proposed implementation. Artifacts make its behavior, validation, and surrounding reasoning easier to inspect.
### Can an AI agent create review artifacts?
Yes. Agents can create screenshots, recordings, diagrams, reports, HTML explainers, and test output. Reviewers should still verify the evidence, preserve its provenance, and make the final review decision themselves.
### Is it safe to review an HTML artifact?
Only when the hosting or review system treats it as untrusted active content. Arbitrary HTML should be isolated with browser sandboxing and restrictive content policies. External HTML should not inherit access to the review application.
### Should every pull request include artifacts?
No. A small backend change may be completely understandable from its tests and diff. Artifacts are useful when behavior, design, validation, or system context cannot be reviewed efficiently from code alone.
Next: [Learn how revision diffs show what changed since a reviewer’s last look](/learn/code-review/what-is-a-revision-diff).
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# What Is a Revision Diff? A Practical Code Review Guide
Source: https://docs.plannotator.ai/learn/code-review/what-is-a-revision-diff
Learn what a revision diff is, how it differs from a pull request diff, and why it makes repeat code reviews faster after authors push new commits.
A **revision diff** is a cumulative diff between the exact version of a change set a reviewer last reviewed and its current version. It answers one practical question: **what changed since I last looked?**
A revision diff is sometimes called an **interdiff** or a **patch-set diff**. The names vary; the reviewer’s question does not.
## What problem does a revision diff solve?
Imagine reviewing a 40-file pull request on Tuesday afternoon. You leave 12 comments and finish the review. By Thursday morning, the author has pushed nine more commits.
The full pull request diff still answers:
> What does this branch change compared with the base branch?
But that is no longer the question you need answered. You already reviewed most of that work. Your question is:
> What changed between the version I reviewed Tuesday and the version in front of me now?
Without a revision diff, reviewers usually fall back to one of two workflows:
1. Re-read the full pull request and repeatedly confirm that old code has not changed.
2. Read each new commit separately and mentally combine overlapping edits, reversions, and fixups.
A revision diff compares the two relevant snapshots directly. If only six of the original 40 files changed after Tuesday, the repeat review contains six files.
## What does GitHub offer today?
GitHub’s web review tells you which files changed and lets you manually select commits or compare SHAs. It does not make your last completed review a first-class, automatic cumulative diff inside the normal pull request web experience. GitHub’s VS Code extension does provide a version of that workflow.
More specifically:
* GitHub unmarks a file as **Viewed** if that file changes later. This helps identify affected files, but it does not isolate only the new hunks in those files. See [GitHub’s review documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request?tool=webui).
* GitHub’s newer Files changed experience can display one commit or a manually selected set of commits. See the [GitHub Files changed announcement](https://github.blog/changelog/2025-12-11-review-commit-by-commit-improved-filtering-and-more-in-the-pull-request-files-changed-public-preview/).
* GitHub can show the version attached to a completed review, and its compare page and API can compare known commit SHAs.
* The official GitHub Pull Requests extension for VS Code includes a command named **Show Changes Since Last Review**. See the [extension source](https://github.com/microsoft/vscode-pull-request-github/blob/main/package.nls.json).
This means the underlying comparison is not a new Git primitive. The missing step is to select the reviewer’s last completed checkpoint automatically and show that cumulative comparison inside the review.
## How does a revision diff work?
Every revision diff needs two endpoints:
When a review finishes, record the pull request’s exact head commit. This is the reviewer’s baseline.
When the reviewer returns, read the pull request’s current head commit.
Generate one cumulative diff from the reviewed revision to the current revision. Intermediate commits do not need to be replayed.
In simplified Git terms:
```text theme={null}
reviewed revision: 6a0f3c1
current revision: b91d2e8
revision diff: 6a0f3c1 → b91d2e8
```
The output should describe the net result. If commit five adds a line and commit eight removes it, that line should not appear in the revision diff.
## Revision diff vs. pull request diff vs. commit diff
| View | Comparison | Best question it answers |
| - | - | - |
| Full pull request diff | Base branch → current pull request head | What will this pull request change overall? |
| Individual commit diff | One commit’s parent → that commit | What did this particular commit do? |
| Selected commit range | Manually chosen commit range | What happened across these selected commits? |
| Revision diff | Last reviewed revision → current head | What changed since I last reviewed this? |
The distinction is the baseline. A full pull request diff is anchored to the base branch. A revision diff is anchored to a reviewer’s previous checkpoint.
## Eight revision-diff terms in plain language
### Revision
One version of the pull request as it existed at a particular moment. Each new push can create a new revision.
### Head SHA
The commit identifier for the current tip of the pull request branch. It is the fingerprint of the code currently under review.
### Patch set
The saved changes associated with a revision. Systems that need reliable historical comparisons may preserve the patch set rather than storing only a commit identifier.
### Interdiff
Another name for a diff between two revisions. It compares revision A with revision B instead of comparing the pull request with its base branch.
### Force-push or rewritten history
A push that replaces the branch’s existing commit history, often after a rebase. The new history may contain the same intent expressed through different commits.
### Retention
How long an old revision remains available for comparison. A commit identifier is useful only while the underlying commit or a saved snapshot can still be read.
### Revision marker vs. patch set
A revision marker says, “the reviewer saw commit `6a0f3c1`.” A patch set preserves enough data to reconstruct what the reviewer saw. The marker is smaller; the patch set is more durable.
### Provider compare
A comparison generated by the Git hosting provider, such as GitHub’s compare API. It is convenient when both endpoints are still available and the comparison stays within provider limits.
## What happens after a force-push or rebase?
A rebase complicates the commit graph, but it does not change the reviewer’s question. The desired comparison is still:
> the exact code previously reviewed → the code under review now
If the old commit remains available, the system can compare the two commit snapshots. If it does not, a reliable revision-diff system needs a previously saved patch set or equivalent snapshot.
This is why **remembering a SHA** and **preserving a reviewable revision** are different product decisions.
## Should every reviewer have a separate baseline?
Usually, yes. Review state belongs to the reviewer, not just the pull request.
One person may have approved revision 4, another may have requested changes on revision 6, and a third may be opening the pull request for the first time. “Since last review” has a different starting point for each person.
A useful default is the head commit associated with that reviewer’s most recent completed review. Products should also make the chosen baseline visible and allow an explicit revision to be selected when the automatic choice is wrong.
## What are the limitations?
Revision diffs reduce repeat work, but they do not eliminate review judgment:
* A small code diff can have a large behavioral effect.
* Generated files and binary assets may not produce useful textual diffs.
* Base-branch changes can affect merge behavior without appearing in a head-to-head revision diff.
* A reviewer may need the full pull request context even when only a few lines changed.
* If a previous revision was not retained, a perfect historical comparison may be impossible.
Use the revision diff as an additional review lens, not a replacement for the full pull request diff.
## Frequently asked questions
### Is a revision diff the same as GitHub’s Files changed view?
No. GitHub’s default Files changed view compares the pull request with its base branch. A revision diff compares two versions of the pull request itself.
### Is a revision diff the same as reviewing new commits?
No. Reviewing commits exposes the sequence of edits. A revision diff exposes the cumulative result of those edits.
### Can I create a revision diff manually?
Yes. If you know the commit reviewed previously and the current head commit, you can compare those SHAs with Git or a provider compare page. The hard part is consistently recording the correct reviewer-specific baseline and retaining access to it.
### Why not just review every changed file again?
That works, but it spends reviewer attention proving that previously reviewed code did not change. Revision diffs concentrate attention on the part of the pull request that actually moved.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# Why AI-Generated Pull Requests Are Harder to Review
Source: https://docs.plannotator.ai/learn/code-review/why-ai-generated-pull-requests-are-harder-to-review
Why AI-generated pull requests are harder for teams to review, even with Codex, Cursor, and GitHub. Learn what shared context and evidence are still missing.
AI-generated pull requests are harder for teams to review when the code arrives without a shared record of the work behind it. The missing record may include the authorizing request, agent and model identity, execution state, skipped validation, and supporting evidence. Those details often remain scattered across private chats, agent sessions, CI runs, and vendor-specific interfaces.
Codex, Cursor, and GitHub Copilot are making individual review more interactive. A developer can inspect a diff beside an agent, ask why a file changed, request another review, and ask the agent to implement a finding. Those workflows make a pull request easier to explore. A team shipping a real product still needs a durable account of what the agent was asked to do, what it completed, how it checked the result, and which exact revision people are approving.
## Agent-native review is already useful
[Codex code review](https://openai.com/index/introducing-upgrades-to-codex/) can automatically review a GitHub pull request when it moves from draft to ready, post findings on the pull request, and respond to a focused request such as `@codex review for security vulnerabilities`. If Codex recommends an edit, the author can ask it to implement the change in the same thread. The Codex IDE extension also lets developers track and review cloud tasks without leaving the editor.
Cursor provides several review paths. Its [agent review workflow](https://cursor.com/blog/agent-best-practices) can analyze proposed edits line by line, compare local changes with the main branch, and flag issues before the work reaches GitHub. Inside a pull request, [tagging `@Cursor`](https://cursor.com/changelog/1-4) can send an instruction to a background agent that applies the fix and pushes another commit.
GitHub Copilot adds another version of this experience. Its agent sessions expose progress and logs, and Copilot-authored commits link back to those sessions. A reviewer can ask what changed, what was validated, and why. GitHub documents these capabilities in [Managing agent sessions](https://docs.github.com/en/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents).
These tools reduce the cost of orienting yourself inside a pull request. They can explain unfamiliar code, surface likely defects, and shorten the loop between a finding and its fix. An industrial study of LLM-assisted code review found that developers generally preferred AI-led assistance for large or unfamiliar pull requests, while preferences varied with codebase familiarity and risk. The researchers favored hybrid workflows that combine proactive findings with on-demand questions and reviewer control. See [Rethinking Code Review Workflows with LLM Assistance](https://research.chalmers.se/en/publication/551186).
## A personal review conversation is not a team record
An agent chat can help one developer form a mental model. It does not automatically tell every reviewer:
* which person authorized the change;
* which agent, model, and execution system contributed to the current code;
* whether the agent is still working, blocked, waiting for a decision, or finished;
* which tests and investigations ran against the current commit;
* what the agent skipped, could not reproduce, or remains uncertain about;
* whether a screenshot, recording, or report still matches the current head;
* which parts product, security, platform, or operations have reviewed;
* what changed after each person's last completed review.
Those facts may exist somewhere. The problem is that each reviewer may have to reconstruct them from a different agent interface, pull request comment, CI page, or private conversation.
A 2026 study of 33,596 agent-created pull requests found that coding agents produced measurably different pull-request description styles and received different patterns of reviewer engagement and outcomes. The authors caution that repository norms, task type, and code complexity may explain part of the variation, so the results are not causal. The useful finding for teams is narrower: how an agent communicates its work affects the review process. See [How AI Coding Agents Communicate](https://arxiv.org/abs/2602.17084).
## Three review questions need better answers
### Which agent and model produced this change?
Git authorship can identify a bot account or the human who initiated a task. It often does not describe the full production path. One pull request may contain human edits, a Cursor background-agent commit, a Codex correction, and a generated test from another session. An agent may also switch models or delegate part of the work.
Record the agent product, execution environment, model or model family when available, initiating person, session link, and commits produced. Model identity supports audit, policy, and debugging. It does not establish quality. A newer or more expensive model can still misunderstand the request, miss a failure path, or validate the wrong behavior.
Some products already expose parts of this information. Cursor advertises an enterprise [AI code tracking API](https://cursor.com/changelog/1-4) for commit-level visibility into AI usage and accepted changes. GitHub Copilot records agent sessions and links its commits to session logs. These are useful product-specific records, but they do not create one portable metadata contract across every agent that can contribute to a GitHub pull request.
### Is the pull request actually ready for review?
GitHub supports **Draft** and **Ready for review** states. A draft pull request cannot merge and does not automatically request review from code owners. Marking it ready requests formal review. See [About pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
That state describes the pull request, not every agent task behind it.
| State | What it establishes | What it does not establish |
| - | - | - |
| Draft | The author is not formally requesting merge review | Whether an agent is running, blocked, complete, or waiting for a decision |
| Ready for review | The author is requesting review of the current pull request | Whether the agent met the definition of done, ran consequential checks, or disclosed open questions |
| Mergeable | Required repository checks and approvals currently allow merge | Whether the change implements the right product decision or has enough evidence for its operational risk |
A useful agent record should state **working**, **blocked**, **awaiting decision**, or **complete**, along with the definition of done and remaining work. The person presenting the pull request for review owns that status. The agent should not certify its own patch as safe to ship.
### Did the agent perform due diligence?
“Tests pass” is too vague for a consequential change. Reviewers need to know what ran, what passed, what failed, what was skipped, and which commit the results cover.
For example:
```text theme={null}
Revision: c4a912e
Validated:
- pnpm test --filter authorization: 42 passed
- pnpm typecheck: passed
- session revocation browser flow: passed, recording attached
- migration rehearsal: not run, staging database unavailable
Open question:
- queue saturation behavior remains unverified
```
The record should include repository checks, browser or device paths, migration rehearsals, security review, performance tests, and supporting [code review artifacts](/learn/code-review/what-are-code-review-artifacts) only when they apply. It should also name missing evidence. A failed or unavailable check helps a reviewer make a decision; hiding it behind a polished summary does not.
For hosted GitHub pull requests and GitLab merge requests, Plannotator's [Artifact Gallery](/learn/code-review/review-pull-request-artifacts) collects supported screenshots, video, HTML, and Markdown from the review conversation so the evidence can be inspected beside the diff.
When the agent pushes another commit, earlier evidence may become stale. The team should bind validation and artifacts to the exact revision they support. Returning reviewers can then use a [revision diff](/learn/code-review/what-is-a-revision-diff) to isolate what changed after their last completed review.
## Session logs are evidence, not the review interface
Agent session logs can be valuable. GitHub lets collaborators monitor Copilot sessions, trace commits to their sessions, and query completed work. Logs can explain which tools ran, how the agent approached the task, and where it struggled.
Requiring every reviewer to read a full transcript transfers the reconstruction work to the team. Long sessions contain exploration, repeated commands, abandoned approaches, and details unrelated to the merge decision. They may also include repository information, tool output, or customer data that requires restricted retention.
Use a compact agent work record as the index. Link to the underlying session, CI output, and artifacts when a reviewer or auditor needs them.
| Record | Required contents |
| - | - |
| Authority | Source request or approved plan, responsible person, and material deviations |
| Provenance | Agent, execution environment, model when available, session, and contributed commits |
| State | Working, blocked, awaiting decision, or complete; definition of done; remaining work |
| Revision | Repository, pull request, head SHA, and the comparison each reviewer completed |
| Validation | Exact checks, results, skipped work, failures, environment, and supported claims |
| Evidence | Screenshots, recordings, HTML, traces, benchmarks, or reports tied to the revision |
| Decision | Named reviewers, unresolved findings, accepted risks, and the final human verdict |
The [AI coding agent handoff](/learn/code-context/ai-coding-agent-handoff) can stay short for a small change. A cross-service authorization or data-migration change needs more evidence because more people must verify and operate the result.
## Better metadata does not make a broad pull request easy
A clear work record reduces archaeology. It cannot make an entangled change cheap to review.
A 2026 study of 33,707 agent-authored pull requests found that structural signals such as files changed, lines changed, and change entropy predicted high review effort far better than text features. The result supports a practical limit: presentation helps reviewers find the work, but the footprint of the change still determines much of the review cost. See [Early-Stage Prediction of Review Effort in AI-Generated Pull Requests](https://arxiv.org/abs/2601.00753).
Split independent behavior before review. Give product, security, platform, and operations owners a reading path through the code they own. Keep the summary, validation, and artifacts current as the head changes. If reviewers cannot connect a change to its authorizing request or verify its consequential behavior, the pull request is not ready merely because an agent marked its task complete.
## Review the current change as a team
Ask Codex, Cursor, Copilot, or another reviewer to explain unfamiliar paths, find issues, or implement requested fixes. Keep their findings attributed.
Route product, technical, security, and operational questions to the people who own them. Generated explanations remain claims until the code and behavior support them.
Refresh stale evidence after new pushes. The responsible reviewer then approves, requests changes, or accepts a known risk against the current revision.
## Where Plannotator fits
Open-source Plannotator can open a GitHub pull request or GitLab merge request in its browser review UI. It shows the diff, supports line-specific comments and suggestions, collects supported evidence from the hosted conversation, and can launch supported review agents. GitHub or GitLab remains the system of record.
Plannotator does not import the private agent transcript or infer that validation happened. Put the request, material decisions, validation results, and known gaps in the pull request or merge request so another reviewer can verify them.
## Frequently asked questions
### Why are AI-generated pull requests harder to review?
They can arrive faster and include more code while the request, agent provenance, execution state, validation, and evidence remain outside the pull request. Reviewers then have to reconstruct both the change and the process that produced it.
### Does GitHub show whether a pull request is a draft?
Yes. GitHub clearly distinguishes Draft from Ready for review. That status does not say whether every contributing agent is finished, whether the definition of done was met, or whether validation evidence is current.
### Should an AI-generated pull request name the model?
Record the agent, provider, model or model family when available, execution environment, initiating person, and session. Use model information for provenance and policy, not as proof that the code is correct.
### Should reviewers receive the complete agent transcript?
Usually not as the primary handoff. Provide a compact, revision-bound work record and link to the full session when its details matter. Restrict sensitive session data according to the repository's access and retention rules.
### Can Codex and Cursor review pull requests?
Yes. Codex can review GitHub pull requests, post findings, accept focused review instructions, and implement requested edits in the same thread. Cursor provides local Agent Review and can run background-agent work from GitHub pull-request instructions. Teams still need to decide how those findings, fixes, and sessions enter their shared review record.
### What should an AI coding agent include in a pull request?
Include the authorizing request, exact revision, change map, execution state, validation commands and results, skipped checks, open questions, risks, and relevant artifacts. Add agent and model provenance when available. The [agent handoff guide](/learn/code-context/ai-coding-agent-handoff) provides a reusable format.
Give reviewers a stable index into the request, current revision, validation, evidence, and unresolved work.
Connect approved intent, implementation, evidence, review, and the final team decision.
See what changed after each reviewer's last completed checkpoint.
Review screenshots, recordings, HTML, reports, and other evidence beside the diff.
*Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# Learn AI-Assisted Software Planning and Review
Source: https://docs.plannotator.ai/learn/index
Practical, source-backed guides to planning and specifications, agent instructions, Markdown collaboration, code review, and AI-development workflows.
Use these guides to make plans, specifications, agent instructions, review evidence, and handoffs easier to inspect and maintain. Learn pages explain a durable question. Product commands stay in [Open Source](/open-source/), and reusable artifacts stay in [Templates](/templates/).
## Planning and specifications
Turn reviewed requirements, design, and tasks into agent work, then compare the result with implementation evidence.Define product intent, review it with people and agents, and stop before technical design.Choose the right planning depth, annotate the proposal, and inspect revisions before implementation.Compare revised plans without rereading every unchanged section.Choose durable text or an interactive explainer based on the decision readers need to make.Move one product brief from structure to visual hierarchy to tested interaction.Keep current system truth separate from the plans and decisions that produced it.
## Agent instructions
Give agents exact commands, boundaries, and references without creating an instruction dump.Find repeated local feedback and turn the useful patterns into maintained instructions.Connect returned work to the request, revision, evidence, risks, and next action.
## Markdown and document collaboration
Import a URL or render local HTML for agent feedback, or use App Notes to annotate a live page.Connect intended behavior, implementation, validation, and current documentation.
## Code review
Return line-specific feedback from a local browser diff.Understand cumulative review across pushes, rebases, and force-pushes.Use screenshots, video, HTML, Markdown, and other evidence beside code.Check whether visual and operational evidence matches the current revision.Control review load without trusting a generated summary as proof.
## AI-development workflows
Use a neutral eight-stage model to connect intent, agent execution, evidence, shipping judgment, and learning.Keep human attention at the points where intent becomes code and code becomes a shipping decision.Distinguish inspectable outputs from chat responses and source records.Recognize when more context reduces an agent's ability to use the right evidence.Use generated repository maps without confusing them with maintained authority.Preserve state, evidence, and stop conditions across long-running work.Prepare a bounded goal and inspect real outputs the next morning.
*Reviewed July 29, 2026. Maintained by the Plannotator documentation team.*
# Local Diff Review for Coding Agents
Source: https://docs.plannotator.ai/learn/local-diff-review-for-coding-agents
Open local code changes in Plannotator, add line-specific comments or suggestions, and send structured feedback back to your coding agent.
Run `plannotator review` in a repository to inspect the current change set in a browser. Plannotator shows a file-oriented diff, lets you comment on exact lines or ranges, and returns the review to the agent session as structured feedback.
## Start a local review
```bash theme={null}
plannotator review
```
Most supported agents also install a review command or skill. For example, Claude Code uses `/plannotator-review`, while Codex can use `$plannotator-review` or `!plannotator review`.
Plannotator detects the repository and builds the opening review from the current VCS state. For Git, the default `since-base` view includes committed branch work, working-tree changes, and untracked files when the base branch resolves. If no base resolves, Plannotator falls back to uncommitted work instead of hiding committed changes.
The [original Plannotator demo](https://www.youtube.com/watch?v=a_AT7cEN_9I) shows the browser review loop. The current UI has expanded since that recording, so use the documentation below for present behavior.
The Git status panel separates the result into **Committed**, **Changes**, and **Untracked**. You can switch to the file tree, change the comparison, or open the session-only commit history where the repository supports it.
## Add precise feedback
Select one line or a range in the diff, then add a comment or suggested replacement. Plannotator keeps the file path, line range, and diff side with the annotation.
When you select **Send Feedback**, the agent receives a Markdown review grouped by file. A typical item identifies the file, selected line, comment, and suggested code. The agent can act on that review without reconstructing your intent from a general chat message.
Use **Approve** when the change is ready. Plannotator returns the configured code-review approval message to the active agent session. It does not commit, merge, or deploy the change.
## Stage and unstage carefully
Local Git reviews can stage or unstage supported files from the review UI. That control does not apply to every VCS provider or review mode. Do not expect it for Jujutsu, Perforce, remote-only pull request diffs, or already committed files.
## What stays local
For a local review, Plannotator starts a temporary server on `127.0.0.1` and reads the diff from the local repository. The patch is served to your browser on the same machine. Optional features can make external requests, including Ask AI, remote assets, or commands you explicitly run, but the basic local diff review does not upload the patch to a hosted Plannotator service.
## When local diff review helps
Use it when an agent changed several files, the terminal diff is hard to navigate, or your feedback needs exact line context. Repeat the review after the agent responds so you can verify the current code instead of approving from its summary.
Learn the local, pull request, merge request, VCS, and provider boundaries.
*Originally published February 19, 2026, by backnotprop. Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# Plan Diff: See What Changed Between Iterations
Source: https://docs.plannotator.ai/learn/plan-diff-see-what-changed
Compare an agent's revised plan with an earlier version in rendered or raw diff views, then review only what changed.
When a coding agent resubmits a plan, Plannotator can show the lines it added and removed since the previous version. Open the diff badge to review the changed sections instead of rereading the entire plan.
Plan Diff came from community requests [#138](https://github.com/backnotprop/plannotator/issues/138) and [#111](https://github.com/backnotprop/plannotator/issues/111). The [original feature demo](https://www.youtube.com/watch?v=uIWkFCg60Lk) shows the first version of the interaction.
## Open the plan diff
Plannotator saves each arriving plan before it opens the review UI. When another version of the same plan arrives, a `+N/-M` badge appears below the document card. Select the badge to switch between the normal plan and its diff.
The automatic comparison uses the immediately previous version. Open the **Version Browser** in the sidebar to choose an older base version.
## Choose a diff view
* **Rendered** shows the plan as formatted content. Added blocks use green, removed blocks use red with strikethrough, and modified blocks use yellow.
* **Raw** shows a Git-style Markdown diff with `+` and `-` lines.
Both views come from the same line-level diff. Plannotator groups consecutive removals and additions into modified blocks so related changes stay together.
You can annotate an added, removed, or modified block. The returned feedback labels the comment as diff content so the agent knows you were responding to a revision.
## How plan versions are grouped
Plannotator derives a plan slug from the first Markdown heading, the date, and the current project. Plans with the same heading on the same day in the same project are treated as iterations of one plan. Identical resubmissions are deduplicated.
Versions are stored under the Plannotator data directory, normally:
```text theme={null}
~/.plannotator/history/{project}/{plan-slug}/
```
This history is separate from the optional decision snapshots stored under `~/.plannotator/plans/`.
The heading-and-date grouping can misclassify unusual cases. If two unrelated plans use the same first heading on the same day, inspect the selected base in the Version Browser before relying on the diff.
## Use the diff in a review loop
1. Review the first plan and select **Send Feedback**.
2. Let the agent revise and resubmit it.
3. Open the `+N/-M` badge.
4. Check whether the revision addresses your feedback and whether it introduces a new issue.
5. Approve the current plan or send another round of feedback.
Plan Diff compares stored versions on your computer. Formal authorization, synchronization between people, and cross-plan comparison are outside this local feature.
Follow the complete plan review, feedback, revision, and approval loop.
*Originally published February 22, 2026, by backnotprop. Last reviewed July 18, 2026. Maintained by the Plannotator project.*
# How to Plan with AI Coding Agents: Find Unknowns Before You Build
Source: https://docs.plannotator.ai/learn/planning/how-to-plan-with-ai-coding-agents
Plan with AI coding agents by finding unknowns, testing risky assumptions, recording deviations, and verifying the result against a clear finish line.
Plan with an AI coding agent by giving it a clear outcome, then using its codebase access to find unknowns before you commit to an implementation. Better models need shorter instructions, not less planning. Keep the goal and boundaries explicit while the plan changes as research, prototypes, and code reveal new evidence.
Iterative planning loop
Turn a request into verified work
01 · Request
State the outcome and boundaries.
02 · Explore
Inspect code, history, tests, and decisions.
03 · Ask
Surface unknowns and interview the human.
04 · Prototype
Make options visible and cheap to change.
05 · Refine
Write the current plan and finish line.
06 · Prove
Test the riskiest assumption on a small slice.
07 · Record
Log discoveries and deviations while building.
08 · Revise
Update the plan when evidence changes it.
09 · Verify
Use tests, domain evidence, and a fresh reviewer to check the result.
Planning continues during implementation. New evidence can send the work back to exploration, a prototype, or a revised plan.
## Plan the decisions, not every keystroke
As coding agents improve, they can make more routine execution choices. Humans still need to decide what should be built, what must remain true, and what evidence counts as done. Anthropic's analysis of about 400,000 Claude Code sessions found that people made most planning decisions while Claude made most execution decisions. It also found that task-specific domain expertise was linked to more successful sessions. ([Anthropic](https://www.anthropic.com/research/claude-code-expertise?level=0))
This changes the useful level of detail. Describe the outcome, constraints, risky decisions, and finish line. Let the agent inspect the repository and propose the mechanical steps. Add detail when it prevents a costly mistake, not because a long plan looks thorough.
In a July 2026 interview, Claude Code engineer Thariq Shihipar said the team had cut its system prompt by 80 percent as models improved. He said many examples and absolute rules had begun to constrain newer models. This was a team-specific change, not a target for every repository. Audit `CLAUDE.md`, `AGENTS.md`, and skills for stale instructions. Keep hard constraints that still matter, and explain the reason behind softer preferences. ([Full interview](https://www.youtube.com/watch?v=aVO6E181cNU\&t=2051s), [Peter Yang's public notes](https://creatoreconomy.so/p/how-i-plan-build-and-run-loops-with-claude-code-thariq-shihipar))
| Prescriptive one-shot plan | Iterative agent planning |
| - | - |
| Assumes the first prompt contains enough context | Treats the request as the start of discovery |
| Lists detailed steps before repository research | Lets code, tests, history, and docs shape the plan |
| Hides uncertainty inside confident instructions | Names unknowns and asks the human to decide |
| Builds the full design before testing it | Prototypes the choice most likely to change |
| Treats deviation as failure to follow the plan | Records deviations as evidence for the next plan |
| Lets the builder judge its own result | Uses explicit checks and independent verification |
The right column does not mean vague delegation. It gives the agent freedom over routine execution while people keep control of product intent, irreversible choices, and final acceptance.
## Use this nine-step planning workflow
### 1. Start with the request
State the user or operator outcome, why it matters, and the boundaries the work must respect. Include hard constraints such as data handling, compatibility, permissions, migration rules, and systems the agent may change.
Do not start by dictating a file list unless the files are part of the requirement. The repository may contain a better path.
### 2. Ask for technical exploration
Have the agent inspect the relevant code, tests, documentation, recent history, prior attempts, and current runtime behavior. Ask it to report evidence before it recommends an approach.
Claude Code's official guidance describes its loop as gathering context, taking action, and verifying the result. It also recommends exploring before implementation and giving the agent something concrete to verify against. ([Claude Code documentation](https://code.claude.com/docs/en/how-claude-code-works)) The same planning pattern works with other coding agents that can inspect a repository and run its tools.
### 3. Turn unknowns into questions
Ask the agent what could change the architecture, user behavior, security boundary, migration, or validation strategy. Then have it interview you one question at a time, starting with the answer that would change the plan most.
Shihipar's public [blind-spot example](https://thariqs.github.io/html-effectiveness/unknowns/01-blindspot-pass.html) scans code and history before proposing an authentication change. His [interview example](https://thariqs.github.io/html-effectiveness/unknowns/06-interview.html) orders questions by architectural impact. The useful pattern is evidence first, then focused questions.
### 4. Prototype choices that words cannot settle
Use a small prototype, visual explainer, trace, benchmark, or reference implementation when you will only know the right choice after seeing it work. Ask for several meaningfully different options when the task involves interaction or visual judgment.
HTML is useful for interactive mockups and explainers. Markdown remains better for compact plans and durable text. The [HTML vs. Markdown guide](/learn/code-context/ai-agent-html-vs-markdown) helps choose the format.
### 5. Write the refined plan
Fold the exploration, answers, and prototype decisions into a plan. Put the choices a human might change near the top. Keep routine refactoring and plumbing concise.
Use the [AI coding plan template](/templates/ai-coding-plan) for the outcome, scope, evidence, implementation, risks, validation, and documentation. If you need a broader method with durable project state or feature specifications, use the [planning framework index](/frameworks).
### 6. Build the smallest useful proof
Test the assumption most likely to invalidate the plan. A proof might be one migration against realistic data, one API round trip, one browser interaction, or one performance measurement at a representative size.
Do not use the easiest task as the proof. Prove the part that would make you choose a different design.
### 7. Keep implementation notes
Ask the agent to record what the code revealed, where reality differed from the plan, what choice it made, and what still needs human judgment. For an unexpected but reversible detail, give it a conservative default: preserve existing behavior, data, and access; avoid a new dependency or external side effect; and log the choice.
The agent should stop when a surprise would change product behavior, security, data ownership, a public contract, or an irreversible operation. Shihipar's [implementation-notes example](https://thariqs.github.io/html-effectiveness/unknowns/09-implementation-notes.html) separates discoveries, conservative deviations, and decisions that belong to a human.
### 8. Revise the plan when the evidence changes
Planning did not fail because implementation found something new. Update the current plan, explain the deviation, and retire assumptions that no longer hold. For a material change, return to review before continuing.
Use [Plan Diff](/learn/plan-diff-see-what-changed) to compare an agent's revised plan with the earlier version. The [plan-approval guide](/learn/code-context/approve-ai-coding-plan-before-execution) covers the separate decision to approve the current plan before execution.
### 9. Verify with fresh evidence
Keep coordination, execution, and verification distinct. The coordinator preserves the goal and decisions. The builder implements them. A fresh reviewer, test harness, or domain expert checks the result without inheriting all of the builder's assumptions.
Anthropic's official loops guide recommends a second agent for code review because a reviewer with fresh context is less influenced by the main agent's reasoning. It also recommends clear stop criteria and a pilot before a large run. ([Anthropic loops guide](https://claude.com/blog/getting-started-with-loops)) Independent review still needs repository evidence and human judgment for consequential changes. The [AI software factory guide](/learn/ai-development/what-is-an-ai-software-factory) places these planning controls and evidence checks inside a repeatable delivery loop.
## Copy this planning and interview prompt
```text theme={null}
Help me plan this change before writing production code.
Outcome: [what should be true for the user or operator]
Boundaries: [systems, data, compatibility, permissions, and non-goals]
1. Inspect the relevant code, tests, docs, history, and prior attempts.
2. Report the evidence that changes how this work should be designed.
3. Find blind spots in my request. Do not claim completeness.
4. Interview me one question at a time. Ask first about answers that
would change the architecture, product behavior, or validation.
5. Suggest the smallest prototype, explainer, or test that would settle
the riskiest unknown.
6. Write a plan with the decisions I may want to change at the top,
followed by scope, implementation, risks, and validation.
7. Define a finish line. Use measurable checks where they prove the goal,
and a rubric plus human review where quality requires judgment.
8. During implementation, keep notes on discoveries and deviations.
Preserve existing behavior, data, and access when a reversible surprise
is not covered. Stop for consequential or irreversible decisions.
9. After implementation, revise the plan and return the exact checks,
artifacts, unresolved issues, and an independent verification result.
```
This prompt is a starting contract. Delete parts that do not apply. A small, reversible fix may need only the outcome, one code inspection, and a focused test.
## Choose the right finish line
Use a measurable exit condition when the measurement directly proves the requested result. Use a rubric or human judgment when the result includes taste, meaning, risk, or tradeoffs that one number cannot capture.
| Finish line | Works well for | Example | Main risk |
| - | - | - | - |
| Deterministic check | Binary behavior or contract | All migration fixtures preserve row counts and access rules | The check can omit an important case |
| Numeric threshold | Performance or bounded quality measure | p95 latency stays below 200 ms at the stated load | The agent may optimize the score instead of the experience |
| Reference match | Port, rendering, or compatibility work | Output matches a trusted implementation on a fixed corpus | The reference may not cover local requirements |
| Rubric | Design, writing, or multi-part behavior | Score accessibility, clarity, task completion, and visual fit separately | A vague rubric creates confident but inconsistent grades |
| Human decision | Product judgment or irreversible risk | An owner accepts the tradeoff after seeing the prototype and evidence | The decision can become a bottleneck if requested too often |
Anthropic recommends goal-based loops for tasks with verifiable exit criteria. In the interview, Shihipar contrasts a measurable target with visual work that needs a rubric and a separate verifier. ([Anthropic loops guide](https://claude.com/blog/getting-started-with-loops), [interview](https://www.youtube.com/watch?v=aVO6E181cNU\&t=201s))
## A blind-spot prompt is not a completeness check
An agent can search only the evidence it can reach and reason from the models it already has. If neither the human nor the agent knows what complete looks like, asking for unknown unknowns may produce a polished list that misses the real failure.
Ground the pass with:
* current code, tests, logs, migrations, and prior incidents;
* domain standards, regulations, and security or accessibility checklists;
* reference behavior and representative data;
* explicit rubrics and failure cases;
* an interview with the person who owns the problem; and
* independent verification after implementation.
Treat the blind-spot report as a research queue. Confirm each important claim against a source, a test, or a person with domain knowledge.
## Case study: plan a video workflow by removing unknowns
In Peter Yang's interview with Shihipar, the initial goal was to turn a spoken recording into a rendered video with word-level captions and overlays. Shihipar asked the agent to explain how Whisper transcription could fail, then used HTML to compare overlay styles before committing to the React and video-rendering implementation. The explainer exposed transcription risks, and the prototype made visual choices concrete. ([Interview planning segment](https://www.youtube.com/watch?v=aVO6E181cNU\&t=507s), [Peter Yang's thread](https://x.com/petergyang/status/2079209983984677210), [public episode notes](https://creatoreconomy.so/p/how-i-plan-build-and-run-loops-with-claude-code-thariq-shihipar))
The example does not prove that every plan should be HTML or that one prompt can find every unknown. It shows how an explainer or prototype can settle a specific decision before full implementation.
## Review the current plan and the returned work
Once the unknowns are small enough to proceed, review the current plan instead of an earlier draft. Open-source Plannotator can [annotate an AI coding plan](/open-source/workflows/plan-review), return feedback to the agent, and compare the next submission. The [long-horizon task guide](/learn/ai-development/what-are-long-horizon-tasks-for-ai-agents) explains how to preserve the objective, progress memory, checkpoints, and evidence when execution spans dependent stages or sessions.
Planning does not replace code review. Compare the result with the current plan, inspect the actual diff, run the finish-line checks, and make sure the implementation notes have been folded into maintained documentation.
## Frequently asked questions
### Should a coding-agent plan list every file and edit?
Only when those details expose a boundary or prevent a known mistake. Let repository exploration determine routine file edits. Keep human attention on outcomes, risky choices, constraints, and proof.
### Is this the same as Claude Code plan mode?
No. Plan mode is one product interface for proposing work before execution. This field guide describes a tool-independent discovery loop that may use plan mode, normal conversation, prototypes, tests, and implementation notes.
### When is a one-shot plan enough?
A one-shot plan can be enough for a small, familiar, reversible change with strong tests and no consequential unknown. Use the iterative loop when the task crosses systems, contains product or design judgment, changes data or access, or depends on behavior the team has not verified.
### When should the agent stop and ask a person?
It should stop when new evidence changes the intended behavior, security or privacy boundary, data ownership, public API, migration safety, cost commitment, or another hard-to-reverse decision.
*Published and last reviewed July 20, 2026. Written and maintained by the Plannotator documentation team.*
# Spec-Driven Development for AI Coding Agents
Source: https://docs.plannotator.ai/learn/planning/spec-driven-development-for-ai-coding-agents
Learn how spec-driven development turns reviewed requirements, design, tasks, and implementation evidence into durable context for AI coding agents.
**Spec-driven development for AI coding agents** turns intended software behavior into reviewable requirements, design, and work artifacts before execution. People review decisions at each boundary. Agents use the accepted artifacts to implement the change, then return evidence that people compare with the accepted intent.
Specification-driven development is another name for the same broad method. It is not one fixed file tree or one vendor workflow. The useful pattern is a controlled path from intent to implementation and back to evidence.
Microsoft describes specifications as a shared source for requirements, constraints, acceptance criteria, and edge cases before AI-assisted implementation. A 2026 research paper separates three levels of rigor: spec-first, spec-anchored, and spec-as-source. The right level depends on the cost and life of the work. ([Microsoft](https://developer.microsoft.com/blog/spec-driven-development-ai-native-engineering), [Piskala, arXiv:2602.00180](https://arxiv.org/abs/2602.00180))
## Use a reviewed artifact sequence
The files vary by framework, but a complete workflow must preserve five kinds of information:
1. **Requirements define observable behavior.** Record the user outcome, scope, non-goals, constraints, edge cases, and acceptance criteria. A human reviews them before technical choices narrow the solution.
2. **Design explains the chosen solution.** Record architecture, interfaces, data, failure behavior, security boundaries, and open assumptions. A human checks whether the design satisfies the requirements.
3. **A plan or task set makes the design executable.** Name the work order, dependencies, affected areas, and validation for each meaningful unit. A human checks that the tasks preserve the design intent.
4. **Implementation changes the system.** The agent follows the reviewed artifacts, reports discoveries, and stops when a new decision changes accepted behavior or risk.
5. **Evidence connects the result to the intent.** Tests, source diffs, traces, screenshots, or runtime checks show what changed. A human compares that evidence with the acceptance criteria.
This sequence does not require a large document for every change. A small, reversible fix can use a short requirement and a focused plan. A multi-phase system change needs more durable state.
### Put human review where decisions compound
Review each artifact before it becomes an input to more expensive work:
* Review requirements before design. Remove vague outcomes and decide what remains out of scope.
* Review the design before planning. Check technical assumptions, failure paths, interfaces, and operating limits.
* Review the plan or tasks before execution. Check order, task boundaries, repository scope, and verification steps.
* Review implementation evidence before acceptance. Compare the current result with the accepted requirements, not with the agent's summary.
The review depth depends on risk. Authentication, data migration, tenancy, billing, and public interfaces need more evidence than a local documentation fix.
## Compare three current specification workflows
The comparison uses current primary sources. They are [GitHub Spec Kit v0.16.1](https://github.com/github/spec-kit/blob/v0.16.1/docs/reference/workflows.md), [Kiro Specs captured August 10, 2026](https://kiro.dev/docs/specs/), and [GSD Core v1.10.0](https://github.com/open-gsd/gsd-core/blob/v1.10.0/docs/reference/planning-artifacts.md).
| Dimension | [GitHub Spec Kit](/frameworks/github-spec-kit) | [Kiro Specs](/frameworks/kiro-specs) | [GSD Core](/frameworks/gsd) |
| - | - | - | - |
| Artifact model | A feature specification, implementation plan, task list, constitution, and optional supporting artifacts | A requirements or bug-analysis file, a design file, and a tasks file | A durable `.planning/` tree with project, requirements, roadmap, state, phase context, plans, summaries, and verification records |
| Workflow | Specify, review the specification, plan, review the plan, create tasks, then implement | Requirements-first, design-first, or Quick Spec flows lead to design and tasks | Discuss a phase, plan it, execute the plan, verify the result, and update project state |
| Task grain | Stable task identifiers can include exact file paths, dependencies, and user-story groups | Tasks can form a dependency graph and run in parallel waves | Plans declare waves, dependencies, files, requirements, actions, checks, and acceptance criteria |
| Review points | Built-in gates review the specification and plan. The method in this guide adds task review before implementation. | Requirements and design flows include review. Quick Spec creates all three files without approval gates. | Phase discussion locks decisions. Plan checking, verification, and user acceptance testing inspect later stages. |
| Persistence | Teams choose whether specifications flow back into the main spec, flow forward into new specs, or remain living documents. | Feature files live in the project's `.kiro/specs/` directory. | Project and phase records preserve decisions, progress, blockers, summaries, and verification across sessions. |
| Tool coupling | An open-source CLI installs commands and templates for supported coding-agent hosts. | The workflow is part of Kiro's IDE, CLI, and web product. | An installed command system coordinates planning documents, agent work, checks, and state. |
These profiles describe artifact shape and workflow. They do not show that one framework produces better code. For a direct two-framework decision, use [GitHub Spec Kit vs. Kiro Specs](/compare/github-spec-kit-vs-kiro-specs). The [framework chooser](/frameworks/) covers other planning methods and artifact models.
## Inspect the same reliable-webhook case
The public [spec-planning-frameworks repository](https://github.com/plannotator/spec-planning-frameworks/tree/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701) applies several frameworks to one [reliable-webhook-delivery brief](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/cases/reliable-webhook-delivery/brief.md).
The brief requires signed delivery, idempotency, retry backoff with jitter, dead-letter handling, replay, audit history, tenant isolation, observability, and acceptance tests. It leaves the queue, database, web framework, signing algorithm, limits, retention, hosting, and interface decisions open.
### GitHub Spec Kit completed its planning flow
The July 19 run used Spec Kit `0.13.1.dev0` at commit `57cc518d`. It produced a constitution, checklist, research record, data model, four contracts, and quickstart. Inspect the [specification](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/github-spec-kit/raw/specs/001-reliable-webhook-delivery/spec.md), [plan](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/github-spec-kit/raw/specs/001-reliable-webhook-delivery/plan.md), and [69-task list](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/github-spec-kit/raw/specs/001-reliable-webhook-delivery/tasks.md). The run selected Fastify, PostgreSQL, and Prisma. Those are run decisions, not shared case requirements. ([Run provenance](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/evidence/github-spec-kit/provenance.md))
### GSD created project state but not a phase plan
The run used `@opengsd/gsd-core@1.7.0`. It produced [project context](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/gsd/raw/.planning/PROJECT.md), [18 requirements](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/gsd/raw/.planning/REQUIREMENTS.md), a [five-phase roadmap](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/gsd/raw/.planning/ROADMAP.md), and [state](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/gsd/raw/.planning/STATE.md). The run then created [Phase 1 context](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/gsd/raw/.planning/phases/01-signed-idempotent-delivery/01-CONTEXT.md). The phase-plan run stalled and was interrupted. No completed plan is present. ([Run provenance](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/evidence/gsd/provenance.md))
### Kiro is a manual, source-faithful example
The authenticated Kiro workflow was unavailable for the comparison. The repository contains three original, source-faithful files: [requirements](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/kiro-specs/manual/requirements.md), [design](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/kiro-specs/manual/design.md), and [tasks](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/examples/kiro-specs/manual/tasks.md). Each file follows Kiro's documented artifact model. Every file states that it was not generated by Kiro. The files are inspectable workflow evidence, not vendor output. ([Example provenance](https://github.com/plannotator/spec-planning-frameworks/blob/7bfffe891436c02e0b9ecccc65ceb0b64c2a0701/evidence/kiro-specs/provenance.md))
### What this case can and cannot show
The repository compares artifact shapes and workflow evidence for one TypeScript backend case. It does not compare implemented systems, code quality, model quality, delivery time, or production reliability. A completed document also does not prove that its requirements are correct.
The framework versions used in the July run are older than the current sources in the comparison table. The generated files preserve the behavior of those pinned runs. Do not treat an unmerged benchmark branch or a local experiment as published results.
## Watch for eight failure modes
1. **Vague requirements.** Terms such as fast, reliable, secure, or scalable do not define an observable finish line.
2. **Hidden assumptions.** The specification chooses a queue, database, identity boundary, or limit without naming the decision.
3. **Stale specifications.** Code or runtime behavior changes while the document continues to describe an earlier system.
4. **Tasks that lose intent.** A task list names files and edits but drops the reason, constraint, or acceptance criterion.
5. **Ceremony larger than the work.** The framework creates more artifacts and reviews than a small, reversible change needs.
6. **Unreviewed generated detail.** An agent fills gaps with plausible architecture, limits, or edge-case behavior that nobody accepted.
7. **Source and runtime drift.** The repository, deployed system, configuration, or external service no longer matches the specification's evidence.
8. **False confidence from completion.** A complete document looks authoritative even when tests, implementation evidence, or human review are missing.
The remedy is not always more text. Name the decision, link the evidence, assign the review point, and remove artifacts that do not help a later decision.
## Choose the smallest durable artifact
### Use a technical specification for one bounded design
Choose a [technical specification](/templates/technical-specification) when one feature or system change needs requirements, interfaces, risks, and acceptance criteria in one reviewed document. This works well when the implementation can fit inside one coherent design.
### Use an AI coding plan for one implementation pass
Choose an [AI coding plan](/templates/ai-coding-plan) when the outcome and design are already known. The plan must connect ordered code changes to verification. The [planning guide](/learn/planning/how-to-plan-with-ai-coding-agents) explains how repository research and new evidence can revise that plan.
### Use a project framework for durable state
Choose a project framework when work spans phases, agents, or context windows. The framework must preserve decisions, current state, completed evidence, and the next safe action. The cost of that state must remain smaller than the cost of rebuilding context.
## Keep the specification current
Implementation exposes facts that planning cannot know. Record a discovery when it changes the work. Ask a human to review it when it changes behavior, risk, or scope.
Then choose a persistence rule. Update the main specification, create a follow-on specification, or maintain a living specification beside the code. Spec Kit documents these as flow-back, flow-forward, and living-spec policies. ([Spec Kit v0.16.1](https://github.com/github/spec-kit/blob/v0.16.1/docs/concepts/spec-persistence.md)) The [living documentation guide](/learn/code-context/living-documentation-for-ai-agents) explains how to keep current system truth separate from historical plans and decisions.
## Review the artifact before the agent runs
Open-source Plannotator can display and annotate local Markdown plans and specifications. It can return feedback to supported coding-agent sessions and compare revised submissions. Use the local [plan review workflow](/open-source/workflows/plan-review) to inspect requirements, design decisions, and tasks before execution.
```bash theme={null}
plannotator annotate specification.md --gate
```
Plannotator provides a review surface. It does not make the specification correct, execute a framework, or replace implementation evidence.
## Source record
* Method sources: Microsoft article published June 10, 2026, and arXiv:2602.00180 submitted January 30, 2026. Both were checked August 10, 2026.
* Current framework sources: GitHub Spec Kit v0.16.1, GSD Core v1.10.0, and Kiro Specs documentation updated August 4, 2026. All were checked August 10, 2026.
* Same-case evidence: `plannotator/spec-planning-frameworks` at commit `7bfffe891436c02e0b9ecccc65ceb0b64c2a0701`, dated July 19, 2026.
*Last reviewed August 10, 2026. Researched and maintained by the Plannotator documentation team.*
# What Is a Product Requirements Document? How to Write One
Source: https://docs.plannotator.ai/learn/planning/what-is-a-product-requirements-document
Learn what a product requirements document is, how to write and review one with people and coding agents, and where technical design begins.
A product requirements document, or PRD, defines the user problem, intended outcome, scope, and observable requirements for a product or feature. It answers what should change and why. It should stop before detailed technical design and the step-by-step implementation sequence.
## What belongs in a PRD
| Question | PRD answer |
| - | - |
| Who has the problem? | Named users, relevant context, and journeys |
| Why solve it? | Evidence, goals, and the outcome that matters |
| What must the product do? | Observable functional requirements and acceptance criteria |
| What quality boundary matters? | Measurable nonfunctional requirements |
| What is excluded? | Non-goals and release boundaries |
| How will the team judge the result? | Success metrics plus counter-metrics |
| What is still unknown? | Open questions with an owner or evidence path |
A useful requirement is specific enough to challenge but does not prescribe a design without cause:
```md theme={null}
FR-4. A workspace owner can choose an expiry when creating a guest link.
Acceptance: Given an owned folder, when the owner selects seven days,
then the created link shows the same expiry before it is copied.
```
The requirement describes user-visible behavior. It does not choose a database column, cache strategy, or route implementation.
## How to write a product requirements document
1. State the user problem and link the evidence that makes it worth solving.
2. Name the users and write the journeys that deliver the intended outcome.
3. Set goals, non-goals, constraints, and dependencies before listing features.
4. Write observable requirements with acceptance criteria. Keep technical choices out unless they are fixed product constraints.
5. Add success metrics, counter-metrics, and open questions with owners or evidence paths.
6. Review the full document for conflicts, undefined terms, missing failure paths, and assumptions that a coding agent could mistake for decisions.
The [product requirements document template and example](/templates/product-requirements-document) applies this sequence in copyable Markdown.
## When to use one
Use a PRD when several people or agents need a shared product boundary before technical design, especially when the work has multiple user journeys, meaningful non-goals, business or usability outcomes, or unresolved product questions.
Use a [PRFAQ](/frameworks/amazon-working-backwards-prfaq) earlier, when the team still needs to test the proposed customer value and answer the questions that could stop the idea. A PRFAQ can lead to a PRD once the product direction is clear.
Skip a separate PRD when the change is small, reversible, and already has a clear user outcome. A concise issue or coding plan may be enough. Do not create a PRD only to satisfy a process label.
## How people and coding agents should review it
People should challenge the problem, evidence, priority, user impact, risk, and success measures. Coding agents can help test internal consistency, find undefined terms, trace acceptance criteria to requirements, and identify technical questions that the PRD leaves unresolved.
Use this review sequence:
1. Restate the user problem and intended outcome without copying the summary.
2. Trace each journey to one or more requirements.
3. Mark requirements that cannot be observed or tested.
4. Check goals against non-goals, constraints, success metrics, and counter-metrics.
5. Separate product questions from technical-design questions.
6. Record open questions instead of silently filling them with agent assumptions.
An agent should not turn an ambiguous product choice into an implementation detail. It should surface the choice and request evidence or a decision.
## Where the PRD stops
| Document | Primary job | Typical detail |
| - | - | - |
| PRD | Define product intent and required outcomes | Users, journeys, scope, requirements, acceptance, metrics |
| Technical specification | Define the maintained technical behavior and design | Architecture, interfaces, data, failure behavior, security, rollout |
| Implementation plan | Sequence the current change | Files or systems, ordered steps, dependencies, risks, validation |
These boundaries are editorial guidance, not universal industry law. Teams use different names. The important test is whether readers can tell which document owns product intent, which owns technical truth, and which is the current execution sequence.
BMad Method’s pinned [PRD template](https://github.com/bmad-code-org/BMAD-METHOD/blob/717479bc3f50f38119fd958b9e577a8bde2e0184/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-template.md) separates product vision, users, journeys, requirements, non-goals, scope, metrics, and questions from its later architecture and delivery artifacts. GitHub Spec Kit’s pinned [specification](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/spec-template.md), [plan](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/plan-template.md), and [tasks](https://github.com/github/spec-kit/blob/57cc518d63d6f10da3dd93df1ebcadda87c59374/templates/tasks-template.md) show a comparable separation under different names. Atlassian’s maintained [PRD guide](https://www.atlassian.com/agile/product-management/requirements) is another source-backed example of goals, assumptions, user stories, design context, and out-of-scope decisions.
Start with the [PRD template](/templates/product-requirements-document). Then use [PRD vs technical specification vs implementation plan](/compare/prd-vs-technical-specification-vs-implementation-plan) to place the downstream documents. Workspaces can [share, annotate, edit, and version the PRD](https://help.plannotator.ai/workspaces/review-plans-and-technical-decisions) with people and agents; it does not generate the document for you.
*Reviewed July 18, 2026. Written and maintained by the Plannotator documentation team.*
# Use Plannotator with Amp
Source: https://docs.plannotator.ai/open-source/agents/amp
Install Plannotator's Amp plugin and run manual code, file, and last-answer reviews from the command palette.
Amp uses a native command-palette plugin for manual Plannotator workflows. It does not intercept Amp's planning flow.
## Install
Install the [Plannotator command](/open-source/start/installation), then install the Amp plugin:
```bash theme={null}
mkdir -p ~/.config/amp/plugins
curl -fsSL https://raw.githubusercontent.com/backnotprop/plannotator/main/apps/amp-plugin/plannotator.ts \
-o ~/.config/amp/plugins/plannotator.ts
```
Restart Amp or run `plugins: reload` from the command palette.
To install it only for one project, copy the file to `.amp/plugins/plannotator.ts` in that project.
## Use it
Open Amp's command palette and choose:
* **Plannotator: Review changes**
* **Plannotator: Review changes or PR**
* **Plannotator: Annotate file**
* **Plannotator: Annotate last answer**
Leave the URL blank in **Review changes or PR** to review local changes.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Use Plannotator with Claude Code
Source: https://docs.plannotator.ai/open-source/agents/claude-code
Install Plannotator for Claude Code, review plans at ExitPlanMode without making Claude wait, invoke document and code review skills, and update the plugin.
Plannotator opens Claude Code's plans in a review UI in your browser. **Approve** lets Claude implement the plan. **Send Feedback** returns your annotations so Claude can revise it.
How Claude waits for your decision depends on the Claude Code version:
* **Claude Code 2.1.287 or later, in the interactive terminal:** the [Plannotator mod](#the-plannotator-mod) is on by default. Claude does not wait. Your decision arrives later as a message.
* **Older Claude Code, `claude -p` and SDK runs, Windows, or the mod turned off:** a hook holds `ExitPlanMode` open, and Claude waits until you decide.
## Install
Install the command:
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash
```
Then run these commands in Claude Code:
```text theme={null}
/plugin marketplace add backnotprop/plannotator
/plugin install plannotator@plannotator
```
Restart Claude Code so the plugin takes effect. The standard installer also adds three Claude-specific skills: `plannotator-review`, `plannotator-annotate`, and `plannotator-last`. It writes them to `~/.claude/skills`. If `$CLAUDE_CONFIG_DIR` is set, it uses `$CLAUDE_CONFIG_DIR/skills` instead.
The marketplace plugin supplies plan review and the Plannotator mod. The skills supply the three manual slash commands and call the installed `plannotator` binary. The plugin does not include the binary. See [Install and Manage Plannotator Skills](/open-source/start/skills) for extra skills and model-callable settings.
## Use it
Enter plan mode and ask Claude Code to prepare a plan. When Claude calls `ExitPlanMode`, Plannotator opens the plan. **Approve** allows implementation. **Send Feedback** returns your annotations and direct edits to Claude for another revision.
Use the installed skills for manual workflows:
```text theme={null}
/plannotator-review
/plannotator-annotate path/to/spec.md
/plannotator-last
```
`/plannotator-review` accepts a GitHub pull request or GitLab merge request URL. `/plannotator-annotate` accepts a file, folder, or web URL.
## The Plannotator mod
On Claude Code 2.1.287 or later, in the interactive terminal, the plugin runs the Plannotator mod. It is on by default.
When Claude calls `ExitPlanMode`, or you run `/plannotator-review`, `/plannotator-annotate` or `/plannotator-last`, Plannotator opens in your browser and Claude ends its turn. Claude does not wait for you:
* You can keep chatting with Claude while the review is open.
* When you decide, your decision arrives in the session as a message from the Plannotator plugin. Claude continues from there.
* If Claude revises the plan while the review is open, the same tab updates to the new version. Your comments stay.
* After you approve a plan, Claude calls `ExitPlanMode` once more and works from the exact plan text you approved.
* Claude can open Plannotator itself with its `plannotator` tool, for example when you ask it to "open notes.md in Plannotator". A `plannotator review`, `annotate` or `last` command that Claude runs in Bash opens the same way.
* Ask AI in the review is answered by this Claude session. See [Ask this session](/open-source/workflows/ask-this-session).
* The status line shows the reviews that are waiting for you.
* A review stays open if you close the terminal. Resume the session, for example with `claude --continue`, and the decision is delivered.
While a plan review is open, Claude is not blocked. If you leave plan mode yourself before you approve, Claude can start editing.
Keep the `plannotator` binary up to date as well: rerun the installer. With an older binary, plan review falls back to the waiting flow.
The mod is part of the marketplace plugin. A [manual hook](#manual-hook-setup) always uses the waiting flow.
### Turn the mod off
Set `PLANNOTATOR_CLAUDE_MOD=0` in the shell that starts Claude Code, or in the `env` block of Claude Code's `settings.json`. You can also add this to `~/.plannotator/config.json`:
```json theme={null}
{ "claudeCodeMod": false }
```
The environment variable wins over the config file. Claude Code reads the setting when it starts, so restart Claude Code after you change it. With the mod off, Claude waits for your decision, and Ask AI uses a provider you pick.
## Update
Rerun the standard installer to update the `plannotator` binary and the core skills. The marketplace plugin updates separately. Refreshing the marketplace alone does not update an installed plugin.
From a terminal:
```bash theme={null}
claude plugin marketplace update plannotator
claude plugin update plannotator@plannotator
```
Then restart Claude Code.
Or, inside Claude Code, run:
```text theme={null}
/plugin marketplace update plannotator
```
Then open `/plugin`, go to **Installed**, select **plannotator**, and choose **Update now**. Restart Claude Code.
Claude Code has no `/plugin update` command.
## Manual hook setup
If you do not use Claude Code's plugin system, add this hook to `~/.claude/settings.json`. With a manual hook, Claude waits for your decision on every Claude Code version.
```json theme={null}
{
"hooks": {
"PermissionRequest": [
{
"matcher": "ExitPlanMode",
"hooks": [
{
"type": "command",
"command": "plannotator",
"timeout": 345600
}
]
}
]
}
}
```
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. The Plannotator mod, Ask this session, and update sections were checked against Plannotator v0.28.0 on October 4, 2026, and the update steps were verified on Claude Code 2.1.289. Maintained by the Plannotator project.
# Use Plannotator with Codex
Source: https://docs.plannotator.ai/open-source/agents/codex
Enable Plannotator's Codex Stop hook, review plans after they render, and invoke review skills or shell commands.
Codex plan review uses the experimental `Stop` hook. Plannotator reads the latest plan after the turn renders. Feedback asks Codex to continue the same turn and revise the plan.
## Install
On macOS, Linux, or WSL, run:
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash
```
When Codex is installed or its home already contains user configuration, the installer enables hooks and writes the Plannotator `Stop` hook. Restart Codex Desktop after installation.
The installer stores hook configuration under `$CODEX_HOME`. If `$CODEX_HOME` is not set, it uses `~/.codex`. The installer stores the shared `plannotator-review`, `plannotator-annotate`, and `plannotator-last` skills under `~/.agents/skills`. `$CODEX_HOME` does not change that location.
Codex hooks are currently disabled on Windows. The Windows installer does not enable the plan-review hook.
## Use it
When a Codex turn ends with a plan, Plannotator opens automatically. Approval leaves the completed turn as-is. Feedback returns a continuation reason so Codex can revise the plan.
Use shell commands for manual workflows:
```text theme={null}
!plannotator review
!plannotator annotate path/to/spec.md
!plannotator last
```
You can also invoke `$plannotator-review`, `$plannotator-annotate`, or `$plannotator-last`.
See [Install and Manage Plannotator Skills](/open-source/start/skills) for the optional skills, specific-skill installation, updates, and removal.
## Update
Rerun the standard installer. It replaces the binary and shared core skills, then updates its managed Codex `Stop` hook without replacing a custom Plannotator hook wrapper.
## Check manual hook configuration
Codex requires the feature flag in `~/.codex/config.toml` or a repository's `.codex/config.toml`:
```toml theme={null}
[features]
hooks = true
```
The adjacent `hooks.json` can contain:
```json theme={null}
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "/absolute/path/to/plannotator",
"timeout": 345600
}
]
}
]
}
}
```
Use an absolute command path for Codex Desktop because app-launched processes may not inherit your shell `PATH`.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Use Plannotator with Copilot CLI
Source: https://docs.plannotator.ai/open-source/agents/copilot-cli
Install Plannotator's Copilot CLI plugin for plan interception, code review, and document annotation.
The Copilot CLI plugin intercepts `exit_plan_mode` and opens the plan in Plannotator before Copilot continues.
## Install
Install the `plannotator` command with the [standard installer](/open-source/start/installation). Then run these commands in Copilot CLI:
```text theme={null}
/plugin marketplace add backnotprop/plannotator
/plugin install plannotator-copilot@plannotator
```
Restart Copilot CLI.
## Review a plan
Press `Shift+Tab` to enter Copilot CLI plan mode. When Copilot writes `plan.md` and calls `exit_plan_mode`, the plugin opens Plannotator. Approval lets Copilot continue. Feedback returns your annotations so the plan can be revised.
## Manual commands
```text theme={null}
/plannotator-review
/plannotator-review https://github.com/owner/repo/pull/123
/plannotator-annotate path/to/spec.md
/plannotator-last
```
`/plannotator-last` reads Copilot CLI's session event log. That log format is controlled by Copilot CLI and may change between versions.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Use Plannotator with Droid
Source: https://docs.plannotator.ai/open-source/agents/droid
Install Plannotator's Droid plugin for manual code review, file annotation, and last-message review.
The Droid plugin provides manual review commands. It does not intercept Droid's planning flow.
## Install
Install the [Plannotator command](/open-source/start/installation), then run:
```bash theme={null}
droid plugin marketplace add https://github.com/backnotprop/plannotator
droid plugin install plannotator@plannotator
```
## Use it
```text theme={null}
/plannotator-review
/plannotator-review https://github.com/owner/repo/pull/123
/plannotator-annotate path/to/spec.md
/plannotator-annotate docs/
/plannotator-last
```
The plugin expects `plannotator` on `PATH`. It opens the local browser UI and returns the submitted result to the Droid session.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Use Plannotator with Gemini CLI
Source: https://docs.plannotator.ai/open-source/agents/gemini-cli
Configure Gemini CLI plan review and install Plannotator's review and annotation commands.
The standard installer configures Gemini CLI's policy, `BeforeTool` hook, and Plannotator commands when it detects `~/.gemini`.
## Requirements and installation
Use Gemini CLI 0.36.0 or later. Then run the [standard Plannotator installer](/open-source/start/installation).
The installer adds:
* `~/.gemini/policies/plannotator.toml`, which allows `exit_plan_mode` without a separate terminal confirmation
* a `BeforeTool` hook in `~/.gemini/settings.json`
* `/plannotator-review` and `/plannotator-annotate` command files under `~/.gemini/commands`
Restart Gemini CLI after installation.
The `.toml` files are native Gemini CLI commands, not Agent Skills.
The standard installer also writes Plannotator's shared core skills under `~/.agents/skills` for hosts that read that location. Before you copy or remove either file type, read [Install and Manage Plannotator Skills](/open-source/start/skills#understand-host-specific-files).
## Review a plan
Run `/plan` in Gemini CLI. When the agent calls `exit_plan_mode`, the hook reads the plan and opens Plannotator. Approval lets the agent continue. Feedback returns your annotations for revision.
## Manual commands
```text theme={null}
/plannotator-review
/plannotator-review https://github.com/owner/repo/pull/123
/plannotator-annotate path/to/spec.md
```
If Gemini CLI was installed after Plannotator, rerun the Plannotator installer so it can add the Gemini-specific files.
Rerun the installer to update the native command files, policy, and managed hook entry, then restart Gemini CLI.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Choose Your Agent
Source: https://docs.plannotator.ai/open-source/agents/index
Choose a supported coding agent, editor, or note app and follow its Plannotator setup guide.
Choose the coding agent you already use. Its guide shows how to install Plannotator, open plans, annotate files, and review code.
## Coding agents
| Agent | Plan review | Open manually |
| - | - | - |
| [Claude Code](/open-source/agents/claude-code) | Marketplace plugin intercepts `ExitPlanMode` | Core skills appear as slash commands |
| [Codex](/open-source/agents/codex) | Experimental post-render `Stop` hook on macOS, Linux, and WSL | Shell commands and shared Agent Skills |
| [OpenCode](/open-source/agents/opencode) | `@plannotator/opencode` provides `submit_plan` | Installer-managed native command files |
| [Copilot CLI](/open-source/agents/copilot-cli) | Marketplace plugin intercepts `exit_plan_mode` | Plugin slash commands |
| [Gemini CLI](/open-source/agents/gemini-cli) | Installer adds a `BeforeTool` hook for `exit_plan_mode` | Native TOML command files |
| [Pi](/open-source/agents/pi) | `@plannotator/pi-extension` provides plan mode | Extension slash commands |
| [Amp](/open-source/agents/amp) | Manual only | Amp plugin command palette |
| [Droid](/open-source/agents/droid) | Manual only | Droid plugin slash commands |
| [Kiro CLI](/open-source/agents/kiro-cli) | Manual only | Kiro-specific skills and example custom agent |
Read [Install and Manage Plannotator Skills](/open-source/start/skills) for the core and extra skill lists, exact locations, and specific-skill commands.
## Editors and notes
* [VS Code](/open-source/agents/vscode) opens Plannotator sessions in editor tabs and can send selected-code annotations into an active code review.
* [Zed](/open-source/agents/zed) opens the current local review file from Plannotator.
* [Obsidian and Bear](/open-source/agents/notes) save plans to a note app from Plannotator's settings and plan-review UI.
* [Octarine](/open-source/agents/octarine) saves plans to a named Octarine workspace and folder.
Start with [Installation](/open-source/start/installation) if the `plannotator` command is not installed yet.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Use Plannotator with Kiro CLI
Source: https://docs.plannotator.ai/open-source/agents/kiro-cli
Install Plannotator's Kiro CLI skills and example custom agent for manual document and code review.
The standard installer adds Kiro-specific review skills and an example custom agent when it detects `kiro-cli` or `~/.kiro`. The current setup uses manual skills rather than a transparent plan hook.
## Install
Run the [standard Plannotator installer](/open-source/start/installation). If you install Kiro later, rerun the installer.
The installer adds:
* `plannotator-review` and `plannotator-annotate` under `~/.kiro/skills`
* `plannotator-setup-goal` and `plannotator-visual-explainer` under `~/.kiro/skills`
* an example agent at `~/.kiro/agents/plannotator.json`
An existing `~/.kiro/agents/plannotator.json` is not overwritten.
The standard installer gives Kiro two normally optional skills: `plannotator-setup-goal` and `plannotator-visual-explainer`. It does not install `plannotator-compound` for Kiro. See [Install and Manage Plannotator Skills](/open-source/start/skills) for the complete matrix.
## Use the example agent
```bash theme={null}
kiro-cli chat --agent plannotator
```
The agent exposes the installed skills as `skill://` resources. You can add the same resources to your own Kiro custom agent instead.
Rerun the standard installer to update the managed Kiro skill copies. Your existing `~/.kiro/agents/plannotator.json` remains unchanged.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Save Plannotator Plans to Obsidian or Bear
Source: https://docs.plannotator.ai/open-source/agents/notes
Configure Plannotator to save plans to an Obsidian vault or Bear notes.
Plannotator can save plans to Obsidian or Bear. Configure the note app from the review UI's settings.
## Obsidian
1. Open **Settings** in a plan review.
2. Enable Obsidian.
3. Select an auto-detected vault or enter its path.
4. Choose the destination folder. The default is `plannotator`.
Saved Markdown includes YAML frontmatter with creation time, source, and tags. Plannotator derives tags from the plan title and code languages and adds a `[[Plannotator Plans]]` backlink.
## Bear
Enable Bear in **Settings**. Plannotator creates a Bear note with the plan title and body. It adds generated tags or the custom tags you configure.
Bear support is available on macOS because it uses Bear's local URL scheme.
These note actions save a copy of the plan. The agent's source plan and Plannotator's local history remain separate.
Plannotator also supports [Octarine](/open-source/agents/octarine), which requires a workspace name and uses Octarine's local URL scheme.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Save Plannotator Plans to Octarine
Source: https://docs.plannotator.ai/open-source/agents/octarine
Configure Plannotator to save plans to a named Octarine workspace and folder.
Plannotator can create an Octarine note from the current plan. This support uses Octarine's local `octarine://` URL scheme.
## Configure Octarine
1. Open **Settings** in a plan review.
2. Enable Octarine.
3. Enter the exact Octarine workspace name.
4. Choose a folder inside that workspace. The default is `plannotator`.
The workspace name is required. Plannotator cannot save the note when this field is empty.
## Save a plan
After you configure Octarine, use the note save action in the review UI to save a plan manually. To save plans automatically, enable **Auto-save on Plan Arrival**. Plannotator creates the note when the plan loads, before you approve or deny it.
Plannotator creates a fresh note in the configured workspace and folder without opening the note. Octarine adds the `.md` extension to the generated filename.
The saved note starts with YAML frontmatter containing:
* generated tags from the plan and project
* `Status: Draft`
* `Author: plannotator`
* a `Last Edited` timestamp
This action saves a copy. The agent's source plan and Plannotator's local history remain separate.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Use Plannotator with OpenCode
Source: https://docs.plannotator.ai/open-source/agents/opencode
Add the Plannotator OpenCode plugin, choose its planning workflow, and install manual review commands.
The OpenCode plugin gives configured planning agents a `submit_plan` tool. The default `plan-agent` workflow exposes it to OpenCode's built-in `plan` agent.
## Install the plugin
Add Plannotator to `opencode.json`:
```json theme={null}
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@plannotator/opencode@latest"]
}
```
Restart OpenCode.
Run the standard installer if you also want `/plannotator-review`, `/plannotator-annotate`, and `/plannotator-last`:
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash
```
These are native OpenCode Markdown command files. On macOS, Linux, and WSL, the installer uses `${XDG_CONFIG_HOME:-$HOME/.config}/opencode/commands`. On Windows PowerShell and Command Prompt, it uses `%USERPROFILE%\.config\opencode\commands`. They are separate from Plannotator's Agent Skills. See [Install and Manage Plannotator Skills](/open-source/start/skills#understand-host-specific-files) for the artifact differences.
## Review a plan
Use OpenCode's `plan` agent. When it calls `submit_plan`, Plannotator opens the plan in the browser. Approval lets the agent continue. Feedback returns structured annotations for revision.
By default, `submit_plan` is not exposed to `build` or other primary agents.
## Choose a workflow
Use the expanded plugin entry when you need a different scope:
```json theme={null}
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
["@plannotator/opencode@latest", {
"workflow": "plan-agent",
"planningAgents": ["plan", "sisyphus"]
}]
]
}
```
Supported workflows:
| Workflow | Behavior |
| - | - |
| `plan-agent` | Exposes `submit_plan` to `plan` and names in `planningAgents`. This is the default. |
| `manual` | Does not register `submit_plan`. Use Plannotator commands when needed. |
| `user-managed` | Registers the tool without modifying prompts or permissions. |
| `all-agents` | Exposes the tool broadly to primary agents. This preserves the older behavior. |
Keep options inside the two-item Plannotator plugin entry. Do not add the options object as a separate item in the `plugin` array.
OpenCode uses the plugin's embedded server under Bun. In Node-based or wrapped environments, it falls back to the installed `plannotator` command.
## Switch agents after a review
Plannotator can ask OpenCode to switch agents after plan approval or code-review feedback. Choose the target from the approval menu or Settings.
When you have not saved a choice, plan approval switches from the planning agent to `build`, while code-review feedback stays on the current agent. After you save a choice, that target is shared by both surfaces.
Plannotator checks the configured target against OpenCode's current agent list before delivery. If the target is missing or cannot be checked, Plannotator shows a warning. It still approves the plan or sends the feedback. It skips the agent switch and does not send the stale target to OpenCode.
## Ask this session
On OpenCode 2, Ask AI in code review, annotate, and `/plannotator-last` is answered by your OpenCode session. It is the only Ask AI option there. In plan review, the session is waiting for your plan decision, so it gives a quick answer from its context only, and nothing is added to the conversation. OpenCode 1 and remote sessions use a separate provider that you pick. See [Ask this session](/open-source/workflows/ask-this-session).
## Update
Rerun the standard installer to update the binary and native command files. It clears cached Plannotator plugin packages for OpenCode 1 and OpenCode 2. Clearing the OpenCode 2 cache is new in Plannotator 0.28.0. Restart OpenCode so the configured `@plannotator/opencode@latest` entry reloads.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. The Ask this session and update sections were checked against Plannotator v0.28.0 on October 4, 2026. Maintained by the Plannotator project.
# Use Plannotator with Pi
Source: https://docs.plannotator.ai/open-source/agents/pi
Install and update the Plannotator Pi extension, review plans without making the agent wait, and use code review, document annotation, and last-message review.
Pi uses its own Plannotator extension. You do not need the standard Plannotator installer for this setup. The extension provides Pi's plan tool and slash commands; it does not install Plannotator's standalone core or extra Agent Skills.
## Install
```bash theme={null}
pi install npm:@plannotator/pi-extension
```
Pi 0.79.1 or later is required.
## Enter plan mode
Start Pi in plan mode:
```bash theme={null}
pi --plan
```
You can also run `/plannotator-plan-mode` or press `Ctrl+Alt+P` during a session. Both toggle plan mode.
In plan mode, the agent writes a Markdown plan and calls `plannotator_submit_plan`. Plannotator opens the plan for approval or annotated feedback. After approval, Pi enters execution mode and tracks checklist progress.
## Plan review does not make the agent wait
Since Plannotator 0.28.0, the agent does not wait while you review. When the review opens, the agent ends its turn. Your decision arrives later as a message.
* You can keep chatting with the agent while the review is open.
* The agent still cannot change code. Planning restrictions stay on until you approve.
* If the agent revises the plan while the review is open, the open tab updates to the new version and keeps your comments.
* Pressing Esc in Pi no longer cancels an open plan review. To abandon a review, leave plan mode with `/plannotator-plan-mode` or `Ctrl+Alt+P`. Leaving plan mode closes the open review.
## Ask this session
In plan review, code review, annotate, and `/plannotator-last`, Ask AI is answered by your Pi session. It is the only Ask AI option there, so there is no provider picker. Your question shows in Pi's chat. If the agent is busy, choose **Ask when it finishes** or **Interrupt and ask now**. In remote mode, you pick a separate provider instead. See [Ask this session](/open-source/workflows/ask-this-session).
## Hand an approved plan to another extension
Pi uses automatic in-session execution by default. Set `executionMode` in the global or project config:
1. `~/.pi/agent/plannotator.json`
2. `/.pi/plannotator.json`
The project config overrides the global config.
```json theme={null}
{
"executionMode": "external"
}
```
After approval, external mode completes these actions in order:
1. Restores the model, thinking level, and active tools from before planning.
2. Returns Plannotator to idle.
3. Emits `plannotator:plan-approved` with this payload:
```ts theme={null}
{
cwd: string;
planFilePath: string;
planContent: string;
feedback?: string;
}
```
A companion extension can listen to that Pi event and own execution. Plannotator does not enter its executing phase or track checklist progress in external mode. Tools from other extensions remain available. Plannotator disables only the tools that it enabled.
## Manual commands
```text theme={null}
/plannotator-review
/plannotator-annotate path/to/spec.md
/plannotator-last
```
`/plannotator-review` uses the detected Git, GitButler, or Jujutsu provider. Pass `--git` or `--gitbutler` to force one. GitButler review requires `but` 0.21.0 or later on `PATH`.
## Try without installing
```bash theme={null}
pi -e npm:@plannotator/pi-extension
```
## Update
If you also use the standard Plannotator installer, rerunning it updates the extension when `pi` is on your `PATH`. Otherwise, update from Pi:
```bash theme={null}
pi update --extensions
```
This updates your installed Pi packages, Plannotator included. A plain `pi update` updates only Pi itself. To update only Plannotator, run `pi update npm:@plannotator/pi-extension`. Restart Pi after updating.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. The plan review, Ask this session, and update sections were checked against Plannotator v0.28.0 on October 4, 2026. Maintained by the Plannotator project.
# Open Plannotator in VS Code
Source: https://docs.plannotator.ai/open-source/agents/vscode
Open Plannotator plan and code reviews in VS Code tabs and add editor selections to the active review.
The Plannotator VS Code extension redirects review sessions opened from an integrated terminal into VS Code tabs. It works alongside your coding-agent setup.
## Install
Install Plannotator from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=backnotprop.plannotator-webview) or [Open VSX](https://open-vsx.org/extension/backnotprop/plannotator-webview). Use Open VSX for VSCodium and editors that install extensions from that registry. VS Code 1.85.0 or later is required.
Install and configure Plannotator for your coding agent, then open a new VS Code integrated terminal. Terminals created before the extension activates do not receive the browser-routing environment variable.
## Use it
Launch a plan, document, or code review from the integrated terminal. The extension opens the local Plannotator URL in a VS Code tab instead of an external browser.
The extension also provides:
* **Plannotator: Open URL** to open a local Plannotator URL manually
* **Plannotator: Add Annotation** to add the current editor selection to the active review
* `Cmd+Shift+.` on macOS or `Ctrl+Shift+.` on Windows and Linux as the default keybinding for adding an editor annotation
Plannotator follows the current VS Code color theme. Review panels close after you approve or submit feedback.
## Remove the extension
Choose one removal method:
1. In VS Code, run:
```bash theme={null}
code --uninstall-extension backnotprop.plannotator-webview
```
Add `--profile ""` for a named profile.
2\. Open the **Extensions** view, find Plannotator, open its settings menu, and select **Uninstall**.
Use the Extensions view in VSCodium or another Open VSX editor. [VSCodium uses Open VSX](https://github.com/VSCodium/vscodium/blob/master/docs/extensions.md#how-to-use-the-open-vsx-registry) in that view by default. Restart the editor's extension host when prompted.
The extension stores its virtual Plannotator cookie jar in editor-managed `globalState` under the key `plannotator-cookies`. It does not provide a command to clear that record, so the record can remain after uninstall.
Do not delete the editor's shared profile or state database. These stores contain data from other extensions.
See [Remove Plannotator](/open-source/start/installation#remove-plannotator) for the complete executable, agent, skill, runtime, and local-data cleanup.
## If the external browser still opens
1. Confirm `plannotatorWebview.injectBrowser` is enabled.
2. Open a new integrated terminal.
3. Launch the agent from that terminal and start the review again.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Open review files in Zed
Source: https://docs.plannotator.ai/open-source/agents/zed
Open the current local Plannotator review file in Zed or Zed Preview.
Plannotator can open the current local file in Zed from plan review, document annotation, and code review.
## Use it
1. Open a local Plannotator review.
2. Open the **Open in...** menu on the document or code file.
3. Choose **Zed**, or choose **Zed Preview** on macOS to open the document in the preview build.
Plannotator lists Zed only when it detects an installed application or executable. On macOS, **Zed Preview** appears as a separate choice when that app bundle is installed. Linux and Windows use the regular `zed` executable for preview builds too, so they use the existing Zed entry.
## Availability
Opening a file in Zed requires a local source path.
The action is unavailable in these cases:
* a remote session
* a pull-request review without a local checkout
* a deleted file
* a committed GitButler Stack or Branch view that does not match the live workspace
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Artifact Server: A Local Workspace for AI Agent Artifacts
Source: https://docs.plannotator.ai/open-source/artifact-server
Browse, edit, annotate, and organize files created by AI agents in one local workspace with MCP and OpenAPI access.
Artifact Server is a local, source-available workspace for files created or used by AI agents. It organizes these files into projects where you can review them and connect them to Kanban work.
Agents connect through MCP or its checked OpenAPI contract. Artifact Server is experimental and built for one person using local files and local agents. It has no accounts or cloud service.
Inspect the source, setup instructions, MCP reference, and HTTP API contract.
## What Artifact Server does
* Organizes artifacts into projects.
* Links existing files without copying them.
* Stores new files when Artifact Server should own the bytes.
* Previews and edits HTML, Markdown, images, video, audio, PDFs, text, and other files.
* Keeps browser comments with each artifact.
* Tracks work on a four-column Kanban board.
* Exposes 11 MCP tools and an OpenAPI contract.
Use Artifact Server when agent output is spread across repositories, project folders, downloads, or temporary locations and you need one local place to find and inspect it.
## Link existing files or publish new ones
A **linked artifact** points to a file that already lives on your computer. The original file remains the source of truth. Editing it through Artifact Server writes to that file, and conflict checks prevent an older view from silently overwriting a newer external edit.
A **managed artifact** stores its bytes in Artifact Server. Use this when an agent creates a report, prototype, image, recording, or other output that does not have a permanent home yet.
Both kinds of artifacts use the same project tree, viewers, editor, annotations, downloads, and Kanban connections.
## Review agent output in the browser
Self-contained HTML opens in a sandboxed viewer. Relative CSS, JavaScript, images, fonts, and media work when the files are indexed at matching project paths. Markdown uses Plannotator's packaged viewer and editor. Images, video, audio, PDFs, text, and unknown binary files have built-in previews or raw downloads.
Comments stay in Artifact Server for human reference. Artifact Server does not send them back to an agent or turn them into a review submission.
## Connect agents through MCP
The local server exposes MCP over Streamable HTTP:
```text theme={null}
http://127.0.0.1:7337/mcp
```
Agents can discover projects, search and read artifacts, link local files, publish managed files, repair moved links, and manage Kanban cards. Start with `artifact_list_projects`. Prefer `artifact_link` when a useful file already exists on disk. Use `artifact_publish` when Artifact Server should own the file.
## Run Artifact Server
Artifact Server requires Node.js 22 or newer and pnpm.
```bash theme={null}
git clone https://github.com/plannotator/artifact-server.git
cd artifact-server
pnpm install
pnpm build
pnpm start
```
Open [http://127.0.0.1:7337](http://127.0.0.1:7337). Artifact Server stores its catalog and managed files under `~/.plannotator/artifact-server/` by default.
## Local and source-available
Artifact Server runs on your computer. Linked files remain in their current folders. Managed files, annotations, and Kanban state stay in its local data directory.
Artifact Server is source-available, not OSI open source. It is free for individuals, nonprofits, education, public research, work solely on public OSI-licensed projects, and 30-day company evaluations. Other for-profit organizational use requires a commercial license. Read the [complete license](https://github.com/plannotator/artifact-server/blob/main/LICENSE.md) before use.
## How it relates to Plannotator
[Plannotator OSS](/open-source/) reviews plans, documents, and code with coding agents. Artifact Server focuses on finding and working with the wider set of files agents produce. The projects share document-viewing and annotation foundations but remain separate products.
Learn more about the broader category in [What is an AI artifact?](/learn/ai-development/what-is-an-ai-artifact).
*Last verified against the Artifact Server repository on July 19, 2026. Maintained by the Plannotator project.*
# Set Up the Plannotator Inbox for Your Coding Agents
Source: https://docs.plannotator.ai/open-source/inbox
Start the Plannotator Inbox, connect Claude Code, Codex, Pi, OpenCode, or another MCP client, and answer agent questions without holding a session open.
The Plannotator Inbox is one local window on your computer where agents leave you messages, questions, files, and guided reviews. You answer when you can. No agent waits on the Inbox, so a session keeps working or ends its turn after it writes.
When you press **Send**, your reply goes back to the session that asked.
## Prerequisites
* A coding agent: Claude Code, Codex, Pi, OpenCode, or another MCP client.
* Plannotator on the same computer. Run `plannotator --version` and verify `v0.28.9` or later.
## Set up the Inbox
Run the installer. It also updates an existing install.
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash
```
```powershell theme={null}
irm https://plannotator.ai/install.ps1 | iex
```
See [Install Plannotator](/open-source/start/installation) for other options.
```bash theme={null}
plannotator inbox
```
The Inbox starts and opens in your browser. Run it once before you connect an agent: the first run writes the file that the Claude Code, Pi, and OpenCode connections look for when a session starts.
After that, you do not need to keep the Inbox running. An agent that writes to a stopped Inbox starts it in the background, without opening a tab.
Use the [Plannotator plugin](/open-source/agents/claude-code) on Claude Code 2.1.287 or later, and [update the plugin](/open-source/agents/claude-code#update) if you installed it earlier. Its Plannotator mod adds a `plannotator_inbox` tool, which is on by default.
**Quit and restart Claude Code.** Claude Code adds the tool when it starts, so a session that started before your first `plannotator inbox` does not have it. A new conversation inside a running Claude Code is not enough.
The mod does not run in `claude -p`, SDK runs, or on Windows. There, connect Claude Code through MCP like Codex: `claude mcp add --scope user plannotator-inbox -- plannotator inbox mcp`.
Use the [Pi extension](/open-source/agents/pi) or the [OpenCode plugin](/open-source/agents/opencode). Their Inbox tool is off by default. Turn it on with one of these:
* In the Inbox, open **Settings** and turn the switch on for Pi or OpenCode.
* Set the environment variable before you start the agent:
```bash theme={null}
export PLANNOTATOR_INBOX_TOOL=1
```
Then start a new Pi session (or run `/reload`), or restart OpenCode.
Add `plannotator inbox mcp` as an MCP server. For Codex:
```bash theme={null}
codex mcp add plannotator-inbox -- plannotator inbox mcp
```
Restart Codex after you add it. The command also adds the server to the Codex app and IDE extension.
For Cursor, VS Code, Gemini CLI, Zed, and other clients, open the Inbox and use the client picker on its first screen or in **Settings**. It shows the exact command, config snippet, or install link for each client, with the full path to your `plannotator` binary. Apps started from the Dock might not see your shell `PATH`, so prefer that full-path version.
In a new session, ask your agent:
```text theme={null}
Send me a test message in my Plannotator Inbox.
```
A thread appears in the Inbox. Type a reply and press **Send**.
## How it works
* **Threads by project.** Each agent session writes to its own thread unless the agent names a thread to join. The sidebar groups threads by project: the repository, or the folder when there is no repository.
* **Questions and Send.** Questions appear as cards. Click to pick an answer. Your picks save at once, and **Send** delivers your picks, your words, and any file annotations as one reply.
* **Replies wake the session.** With Claude Code, Pi, or OpenCode 2, your reply arrives in the session that asked as a new turn once the session is idle. It never interrupts a running turn. Codex and other MCP clients are not woken: the agent reads your reply with the `wait_for_reply` or `read_thread` tool.
* **Local by default.** The Inbox binds `127.0.0.1` and stores everything under `~/.plannotator/inbox/` (or `$PLANNOTATOR_DATA_DIR/inbox/`). To open it from your other devices, see [Open the Inbox over your tailnet](#open-the-inbox-over-your-tailnet).
## How to use it
* Hand off long work and let the agent leave its questions in the Inbox instead of stopping to wait for you.
* Get decisions while you are away from the terminal, then answer several threads in one pass.
* Review files the agent attached, and annotate them before you reply.
* Read guided reviews of a code change, section by section.
At first, ask your agent to use the Inbox by name, for example "leave your open questions in my Plannotator Inbox". With an MCP-only agent, also tell it to wait for your reply.
Use a plan review or `plannotator annotate` instead when you need a decision before the agent continues.
## Open the Inbox over your tailnet
Requires Plannotator `v0.28.10` or later.
If you use Tailscale, you can open the Inbox from your phone, tablet, or another computer on your tailnet. See [Review Plannotator sessions over Tailscale](/open-source/tailscale) for Tailscale setup and HTTPS certificates.
Turn it on in one of two ways:
* Run `plannotator inbox --tailscale`. It publishes until the Inbox stops and works with `--background` and `--no-open`. If the Inbox is already running, the command asks it to publish.
* In the Inbox, open **Settings** and turn on **Over your tailnet**. The switch stays on, so the Inbox publishes at every start, also when an agent starts it. You can turn it on only from this computer.
On the other device, open the address that the command prints and **Settings** shows: `https://..ts.net:/`, where the port is the Inbox's own port.
* **Tailnet only.** The Inbox stays bound to `127.0.0.1`. Tailscale Serve publishes it over HTTPS inside your tailnet. The Inbox never uses Tailscale Funnel.
* **Only your login.** The Inbox lets in only the Tailscale login that owns this computer. It refuses other logins and tagged devices.
* **Agents stay local.** MCP and the reply wake answer only on this computer, never over the tailnet.
* **Tailscale unavailable.** If Tailscale is missing or signed out, the Inbox still runs on this computer, and **Settings** shows why it could not publish.
* **Hard off.** `PLANNOTATOR_INBOX_TAILSCALE=0` keeps it off, even with `--tailscale` or the switch.
To let in another login, for example your own login on a shared tailnet, add it to `~/.plannotator/config.json`:
```json theme={null}
{ "inboxTailscaleAllow": ["you@example.com"] }
```
An allowed login can reply and send **New messages**. Both run as turns in your agent sessions on this computer, where agents run commands. Allow only people you would let run your agents. Anyone who holds your unlocked phone while it is signed in to Tailscale has the same access.
To stop publishing, turn the switch off or quit the Inbox. The Inbox removes the address when it stops or restarts. After a hard kill or a reboot, the address stays in Tailscale until the Inbox starts again. To remove it sooner, run `tailscale serve --https= off`. To keep a published Inbox running after you close the terminal, start it with `plannotator inbox --background --tailscale`.
If you followed the earlier manual workaround, remove that mapping with `tailscale serve --https=443 off`. It exposes the whole Inbox, including its agent tools, to everyone on your tailnet. The Inbox detects it, refuses requests through it, and **Settings** offers to replace it with the owner-only address.
## Troubleshooting
* **My agent does not see the Inbox tool.** Run `plannotator inbox` once, then fully restart Claude Code or OpenCode, or start a new Pi session. On Pi and OpenCode, also turn the tool on. When `PLANNOTATOR_INBOX_TOOL` is set, it decides for every agent and overrides **Settings**.
* **Codex does not write to the Inbox.** Codex has no built-in Inbox tool. Add the MCP server with `codex mcp add plannotator-inbox -- plannotator inbox mcp`, then restart Codex.
* **My reply did not arrive.** A reply waits until the session is idle. MCP-only agents must read it with `wait_for_reply` or `read_thread`, so ask the agent to check.
* **I cannot open the Inbox from my phone.** Sign in to Tailscale with the same login on both devices, check that Tailscale is signed in on this computer, and check that **Over your tailnet** is on in **Settings**.
* **The Inbox address changed.** When its last port is taken, the Inbox starts on a new port and shows a notice. MCP connections through `plannotator inbox mcp` follow the change. Allow browser notifications again at the new address.
* **I want to stop the Inbox.** Press `Ctrl+C` in the terminal that runs it. For a background Inbox, find its process ID with `grep '"pid"' ~/.plannotator/inbox/inbox.json` and run `kill `. The next agent that writes starts it again.
For every command, setting, MCP tool, and file on disk, see the [Inbox reference](https://plannotator.ai/docs/reference/inbox/).
Last verified on October 9, 2026, against Plannotator `v0.28.10`. Maintained by the Plannotator project.
# Plannotator OSS Documentation
Source: https://docs.plannotator.ai/open-source/index
Install Plannotator, annotate plans and documents, review code changes, and return feedback to your coding agent.
Plannotator is an open-source, local feedback tool for coding agents. It opens plans, Markdown, HTML, local code changes, pull requests, and merge requests in a visual interface, then returns your annotations and feedback to the agent.
The `plannotator` binary runs a temporary server on your computer and opens the session in your browser. Plannotator supports Claude Code, Codex, OpenCode, Copilot CLI, Gemini CLI, Pi, Amp, Droid, and Kiro CLI through host-specific hooks, plugins, commands, or skills.
Install, update, or remove the binary and connect your coding agent.
Deploy the deprecated OSS share portal and paste service when compatibility requires them.
Compare core and extra skills, choose specific skills and hosts, and manage updates.
Open Markdown, mark what should change, and send feedback to your coding agent.
Review local code changes and return line-specific feedback to your coding agent.
Use the deprecated OSS sharing flow, retained for compatibility, and import returned annotations.
Set up Claude Code, Codex, OpenCode, Copilot CLI, or another supported agent.
Start it from your coding agent or run it directly.
## Plans and documents
Use Plannotator to select text, request deletions, attach comments or images, edit Markdown, and send structured feedback. Plan reviews can also show what changed after the agent revises the plan.
Review a plan before the agent starts implementation.
Annotate documents, plain-text config and data files, URLs, and folders.
Annotate rendered local HTML and understand its security boundary.
## Review code
`plannotator review` opens local Git, Jujutsu, GitButler, or Perforce changes. You can also pass a GitHub pull request or GitLab merge request URL. Plannotator shows the diff, accepts line comments and suggestions, and returns your feedback to the agent session.
Review committed branch work, working-tree changes, and untracked files where the current VCS supports them.
Open GitHub and GitLab reviews from their URLs and choose local or API-only review.
## Where data goes
Normal local sessions bind to `127.0.0.1`. Plannotator stores plans, history, drafts, configuration, and session records under its data directory. This directory is `~/.plannotator` by default. Plannotator uses an absolute `XDG_DATA_HOME` only when `~/.plannotator` does not exist.
Remote mode binds to `0.0.0.0`. The review UI and local APIs do not add user authentication. Use SSH port forwarding or a trusted private network.
Plannotator OSS does not send usage telemetry or analytics. Its app surfaces check GitHub automatically for the latest release, and a local Git review can contact its configured `origin`. Optional features can contact URL, provider, AI, sharing, or hosted services. See [Privacy and data flow](/open-source/reference/privacy-and-data-flow) for the details.
Plannotator is dual-licensed under [MIT](https://github.com/backnotprop/plannotator/blob/main/LICENSE-MIT) or [Apache 2.0](https://github.com/backnotprop/plannotator/blob/main/LICENSE-APACHE). Source code, releases, and issue tracking are in [`backnotprop/plannotator`](https://github.com/backnotprop/plannotator).
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Plannotator CLI reference
Source: https://docs.plannotator.ai/open-source/reference/cli
Commands and flags for reviewing changes, annotating files and URLs, reopening sessions, and reading saved plan decisions.
The `plannotator` command opens a local review session in your browser. Run `plannotator --help` for the help text shipped with your installed version.
## Review code changes
```bash theme={null}
plannotator review [--git | --gitbutler] [--local | --no-local] [PR_URL]
```
With no URL, Plannotator reviews changes in the current repository. It detects Git, GitButler, Jujutsu, or Perforce. Use `--git` or `--gitbutler` to override detection. GitButler support requires `but` 0.21.0 or later; see the [GitButler workflow guide](/open-source/workflows/gitbutler) for detection, views, and limits. Jujutsu is detected through the installed `jj` command and does not have a separate flag.
Pass a GitHub pull request or GitLab merge request URL to review it. Plannotator prepares a local checkout by default so it can show complete files. Use `--no-local` for a diff-only review.
```bash theme={null}
plannotator review
plannotator review --git
plannotator review --gitbutler
plannotator review https://github.com/owner/repo/pull/123
plannotator review --no-local https://gitlab.com/group/project/-/merge_requests/42
```
## Annotate a file, URL, or folder
```bash theme={null}
plannotator annotate \
[--markdown] [--no-jina] [--gate] [--json] [--hook] \
[--require-approval] [--result-file ]
```
Markdown and supported plain-text files open as documents. Local HTML renders as HTML by default; `--markdown` converts it to Markdown. A folder opens the supported document files it contains. Local files are limited to 2 MiB.
URLs use Jina Reader by default. `--no-jina` uses a direct fetch followed by local HTML-to-Markdown conversion.
`--gate` adds an Approve action. `--json` writes a machine-readable decision to standard output. `--hook` implies `--gate` and writes the hook-native block/pass contract described in [Hooks](/open-source/reference/hooks).
`--require-approval` and `--result-file ` are strict automation options. They work only with direct `annotate --gate --json` calls and cannot be combined with `--hook`.
* `--require-approval` exits `0` only for approval. Annotations or dismissal exit `1`.
* `--result-file ` publishes the same newline-terminated JSON record written to stdout.
* Invalid flags, startup failures, and result-publication failures exit `2`.
* The result path is resolved from the current working directory. Its parent must already exist, and the destination must not exist, including as a dangling symlink.
The strict result is one of `{"decision":"approved"}`, `{"decision":"approved","feedback":""}`, `{"decision":"annotated","feedback":""}`, or `{"decision":"dismissed"}`.
Plannotator writes the decision to stdout before publishing the result file. Result publication uses a same-directory temporary file with `0600` permissions where supported and an atomic no-overwrite link. This prevents replacement of an existing destination, but it does not guarantee persistence after a system crash.
## Annotate the last agent message
```bash theme={null}
plannotator annotate-last [--stdin] [--gate] [--json] [--hook]
plannotator last [--stdin] [--gate] [--json] [--hook]
```
The command reads the last assistant message from a supported agent session. Use `--stdin` to supply the text yourself:
```bash theme={null}
printf '%s' "$message" | plannotator annotate-last --stdin
```
`last` is an alias for `annotate-last`.
## Reopen a running session
```bash theme={null}
plannotator sessions
plannotator sessions --open
plannotator sessions --open 2
plannotator sessions --clean
```
`sessions` lists live local servers. `--open [N]` opens the numbered session, with session 1 as the default. `--clean` removes stale session records.
## Read saved plan decisions
```bash theme={null}
plannotator archive
```
This opens the read-only archive for decisions saved under `/plans/`. The default is `~/.plannotator/plans/`; see [Configuration](/open-source/reference/configuration#where-settings-live) for data-directory resolution.
## Goal setup commands
```bash theme={null}
plannotator setup-goal [--json]
```
This command belongs to the installed `/goal` workflow. `interview` opens goal questions; `facts` opens the facts acceptance view. Pass `-` to read the bundle JSON from standard input.
## Global options and hook-only commands
* `--browser ` selects a browser, application, or executable for this run. It can appear with any command.
* `--version` and `-v` print the installed version.
* `plannotator improve-context` is called by an installed agent hook. It reads a hook event from standard input and is not intended for direct use.
Running `plannotator` without arguments also belongs to hook integration and expects JSON on standard input. For an interactive session, choose `review`, `annotate`, `last`, `archive`, or `sessions` explicitly.
## Installation lifecycle
Use the operating-system installer to install or update Plannotator.
```bash theme={null}
plannotator uninstall [--dry-run] [--purge]
```
`plannotator uninstall` removes the installed executable and Plannotator-managed integrations. Use `--dry-run` to inspect the removal plan without changing files. Use `--purge` to include local data. Read [Remove Plannotator](/open-source/start/installation#remove-plannotator) before you use `--purge`. That procedure explains safeguards, retained files, and residual state.
Agent Skills and host plugins have separate lifecycles. See [Install and Manage Plannotator Skills](/open-source/start/skills) before removing a `/plannotator-*` entry, because the same visible command can be backed by a skill, a native command file, or a plugin.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Configure Plannotator
Source: https://docs.plannotator.ai/open-source/reference/configuration
How Plannotator combines command flags, environment variables, config.json, and browser UI settings.
Plannotator has four settings layers. Use command flags for one run, environment variables for a shell or host integration, `config.json` for persistent runtime behavior, and the Settings panel for review UI preferences.
## Where settings live
Plannotator chooses its data directory in this order:
1. `PLANNOTATOR_DATA_DIR`, with leading `~` expansion
2. An existing `~/.plannotator` directory
3. `$XDG_DATA_HOME/plannotator` when `XDG_DATA_HOME` is an absolute path
4. `~/.plannotator`
When `PLANNOTATOR_DATA_DIR` is relative, Plannotator resolves it from the process's launch working directory. The same value can select several directories when installers, agents, or shells start from different locations. Use an absolute value when several hosts share one configuration.
Before you delete data, identify each working directory that launched Plannotator. Resolve `PLANNOTATOR_DATA_DIR` from each directory. Apply the deletion safety checks to every resulting absolute path.
It does not implicitly use `~/.local/share/plannotator` when `XDG_DATA_HOME` is unset. An existing `~/.plannotator` continues to win over XDG so an upgrade does not silently move your data.
The persistent runtime config is `/config.json`. At the default location, that is:
```text theme={null}
~/.plannotator/config.json
```
Plannotator treats a missing file as an empty config. If the JSON is malformed, it prints a warning and uses defaults.
## Precedence
The narrowest setting wins:
1. A command flag, when the command supports one
2. An environment variable
3. A value in `config.json`
4. The built-in default
For example, URL conversion resolves in this order: `--no-jina`, `PLANNOTATOR_JINA`, `jina` in `config.json`, then the default of enabled.
The Settings panel uses a related but separate rule. Settings that Plannotator syncs to the server prefer `config.json`, then the browser cookie, then the built-in default. Changes in the panel update the cookie immediately and write the supported fields back to `config.json`.
## Runtime config file
This example shows every supported top-level config key. You only need to include values you want to change.
```json theme={null}
{
"displayName": "Avery",
"prompts": {},
"diffOptions": {
"diffStyle": "unified",
"overflow": "wrap",
"diffIndicators": "bars",
"lineDiffType": "word-alt",
"showLineNumbers": true,
"showDiffBackground": true,
"fontFamily": "monospace",
"fontSize": "14px",
"tabSize": 2,
"hideWhitespace": false,
"expandUnchanged": false,
"defaultDiffType": "since-base",
"lineBgIntensity": "normal"
},
"conventionalComments": true,
"conventionalLabels": [
{ "label": "issue", "display": "Issue", "blocking": true },
{ "label": "suggestion", "display": "Suggestion", "blocking": false }
],
"verifyAttestation": false,
"jina": true,
"annotateHistory": true,
"guideHistory": true,
"pfmReminder": false,
"glimpse": true,
"share": "enabled",
"cursorSandbox": true,
"claudeCodeMod": true
}
```
### Supported diff values
| Setting | Values |
| - | - |
| `diffStyle` | `split`, `unified` |
| `overflow` | `scroll`, `wrap` |
| `diffIndicators` | `bars`, `classic`, `none` |
| `lineDiffType` | `word-alt`, `word`, `char`, `none` |
| `defaultDiffType` | `since-base`, `uncommitted`, `unstaged`, `staged`, `merge-base`, `all` |
| `lineBgIntensity` | `subtle`, `normal`, `strong` |
`conventionalLabels` replaces the built-in comment labels. Set it to `null` to restore the defaults.
`annotateHistory` stores a copy of each annotated local file under the data directory so later sessions can show a version diff. Set it to `false` if you do not want that history written.
`guideHistory` defaults to `true` and stores successful Guided Reviews and their section progress. Set it to `false` to stop new guide writes. Existing guides remain on disk.
`cursorSandbox` defaults to `true` and controls whether Plannotator passes `--sandbox enabled` to Cursor review jobs. Set it to `false` only when Cursor's sandbox cannot start on your system.
`claudeCodeMod` defaults to `true` and controls the [Plannotator mod](/open-source/agents/claude-code#the-plannotator-mod) on Claude Code 2.1.287 or later. Set it to `false` to turn the mod off, so Claude waits for your decision. `PLANNOTATOR_CLAUDE_MOD` overrides it. Claude Code reads it when it starts, so restart Claude Code after a change.
`verifyAttestation` is also a valid config key, but only the installer reads it. When enabled, installation requires an authenticated GitHub CLI and verifies build provenance after the checksum.
## Browser UI settings
The Settings panel stores UI preferences in a browser cookie because Plannotator sessions use changing local ports. The cookie can be shared across those ports on the same host.
The server-synced settings are your display name, diff options, conventional comments, and custom comment labels. Other interface choices, such as theme, layout, panel state, and file browser preferences, remain in the browser cookie.
Some functional cookies do not use a `plannotator-` prefix. Current examples include `plannotator.agents`, `review-split-ratio`, and `update-dismissed-version`; Plannotator can also read the legacy `review-diff-style` cookie. Pull request review state uses other browser stores. Hidden artifact choices use `localStorage` keys named `plannotator-pr-artifacts:hidden:`, and review-submission recovery can use tab-scoped `sessionStorage`.
To remove browser state, close every Plannotator review and share tab first. In each browser profile, clear full site data for every exact Plannotator origin and port you used, including `http://localhost:`, alternate local or remote origins, and `https://share.plannotator.ai` when applicable. If the browser groups cleanup by hostname, clearing `localhost` can also remove data for unrelated local applications. Browser cleanup does not delete `config.json`, saved plans, or annotation history from disk.
### Change the theme
Open the header menu, select **Settings**, then open **Theme**. Choose **Light**, **Dark**, or **System**, then choose a color theme. The mode and color theme are browser preferences, so they can differ between browsers.
When Plannotator opens inside the VS Code extension, it follows the current VS Code color theme. See [VS Code](/open-source/agents/vscode).
### Close the tab after a decision
Open **Settings > General > Auto-close Tab**. The default is **Off**, which keeps the completion page open after you send feedback, approve, or close a session. You can instead close it immediately, after three seconds, or after five seconds.
## Prompt customization
The `prompts` object in `config.json` changes supported feedback messages returned to the calling agent after a decision. It does not replace the instructions used by launched AI review jobs. See [Customize Feedback](/open-source/reference/custom-feedback) for supported paths, keys, placeholders, defaults, and precedence.
## Environment variables
Environment variables are the right layer for remote mode, a fixed port, a browser choice, or behavior set by an agent host. See [Environment variables](/open-source/reference/environment-variables).
`PLANNOTATOR_AI=disabled` is an environment-only kill switch. It removes Ask AI, Review Agents, and Guided Review from the UI and disables provider and review-job execution without disabling ordinary reviews.
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Customize Feedback
Source: https://docs.plannotator.ai/open-source/reference/custom-feedback
Change the messages Plannotator returns after plan, document, and code-review decisions.
Add feedback templates under `prompts` in Plannotator's `config.json`. Plan and document feedback use the `plan` and `annotate` sections. Code review uses the separate `review` section.
The file is `/config.json`. The data directory is normally `~/.plannotator`, but `PLANNOTATOR_DATA_DIR` or an absolute `XDG_DATA_HOME` can change it. Plannotator reads the file again when it generates the next supported feedback message, so you do not need to restart it.
## Plan and document feedback
Use `prompts.plan` for an agent's plan-review decision:
```json theme={null}
{
"prompts": {
"plan": {
"denied": "Revise the plan, address every item below, then call {{toolName}} again.\n\n{{feedback}}",
"approvedWithNotes": "The plan is approved with these implementation notes:\n\n{{feedback}}"
}
}
}
```
Keep `{{feedback}}` in a template that should return your annotations. If you remove it, the template still runs, but the exported annotations are omitted from the message.
| Key | Used when | Available placeholders | Built-in behavior |
| - | - | - | - |
| `plan.denied` | You request changes to an agent plan | `{{toolName}}`, `{{planFileRule}}`, `{{feedback}}` | Requires the agent to revise every submitted item before resubmitting and preserves the plan title unless asked to change it. |
| `plan.approved` | You approve a plan without notes | `{{planFilePath}}`, `{{doneMsg}}` | Tells the agent to execute the approved plan. OpenCode uses a shorter built-in message. |
| `plan.approvedWithNotes` | You approve a plan and include notes | `{{planFilePath}}`, `{{doneMsg}}`, `{{feedback}}`, `{{proceedSuffix}}` | Returns the approval plus your implementation notes. `{{proceedSuffix}}` is populated only by the OpenCode flow when it should start implementation. |
| `plan.autoApproved` | A non-interactive flow approves automatically | None | Reports that the plan was auto-approved and tells the agent to continue. |
Use `prompts.annotate` when a supported agent wrapper formats annotations on a file, folder, or assistant message:
```json theme={null}
{
"prompts": {
"annotate": {
"fileFeedback": "{{fileHeader}} notes for {{filePath}}:\n\n{{feedback}}",
"messageFeedback": "Revise your response using these notes:\n\n{{feedback}}",
"approvedWithNotes": "Approved. Continue without revising the reviewed content solely because of these notes.\n\n{{contextBlock}}{{feedback}}"
}
}
}
```
| Key | Used when | Available placeholders | Built-in behavior |
| - | - | - | - |
| `annotate.fileFeedback` | An agent wrapper returns file or folder annotations | `{{fileHeader}}`, `{{filePath}}`, `{{feedback}}` | Labels the result as Markdown annotations, identifies the file or folder, and asks the agent to address the feedback. |
| `annotate.messageFeedback` | An agent wrapper returns annotations on the latest assistant message | `{{feedback}}` | Labels the result as message annotations and asks the agent to address them. |
| `annotate.approved` | No verified current user path | None | Plannotator accepts this config key, but no current feature reads it. |
| `annotate.approvedWithNotes` | A supported agent wrapper returns approval with non-blocking notes | `{{feedback}}`, `{{context}}`, `{{contextBlock}}` | Reports approval, passes the notes, and tells the agent not to revise or reopen the reviewed content solely because of them. |
The annotation transport determines whether Plannotator applies a template:
| Transport | Template behavior | Approval behavior |
| - | - | - |
| OpenCode and Pi wrappers | Apply configurable feedback and approved-with-notes templates | No-notes approval does not use `annotate.approved` |
| Direct `plannotator annotate` and `plannotator annotate-last` commands | Return exported feedback without templates | Plain-text approval is fixed to `The user approved.` |
| Structured JSON | Returns structured decisions without templates | Can return approval notes as `feedback` |
| Hook-native output | Returns the hook-native block or pass contract | Cannot return approval notes |
## Code-review feedback
Use `prompts.review` for the result of `plannotator review`, including local changes, pull requests, and merge requests:
```json theme={null}
{
"prompts": {
"review": {
"approved": "# Code Review\n\nNo changes requested. Continue with the agreed next step.",
"denied": "\n\nValidate each submitted finding against the code and report your verdict before changing anything."
}
}
}
```
| Key | Used when | Placeholders | Built-in behavior |
| - | - | - | - |
| `review.approved` | You approve a code review | None | Returns a Code Review heading and says that no changes were requested. |
| `review.denied` | You send code-review annotations | None | Appends instructions to validate only the submitted findings, report evidence and a verdict for each one, and discuss them before changing code. |
A `review.denied` override replaces only the built-in suffix. It leaves the annotations unchanged. Plannotator adds the suffix only when the submitted review has annotations.
These settings do not change the instructions used by Ask AI or by an AI review job launched inside code review. Those jobs use their own prompts and any enabled global Agent Skills.
## Agent-specific overrides
Place an override under `runtimes` inside the relevant section:
```json theme={null}
{
"prompts": {
"plan": {
"denied": "Revise the plan using this feedback:\n\n{{feedback}}",
"runtimes": {
"opencode": {
"denied": "Update the plan, then call {{toolName}}:\n\n{{feedback}}"
}
}
},
"review": {
"runtimes": {
"codex": {
"approved": "# Code Review\n\nNo changes requested."
}
}
}
}
}
```
Supported runtime names are `claude-code`, `amp`, `droid`, `kiro-cli`, `opencode`, `copilot-cli`, `pi`, `codex`, and `gemini-cli`.
For any key, Plannotator chooses the first non-blank string in this order:
1. `prompts..runtimes..`
2. `prompts..`
3. A built-in value for that runtime, when one exists
4. The built-in general value
An empty or whitespace-only string is treated as unset. A misspelled or unavailable `{{placeholder}}` remains unchanged in the returned message. A missing or malformed config file falls back to built-in behavior; malformed JSON also writes a warning to standard error.
## Placeholder values
| Placeholder | Value at runtime |
| - | - |
| `{{feedback}}` | Your exported annotations or notes. |
| `{{toolName}}` | The agent action used to resubmit a plan, such as `ExitPlanMode`, `submit_plan`, `exit_plan_mode`, or `plannotator_submit_plan`. |
| `{{planFileRule}}` | A file-location instruction when the current plan flow supplies one; otherwise an empty string. |
| `{{planFilePath}}` | The current plan's backing-file path when supplied by the agent flow. |
| `{{doneMsg}}` | Optional save-path or checklist text supplied by the agent flow. |
| `{{proceedSuffix}}` | Optional OpenCode text that tells the agent to start implementation; empty in other current flows. |
| `{{fileHeader}}` | `File` or `Folder`. |
| `{{filePath}}` | The annotated file or folder path. |
| `{{context}}` | A short description of the approved source when the wrapper supplies one. |
| `{{contextBlock}}` | `{{context}}` followed by two newlines, or an empty string. |
## Check your change
1. Add a short marker such as `[custom-plan-feedback]` to one template.
2. Run the matching supported flow. For example, request a plan change for `plan.denied`, send an annotated code review for `review.denied`, or annotate a file through OpenCode, Pi, or Amp for `annotate.fileFeedback`.
3. Make sure that the returned message contains the marker and the expanded placeholders.
4. Remove the marker after you identify the selected key and runtime.
If the marker does not appear, make sure that the configuration path, JSON syntax, runtime name, and selection order are correct. See [Configuration](/open-source/reference/configuration) and [Environment variables](/open-source/reference/environment-variables) for the data-directory setting.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Plannotator environment variables
Source: https://docs.plannotator.ai/open-source/reference/environment-variables
Runtime, browser, remote-session, sharing, installer, and agent environment variables supported by Plannotator.
Use environment variables when a setting belongs to a shell, remote machine, or agent. Values set for one command affect only that run:
```bash theme={null}
PLANNOTATOR_PORT=19432 plannotator review
```
## Session and browser
| Variable | Accepted value and behavior |
| - | - |
| `PLANNOTATOR_REMOTE` | **Values:** `1` or `true` forces remote mode. `0` or `false` forces local mode. **Default:** Detect SSH from `SSH_TTY` or `SSH_CONNECTION`. |
| `PLANNOTATOR_URL_HOST` | **Values:** A hostname, IPv4 address, bracketed IPv6 address, or `auto`. **Effect:** Changes the advertised remote URL without changing the server bind address. **Auto:** Uses the Tailscale MagicDNS name, then exactly one Tailscale IPv4 address. **Precedence:** The environment value overrides `urlHost` in `config.json`. |
| `PLANNOTATOR_PORT` | **Values:** A fixed port such as `19432`, or a range such as `19432-19463`. **Default:** A random available port locally and `19432` remotely. |
| `PLANNOTATOR_BROWSER` | **Value:** A browser app name or path on macOS, or an executable on Linux and Windows. **Precedence:** The CLI `--browser` flag wins. |
| `BROWSER` | **Effect:** Supplies the fallback browser command when `PLANNOTATOR_BROWSER` is unset. **No browser:** `none`, `false`, `0`, and `:` do not launch one. |
| `PLANNOTATOR_GLIMPSE` | **Values:** `1` or `true` enables the Glimpse window when available. Other values disable it. **Default:** Enabled. |
| `PLANNOTATOR_GLIMPSE_WIDTH` | **Effect:** Sets the initial Glimpse window width. **Default:** `1280`. |
| `PLANNOTATOR_GLIMPSE_HEIGHT` | **Effect:** Sets the initial Glimpse window height. **Default:** `900`. |
Remote mode binds the unauthenticated local server to `0.0.0.0`. Forward it through SSH or your development environment and do not expose that port to an untrusted network. See [Troubleshooting](/open-source/troubleshooting#remote-ssh-and-development-containers).
Use [Tailscale remote reviews](/open-source/tailscale) for tailnet-only HTTPS access that keeps the server on `127.0.0.1`.
See [Remote access](/open-source/remote-access) for trusted private networks, SSH, development containers, and opening a session from another device.
## Annotation, history, and sharing
| Variable | Accepted value and behavior |
| - | - |
| `PLANNOTATOR_JINA` | **Values:** `1` or `true` uses Jina Reader. Other values use direct fetch and local conversion. **Precedence:** The `--no-jina` flag wins. |
| `JINA_API_KEY` | Optional bearer token sent to Jina Reader. |
| `PLANNOTATOR_ANNOTATE_HISTORY` | **Values:** `1` or `true` saves per-file annotation history. Other values disable it. **Default:** Enabled. |
| `PLANNOTATOR_GUIDE_HISTORY` | **Values:** `1` or `true` saves successful Guided Reviews. Other values disable new writes. **Default:** Enabled. **Existing data:** Saved guides remain readable. |
| `PLANNOTATOR_SHARE` | **Values:** `disabled` hides sharing. Any other value enables it. **Precedence:** Overrides `share` in `config.json` for integrations that use Plannotator's shared configuration resolver. An explicit OpenCode `share` setting takes precedence over this variable. |
| `PLANNOTATOR_SHARE_URL` | **Effect:** Sets the share portal base URL. **Default:** `https://share.plannotator.ai`. |
| `PLANNOTATOR_PASTE_URL` | Paste API used for encrypted short links and raw HTML sharing. |
The portal and paste-service deployment variables are documented in [Self-host Plannotator's deprecated share services](/open-source/self-hosting#deployment-variables).
## Files, diagnostics, and local tools
| Variable | Accepted value and behavior |
| - | - |
| `PLANNOTATOR_DATA_DIR` | **Effect:** Selects the data directory for configuration, plans, history, sessions, and installed runtime state. **Path:** Expands a leading `~`. Resolves a relative value from the launch working directory. **Default:** An existing `~/.plannotator`, then an absolute `$XDG_DATA_HOME/plannotator`, then `~/.plannotator`. |
| `PLANNOTATOR_FILE_BROWSER_MAX_FILES` | **Value:** A positive integer. **Effect:** Limits files returned by the file browser. **Default:** `5000`. |
| `PLANNOTATOR_SEM_PATH` | Explicit path to the optional `sem` semantic-diff binary. |
| `PLANNOTATOR_GIT_TIMEOUT_MS` | **Value:** A timeout in milliseconds. **Use:** Set it only when you diagnose an unusually slow repository. |
| `PLANNOTATOR_DEBUG` | Any non-empty value enables additional diagnostic output. |
| `PLANNOTATOR_AGENT_TERMINAL_REMOTE` | **Values:** `1`, `true`, or `yes` enables the embedded agent terminal in remote mode or a `--tailscale` session. **Default:** Disabled for both session types. **Risk:** The terminal can run commands on the remote machine. |
| `PLANNOTATOR_AI` | **Value:** `disabled` removes Ask AI, Review Agents, and Guided Review. It also disables their provider and job endpoints. **Other features:** Ordinary reviews remain available. |
| `PLANNOTATOR_CURSOR_SANDBOX` | **Values:** `0`, `false`, or `disabled` omits Cursor's `--sandbox enabled` flag. **Default:** Enabled. **Risk:** Without the flag, write protection depends on Ask mode and Cursor configuration. |
Relative `XDG_DATA_HOME` values are ignored. Plannotator does not apply the XDG specification's implicit `~/.local/share` default.
## Agent setup
Most users should let the installer set these values for supported agents.
| Variable | Accepted value and behavior |
| - | - |
| `PLANNOTATOR_ORIGIN` | **Values:** `claude-code`, `amp`, `droid`, `opencode`, `codex`, `copilot-cli`, `gemini-cli`, `kiro-cli`, or `pi`. **Effect:** Forces the calling agent. **Invalid value:** Falls back to detection. |
| `PLANNOTATOR_CWD` | Original project directory supplied by an integration wrapper. |
| `PLANNOTATOR_BIN` | **Effect:** Sets the Plannotator executable for integrations that launch the CLI. **Default:** `plannotator` from `PATH`. |
| `PLANNOTATOR_PLAN_TIMEOUT_SECONDS` | **Effect:** Sets the maximum wait for OpenCode `submit_plan`. **Default:** `345600`. **No timeout:** Set `0`. |
| `PLANNOTATOR_ALLOW_SUBAGENTS` | **Value:** `1` lets OpenCode subagents use `submit_plan`. **Default:** Off. |
## Claude Code
These apply to the [Plannotator mod](/open-source/agents/claude-code#the-plannotator-mod) on Claude Code 2.1.287 or later. Set them in the shell that starts Claude Code or in the `env` block of Claude Code's `settings.json`. Claude Code reads them when it starts, so restart it after a change.
| Variable | Accepted value and behavior |
| - | - |
| `PLANNOTATOR_CLAUDE_MOD` | **Off:** `0`, `false`, `off`, or `disabled` turns the mod off. Claude then waits for your decision, and Ask AI uses a provider you pick. **On:** `1`, `true`, or `on`. An empty or other value counts as unset. **Default:** On. **Precedence:** Overrides `claudeCodeMod` in `config.json`. **Always off:** In `claude -p` and SDK runs, and on Windows. |
| `PLANNOTATOR_MOD_DEBUG` | **Value:** `1` makes the mod write a debug log to `~/.plannotator/claude-code-mod/debug.log`, or under `PLANNOTATOR_DATA_DIR` when set. **Default:** Off. **Use:** Attach the log when you report a problem with the mod. |
Other `PLANNOTATOR_*` values in the source tree coordinate child processes, tests, or packaged integrations. They are not stable user configuration.
## Installer controls
| Variable | Accepted value and behavior |
| - | - |
| `PLANNOTATOR_MINIMAL` | **Values:** `1`, `true`, or `yes` installs only the CLI binary. **Omitted components:** Hooks, skills, and sidecar tools. |
| `PLANNOTATOR_VERIFY_ATTESTATION` | **Enable:** `1`, `true`, or `yes` requires build-provenance verification. **Disable:** `0`, `false`, or `no`. |
| `PLANNOTATOR_SKIP_SEM_INSTALL` | **Values:** `1`, `true`, or `yes` skips the semantic-diff sidecar. |
| `PLANNOTATOR_SKIP_AGENT_TERMINAL_INSTALL` | **Values:** `1`, `true`, or `yes` skips the agent-terminal runtime. |
| `PLANNOTATOR_PROMPT_TIMEOUT` | **Effect:** Sets the wait for an interactive integration choice in seconds. **Default:** `30`. **No timeout:** Set `0`. |
The installer reads `PLANNOTATOR_DATA_DIR` and `PLANNOTATOR_VERIFY_ATTESTATION` too.
See [Privacy and data flow](/open-source/reference/privacy-and-data-flow) for the network and storage consequences of these settings.
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Add external annotations to Plannotator
Source: https://docs.plannotator.ai/open-source/reference/external-annotations
Tested HTTP schemas for adding tool findings to a live Plannotator plan, document, or code review session.
External annotations let a local tool add findings to an open Plannotator session. The user sees them immediately and they are included when Plannotator exports feedback.
Keep this unauthenticated endpoint on a local or forwarded trusted connection. Do not expose it to an untrusted network.
Copy the active session URL from the terminal or `plannotator sessions`. Then replace `PORT` in the examples below.
## Add a plan or document comment
A sidebar comment needs `source` and `text`. Its default type is `GLOBAL_COMMENT`.
```bash theme={null}
curl -X POST http://localhost:PORT/api/external-annotations \
-H 'Content-Type: application/json' \
-d '{
"source": "style-checker",
"type": "GLOBAL_COMMENT",
"text": "Define the rollback condition before implementation.",
"author": "Docs check"
}'
```
To pin a comment or deletion to existing text, use `COMMENT` or `DELETION` and include the exact phrase in `originalText`:
```bash theme={null}
curl -X POST http://localhost:PORT/api/external-annotations \
-H 'Content-Type: application/json' \
-d '{
"source": "policy-checker",
"type": "COMMENT",
"originalText": "Deploy immediately after merge",
"text": "Add the verification and rollback steps first."
}'
```
Plan and document fields:
| Field | Requirement |
| - | - |
| `source` | Required, non-empty string identifying the tool |
| `text` | Required, non-empty annotation text |
| `type` | Optional: `GLOBAL_COMMENT`, `COMMENT`, or `DELETION`; defaults to `GLOBAL_COMMENT` |
| `originalText` | Required and non-empty for `COMMENT` and `DELETION` |
| `author` | Optional display name |
Plannotator creates the annotation ID and placement metadata. Do not send a `blockId`.
## Add a code review finding
This example creates a line-level concern on the new side of a diff:
```bash theme={null}
curl -X POST http://localhost:PORT/api/external-annotations \
-H 'Content-Type: application/json' \
-d '{
"source": "eslint",
"scope": "line",
"type": "concern",
"filePath": "src/session.ts",
"lineStart": 48,
"lineEnd": 48,
"side": "new",
"text": "This timer is not cleared when the request is aborted.",
"author": "eslint bridge"
}'
```
For a suggestion, include replacement code:
```json theme={null}
{
"source": "refactor-checker",
"scope": "line",
"type": "suggestion",
"filePath": "src/math.ts",
"lineStart": 12,
"lineEnd": 12,
"side": "new",
"text": "Avoid mutating the input.",
"originalCode": "items.sort()",
"suggestedCode": "items.toSorted()"
}
```
Review fields:
| Field | Requirement |
| - | - |
| `source` | Required, non-empty string identifying the tool |
| `scope` | `line`, `file`, or `general`; defaults to `line` |
| `filePath` | Required for `line` and `file`; omitted for `general` |
| `lineStart`, `lineEnd` | Both required numbers for `line` |
| `side` | `new` or `old`; defaults to `new` |
| `type` | `comment`, `suggestion`, or `concern`; defaults to `comment` |
| `text`, `suggestedCode` | At least one must be a string |
| `originalCode`, `author` | Optional strings |
## Add a batch
Wrap multiple valid objects in `annotations`. The request succeeds with `201` and returns the generated IDs.
```bash theme={null}
curl -X POST http://localhost:PORT/api/external-annotations \
-H 'Content-Type: application/json' \
-d '{
"annotations": [
{ "source": "audit", "scope": "file", "filePath": "src/a.ts", "text": "Add a test for the error path." },
{ "source": "audit", "scope": "general", "text": "The migration needs a rollback command." }
]
}'
```
An empty batch or one invalid object returns `400` and adds nothing.
## Read, update, and remove annotations
| Request | Result |
| - | - |
| `GET /api/external-annotations` | `{ "annotations": [...], "version": N }` |
| `GET /api/external-annotations?since=N` | `304 Not Modified` when the version is unchanged |
| `GET /api/external-annotations/stream` | Server-sent event snapshot followed by add, update, remove, and clear events |
| `PATCH /api/external-annotations?id=UUID` | Merge JSON fields into one annotation; the ID cannot be changed |
| `DELETE /api/external-annotations?id=UUID` | Remove one annotation |
| `DELETE /api/external-annotations?source=NAME` | Remove every annotation from one source |
| `DELETE /api/external-annotations` | Clear all external annotations |
The event stream sends a heartbeat every 30 seconds. Use the snapshot endpoint with `since` as a polling fallback.
External annotations live only for the current session. Persist findings in your own tool if they must survive after the Plannotator server closes.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Use Plannotator Approval Gates and Automation Hooks
Source: https://docs.plannotator.ai/open-source/reference/hooks
Gate a document or agent message, distinguish approval from dismissal, and return plain text, structured JSON, or hook-native output.
Use `--hook` when a host hook must block on submitted annotations. In this mode, both **Approve** and **Close** let the hook pass. Use direct `--gate --json --require-approval` when success requires explicit approval.
Use `--json` when your wrapper must distinguish approved, dismissed, and annotated decisions.
```bash theme={null}
plannotator annotate path/to/spec.md --hook
plannotator annotate-last --hook
```
`--hook` implies `--gate`, so the review UI includes an Approve action.
In hook-native mode, both **Approve** and **Close** produce empty output, so either action lets the host hook pass. Use direct `--gate --json --require-approval` when **Close** must be a failed gate rather than a pass.
## Output contracts
The contracts apply to `annotate` and `annotate-last`.
### Hook-native output
```bash theme={null}
plannotator annotate path/to/spec.md --hook
```
| User action | Standard output |
| - | - |
| Submit annotations | `{"decision":"block","reason":""}` |
| Approve | Empty |
| Close | Empty |
This contract works directly with Claude Code and Codex `PostToolUse` or `Stop` command-hook protocols that treat a `block` decision as feedback for the agent. If `--hook` and `--json` are both present, the hook-native contract wins.
### Structured JSON
```bash theme={null}
plannotator annotate path/to/spec.md --gate --json
```
| User action | Standard output |
| - | - |
| Submit annotations | `{"decision":"annotated","feedback":""}` |
| Approve | `{"decision":"approved"}` or `{"decision":"approved","feedback":""}` |
| Close | `{"decision":"dismissed"}` |
`--json` does not add the Approve action by itself. Add `--gate` if approval is part of your wrapper's contract.
### Require explicit approval
Use the strict options when an automation should succeed only after approval:
```bash theme={null}
plannotator annotate path/to/spec.md \
--gate --json --require-approval \
--result-file .plannotator-results/spec-review.json
```
Strict options apply only to direct `annotate --gate --json` runs. They reject `annotate-last`, `--hook`, and calls without both `--gate` and `--json`.
| Outcome | JSON decision | Exit status |
| - | - | - |
| Approve, with or without notes | `approved` | `0` |
| Submit annotations | `annotated` | `1` |
| Close | `dismissed` | `1` |
| Invalid command or flags, startup failure, or result publication failure | None, unless the review decision already completed | `2` |
Without `--require-approval`, completed user decisions keep the existing exit status of `0`.
`--result-file` writes the same newline-terminated JSON bytes as stdout. The path is resolved from the current working directory. Its parent must exist, and the destination must not exist, including as a dangling symlink. Plannotator writes stdout first, then atomically publishes an owner-readable and owner-writable file without overwriting an existing path. Publication is atomic but not guaranteed to survive a system crash before the parent directory is flushed.
### Plain text
Without `--json` or `--hook`, submitted annotations are printed as feedback. Approval prints the exact line `The user approved.` and closing prints nothing.
Outside strict approval mode, completed user decisions exit with status 0. Invalid input and startup failures can exit nonzero. Wrappers must inspect both the process status and standard output.
## Pass input safely
The path to review must come from the hook event or from a trusted wrapper argument. Quote it as one shell argument:
```bash theme={null}
artifact_path="path supplied by the host"
plannotator annotate "$artifact_path" --hook
```
Hook event schemas differ by agent and version. Do not copy an input-field name from another host. Use the host's current hook documentation to extract the file path, then call the CLI contract above.
For a host that sends content rather than a file path, pipe it to `annotate-last --stdin`:
```bash theme={null}
printf '%s' "$artifact_text" | plannotator annotate-last --stdin --hook
```
Avoid expanding untrusted hook content as shell code. Pass values as quoted arguments or standard input.
## Installed plan hooks
The full installer and agent plugins configure plan review for supported hosts. For example, the Claude Code plugin ships:
* a `PreToolUse` hook on `EnterPlanMode` that calls `plannotator improve-context`
* a `PermissionRequest` hook on `ExitPlanMode` that calls `plannotator` and waits for the review decision
On Claude Code 2.1.287 or later, the plugin's [Plannotator mod](/open-source/agents/claude-code#the-plannotator-mod) handles `ExitPlanMode` instead of that hook, and Claude does not wait. The hook still runs on older Claude Code, in `claude -p` and SDK runs, on Windows, and when the mod is turned off.
Codex uses its experimental `Stop` hook on macOS, Linux, and WSL. Copilot CLI uses its plugin's pre-tool hook for `exit_plan_mode`. Those plan hooks use host-specific event schemas and should normally be managed by the installer or plugin.
Restart the agent after changing hook configuration. Desktop applications may not inherit your shell `PATH`; use the absolute path to the Plannotator binary if a hook reports that the command is missing.
## Timeouts
A review is intentionally long-running. The shipped plan hooks use a timeout of 345600 seconds. If you write a custom hook, choose a timeout that allows a person to review without leaving an orphaned process.
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Automate and Customize Plannotator
Source: https://docs.plannotator.ai/open-source/reference/index
Connect Plannotator to coding agents, customize feedback, run it from hooks, and add annotations from scripts and other tools.
Follow the setup guide for Claude Code, Codex, OpenCode, Copilot CLI, Gemini CLI, and other supported tools.
Change the message Plannotator sends after plan review, document annotation, or code review.
Send findings from linters, scripts, and other local tools into an open Plannotator session.
Call Plannotator from an agent or editor hook and return plain text or structured JSON.
See what stays local and which automatic or optional features contact another service.
Check the unauthenticated local API, remote binding, and session lifetime.
## Choose the right guide
| If you want to | Start here |
| - | - |
| Use Plannotator with a coding agent | [Choose your agent](/open-source/agents/) |
| Install core or extra Agent Skills | [Install and manage skills](/open-source/start/skills) |
| Install, update, or remove the local executable | [Installation](/open-source/start/installation) |
| Read release notes or reinstall a tagged version | [Release notes and version pinning](/open-source/start/installation#read-release-notes) |
| Change the feedback sent to an agent | [Customize feedback](/open-source/reference/custom-feedback) |
| Add findings from a script, linter, or other tool | [Add external annotations](/open-source/reference/external-annotations) |
| Run Plannotator from a host hook | [Use automation hooks](/open-source/reference/hooks) |
| Build against the local session server | [Read the local API reference](/open-source/reference/local-api) |
| Check storage, telemetry, and outbound requests | [Read privacy and data flow](/open-source/reference/privacy-and-data-flow) |
| Change paths, ports, or runtime behavior | [Check configuration](/open-source/reference/configuration) and [environment variables](/open-source/reference/environment-variables) |
Plannotator's local API has no authentication. Keep it on your computer or behind trusted port forwarding. Start with [external annotations](/open-source/reference/external-annotations) when another tool only needs to add findings to the current session.
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Plannotator keyboard shortcuts
Source: https://docs.plannotator.ai/open-source/reference/keyboard-shortcuts
Keyboard shortcuts for plan review, document annotation, code review, images, search, and AI panels.
`Mod` means Command on macOS and Control on Windows and Linux. `Alt` is Option on macOS. Shortcuts that act on a file, annotation, search result, or panel require that item to be active.
## Plan review and document annotation
| Shortcut | Action |
| - | - |
| `Mod` + `Enter` | Approve or send feedback |
| `Mod` + `S` | Save or export notes when no default save destination is set |
| `Mod` + `P` | Print |
| `Mod` + `B` | Toggle the document contents sidebar |
| `Mod` + `Shift` + `B` | Toggle the folder file browser when available |
| `Shift`, `Shift` | Toggle the embedded agent terminal when available |
| Hold `Alt` | Temporarily switch between Select and Pinpoint annotation modes |
| Press `Alt` twice | Keep the alternate annotation mode selected |
| `Escape` | Close the current modal, editor, lightbox, or plan diff |
When the annotation label picker is open, press `1` through `0` to choose a label. Press `A` through `Z` to start a comment with the corresponding toolbar shortcut, or `Alt` plus `1` through `0` to start one with a label. The available labels determine which keys are active.
## Vim controls
Turn on **Vim controls** in Settings to navigate and annotate plan, document, and raw HTML views without a mouse. Turn the same setting off to return to standard navigation. The mode is off by default. Press `?` while it is active to open the complete key map.
The optional **Vim HUD** shows a target reticle and navigation context. Enable the HUD before you enable **Key panel**. The **Key panel** setting adds a live keypress legend and command panel.
| Key | Action |
| - | - |
| `j` / `k` | Next or previous block. In text, move down or up one line. |
| `gg` / `G` | First or last block |
| `h` / `l` | Move left or right in text. In nested document structure, move out or in. |
| `v` / `V` | Start character or whole-block visual selection |
| `w` / `b` / `e` | Move by word |
| `0` / `$` | Start or end of line |
| `{` / `}` | Previous or next paragraph |
| `o` | Swap visual-selection ends |
| `Enter` | Use the active selection mode |
| `Space` | Open the annotation menu |
| `c` | Add a comment |
| `d` | Request deletion |
| `m` | Open markup actions |
| `t` | Apply a quick label |
| `y` | Copy the selection |
| `Escape` | Step out of selection or navigation state |
Vim controls yield to text inputs, dialogs, editors, and other focused controls. Use the regular shortcuts in those surfaces.
## Comment and image editing
| Shortcut | Action |
| - | - |
| `Mod` + `Enter` | Submit or save the current comment |
| `Escape` | Cancel the current editor |
| `1` | Select the pen tool in image annotation |
| `2` | Select the arrow tool in image annotation |
| `3` | Select the circle tool in image annotation |
| `Mod` + `Z` | Undo the last image mark |
| `Enter` | Save and close an image annotation when a text field is not active |
## Code review
| Shortcut | Action |
| - | - |
| `Mod` + `Enter` | Approve or send review feedback |
| `Mod` + `F` | Open search |
| `Enter` or `F3` | Next search match |
| `Shift` + `Enter` or `Shift` + `F3` | Previous search match |
| `Escape` | Clear or close search |
| `Mod` + `B` | Toggle the file tree |
| `Mod` + `.` | Toggle the review sidebar |
| `Mod` + `Shift` + `G` | Start or stop guided review |
| `Mod` + `Shift` + `F` | Focus search while the pull request comments tab is open |
| Press `Alt` twice | Toggle the review destination between the code host and the calling agent when both are available |
| `V` | Mark the active file viewed or unviewed |
| `A` | Stage the active local file when staging is available |
| `J` or `Down Arrow` | Move to the next file |
| `K` or `Up Arrow` | Move to the previous file |
| `Home` | Move to the first file |
| `End` | Move to the last file |
In the all-files diff, `X` collapses the active file, `Z` reopens the nearest collapsed file, `C` starts a file-level comment, `]` moves to the next file, and `[` moves to the previous file.
Inside a code comment or suggestion editor, `Mod` + `Enter` submits, `Tab` indents, and `Escape` closes the editor. In Ask AI, `Mod` + `Enter` sends the prompt. `Escape` closes the inline panel.
## Goal setup
`Mod` + `Enter` submits the current interview answers or accepted facts.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Plannotator Local Server and API
Source: https://docs.plannotator.ai/open-source/reference/local-api
Security, remote binding, session lifetime, and HTTP routes for Plannotator plan, document annotation, and code review servers.
Each Plannotator session runs a temporary HTTP server for its browser UI and local integrations. The API is session-scoped, unauthenticated, and not a versioned public web API.
Use the URL printed in the terminal, such as `http://localhost:49152`. You can also find a running session with:
```bash theme={null}
plannotator sessions
```
## Security boundary
Local mode binds to `127.0.0.1`. Remote mode binds to `0.0.0.0` so SSH and development-container port forwarding can reach it. The API has no authentication in either mode.
Do not expose a remote Plannotator port to the public internet or an untrusted network. Forward it to your own machine through SSH or a trusted development environment.
Enable `PLANNOTATOR_AGENT_TERMINAL_REMOTE` only on a trusted connection. The embedded terminal can run commands on the remote machine.
## Stable integration surface
External tools should normally use `/api/external-annotations`. It is available in plan, document annotation, and code review sessions and has a tested schema. See [External annotations](/open-source/reference/external-annotations).
The remaining routes support the bundled browser UI. They can change with a Plannotator release, and the available set depends on the session mode.
## Common route families
Availability varies by session mode.
| Route | Purpose |
| - | - |
| `GET /api/plan` | Current plan or document payload and session metadata |
| `GET /api/config` | Settings shared with the server |
| `POST /api/config` | Persist supported UI settings to `config.json` |
| `GET /api/external-annotations` | Current external annotation snapshot |
| `POST /api/external-annotations` | Add one or more external annotations |
| `GET /api/external-annotations/stream` | Stream external annotation updates with server-sent events |
| `POST /api/feedback` | Submit annotations from a document or review session |
| `POST /api/exit` | Close a session without submitting feedback |
Unknown `/api/*` routes return a JSON `404` response rather than the browser application HTML.
## Plan review routes
Plan sessions expose routes for the current plan, previous versions, approval or denial, draft annotations, references, uploaded images, saved notes, and plan history. The decision routes are called by the UI and return their result to the agent process that started the session.
## Document annotation routes
Document sessions expose routes for source content, versions, source-file saving, drafts, references, uploads, feedback, and sharing. Raw local HTML also uses a restricted asset route to load supported files from the HTML file's directory. Assets outside that directory are refused.
## Code review routes
Code review sessions expose routes for:
* diffs, commits, file contents, and diff-scope switching
* staging and viewed-file state when supported by the repository provider
* GitHub pull request and GitLab merge request context
* pull request comments, artifacts, stacks, and revision selection
* semantic diff and code navigation
* Ask AI sessions and launched review jobs
* review skills and capabilities
The exact payloads depend on Git, GitButler, Jujutsu, Perforce, GitHub, or GitLab state. Treat them as same-version UI contracts, not as long-lived automation contracts.
## AI routes
Sessions with AI support can expose `GET /api/ai/capabilities`, session management, a streaming query route, abort, and permission-response routes. Code review sessions can also expose job, job-event, review-skill, Guided Review history, and capability routes.
`PLANNOTATOR_AI=disabled` prevents AI runtime construction and makes provider and job launch routes unavailable. Ordinary review routes and saved guide data remain intact, though the in-app guide browser is hidden.
These routes run local agent tools and may ask for permission. Do not proxy them to another user or network.
## Session lifetime
The server normally exits when you approve, send feedback, or close the session. The browser can keep showing the completion page after the server ends. **Settings > General > Auto-close Tab** controls whether that tab stays open or closes immediately, after three seconds, or after five seconds.
A random local port can be different on every run. Do not store a session URL as durable configuration. Get the current URL from the launching process or `plannotator sessions`. See [Privacy and data flow](/open-source/reference/privacy-and-data-flow) for local storage and outbound network behavior.
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Plannotator OSS Privacy and Data Flow
Source: https://docs.plannotator.ai/open-source/reference/privacy-and-data-flow
What Plannotator OSS keeps locally, which automatic and optional network requests it makes, and how sharing and hosted products change the data boundary.
Plannotator OSS runs locally and does not send Plannotator usage telemetry or analytics. Plans, documents, diffs, annotations, drafts, history, and configuration stay on your computer by default. Some automatic and optional features contact GitHub, your Git remote, a URL, an AI provider, or a hosted sharing service.
This page covers the open-source CLI and browser UI. [Workspaces](https://help.plannotator.ai/workspaces/) is a hosted product. Documents created or uploaded there are sent to its service, so the local-only statements on this page do not apply to that workflow.
## What stays local
Each review runs through a temporary HTTP server on your computer. Local mode binds to `127.0.0.1`. The browser reads the document or diff from that server and returns your decision to it.
Plannotator can write these local records:
| Data | Local location or lifetime |
| - | - |
| Configuration, session records, saved plans, document history, drafts, and Guided Reviews | Under the active Plannotator data directory. This is normally `~/.plannotator`. |
| Theme, layout, panel state, and other browser preferences or recovery data | Browser storage for each Plannotator origin and port. This can include functional cookies, `localStorage`, and tab-scoped `sessionStorage`. |
| Pasted or uploaded feedback images | Temporary local files. The returned feedback contains the image name and path. |
| Pull request or merge request checkout | A temporary Git worktree or shallow clone when local checkout is enabled. Plannotator removes it when the review session ends. |
Document history can contain full copies of opened files. Disable it before opening sensitive files when those copies are not acceptable. See [Version history](/open-source/workflows/version-history#disable-document-annotation-history).
Remote mode binds the unauthenticated server to `0.0.0.0`. Do not expose that port to the public internet or an untrusted network. Use SSH forwarding or a trusted development environment. See [Local server and API](/open-source/reference/local-api#security-boundary).
## Automatic GitHub release check
Each time a plan review, annotate, archive, share-portal, or code-review surface loads, it requests the latest release record from:
```text theme={null}
https://api.github.com/repos/backnotprop/plannotator/releases/latest
```
The request compares the installed version with the current GitHub release. It does not include the reviewed document, diff, annotations, or a usage-event payload. GitHub receives the request and the network metadata normally sent with it. Plannotator OSS does not currently provide a setting to disable this release check. Dismissing an update notice hides that release notice but does not stop later checks.
This request is an update check, not usage telemetry. Plannotator does not send a separate event when you open a review, add an annotation, approve, dismiss, or send feedback.
## Other automatic network access
For a local Git review, Plannotator may run `git ls-remote origin` in the background to identify the remote default branch and report a stale local baseline. This contacts the Git host configured as `origin`, but it does not send the local diff. Choosing the in-app fetch action runs `git fetch`.
The installer downloads the selected Plannotator binary and checksum from GitHub Releases. Installing the latest version first queries GitHub's API to resolve the release tag. If available, it sends a token from `GITHUB_TOKEN`, `GH_TOKEN`, or `gh auth token` to that API. Pinning `--version` skips that API lookup, but the binary and checksum still come from GitHub Releases.
A full install can also contact GitHub for integration files, Ataraxy-Labs/sem for the optional `sem` sidecar, and npm for Pi, selected skills, or the managed agent-terminal runtime. Provenance verification, when enabled, also contacts GitHub through `gh`. Minimal mode and the applicable skip flags omit their optional components.
## Optional outbound requests
| Feature you choose | Where data can go |
| - | - |
| Annotate a public URL | Plannotator can request the URL directly for content negotiation and send it to Jina Reader for conversion when Jina is enabled. If Jina fails or is disabled, Plannotator fetches the target directly. Local and private-network URLs skip Jina. Browser authentication cookies are not forwarded. |
| Review a GitHub pull request or GitLab merge request | The authenticated `gh` or `glab` CLI and Git configuration retrieve provider metadata, diffs, comments, checks, content, and related refs. Posting a review or changing provider-side state sends the selected action to that provider. |
| Ask AI, Agent Reviews, Code Tour, or Guided Review | Plannotator launches a configured AI provider or installed agent CLI. It can send prompts, selected review context, and repository content to that provider. Plannotator does not route the request through a Plannotator-operated model proxy. Provider permissions and retention follow that CLI and account. Claude Ask AI allows WebSearch by default, so a question can also send a search query to Anthropic's search service and return third-party web results. With [Ask this session](/open-source/workflows/ask-this-session), on Claude Code with the Plannotator mod, Pi, or OpenCode 2, Ask AI questions and their review context go to the agent session that opened Plannotator instead. The question and the answer become part of that session's conversation, except for the quick answers in OpenCode 2 plan review. |
| Start the embedded annotate terminal | Plannotator launches a new local agent CLI process in the review directory. The agent can contact its configured provider. It is not the original agent session that opened Plannotator. |
| Use the deprecated OSS sharing flow | The share portal serves the browser application. A URL-fragment share keeps the review payload in the fragment. Markdown short links upload encrypted ciphertext after confirmation. Local raw HTML can upload through a share or callback action. For remote raw HTML, the compiled CLI uploads encrypted ciphertext at session creation. Pi does not upload automatically at startup. See [Sharing](/open-source/workflows/sharing). |
| Use Workspaces | Documents and collaboration activity use the hosted Workspaces service. See [Workspaces Help](https://help.plannotator.ai/workspaces/) for that product's behavior. |
Local Git commit review can look up commit-author avatars.
For GitHub remotes, Plannotator fetches recent commit metadata and matches returned email addresses locally. It does not send the local commit-author email to GitHub for that match.
For GitLab remotes, Plannotator sends commit-author emails to the configured GitLab avatar endpoint. It sends one email per request and up to ten requests in parallel. It retries overflow in later rounds.
If either provider returns a match, the browser requests the image from GitHub, GitLab, Gravatar, or another avatar host.
Raw local HTML has another boundary: scripts inside the sandboxed document can still make outbound network requests. Open only HTML you trust, or use `--markdown` to remove scripts before annotation. See [Annotate HTML](/open-source/workflows/html#open-rendered-html).
Rendered plans, documents, raw HTML, and hosted pull-request descriptions can request remote images, video, fonts, or other assets they reference. Selecting a hosted code-review font can contact Google Fonts or jsDelivr. Opening an in-app help video loads a privacy-enhanced YouTube embed.
A share-link creator can configure an HTTP or HTTPS callback and a token. Choosing **Approve** or **Send Feedback** in that shared review posts the action, token, and annotated share URL to the callback. For an encrypted short link, that URL can include the fragment decryption key. Trust the callback with the shared content and key, and prefer HTTPS.
## Reduce outbound access
* Use local files instead of URL annotation.
* Set `PLANNOTATOR_AI=disabled` to remove Ask AI, Agent Reviews, and Guided Review.
* Set `PLANNOTATOR_SHARE=disabled` to hide OSS share and import actions.
* Review local code changes instead of a provider pull-request URL.
* [Self-host the share portal and paste service](/open-source/self-hosting) when the deprecated OSS sharing flow is still required.
These controls do not disable the automatic GitHub release check.
Last verified on August 10, 2026, using Plannotator product commit `f8951cd`. Maintained by the Plannotator project.
# Open Plannotator on Another Device
Source: https://docs.plannotator.ai/open-source/remote-access
Open a Plannotator session from a phone, tablet, local browser, or another computer through Tailscale, a trusted private network, SSH, or a development-container port forward.
Use remote access when Plannotator runs on one machine but you want to review from a phone, tablet, or another computer. You are not deploying a persistent Plannotator server. Each command starts a temporary session that normally exits after you approve, send feedback, or close it.
## Choose a connection
| Method | Use it when | Connection |
| - | - | - |
| Tailscale Serve | The machine running Plannotator and the review device can join the same tailnet | HTTPS through Tailscale, while Plannotator stays bound to `127.0.0.1` |
| Trusted Wi-Fi, LAN, or private VPN | The review device can reach the machine running Plannotator directly | Plain HTTP to an unauthenticated server bound to `0.0.0.0` |
| SSH or development-container forwarding | Plannotator runs on a remote host or inside a container and the browser runs on your local computer | Plain HTTP through a forwarded local port |
Plannotator does not add a login screen or per-request authentication to a remote session. Do not expose its port to the public internet or an untrusted network.
## Use Tailscale
Before you start:
* Install Plannotator `v0.27.0` or later on the machine that runs your agent.
* Install Tailscale and connect the agent host and review device to the same tailnet.
* Enable HTTPS certificates for the tailnet.
* Permit the review device to reach the agent host through your Tailscale access rules.
Then start the session with `--tailscale`:
```bash theme={null}
plannotator review --tailscale
```
The same flag works for document annotation and the last-message picker:
```bash theme={null}
plannotator annotate path/to/spec.md --tailscale
plannotator annotate-last --tailscale
```
Plannotator prints an HTTPS URL and displays a QR code in an interactive terminal. It keeps the temporary server on `127.0.0.1` and uses Tailscale Serve as the HTTPS proxy.
`--tailscale` works in the compiled Plannotator CLI. The Pi extension does not accept this flag.
See [Set up and troubleshoot Tailscale remote reviews](/open-source/tailscale) for installation links, HTTPS approval, Serve conflicts, cleanup behavior, access failures, and command limits.
## Use trusted Wi-Fi, a LAN, or another private VPN
Set remote mode and advertise a hostname or IP address that the other device can reach:
```bash theme={null}
PLANNOTATOR_REMOTE=1 \
PLANNOTATOR_URL_HOST=devbox.internal \
plannotator review
```
Replace `devbox.internal` with a resolvable hostname, an IPv4 address such as `192.168.1.42`, or a bracketed IPv6 address such as `[fd7a:115c:a1e0::42]`.
`PLANNOTATOR_REMOTE=1` binds the temporary server to `0.0.0.0`. `PLANNOTATOR_URL_HOST` changes only the URL that Plannotator prints. It does not change the bind address. The value must contain only a hostname or IP address, with no scheme, port, path, credentials, or whitespace.
Remote mode uses port `19432` by default. Set a fixed port or a range when you need different network or concurrency behavior:
```bash theme={null}
PLANNOTATOR_PORT=19432-19463 \
PLANNOTATOR_REMOTE=1 \
PLANNOTATOR_URL_HOST=devbox.internal \
plannotator review
```
The compiled CLI prints the complete URL and displays its QR code when standard error is an interactive terminal. Pi reports the reachable URL but does not display the QR code.
The core review, annotation, and approval flows work over plain HTTP. Browser features that require a secure context, including creating an encrypted short share link, require HTTPS.
`PLANNOTATOR_URL_HOST=auto` detects a Tailscale MagicDNS name or tailnet IPv4 address. For WireGuard, ZeroTier, a corporate VPN, or a LAN, set the hostname or IP address explicitly.
## Forward a session over SSH
From your local computer, connect with the same local and remote port:
```bash theme={null}
ssh -L 19432:127.0.0.1:19432 user@host
```
Inside that SSH session, start Plannotator with a fixed port:
```bash theme={null}
PLANNOTATOR_REMOTE=1 \
PLANNOTATOR_PORT=19432 \
plannotator review
```
Open `http://localhost:19432` on your local computer if Plannotator does not open it automatically.
Remote mode listens on every interface of the remote host. The SSH tunnel does not stop another network peer from reaching port `19432` through a different interface. Keep the port blocked by the host firewall and network policy.
## Forward a development-container port
Add the fixed port and remote mode to `devcontainer.json`:
```json theme={null}
{
"containerEnv": {
"PLANNOTATOR_REMOTE": "1",
"PLANNOTATOR_PORT": "19432"
},
"forwardPorts": [19432]
}
```
Rebuild the container, start a review, and open the forwarded port from the editor's **Ports** view. Keep its visibility private. Setting `PLANNOTATOR_PORT` without `PLANNOTATOR_REMOTE=1` is not enough because local mode binds to `127.0.0.1` inside the container.
VS Code Remote and development containers usually provide a `BROWSER` helper that opens the forwarded URL on your local computer. Plannotator uses that helper when it is available. You can also set [`PLANNOTATOR_BROWSER`](/open-source/reference/environment-variables#session-and-browser) to a browser or script.
## Control deprecated link sharing
Remote access and link sharing are separate features. A live remote session lets another browser make the decision while the agent waits. The deprecated OSS sharing flow creates an asynchronous link that another person returns later.
Disable link sharing when you only need the live remote session:
```bash theme={null}
export PLANNOTATOR_SHARE=disabled
```
The variable applies to the compiled CLI, Pi, and integrations that use Plannotator's shared configuration resolver. An explicit OpenCode `share` setting takes precedence.
When sharing remains enabled, a remote Markdown session can produce a complete share URL in addition to the live session URL. The Markdown is inside that complete URL and can remain in terminal logs or shell capture.
With sharing enabled, remote raw HTML uses the paste service because it cannot use the hash-only Markdown format. The compiled CLI encrypts and uploads the HTML when the remote session starts. Pi serves the HTML through the forwarded live session but does not upload it automatically at startup. Disable sharing before opening sensitive remote HTML when that upload is not intended.
## Protect the annotate-mode agent terminal
The embedded agent terminal in annotate mode is disabled during remote and `--tailscale` sessions. Enabling it allows the browser to run commands on the machine that hosts Plannotator:
```bash theme={null}
PLANNOTATOR_AGENT_TERMINAL_REMOTE=1 \
PLANNOTATOR_REMOTE=1 \
plannotator annotate path/to/spec.md
```
Use this setting only when every device and network path that can reach the session is trusted. The terminal token is not an authentication boundary.
## Troubleshoot the connection
During a session, check the server on the machine running Plannotator:
```bash theme={null}
curl -fsS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:19432/
```
A working session returns `200`. Replace `19432` if you selected another port. If the other device cannot connect, check these items:
* The process that started Plannotator inherited `PLANNOTATOR_REMOTE=1`.
* The hostname or IP address resolves from the review device.
* The firewall permits only the intended private path to the selected port.
* An SSH or development-container forward uses the same port as Plannotator.
* Tailscale is connected on both devices and its access rules permit the connection.
See [Troubleshooting](/open-source/troubleshooting#remote-ssh-and-development-containers) for port conflicts and host-specific checks.
Last verified on August 12, 2026, against Plannotator `v0.27.1` and product commits `b69742c`, `5f33b72`, and `ed6f44b`. Maintained by the Plannotator project.
# Plannotator Open Source Security
Source: https://docs.plannotator.ai/open-source/security
How Plannotator OSS keeps review data local, protects release artifacts, runs automated security checks, and accepts private vulnerability reports.
Plannotator OSS runs on your computer by default. It does not collect usage telemetry or analytics, and an ordinary local review does not upload your plan, document, diff, annotations, or feedback to Plannotator.
The project also publishes verifiable release artifacts and runs automated security checks against its source, dependencies, secrets, and GitHub configuration.
## Data and network boundaries
A normal session uses a temporary HTTP server bound to `127.0.0.1`. Review content and local records stay on your computer.
Plannotator OSS does not send usage events or analytics when you open, annotate, approve, dismiss, or send feedback.
Remote mode changes the bind address and does not add authentication. Use a trusted path such as [Tailscale](/open-source/tailscale) or [SSH forwarding](/open-source/remote-access).
URL annotation, hosted pull requests, AI providers, sharing, and Workspaces can contact another service when you choose to use them.
Plannotator checks GitHub for the latest release when an app surface loads, and a local Git review can contact its configured `origin`. These requests do not include the reviewed content. See [Privacy and data flow](/open-source/reference/privacy-and-data-flow) for the complete list of automatic and optional network requests.
Set `PLANNOTATOR_SHARE=disabled` to hide OSS share and import actions. Set `PLANNOTATOR_AI=disabled` to remove AI-backed features and their provider routes. Ordinary local plan, document, and code review still work.
## Release integrity
For a release tag, the workflow builds and tests the artifacts, generates and scans the SBOM, attests the release, and then publishes it.
Runs the public release workflow from a version tag on `main`.
Type-checks, tests, builds, and runs binaries and installers on Linux, macOS, and Windows.
Generates a matching checksum file for every release binary.
Creates GitHub attestations for build provenance and the release SBOM.
Publishes release assets only after tests, smoke runs, the Grype policy, and attestations complete.
Publishes prebuilt package tarballs from a separate OIDC-authorized job with npm provenance.
The workflow uses Syft to generate a CycloneDX SBOM. Grype must pass the release policy before the workflow creates the attestations.
Release tags must point to a commit on `main` and match the version in the release manifests. The GitHub Release is published only after the attestations exist.
[`v0.27.3`](https://github.com/backnotprop/plannotator/releases/tag/v0.27.3) was the first release to complete this pipeline. It published a CycloneDX 1.6 SBOM and a matching checksum. Its binaries have SLSA provenance and CycloneDX SBOM attestations.
The SBOM describes the release-wide inventory of locked inputs and dependencies. Bun standalone binaries do not expose their bundled JavaScript package metadata to Syft. The SBOM is not an exact runtime inventory for each binary.
Use [Pin or verify a release](/open-source/start/installation#pin-or-verify-a-release) to verify installer provenance or download and verify the SBOM evidence.
## Automated security checks
On every pull request to `main` and every push to `main`, the [Security Scanning workflow](https://github.com/backnotprop/plannotator/actions/workflows/security.yml) runs Gitleaks, zizmor, Semgrep, and Trivy. A weekly scheduled run checks for drift. Trusted runs upload SARIF results to GitHub Code Scanning.
Detects known secret formats. Push protection stops matched credentials before they land.
Monitors dependencies, opens security updates, and runs routine Bun update checks each week.
Checks pull-request and push commit ranges for secrets, with scheduled full-history scans.
Audits GitHub Actions workflows, local actions, and Dependabot configuration offline.
Runs repository-owned source rules offline with no Semgrep Cloud upload.
Checks committed dependency locks and filesystem or infrastructure configuration against pinned scanner and policy versions.
OWASP ZAP runs a passive baseline each week. A maintainer can also start the workflow manually. The workflow uses a disposable annotate session on an internal-only Docker network. A read-only guard rejects state-changing requests and unapproved paths.
The Security Scanning and ZAP DAST workflows are in monitor mode. Tool and evidence failures fail their jobs. Findings appear in GitHub Code Scanning or retained workflow artifacts, but they do not block a merge or release.
## Report a vulnerability privately
Do not open a public issue for a suspected vulnerability.
Send the affected version, reproduction steps, impact, required preconditions, and any known workaround through GitHub's private reporting form.
Security fixes are provided for the latest released version. See the repository [security policy](https://github.com/backnotprop/plannotator/blob/main/SECURITY.md) for the supported-version and disclosure policy.
## Evidence and limitations
* [Latest release artifacts and checksums](https://github.com/backnotprop/plannotator/releases/latest)
* [First SBOM-enabled release: v0.27.3](https://github.com/backnotprop/plannotator/releases/tag/v0.27.3)
* [Release attestations](https://github.com/backnotprop/plannotator/attestations)
* [Release and security workflow source](https://github.com/backnotprop/plannotator/tree/main/.github/workflows)
* [ZAP DAST workflow and run history](https://github.com/backnotprop/plannotator/actions/workflows/dast.yml)
* [GitHub Actions history](https://github.com/backnotprop/plannotator/actions)
* [OSS privacy and data flow](/open-source/reference/privacy-and-data-flow)
Automated checks reduce risk; they do not prove that the software has no vulnerabilities. Plannotator does not claim SOC 2, ISO 27001, or another security certification for the OSS project. The support policy covers the latest release, and this page does not describe the hosted Workspaces product.
## Appendix: security pipeline
These diagrams show when each security control runs and how its evidence moves through the project.
### Release trust chain
A release tag generates the SBOM and runs the Grype policy before the workflow creates attestations and publishes the release.
### Security on every code change
The build and security workflows start from the same pull request or push. The security scanners run independently from the build workflow.
### Scheduled security testing
The weekly workflows scan the repository and a disposable application instance. The ZAP workflow scans only the disposable instance inside an isolated CI network.
Last verified on August 13, 2026, using Plannotator product commit `aa0bf86`. Maintained by the Plannotator project.
# Self-Host Plannotator's Deprecated Share Services
Source: https://docs.plannotator.ai/open-source/self-hosting
Deploy the deprecated OSS share portal and encrypted paste service for compatibility with asynchronous Plannotator share links.
Plannotator has two self-hostable services for the deprecated OSS share-link flow:
| Service | Deploy it when |
| - | - |
| Share portal | You need your own static site to open hash-based Markdown share links. |
| Paste service | You need encrypted short links for large Markdown reviews or raw HTML. |
The OSS share-link flow is deprecated and retained for compatibility. No removal date has been announced. For new team sharing and collaboration, [sign up for Workspaces](https://plannotator.ai/workspaces).
You do not need either service for normal local reviews or to open a temporary session from another device. Install Plannotator and run it beside your coding agent for local use. See [Remote access](/open-source/remote-access) for phones, tablets, Tailscale, private networks, SSH, and development containers.
## Understand the sharing services
The share portal is a static browser application. It has no application database, accounts, or built-in access control.
For a normal Markdown share, Plannotator compresses the review into the complete URL after `#`. The browser does not send that fragment to the portal in its HTTP request. The portal loads the application, then the browser decodes the review locally. The fragment is not encrypted, so anyone with the complete URL can read the review.
Large Markdown reviews and raw HTML use the paste service. The Plannotator client encrypts the payload before upload. The paste service stores ciphertext, while the decryption key stays in the complete share URL after `#`. Anyone with the complete link can fetch and decrypt the content.
Deploy only the portal when hash-based Markdown links are enough. Deploy both services when you need encrypted short links or raw HTML sharing.
Neither service provides application authentication or certificates. Your hosting layer must provide HTTPS, access controls, rate limits, and network isolation where required.
## Deploy the share portal
Build the portal from a Plannotator source checkout. Check out the release tag or reviewed commit you intend to operate before installing dependencies:
```bash theme={null}
git clone https://github.com/backnotprop/plannotator.git
cd plannotator
git checkout
bun install
bun run build:portal
```
Deploy the contents of `apps/portal/dist/` to a static host. Configure unknown paths, including `/p/`, to return `index.html` so direct short-link visits load the application. The hosting layer must provide HTTPS, access logs, caching rules, and any access control you require.
Point new Plannotator sessions at the portal:
```bash theme={null}
export PLANNOTATOR_SHARE_URL=https://share.example.com
```
The process that starts Plannotator must inherit this variable. Existing sessions do not change their share base URL.
The portal performs Plannotator's automatic GitHub release check when it loads. Rendered shared content can also request remote images, fonts, scripts, or other resources it references. There is no setting that disables the release check.
## Deploy the paste service
The paste service exposes `POST /api/paste` and `GET /api/paste/:id`. The repository includes two targets:
* A Bun server with filesystem storage.
* A Cloudflare Worker with KV storage.
Neither target authenticates callers. CORS controls which browser origins can use responses. It does not authenticate callers or block direct HTTP clients.
The shared CORS helper always allows `http://localhost` and `https://localhost` origins, including ports. Setting an explicit origin list does not remove that localhost exception.
### Run the Bun filesystem target
From the Plannotator source checkout:
```bash theme={null}
PASTE_PORT=19433 \
PASTE_DATA_DIR=/var/lib/plannotator-paste \
PASTE_TTL_DAYS=7 \
PASTE_MAX_SIZE=5242880 \
PASTE_ALLOWED_ORIGINS=https://share.example.com \
bun run apps/paste-service/targets/bun.ts
```
Run the process under your normal service supervisor. The Bun target listens on all interfaces by default, even though its startup message prints a `localhost` URL. Enforce firewall or private-network isolation and put it behind an HTTPS reverse proxy. Do not leave port `19433` directly reachable from an untrusted network.
The API has no authentication. If it is reachable beyond a trusted private network, add authentication and request-rate controls at the proxy or edge. The payload limit caps each upload, not the number of uploads or total storage growth.
The data directory must have the ownership and backup policy you want. The process creates it when it is absent. The default maximum is 5 MiB of encrypted payload data. Each filesystem paste records its expiry time. An expired file is deleted when that paste is read or when the service next starts, so expired bytes can remain on disk past their logical expiry while a long-running service is idle.
GitHub releases also include `plannotator-paste-*` binaries and matching `.sha256` files for macOS, Linux, and Windows. Download the binary and same-named checksum file from the same release. Verify them before running the binary with the same `PASTE_*` variables:
```bash theme={null}
# Linux
sha256sum -c plannotator-paste-linux-x64.sha256
# macOS
shasum -a 256 -c plannotator-paste-darwin-arm64.sha256
```
On Windows, run `Get-FileHash .\plannotator-paste-win32-x64.exe -Algorithm SHA256` and compare the result with `plannotator-paste-win32-x64.exe.sha256`.
### Run the Cloudflare KV target
The repository's `apps/paste-service/wrangler.toml` is a deployment example, not a namespace allocation for your account. Create your own KV namespace, replace both namespace IDs, and set `ALLOWED_ORIGINS` to your portal origin before deployment. Do not deploy the checked-in hosted namespace IDs into another environment.
```bash theme={null}
cd apps/paste-service
bunx wrangler kv namespace create PASTE_KV
bunx wrangler kv namespace create PASTE_KV --preview
bun run deploy:cf
```
Put the first command's namespace ID in `id` and the preview command's ID in `preview_id` before deploying.
The current Worker target uses Cloudflare KV expiry with a fixed seven-day TTL and a fixed 5 MiB encrypted payload limit. Its supported runtime setting is `ALLOWED_ORIGINS`. The Bun-only `PASTE_TTL_DAYS`, `PASTE_DATA_DIR`, and `PASTE_MAX_SIZE` variables do not configure the Worker target.
## Connect Plannotator to both services
Set both URLs in the environment that starts your coding agent:
```bash theme={null}
export PLANNOTATOR_SHARE_URL=https://share.example.com
export PLANNOTATOR_PASTE_URL=https://paste.example.com
```
Custom short links include the paste-service origin in the URL fragment so the static portal knows where to fetch the ciphertext. Anyone with the complete link has the paste ID and decryption key.
## Deployment variables
| Variable | Default | Applies to |
| - | - | - |
| `PLANNOTATOR_SHARE_URL` | `https://share.plannotator.ai` | Share portal used in generated links |
| `PLANNOTATOR_PASTE_URL` | `https://plannotator-paste.plannotator.workers.dev` | Paste API used for short links and raw HTML |
| `PASTE_PORT` | `19433` | Bun paste-service port |
| `PASTE_DATA_DIR` | `~/.plannotator/pastes` | Bun filesystem paste storage |
| `PASTE_TTL_DAYS` | `7` | Bun paste logical expiry |
| `PASTE_MAX_SIZE` | `5242880` | Bun maximum encrypted payload bytes |
| `PASTE_ALLOWED_ORIGINS` | `https://share.plannotator.ai,http://localhost:3001` | Bun CORS allowlist |
| `ALLOWED_ORIGINS` | `https://share.plannotator.ai,http://localhost:3001` | Cloudflare Worker CORS allowlist |
See [Environment variables](/open-source/reference/environment-variables) for general `PLANNOTATOR_*` precedence and the setting that disables sharing.
## Operator responsibilities
### Authentication and network exposure
* The static portal and paste API have no application authentication. Add access control at your hosting layer if your reviewers require it, then test the complete redirect and URL-fragment flow.
* CORS is a browser boundary, not caller authentication.
* A public paste API needs rate limits or equivalent abuse controls. The payload-size limit alone does not prevent repeated uploads.
### TLS and link handling
* The repository does not provision certificates or an HTTPS reverse proxy. The operator owns TLS for the portal and paste API.
* Treat every complete share URL as a credential. Hash-based Markdown is readable from the URL. Short links contain the decryption key in the fragment.
* Avoid putting complete share URLs in analytics, support tickets, screenshots, or logs with broader retention than the review.
### Persistence, retention, and backup
* Keep the Bun paste data directory on persistent storage only if short links must survive restarts.
* Decide whether ephemeral ciphertext belongs in backups. A backup can retain bytes after the live paste expires, so its deletion schedule must match your policy.
* Monitor disk use for the Bun target. Logical expiry does not guarantee immediate file removal from an idle, continuously running service.
## Verify the deployment
**1. Check the portal.** Confirm that a direct portal route reaches the static application:
```bash theme={null}
curl -fsS -o /dev/null -w '%{http_code}\n' https://share.example.com/p/test
```
A working single-page application fallback returns `200`.
**2. Check the paste API.** Send harmless data and inspect the CORS response:
```bash theme={null}
curl -i https://paste.example.com/api/paste \
-H 'Origin: https://share.example.com' \
-H 'Content-Type: application/json' \
--data '{"data":"deployment-check"}'
```
Expect `201`, an `Access-Control-Allow-Origin` header for the portal, and a JSON paste ID.
**3. Test the deprecated sharing flow.** Start a new Plannotator session with the custom variables. Create a normal Markdown link and an explicit short link. Confirm both use your portal, the short link fetches from your paste API, and an imported returned link restores the review annotations.
For failures, check [Troubleshooting](/open-source/troubleshooting), the browser network panel, the static host's single-page application fallback, and the exact origin in the paste-service CORS setting.
## What this deployment does not provide
The share portal and paste service do not provide a persistent Plannotator review server, account system, built-in authentication, certificate management, live collaborative editing, or centrally managed document history. They support asynchronous links for a deprecated OSS workflow.
For new team sharing, durable documents, access management, and live collaboration, [sign up for Workspaces](https://plannotator.ai/workspaces).
Last verified on August 10, 2026, against Plannotator product commit `f8951cd` and release `v0.26.7`. Maintained by the Plannotator project.
# Review Your First Code Change
Source: https://docs.plannotator.ai/open-source/start/code-review-quickstart
Open a local code diff in Plannotator, comment on changed lines, and send clear feedback to your coding agent.
Use a project where you or your coding agent has changed code. Plannotator opens the diff in your browser so you can comment on exact lines and send feedback to your agent.
In your terminal, go to a Git, GitButler, Jujutsu, or Perforce project with changes to review.
For your first review, use a project where an agent has just finished a task. You do not need to commit the changes first.
Run:
```bash theme={null}
plannotator review
```
Plannotator detects the project and opens the diff in your browser.
In Git projects, the default view approximates a pull request. In an active GitButler workspace, **Workspace** shows all applied work and working-tree changes. See [Review Local Code Changes](/open-source/workflows/local-changes) for the complete inclusion rules.
Select one or more changed lines. Add a comment, request a deletion, or suggest replacement code.
Keep the feedback specific. State what should change and why.
Select **Send Feedback**.
A direct terminal run prints structured feedback that you can copy. When your coding agent starts the review, Plannotator returns the same feedback to that agent session.
## Start the review from your coding agent
Most command-based agents use:
```text theme={null}
/plannotator-review
```
Codex can run `!plannotator review` or use `$plannotator-review`. See [Agents](/open-source/agents) for the command and setup for Claude Code, Codex, OpenCode, Copilot CLI, Gemini CLI, Pi, Amp, Droid, and Kiro CLI.
## Review a pull request or merge request
Pass Plannotator a GitHub pull request or GitLab merge request URL:
```bash theme={null}
plannotator review https://github.com/owner/repository/pull/123
```
GitButler users can continue with [Review GitButler Workspaces, Stacks, and Branches](/open-source/workflows/gitbutler). For provider setup and posting feedback, see [Review Pull Requests and Merge Requests](/open-source/workflows/pull-requests).
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Turn Plannotator Feedback into Agent Skills
Source: https://docs.plannotator.ai/open-source/start/compound-value
Use feedback from plan reviews, document annotations, and code reviews to create agent skills that match your preferences.
Plannotator sends your comments back to the agent that asked for the review. Save the feedback you want to reuse in one folder, then point your agent at that folder. The agent can find repeated preferences and turn them into a skill for writing plans, writing code, or reviewing code.
## Collect the feedback you want to reuse
Use feedback from any Plannotator workflow:
* plan reviews
* document annotations
* local code reviews
* pull request and merge request reviews
Completed document and code-review feedback can return to the active agent. Save the results you want to reuse in a local folder. Plan reviews can also save final decisions under `/plans/` when **Save plans** is enabled.
Feedback may contain private plans, code, comments, file paths, and repository details. Keep the folder local unless you have reviewed its contents.
## Ask your agent to create a skill
Point the agent at your feedback folder and state what you want to improve:
```text theme={null}
Review the Plannotator feedback in .
Find preferences that appear across several reviews. Use them to create a
reusable skill for .
Cite the feedback behind each rule. Ignore one-off comments and old guidance.
Show me the proposed skill before you create or install it.
```
Use the same process to create separate skills for planning, coding, and code review. Separate skills keep each set of instructions focused on the task.
## Reuse the skill
Use the skill when you ask an agent to plan, write code, or review changes. If your agent supports hooks, commands, or scheduled jobs, you can also run the skill through those tools.
Review the skill as your preferences change. Remove rules that no longer match your work, and add new rules only when the feedback supports them.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Install Plannotator
Source: https://docs.plannotator.ai/open-source/start/installation
Install, update, or remove Plannotator on macOS, Linux, WSL, or Windows, then finish setup for your coding agent.
The standard installer adds the `plannotator` command, checks the downloaded binary, and installs the hooks, core skills, native command files, and local runtimes used by supported coding agents. Rerun the same installer to update those managed files.
## Run the installer
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash
```
```powershell theme={null}
irm https://plannotator.ai/install.ps1 | iex
```
```bat theme={null}
curl -fsSL https://plannotator.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
```
The macOS and Linux installer supports x64 and Arm64. The Windows installers support x64 and Arm64 Windows.
The full installer needs Git to fetch the current skills and command files. The optional integrated terminal also needs Node.js and npm. If that runtime cannot be installed, document annotation still works without the integrated terminal.
The installer downloads the binary and checksum from GitHub Releases. A full install can also contact GitHub for agent files, Ataraxy-Labs/sem for the optional `sem` sidecar, and npm for Pi, selected extra skills, or the managed agent-terminal runtime. Pinning a version skips GitHub's latest-release API lookup, but it still downloads that release's binary and checksum.
## Choose skills during installation
On the first interactive run, the full installer asks:
1. Whether to install the extra `plannotator-compound`, `plannotator-setup-goal`, and `plannotator-visual-explainer` skills. The default is no.
2. Whether the model may start any installed Claude Code or shared Agent Skill without an explicit skill command. The default keeps those skills user-started.
The installer saves these answers under the active Plannotator data directory and reuses them on later runs. Use `--reconfigure` on macOS, Linux, WSL, and Command Prompt, or `-Reconfigure` in PowerShell, to open the questions again.
Runs without an interactive terminal do not prompt. They use explicit flags, then saved answers, then the defaults. Automation can use `--extras`, `--no-extras`, `--model-invocable `, and `--non-interactive`. PowerShell uses `-Extras`, `-NoExtras`, `-ModelInvocable`, and `-NonInteractive`.
See [Install and Manage Plannotator Skills](/open-source/start/skills) for the core and extra skill lists, specific-skill commands, host locations, updates, and removal.
## Verify the command
Open a new terminal if the installer changed your `PATH`, then run:
```bash theme={null}
plannotator --version
plannotator --help
```
The help output lists the user-facing commands supported by the installed version.
## Finish your agent setup
Choose your coding agent. The table shows what to do after the standard installer.
| Host | Next step |
| - | - |
| [Claude Code](/open-source/agents/claude-code) | Install the separate Claude Code marketplace plugin and restart Claude Code. |
| [Codex](/open-source/agents/codex) | The installer always adds the shared core skills. When it detects Codex on macOS, Linux, or WSL, it also enables the experimental plan-review hook. Restart Codex Desktop. Hooks remain disabled on Windows. |
| [OpenCode](/open-source/agents/opencode) | Add `@plannotator/opencode@latest` to `opencode.json`, then restart OpenCode. |
| [Copilot CLI](/open-source/agents/copilot-cli) | Install the Copilot CLI marketplace plugin, then restart Copilot CLI. |
| [Gemini CLI](/open-source/agents/gemini-cli) | The standard installer adds the policy, plan-review hook, and commands when it detects `~/.gemini`. Restart Gemini CLI. |
| [Amp](/open-source/agents/amp) | Copy the Amp plugin into the user or project plugin directory. |
| [Droid](/open-source/agents/droid) | Add the Plannotator marketplace and install its Droid plugin. |
| [Kiro CLI](/open-source/agents/kiro-cli) | The standard installer adds review skills and an example agent when it detects Kiro CLI. Rerun the installer if you installed Kiro later. |
| [Pi](/open-source/agents/pi) | Install `@plannotator/pi-extension` through Pi. The standard installer is not required. |
## Install only the binary
Use a minimal install when you want the command without agent hooks, skills, commands, the optional `sem` semantic-diff sidecar, or the managed agent-terminal runtime.
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash -s -- --minimal
```
```powershell theme={null}
& ([scriptblock]::Create((irm https://plannotator.ai/install.ps1))) -Minimal
```
`--binary-only` is an alias for `--minimal` in the shell installer. `-BinaryOnly` is the PowerShell alias. You can also set `PLANNOTATOR_MINIMAL=1`.
Minimal mode does not use the skills checkout, so Git is not required. Rerun the full installer later if you want core skills or agent setup.
## Pin or verify a release
Pin a release when you need a repeatable install:
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash -s -- --version vX.Y.Z
```
```powershell theme={null}
& ([scriptblock]::Create((irm https://plannotator.ai/install.ps1))) -Version vX.Y.Z
```
```bat theme={null}
curl -fsSL https://plannotator.ai/install.cmd -o install.cmd
install.cmd --version vX.Y.Z
del install.cmd
```
The positional form is also supported after you download the script:
```bat theme={null}
install.cmd vX.Y.Z
```
Every installer verifies the binary against its SHA-256 checksum. Optional SLSA provenance verification requires the [GitHub CLI](https://cli.github.com/). The installer first uses GitHub's public attestations API. It uses authenticated GitHub CLI access only if the public request fails.
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash -s -- --version vX.Y.Z --verify-attestation
```
```powershell theme={null}
& ([scriptblock]::Create((irm https://plannotator.ai/install.ps1))) -Version vX.Y.Z -VerifyAttestation
```
```bat theme={null}
curl -fsSL https://plannotator.ai/install.cmd -o install.cmd
install.cmd --version vX.Y.Z --verify-attestation
del install.cmd
```
Windows provenance verification supports stable releases from v0.17.2 onward. The Windows installers reject prerelease tags when verification is enabled.
### Download and verify the release evidence
Each release from v0.27.3 includes a release-wide CycloneDX SBOM and a matching checksum. Replace `vX.Y.Z` with a released tag. The following commands download and verify the Linux x64 binary and its SBOM:
```bash theme={null}
tag=vX.Y.Z
version="${tag#v}"
mkdir -p /tmp/plannotator-release-verify
gh release download "$tag" --repo backnotprop/plannotator \
--pattern 'plannotator-linux-x64*' \
--pattern "plannotator-${version}-release-sbom.cdx.json*" \
--dir /tmp/plannotator-release-verify
(cd /tmp/plannotator-release-verify && sha256sum --check plannotator-linux-x64.sha256)
(cd /tmp/plannotator-release-verify && sha256sum --check "plannotator-${version}-release-sbom.cdx.json.sha256")
gh attestation verify /tmp/plannotator-release-verify/plannotator-linux-x64 \
--repo backnotprop/plannotator --source-ref "refs/tags/$tag" \
--signer-workflow backnotprop/plannotator/.github/workflows/release.yml \
--predicate-type https://slsa.dev/provenance/v1
gh attestation verify /tmp/plannotator-release-verify/plannotator-linux-x64 \
--repo backnotprop/plannotator --source-ref "refs/tags/$tag" \
--signer-workflow backnotprop/plannotator/.github/workflows/release.yml \
--predicate-type https://cyclonedx.org/bom
```
The two attestation commands verify separate claims for the same binary. The SLSA predicate identifies the source and release workflow. The CycloneDX predicate contains the release-wide SBOM.
Bun standalone binaries do not expose their bundled JavaScript package metadata to Syft. The SBOM is not an exact runtime inventory for each binary.
Use the matching release filename to verify another platform. On macOS, use `shasum -a 256 -c` instead of `sha256sum --check`.
## Update Plannotator
Rerun the installer for your operating system. Without a version flag, it resolves the latest GitHub release and replaces the installed binary, core skills, OpenCode and Gemini command files, and installer-managed hook or policy files. It also updates the Pi extension when `pi` is on your `PATH`.
Your Plannotator data directory is not replaced. Saved plans, annotation history, drafts, configuration, and installer preferences remain available.
Some host integrations have their own lifecycle:
* Claude Code's marketplace plugin is separate from the binary and skills. Refreshing the marketplace alone does not update it. In a terminal, run `claude plugin marketplace update plannotator`, then `claude plugin update plannotator@plannotator`, then restart Claude Code. See [Update](/open-source/agents/claude-code#update) for the steps inside Claude Code.
* OpenCode loads the separately configured `@plannotator/opencode@latest` plugin. The installer clears its cached Plannotator plugin packages for OpenCode 1 and OpenCode 2. Restart OpenCode after the update.
* The installer updates the Pi extension only when `pi` is on your `PATH`. Otherwise, run `pi update --extensions`. A plain `pi update` updates only Pi itself.
* Copilot CLI, Droid, and Amp plugins remain under their host's plugin or file-management flow.
* Extra skills installed with `npx skills` update through that CLI. See [Update skills](/open-source/start/skills#update-skills).
Check the installed binary after an update:
```bash theme={null}
plannotator --version
```
## Remove Plannotator
Use this safety checklist:
1. Close active Plannotator and agent sessions.
2. Preview the recognized removal work:
```bash theme={null}
plannotator uninstall --dry-run
```
3. Read the preview. Then run the safe default:
```bash theme={null}
plannotator uninstall
```
The safe default removes recognized Plannotator-installed components. It preserves local plans, history, drafts, guides, configuration, and installer preferences.
The confirmation defaults to no. For a non-interactive shell or automation, add `--yes` or `-y`. The command refuses to run without that flag when no terminal is available.
### Delete local data too
Use `--purge` only when you intend to delete known local Plannotator data. The deleted data cannot be recovered.
Run:
```bash theme={null}
plannotator uninstall --purge
```
Interactive purge requires typing `purge`, not only `y`. The prompt explains that this data exists locally, is not stored on a Plannotator server, and cannot be recovered after deletion. `--yes` skips that prompt for automation.
Purge uses the active [data-directory resolution rules](/open-source/reference/configuration#where-settings-live). It refuses filesystem roots, the home directory and its ancestors, the shared temporary directory, symlinked data directories, and non-directory paths. Existing targets are checked by filesystem identity, so case aliases, symlinks, hardlinks, bind mounts, and a directory swapped during host cleanup cannot bypass the safety boundary.
Unknown or custom entries inside the data directory are preserved. If a recognized entry cannot be removed safely, uninstall reports the failure and keeps the command available for a retry.
### Understand what the command removes
The uninstaller recognizes these components:
* the conventional macOS, Linux, WSL, and Windows executable locations
* installer-managed `sem` and agent-terminal runtimes
* core skills, native command files, hooks, policies, scoped caches, and recognizable Amp and Kiro files
* detected Claude Code, Copilot CLI, Droid, Pi, and VS Code integrations through their host commands
* installer-managed OpenCode, Gemini, Codex, and Windows `PATH` configuration
Shared configuration files are edited surgically. Custom files, unrecognized skill layouts, separately installed optional skills, project-local integrations, external save locations, unrelated package caches, and editor-managed shared state are preserved. A host command or configuration that cannot be classified safely produces an error instead of guessing. The executable and its Windows `PATH` entry remain available when cleanup must be retried.
The command cannot safely clear every browser profile or shared editor database. Browser cookies and storage remain scoped to each exact origin and port. The VS Code extension can also leave its Plannotator cookie jar in editor-managed `globalState`. Clear those records through the browser or editor only when you can distinguish them from unrelated application data.
### Recover from a broken host integration
If a missing host command or malformed host configuration prevents completion, leave all host plugin managers and host configuration untouched while removing the other recognized components:
```bash theme={null}
plannotator uninstall --skip-hosts
```
Use this as a recovery path, not as the normal uninstall. A preserved hook or command can still point to the removed Plannotator executable and fail when its host invokes it. The current command emits a general warning but does not list every preserved integration. Remove those host entries manually after the uninstall completes.
## Read release notes
[`backnotprop/plannotator` releases](https://github.com/backnotprop/plannotator/releases) are the changelog for the OSS binary and its release assets. Each release page provides its tag and downloadable artifacts. Use `--version vX.Y.Z` when you need to reinstall a specific release.
Continue with [annotating your first plan](/open-source/start/quickstart).
Last verified on August 13, 2026, using Plannotator product commit `aa0bf86`. Maintained by the Plannotator project.
# Open Plannotator
Source: https://docs.plannotator.ai/open-source/start/open-plannotator
Start Plannotator from a supported coding agent or run it directly from the command line.
Start Plannotator from your coding agent when you want feedback returned to that agent. Run the `plannotator` command directly for terminal workflows and automation.
## Start from your coding agent
Choose your agent for its exact setup and commands:
| Agent | Open a plan | Open code changes |
| - | - | - |
| [Claude Code](/open-source/agents/claude-code) | Opens at `ExitPlanMode` | `/plannotator-review` |
| [Codex](/open-source/agents/codex) | Experimental `Stop` hook | `!plannotator review` or `$plannotator-review` |
| [OpenCode](/open-source/agents/opencode) | Planning agents call `submit_plan` | `/plannotator-review` |
| [Copilot CLI](/open-source/agents/copilot-cli) | Opens at `exit_plan_mode` | `/plannotator-review` |
| [Gemini CLI](/open-source/agents/gemini-cli) | Opens before `exit_plan_mode` | `/plannotator-review` |
| [Pi](/open-source/agents/pi) | `/plannotator-plan-mode`, `Ctrl+Alt+P`, or `pi --plan` | `/plannotator-review` |
| [Amp](/open-source/agents/amp) | Manual command | Command palette |
| [Droid](/open-source/agents/droid) | Manual command | `/plannotator-review` |
| [Kiro CLI](/open-source/agents/kiro-cli) | Installed skill or example agent | Installed skill |
Most command-based agents also provide `/plannotator-annotate` for a file or URL and `/plannotator-last` for the latest assistant message. See [Agents](/open-source/agents) to choose an agent, editor, or note app.
## Run it directly
| Command | Current behavior |
| - | - |
| `plannotator review` | Opens local changes from the detected Git, GitButler, Jujutsu, or Perforce project. |
| `plannotator review ` | Opens a GitHub pull request or GitLab merge request. |
| `plannotator annotate ` | Opens a supported document, plain-text config or data file, HTML file, web URL, or folder. |
| `plannotator annotate-last` | Opens the latest assistant message from the current supported agent session. |
| `plannotator last` | Short alias for `annotate-last`. |
| `plannotator archive` | Opens saved plan decisions in a read-only browser. |
| `plannotator sessions` | Lists active Plannotator server sessions. |
| `plannotator sessions --open N` | Reopens active session number `N`. |
| `plannotator --help` | Prints the command list. |
| `plannotator --version` | Prints the installed version. |
Local files opened for annotation must be 2 MiB or smaller. Eligible text files selected from a folder receive per-file version history just like supported files opened directly.
Run command-specific help before scripting a workflow:
```bash theme={null}
plannotator review --help
plannotator annotate --help
plannotator annotate-last --help
plannotator sessions --help
```
## Common options
`plannotator review` accepts `--git` or `--gitbutler` to force the provider. Pull request review uses a local checkout by default. Use `--no-local` when you only want the provider diff.
`plannotator annotate` accepts:
* `--markdown` to convert HTML input to Markdown instead of rendering it as HTML
* `--no-jina` to fetch a URL without Jina Reader
* `--gate` to add an approval action
* `--json` to emit a structured decision
* `--hook` to emit hook-native block or pass JSON
* `--require-approval` to make annotations and dismissal exit `1` in a strict `--gate --json` workflow
* `--result-file ` to atomically publish the structured result without overwriting an existing file
`--require-approval` and `--result-file` work only with direct `annotate --gate --json` calls. `plannotator annotate-last` accepts `--stdin`, `--gate`, `--json`, and `--hook`.
Running `plannotator` with no arguments is reserved for hook input. It expects JSON on standard input and is not the interactive entry point.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Annotate Your First Plan
Source: https://docs.plannotator.ai/open-source/start/quickstart
Annotate a Markdown plan, then open a folder to browse and annotate plans, specs, ADRs, and notes in one Plannotator session.
This quickstart shows two flows: annotate one Markdown plan, then open a folder and move between files in Plannotator's file browser. The first file checks your installation without depending on an agent hook.
Save this file as `plan.md`:
```md theme={null}
# Add request logging
1. Add a request ID to the HTTP middleware.
2. Log the method, path, status, and duration.
3. Add tests for successful requests.
```
Run:
```bash theme={null}
plannotator annotate plan.md --gate
```
Plannotator starts a temporary local server and opens the document in your browser. `--gate` adds an **Approve** action.
Select `Add tests for successful requests` and add this comment:
> Include a failed request so the test covers the error status and request ID.
The comment remains attached to the selected text.
Select **Send Feedback**. A direct terminal run writes the feedback to standard output.
Run the command again and select **Approve** to check the approval path.
Point Plannotator at a folder that contains your documents:
```bash theme={null}
plannotator annotate docs/
```
Plannotator opens a file browser for supported documents, plain-text configuration and data files, and HTML. Open a file. Add annotations. Then choose another file without starting a new session.
Try the folder flow with documentation or a local knowledge base that contains plans, specifications, ADRs, and notes. See [Annotate a Folder](/open-source/workflows/folders) for the full format list and workflow.
## Try it inside your agent
After completing the setup for your host, use its manual review command:
* Most command-based agents use `/plannotator-annotate plan.md`.
* Codex can run `!plannotator annotate plan.md` or use `$plannotator-annotate`.
* Amp exposes **Plannotator: Annotate file** in its command palette.
Agent plan review is host-specific. Claude Code, Copilot CLI, Gemini CLI, OpenCode, Pi, and Codex provide automatic or plan-mode review flows. Amp, Droid, and Kiro CLI use manual commands. See [Agents](/open-source/agents) for the exact behavior.
## Try the other entry points
```bash theme={null}
plannotator review
plannotator annotate-last
```
Use `review` inside a version-controlled project. `annotate-last` reads the most recent assistant message for supported agent sessions.
See [Open Plannotator](/open-source/start/open-plannotator) for the complete user-facing command list.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Install and Manage Plannotator Skills
Source: https://docs.plannotator.ai/open-source/start/skills
Install Plannotator's core or extra agent skills, choose specific skills and hosts, update them, and remove them.
The standard Plannotator installer already installs three core skills: `plannotator-review`, `plannotator-annotate`, and `plannotator-last`. Run a separate `npx skills` command only when you want the extra skills or an explicit subset of them.
## Core and extra skills
| Skill | Set | Installed by the standard installer | Purpose |
| - | - | - | - |
| `plannotator-review` | Core | Yes | Review local changes or a pull request. |
| `plannotator-annotate` | Core | Yes | Annotate a file, folder, or URL. |
| `plannotator-last` | Core | Yes | Annotate the latest agent message. |
| `plannotator-compound` | Extra | No | Analyze denied plans and produce a planning report. |
| `plannotator-setup-goal` | Extra | No, except for Kiro CLI | Set up goal-workflow files. |
| `plannotator-visual-explainer` | Extra | No, except for Kiro CLI | Create a visual HTML explanation. |
The full installer places core skills in Claude Code's directory and the shared Agent Skills directory. When it detects Kiro, it also installs `plannotator-setup-goal` and `plannotator-visual-explainer` for Kiro.
A [minimal installation](/open-source/start/installation#install-only-the-binary) skips every skill, command file, hook, agent integration setup, and optional runtime.
## Install the core skills
Use the [standard installer](/open-source/start/installation). It installs the binary and the host-specific skill bodies together, then replaces those managed copies when you run it again.
If you previously used a minimal installation, rerun the installer without `--minimal`. You do not need to remove the existing binary first.
The installer manages all three core skills together. It does not provide a flag for installing only one core skill.
## Install all extra skills
The guided installer can launch the Agent Skills CLI for you. You can also run it directly:
```bash theme={null}
npx skills add backnotprop/plannotator/apps/skills/extra --global
```
The interactive flow lets you choose which supported agents receive the skills.
## Install a specific set
Repeat `--skill` to select only the extras you want:
```bash theme={null}
npx skills add backnotprop/plannotator/apps/skills/extra \
--global \
--skill plannotator-compound \
--skill plannotator-visual-explainer
```
Add one or more `--agent` values for a repeatable host-specific install:
```bash theme={null}
npx skills add backnotprop/plannotator/apps/skills/extra \
--global \
--skill plannotator-compound \
--agent claude-code \
--yes
```
Omit `--agent` and `--yes` when you want the interactive host selector. The Agent Skills CLI [README](https://github.com/vercel-labs/skills) documents its current `--skill`, `--agent`, `--global`, and `--yes` options.
## Choose whether the model can start a skill
Plannotator's Claude Code and shared Agent Skill copies are user-started by default. During a guided install, you can choose which of those installed skills the model may start without an explicit skill command.
Run the guided questions again:
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash -s -- --reconfigure
```
```powershell theme={null}
& ([scriptblock]::Create((irm https://plannotator.ai/install.ps1))) -Reconfigure
```
```bat theme={null}
curl -fsSL https://plannotator.ai/install.cmd -o install.cmd
install.cmd --reconfigure
del install.cmd
```
For an automated install, pass a comma-separated list:
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash -s -- \
--non-interactive \
--model-invocable plannotator-review,plannotator-compound
```
`--model-invocable` changes how an installed Claude Code or shared Agent Skill may be started. It does not install a missing extra skill. Use `--model-invocable none` to keep those managed copies user-started.
## Understand host-specific files
The same `/plannotator-*` command name can refer to different host features. Check the host before editing or removing files.
| Host | What provides the command | Location or package |
| - | - | - |
| Claude Code | Claude-specific agent skills that also appear as slash commands | `~/.claude/skills/plannotator-*`, or `$CLAUDE_CONFIG_DIR/skills/plannotator-*` when set |
| Codex | Shared Agent Skills, started with `$plannotator-*` | `~/.agents/skills/plannotator-*` |
| Kiro CLI | Kiro-specific skills and an example custom agent | `~/.kiro/skills/plannotator-*` and `~/.kiro/agents/plannotator.json` |
| OpenCode | Native Markdown command files plus the separately configured OpenCode plugin | On macOS, Linux, and WSL: `${XDG_CONFIG_HOME:-$HOME/.config}/opencode/commands`. On Windows PowerShell and Command Prompt: `%USERPROFILE%\.config\opencode\commands`. The plugin is `@plannotator/opencode`. |
| Gemini CLI | Native TOML command files plus a policy and hook | `~/.gemini/commands`, `~/.gemini/policies`, and `~/.gemini/settings.json` |
| Claude Code, Copilot CLI, and Droid | Host marketplace plugins can add hooks or commands | Managed by that host's plugin system |
| Pi | Commands and plan mode come from the Pi extension | `@plannotator/pi-extension` |
| Amp | Command-palette actions come from an Amp plugin file | `~/.config/amp/plugins/plannotator.ts` or `.amp/plugins/plannotator.ts` |
Installing an Agent Skill does not install or update a host plugin, extension, or native command file.
## Distinguish skills from Plannotator packages
| Item | What it is | How users install it |
| - | - | - |
| `plannotator` | The local executable that starts the review server and browser UI | The Plannotator installer |
| Agent skill | A `SKILL.md` instruction package that tells an agent how to run a Plannotator workflow | The Plannotator installer or `npx skills add` |
| Slash command | A host-visible command. In Claude Code it can be backed by a skill; in other hosts it can be a native command file or plugin command | The installer, a plugin, or an extension |
| Plugin or extension | Host integration code for hooks, tools, plan mode, or command registration | The host's plugin or package manager |
| `@plannotator/ui` | React components, hooks, and styles for embedding Plannotator's document UI in another application | `npm install @plannotator/ui @plannotator/core` |
| `@plannotator/core` | Browser-safe types and utilities used by `@plannotator/ui` | Installed as an npm library, normally with `@plannotator/ui` |
`@plannotator/ui` and `@plannotator/core` are for application developers. They do not install the `plannotator` command, Agent Skills, or host plugins.
The standard installer downloads the `plannotator` executable from GitHub Releases. It does not install either reusable npm package. Update `@plannotator/ui` and `@plannotator/core` through the package manager for the application that embeds them.
## Update skills
Rerun the standard Plannotator installer to replace its managed core skills with the copies from the selected Plannotator release. This also refreshes the binary and other installer-managed files.
Update extra skills installed through the Agent Skills CLI:
```bash theme={null}
npx skills update plannotator-compound plannotator-setup-goal \
plannotator-visual-explainer --global
```
You can name one skill instead. Updating an extra skill does not update the Plannotator binary or a host plugin.
## Remove skills
If you enabled extras through the guided installer, first save `no extras` as the installer preference. Otherwise a later installer run can offer to add them again:
```bash theme={null}
curl -fsSL https://plannotator.ai/install.sh | bash -s -- --no-extras
```
```powershell theme={null}
& ([scriptblock]::Create((irm https://plannotator.ai/install.ps1))) -NoExtras
```
```bat theme={null}
curl -fsSL https://plannotator.ai/install.cmd -o install.cmd
install.cmd --no-extras
del install.cmd
```
Then remove extras installed through the Agent Skills CLI:
```bash theme={null}
npx skills remove --global \
plannotator-compound \
plannotator-setup-goal \
plannotator-visual-explainer
```
To remove installer-managed core skills manually, delete only these directories:
| Copy | macOS, Linux, or WSL | Windows PowerShell or Command Prompt |
| - | - | - |
| Claude Code | `plannotator-review`, `plannotator-annotate`, and `plannotator-last` under `$CLAUDE_CONFIG_DIR/skills` when that variable is set, or under `~/.claude/skills` otherwise | The same three directories under `%CLAUDE_CONFIG_DIR%\skills` when that variable is set, or under `%USERPROFILE%\.claude\skills` otherwise |
| Shared Agent Skills for Codex and compatible hosts | The same three directories under `~/.agents/skills` | The same three directories under `%USERPROFILE%\.agents\skills` |
A later full installer run restores all three managed core skills.
For Kiro CLI, remove only the Plannotator skill directories under `~/.kiro/skills`. Remove `~/.kiro/agents/plannotator.json` separately if you no longer want the example agent. Removing a skill does not remove the Plannotator binary, a host plugin, or saved Plannotator data.
See [Installation](/open-source/start/installation#remove-plannotator) to remove the executable or local data.
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Review Plannotator Sessions over Tailscale
Source: https://docs.plannotator.ai/open-source/tailscale
Open Plannotator review and annotation sessions from another device through Tailscale Serve without binding the server beyond localhost.
Use `--tailscale` to open a Plannotator session from another device on your tailnet. Plannotator keeps its server on `127.0.0.1` and publishes an HTTPS proxy through [Tailscale Serve](https://tailscale.com/docs/features/tailscale-serve).
The session is available only through your tailnet. Plannotator uses Serve, never Tailscale Funnel.
## Prerequisites
Before you start, verify this configuration:
* [Install or update Plannotator](/open-source/start/installation) on the machine that runs your agent.
* Run `plannotator --version` and verify `v0.27.0` or later.
* [Install Tailscale](https://tailscale.com/download) on the agent host and review device.
* Connect both devices to the same tailnet.
* Permit the review device to reach the agent host through your Tailscale access rules.
* Enable HTTPS certificates for the tailnet. On first use, Tailscale can open an administrator consent flow.
The review device needs Tailscale and a browser. It does not need the Plannotator CLI.
Run `tailscale status` on the agent host. Before you start Plannotator, resolve any login or daemon error.
## Start a remote review
Run Plannotator on the agent host:
```bash theme={null}
plannotator review --tailscale
```
The same flag works with document annotation and the last-message picker:
```bash theme={null}
plannotator annotate path/to/spec.md --tailscale
plannotator annotate-last --tailscale
```
Plannotator prints the HTTPS session URL to standard error. An interactive terminal also displays a QR code.
Verify that Tailscale is connected on the review device. Scan the QR code or open the printed URL.
`--tailscale` works in the compiled Plannotator CLI. The Pi extension does not accept this flag.
## How the connection works
Plannotator performs these steps for each `--tailscale` session:
1. It starts the review server on `127.0.0.1`.
2. It reads the current Tailscale Serve configuration.
3. It refuses to replace an existing Serve mapping on the selected port.
4. It runs the following command with the session port:
```bash theme={null}
tailscale serve --bg --https= http://127.0.0.1:
```
5. Tailscale terminates HTTPS and proxies requests to the loopback server.
6. Plannotator prints the Serve URL and displays a QR code in an interactive terminal.
7. Plannotator removes its Serve mapping at normal session exit.
Mappings on other ports remain unchanged. A pre-existing mapping on the selected port stops startup instead of being replaced.
`--tailscale` forces local mode for that session. It overrides `PLANNOTATOR_REMOTE`, SSH detection, and `PLANNOTATOR_URL_HOST`.
## Understand the security boundary
Tailscale Serve makes the session reachable through the tailnet, not the public internet. Tailscale access rules still govern which devices can reach the host.
Plannotator does not add a login screen or per-request authentication. Every permitted tailnet peer can use the session UI and its local API.
The embedded agent terminal is disabled for `--tailscale` sessions. Enable it only for a tailnet where every permitted peer is trusted:
```bash theme={null}
PLANNOTATOR_AGENT_TERMINAL_REMOTE=1 plannotator annotate path/to/spec.md --tailscale
```
This variable exposes command execution through the session UI. Its terminal token is not an authentication boundary.
## Advertise a Tailscale host in remote mode
`PLANNOTATOR_URL_HOST=auto` solves a different problem. It produces a reachable URL for Plannotator remote mode without starting Tailscale Serve.
When another system already provides private routing or port forwarding, use this configuration:
```bash theme={null}
export PLANNOTATOR_REMOTE=1
export PLANNOTATOR_URL_HOST=auto
plannotator review
```
Plannotator first reads the machine's Tailscale MagicDNS name. A fallback requires exactly one Tailscale IPv4 address in `100.64.0.0/10`.
Detection runs once per process. Detection failure prints a warning and falls back to `localhost`.
This value changes only the advertised URL. Remote mode still binds to `0.0.0.0`, and you remain responsible for network access.
To make the value persistent, save it in `~/.plannotator/config.json`:
```json theme={null}
{
"urlHost": "auto"
}
```
`PLANNOTATOR_URL_HOST` takes precedence over `urlHost` in the configuration file. An empty environment value suppresses the saved value.
## Remove a stale Serve mapping
Plannotator removes its mapping after normal exit, `SIGINT`, `SIGTERM`, or `SIGHUP`. Failed cleanup retries once and prints the manual command.
`SIGKILL` or a host restart can leave the background mapping active. Inspect the current configuration:
```bash theme={null}
tailscale serve status
```
Remove the mapping for the affected port:
```bash theme={null}
tailscale serve --https= off
```
Do not remove mappings for unrelated ports.
## Troubleshoot startup and access
### The Tailscale CLI is unavailable or logged out
Run:
```bash theme={null}
tailscale status
```
Install Tailscale or restore the daemon and sign in. Then run the Plannotator command again.
### Tailscale requests HTTPS approval
Complete the administrator consent flow that Tailscale displays. Then run the Plannotator command again.
See [Set up HTTPS certificates](https://tailscale.com/docs/how-to/set-up-https-certificates) for the tailnet requirement.
### The selected port already has a Serve mapping
Inspect the Serve configuration:
```bash theme={null}
tailscale serve status
```
Remove a stale mapping with the exact command above. Keep an intentional mapping and select another Plannotator port:
```bash theme={null}
PLANNOTATOR_PORT=19433 plannotator review --tailscale
```
### The URL does not open on the review device
Verify that both devices are connected to Tailscale. Verify that access rules permit the review device to reach the host.
Then inspect the active mapping:
```bash theme={null}
tailscale serve status
```
Tailscale documents Serve status and removal commands in its [Serve CLI reference](https://tailscale.com/docs/reference/tailscale-cli/serve).
### The QR code is absent
When standard error is an interactive terminal, Plannotator displays the QR code. Use the printed HTTPS URL in other environments.
### A gated annotation cannot start
A Tailscale publishing failure returns exit code `1` for a normal command. A strict annotation gate returns exit code `2`.
Strict gates use `--require-approval` or `--result-file`. A startup failure does not create a result file.
## Integration limits
Only `review`, `annotate`, `annotate-last`, and its `last` alias accept `--tailscale`. Other subcommands reject the flag.
Agent hooks do not add `--tailscale` automatically. When you need tailnet access, start a file gate directly:
```bash theme={null}
plannotator annotate path/to/plan.md --tailscale --gate
```
See [Remote access](/open-source/remote-access) for trusted private networks, SSH tunnels, and development-container forwarding.
Last verified on August 12, 2026, against Plannotator `v0.27.0` and product commits `5f33b72` and `ed6f44b`. Maintained by the Plannotator project.
# Troubleshoot Plannotator
Source: https://docs.plannotator.ai/open-source/troubleshooting
Fix installation, agent hooks, browser sessions, remote access, port conflicts, pull request review, HTML, URL, and sharing problems.
Start by checking the installed binary and live sessions:
```bash theme={null}
plannotator --version
plannotator sessions
```
Set `PLANNOTATOR_DEBUG=1` for additional terminal diagnostics while reproducing a problem.
## The command is not found
The macOS, Linux, and WSL installer writes the binary to `~/.local/bin/plannotator`. If that directory is not on `PATH`, add it to your shell configuration and start a new terminal:
```bash theme={null}
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```
Use `~/.bashrc` instead for Bash. Confirm the result with:
```bash theme={null}
command -v plannotator
plannotator --version
```
On Windows, the PowerShell installer adds its install directory to your user `PATH`. Restart the terminal after installation. Desktop agent applications may not inherit the same `PATH` as your shell. Restart the application, or configure its hook with the absolute path to the executable.
A minimal install deliberately skips hooks, skills, slash commands, and sidecar tools. Run the full installer if you expected Plannotator to open from your agent.
## The browser did not open
The server may still be running. Read the terminal URL or reopen it:
```bash theme={null}
plannotator sessions
plannotator sessions --open
```
If the default browser command is wrong, select one for the current run:
```bash theme={null}
plannotator review --browser "Google Chrome"
```
You can also set `PLANNOTATOR_BROWSER`. On macOS it accepts an application name or path. On Linux and Windows, use an executable path. A `BROWSER` value such as `none`, `false`, `0`, or `:` intentionally suppresses browser opening.
If a stale session no longer responds, remove its record with `plannotator sessions --clean` and start a new review.
## Plan review does not trigger
First restart the agent after installing or changing a plugin, hook, policy, or config file. Then check the host-specific trigger:
| Agent | Current plan-review trigger |
| - | - |
| Claude Code | On Claude Code 2.1.287 or later, the plugin's Plannotator mod opens the review when Claude calls `ExitPlanMode`, and Claude does not wait. On older versions, in `claude -p` and SDK runs, on Windows, or with the mod off, the plugin intercepts `ExitPlanMode` through a `PermissionRequest` hook, and Claude waits. Install the marketplace plugin and restart Claude Code. |
| Codex | An experimental `Stop` hook opens the latest plan after the turn. The installer enables it on macOS, Linux, and WSL. Codex hooks are disabled on Windows. Restart Codex Desktop after changes. |
| Copilot CLI | The marketplace plugin intercepts `exit_plan_mode`. Restart after installing it and enter plan mode with `Shift` + `Tab`. |
| Gemini CLI | The installer adds the policy, hook, and commands. Gemini CLI 0.36.0 or later is required. |
| OpenCode | The `@plannotator/opencode` plugin gives `submit_plan` to the `plan` agent by default. The `build` agent cannot call it unless you choose a broader workflow. Restart after editing `opencode.json`. |
| Pi | Install `npm:@plannotator/pi-extension`, start Pi with `--plan`, or toggle with `/plannotator-plan-mode`. |
| Amp, Droid, Kiro CLI | Use the installed Plannotator command, skill, plugin workflow, or example agent. These agents do not transparently intercept every plan exit. |
Run a direct command such as `plannotator annotate path/to/plan.md` to separate a CLI/browser problem from a host-hook problem. If the direct command works, inspect the agent's hook log and verify that its process can find the binary.
## Claude Code still waits for my review
On Claude Code 2.1.287 or later, the [Plannotator mod](/open-source/agents/claude-code#the-plannotator-mod) lets Claude keep going while you review. If Claude still waits:
1. Update the plugin. In a terminal, run `claude plugin marketplace update plannotator`, then `claude plugin update plannotator@plannotator`, then restart Claude Code. Refreshing the marketplace alone does not update the plugin.
2. Update the `plannotator` binary by running the installer again. With an older binary, plan review falls back to the waiting flow.
3. Check that `PLANNOTATOR_CLAUDE_MOD` is not set to `0` and that `~/.plannotator/config.json` has no `"claudeCodeMod": false`.
4. The mod does not run in `claude -p` or SDK runs, or on Windows. Those always wait.
5. To report a problem, start Claude Code with `PLANNOTATOR_MOD_DEBUG=1` and attach `~/.plannotator/claude-code-mod/debug.log`.
## Remote SSH and development containers
Confirm that the agent process inherited both remote settings:
```bash theme={null}
env | grep '^PLANNOTATOR_REMOTE='
env | grep '^PLANNOTATOR_PORT='
```
With the default remote port, forward the session from your local machine:
```bash theme={null}
ssh -L 19432:127.0.0.1:19432 user@host
```
Setting `PLANNOTATOR_PORT` alone does not make a container session reachable. `PLANNOTATOR_REMOTE=1` changes the bind address from `127.0.0.1` to `0.0.0.0`.
Remote mode exposes an unauthenticated HTTP server on `0.0.0.0`. Do not publish the port or bind it to an untrusted network. Use SSH forwarding or a trusted private development environment.
Follow [Remote access](/open-source/remote-access) for the SSH command, development-container configuration, direct private-network access, verification steps, and remote-sharing boundary.
The embedded agent terminal is disabled in remote mode by default.
Set `PLANNOTATOR_AGENT_TERMINAL_REMOTE=1` only on a trusted connection. This setting enables command execution through the forwarded UI.
## A port is already in use
Local sessions normally choose a free random port. Remote sessions default to `19432`. Pick another fixed port or let Plannotator try a range:
```bash theme={null}
PLANNOTATOR_PORT=19433 plannotator review
PLANNOTATOR_PORT=19432-19463 plannotator review
```
A fixed port is retried five times for a transient conflict. A range advances immediately to the next available port. An invalid port value prints a warning and falls back to the normal default.
## GitHub pull request or GitLab merge request review fails
Plannotator uses the matching host CLI. Install and authenticate it before opening the review:
```bash theme={null}
gh auth login
gh auth status
glab auth login
glab auth status
```
Use `gh` for GitHub pull requests and `glab` for GitLab merge requests. For an enterprise host, authenticate the same hostname used in the URL.
By default, Plannotator prepares a local checkout for full file access. If cloning or checkout preparation fails, use diff-only mode:
```bash theme={null}
plannotator review --no-local PR_OR_MR_URL
```
Diff-only mode cannot provide every local file or repository operation. For local changes, run `plannotator review` from inside the repository and confirm that the working tree has a supported VCS.
## Local HTML does not render correctly
Local HTML renders raw by default. Do not add the old `--render-html` flag; it is retained only as a compatibility no-op.
Relative images, stylesheets, scripts, fonts, media, and other supported assets are served from the HTML file's directory. Plannotator refuses paths outside that directory, unsupported asset types, missing files, and files over the asset-size limit. Check the browser network panel for `403`, `404`, `413`, or `415` responses and make the document self-contained when practical.
To review the document's text instead of its rendered page, convert it to Markdown:
```bash theme={null}
plannotator annotate page.html --markdown
```
Raw HTML is rendered in a sandboxed iframe, but its scripts can still run inside that frame. Review only HTML you trust.
## URL annotation fails or shows poor content
Plannotator first accepts native Markdown when a site serves it, then uses Jina Reader by default for public HTML. If Jina fails, it warns and falls back to direct fetch and local conversion.
Force the direct path when a site works better without Jina:
```bash theme={null}
plannotator annotate https://example.com/page --no-jina
```
Local and private-network URLs skip Jina automatically. Public URLs that redirect to a private or local address are blocked. Fetches time out after 30 seconds and responses are limited to 10 MB. Authentication cookies from your browser are not sent, so save a protected page locally before annotating it.
If Jina rate limits the request, set `JINA_API_KEY` or use `--no-jina`.
## A local annotation file is too large
Single-file and folder annotation accept local files up to 2 MiB. A larger file fails with `File too large to annotate (max 2MB)`. Reduce or split the file before reopening it. In a strict `annotate --gate --json` workflow, this startup failure exits `2`.
## A large untracked file appears as binary
Code review loads and diffs untracked text files up to 5 MiB. An untracked file over that limit appears as a binary addition and Plannotator refuses to load its contents. Exclude, reduce, or commit the file if you need to inspect it through another comparison.
## Sharing fails
Check whether sharing is disabled:
```bash theme={null}
env | grep '^PLANNOTATOR_SHARE='
```
`PLANNOTATOR_SHARE=disabled` overrides `config.json` for integrations that use Plannotator's shared configuration resolver. OpenCode checks an explicit OpenCode `share` setting first, so set that value to `"disabled"` as well. For other integrations, remove the environment variable or set an enabled value for a new session when sharing is intended.
Markdown share links can carry compressed content in the URL fragment. Raw HTML sharing uses an encrypted paste service so local assets can be included. If raw HTML sharing fails:
* check network access to the paste service
* check `PLANNOTATOR_PASTE_URL` if you configured a custom service
* remove unnecessary assets or make the HTML smaller and self-contained
The decryption key remains in the URL fragment. Anyone with the complete link can open the shared content, so treat the link as sensitive.
## Config changes are ignored
Confirm that you edited `config.json` in the active data directory. Plannotator chooses that directory in this order:
1. `PLANNOTATOR_DATA_DIR`, with leading `~` expansion
2. An existing `~/.plannotator`
3. `$XDG_DATA_HOME/plannotator` when `XDG_DATA_HOME` is absolute
4. `~/.plannotator`
An existing `~/.plannotator` wins over XDG. A relative `XDG_DATA_HOME` is ignored, and Plannotator does not implicitly use `~/.local/share`.
If `PLANNOTATOR_DATA_DIR` is relative, Plannotator resolves it from the working directory where that process launched. The installer, agents, and shells can use different directories for the same value. Make sure that you inspect every working directory, not only the environment variable.
Malformed JSON produces a warning and Plannotator uses defaults. Validate the file with a JSON parser. Remember that command flags and environment variables override `config.json` for the settings they control.
The Settings panel also uses a browser cookie. Server-synced fields prefer `config.json`; interface-only fields live only in the cookie. Clear site data for `localhost` if a cookie-only setting is stuck, but note that this resets other Plannotator UI preferences in that browser.
## Cursor review jobs fail to start
Cursor review jobs use Ask mode and pass `--sandbox enabled` by default. On systems where Cursor's sandbox cannot start, including some NixOS or AppArmor-restricted Linux setups, retry without the forced sandbox:
```bash theme={null}
PLANNOTATOR_CURSOR_SANDBOX=0 plannotator review
```
For a persistent setting, add `"cursorSandbox": false` to `config.json`. Plannotator then omits the sandbox flag and defers to your Cursor Agent configuration. Write protection depends on `--mode ask` and your Cursor settings in this mode.
## AI panels are missing
Check for an explicit kill switch:
```bash theme={null}
env | grep '^PLANNOTATOR_AI='
```
`PLANNOTATOR_AI=disabled` removes Ask AI, Review Agents, and Guided Review and disables their provider and job endpoints. Remove it or set another value, then start a new session. Ordinary reviews and external annotation submission still work.
## Ask for help
When reporting a reproducible OSS issue, include:
* `plannotator --version`
* operating system and agent name/version
* the command you ran, with secrets and private URLs removed
* terminal output with `PLANNOTATOR_DEBUG=1`
* whether the direct CLI command works outside the agent hook
Report issues at [github.com/backnotprop/plannotator/issues](https://github.com/backnotprop/plannotator/issues).
Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.
# Run Agent Reviews, Code Tours, and Guided Reviews
Source: https://docs.plannotator.ai/open-source/workflows/agent-reviews
Run a code review, Code Tour, Guided Review, or custom review skill with an installed local agent CLI and understand its provider guardrails.
Open the **Agents** tab in a code review to run a separate agent over the current change. Job progress and logs stream into Plannotator. Completed findings appear as review annotations, where you decide what to keep, edit, copy, or send.
Plannotator does not automatically post completed job findings to GitHub or GitLab or send them to the coding agent. You remain responsible for checking each finding and choosing the review destination. The provider process still has the permissions described below while the job runs.
## Choose a review job
* **Code Review** looks for correctness, security, maintainability, and other concrete problems in the current change.
* **Code Tour** creates a narrated walkthrough with checkpoints. It runs with Claude or Codex.
* **Guided Review** organizes the change into ordered sections with summaries and live diffs. It can run with any supported review engine.
* **Custom review** runs a review profile from an enabled global agent skill.
You can run more than one engine, watch logs while each job runs, stop a running job, and compare their findings in the same review.
## Install and authenticate an agent CLI
Plannotator detects engines by checking for their command on `PATH`. The command must also be authenticated and have a usable model configuration.
| Engine | Command Plannotator detects | Supported jobs |
| - | - | - |
| Claude Code | `claude` | Code Review, Code Tour, Guided Review |
| Codex CLI | `codex` | Code Review, Code Tour, Guided Review |
| Cursor CLI | `agent` | Code Review, Guided Review |
| OpenCode | `opencode` | Code Review, Guided Review |
| Pi | `pi` | Code Review, Guided Review |
| GitHub Copilot CLI | `copilot` | Code Review, Guided Review |
Model choices come from the installed provider where supported. Codex is the exception: Plannotator maintains the Codex model and reasoning-effort choices to match the current Codex CLI. A provider can appear installed but fail to launch if its CLI is signed out, lacks a configured model, or cannot access the repository.
## Understand provider guardrails
Plannotator tells every review job not to modify files or post comments. Those prompt instructions do not enforce read-only execution. The available guardrails depend on the provider:
* Codex runs with `--full-auto` in its workspace-write sandbox.
* Cursor runs in Ask mode with its sandbox enabled by default. If Cursor's sandbox cannot start on a restricted Linux system, set `PLANNOTATOR_CURSOR_SANDBOX=0` or set `"cursorSandbox": false` in `config.json` to omit the sandbox flag. In that mode, write protection depends on Ask mode and your Cursor configuration.
* OpenCode runs with its planning agent and retains shell access.
* Pi excludes its direct edit and write tools but retains Bash access.
* Claude receives file-reading tools and inspection-oriented Git and forge command patterns. Direct file-writing tools, WebFetch, WebSearch, and general-purpose shells are denied, but some allowed Git and forge patterns are broader than a strict read-only subcommand list.
* GitHub Copilot denies its direct write tool and specific high-risk version-control and forge operations. It allows Git and forge command families and auto-denies other shell tools.
Treat provider output as untrusted review evidence and inspect each claimed issue. Run a review job only where the selected provider's permissions and your repository isolation are acceptable.
## Run agents on the intended comparison
The job receives the comparison currently open in Plannotator. Choose the correct Git mode, Jujutsu revision, GitButler view, or pull-request scope before launching it.
For GitButler Stack and Branch reviews, the prompt identifies the on-screen patch as authoritative because filesystem reads can see other applied stacks or later branch layers. See [Review GitButler Workspaces, Stacks, and Branches](/open-source/workflows/gitbutler#keep-annotations-tied-to-the-right-comparison) for this comparison boundary. For stacked pull requests, an agent can review either **Layer** or **Full stack** when the local checkout exists.
A GitHub pull request or GitLab merge request needs the temporary local checkout that Plannotator prepares by default. Agent jobs are unavailable with `--no-local` or after checkout preparation fails. See [Review pull requests and merge requests](/open-source/workflows/pull-requests).
## Reopen a Guided Review
Plannotator saves each successfully generated Guided Review under the data directory. Open **Previous guides** in the Agents tab to reopen or delete one. The list shows its title, age, and section progress.
Section completion persists with the saved guide. A completed section starts collapsed when you reopen it, but you can expand it without changing the state of other sections. Selecting a file chip, annotation, or AI citation expands the containing section and file, focuses it, and scrolls it into view.
A saved guide records the repository commit present when it was generated. If the repository has moved to another commit, the saved-guide list and reopened guide mark it **Diff changed**. Treat that warning as a reason to confirm that its summaries and file ranges still match the review.
Disable new guide writes with either setting:
```bash theme={null}
export PLANNOTATOR_GUIDE_HISTORY=0
```
```json theme={null}
{
"guideHistory": false
}
```
Disabling history does not delete saved guides. Existing guide data remains readable through the local API, but the normal guide browser is hidden when AI features are disabled.
## Add a custom review
Choose **Add a review** in the Agents tab to enable a global skill as a review profile. Plannotator searches global skill directories, including:
* `~/.claude/skills`
* `~/.codex/skills`
* `~/.agents/skills`
* The XDG agents skills directory when configured
Repository-local skills are intentionally ignored for custom reviews because a fork or downloaded repository should not be able to supply the prompt that reviews itself.
If the skill contains `SKILL.md`, its body replaces the built-in review prompt for that profile. Plannotator reads it again at launch, so saved edits apply to the next job. The skill can refer the reviewer to supporting files in its own directory. The selected provider's guardrails still apply.
Enabled review profiles are stored in `/review-skills.json`. Use the Agents tab to manage this file instead of editing it by hand.
For quick questions about selected lines instead of a full background review, use [Ask AI during a review](/open-source/workflows/ask-ai).
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Add Annotations and Send Feedback
Source: https://docs.plannotator.ai/open-source/workflows/annotations-and-feedback
Comment on exact text, add a global comment, draw on image attachments, and choose whether to request changes, approve, or dismiss a review.
Select the smallest useful passage, add the requested change, then choose **Send Feedback**. Plannotator keeps the selected text with the comment so the agent can locate the issue.
## Annotation types
| Action | Use it for |
| - | - |
| **Delete** | Mark selected text for removal. |
| **Comment** | Explain a change, question, replacement, or missing detail. |
| **Quick label** | Apply a configured label such as a test or scope reminder. |
| **Looks good** | Record that a selected passage needs no change. |
| **Global comment** | Add feedback about the whole plan or document. |
### Find Global Comment
In a rendered Markdown plan or document, **Global comment** is in the document action bar. On a narrower layout, its label shortens to **Comment** or to an icon. It is not shown while the Markdown editor or rendered Markdown diff replaces the normal document view.
In rendered HTML, the equivalent action is labeled **Comment**. Selecting **Hide tools** hides this action with the other HTML annotation controls.
Ordinary rendered Markdown annotate sessions do not intentionally hide Global Comment. If the full text label is missing, look for **Comment** or the speech-bubble icon with the **Add global comment** tooltip. Plannotator chooses the full, short, or icon-only label from the current width of the document action bar.
The standalone archive is read-only. It hides Global Comment, Attachments, selection composers, direct-edit and notes-save actions, and other document mutation controls. Linked documents opened from the archive remain read-only. Both the Bun and Pi servers also reject archive mutation requests, so this boundary does not depend on a client-side flag.
### Attach and mark up images
You can paste or upload an image into a comment or use **Images** for a document-level attachment. Plannotator stores an uploaded image as a temporary local file and includes its name and path in the feedback sent to the agent.
Open an attached image to draw with the pen, arrow, or circle tools. Drawing applies only to that image. Plannotator does not provide a freehand layer over Markdown, rendered HTML, or code diffs.
## Make a direct edit
Open the Markdown editor when rewriting the text is clearer than describing the change. Plannotator records added and removed lines and includes a unified diff in the feedback.
Eligible local Markdown, MDX, and text files can also be saved to disk with `Cmd/Ctrl+S`. The feedback marks those changes as already applied so the agent does not repeat them. See [Annotate documents](/open-source/workflows/documents#edit-markdown) for the write and conflict behavior.
## Check feedback before sending
Open **Export** and select **Annotations** to inspect the generated Markdown. You can copy it or download `annotations.md` without ending the review.
The exported feedback can include:
* source line labels and selected text
* comments, deletions, quick labels, and general feedback
* attached image paths
* direct-edit diffs and file changes already saved to disk
* a marker when an annotation refers to a changed block in the version diff
## Choose the review decision
| Action | What it means |
| - | - |
| **Send Feedback** | Requests another revision. Agent plan flows treat it as the request-changes or rejection path. Direct `--json` annotation returns `{"decision":"annotated","feedback":"..."}`. |
| **Approve with Notes** | Approves the current content and sends non-blocking implementation guidance when the active agent or JSON transport supports approval notes. |
| **Approve** | Approves the current content without requesting another revision. It is available only when an agent plan flow or `--gate` provides an approval gate. |
| **Close** in an annotation session | Ends the session without sending feedback. Structured JSON reports `{"decision":"dismissed"}`. |
| **Cancel** in a modal | Closes that confirmation and returns to the review. It does not send feedback, approve, dismiss, or end the session. |
If pending feedback would be dropped by **Approve** or **Close**, Plannotator opens a warning. Choose **Cancel** to keep the session and its pending feedback open.
`--gate` adds **Approve**, but it does not make every other decision fail the calling process. In hook-native mode, **Approve** and **Close** both produce empty output, which lets the host hook pass. Use direct `--gate --json --require-approval` when approval must be the only successful outcome. See [Approval gates and automation hooks](/open-source/reference/hooks).
## Know where feedback goes
When a supported agent opens Plannotator, **Send Feedback** returns the generated feedback to that agent session. A direct CLI run prints it to standard output.
The embedded terminal is different. Starting it launches a new local agent CLI process in the review's working directory. When that terminal is ready, **Send Feedback** goes to the new agent and the Plannotator window stays open. It does not reconnect to or deliver feedback to the original agent that opened the review.
Plannotator does not keep a completed OSS review session attached to the original agent across multiple feedback rounds.
## End or reopen a session
**Send Feedback**, **Approve**, and **Close** normally end the temporary local server. If the agent revises the content and opens Plannotator again, that is a new review session. The completed page can remain visible when **Auto-close Tab** is off; change that browser preference in **Settings > General**.
Draft annotations and direct edits are saved under the Plannotator data directory while a session is open, so a server or browser interruption can restore them. `plannotator sessions --open` can reopen a server that is still running. Draft recovery, version history, and reopening a live server do not restore a completed connection to the original agent.
Last verified on August 1, 2026, using Plannotator product commit `d53cbfb`. Maintained by the Plannotator project.
# Ask AI during a review
Source: https://docs.plannotator.ai/open-source/workflows/ask-ai
Ask a configured local AI provider about selected diff lines while keeping its answers separate from submitted review feedback.
Select lines in a code diff and choose **Ask AI** to ask a question about that code. The answer streams into the AI sidebar and stays attached to the file in the chat history.
You can also ask a general question from the AI tab. Plannotator includes the current comparison in the request, such as uncommitted changes, a branch comparison, a Jujutsu revision, a GitButler stack, or a pull-request checkout. When you switch the comparison, the next question receives the new review context.
Ask AI is an explanation tool. Its conversation is separate from your annotations and final review. Copy a useful conclusion into a normal annotation if you want it included when you send feedback.
## Ask this session
When Plannotator is opened from Claude Code 2.1.287 or later (with the Plannotator mod), Pi, or OpenCode 2, Ask AI is answered by the agent session that opened it. This is the only Ask AI option there. There is no provider or model picker, and the provider settings below do not apply. Your question shows in the agent's chat, and the agent already knows the conversation. See [Ask this session](/open-source/workflows/ask-this-session).
## Configure a provider
You pick a provider when Ask this session is not available: Claude Code without the mod, OpenCode 1, Codex and the other agents, remote mode, `--tailscale`, or a `plannotator` command you run yourself.
Plannotator detects supported AI providers from their local command-line tools. Install and authenticate or configure at least one provider before opening the review.
| Provider | Local requirement | Permission behavior |
| - | - | - |
| Claude | Install and authenticate the `claude` CLI. | Plannotator starts with read and search tools plus a limited set of inspection commands. Other tool use can require approval. |
| Codex | Install and authenticate the `codex` CLI. | Plannotator pins the Ask AI session to Codex's read-only sandbox. Your configured approval policy still applies. |
| OpenCode | Install and authenticate the `opencode` CLI. | OpenCode handles tool permissions and can show approval requests in the chat. |
| Pi | Install and configure the `pi` CLI and its model providers. | Pi controls tool execution through its own local runtime. Plannotator does not expose a Pi permission gate. |
Plannotator does not create accounts or manage provider API keys. If a provider is detected but cannot answer, verify its authentication and model configuration by running its CLI directly.
Open **Settings > AI** to choose a provider and model. The choice persists across sessions.
For the first session, Plannotator prefers the matching provider when it is available:
| Calling agent | Preferred provider |
| - | - |
| Claude Code | Claude |
| Codex | Codex |
| OpenCode | OpenCode |
| Pi | Pi |
Other agents use the saved provider or the available server default.
Changing the provider or model starts a new AI session. Earlier messages remain visible, but they are not part of the new provider conversation.
## Disable AI features
Set `PLANNOTATOR_AI=disabled` before starting Plannotator to remove Ask AI, Review Agents, and Guided Review from the UI and disable their provider and job endpoints:
```bash theme={null}
PLANNOTATOR_AI=disabled plannotator review
```
Ordinary plan, document, and code review still work. External agents can still open reviews and submit annotations. Saved Guided Review files are retained, but their in-app history browser is hidden while AI is disabled. The annotate-mode agent terminal is separate and keeps its own settings.
## Ask a focused question
1. Select the smallest useful line range in the diff.
2. Choose **Ask AI** in the annotation toolbar.
3. Ask a concrete question about behavior, risk, or intent.
4. Verify the answer against the patch and repository before turning it into review feedback.
For example:
```text theme={null}
Can this error path leave the transaction open? Point to the relevant cleanup code.
```
The selected lines are included even when the overall diff must be shortened to fit the provider's context window.
## Pull requests need a local checkout
Ask AI can read local-change reviews immediately. For a GitHub pull request or GitLab merge request, it needs the temporary local checkout that Plannotator prepares by default. If preparation is still running, retry after it finishes.
Ask AI is unavailable for a pull-request review started with `--no-local`, because that mode intentionally retains only the provider diff. See [Review pull requests and merge requests](/open-source/workflows/pull-requests) for the checkout boundary.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Ask This Session: Ask AI Answered by Your Agent
Source: https://docs.plannotator.ai/open-source/workflows/ask-this-session
When Claude Code, Pi, or OpenCode 2 opens Plannotator, Ask AI questions go to that agent session, which already knows the conversation.
Since Plannotator 0.28.0, Ask AI can be answered by the agent session that opened Plannotator. Plannotator calls this **Ask this session**. The agent already knows the conversation, so you do not have to explain the context.
## Where it works
| Agent | Where the session answers |
| - | - |
| [Claude Code](/open-source/agents/claude-code) 2.1.287 or later, with the Plannotator mod on | Plan review, code review, annotate, and `/plannotator-last` |
| [Pi](/open-source/agents/pi) | Plan review, code review, annotate, and `/plannotator-last` |
| [OpenCode](/open-source/agents/opencode) 2 | Code review, annotate, and `/plannotator-last`. Plan review gets a quick answer only. |
In these sessions, Ask this session is the only Ask AI option. There is no provider or model picker, and a provider you saved before is not used.
## How it works
* Your question shows in the agent's chat. The answer streams back into Plannotator.
* The question and the answer become part of the agent's conversation.
* If the agent is busy with a turn, Plannotator asks what to do: **Ask when it finishes** or **Interrupt and ask now**.
* Stopping a question stops only that question.
* If the session closes or cannot be reached, Plannotator says so. It does not switch to a different AI.
## OpenCode 2 plan review
During plan review, the OpenCode 2 session is waiting for your plan decision, so it cannot run a full turn. You get a quick answer from the session's context, labeled "Quick answer from this session". Nothing is added to the conversation.
## When you pick a provider instead
Ask AI uses a provider you pick, as described in [Ask AI during a review](/open-source/workflows/ask-ai#configure-a-provider), when:
* the session is in remote mode or published with `--tailscale`
* Plannotator was opened from OpenCode 1
* the Claude Code mod is off, or Claude Code runs without it (versions before 2.1.287, `claude -p`, SDK runs, Windows)
* you run the `plannotator` command yourself, outside an agent session
## What still uses its own models
Agent reviews, Code Tour, and Guided Review are separate from Ask AI. They run their own Claude or Codex models, or another installed agent CLI, even in a session where Ask AI uses the session. See [Run agent reviews](/open-source/workflows/agent-reviews).
Last verified against Plannotator v0.28.0 on October 4, 2026. Maintained by the Plannotator project.
# Open and Annotate Markdown, Documents, URLs, and Folders
Source: https://docs.plannotator.ai/open-source/workflows/documents
Open a Markdown file, plain-text data file, web page, HTML file, or folder in Plannotator, then annotate it or send edits back to your agent.
Use `plannotator annotate` to open a supported document or plain-text config file, a web page, or a folder.
## Open a Markdown or text document
```bash theme={null}
plannotator annotate README.md
plannotator annotate notes.txt
plannotator annotate config.yaml
plannotator annotate https://example.com/guide
plannotator annotate docs/
```
When you run the command directly, Plannotator starts a temporary local server, opens the annotation UI, and waits for your response. **Send Feedback** prints formatted feedback to stdout. Agent skills and commands return the same feedback to the active agent session.
Add `--gate` when the document needs an explicit approval decision:
```bash theme={null}
plannotator annotate specification.md --gate
```
## Open a folder
Pass a folder to open the file browser:
```bash theme={null}
plannotator annotate docs/
```
The browser lists the same supported local formats as direct file annotation:
* documents: `.md`, `.mdx`, and `.txt`
* plain-text config and data: `.yaml`, `.yml`, `.json`, `.jsonc`, `.json5`, `.toml`, `.ini`, `.cfg`, `.conf`, `.properties`, `.csv`, `.tsv`, `.log`, `.xml`, and `.env.example`
* HTML: `.html` and `.htm`
Plain-text config and data files keep their content unchanged and use the standard text annotation view. A bare `.env` file is excluded because it commonly contains secrets and annotation history can store content copies. Source-code extensions are excluded; use [code review](/open-source/workflows/local-changes) for them.
Only Markdown and MDX use Markdown frontmatter rules. A supported non-Markdown file that begins with `---` keeps those lines as document content.
Each local file must be 2 MiB or smaller. Select a file to annotate it, then move to another file without starting a new Plannotator session. Common generated and dependency directories, including `node_modules`, `dist`, and `build`, are skipped.
See [Annotate a Folder](/open-source/workflows/folders) for file-browser shortcuts, folder feedback, and large-folder limits.
## Follow links between local documents
In rendered Markdown, Plannotator opens relative links to `.md`, `.mdx`, `.txt`, `.html`, and `.htm` files inside the same review UI. It also opens `[[wiki-links]]`; a wiki-link without an extension resolves as a Markdown file. Relative paths are resolved from the active document.
Use the file badge or sidebar to return to the previous document. Annotations on linked documents are included when you send the review's combined feedback.
Links to a heading in another local document open the document but do not scroll to that heading. Plannotator strips the link fragment before opening the linked document. A file selected from a folder can receive per-file version history, while an ordinary document opened only through a link does not. See [Version history](/open-source/workflows/version-history).
## Open a web page
Plannotator converts web pages to Markdown before annotation. Jina Reader is used by default for public pages. URLs on localhost or private networks use a direct fetch because Jina cannot reach them.
Use direct fetch for any URL with `--no-jina`:
```bash theme={null}
plannotator annotate https://internal.example.com/guide --no-jina
```
Direct fetch converts the returned HTML with Turndown. URLs ending in `.md` or `.mdx` are read as text when the response is Markdown.
Plannotator annotates an imported copy of a web page, not the live page. For live-site annotation, use [App Notes in the Chrome Web Store](https://chromewebstore.google.com/detail/app-notes/lkknpieefdjpoancolcioblkpgnhpffl). The [latest GitHub release](https://github.com/plannotator/app-notes/releases/latest) provides separate Chrome and Firefox packages with checksums.
## Edit Markdown
The Markdown editor supports two outcomes:
* For a plan, agent message, URL conversion, or other non-writable source, Plannotator sends your changes to the agent as a unified diff.
* For an eligible local Markdown, MDX, or supported plain-text file, save with `Cmd/Ctrl+S` to replace the file atomically. Plannotator confines the write to the opened source file, checks whether it changed on disk, and asks you to resolve a conflict when needed.
Saved file changes are included with submitted feedback as context so the agent knows they are already applied. Unsaved edits are not written to disk.
Local HTML has its own rendered workflow. See [Annotate HTML](/open-source/workflows/html). To change the message returned by supported agent wrappers, see [Customize Feedback](/open-source/reference/custom-feedback#plan-and-document-feedback).
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Annotate a Folder with Plannotator
Source: https://docs.plannotator.ai/open-source/workflows/folders
Open a folder of supported documents, plain-text config and data files, and HTML in one Plannotator session.
Pass a folder to `plannotator annotate` to browse and annotate its supported documents in one session. This works well for a documentation folder or a local knowledge base containing plans, PRDs, specifications, ADRs, RFCs, and notes.
## Open the folder
```bash theme={null}
plannotator annotate docs/
```
Plannotator starts a temporary local server and opens the folder file browser. The files remain on your computer.
The browser lists these file types:
* Markdown: `.md` and `.mdx`
* Text: `.txt`
* Config and data: `.yaml`, `.yml`, `.json`, `.jsonc`, `.json5`, `.toml`, `.ini`, `.cfg`, `.conf`, `.properties`, `.csv`, `.tsv`, `.log`, `.xml`, and `.env.example`
* HTML: `.html` and `.htm`
A bare `.env` file and source-code extensions are excluded. Each file must be 2 MiB or smaller. Common generated and dependency directories, including `node_modules`, `dist`, and `build`, are skipped.
## Move between files
Choose a file in the browser, add annotations, then choose another file. You do not need to start a new Plannotator session for each document.
Press `Mod` + `Shift` + `B` to show or hide the folder browser. `Mod` means Command on macOS and Control on Windows and Linux.
Opening an eligible local text file from the folder browser records per-file annotation history. The history remains grouped by the file's stable path, unchanged content does not create a duplicate version, and later sessions can show a diff against a saved version.
Rendered HTML, converted URLs, agent messages, and ordinary documents opened through links inside another review do not receive folder-session history.
## Send the folder feedback
Select **Send Feedback** after you finish annotating. A direct terminal run prints the formatted feedback to standard output. A supported agent command or skill returns it to the active agent session.
Use `--gate` when the folder review also needs an **Approve** action:
```bash theme={null}
plannotator annotate docs/ --gate
```
## Open a large folder
The file browser returns up to 5,000 supported files by default. Set `PLANNOTATOR_FILE_BROWSER_MAX_FILES` to a positive integer when you need a different limit. See [Environment Variables](/open-source/reference/environment-variables#files-diagnostics-and-local-tools) for the setting.
See [Annotate documents](/open-source/workflows/documents) for local-file editing, web URLs, HTML rendering, and save behavior.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Review GitButler Workspaces, Stacks, and Branches
Source: https://docs.plannotator.ai/open-source/workflows/gitbutler
Review a GitButler workspace, stacked branches, or one branch layer in Plannotator, with exact detection rules, limits, and troubleshooting.
Run `plannotator review` inside an active GitButler workspace. Plannotator detects GitButler and opens the **Workspace** view, which shows all applied committed work, working-tree changes, and untracked files.
```bash theme={null}
cd path/to/gitbutler-workspace
plannotator review
```
Plannotator reviews local GitButler state. It does not use GitButler's older cloud **Butler Review** feature, which [GitButler says is currently paused](https://docs.gitbutler.com/review/overview).
## Requirements and automatic detection
Use Plannotator v0.24.0 or newer. Put the GitButler `but` CLI on `PATH`. Version 0.21.0 or newer is required.
Run:
```bash theme={null}
plannotator --version
but --version
```
`plannotator --version` must report v0.24.0 or newer. `but --version` must report v0.21.0 or newer. GitButler documents the CLI in the [GitButler CLI overview](https://docs.gitbutler.com/cli-overview).
Plannotator selects GitButler only when both checks pass:
1. Symbolic `HEAD` is `refs/heads/gitbutler/workspace`. Plannotator also accepts the legacy `refs/heads/gitbutler/integration` ref.
2. The repository has a local `gitbutler.project.targetref` value that starts with `refs/`.
The reserved branch name alone is not enough. A stale GitButler database does not trigger detection by itself. Neither does a normal branch merely named `gitbutler/workspace` without the local target-ref configuration. GitButler explains why its client maintains the synthetic workspace commit in [Workspace Branch](https://docs.gitbutler.com/workspace-branch).
If Plannotator detects the workspace ref and target configuration but cannot use `but`, it stops with a clear error. It does not fall back to a plain Git diff of GitButler's synthetic workspace commit.
## Choose Workspace, Stack, or Branch
Open the comparison picker to move between the GitButler views available for the current workspace.
| View | What Plannotator shows |
| - | - |
| **Workspace** | All applied committed work from GitButler's reported merge base, plus assigned and unassigned working-tree changes and untracked files. This is the default. |
| **Stack** | Committed work from the workspace merge base through the selected stack tip. It does not include assigned or unassigned working-tree changes. |
| **Branch** | The committed commits in one branch layer. The previous layer, or the workspace merge base for the bottom layer, forms the comparison base. |
GitButler defines stacked branches as dependent branches that build on the branches below them. See [Stacked Branches](https://docs.gitbutler.com/features/branch-management/stacked-branches) for GitButler's branch model.
Assigned but uncommitted changes appear only in **Workspace**. GitButler does not expose one authoritative combined patch for a stack plus those assigned changes, so Plannotator does not guess.
## Know the limits of GitButler sessions
GitButler assignments are not the Git index. Plannotator therefore hides stage and unstage controls, Git-status sections, and the commits panel in GitButler sessions.
Committed **Stack** and **Branch** views describe Git objects that may not match the live working tree. Other stacks or later layers can be applied at the same time. In these two views, Plannotator disables:
* Opening a file in an editor or another app
* Code navigation
* Semantic diff
* VS Code annotations
When you expand a file, Plannotator still reads it from the exact committed comparison, not from the live workspace.
When you start a multi-repository review from a parent folder, a GitButler child repository participates only in the aggregate **Current changes** view. Staged, unstaged, and last-change aggregate modes are unavailable when a GitButler child is present.
## Force GitButler or plain Git
Force the GitButler provider when automatic detection is unavailable or when you want a clear setup error:
```bash theme={null}
plannotator review --gitbutler
```
Force the plain Git provider when you intentionally want Git's view of the repository:
```bash theme={null}
plannotator review --git
```
Plain Git can expose the synthetic workspace commit and union index that GitButler maintains. Use the Git escape hatch only when that is the comparison you want.
## Keep annotations tied to the right comparison
Each annotation records the GitButler view, label, merge base, and exact diff snapshot that supplied its line numbers. If you annotate a branch, switch to another view, and then send feedback, Plannotator labels the annotation with the branch comparison where you made it.
Ask AI and launched agent reviews receive the comparison currently open in Plannotator. For committed Stack and Branch views, the prompt includes the displayed patch and tells the agent to treat it as authoritative. Ordinary filesystem reads or `git diff` can include other applied stacks or later branch layers.
See [Run agent reviews](/open-source/workflows/agent-reviews#run-agents-on-the-intended-comparison) for provider permissions and review behavior.
## Troubleshoot GitButler review
### `but` is missing
Plannotator reports:
```text theme={null}
GitButler workspace detected, but the `but` CLI is not on PATH (requires 0.21.0 or newer).
```
Install GitButler's CLI, or expose the `but` command installed with GitButler Desktop, then confirm it is available in the same shell:
```bash theme={null}
but --version
```
### `but` is too old
For an installed v0.20.0 CLI, Plannotator reports:
```text theme={null}
GitButler 0.20.0 is unsupported; Plannotator requires 0.21.0 or newer.
```
Update GitButler until `but --version` reports v0.21.0 or newer. A prerelease such as `0.21.0-beta.1` does not satisfy the minimum.
### Automatic detection does not trigger
Check the two values Plannotator uses:
```bash theme={null}
git symbolic-ref --quiet HEAD
git config --local --get gitbutler.project.targetref
```
The first command should print the GitButler workspace ref. The second should print a configured ref such as `refs/remotes/origin/main`. If either is absent, return to an active GitButler workspace or use `plannotator review --gitbutler` to get the direct provider error.
### Assigned changes are absent from Stack or Branch
This is expected. Select **Workspace** to review assigned or unassigned working-tree changes and untracked files. Stack and Branch remain committed-only.
GitButler support shipped in [Plannotator OSS v0.24.0](https://github.com/backnotprop/plannotator/releases/tag/v0.24.0) through [PR #1067](https://github.com/backnotprop/plannotator/pull/1067). This page was verified against [v0.25.0](https://github.com/backnotprop/plannotator/releases/tag/v0.25.0) on July 27, 2026. Maintained by the Plannotator project.
# Annotate HTML in Plannotator
Source: https://docs.plannotator.ai/open-source/workflows/html
Render a local HTML file in Plannotator, annotate text or elements, compare versions, and share an encrypted portable copy.
Plannotator renders local `.html` and `.htm` files as pages by default. You can annotate visible text or point to an element without converting the page to Markdown.
For URL imports, folders, and the separate live-page workflow, see [How to annotate a website or HTML file](/learn/annotate-any-web-page-or-html-file).
## Open rendered HTML
Open only HTML that you trust. A script in the sandbox can make outbound network requests. Use `--markdown` to remove scripts before annotation.
```bash theme={null}
plannotator annotate report.html
```
The page runs in a sandboxed iframe. Plannotator allows the page's scripts to run inside that sandbox but does not grant it same-origin access to the annotation UI.
The sandbox does not block outbound network requests. A script can send its content or other readable data to a remote server.
Relative support files such as stylesheets, scripts, images, fonts, audio, and video are served from the HTML file's directory. Plannotator blocks path traversal and does not follow a symlink that escapes that directory.
## Add HTML annotations
Use either input method in the annotation UI:
* Select visible text, then add a comment, deletion, quick label, or looks-good mark.
* Switch to pinpoint mode and select a page element that is easier to identify by position than by text.
Use the document comment action for feedback about the whole page. **Send Feedback** returns the annotations to the active agent or prints them to stdout when you launched the CLI directly.
Optional Vim controls work in the raw rendered HTML view. Turn them on in Settings, then use the same navigation, visual-selection, and annotation keys as plan and document review. Press `?` for the key-reference panel.
## Convert HTML to Markdown
Use `--markdown` when you want to annotate the page as converted Markdown instead of rendered HTML:
```bash theme={null}
plannotator annotate report.html --markdown
```
Plannotator uses Turndown with GitHub Flavored Markdown table support. It removes `script`, `style`, and `noscript` elements during conversion. Edits to the converted Markdown describe the requested content change, but they do not overwrite the HTML source file.
Converted HTML uses the normal Markdown viewer and its Vim controls. Raw HTML uses the iframe-aware controls that navigate the rendered page.
## Compare HTML versions
When annotation history is enabled, reopening the same HTML file creates a new local version if the content changed. **Show changes** renders the current page with inline insertions and deletions for changed text. Script and style contents are not marked up by the HTML diff.
See [Version history](/open-source/workflows/version-history) to control these local copies.
## Share rendered HTML
Rendered HTML does not use the URL-only sharing format. In **Export** > **Share**, select **Create short link**. Plannotator prepares a portable copy, inlines eligible local support assets, encrypts the payload in your browser, and uploads only ciphertext to the configured paste service.
See [Share an annotation session](/open-source/workflows/sharing) for the encryption and retention details.
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Review local code changes
Source: https://docs.plannotator.ai/open-source/workflows/local-changes
Open a browser review for local Git, GitButler, Jujutsu, or Perforce changes and send line-specific feedback to your coding agent.
Run a local review from your coding agent:
```text theme={null}
/plannotator-review
```
Or start the same review from a terminal:
```bash theme={null}
plannotator review
```
Plannotator detects the repository and opens the diff in your browser. When an agent starts the command, it captures your submitted annotations. When you start the command directly, Plannotator prints the result in the terminal. The available comparison modes depend on the source-control system.
## Git reviews start with everything since the base branch
In a Git repository, the default **All changes** view uses Plannotator's `since-base` comparison. Plannotator compares the merge base of your branch and its base branch with the current working tree.
This comparison approximates the change that a pull request would contain if you committed and pushed now. It includes:
* Commits on your branch
* Staged and unstaged changes
* Untracked files
Plannotator tries the repository's default branch first, then common `main` and `master` references. If it cannot resolve a base branch, it opens the uncommitted changes instead. This fallback avoids hiding committed work behind an invalid comparison.
Use the comparison picker to review only uncommitted, staged, or unstaged changes, the last commit, a specific commit, all files at `HEAD`, or committed branch changes. The base picker can compare against another local or remote reference.
The **Git status** panel groups committed changes, working-tree changes, and untracked files in the default All changes view. Staging controls and the commit-history rail are available only for ordinary local Git reviews.
### Large untracked files
Plannotator loads and diffs an untracked text file only when it is 5 MiB or smaller. A larger untracked file appears as a binary addition, and its full content is not available in the review. This limit prevents a single generated or data file from consuming the review session.
## Choose the source-control provider
Plannotator uses the nearest supported repository root. When a folder contains nested Git, GitButler, or Jujutsu repositories, it can show their workspace changes together with repository-prefixed paths.
| Provider | Default view | Important boundaries |
| - | - | - |
| Git | All changes (`since-base`) | Supports staging controls, Git status groups, commit history, base selection, and stale-diff checks. |
| GitButler | Workspace | Requires `but` 0.21.0 or newer. Stack and Branch views are committed-only. Git staging, commit history, and base-fetch controls are unavailable. |
| Jujutsu | Current | Uses Jujutsu revisions rather than the Git index. No stage or unstage controls. |
| Perforce | Default changelist | Shows opened text files from the default or a numbered pending changelist. Binary opened files are skipped. No staging controls or nested-repository aggregation. |
### Force Git or GitButler
Use a flag when you need to choose explicitly:
```bash theme={null}
plannotator review --gitbutler
plannotator review --git
```
Automatic detection opens **Workspace**, which includes all applied committed work, working-tree changes, and untracked files. `--gitbutler` fails clearly if `but` is missing or older than v0.21.0; it does not silently fall back to Git.
See [Review GitButler Workspaces, Stacks, and Branches](/open-source/workflows/gitbutler) for the exact detection rules, committed-only views, session limits, escape hatches, annotations, agent reviews, and troubleshooting.
### Review Jujutsu changes
Plannotator detects a Jujutsu workspace through the installed `jj` command. The comparison picker offers:
* **Current** for `@` compared with its parent
* **Last** for the previous change
* **Line** for the current line of work back to the selected target
* **Evolution** for the current change compared with an older evolution entry
* **All** for the repository root through `@`
Line mode can target local or remote bookmarks. Plannotator does not expose a separate `--jj` flag.
### Review Perforce changelists
Plannotator detects Perforce after Git by running `p4 info` and reading the current client root. The default view contains files opened in the default changelist. Use the comparison picker to open another pending numbered changelist owned by the current user and client.
Perforce support is available in Plannotator's main CLI-backed agent setups. The Pi extension's review server does not provide a Perforce provider.
## Annotate and return the review
Select changed lines to add comments, quick labels, deletion requests, or an approval mark. **Send Feedback** produces structured file and line references. **Approve** produces the configured code-review approval prompt. The agent that opened Plannotator captures that output; a direct terminal launch prints it.
See [Customize Feedback](/open-source/reference/custom-feedback#code-review-feedback) to change the approval message or the instructions appended after submitted findings.
For a GitHub pull request or GitLab merge request, use a URL instead. See [Review pull requests and merge requests](/open-source/workflows/pull-requests).
Last verified against Plannotator OSS v0.25.0 on July 27, 2026. Maintained by the Plannotator project.
# Review an AI Coding Plan with Plannotator
Source: https://docs.plannotator.ai/open-source/workflows/plan-review
Annotate an AI coding plan, send exact feedback to the agent, approve it, and compare the next revision.
Plannotator opens an agent's plan in a local review UI. Comment on exact text, mark text for removal, edit the Markdown, or add a general comment. Choose **Send Feedback** when the agent should revise the plan, or **Approve** when it can continue.
## Open a plan review
Supported agents can open Plannotator at their plan handoff point. The exact trigger depends on the agent. Claude Code intercepts `ExitPlanMode`, while other agents use their own hooks, plugins, or commands.
On Claude Code 2.1.287 or later (with the [Plannotator mod](/open-source/agents/claude-code#the-plannotator-mod)) and on [Pi](/open-source/agents/pi), the agent does not wait while you review. Your decision arrives later as a message, and a revised plan updates the same tab.
To review a plan file without an automatic hook, run:
```bash theme={null}
plannotator annotate plan.md --gate
```
The `--gate` flag adds **Approve** to the document annotation UI. See [Agents](/open-source/agents) for the setup and plan-review trigger used by each agent.
## Review and respond
1. Read the rendered plan.
2. Select text to add a comment, request deletion, apply a quick label, or mark the selection as looking good.
3. Use a global comment for feedback that does not belong to one passage.
4. Choose **Send Feedback** when the plan must change before implementation.
5. Choose **Approve with Notes** when the plan can proceed and the remaining feedback is non-blocking implementation guidance.
6. Choose **Approve** when the plan can proceed without notes.
Some agent protocols cannot attach notes to approval. Plannotator warns before an approval would discard unsent feedback. Use **Send Feedback** for blocking changes.
Plannotator exports anchored feedback as structured Markdown. It includes the selected text, the comment or requested deletion, and source line information when available. Direct Markdown edits are included as a unified diff.
## Review a revised plan
Plannotator saves each plan submission before opening the review. When the agent resubmits the same plan, a change badge shows added and removed lines.
Open the diff to switch between:
* a rendered view with added, removed, and modified blocks
* a raw Markdown diff with `+` and `-` lines
You can annotate changed blocks in the rendered diff. Use the Version Browser to compare the current plan with an earlier saved version.
See [Annotations and feedback](/open-source/workflows/annotations-and-feedback#choose-the-review-decision) for the exact behavior of Send Feedback, Approve, Close, and Cancel. See [Customize Feedback](/open-source/reference/custom-feedback#plan-and-document-feedback) to change the returned message and [Version history](/open-source/workflows/version-history) for local storage details.
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Review pull requests and merge requests
Source: https://docs.plannotator.ai/open-source/workflows/pull-requests
Review GitHub pull requests or GitLab merge requests locally, then send feedback to your agent or post it to the provider.
Pass a GitHub pull request or GitLab merge request URL to Plannotator:
```text theme={null}
/plannotator-review https://github.com/owner/repository/pull/123
```
```text theme={null}
/plannotator-review https://gitlab.com/group/project/-/merge_requests/42
```
From a terminal, use `plannotator review` followed by the same URL. GitHub Enterprise hosts and GitLab instances on custom domains are supported when their URLs follow the provider's standard pull-request or merge-request path.
## Install and authenticate the provider CLI
Plannotator uses the provider's command-line tool for authentication, metadata, and diff retrieval.
| Provider | Requirement | Authentication check |
| - | - | - |
| GitHub | Install `gh` | Run `gh auth login`, then confirm with `gh auth status`. For GitHub Enterprise, add `--hostname github.example.com`. |
| GitLab | Install `glab` | Run `glab auth login`, then confirm with `glab auth status`. For a custom domain, add `--hostname gitlab.example.com`. |
The authenticated account must be able to read the repository. Private repositories work when the corresponding CLI account has access.
## Local checkout is the default
Plannotator first loads the provider diff so the browser can open promptly. In the background, it prepares a temporary local checkout for the pull request or merge request.
If the current repository matches the URL's host, owner, and repository, Plannotator fetches the review head into a detached Git worktree. For another repository, it creates a shallow temporary clone with the provider CLI. The temporary checkout is removed when the review session ends.
The checkout enables features that need repository files:
* Ask AI
* Background agent reviews, Code Tours, and Guided Reviews
* Code navigation and semantic diff
* Full-stack comparison for a stacked pull request or merge request
If checkout preparation is still running, these features can become available after the diff opens. If it fails, Plannotator keeps the provider diff available and reports that local-file features are unavailable.
Use `--no-local` when you intentionally want a diff-only review:
```bash theme={null}
plannotator review --no-local https://github.com/owner/repository/pull/123
```
`--no-local` skips the temporary checkout. You can still inspect and annotate the provider diff, but file-aware AI, agent reviews, code navigation, semantic diff, and full-stack comparison are unavailable. `--local` states the default behavior explicitly.
## Choose where the review goes
The review destination appears in the browser. Choose one of these destinations before submitting:
* **Agent** produces structured feedback for the coding-agent session that opened Plannotator. A direct terminal launch prints the same result. It does not post to GitHub or GitLab.
* **GitHub** or **GitLab** posts review comments or approval through the authenticated provider CLI. Plannotator reports the completed submission to the invoking agent or terminal.
A new provider review defaults to GitHub or GitLab unless you previously selected Agent. Plannotator remembers the destination for later review sessions. You can switch it in the review controls; pressing Option or Alt twice also toggles the destination.
Provider posting applies only to the current pull request or merge request layer. Inline comments must map to lines in that provider diff.
If a stacked change offers **Full stack**, use it to inspect or run agents over the whole chain. Before you post inline comments, return to **Layer**. An annotation that cannot map to the provider diff can still be copied or sent to the agent as Markdown.
## GitHub and GitLab differences
Both providers support URL review, local checkout, annotations, review submission, and approval. Their platform APIs differ:
* GitHub can synchronize each file's viewed state with the pull request. GitLab viewed state stays local to Plannotator.
* GitHub supports listing and switching pull requests from the review UI. GitLab does not currently provide the equivalent in-session merge-request switcher.
* GitHub can show a pull-request stack tree. GitLab can identify a stacked merge request and offer Layer or Full stack when a local checkout is available, but it does not show the GitHub-style stack tree.
* GitLab posts a general note, inline discussions, and approval through separate APIs. If only part of a submission succeeds, Plannotator reports what posted and narrows **Retry Unposted** to the failed comments or approval. It does not resend the general note or inline comments that already posted.
* If Plannotator cannot confirm whether a provider accepted part of a review, it blocks automatic retry to avoid duplicates. Inspect the pull request or merge request before starting another submission. GitLab can also save unposted comment bodies under the Plannotator data directory as a recovery copy.
For help understanding unfamiliar code before you annotate it, see [Ask AI during a review](/open-source/workflows/ask-ai). To run a separate review agent over the change, see [Run agent reviews](/open-source/workflows/agent-reviews). To change the message returned to your agent, see [Customize Feedback](/open-source/reference/custom-feedback#code-review-feedback).
Last verified on July 31, 2026, using Plannotator product commit `7cd023c`. Maintained by the Plannotator project.
# Answer Your Agent's Questions Asynchronously
Source: https://docs.plannotator.ai/open-source/workflows/questions
Answer your agent's questions asynchronously in Plannotator: question cards you fill in on your own time, a quality interface for terminal and desktop agents alike.
Your agent has questions for you. Instead of asking them one at a time in a chat prompt, it writes them into its plan or document, and Plannotator shows each one as a card. You answer them all in one place, on your own time, and send them back together.
A modern model has no reason to sit blocked on a prompt. Terminal agents and desktop agent apps both lack a good interface for answering questions. Plannotator works with both.
The post [An interactive UI for the grill-me skill](https://plannotator.ai/blog/an-interactive-ui-for-the-grill-me-skill), written before question blocks existed, shows the same idea through `/plannotator-last` (a tool for annotating your agent's last message, useful for CLI agents).
## How to use
**With the skill.** The Plannotator installer adds a `plannotator` skill for Claude Code, Codex, and other agents that read `~/.agents/skills`. It teaches the agent the question syntax. Nothing to set up. Ask your agent to use it:
```text theme={null}
Use the plannotator skill. Write your questions for me as question blocks in a Markdown file, then open it with plannotator annotate.
```
**Without the skill.** Copy this prompt into your agent's `AGENTS.md`, `CLAUDE.md`, or a skill of your own:
````markdown expandable theme={null}
## Asking the reviewer questions
When a decision needs the reviewer (a trade-off you cannot settle from the code or the conversation), write it as a question block. The reviewer answers in place, and the answers come back to you in an "Answers to your questions" section at the top of their feedback, with the questions they left open listed under "Unanswered".
```markdown
:::question
Where should losing conflict versions be kept?
Last-write-wins silently drops the loser unless we keep it somewhere.
- [ ] Local only, purged after 30 days — cheap, no server change
- [ ] Server-side per user — survives reinstall, needs a retention policy
- [ ] Nowhere — accept silent loss for v1
Recommended: Local only, purged after 30 days
:::
```
- `:::question` picks one choice, `:::question-multi` picks any number, `:::question-text` asks for free text (a block with no choices is free text too).
- The first line is the question. Other prose lines are context. Most reviewers answer faster with a sentence or two of it: what the choice affects and what you already know. Context can include an image (``), which helps when the question is about something visual, such as a screen.
- Choices are task-list items: `- [ ] label`, optionally `- [ ] label — why`. The reviewer can always answer "Other", add a note, or skip.
- `Recommended: