codex-memory-task-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex Memory Task Init

Codex Memory Task Init

Pre-Write Checks

预写入检查

Before creating the task directory, first define an absolute path variable:
PROJECT_ROOT
.
  • PROJECT_ROOT
    must be the project root for the current session
  • Do not treat
    ~
    ,
    /
    ,
    ~/.config/opencode
    ,
    ~/.codex
    , a skills directory, or a config directory as the project root
  • If the current directory looks like a home directory or a config directory, or if the project root is still unclear, stop and confirm it first
  • All task directories and files must be created under
    {PROJECT_ROOT}/.codex-memory/tasks/active/<task-slug>/
  • Do not treat the bare relative path
    .codex-memory/tasks/...
    as the final target path
在创建任务目录之前,首先定义一个绝对路径变量:
PROJECT_ROOT
  • PROJECT_ROOT
    必须是当前会话的项目根目录
  • 请勿将
    ~
    /
    ~/.config/opencode
    ~/.codex
    、技能目录或配置目录视为项目根目录
  • 如果当前目录看起来是主目录或配置目录,或者项目根目录仍不明确,请先停止并确认
  • 所有任务目录和文件必须创建在
    {PROJECT_ROOT}/.codex-memory/tasks/active/<task-slug>/
  • 请勿将相对路径
    .codex-memory/tasks/...
    视为最终目标路径

When To Use

使用场景

Use this when any of the following is true:
  • The user explicitly says "This is a long-running task. Record it."
  • The user explicitly says "Create task memory for this long-running task"
  • The task will continue across multiple sessions
  • The task needs its own target, decisions, and reference tracking
  • The task no longer fits cleanly inside
    current.md
当满足以下任一条件时使用:
  • 用户明确说出“这是一项长期运行的任务,请记录下来。”
  • 用户明确说出“为这项长期运行的任务创建任务记忆”
  • 任务将跨多个会话持续进行
  • 任务需要独立跟踪自身目标、决策和参考资料
  • 任务无法清晰适配到
    current.md

Natural Trigger Phrases

自然触发语句

  • This is a long-running task. Record it.
  • Create task memory for this long-running task
  • 这是一项长期运行的任务,请记录下来。
  • 为这项长期运行的任务创建任务记忆

Goal

目标

Create the standard task memory skeleton under
.codex-memory/tasks/active/<task-slug>/
.
.codex-memory/tasks/active/<task-slug>/
下创建标准的任务记忆框架。

Required Output

要求输出

The actual target path must be:
text
{PROJECT_ROOT}/.codex-memory/tasks/active/<task-slug>/
The structure below is shown only as the project-relative layout:
Create:
text
.codex-memory/tasks/active/<task-slug>/
├── brief.md
├── decisions.md
└── refs.md
Also update:
text
.codex-memory/tasks/index.md
实际目标路径必须为:
text
{PROJECT_ROOT}/.codex-memory/tasks/active/<task-slug>/
以下结构仅展示项目相对布局:
创建:
text
.codex-memory/tasks/active/<task-slug>/
├── brief.md
├── decisions.md
└── refs.md
同时更新:
text
.codex-memory/tasks/index.md

Rules

规则

  1. Confirm
    PROJECT_ROOT
    first; all actual write paths must use absolute
    {PROJECT_ROOT}/.codex-memory/...
    paths.
  2. <task-slug>
    should be short, stable, and readable, without a date.
  3. brief.md
    ,
    decisions.md
    , and
    refs.md
    must always be created together.
  4. All files must be generated from this skill's built-in templates.
  5. If the task directory already exists, do not rebuild it; only fill gaps and validate.
  6. When updating
    tasks/index.md
    , add the task entry and a one-line summary.
  7. Run a structure validation after writing; if validation fails, stop and report it.
  1. 首先确认
    PROJECT_ROOT
    ;所有实际写入路径必须使用绝对路径
    {PROJECT_ROOT}/.codex-memory/...
  2. <task-slug>
    应简短、稳定且易读,不含日期。
  3. brief.md
    decisions.md
    refs.md
    必须始终同时创建。
  4. 所有文件必须从本技能的内置模板生成。
  5. 如果任务目录已存在,请勿重新构建;仅补充缺失文件并验证。
  6. 更新
    tasks/index.md
    时,添加任务条目和一行摘要。
  7. 写入后运行结构验证;如果验证失败,请停止并报告问题。

Report Back

反馈内容

  • the
    PROJECT_ROOT
    used this time
  • the task slug
  • created files
  • backfilled files
  • tasks/index.md
    update result
  • validation result
  • 本次使用的
    PROJECT_ROOT
  • 任务slug
  • 创建的文件
  • 补充的文件
  • tasks/index.md
    的更新结果
  • 验证结果

Constraints

约束条件

  • Do not create any
    .codex-memory/tasks/
    directories or files before
    PROJECT_ROOT
    is confirmed
  • If the target path is not
    {PROJECT_ROOT}/.codex-memory/tasks/active/<task-slug>/
    , stop immediately and do not continue
  • 在确认
    PROJECT_ROOT
    之前,请勿创建任何
    .codex-memory/tasks/
    目录或文件
  • 如果目标路径不是
    {PROJECT_ROOT}/.codex-memory/tasks/active/<task-slug>/
    ,请立即停止,不要继续执行