From secretary
Triggers inline queue processing on secretary.db, runs worker script with optional --limit and --verbose, shows before/after depths, breakdowns, and recent decisions/ideas/commitments.
How this command is triggered — by the user, by Claude, or both
Slash command
/secretary:process [--limit N]This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Secretary Process Command Manually trigger queue processing. Runs the worker inline (not via cron) to process pending queue items immediately. Shows before and after queue depth so you can see what was processed. ## Usage ## Database Location ## Process Steps ### 1. Capture Before State Query queue depth before processing: Also get item type breakdown for pending: ### 2. Run the Queue Processor Execute the process-queue.sh script inline (not via the full worker): The `--inline` flag tells the processor: - Time-boxed execution (no vault sync) - No GitHub cache refresh -...
Manually trigger queue processing. Runs the worker inline (not via cron) to process pending queue items immediately. Shows before and after queue depth so you can see what was processed.
/secretary:process # Process all pending items (up to 50)
/secretary:process --limit 10 # Process at most 10 items
/secretary:process --verbose # Show details of each processed item
DB_PATH="$HOME/.claude/secretary/secretary.db"
PROCESS_SCRIPT="${CLAUDE_PLUGIN_ROOT}/scripts/process-queue.sh"
if [[ ! -f "$DB_PATH" ]]; then
echo "Secretary database not initialized. Run /secretary:init first."
exit 1
fi
Query queue depth before processing:
SELECT
status,
COUNT(*) as count
FROM queue
GROUP BY status;
Also get item type breakdown for pending:
SELECT
item_type,
COUNT(*) as count
FROM queue
WHERE status = 'pending'
GROUP BY item_type
ORDER BY count DESC;
Execute the process-queue.sh script inline (not via the full worker):
bash "$PROCESS_SCRIPT" --inline --limit ${LIMIT:-50}
The --inline flag tells the processor:
The processor handles these item types:
user_prompt / tool_output / agent_output - AI extraction of decisions, ideas, commitmentscommit - Git metadata parsing, activity timeline entrystop / session_end - Session closure, summary generationQuery queue depth after processing:
SELECT
status,
COUNT(*) as count
FROM queue
GROUP BY status;
Calculate the delta between before and after states.
Query what was created during processing:
-- New decisions created
SELECT id, title FROM decisions
WHERE created_at >= datetime('now', '-5 minutes')
ORDER BY created_at DESC LIMIT 10;
-- New ideas created
SELECT id, title FROM ideas
WHERE created_at >= datetime('now', '-5 minutes')
ORDER BY created_at DESC LIMIT 10;
-- New commitments created
SELECT id, title FROM commitments
WHERE created_at >= datetime('now', '-5 minutes')
ORDER BY created_at DESC LIMIT 10;
-- Activity timeline entries
SELECT activity_type, title FROM activity_timeline
WHERE timestamp >= datetime('now', '-5 minutes')
ORDER BY timestamp DESC LIMIT 10;
# Queue Processing Complete
## Before
| Status | Count |
|--------|-------|
| Pending | 12 |
| Processing | 0 |
| Processed | 230 |
| Failed | 1 |
| Expired | 8 |
**Pending by type:**
- user_prompt: 5
- tool_output: 4
- commit: 2
- session_end: 1
## After
| Status | Count |
|--------|-------|
| Pending | 0 |
| Processing | 0 |
| Processed | 242 |
| Failed | 1 |
| Expired | 8 |
## Results
**Processed:** 12 items
**Failed:** 0 items
### Extracted Items
**Decisions (2):**
- [D-0023] Use queue-based architecture for Secretary
- [D-0024] Separate memory DB for encryption support
**Ideas (1):**
- [I-0015] Add pattern-based scheduling recommendations
**Commitments (3):**
- [C-0030] Write tests for queue processor
- [C-0031] Document API endpoints
- [C-0032] Review PR #89
**Commits Logged (2):**
- abc123 feat: add queue processing
- def456 fix: session tracking bug
**Sessions Closed (1):**
- Session 20240217-100000 completed (45m, 5 commits)
---
*Queue depth: 12 -> 0 (all clear)*
*Use `/secretary:status queue` for detailed queue view*
# Queue Processing
No pending items in queue. Nothing to process.
**Queue stats:**
- Total processed: 242
- Total failed: 1
- Total expired: 8
*Queue items are added automatically by session hooks.*
*Use `/secretary:status queue` for detailed queue view.*
# Queue Processing Complete
**Processed:** 10 items
**Failed:** 2 items
## Failed Items
| ID | Type | Error | Attempts |
|----|------|-------|----------|
| 301 | user_prompt | AI extraction timeout | 3/3 |
| 305 | tool_output | JSON parse error | 3/3 |
*Failed items (3/3 attempts) will not be retried.*
*Items with < 3 attempts will be retried on next processing run.*
process-queue.sh script processes items in priority order (1=highest, 10=lowest), then FIFO within same priorityttl_hours (default 24h) are expired by the worker/secretary:cron setup to install the background workernpx claudepluginhub mwguerra/claude-code-plugins --plugin secretary/phase4-queueChecks memory-palace knowledge queue for pending items, reports status table, prompts for promote/archive/defer decisions on old items, and executes file moves/updates.
/runExecutes a single task or batch of tasks from taskmanager SQLite DB with dependency resolution, memory support, and status propagation. Supports task ID, --batch N, and memory flags.
/review-queueTriages pending human-review items from the SoloFlow queue — resolves cruft, walks Decisions/Actions/Testing/Deferred Visual buckets, and refines found issues into backlog tasks.
/view-queueDisplays the learnings queue with confidence scores, message previews, patterns, and relative timestamps in a formatted view without processing items.
/sugar-reviewReviews pending Sugar tasks interactively: lists by priority, offers view/update/edit/execute/remove actions. Supports --priority N, --type TYPE, --limit N filters.
/agent-brain-jobsMonitor and manage async indexing jobs: list queue with status and progress, watch live updates every 3s, inspect details with eviction summaries, cancel jobs.