docs(playbooks): generalize instance lessons + add lesson-framing guard#159
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughDocumentation governance is refined to require playbook sections state reusable general principles rather than incident-specific lessons. A new enforcement guard detects "Lesson" callouts, and existing playbook sections on agent completion criteria and test separation are generalized to follow the new pattern. ChangesDocumentation governance and playbook generalization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Make practice docs reusable and keep them that way: - Generalize three over-fit spots so they apply to any use case: agent-checklist (drop the organization-management incident gap-list and a register/settings/delete + embedded-quote example) and testing.md (reframe "tenant isolation vs async provisioning" as the general rule "keep deterministic request-path tests separate from async-pipeline tests"). - docs-style.md: add "Keep practice docs general" — principle in the playbook, instance specifics in the use-case/PROGRESS/retro; instances only as labeled examples. Adds the matching anti-pattern row. - check-doc-drift.sh: narrow incident/lesson-framing guard (flags "Lesson (…)" / "**Lesson" callouts in playbooks + CLAUDE.md + ARCHITECTURE.md), wired into the CI-only gates list. Closes the loop on Gate 3's existing "Incident-level detail in rule text?" question. Reference examples meant to be copied (register-org layout, repo-layout config, patterns.md code) are intentionally specific and left as-is. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
90a13d0 to
f894b37
Compare
Summary
Makes the practice docs reusable and adds a mechanism so they stay that way — the recurring problem was incident lessons getting baked into general rules at the moment they were learned, which only fit the originating use case.
Generalize (3 over-fit spots):
agent-checklist.md— replace the organization-management incident gap-list with the general principle; drop aregister → settings → deleteexample and an embedded user-quote from the Wrong/Right table.testing.md— reframe "tenant isolation vs async provisioning" as the general rule "keep deterministic request-path tests separate from async-pipeline tests" (dropped the platform-foundation framing and PG-specific diagnosis).Prevent recurrence (two layers):
docs-style.md— new "Keep practice docs general" section + anti-pattern row: principle goes in the playbook, instance specifics go in the use-case/PROGRESS.md/PR retro, concrete instances appear only as labeled examples. Completes the loop on Gate 3's existing "Incident-level detail in rule text?" question.scripts/check-doc-drift.sh— narrow incident/lesson-framing guard overdocs/playbooks/*,CLAUDE.md,ARCHITECTURE.md. Deliberately high-precision (flags the recurring "Lesson"-callout class; verified it fires on a probe, ignores the Gate-3 meta-line and legitimateexample [...]pointers). Wired into the agent-checklist CI-gates list.Reference examples meant to be copied (register-org layout, repo-layout config,
patterns.mdcode) are intentionally specific and left as-is.Linked spec
Process/playbook change — no use-case AC.
Requirements
docs-style.mdauthoring rule + anti-pattern row./scripts/check-doc-drift.shgreen🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores