Skip to content

Refactor 3 agentic workflows to use rig custom harness - #49000

Merged
pelikhan merged 1 commit into
mainfrom
copilot/refactor-agentic-workflows
Jul 29, 2026
Merged

Refactor 3 agentic workflows to use rig custom harness#49000
pelikhan merged 1 commit into
mainfrom
copilot/refactor-agentic-workflows

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Replaces inline ## agent: sub-agent blocks in three workflows with Rig custom harness invocations (github.com/githubnext/rig), consistent with the pattern introduced in #48885.

Workflows updated

  • agent-performance-analyzermetrics-extractor + pattern-detector → two Rig harness invocations (metrics extraction, pattern classification)
  • architecture-guardianviolation-classifier → Rig harness in the sub_agents experiment branch; updated experiment hypothesis wording accordingly
  • cli-consistency-checkertypo-grammar-extractor, flag-consistency-analyzer, docs-vs-help-comparer → three named Rig harness invocations in a single usage section

Pattern applied

Each workflow receives:

  1. skills: [githubnext/rig/skills/rig/SKILL.md@0ba73e37355f92adca11f9d596eb709e77f25332] in frontmatter
  2. A Rig Custom Harness Usage section replacing the inline agent prose — discover launcher via find "${RUNNER_TEMP}/gh-aw" -path "*/skills/rig/rig.ts", run with node <rig-launcher> feeding a copilotEngine()-backed program
  3. A Rig Harness Output Contract section with a strict JSON schema

All three already had copilot-sdk: true and copilot-requests: write — no engine or permission changes needed.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Refactor 3 agentic workflows to use rig (github.com/githubnext/rig) Refactor 3 agentic workflows to use rig custom harness Jul 29, 2026
Copilot AI requested a review from pelikhan July 29, 2026 22:15
@pelikhan
pelikhan marked this pull request as ready for review July 29, 2026 22:20
Copilot AI review requested due to automatic review settings July 29, 2026 22:20
@pelikhan
pelikhan merged commit 017b58e into main Jul 29, 2026
@pelikhan
pelikhan deleted the copilot/refactor-agentic-workflows branch July 29, 2026 22:20

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

Refactors three agentic workflows from inline sub-agents to pinned Rig custom harnesses.

Changes:

  • Adds Rig skill dependencies and harness instructions.
  • Defines structured JSON output contracts.
  • Regenerates workflow lock files with skill installation support.
Show a summary per file
File Description
.github/workflows/agent-performance-analyzer.md Replaces two sub-agents with Rig harnesses.
.github/workflows/agent-performance-analyzer.lock.yml Regenerates compiled workflow.
.github/workflows/architecture-guardian.md Migrates violation classification to Rig.
.github/workflows/architecture-guardian.lock.yml Regenerates compiled workflow.
.github/workflows/cli-consistency-checker.md Migrates three consistency analyses to Rig.
.github/workflows/cli-consistency-checker.lock.yml Regenerates compiled workflow.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (2)

.github/workflows/agent-performance-analyzer.md:772

  • The Phase 3 execution instructions at line 450 still explicitly invoke the deleted pattern-detector sub-agent. That stale instruction can send the run down an unavailable path instead of using this second Rig invocation; update that step to reference the pattern-detection harness.
**Phase 3 — Pattern detection**: Run a second Rig harness invocation with an inline program that:
- configures `copilotEngine()`
- receives compact per-agent profile JSON (output counts, success rates, resource usage)
- classifies behavioral patterns and returns structured JSON

.github/workflows/cli-consistency-checker.md:172

  • A truncated help input cannot support the stated requirement to list every docs-vs-help mismatch: commands, flags, or examples beyond the cutoff will never be compared. Use a bounded complete comparison (for example, structured/chunked help sections with aggregated results) or narrow the workflow's completeness claim explicitly.
**Harness 3 — Docs vs Help Comparison**: reads `docs/src/content/docs/setup/cli.md` and `/tmp/gh-aw/agent/all-help.txt` content (truncated to fit compact input), lists every mismatch involving missing commands, mismatched flag lists, drifted descriptions, or stale examples.
  • Files reviewed: 6/6 changed files
  • Comments generated: 5
  • Review effort level: Medium

Comment on lines +764 to +767
**Phase 1 — Metrics extraction**: Discover the launcher with `find "${RUNNER_TEMP}/gh-aw" -path "*/skills/rig/rig.ts" | head -1`, then run `node <rig-launcher>` with an inline Rig program that:
- configures `copilotEngine()`
- receives a compact JSON input listing the repo-memory file paths to read
- reads each file and returns a single structured JSON object keyed by basename
2. Build compact JSON input from `/tmp/gh-aw/agent/arch-metrics.json` (metrics only — do not pass raw file paths or large blobs).
3. Run the harness with `node <rig-launcher>`, feeding an inline Rig program that:
- configures `copilotEngine()`
- applies threshold rules to `files`, `import_cycles`, and `thresholds` fields
- receives the compact JSON input
- returns findings as a JSON array

**Harness 1 — Typo/Grammar Analysis**: reads `/tmp/gh-aw/agent/all-help.txt` content (first 20 KB), scans for typos, grammar mistakes, inconsistent capitalization, and punctuation issues.
"agent-a": ["over-creation", "inconsistency"],
"agent-b": [],
"agent-c": ["under-creation"]
"<basename>": { /* parsed file content or null */ }
- return `null` for any file that does not exist or cannot be read
- return an empty array for agents with no detected patterns
- use only provided compact evidence
``` No newline at end of file
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants