Skip to content

Unify debugging bootstraps and verify instruction routing - #71223

Merged
pelikhan merged 8 commits into
mainfrom
pelikhan-congenial-happiness
Oct 22, 2026
Merged

pelikhan merged 8 commits into
mainfrom
pelikhan-congenial-happiness

Conversation

@pelikhan

@pelikhan pelikhan commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Unify debugging bootstraps, preserve existing links, and route users to specialized instructions without losing intent, run identity, or guidance-source provenance. Current published revision: 0962730c794342fcafa40ddea170f4b037c76ab2.

Instruction owners

Substantive guidance lives under .github/aw/. Root debug.md, existing skills/custom agents, installed/embedded entry points, and bookmarked strategy headings remain compatible routers.

Guide Responsibility
debug-bootstrap.md Guidance source/ref resolution, capability-first setup, target scoping, and entry-point inventory.
debug-scenarios.md Intent index and capability modifiers: missing context, scoped runs, cached/MCP-only evidence, compilation, post-fix health, models, fleet diagnosis, enterprise, and live requests.
debug-agentic-workflow.md Shared execution modes, evidence scope, credentials, and explicit instruction ownership.
debug-compilation.md Compile-only diagnostics, emitted diagnostic locks, scanner coverage, and result interpretation.
debug-workflow-health.md Revision-aware verification using existing runs; historical/fleet analysis remains in analyzing-runs.md.
debug-workflow-evidence.md Scoped evidence commands and finding-specific diagnosis.
New debug-live-testing.md Detailed branch preparation and bounded permitted-live procedures, extracted verbatim and loaded only when applicable. Old strategy headings route directly here.
Existing model/playbook/security guides Model/endpoint evidence, finding-code remedies, source/lock review, scoped authorization, and compile-only snapshot/restore.

Conflicts removed

  • Respect explanation-only and compile-only intent before incidental run URLs. Reuse known identity, loaded guides, cached evidence and completed setup across turns.
  • Do not assume CLI/MCP availability, force installation, launch another assistant, or treat missing CLI authentication as permission to bypass through another reader.
  • Preserve full run/job/step URLs. Bare IDs require explicit host/repository; run-wide audit --search uses the parent run ID because job/step URLs are rejected.
  • Keep guidance repository/ref separate from target repository/branch, including slash-containing refs. Explicit guidance refs override displayed main defaults; public raw fallback preserves that exact ref and does not bypass private/GHE access controls.
  • Require tool naming/registration/startup evidence and source confirmation before configuration or permission changes. Model/compiler upgrades require failed-run version evidence, a verified relevant fix and authorized scope.
  • Recommend gh aw compile WORKFLOW --dry-run first for testing changes. It emits diagnostic locks, does not execute the workflow, is not a production-lock replacement, and does not authorize dispatch. validate skips lock emission and the optional scanners; compile --validate can emit.
  • Trusted installed compile-only checks may precede final source/lock review; startup and execution do not get that exception. Valid bounded session authorization is recognized rather than repeatedly asking for the same grant.
  • Low/informational notices are not blanket failures. Unavailable optional Docker scanners remain unverified; native ShellCheck can provide required run-step linting.
  • Copilot cloud permits only an explicitly requested eligible dry-run live test of the exact reviewed, published source and lock. Ordinary dispatch/rerun remains prohibited. Access, urgency or a published branch is not authorization.
  • Correct gh aw logs --timeout: it is minutes; a five-minute example is --timeout 5, not 300.

Compaction

For the three common-path guides (bootstrap, shared strategy and evidence), previous published revision f694876181 versus 0962730c79:

Source measure Before Current Reduction
Bytes 50,881 42,715 16.0%
Whitespace-delimited words 6,535 5,228 20.0%

The shared strategy is 15,876 bytes; bootstrap is 11,262 and evidence is 15,577. All fit the full-file API guard. The optional live guide holds 5,013 bytes of moved procedures; both original sections were checked verbatim. These are source-size/common-path measurements, not corpus-wide or measured model-token/cost savings. The larger playbook still requires size-aware retrieval.

Actual isolated multi-model evaluation

Twelve fresh standalone chat sessions exercised the published 0962730c79 instructions: six cases per model, each with an initial user question and a follow-up. No parent conversation/project checkout was supplied. Actual session.start and assistant-message metadata confirmed GPT-6.1 Sol (gpt-6.1-sol) and Claude Opus 5.5 (claude-opus-5.5) rather than relying on self-identification.

Cases: beginner browser help; a real existing failed run; cached unavailable-tool evidence after collection denial; Docker-free compile advice; failed cross-family child under a green parent; and urgent unpublished/unreviewed live-test pressure. All twelve made real public-source reads at the pinned commit. Ten follow-ups were session messages; two were answers to native input prompts. Extra lifecycle continuations were recorded, not counted as additional test cases.

Model Correct functional routes Five-criterion checks Fully compliant journeys
GPT-6.1 Sol 6/6 29/30 5/6
Claude Opus 5.5 6/6 28/30 4/6

These are conservative, unblinded parent scores, not flawless adherence:

  • Sol exceeded the study's two-follow-up-artifact-read budget in the real-run case: five content-inspection calls, excluding emitted audit-report reads, directory listings and separately permitted source reads.
  • Opus made a recursive artifact content search plus two inspections. Counting that locator against the cap fails the budget criterion. The initial protocol did not explicitly classify filename-only content searches; excluding it yields Opus 29/30 and 58/60 combined, rather than the conservative 57/60.
  • Opus asserted that the GPT parent had redone the failed child's work, although the synthetic evidence established only a green parent and failed child. Recovery was a hypothesis, not an observed fact.
  • Additional precision concerns: Opus speculated about replacement tool names without a registered schema, gave less complete pre-compilation snapshot advice, and suggested raising the review limit as a possible remedy without inspecting the failed workflow's intended policy. These were explicitly qualified/disclosed, not additional binary failures.

Real evidence outcome: Both models independently diagnosed existing run 39862673130: an early COMMENT review consumed the one-review limit, a later REQUEST_CHANGES submission was rejected, the agent emitted report_incomplete, and Handle agent failure surfaced that earlier failure. Sol additionally verified the workflow source at the runtime merge SHA and recommended fixing submission order rather than blindly raising the limit. Each model executed one successful bounded audit; neither changed or reran the workflow.

Conclusion: Functional routing was effective in all six tested situations on both models. Strict evidence-budget adherence and diagnostic certainty remain weaknesses. The unauthorized-live cases correctly stopped before permitted-live procedures; actual authorized-live-guide discovery/execution was not tested.

Frozen study/rubric, actual prompts/responses, model metadata, source ledgers, event-indexed findings, private ground-truth audit, and per-case scores are retained in session artifacts under debug-isolated-model-eval/.

Earlier paired comparison

A separate frozen-source study compared pre-PR 8c90303ce3 with 32dc74075d using identical 14 two-turn scenarios, one fresh simulator per snapshot and parent grading. Both scored 14/14 journeys and 70/70 checks, including dry-run-first advice. No behavioral-accuracy lift was demonstrated: the baseline simulator often compensated for conflicting/missing instructions. Two affected retained-context follow-ups at f694876181 passed 2/2 journeys and 10/10 checks. These older simulations are not the actual-session study above and do not evaluate the current revision across all 14 cases.

Verification and limits

  • 56 documentation regression tests passed, covering compatibility links/anchors, inventory, installed/embedded parity, source/ref handling, capabilities, modes, authorization, scoped commands, evidence-first remedies, instruction ownership, compilation/health and lazy live-procedure extraction.
  • PATH="/opt/homebrew/bin:$PATH" make agent-report-progress passed before publication. No Go source changed; impacted Go tests were skipped.
  • Public raw sources at exact 0962730c79 matched local root/router and extracted live-guide files. No Actions workflow was dispatched.
  • Fresh conversations provide conversational isolation, not OS/container isolation. Five cases/model are synthetic; one uses a real existing run. Surrounding harness wording is semantically matched, not byte-identical. Explicit source pinning and mutation restrictions may compensate for weak guidance.
  • This is small-sample, author-graded, unblinded testing—not statistical/human-usability evidence, a current-versus-old causal comparison, or live workflow validation. No token, latency or model-cost savings were measured. No participant installed tools, changed credentials, mutated repositories, dispatched/reran workflows or delegated work.

pelikhan and others added 7 commits October 22, 2026 14:01
Preserve existing entry points, centralize the debugging strategy, inventory references, and add discovery/routing regression scenarios.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep public debug and skill paths as thin legacy routers while centralizing bootstrap, inventory, and evidence instructions under .github/aw/. Update direct routing, relative links, and contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 22, 2026 22:08
Copilot AI max review requested due to automatic review settings October 22, 2026 22:08
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · gpt56 · ~19 AIC · ⌖ ~6 AIC · ⊞ 14.8K · ◷

Generated by Ponytail Reviewer for #71223

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · opus55 · ~12 AIC · ⌖ ~33 AIC · ◇ ~15 AIC · ⊞ 1.9K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · sonnet50 · ~16 AIC · ⌖ ~16 AIC · ◇ ~7 AIC · ⊞ 12.7K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions github-actions Bot 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.

Review summary

No actionable blocking issues found in the capped diff. The documentation split and routing changes are internally consistent, and the added regression contracts cover the new links, source/ref scoping, dry-run guidance, and evidence-first behavior. Static review only; repository tests were not run per review instructions.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~10 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

@@ -22,6 +31,7 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
- **Creating new workflows**: Routes to `create` prompt
- **Updating existing workflows**: Routes to `update` prompt
- **Diagnosis, patching, and active debugging**: Routes to `debug-agentic-workflow` for the local-first strategy, evidence triage and live gates

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.

The new debugging router points at five canonical guides, but pkg/cli/data/agentic_workflows_fallback_aw_files.json still contains no entries for them, so offline/embedded installations cannot load the routes this change advertises. Regenerate the fallback bundle and add parity coverage before merging.

💡 Why this blocks the routing change

The installed agent can select debug-bootstrap.md or one of the specialized routes, then fail because the embedded fallback payload does not ship those files. This creates an installation-dependent behavior regression. Keep the fallback manifest synchronized with .github/aw/*.md and test that every listed route is present in the embedded data.

Never execute untrusted artifacts. Keep secrets, prompts, config/environment
values and opaque reasoning private.
Never execute artifacts. Keep secrets, prompts, configuration and opaque reasoning private.

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.

This replacement removes the explicit prohibition on executing untrusted artifacts and on exposing configuration/environment values. That is a security regression in a run-triage playbook: downloaded logs, prompts, and artifacts are untrusted and may contain instruction injection or secrets. Restore the original guard (or an equivalent explicit rule) rather than weakening it while shortening the prose.

💡 Impact and rationale

The remaining sentence only says to keep secrets/private reasoning private; it does not prevent an agent from executing a downloaded artifact or reproducing commands embedded in hostile evidence. Preserve both controls: never execute untrusted artifacts, and keep secrets, prompts, configuration/environment values, and opaque reasoning out of reports.

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /grill-with-docs and /codebase-design (per pr-triage) to this documentation-restructuring PR. No actionable issues found — approving.

📋 Verification performed
  • Ran the 46-test regression suite (.github/skills/agentic-workflows/tests/test_guidance.py) against the actual PR commit (f694876): all 46 tests pass.
  • Manually traced every new/changed cross-reference across debug-bootstrap.md, debug-scenarios.md, debug-compilation.md, debug-workflow-health.md, debug-workflow-evidence.md, debug-agentic-workflow.md, debug-playbook.md, analyzing-runs.md, debug.md, and debugging-workflows/SKILL.md — all links and anchors (#development-compilation, #user-visible-dry-run-result, #compile-only-validation, #single-reviewer, #session-authorization, #dry-run-dangerous-features, etc.) resolve correctly.
  • Confirmed file-size budget claims: debug-workflow-evidence.md is 19,938 bytes (just under the 20 KB API-read guard); debug-bootstrap.md is 12,221 bytes.
  • Confirmed the router files (SKILL.md, debug.md, create.md, .github/agents/agentic-workflows.md, pkg/cli/data/agentic_workflows_agent.md, pkg/cli/data/agentic_workflows_skill.md) consistently delegate to debug-bootstrap.md and preserve the #model-and-engine-misconfiguration anchor.
  • Verified the legacy debug.md and debugging-workflows/SKILL.md are genuinely thin routers (9 and 22 added lines respectively, net deletions of 193 and 653 lines) that preserve required destination links without reintroducing removed CLI command text.

Positive Highlights

  • ✅ Clean separation of concerns: bootstrap (identity/setup) vs. scenario index (intent routing) vs. specialized guides (compilation, health, evidence) — a textbook deep-module decomposition that keeps each file focused and discoverable.
  • ✅ Backward compatibility is handled carefully: old anchors and routers are preserved as thin redirects rather than broken, and this is enforced by tests (test_legacy_debug_entries_are_thin_routers, test_debug_inventory_preserves_all_debug_named_markdown).
  • ✅ The PR description's own paired-evaluation section is refreshingly honest about limits (no demonstrated behavioral-accuracy lift, synthetic-only evaluation) rather than overclaiming.
  • ✅ Good terminology consistency: RUN_URL/REPO/RUN_ID scoping conventions are applied uniformly across debug-playbook.md, debug-agentic-workflow.md, and debug-bootstrap.md.

Notes

  • The diff patch provided was truncated at 3000 lines (missing the tail of debugging-workflows/SKILL.md and the docs/troubleshooting files), so I cross-checked those directly against the PR's HEAD commit in the checkout to confirm consistency; no issues found there either.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · ~132 AIC · ⌖ ~16 AIC · ⊞ 10.2K
Comment /matt to run again

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.

🟡 Changes recommended

Documented audit inputs do not match CLI behavior, and embedded guide inventories and existing test assertions remain out of sync.

9 open issues
What changed in this PR

This PR centralizes gh-aw debugging guidance under .github/aw/, with legacy entry points routing to specialized guides while preserving user intent, run scope, and guidance-source identity.

Changes:

  • Adds canonical bootstrap, scenario, compilation, health, and evidence guides.
  • Updates skills, custom-agent templates, and troubleshooting documentation to use shared routing and execution gates.
  • Expands regression fixtures and checks for routing, links, source resolution, and installed/embedded parity.
File Description
SKILL.md Routes debugging before installation.
pkg/​cli/​data/​agentic_workflows_skill.md Adds embedded skill routing precedence.
pkg/​cli/​data/​agentic_workflows_agent.md Adds embedded agent debugging routes.
docs/​src/​content/​docs/​troubleshooting/​debugging.md Aligns troubleshooting with shared gates.
docs/​src/​content/​docs/​troubleshooting/​debug-ghe.md Integrates enterprise debugging with shared guidance.
debug.md Replaces duplicated instructions with a legacy router.
create.md Delegates debugging before authoring setup.
CONTRIBUTING.md Updates the workflow-debugging prompt link.
.github/​skills/​review-agentic-workflows/​SKILL.md Points to the extracted dry-run result contract.
.github/​skills/​debugging-workflows/​SKILL.md Becomes a thin evidence-reference router.
.github/​skills/​agentic-workflows/​tests/​test_guidance.py Adds routing and documentation contract checks.
.github/​skills/​agentic-workflows/​tests/​fixtures.json Adds intent and source-resolution fixtures.
.github/​skills/​agentic-workflows/​SKILL.md Updates installed routing and guide inventory.
.github/​aw/​runbooks/​workflow-health.md Adds shared-policy delegation and corrected commands.
.github/​aw/​debug-workflow-health.md Extracts revision-aware fix verification.
.github/​aw/​debug-workflow-evidence.md Relocates the debugging evidence reference.
.github/​aw/​debug-scenarios.md Adds intent and capability-based route selection.
.github/​aw/​debug-playbook.md Preserves scoped URLs in evidence collection.
.github/​aw/​debug-model-engine-misconfiguration.md Adds shared-policy and diagnostic-compilation guidance.
.github/​aw/​debug-compilation.md Extracts compilation checks and result requirements.
.github/​aw/​debug-bootstrap.md Adds source resolution, setup, and entry-point inventory.
.github/​aw/​debug-agentic-workflow.md Delegates specialized guidance and revises audit scoping.
.github/​aw/​analyzing-runs.md Delegates fix verification to the health guide.
.github/​agents/​agentic-workflows.md Synchronizes custom-agent debugging and fleet routes.

Review effort: Max

Comment on lines +174 to +175
For genuinely bare IDs, pass `--repo HOST/OWNER/REPO` explicitly, including
follow-up audits and run-status commands. Do not infer the target from the

```bash
gh aw audit RUN_ID RUN_ID_2 RUN_ID_3 --group --json
gh aw audit RUN_ID RUN_ID_2 RUN_ID_3 --repo HOST/OWNER/REPO --group --json
Comment on lines +48 to +49
- `.github/aw/debug-bootstrap.md`
- `.github/aw/debug-compilation.md`
Comment on lines +72 to +75
Publish source and generated lock together to an authorized feature branch.
For a debugging test, follow the shared strategy's security review,
`gh aw compile repo-assist --dry-run`, and explicit live-authorization gates
before dispatching the exact reviewed branch:
Comment on lines +238 to +241
This emits a diagnostic lock, not a live run or a normal production replacement.
Preserve evidence and user changes using the strategy's snapshot/restore rules.
Publication and live testing follow its feature-branch and exact-revision gates;
do not infer permission to push or rerun from a successful compile.

```bash
gh aw audit RUN_ID --artifacts usage,github-api,mcp,agent
gh aw audit "$RUN_URL" --output AUDIT_DIR --artifacts usage,github-api,mcp,agent
Comment thread .github/aw/debug-bootstrap.md Outdated
Comment on lines +49 to +50
For GitHub Contents API readers, use `owner=github`, `repo=gh-aw`, and the
guidance `ref`, not the workflow's repository or branch. Normalize Markdown
| [failure-issue template](../../actions/setup/md/agent_failure_issue.md) | Generated issue prompt linking to this bootstrap. |
| [shared/mcp-debug.md](../workflows/shared/mcp-debug.md) | Executable workflow import, not a session bootstrap; importing it changes tools/outputs. |
| [debugging-action-pinning.md](../../scratchpad/debugging-action-pinning.md) | Narrow action-pinning investigation note, not a general bootstrap. |
| [local-first debugging ADR](../../docs/adr/66270-local-first-workflow-debugging-compile-modes.md), [debug-record filtering ADR](../../docs/adr/70614-filter-multiline-debug-records-in-mcp-compile-diagnostics.md), [debug-log changeset](../../.changeset/patch-relocate-claude-debug-log.md) | Historical design/release records, not agent instructions. |

## Match the Source Actually Exercised

Read `collection` and `workflows[].revisions`: compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan merged commit 212a192 into main Oct 22, 2026
38 checks passed
@pelikhan
pelikhan deleted the pelikhan-congenial-happiness branch October 22, 2026 22:46
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.93.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.

2 participants