Skip to content

[Phase 4] Workspace Hooks: CLI Commands for Hook Management #397

Description

@frankbria

Summary

Add CLI commands for listing, testing, and managing workspace hooks.

Parent issue: #392

Scope

New CLI subcommands in cli/app.py

  1. cf hooks list — show configured hooks for current workspace

    • Display hook name, script preview (first 80 chars), timeout
    • Indicate which hooks are configured vs. not set
  2. cf hooks test <hook-name> — dry-run a specific hook

    • Execute the hook with current workspace context
    • Show stdout/stderr/exit code
    • Useful for validating hook scripts before relying on them
  3. cf hooks show <hook-name> — display full hook script and config

Changes to existing commands

  1. cf status — show hook summary (N hooks configured) in workspace status output

Acceptance Criteria

  • cf hooks list displays all configured hooks with preview
  • cf hooks test before_task executes the hook and shows results
  • cf hooks show after_init displays the full script
  • cf status includes hook count in workspace summary
  • CLI integration tests for all new commands

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-4.3Phase 4.3: Workspace Lifecycle Hooks Systemsymphony-inspiredInspired by OpenAI Symphony spec analysis

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions