Automation scripts and agent helpers for the Digital Brain. Use these scripts for recurring tasks, summaries, and maintenance.
Copy the agent definition below into:
~/.claude/agents/agents-module.md---
name: agents-module
description: Automation scripts and agent helpers for the Digital Brain. Use these scripts for recurring tasks, summaries, and maintenance.
---
# Agent Automation
Scripts and workflows that help maintain and leverage your Digital Brain.
## Available Scripts
| Script | Purpose | Frequency |
|--------|---------|-----------|
| `weekly_review.py` | Generate weekly review from data | Weekly |
| `content_ideas.py` | Generate content ideas from knowledge | On-demand |
| `stale_contacts.py` | Find contacts needing outreach | Weekly |
| `metrics_snapshot.py` | Compile metrics for tracking | Weekly |
| `idea_to_draft.py` | Expand an idea into a draft | On-demand |
## How to Use
Scripts are in `agents/scripts/`. They work with your Digital Brain data and can be run by the agent when needed.
### Running Scripts
```bash
# Agent can execute scripts directly
python agents/scripts/weekly_review.py
# Or with arguments
python agents/scripts/content_ideas.py --pillar "ai_agents" --count 5
```
### Script Outputs
Scripts output to stdout in a format the agent can process. They may also write to files when appropriate (e.g., generating a review document).
## Agent Instructions
<instructions>
When using automation scripts:
1. **Weekly review**: Run every Sunday, outputs review template with data filled in
2. **Content ideas**: Use when user asks for ideas, leverages knowledge base
3. **Stale contacts**: Run weekly, surfaces relationships needing attention
4. **Metrics snapshot**: Run weekly to append to metrics.jsonl
5. **Idea to draft**: Use when user wants to develop a specific idea
Scripts read from Digital Brain files and output actionable results.
</instructions>
## Workflow Automations
### Sunday Weekly Review
```
1. Run metrics_snapshot.py to update metrics.jsonl
2. Run stale_contacts.py to identify outreach needs
3. Run weekly_review.py to generate review document
4. Present summary to user
```
### Content Ideation Session
```
1. Read recent entries from knowledge/bookmarks.jsonl
2. Check content/ideas.jsonl for undeveloped ideas
3. Run content_ideas.py for fresh suggestions
4. Cross-reference with content calendar
```
### Pre-Meeting Prep
```
1. Look up contact in network/contacts.jsonl
2. Pull recent interactions from network/interactions.jsonl
3. Check any pending todos involving them
4. Generate brief with context
```
## Custom Script Development
To add new scripts:
1. Create Python file in `agents/scripts/`
2. Follow existing patterns (read JSONL, output structured data)
3. Document in this file
4. Test with sample data
> Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard refuses 3+ file scope. Returns caveman diff receipt. Use when scope is bounded and obvious; do NOT use for new features, new files (unless asked), or cross-file refactors.
> Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard refuses 3+ file scope. Returns caveman diff receipt. Use when scope is bounded and obvious; do NOT use for new features, new files (unless asked), or cross-file refactors.
Produces clean reusable raster assets from approved Impeccable mock references without redesigning the direction.