liftosaur-program-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Liftoscript Program Authoring

Liftoscript训练计划编写

Output contract

输出约定

  • Default to slash-style format for new lines:
    Exercise Name / set expressions / section: value / section: value
    .
  • Keep one separator style per line; do not mix slash and freeform section placement.
  • Preserve existing local style when editing unless the user asks to normalize.
  • Use explicit section names for non-set data (
    progress:
    ,
    update:
    ,
    warmup:
    ,
    superset:
    ,
    used:
    ,
    id:
    ).
  • 默认使用斜杠样式的换行格式:
    训练动作名称 / 组次表达式 / 段落: 值 / 段落: 值
  • 每行保持一种分隔符样式;不要混合使用斜杠和自由格式的段落布局。
  • 编辑时保留现有本地样式,除非用户要求统一格式。
  • 为非组次数据使用明确的段落名称(
    progress:
    update:
    warmup:
    superset:
    used:
    id:
    )。

Operating rules

操作规则

  • Keep terminology consistent: use "exercise line", "set", "progress", "update", "state variable", "set variation".
  • Prefer built-in progression (
    lp
    ,
    dp
    ,
    sum
    ) before custom scripts.
  • For scripting tasks, identify execution context first:
    progress: custom()
    vs
    update: custom()
    .
  • Use timer literals by context:
    45s
    /
    120s
    in exercise-line sets, numeric timers in scripts (
    timers[5] = 20
    ).
  • Reject timed rep tokens in set syntax (
    3x60s
    ); use numeric reps (
    3x60
    ) when needed.
  • Resolve units deterministically: nearby program text -> explicit user preference -> default
    kg
    .
  • Do not silently mix
    kg
    and
    lb
    in one generated snippet.
  • In exercise-line set syntax,
    %
    load tokens are percentages of
    1RM
    (not training max).
  • Resolve exercise naming from
    references/exercise-name-resolution.md
    against
    references/exercise-list.md
    .
  • In full mode, place template lines (
    used: none
    ) inside a day block; for week-level templates, anchor after
    ## Day 1
    , not directly after
    # Week N
    .
  • Apply a validation loop: draft -> verify writable variables/scope/indexing -> correct -> finalize.
  • Preserve user intent and existing structure; change only what is required.
  • 保持术语一致:使用“训练动作行”、“组次”、“进度”、“更新”、“状态变量”、“组次变体”。
  • 优先使用内置进阶方式(
    lp
    dp
    sum
    ),再考虑自定义脚本。
  • 对于脚本任务,首先确定执行上下文:
    progress: custom()
    还是
    update: custom()
  • 根据上下文使用计时器字面量:训练动作行的组次中使用
    45s
    /
    120s
    ,脚本中使用数值计时器(
    timers[5] = 20
    )。
  • 拒绝组次语法中的计时次数标记(
    3x60s
    );必要时使用数值次数(
    3x60
    )。
  • 确定性地解析单位:附近的计划文本 -> 用户明确偏好 -> 默认
    kg
  • 在生成的代码片段中不要悄悄混合
    kg
    lb
  • 在训练动作行的组次语法中,
    %
    负载标记是
    1RM
    的百分比(而非训练最大值)。
  • 根据
    references/exercise-name-resolution.md
    对照
    references/exercise-list.md
    解析训练动作名称。
  • 在完整模式下,将模板行(
    used: none
    )放在单日块内;对于周级模板,锚定在
    ## Day 1
    之后,而非直接在
    # Week N
    之后。
  • 应用验证循环:草稿 -> 验证可写变量/作用域/索引 -> 修正 -> 定稿。
  • 保留用户意图和现有结构;只修改必要的内容。

Routing by task

按任务路由

  • Basic syntax and set notation ->
    references/language-core.md
  • Weeks, days, comments, labels, warmups, supersets, tags ->
    references/program-structure.md
  • Built-in progression choice and arguments ->
    references/progression-builtins.md
  • Reuse, repeat, templates, overrides ->
    references/reuse-and-templates.md
  • progress: custom()
    authoring ->
    references/custom-progress-scripts.md
  • update: custom()
    authoring ->
    references/update-scripts.md
  • Read/write variables and indexing rules ->
    references/runtime-reference.md
  • Liftoscript built-in functions ->
    references/builtins-reference.md
  • End-to-end examples and fix patterns ->
    references/recipes.md
  • Exercise name resolution ->
    references/exercise-name-resolution.md
  • Known pitfalls and quick fixes ->
    references/common-failure-modes.md
  • 基础语法和组次表示法 ->
    references/language-core.md
  • 周、日、注释、标签、热身、超级组、标记 ->
    references/program-structure.md
  • 内置进阶选项和参数 ->
    references/progression-builtins.md
  • 复用、重复、模板、覆盖 ->
    references/reuse-and-templates.md
  • progress: custom()
    编写 ->
    references/custom-progress-scripts.md
  • update: custom()
    编写 ->
    references/update-scripts.md
  • 读写变量和索引规则 ->
    references/runtime-reference.md
  • Liftoscript内置函数 ->
    references/builtins-reference.md
  • 端到端示例和修复模式 ->
    references/recipes.md
  • 训练动作名称解析 ->
    references/exercise-name-resolution.md
  • 已知陷阱和快速修复 ->
    references/common-failure-modes.md

Minimal workflow

最简工作流程

  1. Classify request: syntax, progression, reuse, custom script, or debug.
  2. Identify mode before drafting: edit existing text vs generate new text; for scripts, choose
    progress
    vs
    update
    context.
  3. Resolve units before drafting: nearby text -> user preference ->
    kg
    .
  4. Read only the minimum references required (target 1-2 files from routing list).
  5. Produce the smallest correct change.
  6. Validate constraints (especially writable variables and index scope).
  7. Return final program/script text and a short rationale.
  1. 分类请求:语法、进阶、复用、自定义脚本或调试。
  2. 起草前确定模式:编辑现有文本还是生成新文本;对于脚本,选择
    progress
    update
    上下文。
  3. 起草前解析单位:附近文本 -> 用户偏好 ->
    kg
  4. 仅阅读路由列表中所需的最少参考资料(目标1-2个文件)。
  5. 生成最小的正确修改。
  6. 验证约束条件(尤其是可写变量和索引作用域)。
  7. 返回最终的计划/脚本文本和简短说明。

Preflight validator (must pass before final output)

预飞验证(最终输出前必须通过)

  • Section separators are correct and consistent for each exercise line.
  • Set and set-variation syntax is structurally valid (including grouped load/timer behavior when used).
  • Script assignments target writable variables for the selected context.
  • Script assignment literals use valid types for the target variable.
  • Timer literals follow context rules (
    45s
    in exercise text, numeric in scripts).
  • Rep tokens are numeric counts (no
    s
    suffix on reps; use
    3x60
    , not
    3x60s
    ).
  • Percent load tokens in exercise-line set syntax are interpreted as
    % of 1RM
    .
  • Units are resolved from context/user preference or defaulted to
    kg
    .
  • No forbidden unit mismatches in generated output.
  • Exercise naming resolves against
    references/exercise-list.md
    (bare
    Exercise Name
    or explicit
    Exercise Name, Equipment
    ).
  • When user intent specifies equipment/variant, explicit
    Exercise Name, Equipment
    is an exact match in
    references/exercise-list.md
    .
  • When user intent does not specify equipment, alias-only
    Exercise Name
    is an exact bare-name match in
    references/exercise-list.md
    .
  • If exercise is not in built-in list, output remains valid and mentions manual add path in Liftosaur.
  • In full mode output, template lines (
    used: none
    ) are placed after
    ## Day 1
    (or another explicit day), never directly under
    # Week N
    .
  • 段落分隔符正确且每行一致。
  • 组次和组次变体语法结构有效(包括使用时的分组负载/计时器行为)。
  • 脚本赋值针对所选上下文的可写变量。
  • 脚本赋值字面量使用目标变量的有效类型。
  • 计时器字面量遵循上下文规则(训练动作文本中用
    45s
    ,脚本中用数值)。
  • 次数标记为数值计数(次数不带
    s
    后缀;使用
    3x60
    而非
    3x60s
    )。
  • 训练动作行组次语法中的百分比负载标记被解释为
    1RM
    的百分比。
  • 单位根据上下文/用户偏好解析,或默认为
    kg
  • 生成的输出中没有禁止的单位不匹配。
  • 训练动作名称对照
    references/exercise-list.md
    解析(纯
    训练动作名称
    或明确的
    训练动作名称, 器材
    )。
  • 当用户意图指定器材/变体时,明确的
    训练动作名称, 器材
    需与
    references/exercise-list.md
    中的条目完全匹配。
  • 当用户意图未指定器材时,仅用别名的
    训练动作名称
    需与
    references/exercise-list.md
    中的纯名称条目完全匹配。
  • 如果训练动作不在内置列表中,输出仍保持有效,并提及在Liftosaur中手动添加的路径。
  • 在完整模式输出中,模板行(
    used: none
    )需放在
    ## Day 1
    (或其他明确的单日)之后,绝不能直接放在
    # Week N
    之下。