Cheat init

From Jason5330/ai-self-eval · View interactive version

Cheat init is an AI agent skill from the GitHub repository Jason5330/ai-self-eval. cheat-on-content 的首次 onboarding 與腳手架創建器。預設 AI Coding 域,只問一個問題(要不要裝 hook)。觸發詞:"初始化"/"init"/"首次使用"/"setup cheat-on-content"。必須在用戶第一次會話執行;其他子 skill 在 .cheat-state.json 不存在時自動路由到此。

How to use this skill

Skill file

/cheat-init — 首次 onboarding

預設直接走 AI Coding 域,只問一個問題(hook),30 秒完成。

如果需要其他域,用 — form: daily-work 或 — form: daily-learning 參數覆蓋。

Overview

[用戶說"初始化"]
  ↓
[Phase 0: 檢測當前狀態]
  ↓
[Phase 1: 只問一個問題(Q5 hook)]
  ↓
[Phase 2: 創建腳手架]
  ↓
[Phase 3: 測試 hook 是否生效]
  ↓
[Phase 4: 給"下一步該說什麼"清單]

預設值(不問用戶)

| 字段 | 預設值 | 說明 |

|---|---|---|

| content_form | "ai-coding" | SP/LV/TS/CO/IR 維度 |

| retro_window_days | 1 | 每次 bug 修復後 + 功能完成後 |

| typical_duration_seconds | 5400 | 1-2 小時(小功能預設) |

| target_cadence_days | null | 靈活,不固定 |

Workflow

Phase 0: 檢測當前狀態

  1. 讀用戶當前工作目錄
  2. 檢查是否已存在 .cheat-state.json:
  1. 若已存在 predictions/ 但無 state file → "半初始化"狀態,詢問"要從現有文件推斷狀態還是重置?"

Phase 1: 只問一個問題

Q5: 裝 hook

"要裝預測鎖嗎?(直接 Enter 或回 yes 就裝)

裝了之後:預測寫完自動鎖住,你或我都不能改預測段。

不裝也行(回 no),但預測可以被事後修改,校準會失真。

yes / no:"

Q5 → hooks_installed 映射:yes / Enter → true;no → false

Phase 2: 創建腳手架

1. .cheat-state.json

寫入:

{
  "schema_version": "1.4",
  "skill_version": "1.0.0",
  "rubric_version": "v0",
  "content_form": "ai-coding",
  "typical_duration_seconds": 5400,
  "target_cadence_days": null,
  "retro_window_days": 1,
  "calibration_samples": 0,
  "hooks_installed": <bool>,
  "last_bump_at": null,
  "last_retro_at": null,
  "last_session_at": null,
  "consecutive_directional_errors": [],
  "pending_retros": [],
  "sessions": [],
  "in_progress_session": null,
  "initialized_at": "<本地 ISO 8601 含時區>"
}

2. rubric_notes.md

從 starter-rubrics/ai-coding-zero.md 複製。

3. 三個目錄:scripts/ + predictions/ + sessions/(加 .gitkeep)

4. 如果 Q5=是 → 安裝 hooks

Phase 3: 測試 hook 是否生效(僅當 Q5=是)

  1. 創建臨時文件 predictions/_test_hook.md,含 ## 預測\n[test]\n## 復盤\n
  2. 嘗試 Edit 這個文件的 ## 預測 段
  3. 鉤子應 exit 1 阻塞 → 報告"✅ immutability 鉤子生效"
  4. 刪除測試文件

如果鉤子未生效 → 不要假裝成功,明確告訴用戶:"鉤子安裝失敗,可能是 .claude/settings.json 配置沒生效。建議手動檢查或重啟 Claude Code。"

Phase 4: 輸出清單

✅ 初始化完成(AI Coding,rubric: v0,confidence: 🔴)

下次直接說:

📝 開始一個新功能前  → "啟動預測"(貼上你的需求描述)
🐛 每次 bug 修好後   → "這個 bug 修好了,復盤一下"
✅ 功能完成後        → "功能完成了,做最終復盤"
📊 任何時候          → "狀態"

做完 2 次後說「升級 rubric」,AI 開始根據你的錯誤更新評分標準。

Key Rules

  1. 不假裝成功:任何步驟失敗 → 明確告訴用戶哪一步出錯
  2. 不多問:只問 hook 這一個問題,其他全部用預設值
  3. 不靜默 mkdir:每創建一個文件都說一句在做什麼

非 AI Coding 域

用戶傳 — form: daily-work 或 — form: daily-learning 時:

Integration

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.