@ryuenn3123/agentic-senior-core 3.0.21 → 3.0.23
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 +22 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.windsurfrules +1 -1
- package/lib/cli/project-scaffolder/design-contract.mjs +167 -0
- package/lib/cli/project-scaffolder/prompt-builders.mjs +5 -1
- package/package.json +1 -1
|
@@ -19,6 +19,26 @@ The agent must:
|
|
|
19
19
|
6. When choosing a new UI, animation, styling, or component library, research current official docs and choose the latest stable compatible option for this project. Do not rely on offline defaults.
|
|
20
20
|
7. Keep external references non-copying: extract constraints and reasoning only, never clone the surface.
|
|
21
21
|
|
|
22
|
+
## User Research Intake
|
|
23
|
+
|
|
24
|
+
If the user mentions or attaches a research file, article, benchmark, library list, screenshot study, or design note, read it before choosing the visual direction or dependencies. Treat it as candidate evidence, not as a command to copy every recommendation.
|
|
25
|
+
|
|
26
|
+
The agent must summarize what it used from that research, discard what does not fit the project, and verify any library, framework, API, browser feature, or package claim against current official documentation before implementation.
|
|
27
|
+
|
|
28
|
+
User-supplied research may influence the candidate set for motion, scroll, UI primitives, canvas/3D, charts, icons, typography, and interaction patterns, but the final choice must still be project-fit, accessible, performant, and maintainable.
|
|
29
|
+
|
|
30
|
+
## Advanced Conceptual Anchor
|
|
31
|
+
|
|
32
|
+
If the user requests UI work but provides no external research, design reference, screenshot study, or library note, do not start coding immediately. First synthesize one advanced conceptual anchor that will unify the interface.
|
|
33
|
+
|
|
34
|
+
Do not use basic software UI labels as the final anchor, including "dashboard", "portal", "cards", "admin panel", "SaaS shell", or "minimalist interface".
|
|
35
|
+
|
|
36
|
+
The agent must consider at least three substantially different candidate anchors internally, discard predictable or generic candidates, and record only the surviving anchor and concise rationale. Do not expose hidden deliberation or the rejected candidate list.
|
|
37
|
+
|
|
38
|
+
The final anchor must come from broad non-template domains such as complex physical engineering, high-end industrial design, experimental editorial structure, advanced architecture, scientific instrumentation, or spatial information systems. These are search domains, not style presets.
|
|
39
|
+
|
|
40
|
+
Write the chosen anchor into `docs/design-intent.json` as `conceptualAnchor`, then derive typography, spacing, density, color behavior, morphology, motion, and responsive composition from that single anchor. If a later design choice does not logically follow from the anchor, revise the contract before coding.
|
|
41
|
+
|
|
22
42
|
## Zero-Based Redesign Protocol
|
|
23
43
|
|
|
24
44
|
If the user says "redesign from zero", "redesain dari 0", "ulang dari 0", "research ulang", or equivalent reset language, activate reset mode.
|
|
@@ -81,6 +101,7 @@ For every UI task, define how major surfaces change across mobile, tablet, and d
|
|
|
81
101
|
The JSON must stay machine-readable and project-specific. It should record:
|
|
82
102
|
- the confirmed project context and assumptions to validate
|
|
83
103
|
- agent-chosen visual direction, not scaffold-chosen direction
|
|
104
|
+
- `conceptualAnchor` and how typography, spacing, morphology, motion, and responsive composition derive from it when no external research was provided
|
|
84
105
|
- agent-chosen semantic color roles, typography system, spacing rhythm, and motion approach
|
|
85
106
|
- token layering with primitive, semantic, and component tokens
|
|
86
107
|
- viewport mutation rules for mobile, tablet, and desktop
|
|
@@ -99,6 +120,7 @@ The review must block or flag:
|
|
|
99
120
|
- scale-only responsive behavior
|
|
100
121
|
- unresearched dependency choices
|
|
101
122
|
- default component-kit styling without product rationale
|
|
123
|
+
- missing or disconnected `conceptualAnchor` when no external design research was provided
|
|
102
124
|
- visual direction copied from unrelated memory or external references
|
|
103
125
|
- genericity findings that cannot name the exact drift signal
|
|
104
126
|
|
package/.cursorrules
CHANGED
package/.windsurfrules
CHANGED
|
@@ -131,6 +131,76 @@ function buildDesignIntentContractObject({
|
|
|
131
131
|
distinctiveMoves: inferredKeywords.distinctiveMoves,
|
|
132
132
|
copiedReferenceAllowed: false,
|
|
133
133
|
},
|
|
134
|
+
externalResearchIntake: {
|
|
135
|
+
userSuppliedResearchPolicy: 'read-as-candidate-evidence-not-final-prescription',
|
|
136
|
+
requireSummaryOfUsedSignals: true,
|
|
137
|
+
requireFitFiltering: true,
|
|
138
|
+
requireOfficialDocsVerificationForTechnologyClaims: true,
|
|
139
|
+
candidateDomains: [
|
|
140
|
+
'visual-direction',
|
|
141
|
+
'motion-and-scroll',
|
|
142
|
+
'ui-primitives',
|
|
143
|
+
'canvas-3d-or-rich-media',
|
|
144
|
+
'charts-and-data-visualization',
|
|
145
|
+
'icons-and-illustration',
|
|
146
|
+
'typography-and-interaction-patterns',
|
|
147
|
+
],
|
|
148
|
+
finalDecisionAuthority: 'agent-llm-from-project-fit-accessibility-performance-maintainability-and-current-official-docs',
|
|
149
|
+
},
|
|
150
|
+
conceptualAnchor: {
|
|
151
|
+
mode: 'required-when-no-external-research',
|
|
152
|
+
seedMode: 'selection-policy-only',
|
|
153
|
+
requiresAgentSelectionBeforeUiImplementation: true,
|
|
154
|
+
candidateSelectionPolicy: {
|
|
155
|
+
considerAtLeast: 3,
|
|
156
|
+
discardPredictableCandidates: true,
|
|
157
|
+
doNotRevealHiddenCandidateList: true,
|
|
158
|
+
outputOnlyChosenAnchor: true,
|
|
159
|
+
},
|
|
160
|
+
forbiddenFinalAnchorTerms: [
|
|
161
|
+
'dashboard',
|
|
162
|
+
'portal',
|
|
163
|
+
'cards',
|
|
164
|
+
'admin-panel',
|
|
165
|
+
'saas-shell',
|
|
166
|
+
'minimalist-interface',
|
|
167
|
+
],
|
|
168
|
+
sourceDomains: [
|
|
169
|
+
'complex-physical-engineering',
|
|
170
|
+
'high-end-industrial-design',
|
|
171
|
+
'experimental-editorial-structure',
|
|
172
|
+
'advanced-architecture',
|
|
173
|
+
'scientific-instrumentation',
|
|
174
|
+
'spatial-information-systems',
|
|
175
|
+
],
|
|
176
|
+
requiredDerivedAxes: [
|
|
177
|
+
'typography',
|
|
178
|
+
'spacing',
|
|
179
|
+
'density',
|
|
180
|
+
'color-behavior',
|
|
181
|
+
'morphology',
|
|
182
|
+
'motion',
|
|
183
|
+
'responsive-composition',
|
|
184
|
+
],
|
|
185
|
+
finalAnchorContract: {
|
|
186
|
+
requiredFields: [
|
|
187
|
+
'name',
|
|
188
|
+
'sourceDomain',
|
|
189
|
+
'rationale',
|
|
190
|
+
'derivedTokenLogic',
|
|
191
|
+
'cohesionChecks',
|
|
192
|
+
],
|
|
193
|
+
derivedTokenLogicAxes: [
|
|
194
|
+
'typography',
|
|
195
|
+
'spacing',
|
|
196
|
+
'density',
|
|
197
|
+
'color-behavior',
|
|
198
|
+
'morphology',
|
|
199
|
+
'motion',
|
|
200
|
+
'responsive-composition',
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
134
204
|
mathSystems: {
|
|
135
205
|
typographyScaleRatio: inferredKeywords.typographyScaleRatio,
|
|
136
206
|
baseGridUnit: inferredKeywords.baseGridUnit,
|
|
@@ -414,6 +484,8 @@ function buildDesignIntentContractObject({
|
|
|
414
484
|
genericitySignals: [
|
|
415
485
|
'offline-prescribed-style-used-as-final-direction',
|
|
416
486
|
'unresearched-library-or-framework-choice',
|
|
487
|
+
'missing-conceptual-anchor-without-external-research',
|
|
488
|
+
'visual-decisions-not-derived-from-conceptual-anchor',
|
|
417
489
|
'default-component-kit-treatment-without-product-rationale',
|
|
418
490
|
'scale-only-responsive-layout',
|
|
419
491
|
'template-shell-without-product-rationale',
|
|
@@ -422,6 +494,7 @@ function buildDesignIntentContractObject({
|
|
|
422
494
|
'inaccessible-or-decorative-motion',
|
|
423
495
|
],
|
|
424
496
|
validBoldSignals: [
|
|
497
|
+
'single-cohesive-conceptual-anchor',
|
|
425
498
|
'context-derived-visual-direction',
|
|
426
499
|
'official-docs-backed-library-choice',
|
|
427
500
|
'responsive-recomposition-by-task-priority',
|
|
@@ -469,11 +542,14 @@ function buildDesignIntentContractObject({
|
|
|
469
542
|
'Modern libraries and interaction patterns may be used when the LLM verifies they fit the project and current official docs.',
|
|
470
543
|
'Motion may be rich and memorable when it improves the product experience, but it must stay purposeful, performant, and optional for reduced-motion users.',
|
|
471
544
|
'At least one visual, interaction, content, or motion decision must be recognizable at a glance and justified from context.',
|
|
545
|
+
'When no external design research is provided, a single advanced conceptual anchor must unify typography, spacing, morphology, motion, and responsive composition.',
|
|
472
546
|
'When the user asks for a zero-based redesign, existing UI becomes content and behavior evidence only; prior visual DNA must be discarded unless explicitly approved.',
|
|
473
547
|
],
|
|
474
548
|
forbiddenPatterns: [
|
|
475
549
|
'offline-prescribed-style-used-as-final-direction',
|
|
476
550
|
'unresearched-library-or-framework-choice',
|
|
551
|
+
'missing-conceptual-anchor-without-external-research',
|
|
552
|
+
'visual-decisions-not-derived-from-conceptual-anchor',
|
|
477
553
|
'default-component-kit-treatment-without-product-rationale',
|
|
478
554
|
'scale-only-responsive-layout',
|
|
479
555
|
'template-shell-without-product-rationale',
|
|
@@ -495,6 +571,7 @@ function buildDesignIntentContractObject({
|
|
|
495
571
|
requireStructuredDesignExecutionPolicy: true,
|
|
496
572
|
requireStructuredDesignHandoff: true,
|
|
497
573
|
requireVisualResetStrategyWhenZeroBasedRedesignRequested: true,
|
|
574
|
+
requireConceptualAnchorWhenNoExternalResearch: true,
|
|
498
575
|
requireReviewRubric: true,
|
|
499
576
|
requireGenericityExplanation: true,
|
|
500
577
|
genericityAutoFail: true,
|
|
@@ -510,6 +587,7 @@ function buildDesignIntentContractObject({
|
|
|
510
587
|
requireViewportMutationRules: true,
|
|
511
588
|
requirePurposefulMotionGuidelines: true,
|
|
512
589
|
requireRecognizableVisualBet: true,
|
|
590
|
+
requireConceptualAnchor: true,
|
|
513
591
|
bootstrapPrompt: '.agent-context/prompts/bootstrap-design.md',
|
|
514
592
|
autoLoadedRuleFiles: [
|
|
515
593
|
'.agent-context/prompts/bootstrap-design.md',
|
|
@@ -544,6 +622,95 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
544
622
|
validationErrors.push('designIntent.designPhilosophy must be a non-empty string.');
|
|
545
623
|
}
|
|
546
624
|
|
|
625
|
+
if (!designIntentContract.externalResearchIntake || typeof designIntentContract.externalResearchIntake !== 'object') {
|
|
626
|
+
validationErrors.push('designIntent.externalResearchIntake must exist.');
|
|
627
|
+
} else {
|
|
628
|
+
if (designIntentContract.externalResearchIntake.userSuppliedResearchPolicy !== 'read-as-candidate-evidence-not-final-prescription') {
|
|
629
|
+
validationErrors.push('designIntent.externalResearchIntake.userSuppliedResearchPolicy must preserve user research as candidate evidence.');
|
|
630
|
+
}
|
|
631
|
+
if (designIntentContract.externalResearchIntake.requireOfficialDocsVerificationForTechnologyClaims !== true) {
|
|
632
|
+
validationErrors.push('designIntent.externalResearchIntake.requireOfficialDocsVerificationForTechnologyClaims must equal true.');
|
|
633
|
+
}
|
|
634
|
+
if (
|
|
635
|
+
!Array.isArray(designIntentContract.externalResearchIntake.candidateDomains)
|
|
636
|
+
|| !designIntentContract.externalResearchIntake.candidateDomains.includes('motion-and-scroll')
|
|
637
|
+
) {
|
|
638
|
+
validationErrors.push('designIntent.externalResearchIntake.candidateDomains must include motion-and-scroll.');
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (!designIntentContract.conceptualAnchor || typeof designIntentContract.conceptualAnchor !== 'object') {
|
|
643
|
+
validationErrors.push('designIntent.conceptualAnchor must exist.');
|
|
644
|
+
} else {
|
|
645
|
+
const conceptualAnchor = designIntentContract.conceptualAnchor;
|
|
646
|
+
if (conceptualAnchor.mode !== 'required-when-no-external-research') {
|
|
647
|
+
validationErrors.push('designIntent.conceptualAnchor.mode must equal "required-when-no-external-research".');
|
|
648
|
+
}
|
|
649
|
+
if (conceptualAnchor.seedMode !== 'selection-policy-only') {
|
|
650
|
+
validationErrors.push('designIntent.conceptualAnchor.seedMode must equal "selection-policy-only".');
|
|
651
|
+
}
|
|
652
|
+
if (conceptualAnchor.requiresAgentSelectionBeforeUiImplementation !== true) {
|
|
653
|
+
validationErrors.push('designIntent.conceptualAnchor.requiresAgentSelectionBeforeUiImplementation must equal true.');
|
|
654
|
+
}
|
|
655
|
+
const candidateSelectionPolicy = conceptualAnchor.candidateSelectionPolicy;
|
|
656
|
+
if (!candidateSelectionPolicy || typeof candidateSelectionPolicy !== 'object') {
|
|
657
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy must exist.');
|
|
658
|
+
} else {
|
|
659
|
+
if (candidateSelectionPolicy.considerAtLeast < 3) {
|
|
660
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.considerAtLeast must be at least 3.');
|
|
661
|
+
}
|
|
662
|
+
if (candidateSelectionPolicy.discardPredictableCandidates !== true) {
|
|
663
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.discardPredictableCandidates must equal true.');
|
|
664
|
+
}
|
|
665
|
+
if (candidateSelectionPolicy.doNotRevealHiddenCandidateList !== true) {
|
|
666
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.doNotRevealHiddenCandidateList must equal true.');
|
|
667
|
+
}
|
|
668
|
+
if (candidateSelectionPolicy.outputOnlyChosenAnchor !== true) {
|
|
669
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.outputOnlyChosenAnchor must equal true.');
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
if (
|
|
673
|
+
!Array.isArray(conceptualAnchor.forbiddenFinalAnchorTerms)
|
|
674
|
+
|| !conceptualAnchor.forbiddenFinalAnchorTerms.includes('dashboard')
|
|
675
|
+
|| !conceptualAnchor.forbiddenFinalAnchorTerms.includes('cards')
|
|
676
|
+
) {
|
|
677
|
+
validationErrors.push('designIntent.conceptualAnchor.forbiddenFinalAnchorTerms must reject basic UI labels.');
|
|
678
|
+
}
|
|
679
|
+
if (
|
|
680
|
+
!Array.isArray(conceptualAnchor.sourceDomains)
|
|
681
|
+
|| conceptualAnchor.sourceDomains.length < 4
|
|
682
|
+
|| !conceptualAnchor.sourceDomains.includes('complex-physical-engineering')
|
|
683
|
+
) {
|
|
684
|
+
validationErrors.push('designIntent.conceptualAnchor.sourceDomains must list broad non-template anchor domains.');
|
|
685
|
+
}
|
|
686
|
+
if (
|
|
687
|
+
!Array.isArray(conceptualAnchor.requiredDerivedAxes)
|
|
688
|
+
|| !conceptualAnchor.requiredDerivedAxes.includes('typography')
|
|
689
|
+
|| !conceptualAnchor.requiredDerivedAxes.includes('responsive-composition')
|
|
690
|
+
) {
|
|
691
|
+
validationErrors.push('designIntent.conceptualAnchor.requiredDerivedAxes must include typography and responsive-composition.');
|
|
692
|
+
}
|
|
693
|
+
const finalAnchorContract = conceptualAnchor.finalAnchorContract;
|
|
694
|
+
if (!finalAnchorContract || typeof finalAnchorContract !== 'object') {
|
|
695
|
+
validationErrors.push('designIntent.conceptualAnchor.finalAnchorContract must exist.');
|
|
696
|
+
} else {
|
|
697
|
+
if (
|
|
698
|
+
!Array.isArray(finalAnchorContract.requiredFields)
|
|
699
|
+
|| !finalAnchorContract.requiredFields.includes('derivedTokenLogic')
|
|
700
|
+
|| !finalAnchorContract.requiredFields.includes('cohesionChecks')
|
|
701
|
+
) {
|
|
702
|
+
validationErrors.push('designIntent.conceptualAnchor.finalAnchorContract.requiredFields must require derivedTokenLogic and cohesionChecks.');
|
|
703
|
+
}
|
|
704
|
+
if (
|
|
705
|
+
!Array.isArray(finalAnchorContract.derivedTokenLogicAxes)
|
|
706
|
+
|| !finalAnchorContract.derivedTokenLogicAxes.includes('motion')
|
|
707
|
+
|| !finalAnchorContract.derivedTokenLogicAxes.includes('morphology')
|
|
708
|
+
) {
|
|
709
|
+
validationErrors.push('designIntent.conceptualAnchor.finalAnchorContract.derivedTokenLogicAxes must include motion and morphology.');
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
547
714
|
if (!designIntentContract.mathSystems || typeof designIntentContract.mathSystems !== 'object') {
|
|
548
715
|
validationErrors.push('designIntent.mathSystems must exist.');
|
|
549
716
|
} else {
|
|
@@ -175,6 +175,8 @@ export function buildDesignBootstrapPrompt({
|
|
|
175
175
|
'29. If a future user asks for zero-based redesign ("redesign from zero", "redesain dari 0", "ulang dari 0", or "research ulang"), treat existing UI as content and behavior evidence only, not as visual continuity.',
|
|
176
176
|
'30. In zero-based redesign mode, the new contract must name the discarded prior visual DNA and materially reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.',
|
|
177
177
|
'31. If modern UI, animation, scroll, 3D, canvas, chart, or icon libraries are useful, choose them from current official docs and record source URL, fetched date, reason, risk, and accessibility fallback.',
|
|
178
|
+
'32. If the user supplies research files, library lists, screenshots, articles, or benchmark notes, read them as candidate evidence, summarize the useful signals, filter by project fit, and verify technology claims against current official docs before implementation.',
|
|
179
|
+
'33. If no external research or reference is supplied for UI work, choose one advanced conceptual anchor before coding. Consider multiple candidate anchors internally, discard predictable ones, output only the chosen anchor and rationale, and derive typography, spacing, morphology, motion, and responsive composition from that anchor.',
|
|
178
180
|
'',
|
|
179
181
|
'## Project Inputs',
|
|
180
182
|
`- Project name: ${discoveryAnswers.projectName}`,
|
|
@@ -203,7 +205,9 @@ export function buildDesignBootstrapPrompt({
|
|
|
203
205
|
'10. If repoEvidence.designEvidenceSummary.structuredInspection exists, use it as stronger evidence for class surfaces, inline style bypasses, and expression-backed UI structure before defaulting to generic assumptions.',
|
|
204
206
|
'11. Ensure both files stay project-specific, dynamic, and practical for implementation and review. The seed may guide structure, but it must not decide style offline.',
|
|
205
207
|
'12. Keep visualResetStrategy in the machine-readable handoff so reset-language tasks cannot quietly become restyles of the previous UI.',
|
|
206
|
-
'13.
|
|
208
|
+
'13. Preserve externalResearchIntake so user-provided research becomes reviewed evidence without turning into an offline style or dependency preset.',
|
|
209
|
+
'14. Preserve conceptualAnchor so prompt-only UI work has one cohesive non-template concept instead of a mixed collection of bold but unrelated visual decisions.',
|
|
210
|
+
'15. After the contract exists, use it as a first-class source for future UI tasks.',
|
|
207
211
|
'',
|
|
208
212
|
].join('\n');
|
|
209
213
|
}
|