Decision Log
Context
- Date: !
date "+%Y%m%d" - Repository: !
git rev-parse --show-toplevel(use basename only, e.g.,dotfilesnot the full path) - DB: !
python ${CLAUDE_SKILL_DIR}/scripts/db.py init - Summary: !
python ${CLAUDE_SKILL_DIR}/scripts/db.py summary
Script: ${CLAUDE_SKILL_DIR}/scripts/db.py
Mode: Record (default)
Use when no argument is provided or argument is not "search".
Steps
-
Analyze: Review conversation for the most recent design/architecture/technology decision
-
Extract: Identify topic, chosen approach, alternatives considered, and reasoning
-
Confirm: Use AskUserQuestion to present the decision and get approval. Format the question as:
Decision Record - Date: <date> - Repository: <repo-basename> - Topic: <short-label> - Chosen: <approach> - Alternatives: <other options considered> - Reasoning: <why this was chosen>Suggested responses: ["OK", "Revise"] If the user wants changes, revise and re-confirm.
-
Insert:
python ${CLAUDE_SKILL_DIR}/scripts/db.py insert '<date>' '<repo>' '<topic>' '<chosen>' '<alternatives>' '<reasoning>' -
The script prints the inserted row.
Mode: Search
Use when argument contains "search".
Steps
-
Parse intent: Understand what the user is looking for from conversation context
-
Build and run query:
# All decisions for current repo python ${CLAUDE_SKILL_DIR}/scripts/db.py search --repo '<repo>' # Full-text search python ${CLAUDE_SKILL_DIR}/scripts/db.py search --match '<keyword>' # Date range python ${CLAUDE_SKILL_DIR}/scripts/db.py search --from '<start>' --to '<end>' # Combined filters python ${CLAUDE_SKILL_DIR}/scripts/db.py search --repo '<repo>' --match '<keyword>' # Full detail for a specific decision python ${CLAUDE_SKILL_DIR}/scripts/db.py detail <id> # Update outcome python ${CLAUDE_SKILL_DIR}/scripts/db.py update-outcome <id> '<outcome>' -
Format: Present results in a readable format
Guidelines
- topic: Use kebab-case short labels (e.g.,
db-architecture,cache-strategy,auth-flow) - chosen/alternatives/reasoning: Write in plain English, concise but complete
- outcome: Update later via search mode when results are known
- Escape single quotes in shell arguments:
'it'\''s'