Writing plans

From yimwoo/hotl-plugin · View interactive version

Writing plans is an AI agent skill from the GitHub repository yimwoo/hotl-plugin. Use after design approval to create a dated executable workflow file with bite-sized tasks, exact file paths, and loop/gate definitions.

How to use this skill

Skill file

Writing HOTL Plans

Overview

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

Output Filename

Save as YYYY-MM-DD-<slug>-workflow.md, where:

Examples:

The date makes workflow revisions easy to sort chronologically. The semantic identity remains <slug>, not the date-prefixed filename.

Semantic Identity

The canonical workflow filename is human-friendly, but the stable execution identity is still <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.

Output Directory

Default: docs/plans. Opt-in override via .hotl/config.yml: workflows_dir: <path>. Resolution procedure:

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

1. In-repo: scripts/hotl-config-resolve.sh

2. Codex native-skills install: ~/.codex/hotl/scripts/hotl-config-resolve.sh

3. Codex plugin install: ~/.codex/plugins/hotl-source/scripts/hotl-config-resolve.sh

4. Codex plugin cache fallback: ~/.codex/plugins/cache/codex-plugins/hotl/*/scripts/hotl-config-resolve.sh

5. Cline install fallback: ~/.cline/hotl/scripts/hotl-config-resolve.sh

6. Claude Code plugin fallback: ~/.claude/plugins/hotl/scripts/hotl-config-resolve.sh

  1. Invoke the resolver as a command proxy — it forwards argv to hotl-config.sh, no intermediate path-locator step:

```bash

bash <resolved-hotl-config-resolve.sh> get workflows_dir --default=docs/plans

```

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

Typed Verification

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

Step Granularity

Break work into atomic steps:

No Placeholders

Every workflow step must contain enough concrete information for an agent to execute it without guessing. These are plan failures:

If a step cannot be made concrete yet, stop and ask for clarification instead of saving the workflow.

Branch And Worktree Authoring Guidance

Example:

Artifact Verification Rules

risk_level Guidelines

risk_level: high always generates gate: human on security-sensitive steps, regardless of auto_approve.

Self-Check Loop

After saving the workflow file, run a self-check before offering execution options. Review the workflow for:

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.

After Saving

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:

  1. Loop execution (this session) — runs steps autonomously with auto-approve
  1. Manual execution — linear execution with explicit checkpoints
  1. Subagent execution (this session) — delegates implementation-friendly steps to fresh subagents while the controller keeps gates and verification

If a previous run was interrupted, point the user to the host tool's native resume entry point.

(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:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.