بنقرة واحدة
gpd-graph
Visualize dependency graph across phases and identify gaps
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Visualize dependency graph across phases and identify gaps
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Add research phase to end of current milestone in roadmap
Capture idea or task as todo from current research conversation context
Prepare a paper for arXiv submission with validation and packaging
Audit research milestone completion against original research goals
Create a hypothesis branch for parallel investigation of an alternative approach
List pending research todos and select one to work on
| name | gpd-graph |
| description | Visualize dependency graph across phases and identify gaps |
| argument-hint | |
| context_mode | project-required |
| allowed-tools | ["read_file","shell","grep","glob"] |
<codex_runtime_notes> Codex shell compatibility:
gpd on PATH.GPD_ACTIVE_RUNTIME=codex uv run gpd ....
</codex_runtime_notes>Use this for:
<execution_context>
Build and visualize the dependency graph across all research phases. Shows how results flow between phases via provides/requires/affects frontmatter in SUMMARY.md files and phase definitions in ROADMAP.md. Identifies gaps where a phase requires something no other phase provides, and highlights the critical path through the research.<required_reading> Read all files referenced by the invoking prompt's execution_context before starting. </required_reading>
**Load roadmap and phase inventory:**ROADMAP=$(/Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local roadmap analyze)
Extract: phase list with names, goals, dependencies, and disk status.
If no roadmap found:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
No ROADMAP.md found. Create a project first:
$gpd-new-project
Exit.
If fewer than 2 phases:
Only {N} phase found -- dependency graph requires at least 2 phases.
Exit.
**Read all SUMMARY.md frontmatter for dependency metadata:**For each phase directory, find all SUMMARY.md files:
ls .gpd/phases/*/SUMMARY.md .gpd/phases/*/*-SUMMARY.md 2>/dev/null
For each SUMMARY.md, extract YAML frontmatter fields:
effective-hamiltonian, dispersion-relation, transport-coefficients)band-structure, coupling-constants)metric-signature, normalization-convention)Also extract dependency information from ROADMAP.md phase definitions (the Dependencies: field for each phase).
Nodes: One per phase (labeled P{N}: {short-name})
Edges (three types):
Deduplicate edges: if both ROADMAP dependency and provides/requires create the same edge, keep one solid arrow.
For each edge, record the label (what flows: result name, convention, etc.).
**Generate Mermaid flowchart:**graph TD
classDef complete fill:#e8f5e9,stroke:#4caf50
classDef partial fill:#fff3e0,stroke:#ff9800
classDef planned fill:#e3f2fd,stroke:#2196f3
classDef empty fill:#fafafa,stroke:#bbb
P1["Phase 1: {name}"]:::complete
P2["Phase 2: {name}"]:::partial
P3["Phase 3: {name}"]:::planned
P1 -->|"{result-name}"| P2
P1 -.->|"{convention}"| P3
P2 -->|"{result-name}"| P3
Node styling by status:
complete -- green: all plans have SUMMARYspartial -- orange: some plans completeplanned -- blue: plans exist but none executedempty -- grey: no plans created yetEdge styling:
-->) for result dependencies (provides/requires)-.->) for convention affectsA gap exists when:
For each gap found, categorize:
| Gap Type | Severity | Description |
|---|---|---|
| Unmet requires | High | Phase {N} requires "{X}" but nothing provides it |
| Orphaned provides | Low | Phase {N} provides "{X}" but nothing uses it |
| Missing phase | High | Phase {N} depends on Phase {M} which doesn't exist |
| Circular | Critical | Phases {N} and {M} have circular dependency |
The critical path is the longest chain of sequential dependencies through the graph. Phases on the critical path cannot be parallelized and determine the minimum research timeline.
## Critical Path
P{A} -> P{B} -> P{C} -> P{D}
{N} phases on critical path out of {M} total.
Parallelizable phases: {list of phases NOT on critical path}
**Assemble and display the graph report:**
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GPD > DEPENDENCY GRAPH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## Phase Overview
| Phase | Name | Status | Provides | Requires |
|-------|------|--------|----------|----------|
{rows for each phase}
## Dependency Graph
```mermaid
{mermaid diagram from step 4}
{Copy the mermaid code block above for rendering in any Mermaid-compatible viewer.}
{If no gaps:} ✓ No dependency gaps found. All requires are satisfied.
{If gaps found:} ⚠ {N} dependency gap(s) found:
| # | Gap Type | Severity | Description |
|---|
{gap rows}
{critical path from step 6}
</step>
<step name="offer_write">
**Offer to persist the graph:**
───────────────────────────────────────────────────────────────
Write this analysis to .gpd/DEPENDENCY-GRAPH.md? (y/n)
───────────────────────────────────────────────────────────────
**If yes:**
Write the full report to `.gpd/DEPENDENCY-GRAPH.md`.
```bash
PRE_CHECK=$(/Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local pre-commit-check --files .gpd/DEPENDENCY-GRAPH.md 2>&1) || true
echo "$PRE_CHECK"
/Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local commit "docs: generate dependency graph" --files .gpd/DEPENDENCY-GRAPH.md
After write (or if declined):
───────────────────────────────────────────────────────────────
**Also available:**
- `$gpd-show-phase <N>` -- inspect a specific phase in detail
- `$gpd-plan-phase <N>` -- plan an unstarted phase
- `$gpd-progress` -- overall research progress
───────────────────────────────────────────────────────────────
<anti_patterns>
<success_criteria> Dependency graph is complete when:
</success_criteria>
</execution_context>
@.gpd/ROADMAP.md Execute the graph workflow from @./.codex/get-physics-done/workflows/graph.md end-to-end.Scan all phase directories for SUMMARY.md files. Extract provides, requires, and affects from frontmatter.
Construct a directed graph: edges from providers to consumers.
Build the graph directly from ROADMAP.md plus SUMMARY frontmatter, then present it in the format that best fits the user's request:
Run cycle detection and gap analysis from the graph you assembled manually.
Report: cycles found, unsatisfied requirements, missing plan dependencies, wave ordering gaps.
Display the graph, gap analysis, and critical path. Highlight any cycles or unsatisfied requirements.
Offer to write the graph and analysis to .gpd/DEPENDENCY-GRAPH.md.
<success_criteria>