Potpie Repo Baseline
Use this skill when the user asks to ingest, refresh, establish, or deeply
understand what a repository is and how it works.
Procedure
- Resolve the pot and source:
potpie --json pot info
potpie --json source list
potpie source add repo . --pot <pot-id-or-name>
Source registration records metadata only. It does not ingest or scan.
- Discover the live graph contract:
potpie --json graph status
potpie --json graph catalog --task "deep repo baseline"
potpie --json graph describe features --view feature_context --examples
potpie --json graph describe infra_topology --view service_neighborhood --examples
potpie --json graph describe decisions --view preferences_for_scope --examples
- Create todos for the baseline lanes: docs/product, repo map,
runtime/deploy, API/data/integrations, preferences/workflows, synthesis,
identity resolution, write, verify.
- Read authored sources first, then inspect source files that are authoritative
for durable facts: routes, service clients, adapters, deployment targets,
API contracts, model/datastore usage, and test/workflow commands.
- Resolve identity before writing:
potpie graph search-entities "<repo service feature>" --limit 10
potpie graph search-entities "<service>" --type Service --environment prod --limit 10
- Write one or more semantic mutation batches:
potpie --json graph propose --file mutation.json
potpie --json graph commit <plan_id> --verify
potpie --json graph history --plan <plan_id>
graph mutation-template --kind repo-baseline is an optional skeleton helper;
trust graph catalog and graph describe ... --examples for the live contract.
Deep Baseline Mode
Use this mode whenever the user says "ingest repo", "deeply understand",
"baseline this repo", or asks for broad repo memory.
- Product and docs:
- README, docs, ADRs, runbooks, contributing guide, package metadata,
public docs, linked websites.
- Capture purpose, app type, domain vocabulary, explicit features,
decisions, preferences, and workflows.
- Repo map:
- Manifests, top-level apps/packages, framework config, route/API
entrypoints, generated API specs, tests.
- Capture services/modules only when a source clearly supports them.
- Runtime and deploy:
- Dockerfiles, compose, Kubernetes, Terraform, CI workflows, deploy scripts,
environment templates, feature flags.
- Capture environments, deploy shape, config variables, release/test
workflows, and ownership when explicit.
- API, data, and integrations:
- Service clients, adapters, auth providers, queues, datastore/model usage,
external API clients.
- Capture APIContract, DataStore, Adapter, Dependency, and integration facts
with file/doc evidence.
- Preferences and local workflows:
- Contribution docs, lint/test configs, Makefiles, package scripts,
PR templates, code comments that explicitly state policy.
- Record only reusable explicit preferences.
- Synthesis:
- Build an evidence matrix before writing. Split high-confidence facts from
uncertain observations. Use inbox for useful but weak findings.
Source Priority
- README and authored docs.
- ADRs, runbooks, architecture docs, deployment docs.
- Package/app manifests and top-level workspace definitions.
- CI/deploy workflows and environment templates.
- Framework config and route/API specs.
- Visible route/API entrypoints.
- Service clients/adapters, only to confirm topology.
- Datastore/model usage, only to confirm durable infra facts.
- Tests and fixtures, only to confirm workflows, API behavior, or feature
intent that is otherwise explicit.
Baseline Memory
Record source-backed repository purpose, app type, features, deployable services
or modules, environments, deploy shape, dependencies, adapters, datastores,
API contracts, important integrations, ownership, local workflows, and explicit
coding preferences.
Use canonical entity families when writing: Repository, Service, Feature,
Environment, DataStore, APIContract, Dependency, and Preference.
Represent capabilities as Feature entities; link repos or services with
PROVIDES, and use IMPLEMENTED_IN when a source locates implementation.
Use topology relations such as DEFINED_IN, DEPLOYED_TO, DEPENDS_ON,
USES, EXPOSES, USES_ADAPTER, CONFIGURES, and OWNED_BY only when the
source supports the relation. Link explicit preferences with
POLICY_APPLIES_TO.
Use authoritative_fact for explicit source-of-truth evidence, such as docs,
deployment config, API specs, or source files that define behavior. Use
source_observation for direct observations that are not necessarily policy.
Use agent_claim for lower-authority synthesis. Every entity and claim needs a
compact summary, retrieval-grade description, confidence, truth class, source
authority, and source refs when available.
Mutation Requirements
Before proposing:
- Resolve existing repository, service, feature, dependency, and owner entities.
- Prefer updating/linking existing entities over creating near-duplicates.
- Include evidence for
authoritative_fact and source_observation.
- Keep one mutation file to one coherent family or source slice when possible.
- Put low-confidence but useful findings into
graph inbox add.
After committing:
potpie graph read --subgraph features --view feature_context --scope anchor_entity_key:<repo-key> --limit 50
potpie graph read --subgraph infra_topology --view service_neighborhood --scope service:<service> --depth 2 --direction both --limit 50
potpie --json graph quality duplicate-candidates --limit 20
potpie --json graph quality low-confidence --limit 20
potpie --json graph quality conflicting-claims --limit 20
Boundaries
Baseline capture is harness-led. Do not run scanner-driven graph updates or
legacy ingestion commands to invent modules, services, features, or
dependencies. Do not record dependencies just because a lockfile mentions them.
Do not infer baseline architecture from PR titles or issue status; change
history and change-history facts belong in potpie-change-timeline.
Local file inspection is allowed and expected, but the harness must read,
interpret, and cite the evidence before writing semantic facts.
1---2name: potpie-repo-baseline3description: Use when establishing, refreshing, or deeply understanding a repository's baseline memory in Potpie: purpose, application type, features, services/modules, environments, deploy shape, dependencies, API contracts, datastores, integrations, ownership, and explicit preferences. The harness reads authored and code-adjacent sources, then writes graph workbench mutations.4---56# Potpie Repo Baseline78Use this skill when the user asks to ingest, refresh, establish, or deeply9understand what a repository is and how it works.1011## Procedure12131. Resolve the pot and source:1415```bash16potpie --json pot info17potpie --json source list18potpie source add repo . --pot <pot-id-or-name>19```2021Source registration records metadata only. It does not ingest or scan.22232. Discover the live graph contract:2425```bash26potpie --json graph status27potpie --json graph catalog --task "deep repo baseline"28potpie --json graph describe features --view feature_context --examples29potpie --json graph describe infra_topology --view service_neighborhood --examples30potpie --json graph describe decisions --view preferences_for_scope --examples31```32333. Create todos for the baseline lanes: docs/product, repo map,34 runtime/deploy, API/data/integrations, preferences/workflows, synthesis,35 identity resolution, write, verify.364. Read authored sources first, then inspect source files that are authoritative37 for durable facts: routes, service clients, adapters, deployment targets,38 API contracts, model/datastore usage, and test/workflow commands.395. Resolve identity before writing:4041```bash42potpie graph search-entities "<repo service feature>" --limit 1043potpie graph search-entities "<service>" --type Service --environment prod --limit 1044```45466. Write one or more semantic mutation batches:4748```bash49potpie --json graph propose --file mutation.json50potpie --json graph commit <plan_id> --verify51potpie --json graph history --plan <plan_id>52```5354`graph mutation-template --kind repo-baseline` is an optional skeleton helper;55trust `graph catalog` and `graph describe ... --examples` for the live contract.5657## Deep Baseline Mode5859Use this mode whenever the user says "ingest repo", "deeply understand",60"baseline this repo", or asks for broad repo memory.61621. Product and docs:63 - README, docs, ADRs, runbooks, contributing guide, package metadata,64 public docs, linked websites.65 - Capture purpose, app type, domain vocabulary, explicit features,66 decisions, preferences, and workflows.672. Repo map:68 - Manifests, top-level apps/packages, framework config, route/API69 entrypoints, generated API specs, tests.70 - Capture services/modules only when a source clearly supports them.713. Runtime and deploy:72 - Dockerfiles, compose, Kubernetes, Terraform, CI workflows, deploy scripts,73 environment templates, feature flags.74 - Capture environments, deploy shape, config variables, release/test75 workflows, and ownership when explicit.764. API, data, and integrations:77 - Service clients, adapters, auth providers, queues, datastore/model usage,78 external API clients.79 - Capture APIContract, DataStore, Adapter, Dependency, and integration facts80 with file/doc evidence.815. Preferences and local workflows:82 - Contribution docs, lint/test configs, Makefiles, package scripts,83 PR templates, code comments that explicitly state policy.84 - Record only reusable explicit preferences.856. Synthesis:86 - Build an evidence matrix before writing. Split high-confidence facts from87 uncertain observations. Use inbox for useful but weak findings.8889## Source Priority90911. README and authored docs.922. ADRs, runbooks, architecture docs, deployment docs.933. Package/app manifests and top-level workspace definitions.944. CI/deploy workflows and environment templates.955. Framework config and route/API specs.966. Visible route/API entrypoints.977. Service clients/adapters, only to confirm topology.988. Datastore/model usage, only to confirm durable infra facts.999. Tests and fixtures, only to confirm workflows, API behavior, or feature100 intent that is otherwise explicit.101102## Baseline Memory103104Record source-backed repository purpose, app type, features, deployable services105or modules, environments, deploy shape, dependencies, adapters, datastores,106API contracts, important integrations, ownership, local workflows, and explicit107coding preferences.108109Use canonical entity families when writing: `Repository`, `Service`, `Feature`,110`Environment`, `DataStore`, `APIContract`, `Dependency`, and `Preference`.111Represent capabilities as `Feature` entities; link repos or services with112`PROVIDES`, and use `IMPLEMENTED_IN` when a source locates implementation.113Use topology relations such as `DEFINED_IN`, `DEPLOYED_TO`, `DEPENDS_ON`,114`USES`, `EXPOSES`, `USES_ADAPTER`, `CONFIGURES`, and `OWNED_BY` only when the115source supports the relation. Link explicit preferences with116`POLICY_APPLIES_TO`.117118Use `authoritative_fact` for explicit source-of-truth evidence, such as docs,119deployment config, API specs, or source files that define behavior. Use120`source_observation` for direct observations that are not necessarily policy.121Use `agent_claim` for lower-authority synthesis. Every entity and claim needs a122compact summary, retrieval-grade description, confidence, truth class, source123authority, and source refs when available.124125## Mutation Requirements126127Before proposing:128129- Resolve existing repository, service, feature, dependency, and owner entities.130- Prefer updating/linking existing entities over creating near-duplicates.131- Include evidence for `authoritative_fact` and `source_observation`.132- Keep one mutation file to one coherent family or source slice when possible.133- Put low-confidence but useful findings into `graph inbox add`.134135After committing:136137```bash138potpie graph read --subgraph features --view feature_context --scope anchor_entity_key:<repo-key> --limit 50139potpie graph read --subgraph infra_topology --view service_neighborhood --scope service:<service> --depth 2 --direction both --limit 50140potpie --json graph quality duplicate-candidates --limit 20141potpie --json graph quality low-confidence --limit 20142potpie --json graph quality conflicting-claims --limit 20143```144145## Boundaries146147Baseline capture is harness-led. Do not run scanner-driven graph updates or148legacy ingestion commands to invent modules, services, features, or149dependencies. Do not record dependencies just because a lockfile mentions them.150Do not infer baseline architecture from PR titles or issue status; change151history and change-history facts belong in `potpie-change-timeline`.152Local file inspection is allowed and expected, but the harness must read,153interpret, and cite the evidence before writing semantic facts.