Skip to main content

---

title: "Configuration" component_type: hook version: "1.0.0" audience: contributor status: stable summary: " Strategy Brief Pre-Generation Hook ===================================" keywords: ['analysis', 'brief', 'generation', 'pre', 'strategy'] tokens: ~1500 created: 2025-12-22 updated: 2025-12-22

Strategy Brief Pre-Generation Hook

Validates inputs and initializes context before strategy brief generation. Called by PreToolUse event when strategy-brief-generator agent is invoked.

Exit Codes: 0 - Success, proceed with generation 2 - Blocking, invalid inputs detected 1 - Error, hook execution failed

Input (stdin): JSON with tool_name, tool_input, session_id Output (stdout): JSON with decision and optional message

File: strategy-brief-pre-generation.py

Functions

validate_industry(industry)

Validate industry input.

validate_geography(geography)

Validate geography input.

validate_client_type(client_type)

Validate client type input.

validate_time_horizon(time_horizon)

Validate time horizon input.

create_checkpoint_dir()

Create checkpoint directory for this generation session.

initialize_generation_context(tool_input)

Initialize context for strategy brief generation.

main()

Main hook execution.

extract_industry_from_prompt(prompt)

Extract industry from prompt if not explicitly provided.

Usage

python strategy-brief-pre-generation.py