This is part of a broader set of Copilot agent and learning materials. Check out my projects site to get an overview: https://www.jaysons.dev
Agent Engineer is a declarative Microsoft 365 Copilot agent designed to maintain, evolve, and modularize agent-source files without regressions.
Unlike traditional editing approaches, Agent Engineer applies deterministic, lossless “delta patches” to existing agent instructions. It preserves full structure, formatting, and content integrity while introducing only minimal, targeted changes.
The agent ensures consistency across versions by automatically managing versioning, change logs, and regression checks. In addition, it enables the extraction and reuse of proven instruction components as modular building blocks for scalable agent development.
Maintaining and evolving Copilot agent-source files can introduce risk:
- unintended loss of logic or structure
- inconsistent formatting and broken parsing
- regression through uncontrolled edits
- lack of reusable instruction patterns
- missing versioning and traceability
Agent Engineer addresses these challenges by enforcing strict safety and quality principles:
- patch-only updates (no full rewrites)
- zero-loss guarantees on existing content
- structure and formatting preservation
- deterministic change application
- built-in regression detection
- reusable module extraction
This enables reliable, scalable, and production-grade agent engineering.
- Users provide an existing agent-source file
- A structured CHANGE_REQUEST defines the intended modification
- Agent Engineer applies minimal, targeted edits only
- Version, date, and change log are updated automatically
- A full updated source file is reconstructed in the original format
- Regression checks ensure no unintended changes occurred
- Optional: modules can be extracted or inserted for reuse
Agent Engineer applies a strict patch-only approach:
- no rewriting from scratch
- no removal or reordering of existing content
- minimal diff principle
- full reconstruction of the source
This guarantees safe evolution of agent instructions.
The agent preserves the exact structure of agent-source files:
- section order and hierarchy
- separators and spacing
- formatting and punctuation
- logical block boundaries
This ensures compatibility with downstream processing and parsing.
Before delivering output, Agent Engineer enforces validation gates:
- completeness check
- no-loss validation
- structural integrity verification
- versioning consistency
- visual format compliance (for modified parts)
If any gate fails, the output is internally corrected before delivery.
Agent Engineer compares versions to detect:
- missing elements
- unintended changes
- structural inconsistencies
Outputs are classified as:
- SAFE
- RISKY
- BROKEN
Proven instruction components can be exported as reusable modules:
- clearly defined boundaries
- low coupling recommendations
- reusable building blocks for future agents
This enables modular, scalable agent design.
Agent Engineer supports structured change design:
- target section definition
- precise change type
- exact requirement specification
- acceptance criteria validation
If input is unclear, the agent asks one targeted question before proceeding.
A built-in review mode evaluates agent sources for:
- robustness
- reliability
- structural quality
- regression risk
Outputs are intentionally conservative and highlight only meaningful improvements.
Typical scenarios include:
- updating existing agent instructions safely
- refactoring without breaking structure
- introducing new rules or sections
- exporting reusable instruction modules
- validating agent robustness before deployment
- Adding a new feature without breaking existing logic
- Refactoring a section while preserving formatting
- Extracting a reusable “quality gate” module
- Validating that a patch did not introduce regressions
- Preparing agent sources for scalable reuse