@ryuenn3123/agentic-senior-core 3.0.14 → 3.0.16
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/.agent-context/prompts/bootstrap-design.md +30 -16
- package/.agent-context/prompts/init-project.md +4 -0
- package/.agent-context/rules/architecture.md +13 -0
- package/.agent-context/rules/docker-runtime.md +12 -0
- package/.agent-context/rules/efficiency-vs-hype.md +17 -6
- package/.agent-context/rules/frontend-architecture.md +5 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.agent-context/state/onboarding-report.json +0 -1
- package/.cursorrules +66 -29
- package/.gemini/instructions.md +1 -1
- package/.github/copilot-instructions.md +1 -1
- package/.instructions.md +4 -3
- package/.windsurfrules +66 -29
- package/AGENTS.md +1 -1
- package/lib/cli/architect.mjs +71 -784
- package/lib/cli/commands/init.mjs +32 -98
- package/lib/cli/commands/optimize.mjs +0 -4
- package/lib/cli/commands/upgrade.mjs +2 -5
- package/lib/cli/compiler.mjs +3 -11
- package/lib/cli/constants.mjs +3 -73
- package/lib/cli/detector/design-evidence.mjs +427 -0
- package/lib/cli/detector.mjs +13 -116
- package/lib/cli/init-options.mjs +0 -118
- package/lib/cli/project-scaffolder/constants.mjs +67 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +554 -0
- package/lib/cli/project-scaffolder/discovery.mjs +315 -0
- package/lib/cli/project-scaffolder/prompt-builders.mjs +196 -0
- package/lib/cli/project-scaffolder/storage.mjs +154 -0
- package/lib/cli/project-scaffolder.mjs +32 -1160
- package/lib/cli/utils.mjs +2 -11
- package/package.json +1 -1
- package/scripts/frontend-usability-audit.mjs +53 -0
- package/scripts/validate/config.mjs +401 -0
- package/scripts/validate/coverage-checks.mjs +429 -0
- package/scripts/validate.mjs +44 -754
- package/lib/cli/init-architecture-flow.mjs +0 -233
- package/lib/cli/profile-packs.mjs +0 -108
package/lib/cli/init-options.mjs
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Init Options Parser — isolates CLI option parsing from init runtime flow.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
ARCHITECT_DEFAULT_TOKEN_BUDGET,
|
|
6
|
-
ARCHITECT_DEFAULT_TIMEOUT_MS,
|
|
7
|
-
ARCHITECT_MIN_TOKEN_BUDGET,
|
|
8
|
-
ARCHITECT_MAX_TOKEN_BUDGET,
|
|
9
|
-
ARCHITECT_MIN_TIMEOUT_MS,
|
|
10
|
-
ARCHITECT_MAX_TIMEOUT_MS,
|
|
11
|
-
} from './architect.mjs';
|
|
12
4
|
import { normalizeDocsLanguage } from './project-scaffolder.mjs';
|
|
13
5
|
import { normalizeAgentName } from './token-optimization.mjs';
|
|
14
6
|
import { normalizeChoiceInput, matchProfileNameFromInput } from './utils.mjs';
|
|
15
7
|
|
|
16
|
-
const INIT_DEFAULT_RESEARCH_MODE = 'realtime';
|
|
17
|
-
|
|
18
8
|
export function normalizeRuntimeEnvironmentKey(rawRuntimeEnvironmentKey) {
|
|
19
9
|
const normalizedRuntimeEnvironmentKey = normalizeChoiceInput(String(rawRuntimeEnvironmentKey || 'auto'));
|
|
20
10
|
const supportedRuntimeEnvironmentKeys = new Set(['auto', 'linux-wsl', 'linux', 'windows', 'macos']);
|
|
@@ -26,7 +16,6 @@ export function parseInitArguments(commandArguments) {
|
|
|
26
16
|
targetDirectory: '.',
|
|
27
17
|
preset: undefined,
|
|
28
18
|
profile: undefined,
|
|
29
|
-
profilePack: undefined,
|
|
30
19
|
stack: undefined,
|
|
31
20
|
blueprint: undefined,
|
|
32
21
|
ci: undefined,
|
|
@@ -40,11 +29,6 @@ export function parseInitArguments(commandArguments) {
|
|
|
40
29
|
docsLangProvided: false,
|
|
41
30
|
projectConfig: undefined,
|
|
42
31
|
projectDescription: '',
|
|
43
|
-
architectTokenBudget: ARCHITECT_DEFAULT_TOKEN_BUDGET,
|
|
44
|
-
architectTimeoutMs: ARCHITECT_DEFAULT_TIMEOUT_MS,
|
|
45
|
-
architectResearchMode: INIT_DEFAULT_RESEARCH_MODE,
|
|
46
|
-
enableRealtimeResearch: true,
|
|
47
|
-
architectRealtimeSignalFile: null,
|
|
48
32
|
runtimeEnv: 'auto',
|
|
49
33
|
runtimeEnvProvided: false,
|
|
50
34
|
};
|
|
@@ -79,17 +63,6 @@ export function parseInitArguments(commandArguments) {
|
|
|
79
63
|
continue;
|
|
80
64
|
}
|
|
81
65
|
|
|
82
|
-
if (currentArgument === '--profile-pack') {
|
|
83
|
-
parsedInitOptions.profilePack = commandArguments[argumentIndex + 1];
|
|
84
|
-
argumentIndex += 1;
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (currentArgument.startsWith('--profile-pack=')) {
|
|
89
|
-
parsedInitOptions.profilePack = currentArgument.split('=')[1];
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
66
|
if (currentArgument === '--stack') {
|
|
94
67
|
parsedInitOptions.stack = commandArguments[argumentIndex + 1];
|
|
95
68
|
argumentIndex += 1;
|
|
@@ -215,76 +188,6 @@ export function parseInitArguments(commandArguments) {
|
|
|
215
188
|
continue;
|
|
216
189
|
}
|
|
217
190
|
|
|
218
|
-
if (currentArgument === '--architect-token-budget') {
|
|
219
|
-
const rawTokenBudget = Number.parseInt(commandArguments[argumentIndex + 1], 10);
|
|
220
|
-
if (Number.isNaN(rawTokenBudget)) {
|
|
221
|
-
throw new Error('--architect-token-budget must be a number');
|
|
222
|
-
}
|
|
223
|
-
parsedInitOptions.architectTokenBudget = rawTokenBudget;
|
|
224
|
-
argumentIndex += 1;
|
|
225
|
-
continue;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
if (currentArgument.startsWith('--architect-token-budget=')) {
|
|
229
|
-
const rawTokenBudget = Number.parseInt(currentArgument.split('=')[1], 10);
|
|
230
|
-
if (Number.isNaN(rawTokenBudget)) {
|
|
231
|
-
throw new Error('--architect-token-budget must be a number');
|
|
232
|
-
}
|
|
233
|
-
parsedInitOptions.architectTokenBudget = rawTokenBudget;
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
if (currentArgument === '--architect-timeout-ms') {
|
|
238
|
-
const rawTimeoutMs = Number.parseInt(commandArguments[argumentIndex + 1], 10);
|
|
239
|
-
if (Number.isNaN(rawTimeoutMs)) {
|
|
240
|
-
throw new Error('--architect-timeout-ms must be a number');
|
|
241
|
-
}
|
|
242
|
-
parsedInitOptions.architectTimeoutMs = rawTimeoutMs;
|
|
243
|
-
argumentIndex += 1;
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (currentArgument.startsWith('--architect-timeout-ms=')) {
|
|
248
|
-
const rawTimeoutMs = Number.parseInt(currentArgument.split('=')[1], 10);
|
|
249
|
-
if (Number.isNaN(rawTimeoutMs)) {
|
|
250
|
-
throw new Error('--architect-timeout-ms must be a number');
|
|
251
|
-
}
|
|
252
|
-
parsedInitOptions.architectTimeoutMs = rawTimeoutMs;
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
if (currentArgument === '--architect-research-mode') {
|
|
257
|
-
parsedInitOptions.architectResearchMode = commandArguments[argumentIndex + 1] || INIT_DEFAULT_RESEARCH_MODE;
|
|
258
|
-
argumentIndex += 1;
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (currentArgument.startsWith('--architect-research-mode=')) {
|
|
263
|
-
parsedInitOptions.architectResearchMode = currentArgument.split('=')[1] || INIT_DEFAULT_RESEARCH_MODE;
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
if (currentArgument === '--enable-realtime-research') {
|
|
268
|
-
parsedInitOptions.enableRealtimeResearch = true;
|
|
269
|
-
continue;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
if (currentArgument === '--disable-realtime-research') {
|
|
273
|
-
parsedInitOptions.enableRealtimeResearch = false;
|
|
274
|
-
continue;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if (currentArgument === '--architect-realtime-signal-file') {
|
|
278
|
-
parsedInitOptions.architectRealtimeSignalFile = commandArguments[argumentIndex + 1] || null;
|
|
279
|
-
argumentIndex += 1;
|
|
280
|
-
continue;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
if (currentArgument.startsWith('--architect-realtime-signal-file=')) {
|
|
284
|
-
parsedInitOptions.architectRealtimeSignalFile = currentArgument.split('=')[1] || null;
|
|
285
|
-
continue;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
191
|
if (currentArgument === '--runtime-env') {
|
|
289
192
|
parsedInitOptions.runtimeEnv = commandArguments[argumentIndex + 1] || 'auto';
|
|
290
193
|
parsedInitOptions.runtimeEnvProvided = true;
|
|
@@ -315,30 +218,9 @@ export function parseInitArguments(commandArguments) {
|
|
|
315
218
|
throw new Error('--runtime-env must be one of: auto, linux-wsl, linux, windows, macos');
|
|
316
219
|
}
|
|
317
220
|
|
|
318
|
-
if (!Number.isInteger(parsedInitOptions.architectTokenBudget)
|
|
319
|
-
|| parsedInitOptions.architectTokenBudget < ARCHITECT_MIN_TOKEN_BUDGET
|
|
320
|
-
|| parsedInitOptions.architectTokenBudget > ARCHITECT_MAX_TOKEN_BUDGET) {
|
|
321
|
-
throw new Error(`--architect-token-budget must be an integer between ${ARCHITECT_MIN_TOKEN_BUDGET} and ${ARCHITECT_MAX_TOKEN_BUDGET}`);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
if (!Number.isInteger(parsedInitOptions.architectTimeoutMs)
|
|
325
|
-
|| parsedInitOptions.architectTimeoutMs < ARCHITECT_MIN_TIMEOUT_MS
|
|
326
|
-
|| parsedInitOptions.architectTimeoutMs > ARCHITECT_MAX_TIMEOUT_MS) {
|
|
327
|
-
throw new Error(`--architect-timeout-ms must be an integer between ${ARCHITECT_MIN_TIMEOUT_MS} and ${ARCHITECT_MAX_TIMEOUT_MS}`);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
const normalizedArchitectResearchMode = normalizeChoiceInput(
|
|
331
|
-
parsedInitOptions.architectResearchMode || INIT_DEFAULT_RESEARCH_MODE
|
|
332
|
-
);
|
|
333
|
-
const supportedArchitectResearchModes = new Set(['snapshot', 'realtime']);
|
|
334
|
-
if (!supportedArchitectResearchModes.has(normalizedArchitectResearchMode)) {
|
|
335
|
-
throw new Error('--architect-research-mode must be one of: snapshot, realtime');
|
|
336
|
-
}
|
|
337
|
-
|
|
338
221
|
parsedInitOptions.docsLang = normalizedDocsLanguage;
|
|
339
222
|
parsedInitOptions.runtimeEnv = normalizedRuntimeEnvironment;
|
|
340
223
|
parsedInitOptions.tokenAgent = normalizeAgentName(parsedInitOptions.tokenAgent);
|
|
341
|
-
parsedInitOptions.architectResearchMode = normalizedArchitectResearchMode;
|
|
342
224
|
|
|
343
225
|
return parsedInitOptions;
|
|
344
226
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export const SUPPORTED_DOC_LANGUAGES = new Set(['en', 'id']);
|
|
2
|
+
export const PROJECT_DOC_FILE_NAMES = [
|
|
3
|
+
'project-brief.md',
|
|
4
|
+
'architecture-decision-record.md',
|
|
5
|
+
'database-schema.md',
|
|
6
|
+
'api-contract.md',
|
|
7
|
+
'flow-overview.md',
|
|
8
|
+
];
|
|
9
|
+
export const UI_DESIGN_CONTRACT_FILE_NAMES = ['DESIGN.md', 'design-intent.json'];
|
|
10
|
+
|
|
11
|
+
// Legacy project docs may still carry this version header; keep for upgrade staleness checks.
|
|
12
|
+
export const PROJECT_DOC_TEMPLATE_VERSION = '1.2.0';
|
|
13
|
+
export const PROJECT_DOC_SYNTHESIS_PROMPT_VERSION = '2.0.0';
|
|
14
|
+
|
|
15
|
+
export const DOMAIN_CHOICES = [
|
|
16
|
+
'API service',
|
|
17
|
+
'Web application',
|
|
18
|
+
'Mobile app',
|
|
19
|
+
'CLI tool',
|
|
20
|
+
'Library / SDK',
|
|
21
|
+
'Other',
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export const DATABASE_CHOICES = [
|
|
25
|
+
'None (stateless service)',
|
|
26
|
+
'SQL (PostgreSQL, MySQL, SQLite)',
|
|
27
|
+
'NoSQL (MongoDB, Redis, DynamoDB)',
|
|
28
|
+
'Both (SQL primary + cache layer)',
|
|
29
|
+
'Other',
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
export const AUTH_CHOICES = [
|
|
33
|
+
'None (public service)',
|
|
34
|
+
'JWT (stateless token auth)',
|
|
35
|
+
'OAuth 2.0 (third-party login)',
|
|
36
|
+
'Session-based (server-side sessions)',
|
|
37
|
+
'API Key (simple key auth)',
|
|
38
|
+
'Other',
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export const DOCKER_STRATEGY_CHOICES = [
|
|
42
|
+
'No Docker (run services directly)',
|
|
43
|
+
'Docker for development only',
|
|
44
|
+
'Docker for production only',
|
|
45
|
+
'Docker for both development and production',
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
export const ARCHITECTURE_STYLE_CHOICES = [
|
|
49
|
+
'Monolith',
|
|
50
|
+
'Microservice / distributed system',
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
export const DESIGN_REQUIRED_SECTIONS = [
|
|
54
|
+
'Design Intent and Product Personality',
|
|
55
|
+
'Audience and Use-Context Signals',
|
|
56
|
+
'Visual Direction and Distinctive Moves',
|
|
57
|
+
'Color Science and Semantic Roles',
|
|
58
|
+
'Typographic Engineering and Hierarchy',
|
|
59
|
+
'Spacing, Layout Rhythm, and Density Strategy',
|
|
60
|
+
'Token Architecture and Alias Strategy',
|
|
61
|
+
'Responsive Strategy and Cross-Viewport Adaptation Matrix',
|
|
62
|
+
'Interaction, Motion, and Feedback Rules',
|
|
63
|
+
'Component Language, Morphology, and Shared Patterns',
|
|
64
|
+
'Accessibility Non-Negotiables',
|
|
65
|
+
'Anti-Patterns to Avoid',
|
|
66
|
+
'Implementation Notes for Future UI Tasks',
|
|
67
|
+
];
|