Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .claude/commands/check-db.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
description: Verify RootsMagic database file exists and is accessible
---

Check that the RootsMagic database file is present and can be queried.

```bash
DB_PATH="${RM_DATABASE_PATH:-data/Iiams.rmtree}"

if [ ! -f "$DB_PATH" ]; then
echo "❌ Database file not found: $DB_PATH"
echo ""
echo "Set RM_DATABASE_PATH in config/.env"
exit 1
fi

echo "✅ Database found: $DB_PATH"
echo ""

# Get basic stats
PERSON_COUNT=$(sqlite3 "$DB_PATH" "SELECT COUNT(*) FROM PersonTable;")
EVENT_COUNT=$(sqlite3 "$DB_PATH" "SELECT COUNT(*) FROM EventTable;")
SOURCE_COUNT=$(sqlite3 "$DB_PATH" "SELECT COUNT(*) FROM SourceTable;")

echo "📊 Database Statistics:"
echo " • Persons: $PERSON_COUNT"
echo " • Events: $EVENT_COUNT"
echo " • Sources: $SOURCE_COUNT"
```
11 changes: 11 additions & 0 deletions .claude/commands/coverage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description: Run tests with coverage report
---

Run the full test suite with coverage analysis. Shows which lines are covered and identifies gaps.

```bash
uv run pytest --cov=rmagent --cov-report=term-missing --cov-report=html
echo ""
echo "📊 Coverage report generated at: file://$(pwd)/htmlcov/index.html"
```
149 changes: 149 additions & 0 deletions .claude/commands/doc-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
description: Review documentation for accuracy and completeness
show-prompt: true
meta: true
---

Review project documentation to ensure it's concise, current, and accurate.

**Modes:**
- `/doc-review` or `/doc-review brief` - Review root docs and INDEX.md
- `/doc-review deep` - Review ALL documentation files

This command reads documentation files and asks the LLM to verify:
1. Content is concise and well-organized
2. Information is current (no outdated references)
3. Cross-references and links are accurate
4. No contradictions between documents
5. INDEX.md accurately reflects documentation structure

```bash
MODE="${1:-brief}"

if [ "$MODE" = "deep" ]; then
cat <<'PROMPT'
Please perform a DEEP documentation review of the RMAgent project.

Review ALL documentation files for:
1. **Accuracy** - Are all statements, commands, and examples correct?
2. **Currency** - Is information up-to-date? Any outdated references?
3. **Consistency** - Do documents contradict each other?
4. **Completeness** - Are there gaps in documentation coverage?
5. **Conciseness** - Can any content be condensed without losing value?
6. **Organization** - Is content in the right location?

**Root Documentation Files:**
PROMPT

echo ""
echo "=== CLAUDE.md ==="
head -100 CLAUDE.md
echo ""
echo "=== README.md ==="
head -100 README.md
echo ""
echo "=== AGENTS.md ==="
head -50 AGENTS.md
echo ""
echo "=== CONTRIBUTING.md ==="
head -50 CONTRIBUTING.md
echo ""
echo "=== CHANGELOG.md ==="
head -30 CHANGELOG.md

cat <<'PROMPT'

**Documentation Index:**
PROMPT

echo ""
echo "=== docs/INDEX.md ==="
cat docs/INDEX.md

cat <<'PROMPT'

**All Documentation Files:**
PROMPT

echo ""
find docs -name "*.md" -type f | sort | while read file; do
echo ""
echo "=== $file ==="
head -80 "$file"
echo "... [file continues]"
done

cat <<'PROMPT'

Please provide:
1. **Overall Assessment** - General state of documentation
2. **Critical Issues** - Must-fix problems (inaccuracies, broken links, outdated info)
3. **Recommendations** - Suggestions for improvement
4. **Specific Fixes** - Line-by-line corrections needed

Focus on actionable feedback that improves documentation quality.
PROMPT

else
# Brief mode - just check root docs + INDEX.md
cat <<'PROMPT'
Please perform a BRIEF documentation review of the RMAgent project's core files.

Review the following files for:
1. **Accuracy** - Are statements, commands, and statistics correct?
2. **Currency** - Any outdated references or old information?
3. **Consistency** - Do these files contradict each other?
4. **Conciseness** - Is content appropriately detailed (not too verbose)?
5. **INDEX.md Accuracy** - Does INDEX.md correctly reference all docs in the repository?

**Root Documentation Files:**
PROMPT

echo ""
echo "=== CLAUDE.md ==="
cat CLAUDE.md
echo ""
echo "=== README.md ==="
cat README.md
echo ""
echo "=== AGENTS.md ==="
cat AGENTS.md
echo ""
echo "=== CONTRIBUTING.md ==="
cat CONTRIBUTING.md
echo ""
echo "=== CHANGELOG.md ==="
cat CHANGELOG.md

cat <<'PROMPT'

**Documentation Index:**
PROMPT

echo ""
echo "=== docs/INDEX.md ==="
cat docs/INDEX.md

cat <<'PROMPT'

**Verify INDEX.md Completeness:**
Check that docs/INDEX.md accurately references all documentation files in the repository.
PROMPT

echo ""
echo "=== All docs files in repository ==="
find docs -name "*.md" -type f | sort

cat <<'PROMPT'

Please provide:
1. **Quick Assessment** - Overall state of core documentation
2. **Critical Issues** - Any inaccuracies, broken references, or outdated info
3. **INDEX.md Status** - Is it complete and accurate?
4. **Quick Wins** - Easy improvements to make immediately

Be concise and actionable. Focus on what needs fixing right now.
PROMPT

fi
```
33 changes: 33 additions & 0 deletions .claude/commands/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
description: Open documentation in browser or show quick reference
---

Quick access to RMAgent documentation.

Usage:
- `/docs` - Show documentation index
- `/docs schema` - Open schema reference
- `/docs data-formats` - Open data formats reference
- `/docs dev` - Open developer guide

```bash
case "$ARGUMENTS" in
schema)
echo "📖 Schema Reference: docs/reference/schema/schema-reference.md"
cat docs/reference/schema/schema-reference.md | head -50
;;
data-formats)
echo "📖 Data Formats: docs/reference/data-formats/"
ls -1 docs/reference/data-formats/
;;
dev)
echo "📖 Developer Guide: docs/guides/developer-guide.md"
cat docs/guides/developer-guide.md | head -50
;;
*)
echo "📚 RMAgent Documentation Index"
echo ""
cat docs/INDEX.md | head -80
;;
esac
```
22 changes: 22 additions & 0 deletions .claude/commands/lint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
description: Run linting checks (ruff and black)
---

Run code quality checks using ruff and black formatters.

Usage:
- `/lint` - Check code without modifying
- `/lint fix` - Auto-fix issues where possible

```bash
if [ "$ARGUMENTS" = "fix" ]; then
echo "🔧 Auto-fixing issues..."
uv run ruff check --fix .
uv run black .
echo "✅ Fixes applied"
else
echo "🔍 Checking code quality..."
uv run ruff check .
uv run black --check .
fi
```
23 changes: 23 additions & 0 deletions .claude/commands/rm-ask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: Ask a question about the genealogy database using AI
show-prompt: true
meta: true
---

Ask natural language questions about your genealogy data. Uses AI to query and analyze the database.

Usage:
- `/rm-ask "Who are the ancestors of John Smith?"`
- `/rm-ask "Find everyone born in Baltimore"`
- `/rm-ask "Show family relationships for person 1"`

```bash
if [ -z "$ARGUMENTS" ]; then
echo "❌ Error: Question required"
echo "Usage: /rm-ask \"Your question here\""
exit 1
fi

echo "🤔 Asking AI about your genealogy data..."
uv run rmagent ask "$ARGUMENTS"
```
27 changes: 27 additions & 0 deletions .claude/commands/rm-bio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: Generate a biography for a person using rmagent
show-prompt: true
meta: true
---

Generate a biography using the rmagent CLI. Requires a person ID.

Usage:
- `/rm-bio 1` - Generate standard biography for person 1
- `/rm-bio 1 short` - Generate short biography
- `/rm-bio 1 comprehensive` - Generate comprehensive biography

```bash
if [ -z "$1" ]; then
echo "❌ Error: Person ID required"
echo "Usage: /rm-bio <person_id> [length]"
echo "Example: /rm-bio 1 standard"
exit 1
fi

PERSON_ID=$1
LENGTH=${2:-standard}

echo "📝 Generating $LENGTH biography for person $PERSON_ID..."
uv run rmagent bio $PERSON_ID --length $LENGTH --output reports/biographies/
```
23 changes: 23 additions & 0 deletions .claude/commands/rm-person.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: Query person details from RootsMagic database
---

Query detailed information about a person using rmagent CLI.

Usage:
- `/rm-person 1` - Basic person info
- `/rm-person 1 --events` - Include all events
- `/rm-person 1 --family` - Include family relationships
- `/rm-person 1 --ancestors` - Include ancestors
- `/rm-person 1 --descendants` - Include descendants

```bash
if [ -z "$1" ]; then
echo "❌ Error: Person ID required"
echo "Usage: /rm-person <person_id> [--options]"
exit 1
fi

echo "👤 Querying person $1..."
uv run rmagent person $@
```
22 changes: 22 additions & 0 deletions .claude/commands/rm-quality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
description: Run data quality validation on RootsMagic database
---

Run data quality checks on the RootsMagic database.

Usage:
- `/rm-quality` - Run all quality checks
- `/rm-quality dates` - Check only date issues
- `/rm-quality names` - Check only name issues
- `/rm-quality places` - Check only place issues
- `/rm-quality relationships` - Check only relationship issues

```bash
if [ -z "$ARGUMENTS" ]; then
echo "🔍 Running all data quality checks..."
uv run rmagent quality --format table
else
echo "🔍 Running quality checks for category: $ARGUMENTS"
uv run rmagent quality --category $ARGUMENTS --format table
fi
```
21 changes: 21 additions & 0 deletions .claude/commands/rm-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
description: Search RootsMagic database by name or place
---

Search the RootsMagic database for people by name or place.

Usage:
- `/rm-search --name "John Smith"` - Search by name
- `/rm-search --place "Baltimore"` - Search by place
- `/rm-search --name "Smith" --limit 10` - Limit results

```bash
if [ -z "$ARGUMENTS" ]; then
echo "❌ Error: Search parameters required"
echo "Usage: /rm-search --name \"Name\" or /rm-search --place \"Place\""
exit 1
fi

echo "🔎 Searching database..."
uv run rmagent search $ARGUMENTS
```
22 changes: 22 additions & 0 deletions .claude/commands/rm-timeline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
description: Generate timeline visualization for a person
---

Generate a TimelineJS3 timeline for a person's life events.

Usage:
- `/rm-timeline 1` - Generate JSON timeline for person 1
- `/rm-timeline 1 --format html` - Generate HTML timeline
- `/rm-timeline 1 --include-family` - Include family events
- `/rm-timeline 1 --group-by-phase` - Group events by life phases

```bash
if [ -z "$1" ]; then
echo "❌ Error: Person ID required"
echo "Usage: /rm-timeline <person_id> [options]"
exit 1
fi

echo "📅 Generating timeline for person $1..."
uv run rmagent timeline $@
```
Loading