Update documentation and push changes to version control (main repository)
Updates documentation (memory-bank, README, CLAUDE.md) based on recent code changes, then commits and pushes. Use after completing work to keep docs in sync with your changes.
/plugin marketplace add cruzanstx/daplug/plugin install daplug@cruzanstx<context_detection> Detect execution context:
REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$REPO_ROOT")
# Check if we're in a worktree
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
GIT_DIR=$(git rev-parse --git-dir)
if [[ "$GIT_DIR" == *".git/worktrees/"* ]]; then
IS_WORKTREE=true
MAIN_REPO=$(git rev-parse --path-format=absolute --git-common-dir | sed 's|/.git$||')
else
IS_WORKTREE=false
MAIN_REPO="$REPO_ROOT"
fi
fi
Worktree behavior:
git status
git log --oneline -5 # See recent commits for context
Review what was changed:
git diff --stat HEAD~5 or similar)Based on recent changes, update these files as needed (skip if no relevant changes):
# Stage memory-bank and doc changes
git add memory-bank/ CLAUDE.md README.md 2>/dev/null
# Check what's staged
git status
# Commit with conventional format
git commit -m "docs: update memory bank with <brief-description>
<optional body with details>
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>"
If in main repo:
git push origin $(git rev-parse --abbrev-ref HEAD)
If in worktree:
<commit_format> Type prefixes:
docs: - Documentation onlydocs(scope): - Documentation for specific area (frontend, backend, processor)Examples:
docs: update memory bank with GitHub schema migrationdocs(processor): document new job types in systemPatternsdocs: archive completed prompts and update progress
</commit_format><invocation_modes>
Manual invocation: User runs /daplug:uvc directly after completing work
Automatic invocation: Called by /daplug:run-prompt --worktree before final commit
When called automatically, the caller will pass context about what was implemented. </invocation_modes>