@ryuenn3123/agentic-senior-core 4.3.7 → 4.3.9

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 +51 -35
  2. package/.agent-context/prompts/init-project.md +0 -2
  3. package/.agent-context/rules/architecture.md +1 -5
  4. package/.agent-context/rules/frontend-architecture.md +1 -1
  5. package/AGENTS.md +3 -2
  6. package/lib/cli/adaptive-context/catalog.mjs +0 -35
  7. package/lib/cli/audits/typography-palette-anti-repeat-audit.mjs +7 -23
  8. package/lib/cli/project-scaffolder/prompt-builders.mjs +13 -14
  9. package/lib/cli/project-scaffolder/storage.mjs +1 -1
  10. package/lib/cli/project-scaffolder/ui-scope-detection.mjs +36 -0
  11. package/lib/cli/project-scaffolder.mjs +1 -3
  12. package/package.json +1 -1
  13. package/scripts/adaptive-context/fixtures.mjs +7 -12
  14. package/scripts/context-triggered-audit.mjs +1 -6
  15. package/scripts/frontend-usability-audit.mjs +2 -7
  16. package/scripts/release-gate/constants.mjs +0 -12
  17. package/scripts/ui-design-judge/constants.mjs +1 -12
  18. package/scripts/ui-design-judge/design-execution-summary.mjs +50 -228
  19. package/scripts/ui-design-judge/prompting.mjs +3 -24
  20. package/scripts/validate/config.mjs +3 -87
  21. package/scripts/validate/file-structure.mjs +0 -3
  22. package/.agent-context/rules/efficiency-vs-hype.md +0 -15
  23. package/.agent-context/rules/git-workflow.md +0 -15
  24. package/.agent-context/rules/naming-conv.md +0 -35
  25. package/lib/cli/project-scaffolder/design-contract/sections/audits.mjs +0 -96
  26. package/lib/cli/project-scaffolder/design-contract/sections/conceptual-anchor.mjs +0 -167
  27. package/lib/cli/project-scaffolder/design-contract/sections/execution-handoff.mjs +0 -211
  28. package/lib/cli/project-scaffolder/design-contract/seed-signals.mjs +0 -79
  29. package/lib/cli/project-scaffolder/design-contract/signal-vocab.mjs +0 -64
  30. package/lib/cli/project-scaffolder/design-contract/validation/anchor-validators.mjs +0 -294
  31. package/lib/cli/project-scaffolder/design-contract/validation/audit-validators.mjs +0 -117
  32. package/lib/cli/project-scaffolder/design-contract/validation/completeness.mjs +0 -121
  33. package/lib/cli/project-scaffolder/design-contract/validation/execution-validators.mjs +0 -328
  34. package/lib/cli/project-scaffolder/design-contract/validation/helpers.mjs +0 -8
  35. package/lib/cli/project-scaffolder/design-contract/validation/research-dossier-validators.mjs +0 -104
  36. package/lib/cli/project-scaffolder/design-contract/validation/structural-validators.mjs +0 -79
  37. package/lib/cli/project-scaffolder/design-contract/validation/system-validators.mjs +0 -256
  38. package/lib/cli/project-scaffolder/design-contract/validation.mjs +0 -74
  39. package/lib/cli/project-scaffolder/design-contract.mjs +0 -470
@@ -7,56 +7,72 @@ Use this prompt for UI, UX, frontend layout, screen, or redesign work. Create or
7
7
  - Use current repo evidence, project docs, and `.agent-context/` as style context.
8
8
  - Do not copy layout rhythm, palette, component skin, or brand posture from external references without explicit user approval.
9
9
  - WCAG 2.2 AA is the hard compliance floor.
10
- - Before choosing a new UI library, research current official docs. Do not default to any component kit or styling tool by habit, and do not avoid them when they fit.
10
+ - When generating any UI component that renders or accepts user data, explicitly state in the prompt: "ensure all user-supplied input is sanitized, all status indicators have non-color alternatives, and all interactive elements have visible focus states."
11
+ - Before choosing a new UI library, research current official docs.
11
12
 
12
- ## Step 1: Name Your Defaults
13
+ ## Design Reference Retrieval
13
14
 
14
- Before any visual choice, name three design directions you are most tempted to use for this project. For each:
15
- 1. Name the specific visual pattern (layout, palette, density, motion, typography).
16
- 2. Argue against it: why would it flatten what is specific about THIS product's core purpose and data shape?
17
- 3. Derive your search direction from the rejection argument.
15
+ Before generating tokens from scratch, check if a proven brand reference matches
16
+ the product aesthetic. Run `npx getdesign list` to see all available references.
17
+ Pick by spatial mechanics and typographic character, not by color.
18
18
 
19
- ## Step 2: Choose an Anchor
19
+ Fetch: `npx getdesign add <slug> --out docs/DESIGN.md`
20
20
 
21
- Pick one concrete, googleable real-world reference whose interaction mechanics (not surface styling) translate to this UI. The anchor must be specific enough that renaming the product to a different category breaks coherence.
21
+ Customize: replace brand colors with product OKLCH equivalents, replace brand name
22
+ with product name, remove brand iconography, keep spatial rhythm and density logic.
22
23
 
23
- Hard constraints:
24
- - Reject generic quality words as anchors: "modern", "clean", "premium", "minimal", "bold" are not anchors.
25
- - Do not default to spatial place metaphors (room, studio, lab, cockpit, command center). Prefer artifacts, workflows, instruments, data behaviors, or interaction mechanisms.
26
- - Record what mechanic is borrowed and what is explicitly NOT borrowed (palette, component skin, layout rhythm).
24
+ If no brand matches or terminal is unavailable, skip and generate from scratch below.
27
25
 
28
- ## Step 3: Creative Commitments
26
+ Source: https://github.com/VoltAgent/awesome-design-md
29
27
 
30
- Record before coding:
31
- 1. **Typography**: Choose distinctive fonts with meaningful role contrast. Avoid Inter, Roboto, Arial, Space Grotesk, system fonts.
32
- 2. **Color and palette**: Dominant colors with sharp accents. Name what product evidence makes the palette fit. Name one color behavior that would not transfer to another category.
33
- 3. **Motion and interaction**: Define one signature motion behavior more specific than "smooth." One well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions.
34
- 4. **Composition**: One composition choice that avoids interchangeable card stacks. Create atmosphere and depth rather than solid backgrounds.
28
+ ## Design Direction Process
35
29
 
36
- ## Previous Directions (do not repeat)
30
+ 1. **Name Your Defaults**: Name three temptations (e.g. SaaS admin default, AI-startup landing) and why they flatten this product. Derive your search direction by rejecting them.
31
+ 2. **Choose an Anchor**: Pick a specific real-world reference whose mechanics translate here. Do not use generic quality words ("clean", "modern").
32
+ 3. **Creative Commitments**: Choose distinctive typography, dominant colors with sharp accents, and one signature motion behavior. Create depth rather than flat card stacks.
33
+ 4. **Previous Directions**: If `docs/DESIGN.md` contains previous directions, treat them as a blocklist. The new anchor must differ in conceptual family, hierarchy, and motion.
37
34
 
38
- If `docs/DESIGN.md` contains a list of previous directions, treat every entry as a blocklist. The chosen anchor must differ from every blocklisted entry on conceptual family, hierarchy, and motion. Restating an existing direction with new wording is not a new direction.
35
+ ## Redesign Protocol
39
36
 
40
- ## Named Defaults to Avoid
37
+ When the user says "redesign from zero": treat existing UI as behavioral evidence only. Rewrite design docs. Change primary composition, hierarchy, interaction model, and responsive architecture. Do not ship a palette swap.
41
38
 
42
- - `dev-tool default`: condensed tabular numerics, monospace on dark slate, monochrome status dots, minimal chrome
43
- - `AI-startup landing default`: purple-to-pink gradient hero, floating glass cards, three-up feature grid, vague hero copy
44
- - `SaaS admin default`: left-side icon-only nav, top utility bar, three-card KPI row above data table, neutral grey
45
- - `marketing site default`: hero image with headline, three feature tiles, pricing tiers, testimonial carousel
39
+ ## Output Format
46
40
 
47
- Avoid: purple gradients on white, predictable centered-everything composition, solid-color backgrounds without depth, cookie-cutter component patterns. Never converge on common choices across generations.
41
+ `docs/DESIGN.md` must be a compact token file under 400 tokens. Rationale stays in working memory.
48
42
 
49
- ## Post-Implementation Check
43
+ Required sections (in this order, no additions):
50
44
 
51
- After generating UI code, answer:
52
- 1. If the product name were removed, would a designer identify what specific product this was built for? If no, revise the concept.
53
- 2. Does the primary viewport avoid the centered-everything default? If no, name the product reason or revise.
54
- 3. Name the one default you were most tempted to use. Confirm it was rejected with a product-specific reason.
45
+ ### Anchor
46
+ One sentence: the interaction anchor and what mechanic is borrowed.
55
47
 
56
- ## Redesign Protocol
48
+ ### Tokens
49
+ - **Typography**: font families (display, body, mono), scale base and ratio, scale method
50
+ - **Colors**: OKLCH primitives with semantic role mapping (primary, secondary, surface, error, success)
51
+ - **Spacing**: base unit, scale
52
+ - **Radius**: small, medium, large values
53
+ - **Shadow**: elevation levels
54
+ - **Motion**: duration, easing, reduced-motion fallback
55
+
56
+ ### Constraints
57
+ - WCAG 2.2 AA floor
58
+ - Up to 3 product-specific anti-patterns
59
+
60
+ ### Previous Directions
61
+ Anchors used in prior iterations (blocklist for redesign). Start empty for fresh projects.
62
+
63
+ ## Required Validation Gates
64
+
65
+ Only three gates. Do not add more:
66
+ 1. Anchor exists and is specific.
67
+ 2. Token values are derived from the anchor.
68
+ 3. WCAG 2.2 AA compliance floor is met.
69
+
70
+ ## Pre-Commit Critique
57
71
 
58
- When the user says "redesign from zero" or equivalent: treat existing UI as behavioral evidence only. Rewrite design docs. Change primary composition, hierarchy, interaction model, and responsive architecture. Do not ship a palette swap or same hero with new colors.
72
+ Before committing any UI output, answer:
59
73
 
60
- ## Required Docs
74
+ 1. Rename test: if the product name changed to an unrelated category, would this UI still look identical? Yes = too generic, reset anchor.
75
+ 2. Token drift test: does any color, font, or spacing in the output contradict the DESIGN.md token definitions? Yes = align before commit.
76
+ 3. Security test: is user-controlled data rendered unsanitized, or does any status depend on color alone? Yes = fix before merge.
61
77
 
62
- Generate or refine `docs/DESIGN.md` before UI implementation. Keep design rationale, creative commitments, and any anti-repeat notes in the markdown contract instead of a separate machine-readable JSON file.
78
+ Max 3 revision cycles. If unresolved, reset the anchor entirely.
@@ -44,10 +44,8 @@ If the user specifies a framework, runtime, or architecture constraint, the agen
44
44
  4. Scaffold the initial project structure only after runtime and architecture decisions are explicit:
45
45
  - Create only the directories and files justified by the approved structure.
46
46
  - Set up configuration, validation, error handling, observability, health checks, and persistence only when they fit the approved runtime and project scope.
47
- - Every file must follow [naming conventions](../rules/naming-conv.md).
48
47
  - Every module must follow [architecture.md](../rules/architecture.md).
49
48
  - New code must pass the natural implementation pass in [architecture.md](../rules/architecture.md): start with the simplest correct flow, add complexity only when the requirement or repo evidence needs it, and do not add files or layers for small tasks.
50
- - Every dependency must be justified per [efficiency-vs-hype.md](../rules/efficiency-vs-hype.md).
51
49
  - Use official framework setup commands or canonical starter flows when they produce newer, better-supported dependency defaults than manual package assembly.
52
50
  - Do not assemble a framework project from scratch by habit when official setup commands create the supported structure. Manual assembly is allowed only for tiny prototypes, educational demos, unusual repo constraints, or a documented architecture reason.
53
51
  - If containerization is selected, Docker assets must follow [docker-runtime.md](../rules/docker-runtime.md) and the latest official Docker docs instead of stale blog-era patterns. Selected Docker lanes require files and runbooks, not docs-only acknowledgment.
@@ -30,8 +30,4 @@ keywords: [architecture, arch, boundary, system]
30
30
  2. Load global domain rules lazily based on touched scope.
31
31
  3. Do not create or load stack-specific governance adapters as the baseline.
32
32
 
33
- ## ARCH-008: Backend Universal Principles
34
- 1. No clever hacks.
35
- 2. No premature abstraction.
36
- 3. Readability over brevity.
37
- 4. Keep backend and shared core modules clean.
33
+
@@ -22,7 +22,7 @@ Load this rule for UI-facing engineering work. This file contains strict enginee
22
22
 
23
23
  ## FE-011: Implementation Boundaries
24
24
  1. Follow the shipped project stack and current repo patterns.
25
- 2. Do not hardcode Zustand, React Query, smart/dumb component doctrine.
25
+ 2. Do not hardcode framework-specific state management or data fetching libraries, or rigid component doctrines.
26
26
 
27
27
  ## FE-012: Data State Surface
28
28
  1. Explicitly handle empty, loading, error, and offline states.
package/AGENTS.md CHANGED
@@ -33,12 +33,13 @@ Always prefix noisy shell commands: `ascx git status`, `ascx git diff`, `ascx np
33
33
  Always read and apply `.agent-context/prompts/compact-natural-mode.md` for every final user-facing reply. Never repeat full command output; reference tee file paths when truncated.
34
34
 
35
35
  ## Layer Index
36
- ### Layer 1: Rules (21 Files) [SCOPE-RESOLVED]
36
+ ### Layer 1: Rules (18 Files) [SCOPE-RESOLVED]
37
37
  Location: `.agent-context/rules/`.
38
38
 
39
39
  Load only relevant rule files. Do not read the entire rule directory by default.
40
40
 
41
- Available rules: `naming-conv.md` (`NAME-*`, v4), `architecture.md` (`ARCH-*`, v4), `security.md` (`SEC-*`, v4), `performance.md` (`PERF-*`, v4), `error-handling.md` (`ERR-*`, v4), `testing.md` (`TEST-*`, v4), `git-workflow.md` (`GIT-*`, v4), `efficiency-vs-hype.md` (`DEP-*`, v4), `api-docs.md` (`API-*`, v4), `microservices.md` (`SVC-*`, v4), `event-driven.md` (`EVT-*`, v4), `database-design.md` (`DATA-*`, v4), `realtime.md` (`RT-*`, v4), `frontend-architecture.md` (`FE-*`, v4), `docker-runtime.md` (`DOCK-*`, v4), `observability.md` (`OBS-*`, v4), `resilience.md` (`RES-*`, v4), `migrations.md` (`MIG-*`, v4), `background-jobs.md` (`JOB-*`, v4), `config-and-flags.md` (`CFG-*`, v4), `api-versioning.md` (`VER-*`, v4).
41
+ Available rules: `architecture.md` (`ARCH-*`, v4), `security.md` (`SEC-*`, v4), `performance.md` (`PERF-*`, v4), `error-handling.md` (`ERR-*`, v4), `testing.md` (`TEST-*`, v4), `api-docs.md` (`API-*`, v4), `microservices.md` (`SVC-*`, v4), `event-driven.md` (`EVT-*`, v4), `database-design.md` (`DATA-*`, v4), `realtime.md` (`RT-*`, v4), `frontend-architecture.md` (`FE-*`, v4), `docker-runtime.md` (`DOCK-*`, v4), `observability.md` (`OBS-*`, v4), `resilience.md` (`RES-*`, v4), `migrations.md` (`MIG-*`, v4), `background-jobs.md` (`JOB-*`, v4), `config-and-flags.md` (`CFG-*`, v4), `api-versioning.md` (`VER-*`, v4).
42
+
42
43
 
43
44
  For Docker or Compose work, load `docker-runtime.md` and verify the latest official Docker docs before authoring container assets. Also perform live web research for Docker and framework/package setup claims. For framework or package setup work, use the latest stable compatible dependency set and official setup flow unless a documented compatibility constraint blocks it; prefer official framework scaffolders when they create the supported project shape. New dependencies are allowed when they improve efficiency, delivery time, correctness, accessibility, UX, or maintainability. Do not treat dependency avoidance or vague performance fear as a default reason to skip a modern maintained library.
44
45
 
@@ -143,26 +143,6 @@ export const RULE_FAMILY_CATALOG = [
143
143
  'rapikan',
144
144
  ],
145
145
  },
146
- {
147
- label: 'NAME',
148
- rulePath: '.agent-context/rules/naming-conv.md',
149
- priority: 60,
150
- triggers: [
151
- 'naming',
152
- 'name',
153
- 'variable',
154
- 'function name',
155
- 'comment',
156
- 'comments',
157
- 'readable',
158
- 'humanizer',
159
- 'natural code',
160
- 'generic name',
161
- 'namingnya',
162
- 'dibaca',
163
- 'variabel',
164
- ],
165
- },
166
146
  {
167
147
  label: 'FE',
168
148
  rulePath: '.agent-context/rules/frontend-architecture.md',
@@ -375,20 +355,6 @@ export const RULE_FAMILY_CATALOG = [
375
355
  'breaking change',
376
356
  ],
377
357
  },
378
- {
379
- label: 'DEP',
380
- rulePath: '.agent-context/rules/efficiency-vs-hype.md',
381
- priority: 200,
382
- triggers: [
383
- 'dependency',
384
- 'dependencies',
385
- 'package',
386
- 'library',
387
- 'install',
388
- 'npm',
389
- 'framework',
390
- ],
391
- },
392
358
  ];
393
359
 
394
360
  export const PROMPT_CATALOG = [
@@ -421,5 +387,4 @@ export const DOCS_BY_LABEL = {
421
387
 
422
388
  export const STATE_BY_LABEL = {
423
389
  ARCH: ['.agent-context/state/architecture-map.md'],
424
- DEP: ['.agent-context/state/dependency-map.md'],
425
390
  };
@@ -4,14 +4,11 @@
4
4
  * Typography and palette anti-repeat audit.
5
5
  *
6
6
  * Scans CSS-like files for font-family declarations and color values, then
7
- * cross-checks them against
8
- * `docs/design-intent.json`'s
9
- * `researchDossier.metadata.antiRepeatLedger.previousTypographyChoices` and
10
- * `previousPalettes` so a redesign cannot leak the previous direction's
11
- * exact font trio or perceptually-identical palette colors through CSS
12
- * implementation files alone.
13
7
  *
14
- * Severity model:
8
+ * DEPRECATED: This audit was built for the legacy design-intent.json system
9
+ * and its machine-readable antiRepeatLedger. In the 2026 Context Ops Paradigm,
10
+ * anti-repeat checks are handled by the LLM reading docs/DESIGN.md's
11
+ * "Previous Directions" blocklist. This audit now unconditionally skips.
15
12
  * - Typography matches are EXACT family-name matches and are always
16
13
  * blocking (kind: typography.previously-shipped-family,
17
14
  * diagnosticCode: BOUNDARY_TYPOGRAPHY_LEDGER_VIOLATION).
@@ -129,19 +126,8 @@ function findPaletteFindingsForFile({ relativeFilePath, sourceText, ledgerColors
129
126
  return findings;
130
127
  }
131
128
 
132
- function loadDesignIntentContract(repositoryRootPath, designIntentRelativePath) {
133
- const designIntentAbsolutePath = join(repositoryRootPath, designIntentRelativePath);
134
- if (!existsSync(designIntentAbsolutePath)) {
135
- return { contract: null, reason: 'design-intent-file-absent' };
136
- }
137
- let contract;
138
- try {
139
- contract = JSON.parse(readFileSync(designIntentAbsolutePath, 'utf8'));
140
- } catch (parseError) {
141
- const errorMessage = parseError instanceof Error ? parseError.message : String(parseError);
142
- return { contract: null, reason: `design-intent-file-not-valid-json: ${errorMessage}` };
143
- }
144
- return { contract, reason: 'ok' };
129
+ function loadDesignIntentContract() {
130
+ return { contract: null, reason: 'design-intent-deprecated-use-design-md-blocklist' };
145
131
  }
146
132
 
147
133
  function buildSkippedReport(reportShell, reason) {
@@ -200,12 +186,10 @@ export function runTypographyPaletteAntiRepeatAudit(auditOptions = {}) {
200
186
  },
201
187
  };
202
188
 
203
- const designIntentLoad = loadDesignIntentContract(repositoryRootPath, designIntentRelativePath);
189
+ const designIntentLoad = loadDesignIntentContract();
204
190
  if (!designIntentLoad.contract) {
205
191
  return buildSkippedReport(reportShell, designIntentLoad.reason);
206
192
  }
207
-
208
- const antiRepeatLedger = designIntentLoad.contract?.researchDossier?.metadata?.antiRepeatLedger;
209
193
  if (!antiRepeatLedger || typeof antiRepeatLedger !== 'object') {
210
194
  return buildSkippedReport(reportShell, 'anti-repeat-ledger-absent');
211
195
  }
@@ -130,13 +130,13 @@ export function buildDesignBootstrapPrompt({
130
130
  `Protocol version: ${PROJECT_DOC_SYNTHESIS_PROMPT_VERSION}`,
131
131
  '',
132
132
  'You are the Lead UI/UX Art Director for this project.',
133
- 'Create a dynamic design contract, not a fixed stylistic template.',
133
+ 'Create a compact design token file, not a fixed stylistic template or prose document.',
134
134
  '',
135
135
  '## Mission',
136
- `Author docs/DESIGN.md in ${docsLanguage.toUpperCase()} language with strong art direction and engineering-ready guidance.`,
136
+ `Author docs/DESIGN.md in ${docsLanguage.toUpperCase()} language as a compact token file under 400 tokens.`,
137
137
  '',
138
138
  '## Deliverables',
139
- '1. docs/DESIGN.md',
139
+ '1. docs/DESIGN.md (compact token file)',
140
140
  '',
141
141
  '## Design Direction Process',
142
142
  'Follow `.agent-context/prompts/bootstrap-design.md` for the three-step design direction:',
@@ -146,13 +146,12 @@ export function buildDesignBootstrapPrompt({
146
146
  '',
147
147
  '## Hard Rules',
148
148
  '1. Do not copy external style guides or anchor to famous product surfaces.',
149
- '2. Do not choose final style, library, palette, typography, or motion from this offline scaffold.',
150
- '3. Use repo evidence, active brief, current docs, and current official docs for technology choices.',
151
- '4. WCAG 2.2 AA is the hard floor. APCA is advisory perceptual tuning only.',
152
- '5. Research current official docs before importing any new UI-related library.',
153
- '6. Do not default to any component kit by habit, and do not avoid them when they fit.',
154
- '7. Keep research vocabulary internal; evidence, anchor, and category-code labels must not appear in public-facing docs.',
155
- '8. Treat production content as blocking: remove demo, placeholder, lorem, TODO, and scaffold copy.',
149
+ '2. Use repo evidence, active brief, current docs, and current official docs for technology choices.',
150
+ '3. WCAG 2.2 AA is the hard floor. APCA is advisory perceptual tuning only.',
151
+ '4. Research current official docs before importing any new UI-related library.',
152
+ '5. Do not default to any component kit by habit, and do not avoid them when they fit.',
153
+ '6. Keep research vocabulary internal; evidence, anchor, and category-code labels must not appear in public-facing docs.',
154
+ '7. Treat production content as blocking: remove demo, placeholder, lorem, TODO, and scaffold copy.',
156
155
  '',
157
156
  '## Project Inputs',
158
157
  `- Project name: ${discoveryAnswers.projectName}`,
@@ -163,10 +162,10 @@ export function buildDesignBootstrapPrompt({
163
162
  `- Architecture constraint: ${initContext.blueprintFileName === 'agent-decision-architecture.md' ? 'agent recommendation required before coding' : toTitleCase(initContext.blueprintFileName)}`,
164
163
  '',
165
164
  '## Required Execution',
166
- '1. Create or update docs/DESIGN.md with complete content covering: design intent, audience signals, visual direction, color/typography/spacing decisions, responsive strategy, motion rules, component language, accessibility non-negotiables, and anti-patterns.',
167
- '2. Make the contract executable without screenshot dependency.',
168
- '3. Preserve repoEvidence.designEvidenceSummary when onboarding or detector evidence exists.',
169
- '4. After the contract exists, use it as a first-class source for future UI tasks.',
165
+ '1. Follow the output format defined in `.agent-context/prompts/bootstrap-design.md`: Anchor, Tokens, Constraints, Previous Directions.',
166
+ '2. Keep docs/DESIGN.md under 400 tokens. Rationale and derivation stay in working memory.',
167
+ '3. Make the token file executable without screenshot dependency.',
168
+ '4. After the token file exists, use it as a first-class source for future UI tasks.',
170
169
  '',
171
170
  ].join('\n');
172
171
  }
@@ -15,7 +15,7 @@ import {
15
15
  } from './discovery.mjs';
16
16
  import {
17
17
  shouldBootstrapDesignDocument,
18
- } from './design-contract.mjs';
18
+ } from './ui-scope-detection.mjs';
19
19
  import {
20
20
  buildDesignBootstrapPrompt,
21
21
  buildProjectContextBootstrapPrompt,
@@ -0,0 +1,36 @@
1
+ /**
2
+ * UI scope detection utility. Determines whether a project needs
3
+ * design bootstrap based on domain and blueprint signals.
4
+ *
5
+ * Extracted from design-contract/seed-signals.mjs so the design
6
+ * contract module can be removed without breaking this dependency.
7
+ */
8
+
9
+ export function shouldBootstrapDesignDocument(discoveryAnswers, initContext) {
10
+ const normalizedDomain = String(discoveryAnswers.primaryDomain || '').trim().toLowerCase();
11
+ const normalizedBlueprint = String(initContext.blueprintFileName || '').trim().toLowerCase();
12
+
13
+ const isUiDomain = normalizedDomain.includes('web')
14
+ || normalizedDomain.includes('mobile')
15
+ || normalizedDomain.includes('frontend')
16
+ || normalizedDomain.includes('fullstack')
17
+ || normalizedDomain.includes('ui');
18
+
19
+ const isBackendOnlyDomain = normalizedDomain.includes('api service')
20
+ || normalizedDomain.includes('cli tool')
21
+ || normalizedDomain.includes('library');
22
+
23
+ const blueprintLooksUi = normalizedBlueprint.includes('frontend')
24
+ || normalizedBlueprint.includes('landing')
25
+ || normalizedBlueprint.includes('ui');
26
+
27
+ if (isUiDomain) {
28
+ return true;
29
+ }
30
+
31
+ if (!isBackendOnlyDomain && blueprintLooksUi) {
32
+ return true;
33
+ }
34
+
35
+ return false;
36
+ }
@@ -19,9 +19,7 @@ export {
19
19
 
20
20
  export {
21
21
  shouldBootstrapDesignDocument,
22
- validateDesignIntentContract,
23
- validateDesignContractCompleteness,
24
- } from './project-scaffolder/design-contract.mjs';
22
+ } from './project-scaffolder/ui-scope-detection.mjs';
25
23
 
26
24
  export {
27
25
  generateProjectDocumentation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "4.3.7",
3
+ "version": "4.3.9",
4
4
  "type": "module",
5
5
  "description": "Change your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -38,8 +38,8 @@ export const ADAPTIVE_CONTEXT_FIXTURES = [
38
38
  {
39
39
  id: 'indonesian-readable-service',
40
40
  requestText: 'Rapihin service ini biar namingnya enak dibaca.',
41
- requiredLabels: ['ARCH', 'NAME'],
42
- allowedLabels: ['ARCH', 'NAME'],
41
+ requiredLabels: ['ARCH'],
42
+ allowedLabels: ['ARCH'],
43
43
  },
44
44
  {
45
45
  id: 'natural-cron-silent',
@@ -86,8 +86,8 @@ export const ADAPTIVE_CONTEXT_FIXTURES = [
86
86
  {
87
87
  id: 'checkout-helper-naming',
88
88
  requestText: 'Rapihin nama variabel di checkout helper, jangan bikin abstraction baru.',
89
- requiredLabels: ['ARCH', 'NAME'],
90
- allowedLabels: ['ARCH', 'NAME'],
89
+ requiredLabels: ['ARCH'],
90
+ allowedLabels: ['ARCH'],
91
91
  },
92
92
  {
93
93
  id: 'mobile-button-cut-off',
@@ -125,12 +125,7 @@ export const ADAPTIVE_CONTEXT_FIXTURES = [
125
125
  requiredLabels: ['DATA', 'PERF', 'RES'],
126
126
  allowedLabels: ['DATA', 'PERF', 'RES'],
127
127
  },
128
- {
129
- id: 'dependency-update-check',
130
- requestText: 'Cek dependency package ini outdated atau perlu update.',
131
- requiredLabels: ['DEP'],
132
- allowedLabels: ['DEP'],
133
- },
128
+
134
129
  {
135
130
  id: 'frontend-redesign',
136
131
  requestText: 'Redesign this frontend screen from zero with responsive layout, motion, and UI design docs.',
@@ -158,8 +153,8 @@ export const ADAPTIVE_CONTEXT_FIXTURES = [
158
153
  {
159
154
  id: 'service-refactor-clean-code',
160
155
  requestText: 'Refactor this service module. Clean up helper names, avoid over-engineering, and keep tests readable.',
161
- requiredLabels: ['ARCH', 'NAME', 'TEST'],
162
- allowedLabels: ['ARCH', 'NAME', 'TEST'],
156
+ requiredLabels: ['ARCH', 'TEST'],
157
+ allowedLabels: ['ARCH', 'TEST'],
163
158
  },
164
159
  {
165
160
  id: 'versioned-api-endpoint',
@@ -43,12 +43,7 @@ const REQUIRED_PR_CHECKLIST_SNIPPETS = [
43
43
  'User can always force strict audit mode manually',
44
44
  ];
45
45
 
46
- const REQUIRED_ARCHITECTURE_CHECKLIST_SNIPPETS = [
47
- '## Backend Universal Principles',
48
- 'No clever hacks in backend and shared core modules',
49
- 'No premature abstraction',
50
- 'Readability over brevity',
51
- ];
46
+ const REQUIRED_ARCHITECTURE_CHECKLIST_SNIPPETS = [];
52
47
 
53
48
  function pushResult(results, isPassed, checkName, details) {
54
49
  results.push({
@@ -42,12 +42,7 @@ const REQUIRED_PR_CHECKLIST_SNIPPETS = [
42
42
  '### 15. Universal SOP Consolidation',
43
43
  ];
44
44
 
45
- const REQUIRED_ARCHITECTURE_CHECKLIST_SNIPPETS = [
46
- '## Backend Universal Principles',
47
- 'No clever hacks in backend and shared core modules',
48
- 'No premature abstraction',
49
- 'Readability over brevity',
50
- ];
45
+ const REQUIRED_ARCHITECTURE_CHECKLIST_SNIPPETS = [];
51
46
 
52
47
  const REQUIRED_FRONTEND_RULE_SNIPPETS = [
53
48
  '## FE-009: Accessibility',
@@ -56,7 +51,7 @@ const REQUIRED_FRONTEND_RULE_SNIPPETS = [
56
51
  '## FE-010: CSS Production Hardening',
57
52
  'overflow, wrapping, truncation',
58
53
  '## FE-011: Implementation Boundaries',
59
- 'Do not hardcode Zustand, React Query, smart/dumb component doctrine',
54
+ 'Do not hardcode framework-specific state management or data fetching libraries, or rigid component doctrines',
60
55
  ];
61
56
 
62
57
  const REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS = [
@@ -28,17 +28,10 @@ export const AUTO_DOCS_SYNC_SCOPE_BOUNDARIES = [
28
28
  ];
29
29
 
30
30
  export const REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS = [
31
- 'No clever hacks.',
32
- 'No premature abstraction.',
33
- 'Readability over brevity.',
34
- 'backend and shared core modules',
35
31
  'Do not create or load stack-specific governance adapters as the baseline.',
36
32
  ];
37
33
 
38
34
  export const REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS = [
39
- 'No clever hacks in backend and shared core modules',
40
- 'No premature abstraction (base classes/util layers created only after repeated stable patterns)',
41
- 'Readability over brevity for maintainability',
42
35
  'Controllers, route handlers, and transport adapters do not contain business policy',
43
36
  'Sensitive mutations include idempotency or duplicate-submit coverage',
44
37
  'Backend/API governance was applied through global domain rules',
@@ -46,7 +39,6 @@ export const REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS = [
46
39
 
47
40
  export const REQUIRED_RELEASE_VERSION = '4.3.4';
48
41
  export const REQUIRED_REFACTOR_PROMPT_SNIPPETS = [
49
- 'Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.',
50
42
  'Prioritize maintainability over compressed one-liners.',
51
43
  'zero-trust input validation',
52
44
  'idempotency for sensitive mutations',
@@ -54,10 +46,6 @@ export const REQUIRED_REFACTOR_PROMPT_SNIPPETS = [
54
46
  ];
55
47
 
56
48
  export const REQUIRED_ARCHITECTURE_REVIEW_CHECKLIST_SNIPPETS = [
57
- '## Backend Universal Principles',
58
- 'No clever hacks in backend and shared core modules',
59
- 'No premature abstraction',
60
- 'Readability over brevity',
61
49
  'Service or use-case code owns orchestration',
62
50
  'Relational reads avoid N+1 patterns',
63
51
  'Global backend/API governance is used directly',
@@ -7,18 +7,7 @@ const __filename = fileURLToPath(import.meta.url);
7
7
  const __dirname = dirname(__filename);
8
8
 
9
9
  export const REPOSITORY_ROOT = resolve(__dirname, '..', '..');
10
- export const DESIGN_INTENT_PATH = resolve(REPOSITORY_ROOT, 'docs', 'design-intent.json');
11
10
  export const DESIGN_GUIDE_PATH = resolve(REPOSITORY_ROOT, 'docs', 'DESIGN.md');
12
11
  export const MAX_DIFF_CHARS = 12000;
13
12
  export const UI_FILE_EXTENSIONS = new Set(['.js', '.jsx', '.ts', '.tsx', '.vue', '.css', '.scss', '.sass']);
14
- export const DESIGN_EXECUTION_REQUIRED_CAPABILITIES = [
15
- 'requireSurfacePlan',
16
- 'requireComponentGraph',
17
- 'requireViewportMutationPlan',
18
- 'requireInteractionStateMatrix',
19
- 'requireContentPriorityMap',
20
- 'requireTaskFlowNarrative',
21
- 'requireSignatureMoveRationale',
22
- 'requireStructuredHandoff',
23
- 'requireRepoEvidenceAlignment',
24
- ];
13
+