adopt-existing
Source-first growth of an existing single- or multi-repository project into CYPRESS's unified docs/graph knowledge system. Use from initialize when code already exists, or for a graph refresh after material code changes. Scout executable evidence, model subsystem nodes, build project-specific architecture/product/API/data/dependency/prompt/operations leaves, connect them for progressive discovery, and validate navigation. Never trust centralized prose without source corroboration, invent specs or ADRs, modify application files, run application builds, or push Git.
llopresto87 · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add llopresto87/Cypress --skill adopt-existing技能说明
name: adopt-existing description: Source-first growth of an existing single- or multi-repository project into CYPRESS's unified docs/graph knowledge system. Use from initialize when code already exists, or for a graph refresh after material code changes. Scout executable evidence, model subsystem nodes, build project-specific architecture/product/API/data/dependency/prompt/operations leaves, connect them for progressive discovery, and validate navigation. Never trust centralized prose without source corroboration, invent specs or ADRs, modify application files, run application builds, or push Git. id: skill.adopt-existing tier: 2 kind: skill origin: seed title: adopt-existing — grow an existing codebase into the docs/graph knowledge plant, source-first owns:
- adopt-existing.method
- adopt-existing.refresh
- adopt-existing.validation requires:
- protocol.grow peers:
- protocol.initialize
- skill.knowledge-graph
- protocol.from-scratch load_when:
- "adopt an existing codebase into the graph"
- "initialize cypress on a project that already has code"
- "refresh the knowledge graph after material code changes"
- "onboard a multi-repo or monorepo project"
- "build docs/graph for existing source" artifacts:
- templates/prompts/graph-session-bootstrap.md
- templates/prompts/handback-payload.md prevents: An adoption with no way back — a graph authored once from a snapshot of the code, with no refresh path when the source moves under it, so it decays into a confident description of a repository that no longer exists. est_tokens: 1780
Adopt an existing project
Turn a generic installed seed into a project-specific knowledge plant.
Follow docs/graph/protocols/initialize.md; this skill supplies the
existing-project discovery and authoring discipline.
Invariants
docs/graph/is the only maintained knowledge root. The router, nodes, LLM wiki, provenance, plans, runbooks, contracts, and deep dives are layers of this one graph (rule.knowledge).- Executable source outranks prose. Manifests, entry points, routes, schemas, migrations, config, deployment, tests, CI, prompts, and evals are primary evidence. Existing docs are corroborating evidence only.
- Make additive knowledge changes. Preserve application code and unrelated existing files. Leave competing AI configurations in place; deleting or relocating one is the owner's call.
- Adoption ONLY records build and test commands: extract each exact
command and label it
discovered, not executed. An inherited suite stays untrusted until proven RED by mutation (docs/graph/protocols/test-first.md), so record it as discovered. - Git stays read-only: record the repository revision as provenance; fetch, pull, switch, commit, and push each need a separate explicit request.
- Record observed behaviour and observed choices as node facts. Specs and ADRs record intent, which only an existing record or the owner supplies. Unknown means unknown.
Scout pass
Establish the governed boundary first: one repo, workspace/monorepo, or an umbrella of sibling repos. For each repository record path, branch, HEAD, worktree state, role, manifests, stack, and the natural language of its identifiers and domain vocabulary. A non-English (or otherwise non-default) language is an explicit graph fact, because downstream agents grep and reason in it and an unrecorded mismatch silently defeats every later search. Boundaries follow capabilities, not repository count.
Inventory cheaply, excluding generated/vendor/cache/build output. Then open the smallest authoritative files needed to trace:
- bootstrap and runtime entry points;
- module/service/package boundaries and imports;
- inbound APIs, messages, scheduled work, and outbound integrations;
- entities, schemas, migrations, storage, and data movement;
- config/secrets interfaces, deployment, and observability;
- tests, CI, scripts, prompts, evaluations, and operational commands;
- direct dependencies and evidence of their actual usage.
Return facts with exact paths and symbols. Find source corroboration for each claim prose makes, or record it as untrusted/unverified; repetition across central docs adds no corroboration.
Every delegated worker's brief embeds the canonical block from
docs/graph/templates/prompts/graph-session-bootstrap.md.
Librarian pass
Normalize the evidence into single fact owners:
- configure
ROOT_IDandKINDSindocs/graph/graph-lint.py; - author a root node and capability/subsystem nodes;
- factor shared stack, platform, data, domain, and cross-cutting facts into their own nodes only where this reduces duplication;
- give nodes concrete
load_whentriggers and source paths; - keep
requiresminimal and acyclic; usepeersfor boundaries, andcomposeswhere anexpertise.*node offers sub-expertises the router should descend into only when the task names one; - link detailed leaves using
artifacts:and dependency wiki pages usinglibraries:.
Then enrich the leaf collections under docs/graph/:
| Collection | Source-grounded content |
|---|---|
product/ | actors, capabilities, flows, observed constraints |
architecture/ | context, components, runtime flows, integrations, sharp edges |
api/ | observed HTTP/RPC/event/job contracts with code locations |
data/ | ownership, schemas, persistence, migrations, lineage |
libraries/ | all direct deps indexed; critical deps richly wikified |
sources/ | provenance for external information actually used |
prompts/ | discovered prompt contracts, versions, and call sites |
evaluations/ | discovered datasets, rubrics, gates, and failure modes |
runbooks/ | exact operational and verification commands, with status |
plans/ | evidence gaps, drift/backfill work, next useful increment |
best-practices/ | conventions demonstrated by this project |
Keep specs/ and decisions/ indexes, and fill them only from genuine