prompt-leverage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Prompt Leverage

提示词强化

Turn the user's current prompt into a stronger working prompt without changing the underlying intent. Preserve the task, fill in missing execution structure, and add only enough scaffolding to improve reliability.
在不改变用户核心意图的前提下,将当前提示词转换为更有效的可执行提示词。保留原有任务,补充缺失的执行结构,仅添加必要的框架内容以提升可靠性。

Workflow

工作流程

  1. Read the raw prompt and identify the real job to be done.
  2. Infer the task type: coding, research, writing, analysis, planning, or review.
  3. Rebuild the prompt with the framework blocks in
    references/framework.md
    .
  4. Keep the result proportional: do not over-specify a simple task.
  5. Return both the improved prompt and a short explanation of what changed when useful.
  1. 阅读原始提示词,明确实际需要完成的任务。
  2. 推断任务类型:编码、研究、写作、分析、规划或审核。
  3. 使用
    references/framework.md
    中的框架模块重建提示词。
  4. 保持结果与任务匹配:不要对简单任务过度指定细节。
  5. 必要时,同时返回优化后的提示词和简短的修改说明。

Transformation Rules

转换规则

  • Preserve the user's objective, constraints, and tone unless they conflict.
  • Prefer adding missing structure over rewriting everything stylistically.
  • Add context requirements only when they improve correctness.
  • Add tool rules only when tool use materially affects correctness.
  • Add verification and completion criteria for non-trivial tasks.
  • Keep prompts compact enough to be practical in repeated use.
  • 保留用户的目标、约束条件和语气,除非它们存在冲突。
  • 优先补充缺失的结构,而非全面改写风格。
  • 仅当上下文要求能提升正确性时才添加。
  • 仅当工具使用对正确性有实质性影响时才添加工具规则。
  • 为非简单任务添加验证和完成标准。
  • 保持提示词足够简洁,以便重复使用。

Framework Blocks

框架模块

Use these blocks selectively.
  • Objective
    : state the task and what success looks like.
  • Context
    : list sources, files, constraints, and unknowns.
  • Work Style
    : set depth, breadth, care, and first-principles expectations.
  • Tool Rules
    : state when tools, browsing, or file inspection are required.
  • Output Contract
    : define structure, formatting, and level of detail.
  • Verification
    : require checks for correctness, edge cases, and better alternatives.
  • Done Criteria
    : define when the agent should stop.
选择性使用以下模块。
  • Objective
    :说明任务内容以及成功的标准。
  • Context
    :列出信息来源、文件、约束条件和未知事项。
  • Work Style
    :设定深度、广度、细致程度以及基于第一性原理的预期。
  • Tool Rules
    :说明何时需要使用工具、浏览或文件检查。
  • Output Contract
    :定义输出结构、格式和详细程度。
  • Verification
    :要求对正确性、边缘情况和更优方案进行检查。
  • Done Criteria
    :定义Agent应停止工作的条件。

Output Modes

输出模式

Choose one mode based on the user request.
  • Inline upgrade
    : provide the upgraded prompt only.
  • Upgrade + rationale
    : provide the prompt plus a brief list of improvements.
  • Template extraction
    : convert the prompt into a reusable fill-in-the-blank template.
  • Hook spec
    : explain how to apply the framework automatically before execution.
根据用户请求选择一种模式。
  • Inline upgrade
    :仅提供优化后的提示词。
  • Upgrade + rationale
    :提供提示词以及简短的改进说明列表。
  • Template extraction
    :将提示词转换为可复用的填空式模板。
  • Hook spec
    :说明如何在执行前自动应用该框架。

Hook Pattern

钩子模式

When the user asks for a hook, model it as a pre-processing layer:
  1. Accept the current prompt.
  2. Classify the task and risk level.
  3. Expand the prompt using the framework blocks.
  4. Return the upgraded prompt for execution.
  5. Optionally keep a diff or summary of injected structure.
Use
scripts/augment_prompt.py
when a deterministic first-pass rewrite is helpful.
当用户要求创建钩子时,将其建模为预处理层:
  1. 接收当前提示词。
  2. 对任务和风险等级进行分类。
  3. 使用框架模块扩展提示词。
  4. 返回优化后的提示词以供执行。
  5. 可选择保留结构注入的差异或摘要。
当需要确定性的首轮改写时,可使用
scripts/augment_prompt.py

Quality Bar

质量标准

Before finalizing, check the upgraded prompt:
  • still matches the original intent
  • does not add unnecessary ceremony
  • includes the right verification level for the task
  • gives the agent a clear definition of done
If the prompt is already strong, say so and make only minimal edits.
最终确定前,检查优化后的提示词:
  • 是否仍符合原始意图
  • 是否未添加不必要的冗余内容
  • 是否针对任务添加了合适的验证级别
  • 是否为Agent明确了完成标准
如果提示词本身已经足够完善,说明情况并仅进行最小化修改。