Skip to content

docs: fix documentation drift — on.pr trigger missing from workflow creation prompt#581

Merged
jamesadevine merged 1 commit into
mainfrom
docs/fix-pr-trigger-missing-from-prompt-204c4d3d164b9f02
May 17, 2026
Merged

docs: fix documentation drift — on.pr trigger missing from workflow creation prompt#581
jamesadevine merged 1 commit into
mainfrom
docs/fix-pr-trigger-missing-from-prompt-204c4d3d164b9f02

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Documentation Freshness Audit

This audit compared docs against the actual codebase, checking CLI commands, front-matter fields, template markers, safe output tools, and the workflow authoring prompt.

Findings

Area Issue File(s)
prompts/create-ado-agentic-workflow.md Step 11 only documented on.pipeline triggers — on.pr trigger was completely absent, despite being fully implemented and documented in docs/front-matter.md prompts/create-ado-agentic-workflow.md
Common Patterns "PR-Triggered Code Review" pattern used on.pipeline (pipeline-completion trigger), contradicting the pattern name prompts/create-ado-agentic-workflow.md

Details

Missing on.pr trigger documentation (prompts/create-ado-agentic-workflow.md)

PrTriggerConfig in src/compile/types.rs supports three fields: branches, paths, and filters. The filters field compiles to a runtime gate step in the Setup job (same as on.pipeline.filters). This is fully documented in docs/front-matter.md and docs/filter-ir.md, but Step 11 of the creation prompt only covered on.pipeline, so agents using this prompt would never know to use on.pr when a user wants a PR-triggered workflow.

"PR-Triggered Code Review" pattern using wrong trigger

The Common Patterns section had a pattern titled "PR-Triggered Code Review" that used on.pipeline (triggered when a CI build pipeline completes). The corrected pattern now uses on.pr with filters.draft: false, which is the natural trigger for a PR code review agent.

Applied Fixes

  • Renamed Step 11 from "Pipeline Triggers (optional)" to "Triggers (optional)"
  • Added on.pr subsection with full example covering branches, paths, and all filters options
  • Added explanation of how on.pr generates the native ADO pr: block from branches/paths and a gate step from filters
  • Fixed "PR-Triggered Code Review" common pattern to use on.pr with appropriate filters

Other Findings (no action needed)

The following areas checked out as accurate:

  • Architecture section (AGENTS.md): directory tree matches actual source files exactly
  • CLI commands (docs/cli.md): all 7 subcommands documented with correct flags and defaults
  • Template markers (docs/template-markers.md): all markers in all 4 base templates documented
  • Front-matter fields (docs/front-matter.md): FrontMatter struct fields all documented; env: correctly marked as "not yet implemented"
  • Safe output tools (docs/safe-outputs.md, README.md): all tools in src/safeoutputs/ documented
  • Network allowlist (docs/network.md): matches CORE_ALLOWED_HOSTS in src/allowed_hosts.rs
  • Default model: claude-opus-4.7 matches DEFAULT_COPILOT_MODEL constant in src/engine.rs
  • Default pool: vmImage: ubuntu-22.04 matches compiler default

This pull request was created by the automated documentation freshness check.

Generated by Documentation Freshness Check · ● 5.7M ·

…workflow.md

Step 11 only documented on.pipeline triggers. The on.pr trigger is fully
implemented (PrTriggerConfig with branches/paths/filters) and documented in
docs/front-matter.md, but was entirely absent from the workflow creation
prompt that agents use.

- Rename Step 11 to 'Triggers (optional)' to cover both trigger types
- Add on.pr section with full example (branches, paths, runtime filters)
- Add explanation of how on.pr generates native ADO pr: block + gate step
- Fix 'PR-Triggered Code Review' common pattern to actually use on.pr
  (it previously used on.pipeline, which contradicted the pattern name)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review May 17, 2026 06:11
@jamesadevine jamesadevine merged commit 9bec5d2 into main May 17, 2026
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.

1 participant