Skip to content

docs(knowledge): clarify routines CLI/API operations and /schedule scope#229

Merged
ozzy-3 merged 1 commit into
mainfrom
docs/routines-cli-api
May 24, 2026
Merged

docs(knowledge): clarify routines CLI/API operations and /schedule scope#229
ozzy-3 merged 1 commit into
mainfrom
docs/routines-cli-api

Conversation

@ozzy-3
Copy link
Copy Markdown
Contributor

@ozzy-3 ozzy-3 commented May 24, 2026

概要

「Claude Code Routines を CLI / API で操作できるか」を公式 docs(routines / routines-fire API)で再検証し、2 記事を更新。

検証で判明したこと

  • CLI は管理まで可: /schedule list(一覧) / /schedule update(変更・cron 式指定) / /schedule run(即時起動)。作成できるトリガーは schedule のみ(API/GitHub は Web)。
  • API は起動専用: list/create/update/delete の CRUD API は無い。トークン生成・失効も Web のみ。
  • /fire の正確な仕様: ベース URL https://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 に更新。

検証

  • typecheck / test (77 passed) / staleness schema validation すべて green。

🤖 Generated with Claude Code

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>
@ozzy-3
Copy link
Copy Markdown
Contributor Author

ozzy-3 commented May 24, 2026

🔍 drive review (mode: quick)

適用観点 (5/11):

  • required: correctness, security, conventions
  • ux: usability, documentation

公式 docs(routines / routines-fire API)と突き合わせて検証。

correctness

指摘なし。/fire の URL・ヘッダー・レスポンス形、/schedule list|update|run、beta header の移行猶予(直近 2 バージョン)、trig_ プレフィックスはすべて公式 docs と一致。

security

指摘なし。curl 例の sk-ant-oat01-xxxxx / trig_01ABC... はプレースホルダで実シークレットの混入なし。

conventions

指摘なし。コミット種別 docs(knowledge): は Conventional Commits 準拠。Markdown の見出し・表・コードフェンスはリポ既存スタイルに整合。

usability

指摘なし。「routine(エンティティ)と /schedule(CLI コマンド)」の区別追記により従来の混同を解消。表構成も明快。

documentation

[Info] knowledge/ai/agents/claude-code-routines.md:利用枠
問題: 日次上限の数値(Pro 5 / Max 15 / Team・Enterprise 25)は公式 docs に明示がない参考値。
理由: docs は "see your current consumption at claude.ai/code/routines" としており具体数を示していない。
提案: 既に「変動する参考値」と注記済みのため報告のみ(drive review loop では Info は修正対象外)。

サマリー

Critical: 0 件
Warning: 0 件
Info: 1 件

by_axis:
correctness: C0 W0 I0
security: C0 W0 I0
conventions: C0 W0 I0
usability: C0 W0 I0
documentation: C0 W0 I1

判定: 全適用観点が exit_criteria を満たす → merge-ready

@ozzy-3 ozzy-3 merged commit 8c2397d into main May 24, 2026
3 checks passed
@ozzy-3 ozzy-3 deleted the docs/routines-cli-api branch May 24, 2026 06:47
ozzy-3 added a commit that referenced this pull request May 24, 2026
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant