Refactor 3 agentic workflows to use rig custom harness - #49000
Merged
Conversation
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 created this pull request from a session on behalf of
pelikhan
July 29, 2026 22:15
View session
pelikhan
marked this pull request as ready for review
July 29, 2026 22:20
Contributor
There was a problem hiding this comment.
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-detectorsub-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 |
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-analyzer—metrics-extractor+pattern-detector→ two Rig harness invocations (metrics extraction, pattern classification)architecture-guardian—violation-classifier→ Rig harness in thesub_agentsexperiment branch; updated experiment hypothesis wording accordinglycli-consistency-checker—typo-grammar-extractor,flag-consistency-analyzer,docs-vs-help-comparer→ three named Rig harness invocations in a single usage sectionPattern applied
Each workflow receives:
skills: [githubnext/rig/skills/rig/SKILL.md@0ba73e37355f92adca11f9d596eb709e77f25332]in frontmatterfind "${RUNNER_TEMP}/gh-aw" -path "*/skills/rig/rig.ts", run withnode <rig-launcher>feeding acopilotEngine()-backed programAll three already had
copilot-sdk: trueandcopilot-requests: write— no engine or permission changes needed.