Skip to content

feat: add coreex-db-migration skill#152

Merged
chullybun merged 4 commits into
mainfrom
skills/coreex-db-migration
Jun 29, 2026
Merged

feat: add coreex-db-migration skill#152
chullybun merged 4 commits into
mainfrom
skills/coreex-db-migration

Conversation

@chullybun

Copy link
Copy Markdown
Collaborator

Closes #151 (partial — first skill in the inventory)

Summary

Adds the coreex-db-migration skill — the first atomic L1 skill in the CoreEx skills inventory. Encodes the full database schema change workflow that was previously scattered across coreex-tooling.instructions.md as prose and "Agent instruction:" blocks.

What's included

.github/skills/coreex-db-migration/

  • SKILL.md — lean entry point (<70 lines); frontmatter, when to use/not use, quick-reference command table, polyglot note, workflow pointer
  • references/workflow.md — full 6-phase procedural workflow:
    • Phase 1: establish baseline (inspect DB state before any script — hard gate)
    • Phase 2: choose script type — 5 paths (A–E): create transactional, create refdata, alter existing, non-entity change, new Domain + Database project
    • Phase 3: fill in the script — SQL column templates for aggregate + refdata × SQL Server + PostgreSQL; JSON column convention (NVARCHAR(MAX) / jsonb)
    • Phase 4: update dbex.yaml
    • Phase 5: run dotnet run -- all (or dropandall --accept-prompts for recovery)
    • Phase 6: validate — build + EF model regeneration check
    • Guardrails (filename ≤255 chars, never edit *.g.* files, etc.)

.github/prompts/coreex-db-migration.prompt.md

Thin bridge wrapper enabling /coreex-db-migration in VS Code Copilot Chat, Visual Studio, and GitHub.com. Points to SKILL.md as authoritative source; the skill always wins on conflict.

src/CoreEx.Template/CoreEx.Template.csproj

Wires the new skill and prompt wrapper into the CopyTemplateAiContext pack target:

  • _AiFile ItemGroup → CoreEx.Bootstrap receives the full set
  • New dedicated Copy block → CoreEx.Ai also receives skill + prompt wrapper

The one-block-per-skill pattern establishes the convention for all future skills.

Compatibility

Tool Support
Copilot CLI ✅ Native — SKILL.md loaded at session start
Claude Code ✅ Compatible — same SKILL.md format
VS Code Copilot Chat ✅ Via coreex-db-migration.prompt.md wrapper
Visual Studio / GitHub.com ✅ Via prompt wrapper

Key conventions encoded

  • script create / script refdata / script alter / bare script command matrix
  • dotnet run -- dropandall --accept-prompts for DB recovery (user must initiate)
  • JSON column naming convention (Json suffix → NVARCHAR(MAX) / jsonb; .NET type is class/record)
  • 255-char filename limit (assembly name + .Migrations. prefix counts)
  • Polyglot: SQL Server (Shopping) vs PostgreSQL (Products) — provider auto-detected from Database project

chullybun and others added 3 commits June 29, 2026 12:53
Adds the coreex-db-migration L1 skill covering all database schema
changes for a CoreEx domain:

- New transactional table (script create)
- New reference-data table (script refdata)
- Alter existing table (script alter) — transactional and ref-data
- Non-entity schema changes (bare script with renamed suffix)

Skill includes:
- SKILL.md with quick-reference command table and polyglot note
- references/workflow.md with 6-phase decision tree, SQL column
  templates (SQL Server + PostgreSQL, aggregate + ref-data),
  dbex.yaml registration guidance, and guardrails
- 255-character filename limit documented for bare scripts
- Links to coreex-tooling.instructions.md and canonical sample
  Database projects

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n convention

- Add dotnet run -- dropandall --accept-prompts to Quick Reference and
  Guardrails; documents that --accept-prompts bypasses DbEx DROP prompt
  and must only be used after explicit user consent
- Add JSON column convention: column names ending in Json/json default
  to NVARCHAR(MAX) (SQL Server) or jsonb (PostgreSQL); documents the
  NoSQL-within-SQL intent, .NET class/record type expectation, and
  note that value converter wiring is a hand-written concern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…plate

- Add .github/prompts/coreex-db-migration.prompt.md (VS Code / VS / GitHub.com / Claude-as-Copilot bridge)
- Update CoreEx.Template.csproj CopyTemplateAiContext target:
  - Add prompt wrapper to _AiFile ItemGroup (CoreEx.Bootstrap)
  - Add skill SKILL.md + references/workflow.md to _AiFile ItemGroup (CoreEx.Bootstrap)
  - Add dedicated Copy block for CoreEx.Ai (prompt + skill files)

Each future skill follows the same one-block-per-skill pattern in the csproj.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 29, 2026 20:45
@chullybun chullybun added the enhancement New feature or request label Jun 29, 2026
@chullybun chullybun added this to the v4.0.0-preview-2 milestone Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the first atomic L1 skill in the CoreEx skills inventory by introducing a reusable, end-to-end database migration workflow (prompt wrapper + skill + detailed workflow reference) and wiring it into the CoreEx.Template AI-context packaging so consuming projects receive it.

Changes:

  • Introduces the new coreex-db-migration skill (SKILL.md) plus a detailed procedural workflow reference (references/workflow.md).
  • Adds a thin prompt wrapper (coreex-db-migration.prompt.md) to enable /coreex-db-migration across Copilot surfaces while deferring to the skill as source-of-truth.
  • Updates CoreEx.Template.csproj to package/copy the new prompt + skill assets into both CoreEx.Bootstrap and CoreEx.Ai.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/CoreEx.Template/CoreEx.Template.csproj Packages the new prompt + skill assets into generated AI context (Bootstrap + Ai packs).
.github/skills/coreex-db-migration/SKILL.md Defines the new L1 skill entry point with scope boundaries and a quick command reference.
.github/skills/coreex-db-migration/references/workflow.md Provides the detailed 6-phase DB migration workflow, decision tree, and guardrails.
.github/prompts/coreex-db-migration.prompt.md Adds the prompt wrapper that routes users to the skill/workflow as the authoritative contract.

Comment thread src/CoreEx.Template/CoreEx.Template.csproj Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eric Sibly [chullybun] <eric@thesiblys.com>
Copilot AI review requested due to automatic review settings June 29, 2026 20:51
@chullybun chullybun requested a review from israels June 29, 2026 20:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@chullybun chullybun merged commit 5c0bec5 into main Jun 29, 2026
4 checks passed
@chullybun chullybun deleted the skills/coreex-db-migration branch June 29, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skills Inventory — First Pass: L1 Skills + Instruction Adjustments

2 participants