agentleFS
joslatjoslat/maf-doctor/.github/skills/maf-migration-retrospective/SKILL.md

maf-migration-retrospective

Skill14 starsChanged 3 months agoMITView on GitHub

Post-migration learning skill. After a migration completes, reads the migration plan notes, build history, and surprises to improve the registry, guide, and constraint rules. Invoked as the final step of any migration. This is how the toolkit gets smarter with each use.

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every migration surfaces surprises — patterns the plan didn't predict, docs that were wrong, APIs that behaved differently than expected.

    line 10
  2. Very specific:

    After 10 migrations, the obsolete-api-registry.yaml covers real-world CS0618 patterns that aren't in any official docs.

    line 12
  3. Distinctive:

    Before closing any migration branch or PR

    line 19
  4. Distinctive:

    When a migration hit a surprise that wasn't in the plan

    line 20
  5. Distinctive:

    If terminal output is available from the migration session:

    line 35
  6. Very specific:

    Add to the Hard Constraints table in .github/instructions/maf-constraints.instructions.md.

    line 98
  7. Very specific:

    If new → add a note in .github/skills/dotnet-inspect/SKILL.md under "Critical Limitation".

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

migration-retrospective

Purpose

Every migration surfaces surprises — patterns the plan didn't predict, docs that were wrong, APIs that behaved differently than expected. This skill captures those surprises systematically and feeds them back into the toolkit's knowledge base.

After 10 migrations, the obsolete-api-registry.yaml covers real-world CS0618 patterns that aren't in any official docs. After 20, the Known Misalignments section becomes the most battle-tested part of the guide. This is the compound effect.


When to Use This Skill

  • Immediately after a migration completes (T11.2 — Done)
  • Before closing any migration branch or PR
  • When a migration hit a surprise that wasn't in the plan

The Retrospective Workflow

Step 1 — Read the completed migration plan

Read src/docs/migration-plan.md — specifically:

  • The Notes column of each task row (where surprises were recorded during execution)
  • Any tasks with % Done: 100% that have non-empty notes
  • The Risk Register section — were any predicted risks wrong or missing?

Step 2 — Read build error history (if available)

If terminal output is available from the migration session:

# Look for unexpected build errors in terminal history
# Focus on: CS0246 errors not predicted by the plan, runtime exceptions, CS0618 not in registry

Key questions:

  • Were there CS0246 errors for types/members NOT in the migration plan?
  • Were there CS0618 warnings NOT in the registry?
  • Were there silent runtime failures detected by smoke tests?

Step 3 — Identify surprises

For each surprise (unexpected error, wrong doc, new pattern):

Surprise typeAction
CS0618 not in registryAdd to registry.yaml
CS0246 for type/member not in planAdd to registry + add to breaking changes table in maf-constraints.instructions.md
Official doc was wrongAdd to Known Misalignments in maf-1.3.0-migration-guide.md
Silent runtime failureAdd to maf-fan-out-validator skill
dotnet-inspect missed somethingNote in dotnet-inspect/SKILL.md limitations section
New hard constraint discoveredAdd to maf-constraints.instructions.md Hard Constraints section

Step 4 — Update registry.yaml

For each new CS0618 or unexpected breaking change:

  - id: MAF130-<AREA>-<NNN>
    package: Microsoft.Agents.AI[.Workflows]
    version_introduced: "1.3.0"
    type: <FullyQualifiedTypeName>
    method: <MethodName>
    obsolete_signature: "<exact signature that triggered CS0618>"
    replacement_signature: "<correct replacement>"
    argument_order_change: <true/false>
    fix_description: "<what to change>"
    example_before: |
      <code that triggered the warning>
    example_after: |
      <corrected code>
    cs_warning: CS0618
    guide_section: "<section>"
    dotnet_inspect_detectable: false
    notes: >
      Discovered during: <migration name / date>.
      Was NOT predicted by migration plan.
      <Any additional context>

Step 5 — Update Known Misalignments

For each official doc that was wrong, add to guides/maf-1.3.0-migration-guide.md → "Known Misalignments" section:

| <What the docs claim> | <What reality is> | <Discovery source: migration name, date> |

Step 6 — Update maf-constraints.instructions.md

For any new hard constraint discovered (e.g., "never use X in production", "always call Y before Z"):

Add to the Hard Constraints table in .github/instructions/maf-constraints.instructions.md.

Format:

- **NEVER** <constraint description> — discovered in <migration name>

Step 7 — Check dotnet-inspect issue queue

For each surprise that dotnet-inspect should have caught but didn't:

  • Was it the known [Obsolete] overload detection gap (issue #316)?
  • Or is it a new gap worth filing separately?

If new → add a note in .github/skills/dotnet-inspect/SKILL.md under "Critical Limitation".

Step 8 — Output the retrospective summary

## Migration Retrospective Summary

**Migration:** <codebase name>
**Date:** <YYYY-MM-DD>
**Source version:** <old MAF version>
**Target version:** <new MAF version>

### Surprises Found

| # | Type | Description | Action taken |
|---|------|-------------|-------------|
| 1 | CS0618 not in registry | `SerializeSession` was obsolete — docs showed sync version | Added MAF130-SESSION-001 to registry |
| 2 | Doc misalignment | `RunAsync<T>()` not on `IAIAgent` interface, only on `ChatClientAgent` | Added to Known Misalignments |
| 3 | Silent runtime | PropertyTheftFanOutExecutor returned non-generic ValueTask | Added to maf-fan-out-validator SKILL.md |

### Registry Updates
- Added N new entries to `registry.yaml`

### Guide Updates
- Added N new Known Misalignments entries

### Constraint Updates
- Added N new Hard Constraints

### For the Next Migration
> Key things to watch out for in the next migration of a similar codebase:
> [list of the most impactful surprises]

The Compound Effect

Over time:

  • Registry: Grows from 1 entry to dozens — covering real-world patterns that official docs miss
  • Known Misalignments: Becomes the most reliable section of the guide — battle-tested across real codebases
  • Constraints: Hard rules that prevent re-discovering the same mistakes
  • Skills: Fan-out validator and static analyzer improve with each failure mode documented

Each migration makes the next one faster and more reliable.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.