PR Workflow for Doc Changes
PR Workflow for Doc Changes
Section titled “PR Workflow for Doc Changes”All changes to operational docs in the Liflode Knowledge Platform go through a GitHub Pull Request before merging to main. This ensures every edit is reviewed before it reaches staff.
Why PRs?
Section titled “Why PRs?”- Audit trail — every change is versioned and attributed
- Review gate — Rachel approves before publication
- Preview — Cloudflare Pages generates a preview URL on every PR
- Validation — automated checks catch frontmatter errors before review
How Claude Creates a PR
Section titled “How Claude Creates a PR”When Finn (or another agent) needs to update a doc:
-
Create a branch from main:
Terminal window git -C /c/Users/accou/repos/liflode-docs-site checkout -b docs/CORE-XXXX-short-description -
Make changes to the file(s) in
src/content/docs/ -
Commit and push:
Terminal window git -C /c/Users/accou/repos/liflode-docs-site add .git -C /c/Users/accou/repos/liflode-docs-site commit -m "docs(CORE-XXXX): description"git -C /c/Users/accou/repos/liflode-docs-site push -u origin docs/CORE-XXXX-short-description -
Open a PR via gh CLI:
Terminal window gh pr create \--repo Curious-Owl11/liflode-docs-site \--base main \--head docs/CORE-XXXX-short-description \--title "docs(CORE-XXXX): description" \--body "$(cat <<'EOF'## Doc Change Summary**What doc(s) changed?**- src/content/docs/...**Why?**CORE-XXXX: reason**Review cycle confirmed?**- [x] review_cycle_days in frontmatter is correctEOF)" -
Add Linear comment with the PR URL so Rachel can track it in-context.
Automated Checks (CI)
Section titled “Automated Checks (CI)”On every PR, GitHub Actions runs:
| Check | What it validates |
|---|---|
| Validate frontmatter | Required fields present, valid enum values, no duplicate doc_ids |
| Markdown lint | Basic markdown formatting |
| Build and Deploy | Astro build succeeds + Cloudflare Pages preview deployed |
All checks must pass before Rachel can merge.
How Rachel Reviews and Merges
Section titled “How Rachel Reviews and Merges”- Receive notification — GitHub notifies Rachel as CODEOWNER when a PR is opened
- Check the preview — Cloudflare Pages posts a preview URL as a PR comment. Open it to verify the doc renders correctly in the site.
- Review the diff — Check the frontmatter and content changes in the Files tab
- Approve and merge — If correct, Approve the PR and use Squash and merge to keep main history clean
- Production deployment — Merging to main triggers the deploy workflow automatically. The site updates within ~2 minutes.
Branch Naming Convention
Section titled “Branch Naming Convention”docs/CORE-XXXX-short-description # agent-driven changes (linked to Linear)docs/fix-DESCRIPTION # manual correctionsdocs/new-DOCNAME # new doc additionsEmergency Direct Push
Section titled “Emergency Direct Push”Direct push to main is blocked by branch protection. If an urgent fix is needed:
- Open a PR (even with just Rachel as author)
- Self-approve (enforcement is not applied to admins —
enforce_admins: false) - Merge immediately
This keeps the audit trail intact even for urgent changes.