project-iris 0.0.12 → 0.0.14
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 +214 -323
- package/bin/cli.js +21 -0
- package/flows/aidlc/README.md +372 -0
- package/flows/aidlc/agents/construction-agent.md +79 -0
- package/flows/aidlc/agents/inception-agent.md +97 -0
- package/flows/aidlc/agents/master-agent.md +61 -0
- package/flows/aidlc/agents/operations-agent.md +89 -0
- package/flows/aidlc/commands/construction-agent.md +63 -0
- package/flows/aidlc/commands/inception-agent.md +55 -0
- package/flows/aidlc/commands/master-agent.md +47 -0
- package/flows/aidlc/commands/operations-agent.md +77 -0
- package/flows/aidlc/context-config.yaml +67 -0
- package/flows/aidlc/memory-bank.yaml +104 -0
- package/flows/aidlc/quick-start.md +322 -0
- package/flows/aidlc/skills/construction/bolt-list.md +163 -0
- package/flows/aidlc/skills/construction/bolt-replan.md +345 -0
- package/flows/aidlc/skills/construction/bolt-start.md +442 -0
- package/flows/aidlc/skills/construction/bolt-status.md +185 -0
- package/flows/aidlc/skills/construction/navigator.md +196 -0
- package/flows/aidlc/skills/inception/bolt-plan.md +372 -0
- package/flows/aidlc/skills/inception/context.md +171 -0
- package/flows/aidlc/skills/inception/intent-create.md +211 -0
- package/flows/aidlc/skills/inception/intent-list.md +124 -0
- package/flows/aidlc/skills/inception/navigator.md +207 -0
- package/flows/aidlc/skills/inception/requirements.md +227 -0
- package/flows/aidlc/skills/inception/review.md +248 -0
- package/flows/aidlc/skills/inception/story-create.md +304 -0
- package/flows/aidlc/skills/inception/units.md +278 -0
- package/flows/aidlc/skills/master/analyze-context.md +239 -0
- package/flows/aidlc/skills/master/answer-question.md +141 -0
- package/flows/aidlc/skills/master/explain-flow.md +158 -0
- package/flows/aidlc/skills/master/project-init.md +281 -0
- package/flows/aidlc/skills/master/route-request.md +126 -0
- package/flows/aidlc/skills/operations/build.md +237 -0
- package/flows/aidlc/skills/operations/deploy.md +259 -0
- package/flows/aidlc/skills/operations/monitor.md +265 -0
- package/flows/aidlc/skills/operations/navigator.md +209 -0
- package/flows/aidlc/skills/operations/verify.md +224 -0
- package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt.md +3 -3
- package/{dist → flows/aidlc}/templates/construction/bolt-types/spike-bolt.md +2 -2
- package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
- package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
- package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
- package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
- package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
- package/flows/aidlc/templates/inception/project/README.md +55 -0
- package/flows/aidlc/templates/standards/catalog.yaml +345 -0
- package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
- package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
- package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
- package/lib/InstallerFactory.js +36 -0
- package/lib/analytics/env-detector.js +92 -0
- package/lib/analytics/index.js +22 -0
- package/lib/analytics/machine-id.js +33 -0
- package/lib/analytics/tracker.js +232 -0
- package/lib/cli-utils.js +342 -0
- package/lib/constants.js +32 -0
- package/lib/installer.js +402 -0
- package/lib/installers/AntigravityInstaller.js +22 -0
- package/lib/installers/ClaudeInstaller.js +85 -0
- package/lib/installers/ClineInstaller.js +21 -0
- package/lib/installers/CodexInstaller.js +21 -0
- package/lib/installers/CopilotInstaller.js +113 -0
- package/lib/installers/CursorInstaller.js +63 -0
- package/lib/installers/GeminiInstaller.js +75 -0
- package/lib/installers/KiroInstaller.js +22 -0
- package/lib/installers/OpenCodeInstaller.js +22 -0
- package/lib/installers/RooInstaller.js +22 -0
- package/lib/installers/ToolInstaller.js +73 -0
- package/lib/installers/WindsurfInstaller.js +22 -0
- package/lib/markdown-validator.ts +175 -0
- package/lib/yaml-validator.ts +99 -0
- package/package.json +105 -32
- package/scripts/artifact-validator.js +594 -0
- package/scripts/bolt-complete.js +606 -0
- package/scripts/status-integrity.js +598 -0
- package/dist/bridge/agent-runner.js +0 -190
- package/dist/bridge/connector-factory.js +0 -31
- package/dist/bridge/connectors/antigravity-connector.js +0 -18
- package/dist/bridge/connectors/cursor-connector.js +0 -31
- package/dist/bridge/connectors/in-process-connector.js +0 -29
- package/dist/bridge/connectors/vscode-connector.js +0 -31
- package/dist/bridge/connectors/windsurf-connector.js +0 -23
- package/dist/bridge/filesystem-connector.js +0 -110
- package/dist/bridge/helper.js +0 -203
- package/dist/bridge/types.js +0 -10
- package/dist/cli.js +0 -40
- package/dist/commands/ask.js +0 -259
- package/dist/commands/bridge.js +0 -88
- package/dist/commands/create.js +0 -25
- package/dist/commands/develop.js +0 -141
- package/dist/commands/doctor.js +0 -102
- package/dist/commands/flow.js +0 -301
- package/dist/commands/framework.js +0 -273
- package/dist/commands/generate.js +0 -59
- package/dist/commands/install.js +0 -100
- package/dist/commands/pack.js +0 -33
- package/dist/commands/phase.js +0 -38
- package/dist/commands/run.js +0 -199
- package/dist/commands/status.js +0 -114
- package/dist/commands/uninstall.js +0 -14
- package/dist/commands/use.js +0 -20
- package/dist/commands/validate.js +0 -102
- package/dist/framework/framework-loader.js +0 -97
- package/dist/framework/framework-paths.js +0 -48
- package/dist/framework/framework-types.js +0 -15
- package/dist/iris/artifact-checker.js +0 -78
- package/dist/iris/artifacts/config.js +0 -68
- package/dist/iris/artifacts/generator.js +0 -88
- package/dist/iris/artifacts/types.js +0 -1
- package/dist/iris/bundle.js +0 -44
- package/dist/iris/doctrine/collector.js +0 -124
- package/dist/iris/fixer.js +0 -149
- package/dist/iris/flows/manifest.js +0 -124
- package/dist/iris/framework-context.js +0 -49
- package/dist/iris/framework-manager.js +0 -215
- package/dist/iris/fs/atomic.js +0 -22
- package/dist/iris/guard.js +0 -38
- package/dist/iris/importers/index.js +0 -9
- package/dist/iris/importers/types.js +0 -8
- package/dist/iris/importers/writer.js +0 -139
- package/dist/iris/include.js +0 -49
- package/dist/iris/installer.js +0 -334
- package/dist/iris/interactive/env.js +0 -21
- package/dist/iris/interactive/intent-interview.js +0 -345
- package/dist/iris/interactive/intent-schema.js +0 -28
- package/dist/iris/interactive/interview-io.js +0 -22
- package/dist/iris/interview/config.js +0 -71
- package/dist/iris/interview/types.js +0 -16
- package/dist/iris/interview/utils.js +0 -38
- package/dist/iris/manifest.js +0 -54
- package/dist/iris/packer.js +0 -325
- package/dist/iris/parsers/unit-parser.js +0 -43
- package/dist/iris/paths.js +0 -18
- package/dist/iris/policy.js +0 -133
- package/dist/iris/proc.js +0 -56
- package/dist/iris/report.js +0 -53
- package/dist/iris/resolver.js +0 -66
- package/dist/iris/router.js +0 -114
- package/dist/iris/routes.js +0 -189
- package/dist/iris/run-state.js +0 -146
- package/dist/iris/state.js +0 -113
- package/dist/iris/templates.js +0 -70
- package/dist/iris/tmp.js +0 -24
- package/dist/iris/uninstaller.js +0 -181
- package/dist/iris/utils/interpolate.js +0 -42
- package/dist/iris/validator.js +0 -391
- package/dist/iris/workflow/config.js +0 -51
- package/dist/iris/workflow/engine.js +0 -129
- package/dist/iris/workflow/steps.js +0 -448
- package/dist/iris/workflow/types.js +0 -1
- package/dist/iris_bundle/frameworks/iris-core/framework.yaml +0 -9
- package/dist/iris_bundle/frameworks/iris-core/memory/memory-bank.yaml +0 -1
- package/dist/iris_bundle/frameworks/iris-core/policy.yaml +0 -7
- package/dist/iris_bundle/frameworks/iris-core/templates/config/memory-bank.yaml +0 -1
- package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/spike-bolt.md +0 -240
- package/dist/lib.js +0 -96
- package/dist/templates/construction/bolt-template.md +0 -226
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +0 -49
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +0 -55
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +0 -67
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +0 -62
- package/dist/templates/construction/bolt-types/ddd-construction-bolt.md +0 -528
- package/dist/templates/construction/bolt-types/simple-construction-bolt.md +0 -347
- package/dist/templates/inception/requirements-template.md +0 -144
- package/dist/templates/inception/stories-template.md +0 -38
- package/dist/templates/inception/story-template.md +0 -147
- package/dist/templates/inception/system-context-template.md +0 -29
- package/dist/templates/inception/unit-brief-template.md +0 -177
- package/dist/templates/inception/units-template.md +0 -52
- package/dist/utils/exit-codes.js +0 -7
- package/dist/utils/logo.js +0 -17
- package/dist/workflows/bolt-execution.js +0 -238
- package/dist/workflows/bolt-plan.js +0 -221
- package/dist/workflows/intent-inception.js +0 -285
- package/dist/workflows/memory-bank-generator.js +0 -180
- package/dist/workflows/reporting.js +0 -74
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/simple-construction-bolt.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/requirements-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/stories-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/story-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/system-context-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/unit-brief-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/units-template.md +0 -0
package/lib/cli-utils.js
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Utilities for OSiris
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const chalk = require('chalk');
|
|
6
|
+
const gradient = require('gradient-string');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
const { THEME_COLORS } = require('./constants');
|
|
10
|
+
|
|
11
|
+
const THEME = THEME_COLORS;
|
|
12
|
+
|
|
13
|
+
// Create gradient for logo
|
|
14
|
+
const logoGradient = gradient([THEME.primary, THEME.secondary]);
|
|
15
|
+
|
|
16
|
+
// Pixel-art style logo (brick blocks with 3D effect)
|
|
17
|
+
const PIXEL_LOGO = `
|
|
18
|
+
██████╗ ███████╗██╗██████╗ ██╗███████╗
|
|
19
|
+
██╔═══██╗██╔════╝██║██╔══██╗██║██╔════╝
|
|
20
|
+
██║ ██║███████╗██║██████╔╝██║███████╗
|
|
21
|
+
██║ ██║╚════██║██║██╔══██╗██║╚════██║
|
|
22
|
+
╚██████╔╝███████║██║██║ ██║██║███████║
|
|
23
|
+
╚═════╝ ╚══════╝╚═╝╚═╝ ╚═╝╚═╝╚══════╝
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
// Theme chalk instances
|
|
27
|
+
const theme = {
|
|
28
|
+
primary: chalk.hex(THEME.primary),
|
|
29
|
+
secondary: chalk.hex(THEME.secondary),
|
|
30
|
+
success: chalk.hex(THEME.success),
|
|
31
|
+
error: chalk.hex(THEME.error),
|
|
32
|
+
warning: chalk.hex(THEME.warning),
|
|
33
|
+
info: chalk.hex(THEME.info),
|
|
34
|
+
dim: chalk.hex(THEME.dim)
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// Box drawing characters (Unicode)
|
|
38
|
+
const BOX = {
|
|
39
|
+
topLeft: '╭',
|
|
40
|
+
topRight: '╮',
|
|
41
|
+
bottomLeft: '╰',
|
|
42
|
+
bottomRight: '╯',
|
|
43
|
+
horizontal: '─',
|
|
44
|
+
vertical: '│',
|
|
45
|
+
heavyHorizontal: '═',
|
|
46
|
+
heavyVertical: '║',
|
|
47
|
+
heavyTopLeft: '╔',
|
|
48
|
+
heavyTopRight: '╗',
|
|
49
|
+
heavyBottomLeft: '╚',
|
|
50
|
+
heavyBottomRight: '╝'
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* CLIUtils -
|
|
55
|
+
*/
|
|
56
|
+
const CLIUtils = {
|
|
57
|
+
/**
|
|
58
|
+
* Get package version
|
|
59
|
+
*/
|
|
60
|
+
getVersion() {
|
|
61
|
+
try {
|
|
62
|
+
const packageJson = require(path.join(__dirname, '..', 'package.json'));
|
|
63
|
+
return packageJson.version || 'Unknown';
|
|
64
|
+
} catch {
|
|
65
|
+
return 'Unknown';
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Get terminal width (capped at 80)
|
|
71
|
+
*/
|
|
72
|
+
getWidth() {
|
|
73
|
+
return Math.min(process.stdout.columns || 80, 80);
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Display the iris logo with ASCII art
|
|
78
|
+
* @param {boolean} clearScreen - Whether to clear screen first
|
|
79
|
+
*/
|
|
80
|
+
async displayLogo(clearScreen = true) {
|
|
81
|
+
if (clearScreen) {
|
|
82
|
+
console.clear();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const version = this.getVersion();
|
|
86
|
+
|
|
87
|
+
console.log('');
|
|
88
|
+
console.log(logoGradient(PIXEL_LOGO));
|
|
89
|
+
|
|
90
|
+
// Tagline with version
|
|
91
|
+
console.log(theme.primary(' Intelligent Repository Intent-driven System') + theme.primary.bold(` v${version}`) + '\n');
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Display the iris logo synchronously with ASCII art
|
|
96
|
+
* @param {boolean} clearScreen - Whether to clear screen first
|
|
97
|
+
*/
|
|
98
|
+
displayLogoSync(clearScreen = true) {
|
|
99
|
+
if (clearScreen) {
|
|
100
|
+
console.clear();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const version = this.getVersion();
|
|
104
|
+
|
|
105
|
+
console.log('');
|
|
106
|
+
console.log(logoGradient(PIXEL_LOGO));
|
|
107
|
+
|
|
108
|
+
// Tagline with version
|
|
109
|
+
console.log(theme.primary(' Intelligent Repository Intent-driven System') + theme.primary.bold(` v${version}`) + '\n');
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Display the iris logo using pixel-art style (alternative/legacy method name)
|
|
114
|
+
* @param {boolean} clearScreen - Whether to clear screen first
|
|
115
|
+
*/
|
|
116
|
+
displayFigletLogo(clearScreen = true) {
|
|
117
|
+
if (clearScreen) {
|
|
118
|
+
console.clear();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const version = this.getVersion();
|
|
122
|
+
|
|
123
|
+
console.log(logoGradient(PIXEL_LOGO));
|
|
124
|
+
console.log(theme.dim(' Intelligent Repository Intent-driven System') + theme.primary.bold(` v${version}`) + '\n');
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Display a section header with separator lines
|
|
129
|
+
* @param {string} title - Section title
|
|
130
|
+
* @param {string} subtitle - Optional subtitle
|
|
131
|
+
*/
|
|
132
|
+
displaySection(title, subtitle = null) {
|
|
133
|
+
const width = this.getWidth();
|
|
134
|
+
const line = BOX.heavyHorizontal.repeat(width);
|
|
135
|
+
|
|
136
|
+
console.log('\n' + theme.primary(line));
|
|
137
|
+
console.log(theme.primary.bold(` ${title}`));
|
|
138
|
+
if (subtitle) {
|
|
139
|
+
console.log(theme.dim(` ${subtitle}`));
|
|
140
|
+
}
|
|
141
|
+
console.log(theme.primary(line) + '\n');
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Display a header (lighter than section)
|
|
146
|
+
* @param {string} title - Header title
|
|
147
|
+
* @param {string} icon - Optional icon prefix
|
|
148
|
+
*/
|
|
149
|
+
displayHeader(title, icon = '') {
|
|
150
|
+
const prefix = icon ? `${icon} ` : '';
|
|
151
|
+
console.log('\n' + theme.primary.bold(`${prefix}${title}`));
|
|
152
|
+
console.log(theme.dim(BOX.horizontal.repeat(title.length + prefix.length)) + '\n');
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Display a boxed message
|
|
157
|
+
* @param {string} content - Box content
|
|
158
|
+
* @param {object} options - Box options
|
|
159
|
+
*/
|
|
160
|
+
displayBox(content, options = {}) {
|
|
161
|
+
const {
|
|
162
|
+
title = null,
|
|
163
|
+
borderColor = 'primary',
|
|
164
|
+
padding = 1,
|
|
165
|
+
width = null
|
|
166
|
+
} = options;
|
|
167
|
+
|
|
168
|
+
const boxWidth = width || Math.min(this.getWidth() - 4, 76);
|
|
169
|
+
const innerWidth = boxWidth - 2;
|
|
170
|
+
const colorFn = theme[borderColor] || theme.primary;
|
|
171
|
+
|
|
172
|
+
// Top border
|
|
173
|
+
let topBorder;
|
|
174
|
+
if (title) {
|
|
175
|
+
const titleStr = ` ${title} `;
|
|
176
|
+
const remainingWidth = boxWidth - titleStr.length - 2;
|
|
177
|
+
const leftPad = Math.floor(remainingWidth / 2);
|
|
178
|
+
const rightPad = remainingWidth - leftPad;
|
|
179
|
+
topBorder = colorFn(BOX.topLeft + BOX.horizontal.repeat(leftPad) + titleStr + BOX.horizontal.repeat(rightPad) + BOX.topRight);
|
|
180
|
+
} else {
|
|
181
|
+
topBorder = colorFn(BOX.topLeft + BOX.horizontal.repeat(boxWidth - 2) + BOX.topRight);
|
|
182
|
+
}
|
|
183
|
+
console.log(topBorder);
|
|
184
|
+
|
|
185
|
+
// Padding top
|
|
186
|
+
for (let i = 0; i < padding; i++) {
|
|
187
|
+
console.log(colorFn(BOX.vertical) + ' '.repeat(innerWidth) + colorFn(BOX.vertical));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Content lines
|
|
191
|
+
const lines = content.split('\n');
|
|
192
|
+
for (const line of lines) {
|
|
193
|
+
const stripped = line.replace(/\u001b\[[0-9;]*m/g, ''); // Strip ANSI codes for length calculation
|
|
194
|
+
const paddedLine = line + ' '.repeat(Math.max(0, innerWidth - stripped.length));
|
|
195
|
+
console.log(colorFn(BOX.vertical) + paddedLine.slice(0, innerWidth) + colorFn(BOX.vertical));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Padding bottom
|
|
199
|
+
for (let i = 0; i < padding; i++) {
|
|
200
|
+
console.log(colorFn(BOX.vertical) + ' '.repeat(innerWidth) + colorFn(BOX.vertical));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Bottom border
|
|
204
|
+
console.log(colorFn(BOX.bottomLeft + BOX.horizontal.repeat(boxWidth - 2) + BOX.bottomRight));
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Display a success message in a green box
|
|
209
|
+
* @param {string} message - Success message
|
|
210
|
+
* @param {string} title - Optional title
|
|
211
|
+
*/
|
|
212
|
+
displaySuccess(message, title = 'Success') {
|
|
213
|
+
console.log('');
|
|
214
|
+
this.displayBox(theme.success(message), {
|
|
215
|
+
title,
|
|
216
|
+
borderColor: 'success',
|
|
217
|
+
padding: 0
|
|
218
|
+
});
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Display an error message in a red box
|
|
223
|
+
* @param {string} message - Error message
|
|
224
|
+
* @param {string} title - Optional title
|
|
225
|
+
*/
|
|
226
|
+
displayError(message, title = 'Error') {
|
|
227
|
+
console.log('');
|
|
228
|
+
this.displayBox(theme.error(message), {
|
|
229
|
+
title,
|
|
230
|
+
borderColor: 'error',
|
|
231
|
+
padding: 0
|
|
232
|
+
});
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Display a warning message in an amber box
|
|
237
|
+
* @param {string} message - Warning message
|
|
238
|
+
* @param {string} title - Optional title
|
|
239
|
+
*/
|
|
240
|
+
displayWarning(message, title = 'Warning') {
|
|
241
|
+
console.log('');
|
|
242
|
+
this.displayBox(theme.warning(message), {
|
|
243
|
+
title,
|
|
244
|
+
borderColor: 'warning',
|
|
245
|
+
padding: 0
|
|
246
|
+
});
|
|
247
|
+
},
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Display an info message in a blue box
|
|
251
|
+
* @param {string} message - Info message
|
|
252
|
+
* @param {string} title - Optional title
|
|
253
|
+
*/
|
|
254
|
+
displayInfo(message, title = 'Info') {
|
|
255
|
+
console.log('');
|
|
256
|
+
this.displayBox(theme.info(message), {
|
|
257
|
+
title,
|
|
258
|
+
borderColor: 'info',
|
|
259
|
+
padding: 0
|
|
260
|
+
});
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Display current step progress
|
|
265
|
+
* @param {number} current - Current step
|
|
266
|
+
* @param {number} total - Total steps
|
|
267
|
+
* @param {string} description - Step description
|
|
268
|
+
*/
|
|
269
|
+
displayStep(current, total, description) {
|
|
270
|
+
const progress = theme.primary.bold(`[${current}/${total}]`);
|
|
271
|
+
console.log(`${progress} ${description}`);
|
|
272
|
+
},
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Display a completion message
|
|
276
|
+
* @param {string} message - Completion message
|
|
277
|
+
*/
|
|
278
|
+
displayComplete(message) {
|
|
279
|
+
this.displaySuccess(message, 'Complete');
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Display a simple status line
|
|
284
|
+
* @param {string} icon - Status icon
|
|
285
|
+
* @param {string} message - Status message
|
|
286
|
+
* @param {string} color - Color name
|
|
287
|
+
*/
|
|
288
|
+
displayStatus(icon, message, color = 'primary') {
|
|
289
|
+
const colorFn = theme[color] || theme.primary;
|
|
290
|
+
console.log(`${colorFn(icon)} ${message}`);
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Display a list of items
|
|
295
|
+
* @param {string[]} items - List items
|
|
296
|
+
* @param {string} bullet - Bullet character
|
|
297
|
+
*/
|
|
298
|
+
displayList(items, bullet = ' -') {
|
|
299
|
+
for (const item of items) {
|
|
300
|
+
console.log(theme.dim(bullet) + ' ' + item);
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Display next steps
|
|
306
|
+
* @param {string[]} steps - Array of step descriptions
|
|
307
|
+
*/
|
|
308
|
+
displayNextSteps(steps) {
|
|
309
|
+
console.log(theme.dim('\nNext steps:'));
|
|
310
|
+
steps.forEach((step, index) => {
|
|
311
|
+
console.log(theme.dim(` ${index + 1}. ${step}`));
|
|
312
|
+
});
|
|
313
|
+
console.log('');
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Display a separator line
|
|
318
|
+
* @param {string} style - 'light' or 'heavy'
|
|
319
|
+
*/
|
|
320
|
+
displaySeparator(style = 'light') {
|
|
321
|
+
const width = this.getWidth();
|
|
322
|
+
const char = style === 'heavy' ? BOX.heavyHorizontal : BOX.horizontal;
|
|
323
|
+
console.log(theme.dim(char.repeat(width)));
|
|
324
|
+
},
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Theme colors for external use
|
|
328
|
+
*/
|
|
329
|
+
theme,
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Logo gradient for external use
|
|
333
|
+
*/
|
|
334
|
+
logoGradient,
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Box characters for external use
|
|
338
|
+
*/
|
|
339
|
+
BOX
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
module.exports = CLIUtils;
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
// Theme Colors (dark red)
|
|
3
|
+
const THEME_COLORS = {
|
|
4
|
+
primary: '#1919b1ff', // Dark brick red
|
|
5
|
+
secondary: '#4078b4ff', // Medium red
|
|
6
|
+
accent: '#d0d32aff', // Coral red
|
|
7
|
+
success: '#22c55e', // Green
|
|
8
|
+
error: '#ef4444', // Red
|
|
9
|
+
warning: '#f59e0b', // Amber
|
|
10
|
+
info: '#3b82f6', // Blue
|
|
11
|
+
dim: '#666666' // Gray shadow (visible on dark/light terminals)
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const FLOWS = {
|
|
15
|
+
aidlc: {
|
|
16
|
+
name: 'AI-DLC',
|
|
17
|
+
description: 'AI-Driven Development Life Cycle - Best for greenfield projects with AI-native development',
|
|
18
|
+
path: 'aidlc'
|
|
19
|
+
},
|
|
20
|
+
agile: {
|
|
21
|
+
name: 'Bmad-Method',
|
|
22
|
+
description: 'Breakthrough Method for Agile AI-Driven Development - Best for large agent orchestration development',
|
|
23
|
+
path: 'bmad',
|
|
24
|
+
disabled: true, // Not implemented yet
|
|
25
|
+
message: '(Coming soon)'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
module.exports = {
|
|
30
|
+
THEME_COLORS,
|
|
31
|
+
FLOWS
|
|
32
|
+
};
|