Skip to content
Closed
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
9 changes: 7 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
- **Persistent memory**: Workspace with hybrid search (FTS + vector via RRF)
- **Prompt injection defense**: Sanitizer, validator, policy rules, leak detection, shell env scrubbing
- **Multi-provider LLM**: NEAR AI, OpenAI, Anthropic, Ollama, OpenAI-compatible, Tinfoil private inference
- **Setup wizard**: 7-step interactive onboarding for first-run configuration
- **Setup wizard**: 8-step interactive onboarding for first-run configuration
- **Psychographic profiling**: Conversational first-interaction profiling with 9-dimension analysis and confidence-gated personalization
- **Heartbeat system**: Proactive periodic execution with checklist

## Build & Test
Expand Down Expand Up @@ -209,9 +210,13 @@ src/
│ ├── store.rs # Secret storage
│ └── types.rs # Credential types
├── profile.rs # Psychographic profile types, 9-dimension analysis framework
├── setup/ # Onboarding wizard (spec: src/setup/README.md)
│ ├── mod.rs # Entry point, check_onboard_needed()
│ ├── wizard.rs # 7-step interactive wizard
│ ├── wizard.rs # 8-step interactive wizard
│ ├── onboarding_chat.rs # Conversational "Getting to Know You" engine
│ ├── profile_evolution.rs # Weekly profile update prompts
│ ├── channels.rs # Channel setup helpers
│ └── prompts.rs # Terminal prompts (select, confirm, secret)
Expand Down
75 changes: 75 additions & 0 deletions skills/delegation/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
name: delegation
version: 0.1.0
description: Helps users delegate tasks, break them into steps, set deadlines, and track progress via routines and memory.
activation:
keywords:
- delegate
- hand off
- assign task
- help me with
- take care of
- remind me to
- schedule
- plan my
- manage my
- track this
patterns:
- "can you.*handle"
- "I need (help|someone) to"
- "take over"
- "set up a reminder"
- "follow up on"
tags:
- personal-assistant
- task-management
- delegation
max_context_tokens: 1500
---

# Task Delegation Assistant

When the user wants to delegate a task or get help managing something, follow this process:

## 1. Clarify the Task

Ask what needs to be done, by when, and any constraints. Get enough detail to act independently but don't over-interrogate. If the request is clear, skip straight to planning.

## 2. Break It Down

Decompose the task into concrete, actionable steps. Use `memory_write` to persist the task plan to a path like `tasks/{task-name}.md` with:
- Clear description
- Steps with checkboxes
- Due date (if any)
- Status: pending/in-progress/done

## 3. Set Up Tracking

If the task is recurring or has a deadline:
- Create a routine using `routine_create` for scheduled check-ins
- Add a heartbeat item if it needs daily monitoring
- Set up an event-triggered routine if it depends on external input

## 4. Use Profile Context

Check `USER.md` for the user's preferences:
- **Proactivity level**: High = check in frequently. Low = only report on completion.
- **Communication style**: Match their preferred tone and detail level.
- **Focus areas**: Prioritize tasks that align with their stated goals.

## 5. Execute or Queue

- If you can do it now (search, draft, organize, calculate), do it immediately.
- If it requires waiting, external action, or follow-up, create a reminder routine.
- If it requires tools you don't have, explain what's needed and suggest alternatives.

## 6. Report Back

Always confirm the plan with the user before starting execution. After completing, update the task file in memory and notify the user with a concise summary.

## Communication Guidelines

- Be direct and action-oriented
- Confirm understanding before acting on ambiguous requests
- When in doubt about autonomy level, ask once then remember the answer
- Use `memory_write` to track delegation preferences for future reference
118 changes: 118 additions & 0 deletions skills/routine-advisor/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
name: routine-advisor
version: 0.1.0
description: Suggests relevant cron routines based on user context, goals, and observed patterns
activation:
keywords:
- every day
- every morning
- every week
- routine
- automate
- remind me
- check daily
- monitor
- recurring
- schedule
- habit
- workflow
- keep forgetting
- always have to
- repetitive
- notifications
- digest
- summary
- review daily
- weekly review
patterns:
- "I (always|usually|often|regularly) (check|do|look at|review)"
- "every (morning|evening|week|day|monday|friday)"
- "I (wish|want) (I|it) (could|would) (automatically|auto)"
- "is there a way to (auto|schedule|set up)"
- "can you (check|monitor|watch|track).*for me"
- "I keep (forgetting|missing|having to)"
tags:
- automation
- scheduling
- personal-assistant
- productivity
max_context_tokens: 1500
---

# Routine Advisor

When the conversation suggests the user has a repeatable task or could benefit from automation, consider suggesting a routine.

## When to Suggest

Suggest a routine when you notice:
- The user describes doing something repeatedly ("I check my PRs every morning")
- The user mentions forgetting recurring tasks ("I keep forgetting to...")
- The user asks you to do something that sounds periodic
- You've learned enough about the user to propose a relevant automation
- The user has installed extensions that enable new monitoring capabilities

## How to Suggest

Be specific and concrete. Not "Want me to set up a routine?" but rather: "I noticed you review PRs every morning. Want me to create a daily 9am routine that checks your open PRs and sends you a summary?"

Always include:
1. What the routine would do (specific action)
2. When it would run (specific schedule in plain language)
3. How it would notify them (which channel they're on)

Wait for the user to confirm before creating.

## Pacing

- First 1-3 conversations: Do NOT suggest routines. Focus on helping and learning.
- After learning 2-3 user patterns: Suggest your first routine. Keep it simple.
- After 5+ conversations: Suggest more routines as patterns emerge.
- Never suggest more than 1 routine per conversation unless the user is clearly interested.
- If the user declines, wait at least 3 conversations before suggesting again.

## Creating Routines

Use the `routine_create` tool. Before creating, check `routine_list` to avoid duplicates.

Parameters:
- `trigger_type`: Usually "cron" for scheduled tasks
- `schedule`: Standard cron format. Common schedules:
- Daily 9am: `0 0 9 * * *`
- Weekday mornings: `0 0 9 * * MON-FRI`
- Weekly Monday: `0 0 9 * * MON`
- Every 2 hours during work: `0 0 9-17/2 * * MON-FRI`
- Sunday evening: `0 0 18 * * SUN`
- `action_type`: "lightweight" for simple checks, "full_job" for multi-step tasks
- `prompt`: Clear, specific instruction for what the routine should do
- `context_paths`: Workspace files to load as context (e.g., `["context/profile.json", "MEMORY.md"]`)

## Routine Ideas by User Type

**Developer:**
- Daily PR review digest (check open PRs, summarize what needs attention)
- CI/CD failure alerts (monitor build status)
- Weekly dependency update check
- Daily standup prep (summarize yesterday's work from daily logs)

**Professional:**
- Morning briefing (today's priorities from memory + any pending tasks)
- End-of-day summary (what was accomplished, what's pending)
- Weekly goal review (check progress against stated goals)
- Meeting prep reminders

**Health/Personal:**
- Daily exercise or habit check-in
- Weekly meal planning prompt
- Monthly budget review reminder

**General:**
- Daily news digest on topics of interest
- Weekly reflection prompt (what went well, what to improve)
- Periodic task/reminder check-in
- Regular cleanup of stale tasks or notes
- Weekly profile evolution (if the user has a profile in `context/profile.json`, suggest a Monday routine that reads the profile via `memory_read`, searches recent conversations for new patterns with `memory_search`, and updates the profile via `memory_write` if any fields should change with confidence > 0.6 — be conservative, only update with clear evidence)
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This skill suggests updating context/profile.json via memory_write, but doesn’t specify using append=false. Since the tool defaults to appending, following this guidance can corrupt the JSON profile after the initial write. Consider explicitly noting that JSON files like context/profile.json should be written with append=false (overwrite) after reading/merging.

Suggested change
- Weekly profile evolution (if the user has a profile in `context/profile.json`, suggest a Monday routine that reads the profile via `memory_read`, searches recent conversations for new patterns with `memory_search`, and updates the profile via `memory_write` if any fields should change with confidence > 0.6 — be conservative, only update with clear evidence)
- Weekly profile evolution (if the user has a profile in `context/profile.json`, suggest a Monday routine that reads the profile via `memory_read`, searches recent conversations for new patterns with `memory_search`, merges any changes into an in-memory profile object, and then updates the profile via `memory_write` with `append=false` (overwrite) if any fields should change with confidence > 0.6 — be conservative, only update with clear evidence)

Copilot uses AI. Check for mistakes.

## Awareness

Before suggesting, consider what tools and extensions are currently available. Only suggest routines the agent can actually execute. If a routine would need a tool that isn't installed, mention that too: "If you connect your calendar, I could also send you a morning briefing with today's meetings."
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub mod llm;
pub mod observability;
pub mod orchestrator;
pub mod pairing;
pub mod profile;
pub mod registry;
pub mod safety;
pub mod sandbox;
Expand Down
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,13 @@ async fn setup_wasm_channels(
/// Check if onboarding is needed and return the reason.
#[cfg(any(feature = "postgres", feature = "libsql"))]
fn check_onboard_needed() -> Option<&'static str> {
if std::env::var("SKIP_WIZARD")
.map(|v| !v.is_empty() && v != "0" && v != "false")
.unwrap_or(false)
{
return None;
}
Comment on lines +1059 to +1064
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SKIP_WIZARD parsing is case-sensitive and treats any non-empty value other than "0"/"false" as true, so values like "False" or "FALSE" will unexpectedly skip onboarding. The repo already has a shared parse_bool_env helper that normalizes case and validates values. Consider reusing that helper here or at least lowercasing the env var before comparison for consistent behavior.

Copilot uses AI. Check for mistakes.

let has_db = std::env::var("DATABASE_URL").is_ok()
|| std::env::var("LIBSQL_PATH").is_ok()
|| ironclaw::config::default_libsql_path().exists();
Expand Down
Loading
Loading