Skip to content

AB#32037 - Github Copilot Instructions - [DO NOT MERGE]#2104

Draft
plavoie-BC wants to merge 3 commits intodevfrom
feature/AB#32037-copilot-instructions
Draft

AB#32037 - Github Copilot Instructions - [DO NOT MERGE]#2104
plavoie-BC wants to merge 3 commits intodevfrom
feature/AB#32037-copilot-instructions

Conversation

@plavoie-BC
Copy link
Contributor

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

  • Added a new plan.agent.md file 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

  • Introduced a detailed plan-template.md that 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

  • Added 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.
  • Added 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.

@plavoie-BC plavoie-BC changed the title AB#32037 - Github Copilot Instructions - [UNDER REVIEW] AB#32037 - Github Copilot Instructions - [DO NOT MERGE] Mar 6, 2026
@plavoie-BC plavoie-BC requested a review from Copilot March 6, 2026 23:58
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 465
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.md and CONTRIBUTING.md with project vision and detailed ABP coding conventions
  • Added ARCHITECTURE.md with 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.md for 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.

Comment on lines +259 to +266
// Use domain service for business logic
var application = await _applicationManager.CreateAsync(
input.Title,
input.ProgramId,
CurrentUser.GetId());

await _applicationRepository.InsertAsync(application);

Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
// 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());

Copilot uses AI. Check for mistakes.
Comment on lines +1355 to +1361
// Delegate to domain service
var application = await _applicationManager.CreateAsync(
input.Title,
input.ProgramId,
CurrentUser.GetId());

await _applicationRepository.InsertAsync(application);
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
// 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());

Copilot uses AI. Check for mistakes.

### DataTables.net Integration

Unity Grant Manager uses DataTables.net 1.x with Bootstrap 5 styling.
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
Unity Grant Manager uses DataTables.net 1.x with Bootstrap 5 styling.
Unity Grant Manager uses DataTables.net 2.x with Bootstrap 5 styling.

Copilot uses AI. Check for mistakes.
{
"dependencies": {
"@abp/bootstrap": "^8.3.4",
"datatables.net-bs5": "^1.13.6",
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"datatables.net-bs5": "^1.13.6",
"datatables.net-bs5": "~2.3.7",

Copilot uses AI. Check for mistakes.
@plavoie-BC
Copy link
Contributor Author

Tasklist

These 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

plavoie-BC and others added 2 commits March 6, 2026 16:10
…tructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 465
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

1 similar comment
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 465
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants