takt

Using director (experimental)

English 日本語 简体中文

Director assigns requests to a manager, checks goal progress, and answers questions within the agreed scope. Manager carries out work in its assigned repository. Each request is assigned to one manager.

Start a conversation

Run this in an interactive terminal:

takt director

The daemon starts if needed and owns the conversation. Closing and reopening the TUI continues it, even when launched from another assigned repository. Previous messages and replies are not redisplayed.

Director is experimental. Behavior, settings, and saved data formats may change without notice. Human and event turns incur provider costs.

Choose a manager

Ask for work, for example, “Add an article listing page to the blog.” Director uses takt_list_managers and the request to select the responsible manager. You do not need to supply a manager ID first. If it cannot choose, for example because two managers match, it presents the candidates and asks for clarification without creating a goal.

For a repository without a manager, supply its absolute Git repository path, for example, “Do this in /work/new-app.” Director uses takt_add_manager, which returns the manager ID and makes it appear in the list even without a goal. Relative paths, missing locations, and non-Git directories are rejected. Director does not search for an alternative repository.

To assign several repositories to one manager, name every absolute path, for example, “Assign /work/frontend and /work/backend to one manager.” Director calls takt_add_manager with repositoryDirectories: ["/work/frontend", "/work/backend"] to prepare one workspace manager. Its list entry shows every repository in assignment. Use repositoryDirectory for a single path. If that repository already has a manager, Director reuses its ID and conversation. Supply only one of the two input fields. A workspace request is rejected if any repository has an active standalone manager.

If any path is relative, missing, non-Git, or duplicated, the entire request is rejected with the affected path and reason. Different paths resolving to the same Git root count as duplicates. No valid subset is created, and repositories under a parent directory are never discovered automatically. Requesting the same set in reversed order returns the saved ID. A set that partially overlaps an existing workspace is rejected without extending its assignment.

Identify the repository when asking for workspace goal lists, goal details, question lists, or question details. Director uses managerId and the repository’s absolute cwd for these reads. Repository-specific messages, including merge instructions, also use takt_tell_manager’s cwd so identical goalId or questionId values in different repositories are kept separate. A cwd outside the assignment is rejected. General messages without a repository target may omit it.

A manager preparation request can specify at most 128 repositories. The daemon can route at most 128 distinct repositories in total, including existing assignments; repositories already routed are counted only once. Requests exceeding either limit are rejected with a reason before saving, leaving workspaces, conversations, project registrations, and manager restoration state unchanged.

Names such as takt_add_manager are tools used by director. As a user, make the request in the conversation.

Confirm the proposal once

Once the manager is selected, director presents a proposal containing the manager, repository, objective, out-of-scope items, acceptance criteria, and constraints. Review it. If changes are needed, describe them in the conversation and review the revised proposal.

In the TUI, leave the input field empty, use ↑↓ to select “Register goal,” and press Enter. The default selection is “Dismiss proposal.” Select it or press Esc to dismiss the proposal. Discussing other requests keeps the proposal pending. Use /clear to reset the conversation session while keeping the proposal.

One human confirmation registers the goal with the selected manager. No second confirmation in manager is required. The goal records director as its creation origin and saves the approved proposal revision. AI text or a message to manager cannot register it without human confirmation.

Confirm through Slack

Configure director Slack in global ~/.takt/config.yaml:

director:
  slack:
    channel_id: C0DIR
    allowed_user_ids: [U0AAA]

Use the same Slack App as manager and invite the bot to the director channel. Set TAKT_SLACK_APP_TOKEN and TAKT_SLACK_BOT_TOKEN in the shell that starts the daemon. Keep tokens out of configuration files. Restart the daemon after changing Slack settings. See the configuration guide for setup.

Proposals also appear in the configured channel. Click “Register goal” to register or “Dismiss proposal” to dismiss. In Japanese these buttons are “登録する” and “登録案を取り下げる.” Confirm the current proposal rather than an older revision.

director.slack.allowed_user_ids applies to messages and director registration and inquiry buttons. A registration click from a user outside the list does not register a goal. The key is required when Slack is configured; an empty list accepts no users’ messages or actions. Manager inquiry operations use the separate manager.slack.allowed_user_ids list.

Replies to permitted users stay in the original thread, and new notifications are grouped by turn. Acceptance and completion are separate: check the registration result. Without director.slack, director neither sends nor receives Slack messages.

Decide who answers questions

Ordinary questions (routine) for goals created through director go to director, such as choosing an implementation method within the agreed scope. Questions for goals started directly in manager initially go to the human.

The following types go to the human even when the goal’s question route is director:

Type What requires a human
permission Granting permission
irreversible An irreversible operation
agreement Changing the agreement
humanTask Work only a person can perform
humanFact Facts only a person knows
unsure A question director is unsure how to answer

When unsure, director uses takt_escalate_goal_question to hand that question to the human as unsure, without changing the whole goal’s route. Human questions arrive directly in the director TUI and configured Slack channel. In the TUI, press Ctrl+R to select and answer a question. On Slack, use its choice buttons or thread. Director does not answer human questions on your behalf.

The answer records human or director in answeredBy, separately from source, which records the transport such as tui, slack, or mcp. Ask to see a goal’s questions and answers: director uses takt_list_goal_questions and takt_get_goal_question to read the history, including human answers.

Delegate to director or return to the human

For a goal started in manager, tell director “Take over this goal” to delegate ordinary questions. This is promotion. Say “I will handle this goal myself” to return questions to the human. Identify the repository and goal so the target is clear.

Director uses takt_set_goal_question_route only in response to a current human instruction. It does not switch based on its own decision or a watcher event. Pending questions are rerouted too, but the six human question types remain human after promotion. The creation origin (creationOrigin) and past answers stay unchanged; questionRoute records the current route.

Delete a finished goal

Press Ctrl+G, select a completed or aborted goal and press D. Check the goal ID and repository path, then select Delete and press Enter. Cancel is selected by default.

Deletion uses the same rules as the Manager goal menu. It removes the goal record, its task records and its saved Manager events. A pending or running task or a reference from an Epic prevents deletion. The Director TUI reports the result and updates the list after deletion succeeds.

Remove a manager (fire)

Explicitly ask, for example, “Remove the blog manager.” Director checks the target and uses takt_fire_manager. It refuses if any assigned goal is neither completed nor aborted, reports the reason, and keeps the manager listed. Paused goals and goals awaiting merge are unfinished too.

On success, the manager disappears from the director list. Its repositories, goal records, branches, and conversations remain. To restore it, supply the same repository’s absolute path and ask for work there. Preparing it again with takt_add_manager returns it to the list. There is no automatic hiding of unused managers or dedicated restore operation.

To restore a workspace manager, supply the same set of repositories. Even in a different order, it returns to the list with the same saved ID, assignment, and conversation.

Limits

Slack messages missed while the daemon is stopped or the PC is asleep are not recovered from channel history. A Slack setup command such as takt director slack init and a bundled director Slack App Manifest are also outside this scope. Create the Slack App using the configuration guide.

Director does not inspect repository contents or run internals, or rewrite repository settings such as main_merge. Managers inspect work details. Director relays a merge request to the responsible manager only on an explicit human instruction and never performs the merge itself. Message acceptance does not mean the merge succeeded. See Managing goals for processing details and restrictions.