$npx -y skills add managedcode/dotnet-skills --skill workflow-foundationMaintain or assess Workflow Foundation-based solutions on .NET Framework, especially where long-lived process logic or legacy designer artifacts still matter. USE FOR: WF activities and workflows; designer-backed process logic; long-lived workflow state and persistence; keep, iso
| 1 | # Windows Workflow Foundation |
| 2 | |
| 3 | ## Trigger On |
| 4 | |
| 5 | - working on WF activities, workflows, or designer-backed process logic |
| 6 | - reviewing long-lived workflow state and persistence behavior |
| 7 | - assessing whether to keep, isolate, or replace Workflow Foundation |
| 8 | |
| 9 | ## Workflow |
| 10 | |
| 11 | 1. Treat WF as legacy infrastructure and start by understanding what workflow behavior is still business-critical before proposing replacement. |
| 12 | 2. Separate workflow host concerns, activity logic, persistence, and integration points so risk is visible. |
| 13 | 3. Avoid half-migrations that leave workflow state and business rules split across two orchestration systems without ownership. |
| 14 | 4. If replacement is needed, define explicit equivalence for triggers, compensation, persistence, and audit expectations. |
| 15 | 5. Stabilize current behavior with targeted tests or scenario captures before changing designer-driven artifacts. |
| 16 | 6. Validate with representative long-running and failure scenarios, not just a single successful execution path. |
| 17 | |
| 18 | ## Deliver |
| 19 | |
| 20 | - practical maintenance or migration guidance for WF |
| 21 | - clear boundaries around host, workflow, and persistence responsibilities |
| 22 | - risk-aware change plans for legacy process logic |
| 23 | |
| 24 | ## Validate |
| 25 | |
| 26 | - business-critical workflow behavior is identified before change |
| 27 | - migration work preserves state and audit expectations |
| 28 | - designer artifacts are treated carefully |
| 29 | |
| 30 | ## References |
| 31 | |
| 32 | - [Migration Guidance](references/migration.md) - decision framework for keeping, replacing, or isolating WF; migration targets and steps; common pitfalls |
| 33 | - [Maintenance Patterns](references/patterns.md) - host management, persistence, activity design, testing, and operational patterns for WF systems |