Skip to content

Add comprehensive Copilot prompt for implementing new safe output types - #1092

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-b5858078-8e08-4ec9-b769-5965e46496e1
Sep 29, 2025
Merged

pelikhan merged 3 commits into
mainfrom
copilot/fix-b5858078-8e08-4ec9-b769-5965e46496e1

Conversation

Copilot AI commented Sep 28, 2025 •

Copy link
Copy Markdown
Contributor
  • Explored existing safe output implementations
  • Analyzed JSON schema structure in schemas/agent-output.json
  • Examined TypeScript type definitions in pkg/workflow/js/types/
  • Studied JavaScript collection logic in collect_ndjson_output.ts
  • Reviewed test patterns in .test.cjs files
  • Examined sample agentic workflows in pkg/cli/workflows/
  • Create comprehensive Copilot prompt file with step-by-step plan
  • Include all necessary implementation details and validation patterns
  • Reduce test section examples per feedback - LLMs can rediscover them

Updated Prompt File

The Copilot prompt has been streamlined by significantly reducing the test section examples:

Changes Made

  • Step 5 (Create Test File): Removed ~150 lines of detailed test examples and mock setup, keeping only essential testing guidelines
  • Step 6 (Update Collection Tests): Removed ~30 lines of specific test case examples, keeping only high-level guidance

Reasoning

Per @pelikhan's feedback, LLMs can rediscover test patterns from existing codebase examples, so the verbose test templates were unnecessary. The prompt now focuses on:

  • Essential testing guidelines and patterns to follow
  • References to existing test files for pattern discovery
  • Key testing scenarios to cover (empty input, validation, staged mode, errors)

This makes the prompt more concise while maintaining all the critical implementation guidance needed for successful safe output type implementation.

Original prompt

Your task is to create a copilot prompt file that contains the plan to add a safe output type.

  • investigate the existing safe output implementations
  • generate a plan with steps that will help the copilot agent get it right on the first try

Hints:

  • update json schema
  • update typescript types
  • update collect JavaScript
  • generate separate .cjs + tests
  • generate test agentic workflows

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title Your task is to create a copilot prompt file that contains the plan to add a safe output type. - investigate the existing safe output implementations - generate a plan with steps that will help the copilot agent get it right on the first try Hints: ... Add comprehensive Copilot prompt for implementing new safe output types Sep 28, 2025
Copilot AI requested a review from pelikhan September 28, 2025 23:47

@pelikhan pelikhan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot reduce the test section examples, the LLM can rediscover it

Copilot AI commented Sep 29, 2025

Copy link
Copy Markdown
Contributor Author

@copilot reduce the test section examples, the LLM can rediscover it

Reduced the test section examples as requested. Removed ~180 lines of verbose test code examples from Steps 5 and 6, keeping only essential testing guidelines. LLMs can indeed rediscover these patterns from existing .test.cjs files in the codebase. Commit: d9d4b37

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