Skip to content

feat: Reporting Agent v2 — multi-repository support with automatic context detection - #2498

Merged
ashleyshaw merged 5 commits into
developfrom
copilot/reporting-agent-v2-multi-repo-support
Sep 3, 2026
Merged

feat: Reporting Agent v2 — multi-repository support with automatic context detection#2498
ashleyshaw merged 5 commits into
developfrom
copilot/reporting-agent-v2-multi-repo-support

Conversation

Copilot AI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades Reporting Agent to v2.0 with zero-config repository type detection and context-aware report templates, replacing single-template approach with five typed scaffolds for the full LightSpeed repository landscape.

Changes Made

Added

  • Context detection (agents/metadata-agent/lib/context/repo-context-detector.js)

    • RepoContextDetector class for automatic repo type detection
    • Detection signals: .php + block.json, theme.json, Dockerfile files
    • GitHub topic metadata support
    • Priority-based detection: control-plane → block-plugin → block-theme → platform → unknown
  • Repository-aware templates (agents/metadata-agent/lib/templates/repo-templates.js)

    • Five typed Markdown templates with domain-specific sections:
      • block-plugin — Plugin Health, Block Inventory, Security & Compliance
      • block-theme — Theme Health, Design System, Accessibility Checks
      • control-plane — Agent & Automation Health, Workflow Activity, Metrics
      • platform — Infrastructure Health, Deployment Activity
      • unknown — Generic fallback
  • Agent prompt spec (/.github/agents/reporting.agent.md)

    • Bumped to v2.0 with Multi-Repository Support section
    • Type detection signals documentation
    • Updated conversation flow
  • Project documentation

    • SPECIFICATION.md — OpenSpec architecture with component diagram
    • PLANNING.md — Phase planning with deliverables and success criteria
  • Unit tests — Full coverage of context detector and all templates

Linked Issue

Resolves #1898


🤖 Generated with Claude Code

Copilot AI linked an issue Aug 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add multi-repository support for Reporting Agent v2 feat: Reporting Agent v2 — multi-repository support with automatic context detection Aug 29, 2026
Copilot AI requested a review from ashleyshaw August 29, 2026 15:45
@ashleyshaw
ashleyshaw requested a lite review from Copilot August 29, 2026 16:17

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ashleyshaw
ashleyshaw marked this pull request as ready for review August 29, 2026 16:31
@ashleyshaw
ashleyshaw enabled auto-merge (squash) August 29, 2026 16:54
@github-actions

Copy link
Copy Markdown
Contributor

📄 README Validation

❌ One or more README checks failed.

Check Result
❌ Frontmatter Failed
✅ Structure Passed

@github-actions

Copy link
Copy Markdown
Contributor

🎨 Mermaid Diagram Validation

❌ One or more Mermaid diagram checks failed.

Check Result
✅ Syntax Passed
❌ Accessibility Failed
✅ Colour Contrast Passed

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2498

CI Status:pending
Files changed: 8

Recommendations

  • CI checks not green

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2498

CI Status:pending
Files changed: 8

Recommendations

  • CI checks not green

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

⚠️ A merged PR reached develop without passing the template content guardrail.

Missing required section(s): Linked issues, Changelog, Global DoD checklist

This is a post-merge backstop for admin bypasses. Please review branch protection for develop.

@ashleyshaw ashleyshaw added this to the v1.1 milestone Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2498

CI Status:pending
Files changed: 8

Recommendations

  • CI checks not green

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Branch Naming Issue

This PR's branch name copilot/reporting-agent-v2-multi-repo-support doesn't follow the standard pattern.

Standard pattern: {type}/{scope}-{title} (e.g., feat/something, fix/bug-name)

Based on linked issue type: task

Correct template should be: pr_feature.md

No action required — this is informational. Future PRs should use the correct branch name.

See Branching Strategy for more info.

Copilot AI and others added 3 commits September 3, 2026 01:14
…y-aware templates

- Add RepoContextDetector class: detects block-plugin, block-theme,
  control-plane, platform, and unknown repo types from file signals
  and GitHub topic metadata
- Add repo-templates.js: five repository-aware Markdown report templates
  with typed domain sections and required frontmatter
- Add unit tests for both modules (context detector + templates)
- Update .github/agents/reporting.agent.md to v2.0 with multi-repo
  support, context detection docs, and repository type table
- Add SPECIFICATION.md: OpenSpec architecture specification with
  detection signal tables, template spec, and acceptance criteria
- Add PLANNING.md: phase planning with deliverables and timeline
- Update project README.md to reflect v2 completion status

Closes #1898

Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
- Fix RepoContextDetector._isControlPlane() to use prefix-based
  matching (.some() with startsWith()) so nested file paths like
  '.github/workflows/ci.yml' and 'agents/foo.js' are correctly
  detected (was using Set.has() which only matched exact bare names)
- Update corresponding test to cover nested-path detection case
- Replace non-approved Mermaid classDef fill colours in SPECIFICATION.md
  with org-approved WCAG 2.2 AA palette from mermaid.instructions.md

Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
@ashleyshaw
ashleyshaw force-pushed the copilot/reporting-agent-v2-multi-repo-support branch from 5180ef4 to 5085bfa Compare September 2, 2026 18:15
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

❌ Branch Name Validation Failed

The branch name copilot/reporting-agent-v2-multi-repo-support does not follow the LightSpeed branching strategy.

Required Format

{type}/{scope}-{short-title}
  • type: one of the allowed prefixes (lowercase)
  • scope: lowercase, hyphens only (no underscores or uppercase)
  • title: lowercase, hyphens only (no underscores or uppercase)

Allowed Branch Types

feat, fix, hotfix, release, refactor, chore, docs, test, perf, ci, build, deps, security, revert, research, design, a11y, ux, i18n, ops, proto, ds, api, schema, telemetry, content, seo, config, migrate, qa, uat, audit, codex

Valid Examples

  • feat/branch-naming-enforcement
  • fix/validation-script-bug
  • chore/update-dependencies
  • docs/branching-strategy-guide
  • hotfix/critical-security-patch

Invalid Examples

  • claude/my-branch (type "claude" not allowed)
  • Feature/MyBranch (uppercase not allowed)
  • fix-bug (missing type prefix)
  • feat/my_feature (underscores not allowed)
  • feat/MyFeature (uppercase not allowed)

Solution

Rename your branch to follow the pattern and update the PR.

For more information, see docs/BRANCHING_STRATEGY.md.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Agent Spec Validation

❌ Agent spec validation failed

  • Frontmatter Validation: ❌ Failed
  • Cross-Reference Validation: ❌ Failed
  • Coverage Check: ⚠️ Warning

See the workflow run for detailed validation results.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Agent Spec Validation

❌ Agent spec validation failed

  • Frontmatter Validation: ❌ Failed
  • Cross-Reference Validation: ❌ Failed
  • Coverage Check: ⚠️ Warning

See the workflow run for detailed validation results.

@claude claude Bot added area:ci Build and CI pipelines area:documentation Docs & guides area:tests Test suites & harnesses labels Sep 2, 2026
@claude claude Bot added lang:js JavaScript/TypeScript lang:md Markdown content/docs type:bug Bug or defect labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2498

CI Status:pending
Files changed: 6

Recommendations

  • CI checks not green

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Agent Spec Validation

❌ Agent spec validation failed

  • Frontmatter Validation: ❌ Failed
  • Cross-Reference Validation: ✅ Passed
  • Coverage Check: ✅ Passed

See the workflow run for detailed validation results.

@ashleyshaw ashleyshaw added type:feature Feature or enhancement and removed area:ci Build and CI pipelines type:bug Bug or defect labels Sep 3, 2026 — with Claude

@ashleyshaw ashleyshaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved

@ashleyshaw
ashleyshaw merged commit 35aaf84 into develop Sep 3, 2026
45 of 72 checks passed
@ashleyshaw
ashleyshaw deleted the copilot/reporting-agent-v2-multi-repo-support branch September 3, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:documentation Docs & guides area:tests Test suites & harnesses lang:js JavaScript/TypeScript lang:md Markdown content/docs type:feature Feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting Agent v2 — Multi-Repository Support

3 participants