Skip to content

Conversation

fbeaudoincoveo
Copy link
Contributor

This PR aims at improving our workspace Copilot instructions / prompts, and also adding capabilities for a continuous feedback / self-improvement loop.

For the purpose of feedback loop / continuous improvement, whenever we execute a workspace prompt, it will now automatically generate a structured execution summary report at the end of the execution, which should be committed / pushed along with the files that were created / modified by the prompt. I added a "Prompt Engineer" chatmode that we can feed these execution reports to on a regular basis to improve the prompts based on actual usage. Ideally, we want to process these execution reports frequently so that we quickly benefit from the feeback. However, we should have a single person batch-process them, otherwise we'll end up with lots of merge conflicts as different contributors modify the prompts.

I've also improved the .hbs files (i.e., the templates used by the Atomic component generation script) to better demonstrate our actual patterns.

https://coveord.atlassian.net/browse/KIT-4997

@developer-experience-bot
Copy link
Contributor

developer-experience-bot bot commented Oct 15, 2025

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 255.6 255.6 0
commerce 369.4 369.4 0
search 427.1 427.1 0
insight 418.3 418.3 0
recommendation 266.4 266.4 0
ssr 421.5 421.5 0
ssr-commerce 386.5 386.5 0
ssr-commerce-next 387.8 387.8 0
ssr-next 422.1 422.1 0

Copy link
Contributor

@Copilot 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 enhances workspace Copilot instructions and prompts, adds a feedback loop mechanism for continuous improvement, and improves atomic component boilerplate templates to better demonstrate actual patterns.

Key Changes:

  • Implemented structured execution summary generation for workspace prompts with template and README
  • Created "Prompt Engineer" chatmode for batch-processing execution reports
  • Enhanced component templates with comprehensive examples of lifecycle methods, state management, and testing patterns
  • Corrected import paths across multiple fixtures to use proper context structure

Reviewed Changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/atomic/vitest-utils/testing-helpers/fixtures/atomic/commerce/*-fixture.ts Corrected bindingsContext import paths to use common/context/ structure
packages/atomic/src/decorators/bindings*.ts Updated bindingsContext imports to consistent common/context/ path
packages/atomic/src/components/commerce/atomic-commerce-*-interface/*.ts Fixed bindingsContext import paths for interface components
packages/atomic/scripts/generate-component-templates/*.hbs Significantly expanded templates with realistic examples of controllers, state, events, lifecycle methods, slots, and comprehensive test patterns
.github/prompts/write-atomic-component-mdx-documentation.prompt.md New prompt for generating MDX documentation with pattern discovery and quality checklist
.github/prompts/migrate-stencil-to-lit.prompt.md Enhanced migration prompt with path alias conversion requirements, similar component analysis, and execution summary generation
.github/prompts/migrate-stencil-functional-component-to-lit.prompt.md Streamlined functional component migration with clearer type patterns and import update process
.github/prompts/generate-vitest-tests-atomic-*.prompt.md Improved test generation prompts with pattern discovery, mock cleanup clarification, and execution summary requirements
.github/prompts/generate-playwright-e2e-tests-atomic.prompt.md New comprehensive Playwright e2e test generation prompt
.github/prompts/.executions/TEMPLATE.prompt-execution.md Template for structured execution summaries
.github/prompts/.executions/README.md Documentation for execution summary workflow
.github/instructions/*.instructions.md Consolidated and clarified testing, TypeScript, and atomic component instructions with hierarchy and reference structure
.github/chatmodes/Prompt Engineer.chatmode.md New chatmode for analyzing and optimizing instruction/prompt files with token economy principles
Comments suppressed due to low confidence (1)

packages/atomic/scripts/generate-component-templates/component.spec.ts.hbs:1

  • Corrected spelling of 'Sandard' to 'Standard'.
import {beforeEach, describe, expect, it, type MockInstance, vi} from 'vitest';

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

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

LGTM overall, there was a lot, so I might have missed specifics.

Is there a piece you want to highlight or you think is worth a second closer read?

Sentiments:

  • Maybe worth multiple smaller/more focused PR?
  • A lot of knowledge is being inked down, this is great, but I'm wondering if human developers have as good access to this knowledge 🤔

Copy link
Contributor

@fpbrault fpbrault left a comment

Choose a reason for hiding this comment

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

Nice job. Out of scope but we should check if adding an AGENTS.md makes sense too

@fbeaudoincoveo
Copy link
Contributor Author

Nice job. Out of scope but we should check if adding an AGENTS.md makes sense too

@fpbrault I just created https://coveord.atlassian.net/browse/KIT-5143 to investigate / do this.

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.

4 participants