---
title: "Enhance Prompt" component_type: hook version: "1.0.0" audience: contributor status: stable summary: " Prompt Enhancement Hook for CODITECT" keywords: ['analysis', 'automation', 'enhance', 'prompt', 'testing'] tokens: ~1500 created: 2025-12-22 updated: 2025-12-22
Prompt Enhancement Hook for CODITECT
Automatically enhances user prompts with relevant CODITECT context before Claude processes them. Adds framework context, project CLAUDE.md sections, and MEMORY-CONTEXT references to provide intelligent context without duplicating information.
Event: UserPromptSubmit Matcher: {} (matches all prompts)
File: enhance_prompt.py
Classes
PromptEnhancer
Enhances prompts with CODITECT context
Functions
main()
Main hook entry point
load_file(path)
Load file with caching
extract_relevant_sections(prompt)
Extract relevant sections from framework docs based on prompt keywords
get_context_hint(prompt)
Generate a context hint to add to the prompt
enhance(prompt)
Enhance prompt with CODITECT context
Usage
python enhance_prompt.py