# 自动计划评审 (autoplan)

> 从磁盘读取 CEO、设计、DX 和工程评审技能并按顺序运行，依据 6 条决策原则自动做出中间决定。

- 分类: [任务拆分](https://www.myskills.tools/zh/categories/task-breakdown/)
- 来源: 社区 · Garry Tan
- 代码仓库: https://github.com/garrytan/gstack/tree/main/autoplan (commit ed10791 · v1.0.0)
- SKILL.md: https://github.com/garrytan/gstack/blob/main/autoplan/SKILL.md
- 安装命令: `npx skills add garrytan/gstack --skill autoplan`
- 许可证: MIT
- 兼容工具: Claude Code, Codex, Cursor, Copilot
- 权限: read-repo ✓, write-files ✓, shell ✓, network ✓
- 状态: 扫描通过
- 规则扫描无法覆盖所有风险，安装前请阅读此技能的 SKILL.md，确认权限后再使用。
- ⚠ 会注册 PreToolUse 钩子、记录遥测，并可能把计划发送给 Codex CLI 做外部评审。

## 核心规则

自动决策只替代用户的回答而不替代分析，凡是要改变用户既定方向的 User Challenge 一律不得自动决定。

## 执行阶段

1. **接收与还原点** — 备份原计划并初始化工作计划，读取 CLAUDE.md、TODOS.md、git 历史和设计文档，判断是否涉及 UI 和 DX 范围。
2. **外部评审预检** — 检查 Codex CLI 是否可用及已认证；不可用时仍运行 Claude 对抗性评审，并如实记录覆盖情况。
3. **依次评审** — 严格按 CEO → 设计（有 UI 时）→ DX（面向开发者时）→ 工程的顺序执行，每个自动决定都记入决策审计表。
4. **最终审批关** — 核对各阶段必需产出后，向用户呈现一页简报，列出口味型决策和 User Challenge，由用户批准、覆盖、修改或拒绝。
5. **记录评审日志** — 批准后为 /ship 的看板记录各项评审结果和覆盖表，并建议在准备好时运行 /ship。

## 权限说明（据 SKILL.md 整理）

| 能力 | 是否需要 | 说明 |
|---|---|---|
| 文件写入 | 部分需要 | 写入计划文件、.gstack/tmp/autoplan/ 下的评审产物以及 gstack 的日志和遥测目录。 |
| 命令执行 | 需要 | allowed-tools 包含 Bash，用于运行 git、gh/glab、bun 和 gstack 辅助脚本以及 Codex CLI。 |
| 网络外发 | 需要 | allowed-tools 包含 WebSearch，并可调用 Codex CLI 进行外部评审。 |

## SKILL.md 头部信息（YAML）

```yaml
---
name: autoplan
preamble-tier: 3
version: 1.0.0
description: Auto-review pipeline — reads the full CEO, design, eng, and DX review skills from disk and runs them sequentially with auto-decisions using 6 decision principles. (gstack)
triggers:
  - run all reviews
  - automatic review pipeline
  - auto plan review
allowed-tools:
  - Bash
  - Read
  - Write
  - Edit
  - Glob
  - Grep
  - WebSearch
  - AskUserQuestion
hooks:
  PreToolUse:
    - matcher: "Read"
      hooks:
        - type: command
          command: "bash -c 'S=\"$HOME/.claude/skills/gstack/autoplan/bin/phase-publication-hook\"\nif [ -f \"$S\" ]; then exec bash \"$S\"; fi\nprintf '\\''%s\\n'\\'' '\\''{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Autoplan publication guard is unavailable. Restore the installed autoplan/bin/phase-publication-hook before continuing this skill.\"}}'\\'''"
          statusMessage: "Checking Autoplan phase publication..."
    - matcher: "Agent"
      hooks:
        - type: command
          command: "bash -c 'S=\"$HOME/.claude/skills/gstack/autoplan/bin/phase-publication-hook\"\nif [ -f \"$S\" ]; then exec bash \"$S\"; fi\nprintf '\\''%s\\n'\\'' '\\''{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Autoplan publication guard is unavailable. Restore the installed autoplan/bin/phase-publication-hook before continuing this skill.\"}}'\\'''"
          statusMessage: "Checking Autoplan phase publication..."
---
```

首页: https://www.myskills.tools/zh/ · URL: https://www.myskills.tools/zh/skills/autoplan/
