Files
Claude-Code-Workflow/.claude/skills/command-guide/reference/commands/enhance-prompt.md
catlog22 487b359266 refactor(workflow): remove all .active marker file references and sync documentation
Core Changes (10 files):
- commands: cli/execute.md, memory/docs.md, workflow/review.md, workflow/brainstorm/*.md
- agents: cli-execution-agent.md
- workflows: task-core.md, workflow-architecture.md

Transformations:
- Removed all .active-* marker file operations (touch/rm/find)
- Updated session discovery to directory-based (.workflow/sessions/)
- Updated directory structure examples to show sessions/ subdirectory
- Replaced marker-based state with location-based state

Reference Documentation (57 files):
- Auto-synced via analyze_commands.py script
- Includes all core file changes
- Updated command indexes (all-commands.json, by-category.json, etc.)

Migration complete: 100% .active marker references removed
Session state now determined by directory location only
2025-11-19 20:24:14 +08:00

2.9 KiB

name, description, argument-hint
name description argument-hint
enhance-prompt Enhanced prompt transformation using session memory and intent analysis with --enhance flag detection user input to enhance

Overview

Systematically enhances user prompts by leveraging session memory context and intent analysis, translating ambiguous requests into actionable specifications.

Core Protocol

Enhancement Pipeline: Intent TranslationContext IntegrationStructured Output

Context Sources:

  • Session memory (conversation history, previous analysis)
  • Implicit technical requirements
  • User intent patterns

Enhancement Rules

Intent Translation

User Says Translate To Focus
"fix" Debug and resolve Root cause → preserve behavior
"improve" Enhance/optimize Performance/readability
"add" Implement feature Integration + edge cases
"refactor" Restructure quality Maintain behavior
"update" Modernize Version compatibility

Context Integration Strategy

Session Memory:

  • Reference recent conversation context
  • Reuse previously identified patterns
  • Build on established understanding
  • Infer technical requirements from discussion

Example:

# User: "add login"
# Session Memory: Previous auth discussion, JWT mentioned
# Inferred: JWT-based auth, integrate with existing session management
# Action: Implement JWT authentication with session persistence

Output Structure

INTENT: [Clear technical goal]
CONTEXT: [Session memory + codebase patterns]
ACTION: [Specific implementation steps]
ATTENTION: [Critical constraints]

Output Examples

Example 1:

# Input: "fix login button"
INTENT: Debug non-functional login button
CONTEXT: From session - OAuth flow discussed, known state issue
ACTION: Check event binding → verify state updates → test auth flow
ATTENTION: Preserve existing OAuth integration

Example 2:

# Input: "refactor payment code"
INTENT: Restructure payment module for maintainability
CONTEXT: Session memory - PCI compliance requirements, Stripe integration patterns
ACTION: Extract reusable validators → isolate payment gateway logic → maintain adapter pattern
ATTENTION: Zero behavior change, maintain PCI compliance, full test coverage

Enhancement Triggers

  • Ambiguous language: "fix", "improve", "clean up"
  • Vague requests requiring clarification
  • Complex technical requirements
  • Architecture changes
  • Critical systems: auth, payment, security
  • Multi-step refactoring

Key Principles

  1. Session Memory First: Leverage conversation context and established understanding
  2. Context Reuse: Build on previous discussions and decisions
  3. Clear Output: Structured, actionable specifications
  4. Intent Clarification: Transform vague requests into specific technical goals
  5. Avoid Duplication: Reference existing context, don't repeat