@aiagentflow/cli 0.7.0 → 0.7.1
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/dist/cli/commands/doctor.d.ts +2 -2
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +157 -27
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +0 -2
- package/dist/cli/commands/plan.d.ts.map +1 -1
- package/dist/cli/commands/plan.js +0 -20
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `aiagentflow doctor` — Health check for providers and setup.
|
|
3
3
|
*
|
|
4
|
-
* Verifies
|
|
5
|
-
*
|
|
4
|
+
* Verifies environment, config, prompt files, agent-provider mapping,
|
|
5
|
+
* and provider connectivity.
|
|
6
6
|
*
|
|
7
7
|
* Dependency direction: doctor.ts → commander, ora, chalk, config module, registry
|
|
8
8
|
* Used by: cli/index.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuIpC,eAAO,MAAM,aAAa,SAmFpB,CAAC"}
|
|
@@ -1,63 +1,193 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `aiagentflow doctor` — Health check for providers and setup.
|
|
3
3
|
*
|
|
4
|
-
* Verifies
|
|
5
|
-
*
|
|
4
|
+
* Verifies environment, config, prompt files, agent-provider mapping,
|
|
5
|
+
* and provider connectivity.
|
|
6
6
|
*
|
|
7
7
|
* Dependency direction: doctor.ts → commander, ora, chalk, config module, registry
|
|
8
8
|
* Used by: cli/index.ts
|
|
9
9
|
*/
|
|
10
10
|
import { Command } from 'commander';
|
|
11
|
+
import { existsSync } from 'node:fs';
|
|
12
|
+
import { execSync } from 'node:child_process';
|
|
11
13
|
import chalk from 'chalk';
|
|
12
14
|
import ora from 'ora';
|
|
13
15
|
import { configExists, loadConfig } from '../../core/config/manager.js';
|
|
16
|
+
import { getPromptsDir, getPoliciesDir } from '../../prompts/library.js';
|
|
14
17
|
import { validateAllProviders } from '../../providers/registry.js';
|
|
18
|
+
import { ALL_AGENT_ROLES } from '../../agents/types.js';
|
|
15
19
|
import { logger } from '../../utils/logger.js';
|
|
20
|
+
function pass(label) {
|
|
21
|
+
return { ok: true, label };
|
|
22
|
+
}
|
|
23
|
+
function fail(label, detail) {
|
|
24
|
+
return { ok: false, label, detail };
|
|
25
|
+
}
|
|
26
|
+
function skip(label) {
|
|
27
|
+
return { ok: true, label: chalk.gray(`- ${label} (skipped)`) };
|
|
28
|
+
}
|
|
29
|
+
function printResult(result) {
|
|
30
|
+
if (result.label.startsWith(chalk.gray('-'))) {
|
|
31
|
+
// Already formatted skip result
|
|
32
|
+
console.log(` ${result.label}`);
|
|
33
|
+
}
|
|
34
|
+
else if (result.ok) {
|
|
35
|
+
console.log(chalk.green(` ✔ ${result.label}`));
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.log(chalk.red(` ✘ ${result.label}`));
|
|
39
|
+
if (result.detail) {
|
|
40
|
+
console.log(chalk.gray(` → ${result.detail}`));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** Check Node.js version meets minimum requirement. */
|
|
45
|
+
function checkNodeVersion() {
|
|
46
|
+
const version = process.versions.node;
|
|
47
|
+
const major = parseInt(version.split('.')[0], 10);
|
|
48
|
+
if (major >= 20) {
|
|
49
|
+
return pass(`Node.js v${version}`);
|
|
50
|
+
}
|
|
51
|
+
return fail(`Node.js v${version}`, 'Requires Node.js >= 20.0.0');
|
|
52
|
+
}
|
|
53
|
+
/** Check if git is available. */
|
|
54
|
+
function checkGit() {
|
|
55
|
+
try {
|
|
56
|
+
const version = execSync('git --version', { encoding: 'utf-8' }).trim();
|
|
57
|
+
return pass(version);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return fail('Git not found', 'Install git for auto-branch and auto-commit features');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** Check if prompt files exist for all agent roles. */
|
|
64
|
+
function checkPromptFiles(projectRoot) {
|
|
65
|
+
const promptsDir = getPromptsDir(projectRoot);
|
|
66
|
+
const results = [];
|
|
67
|
+
if (!existsSync(promptsDir)) {
|
|
68
|
+
results.push(fail('Prompts directory missing', 'Run "aiagentflow init" to generate'));
|
|
69
|
+
return results;
|
|
70
|
+
}
|
|
71
|
+
let allExist = true;
|
|
72
|
+
const missing = [];
|
|
73
|
+
for (const role of ALL_AGENT_ROLES) {
|
|
74
|
+
const filePath = `${promptsDir}/${role}.md`;
|
|
75
|
+
if (!existsSync(filePath)) {
|
|
76
|
+
allExist = false;
|
|
77
|
+
missing.push(role);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (allExist) {
|
|
81
|
+
results.push(pass(`Agent prompts (${ALL_AGENT_ROLES.length}/${ALL_AGENT_ROLES.length})`));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
results.push(fail(`Agent prompts (${ALL_AGENT_ROLES.length - missing.length}/${ALL_AGENT_ROLES.length})`, `Missing: ${missing.join(', ')} — run "aiagentflow init" to regenerate`));
|
|
85
|
+
}
|
|
86
|
+
const policiesDir = getPoliciesDir(projectRoot);
|
|
87
|
+
const standardsPath = `${policiesDir}/coding-standards.md`;
|
|
88
|
+
if (existsSync(standardsPath)) {
|
|
89
|
+
results.push(pass('Coding standards policy'));
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
results.push(fail('Coding standards policy missing', 'Run "aiagentflow init" to generate'));
|
|
93
|
+
}
|
|
94
|
+
return results;
|
|
95
|
+
}
|
|
96
|
+
/** Verify each agent's provider is actually configured. */
|
|
97
|
+
function checkAgentProviderMapping(config) {
|
|
98
|
+
const results = [];
|
|
99
|
+
const configuredProviders = new Set(Object.keys(config.providers).filter((p) => !!config.providers[p]));
|
|
100
|
+
// Ollama is always "configured" (no API key needed)
|
|
101
|
+
configuredProviders.add('ollama');
|
|
102
|
+
for (const role of ALL_AGENT_ROLES) {
|
|
103
|
+
const agentConfig = config.agents[role];
|
|
104
|
+
const provider = agentConfig.provider;
|
|
105
|
+
const model = agentConfig.model;
|
|
106
|
+
if (configuredProviders.has(provider)) {
|
|
107
|
+
results.push(pass(`${role} → ${provider}/${model}`));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
results.push(fail(`${role} → ${provider}/${model}`, `Provider "${provider}" is not configured`));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return results;
|
|
114
|
+
}
|
|
16
115
|
export const doctorCommand = new Command('doctor')
|
|
17
116
|
.description('Check project setup and provider health')
|
|
18
117
|
.action(async () => {
|
|
19
118
|
const projectRoot = process.cwd();
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
119
|
+
let failures = 0;
|
|
120
|
+
// ── Environment ──
|
|
121
|
+
logger.header('Environment');
|
|
122
|
+
const nodeResult = checkNodeVersion();
|
|
123
|
+
const gitResult = checkGit();
|
|
124
|
+
printResult(nodeResult);
|
|
125
|
+
printResult(gitResult);
|
|
126
|
+
if (!nodeResult.ok)
|
|
127
|
+
failures++;
|
|
128
|
+
if (!gitResult.ok)
|
|
129
|
+
failures++;
|
|
130
|
+
// ── Configuration ──
|
|
131
|
+
console.log();
|
|
132
|
+
logger.header('Configuration');
|
|
133
|
+
if (!configExists(projectRoot)) {
|
|
134
|
+
printResult(fail('Configuration file', 'Run "aiagentflow init" first'));
|
|
27
135
|
process.exit(1);
|
|
28
136
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
137
|
+
printResult(pass('Configuration file found'));
|
|
138
|
+
let config;
|
|
139
|
+
try {
|
|
140
|
+
config = loadConfig(projectRoot);
|
|
141
|
+
printResult(pass('Configuration is valid'));
|
|
142
|
+
}
|
|
143
|
+
catch (err) {
|
|
144
|
+
printResult(fail('Configuration is invalid', err instanceof Error ? err.message : String(err)));
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
// ── Prompt Files ──
|
|
148
|
+
console.log();
|
|
149
|
+
logger.header('Prompt Files');
|
|
150
|
+
const promptResults = checkPromptFiles(projectRoot);
|
|
151
|
+
for (const r of promptResults) {
|
|
152
|
+
printResult(r);
|
|
153
|
+
if (!r.ok)
|
|
154
|
+
failures++;
|
|
155
|
+
}
|
|
156
|
+
// ── Agent → Provider Mapping ──
|
|
33
157
|
console.log();
|
|
34
|
-
logger.
|
|
158
|
+
logger.header('Agent Configuration');
|
|
159
|
+
const mappingResults = checkAgentProviderMapping(config);
|
|
160
|
+
for (const r of mappingResults) {
|
|
161
|
+
printResult(r);
|
|
162
|
+
if (!r.ok)
|
|
163
|
+
failures++;
|
|
164
|
+
}
|
|
165
|
+
// ── Provider Connectivity ──
|
|
166
|
+
console.log();
|
|
167
|
+
logger.header('Provider Connectivity');
|
|
35
168
|
const spinner = ora('Testing providers...').start();
|
|
36
169
|
const results = await validateAllProviders(config.providers);
|
|
37
170
|
spinner.stop();
|
|
38
|
-
let allHealthy = true;
|
|
39
171
|
for (const [name, healthy] of Object.entries(results)) {
|
|
172
|
+
const isConfigured = name === 'ollama' || !!config.providers[name];
|
|
40
173
|
if (healthy) {
|
|
41
|
-
|
|
174
|
+
printResult(pass(`${name} — connected`));
|
|
175
|
+
}
|
|
176
|
+
else if (isConfigured) {
|
|
177
|
+
printResult(fail(`${name} — connection failed`));
|
|
178
|
+
failures++;
|
|
42
179
|
}
|
|
43
180
|
else {
|
|
44
|
-
|
|
45
|
-
if (isConfigured) {
|
|
46
|
-
console.log(chalk.red(` ✘ ${name} — connection failed`));
|
|
47
|
-
allHealthy = false;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
console.log(chalk.gray(` - ${name} — not configured (skipped)`));
|
|
51
|
-
}
|
|
181
|
+
printResult(skip(`${name} — not configured`));
|
|
52
182
|
}
|
|
53
183
|
}
|
|
54
|
-
// Summary
|
|
184
|
+
// ── Summary ──
|
|
55
185
|
console.log();
|
|
56
|
-
if (
|
|
186
|
+
if (failures === 0) {
|
|
57
187
|
logger.success('All checks passed! You\'re ready to go.');
|
|
58
188
|
}
|
|
59
189
|
else {
|
|
60
|
-
logger.warn(
|
|
190
|
+
logger.warn(`${failures} check(s) failed. Review the output above.`);
|
|
61
191
|
}
|
|
62
192
|
});
|
|
63
193
|
//# sourceMappingURL=doctor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC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,QAAQ,KAAK,CAAC,EAAE,CAAC;QACjB,MAAM,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC;IAC9D,CAAC;SAAM,CAAC;QACJ,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,4CAA4C,CAAC,CAAC;IACzE,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -9,7 +9,5 @@
|
|
|
9
9
|
* Used by: cli/index.ts
|
|
10
10
|
*/
|
|
11
11
|
import { Command } from 'commander';
|
|
12
|
-
declare const _PLAN_SYSTEM_PROMPT = "You are a task planner. Given reference documents (PRDs, specs, architecture docs), break them down into a list of implementation tasks.\n\n## Rules:\n- Output exactly ONE task per line\n- Each task should be a clear, actionable instruction a developer can execute\n- Tasks should be ordered by dependency (foundational tasks first)\n- Do NOT number the tasks or add bullet points \u2014 just plain text, one per line\n- Do NOT add blank lines between tasks\n- Do NOT add headers, commentary, or explanations \u2014 ONLY task lines\n- Each task should be self-contained enough to pass to an AI coding agent\n\n## Example output:\nCreate the User model with fields: id, email, name, passwordHash, createdAt\nAdd input validation middleware for user registration endpoint\nImplement POST /api/users registration endpoint with bcrypt password hashing\nWrite unit tests for User model validation\nWrite integration tests for registration endpoint";
|
|
13
|
-
export { _PLAN_SYSTEM_PROMPT as PLAN_SYSTEM_PROMPT };
|
|
14
12
|
export declare const planCommand: Command;
|
|
15
13
|
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,WAAW,SAiElB,CAAC"}
|
|
@@ -15,26 +15,6 @@ import { configExists, loadConfig } from '../../core/config/manager.js';
|
|
|
15
15
|
import { loadContextDocuments, formatContextForAgent } from '../../core/workflow/context-loader.js';
|
|
16
16
|
import { createAgent } from '../../agents/factory.js';
|
|
17
17
|
import { logger } from '../../utils/logger.js';
|
|
18
|
-
// TODO: Use this system prompt via agent.execute({ systemPrompt }) once the agent API supports it
|
|
19
|
-
const _PLAN_SYSTEM_PROMPT = `You are a task planner. Given reference documents (PRDs, specs, architecture docs), break them down into a list of implementation tasks.
|
|
20
|
-
|
|
21
|
-
## Rules:
|
|
22
|
-
- Output exactly ONE task per line
|
|
23
|
-
- Each task should be a clear, actionable instruction a developer can execute
|
|
24
|
-
- Tasks should be ordered by dependency (foundational tasks first)
|
|
25
|
-
- Do NOT number the tasks or add bullet points — just plain text, one per line
|
|
26
|
-
- Do NOT add blank lines between tasks
|
|
27
|
-
- Do NOT add headers, commentary, or explanations — ONLY task lines
|
|
28
|
-
- Each task should be self-contained enough to pass to an AI coding agent
|
|
29
|
-
|
|
30
|
-
## Example output:
|
|
31
|
-
Create the User model with fields: id, email, name, passwordHash, createdAt
|
|
32
|
-
Add input validation middleware for user registration endpoint
|
|
33
|
-
Implement POST /api/users registration endpoint with bcrypt password hashing
|
|
34
|
-
Write unit tests for User model validation
|
|
35
|
-
Write integration tests for registration endpoint`;
|
|
36
|
-
// Exported for future use when agent API supports system prompts
|
|
37
|
-
export { _PLAN_SYSTEM_PROMPT as PLAN_SYSTEM_PROMPT };
|
|
38
18
|
export const planCommand = new Command('plan')
|
|
39
19
|
.description('Generate a task list from documentation files')
|
|
40
20
|
.argument('<docs...>', 'Documentation files to analyze (PRDs, specs, etc.)')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;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uC;QACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO;aAC3B,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;aACxB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;aAC/B,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACjB,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;YACzD,MAAM,CAAC,OAAO,CAAC,wBAAwB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;YAEzD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,yDAAyD,OAAO,CAAC,MAAM,SAAS,CAAC,CAAC;QAC1G,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,gBAAgB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACjF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const program = new Command();
|
|
|
17
17
|
program
|
|
18
18
|
.name('aiagentflow')
|
|
19
19
|
.description('AI Engineering Workflow Orchestrator — multi-agent development automation')
|
|
20
|
-
.version('0.1
|
|
20
|
+
.version('0.7.1');
|
|
21
21
|
// Register commands
|
|
22
22
|
program.addCommand(initCommand);
|
|
23
23
|
program.addCommand(configCommand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiagentflow/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "A local-first, CLI-driven multi-agent AI software engineering workflow orchestrator — feed specs, PRDs, and guidelines to auto-generate implementation plans and code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|