@ryuenn3123/agentic-senior-core 3.0.15 → 3.0.17

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.
Files changed (39) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +43 -18
  2. package/.agent-context/rules/architecture.md +13 -0
  3. package/.agent-context/rules/frontend-architecture.md +26 -0
  4. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  5. package/.agent-context/state/onboarding-report.json +0 -1
  6. package/.cursorrules +66 -29
  7. package/.gemini/instructions.md +7 -1
  8. package/.github/copilot-instructions.md +7 -1
  9. package/.instructions.md +3 -0
  10. package/.windsurfrules +66 -29
  11. package/AGENTS.md +13 -1
  12. package/lib/cli/architect.mjs +71 -784
  13. package/lib/cli/commands/init.mjs +30 -100
  14. package/lib/cli/commands/optimize.mjs +0 -4
  15. package/lib/cli/commands/upgrade.mjs +2 -5
  16. package/lib/cli/compiler.mjs +1 -11
  17. package/lib/cli/constants.mjs +3 -73
  18. package/lib/cli/detector/design-evidence.mjs +427 -0
  19. package/lib/cli/detector.mjs +13 -116
  20. package/lib/cli/init-options.mjs +0 -118
  21. package/lib/cli/memory-continuity.mjs +2 -1
  22. package/lib/cli/project-scaffolder/constants.mjs +68 -0
  23. package/lib/cli/project-scaffolder/design-contract.mjs +857 -0
  24. package/lib/cli/project-scaffolder/discovery.mjs +315 -0
  25. package/lib/cli/project-scaffolder/prompt-builders.mjs +213 -0
  26. package/lib/cli/project-scaffolder/storage.mjs +154 -0
  27. package/lib/cli/project-scaffolder.mjs +32 -1210
  28. package/lib/cli/utils.mjs +2 -11
  29. package/package.json +1 -1
  30. package/scripts/documentation-boundary-audit.mjs +5 -2
  31. package/scripts/frontend-usability-audit.mjs +76 -0
  32. package/scripts/release-gate.mjs +22 -0
  33. package/scripts/sync-thin-adapters.mjs +24 -0
  34. package/scripts/ui-design-judge.mjs +365 -7
  35. package/scripts/validate/config.mjs +446 -0
  36. package/scripts/validate/coverage-checks.mjs +429 -0
  37. package/scripts/validate.mjs +44 -854
  38. package/lib/cli/init-architecture-flow.mjs +0 -233
  39. package/lib/cli/profile-packs.mjs +0 -108
@@ -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
  }
@@ -379,7 +379,7 @@ export function buildMemoryContinuityGuidanceBlock(memoryContinuityState) {
379
379
  : 2;
380
380
 
381
381
  return [
382
- 'Memory continuity mode is enabled.',
382
+ 'Project memory continuity mode is enabled.',
383
383
  'Hydration mode: progressive-disclosure.',
384
384
  adapterGuidanceLine,
385
385
  '',
@@ -389,6 +389,7 @@ export function buildMemoryContinuityGuidanceBlock(memoryContinuityState) {
389
389
  '- Always redact sensitive text before persistence (<private> blocks and inline secret-like fields).',
390
390
  '',
391
391
  'Host compatibility scope:',
392
+ '- This memory layer does not replace reading bootstrap instruction files at the start of a session.',
392
393
  '- Works for local IDE, CLI, and cloud IDE chat hosts that implement the memory adapter contract or MCP retrieval path.',
393
394
  '- Generic web chat sessions without repository tools cannot auto-hydrate runtime memory and should rely on manual summary export/import.',
394
395
  ].join('\n');
@@ -0,0 +1,68 @@
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
+ 'Context Hygiene and Approved Reference Boundaries',
65
+ 'Accessibility Non-Negotiables',
66
+ 'Anti-Patterns to Avoid',
67
+ 'Implementation Notes for Future UI Tasks',
68
+ ];