@ryuenn3123/agentic-senior-core 3.0.8 → 3.0.10

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.
@@ -7,25 +7,34 @@ When a user requests frontend design or redesign, the agent should automatically
7
7
 
8
8
  This contract is a structure and reasoning system, not a fixed visual template. It must adapt to product context, user needs, platform constraints, and current design signals.
9
9
 
10
+ UI Design Mode is context-isolated by default:
11
+ - Load [AGENTS.md](../../AGENTS.md), [frontend-architecture.md](../rules/frontend-architecture.md), this prompt, UI-relevant state files, current UI code, and existing design docs first.
12
+ - Do not eagerly load backend-only rules such as [database-design.md](../rules/database-design.md), [docker-runtime.md](../rules/docker-runtime.md), or [microservices.md](../rules/microservices.md) unless the task explicitly crosses those boundaries.
13
+ - Treat UI consistency, accessibility, and cross-viewport adaptation as first-class constraints, not cosmetic afterthoughts.
14
+
10
15
  The agent must:
11
16
  1. Read [AGENTS.md](../../AGENTS.md) for project context and team roles.
12
- 2. Scan all files in [.agent-context/rules/](../rules/) for UI/UX and accessibility standards.
13
- 3. Reference [docs/deep-dive.md](../../docs/deep-dive.md) and [docs/faq.md](../../docs/faq.md) for architecture and product background.
14
- 4. If [docs/DESIGN.md](../../docs/DESIGN.md) or `docs/design-intent.json` already exists, check for drift and improve them instead of rewriting blindly.
15
- 5. Treat any example structure or stylistic inspiration as non-normative. Use it only to judge depth and clarity, never to copy a visual language directly.
16
- 6. All references to docs or rules must be clickable markdown links.
17
+ 2. Read [frontend-architecture.md](../rules/frontend-architecture.md) and apply its UI consistency guardrails.
18
+ 3. Use repository evidence from [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), existing UI code, product copy, route names, component names, and any existing `docs/*` project docs to infer architecture and product background.
19
+ 4. When analyzing an existing UI codebase, inspect low-cost evidence such as hardcoded color density, prop-drilling candidates, and breakpoint chaos before declaring the current design direction healthy.
20
+ 5. If [docs/DESIGN.md](../../docs/DESIGN.md) or `docs/design-intent.json` already exists, check for drift and improve them instead of rewriting blindly.
21
+ 6. If context is incomplete, write explicit assumptions and reversible design bets instead of defaulting to generic SaaS output.
22
+ 7. Explore multiple plausible design directions internally, then commit to one cohesive direction with clear rationale tied to the product context.
23
+ 8. Treat any example structure or stylistic inspiration as non-normative. Use it only to judge depth and clarity, never to copy a visual language directly.
24
+ 9. All references to docs or rules must be clickable markdown links.
25
+ 10. Responsive work must adapt layout, navigation, density, and task order across viewports. Shrinking desktop layouts is not enough.
17
26
 
18
27
  Required `docs/DESIGN.md` sections:
19
28
  1. Design Intent and Product Personality
20
29
  2. Audience and Use-Context Signals
21
30
  3. Visual Direction and Distinctive Moves
22
- 4. Color System and Semantic Roles
23
- 5. Typography System and Hierarchy
31
+ 4. Color Science and Semantic Roles
32
+ 5. Typographic Engineering and Hierarchy
24
33
  6. Spacing, Layout Rhythm, and Density Strategy
25
- 7. Interaction, Motion, and Feedback Rules
26
- 8. Component Language and Shared Patterns
27
- 9. Accessibility Non-Negotiables
28
- 10. Responsive Strategy
34
+ 7. Responsive Strategy and Cross-Viewport Adaptation Matrix
35
+ 8. Interaction, Motion, and Feedback Rules
36
+ 9. Component Language and Shared Patterns
37
+ 10. Accessibility Non-Negotiables
29
38
  11. Anti-Patterns to Avoid
30
39
  12. Implementation Notes for Future UI Tasks
31
40
 
@@ -33,16 +42,24 @@ Required `docs/design-intent.json` fields:
33
42
  - `mode`
34
43
  - `status`
35
44
  - `project`
45
+ - `designPhilosophy`
36
46
  - `brandAdjectives`
37
47
  - `antiAdjectives`
38
48
  - `visualDirection`
49
+ - `mathSystems`
50
+ - `colorTruth`
51
+ - `crossViewportAdaptation`
39
52
  - `experiencePrinciples`
40
53
  - `forbiddenPatterns`
54
+ - `validationHints`
41
55
  - `requiredDesignSections`
42
56
  - `implementation`
43
57
 
44
58
  Output:
45
59
  - Create or update both `docs/DESIGN.md` and `docs/design-intent.json`.
46
60
  - Keep both files synchronized: the markdown explains the why, the JSON captures the contract in machine-readable form.
47
- - Use practical, modern, accessible language grounded in the project, not generic SaaS defaults.
61
+ - `docs/design-intent.json` must include deterministic fields for `colorTruth.format`, `colorTruth.allowHexDerivatives`, and `crossViewportAdaptation.mutationRules.mobile/tablet/desktop`.
62
+ - Color intent must be defined in a perceptual or relational color model first. Hex values may appear only as implementation derivatives.
63
+ - The contract must encode viewport mutation rules, not just breakpoint names.
64
+ - Use practical, modern, accessible language grounded in the project, not generic SaaS defaults or copycat brand systems.
48
65
  - Wait for user approval before generating Figma or code assets.
@@ -3,10 +3,12 @@
3
3
 
4
4
  This prompt boots a repository with strict rules operations context (Federated Governance baseline).
5
5
 
6
+ ## System Directives (Auto Execution)
7
+
6
8
  When a new project is created or initialized, the agent should automatically:
7
9
  1. Read [AGENTS.md](../../AGENTS.md) to understand available roles and knowledge base.
8
10
  2. Scan all files in [.agent-context/rules/](../rules/) for mandatory engineering standards.
9
- 3. Review dynamic stack and architecture signals from [docs/deep-dive.md](../../docs/deep-dive.md), [docs/faq.md](../../docs/faq.md), and task constraints.
11
+ 3. Review dynamic stack and architecture signals from [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [.agent-context/state/stack-research-snapshot.json](../state/stack-research-snapshot.json), available stack and blueprint sources, and task constraints.
10
12
 
11
13
  ## Architect Mode (Recommended)
12
14
  If the user describes a project or feature, the agent should:
@@ -19,7 +21,7 @@ If the user describes a project or feature, the agent should:
19
21
  If the user specifies a framework/blueprint, the agent should:
20
22
  1. Read [AGENTS.md](../../AGENTS.md) for role context.
21
23
  2. Scan all files in [.agent-context/rules/](../rules/) for engineering standards.
22
- 3. Reference [docs/deep-dive.md](../../docs/deep-dive.md) and [docs/faq.md](../../docs/faq.md) for stack/blueprint guidance.
24
+ 3. Reference [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [.cursorrules](../../.cursorrules), and [.windsurfrules](../../.windsurfrules) for the active stack and blueprint guidance already applied to this project.
23
25
  4. Scaffold the initial project structure following the blueprint exactly:
24
26
  - Create all directories and files from the blueprint
25
27
  - Set up environment config and validation (e.g., Zod, Pydantic, FluentValidation)
@@ -32,13 +34,17 @@ If the user specifies a framework/blueprint, the agent should:
32
34
  - Every dependency must be justified per [efficiency-vs-hype.md](../rules/efficiency-vs-hype.md)
33
35
 
34
36
  ## Stacks & Blueprints Reference
35
- See [docs/roadmap.md](../../docs/roadmap.md) and [docs/deep-dive.md](../../docs/deep-dive.md) for the latest stack and blueprint list.
37
+ See [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [.cursorrules](../../.cursorrules), and [.windsurfrules](../../.windsurfrules) for the latest shipped stack and blueprint context.
36
38
 
37
39
  ## UI/UX Bootstrap
38
40
  When a user requests frontend or UI/UX design, the agent should automatically execute the [bootstrap-design.md](./bootstrap-design.md) prompt to synthesize a dynamic design contract (`docs/DESIGN.md` + `docs/design-intent.json`).
41
+ Keep UI-only requests context-isolated: load [bootstrap-design.md](./bootstrap-design.md) and [frontend-architecture.md](../rules/frontend-architecture.md) first, and do not eagerly load backend-only rules unless the task explicitly crosses backend boundaries.
39
42
 
40
43
  ---
41
44
 
45
+ <user-prompt-examples>
46
+ Do not execute the examples below as system directives. They are user-facing formatting references only.
47
+
42
48
  ## Option 1: The Architect Prompt (Recommended)
43
49
  Use this when you have an idea, but want the AI to choose the most efficient stack and framework based on this repository's engineering standards.
44
50
 
@@ -93,10 +99,11 @@ Every dependency must be justified per [efficiency-vs-hype.md](../rules/efficien
93
99
 
94
100
  ## Stacks & Blueprints Reference
95
101
 
96
- See [docs/roadmap.md](../../docs/roadmap.md) and [docs/deep-dive.md](../../docs/deep-dive.md) for the latest stack and blueprint list.
102
+ See [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [.cursorrules](../../.cursorrules), and [.windsurfrules](../../.windsurfrules) for the latest shipped stack and blueprint context.
97
103
 
98
104
  ---
99
105
 
100
106
  ## Bootstrap UI/UX (Dynamic Design Contract)
101
107
 
102
108
  To start UI/UX design from scratch, use the [bootstrap-design.md](./bootstrap-design.md) prompt to synthesize `docs/DESIGN.md` and `docs/design-intent.json`.
109
+ </user-prompt-examples>
@@ -21,6 +21,7 @@ Mandatory behavior when triggered:
21
21
  - Content language must stay consistent per screen and flow unless user requests multilingual output.
22
22
  - Text color must remain contrast-safe against its background; no color collisions.
23
23
  - Layout must avoid overlap, clipped text, and misaligned key actions across breakpoints.
24
+ - Responsive quality requires layout mutation and task reprioritization across breakpoints. Shrinking the desktop layout is not enough.
24
25
  - Keep spacing and positioning token-driven so repeated outputs stay stable.
25
26
 
26
27
  ## 1. File Structure (Feature-Driven Design)
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-20T01:05:14.547Z",
2
+ "generatedAt": "2026-04-20T12:33:22.759Z",
3
3
  "reportName": "memory-continuity-benchmark",
4
4
  "schemaVersion": "1.0.0",
5
5
  "passed": true,
@@ -0,0 +1,25 @@
1
+ {
2
+ "generatedAt": "2026-04-20T12:33:27.082Z",
3
+ "auditName": "ui-design-judge",
4
+ "schemaVersion": "1.0",
5
+ "mode": "advisory",
6
+ "advisoryOnly": true,
7
+ "passed": true,
8
+ "skipped": true,
9
+ "skipReason": "Design contract is missing or unreadable. Skipping UI design judge.",
10
+ "provider": "none",
11
+ "ciProvider": "github",
12
+ "contractPresent": false,
13
+ "summary": {
14
+ "changedUiFileCount": 0,
15
+ "alignmentScore": null,
16
+ "driftCount": 0,
17
+ "blockingCandidateCount": 0
18
+ },
19
+ "malformedVerdict": false,
20
+ "providerError": false,
21
+ "findings": [],
22
+ "notes": [
23
+ "docs/design-intent.json is required for contract-aware UI judging."
24
+ ]
25
+ }
package/.cursorrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.8
3
+ Generated by Agentic-Senior-Core CLI v3.0.10
4
4
  Timestamp: 2026-04-18T00:00:00.000Z
5
5
  Selected profile: beginner
6
6
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 08c326d79f2c0f4bd7ef106da3542ab0f78f4d02bc205d63598db34cf3f40731
5
+ Canonical Snapshot SHA256: 5de5017263401012b3516c76e68be3cfdc5d1f09a2569d5943cfcd4105e0dde4
6
6
 
7
7
  Canonical policy source: [.instructions.md](../.instructions.md).
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 08c326d79f2c0f4bd7ef106da3542ab0f78f4d02bc205d63598db34cf3f40731
5
+ Canonical Snapshot SHA256: 5de5017263401012b3516c76e68be3cfdc5d1f09a2569d5943cfcd4105e0dde4
6
6
 
7
7
  The canonical policy source for this repository is [.instructions.md](../.instructions.md).
8
8
 
package/.windsurfrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.8
3
+ Generated by Agentic-Senior-Core CLI v3.0.10
4
4
  Timestamp: 2026-04-18T00:00:00.000Z
5
5
  Selected profile: beginner
6
6
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
package/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 08c326d79f2c0f4bd7ef106da3542ab0f78f4d02bc205d63598db34cf3f40731
5
+ Canonical Snapshot SHA256: 5de5017263401012b3516c76e68be3cfdc5d1f09a2569d5943cfcd4105e0dde4
6
6
 
7
7
  This file is an adapter entrypoint for agent discovery.
8
8
  The canonical policy source is [.instructions.md](.instructions.md).
package/README.md CHANGED
@@ -10,12 +10,12 @@
10
10
  **Production-grade Rules Engine (Governance Engine) for AI coding agents.**
11
11
  Works with Cursor, Windsurf, GitHub Copilot, Claude Code, Gemini, and other LLM-powered IDE workflows.
12
12
 
13
- Latest release: 3.0.8 (2026-04-20).
13
+ Latest release: 3.0.9 (2026-04-20).
14
14
 
15
- Highlights in 3.0.8:
16
- - Existing UI repositories now get `docs/design-intent.json` seeded during both `init` and `upgrade`.
17
- - Upgrade preview explicitly shows when a machine-readable design seed will be created on apply.
18
- - UI scope detection is now shared between `init` and `upgrade` so design-contract enforcement stays consistent.
15
+ Highlights in 3.0.9:
16
+ - Design bootstrap prompts now rely on shipped project evidence instead of assuming extra docs exist in every initialized repository.
17
+ - Dynamic UI design guidance now emphasizes structure, rationale, and anti-generic constraints without anchoring to example brand systems.
18
+ - Init prompts now point agents at the active onboarding and compiled-rule context that actually exists in target projects.
19
19
 
20
20
  </div>
21
21
 
@@ -201,6 +201,10 @@ function buildInitExistingProjectDesignIntentSeed({
201
201
  detectedFrom: uiScopeSignals.signalReasons,
202
202
  generatedBy: 'init-existing-project-seed',
203
203
  },
204
+ repoEvidence: {
205
+ uiSignalReasons: uiScopeSignals.signalReasons,
206
+ frontendMetrics: uiScopeSignals.frontendEvidenceMetrics || null,
207
+ },
204
208
  },
205
209
  });
206
210
  }
@@ -137,6 +137,10 @@ function buildUpgradeDesignIntentSeed({
137
137
  detectedFrom: uiScopeSignals.signalReasons,
138
138
  generatedBy: 'upgrade-seed',
139
139
  },
140
+ repoEvidence: {
141
+ uiSignalReasons: uiScopeSignals.signalReasons,
142
+ frontendMetrics: uiScopeSignals.frontendEvidenceMetrics || null,
143
+ },
140
144
  },
141
145
  });
142
146
  }
@@ -247,6 +247,21 @@ export async function buildCompiledRulesContent({
247
247
  ].join('\n')
248
248
  );
249
249
 
250
+ contextBlocks.push(
251
+ [
252
+ '## LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS',
253
+ 'Load these prompt contracts only when their trigger matches the user request:',
254
+ '1. .agent-context/prompts/init-project.md -> create, build, new project, scaffold',
255
+ '2. .agent-context/prompts/refactor.md -> refactor, improve, clean up, fix',
256
+ '3. .agent-context/prompts/review-code.md -> review, audit, check, analyze',
257
+ '4. .agent-context/prompts/bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign',
258
+ 'UI trigger policy:',
259
+ '- Load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md first.',
260
+ '- Keep UI-only requests context-isolated and do not eagerly load backend-only rules such as database-design.md, docker-runtime.md, or microservices.md unless the task explicitly crosses those boundaries.',
261
+ '- For UI scope, materialize docs/DESIGN.md and docs/design-intent.json before implementing UI surfaces.',
262
+ ].join('\n')
263
+ );
264
+
250
265
  const blueprintFilePath = path.join(selectedBlueprintsDirectoryPath, selectedBlueprintFileName);
251
266
  const hasBlueprintProfileFile = availableBlueprintProfileFileNames.has(selectedBlueprintFileName);
252
267
  const blueprintSummary = hasBlueprintProfileFile
@@ -8,6 +8,12 @@ import path from 'node:path';
8
8
  import { BLUEPRINT_RECOMMENDATIONS } from './constants.mjs';
9
9
  import { toTitleCase } from './utils.mjs';
10
10
 
11
+ const FRONTEND_SCAN_DIRECTORY_NAMES = ['src', 'app', 'pages', 'components', 'styles'];
12
+ const FRONTEND_SCAN_FILE_EXTENSIONS = new Set(['.js', '.jsx', '.ts', '.tsx', '.vue', '.css', '.scss', '.sass']);
13
+ const FRONTEND_SCAN_IGNORE_DIRECTORY_NAMES = new Set(['.git', 'node_modules', '.next', 'dist', 'build', 'coverage']);
14
+ const FRONTEND_FILE_SCAN_LIMIT = 200;
15
+ const FRONTEND_FILE_SIZE_LIMIT_BYTES = 200_000;
16
+
11
17
  export async function collectProjectMarkers(targetDirectoryPath) {
12
18
  const markerNames = new Set();
13
19
  const directoryEntries = await fs.readdir(targetDirectoryPath, { withFileTypes: true });
@@ -34,6 +40,110 @@ async function readPackageJsonIfExists(targetDirectoryPath) {
34
40
  }
35
41
  }
36
42
 
43
+ async function collectFrontendSourceFilePaths(directoryPath, collectedFilePaths = []) {
44
+ if (collectedFilePaths.length >= FRONTEND_FILE_SCAN_LIMIT) {
45
+ return collectedFilePaths;
46
+ }
47
+
48
+ let directoryEntries;
49
+ try {
50
+ directoryEntries = await fs.readdir(directoryPath, { withFileTypes: true });
51
+ } catch {
52
+ return collectedFilePaths;
53
+ }
54
+
55
+ for (const directoryEntry of directoryEntries) {
56
+ if (collectedFilePaths.length >= FRONTEND_FILE_SCAN_LIMIT) {
57
+ break;
58
+ }
59
+
60
+ if (directoryEntry.isDirectory()) {
61
+ if (FRONTEND_SCAN_IGNORE_DIRECTORY_NAMES.has(directoryEntry.name)) {
62
+ continue;
63
+ }
64
+
65
+ await collectFrontendSourceFilePaths(path.join(directoryPath, directoryEntry.name), collectedFilePaths);
66
+ continue;
67
+ }
68
+
69
+ const fileExtension = path.extname(directoryEntry.name).toLowerCase();
70
+ if (FRONTEND_SCAN_FILE_EXTENSIONS.has(fileExtension)) {
71
+ collectedFilePaths.push(path.join(directoryPath, directoryEntry.name));
72
+ }
73
+ }
74
+
75
+ return collectedFilePaths;
76
+ }
77
+
78
+ function countPatternMatches(sourceText, pattern) {
79
+ return Array.from(sourceText.matchAll(pattern)).length;
80
+ }
81
+
82
+ async function collectFrontendEvidenceMetrics(targetDirectoryPath, markerNames) {
83
+ const candidateDirectoryPaths = FRONTEND_SCAN_DIRECTORY_NAMES
84
+ .filter((directoryName) => markerNames.has(directoryName))
85
+ .map((directoryName) => path.join(targetDirectoryPath, directoryName));
86
+ const resolvedCandidateDirectoryPaths = candidateDirectoryPaths.length > 0
87
+ ? candidateDirectoryPaths
88
+ : [targetDirectoryPath];
89
+ const scannedFilePaths = [];
90
+
91
+ for (const candidateDirectoryPath of resolvedCandidateDirectoryPaths) {
92
+ await collectFrontendSourceFilePaths(candidateDirectoryPath, scannedFilePaths);
93
+ if (scannedFilePaths.length >= FRONTEND_FILE_SCAN_LIMIT) {
94
+ break;
95
+ }
96
+ }
97
+
98
+ let hardcodedColorCount = 0;
99
+ let propDrillingCandidateCount = 0;
100
+ let mediaQueryCount = 0;
101
+ let tailwindBreakpointUsageCount = 0;
102
+ let arbitraryBreakpointCount = 0;
103
+ const uniqueMediaWidths = new Set();
104
+
105
+ for (const scannedFilePath of scannedFilePaths) {
106
+ let sourceText;
107
+
108
+ try {
109
+ const fileStat = await fs.stat(scannedFilePath);
110
+ if (fileStat.size > FRONTEND_FILE_SIZE_LIMIT_BYTES) {
111
+ continue;
112
+ }
113
+
114
+ sourceText = await fs.readFile(scannedFilePath, 'utf8');
115
+ } catch {
116
+ continue;
117
+ }
118
+
119
+ hardcodedColorCount += countPatternMatches(
120
+ sourceText,
121
+ /#[0-9a-fA-F]{3,8}\b|rgba?\([^)]+\)|hsla?\([^)]+\)|oklch\([^)]+\)/g
122
+ );
123
+ propDrillingCandidateCount += countPatternMatches(
124
+ sourceText,
125
+ /<[A-Z][A-Za-z0-9_.:-]*(?:\s+[A-Za-z0-9_:-]+=\{[^}]+\}){5,}/g
126
+ );
127
+ mediaQueryCount += countPatternMatches(sourceText, /@media\b/g);
128
+ tailwindBreakpointUsageCount += countPatternMatches(sourceText, /\b(?:sm|md|lg|xl|2xl):/g);
129
+ arbitraryBreakpointCount += countPatternMatches(sourceText, /\b(?:min|max)-\[[^\]]+\]:/g);
130
+
131
+ for (const mediaWidthMatch of sourceText.matchAll(/\((?:min|max)-width:\s*([0-9.]+(?:px|rem|em))\)/g)) {
132
+ uniqueMediaWidths.add(mediaWidthMatch[1]);
133
+ }
134
+ }
135
+
136
+ return {
137
+ scannedFileCount: scannedFilePaths.length,
138
+ hardcodedColorCount,
139
+ propDrillingCandidateCount,
140
+ mediaQueryCount,
141
+ tailwindBreakpointUsageCount,
142
+ arbitraryBreakpointCount,
143
+ uniqueMediaWidthCount: uniqueMediaWidths.size,
144
+ };
145
+ }
146
+
37
147
  export async function detectUiScopeSignals({
38
148
  targetDirectoryPath,
39
149
  selectedStackFileName,
@@ -62,6 +172,7 @@ export async function detectUiScopeSignals({
62
172
  }
63
173
 
64
174
  const directUiMarkerNames = [
175
+ 'src',
65
176
  'next.config.js',
66
177
  'next.config.mjs',
67
178
  'next.config.ts',
@@ -112,13 +223,18 @@ export async function detectUiScopeSignals({
112
223
  ));
113
224
  const hasUiDependencies = detectedUiDependencies.length > 0;
114
225
  const hasStructuralUiMarkers = detectedUiMarkers.length >= 2;
226
+ const isUiScopeLikely = signalReasons.length > 0
227
+ && (hasStrongUiMarker || hasUiDependencies || hasStructuralUiMarkers || normalizedProjectScopeKey.length > 0);
228
+ const frontendEvidenceMetrics = isUiScopeLikely
229
+ ? await collectFrontendEvidenceMetrics(targetDirectoryPath, markerNames)
230
+ : null;
115
231
 
116
232
  return {
117
- isUiScopeLikely: signalReasons.length > 0
118
- && (hasStrongUiMarker || hasUiDependencies || hasStructuralUiMarkers || normalizedProjectScopeKey.length > 0),
233
+ isUiScopeLikely,
119
234
  signalReasons,
120
235
  detectedUiMarkers,
121
236
  detectedUiDependencies,
237
+ frontendEvidenceMetrics,
122
238
  packageManifest: resolvedPackageManifest,
123
239
  };
124
240
  }