Add /update-docs slash command for post-merge documentation #71

Closed
opened 2026-03-08 16:44:27 +00:00 by forgejo_admin · 0 comments
Contributor

Lineage

plan-2026-02-26-tf-modularize-postgres → Phase 7f → Phase 7f-7

Repo

forgejo_admin/claude-custom

User Story

As Betty Sue
I want a /update-docs slash command that walks the post-merge traceability chain
So that documentation stays current after every PR merge without relying on manual SOP recall

Context

The sop-post-merge-docs SOP defines a 7-step traceability chain walk after PR merges:

  1. Close Forgejo issue
  2. Update phase note (status → completed, deliverables, PR number)
  3. Update plan note (phase progress)
  4. Update project page (issues table, status, roadmap)
  5. Move sprint board item to done
  6. Update memory
  7. Capture discovered scope as TODOs

The PostToolUse hook remind-update-docs.sh already fires after mcp__forgejo__merge_approved_pr and injects a reminder to run /update-docs. But the command doesn't exist — no commands/ directory exists in claude-custom at all.

The skill-update-docs note in pal-e-docs describes the workflow. The slash command translates that into an executable Claude Code prompt.

File Targets

Files to create:

  • commands/update-docs.md — the slash command prompt (new directory + new file)

Files to potentially modify:

  • README.md — document the new commands directory and deploy process

Files NOT to touch:

  • hooks/remind-update-docs.sh — already works correctly as-is
  • Any files in hooks/ — no hook changes needed

Acceptance Criteria

  • commands/update-docs.md exists and follows Claude Code custom command format
  • Command prompts agent to walk the full traceability chain (all 7 SOP steps)
  • Command asks for context it needs (PR number, phase slug, plan slug) if not already in conversation
  • Command uses pal-e-docs MCP tools: get_note, update_note, create_note, get_sprint_board, move_sprint_item
  • Command references mcp__forgejo__* tools for issue closing
  • Command is idempotent (safe to run multiple times)

Test Expectations

  • Manual: copy commands/update-docs.md to ~/.claude/commands/ and verify /update-docs appears in Claude Code command list
  • Manual: run /update-docs after a test merge and verify it walks the chain

Constraints

  • Follow existing claude-custom patterns (hooks are .sh, commands are .md)
  • This is the FIRST custom command — establish the convention for future commands
  • The command is a prompt, not a script — it tells Claude what to do, not how to execute shell commands
  • Reference the skill-update-docs pal-e-docs note for the canonical workflow
  • Keep the prompt concise but complete — agent should be able to follow it without reading the SOP

Checklist

  • PR opened
  • Manual test passes
  • No unrelated changes
  • phase-postgres-7f-7-post-merge-automation — phase note
  • sop-post-merge-docs — the SOP being automated
  • skill-update-docs — workflow description in pal-e-docs
### Lineage `plan-2026-02-26-tf-modularize-postgres` → Phase 7f → Phase 7f-7 ### Repo `forgejo_admin/claude-custom` ### User Story As Betty Sue I want a `/update-docs` slash command that walks the post-merge traceability chain So that documentation stays current after every PR merge without relying on manual SOP recall ### Context The `sop-post-merge-docs` SOP defines a 7-step traceability chain walk after PR merges: 1. Close Forgejo issue 2. Update phase note (status → completed, deliverables, PR number) 3. Update plan note (phase progress) 4. Update project page (issues table, status, roadmap) 5. Move sprint board item to done 6. Update memory 7. Capture discovered scope as TODOs The PostToolUse hook `remind-update-docs.sh` already fires after `mcp__forgejo__merge_approved_pr` and injects a reminder to run `/update-docs`. But the command doesn't exist — no `commands/` directory exists in claude-custom at all. The `skill-update-docs` note in pal-e-docs describes the workflow. The slash command translates that into an executable Claude Code prompt. ### File Targets Files to create: - `commands/update-docs.md` — the slash command prompt (new directory + new file) Files to potentially modify: - `README.md` — document the new commands directory and deploy process Files NOT to touch: - `hooks/remind-update-docs.sh` — already works correctly as-is - Any files in `hooks/` — no hook changes needed ### Acceptance Criteria - [ ] `commands/update-docs.md` exists and follows Claude Code custom command format - [ ] Command prompts agent to walk the full traceability chain (all 7 SOP steps) - [ ] Command asks for context it needs (PR number, phase slug, plan slug) if not already in conversation - [ ] Command uses pal-e-docs MCP tools: `get_note`, `update_note`, `create_note`, `get_sprint_board`, `move_sprint_item` - [ ] Command references `mcp__forgejo__*` tools for issue closing - [ ] Command is idempotent (safe to run multiple times) ### Test Expectations - [ ] Manual: copy `commands/update-docs.md` to `~/.claude/commands/` and verify `/update-docs` appears in Claude Code command list - [ ] Manual: run `/update-docs` after a test merge and verify it walks the chain ### Constraints - Follow existing claude-custom patterns (hooks are `.sh`, commands are `.md`) - This is the FIRST custom command — establish the convention for future commands - The command is a prompt, not a script — it tells Claude what to do, not how to execute shell commands - Reference the `skill-update-docs` pal-e-docs note for the canonical workflow - Keep the prompt concise but complete — agent should be able to follow it without reading the SOP ### Checklist - [ ] PR opened - [ ] Manual test passes - [ ] No unrelated changes ### Related - `phase-postgres-7f-7-post-merge-automation` — phase note - `sop-post-merge-docs` — the SOP being automated - `skill-update-docs` — workflow description in pal-e-docs
forgejo_admin 2026-03-08 19:56:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/claude-custom#71
No description provided.