Add coreex-api-e2e/coreex-subscriber-e2e L2 skills; mandate unit test generation in adapter/policy/validator skills#167
Merged
Conversation
… 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>
Contributor
There was a problem hiding this comment.
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-apiandcoreex-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-expertrouting; updates orphan-detection guidance in the Claude/coreex-docs-synccommand.
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. |
- 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>
…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>
…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>
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>
- 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>
Contributor
There was a problem hiding this comment.
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.mdand 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"`).
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
coreex-api-e2e(new entity + CRUD API, full vertical slice) andcoreex-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.coreex-expert.agent.mdrouting table,.github/coreex-ai-workflows.mdcatalog, andCoreEx.Template.csprojCopy targets sodotnet new coreex-aiships them.coreex-adapter,coreex-policy,coreex-validatorskills 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-syncorphan-detection step updated to compare installed skill folders against both the L1 and L2 skill catalogs.coreex-test-apiskill +coreex-tests.instructions.md) now requires every Create/Update/Patch_Successtest 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.coreex-subscriber-e2e/references/workflow.md.coreex-subscriber-e2eworkflow wording with the L1 subscriber skill's auto-discovery behavior (AddSubscribersUsing<T>()— no manualProgram.csregistration), and broadened thecoreex-policyunit-test guidance to cover bothEnsureExists(IsValidationError) and state/condition guards (IsBusinessError).Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com