Context-aware task execution with Serena MCP backend. First time: Explores project, saves to Serena, runs spec if complex, executes waves. Returning: Loads from Serena (<1s), detects changes, executes with cached context. Intelligently decides when to research, when to spec, when to prime. One catch-all intelligent execution command. Use when: User wants task executed in any project (new or existing).
View on GitHubkrzemienski/shannon-framework
shannon
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/krzemienski/shannon-framework/blob/main/skills/intelligent-do/SKILL.md -a claude-code --skill intelligent-doInstallation paths:
.claude/skills/intelligent-do/# Intelligent Do
## Purpose
Comprehensive intelligent task execution that automatically handles all scenarios: new projects, existing codebases, simple tasks, complex requirements, first-time work, and returning workflows - all with Serena MCP as the persistent context backend.
**Core Innovation**: One command that adapts to any scenario without configuration, learns from every execution, and gets faster on return visits.
---
## Workflow
### Step 1: Context Detection Using Serena
**Check if project exists in Serena memory**:
1. Determine project ID from current working directory:
- Get current path: Use Bash tool to run `pwd`
- Extract project name: Last component of path
- Sanitize for memory key: Replace special characters with underscores
2. Check Serena for existing project memory:
- Use Serena tool: `list_memories()`
- Search for key: `"shannon_project_{project_id}"`
- If key found → RETURNING_WORKFLOW
- If key not found → FIRST_TIME_WORKFLOW
**Duration**: < 1 second
---
### Step 2a: FIRST_TIME_WORKFLOW
**For projects not yet in Serena**:
#### Sub-Step 1: Determine Project Type
Count files in current directory to determine if new or existing project:
```bash
# Use Bash tool
find . -type f \( -name "*.py" -o -name "*.js" -o -name "*.tsx" -o -name "*.java" -o -name "*.go" \) | wc -l
```
- If count < 3: NEW_PROJECT (greenfield)
- If count >= 3: EXISTING_PROJECT (has codebase)
#### Sub-Step 2: NEW_PROJECT Path
For greenfield projects (empty or minimal files):
1. **Assess Task Complexity**:
- Count words in task description
- Count requirements (lines starting with -)
- If task has 20+ words OR 3+ requirements → Complex task
- If task mentions "system", "platform", "integrate" → Complex task
2. **For Complex Tasks - Run Spec Analysis**:
```
Invoke sub-skill:
@skill spec-analysis
Specification: {task_description}
```
- This will analyze complexity (8D score)
- Create phase plan
- Save resul