Add SessionStart hook, fix review-loop regex, thin CLAUDE.md (#5) #6

Merged
forgejo_admin merged 2 commits from 5-sop-enforcement into main 2026-02-24 17:18:39 +00:00
Contributor

Summary

  • SessionStart hook: Injects platform detection (GitHub vs Forgejo) and active SOPs from pal-e-docs into every session context automatically
  • Fix remind-review-loop.sh: Regex now anchors to end of /pulls path so it does not fire on merge requests (/pulls/NUM/merge)
  • Replace Notion URLs: All 3 Notion references updated to pal-e-docs slug pointers
  • Thin CLAUDE.md: 170 lines → 37 lines. Migrated 5 notes to pal-e-docs (worktree-workflow, branch-protection, solo-dev-pr-workflow, pr-review-loop, ci-rules)

Test plan

  • Start new Claude Code session — agent shows awareness of active SOPs
  • gh pr merge or Forgejo merge does NOT trigger review-loop reminder
  • Forgejo PR creation still triggers the reminder
  • get_note(slug="pr-review-loop") returns content from pal-e-docs
  • After /clear or compaction, SOPs re-injected

Closes #5

🤖 Generated with Claude Code

## Summary - **SessionStart hook:** Injects platform detection (GitHub vs Forgejo) and active SOPs from pal-e-docs into every session context automatically - **Fix remind-review-loop.sh:** Regex now anchors to end of `/pulls` path so it does not fire on merge requests (`/pulls/NUM/merge`) - **Replace Notion URLs:** All 3 Notion references updated to pal-e-docs slug pointers - **Thin CLAUDE.md:** 170 lines → 37 lines. Migrated 5 notes to pal-e-docs (worktree-workflow, branch-protection, solo-dev-pr-workflow, pr-review-loop, ci-rules) ## Test plan - [ ] Start new Claude Code session — agent shows awareness of active SOPs - [ ] `gh pr merge` or Forgejo merge does NOT trigger review-loop reminder - [ ] Forgejo PR creation still triggers the reminder - [ ] `get_note(slug="pr-review-loop")` returns content from pal-e-docs - [ ] After `/clear` or compaction, SOPs re-injected Closes #5 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- SessionStart hook injects platform detection + active SOPs from pal-e-docs
- Fix remind-review-loop.sh regex to not fire on PR merges
- Replace Notion URLs with pal-e-docs references
- Thin CLAUDE.md from 170→37 lines, migrate content to pal-e-docs notes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add inline is_forgejo_repo/is_github_repo fallbacks when
forgejo-helper.sh is missing, preventing misleading platform output.
Also add early jq availability check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Contributor

Review Fix (round 1)

Blocker addressed: Added inline fallback functions for is_forgejo_repo and is_github_repo when forgejo-helper.sh is unavailable. Previously, missing helper would silently produce misleading platform detection. Now uses inline git remote get-url origin | grep pattern as fallback.

Also added: Early jq availability check (command -v jq || exit 0) for explicit dependency handling.

API URL verified: /notes?tags=sop,active returns correct JSON array from live pal-e-docs instance.

## Review Fix (round 1) **Blocker addressed:** Added inline fallback functions for `is_forgejo_repo` and `is_github_repo` when `forgejo-helper.sh` is unavailable. Previously, missing helper would silently produce misleading platform detection. Now uses inline `git remote get-url origin | grep` pattern as fallback. **Also added:** Early `jq` availability check (`command -v jq || exit 0`) for explicit dependency handling. **API URL verified:** `/notes?tags=sop,active` returns correct JSON array from live pal-e-docs instance.
Sign in to join this conversation.
No description provided.