@nexus-framework/cli 0.1.4 → 0.2.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/README.md +133 -40
- package/dist/cli.js +5 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +4 -2
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +47 -8
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/generators/ai-config.d.ts.map +1 -1
- package/dist/generators/ai-config.js +208 -55
- package/dist/generators/ai-config.js.map +1 -1
- package/dist/generators/docs.d.ts +10 -1
- package/dist/generators/docs.d.ts.map +1 -1
- package/dist/generators/docs.js +40 -65
- package/dist/generators/docs.js.map +1 -1
- package/dist/generators/index.d.ts +2 -1
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +49 -7
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/spring-boot.d.ts +12 -0
- package/dist/generators/spring-boot.d.ts.map +1 -0
- package/dist/generators/spring-boot.js +220 -0
- package/dist/generators/spring-boot.js.map +1 -0
- package/dist/generators/structure.d.ts +1 -0
- package/dist/generators/structure.d.ts.map +1 -1
- package/dist/generators/structure.js +90 -24
- package/dist/generators/structure.js.map +1 -1
- package/dist/prompts/adoption.d.ts +35 -0
- package/dist/prompts/adoption.d.ts.map +1 -0
- package/dist/prompts/adoption.js +153 -0
- package/dist/prompts/adoption.js.map +1 -0
- package/dist/prompts/frameworks.d.ts +5 -1
- package/dist/prompts/frameworks.d.ts.map +1 -1
- package/dist/prompts/frameworks.js +48 -0
- package/dist/prompts/frameworks.js.map +1 -1
- package/dist/prompts/index.d.ts +2 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +19 -7
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/persona.d.ts +16 -0
- package/dist/prompts/persona.d.ts.map +1 -0
- package/dist/prompts/persona.js +79 -0
- package/dist/prompts/persona.js.map +1 -0
- package/dist/prompts/project-type.d.ts.map +1 -1
- package/dist/prompts/project-type.js +6 -1
- package/dist/prompts/project-type.js.map +1 -1
- package/dist/types/config.d.ts +31 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +7 -1
- package/dist/types/config.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +4 -2
- package/dist/utils/file-system.js.map +1 -1
- package/dist/utils/logger.d.ts +2 -2
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +49 -36
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/project-detector.d.ts +20 -4
- package/dist/utils/project-detector.d.ts.map +1 -1
- package/dist/utils/project-detector.js +156 -27
- package/dist/utils/project-detector.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NEXUS CLI - Adoption Interview Prompt
|
|
3
|
+
*
|
|
4
|
+
* Before adopting an existing project, we interview the user to gather
|
|
5
|
+
* context that will help AI agents populate the template docs more intelligently.
|
|
6
|
+
*
|
|
7
|
+
* This is the "pre-adoption onboarding" — a brief conversation about:
|
|
8
|
+
* - What the project does (for vision doc)
|
|
9
|
+
* - Architecture type (monolith, microservices, serverless, etc.)
|
|
10
|
+
* - Main tech stack (if we couldn't auto-detect it)
|
|
11
|
+
* - Known pain points or areas needing docs
|
|
12
|
+
* - Whether NEXUS should be local-only or team-shared
|
|
13
|
+
*/
|
|
14
|
+
import type { ProjectInfo } from '../utils/project-detector.js';
|
|
15
|
+
/** User answers from the pre-adoption interview */
|
|
16
|
+
export interface AdoptionContext {
|
|
17
|
+
/** One-sentence description of what the project does */
|
|
18
|
+
projectDescription: string;
|
|
19
|
+
/** Architecture pattern */
|
|
20
|
+
architectureType: 'monolith' | 'microservices' | 'serverless' | 'modular-monolith' | 'other';
|
|
21
|
+
/** Main tech stack (if not auto-detected) */
|
|
22
|
+
techStack: string;
|
|
23
|
+
/** Areas that need documentation or are pain points */
|
|
24
|
+
painPoints: string;
|
|
25
|
+
/** Whether .nexus/ should be gitignored (local-only) */
|
|
26
|
+
localOnly: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Run the pre-adoption interview.
|
|
30
|
+
*
|
|
31
|
+
* @param projectInfo - Detected project information (used for smart defaults)
|
|
32
|
+
* @returns User responses to guide doc generation
|
|
33
|
+
*/
|
|
34
|
+
export declare function promptAdoption(projectInfo: ProjectInfo): Promise<AdoptionContext>;
|
|
35
|
+
//# sourceMappingURL=adoption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adoption.d.ts","sourceRoot":"","sources":["../../src/prompts/adoption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2BAA2B;IAC3B,gBAAgB,EAAE,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,kBAAkB,GAAG,OAAO,CAAC;IAC7F,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAuFvF"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NEXUS CLI - Adoption Interview Prompt
|
|
3
|
+
*
|
|
4
|
+
* Before adopting an existing project, we interview the user to gather
|
|
5
|
+
* context that will help AI agents populate the template docs more intelligently.
|
|
6
|
+
*
|
|
7
|
+
* This is the "pre-adoption onboarding" — a brief conversation about:
|
|
8
|
+
* - What the project does (for vision doc)
|
|
9
|
+
* - Architecture type (monolith, microservices, serverless, etc.)
|
|
10
|
+
* - Main tech stack (if we couldn't auto-detect it)
|
|
11
|
+
* - Known pain points or areas needing docs
|
|
12
|
+
* - Whether NEXUS should be local-only or team-shared
|
|
13
|
+
*/
|
|
14
|
+
import { input, select, confirm } from '@inquirer/prompts';
|
|
15
|
+
/**
|
|
16
|
+
* Run the pre-adoption interview.
|
|
17
|
+
*
|
|
18
|
+
* @param projectInfo - Detected project information (used for smart defaults)
|
|
19
|
+
* @returns User responses to guide doc generation
|
|
20
|
+
*/
|
|
21
|
+
export async function promptAdoption(projectInfo) {
|
|
22
|
+
const displayName = projectInfo.name ?? 'this project';
|
|
23
|
+
console.log('');
|
|
24
|
+
console.log('🔮 Let\'s set up NEXUS for your existing project.');
|
|
25
|
+
console.log(' Answer a few quick questions so AI agents understand your codebase.');
|
|
26
|
+
console.log('');
|
|
27
|
+
// 1. Project description
|
|
28
|
+
const projectDescription = await input({
|
|
29
|
+
message: `What does ${displayName} do? (One sentence for the vision doc)`,
|
|
30
|
+
default: projectInfo.description ?? '',
|
|
31
|
+
validate: (value) => {
|
|
32
|
+
if (value.trim().length < 10) {
|
|
33
|
+
return 'Please provide at least a 10-character description.';
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
// 2. Architecture type
|
|
39
|
+
const architectureType = await select({
|
|
40
|
+
message: 'What\'s the architecture pattern?',
|
|
41
|
+
choices: [
|
|
42
|
+
{
|
|
43
|
+
value: 'monolith',
|
|
44
|
+
name: '🏛️ Monolith',
|
|
45
|
+
description: 'Single codebase, all features in one app',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
value: 'microservices',
|
|
49
|
+
name: '🔗 Microservices',
|
|
50
|
+
description: 'Multiple independent services communicating via APIs',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
value: 'serverless',
|
|
54
|
+
name: '☁️ Serverless',
|
|
55
|
+
description: 'Cloud Functions, Lambda, Vercel Functions, etc.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
value: 'modular-monolith',
|
|
59
|
+
name: '📦 Modular Monolith',
|
|
60
|
+
description: 'Single deployment, organized into independent modules',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
value: 'other',
|
|
64
|
+
name: '🔧 Other',
|
|
65
|
+
description: 'Something else (explain in pain points)',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
default: detectArchitectureType(projectInfo),
|
|
69
|
+
});
|
|
70
|
+
// 3. Tech stack (if we couldn't detect a framework)
|
|
71
|
+
let techStack = projectInfo.framework ?? 'unknown';
|
|
72
|
+
if (techStack === 'unknown' || techStack === 'node') {
|
|
73
|
+
techStack = await input({
|
|
74
|
+
message: 'What\'s the main tech stack? (e.g., "Express + MongoDB", "Go + PostgreSQL")',
|
|
75
|
+
default: buildTechStackGuess(projectInfo),
|
|
76
|
+
validate: (value) => {
|
|
77
|
+
if (value.trim().length < 3) {
|
|
78
|
+
return 'Please provide a valid tech stack description.';
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
// 4. Pain points
|
|
85
|
+
const painPoints = await input({
|
|
86
|
+
message: 'Any known pain points or areas that need better docs? (optional)',
|
|
87
|
+
default: '',
|
|
88
|
+
});
|
|
89
|
+
// 5. Local-only mode
|
|
90
|
+
const localOnly = await confirm({
|
|
91
|
+
message: 'Keep NEXUS local-only? (adds .nexus/ to .gitignore - won\'t be shared with team)',
|
|
92
|
+
default: false,
|
|
93
|
+
});
|
|
94
|
+
return {
|
|
95
|
+
projectDescription: projectDescription.trim(),
|
|
96
|
+
architectureType,
|
|
97
|
+
techStack,
|
|
98
|
+
painPoints: painPoints.trim(),
|
|
99
|
+
localOnly,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/* ──────────────────────────────────────────────────────────────
|
|
103
|
+
* Smart Defaults
|
|
104
|
+
* ────────────────────────────────────────────────────────────── */
|
|
105
|
+
/**
|
|
106
|
+
* Guess architecture type based on detected dependencies.
|
|
107
|
+
*/
|
|
108
|
+
function detectArchitectureType(projectInfo) {
|
|
109
|
+
const deps = projectInfo.dependencies.map((d) => d.toLowerCase());
|
|
110
|
+
if (deps.includes('firebase-functions') ||
|
|
111
|
+
deps.includes('@google-cloud/functions-framework') ||
|
|
112
|
+
deps.includes('aws-lambda') ||
|
|
113
|
+
deps.includes('@vercel/node')) {
|
|
114
|
+
return 'serverless';
|
|
115
|
+
}
|
|
116
|
+
if (deps.some((d) => d.includes('microservice') || d.includes('grpc') || d.includes('rabbitmq'))) {
|
|
117
|
+
return 'microservices';
|
|
118
|
+
}
|
|
119
|
+
return 'monolith';
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Build a tech stack guess from detected dependencies.
|
|
123
|
+
*/
|
|
124
|
+
function buildTechStackGuess(projectInfo) {
|
|
125
|
+
const deps = projectInfo.dependencies;
|
|
126
|
+
const parts = [];
|
|
127
|
+
// Backend framework
|
|
128
|
+
if (deps.includes('express'))
|
|
129
|
+
parts.push('Express');
|
|
130
|
+
if (deps.includes('fastify'))
|
|
131
|
+
parts.push('Fastify');
|
|
132
|
+
if (deps.includes('koa'))
|
|
133
|
+
parts.push('Koa');
|
|
134
|
+
if (deps.includes('hapi'))
|
|
135
|
+
parts.push('Hapi');
|
|
136
|
+
if (deps.includes('nestjs'))
|
|
137
|
+
parts.push('NestJS');
|
|
138
|
+
// Database
|
|
139
|
+
if (deps.includes('mongodb') || deps.includes('mongoose'))
|
|
140
|
+
parts.push('MongoDB');
|
|
141
|
+
if (deps.includes('pg') || deps.includes('postgres'))
|
|
142
|
+
parts.push('PostgreSQL');
|
|
143
|
+
if (deps.includes('mysql') || deps.includes('mysql2'))
|
|
144
|
+
parts.push('MySQL');
|
|
145
|
+
if (deps.includes('prisma'))
|
|
146
|
+
parts.push('Prisma');
|
|
147
|
+
// Frontend
|
|
148
|
+
if (projectInfo.framework && projectInfo.framework !== 'node' && projectInfo.framework !== 'unknown') {
|
|
149
|
+
parts.push(projectInfo.framework);
|
|
150
|
+
}
|
|
151
|
+
return parts.length > 0 ? parts.join(' + ') : 'Node.js';
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=adoption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adoption.js","sourceRoot":"","sources":["../../src/prompts/adoption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAkB3D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,WAAwB;IAC3D,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,IAAI,cAAc,CAAC;IAEvD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,yBAAyB;IACzB,MAAM,kBAAkB,GAAG,MAAM,KAAK,CAAC;QACrC,OAAO,EAAE,aAAa,WAAW,wCAAwC;QACzE,OAAO,EAAE,WAAW,CAAC,WAAW,IAAI,EAAE;QACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;gBAC7B,OAAO,qDAAq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CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC"}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* Asks the user which frontend framework to use.
|
|
5
5
|
* Options are filtered based on project type.
|
|
6
6
|
*/
|
|
7
|
-
import type { FrontendFramework, ProjectType } from '../types/config.js';
|
|
7
|
+
import type { FrontendFramework, ProjectType, BackendFramework } from '../types/config.js';
|
|
8
8
|
export declare function promptFramework(projectType: ProjectType): Promise<FrontendFramework>;
|
|
9
|
+
/**
|
|
10
|
+
* Prompt for backend framework (for API projects)
|
|
11
|
+
*/
|
|
12
|
+
export declare function promptBackendFramework(): Promise<BackendFramework>;
|
|
9
13
|
//# sourceMappingURL=frameworks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworks.d.ts","sourceRoot":"","sources":["../../src/prompts/frameworks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"frameworks.d.ts","sourceRoot":"","sources":["../../src/prompts/frameworks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3F,wBAAsB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAuD1F;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CA0BxE"}
|
|
@@ -10,6 +10,24 @@ export async function promptFramework(projectType) {
|
|
|
10
10
|
// API projects don't need a frontend framework — we return a sentinel
|
|
11
11
|
return 'nextjs'; // will be ignored; backend prompt handles this
|
|
12
12
|
}
|
|
13
|
+
if (projectType === 'ui-library') {
|
|
14
|
+
// UI library projects use React + Vite as the base
|
|
15
|
+
return select({
|
|
16
|
+
message: 'Which UI framework for your component library?',
|
|
17
|
+
choices: [
|
|
18
|
+
{
|
|
19
|
+
value: 'react-vite',
|
|
20
|
+
name: '⚛️ React + Vite + Storybook',
|
|
21
|
+
description: 'Build, document, and publish React component library with Storybook.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: 'sveltekit',
|
|
25
|
+
name: '🔥 Svelte + SvelteKit',
|
|
26
|
+
description: 'Build Svelte component library with SvelteKit for documentation.',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
13
31
|
return select({
|
|
14
32
|
message: 'Which frontend framework?',
|
|
15
33
|
choices: [
|
|
@@ -41,4 +59,34 @@ export async function promptFramework(projectType) {
|
|
|
41
59
|
],
|
|
42
60
|
});
|
|
43
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Prompt for backend framework (for API projects)
|
|
64
|
+
*/
|
|
65
|
+
export async function promptBackendFramework() {
|
|
66
|
+
return select({
|
|
67
|
+
message: 'Which backend framework?',
|
|
68
|
+
choices: [
|
|
69
|
+
{
|
|
70
|
+
value: 'spring-boot',
|
|
71
|
+
name: '☕ Spring Boot',
|
|
72
|
+
description: 'Java/Kotlin enterprise framework with auto-configuration and production-ready features.',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
value: 'express',
|
|
76
|
+
name: '🚂 Express.js',
|
|
77
|
+
description: 'Minimalist Node.js framework. Most popular, highly flexible.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
value: 'fastify',
|
|
81
|
+
name: '⚡ Fastify',
|
|
82
|
+
description: 'Fast Node.js framework with schema validation and TypeScript support.',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
value: 'nestjs',
|
|
86
|
+
name: '🐈 NestJS',
|
|
87
|
+
description: 'TypeScript-first Node.js framework inspired by Angular. Great for large teams.',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
});
|
|
91
|
+
}
|
|
44
92
|
//# sourceMappingURL=frameworks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworks.js","sourceRoot":"","sources":["../../src/prompts/frameworks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,WAAwB;IAC5D,IAAI,WAAW,KAAK,KAAK,EAAE,CAAC;QAC1B,sEAAsE;QACtE,OAAO,QAAQ,CAAC,CAAC,+CAA+C;IAClE,CAAC;IAED,OAAO,MAAM,CAAoB;QAC/B,OAAO,EAAE,2BAA2B;QACpC,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,QAAQ;gBACf,IAAI,EAAE,2BAA2B;gBACjC,WAAW,EAAE,yEAAyE;aACvF;YACD;gBACE,KAAK,EAAE,YAAY;gBACnB,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,uEAAuE;aACrF;YACD;gBACE,KAAK,EAAE,WAAW;gBAClB,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,mEAAmE;aACjF;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,iEAAiE;aAC/E;YACD;gBACE,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,2EAA2E;aACzF;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"frameworks.js","sourceRoot":"","sources":["../../src/prompts/frameworks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,WAAwB;IAC5D,IAAI,WAAW,KAAK,KAAK,EAAE,CAAC;QAC1B,sEAAsE;QACtE,OAAO,QAAQ,CAAC,CAAC,+CAA+C;IAClE,CAAC;IAED,IAAI,WAAW,KAAK,YA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AAE,uEAAuE;aACrF;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,gFAAgF;aAC9F;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { NexusConfig } from '../types/config.js';
|
|
|
11
11
|
* slug ("todo-list-app") automatically for the folder & package.json name.
|
|
12
12
|
*
|
|
13
13
|
* @param initialName - Optional project name passed via CLI argument
|
|
14
|
+
* @param localOnly - Optional flag to set local-only mode (skip prompt)
|
|
14
15
|
*/
|
|
15
|
-
export declare function runPrompts(initialName?: string): Promise<NexusConfig>;
|
|
16
|
+
export declare function runPrompts(initialName?: string, localOnly?: boolean): Promise<NexusConfig>;
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWtD;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAmEhG"}
|
package/dist/prompts/index.js
CHANGED
|
@@ -8,8 +8,9 @@ import { detectPackageManager } from '../utils/package-manager.js';
|
|
|
8
8
|
import { validateProjectName, toSlug, toDisplayName } from '../utils/validator.js';
|
|
9
9
|
import { promptDataStrategy } from './data-strategy.js';
|
|
10
10
|
import { promptFeatures } from './features.js';
|
|
11
|
-
import { promptFramework } from './frameworks.js';
|
|
11
|
+
import { promptFramework, promptBackendFramework } from './frameworks.js';
|
|
12
12
|
import { promptPatterns } from './patterns.js';
|
|
13
|
+
import { promptPersona } from './persona.js';
|
|
13
14
|
import { promptProjectType } from './project-type.js';
|
|
14
15
|
/**
|
|
15
16
|
* Run the full interactive prompt flow and return a complete NexusConfig.
|
|
@@ -18,8 +19,9 @@ import { promptProjectType } from './project-type.js';
|
|
|
18
19
|
* slug ("todo-list-app") automatically for the folder & package.json name.
|
|
19
20
|
*
|
|
20
21
|
* @param initialName - Optional project name passed via CLI argument
|
|
22
|
+
* @param localOnly - Optional flag to set local-only mode (skip prompt)
|
|
21
23
|
*/
|
|
22
|
-
export async function runPrompts(initialName) {
|
|
24
|
+
export async function runPrompts(initialName, localOnly) {
|
|
23
25
|
// 1. Project name (free-text)
|
|
24
26
|
let rawName;
|
|
25
27
|
if (!initialName) {
|
|
@@ -43,14 +45,22 @@ export async function runPrompts(initialName) {
|
|
|
43
45
|
const displayName = toDisplayName(rawName);
|
|
44
46
|
// 2. Project type
|
|
45
47
|
const projectType = await promptProjectType();
|
|
46
|
-
// 3. Data strategy
|
|
47
|
-
const dataStrategy = await promptDataStrategy();
|
|
48
|
-
// 4. Application patterns
|
|
49
|
-
const appPatterns =
|
|
48
|
+
// 3. Data strategy (skip for ui-library)
|
|
49
|
+
const dataStrategy = projectType === 'ui-library' ? 'local-only' : await promptDataStrategy();
|
|
50
|
+
// 4. Application patterns (skip for ui-library and api)
|
|
51
|
+
const appPatterns = (projectType === 'ui-library' || projectType === 'api')
|
|
52
|
+
? []
|
|
53
|
+
: await promptPatterns();
|
|
50
54
|
// 5. Framework
|
|
51
55
|
const frontendFramework = await promptFramework(projectType);
|
|
56
|
+
// 5b. Backend framework (only for API projects)
|
|
57
|
+
const backendFramework = projectType === 'api'
|
|
58
|
+
? await promptBackendFramework()
|
|
59
|
+
: 'none';
|
|
52
60
|
// 6. Features & extras
|
|
53
61
|
const { testFramework, packageManager, git, installDeps } = await promptFeatures();
|
|
62
|
+
// 7. AI agent persona
|
|
63
|
+
const persona = await promptPersona();
|
|
54
64
|
// Assemble config
|
|
55
65
|
const config = {
|
|
56
66
|
projectName,
|
|
@@ -60,11 +70,13 @@ export async function runPrompts(initialName) {
|
|
|
60
70
|
appPatterns,
|
|
61
71
|
frontendFramework,
|
|
62
72
|
backendStrategy: projectType === 'api' ? 'separate' : 'integrated',
|
|
63
|
-
backendFramework
|
|
73
|
+
backendFramework,
|
|
64
74
|
testFramework,
|
|
65
75
|
packageManager: packageManager ?? detectPackageManager(),
|
|
66
76
|
git,
|
|
67
77
|
installDeps,
|
|
78
|
+
persona,
|
|
79
|
+
localOnly,
|
|
68
80
|
};
|
|
69
81
|
return config;
|
|
70
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,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Y,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,kBAAkB,EAAE,CAAC;IAE9F,wDAAwD;IACxD,MAAM,WAAW,GAAG,CAAC,WAAW,KAAK,YAAY,IAAI,WAAW,KAAK,KAAK,CAAC;QACzE,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,MAAM,cAAc,EAAE,CAAC;IAE3B,eAAe;IACf,MAAM,iBAAiB,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,CAAC;IAE7D,gDAAgD;IAChD,MAAM,gBAAgB,GAAG,WAAW,KAAK,KAAK;QAC5C,CAAC,CAAC,MAAM,sBAAsB,EAAE;QAChC,CAAC,CAAC,MAAM,CAAC;IAEX,uBAAuB;IACvB,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,MAAM,cAAc,EAAE,CAAC;IAEnF,sBAAsB;IACtB,MAAM,OAAO,GAAG,MAAM,aAAa,EAAE,CAAC;IAEtC,kBAAkB;IAClB,MAAM,MAAM,GAAgB;QAC1B,WAAW;QACX,WAAW;QACX,WAAW;QACX,YAAY;QACZ,WAAW;QACX,iBAAiB;QACjB,eAAe,EAAE,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY;QAClE,gBAAgB;QAChB,aAAa;QACb,cAAc,EAAE,cAAc,IAAI,oBAAoB,EAAE;QACxD,GAAG;QACH,WAAW;QACX,OAAO;QACP,SAAS;KACV,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NEXUS CLI - Persona Prompt
|
|
3
|
+
*
|
|
4
|
+
* Lets the user configure the personality of AI agents that read
|
|
5
|
+
* the NEXUS instruction files. This makes the AI "feel" like a
|
|
6
|
+
* project-aware teammate rather than a generic assistant.
|
|
7
|
+
*
|
|
8
|
+
* Options:
|
|
9
|
+
* - Tone (professional, friendly, witty, zen, pirate)
|
|
10
|
+
* - Verbosity (concise, balanced, detailed)
|
|
11
|
+
* - Identity (name the AI uses — defaults to "Nexus", user can change it)
|
|
12
|
+
* - Custom directive (freeform personality instruction)
|
|
13
|
+
*/
|
|
14
|
+
import type { NexusPersona } from '../types/config.js';
|
|
15
|
+
export declare function promptPersona(): Promise<NexusPersona>;
|
|
16
|
+
//# sourceMappingURL=persona.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona.d.ts","sourceRoot":"","sources":["../../src/prompts/persona.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlF,wBAAsB,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,CAkE3D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NEXUS CLI - Persona Prompt
|
|
3
|
+
*
|
|
4
|
+
* Lets the user configure the personality of AI agents that read
|
|
5
|
+
* the NEXUS instruction files. This makes the AI "feel" like a
|
|
6
|
+
* project-aware teammate rather than a generic assistant.
|
|
7
|
+
*
|
|
8
|
+
* Options:
|
|
9
|
+
* - Tone (professional, friendly, witty, zen, pirate)
|
|
10
|
+
* - Verbosity (concise, balanced, detailed)
|
|
11
|
+
* - Identity (name the AI uses — defaults to "Nexus", user can change it)
|
|
12
|
+
* - Custom directive (freeform personality instruction)
|
|
13
|
+
*/
|
|
14
|
+
import { select, input } from '@inquirer/prompts';
|
|
15
|
+
import { DEFAULT_PERSONA } from '../types/config.js';
|
|
16
|
+
export async function promptPersona() {
|
|
17
|
+
const tone = await select({
|
|
18
|
+
message: '🎭 What vibe should your AI assistant have?',
|
|
19
|
+
choices: [
|
|
20
|
+
{
|
|
21
|
+
value: 'professional',
|
|
22
|
+
name: '👔 Professional',
|
|
23
|
+
description: 'Straight to the point. Corporate-friendly.',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
value: 'friendly',
|
|
27
|
+
name: '😊 Friendly',
|
|
28
|
+
description: 'Warm and encouraging. Great for solo devs.',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: 'witty',
|
|
32
|
+
name: '🧠 Witty',
|
|
33
|
+
description: 'Clever and playful. Drops the occasional pun.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
value: 'zen',
|
|
37
|
+
name: '🧘 Zen',
|
|
38
|
+
description: 'Calm and minimalist. Code is a garden.',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: 'pirate',
|
|
42
|
+
name: '🏴☠️ Pirate',
|
|
43
|
+
description: 'Arr! Swashbuckling code on the high seas.',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
default: DEFAULT_PERSONA.tone,
|
|
47
|
+
});
|
|
48
|
+
const verbosity = await select({
|
|
49
|
+
message: '📏 How detailed should responses be?',
|
|
50
|
+
choices: [
|
|
51
|
+
{
|
|
52
|
+
value: 'concise',
|
|
53
|
+
name: '⚡ Concise',
|
|
54
|
+
description: 'Short and sweet. Just the essentials.',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
value: 'balanced',
|
|
58
|
+
name: '⚖️ Balanced',
|
|
59
|
+
description: 'Enough detail to understand, not too much to overwhelm.',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: 'detailed',
|
|
63
|
+
name: '📖 Detailed',
|
|
64
|
+
description: 'Thorough explanations. Great for learning.',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
default: DEFAULT_PERSONA.verbosity,
|
|
68
|
+
});
|
|
69
|
+
const identity = await input({
|
|
70
|
+
message: '🤖 Your AI assistant\'s name is "Nexus". Press Enter to keep it, or type a new name:',
|
|
71
|
+
default: DEFAULT_PERSONA.identity,
|
|
72
|
+
});
|
|
73
|
+
const customDirective = await input({
|
|
74
|
+
message: '✨ Any custom personality note? (optional — press Enter to skip)',
|
|
75
|
+
default: '',
|
|
76
|
+
});
|
|
77
|
+
return { tone, verbosity, identity: identity.trim(), customDirective: customDirective.trim() };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=persona.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona.js","sourceRoot":"","sources":["../../src/prompts/persona.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAY;QACnC,OAAO,EAAE,6CAA6C;QACtD,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,cAAc;gBACrB,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,+CAA+C;aAC7D;YACD;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;aACtD;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,2CAA2C;aACzD;SACF;QACD,OAAO,EAAE,eAAe,CAAC,IAAI;KAC9B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,MAAM,CAAiB;QAC7C,OAAO,EAAE,sCAAsC;QAC/C,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,uCAAuC;aACrD;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,yDAAyD;aACvE;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,4CAA4C;aAC1D;SACF;QACD,OAAO,EAAE,eAAe,CAAC,SAAS;KACnC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC;QAC3B,OAAO,EAAE,sFAAsF;QAC/F,OAAO,EAAE,eAAe,CAAC,QAAQ;KAClC,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC;QAClC,OAAO,EAAE,iEAAiE;QAC1E,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;IAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC;AACjG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-type.d.ts","sourceRoot":"","sources":["../../src/prompts/project-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"project-type.d.ts","sourceRoot":"","sources":["../../src/prompts/project-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC,CA0B9D"}
|
|
@@ -16,7 +16,12 @@ export async function promptProjectType() {
|
|
|
16
16
|
{
|
|
17
17
|
value: 'api',
|
|
18
18
|
name: '⚡ API / Backend Service',
|
|
19
|
-
description: 'REST or GraphQL API (Express, Fastify, NestJS)',
|
|
19
|
+
description: 'REST or GraphQL API (Express, Fastify, NestJS, Spring Boot)',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
value: 'ui-library',
|
|
23
|
+
name: '🎨 UI Component Library',
|
|
24
|
+
description: 'Reusable component library with Storybook & documentation',
|
|
20
25
|
},
|
|
21
26
|
{
|
|
22
27
|
value: 'monorepo',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-type.js","sourceRoot":"","sources":["../../src/prompts/project-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,MAAM,CAAc;QACzB,OAAO,EAAE,wBAAwB;QACjC,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,+DAA+D;aAC7E;YACD;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,yBAAyB;gBAC/B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"project-type.js","sourceRoot":"","sources":["../../src/prompts/project-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,MAAM,CAAc;QACzB,OAAO,EAAE,wBAAwB;QACjC,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,+DAA+D;aAC7E;YACD;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,yBAAyB;gBAC/B,WAAW,EAAE,6DAA6D;aAC3E;YACD;gBACE,KAAK,EAAE,YAAY;gBACnB,IAAI,EAAE,yBAAyB;gBAC/B,WAAW,EAAE,2DAA2D;aACzE;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,qCAAqC;aACnD;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Core configuration types used throughout the CLI.
|
|
5
5
|
*/
|
|
6
6
|
/** Supported project types */
|
|
7
|
-
export type ProjectType = 'web' | 'api' | 'monorepo' | 'mobile' | 'desktop';
|
|
7
|
+
export type ProjectType = 'web' | 'api' | 'monorepo' | 'mobile' | 'desktop' | 'ui-library';
|
|
8
8
|
/** Data strategy options */
|
|
9
9
|
export type DataStrategy = 'local-only' | 'local-first' | 'cloud-first' | 'hybrid';
|
|
10
10
|
/** Application pattern flags */
|
|
@@ -12,13 +12,36 @@ export type AppPattern = 'pwa' | 'offline-first' | 'theming' | 'white-label' | '
|
|
|
12
12
|
/** Supported frontend frameworks */
|
|
13
13
|
export type FrontendFramework = 'nextjs' | 'react-vite' | 'sveltekit' | 'nuxt' | 'remix' | 'astro';
|
|
14
14
|
/** Supported backend frameworks */
|
|
15
|
-
export type BackendFramework = 'express' | 'fastify' | 'nestjs' | 'none';
|
|
15
|
+
export type BackendFramework = 'express' | 'fastify' | 'nestjs' | 'spring-boot' | 'none';
|
|
16
16
|
/** Backend strategy options */
|
|
17
17
|
export type BackendStrategy = 'integrated' | 'separate' | 'serverless' | 'baas';
|
|
18
18
|
/** Supported test frameworks */
|
|
19
19
|
export type TestFramework = 'vitest' | 'jest' | 'none';
|
|
20
20
|
/** Supported package managers */
|
|
21
21
|
export type PackageManager = 'npm' | 'yarn' | 'pnpm';
|
|
22
|
+
/** Agent communication tone */
|
|
23
|
+
export type AgentTone = 'professional' | 'friendly' | 'witty' | 'zen' | 'pirate';
|
|
24
|
+
/** Agent communication style */
|
|
25
|
+
export type AgentVerbosity = 'concise' | 'balanced' | 'detailed';
|
|
26
|
+
/**
|
|
27
|
+
* NEXUS Persona — configures how AI agents communicate with the user.
|
|
28
|
+
*
|
|
29
|
+
* When an AI agent reads the NEXUS instructions, it adopts this persona
|
|
30
|
+
* so the user knows the agent is "synced with the NEXUS brain."
|
|
31
|
+
* The agent refers to itself by the chosen identity name and speaks in the chosen tone.
|
|
32
|
+
*/
|
|
33
|
+
export interface NexusPersona {
|
|
34
|
+
/** How the agent speaks — sets the overall vibe */
|
|
35
|
+
tone: AgentTone;
|
|
36
|
+
/** How much detail the agent provides in responses */
|
|
37
|
+
verbosity: AgentVerbosity;
|
|
38
|
+
/** The name the agent uses to refer to itself. Default: "Nexus". Empty string = no custom name. */
|
|
39
|
+
identity: string;
|
|
40
|
+
/** Optional custom directive — freeform personality instruction */
|
|
41
|
+
customDirective: string;
|
|
42
|
+
}
|
|
43
|
+
/** Default persona — friendly, balanced, identifies as Nexus */
|
|
44
|
+
export declare const DEFAULT_PERSONA: NexusPersona;
|
|
22
45
|
/** Full project configuration resolved from user prompts */
|
|
23
46
|
export interface NexusConfig {
|
|
24
47
|
/** Slug used for folder name & package.json name (e.g. "todo-list-app") */
|
|
@@ -35,6 +58,10 @@ export interface NexusConfig {
|
|
|
35
58
|
packageManager: PackageManager;
|
|
36
59
|
git: boolean;
|
|
37
60
|
installDeps: boolean;
|
|
61
|
+
/** AI agent personality — how agents communicate when synced with the NEXUS brain */
|
|
62
|
+
persona: NexusPersona;
|
|
63
|
+
/** Whether .nexus/ should be gitignored (local-only mode) */
|
|
64
|
+
localOnly?: boolean;
|
|
38
65
|
}
|
|
39
66
|
/** Partial config for incremental prompt building */
|
|
40
67
|
export type PartialNexusConfig = Partial<NexusConfig> & {
|
|
@@ -49,5 +76,7 @@ export interface NexusManifest {
|
|
|
49
76
|
version: string;
|
|
50
77
|
name: string;
|
|
51
78
|
};
|
|
79
|
+
/** Whether .nexus/ is gitignored (local-only mode) */
|
|
80
|
+
localOnly?: boolean;
|
|
52
81
|
}
|
|
53
82
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8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|
@@ -3,5 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Core configuration types used throughout the CLI.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
/** Default persona — friendly, balanced, identifies as Nexus */
|
|
7
|
+
export const DEFAULT_PERSONA = {
|
|
8
|
+
tone: 'friendly',
|
|
9
|
+
verbosity: 'balanced',
|
|
10
|
+
identity: 'Nexus',
|
|
11
|
+
customDirective: '',
|
|
12
|
+
};
|
|
7
13
|
//# sourceMappingURL=config.js.map
|
package/dist/types/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkDH,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,OAAO;IACjB,eAAe,EAAE,EAAE;CACpB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type { NexusConfig, NexusManifest, PartialNexusConfig } from './config.js';
|
|
1
|
+
export type { NexusConfig, NexusManifest, PartialNexusConfig, NexusPersona, AgentTone, AgentVerbosity } from './config.js';
|
|
2
|
+
export { DEFAULT_PERSONA } from './config.js';
|
|
2
3
|
export type { AllPromptAnswers } from './prompts.js';
|
|
3
4
|
export type { GeneratedFile, GeneratorResult, TemplateContext } from './templates.js';
|
|
4
5
|
export type { ProjectInfo, ProjectSignals } from '../utils/project-detector.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3H,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtF,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { DEFAULT_PERSONA } from './config.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|