docs(knowledge): clarify routines CLI/API operations and /schedule scope#229
Conversation
Document that /schedule list|update|run manage existing cloud routines, that the HTTP API is fire-only (no CRUD), and the exact /fire endpoint, headers, and base URL. Distinguish the "routine" entity from the /schedule CLI command and the same-named Desktop local scheduled task. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 drive review (mode: quick)適用観点 (5/11):
公式 docs(routines / routines-fire API)と突き合わせて検証。 correctness指摘なし。 security指摘なし。curl 例の conventions指摘なし。コミット種別 usability指摘なし。「routine(エンティティ)と documentation[Info] knowledge/ai/agents/claude-code-routines.md:利用枠 サマリーCritical: 0 件 by_axis: 判定: 全適用観点が exit_criteria を満たす → merge-ready |
… layering (#230) ## 概要 PR #229 の続き。ルーチンの**無効化・有効化・削除**の操作面と、`/schedule`(skill)/ CLI / API の層関係を追記。実機(`RemoteTrigger` 経由の `/schedule list`)で挙動を確認済み。 ## 追記内容(`ai/agents/claude-code-routines.md`) - **無効化 / 有効化**: `/schedule update` の `enabled` フラグで切替(CLI 可)。Web/Desktop の Repeats トグル(pause/resume)でも可。 - **削除**: CLI 不可・公開 API 不可。**Web / Desktop の detail ページのみ**(過去セッションは残る)。 - **`/schedule` の層関係**: Claude Code CLI の組み込みスラッシュコマンド(近年は bundled skill 実装)で、内部的に claude.ai の `/v1/code/triggers`(list/get/create/update/run)を in-process OAuth で呼ぶ。**管理用の公開 REST API は無い**。公開 API は起動専用の `/fire` のみ。 - よくやるミスに「CLI / API でルーチンを削除しようとする」を追加し、既存の CRUD ミス項目を「公開 API は起動専用/削除・トークン管理は Web のみ」に精緻化。 ## 検証 - typecheck / test (77 passed) green。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
概要
「Claude Code Routines を CLI / API で操作できるか」を公式 docs(routines / routines-fire API)で再検証し、2 記事を更新。
検証で判明したこと
/schedule list(一覧) //schedule update(変更・cron 式指定) //schedule run(即時起動)。作成できるトリガーは schedule のみ(API/GitHub は Web)。/fireの正確な仕様: ベース URLhttps://api.anthropic.com、パス/v1/claude_code/routines/{routine_id}/fire、必須ヘッダーanthropic-beta: experimental-cc-routine-2026-04-01、レスポンスは即返り(完了を待たない)。routine(クラウドの設定エンティティ)と/schedule(その CLI 操作コマンド)は別物。同名の Desktop ローカル scheduled task(create_scheduled_task)とも別レイヤー。変更
ai/agents/claude-code-routines.md: 「CLI / API での操作」節を新設。/scheduleサブコマンド表、/fireの curl 例とレスポンス形、Unknown command の原因、用語区別を追記。よくやるミスに「API で CRUD しようとする」「/web-setupで GitHub App が入ると誤解」を追加。ai/practice/scheduled-tasks.md: Cloud Routines の「作成・管理方法」にlist/update/runを追記。/schedule= cloud routine の CLI 操作面である点と Desktop ローカルタスクとの区別を明記。reviewedを 2026-05-24 に更新。検証
🤖 Generated with Claude Code