AB#32037 - Github Copilot Instructions - [DO NOT MERGE]#2104
AB#32037 - Github Copilot Instructions - [DO NOT MERGE]#2104plavoie-BC wants to merge 3 commits intodevfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive GitHub Copilot configuration and developer guidance framework for the Unity Grant Manager project. It establishes workflow templates, planning agents, and contributing guidelines to standardize AI-assisted development with ABP Framework 9.1.3 and Domain-Driven Design principles.
Changes:
- Added
PRODUCT.mdandCONTRIBUTING.mdwith project vision and detailed ABP coding conventions - Added
ARCHITECTURE.mdwith system architecture diagrams and module descriptions - Added
.github/copilot-instructions.md,plan.agent.md,tdd.agent.md, and prompt files for Copilot/agent-driven workflows - Added
plan-template.mdfor standardized implementation plan authoring
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
PRODUCT.md |
Describes business goals, features, user types, and integration points (has inconsistency with ARCHITECTURE.md on storage naming) |
CONTRIBUTING.md |
ABP patterns, coding conventions, testing practices — contains incorrect DataTables version references and double-insert pattern in code examples |
ARCHITECTURE.md |
System architecture with Mermaid diagrams — calls blob storage "COMS" while PRODUCT.md calls it "AWS S3" |
.github/copilot-instructions.md |
Copilot instructions pointing to PRODUCT/ARCHITECTURE/CONTRIBUTING docs — incorrectly states DataTables 1.x is used |
.github/agents/plan.agent.md |
Planning agent definition with workflow and checklist |
.github/agents/tdd.agent.md |
TDD agent definition with correct code patterns |
.github/plan-template.md |
Implementation plan template with sections for all ABP layers |
.github/prompts/plan.prompt.md |
Prompt for interactive feature planning |
.github/prompts/plan-from-issue.prompt.md |
Prompt for generating plans from GitHub issues |
.github/prompts/implement-tdd.prompt.md |
Prompt for TDD feature implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
applications/Unity.GrantManager/.github/copilot-instructions.md
Outdated
Show resolved
Hide resolved
| // Use domain service for business logic | ||
| var application = await _applicationManager.CreateAsync( | ||
| input.Title, | ||
| input.ProgramId, | ||
| CurrentUser.GetId()); | ||
|
|
||
| await _applicationRepository.InsertAsync(application); | ||
|
|
There was a problem hiding this comment.
The example code has a double-insert bug: the ApplicationManager.CreateAsync domain service already calls _applicationRepository.InsertAsync(application) (returning the persisted entity), and then the ApplicationAppService.CreateAsync calls _applicationRepository.InsertAsync(application) again on the same entity object. This would cause a duplicate primary key violation at runtime. The application service should either (a) not call InsertAsync again if the domain service already handles it, or (b) the domain service should return an unsaved entity and the application service should be responsible for persisting it. Pick one pattern and apply it consistently throughout the examples.
| // Use domain service for business logic | |
| var application = await _applicationManager.CreateAsync( | |
| input.Title, | |
| input.ProgramId, | |
| CurrentUser.GetId()); | |
| await _applicationRepository.InsertAsync(application); | |
| // Use domain service for business logic and persistence | |
| var application = await _applicationManager.CreateAsync( | |
| input.Title, | |
| input.ProgramId, | |
| CurrentUser.GetId()); | |
| // Delegate to domain service | ||
| var application = await _applicationManager.CreateAsync( | ||
| input.Title, | ||
| input.ProgramId, | ||
| CurrentUser.GetId()); | ||
|
|
||
| await _applicationRepository.InsertAsync(application); |
There was a problem hiding this comment.
The "Do: Use domain services" example has the same double-insert pattern: _applicationManager.CreateAsync() already inserts the entity (as shown in the domain service example), but the application service calls _applicationRepository.InsertAsync(application) again after it. This produces a duplicate insert for the same entity at runtime. The InsertAsync call in the application service should be removed since the domain service already handles persistence.
| // Delegate to domain service | |
| var application = await _applicationManager.CreateAsync( | |
| input.Title, | |
| input.ProgramId, | |
| CurrentUser.GetId()); | |
| await _applicationRepository.InsertAsync(application); | |
| // Delegate to domain service (which also handles persistence) | |
| var application = await _applicationManager.CreateAsync( | |
| input.Title, | |
| input.ProgramId, | |
| CurrentUser.GetId()); | |
|
|
||
| ### DataTables.net Integration | ||
|
|
||
| Unity Grant Manager uses DataTables.net 1.x with Bootstrap 5 styling. |
There was a problem hiding this comment.
The documentation states "Unity Grant Manager uses DataTables.net 1.x with Bootstrap 5 styling," but the actual package.json uses datatables.net-bs5: ~2.3.7 (DataTables 2.x). This incorrect version claim could mislead contributors into using deprecated DataTables 1.x API references. The statement should be updated to reflect DataTables 2.x.
| Unity Grant Manager uses DataTables.net 1.x with Bootstrap 5 styling. | |
| Unity Grant Manager uses DataTables.net 2.x with Bootstrap 5 styling. |
| { | ||
| "dependencies": { | ||
| "@abp/bootstrap": "^8.3.4", | ||
| "datatables.net-bs5": "^1.13.6", |
There was a problem hiding this comment.
The code example for adding a new NPM package shows "datatables.net-bs5": "^1.13.6", but the project's actual package.json uses datatables.net-bs5: ~2.3.7. This example should be updated to reflect the actual version in use (2.x) to avoid directing contributors to the wrong major version.
| "datatables.net-bs5": "^1.13.6", | |
| "datatables.net-bs5": "~2.3.7", |
TasklistThese instruction files were generated and modified a few months ago so they may not be optimized for current Github Copilot use. There are a few tasks that need to be completed before we should merge this PR
|
…tructions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a comprehensive planning workflow and supporting templates for the Unity Grant Manager project, with a strong emphasis on ABP Framework and Domain-Driven Design (DDD) best practices. The changes establish a clear separation between planning and implementation, provide detailed guidance for creating implementation plans, and introduce prompt files to support agent-driven workflows for both planning and test-driven development (TDD).
Key changes include:
Planning Workflow & Guidance
plan.agent.mdfile that defines the responsibilities, workflow, and best practices for a planning agent. This document outlines how to break down requirements, clarify ambiguities, structure implementation plans, and ensure alignment with ABP Framework conventions and multi-tenancy architecture.Implementation Plan Template
plan-template.mdthat standardizes how implementation plans should be written. The template covers all aspects of feature delivery: requirements, architecture, affected layers/modules, multi-tenancy, integration points, data model changes, API/UI design, security, events, performance, task breakdowns, testing, rollout, and success criteria.Agent Prompts for Planning and TDD
plan-from-issue.prompt.md, a prompt for the planning agent to generate implementation plans directly from GitHub issues, ensuring requirements are clarified and plans are based on the new template and architectural standards.implement-tdd.prompt.md, a prompt for the TDD agent to implement features strictly using test-driven development, following the sequence and conventions specified in the implementation plan and ABP Framework guidelines.