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
- Distinctive: line 10
Every migration surfaces surprises — patterns the plan didn't predict, docs that were wrong, APIs that behaved differently than expected.
- Very specific: line 12
After 10 migrations, the obsolete-api-registry.yaml covers real-world CS0618 patterns that aren't in any official docs.
- Distinctive: line 19
Before closing any migration branch or PR
- Distinctive: line 20
When a migration hit a surprise that wasn't in the plan
- Distinctive: line 35
If terminal output is available from the migration session:
- Very specific: line 98
Add to the Hard Constraints table in .github/instructions/maf-constraints.instructions.md.
- Very specific: line 111
If new → add a note in .github/skills/dotnet-inspect/SKILL.md under "Critical Limitation".
≈ “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.
Files
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 registryKey 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 type | Action |
| CS0618 not in registry | Add to registry.yaml |
| CS0246 for type/member not in plan | Add to registry + add to breaking changes table in maf-constraints.instructions.md |
| Official doc was wrong | Add to Known Misalignments in maf-1.3.0-migration-guide.md |
| Silent runtime failure | Add to maf-fan-out-validator skill |
dotnet-inspect missed something | Note in dotnet-inspect/SKILL.md limitations section |
| New hard constraint discovered | Add 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.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- cs0618-hunterSkill
- dotnet-inspectSkill
- maf-anti-pattern-scannerSkill
- maf-doctor-self-evolutionSkill
- maf-fan-out-validatorSkill
- maf-from-semantic-kernelSkill
- maf-issue-reporterSkill
- maf-migration-guideSkill
- maf-migration-plan-creatorSkill
- maf-obsolete-api-registrySkill
- maf-release-watcherSkill
- maf-remediation-playbookSkill
- maf-workflow-smoke-testerSkill
- nuget-diff-analyzerSkill
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
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.

