Skip to content

fix(agents): convert YAML frontmatter arrays to block-style for Windows compatibility#895

Merged
rjmurillo merged 10 commits into
mainfrom
fix/tools-frontmatter
Jan 13, 2026
Merged

fix(agents): convert YAML frontmatter arrays to block-style for Windows compatibility#895
rjmurillo merged 10 commits into
mainfrom
fix/tools-frontmatter

Conversation

@rjmurillo-bot

@rjmurillo-bot rjmurillo-bot commented Jan 13, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

Convert YAML frontmatter arrays from inline syntax to block-style format across all agent files to fix Windows YAML parsing errors ("Unexpected scalar at node end").

Specification References

Type Reference Description
Issue Fixes #893 YAML inline array syntax causes Windows parsing errors
ADR .agents/architecture/ADR-040-skill-frontmatter-standardization.md Skill frontmatter standardization (amended)

Changes

Parser/Formatter Improvements

  • build/Generate-Agents.Common.psm1: Fixed variable shadowing ($matches$itemMatches)
  • build/Generate-Agents.Common.psm1: Added input validation with [ValidateNotNullOrEmpty()]
  • build/Generate-Agents.Common.psm1: Added warning for orphaned array items (prevents silent data loss)
  • build/Generate-Agents.Common.psm1: Added type coercion handling with verbose logging
  • build/Generate-Agents.Common.psm1: Added parse failure detection with fallback

Test Coverage

  • build/tests/Generate-Agents.Tests.ps1: Added 4 tests for block-style array parsing
  • build/tests/Generate-Agents.Tests.ps1: Added 4 tests for block-style array output

Template Updates

  • templates/agents/*.shared.md: Converted all 18 template files to block-style arrays
  • templates/README.md: Updated documentation examples to show block-style format

Generated Files

  • src/vs-code-agents/*.agent.md: Regenerated 27 VS Code agent files
  • src/copilot-cli/*.agent.md: Regenerated 27 Copilot CLI agent files
  • .github/agents/pr-comment-responder.prompt.md: Fixed inline array to block-style

ADR Amendment

  • ADR-040: Added amendment documenting block-style array requirement for Windows compatibility

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update
  • Infrastructure/CI change
  • Refactoring (no functional changes)

Testing

  • Tests added/updated
  • Manual testing completed
  • No testing required (documentation only)

Test Results: All 32 Pester tests pass

Agent Review

Security Review

  • No security-critical changes in this PR

Other Agent Reviews

  • Architect reviewed design changes
  • Critic validated implementation plan
  • QA verified test coverage

Full Quality Gate Results:

Agent Verdict
🔒 Security ✅ PASS
🧪 QA ✅ PASS
📊 Analyst ✅ PASS
📐 Architect ✅ PASS
⚙️ DevOps ✅ PASS
🗺️ Roadmap ✅ PASS

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated (if applicable)
  • No new warnings introduced

Related Issues

Fixes #893


🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

…ws compatibility

Convert inline array syntax `tools: ['a', 'b']` to block-style format across
all agent templates and generated files to fix Windows YAML parsing errors.

Changes:
- Update 18 template files to use block-style arrays
- Regenerate 54 agent files for VS Code and Copilot CLI
- Update parser to handle block-style arrays in input
- Update formatter to output block-style arrays
- Add 8 new tests for array parsing and formatting
- Fix silent failure paths with proper warnings
- Update ADR-040 with YAML array format requirements
- Update documentation examples

Fixes: Windows "Unexpected scalar at node end" errors during agent installation

Closes #893

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 18:41
@github-actions github-actions Bot added bug Something isn't working agent-orchestrator Task coordination agent agent-analyst Research and investigation agent agent-architect Design and ADR agent agent-implementer Code implementation agent agent-planner Milestone and work package agent agent-critic Plan validation agent agent-qa Testing and verification agent agent-security Security assessment agent agent-devops CI/CD pipeline agent agent-roadmap Product vision agent agent-explainer Documentation agent agent-memory Context persistence agent agent-retrospective Learning extraction agent area-prompts Agent prompts and templates area-infrastructure Build, CI/CD, configuration automation Automated workflows and processes labels Jan 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Validation Report

Note

Status: PASS

Description Validation

Check Status
Description matches diff PASS

QA Validation

Check Status
Code changes detected True
QA report exists false

⚡ Warnings

  • QA report not found for code changes (recommended before merge)

Powered by PR Validation workflow

@github-actions

github-actions Bot commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

AI Quality Gate Review

Tip

Final Verdict: PASS

Walkthrough

This PR was reviewed by six AI agents in parallel, analyzing different aspects of the changes:

  • Security Agent: Scans for vulnerabilities, secrets exposure, and security anti-patterns
  • QA Agent: Evaluates test coverage, error handling, and code quality
  • Analyst Agent: Assesses code quality, impact analysis, and maintainability
  • Architect Agent: Reviews design patterns, system boundaries, and architectural concerns
  • DevOps Agent: Evaluates CI/CD, build pipelines, and infrastructure changes
  • Roadmap Agent: Assesses strategic alignment, feature scope, and user value

Review Summary

Agent Verdict Category Status
Security PASS N/A
QA PASS N/A
Analyst PASS N/A
Architect PASS N/A
DevOps PASS N/A
Roadmap PASS N/A

💡 Quick Access: Click on individual agent jobs (e.g., "🔒 security Review", "🧪 qa Review") in the workflow run to see detailed findings and step summaries.

Security Review Details

Based on my review of the changed files, I can now provide the security assessment.

Security Review: PR #895

PR Type Detection

Category Files Count
CODE build/Generate-Agents.Common.psm1, tests/Generate-Agents.Tests.ps1 2
DOCS *.md files (templates, analysis, ADRs, memories, generated agents) ~80+
CONFIG .gitignore 1

Primary Category: DOCS with supporting CODE changes.

Analysis

1. PowerShell Code Review (Generate-Agents.Common.psm1)

Security Controls Present:

  • Test-PathWithinRoot function at lines 14-44 prevents path traversal attacks (CWE-22)
  • Input validation with [ValidateNotNullOrEmpty()] at line 84
  • Proper string matching without unsafe interpolation

Changes Reviewed:

  • Variable renaming $matches$itemMatches (line 289): Prevents shadowing of built-in variable
  • Added orphaned array item warning (line 118): Improves error detection
  • Block-style array output: No security implications

2. Test Coverage (Generate-Agents.Tests.ps1)

  • Path traversal security tests present (lines 48-69)
  • New tests for block-style array parsing: No security implications
  • No test fixtures contain real credentials

3. Generated Agent Files

  • All *.agent.md and *.shared.md files contain agent prompts
  • No credentials, API keys, or secrets detected
  • YAML frontmatter contains only tool names and model identifiers

4. Configuration (.gitignore)

  • Properly excludes .env* files (line 36)
  • No security-sensitive paths exposed

Findings

Severity Category Finding Location CWE
None - No security issues identified - -

Recommendations

None required. The code maintains existing security controls and introduces no new attack surface.

Verdict

VERDICT: PASS
MESSAGE: PR contains YAML formatting changes and documentation updates. PowerShell code maintains path traversal protection. No credentials or security-sensitive patterns detected.
QA Review Details

Based on my analysis, I can now provide the QA verdict:


QA Review Verdict

VERDICT: PASS
MESSAGE: Tests pass, block-style arrays correctly implemented, defensive code paths present.

PR TYPE: MIXED
FILES:
  - CODE: build/Generate-Agents.Common.psm1, tests/Generate-Agents.Tests.ps1
  - DOCS: .agents/*, templates/README.md, scripts/README.md, .serena/memories/*
  - CONFIG: .gitignore
  - GENERATED: src/vs-code-agents/*.agent.md, src/copilot-cli/*.agent.md, .github/agents/*.agent.md

Test Coverage Assessment

Area Status Evidence Files Checked
Unit tests Adequate 32 tests in tests/Generate-Agents.Tests.ps1 build/Generate-Agents.Common.psm1
Edge cases Covered Block-style arrays (L176-225), quoted items (L188-198), mixed arrays (L213-224) Tests file
Error paths Tested Orphaned array warning (L118), null handling (L270-273), parse fallback (L301-304) Common module
Assertions Present All tests use Should assertions Tests file

Quality Concerns

Severity Issue Location Evidence Required Fix
LOW Untested defensive paths Generate-Agents.Common.psm1:118, 270-278 Orphaned array warning, null/type handling not exercised Follow-up PR

Regression Risk Assessment

  • Risk Level: Low - Changes are additive (new parsing capability), not breaking existing behavior
  • Affected Components: build/Generate-Agents.Common.psm1 (parser/formatter), templates/*.shared.md, generated agent files
  • Breaking Changes: None - inline arrays still supported for backwards compatibility
  • Required Testing: Block-style array parsing/output (covered by 8 new tests)

Evidence

Tests found: 32 tests for 7 exported functions
New tests added: 8 tests specifically for block-style array handling:

  • ConvertFrom-SimpleFrontmatter block-style tests (L176-225): 4 tests
  • Format-FrontmatterYaml block-style tests (L341-383): 4 tests

Edge cases verified:

  • Block-style with hyphens (L176-186)
  • Quoted items in block arrays (L188-198)
  • Array followed by other fields (L200-211)
  • Mixed inline/block arrays (L213-224)

Error handling confirmed:

  • Input validation: [ValidateNotNullOrEmpty()] at L84
  • Orphaned array warning: L117-119
  • Null value handling: L270-273
  • Type coercion: L275-278
  • Parse failure fallback: L301-304

Generated output validated:

  • VS Code agents (L1-24): Block-style tools array
  • Copilot CLI agents (L1-22): Block-style tools array
  • GitHub agents (L1-13): Block-style tools array

Pre-existing QA validation: .agents/qa/pre-pr-validation-frontmatter-block-style.md shows 32/32 tests passed with APPROVED verdict.

Analyst Review Details

Let me view the PR diff and key changed files to complete the analysis.

I have sufficient information to complete the analysis.


PR #895 Analysis: YAML Frontmatter Array Format Conversion

Code Quality Score

Criterion Score (1-5) Notes
Readability 5 Clear variable names, well-documented functions
Maintainability 5 Single responsibility functions, proper module structure
Consistency 5 Follows existing PowerShell patterns, maintains field ordering
Simplicity 4 Regex parsing is appropriate for simple YAML; avoids full YAML library dependency

Overall: 4.75/5

Impact Assessment

  • Scope: System-wide (54 generated files + 18 templates + parser module)
  • Risk Level: Low
  • Affected Components: Agent template system, YAML frontmatter parser, all platform-specific agent files

Findings

Priority Category Finding Location
Low Documentation ADR-040 amendment correctly documents rationale and cross-platform compatibility ADR-040:388-406
Low Testing 8 new tests added covering block-style array parsing and output Generate-Agents.Tests.ps1:176-225, 341-383
Low Code Quality Fixed potential variable shadowing ($matches to $itemMatches) Generate-Agents.Common.psm1:289
Low Robustness Added input validation with [ValidateNotNullOrEmpty()] Generate-Agents.Common.psm1:84
Low Robustness Added warning for orphaned array items (prevents silent data loss) Generate-Agents.Common.psm1:118
Low Robustness Added parse failure detection with fallback Generate-Agents.Common.psm1:303-305

Recommendations

  1. None. The implementation is solid, addresses a real Windows compatibility issue, and includes appropriate test coverage.

Analysis Summary

Problem Addressed: Windows YAML parsers fail on inline array syntax ['item1', 'item2'] with "Unexpected scalar at node end" errors.

Solution Quality:

  • Parser (ConvertFrom-SimpleFrontmatter) correctly handles both inline and block-style input
  • Formatter (Format-FrontmatterYaml) outputs block-style arrays universally
  • Backward compatible: existing inline arrays in source files still parse correctly
  • Forward compatible: all output uses cross-platform block-style format

Test Coverage: 8 new tests verify:

  • Block-style array parsing (4 tests)
  • Block-style array output formatting (4 tests)

Documentation: ADR-040 amendment documents the decision with rationale.

Verdict

VERDICT: PASS
MESSAGE: Well-structured fix for Windows YAML compatibility with proper test coverage and documentation. Parser improvements add robustness without breaking existing functionality.
Architect Review Details

Based on my review of the PR changes, ADR documentation, and existing design review, I can provide my architectural assessment.

Design Quality Assessment

Aspect Rating (1-5) Notes
Pattern Adherence 5 SOLID principles maintained, DRY with shared module, KISS with layered parsing
Boundary Respect 5 Clear separation: parsing/transformation/formatting layers
Coupling 5 Module has 2 consumers, 0 external dependencies
Cohesion 5 Each function has single, clear purpose (functional cohesion)
Extensibility 4 Extension points exist but regex-based parsing limits YAML complexity

Overall Design Score: 4.8/5

Architectural Concerns

Severity Concern Location Recommendation
Low Empty array edge case not tested tests/Generate-Agents.Tests.ps1 Add test for tools: with no items
Low Inline arrays in template README example templates/README.md:199-200 Update to block-style format

Breaking Change Assessment

  • Breaking Changes: No
  • Impact Scope: None
  • Migration Required: No
  • Migration Path: N/A

Technical Debt Analysis

  • Debt Added: Low (regex complexity for YAML parsing)
  • Debt Reduced: Medium (Windows compatibility gap closed, array format documented)
  • Net Impact: Improved

ADR Assessment

  • ADR Required: No (amendment to existing ADR-040 is appropriate)
  • Decisions Identified: Block-style YAML arrays for cross-platform compatibility
  • Existing ADR: ADR-040-skill-frontmatter-standardization.md (amended)
  • Recommendation: N/A - amendment properly documents the decision with rationale

Recommendations

  1. Update templates/README.md lines 199-200 to use block-style arrays in the example (consistency with new standard)

Verdict

VERDICT: PASS
MESSAGE: Well-designed, well-tested change that solves Windows YAML parsing compatibility while maintaining architectural integrity. Follows ADR-005 (PowerShell-only), ADR-006 (testable modules), and ADR-036 (two-source architecture). ADR-040 amendment properly documents the decision.
DevOps Review Details

Based on my analysis, I can now provide the DevOps review.

PR Scope Detection

Category Detected
WORKFLOW No - no .github/workflows/ changes
ACTION No - no .github/actions/ changes
SCRIPT No - no scripts/*.sh or scripts/*.ps1 changes
TEMPLATE Yes - .github/agents/*.prompt.md files
CODE Yes - build/Generate-Agents.Common.psm1, tests/Generate-Agents.Tests.ps1
DOCS Yes - documentation and analysis files
CONFIG No

This PR primarily changes PowerShell build modules, test files, and agent template/generated files. No CI/CD workflow changes.


Pipeline Impact Assessment

Area Impact Notes
Build Low Generate-Agents.Common.psm1 module updated with improved parsing
Test Low New tests added (8 new tests for block-style arrays)
Deploy None No deployment configuration changes
Cost None No runner or execution changes

CI/CD Quality Checks

Check Status Location
YAML syntax valid N/A No workflow files changed
Actions pinned N/A No workflow files changed
Secrets secure N/A No secrets handling changed
Permissions minimal N/A No workflow files changed
Shell scripts robust build/Generate-Agents.Common.psm1

PowerShell Module Quality Review

Check Status Location
Input validation Line 84-85: [ValidateNotNullOrEmpty()] added
Error handling Line 118: Warning for orphaned array items
Type handling Lines 272-278: Non-string type coercion with verbose logging
Parse failure handling Lines 303-305: Fallback for parse failures
Variable shadowing fix Line 289: $matches$itemMatches

Findings

Severity Category Finding Location Fix
None - No DevOps issues detected - -

Template Assessment

  • PR Template: N/A - not modified
  • Issue Templates: N/A - not modified
  • Agent Templates: Block-style YAML arrays correctly formatted across all 18 template files and 55 generated files

Automation Opportunities

Opportunity Type Benefit Effort
None identified - - -

The changes improve Windows compatibility for YAML parsing without impacting CI/CD infrastructure.

Recommendations

  1. No CI/CD changes needed - module improvements are correctly scoped to build tooling

VERDICT: PASS
MESSAGE: Build module improvements add input validation and error handling. No workflow or pipeline changes. PowerShell code follows best practices with proper validation and type handling.
Roadmap Review Details

Based on my review of the PR, ADR-040, and product roadmap, I can now provide the strategic alignment assessment.

Strategic Alignment Assessment

Criterion Rating Notes
Aligns with project goals High Fixes Windows compatibility bug blocking adoption; supports Master Product Objective of "minimal friction" installation
Priority appropriate High Bug fix addressing user-reported issue #893; enables cross-platform deployment
User value clear High Unblocks Windows users who cannot parse agent files with inline YAML arrays
Investment justified High Parser improvements prevent future parsing errors; 8 new tests increase regression protection

Feature Completeness

  • Scope Assessment: Right-sized
  • Ship Ready: Yes
  • MVP Complete: Yes
  • Enhancement Opportunities: None identified; comprehensive fix covering templates, parser, generated files, and documentation

Impact Analysis

Dimension Assessment Notes
User Value High Removes installation blocker for Windows users
Business Impact Medium Prevents adoption friction on Windows; 30-40% of developers use Windows
Technical Leverage High Parser improvements (input validation, orphan detection, fallback handling) benefit all future frontmatter parsing
Competitive Position Improved Cross-platform compatibility is table stakes for developer tooling

Concerns

Priority Concern Recommendation
Low Large file count (54 generated files) inflates PR size Acceptable: auto-generated from 18 templates; one-time cleanup

Recommendations

  1. Merge without delay - Bug fixes that unblock users should ship immediately
  2. ADR-040 amendment is appropriate - Documents the rationale for block-style arrays as architectural guidance

Verdict

VERDICT: PASS
MESSAGE: Fix aligns with Master Product Objective (minimal friction installation). Removes Windows adoption blocker. Parser improvements add defensive robustness. Investment proportionate to impact.

Run Details
Property Value
Run ID 20976027956
Triggered by pull_request on 895/merge
Commit d88cf9c69fd5ea5b6b0d2f00ae909041fa3e0bb3

Powered by AI Quality Gate workflow

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 standardizes YAML frontmatter arrays to block-style format across all agent templates and generated files, resolving Windows YAML parser compatibility issues while maintaining backward compatibility.

Changes:

  • Converted 78 files from inline array syntax ['item1', 'item2'] to block-style format with hyphen-bulleted items
  • Updated PowerShell parser to handle both inline and block-style arrays on input, always output block-style format
  • Added 8 comprehensive test cases covering block-style parsing, mixed formats, and edge cases
  • Amended ADR-040 with YAML Array Format standardization and rationale

Reviewed changes

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

Show a summary per file
File Description
build/Generate-Agents.Common.psm1 Updated parser to handle block-style arrays and formatter to output block-style format
build/tests/Generate-Agents.Tests.ps1 Added 8 new tests for block-style array parsing and formatting
templates/agents/*.shared.md (18 files) Converted tools_vscode and tools_copilot arrays from inline to block-style
src/vs-code-agents/*.agent.md (18 files) Generated files now use block-style tools arrays
src/copilot-cli/*.agent.md (18 files) Generated files now use block-style tools arrays
.github/agents/*.agent.md (18 files) Generated files now use block-style tools arrays
.github/agents/pr-comment-responder.prompt.md Converted tools array to block-style for consistency
.agents/architecture/ADR-040-skill-frontmatter-standardization.md Added YAML Array Format section documenting block-style requirement and rationale
templates/README.md Updated frontmatter examples to use block-style arrays
scripts/README.md Fixed duplicate Validate-SessionJson.ps1 section
.agents/qa/pre-pr-validation-frontmatter-block-style.md Pre-PR QA validation report (APPROVED)
.agents/devops/ci-validation-2026-01-13.md DevOps review report (PASS)
.agents/architecture/DESIGN-REVIEW-frontmatter-array-conversion.md Architecture review report (PASS)
.agents/analysis/NNN-frontmatter-block-arrays-analysis.md Analyst investigation report
.agents/.hook-state/memory-first-counter.txt Hook state tracking file

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates numerous agent definition files to use a block-style YAML array format for the tools list, intended to improve Windows compatibility. The core logic changes are in build/Generate-Agents.Common.psm1, which is updated to parse and generate this new format. While the changes are generally good and include new tests, I've identified a significant maintainability and correctness issue in the Format-FrontmatterYaml function. The regex-based parser for inline arrays is brittle. I've suggested replacing it with a more robust implementation using PowerShell's ConvertFrom-Json cmdlet and also proposed a larger refactoring to improve the overall design by using native arrays instead of string representations for frontmatter values.

Comment thread build/Generate-Agents.Common.psm1
Comment thread .agents/.hook-state/memory-first-counter.txt Outdated
Comment thread .agents/analysis/826-frontmatter-block-arrays-analysis.md
Comment thread .agents/architecture/ADR-040-skill-frontmatter-standardization.md
Comment thread scripts/README.md
Multi-agent debate review for retroactive ADR-040 amendment validation.

Result: 5 ACCEPT, 1 DISAGREE AND COMMIT (consensus achieved)

Key findings:
- Amendment correctly addresses Windows YAML parsing errors
- Block-style arrays are universally compatible
- P0 deferred: CRLF line endings investigation (separate concern)

Debate participants: architect, critic, independent-thinker,
security, analyst, high-level-advisor

Co-Authored-By: Claude <noreply@anthropic.com>
Session 826: Fix Windows YAML parsing errors (issue #893)

Artifacts:
- .agents/critique/ADR-040-amendment-2026-01-13-debate-log.md

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 87 out of 88 changed files in this pull request and generated no new comments.

rjmurillo and others added 2 commits January 13, 2026 12:25
Resolved conflict in scripts/README.md by keeping consolidated
documentation (removed duplicate Validate-SessionJson.ps1 sections).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Retrospective analysis of fix/tools-frontmatter branch work:
- 6 atomic learnings extracted (85-95% atomicity)
- 10 success patterns identified
- 4 near misses documented
- 87.5% success rate

Memory files created:
- learnings-2026-01.md: Session 826 learning extraction
- patterns-yaml-compatibility.md: Block-style arrays for cross-platform
- patterns-powershell-pitfalls.md: Variable shadowing detection
- patterns-multi-agent-consensus.md: DISAGREE AND COMMIT pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 20:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 92 out of 93 changed files in this pull request and generated 2 comments.

Comment thread .agents/architecture/ADR-040-skill-frontmatter-standardization.md
Comment thread .agents/architecture/ADR-040-skill-frontmatter-standardization.md
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 13, 2026
Comment thread tests/Generate-Agents.Tests.ps1
Relocate test file from build/tests/ to root tests/ directory
per project convention (all Pester tests in tests/).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 21:13
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 92 out of 93 changed files in this pull request and generated no new comments.

claude Bot added a commit that referenced this pull request Jan 13, 2026
- Add .gitattributes rules for *.agent.md, *.prompt.md, *.shared.md
- Enforce LF for all markdown in .claude/ and .github/agents/ directories
- Enforce LF for YAML files (*.yml, *.yaml) - sensitive to line endings
- Enforce LF for XML templates in .claude/ directory
- Prevents YAML frontmatter parsing errors on Windows (Copilot CLI issues #694, #673)
- Supports multiple agent platforms: Copilot, Codex, Droid, Claude Code
- Follows precedent from *.skill files (ADR-019)

This is a comprehensive fix beyond the original scope to ensure all
agent-related files work correctly on Windows. Addresses feedback from
@rjmurillo that PR #895 is experiencing line ending issues.

Note: Normalization of existing files (git add --renormalize .) should
be done in a separate PR after reviewing these attribute changes.

Fixes #896
Related: #895, #897

Co-authored-by: Richard Murillo <rjmurillo@users.noreply.github.com>
Resolved 56 conflicts by keeping block-style YAML arrays from our
branch (the fix for Windows YAML parsing - issue #893).

Main had regenerated agents with inline arrays, our branch has
the corrected block-style format per ADR-040 amendment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the needs-split PR has too many commits and should be split label Jan 13, 2026
@rjmurillo rjmurillo added the commit-limit-bypass Allows PR to exceed 20 commit limit label Jan 13, 2026
@rjmurillo rjmurillo merged commit 277a8da into main Jan 13, 2026
57 checks passed
@rjmurillo rjmurillo deleted the fix/tools-frontmatter branch January 13, 2026 23:20
@github-actions github-actions Bot added this to the 0.2.0 milestone Jan 13, 2026
rjmurillo added a commit that referenced this pull request Jan 14, 2026
* fix(agents): convert YAML frontmatter arrays to block-style for Windows compatibility

Convert inline array syntax `tools: ['a', 'b']` to block-style format across
all agent templates and generated files to fix Windows YAML parsing errors.

Changes:
- Update 18 template files to use block-style arrays
- Regenerate 54 agent files for VS Code and Copilot CLI
- Update parser to handle block-style arrays in input
- Update formatter to output block-style arrays
- Add 8 new tests for array parsing and formatting
- Fix silent failure paths with proper warnings
- Update ADR-040 with YAML array format requirements
- Update documentation examples

Fixes: Windows "Unexpected scalar at node end" errors during agent installation

Closes #893

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs(adr): add debate log for ADR-040 YAML array format amendment

Multi-agent debate review for retroactive ADR-040 amendment validation.

Result: 5 ACCEPT, 1 DISAGREE AND COMMIT (consensus achieved)

Key findings:
- Amendment correctly addresses Windows YAML parsing errors
- Block-style arrays are universally compatible
- P0 deferred: CRLF line endings investigation (separate concern)

Debate participants: architect, critic, independent-thinker,
security, analyst, high-level-advisor

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(session): add session log for YAML array format standardization

Session 826: Fix Windows YAML parsing errors (issue #893)

Artifacts:
- .agents/critique/ADR-040-amendment-2026-01-13-debate-log.md

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(pr-review): address PR #895 review comments

- Remove .agents/.hook-state/ from tracking and add to .gitignore
- Rename analysis file from NNN to 826 (correct session number)
- Fix ADR-040 file count: 18 templates + 54 generated files (not 18+18)
- Fix ADR-040 session reference: 826 (not 825)
- Add comment about regex comma limitation in array parsing

Also adds analysis artifacts from ADR-040 review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs(session): update session log with PR review work

- Added work log entries for PR #895 review comment resolution
- Updated ending commit to bce23f0
- Updated next steps to reflect completed PR review

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs(retrospective): add session 826 retrospective and memory files

Retrospective analysis of fix/tools-frontmatter branch work:
- 6 atomic learnings extracted (85-95% atomicity)
- 10 success patterns identified
- 4 near misses documented
- 87.5% success rate

Memory files created:
- learnings-2026-01.md: Session 826 learning extraction
- patterns-yaml-compatibility.md: Block-style arrays for cross-platform
- patterns-powershell-pitfalls.md: Variable shadowing detection
- patterns-multi-agent-consensus.md: DISAGREE AND COMMIT pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(tests): move Generate-Agents.Tests.ps1 to tests/ directory

Relocate test file from build/tests/ to root tests/ directory
per project convention (all Pester tests in tests/).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs(memory): add session 826 retrospective learnings and memory index updates

Adds six new atomic memory files extracted from session 826 retrospective:
- adr-artifact-count-verification: Verify git diff stats match ADR text
- adr-retroactive-amendment-criteria: Emergency concurrent ADR documentation criteria
- consensus-disagree-and-commit-pattern: Multi-agent debate resolution with follow-up issues
- powershell-variable-shadowing-detection: Grep for automatic variables before testing
- pr-review-batch-response-pattern: Single commit for all review comments
- retrospective-artifact-efficiency-pattern: Create artifacts during execution (60-70% time savings)

Updates memory index files to reference new patterns with improved keyword mappings.

Includes markdown formatting fix for direct-reports-extraction-prompt.md (code fence language identifier).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-analyst Research and investigation agent agent-architect Design and ADR agent agent-critic Plan validation agent agent-devops CI/CD pipeline agent agent-explainer Documentation agent agent-implementer Code implementation agent agent-memory Context persistence agent agent-orchestrator Task coordination agent agent-planner Milestone and work package agent agent-qa Testing and verification agent agent-retrospective Learning extraction agent agent-roadmap Product vision agent agent-security Security assessment agent area-infrastructure Build, CI/CD, configuration area-prompts Agent prompts and templates automation Automated workflows and processes bug Something isn't working commit-limit-bypass Allows PR to exceed 20 commit limit needs-split PR has too many commits and should be split triage:approved Human has triaged and approved bot responses for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YAML parsing error on *.agent.md files

3 participants