Skip to content

Commit 3cc2b3e

Browse files
committed
Add technical edit stage to Lanes 2 and 3 in review workflow
1 parent c73cba6 commit 3cc2b3e

3 files changed

Lines changed: 47 additions & 22 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- [ ] I have updated `00-version-history.mdx` if this change warrants a version entry
1818
- [ ] I have assigned a specific peer reviewer via the Reviewers sidebar (if known)
1919

20-
## Technical edit (Lane 1 only)
20+
## Technical edit (Lanes 1, 2, and 3)
2121

2222
- [ ] Technical edit comments addressed — ready for Director review
2323

.github/workflows/stage-progression.yml

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ jobs:
230230
await setReviewStatus('pending', STAGE_STATUS_DESC['stage:peer-review']);
231231
const laneName = lane.replace('lane:', '').replace(/-/g, ' ');
232232
const scope = lane === 'lane:new-doc' ? 'Peer → Lead Civil → Technical Edit → Director'
233-
: lane === 'lane:major-revision' ? 'Peer → Lead Civil'
234-
: 'Peer review only';
233+
: lane === 'lane:major-revision' ? 'Peer → Lead Civil → Technical Edit'
234+
: 'Peer → Technical Edit';
235235
comment = `📋 **Lane: ${laneName}**\n\nReview scope: ${scope}.\n\nCurrently in **peer review**. @usace-rmc/docs-admin please assign the peer reviewer(s) via the Reviewers sidebar.`;
236236
}
237237
await addLabels(toAdd);
@@ -351,21 +351,31 @@ jobs:
351351
if (eventName === 'pull_request' && action === 'labeled') {
352352
const added = context.payload.label.name;
353353
354-
// Admin override: advance a lane:new-doc PR from technical
355-
// edit to Director review without requiring the author to
356-
// check the PR description checkbox. Used when the technical
357-
// edit was done by a human, or when the author isn't around.
354+
// Admin override: advance a PR past the technical edit stage
355+
// without requiring the author to check the PR description
356+
// checkbox. Used when the technical edit was done by a human,
357+
// or when the author isn't around.
358+
// - Lane 1 (new-doc): advances to Director review
359+
// - Lanes 2 & 3 (major/minor revision): advances to ready-to-merge
358360
if (added === 'admin:advance-to-director') {
359-
if (existingLane !== 'lane:new-doc' || existingStage !== 'stage:ai-editor-review') {
361+
const lanesWithTechEdit = ['lane:new-doc', 'lane:major-revision', 'lane:minor-revision'];
362+
if (!lanesWithTechEdit.includes(existingLane) || existingStage !== 'stage:ai-editor-review') {
360363
await removeLabel('admin:advance-to-director');
361-
await postComment(`⚠️ **admin:advance-to-director** can only be applied to a \`lane:new-doc\` PR currently at \`stage:ai-editor-review\`. Label removed, no action taken.`);
364+
await postComment(`⚠️ **admin:advance-to-director** can only be applied to a PR currently at \`stage:ai-editor-review\` in a lane that includes technical edit. Label removed, no action taken.`);
362365
return;
363366
}
364367
await removeLabel('admin:advance-to-director');
365368
await removeLabel('stage:ai-editor-review');
366-
await addLabels(['stage:director-review']);
367-
await setReviewStatus('pending', STAGE_STATUS_DESC['stage:director-review']);
368-
await postComment(`✅ **Technical edit marked complete by site admin override.**\n\nAdvancing to **Director review**.\n\n@usace-rmc/docs-admin next steps:\n1. Trigger a checkpoint deploy of branch \`${branch}\` via Actions → Deploy to GitHub Pages → Run workflow (this is the first deploy of this PR to the live site, with the DRAFT watermark)\n2. Approve the deploy at the production environment gate\n3. Post the live URL in a comment on this PR\n4. Assign a member of @usace-rmc/docs-director via the Reviewers sidebar\n\nThe Director will review at the live URL. If the Director requests changes and the author pushes fixes, re-trigger the checkpoint deploy to refresh the live URL.`);
369+
370+
if (existingLane === 'lane:new-doc') {
371+
await addLabels(['stage:director-review']);
372+
await setReviewStatus('pending', STAGE_STATUS_DESC['stage:director-review']);
373+
await postComment(`✅ **Technical edit marked complete by site admin override.**\n\nAdvancing to **Director review**.\n\n@usace-rmc/docs-admin next steps:\n1. Trigger a checkpoint deploy of branch \`${branch}\` via Actions → Deploy to GitHub Pages → Run workflow (this is the first deploy of this PR to the live site, with the DRAFT watermark)\n2. Approve the deploy at the production environment gate\n3. Post the live URL in a comment on this PR\n4. Assign a member of @usace-rmc/docs-director via the Reviewers sidebar\n\nThe Director will review at the live URL. If the Director requests changes and the author pushes fixes, re-trigger the checkpoint deploy to refresh the live URL.`);
374+
} else {
375+
await addLabels(['stage:ready-to-merge']);
376+
await setReviewStatus('success', STAGE_STATUS_DESC['stage:ready-to-merge']);
377+
await postComment(`✅ **Technical edit marked complete by site admin override.**\n\nThis PR is **ready for final merge and publication**.\n\n@usace-rmc/docs-admin next steps:\n1. Check out this branch\n2. Flip the document's \`draft\` flag to \`false\`\n3. Update \`00-version-history.mdx\`\n4. Commit and push\n5. Merge to \`main\`\n6. Approve the production deploy`);
378+
}
369379
return;
370380
}
371381
@@ -390,13 +400,22 @@ jobs:
390400
391401
// ── pull_request edited (author checks technical-edit box) ──
392402
if (eventName === 'pull_request' && action === 'edited') {
393-
if (existingStage === 'stage:ai-editor-review' && existingLane === 'lane:new-doc') {
403+
if (existingStage === 'stage:ai-editor-review') {
394404
const checkboxChecked = prBody.includes('[x] Technical edit comments addressed');
395405
if (checkboxChecked) {
396406
await removeLabel('stage:ai-editor-review');
397-
await addLabels(['stage:director-review']);
398-
await setReviewStatus('pending', STAGE_STATUS_DESC['stage:director-review']);
399-
await postComment(`✅ **Technical edit marked complete** by the author.\n\nAdvancing to **Director review**.\n\n@usace-rmc/docs-admin next steps:\n1. Trigger a checkpoint deploy of branch \`${branch}\` via Actions → Deploy to GitHub Pages → Run workflow (this is the first deploy of this PR to the live site, with the DRAFT watermark)\n2. Approve the deploy at the production environment gate\n3. Post the live URL in a comment on this PR\n4. Assign a member of @usace-rmc/docs-director via the Reviewers sidebar\n\nThe Director will review at the live URL. If the Director requests changes and the author pushes fixes, re-trigger the checkpoint deploy to refresh the live URL.`);
407+
408+
if (existingLane === 'lane:new-doc') {
409+
// Lane 1: advance to Director review with checkpoint deploy
410+
await addLabels(['stage:director-review']);
411+
await setReviewStatus('pending', STAGE_STATUS_DESC['stage:director-review']);
412+
await postComment(`✅ **Technical edit marked complete** by the author.\n\nAdvancing to **Director review**.\n\n@usace-rmc/docs-admin next steps:\n1. Trigger a checkpoint deploy of branch \`${branch}\` via Actions → Deploy to GitHub Pages → Run workflow (this is the first deploy of this PR to the live site, with the DRAFT watermark)\n2. Approve the deploy at the production environment gate\n3. Post the live URL in a comment on this PR\n4. Assign a member of @usace-rmc/docs-director via the Reviewers sidebar\n\nThe Director will review at the live URL. If the Director requests changes and the author pushes fixes, re-trigger the checkpoint deploy to refresh the live URL.`);
413+
} else {
414+
// Lanes 2 & 3: no Director review — ready to merge
415+
await addLabels(['stage:ready-to-merge']);
416+
await setReviewStatus('success', STAGE_STATUS_DESC['stage:ready-to-merge']);
417+
await postComment(`✅ **Technical edit marked complete** by the author.\n\nThis PR is **ready for final merge and publication**.\n\n@usace-rmc/docs-admin next steps:\n1. Check out this branch\n2. Flip the document's \`draft\` flag to \`false\`\n3. Update \`00-version-history.mdx\`\n4. Commit and push\n5. Merge to \`main\`\n6. Approve the production deploy`);
418+
}
400419
}
401420
}
402421
return;
@@ -438,13 +457,13 @@ jobs:
438457
nextStage = 'stage:lead-civil-review';
439458
comment = `✅ **Peer review approved** by @${reviewer}.\n\nAdvancing to **RMC Lead Civil review**.\n\n@usace-rmc/docs-admin please assign the Lead Civil reviewer(s) via the Reviewers sidebar.`;
440459
} else if (existingStage === 'stage:lead-civil-review') {
441-
nextStage = 'stage:ready-to-merge';
442-
comment = `✅ **Lead Civil review approved** by @${reviewer}.\n\nThis PR is **ready for final merge**.\n\n@usace-rmc/docs-admin next steps:\n1. Check out this branch\n2. Flip the document's \`draft\` flag to \`false\`\n3. Update \`00-version-history.mdx\`\n4. Commit and push\n5. Merge to \`main\`\n6. Approve the production deploy`;
460+
nextStage = 'stage:ai-editor-review';
461+
comment = `✅ **Lead Civil review approved** by @${reviewer}.\n\nAdvancing to **technical edit**.\n\n@usace-rmc/docs-admin please run the \`/technical-edit\` Claude Code skill against this PR (or assign a human technical editor). The technical edit reviews the document source MDX directly and posts inline comments on the PR.\n\nAfter the author addresses the technical edit comments and checks the completion checkbox in the PR description, the site admin will flip the draft flag, merge, and deploy.`;
443462
}
444463
} else if (existingLane === 'lane:minor-revision') {
445464
if (existingStage === 'stage:peer-review') {
446-
nextStage = 'stage:ready-to-merge';
447-
comment = `✅ **Peer review approved** by @${reviewer}.\n\nThis PR is **ready for final merge**.\n\n@usace-rmc/docs-admin next steps:\n1. Check out this branch\n2. Flip the document's \`draft\` flag to \`false\`\n3. Update \`00-version-history.mdx\`\n4. Commit and push\n5. Merge to \`main\`\n6. Approve the production deploy`;
465+
nextStage = 'stage:ai-editor-review';
466+
comment = `✅ **Peer review approved** by @${reviewer}.\n\nAdvancing to **technical edit**.\n\n@usace-rmc/docs-admin please run the \`/technical-edit\` Claude Code skill against this PR (or assign a human technical editor). The technical edit reviews the document source MDX directly and posts inline comments on the PR.\n\nAfter the author addresses the technical edit comments and checks the completion checkbox in the PR description, the site admin will flip the draft flag, merge, and deploy.`;
448467
}
449468
}
450469

planning/01-repo-implementation.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ This document describes every structural change to the `usace-rmc/rmc-software-d
1919
1. Author opens PR with `docs/major/`. Preview workflow publishes to preview URL.
2020
2. Peer reviewer reviews on preview URL, approves.
2121
3. RMC Lead Civil reviews on preview URL, approves.
22-
4. Site admin flips draft flag, merges to `main`, approves final deploy.
22+
4. AI technical edit: someone runs `/technical-edit`, author addresses comments and checks the completion checkbox.
23+
5. Site admin flips draft flag, merges to `main`, approves final deploy.
24+
25+
**Lane 3 — Minor revision:**
2326

24-
**Lane 3 — Minor revision:** Peer review only on preview URL, then site admin merges and deploys.
27+
1. Author opens PR with `docs/minor/`. Preview workflow publishes to preview URL.
28+
2. Peer reviewer reviews on preview URL, approves.
29+
3. AI technical edit: someone runs `/technical-edit`, author addresses comments and checks the completion checkbox.
30+
4. Site admin flips draft flag, merges to `main`, approves final deploy.
2531

2632
**Lane 4 — Editorial fix:** Site admin reviews on preview URL, merges and deploys. No formal review.
2733

0 commit comments

Comments
 (0)