@leclabs/agent-toolkit 1.0.0 → 1.1.0
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 +29 -29
- package/bin/setup-agent-toolkit.js +52 -40
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@ The essential Claude Code plugin marketplace for reliable Agent-led workflow orc
|
|
|
8
8
|
|
|
9
9
|
## What's Included
|
|
10
10
|
|
|
11
|
-
| Component
|
|
12
|
-
|
|
13
|
-
| **[Flow Plugin](plugins/flow/)**
|
|
11
|
+
| Component | Description |
|
|
12
|
+
| ------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
13
|
+
| **[Flow Plugin](plugins/flow/)** | DAG-based workflow orchestration for Claude Code |
|
|
14
14
|
| **[Navigator MCP](packages/agent-flow-navigator-mcp/)** | Workflow state machine that navigates agents through DAG-based workflows |
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
@@ -31,13 +31,13 @@ claude plugin install flow@agent-toolkit
|
|
|
31
31
|
|
|
32
32
|
Use prefix commands to create and execute workflow-tracked tasks:
|
|
33
33
|
|
|
34
|
-
| Prefix
|
|
35
|
-
|
|
36
|
-
| `feat:` | feature-development
|
|
37
|
-
| `bug:`
|
|
38
|
-
| `fix:`
|
|
39
|
-
| `test:` | test-coverage
|
|
40
|
-
| `ctx:`
|
|
34
|
+
| Prefix | Workflow | Description |
|
|
35
|
+
| ------- | -------------------- | --------------------------------------------------------------- |
|
|
36
|
+
| `feat:` | feature-development | Full lifecycle: requirements, planning, implementation, testing |
|
|
37
|
+
| `bug:` | bug-fix | Bug workflow: reproduce, investigate, fix, verify |
|
|
38
|
+
| `fix:` | quick-task | Minimal: understand, execute, verify |
|
|
39
|
+
| `test:` | test-coverage | Analyze coverage gaps and write tests |
|
|
40
|
+
| `ctx:` | context-optimization | Optimize agent context and instructions |
|
|
41
41
|
|
|
42
42
|
**Examples:**
|
|
43
43
|
|
|
@@ -76,28 +76,28 @@ Orchestrator (Claude Code)
|
|
|
76
76
|
|
|
77
77
|
## Available Workflows
|
|
78
78
|
|
|
79
|
-
| Workflow
|
|
80
|
-
|
|
81
|
-
| **feature-development**
|
|
82
|
-
| **bug-fix**
|
|
83
|
-
| **agile-task**
|
|
84
|
-
| **quick-task**
|
|
85
|
-
| **test-coverage**
|
|
86
|
-
| **context-optimization** | audit → optimize → validate
|
|
87
|
-
| **ui-reconstruction**
|
|
79
|
+
| Workflow | Steps | Use Case |
|
|
80
|
+
| ------------------------ | ----------------------------------------------------------- | ---------------------------------- |
|
|
81
|
+
| **feature-development** | requirements → planning → implementation → testing → review | New features with full lifecycle |
|
|
82
|
+
| **bug-fix** | reproduce → investigate → fix → verify | Bug fixes with root cause analysis |
|
|
83
|
+
| **agile-task** | understand → implement → verify | Standard development tasks |
|
|
84
|
+
| **quick-task** | understand → execute → verify | Fast, minimal overhead tasks |
|
|
85
|
+
| **test-coverage** | analyze → write-tests → verify | Improving test coverage |
|
|
86
|
+
| **context-optimization** | audit → optimize → validate | Improving agent context |
|
|
87
|
+
| **ui-reconstruction** | analyze → reconstruct → verify | UI/component rebuilding |
|
|
88
88
|
|
|
89
89
|
## Skills Reference
|
|
90
90
|
|
|
91
|
-
| Skill
|
|
92
|
-
|
|
93
|
-
| `/flow:prime`
|
|
94
|
-
| `/flow:task-create`
|
|
95
|
-
| `/flow:run`
|
|
96
|
-
| `/flow:task-list`
|
|
97
|
-
| `/flow:task-get`
|
|
98
|
-
| `/flow:task-advance` | Manually advance a task to next step
|
|
99
|
-
| `/flow:init`
|
|
100
|
-
| `/flow:diagram`
|
|
91
|
+
| Skill | Description |
|
|
92
|
+
| -------------------- | --------------------------------------------------- |
|
|
93
|
+
| `/flow:prime` | Load orchestrator context (invoke at session start) |
|
|
94
|
+
| `/flow:task-create` | Create a new workflow task |
|
|
95
|
+
| `/flow:run` | Execute tasks autonomously with subagent delegation |
|
|
96
|
+
| `/flow:task-list` | List all tasks with status |
|
|
97
|
+
| `/flow:task-get` | Get task details with workflow diagram |
|
|
98
|
+
| `/flow:task-advance` | Manually advance a task to next step |
|
|
99
|
+
| `/flow:init` | Copy workflows to project `.flow/workflows/` |
|
|
100
|
+
| `/flow:diagram` | Generate mermaid diagram for a workflow |
|
|
101
101
|
|
|
102
102
|
## Feature Highlights
|
|
103
103
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { execSync, spawnSync } from
|
|
4
|
-
import fs from
|
|
5
|
-
import path from
|
|
6
|
-
import readline from
|
|
3
|
+
import { execSync, spawnSync } from "child_process";
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import path from "path";
|
|
6
|
+
import readline from "readline";
|
|
7
7
|
|
|
8
|
-
const MARKETPLACE_SOURCE =
|
|
9
|
-
const PLUGIN_NAME =
|
|
8
|
+
const MARKETPLACE_SOURCE = "leclabs/agent-toolkit";
|
|
9
|
+
const PLUGIN_NAME = "flow@agent-toolkit";
|
|
10
10
|
|
|
11
11
|
const args = process.argv.slice(2);
|
|
12
12
|
const flags = {
|
|
13
|
-
yes: args.includes(
|
|
14
|
-
help: args.includes(
|
|
13
|
+
yes: args.includes("--yes") || args.includes("-y"),
|
|
14
|
+
help: args.includes("--help") || args.includes("-h"),
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
function printHelp() {
|
|
@@ -34,13 +34,15 @@ Steps performed:
|
|
|
34
34
|
|
|
35
35
|
function run(cmd) {
|
|
36
36
|
try {
|
|
37
|
-
return execSync(cmd, { encoding:
|
|
38
|
-
} catch {
|
|
37
|
+
return execSync(cmd, { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
38
|
+
} catch {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
function runWithOutput(cmd) {
|
|
42
|
-
const result = spawnSync(
|
|
43
|
-
return { success: result.status === 0, stdout: (result.stdout ||
|
|
44
|
+
const result = spawnSync("sh", ["-c", cmd], { encoding: "utf8" });
|
|
45
|
+
return { success: result.status === 0, stdout: (result.stdout || "").trim(), stderr: (result.stderr || "").trim() };
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
async function prompt(question, defaultValue) {
|
|
@@ -56,31 +58,31 @@ async function prompt(question, defaultValue) {
|
|
|
56
58
|
|
|
57
59
|
async function confirm(question, defaultYes = true) {
|
|
58
60
|
if (flags.yes) return true;
|
|
59
|
-
const answer = await prompt(`${question} ${defaultYes ?
|
|
60
|
-
return answer.toLowerCase().startsWith(
|
|
61
|
+
const answer = await prompt(`${question} ${defaultYes ? "[Y/n]" : "[y/N]"}`, defaultYes ? "y" : "n");
|
|
62
|
+
return answer.toLowerCase().startsWith("y");
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
function checkClaudeCode() {
|
|
64
|
-
console.log(
|
|
65
|
-
const version = run(
|
|
66
|
+
console.log("\nChecking Claude Code CLI...");
|
|
67
|
+
const version = run("claude --version");
|
|
66
68
|
if (!version) {
|
|
67
|
-
console.error(
|
|
68
|
-
console.error(
|
|
69
|
+
console.error(" Error: Claude Code CLI not found.");
|
|
70
|
+
console.error(" Install from: https://claude.ai/code");
|
|
69
71
|
process.exit(1);
|
|
70
72
|
}
|
|
71
73
|
console.log(` Found: ${version}`);
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
function addMarketplace() {
|
|
75
|
-
console.log(
|
|
76
|
-
const list = run(
|
|
77
|
-
if (list.includes(
|
|
78
|
-
console.log(
|
|
77
|
+
console.log("\nAdding agent-toolkit marketplace...");
|
|
78
|
+
const list = run("claude plugin marketplace list") || "";
|
|
79
|
+
if (list.includes("agent-toolkit")) {
|
|
80
|
+
console.log(" Already added.");
|
|
79
81
|
return true;
|
|
80
82
|
}
|
|
81
83
|
const result = runWithOutput(`claude plugin marketplace add ${MARKETPLACE_SOURCE}`);
|
|
82
84
|
if (result.success) {
|
|
83
|
-
console.log(
|
|
85
|
+
console.log(" Added successfully.");
|
|
84
86
|
return true;
|
|
85
87
|
}
|
|
86
88
|
console.error(` Failed: ${result.stderr || result.stdout}`);
|
|
@@ -89,15 +91,15 @@ function addMarketplace() {
|
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
function installPlugin() {
|
|
92
|
-
console.log(
|
|
93
|
-
const list = run(
|
|
94
|
+
console.log("\nInstalling flow plugin...");
|
|
95
|
+
const list = run("claude plugin list") || "";
|
|
94
96
|
if (list.includes(PLUGIN_NAME)) {
|
|
95
|
-
console.log(
|
|
97
|
+
console.log(" Already installed.");
|
|
96
98
|
return true;
|
|
97
99
|
}
|
|
98
100
|
const result = runWithOutput(`claude plugin install ${PLUGIN_NAME} --scope user`);
|
|
99
101
|
if (result.success) {
|
|
100
|
-
console.log(
|
|
102
|
+
console.log(" Installed successfully.");
|
|
101
103
|
return true;
|
|
102
104
|
}
|
|
103
105
|
console.error(` Failed: ${result.stderr || result.stdout}`);
|
|
@@ -106,25 +108,29 @@ function installPlugin() {
|
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
async function configureTaskListId() {
|
|
109
|
-
console.log(
|
|
111
|
+
console.log("\nConfiguring project settings...");
|
|
110
112
|
const cwd = process.cwd();
|
|
111
113
|
const defaultId = path.basename(cwd);
|
|
112
|
-
const taskListId = await prompt(
|
|
114
|
+
const taskListId = await prompt(" Task list ID", defaultId);
|
|
113
115
|
|
|
114
|
-
const claudeDir = path.join(cwd,
|
|
115
|
-
const settingsPath = path.join(claudeDir,
|
|
116
|
+
const claudeDir = path.join(cwd, ".claude");
|
|
117
|
+
const settingsPath = path.join(claudeDir, "settings.local.json");
|
|
116
118
|
|
|
117
119
|
if (!fs.existsSync(claudeDir)) fs.mkdirSync(claudeDir, { recursive: true });
|
|
118
120
|
|
|
119
121
|
let settings = {};
|
|
120
122
|
if (fs.existsSync(settingsPath)) {
|
|
121
|
-
try {
|
|
123
|
+
try {
|
|
124
|
+
settings = JSON.parse(fs.readFileSync(settingsPath, "utf8"));
|
|
125
|
+
} catch {
|
|
126
|
+
// Ignore parse errors, start fresh
|
|
127
|
+
}
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
settings.env = settings.env || {};
|
|
125
131
|
settings.env.CLAUDE_CODE_TASK_LIST_ID = taskListId;
|
|
126
132
|
|
|
127
|
-
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) +
|
|
133
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
|
128
134
|
console.log(` Created: ${settingsPath}`);
|
|
129
135
|
console.log(` CLAUDE_CODE_TASK_LIST_ID: ${taskListId}`);
|
|
130
136
|
return true;
|
|
@@ -144,15 +150,18 @@ Quick prefixes: fix: | feat: | bug:
|
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
async function main() {
|
|
147
|
-
if (flags.help) {
|
|
153
|
+
if (flags.help) {
|
|
154
|
+
printHelp();
|
|
155
|
+
process.exit(0);
|
|
156
|
+
}
|
|
148
157
|
|
|
149
|
-
console.log(
|
|
150
|
-
console.log(
|
|
158
|
+
console.log("Agent Toolkit Setup");
|
|
159
|
+
console.log("===================");
|
|
151
160
|
|
|
152
161
|
checkClaudeCode();
|
|
153
162
|
|
|
154
|
-
if (!await confirm(
|
|
155
|
-
console.log(
|
|
163
|
+
if (!(await confirm("\nProceed with setup?"))) {
|
|
164
|
+
console.log("Setup cancelled.");
|
|
156
165
|
process.exit(0);
|
|
157
166
|
}
|
|
158
167
|
|
|
@@ -163,9 +172,12 @@ async function main() {
|
|
|
163
172
|
if (marketplaceOk && pluginOk && configOk) {
|
|
164
173
|
showSuccess();
|
|
165
174
|
} else {
|
|
166
|
-
console.log(
|
|
175
|
+
console.log("\nSetup completed with errors. Review the messages above.");
|
|
167
176
|
process.exit(1);
|
|
168
177
|
}
|
|
169
178
|
}
|
|
170
179
|
|
|
171
|
-
main().catch((err) => {
|
|
180
|
+
main().catch((err) => {
|
|
181
|
+
console.error("Unexpected error:", err.message);
|
|
182
|
+
process.exit(1);
|
|
183
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leclabs/agent-toolkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The essential Claude Code plugin marketplace for reliable Agent-led workflow orchestration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"test": "npm test --prefix packages/agent-flow-navigator-mcp",
|
|
14
14
|
"lint": "eslint .",
|
|
15
15
|
"format": "prettier --write .",
|
|
16
|
+
"changeset": "changeset",
|
|
17
|
+
"version": "changeset version && node scripts/sync-versions.js",
|
|
18
|
+
"publish:all": "npm publish --access public && npm publish --access public --prefix packages/agent-flow-navigator-mcp",
|
|
16
19
|
"plugin:reinstall": "(claude plugin uninstall flow@agent-toolkit || true) && claude plugin marketplace update agent-toolkit && claude plugin install flow@agent-toolkit"
|
|
17
20
|
},
|
|
18
21
|
"repository": {
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
},
|
|
35
38
|
"homepage": "https://github.com/leclabs/agent-toolkit#readme",
|
|
36
39
|
"devDependencies": {
|
|
40
|
+
"@changesets/cli": "^2.29.8",
|
|
37
41
|
"@eslint/js": "^9.39.2",
|
|
38
42
|
"eslint": "^9.39.2",
|
|
39
43
|
"eslint-config-prettier": "^10.1.8",
|