Skip to content

Fix YAML parsing issues and Python errors in AI orchestration and matrix verification workflows - now all 6 workflows active #8

Fix YAML parsing issues and Python errors in AI orchestration and matrix verification workflows - now all 6 workflows active

Fix YAML parsing issues and Python errors in AI orchestration and matrix verification workflows - now all 6 workflows active #8

---
name: πŸ€– Copilot Documentation Agent
on:
push:
branches: [main, develop]
paths:
- '**/*.md'
- '**/*.py'
- '**/*.js'
- '**/*.ts'
- '**/*.json'
- '**/*.yml'
- '**/*.yaml'
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
instruction:
description: 'Instruction for Copilot Agent'
required: true
default: 'Update documentation following established standards'
type: string
target_files:
description: 'Specific files to focus on (optional)'
required: false
type: string
update_scope:
description: 'Scope of update'
required: true
default: 'comprehensive'
type: choice
options:
- comprehensive
- knowledge_graph_only
- frontmatter_only
- structure_only
- validation_only
jobs:
invoke-copilot-agent:
name: πŸš€ Invoke Copilot Documentation Agent
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: πŸ” Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: πŸ“‹ Prepare Copilot Instructions
run: |
echo "Preparing detailed instructions for Copilot Agent..."
cat > copilot_instructions.md << 'EOF'
# Copilot Agent Documentation Update Instructions
## Repository Context
- **Repository**: ${{ github.repository }}
- **Branch**: ${{ github.ref_name }}
- **Triggered by**: ${{ github.actor }}
- **Timestamp**: $(date '+%Y-%m-%d %H:%M:%S UTC')
## User Instruction
${{ github.event.inputs.instruction || 'Update documentation following established standards' }}
## Update Scope
${{ github.event.inputs.update_scope || 'comprehensive' }}
## Target Files
${{ github.event.inputs.target_files || 'All documentation files' }}
## Established Documentation Standards
### Required YAML Frontmatter Structure
```yaml
---
title: "Clear, Descriptive Title"
description: "One-sentence summary of content"
version: "X.Y"
last_updated: "YYYY-MM-DD"
audience: ["primary_audience", "secondary_audience"]
priority: "essential|important|advanced|specialized"
reading_time: "X minutes"
tags: ["tag1", "tag2", "tag3"]
---
```
### Documentation Quality Requirements
1. **Every .md file must have proper YAML frontmatter**
2. **Long documents need "Quick Navigation" sections**
3. **Use consistent tagging and categorization**
4. **Maintain cross-references between related documents**
5. **Update last_updated dates when content changes**
6. **Follow writing standards in CONTRIBUTING.md**
7. **Validate all internal links**
8. **Apply consistent formatting and hierarchy**
### Key Files to Maintain
- `VOITHER_Knowledge_Graph_Updated.md` - Central knowledge repository
- `DOCUMENTATION_INDEX.md` - Complete file catalog with statistics
- `TABLE_OF_CONTENTS.md` - Navigation guide
- `README.md` - Project overview and entry point
- `GETTING_STARTED.md` - Role-based orientation
### Automation Integration Points
- Update knowledge graph with new information
- Regenerate documentation statistics
- Validate and fix broken links
- Ensure frontmatter compliance
- Maintain navigation consistency
## Success Criteria
After completion, the documentation should:
- βœ… Have consistent metadata across all files
- βœ… Include updated knowledge graph entries
- βœ… Pass all link validation checks
- βœ… Maintain clear navigation paths
- βœ… Follow established writing standards
- βœ… Be machine-readable and automation-friendly
## Please proceed with the documentation updates following these guidelines.
EOF
echo "Instructions prepared for Copilot Agent"
cat copilot_instructions.md
- name: 🏷️ Create Issue for Copilot Agent
uses: actions/github-script@v7
id: create_issue
with:
script: |
const fs = require('fs');
// Read the prepared instructions
const instructions = fs.readFileSync('copilot_instructions.md', 'utf8');
// Create issue for Copilot Agent
const issue = await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `πŸ€– Documentation Update Request - ${new Date().toISOString().split('T')[0]}`,
body: instructions,
labels: ['documentation', 'copilot-agent', 'automation']
});
// Tag Copilot in a comment
const instruction = context.payload.inputs?.instruction || 'Update documentation following established standards';
const updateScope = context.payload.inputs?.update_scope || 'comprehensive';
const targetFiles = context.payload.inputs?.target_files || '';
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.data.number,
body: `@copilot ${instruction}\n\nScope: ${updateScope}${targetFiles ? `\nTarget files: ${targetFiles}` : ''}`
});
console.log(`Created issue #${issue.data.number} for Copilot Agent`);
return issue.data.number;
- name: πŸ“Š Generate Current Documentation State
run: |
echo "Generating current documentation state for Copilot reference..."
echo "## Current Documentation Statistics" > current_state.md
echo "- **Total .md files**: $(find . -name "*.md" | wc -l)" >> current_state.md
echo "- **Total lines**: $(cat *.md **/*.md 2>/dev/null | wc -l)" >> current_state.md
echo "- **Files with frontmatter**: $(grep -l "^---$" *.md **/*.md 2>/dev/null | wc -l)" >> current_state.md
echo "- **Last update**: $(date '+%Y-%m-%d %H:%M:%S UTC')" >> current_state.md
echo "" >> current_state.md
echo "## Files Structure" >> current_state.md
find . -name "*.md" -type f | sort >> current_state.md
cat current_state.md
- name: πŸ”” Workflow Summary
run: |
echo "πŸ“š Copilot Documentation Agent workflow completed"
echo "🎯 Issue created for Copilot Agent: #${{ steps.create_issue.outputs.result }}"
echo "πŸ“‹ Instructions: ${{ github.event.inputs.instruction || 'Update documentation following established standards' }}"
echo "πŸ”§ Scope: ${{ github.event.inputs.update_scope || 'comprehensive' }}"
echo "πŸ“ Target files: ${{ github.event.inputs.target_files || 'All documentation files' }}"
echo "⏰ Timestamp: $(date '+%Y-%m-%d %H:%M:%S UTC')"