一键导入
athena-init
Athena 项目初始化 skill. 在项目中执行 /athena-init 时调用. 职责: 探测平台 / 工具可用性, 创建 .ai_state/ 目录 + 复制 _index.md 模板 + 填入探测结果.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Athena 项目初始化 skill. 在项目中执行 /athena-init 时调用. 职责: 探测平台 / 工具可用性, 创建 .ai_state/ 目录 + 复制 _index.md 模板 + 填入探测结果.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
会话记忆固化 skill (v9.8.0 新). 会话结束/中途, agent 自己总结本会话增量写进 .ai_state (_index.md 当前状态 + sprints/{slug}/session-log.md), 免去用户每次手动描述一堆让它存. 手动 /checkpoint 触发. 与 compact-snapshot hook 互补 (hook 机械兜底, skill 做需推理的总结).
Athena 主入口 skill. 接收用户任务, 做 PACE 路由分诊 (brainstorm/roadmap/plan/...), 启动对应 stage. v9.7.0: 铁律引用名称化 (CC/CX 编号非对称, 引用一律用 铁律[名称]). v9.9.1: 路由输出可审计决策摘要 (候选、证据、权衡、决策、置信度), 不要求暴露私有思维链; re-route 只升不降.
Bugfix 路径的结构化问题流程: report → analyze → fix-note 三件套档案, 落在 sprints/{slug}/. 把"偏轻"的 Bugfix 升级成可复现 / 可追溯 / 可复盘. 借 CodeStable issue 实体, 适配 agent-in-loop.
AI 引导的 Athena 版本迁移 (9.9.2 起弃用脚本化 migrate). 当用户要把已装旧版 Athena 升级到 9.9.3, 或迁移 .ai_state 数据时触发. AI 读 CHANGELOG + 新旧包 diff 智能应用, 逐一保留用户配置, 先备份、绝不打印密钥、失败即回滚。
PACE review stage 执行 skill (Claude Code). reviewer 与 spec-compliance 并行只读返回, 主 agent 合并 passN.md 后再运行 evaluator, 最终由主 agent 落盘 VERDICT 与 next_action.
PACE impl 后的运行时验证环 (v9.8.0 新). 用官方 /goal 承载"实跑接口→自测自改→模拟环境/数据"自驱循环, 补 PACE 只单测不实跑的洞. System/Refactor 强制, Feature 可选, Bugfix/Quick/Hotfix 跳过. Loop Engineering 落地: DOER (generator 改代码) + CHECKER (/goal supervisor + delivery-gate), 不自批不自造 loop.
| name | athena-init |
| description | Athena 项目初始化 skill. 在项目中执行 /athena-init 时调用. 职责: 探测平台 / 工具可用性, 创建 .ai_state/ 目录 + 复制 _index.md 模板 + 填入探测结果. |
Memory contract: Tier1 working memory is non-authoritative; Tier2 persistent memory is the created .ai_state; _index.md retrieval router owns bounded recovery pointers/history.
用户在新项目首次运行 /athena-init. 已 init 的项目 → 跳过, 提示用户用 /athena-status 查状态.
# 项目是否已 init?
if [ -d ".ai_state" ]; then
echo "项目已初始化, 使用 /athena-status 查看状态"
exit 0
fi
# 是否在 git 仓库?
git rev-parse --git-dir >/dev/null 2>&1 || { echo "Athena 需要 git 仓库"; exit 1; }
# CC 始终可用 (因为我们就在 CC 里跑)
CC_VERSION=$(claude --version 2>/dev/null || echo "claude-code (unknown)")
# CX
if command -v codex >/dev/null 2>&1; then
CX_VERSION=$(codex --version 2>/dev/null)
CX_AVAILABLE=true
else
CX_VERSION=""
CX_AVAILABLE=false
fi
# AG (Antigravity)
if command -v agy >/dev/null 2>&1; then
AG_VERSION=$(agy --version 2>/dev/null || echo "agy (unknown)")
AG_CALLABLE=true
else
AG_CALLABLE=false
fi
# context7
if command -v npx >/dev/null 2>&1 && npx --no-install ctx7 --version >/dev/null 2>&1; then
CTX7_AVAILABLE=true
else
CTX7_AVAILABLE=false
fi
# augment MCP (CC 端在 ~/.claude/mcp.json 中)
if [ -f "$HOME/.claude/mcp.json" ] && grep -q "augment-context-engine" "$HOME/.claude/mcp.json" 2>/dev/null; then
AUGMENT_CC=true
else
AUGMENT_CC=false
fi
# rg / jq
RG_AVAILABLE=$(command -v rg >/dev/null && echo true || echo false)
JQ_AVAILABLE=$(command -v jq >/dev/null && echo true || echo false)
# v9.9.0: VM 运行时 (~/.athena/vm.json 由 /athena-vm setup 创建)
if [ -f "$HOME/.athena/vm.json" ]; then
VM_AVAILABLE=true # 存在即标 true; 连通性由 /athena-vm doctor 验证
else
VM_AVAILABLE=false
fi
mkdir -p .ai_state/sprints
mkdir -p .ai_state/roadmap
mkdir -p .ai_state/architecture
mkdir -p .ai_state/requirements
mkdir -p .ai_state/compound
mkdir -p .ai_state/.snapshots
touch .ai_state/compound/.gitkeep
cp ~/.claude/skills/pace/templates/_index.md .ai_state/_index.md
# 用 sed / python 把探测结果替换进 frontmatter
主 agent 编辑 .ai_state/_index.md 把上面探测到的真实值填入对应字段:
cc_version, cx_version, ag_callabletools_available.{context7_cli, augment_mcp_cc, rg_available, jq_available, vm_available}platforms_enabledplatform_features.{cc_subagent_task: true, cx_spawn_agent, cx_plan_mode_reasoning_effort, ag_parallel_subagents, ag_headless_p}判定规则 (主 agent 在 init 时执行):
cx_spawn_agent = true if CX_VERSION >= 0.128cx_plan_mode_reasoning_effort = true when the installed Codex supports that config fieldag_parallel_subagents = ag_callable (Antigravity 默认支持)ag_headless_p = ag_callable (agy -p 默认支持)主 agent 输出 markdown 总结:
✓ Athena v9.9.3 初始化完成
## 平台
- CC: claude-code 2.4.1 ✓
- CX (codex): codex-cli 0.144.1 ✓
- AG (antigravity): 未安装. 安装: `curl -fsSL https://antigravity.google/cli/install.sh | bash`
## 工具
- context7 (npx ctx7): ✓
- augment MCP (CC): 未配置. 配置: 在 ~/.claude/mcp.json 加 augment-context-engine
- rg: ✓
- jq: ✓
## 状态
.ai_state/ 已建立 (sprints/ roadmap/ architecture/ requirements/ compound/ .snapshots/), _index.md 已生成;仅填充模板中真实存在的字段。
## 下一步
告诉我你要做什么, 我会路由 PACE 路径:
- "修这个 bug" → Bugfix 路径
- "加个新功能" → Feature 路径
- "重构这个模块" → Refactor 路径 (含 polish 强制)
- "搭一个 X 系统" → System 路径 (含 design + polish 强制)
git initathena-init 不进入任何 PACE stage, 它是 stage="(none)" → 等待用户首条任务输入后才路由.