feat(sync): add wiki knowledge layer summary to sync/save output
- Added wiki change detection and categorization in sync.sh - Shows articles by type (clients/projects/systems/patterns/meta) - Displays status (added/modified/deleted) and counts - Updated sync.md and save.md documentation
This commit is contained in:
@@ -71,6 +71,8 @@ Commit: <sha> <subject>
|
|||||||
Author: <name> <<email>>
|
Author: <name> <<email>>
|
||||||
Push: <old>..<new> main -> main (origin)
|
Push: <old>..<new> main -> main (origin)
|
||||||
File: <session log path> (+N lines, appended/created)
|
File: <session log path> (+N lines, appended/created)
|
||||||
|
|
||||||
|
Wiki updates (if any): <count> articles updated (clients/projects/systems/patterns)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ Address each action item or question explicitly before moving on. Do not bury cr
|
|||||||
|
|
||||||
Report:
|
Report:
|
||||||
- Pulled commits — count + authors + one-line summaries
|
- Pulled commits — count + authors + one-line summaries
|
||||||
|
- Wiki updates — categorized by clients/projects/systems/patterns/meta with status (added/modified/deleted)
|
||||||
- Pushed commits — count + your commits + outgoing SHAs
|
- Pushed commits — count + your commits + outgoing SHAs
|
||||||
- Vault sync status — pulled/pushed/clean
|
- Vault sync status — pulled/pushed/clean
|
||||||
- Cross-user notes addressed (if any)
|
- Cross-user notes addressed (if any)
|
||||||
|
|||||||
@@ -171,6 +171,33 @@ if [ "$INCOMING_COUNT" -gt 0 ]; then
|
|||||||
echo ""
|
echo ""
|
||||||
echo -e "${CYAN}--- Files touched by incoming commits ---${NC}"
|
echo -e "${CYAN}--- Files touched by incoming commits ---${NC}"
|
||||||
git diff --stat HEAD..$REMOTE_BRANCH | tail -20
|
git diff --stat HEAD..$REMOTE_BRANCH | tail -20
|
||||||
|
|
||||||
|
# Wiki summary section
|
||||||
|
WIKI_CHANGES=$(git diff --name-status HEAD..$REMOTE_BRANCH -- 'wiki/*.md' 'wiki/*/*.md' 2>/dev/null || true)
|
||||||
|
if [ -n "$WIKI_CHANGES" ]; then
|
||||||
|
echo ""
|
||||||
|
echo -e "${CYAN}--- Wiki knowledge layer updates ---${NC}"
|
||||||
|
|
||||||
|
# Categorize by type
|
||||||
|
WIKI_CLIENTS=$(echo "$WIKI_CHANGES" | grep 'wiki/clients/' | awk '{printf " %s %s\n", $1, $2}' | sed 's|wiki/clients/||' | sed 's|\.md$||')
|
||||||
|
WIKI_PROJECTS=$(echo "$WIKI_CHANGES" | grep 'wiki/projects/' | awk '{printf " %s %s\n", $1, $2}' | sed 's|wiki/projects/||' | sed 's|\.md$||')
|
||||||
|
WIKI_SYSTEMS=$(echo "$WIKI_CHANGES" | grep 'wiki/systems/' | awk '{printf " %s %s\n", $1, $2}' | sed 's|wiki/systems/||' | sed 's|\.md$||')
|
||||||
|
WIKI_PATTERNS=$(echo "$WIKI_CHANGES" | grep 'wiki/patterns/' | awk '{printf " %s %s\n", $1, $2}' | sed 's|wiki/patterns/||' | sed 's|\.md$||')
|
||||||
|
WIKI_META=$(echo "$WIKI_CHANGES" | grep -E 'wiki/(index|overview)\.md' | awk '{printf " %s %s\n", $1, $2}' | sed 's|wiki/||' | sed 's|\.md$||')
|
||||||
|
|
||||||
|
[ -n "$WIKI_CLIENTS" ] && echo -e "${CYAN}Clients:${NC}\n$WIKI_CLIENTS"
|
||||||
|
[ -n "$WIKI_PROJECTS" ] && echo -e "${CYAN}Projects:${NC}\n$WIKI_PROJECTS"
|
||||||
|
[ -n "$WIKI_SYSTEMS" ] && echo -e "${CYAN}Systems:${NC}\n$WIKI_SYSTEMS"
|
||||||
|
[ -n "$WIKI_PATTERNS" ] && echo -e "${CYAN}Patterns:${NC}\n$WIKI_PATTERNS"
|
||||||
|
[ -n "$WIKI_META" ] && echo -e "${CYAN}Meta:${NC}\n$WIKI_META"
|
||||||
|
|
||||||
|
# Count by status
|
||||||
|
WIKI_ADDED=$(echo "$WIKI_CHANGES" | grep -c '^A' || echo 0)
|
||||||
|
WIKI_MODIFIED=$(echo "$WIKI_CHANGES" | grep -c '^M' || echo 0)
|
||||||
|
WIKI_DELETED=$(echo "$WIKI_CHANGES" | grep -c '^D' || echo 0)
|
||||||
|
|
||||||
|
echo -e "${CYAN}Summary:${NC} $WIKI_ADDED added, $WIKI_MODIFIED modified, $WIKI_DELETED deleted"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${GREEN}[OK]${NC} No incoming changes."
|
echo -e "${GREEN}[OK]${NC} No incoming changes."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user