mula-refine

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Mula Refine

Mula Refine

Single entry-point for all prompt engineering, requirements gathering, and planning workflows. Routes to 6 internal capabilities based on user intent. Supports Jira integration to push task breakdowns as subtasks.
所有提示词工程、需求收集和规划工作流的统一入口。可根据用户意图调用6项内部功能。支持Jira集成,可将任务拆解内容推送为子任务。

Context

适用场景

This skill runs in planning-only refine sessions:
  • No MR creation — refine sessions never create merge requests or feature branches
  • Multi-repo workspace — the workspace may contain multiple cloned repos for codebase analysis
  • Jira integration — use
    mula-tool jira
    to create subtasks and update parent issues
该Skill仅在纯规划类优化会话中运行:
  • 不创建MR — 优化会话绝不会创建合并请求或功能分支
  • 多仓库工作区 — 工作区可包含多个克隆仓库,用于代码库分析
  • Jira集成 — 使用
    mula-tool jira
    命令创建子任务并更新父级议题

Quick Start

快速开始

  1. Detect user intent (see routing below)
  2. Load the matching rule:
    mula-tool skill read mula-refine
    then read the appropriate reference
  3. Follow that rule exactly
  1. 识别用户意图(见下方意图路由)
  2. 加载匹配规则:执行
    mula-tool skill read mula-refine
    后阅读对应参考文档
  3. 严格遵循该规则执行

Intent Routing

意图路由

User IntentModeReference
Vague idea, needs discoveryStart
references/start.md
Has a prompt to optimizeImprove
references/improve.md
Extract requirements from chatSummarize
references/summarize.md
Needs full requirements docPRD
references/prd.md
Has PRD, needs task breakdownPlan
references/plan.md
Update existing PRD or promptRefine
references/refine.md
Default: When intent is unclear, use Improve mode (analyzes and optimizes any input).
用户意图模式参考文档
创意模糊,需需求挖掘Start
references/start.md
已有提示词需优化Improve
references/improve.md
从对话中提取需求Summarize
references/summarize.md
需要完整需求文档PRD
references/prd.md
已有PRD,需任务拆解Plan
references/plan.md
更新现有PRD或提示词Refine
references/refine.md
默认规则:当意图不明确时,使用Improve模式(分析并优化任意输入内容)。

Workflow

工作流

Vague Idea --> START --> conversation --> SUMMARIZE --> mini-PRD
                                              |
Clear Feature --> PRD ------------------------+-> full PRD --> PLAN --> tasks.md
                                                                |
Existing Prompt --> IMPROVE                                     v
                                                     Jira subtasks (optional)
Existing PRD/Prompt --> REFINE --> back to any mode
模糊创意 --> START 模式 --> 对话交流 --> SUMMARIZE 模式 --> 迷你PRD
                                              |
明确功能需求 --> PRD 模式 ------------------------+-> 完整PRD --> PLAN 模式 --> tasks.md
                                                                |
已有提示词 --> IMPROVE 模式                                     v
                                                     Jira子任务(可选)
已有PRD/提示词 --> REFINE 模式 --> 回到任意模式

Key Behaviors

核心行为规范

  1. Announce mode before starting (State Assertion)
  2. Never write implementation code - planning only
  3. Self-correct mistakes (DETECT/STOP/CORRECT/RESUME)
  4. Verify file saves - Write then Read to confirm
  5. One question at a time in Start and PRD modes
  6. Always present plan before creating Jira issues - never push to Jira without confirmation
  7. Always score quality - Every mode uses the 6-dimension quality assessment
  1. 提前告知模式(执行前声明当前模式)
  2. 绝不编写实现代码 - 仅负责规划工作
  3. 自我修正错误(检测/停止/修正/恢复)
  4. 验证文件保存 - 写入后读取内容确认保存成功
  5. Start和PRD模式下一次只提一个问题
  6. 创建Jira议题前必须先展示规划内容 - 未获得确认绝不推送至Jira
  7. 始终进行质量评分 - 所有模式均使用6维度质量评估体系

Universal Quality Assessment

通用质量评估体系

All modes must evaluate outputs using 6 dimensions (0-100%):
DimensionWhat It Measures
ClarityIs the objective clear and unambiguous?
EfficiencyIs the content concise without losing critical information?
StructureIs information organized logically?
CompletenessAre all necessary details provided?
ActionabilityCan an AI take immediate action on this?
SpecificityHow concrete and precise? (versions, paths, identifiers)
Quality gate: If overall score < 70%, recommend running Improve mode first to optimize before proceeding to the next step.
所有模式必须从6个维度(0-100%)评估输出内容:
维度评估内容
清晰度目标是否清晰无歧义?
简洁性内容是否简洁且未丢失关键信息?
结构性信息组织是否逻辑清晰?
完整性是否提供了所有必要细节?
可执行性AI能否直接基于内容采取行动?
具体性内容是否具体精准?(含版本、路径、标识符等信息)
质量门槛: 如果整体评分<70%,建议先运行Improve模式优化内容,再进入下一环节。

Jira Integration

Jira集成

After generating
tasks.md
, offer to push tasks as Jira subtasks:
bash
undefined
生成
tasks.md
后,可将任务推送为Jira子任务:
bash
undefined

Show parent issue details first

先展示父级议题详情

mula-tool jira show --key PROJ-456
mula-tool jira show --key PROJ-456

Create subtask with priority (always prefix with [repo-name])

创建带优先级的子任务(标题必须以[仓库名]为前缀)

mula-tool jira create-subtask --parent PROJ-456
--title "[payments-api] Add retry logic"
--description "Scope: files to change..."
--assignee me --priority High
mula-tool jira create-subtask --parent PROJ-456
--title "[payments-api] Add retry logic"
--description "Scope: files to change..."
--assignee me --priority High

Link dependencies (MRTCH-1 blocks MRTCH-2)

关联依赖关系(MRTCH-1 阻塞 MRTCH-2)

mula-tool jira link --from MRTCH-1 --to MRTCH-2 --type Blocks
mula-tool jira link --from MRTCH-1 --to MRTCH-2 --type Blocks

Update parent issue title with repo context

更新父级议题标题,添加仓库上下文

mula-tool jira update --key PROJ-456
--title "[payments-api] Updated title"
--description "Updated requirements..."
undefined
mula-tool jira update --key PROJ-456
--title "[payments-api] Updated title"
--description "Updated requirements..."
undefined

Subtask Conventions

子任务规范

  • Always prefix with
    [repo-name]
    : Every subtask title starts with the repo name in brackets (e.g.,
    [payments-api] Add retry logic
    )
  • Single-repo tasks: Also update the parent task title with the repo prefix
  • Priority: Use
    --priority
    with:
    Highest
    ,
    High
    ,
    Medium
    ,
    Low
    ,
    Lowest
  • Dependencies: Use
    mula-tool jira link --from X --to Y --type Blocks
    (X blocks Y)
  • Assignee: Use
    --assignee me
    to auto-assign subtasks to the current user
  • Description: Include scope (files to change), context, and enough detail for the next agent to work autonomously
  • Granularity: Each subtask should be completable in one coding session
  • 标题必须以
    [仓库名]
    为前缀
    :每个子任务标题需以仓库名加方括号开头(例如:
    [payments-api] Add retry logic
  • 单仓库任务:同时更新父级任务标题,添加仓库前缀
  • 优先级:使用
    --priority
    参数,可选值:
    Highest
    ,
    High
    ,
    Medium
    ,
    Low
    ,
    Lowest
  • 依赖关系:使用
    mula-tool jira link --from X --to Y --type Blocks
    (X阻塞Y)
  • 经办人:使用
    --assignee me
    自动将子任务分配给当前用户
  • 描述:需包含范围(待修改文件)、上下文信息,以及足够细节供后续Agent自主执行
  • 颗粒度:每个子任务应在一个编码会话内可完成

Transitioning Issues

议题状态流转

Workflows differ per project. Always check available transitions before moving:
bash
undefined
不同项目的工作流存在差异,流转前请先检查可用状态:
bash
undefined

Check what transitions are available from current status

检查当前状态下可执行的流转操作

mula-tool jira transitions PROJ-456
mula-tool jira transitions PROJ-456

Move to a specific status

切换至指定状态

mula-tool jira transition PROJ-456 --name "Development"
mula-tool jira transition PROJ-456 --name "Development"

Close an issue (walks all transitions to Done automatically)

关闭议题(自动完成所有流转步骤至Done状态)

mula-tool jira close PROJ-456
undefined
mula-tool jira close PROJ-456
undefined

Deleting Subtasks

删除子任务

When the user asks to delete subtasks (e.g., "delete the subtasks", "remove all subtasks", "start fresh"):
bash
undefined
当用户要求删除子任务时(例如:"delete the subtasks", "remove all subtasks", "start fresh"):
bash
undefined

List subtasks first to confirm what will be deleted

先列出子任务,确认待删除内容

mula-tool jira list-subtasks PROJ-456
mula-tool jira list-subtasks PROJ-456

Delete individual subtasks

删除单个子任务

mula-tool jira delete MRTCH-1371 mula-tool jira delete MRTCH-1372
mula-tool jira delete MRTCH-1371 mula-tool jira delete MRTCH-1372

If delete fails (403), close them instead

若删除失败(403错误),则关闭子任务

mula-tool jira close MRTCH-1371 mula-tool jira close MRTCH-1372
mula-tool jira close MRTCH-1371 mula-tool jira close MRTCH-1372

Or delete a parent and all its subtasks at once

或一次性删除父级议题及其所有子任务

mula-tool jira delete PROJ-456 --delete-subtasks

**Always list subtasks before deleting** to confirm with the user. Never delete without showing what will be removed.
mula-tool jira delete PROJ-456 --delete-subtasks

**删除前必须先列出子任务**,与用户确认后再执行操作。绝不能未展示待删除内容就直接删除。

Output Location

输出位置

All outputs save to
.mula/outputs/
:
  • PRDs:
    .mula/outputs/{project}/
  • Prompts:
    .mula/outputs/prompts/{id}.md
  • Tasks:
    .mula/outputs/{project}/tasks.md
所有输出内容均保存至
.mula/outputs/
目录:
  • PRD文件:
    .mula/outputs/{project}/
  • 提示词文件:
    .mula/outputs/prompts/{id}.md
  • 任务文件:
    .mula/outputs/{project}/tasks.md

After Planning

规划完成后操作

When plan mode generates
tasks.md
:
  1. Present the task breakdown to the user
  2. Ask: "Would you like me to create these as Jira subtasks under the parent issue?"
  3. If yes, use
    mula-tool jira create-subtask
    for each task
  4. If no: "Your task breakdown is ready. Implement using your preferred workflow."
当Plan模式生成
tasks.md
后:
  1. 向用户展示任务拆解内容
  2. 询问:"是否需要将这些任务创建为指定父级议题下的Jira子任务?"
  3. 若用户同意,为每个任务执行
    mula-tool jira create-subtask
    命令
  4. 若用户拒绝:"任务拆解已完成,请使用您偏好的工作流执行开发。"

References

参考文档

ReferencePurpose
references/start.md
Conversational exploration and requirements gathering
references/improve.md
6-dimension prompt quality assessment and optimization
references/summarize.md
Extract requirements from conversation into mini-PRD
references/prd.md
Strategic questioning to create comprehensive PRD
references/plan.md
Transform PRD into actionable task breakdown + Jira subtasks
references/refine.md
Iterate on existing PRD or saved prompt + Jira updates
参考文档用途
references/start.md
对话式探索与需求收集
references/improve.md
6维度提示词质量评估与优化
references/summarize.md
从对话中提取需求生成迷你PRD
references/prd.md
通过结构化提问生成完整PRD
references/plan.md
将PRD转化为可执行任务拆解,并同步至Jira子任务
references/refine.md
迭代优化现有PRD或已保存提示词,并更新Jira内容