Skip to content

Add --watch mode for live re-scanning during skill development #5

@TheStack-ai

Description

@TheStack-ai

Context

Currently pulser is run-once: edit SKILL.md → run pulser → see results → repeat. During active skill development, a --watch flag that re-runs on file changes would save time.

Proposed

pulser --watch
# Watches ~/.claude/skills/ for changes, re-runs scan on save

What to do

  1. Add --watch flag to CLIOptions in src/types.ts
  2. In src/index.ts, after initial scan, enter a watch loop using fs.watch (recursive) on the skills directory
  3. Debounce re-scans (300ms) to avoid flooding on multi-file saves
  4. Clear terminal and re-run the TUI monitor on each change

The TUI monitor (src/monitor/tui.ts) already handles terminal rewriting, so the rendering infrastructure exists.

Considerations

  • fs.watch behavior varies across platforms — test on macOS and Linux
  • Debounce is important: editors may trigger multiple events per save
  • Ctrl+C should exit cleanly

Files to modify

  • src/types.ts (CLIOptions)
  • src/index.ts (watch loop)

Difficulty: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions