Project Graph Auto Edge
Purpose
Turn Project Graph candidates into evidence-backed edge proposals for human review. This skill may write proposals.md and mark candidates as proposed, but it must not write confirmed edges or cross-ref pins.
Use it when the user asks the agent to resolve a candidate through Base Graph, find the corresponding project/class/method/interface, or automatically prepare an edge while keeping human confirmation in the loop.
Initialization Gate
Run after resolving the current project root and before reading a candidate or writing proposal state.
wiki_required: true
on_missing_wiki: route project-init
direct_invocation_missing_wiki: dispatch-project-init
- When directly invoked and no parent router is active, treat the bootstrap handoff as an internal routing message, not a terminal user-facing response.
- Unless an explicit no-write constraint or root-confidence check requires confirmation, continue through
project-init in the same turn, consume its return handoff, and resume only at a supported next gate.
pending_primary_stage: project-graph-auto-edge
- Preserve the user's requested candidate or relationship as
pending_intent.
- If
<project_root>/.llm-wiki/ is absent, stop and return a Context Handoff to project-init; resume only after the router receives initialization readiness and a supported next gate.
- Do not create a partial
.llm-wiki/, proposal, candidate update, scan report, or log inside this child as a substitute for initialization.
On the missing-wiki branch, emit this minimal handoff:
bootstrap_handoff:
project_root: <resolved project root>
pending_intent: <preserved candidate or relationship request>
pending_primary_stage: project-graph-auto-edge
requested_stage_or_bridge: project-init
bootstrap_mode: automatic-minimal
current_gate: Initialization Gate
Required Reads
Read only as much as needed for the target candidate or request:
../references/project-graph.md
../references/cross-project-refs.md
../references/base-graph.md, when Base Graph resolution is needed
.llm-wiki/project-graph/candidates.md
.llm-wiki/project-graph/proposals.md, when present
.llm-wiki/project-graph/edges.md, to avoid duplicate fingerprints and choose the next proposed edge id
.llm-wiki/cross-refs/index.md, to avoid proposed pin id collisions
- Base Graph locator and catalog when a candidate references a remote project or
remote_project=unknown
- local source/config/wiki anchors needed to verify caller, topic, endpoint, or config evidence
- remote source/config/wiki anchors read-only when Base Graph resolves a canonical project
Allowed Writes
Current project only:
.llm-wiki/project-graph/proposals.md
.llm-wiki/project-graph/candidates.md, only for pending -> proposed status updates and proposal notes allowed by project-graph.md
.llm-wiki/project-graph/scan-report.md, only to add a proposal summary when the file already exists and the update helps auditability
.llm-wiki/log.md
Forbidden Writes
.llm-wiki/project-graph/edges.md
.llm-wiki/cross-refs/index.md
- remote project wiki, source, config, Briefs, registry, or graph files
- Base Graph tracked files
If a proposal looks ready to confirm, stop and tell the user to run project-graph-human-edge to accept it.
Process
- Resolve the current project root and run the Initialization Gate.
- Resolve the target candidate by id, fingerprint, or user-described signal.
- Read the Project Graph contract and existing candidates/proposals/edges.
- If the candidate has
remote_project=unknown or a non-canonical hint, resolve a canonical project id through Base Graph when available.
- Verify local evidence from repo-relative files, classes, methods, endpoints, topics, config keys, or wiki anchors.
- Verify remote evidence read-only when a remote project is resolved. Use exact anchors when possible; do not scan whole remote repositories by default.
- Classify proposal
verification_status:
source-verified: local and remote source/endpoint/topic evidence both match in this session.
runtime-verified: runtime/log evidence proves the relation in addition to source evidence.
unverified: evidence is incomplete or wiki-only.
- Generate a stable
fingerprint using the confirmed direction from project-graph.md.
- Select the next
proposal_id and a proposed_edge_id. The proposed edge id is not a confirmed reservation; project-graph-human-edge must re-check collisions before writing.
- Fill proposed cross-ref fields:
proposed_cross_ref_id, proposed_local_entry, and proposed_why_pinned.
- Write or update one
proposals.md row with human_status=pending unless the user explicitly asks to flag it as needs-more-evidence.
- Move the linked candidate from
pending to proposed; keep edge_id empty.
- Append a concise log entry with proposal id, candidate id, canonical project id, verification status, and evidence summary.
Proposal Rules
- Proposal
source is origin metadata: scan for scanner-origin candidates, manual for user-supplied candidate material.
- Proposal
source must not be copied to edges.source.
- Accepted auto-edge proposals become confirmed edges with
source=auto only when project-graph-human-edge accepts them.
- Proposal
verification_status is proposed evidence metadata, not a confirmed fact.
- Do not invent anchors. If either side cannot be resolved, write an unverified proposal only when it is still useful for human review; otherwise mark the candidate
blocked only if the Project Graph contract allows it and the reason is clear.
Output
Report:
proposal_id
source_candidate_id
- canonical
from_project -> to_project
- local evidence read
- remote evidence read or reason it stayed unresolved
verification_status
- proposed cross-ref fields
- files changed
- next command, usually
project-graph-human-edge accept <proposal_id> or a request for missing evidence
Mini example:
cand-20260623-009 -> prop-20260623-001
proposed_edge_id=edge-20260623-001
human_status=pending
candidate.status=proposed
edges.md unchanged
cross-refs/index.md unchanged
1---2name: project-graph-auto-edge3description: Use when turning Project Graph candidates into source-backed edge proposals through Base Graph lookup and local/remote read-only verification, including Chinese prompts like 自动生成 edge proposal, 自动登记边候选, auto-edge, or 通过 base-graph 找项目类方法但先给人确认.4---56# Project Graph Auto Edge78## Purpose910Turn Project Graph candidates into evidence-backed edge proposals for human review. This skill may write `proposals.md` and mark candidates as `proposed`, but it must not write confirmed edges or cross-ref pins.1112Use it when the user asks the agent to resolve a candidate through Base Graph, find the corresponding project/class/method/interface, or automatically prepare an edge while keeping human confirmation in the loop.1314## Initialization Gate1516Run after resolving the current project root and before reading a candidate or writing proposal state.1718- `wiki_required: true`19- `on_missing_wiki: route project-init`20- `direct_invocation_missing_wiki: dispatch-project-init`21- When directly invoked and no parent router is active, treat the bootstrap handoff as an internal routing message, not a terminal user-facing response.22- Unless an explicit no-write constraint or root-confidence check requires confirmation, continue through `project-init` in the same turn, consume its return handoff, and resume only at a supported next gate.23- `pending_primary_stage: project-graph-auto-edge`24- Preserve the user's requested candidate or relationship as `pending_intent`.25- If `<project_root>/.llm-wiki/` is absent, stop and return a Context Handoff to `project-init`; resume only after the router receives initialization readiness and a supported next gate.26- Do not create a partial `.llm-wiki/`, proposal, candidate update, scan report, or log inside this child as a substitute for initialization.2728On the missing-wiki branch, emit this minimal handoff:2930```text31bootstrap_handoff:32 project_root: <resolved project root>33 pending_intent: <preserved candidate or relationship request>34 pending_primary_stage: project-graph-auto-edge35 requested_stage_or_bridge: project-init36 bootstrap_mode: automatic-minimal37 current_gate: Initialization Gate38```3940## Required Reads4142Read only as much as needed for the target candidate or request:4344- `../references/project-graph.md`45- `../references/cross-project-refs.md`46- `../references/base-graph.md`, when Base Graph resolution is needed47- `.llm-wiki/project-graph/candidates.md`48- `.llm-wiki/project-graph/proposals.md`, when present49- `.llm-wiki/project-graph/edges.md`, to avoid duplicate fingerprints and choose the next proposed edge id50- `.llm-wiki/cross-refs/index.md`, to avoid proposed pin id collisions51- Base Graph locator and catalog when a candidate references a remote project or `remote_project=unknown`52- local source/config/wiki anchors needed to verify caller, topic, endpoint, or config evidence53- remote source/config/wiki anchors read-only when Base Graph resolves a canonical project5455## Allowed Writes5657Current project only:5859- `.llm-wiki/project-graph/proposals.md`60- `.llm-wiki/project-graph/candidates.md`, only for `pending -> proposed` status updates and proposal notes allowed by `project-graph.md`61- `.llm-wiki/project-graph/scan-report.md`, only to add a proposal summary when the file already exists and the update helps auditability62- `.llm-wiki/log.md`6364## Forbidden Writes6566- `.llm-wiki/project-graph/edges.md`67- `.llm-wiki/cross-refs/index.md`68- remote project wiki, source, config, Briefs, registry, or graph files69- Base Graph tracked files7071If a proposal looks ready to confirm, stop and tell the user to run `project-graph-human-edge` to accept it.7273## Process74751. Resolve the current project root and run the Initialization Gate.762. Resolve the target candidate by id, fingerprint, or user-described signal.773. Read the Project Graph contract and existing candidates/proposals/edges.784. If the candidate has `remote_project=unknown` or a non-canonical hint, resolve a canonical project id through Base Graph when available.795. Verify local evidence from repo-relative files, classes, methods, endpoints, topics, config keys, or wiki anchors.806. Verify remote evidence read-only when a remote project is resolved. Use exact anchors when possible; do not scan whole remote repositories by default.817. Classify proposal `verification_status`:82 - `source-verified`: local and remote source/endpoint/topic evidence both match in this session.83 - `runtime-verified`: runtime/log evidence proves the relation in addition to source evidence.84 - `unverified`: evidence is incomplete or wiki-only.858. Generate a stable `fingerprint` using the confirmed direction from `project-graph.md`.869. Select the next `proposal_id` and a `proposed_edge_id`. The proposed edge id is not a confirmed reservation; `project-graph-human-edge` must re-check collisions before writing.8710. Fill proposed cross-ref fields: `proposed_cross_ref_id`, `proposed_local_entry`, and `proposed_why_pinned`.8811. Write or update one `proposals.md` row with `human_status=pending` unless the user explicitly asks to flag it as `needs-more-evidence`.8912. Move the linked candidate from `pending` to `proposed`; keep `edge_id` empty.9013. Append a concise log entry with proposal id, candidate id, canonical project id, verification status, and evidence summary.9192## Proposal Rules9394- Proposal `source` is origin metadata: `scan` for scanner-origin candidates, `manual` for user-supplied candidate material.95- Proposal `source` must not be copied to `edges.source`.96- Accepted auto-edge proposals become confirmed edges with `source=auto` only when `project-graph-human-edge` accepts them.97- Proposal `verification_status` is proposed evidence metadata, not a confirmed fact.98- Do not invent anchors. If either side cannot be resolved, write an unverified proposal only when it is still useful for human review; otherwise mark the candidate `blocked` only if the Project Graph contract allows it and the reason is clear.99100## Output101102Report:103104- `proposal_id`105- `source_candidate_id`106- canonical `from_project -> to_project`107- local evidence read108- remote evidence read or reason it stayed unresolved109- `verification_status`110- proposed cross-ref fields111- files changed112- next command, usually `project-graph-human-edge accept <proposal_id>` or a request for missing evidence113114Mini example:115116```text117cand-20260623-009 -> prop-20260623-001118proposed_edge_id=edge-20260623-001119human_status=pending120candidate.status=proposed121edges.md unchanged122cross-refs/index.md unchanged123```