feat: expand agents (10), skills (20), and hooks (11) with profile system

Agents:
- Add YAML frontmatter (model, tools) to all 7 existing agents
- New agents: planner (opus), build-error-resolver (sonnet), loop-operator (sonnet)

Skills:
- search-first: research before building (Adopt/Extend/Compose/Build)
- verification-loop: full quality gate pipeline (Build→TypeCheck→Lint→Test→Security→Diff)
- strategic-compact: when and how to run /compact effectively
- autonomous-loops: 6 patterns for autonomous agent workflows
- continuous-learning: extract session learnings into instincts

Hooks:
- Profile system (minimal/standard/strict) via run-with-profile.sh
- config-protection: block linter/formatter config edits (standard)
- suggest-compact: remind about /compact every ~50 tool calls (standard)
- auto-tmux-dev: suggest tmux for dev servers (standard)
- session-save/session-load: persist and restore session context (Stop/SessionStart)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
olekhondera
2026-03-24 20:16:20 +02:00
parent cf86a91e4a
commit db5ba04fb9
26 changed files with 1361 additions and 58 deletions

31
.claude/hooks/session-load.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Restore session context from previous session
# Event: SessionStart
# Reads .claude/sessions/latest.json and outputs a context summary
SESSION_FILE="${CLAUDE_PROJECT_DIR:-.}/.claude/sessions/latest.json"
if [ ! -f "$SESSION_FILE" ]; then
exit 0
fi
# Read session data
TIMESTAMP=$(jq -r '.timestamp // "unknown"' "$SESSION_FILE" 2>/dev/null)
BRANCH=$(jq -r '.branch // "unknown"' "$SESSION_FILE" 2>/dev/null)
PHASE=$(jq -r '.phase // "unknown"' "$SESSION_FILE" 2>/dev/null)
MODIFIED=$(jq -r '.modified_files // [] | length' "$SESSION_FILE" 2>/dev/null)
STAGED=$(jq -r '.staged_files // [] | length' "$SESSION_FILE" 2>/dev/null)
COMMITS=$(jq -r '.recent_commits // [] | join("\n ")' "$SESSION_FILE" 2>/dev/null)
echo "Previous session ($TIMESTAMP):"
echo " Branch: $BRANCH"
echo " Phase: $PHASE"
echo " Modified files: $MODIFIED, Staged: $STAGED"
if [ -n "$COMMITS" ] && [ "$COMMITS" != "" ]; then
echo " Recent commits:"
echo " $COMMITS"
fi
echo ""
echo "Reminder: check RULES.md and RECOMMENDATIONS.md for project conventions."
exit 0