dotnet-dotgraph
Manage internal NuGet package version cascades with the dotgraph CLI. Use when a solution has multiple packable projects with ProjectReference + Version tags. Commands init, diff, sync, update, analyze, refresh. Interactive sync/update for human review.
- License 许可
- MIT
- 最近更新
- 2026-10-31
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- dotnet-dotgraph
- description
- Manage internal NuGet package version cascades with the dotgraph CLI. Use when a solution has multiple packable projects with ProjectReference + Version tags. Commands init, diff, sync, update, analyze, refresh. Interactive sync/update for human review.
- disable-model-invocation
- true
02 资源文件 1
- 脚本scripts/dotnet-dotgraph.ps15.8 KB
03 SKILL.md 正文
dotnet-dotgraph
Deterministic wrapper for dotgraph — a .NET global tool that detects and applies version cascade bumps when internal NuGet packages reference each other.
Use when your solution publishes multiple packages to a feed and dependents must bump when
an upstream <Version> changes (NuGet rejects republishing the same version).
When to use
| Situation | Command |
|---|---|
| First time on a multi-package solution | init |
You edited <Version> in one or more .csproj manually |
diff → sync |
| You want dotgraph to bump a package + cascade dependents | update |
| Rescan solution structure after project changes | refresh |
| Preview affected upstream packages | analyze |
Not needed for single-app repos with only external NuGet references.
Prerequisites
- SDK-style
.csprojwith<Version>tags - Internal dependencies via
<ProjectReference>(not onlyPackageReference) - Commit
.dotgraph.jsonat the solution root (created byinit)
Install tool once (script auto-installs global tool if missing):
pwsh .cursor/skills/dotnet-dotgraph/scripts/dotnet-dotgraph.ps1 ensure-tool
Or local manifest:
dotnet new tool-manifest
dotnet tool install --local dotgraph --version 0.3.0
Commands
$DG = '.cursor/skills/dotnet-dotgraph/scripts/dotnet-dotgraph.ps1'
# Bootstrap graph snapshot
pwsh $DG init
# After manual Version edits — show gaps
pwsh $DG diff
# Propose cascade (no writes)
pwsh $DG sync -DryRun
# Apply cascade (prompts Y/n)
pwsh $DG sync
# Human reviews each bump
pwsh $DG sync -Interactive
# Explicit bump + cascade
pwsh $DG update MyLib.Core 2.1.0 -DryRun
pwsh $DG update MyLib.Core 2.1.0 -Interactive
# Multiple packages
pwsh $DG update MyLib.Core 2.0.0 MyLib.Abstractions 1.1.0 -DryRun
# Rescan solution
pwsh $DG refresh
# Dry-run affected set
pwsh $DG analyze MyLib.Core MyLib.Http
Interactive workflow (recommended)
- Developer or human edits
<Version>in.csprojfile(s). - Run
diff— agent shows cascade gaps vs.dotgraph.jsonsnapshot. - Run
sync -DryRun— show proposals without writing. - Human confirms →
syncorsync -Interactive. - Run
dotnet-format+dotnet-unit-tests+build.command. - Commit
.csprojversion changes and.dotgraph.json.
Never run sync without human approval when the pipeline is in a gated phase.
Cascade rules (dotgraph)
| Upstream bump | Dependent proposal |
|---|---|
| MAJOR | MINOR |
| MINOR | PATCH |
| PATCH | PATCH |
Override per package in -Interactive mode.
Outputs
| File | Purpose |
|---|---|
.dotgraph.json |
Graph snapshot — commit to git |
.agents/dotgraph-report.json |
Last command, exit code, paths |
.agents/dotgraph-last-run.log |
Full CLI output (token-saving handoff) |
Cite report + log paths in chat; do not paste full diff output.
Manifest override (optional)
"dotgraph": {
"toolVersion": "0.3.0",
"snapshot": ".dotgraph.json"
}
Checkpoint
pwsh $DG diff 2>&1 | pwsh .cursor/skills/checkpoint/scripts/save-artifact.ps1 `
-Session <session> -ArtifactRel gates/dotgraph-diff.log -Mode --stdin
Constraints
- Requires .NET 8+ (tool targets .NET 10; install via NuGet).
- Only for internal package graphs — not a general
dotnet add packagereplacement. - After
sync/update, always verify build + tests.
04 同仓库更多 Skills
petstore
Call the Swagger Petstore API. A sample API that uses a petstore as an example to demonstrate api2skill.
petstore
Call the Swagger Petstore API. A sample API that uses a petstore as an example to demonstrate api2skill.
petstore
Call the Swagger Petstore API. A sample API that uses a petstore as an example to demonstrate api2skill.
api2skill-creator
Interview the user about an OpenAPI/Swagger API (including multi-spec, base URL, and authorization), assemble exact api2skill CLI commands, guide secrets.json setup, and migrate existing generated skills after api2skill upgrades (update / regenerate / merge). Prefer Plan mode for multi-spec interviews and migrations.
speckit-taskstoissues
Convert existing tasks into actionable, dependency-ordered GitHub issues for the feature based on available design artifacts.
speckit-tasks
Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.