Skip to content

Refactor rule-expander agent to <3000 chars and enhance copilot-instructions with agentic workflow patterns#20

Draft
Copilot wants to merge 4 commits into
masterfrom
copilot/refactor-rule-expander-agent
Draft

Refactor rule-expander agent to <3000 chars and enhance copilot-instructions with agentic workflow patterns#20
Copilot wants to merge 4 commits into
masterfrom
copilot/refactor-rule-expander-agent

Conversation

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

The rule-expander.agent.md exceeded GitHub Copilot's 3000 character agent limit at 63,322 chars, making it unusable. The copilot-instructions.md lacked modern agentic workflow guidance.

Changes

rule-expander.agent.md (63,322 → 2,800 chars)

  • Condensed to essential workflow: Research → Implementation → Testing → Quality → Delivery
  • Retained core patterns: rule structure, discovery criteria, safety constraints
  • Removed verbose multi-phase instructions and redundant examples
  • Fixed priority guidance to match codebase reality: 50-100 (specific), 500-900 (high), 1000 (default), 2000+ (fuzzy)

copilot-instructions.md (+261 lines, no removals)

  • Agentic workflows: Task scoping, acceptance criteria templates, incremental patterns
  • Security: Dependency checks, code safety, rule evaluation constraints
  • Quality standards: Rust error handling, type safety, 6-test minimum per rule
  • Context: Architecture principles, common patterns, commit conventions
  • File organization: Clear guidance on where changes belong

Example

Agent now follows GitHub Copilot best practices with concise frontmatter and focused guidance:

---
name: Rule Expander
description: Research, implement, and deliver command correction support for CLI tools
tools: ["*"]
---

## Workflow
1. Research & Discovery
2. Implementation (use is_app(), register in mod.rs)
3. Testing (min 6 tests: 2+ positive, 2+ negative, 1+ correction, 1+ edge)
4. Quality (cargo test && cargo clippy && cargo fmt)
5. Delivery (feature branch, conventional commits)

Both files now align with 2024-2025 GitHub Copilot standards for agentic development.


💡 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.

Copilot AI and others added 3 commits January 22, 2026 09:16
…ith agentic workflow guidelines

Co-authored-by: animeshkundu <7248674+animeshkundu@users.noreply.github.com>
…der agent

Co-authored-by: animeshkundu <7248674+animeshkundu@users.noreply.github.com>
Co-authored-by: animeshkundu <7248674+animeshkundu@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor rule expander agent for GitHub compatibility Refactor rule-expander agent to <3000 chars and enhance copilot-instructions with agentic workflow patterns Jan 22, 2026
Copilot AI requested a review from animeshkundu January 22, 2026 09:28
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