Skip to content

[workflow-style] Normalize report formatting for daily-safe-output-optimizer #13092

@github-actions

Description

@github-actions

Workflow to Update

Workflow File: .github/workflows/daily-safe-output-optimizer.md
Issue: This workflow generates optimization analysis discussions but doesn't include markdown style guidelines

Required Changes

Update the workflow prompt to include formatting guidelines:

## Report Formatting Guidelines

**CRITICAL**: Follow these formatting guidelines to create well-structured, readable reports:

### 1. Header Levels
**Use h3 (###) or lower for all headers in your report to maintain proper document hierarchy.**

The discussion title serves as h1, so all content headers should start at h3:
- Use `###` for main sections (e.g., "### Optimization Summary", "### Analysis Results")
- Use `####` for subsections (e.g., "#### Issue Creation Patterns", "#### Discussion Usage")
- Never use `##` (h2) or `#` (h1) in the report body

### 2. Progressive Disclosure
**Wrap long sections in `<details><summary><b>Section Name</b></summary>` tags to improve readability and reduce scrolling.**

Use collapsible sections for:
- Per-workflow detailed analysis
- Complete safe-output configuration dumps
- Full workflow file excerpts
- Verbose optimization recommendations

Example:
``````markdown
<details>
<summary><b>Detailed Per-Workflow Analysis</b></summary>

### workflow-1.md

**Current Configuration**:
``````yaml
safe-outputs:
  create-issue:
    expires: 3d

Recommendations:

  • Add max: 1 to prevent duplicate issues
  • Consider close-older-issues: true for cleanup

[Repeat for all workflows...]

``````

3. Report Structure Pattern

Your discussion should follow this structure for optimal readability:

  1. Optimization Summary (always visible): Brief overview of workflows analyzed, key findings, impact
  2. Key Recommendations (always visible): Top 5-10 optimization suggestions with priority
  3. Detailed Analysis (in <details> tags): Per-workflow configuration review and suggestions
  4. Implementation Guide (always visible): Step-by-step instructions for applying changes

Design Principles

Create reports that:

  • Build trust through clarity: Most important recommendations immediately visible
  • Exceed expectations: Add helpful context like best practices, examples, impact analysis
  • Create delight: Use progressive disclosure to reduce overwhelm from verbose configuration details
  • Maintain consistency: Follow the same patterns as other analysis workflows like audit-workflows

#### Add Report Template

``````markdown
## Discussion Report Template

``````markdown
### 🔍 Optimization Summary

Brief 2-3 paragraph summary of the analysis: total workflows reviewed, common patterns found, optimization opportunities identified, and expected impact of changes.

### 📊 Analysis Statistics

- **Workflows Analyzed**: [NUMBER]
- **Workflows Using Safe-Outputs**: [NUMBER]
- **Optimization Opportunities**: [NUMBER]
- **High Priority**: [NUMBER]
- **Medium Priority**: [NUMBER]
- **Low Priority**: [NUMBER]

### 🎯 Key Recommendations

#### High Priority

1. **Add `max` limits to prevent duplicates**
   - Affects: [NUMBER] workflows
   - Examples: [workflow names]
   - Impact: Prevents duplicate issues/discussions

2. **Implement auto-cleanup with `close-older-*`**
   - Affects: [NUMBER] workflows
   - Examples: [workflow names]
   - Impact: Keeps repository tidy

#### Medium Priority

[Additional recommendations...]

### 📋 Common Patterns Found

| Pattern | Count | Recommendation |
|---------|-------|----------------|
| Missing `max` limit | [N] | Add `max: 1` for daily reports |
| No expiration | [N] | Add `expires: Xd` for temp issues |
| No cleanup | [N] | Add `close-older-*: true` |

<details>
<summary><b>Detailed Per-Workflow Analysis</b></summary>

### Category: Daily Reports

#### daily-issues-report.md

**Current Configuration**:
``````yaml
safe-outputs:
  create-discussion:
    expires: 3d
    category: "General"

Recommendations:

  • ✅ Add max: 1 to prevent duplicate discussions
  • ✅ Add close-older-discussions: true for automatic cleanup
  • ℹ️ Consider title-prefix: "[daily issues]" for better organization

Priority: High


daily-team-status.md

[Similar detailed analysis...]


[Continue for all workflows...]

Safe-Output Best Practices Reference

Recommended Patterns by Workflow Type

Daily/Weekly Reports

safe-outputs:
  create-discussion:
    expires: 3d                    # Auto-close after 3 days
    max: 1                         # Only one discussion per run
    close-older-discussions: true  # Clean up previous reports
    title-prefix: "[daily-X]"      # Clear labeling
    category: "Audits"             # Organized by category

Issue Creation

safe-outputs:
  create-issue:
    expires: 7d                    # Week-long issues
    max: 3                         # Limit per run
    labels: [automated, analysis]  # Auto-label
    title-prefix: "[bot]"          # Clear bot identification

Comment Addition

safe-outputs:
  add-comment:
    max: 5                         # Limit comments per run

✅ Implementation Guide

Step 1: Review Recommendations

  1. Review the detailed per-workflow analysis above
  2. Prioritize high-priority changes first
  3. Group similar changes across workflows

Step 2: Apply Changes

For each workflow:

  1. Open the workflow markdown file
  2. Locate the safe-outputs: section
  3. Add recommended configurations
  4. Test with gh aw compile [workflow-name]

Step 3: Validate

  1. Run gh aw compile to verify all workflows compile
  2. Monitor first run of updated workflows
  3. Adjust configurations as needed

📈 Expected Impact

  • Reduced Clutter: Auto-cleanup will remove [NUMBER] old discussions/issues
  • Better Organization: Title prefixes will improve searchability
  • Prevent Duplicates: max limits will prevent [NUMBER] potential duplicates
  • Improved UX: Users will see cleaner, more organized workflow outputs

Report generated automatically by the Daily Safe-Output Optimizer workflow

Example Reference

See audit-workflows for a similar analysis-focused workflow with good progressive disclosure patterns.

Agent Task

Update the workflow file .github/workflows/daily-safe-output-optimizer.md to include the formatting guidelines above.

AI generated by Workflow Normalizer

  • expires on Feb 8, 2026, 12:29 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    cookieIssue Monster Loves Cookies!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions