Skip to content

Add comprehensive Feature-to-PR workflow template for GitHub Copilot agents#7

Merged
Krosebrook merged 2 commits intomainfrom
copilot/add-user-authentication-feature
Dec 30, 2025
Merged

Add comprehensive Feature-to-PR workflow template for GitHub Copilot agents#7
Krosebrook merged 2 commits intomainfrom
copilot/add-user-authentication-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 30, 2025

Implements a structured workflow template that guides GitHub Copilot agents and developers through feature development with scope-adaptive quality gates and context-first execution.

Changes

Added

  • .github/FEATURE_TO_PR_TEMPLATE.md (581 lines)
    • 5-step workflow: Context Scan → Plan → Implement → Test → Document
    • Scope-adaptive requirements for Small (🔵), Medium (🟢), Large (🔴) features
    • Stack-specific guidance (Frontend/Backend/Infrastructure/Mobile)
    • Repository-specific context for Interact's tech stack (React 18, Vite 6, Base44 SDK)
    • Security, performance, and code quality checklists
    • PR description template with verification and risk assessment sections

Modified

  • .github/prompts/README.md - Added template reference and usage instructions
  • README.md - Updated Contributing section with template link

Template Structure

## 🎯 Mission Statement
Feature: [REQUIRED]
Outcome: [REQUIRED]
Scope Level: [🔵 Small | 🟢 Medium | 🔴 Large]

## 🔄 Required Workflow
### Step 0: Context Scan
- Repository configuration (build/test/lint commands)
- Existing patterns (auth, validation, error handling, state management)
- Reference implementations (find 2-3 similar files)

### Step 1: Plan
- Files to change
- Implementation strategy
- Test plan
- Rollback plan
- Risk assessment

Integration

Template aligns with existing documentation and enforces consistency with:

  • .github/copilot-instructions.md (coding standards)
  • CODEBASE_AUDIT.md (known issues)
  • PRD.md (requirements)
  • FEATURE_ROADMAP.md (feature context)

Quality gates scale with scope: Small features require tests + docs + build. Medium adds edge cases + security review + integration tests. Large adds ADRs + observability + performance testing + rollback plans.

Original prompt

🤖 GitHub Copilot Agent — Feature-to-PR Template

Optimized for GitHub Copilot agents on github.com and in VS Code
Execute as ONE autonomous PR with full context awareness


🎯 Mission Statement

Feature: [REQUIRED: Specific feature name]
Outcome: [REQUIRED: 1-2 sentences describing user-visible impact]
Scope Level: [SELECT ONE: 🔵 Small | 🟢 Medium | 🔴 Large]

⚠️ STOP: If any [REQUIRED] field above contains placeholders, ASK for clarification before proceeding.


🧭 Core Principles

1. Context-First Execution

  • Always begin with Step 0: Context Scan
  • Use existing repo patterns (don't invent new ones)
  • Respect .github/copilot-instructions.md and related docs

2. Clarify Before Coding

  • If anything is ambiguous → Ask up to 5 targeted questions
  • Questions should be:
    • ✅ Specific and actionable
    • ✅ Necessary to prevent rework
    • ❌ Not about trivial naming or formatting

3. Reviewable Changes

  • One PR only — no "Part 1 of 3"
  • Keep diffs focused and logical
  • If scope expands significantly → Ask if it should be split

4. Quality Gates Match Scope

  • 🔵 Small (bug fixes, typos, minor tweaks): Tests + docs + build passes
  • 🟢 Medium (new features, API endpoints): All 🔵 + edge cases + security review + integration tests
  • 🔴 Large (architecture changes, new services): All 🟢 + ADR + observability + performance testing + rollback plan

📋 Scope-Adaptive Requirements

🔵 Small Changes (Bug fixes, config updates, minor improvements)

  • Tests: Added or updated for changed behavior
  • Docs: Updated if user-visible behavior changes
  • Build: npm run build, npm run lint, npm test all pass
  • Verification: Manual testing documented in PR

🟢 Medium Features (New components, API endpoints, UI flows)

All 🔵 requirements plus:

  • Edge Cases: Null/empty/invalid inputs handled gracefully
  • Error Handling: No silent failures; user-friendly messages
  • Security Review: Input validation, authorization checks if applicable
  • Integration Tests: If repo has test infrastructure
  • Accessibility (if frontend): ARIA labels, keyboard navigation, focus management
  • Loading/Error States (if UI): Skeleton loaders, error boundaries

🔴 Large Features (Architecture changes, new services, major refactors)

All 🟢 requirements plus:

  • Architecture Decision Record (ADR): Document why this approach
  • Observability: Logging, metrics, tracing added
  • Performance: Load tested; no N+1 queries; caching strategy documented
  • Backward Compatibility: Migration path for existing users/data
  • Rollback Plan: Feature flags or clean revert strategy
  • Security Deep Dive: Threat model, secrets management, dependency audit
  • Documentation: README, API docs, runbooks updated

🔄 Required Workflow

Step 0: Context Scan (Must do first)

Run these checks and document findings:

0. 1 — Repository Configuration

# Build/test/lint commands
Check:  package.json, Makefile, . github/workflows/*
Find: How to build, test, lint, and run locally

0.2 — Existing Patterns

For each of these, find 1-2 example files to use as templates:

Pattern What to Find Where to Look
Auth How is user identity verified? Middleware? Decorators? Backend functions, API routes
Validation Zod? Joi? Manual checks? Form components, API handlers
Error Handling Error classes? Status codes? User messages? Try/catch blocks, error boundaries
Logging What library? What levels? Structured or plain text? Console.log calls, logger imports
State Management Context? Redux? Zustand? React Query? Hooks, providers
Styling Tailwind? CSS Modules? Styled Components? Component files
Testing Jest? Vitest? Testing Library? Cypress? Test files, test config

0.3 — Find Reference Implementation

  • For new API endpoint → Find most similar existing endpoint
  • For new UI component → Find most similar existing component
  • For new utility function → Find similar utility
  • List 2-3 files to use as structural templates

0.4 — CI/CD Constraints

# Check for: 
- Required status checks (. github/workflows/*)
- Branch protection rules
- CODEOWNERS file
- Signed commits requirement

📝 OUTPUT: Post a summary of findings before proceeding to Step 1


Step 1: Plan (Post before major edits)

Create a brief plan with:

1.1 — Files to Change

- src/components/NewFeature.jsx (NEW)
- src/api/feature-endpoint.js (MODIFY)
- src/hooks/useFeature.js (NEW)
- README.md (MODIFY - document new feature)
- package.json (MODIFY - add dependency X)

1.2 — Implementation Strategy

  • What's the high-level approach?
  • What exi...

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Summary by cubic

Add a Feature-to-PR template to standardize feature development and PR quality. Update .github/prompts/README.md and README.md to reference the template and provide quick-start guidance.

Written for commit 09c8e6a. Summary will update on new commits.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 30, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: Krosebrook <214532761+Krosebrook@users.noreply.github.com>
Copilot AI changed the title [WIP] Add user authentication feature to improve login experience Add comprehensive Feature-to-PR workflow template for GitHub Copilot agents Dec 30, 2025
Copilot AI requested a review from Krosebrook December 30, 2025 16:26
@Krosebrook Krosebrook marked this pull request as ready for review December 30, 2025 16:57
Copilot AI review requested due to automatic review settings December 30, 2025 16:57
@Krosebrook Krosebrook merged commit 84201fa into main Dec 30, 2025
1 check passed
@Krosebrook Krosebrook deleted the copilot/add-user-authentication-feature branch December 30, 2025 16:57
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

Copilot AI review requested due to automatic review settings March 23, 2026 21:58
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