explain

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Explain MTHDS bundles

解释MTHDS bundle

Analyze and explain existing MTHDS method bundles in plain language.
以通俗易懂的语言分析并解释现有的MTHDS方法束。

Process

流程

Prerequisite: See CLI Prerequisites
前提条件:请查看CLI 前提条件

Step 1: Read the .mthds File

步骤1:读取.mthds文件

Read the entire bundle file to understand its structure.
完整读取束文件,了解其结构。

Step 2: Identify Components

步骤2:识别组件

List all components found in the bundle:
  • Domain: the
    [domain]
    declaration
  • Concepts: all
    [concept.*]
    blocks — note which are custom vs references to native concepts
  • Pipes: all
    [pipe.*]
    blocks — identify the main pipe and sub-pipes
  • Main pipe: declared in
    [bundle]
    section
列出束中所有组件:
  • 领域(Domain)
    [domain]
    声明
  • 概念(Concepts):所有
    [concept.*]
    块——注意区分自定义概念和对原生概念的引用
  • 管道(Pipes):所有
    [pipe.*]
    块——识别主管道和子管道
  • 主管道:在
    [bundle]
    部分中声明

Step 3: Trace Execution Flow

步骤3:追踪执行流程

Starting from the main pipe, trace the execution path:
  1. For PipeSequence: follow the
    steps
    array in order
  2. For PipeBatch: identify
    batch_over
    and
    batch_as
    , then the inner pipe
  3. For PipeParallel: list all branches
  4. For PipeCondition: map condition → pipe for each branch
  5. For PipeLLM / PipeExtract / PipeImgGen / PipeFunc: these are leaf operations
从主管道开始,追踪执行路径:
  1. 对于PipeSequence:按顺序遵循
    steps
    数组
  2. 对于PipeBatch:识别
    batch_over
    batch_as
    ,然后查看内部管道
  3. 对于PipeParallel:列出所有分支
  4. 对于PipeCondition:为每个分支映射条件→管道
  5. 对于PipeLLM / PipeExtract / PipeImgGen / PipeFunc:这些是叶子操作

Step 4: Present Explanation

步骤4:呈现解释

Structure the explanation as:
  1. Purpose: one-sentence summary of what the method does
  2. Inputs: list each input with its concept type and expected content
  3. Output: the final output concept and what it contains
  4. Step-by-step flow: walk through execution in order, explaining what each pipe does
  5. Key concepts: explain any custom concepts defined in the bundle
将解释结构化为以下部分:
  1. 用途:用一句话总结该方法的作用
  2. 输入:列出每个输入及其概念类型和预期内容
  3. 输出:最终输出的概念及其包含的内容
  4. 分步流程:按顺序逐步讲解执行过程,解释每个管道的作用
  5. 关键概念:解释束中定义的所有自定义概念

Step 5: Generate Flow Diagram

步骤5:生成流程图

Create an ASCII diagram showing the execution flow:
[input_a, input_b]
        |
   main_sequence
   ├── step_one (PipeLLM) → intermediate_result
   └── step_two (PipeExtract) → final_output
Adapt the diagram style to the method structure (linear, branching, batched).
创建一个ASCII流程图展示执行流程:
[input_a, input_b]
        |
   main_sequence
   ├── step_one (PipeLLM) → intermediate_result
   └── step_two (PipeExtract) → final_output
根据方法结构(线性、分支、批处理)调整图表样式。

Step 6: Optional — Validate

步骤6:可选——验证

If the user wants to confirm the method is valid:
bash
mthds-agent pipelex validate <file>.mthds -L <bundle-dir>/
如果用户想要确认方法是否有效:
bash
mthds-agent pipelex validate <file>.mthds -L <bundle-dir>/

Step 7: Optional — Visual Graph

步骤7:可选——可视化图形

For an interactive visual graph, suggest running the method with
/run
using real inputs:
bash
mthds-agent pipelex run pipe <bundle-dir>/
This produces an interactive HTML visualization (
live_run.html
) next to the bundle alongside the execution results (graph is generated by default).
如需交互式可视化图形,建议使用真实输入通过
/run
运行该方法:
bash
mthds-agent pipelex run pipe <bundle-dir>/
这会在束文件旁生成一个交互式HTML可视化文件(
live_run.html
)以及执行结果(默认会生成图形)。

Reference

参考资料

  • CLI Prerequisites — read at skill start to check CLI availability
  • Error Handling — read when CLI returns an error to determine recovery
  • MTHDS Agent Guide — read for CLI command syntax or output format details
  • MTHDS Language Reference — read for concept definitions and syntax
  • Native Content Types — read when explaining what data flows through pipes (e.g., what attributes Page or Image content carries)
  • CLI 前提条件——技能启动时查看,检查CLI是否可用
  • 错误处理——当CLI返回错误时查看,以确定恢复方式
  • MTHDS Agent 指南——查看CLI命令语法或输出格式详情
  • MTHDS 语言参考——查看概念定义和语法
  • 原生内容类型——解释管道中流转的数据时查看(例如,Page或Image内容包含哪些属性)