Skip to content

Add Development Constitution (copilot-instructions.md) with Agent-Embedded Skills #4

@tmcclell

Description

@tmcclell

Add Development Constitution (copilot-instructions.md) with Agent-Embedded Skills

Problem

ODrive lacks a copilot-instructions.md file. When developers start new Copilot chat sessions, there's no baseline instruction to establish project values, principles, or guidance on available agents/capabilities.

Proposed Solution

Two-part architecture:

  1. copilot-instructions.md — Development constitution + agent registry

    • Core principles and values (300-400 words)
    • How to use Copilot effectively
    • Directory of available agents with descriptions
    • Single entry point for new chats
  2. Agent files with embedded Skills sections

    • Each agent includes a ## Skills section containing task-specific context
    • Self-contained: agent definition + tactical guidance in one file
    • Auto-loaded when agent is invoked (e.g., @firmware-engineer)
    • No separate primer files; everything is in .github/agents/

Acceptance Criteria

Constitution File

  • Create .github/instructions/copilot-instructions.md
  • Include core principles (~300-400 words)
  • Include "How to use Copilot" section
  • Include agent registry with descriptions
  • Reference agent names (e.g., @firmware-engineer) users can invoke
  • Verify file loads cleanly in Copilot chat (~1-2K tokens)

Agent Skills Sections

Update or create agents with embedded Skills sections:

  • workspace.agent.md: Add "Workspace Development Context" skill
  • project-lead.agent.md: Add "Project Orchestration Context" skill
  • firmware-engineer.agent.md: Add "Firmware Development Context" skill
  • qa-engineer.agent.md: Add "QA & Testing Context" skill (create if missing)
  • hardware-engineer.agent.md: Add "Hardware Design Context" skill
  • motor-control-engineer.agent.md: Add "Motor Control Context" skill

Each Skills Section Should Include

  • Current architecture overview
  • Key constraints and requirements
  • Core responsibilities
  • Key files and responsibilities
  • Relevant code patterns or examples
  • Timing/performance expectations (if applicable)
  • Real-time or domain-specific considerations

Documentation

  • Update README or CONTRIBUTING.md:
    • Link to copilot-instructions.md for new developers
    • Explain how to invoke agents (@agent-name or /slash-command)
  • Add note: "Load copilot-instructions.md in new chat, then use available agents"

Testing

Test Case Action Expected Outcome
Constitution Loading Load copilot-instructions.md in new Copilot chat File is clear, actionable, and under 2K tokens
Agent Invocation Invoke agent (e.g., @firmware-engineer) Skills section loads; agent persona and context are present
Slash Command Test invocation via slash command (e.g., /firmware-optimize) Slash command resolves to agent; agent + skills appear in response
Context Switching Switch between agents mid-chat Context adapts correctly; previous agent context doesn't bleed into new agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions