Metadata-Version: 2.4
Name: dotnet-modernize
Version: 0.1.0
Summary: Agentic .NET Framework -> modern .NET upgrade skill, packaged with deterministic CLI helpers (baseline build capture, graphify knowledge-graph wiring, task scaffolding/tracking) and one-command installers for Claude Code, Cursor, Codex, and other agent tools.
Author: Arun S. Kannambadam
License: MIT
Keywords: dotnet,migration,modernization,claude-code,agentic,upgrade,graphify
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Build Tools
Classifier: Environment :: Console
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.0
Provides-Extra: graph
Requires-Dist: graphifyy>=0.1; extra == "graph"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"

# dotnet-modernize

An agentic **.NET Framework → modern .NET** upgrade workflow (assessment →
plan → build-validated execution, in the style of Visual Studio Copilot's
"Modernize" agent), packaged for pip with:

- **One-command install** of the skill (`SKILL.md` + `references/`) into
  Claude Code's skill directory (or any other agent tool via `--dest`).
- **Deterministic CLI helpers** for the parts of the workflow that don't need
  an LLM: scenario scaffolding, baseline build capture, wiring up the
  [graphify](https://github.com/Graphify-Labs/graphify) knowledge graph, and
  tracking `tasks.md` completion.

The reasoning-heavy stages — reading the codebase, deciding the upgrade
strategy, diagnosing build errors — are **not** reimplemented in Python.
That's what the bundled skill is for: point an agent (Claude Code, or any
tool that can read a `SKILL.md`) at your solution and let it run the
workflow, using this CLI underneath for the mechanical bits.

## Install

```bash
pip install dotnet-modernize
# or: pipx install dotnet-modernize / uv tool install dotnet-modernize
```

## Quickstart

```bash
cd path/to/your/solution

# 1. Put the skill where your agent will find it
dotnet-modernize install                 # -> .claude/skills/dotnet-modernize/

# 2. Scaffold an upgrade scenario
dotnet-modernize init dotnet-version-upgrade --target-tfm net10.0

# 3. Capture the pre-upgrade baseline (never edits code)
dotnet-modernize baseline dotnet-version-upgrade

# 4. Build the knowledge graph the agent will query during assessment/execution
dotnet-modernize graph --auto-install

# 5. Hand off to your agent:
#    "Upgrade this solution to net10.0 using scenario dotnet-version-upgrade,
#     following the dotnet-modernize skill."

# 6. Check progress any time (reads tasks.md, no agent needed)
dotnet-modernize status dotnet-version-upgrade
```

## Commands

| Command | What it does |
|---|---|
| `install [--target claude-project\|claude-user\|generic] [--dest PATH] [--force]` | Copies the bundled skill folder into an agent's skill directory. |
| `uninstall` | Removes a previously installed copy. |
| `init SCENARIO_ID [--target-tfm] [--scope] [--solution-name]` | Creates `.github/upgrades/<id>/` with `scenario-instructions.md` and `tasks.md` skeletons. |
| `list` | Lists existing scenarios. |
| `archive SCENARIO_ID` | Renames a scenario folder with a timestamp so a new run can start clean without losing history. |
| `baseline SCENARIO_ID [--solution PATH] [--no-tests]` | Runs `dotnet restore/build/test` as-is and writes `baseline-log.txt`. Read-only w.r.t. source. |
| `graph [--path] [--auto-install]` | Runs `graphify extract` at the solution root; prints the report path. |
| `query "<question>" [--path]` | Queries an existing graph without an agent in the loop. |
| `update-graph [--path]` | Incrementally refreshes the graph after a committed task. |
| `status SCENARIO_ID` | Parses `tasks.md` checkboxes and shows completion %. |
| `doctor` | Checks for `dotnet`, `git`, `graphify`, and whether the skill/scenarios exist. |

## Why a hybrid (skill + CLI) instead of pure Python?

Upgrading a real solution requires judgment a script can't safely automate:
classifying a WCF server as a rewrite, deciding bottom-up vs top-down order,
root-causing a build error to the *correct* breaking-change entry instead of
pattern-spraying fixes. That's delegated to an LLM agent reading the skill.
Everything **around** that judgment — is git clean, does it build today, is
the graph fresh, how many tasks are left — is exactly the kind of thing that
should be a boring, deterministic, testable CLI command instead of something
re-derived by the agent every session. This package draws that line
explicitly instead of blurring it.

## What's bundled

```
src/dotnet_modernize/skill_data/
├── SKILL.md
└── references/
    ├── artifact-templates.md
    ├── breaking-changes-catalog.md
    ├── project-type-playbooks.md
    ├── knowledge-graph.md
    ├── frontend-and-static-assets.md
    └── graphify/            # graphify's own canonical agent workflow, embedded
        ├── PIPELINE.md
        ├── query.md
        ├── update.md
        ├── extraction-spec.md
        ├── hooks.md
        ├── github-and-merge.md
        └── transcribe.md
```

## License

MIT
