workspace-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Workspace Init

Workspace Init

Create an artifact-first workspace using the standard template under
assets/workspace-template/
.
This skill is intentionally simple and deterministic.
使用
assets/workspace-template/
下的标准模板创建一个以工件为核心的工作区。
本Skill设计得简洁且具有确定性。

Input

输入

  • Target workspace directory (usually the current working directory for the run).
  • 目标工作区目录(通常为当前运行的工作目录)。

Outputs

输出

  • STATUS.md
    ,
    CHECKPOINTS.md
    ,
    UNITS.csv
    ,
    DECISIONS.md
  • GOAL.md
  • queries.md
  • papers/
    ,
    outline/
    ,
    citations/
    ,
    output/
    (with placeholder files)
  • STATUS.md
    CHECKPOINTS.md
    UNITS.csv
    DECISIONS.md
  • GOAL.md
  • queries.md
  • papers/
    outline/
    citations/
    output/
    (包含占位文件)

Workflow

工作流程

  1. Create the target workspace directory if it does not exist.
  2. Copy the contents of
    assets/workspace-template/
    into the workspace.
  3. Do not overwrite existing files unless explicitly requested; prefer merge/append when safe.
  4. Ensure the four core files exist:
    STATUS.md
    ,
    UNITS.csv
    ,
    CHECKPOINTS.md
    ,
    DECISIONS.md
    .
  1. 若目标工作区目录不存在则创建它。
  2. assets/workspace-template/
    下的内容复制到工作区中。
  3. 除非明确要求,否则不覆盖现有文件;在安全的情况下优先选择合并/追加。
  4. 确保四个核心文件存在:
    STATUS.md
    UNITS.csv
    CHECKPOINTS.md
    DECISIONS.md

Quality checklist

质量检查清单

  • Workspace contains the template files and folders.
  • UNITS.csv
    is valid CSV with the required header.
  • 工作区包含模板文件和文件夹。
  • UNITS.csv
    是包含必填表头的有效CSV文件。

Side effects

副作用

  • Allowed: create missing workspace files/directories.
  • Not allowed: modify the template under
    .codex/skills/workspace-init/assets/
    .
  • 允许:创建缺失的工作区文件/目录。
  • 禁止:修改
    .codex/skills/workspace-init/assets/
    下的模板。

Script

脚本

Quick Start

快速开始

  • python .codex/skills/workspace-init/scripts/run.py --help
  • python .codex/skills/workspace-init/scripts/run.py --workspace <workspace_dir>
  • python .codex/skills/workspace-init/scripts/run.py --help
  • python .codex/skills/workspace-init/scripts/run.py --workspace <workspace_dir>

All Options

所有选项

  • --overwrite
    : allow overwriting existing files in the target workspace
  • --overwrite
    :允许覆盖目标工作区中的现有文件

Examples

示例

  • Create a new workspace:
    • python .codex/skills/workspace-init/scripts/run.py --workspace workspaces/my-run
  • Re-init and overwrite template files (be careful):
    • python .codex/skills/workspace-init/scripts/run.py --workspace workspaces/my-run --overwrite
  • 创建新工作区:
    • python .codex/skills/workspace-init/scripts/run.py --workspace workspaces/my-run
  • 重新初始化并覆盖模板文件(请谨慎操作):
    • python .codex/skills/workspace-init/scripts/run.py --workspace workspaces/my-run --overwrite

Troubleshooting

故障排除

Issue: workspace already exists and files were not overwritten

问题:工作区已存在且文件未被覆盖

Fix:
  • This is the default behavior. Re-run with
    --overwrite
    only if you want to replace template files.
解决方法
  • 这是默认行为。仅当你希望替换模板文件时,才使用
    --overwrite
    参数重新运行。

Issue: you accidentally tried to use the repo root as a workspace

问题:你意外尝试将仓库根目录用作工作区

Fix:
  • Always use
    workspaces/<name>/
    (the runner refuses to use the repo root).
解决方法
  • 请始终使用
    workspaces/<name>/
    作为工作区(运行器会拒绝使用仓库根目录)。