- name
- ai4pkm-helper
- description
- AI4PKM helper for orchestrator configuration, worker management, and CLI workflow integration.
- metadata
- {"version":"2.0.0","author":"lifidea","created":"2025-12-10T00:00:00.000Z","updated":"2026-01-24T00:00:00.000Z","modules":["orchestrator","tasks"]}
# AI4PKM Helper
This skill provides guidance for configuring and managing AI4PKM orchestrator and workers. It helps users set up agents, configure multi-worker execution, and manage CLI workflows.
## AI4PKM Architecture
```mermaid
flowchart BT
subgraph Gobi["Gobi Desktop"]
subgraph Storage["Storage"]
FS[File System]
end
subgraph Interface["Interface"]
OBS[Obsidian]
CC[Claude Code]
end
subgraph Core["Core"]
ORC[Orchestrator]
CLI[AI4PKM CLI]
end
end
Storage --> Interface --> Core
```
**3-tier model:**
- **Storage**: Markdown files (AI-optimal format)
- **Interface**: Obsidian for viewing/editing, Claude Code for AI interaction
- **Core**: Orchestrator for automation, CLI for quick commands
- **GUI**: Gobi Desktop wraps all above with visual interface
## When to Use This Skill
Claude should automatically load this skill when:
- User wants to add, modify, or remove agents/nodes in orchestrator.yaml
- User wants to configure multi-worker execution (comparing AI models)
- User wants to update orchestrator defaults (executor, timeout, max_parallel)
- User wants to add or modify pollers (limitless, apple_photos, apple_notes)
- User asks about CLI commands for orchestrator management
- User needs help with orchestrator.yaml structure
## Quick Commands
```markdown
"์์ปค ์ค์ " / "Worker config" โ Worker Configuration Guide
"์์ด์ ํธ ์ถ๊ฐ" / "Add agent" โ Add New Agent Node
"ํด๋ฌ ์ค์ " / "Poller config" โ Poller Configuration
"์ค์ ๋ณด๊ธฐ" โ Show Current Config (ai4pkm --show-config)
"์์ด์ ํธ ๋ชฉ๋ก" โ List Agents (ai4pkm --list-agents)
"Orchestrator ์ค์ " โ Orchestrator Setup Module
"ํ์คํฌ ์ถ๊ฐ" โ Task Management Module
```
## Core Modules
### Module 1: Orchestrator Setup (์ํฌํ๋ก์ฐ ์๋ํ)
**Purpose**: Configure orchestrator.yaml for event-driven automation
**Key Concepts**:
- **Node**: Event-driven agent that triggers on file changes or schedules
- **Executor**: AI engine to run (claude_code, codex_cli, gemini_cli)
- **Poller**: External data sync (limitless, apple_photos, apple_notes)
- **Worker**: Execution unit within a node (supports multi-worker for model comparison)
**Setup Process**:
1. Explain orchestrator purpose and benefits
2. Show orchestrator.yaml structure (nodes, pollers, defaults)
3. Configure first agent (e.g., EIC - Enrich Ingested Content)
4. Test agent execution with file trigger
**Prompt**: `AI4PKM - Orchestrator Setup.md`
**Example Configuration** (current format):
```yaml
version: "1.0"
orchestrator:
prompts_dir: _Settings_/Prompts
tasks_dir: _Settings_/Tasks
logs_dir: _Settings_/Logs
skills_dir: _Settings_/Skills
max_concurrent: 3
poll_interval: 1
defaults:
executor: claude_code
timeout_minutes: 30
max_parallel: 3
task_create: true
nodes:
- type: agent
name: Enrich Ingested Content (EIC)
input_path: Ingest/Clippings
output_path: AI/Articles
executor: claude_code
- type: agent
name: Daily Driver Workflow (DDW)
cron: "15,45 * * * *"
output_path: Journal
completion_status: IGNORE
agent_params:
calendars:
- Default
- Work
past_hours: 24
future_days: 3
goals_file: _Settings_/Goals & Principles.md
roundup_lookback_days: 7
pollers:
limitless:
enabled: true
target_dir: "Ingest/Limitless"
poll_interval: 300
```
### Node Configuration Fields Reference
| ํ๋ | ํ์ | ์ค๋ช
| ์์ |
|------|------|------|------|
| `type` | โ | ๋
ธ๋ ํ์
| `agent` |
| `name` | โ | Agent ์ด๋ฆ | `Enrich Ingested Content (EIC)` |
| `prompt` | | ํ๋กฌํํธ ํ์ผ ์ฐธ์กฐ (ABBR) | `EIC` |
| `input_path` | | ์
๋ ฅ ๋๋ ํ ๋ฆฌ (ํ์ผ ํธ๋ฆฌ๊ฑฐ) | `Ingest/Clippings` |
| `output_path` | | ์ถ๋ ฅ ๋๋ ํ ๋ฆฌ | `AI/Articles` |
| `executor` | | ์คํ ์์ง | `claude_code`, `codex_cli`, `gemini_cli` |
| `cron` | | ์ค์ผ์ค ์คํ (cron ํํ์) | `"15,45 * * * *"` |
| `enabled` | | ํ์ฑํ ์ฌ๋ถ | `true` / `false` |
| `timeout_minutes` | | ํ์์์ | `30` |
| `completion_status` | | ์๋ฃ ํ ์ํ | `DONE`, `IGNORE` |
| `agent_params` | | Agent-specific ํ๋ผ๋ฏธํฐ | (object) |
| `workers` | | Multi-Worker ์ค์ | (list) |
### Node Types
| Type | Trigger | Example |
|------|---------|---------|
| File-triggered | New/updated file in input_path | EIC, GDR |
| Cron-scheduled | Time-based (cron expression) | DDW |
### Worker Configuration Fields
Multi-worker ์ค์ ์ ๊ฐ worker์ ์ฌ์ฉ ๊ฐ๋ฅํ ํ๋:
| ํ๋ | ์ค๋ช
| ์์ |
|------|------|------|
| `executor` | ์คํ ์์ง | `claude_code`, `gemini_cli` |
| `label` | Worker ์๋ณ ๋ผ๋ฒจ | `Claude`, `Gemini` |
| `output_path` | Worker๋ณ ์ถ๋ ฅ ๊ฒฝ๋ก | `AI/Summary/Claude` |
| `agent_params` | Worker๋ณ ํ๋ผ๋ฏธํฐ | (object) |
**Multi-Worker ์ค์ ์์** (์ฌ๋ฌ AI ๋ชจ๋ธ ๋น๊ต/ํ๊ฐ):
```yaml
- type: agent
name: Article Summary Comparison
prompt: EIC
input_path: Ingest/Articles
workers:
- executor: gemini_cli
label: Gemini
output_path: AI/Summary/Gemini
- executor: claude_code
label: Claude
output_path: AI/Summary/Claude
- executor: codex_cli
label: Codex
output_path: AI/Summary/Codex
```
### Poller Configuration
Pollers sync external data sources to your vault.
| Poller | ์ค๋ช
| ์ฃผ์ ์ค์ |
|--------|------|----------|
| `limitless` | Limitless ๋ผ์ดํ๋ก๊ทธ ๋๊ธฐํ | `target_dir`, `poll_interval` |
| `apple_photos` | Apple Photos ๋๊ธฐํ | `target_dir`, `albums` |
| `apple_notes` | Apple Notes ๋๊ธฐํ | `target_dir`, `folders` |
**Poller ์ค์ ์์**:
```yaml
pollers:
limitless:
enabled: true
target_dir: "Ingest/Limitless"
poll_interval: 300
apple_photos:
enabled: false
target_dir: "Ingest/Photos"
albums:
- "Screenshots"
- "PKM"
apple_notes:
enabled: false
target_dir: "Ingest/Notes"
folders:
- "Quick Notes"
```
### CLI Quick Reference
| Command | ์ค๋ช
|
|---------|------|
| `ai4pkm --show-config` | ํ์ฌ ์ค์ ๋ณด๊ธฐ |
| `ai4pkm --list-agents` | ์์ด์ ํธ ๋ชฉ๋ก |
| `ai4pkm --run <agent>` | ํน์ ์์ด์ ํธ ์คํ |
| `ai4pkm --enable <agent>` | ์์ด์ ํธ ํ์ฑํ |
| `ai4pkm --disable <agent>` | ์์ด์ ํธ ๋นํ์ฑํ |
| `ai4pkm --status` | ์คํ ์ํ ํ์ธ |
| `ai4pkm --logs` | ๋ก๊ทธ ํ์ธ |
### Common Configuration Tasks
#### Add New Agent
1. Open `orchestrator.yaml`
2. Add new node under `nodes:`:
```yaml
- type: agent
name: Your New Agent (ABBR)
input_path: Ingest/YourFolder
output_path: AI/YourOutput
executor: claude_code
```
3. Create corresponding prompt in `_Settings_/Prompts/`
#### Enable/Disable Agent
```yaml
- type: agent
name: Some Agent
enabled: false # Add this line to disable
```
#### Set Up Multi-Worker Comparison
1. Replace single `executor` with `workers` list
2. Define output_path per worker to separate results
3. Use consistent labels for tracking
### Module 2: Task Management (ํ์คํฌ ๊ด๋ฆฌ)
**Purpose**: Add, update, and track tasks in AI4PKM system
**Operations**:
- **Add Task**: Create new task with description, category, priority
- **Update Status**: Mark tasks as in_progress, completed, or blocked
- **View Tasks**: List tasks by status, category, or date
**Prompt**: `AI4PKM - Add Task.md`
**Task Categories**:
- ๐ Research
- ๐ Design
- ๐ ๏ธ Implement
- โ๏ธ Write
- ๐ Docs & System
## Voice Mode Configuration
### Language Support
- Support both English and Korean
- Use `tts_model="gpt-4o-mini-tts"` for natural pronunciation
- Continue conversation naturally
### Listening Behavior
- **Patient listening**: Wait for user to finish (use `min_listen_duration=8`)
- **Adaptive waiting**: Don't interrupt incomplete thoughts
- Use `vad_aggressiveness=0` for permissive voice detection
### Progress Updates
- For long operations (10+ seconds), provide voice updates
- "์ง๊ธ ์ค์ ํ์ธ ์ค์ด์์..." / "์์ด์ ํธ ์ถ๊ฐํ๋ ์ค์
๋๋ค..."
- Keep user informed throughout process
## Example Interactions
### Adding an Agent
```
User: ์์ด์ ํธ ์ถ๊ฐํด์ค
Agent: ์ด๋ค ์์ด์ ํธ๋ฅผ ์ถ๊ฐํ ๊น์?
- ํ์ผ ๊ธฐ๋ฐ (input_path ํ์)
- ์ค์ผ์ค ๊ธฐ๋ฐ (cron ํ์)
User: ํ์ผ ๊ธฐ๋ฐ, Ingest/Articles ํด๋ ๊ฐ์ํด์ AI/Summaries์ ์์ฝ ์ ์ฅ
Agent: ๋ค์ ์ค์ ์ผ๋ก ์ถ๊ฐํ ๊ฒ์:
- name: Article Summarizer
- input_path: Ingest/Articles
- output_path: AI/Summaries
- executor: claude_code
ํ๋กฌํํธ๋ ์ด๋ค ๊ฑธ ์ฌ์ฉํ ๊น์?
```
### Configuring Multi-Worker
```
User: ์ฌ๋ฌ ๋ชจ๋ธ๋ก ๋น๊ตํ๊ณ ์ถ์ด
Agent: Multi-worker ์ค์ ์ ๋์๋๋ฆด๊ฒ์.
์ด๋ค ๋ชจ๋ธ๋ค์ ๋น๊ตํ ๊น์?
- claude_code (Claude)
- gemini_cli (Gemini)
- codex_cli (Codex)
User: Claude๋ Gemini
Agent: ๊ฐ ๋ชจ๋ธ ๊ฒฐ๊ณผ๋ฅผ ์ด๋์ ์ ์ฅํ ๊น์?
์: AI/Compare/Claude, AI/Compare/Gemini
```
## Implementation Notes
### Prompt Chaining
Each prompt is independent but connected:
- **Input**: Previous step's output (optional)
- **Process**: Execute current step
- **Output**: Results for next step
### Semi-Automatic Execution
- Each step requires user confirmation
- Keywords: "์๋ฃ", "๋ค์", "๊ณ์" โ proceed
- Keywords: "์ค๋จ", "๋์ค์" โ pause
- User can resume from any step
### Error Handling
- Clear error messages in Korean
- Suggest fixes or alternatives
- Allow retry or skip (when safe)
- Never leave user stuck
## Files Structure
```
_Settings_/Skills/ai4pkm-helper/
โโโ SKILL.md # This file
โโโ modules/ # (Future: detailed module guides)
โโโ orchestrator.md
โโโ tasks.md
_Settings_/Prompts/
โโโ AI4PKM - Orchestrator Setup.md
โโโ AI4PKM - Add Task.md
โโโ ...
orchestrator.yaml # Main config file (vault root)
```
## References
### Documentation
- Orchestrator config reference: `orchestrator.yaml`
- CLI documentation: `ai4pkm --help`
### Design Documents
- `[[AI/Analysis/2025-12-10 AI4PKM Onboarding Agent Design - Claude Code]]`
## Troubleshooting
### Common Issues
**"์์ด์ ํธ๊ฐ ์คํ ์ ๋ผ์"**
โ `ai4pkm --status`๋ก ์ํ ํ์ธ ํ, ๋ก๊ทธ ํ์ธ: `ai4pkm --logs`
**"ํด๋ฌ๊ฐ ๋์ ์ ํด์"**
โ `pollers:` ์น์
์์ `enabled: true` ํ์ธ, poll_interval ๊ฐ ํ์ธ
**"Multi-worker ๊ฒฐ๊ณผ๊ฐ ์์ฌ์"**
โ ๊ฐ worker์ ๋ค๋ฅธ `output_path` ์ง์ ํ๋์ง ํ์ธ
**"cron์ด ํธ๋ฆฌ๊ฑฐ ์ ๋ผ์"**
โ cron ํํ์ ๋ฌธ๋ฒ ํ์ธ, `ai4pkm --status`๋ก ๋ค์ ์คํ ์๊ฐ ํ์ธ
**"์ค์ ๋ณ๊ฒฝ์ด ๋ฐ์ ์ ๋ผ์"**
โ orchestrator ์ฌ์์ ํ์: `ai4pkm --restart`
## Future Enhancements
### Planned (v2.1+)
- GUI-based config editor (Gobi Desktop)
- Agent template library
- Performance monitoring dashboard
- Webhook triggers support
- Remote execution support
## Notes
- **Config validation**: Always validate YAML syntax before saving
- **Backup**: Keep backup of working orchestrator.yaml
- **Testing**: Test new agents with small input sets first
- **Logging**: Check logs for troubleshooting execution issues
Ver en GitHub