Skip to content
Agent Memory
Skill

/graph-mutation-plan

Compose canonical semantic operations for apply_graph_mutations using stable entity keys and source evidence.

From plugin
potpie
5.8k2 skills

Claude Code

$ npx -y skills add potpie-ai/potpie --skill graph-mutation-plan --agent claude-code

SKILL.md

graph-mutation-plan.SKILL.md
name: graph-mutation-plan
description: Compose canonical semantic operations for apply_graph_mutations using stable entity keys and source evidence.
version: "2.0.0"
tags: [mutation, graph, ontology, reference]

Composing an `apply_graph_mutations` request

Call `apply_graph_mutations(plan, event_id, summary)` for an event in the batch. The plan contains an `operations` array of semantic operations. The tool binds it to the batch pot and supplies the event idempotency key and ingestion actor. Reuse stable entity keys resolved by reads. Never reference another pot.

Each operation has an `op` and the fields for that operation. Use `upsert_entity` to establish an entity, `link_entities` or `assert_claim` for supported relationships, and `retract_claim` or `end_relation_validity` when source evidence changes an existing claim. Read the canonical mutation tool catalog for supported operations and required fields. Do not submit writer batch fields such as `entity_upserts`, `edge_upserts`, or `episodes`.

Use the exact types, key prefixes, predicates and allowed endpoint pairs from the ontology in your instructions. Preserve source evidence on each claim, including its reference, truth classification and any environment or validity bounds. When the source does not support a relationship, omit it.

{
  "operations": [
    {
      "op": "upsert_entity",
      "subject": {"key": "service:billing", "type": "Service"}
    },
    {
      "op": "link_entities",
      "subgraph": "infra_topology",
      "subject": {"key": "service:billing", "type": "Service"},
      "predicate": "DEPENDS_ON",
      "object": {"key": "service:ledger", "type": "Service"},
      "truth": "source_observation",
      "description": "Billing invokes the ledger service",
      "evidence": [{"kind": "pull_request", "ref": "github:pr:o/r:482"}]
    }
  ]
}

Read before changing existing claims so retractions identify their exact claim keys or record IDs. Keep failed remedies distinct from successful fixes and record decisions only when their rationale is stated in the source.

Read more
@potpie-ai
Ships withpotpie

Context Graph for AI Native SDLC

Stars on GitHub

Momentum

stars in total
5.8k
Star history of potpie-ai/potpie on GitHub, a chart by star-history.com

Other skills on potpie.

backfill-enumerate-drain

backfill-enumerate-dra…

How to backfill a newly-added repo or team — the enumerate-then-drain loop, the single-event contract, and resume-safe todo…

@potpie-ai@potpie-aiInstall Skill

More skills from other plugins.

agent-cost-report

agent-cost-report

Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…

claude-mem11d116k
@thedotmack@thedotmackInstall Skill
bot-handoff

bot-handoff

Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…

hindsight11d60k
@vectorize-io@vectorize-ioInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@mempalace@mempalaceInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@milla-jovovich@milla-jovovichInstall Skill

Questions about graph-mutation-plan.

Which coding agents can use graph-mutation-plan?
graph-mutation-plan installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.