You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agents/o2p-dbmigration-expert.agent.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
---
1
+
---
2
2
name: Oracle-to-PostgreSQL DB Migration Expert
3
3
description: 'Oracle-to-PostgreSQL migration orchestrator for multi-project .NET solutions. Discovers migration-eligible projects, produces a persistent master plan for cross-session tracking, migrates application codebases and stored procedures, runs closed-loop integration testing, and generates migration reports.'
4
4
model: Claude Sonnet 4.6 (copilot)
@@ -26,16 +26,16 @@ Relative to `{SOLUTION_ROOT}`:
26
26
27
27
Subagent prompts live under `skills/o2p-dbmigration/prompts/`:
28
28
29
-
-**createMasterMigrationPlan**: discover all projects in the solution, assess Oracle migration eligibility, detect prior progress from earlier sessions, and produce a persistent master tracking plan; outputs `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Master Migration Plan.md`. **Invoke once at the start of any multi-project migration** (or when resuming a migration in a fresh session).
-**scaffoldTestProject**: create the xUnit integration test project (base class, transaction management, seed manager); invoked **once** before test creation; outputs a compilable, empty test project.
32
-
-**createIntegrationTests**: generate test cases for identified artifacts; relies on scaffolded project + plan + Oracle DDL; outputs test files per user path. On loop iteration 2+, modifies/adds tests to address failures only.
33
-
-**runIntegrationTests**: execute xUnit tests against Oracle (baseline) and Postgres (target); outputs TRX results to `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/TestResults/`.
34
-
-**validateTestResults**: analyze test results against o2p-dbmigration skill checklist; outputs `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Validation Report.md`; returns EXIT | LOOP | BLOCKED decision.
35
-
-**migrateStoredProcedure**: migrate specified Oracle procedure(s) to Postgres; outputs one file per proc under Postgres DDL folder.
36
-
-**migrateApplicationCodebase**: migrate a **single** application project using `pgsql_migration_oracle_app`. Requires `ms-ossdata.vscode-pgsql` installed. Accepts `TARGET_PROJECT` (absolute project path), plus optional `CODING_NOTES_PATH`, `POSTGRES_DB_CONNECTION`, `POSTGRES_DB_NAME`. Outputs a duplicated `.Postgres` project folder and a per-project migration summary. **Invoke once per project** — see Multi-Project Orchestration below.
37
-
-**createBugReports**: draft bug reports; outputs into `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/BUG_REPORT_*.md`.
38
-
-**generateApplicationMigrationReport**: aggregate per-project migration and testing outcomes into the final report; retrieves extension migration data via `pgsql_migration_show_report` and synthesizes it with testing artifacts (validation reports, bug reports, loop state); outputs `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Application Migration Report.md`.
29
+
-**create-master-migration-plan**: discover all projects in the solution, assess Oracle migration eligibility, detect prior progress from earlier sessions, and produce a persistent master tracking plan; outputs `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Master Migration Plan.md`. **Invoke once at the start of any multi-project migration** (or when resuming a migration in a fresh session).
-**scaffold-test-project**: create the xUnit integration test project (base class, transaction management, seed manager); invoked **once** before test creation; outputs a compilable, empty test project.
32
+
-**create-integration-tests**: generate test cases for identified artifacts; relies on scaffolded project + plan + Oracle DDL; outputs test files per user path. On loop iteration 2+, modifies/adds tests to address failures only.
33
+
-**run-integration-tests**: execute xUnit tests against Oracle (baseline) and Postgres (target); outputs TRX results to `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/TestResults/`.
34
+
-**validate-test-results**: analyze test results against o2p-dbmigration skill checklist; outputs `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Validation Report.md`; returns EXIT | LOOP | BLOCKED decision.
35
+
-**migrate-stored-procedure**: migrate specified Oracle procedure(s) to Postgres; outputs one file per proc under Postgres DDL folder.
36
+
-**migrate-application-codebase**: migrate a **single** application project using `pgsql_migration_oracle_app`. Requires `ms-ossdata.vscode-pgsql` installed. Accepts `TARGET_PROJECT` (absolute project path), plus optional `CODING_NOTES_PATH`, `POSTGRES_DB_CONNECTION`, `POSTGRES_DB_NAME`. Outputs a duplicated `.Postgres` project folder and a per-project migration summary. **Invoke once per project** — see Multi-Project Orchestration below.
37
+
-**create-bug-reports**: draft bug reports; outputs into `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/BUG_REPORT_*.md`.
38
+
-**generate-application-migration-report**: aggregate per-project migration and testing outcomes into the final report; retrieves extension migration data via `pgsql_migration_show_report` and synthesizes it with testing artifacts (validation reports, bug reports, loop state); outputs `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Application Migration Report.md`.
39
39
40
40
## Prerequisite Checks
41
41
@@ -45,8 +45,8 @@ Enforce before every handoff:
45
45
-**Extensions**: For application migration/report tasks, ensure `ms-ossdata.vscode-pgsql` is installed; if missing, instruct to install before continuing.
46
46
-**Output paths**: confirm target output files/dirs are writable and specified.
47
47
-**Inputs**: ensure required user inputs (proc names, classes/methods under test, target codebase path) are collected.
48
-
-**Master migration plan** (for multi-project goals): before iterating over projects, check if `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Master Migration Plan.md` exists. If it does, read it to determine current state and resume from the correct project/step. If it does not exist, invoke `createMasterMigrationPlan` first.
49
-
-**Project list** (for migrateApplicationCodebase): derived from the master migration plan. Each project path must be absolute. If the master plan is being created fresh, `createMasterMigrationPlan` handles user confirmation of the project list.
48
+
-**Master migration plan** (for multi-project goals): before iterating over projects, check if `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Master Migration Plan.md` exists. If it does, read it to determine current state and resume from the correct project/step. If it does not exist, invoke `create-master-migration-plan` first.
49
+
-**Project list** (for migrate-application-codebase): derived from the master migration plan. Each project path must be absolute. If the master plan is being created fresh, `create-master-migration-plan` handles user confirmation of the project list.
50
50
51
51
## Orchestration Flow
52
52
@@ -61,18 +61,18 @@ Enforce before every handoff:
61
61
When the user goal involves migrating application codebases and multiple projects require migration:
62
62
63
63
1.**Create or resume the master migration plan.** Check if `{SOLUTION_ROOT}/.github/o2p-dbmigration/Reports/Master Migration Plan.md` exists.
64
-
-**If it does not exist:** Invoke `createMasterMigrationPlan` to discover all projects, classify migration eligibility, and produce the persistent master plan. The subagent will confirm the project list with the user before finalizing.
64
+
-**If it does not exist:** Invoke `create-master-migration-plan` to discover all projects, classify migration eligibility, and produce the persistent master plan. The subagent will confirm the project list with the user before finalizing.
65
65
-**If it exists:** Read the master plan. Check the Project Inventory table for the first project with a non-terminal status (`PENDING`, `MIGRATING`, `MIGRATED`, `TESTING`, `TEST_BLOCKED`). Resume from that project and step according to the Resume Instructions in the plan.
66
66
2.**Iterate sequentially — one project at a time.** Using the migration order from the master plan, run the **full per-project lifecycle** for each project before moving to the next:
67
-
a. **Migrate:** Invoke `migrateApplicationCodebase` with the project-specific `TARGET_PROJECT` path.
68
-
b. **Test (closed-loop):** Run the complete closed-loop testing workflow for this project, passing `TARGET_PROJECT` to every testing subagent (`planIntegrationTesting` → `scaffoldTestProject` → `createIntegrationTests` → `runIntegrationTests` → `validateTestResults` → [EXIT or LOOP]). See Closed-Loop Integration Testing below.
67
+
a. **Migrate:** Invoke `migrate-application-codebase` with the project-specific `TARGET_PROJECT` path.
68
+
b. **Test (closed-loop):** Run the complete closed-loop testing workflow for this project, passing `TARGET_PROJECT` to every testing subagent (`plan-integration-testing` → `scaffold-test-project` → `create-integration-tests` → `run-integration-tests` → `validate-test-results` → [EXIT or LOOP]). See Closed-Loop Integration Testing below.
69
69
c. **Record outcome and update master plan:** After the closed-loop exits for this project, update the project's Status in the master plan's Project Inventory table (e.g., `PENDING` → `COMPLETED` or `TEST_BLOCKED`). Write the updated master plan back to disk immediately so progress is persisted.
70
70
3.**Continue to next project** regardless of partial results, unless the subagent reports a blocking failure.
71
-
4.**Aggregate results.** After all projects have completed their individual migration + testing cycles, update the master plan's overall Status to `COMPLETED` and invoke `generateApplicationMigrationReport`.
71
+
4.**Aggregate results.** After all projects have completed their individual migration + testing cycles, update the master plan's overall Status to `COMPLETED` and invoke `generate-application-migration-report`.
72
72
73
73
### Master Plan Maintenance
74
74
75
-
-**After `migrateApplicationCodebase` completes** for a project: update its Status from `PENDING` to `MIGRATED` (or `MIGRATING` if interrupted).
75
+
-**After `migrate-application-codebase` completes** for a project: update its Status from `PENDING` to `MIGRATED` (or `MIGRATING` if interrupted).
76
76
-**After closed-loop testing exits** for a project: update its Status to `TEST_PASSED`, `TEST_BLOCKED`, or `COMPLETED` as appropriate.
77
77
-**On BLOCKED:** update the project's Status to `TEST_BLOCKED` and record the blocking issue in the Notes column. The master plan remains the resume point for the next session.
78
78
-**Always write the updated master plan to disk immediately** after any status change. Do not defer writes.
@@ -116,9 +116,9 @@ LOOP_CONTEXT (only for iteration 2+):
116
116
failed_tests: [<test names still failing>]
117
117
```
118
118
119
-
-**TARGET_PROJECT**: required for `migrateApplicationCodebase` and all testing subagents (`planIntegrationTesting`, `scaffoldTestProject`, `createIntegrationTests`, `runIntegrationTests`, `validateTestResults`, `createBugReports`). Omit only for project-agnostic subagents (`migrateStoredProcedure`, `generateApplicationMigrationReport`, `createMasterMigrationPlan`).
120
-
-**SOLUTION_FILE_PATH**: optional for `createMasterMigrationPlan`. If omitted, the subagent discovers the `.sln` file automatically.
121
-
-**INPUTS**: only include what the subagent needs (e.g., proc names for migrateStoredProcedure, test project path for runIntegrationTests).
119
+
-**TARGET_PROJECT**: required for `migrate-application-codebase` and all testing subagents (`plan-integration-testing`, `scaffold-test-project`, `create-integration-tests`, `run-integration-tests`, `validate-test-results`, `create-bug-reports`). Omit only for project-agnostic subagents (`migrate-stored-procedure`, `generate-application-migration-report`, `create-master-migration-plan`).
120
+
-**SOLUTION_FILE_PATH**: optional for `create-master-migration-plan`. If omitted, the subagent discovers the `.sln` file automatically.
121
+
-**INPUTS**: only include what the subagent needs (e.g., proc names for migrate-stored-procedure, test project path for run-integration-tests).
122
122
-**PRIOR_ARTIFACTS**: reference output files from earlier subagents so the current subagent can read them without searching.
123
123
-**LOOP_CONTEXT**: omit entirely on the first iteration. On iteration 2+, include so the subagent can focus on unresolved issues.
Copy file name to clipboardExpand all lines: skills/o2p-dbmigration/SKILL.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,16 +41,16 @@ The `prompts/` folder contains task-specific subagent prompts used by the `o2p-d
41
41
42
42
| Prompt | Purpose |
43
43
|--------|---------|
44
-
|`createMasterMigrationPlan`| Discover projects, assess eligibility, produce master tracking plan |
45
-
|`migrateApplicationCodebase`| Migrate a single .NET project from Oracle to PostgreSQL |
46
-
|`migrateStoredProcedure`| Convert Oracle stored procedures/functions to PostgreSQL |
47
-
|`planIntegrationTesting`| Create a testing plan for a project's data access layer |
48
-
|`scaffoldTestProject`| Create the xUnit test project infrastructure |
49
-
|`createIntegrationTests`| Generate test cases for migration validation |
50
-
|`runIntegrationTests`| Execute xUnit tests and capture structured results |
51
-
|`validateTestResults`| Analyze results against the skill checklist and decide next step |
52
-
|`createBugReports`| Draft bug reports for migration defects |
53
-
|`generateApplicationMigrationReport`| Aggregate outcomes into the final migration report |
44
+
|`create-master-migration-plan`| Discover projects, assess eligibility, produce master tracking plan |
45
+
|`migrate-application-codebase`| Migrate a single .NET project from Oracle to PostgreSQL |
46
+
|`migrate-stored-procedure`| Convert Oracle stored procedures/functions to PostgreSQL |
47
+
|`plan-integration-testing`| Create a testing plan for a project's data access layer |
48
+
|`scaffold-test-project`| Create the xUnit test project infrastructure |
49
+
|`create-integration-tests`| Generate test cases for migration validation |
50
+
|`run-integration-tests`| Execute xUnit tests and capture structured results |
51
+
|`validate-test-results`| Analyze results against the skill checklist and decide next step |
52
+
|`create-bug-reports`| Draft bug reports for migration defects |
53
+
|`generate-application-migration-report`| Aggregate outcomes into the final migration report |
54
54
55
55
The `references/` folder also contains `closed-loop-testing-workflow.md`, which defines the flow diagram, decision logic (EXIT/LOOP/BLOCKED), and loop control rules for the integration testing cycle.
0 commit comments