Add PR-triggered chapter review workflow and agent instruction set for PDF↔notebook quality gates#1
Merged
Conversation
Copilot created this pull request from a session on behalf of
ChrisJones79
June 9, 2026 10:34
View session
There was a problem hiding this comment.
Pull request overview
Adds a PR-triggered GitHub Actions workflow and supporting documentation/instructions to enforce strict chapter PDF ↔ notebook pairing in NLPDE/ and to structure a multi-stage (coverage → interactivity → author loop) review cycle before human review.
Changes:
- Introduces a
pull_requestworkflow that detects changed chapter assets and enforces a 1:1 PDF↔notebook base-name pairing gate. - Adds reusable agent instruction “contracts” for content coverage, interactivity, and author revision-loop guidance.
- Documents the end-to-end PR workflow and recommends shared preprocessing for consistent multi-agent context.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/chapter-pr-agent-cycle.yml |
Adds PR workflow orchestration, pairing gate, and staged (placeholder) agent jobs. |
.github/agent-instructions/content-coverage-agent.md |
Defines coverage agent mission/rules and PR-comment output format. |
.github/agent-instructions/interactivity-agent.md |
Defines interactivity agent mission/rules and PR-comment output format. |
.github/agent-instructions/chapter-author-agent.md |
Defines author agent workflow and completion gate criteria. |
docs/agent-workflow.md |
Documents the workflow behavior and recommended shared preprocessing pattern. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+44
to
+56
| DIFF_OUTPUT="$(git diff --name-only "$BASE_SHA" "$HEAD_SHA" -- NLPDE)" || { | ||
| echo "Failed to compute NLPDE file diff for base=$BASE_SHA head=$HEAD_SHA." | ||
| exit 1 | ||
| } | ||
| mapfile -t CHANGED <<< "$DIFF_OUTPUT" | ||
|
|
||
| if [[ ${#CHANGED[@]} -eq 0 ]]; then | ||
| echo "No files changed in NLPDE/. Workflow triggered by agent instruction or workflow updates only." | ||
| echo "skip_review=true" >> "$GITHUB_OUTPUT" | ||
| echo "chapter_pdf=" >> "$GITHUB_OUTPUT" | ||
| echo "chapter_notebook=" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi |
Comment on lines
+11
to
+13
| permissions: | ||
| contents: read | ||
| pull-requests: write |
| ## PR trigger | ||
| Workflow file: `.github/workflows/chapter-pr-agent-cycle.yml` | ||
|
|
||
| On PR updates affecting `NLPDE/**`, the workflow: |
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.
This PR introduces a PR-driven multi-agent workflow for chapter development in
NLPDE/, centered on strict chapter PDF ↔ notebook pairing and iterative agent feedback before human review. It also defines reusable agent instructions and shared-context guidance for consistent chapter evaluation.Workflow orchestration (
.github/workflows/chapter-pr-agent-cycle.yml)Agent contracts (
.github/agent-instructions/*)content-coverage-agent.md: requires chapter-to-notebook concept mapping; flags missing/insufficient coverage (not relevant extras).interactivity-agent.md: prioritizes high-impact visualization/interactivity opportunities tied to chapter learning goals.chapter-author-agent.md: defines iterative author behavior—submit chapter PR, incorporate agent feedback, repeat until both agent concerns are resolved.Process documentation (
docs/agent-workflow.md)