Skip to content

Add coreex-api-e2e/coreex-subscriber-e2e L2 skills; mandate unit test generation in adapter/policy/validator skills#167

Merged
chullybun merged 10 commits into
mainfrom
feature/166-l2-skills-l1-unit-test-fixes
Jul 7, 2026
Merged

Add coreex-api-e2e/coreex-subscriber-e2e L2 skills; mandate unit test generation in adapter/policy/validator skills#167
chullybun merged 10 commits into
mainfrom
feature/166-l2-skills-l1-unit-test-fixes

Conversation

@chullybun

@chullybun chullybun commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds two new end-to-end L2 orchestration skills: coreex-api-e2e (new entity + CRUD API, full vertical slice) and coreex-subscriber-e2e (new event/command subscriber). Each interviews once upfront then invokes the relevant L1 skills in sequence, so no L1 re-asks a question already answered.
  • Wired into coreex-expert.agent.md routing table, .github/coreex-ai-workflows.md catalog, and CoreEx.Template.csproj Copy targets so dotnet new coreex-ai ships them.
  • coreex-adapter, coreex-policy, coreex-validator skills now always generate the matching unit test class instead of just "offering to" — with decision tables for when it applies vs. is skipped (e.g. EF-only replication adapters skip HTTP client tests).
  • coreex-docs-sync orphan-detection step updated to compare installed skill folders against both the L1 and L2 skill catalogs.
  • Test API integration test guidance (coreex-test-api skill + coreex-tests.instructions.md) now requires every Create/Update/Patch _Success test to explicitly assert the changed property and follow up with a GET to verify the change persisted, not just that the response echoed it back.

Validation

  • dotnet build src/CoreEx.Template/CoreEx.Template.csproj — succeeds, 0 warnings/errors, confirming the new Copy targets resolve correctly.
  • Reviewed cross-references between the new skill files, the agent routing table, and the workflow catalog — all consistent.
  • Fixed a malformed markdown table (extra unescaped-pipe cell) in coreex-subscriber-e2e/references/workflow.md.
  • Addressed Copilot review feedback: aligned coreex-subscriber-e2e workflow wording with the L1 subscriber skill's auto-discovery behavior (AddSubscribersUsing<T>() — no manual Program.cs registration), and broadened the coreex-policy unit-test guidance to cover both EnsureExists (IsValidationError) and state/condition guards (IsBusinessError).

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

… generation in adapter/policy/validator skills

- New end-to-end L2 skills orchestrate full L1 sequences for new entity CRUD APIs and new event/command subscribers, gathering context once upfront.
- Wired into coreex-expert agent routing table, coreex-ai-workflows.md catalog, and CoreEx.Template.csproj Copy targets.
- coreex-adapter, coreex-policy, coreex-validator skills now always generate matching unit tests instead of just offering to.
- coreex-docs-sync orphan-detection step updated to compare against both L1 and L2 skill catalogs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 6, 2026 20:24

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 two new “L2” end-to-end CoreEx AI orchestration skills (create API vertical slice; create subscriber vertical slice) and updates related workflow assets so these skills are shipped via dotnet new coreex-ai. It also tightens existing L1 skills to mandate unit test generation guidance (validator/policy/adapter) and updates the workflow catalog + routing.

Changes:

  • Introduces new L2 skills + prompt wrappers: coreex-add-api and coreex-add-subscriber, each orchestrating multiple L1 skills with an “interview once, invoke many” flow.
  • Updates L1 skill guidance to mandate unit test generation for validators, policies, and typed HTTP clients (with decision-table guidance in adapter workflow).
  • Wires the new skills into template packaging, workflow catalog, and coreex-expert routing; updates orphan-detection guidance in the Claude /coreex-docs-sync command.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/CoreEx.Template/CoreEx.Template.csproj Ships the new L2 prompts/skills via template Copy targets.
.github/skills/coreex-validator/SKILL.md Mandates generating/updating validator unit tests.
.github/skills/coreex-validator/references/workflow.md Updates validator workflow step to generate/update tests.
.github/skills/coreex-policy/SKILL.md Mandates generating policy unit tests.
.github/skills/coreex-policy/references/workflow.md Expands policy workflow with concrete unit-test scaffolding guidance.
.github/skills/coreex-add-subscriber/SKILL.md New L2 skill definition for end-to-end subscriber creation.
.github/skills/coreex-add-subscriber/references/workflow.md New detailed L2 subscriber orchestration workflow.
.github/skills/coreex-add-api/SKILL.md New L2 skill definition for end-to-end CRUD API vertical slice creation.
.github/skills/coreex-add-api/references/workflow.md New detailed L2 API vertical-slice orchestration workflow.
.github/skills/coreex-adapter/SKILL.md Mandates typed HTTP client unit tests (summary guidance updated).
.github/skills/coreex-adapter/references/workflow.md Adds decision table + renames Step 5 to “Generate HTTP Client Unit Tests”.
.github/prompts/coreex-add-subscriber.prompt.md New Copilot prompt wrapper for L2 subscriber workflow.
.github/prompts/coreex-add-api.prompt.md New Copilot prompt wrapper for L2 API workflow.
.github/coreex-ai-workflows.md Adds L2 skill catalog section.
.github/agents/coreex-expert.agent.md Routes “new entity/subscriber end-to-end” requests to L2 skills.
.claude/commands/coreex-docs-sync.md Updates orphan-detection guidance to include L1 + L2 catalogs.

Comment thread .github/skills/coreex-add-api/SKILL.md Outdated
Comment thread .github/skills/coreex-add-api/SKILL.md Outdated
Comment thread .github/skills/coreex-add-subscriber/SKILL.md Outdated
Comment thread .github/skills/coreex-adapter/SKILL.md Outdated
Comment thread .claude/commands/coreex-docs-sync.md
@chullybun chullybun added this to the v4.0.0-preview-2 milestone Jul 6, 2026
@chullybun chullybun added the enhancement New feature or request label Jul 6, 2026
chullybun and others added 2 commits July 6, 2026 13:37
- coreex-add-api/SKILL.md: add missing Patch to argument-hint and workflow overview operations list (workflow.md already had it).
- coreex-add-subscriber/SKILL.md: add rop-enabled to the Feature Configuration resolve list (already used downstream by app-service step).
- coreex-adapter/SKILL.md: align Quick Reference test-generation bullet with the detailed decision table — orchestration adapters (EF+HTTP+events combined) also skip generation, not just EF-only replication adapters.
- coreex-docs-sync/SKILL.md and README.md: update orphan-detection wording to reference both L1 and L2 skill catalogs, matching the already-updated Claude command text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…2e/coreex-subscriber-e2e

The 'add-' prefix put these one word-insertion away from their L1 counterparts
(coreex-api, coreex-subscriber) without sharing a common typing/search prefix,
so they never surfaced together in a picker. Suffixing with '-e2e' instead:
- shares the full L1 skill name as a prefix, so both tiers cluster together
  when typing/searching (coreex-api, coreex-api-e2e)
- reuses 'e2e' terminology already present in the skill tags/descriptions
  instead of introducing new vocabulary
- avoids collision with the already load-bearing 'Feature Configuration'
  term used throughout the skill catalog

Updated all cross-references: SKILL.md frontmatter name/description fields,
workflow.md headers, prompt wrapper content, coreex-ai-workflows.md catalog,
coreex-expert.agent.md routing table, and CoreEx.Template.csproj Copy targets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 6, 2026 21:01

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 18 out of 18 changed files in this pull request and generated 1 comment.

Comment thread .github/coreex-ai-workflows.md Outdated
chullybun and others added 2 commits July 7, 2026 10:41
…tate

- README AI section was missing /coreex-scaffold entirely and had no mention
  of the 14 L1 or 2 L2 skills — added both, linking to the full catalog in
  coreex-ai-workflows.md rather than duplicating all 16 rows.
- Fixed stale instruction file count (10 -> 11; coreex-domain.instructions.md
  was added previously but the README count was never updated).
- AGENTS.md Cold Start install summary now lists the L2 end-to-end skills
  (coreex-api-e2e, coreex-subscriber-e2e) alongside the L1 skill list.
- coreex-ai-workflows.md: removed stale 'add- prefix is intentional' note
  left over from the coreex-add-api/coreex-add-subscriber -> coreex-api-e2e/
  coreex-subscriber-e2e rename.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Step 7's AI-assisted prompt hand-spelled out the entire CRUD/validation/test workflow, duplicating what the coreex-api-e2e L2 skill already automates. Rewrite the prompt to explicitly invoke the skill with pre-answered interview data (entity, fields, operations, guard), dropping the now-redundant hand-authored instructions. Add an explainer sentence linking to the skill and note the recommended-path intro paragraph now mentions the skill catalog.

$Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 7, 2026 17:56

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 21 out of 21 changed files in this pull request and generated 4 comments.

Comment thread .github/skills/coreex-subscriber-e2e/references/workflow.md Outdated
Comment thread .github/skills/coreex-subscriber-e2e/references/workflow.md Outdated
Comment thread .github/skills/coreex-policy/SKILL.md Outdated
Comment thread src/CoreEx.Template/CoreEx.Template.csproj
chullybun and others added 2 commits July 7, 2026 11:45
…ng table

The column-to-type mapping table omitted DateOnly/TimeOnly. Verified native EF Core support requires no HasConversion value converter on either SQL Server (DATE, EF8+) or PostgreSQL (date, Npgsql 6+) - confirmed against this repo's own TestDbContext configs and round-trip CRUD tests. Add the missing row and a note pointing to that evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 7, 2026 18:47

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 22 out of 22 changed files in this pull request and generated 1 comment.

Comment thread .github/coreex-ai-workflows.md
Add explicit guidance to the coreex-test-api skill and instructions:
- Every Create/Update/Patch _Success (and _NoChanges) test must assert
  the specific changed property/properties on the mutation response.
- Every Create/Update/Patch _Success test must follow up with a GET
  and AssertValue(...) to verify the change actually persisted, not
  just that the response echoed it back. Delete is exempt since its
  four-step idempotent flow already re-GETs.

Also fix a stray unused global using in the CoreEx.Api test template's
GlobalUsing.cs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@chullybun chullybun changed the title Add coreex-add-api/coreex-add-subscriber L2 skills; mandate unit test generation in adapter/policy/validator skills Add coreex-api-e2e/coreex-subscriber-e2e L2 skills; mandate unit test generation in adapter/policy/validator skills Jul 7, 2026
- coreex-policy SKILL.md: broaden unit-test guidance so the quick
  reference covers both EnsureExists (IsValidationError) and
  state/condition guard methods (IsBusinessError), matching the
  detailed workflow.md decision table.
- coreex-subscriber-e2e workflow.md: align wording with the L1
  coreex-subscriber skill's auto-discovery behavior -- no manual
  Subscribe host Program.cs registration is generated or required,
  AddSubscribersUsing<T>() discovers [Subscribe]-decorated classes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 7, 2026 21:26

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 26 out of 26 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

.github/skills/coreex-validator/references/workflow.md:316

  • This requires tests to "Cover every rule", which conflicts with the test conventions (e.g. length-rule boundary testing is explicitly discouraged). Adjust wording so the validator skill aligns with .github/instructions/coreex-tests.instructions.md and doesn't force unnecessary boundary-case tests for framework-guaranteed rules.
3. **Generate or update the matching test class** in `*.Test.Unit/Validators/`. The test class must:
   - Use non-generic `Test.Scoped(test => { ... })` with `XxxValidator.Default` (or `new XxxValidator(mockDep)` for injected validators).
   - Cover **every rule** — both error and success cases.
   - Use `(jsonName, "Full expected message.")` tuples in `AssertErrors(...)`.
   - Use camelCase JSON property path; ref-data rules key on the navigation name (`"gender"`, not `"genderCode"`).

Comment thread .github/skills/coreex-test-api/references/workflow.md
Comment thread .github/skills/coreex-validator/SKILL.md
Comment thread .github/instructions/coreex-tests.instructions.md
…review round 2)

- coreex-test-api workflow.md: fix updated.ETag.Should().NotBe(p.ETag)
  -- p was never defined in that example; should compare against the
  pre-mutation val.ETag.
- coreex-tests.instructions.md: make the PATCH example self-contained
  -- it referenced an undefined p.Id/p.Text/val.ETag from a different
  code block; now GETs its own entity first.
- coreex-validator SKILL.md: reword the unit-test quick-reference
  bullet so it no longer contradicts coreex-tests.instructions.md's
  explicit guidance to skip dedicated boundary tests for
  framework-guaranteed length rules.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@chullybun chullybun merged commit 87ccda3 into main Jul 7, 2026
3 checks passed
@chullybun chullybun deleted the feature/166-l2-skills-l1-unit-test-fixes branch July 7, 2026 22:03
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.

2 participants