一键导入
writing-plans
Use after design approval to create a dated executable workflow file with bite-sized tasks, exact file paths, and loop/gate definitions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use after design approval to create a dated executable workflow file with bite-sized tasks, exact file paths, and loop/gate definitions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when executing an existing HOTL workflow file — reads steps, loops until success criteria met, auto-approves low-risk gates, pauses at high-risk gates.
Resume an interrupted workflow run with verify-first strategy — loads sidecar state, verifies the last step, and continues execution.
Use when executing an implementation plan linearly with explicit human checkpoints between batches of tasks.
Use after execution is complete or intentionally stopped — decide whether to merge back, publish a PR branch, keep the execution checkout, or discard it, and record that disposition in HOTL state.
Use when executing an accepted HOTL workflow through the best available host or fallback driver.
Delegated step runner over the HOTL execution state machine — delegates eligible steps to fresh subagents while the controller keeps governance, verification, and stop conditions.
| name | writing-plans |
| description | Use after design approval to create a dated executable workflow file with bite-sized tasks, exact file paths, and loop/gate definitions. |
Produce a dated workflow file that loop-execution can execute. The canonical filename is YYYY-MM-DD-<slug>-workflow.md, where <slug> is a short kebab-case identity derived from the intent (e.g., 2026-04-22-add-rate-limiting-workflow.md). Each step should be 2-5 minutes of work. Include loop conditions and gates from the design's governance contract.
When the accepted design defines execution limits, include only the relevant optional portable budget fields (max_total_attempts, max_agents, max_cost_usd, max_elapsed_minutes) in workflow frontmatter. Do not invent numeric budgets. policy_profile is descriptive and never grants host permissions.
Announce: "I'm using the writing-plans skill to create the executable workflow."
Save as YYYY-MM-DD-<slug>-workflow.md, where:
YYYY-MM-DD is the current local date<slug> is a short kebab-case semantic identity derived from the intent (e.g., add-user-auth, refactor-api)Examples:
2026-04-22-add-user-auth-workflow.md2026-04-22-refactor-api-workflow.mdThe date makes workflow revisions easy to sort chronologically. The semantic identity remains <slug>, not the date-prefixed filename.
The canonical workflow filename is human-friendly, but the stable execution identity is still <slug>.
YYYY-MM-DD-<slug>-workflow.md<slug>hotl/<slug>When a later workflow revision is created for the same feature, it should use a new dated filename while keeping the same semantic identity.
Default: docs/plans. Opt-in override via .hotl/config.yml: workflows_dir: <path>. Resolution procedure:
Resolve the install path of hotl-config-resolve.sh using the same six-location rule documented for document-lint.sh and hotl-config.sh (see skills/document-review/SKILL.md):
scripts/hotl-config-resolve.sh~/.codex/hotl/scripts/hotl-config-resolve.sh~/.codex/plugins/hotl-source/scripts/hotl-config-resolve.sh~/.codex/plugins/cache/codex-plugins/hotl/*/scripts/hotl-config-resolve.sh~/.cline/hotl/scripts/hotl-config-resolve.sh~/.claude/plugins/hotl/scripts/hotl-config-resolve.shInvoke the resolver as a command proxy — it forwards argv to hotl-config.sh, no intermediate path-locator step:
bash <resolved-hotl-config-resolve.sh> get workflows_dir --default=docs/plans
Use the returned directory as the output location. docs/plans is the canonical default. Any other value is an opt-in override — write YYYY-MM-DD-<slug>-workflow.md inside that directory, creating it if needed.
Projects with no .hotl/config.yml receive docs/plans from the --default=docs/plans fallback.
Format:
---
intent: [from design's intent contract]
success_criteria: [from design's intent contract]
risk_level: low | medium | high
auto_approve: true | false
# branch: custom/branch-name # optional — execution derives hotl/<slug> if absent
# worktree: host # optional: only when a host tool already put this task on a feature-branch worktree
# dirty_worktree: allow # optional — proceed even if non-HOTL files are uncommitted
---
## Steps
- [ ] **Step N: [Step name]**
action: [what to do]
loop: false | until [condition]
max_iterations: [number, default 3]
verify: [scalar command OR typed block]
gate: human | auto # optional
CRITICAL — field indentation: action:, loop:, verify:, max_iterations:, and gate: MUST start at column 0 (no leading spaces). The document linter matches ^action:, ^loop:, etc. — any indentation (even 2 spaces under the list item) will fail validation. Only the sub-fields of structured verify: blocks (like type:, path:, assert:) are indented.
Choose the appropriate verify type for each step:
# Scalar shorthand (type: shell)
verify: pytest tests/ -v
# Structured
verify:
type: browser
url: http://localhost:3000/dashboard
check: priority badge renders with correct color
# Artifact with structured assert
verify:
type: artifact
path: migrations
assert:
kind: matches-glob
value: "*.sql"
# Greenfield scaffold check
verify:
type: artifact
path: src
assert:
kind: exists
# Multiple checks per step
verify:
- type: shell
command: npm test
- type: artifact
path: coverage/lcov.info
assert:
kind: exists
Break work into atomic steps:
Every workflow step must contain enough concrete information for an agent to execute it without guessing. These are plan failures:
TBD, TODO, later, fill in, or empty sectionsIf a step cannot be made concrete yet, stop and ask for clarification instead of saving the workflow.
hotl/<slug> unless the workflow frontmatter sets branch: ...branch: only when downstream tooling or verify logic truly depends on a specific branch nameworktree: false only when execution must stay in the current checkout rather than a separate worktreebranch: <current-branch> and worktree: falseworktree: host when Codex or another host tool already created the execution worktree and HOTL should use the current feature branch exactly as-isgit branch --show-current | grep '^feature/' unless the workflow pins branch: to match that exact conventionmain/master branch and does not pin branch: or worktree:, execution should pause and ask whether to continue on the current branch or use HOTL's isolated execution branch/worktreeExample:
pv6-ui/..., set branch: pv6-ui/plan-amendmentshotl/<slug> and do not assert a custom prefixpv6-ui/plan-amendments itself, set branch: pv6-ui/plan-amendments and worktree: falsepv6-ui/plan-amendments, set worktree: host and omit branch:kind: exists when the step creates a new file or directory from scratchkind: matches-glob only when path is an existing directory and value is a filename glob such as *.tsx or *.mdvalue; write path: src with value: "*.tsx", not path: . with value: "src/*.tsx"src or package.json with kind: exists, not matches-globrisk_level: high always generates gate: human on security-sensitive steps, regardless of auto_approve.
After saving the workflow file, run a self-check before offering execution options. Review the workflow for:
gate: humanmax_iterations is reasonable (typically 3-5)If issues are found, fix them in the workflow file and re-check until clean. Do not ask the user to review — this is an internal quality pass.
Once the self-check passes, offer execution options:
"Workflow saved to <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md. How would you like to execute?"
Present the three execution modes using the current host tool's native invocation style. Never show Claude Code slash commands in Codex or any other skill-based agent.
Use these mappings:
$hotl:loop-execution on <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md/hotl:loop <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md$hotl:executing-plans on <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md/hotl:execute-plan <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md$hotl:subagent-execution on <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md/hotl:subagent-execute <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.mdIf a previous run was interrupted, point the user to the host tool's native resume entry point.
$hotl:resuming on <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md/hotl:resume <resolved-workflows-dir>/YYYY-MM-DD-<slug>-workflow.md(Always tell the user the exact workflow filename so they can pass it to the execution request if multiple workflow files exist.)
If execution starts from a non-main/master branch and the workflow does not already pin branch: or worktree:, tell the user HOTL will ask one more continuity question at execution time: