Skip to content

Instantly share code, notes, and snippets.

@PrimeTimeTran
Created July 6, 2026 23:07
Show Gist options
  • Select an option

  • Save PrimeTimeTran/ca0410ed35c63ba3a901a144386ed8b3 to your computer and use it in GitHub Desktop.

Select an option

Save PrimeTimeTran/ca0410ed35c63ba3a901a144386ed8b3 to your computer and use it in GitHub Desktop.

Prompt Context Protocol

Is a protocol for agent-user collaboration in AI development.

All AI tools from CLI, IDE, and others struggle because of the same underlying problem.

They all struggle in the same ways:

  1. How does the user prompt?
  • Editor comment?
    • What DSL for comments?
  • Editor tooltip?
    • What shortcuts for prompting?
  • Sidebar chat panel?
    • What shortcuts for prompting?
  1. How does the agent respond?
  • Editor "suggestion"?
    • Insert previews?
      • When?
      • How to accept/try-again/revert?
    • Should the code be auto-inserted with an option to 'revert'?
  • Sidebar chat Panel?
    • Preview?
    • Preview then confirm before auto-inserting?
  1. They all design their own work/confirm cycle for each prompt/response/continue interaction.
  • "Responsed" so "done". Dead state. Sits there like a bump on a log until the user hand feeds the next prompt.

Flow

  • Agent confirms/initiates session goal/checklist/agenda
    • Agent prompts user:
      • From history, FS review, Agents.md, ai.md etc.
  • User confirms/defines session agenda
  • Agent defines session
    • goals/checklist
    • strategy to achieve goals of session
  • Agent works until goal is "finished"
  • Agent & user work together to
    • Confirm the goal is "finished"
    • Checkpoint the work via a code commit

Tabs

  • Prompt Context Tab
    • User is/must set the agent context, the overarching 'goal' for the session.
      • This simplifies many aspects of the session, including:
        • Prompting
        • Context management
        • Conversation flow
      • With this context set, the Agent can:
        • Read/Write to disk (as necessary)
        • Skip repeated confirmations (e.g. "are you sure?")
        • Know how to continue on an "error"
          • If the goal of the session is to "fix" a bug, the agent shouldn't "hang" waiting for next from user "reporting error" and instructing the agent to "fix it".
      • Furthermore:
        • Agent loops become easier to manage:
          • If the goal has not been "finished" as defined by initial user response, the agent should loop back to the user to clarify or update the goal.
          • If the goal has been "finished", the agent should move on to the next step in PCP, prompting user to commit code by asking the user to summarize the work or doing it themselves and then asking the user to confirm the commit.
          • Afterwards, the agent should move on to the next step in PCP
  • Context Tab
  • Conversations Tab
  • Config Tab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment