Amazon Q Developer CLI の実験的機能である「Todo リスト」機能を使ってみた
いわさです。
従来 Amazon Q Developer CLI には Todo リストを管理する機能がなかったのですが、最近追加されています。
todo-list
というビルドインツールが追加されており、さらに/todos
コマンドによって Todo リストの表示や管理・再開が出来るようになっています。
Amazon Q Developer 以外の AI エージェントでも、よく複雑なタスクを要求された時に分析して Todo リストを作成し、タスクごとの確認を行ったり進捗の表示をしてくれる機能があります。
Amazon Q Developer でもこのあたりを良い感じに行ってくれるみたいなので試してみました。
コマンドの確認
本日時点で Amazon Q Developer CLI は v1.17.1 が最新バージョンですが、v1.15.0 のころに/todos
が実装されているみたいです。
ヘルプを確認してみると、/todos
が確認出来ますね。
> /help
q (Amazon Q Chat)
Usage: /<COMMAND>
Commands:
quit Quit the application
clear Clear the conversation history
agent Manage agents
context Manage context files for the chat session
editor Open $EDITOR (defaults to vi) to compose a prompt
reply Open $EDITOR with the most recent assistant message quoted for reply
compact Summarize the conversation to free up context space
tools View tools and permissions
issue Create a new Github issue or make a feature request
changelog View changelog for Amazon Q CLI
prompts View and retrieve prompts
hooks View context hooks
usage Show current session's context window usage
mcp See mcp server loaded
model Select a model for the current conversation session
experiment Toggle experimental features
subscribe Upgrade to a Q Developer Pro subscription for increased query limits
save Save the current conversation
load Load a previous conversation
todos View, manage, and resume to-do lists
help Print this message or the help of the given subcommand(s)
Options:
-h, --help
Print help (see a summary with '-h')
ToDo リストの表示、管理、再開が出来ると説明されています。
/todos
のサブコマンドは以下が用意されていました。
> /todos
View, manage, and resume to-do lists
Usage: /todos <COMMAND>
Commands:
clear-finished Delete all completed to-do lists
resume Resume a selected to-do list
view View a to-do list
delete Delete a to-do list
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
なるほど。Todo リストの作成コマンドが見当たらないですね。
後述しますが、指示を出す際にリスト管理するよう指示することで冒頭紹介したビルドインのtodo-list
ツールが使われ、Todo リストの作成と管理が行われるみたいです。
まず試しに/todos view
を使ってみたところ、次のようにエラーとなりました。
> /todos view
Todo lists are disabled. Enable them with: q settings chat.enableTodoList true
本日時点では、実験的機能という位置付けでデフォルトだと使えないので/experiments
で有効化が必要みたいですね。
「Todo Lists」を有効化しておきましょう。
> /experiment
⚠ Experimental features may be changed or removed at any time
? Select an experiment to toggle ›
Knowledge [OFF] Enables persistent context storage and retrieval across chat sessions (/knowledge)
Thinking [OFF] Enables complex reasoning with step-by-step thought processes
Tangent Mode [OFF] Enables entering into a temporary mode for sending isolated conversations (/tangent)
❯ Todo Lists [OFF] Enables Q to create todo lists that can be viewed and managed using /todos
Checkpoint [OFF] Enables workspace checkpoints to snapshot, list, expand, diff, and restore files (/checkpoint)
Note: Cannot be used in tangent mode (to avoid mixing up conversation history)
Context Usage Indicator [OFF] Shows context usage percentage in the prompt (e.g., [rust-agent] 6% >)
有効化後はこんな感じでコマンドが使えるようになりました。
> /experiment
Todo Lists experiment enabled
> /todos view
No to-do lists to view!
タスクを作成する
Todo リストがまだなかったので作ってみましょう。
/todos
のサブコマンドからは Todo リストの作成は出来なさそうでした。
先ほどお伝えしたとおり、タスク分解を要求するとtodo_list
ツールを使って Amazon Q Developer が Todo リストを作成してくれます。
> タスクを作成してください。新規.NETコンソールアプリケーションを作成します。新規クラスを作成します。メソッドを作成します。メソッド実行時は標準出力にサンプルメッセージを出力するだけです
> 新規.NETコンソールアプリケーションの作成タスクを開始します。
🛠️ Using tool: todo_list (trusted)
⋮
● TODO:
[ ] 新規.NETコンソールアプリケーションプロジェクトを作成
[ ] 新規クラスファイルを作成
[ ] 標準出力にサンプルメッセージを出力するメソッドを実装
[ ] Program.csからメソッドを呼び出す
[ ] アプリケーションをビルドして実行
⋮
● Completed in 0.1s
>
タスクを作成しました。それでは順番に実行していきます。
🛠️ Using tool: execute_bash
⋮
● I will run the following shell command:
dotnet new console -n SampleApp
⋮
↳ Purpose: 新規.NETコンソールアプリケーションプロジェクトを作成
Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:
>
todo_list
使われていますね。
そして Todo リストが作成できたみたいです。
ちょっと進めてみましょう。
> t
The template "Console App" was created successfully.
Processing post-creation actions...
Restoring /Users/iwasa.takahito/work/hoge1005checkpoint/SampleApp/SampleApp.csproj:
Determining projects to restore...
Restored /Users/iwasa.takahito/work/hoge1005checkpoint/SampleApp/SampleApp.csproj (in 40 ms).
Restore succeeded.
⋮
● Completed in 3.95s
🛠️ Using tool: todo_list (trusted)
⋮
● TODO:
[x] 新規.NETコンソールアプリケーションプロジェクトを作成
[ ] 新規クラスファイルを作成
⋮
● Completed in 0.0s
🛠️ Using tool: fs_write
⋮
● Path: SampleApp/SampleClass.cs
+ 1: namespace SampleApp;
+ 2:
+ 3: public class SampleClass
+ 4: {
+ 5: public void PrintMessage()
+ 6: {
+ 7: Console.WriteLine("Hello from SampleClass!");
+ 8: }
+ 9: }
⋮
↳ Purpose: 新規クラスファイルを作成し、サンプルメッセージを出力するメソッドを実装
Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:
>
うまく Todo リストで進捗を更新しながらひとつづつタスクを進めてくれていますね。
ちなみにこの作成された Todo リストはワークスペース内にファイルとして出力されますので、クリアしない限りは永続的に保存されています。
中断したタスクの確認と再開を行ってみたが...
/todos
では作成されたタスクの管理を主に行います。
まずは Todo リストのタスクの詳細を確認してみましょう。
> /todos view
? Select a to-do list to view: ›
✗ .NETコンソールアプリケーションを作成し、新規クラスとメソッドを実装してサンプルメッセージを出力 (1/5)
本来はここで Todo リストの一覧が表示されるので ENTER キーなどで選択できるはずなのですが、なぜか私の環境だとうまく動かない...
> /todos view
? Select a to-do list to view: ›
✗ Create .NET console application with new class and method that outputs sample message (1/5)
✓ Create .NET console app with new class and method that outputs sample message
✗ .NETコンソールアプリケーションを作成し、新規クラスとメソッドを実装してサンプルメッセージを出力 (1/5)
複数の Todo リストがあっても同じでした。
再開などもここから行うのですがこちらも選択できないので機能していなさそうですね。
実験的機能はベータ機能のようなものなのでイシューなどでフィードバックしておきたいと思います。
さいごに
本日 Amazon Q Developer CLI の実験的機能である「Todo リスト機能」を使ってみました。
todo_list
と/todos
と役割が分かれていて、最初使い方がわからずちょっと混乱したのですが、次のドキュメントにこのあたり少し書かれていますのでこのあたりも確認してみてください。