workspace-init

WILLOSCAR 的头像作者 WILLOSCAR

通过复制标准工件模板(STATUS.md、CHECKPOINTS.md、UNITS.csv、DECISIONS.md + 文件夹)来初始化新工作区。**触发**:工作区初始化、初始化工作区、工作区模板、初始化工作区。**使用时机**:启动任何管道运行(必须先有工作区工件目录与工件)。**跳过 if**:工作区已初始化且不希望覆盖那些文件(默认显式) `修改--overwrite`)。**网络**:无。**Guardrail**:不要`.codex/skills/workspace-init/assets/`模板;默认不覆盖现有文件。

📖 中文导读:通过复制标准工件模板(STATUS.md、CHECKPOINTS.md、UNITS.csv、DECISIONS.md + 文件夹)来初始化新工作区。**触发**:工作区初始化、初始化工作区、工作区模板、初始化工作区。**使用时机**:启动任何管道运行(必须先有工作区工件目录与工件)。**跳过 if**:工作区已初始化且不希望覆盖那些文件(默认显式) `修改--overwrite`)。**网络**:无。**Guardrail**:不要`.codex/skills/workspace-init/assets/`模板;默认不覆盖现有文件。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: workspace-init description: | Initialize a new workspace by copying the standard artifact template (STATUS.md, CHECKPOINTS.md, UNITS.csv, DECISIONS.md + folders). Trigger: workspace init, initialize workspace, workspace template, 初始化 workspace. Use when: 启动任何 pipeline run(必须先有 workspace 工件与目录骨架)。 Skip if: workspace 已初始化且不希望覆盖既有文件(除非显式 --overwrite)。 Network: none. Guardrail: 不要修改 .codex/skills/workspace-init/assets/ 模板;默认不覆盖已有文件。

Workspace Init

Create an artifact-first workspace using the standard template under assets/workspace-template/.

This skill is intentionally simple and deterministic.

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)

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.

Quality checklist

  • Workspace contains the template files and folders.
  • UNITS.csv is valid CSV with the required header.

Side effects

  • Allowed: create missing workspace files/directories.
  • Not allowed: modify the template under .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>

All Options

  • --overwrite: allow overwriting existing files in the target workspace

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

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.

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).