takt 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -38
- package/dist/cli.d.ts +4 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +22 -17
- package/dist/cli.js.map +1 -1
- package/dist/commands/addTask.d.ts.map +1 -1
- package/dist/commands/addTask.js +6 -5
- package/dist/commands/addTask.js.map +1 -1
- package/dist/commands/help.js +3 -3
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/listTasks.d.ts +45 -0
- package/dist/commands/listTasks.d.ts.map +1 -0
- package/dist/commands/{reviewTasks.js → listTasks.js} +93 -73
- package/dist/commands/listTasks.js.map +1 -0
- package/dist/commands/taskExecution.d.ts +7 -5
- package/dist/commands/taskExecution.d.ts.map +1 -1
- package/dist/commands/taskExecution.js +21 -14
- package/dist/commands/taskExecution.js.map +1 -1
- package/dist/commands/workflowExecution.js +3 -3
- package/dist/commands/workflowExecution.js.map +1 -1
- package/dist/config/globalConfig.d.ts.map +1 -1
- package/dist/config/globalConfig.js +4 -0
- package/dist/config/globalConfig.js.map +1 -1
- package/dist/models/schemas.d.ts +1 -0
- package/dist/models/schemas.d.ts.map +1 -1
- package/dist/models/schemas.js +2 -0
- package/dist/models/schemas.js.map +1 -1
- package/dist/models/types.d.ts +2 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +6 -3
- package/dist/resources/index.js.map +1 -1
- package/dist/task/autoCommit.d.ts +9 -6
- package/dist/task/autoCommit.d.ts.map +1 -1
- package/dist/task/autoCommit.js +21 -12
- package/dist/task/autoCommit.js.map +1 -1
- package/dist/task/branchList.d.ts +55 -0
- package/dist/task/branchList.d.ts.map +1 -0
- package/dist/task/branchList.js +131 -0
- package/dist/task/branchList.js.map +1 -0
- package/dist/task/clone.d.ts +53 -0
- package/dist/task/clone.d.ts.map +1 -0
- package/dist/task/clone.js +181 -0
- package/dist/task/clone.js.map +1 -0
- package/dist/task/index.d.ts +3 -2
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task/index.js +3 -2
- package/dist/task/index.js.map +1 -1
- package/dist/task/schema.d.ts +4 -4
- package/dist/task/schema.js +4 -4
- package/dist/task/summarize.d.ts +7 -5
- package/dist/task/summarize.d.ts.map +1 -1
- package/dist/task/summarize.js +62 -29
- package/dist/task/summarize.js.map +1 -1
- package/dist/utils/updateNotifier.d.ts +6 -0
- package/dist/utils/updateNotifier.d.ts.map +1 -0
- package/dist/utils/updateNotifier.js +17 -0
- package/dist/utils/updateNotifier.js.map +1 -0
- package/dist/workflow/engine.d.ts +1 -1
- package/dist/workflow/engine.d.ts.map +1 -1
- package/dist/workflow/engine.js +10 -2
- package/dist/workflow/engine.js.map +1 -1
- package/dist/workflow/instruction-builder.d.ts +2 -2
- package/dist/workflow/instruction-builder.d.ts.map +1 -1
- package/dist/workflow/instruction-builder.js +4 -8
- package/dist/workflow/instruction-builder.js.map +1 -1
- package/package.json +4 -1
- package/resources/global/en/agents/default/{ai-reviewer.md → ai-antipattern-reviewer.md} +22 -1
- package/resources/global/en/agents/default/coder.md +3 -3
- package/resources/global/en/agents/default/planner.md +14 -1
- package/resources/global/en/workflows/default.yaml +6 -1
- package/resources/global/en/workflows/expert-cqrs.yaml +8 -1
- package/resources/global/en/workflows/expert.yaml +8 -1
- package/resources/global/en/workflows/simple.yaml +5 -1
- package/resources/global/ja/agents/default/{ai-reviewer.md → ai-antipattern-reviewer.md} +22 -1
- package/resources/global/ja/agents/default/coder.md +3 -3
- package/resources/global/ja/agents/default/planner.md +14 -1
- package/resources/global/ja/workflows/default.yaml +6 -1
- package/resources/global/ja/workflows/expert-cqrs.yaml +9 -1
- package/resources/global/ja/workflows/expert.yaml +8 -1
- package/resources/global/ja/workflows/simple.yaml +5 -1
- package/resources/project/dotgitignore +10 -0
- package/resources/project/tasks/TASK-FORMAT +37 -0
- package/dist/commands/reviewTasks.d.ts +0 -43
- package/dist/commands/reviewTasks.d.ts.map +0 -1
- package/dist/commands/reviewTasks.js.map +0 -1
- package/dist/task/worktree.d.ts +0 -70
- package/dist/task/worktree.d.ts.map +0 -1
- package/dist/task/worktree.js +0 -221
- package/dist/task/worktree.js.map +0 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ npm install -g takt
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
# Run a task (will prompt for workflow selection and optional
|
|
26
|
+
# Run a task (will prompt for workflow selection and optional isolated clone)
|
|
27
27
|
takt "Add a login feature"
|
|
28
28
|
|
|
29
29
|
# Add a task to the queue
|
|
@@ -35,27 +35,65 @@ takt /run-tasks
|
|
|
35
35
|
# Watch for tasks and auto-execute
|
|
36
36
|
takt /watch
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
takt /
|
|
38
|
+
# List task branches (merge or delete)
|
|
39
|
+
takt /list-tasks
|
|
40
40
|
|
|
41
41
|
# Switch workflow
|
|
42
42
|
takt /switch
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
### What happens when you run a task
|
|
46
|
+
|
|
47
|
+
When you run `takt "Add a login feature"`, TAKT guides you through an interactive flow:
|
|
48
|
+
|
|
49
|
+
**1. Workflow selection**
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Select workflow:
|
|
53
|
+
(↑↓ to move, Enter to select)
|
|
54
|
+
|
|
55
|
+
❯ default (current) (default)
|
|
56
|
+
expert
|
|
57
|
+
expert-cqrs
|
|
58
|
+
magi
|
|
59
|
+
research
|
|
60
|
+
simple
|
|
61
|
+
Cancel
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**2. Isolated clone** (optional)
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
? Create worktree? (y/N)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Choose `y` to run in a `git clone --shared` isolated environment, keeping your working directory clean.
|
|
71
|
+
|
|
72
|
+
**3. Execution** — The selected workflow orchestrates multiple agents to complete the task.
|
|
73
|
+
|
|
74
|
+
### Recommended workflows
|
|
75
|
+
|
|
76
|
+
| Workflow | Best for |
|
|
77
|
+
|----------|----------|
|
|
78
|
+
| `default` | Full development tasks. Used for TAKT's own development. Multi-stage review with fix loops. |
|
|
79
|
+
| `simple` | Lightweight tasks like README updates or small fixes. Reviews without fix loops. |
|
|
80
|
+
| `expert-review` / `expert-cqrs` | Web development projects. Multi-expert review (CQRS, Frontend, Security, QA). |
|
|
81
|
+
| `research` | Research and investigation. Autonomous research without asking questions. |
|
|
82
|
+
| `magi` | Fun deliberation. Three AI personas analyze and vote (Evangelion-inspired). |
|
|
83
|
+
|
|
45
84
|
## Commands
|
|
46
85
|
|
|
47
86
|
| Command | Alias | Description |
|
|
48
87
|
|---------|-------|-------------|
|
|
49
|
-
| `takt "task"` | | Execute task with current workflow (
|
|
50
|
-
| `takt -r "task"` | | Execute task, resuming previous session |
|
|
88
|
+
| `takt "task"` | | Execute task with current workflow (session auto-continued) |
|
|
51
89
|
| `takt /run-tasks` | `/run` | Run all pending tasks from `.takt/tasks/` |
|
|
52
90
|
| `takt /watch` | | Watch `.takt/tasks/` and auto-execute tasks (stays resident) |
|
|
53
91
|
| `takt /add-task` | `/add` | Add a new task interactively (YAML format, multiline supported) |
|
|
54
|
-
| `takt /
|
|
55
|
-
| `takt /switch` | | Switch workflow interactively |
|
|
92
|
+
| `takt /list-tasks` | `/list` | List task branches (try merge, merge & cleanup, or delete) |
|
|
93
|
+
| `takt /switch` | `/sw` | Switch workflow interactively |
|
|
56
94
|
| `takt /clear` | | Clear agent conversation sessions |
|
|
57
95
|
| `takt /refresh-builtin` | | Update builtin agents/workflows to latest version |
|
|
58
|
-
| `takt /config` | |
|
|
96
|
+
| `takt /config` | | Configure permission mode |
|
|
59
97
|
| `takt /help` | | Show help |
|
|
60
98
|
|
|
61
99
|
## Workflows
|
|
@@ -112,6 +150,7 @@ TAKT ships with several built-in workflows:
|
|
|
112
150
|
| `simple` | Simplified version of default: plan → implement → architect review → AI review → supervisor. No intermediate fix steps. |
|
|
113
151
|
| `research` | Research workflow: planner → digger → supervisor. Autonomously researches topics without asking questions. |
|
|
114
152
|
| `expert-review` | Comprehensive review with domain experts: CQRS+ES, Frontend, AI, Security, QA reviews with fix loops. |
|
|
153
|
+
| `expert-cqrs` | Expert review focused on CQRS+ES, Frontend, AI, Security, and QA. Plan → implement → multi-expert review → supervise. |
|
|
115
154
|
| `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. |
|
|
116
155
|
|
|
117
156
|
Switch between workflows with `takt /switch`.
|
|
@@ -185,7 +224,8 @@ Available Codex models:
|
|
|
185
224
|
├── agents.yaml # Custom agent definitions
|
|
186
225
|
├── tasks/ # Pending task files (.yaml, .md)
|
|
187
226
|
├── completed/ # Completed tasks with reports
|
|
188
|
-
├──
|
|
227
|
+
├── worktree-meta/ # Metadata for task branches
|
|
228
|
+
├── worktree-sessions/ # Per-clone agent session storage
|
|
189
229
|
├── reports/ # Execution reports (auto-generated)
|
|
190
230
|
└── logs/ # Session logs (incremental)
|
|
191
231
|
├── latest.json # Pointer to current/latest session
|
|
@@ -217,26 +257,12 @@ trusted_directories:
|
|
|
217
257
|
|
|
218
258
|
## Practical Usage Guide
|
|
219
259
|
|
|
220
|
-
### Resuming Sessions with `-r`
|
|
221
|
-
|
|
222
|
-
When TAKT prompts for additional input during execution (e.g., "Please provide more details"), use the `-r` flag to continue the conversation:
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
# First run - agent might ask for clarification
|
|
226
|
-
takt "Fix the login bug"
|
|
227
|
-
|
|
228
|
-
# Resume the same session to provide the requested information
|
|
229
|
-
takt -r "The bug occurs when the password contains special characters"
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
The `-r` flag preserves the agent's conversation history, allowing for natural back-and-forth interaction.
|
|
233
|
-
|
|
234
260
|
### Interactive Workflow
|
|
235
261
|
|
|
236
262
|
When running `takt "task"`, you are prompted to:
|
|
237
263
|
|
|
238
264
|
1. **Select a workflow** - Choose from available workflows (arrow keys, ESC to cancel)
|
|
239
|
-
2. **Create
|
|
265
|
+
2. **Create an isolated clone** (optional) - Optionally run the task in a `git clone --shared` for isolation
|
|
240
266
|
|
|
241
267
|
This interactive flow ensures each task runs with the right workflow and isolation level.
|
|
242
268
|
|
|
@@ -310,10 +336,10 @@ TAKT supports batch task processing through task files in `.takt/tasks/`. Both `
|
|
|
310
336
|
#### Adding Tasks with `/add-task`
|
|
311
337
|
|
|
312
338
|
```bash
|
|
313
|
-
# Quick add (no
|
|
339
|
+
# Quick add (no isolation)
|
|
314
340
|
takt /add-task "Add authentication feature"
|
|
315
341
|
|
|
316
|
-
# Interactive mode (prompts for
|
|
342
|
+
# Interactive mode (prompts for isolation, branch, workflow options)
|
|
317
343
|
takt /add-task
|
|
318
344
|
```
|
|
319
345
|
|
|
@@ -324,7 +350,7 @@ takt /add-task
|
|
|
324
350
|
```yaml
|
|
325
351
|
# .takt/tasks/add-auth.yaml
|
|
326
352
|
task: "Add authentication feature"
|
|
327
|
-
worktree: true # Run in isolated
|
|
353
|
+
worktree: true # Run in isolated shared clone
|
|
328
354
|
branch: "feat/add-auth" # Branch name (auto-generated if omitted)
|
|
329
355
|
workflow: "default" # Workflow override (uses current if omitted)
|
|
330
356
|
```
|
|
@@ -342,16 +368,18 @@ Requirements:
|
|
|
342
368
|
- Error handling for failed attempts
|
|
343
369
|
```
|
|
344
370
|
|
|
345
|
-
####
|
|
371
|
+
#### Isolated Execution (Shared Clone)
|
|
346
372
|
|
|
347
|
-
YAML task files can specify `worktree` to run each task in an isolated git
|
|
373
|
+
YAML task files can specify `worktree` to run each task in an isolated `git clone --shared`, keeping the main working directory clean:
|
|
348
374
|
|
|
349
|
-
- `worktree: true` - Auto-create
|
|
375
|
+
- `worktree: true` - Auto-create a shared clone in a sibling directory (or `worktree_dir` from config)
|
|
350
376
|
- `worktree: "/path/to/dir"` - Create at specified path
|
|
351
377
|
- `branch: "feat/xxx"` - Use specified branch (auto-generated as `takt/{timestamp}-{slug}` if omitted)
|
|
352
378
|
- Omit `worktree` - Run in current working directory (default)
|
|
353
379
|
|
|
354
|
-
|
|
380
|
+
> **Note**: The YAML field is named `worktree` for backward compatibility. Internally, `git clone --shared` is used instead of `git worktree` because git worktrees have a `.git` file with `gitdir:` that points back to the main repository, causing Claude Code to recognize the main repo as the project root. Shared clones have an independent `.git` directory that avoids this issue.
|
|
381
|
+
|
|
382
|
+
Clones are ephemeral. When a task completes successfully, TAKT automatically commits all changes and pushes the branch to the main repository, then deletes the clone. Use `takt /list-tasks` to list, try-merge, or delete task branches.
|
|
355
383
|
|
|
356
384
|
#### Running Tasks with `/run-tasks`
|
|
357
385
|
|
|
@@ -374,16 +402,17 @@ Watch mode polls `.takt/tasks/` for new task files and auto-executes them as the
|
|
|
374
402
|
- Automated workflows where tasks are added by external processes
|
|
375
403
|
- Long-running development sessions where tasks are queued over time
|
|
376
404
|
|
|
377
|
-
####
|
|
405
|
+
#### Listing Task Branches with `/list-tasks`
|
|
378
406
|
|
|
379
407
|
```bash
|
|
380
|
-
takt /
|
|
408
|
+
takt /list-tasks
|
|
381
409
|
```
|
|
382
410
|
|
|
383
|
-
Lists all `takt/`-prefixed
|
|
384
|
-
- **Try merge** -
|
|
385
|
-
- **
|
|
386
|
-
- **
|
|
411
|
+
Lists all `takt/`-prefixed branches with file change counts. For each branch you can:
|
|
412
|
+
- **Try merge** - Squash merge into main (stage changes without committing)
|
|
413
|
+
- **Instruct** - Give additional instructions via a temporary clone
|
|
414
|
+
- **Merge & cleanup** - Merge and delete the branch
|
|
415
|
+
- **Delete** - Delete the branch without merging
|
|
387
416
|
|
|
388
417
|
### Session Logs
|
|
389
418
|
|
|
@@ -393,7 +422,7 @@ TAKT writes session logs incrementally to `.takt/logs/`. Logs are saved at workf
|
|
|
393
422
|
- `.takt/logs/previous.json` - Pointer to the previous session
|
|
394
423
|
- `.takt/logs/{sessionId}.json` - Full session log with step history
|
|
395
424
|
|
|
396
|
-
Agents can read `previous.json` to pick up context from a prior run
|
|
425
|
+
Agents can read `previous.json` to pick up context from a prior run. Session continuity is automatic — simply run `takt "task"` to continue where the previous session left off.
|
|
397
426
|
|
|
398
427
|
### Workflow Variables
|
|
399
428
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
export interface WorktreeConfirmationResult {
|
|
14
14
|
execCwd: string;
|
|
15
15
|
isWorktree: boolean;
|
|
16
|
+
branch?: string;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
* Ask user whether to create a
|
|
19
|
-
* Returns the execution directory and whether a
|
|
20
|
-
* Task name is summarized to English by AI for use in branch/
|
|
19
|
+
* Ask user whether to create a shared clone, and create one if confirmed.
|
|
20
|
+
* Returns the execution directory and whether a clone was created.
|
|
21
|
+
* Task name is summarized to English by AI for use in branch/clone names.
|
|
21
22
|
*/
|
|
22
23
|
export declare function confirmAndCreateWorktree(cwd: string, task: string): Promise<WorktreeConfirmationResult>;
|
|
23
24
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;AAwCH,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,0BAA0B,CAAC,CAkBrC"}
|
package/dist/cli.js
CHANGED
|
@@ -10,24 +10,29 @@
|
|
|
10
10
|
* takt /help - Show help
|
|
11
11
|
* takt /config - Select permission mode interactively
|
|
12
12
|
*/
|
|
13
|
+
import { createRequire } from 'node:module';
|
|
13
14
|
import { Command } from 'commander';
|
|
14
15
|
import { resolve } from 'node:path';
|
|
15
16
|
import { initGlobalDirs, initProjectDirs, loadGlobalConfig, getEffectiveDebugConfig, } from './config/index.js';
|
|
16
17
|
import { clearAgentSessions, getCurrentWorkflow, isVerboseMode } from './config/paths.js';
|
|
17
18
|
import { info, error, success, setLogLevel } from './utils/ui.js';
|
|
18
19
|
import { initDebugLogger, createLogger, setVerboseConsole } from './utils/debug.js';
|
|
19
|
-
import { executeTask, runAllTasks, showHelp, switchWorkflow, switchConfig, addTask, refreshBuiltin, watchTasks,
|
|
20
|
+
import { executeTask, runAllTasks, showHelp, switchWorkflow, switchConfig, addTask, refreshBuiltin, watchTasks, listTasks, } from './commands/index.js';
|
|
20
21
|
import { listWorkflows } from './config/workflowLoader.js';
|
|
21
22
|
import { selectOptionWithDefault, confirm } from './prompt/index.js';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
23
|
+
import { createSharedClone } from './task/clone.js';
|
|
24
|
+
import { autoCommitAndPush } from './task/autoCommit.js';
|
|
24
25
|
import { summarizeTaskName } from './task/summarize.js';
|
|
25
26
|
import { DEFAULT_WORKFLOW_NAME } from './constants.js';
|
|
27
|
+
import { checkForUpdates } from './utils/updateNotifier.js';
|
|
28
|
+
const require = createRequire(import.meta.url);
|
|
29
|
+
const { version: cliVersion } = require('../package.json');
|
|
26
30
|
const log = createLogger('cli');
|
|
31
|
+
checkForUpdates();
|
|
27
32
|
/**
|
|
28
|
-
* Ask user whether to create a
|
|
29
|
-
* Returns the execution directory and whether a
|
|
30
|
-
* Task name is summarized to English by AI for use in branch/
|
|
33
|
+
* Ask user whether to create a shared clone, and create one if confirmed.
|
|
34
|
+
* Returns the execution directory and whether a clone was created.
|
|
35
|
+
* Task name is summarized to English by AI for use in branch/clone names.
|
|
31
36
|
*/
|
|
32
37
|
export async function confirmAndCreateWorktree(cwd, task) {
|
|
33
38
|
const useWorktree = await confirm('Create worktree?', false);
|
|
@@ -37,18 +42,18 @@ export async function confirmAndCreateWorktree(cwd, task) {
|
|
|
37
42
|
// Summarize task name to English slug using AI
|
|
38
43
|
info('Generating branch name...');
|
|
39
44
|
const taskSlug = await summarizeTaskName(task, { cwd });
|
|
40
|
-
const result =
|
|
45
|
+
const result = createSharedClone(cwd, {
|
|
41
46
|
worktree: true,
|
|
42
47
|
taskSlug,
|
|
43
48
|
});
|
|
44
|
-
info(`
|
|
45
|
-
return { execCwd: result.path, isWorktree: true };
|
|
49
|
+
info(`Clone created: ${result.path} (branch: ${result.branch})`);
|
|
50
|
+
return { execCwd: result.path, isWorktree: true, branch: result.branch };
|
|
46
51
|
}
|
|
47
52
|
const program = new Command();
|
|
48
53
|
program
|
|
49
54
|
.name('takt')
|
|
50
55
|
.description('TAKT: Task Agent Koordination Tool')
|
|
51
|
-
.version(
|
|
56
|
+
.version(cliVersion);
|
|
52
57
|
program
|
|
53
58
|
.argument('[task]', 'Task to execute or slash command')
|
|
54
59
|
.action(async (task) => {
|
|
@@ -75,7 +80,7 @@ program
|
|
|
75
80
|
setLogLevel(config.logLevel);
|
|
76
81
|
}
|
|
77
82
|
log.info('TAKT CLI starting', {
|
|
78
|
-
version:
|
|
83
|
+
version: cliVersion,
|
|
79
84
|
cwd,
|
|
80
85
|
task: task || null,
|
|
81
86
|
verbose,
|
|
@@ -116,13 +121,13 @@ program
|
|
|
116
121
|
case 'watch':
|
|
117
122
|
await watchTasks(cwd);
|
|
118
123
|
return;
|
|
119
|
-
case '
|
|
120
|
-
case '
|
|
121
|
-
await
|
|
124
|
+
case 'list-tasks':
|
|
125
|
+
case 'list':
|
|
126
|
+
await listTasks(cwd);
|
|
122
127
|
return;
|
|
123
128
|
default:
|
|
124
129
|
error(`Unknown command: /${command}`);
|
|
125
|
-
info('Available: /run-tasks (/run), /watch, /add-task (/add), /
|
|
130
|
+
info('Available: /run-tasks (/run), /watch, /add-task (/add), /list-tasks (/list), /switch (/sw), /clear, /refresh-builtin, /help, /config');
|
|
126
131
|
process.exit(1);
|
|
127
132
|
}
|
|
128
133
|
}
|
|
@@ -165,9 +170,9 @@ program
|
|
|
165
170
|
log.info('Starting task execution', { task, workflow: selectedWorkflow, worktree: isWorktree });
|
|
166
171
|
const taskSuccess = await executeTask(task, execCwd, selectedWorkflow, cwd);
|
|
167
172
|
if (taskSuccess && isWorktree) {
|
|
168
|
-
const commitResult =
|
|
173
|
+
const commitResult = autoCommitAndPush(execCwd, task, cwd);
|
|
169
174
|
if (commitResult.success && commitResult.commitHash) {
|
|
170
|
-
success(`Auto-committed: ${commitResult.commitHash}`);
|
|
175
|
+
success(`Auto-committed & pushed: ${commitResult.commitHash}`);
|
|
171
176
|
}
|
|
172
177
|
else if (!commitResult.success) {
|
|
173
178
|
error(`Auto-commit failed: ${commitResult.message}`);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB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E,UAAU,EAAE,GAAG,MAAM,wBAAwB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAE1E,GAAG,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;QAChG,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,CAAC,CAAC;QAE5E,IAAI,WAAW,IAAI,UAAU,EAAE,CAAC;YAC9B,MAAM,YAAY,GAAG,iBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;YAC3D,IAAI,YAAY,CAAC,OAAO,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;gBACpD,OAAO,CAAC,4BAA4B,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC;YACjE,CAAC;iBAAM,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;gBACjC,KAAK,CAAC,uBAAuB,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QAED,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO;IACT,CAAC;IAED,+BAA+B;IAC/B,QAAQ,EAAE,CAAC;AACb,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTask.d.ts","sourceRoot":"","sources":["../../src/commands/addTask.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"addTask.d.ts","sourceRoot":"","sources":["../../src/commands/addTask.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiCH;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwFxE"}
|
package/dist/commands/addTask.js
CHANGED
|
@@ -9,16 +9,17 @@ import * as path from 'node:path';
|
|
|
9
9
|
import { stringify as stringifyYaml } from 'yaml';
|
|
10
10
|
import { promptInput, promptMultilineInput, confirm, selectOption } from '../prompt/index.js';
|
|
11
11
|
import { success, info } from '../utils/ui.js';
|
|
12
|
-
import {
|
|
12
|
+
import { summarizeTaskName } from '../task/summarize.js';
|
|
13
13
|
import { createLogger } from '../utils/debug.js';
|
|
14
14
|
import { listWorkflows } from '../config/workflowLoader.js';
|
|
15
15
|
import { getCurrentWorkflow } from '../config/paths.js';
|
|
16
16
|
const log = createLogger('add-task');
|
|
17
17
|
/**
|
|
18
|
-
* Generate a unique task filename
|
|
18
|
+
* Generate a unique task filename with AI-summarized slug
|
|
19
19
|
*/
|
|
20
|
-
function generateFilename(tasksDir, taskContent) {
|
|
21
|
-
|
|
20
|
+
async function generateFilename(tasksDir, taskContent, cwd) {
|
|
21
|
+
info('Generating task filename...');
|
|
22
|
+
const slug = await summarizeTaskName(taskContent, { cwd });
|
|
22
23
|
const base = slug || 'task';
|
|
23
24
|
let filename = `${base}.yaml`;
|
|
24
25
|
let counter = 1;
|
|
@@ -99,7 +100,7 @@ export async function addTask(cwd, args) {
|
|
|
99
100
|
}
|
|
100
101
|
// Write YAML file (use first line for filename to keep it short)
|
|
101
102
|
const firstLine = taskContent.split('\n')[0] || taskContent;
|
|
102
|
-
const filename = generateFilename(tasksDir, firstLine);
|
|
103
|
+
const filename = await generateFilename(tasksDir, firstLine, cwd);
|
|
103
104
|
const filePath = path.join(tasksDir, filename);
|
|
104
105
|
const yamlContent = stringifyYaml(taskData);
|
|
105
106
|
fs.writeFileSync(filePath, yamlContent, 'utf-8');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTask.js","sourceRoot":"","sources":["../../src/commands/addTask.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,K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|
takt /add-task (/add) Add a new task (interactive, YAML format)
|
|
17
|
-
takt /
|
|
17
|
+
takt /list-tasks (/list) List task branches (merge/delete)
|
|
18
18
|
takt /switch Switch workflow interactively
|
|
19
19
|
takt /clear Clear agent conversation sessions (reset to initial state)
|
|
20
20
|
takt /refresh-builtin Overwrite builtin agents/workflows with latest version
|
|
@@ -27,13 +27,13 @@ Examples:
|
|
|
27
27
|
takt /clear # Clear sessions, start fresh
|
|
28
28
|
takt /watch # Watch & auto-execute tasks
|
|
29
29
|
takt /refresh-builtin # Update builtin resources
|
|
30
|
-
takt /
|
|
30
|
+
takt /list-tasks # List & merge task branches
|
|
31
31
|
takt /switch
|
|
32
32
|
takt /run-tasks
|
|
33
33
|
|
|
34
34
|
Task files (.takt/tasks/):
|
|
35
35
|
.md files Plain text tasks (backward compatible)
|
|
36
|
-
.yaml files Structured tasks with
|
|
36
|
+
.yaml files Structured tasks with isolation/branch/workflow options
|
|
37
37
|
|
|
38
38
|
Configuration (.takt/config.yaml):
|
|
39
39
|
workflow: default # Current workflow
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export { showHelp } from './help.js';
|
|
|
10
10
|
export { withAgentSession } from './session.js';
|
|
11
11
|
export { switchWorkflow } from './workflow.js';
|
|
12
12
|
export { switchConfig, getCurrentPermissionMode, setPermissionMode, type PermissionMode } from './config.js';
|
|
13
|
-
export {
|
|
13
|
+
export { listTasks } from './listTasks.js';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7G,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/commands/index.js
CHANGED
|
@@ -10,5 +10,5 @@ export { showHelp } from './help.js';
|
|
|
10
10
|
export { withAgentSession } from './session.js';
|
|
11
11
|
export { switchWorkflow } from './workflow.js';
|
|
12
12
|
export { switchConfig, getCurrentPermissionMode, setPermissionMode } from './config.js';
|
|
13
|
-
export {
|
|
13
|
+
export { listTasks } from './listTasks.js';
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAA+D,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAuB,MAAM,aAAa,CAAC;AAC7G,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAA+D,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAuB,MAAM,aAAa,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List tasks command
|
|
3
|
+
*
|
|
4
|
+
* Interactive UI for reviewing branch-based task results:
|
|
5
|
+
* try merge, merge & cleanup, or delete actions.
|
|
6
|
+
* Clones are ephemeral — only branches persist between sessions.
|
|
7
|
+
*/
|
|
8
|
+
import { type BranchListItem } from '../task/branchList.js';
|
|
9
|
+
/** Actions available for a listed branch */
|
|
10
|
+
export type ListAction = 'diff' | 'instruct' | 'try' | 'merge' | 'delete';
|
|
11
|
+
/**
|
|
12
|
+
* Check if a branch has already been merged into HEAD.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isBranchMerged(projectDir: string, branch: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Show full diff in an interactive pager (less).
|
|
17
|
+
* Falls back to direct output if pager is unavailable.
|
|
18
|
+
*/
|
|
19
|
+
export declare function showFullDiff(cwd: string, defaultBranch: string, branch: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Try-merge (squash): stage changes from branch without committing.
|
|
22
|
+
* User can inspect staged changes and commit manually if satisfied.
|
|
23
|
+
*/
|
|
24
|
+
export declare function tryMergeBranch(projectDir: string, item: BranchListItem): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Merge & cleanup: if already merged, skip merge and just delete the branch.
|
|
27
|
+
* Otherwise merge first, then delete the branch.
|
|
28
|
+
* No worktree removal needed — clones are ephemeral.
|
|
29
|
+
*/
|
|
30
|
+
export declare function mergeBranch(projectDir: string, item: BranchListItem): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Delete a branch (discard changes).
|
|
33
|
+
* No worktree removal needed — clones are ephemeral.
|
|
34
|
+
*/
|
|
35
|
+
export declare function deleteBranch(projectDir: string, item: BranchListItem): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Instruct branch: create a temp clone, give additional instructions,
|
|
38
|
+
* auto-commit+push, then remove clone.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instructBranch(projectDir: string, item: BranchListItem): Promise<boolean>;
|
|
41
|
+
/**
|
|
42
|
+
* Main entry point: list branch-based tasks interactively.
|
|
43
|
+
*/
|
|
44
|
+
export declare function listTasks(cwd: string): Promise<void>;
|
|
45
|
+
//# sourceMappingURL=listTasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listTasks.d.ts","sourceRoot":"","sources":["../../src/commands/listTasks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAY/B,4CAA4C;AAC5C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE1E;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAW1E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,IAAI,CAYN;AA2CD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAqBhF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAyC7E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAuB9E;AAsED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,OAAO,CAAC,CAsDlB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgF1D"}
|