@ryuenn3123/agentic-senior-core 3.0.42 → 3.0.43
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 +3 -2
- package/.agent-context/prompts/init-project.md +2 -2
- package/.agent-context/rules/docker-runtime.md +9 -3
- package/.agent-context/rules/frontend-architecture.md +5 -1
- package/.cursorrules +1 -1
- package/.windsurfrules +1 -1
- package/lib/cli/commands/init.mjs +1 -0
- package/lib/cli/compiler.mjs +23 -0
- package/lib/cli/project-scaffolder/design-contract/validation.mjs +34 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +26 -4
- package/lib/cli/project-scaffolder/prompt-builders.mjs +56 -19
- package/package.json +1 -1
|
@@ -52,7 +52,7 @@ Before UI code, record:
|
|
|
52
52
|
- one morphology or composition choice that avoids interchangeable card stacks when the product allows it
|
|
53
53
|
- at least three at-a-glance product-specific signals for new screens or broad redesigns
|
|
54
54
|
|
|
55
|
-
Do not ship AI-safe UI. Record exact drift signals in `reviewRubric`; at minimum reject decorative grid wallpaper, default line backgrounds, soft glow backgrounds, generic abstract marks, and first-output composition with only local copy swapped in when they have no product function.
|
|
55
|
+
Do not ship AI-safe UI. Record exact drift signals in `reviewRubric`; at minimum reject decorative grid wallpaper, default line backgrounds, calibration-mark wallpaper, soft glow backgrounds, generic abstract marks, testing/demo/placeholder UI copy, terminal-only user flows, and first-output composition with only local copy swapped in when they have no product function. Treat measurement, calibration, crop, route, timeline, and inspection marks as task overlays or control affordances only; never promote them to the page background, hero backdrop, or first-output visual texture.
|
|
56
56
|
|
|
57
57
|
## Brave Redesign Default
|
|
58
58
|
For UI design work, the agent owns the ambition decision. For broad screens, redesigns, or new visual systems, treat expressive motion, spatial hierarchy, distinctive composition, and product-specific interaction as the baseline even when the user did not say "rich". Do not reduce the request to a safer version of the existing UI, a static implementation, or a component-kit rearrangement because research or dependency selection feels inconvenient.
|
|
@@ -148,7 +148,7 @@ The JSON is the source of truth for machine review. It must stay project-specifi
|
|
|
148
148
|
- `motionPaletteDecision`
|
|
149
149
|
- `conceptualAnchor`
|
|
150
150
|
- `derivedTokenLogic`
|
|
151
|
-
- `aiSafeUiAudit`
|
|
151
|
+
- `aiSafeUiAudit` and `productionContentPolicy`
|
|
152
152
|
- `tokenSystem`, `colorTruth`, `crossViewportAdaptation`, `motionSystem`, and `componentMorphology`
|
|
153
153
|
- `accessibilityPolicy`
|
|
154
154
|
- `designExecutionPolicy`
|
|
@@ -171,6 +171,7 @@ Block or flag:
|
|
|
171
171
|
- default component-kit styling without product rationale
|
|
172
172
|
- nonfunctional background effects, including decorative grid wallpaper
|
|
173
173
|
- grid or line backgrounds used as filler instead of product function
|
|
174
|
+
- testing, demo, sample, placeholder, lorem, TODO, coming soon, or scaffold labels visible in shipped UI unless they are real product states; terminal-only core user flows unless the product is explicitly a CLI, developer tool, or operational runbook
|
|
174
175
|
- palette choices that use readability as an excuse for safe defaults
|
|
175
176
|
- visual direction copied from unrelated memory or external references
|
|
176
177
|
- genericity findings that cannot name the exact drift signal
|
|
@@ -8,7 +8,7 @@ When a new project is created or initialized, the agent must automatically:
|
|
|
8
8
|
1. Read [AGENTS.md](../../AGENTS.md) to understand the canonical bootstrap chain and active entrypoints.
|
|
9
9
|
2. Resolve the smallest relevant rule set from [.agent-context/rules/](../rules/) instead of scanning the whole directory by default.
|
|
10
10
|
3. Review dynamic runtime signals from [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), repository evidence, task constraints, and live official documentation when runtime or ecosystem facts matter.
|
|
11
|
-
4. If Docker or Compose is in scope, load [docker-runtime.md](../rules/docker-runtime.md) and verify the latest official Docker guidance before authoring container assets.
|
|
11
|
+
4. If Docker or Compose is in scope, load [docker-runtime.md](../rules/docker-runtime.md) and verify the latest official Docker guidance before authoring container assets. Materialize the selected development/production assets rather than stopping at prose.
|
|
12
12
|
5. For unresolved framework or package setup, recommend the latest stable compatible dependency set and official framework setup flow from live official documentation before coding unless a documented compatibility constraint blocks it.
|
|
13
13
|
|
|
14
14
|
## Required Planning Mode
|
|
@@ -42,7 +42,7 @@ If the user specifies a framework, runtime, or architecture constraint, the agen
|
|
|
42
42
|
- Every module must follow [architecture.md](../rules/architecture.md).
|
|
43
43
|
- Every dependency must be justified per [efficiency-vs-hype.md](../rules/efficiency-vs-hype.md).
|
|
44
44
|
- Use official framework setup commands or canonical starter flows when they produce newer, better-supported dependency defaults than manual package assembly.
|
|
45
|
-
- 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.
|
|
45
|
+
- 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.
|
|
46
46
|
|
|
47
47
|
## Runtime and Architecture Reference
|
|
48
48
|
|
|
@@ -20,7 +20,13 @@ Use this rule when Docker is enabled in project context.
|
|
|
20
20
|
- Development lane priorities: fast rebuild, hot reload support, debugger-friendly startup, local volume strategy.
|
|
21
21
|
- Production lane priorities: minimal image size, reproducible build, non-root runtime, strict startup command.
|
|
22
22
|
|
|
23
|
-
## 3.
|
|
23
|
+
## 3. Selection Means Asset Materialization
|
|
24
|
+
- If Docker is selected for development, create or refine `.dockerignore`, development Dockerfile stage(s), `compose.yaml`, and a runbook before claiming the setup is complete.
|
|
25
|
+
- If Docker is selected for production, create or refine production Dockerfile stage(s), `compose.prod.yaml` or a documented production Compose override, health checks or startup checks, exposed ports, and a deployment runbook before claiming the setup is complete.
|
|
26
|
+
- If Docker is selected for both lanes, keep development and production assets separate enough that hot reload, bind mounts, debug tooling, and production runtime hardening cannot blur into one unsafe path.
|
|
27
|
+
- If the user asks to author files without commands, write the assets and documented commands, but do not execute Docker build, Compose, or registry commands.
|
|
28
|
+
|
|
29
|
+
## 4. Security and Supply Chain
|
|
24
30
|
- Use minimal trusted base images with explicit versions.
|
|
25
31
|
- Use multi-stage builds for production images when possible.
|
|
26
32
|
- Avoid baking secrets into image layers.
|
|
@@ -28,13 +34,13 @@ Use this rule when Docker is enabled in project context.
|
|
|
28
34
|
- Use fresh base-image validation with `docker build --pull` and use `--no-cache` when a clean dependency refresh is required.
|
|
29
35
|
- Keep a `.dockerignore` strategy in mind so build contexts stay small and do not leak unnecessary files into the image.
|
|
30
36
|
|
|
31
|
-
##
|
|
37
|
+
## 5. Operational Clarity
|
|
32
38
|
- Docker instructions must document expected entrypoint and exposed ports.
|
|
33
39
|
- Local development command and production deployment command must be explicit.
|
|
34
40
|
- If Docker is not selected for the project, do not force containerization tasks.
|
|
35
41
|
- If Compose is used, document which file is the primary entrypoint, which services are dev-only versus production-facing, and why the chosen layout matches the current Docker docs rather than a legacy blog pattern.
|
|
36
42
|
|
|
37
|
-
##
|
|
43
|
+
## 6. Review Requirements
|
|
38
44
|
- Verify the generated Docker workflow matches selected runtime environment (Linux/WSL, Windows, macOS).
|
|
39
45
|
- Verify development and production instructions are not mixed into one unsafe image path.
|
|
40
46
|
- Ensure API and service health checks are compatible with container startup behavior.
|
|
@@ -45,7 +45,11 @@ Use the rename test: if the UI can be renamed to another product category withou
|
|
|
45
45
|
|
|
46
46
|
Use the old-design regression test for broad redesigns: if the UI reads as the previous design with fewer details, removed animation, simplified sections, or a new palette on the same composition, revise before implementation is considered complete.
|
|
47
47
|
|
|
48
|
-
Background lines, grids, scanlines, noise, glows, blobs, abstract logos, and decorative geometry are invalid as wallpaper. Do not use grid or line backgrounds as first-output filler. Use them only for a named product function such as alignment, crop guidance, map/route orientation, timeline reading, measurement, status, or motion continuity.
|
|
48
|
+
Background lines, grids, scanlines, noise, glows, blobs, abstract logos, calibration marks, and decorative geometry are invalid as wallpaper. Do not use grid or line backgrounds as first-output filler. Use them only for a named product function such as alignment, crop guidance, map/route orientation, timeline reading, measurement, status, or motion continuity.
|
|
49
|
+
|
|
50
|
+
Measurement, calibration, crop, map, route, and inspection marks are task-bound overlays or control affordances. They must not become the page background, hero backdrop, or default visual texture.
|
|
51
|
+
|
|
52
|
+
Production UI must read as ship-ready: no visible testing, demo, sample, placeholder, lorem, TODO, coming soon, or scaffold labels unless they are intentional product states. User-facing workflows need an operable UI path; terminal-only core flows are valid only for CLI, developer-tool, or runbook products.
|
|
49
53
|
|
|
50
54
|
## Dynamic Anchor Gate
|
|
51
55
|
|
package/.cursorrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .cursorrules - Legacy Thin Adapter
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.43
|
|
4
4
|
Adapter Mode: legacy-thin
|
|
5
5
|
Adapter Source: .agent-instructions.md when present; fallback .instructions.md
|
|
6
6
|
Canonical baseline: .instructions.md
|
package/.windsurfrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .windsurfrules - Legacy Thin Adapter
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.43
|
|
4
4
|
Adapter Mode: legacy-thin
|
|
5
5
|
Adapter Source: .agent-instructions.md when present; fallback .instructions.md
|
|
6
6
|
Canonical baseline: .instructions.md
|
|
@@ -524,6 +524,7 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
524
524
|
detectedLabel: detectedRuntimeEnvironment.label,
|
|
525
525
|
detectionSource: detectedRuntimeEnvironment.source,
|
|
526
526
|
},
|
|
527
|
+
dockerStrategy: discoveryAnswers?.dockerStrategy || null,
|
|
527
528
|
operationMode: 'init',
|
|
528
529
|
tokenOptimization: {
|
|
529
530
|
enabled: isTokenOptimizationEnabled,
|
package/lib/cli/compiler.mjs
CHANGED
|
@@ -128,6 +128,27 @@ function buildLegacyRootAdapterContent(adapterFileName, toolLabel) {
|
|
|
128
128
|
].join('\n');
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
function buildContainerizationStrategySnapshot(dockerStrategy) {
|
|
132
|
+
const selectedDockerStrategy = String(dockerStrategy || '').trim();
|
|
133
|
+
const normalizedDockerStrategy = selectedDockerStrategy.toLowerCase();
|
|
134
|
+
const dockerSelected = Boolean(selectedDockerStrategy) && !normalizedDockerStrategy.startsWith('no docker');
|
|
135
|
+
const developmentRequired = dockerSelected
|
|
136
|
+
&& (normalizedDockerStrategy.includes('development') || normalizedDockerStrategy.includes('both'));
|
|
137
|
+
const productionRequired = dockerSelected
|
|
138
|
+
&& (normalizedDockerStrategy.includes('production') || normalizedDockerStrategy.includes('both'));
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
selected: selectedDockerStrategy || null,
|
|
142
|
+
developmentRequired,
|
|
143
|
+
productionRequired,
|
|
144
|
+
materializationRequired: dockerSelected,
|
|
145
|
+
requiredRuleFile: dockerSelected ? '.agent-context/rules/docker-runtime.md' : null,
|
|
146
|
+
commandExecutionPolicy: dockerSelected
|
|
147
|
+
? 'author-files-first-run-docker-commands-only-when-requested-or-approved'
|
|
148
|
+
: null,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
131
152
|
export async function writeSelectedPolicy(targetDirectoryPath, selectedProfileName) {
|
|
132
153
|
const policyFilePath = path.join(targetDirectoryPath, '.agent-context', 'policies', POLICY_FILE_NAME);
|
|
133
154
|
const parsedPolicy = JSON.parse(await fs.readFile(policyFilePath, 'utf8'));
|
|
@@ -149,6 +170,7 @@ export async function writeOnboardingReport({
|
|
|
149
170
|
setupDurationMs,
|
|
150
171
|
projectDetection,
|
|
151
172
|
runtimeEnvironment = null,
|
|
173
|
+
dockerStrategy = null,
|
|
152
174
|
operationMode = 'init',
|
|
153
175
|
tokenOptimization = undefined,
|
|
154
176
|
memoryContinuity = undefined,
|
|
@@ -199,6 +221,7 @@ export async function writeOnboardingReport({
|
|
|
199
221
|
ciGuardrailsEnabled: includeCiGuardrails,
|
|
200
222
|
setupDurationMs,
|
|
201
223
|
runtimeEnvironment,
|
|
224
|
+
containerizationStrategy: buildContainerizationStrategySnapshot(dockerStrategy),
|
|
202
225
|
tokenOptimization: resolvedTokenOptimization,
|
|
203
226
|
memoryContinuity: resolvedMemoryContinuity,
|
|
204
227
|
autoDetection: {
|
|
@@ -291,6 +291,9 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
291
291
|
if (!String(aiSafeUiAudit.failureDefinition || '').includes('AI-safe')) {
|
|
292
292
|
validationErrors.push('designIntent.aiSafeUiAudit.failureDefinition must define AI-safe UI drift.');
|
|
293
293
|
}
|
|
294
|
+
if (!String(aiSafeUiAudit.failureDefinition || '').includes('placeholder copy')) {
|
|
295
|
+
validationErrors.push('designIntent.aiSafeUiAudit.failureDefinition must reject test/demo/placeholder UI copy.');
|
|
296
|
+
}
|
|
294
297
|
if (!String(aiSafeUiAudit.interchangeabilityTest || '').includes('renamed')) {
|
|
295
298
|
validationErrors.push('designIntent.aiSafeUiAudit.interchangeabilityTest must include the rename/interchangeability test.');
|
|
296
299
|
}
|
|
@@ -349,6 +352,27 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
349
352
|
}
|
|
350
353
|
}
|
|
351
354
|
|
|
355
|
+
if (!designIntentContract.productionContentPolicy || typeof designIntentContract.productionContentPolicy !== 'object') {
|
|
356
|
+
validationErrors.push('designIntent.productionContentPolicy must exist.');
|
|
357
|
+
} else {
|
|
358
|
+
const productionContentPolicy = designIntentContract.productionContentPolicy;
|
|
359
|
+
if (productionContentPolicy.status !== 'agent-must-complete-before-ui-implementation') {
|
|
360
|
+
validationErrors.push('designIntent.productionContentPolicy.status must require completion before UI implementation.');
|
|
361
|
+
}
|
|
362
|
+
if (!String(productionContentPolicy.userFacingCopyRule || '').includes('testing')) {
|
|
363
|
+
validationErrors.push('designIntent.productionContentPolicy.userFacingCopyRule must reject testing/demo/placeholder UI copy.');
|
|
364
|
+
}
|
|
365
|
+
if (!String(productionContentPolicy.terminalDependencyRule || '').includes('Terminal commands')) {
|
|
366
|
+
validationErrors.push('designIntent.productionContentPolicy.terminalDependencyRule must keep terminal commands out of core UI flows.');
|
|
367
|
+
}
|
|
368
|
+
if (!Array.isArray(productionContentPolicy.allowedExceptions) || productionContentPolicy.allowedExceptions.length < 3) {
|
|
369
|
+
validationErrors.push('designIntent.productionContentPolicy.allowedExceptions must list limited exceptions.');
|
|
370
|
+
}
|
|
371
|
+
if (productionContentPolicy.blockingByDefault !== true) {
|
|
372
|
+
validationErrors.push('designIntent.productionContentPolicy.blockingByDefault must equal true.');
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
352
376
|
if (!designIntentContract.tokenSystem || typeof designIntentContract.tokenSystem !== 'object') {
|
|
353
377
|
validationErrors.push('designIntent.tokenSystem must exist.');
|
|
354
378
|
} else {
|
|
@@ -683,6 +707,8 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
683
707
|
'requireBuildFromHandoff',
|
|
684
708
|
'requireGapNotesBeforeFallback',
|
|
685
709
|
'forbidGenericLayoutFallbackWithoutReason',
|
|
710
|
+
'forbidTestingDemoCopyInUi',
|
|
711
|
+
'forbidTerminalOnlyUserFlows',
|
|
686
712
|
]) {
|
|
687
713
|
if (implementationGuardrails[requiredFlagName] !== true) {
|
|
688
714
|
validationErrors.push(`designIntent.designExecutionHandoff.implementationGuardrails.${requiredFlagName} must equal true.`);
|
|
@@ -723,6 +749,10 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
723
749
|
'ai-color-default-palette-without-product-role-behavior',
|
|
724
750
|
'interchangeable-product-renaming-test-fails',
|
|
725
751
|
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
752
|
+
'decorative-line-or-calibration-wallpaper-without-product-function',
|
|
753
|
+
'measurement-or-calibration-marks-used-as-page-background',
|
|
754
|
+
'testing-demo-or-placeholder-copy-shipped-to-ui',
|
|
755
|
+
'terminal-only-user-flow-without-product-reason',
|
|
726
756
|
'motion-or-3d-omitted-from-fear-without-fit-analysis',
|
|
727
757
|
]) {
|
|
728
758
|
if (!designIntentContract.reviewRubric.genericitySignals.includes(requiredSignal)) {
|
|
@@ -777,6 +807,10 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
777
807
|
'ai-color-default-palette-without-product-role-behavior',
|
|
778
808
|
'interchangeable-product-renaming-test-fails',
|
|
779
809
|
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
810
|
+
'decorative-line-or-calibration-wallpaper-without-product-function',
|
|
811
|
+
'measurement-or-calibration-marks-used-as-page-background',
|
|
812
|
+
'testing-demo-or-placeholder-copy-shipped-to-ui',
|
|
813
|
+
'terminal-only-user-flow-without-product-reason',
|
|
780
814
|
'motion-or-3d-omitted-from-fear-without-fit-analysis',
|
|
781
815
|
]) {
|
|
782
816
|
if (!designIntentContract.forbiddenPatterns.includes(requiredPattern)) {
|
|
@@ -12,6 +12,10 @@ const GENERICITY_DRIFT_SIGNALS = [
|
|
|
12
12
|
'brandless-clean-template-look',
|
|
13
13
|
'interchangeable-product-renaming-test-fails',
|
|
14
14
|
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
15
|
+
'decorative-line-or-calibration-wallpaper-without-product-function',
|
|
16
|
+
'measurement-or-calibration-marks-used-as-page-background',
|
|
17
|
+
'testing-demo-or-placeholder-copy-shipped-to-ui',
|
|
18
|
+
'terminal-only-user-flow-without-product-reason',
|
|
15
19
|
'safe-cream-slate-or-monochrome-palette-used-as-readability-excuse',
|
|
16
20
|
'generic-abstract-logo-or-iconography',
|
|
17
21
|
'timid-anchor-that-renames-dashboard-or-admin-shell',
|
|
@@ -260,7 +264,7 @@ function buildDesignIntentContractObject({
|
|
|
260
264
|
derivedTokenLogic: {
|
|
261
265
|
anchorReference: 'agent-defined-anchor-reference',
|
|
262
266
|
colorDerivationSource: 'Explain semantic color roles from anchorReference; reject generic palettes without anchor evidence.',
|
|
263
|
-
spacingDerivationSource: 'Explain
|
|
267
|
+
spacingDerivationSource: 'Explain spacing rhythm, density, and exceptions from anchorReference. Spacing grids are layout math, not decorative background lines.',
|
|
264
268
|
typographyDerivationSource: 'Explain display, body, metadata, and data roles from anchorReference.',
|
|
265
269
|
motionDerivationSource: 'Explain duration, easing, choreography, and reduced-motion from anchorReference.',
|
|
266
270
|
validationRule: 'Every token must trace to anchorReference; revise tokens that cannot.',
|
|
@@ -269,12 +273,12 @@ function buildDesignIntentContractObject({
|
|
|
269
273
|
productCategorySignal: 'agent-inferred-starting-heuristic',
|
|
270
274
|
densityDecisionSource: 'Choose motion density from task, content, brand, device, performance, and accessibility. Categories are heuristics.',
|
|
271
275
|
requiredInteractionStates: ['default', 'hover', 'focus-visible', 'active', 'disabled', 'loading', 'empty', 'error', 'success', 'transition'],
|
|
272
|
-
paletteAutopilotRisks: ['dark-slate-default', 'cream-beige-default', 'purple-blue-gradient-default', 'monochrome-template-default', 'uniform-card-surface-default', 'generic-grid-wallpaper-default', 'soft-glow-ai-template-default', 'cyber-neon-terminal-default'],
|
|
276
|
+
paletteAutopilotRisks: ['dark-slate-default', 'cream-beige-default', 'purple-blue-gradient-default', 'monochrome-template-default', 'uniform-card-surface-default', 'generic-grid-wallpaper-default', 'generic-line-wallpaper-default', 'calibration-mark-wallpaper-default', 'soft-glow-ai-template-default', 'cyber-neon-terminal-default'],
|
|
273
277
|
spatialDecision: 'State 3D/canvas/WebGL fit. If omitted, name product-fit reason and replacement interaction quality.',
|
|
274
278
|
},
|
|
275
279
|
aiSafeUiAudit: {
|
|
276
280
|
status: 'agent-must-complete-before-ui-implementation',
|
|
277
|
-
failureDefinition: 'AI-safe UI uses template cards, generic marks, decorative grid or line wallpaper, safe palettes, glow backgrounds, or copied scaffold composition.',
|
|
281
|
+
failureDefinition: 'AI-safe UI uses template cards, generic marks, decorative grid or line wallpaper, calibration-mark wallpaper, test/demo/placeholder copy, terminal-only user paths, safe palettes, glow backgrounds, or copied scaffold composition.',
|
|
278
282
|
interchangeabilityTest: `If this UI can be renamed from ${projectName} to another product category without changing composition, palette, iconography, and motion, revise it.`,
|
|
279
283
|
requiredProductSpecificSignals: [
|
|
280
284
|
'agent-defined-product-specific-data-treatment',
|
|
@@ -282,7 +286,7 @@ function buildDesignIntentContractObject({
|
|
|
282
286
|
'agent-defined-product-specific-morphology-iconography-or-spatial-structure',
|
|
283
287
|
],
|
|
284
288
|
paletteExplorationRule: 'Use a visually exploratory product-derived palette with WCAG contrast and status clarity.',
|
|
285
|
-
backgroundPatternRule: 'Lines, grids, scanlines, noise, glows, blobs, logos, and geometry must serve a named product function; never use grid or
|
|
289
|
+
backgroundPatternRule: 'Lines, grids, scanlines, noise, glows, blobs, logos, calibration marks, and geometry must serve a named product function; never use grid, line, or calibration-mark backgrounds as first-output filler. Measurement and inspection marks belong to task overlays or controls, not page wallpaper.',
|
|
286
290
|
aiColorAudit: {
|
|
287
291
|
status: 'agent-must-complete-before-ui-implementation',
|
|
288
292
|
failureDefinition: 'AI color drift uses safe defaults before deriving roles from the product anchor.',
|
|
@@ -308,6 +312,19 @@ function buildDesignIntentContractObject({
|
|
|
308
312
|
reviewQuestion: 'What visible evidence proves this is product-specific?',
|
|
309
313
|
blockingByDefault: true,
|
|
310
314
|
},
|
|
315
|
+
productionContentPolicy: {
|
|
316
|
+
status: 'agent-must-complete-before-ui-implementation',
|
|
317
|
+
userFacingCopyRule: 'Visible UI copy must be product-ready and task-specific. Do not ship testing, demo, sample, placeholder, lorem, TODO, coming soon, or scaffold labels unless they are real product states.',
|
|
318
|
+
terminalDependencyRule: 'User-facing workflows must be operable through the UI unless the product is explicitly a CLI, developer tool, or operational runbook. Terminal commands belong in setup and deployment docs, not as the only path for core user tasks.',
|
|
319
|
+
allowedExceptions: [
|
|
320
|
+
'test-harness-only',
|
|
321
|
+
'documented-empty-state',
|
|
322
|
+
'admin-or-devtool-diagnostic-surface',
|
|
323
|
+
'explicit-user-requested-prototype',
|
|
324
|
+
],
|
|
325
|
+
reviewQuestion: 'Can this UI be shipped to real users without removing test/demo copy or terminal-only workflow dependencies?',
|
|
326
|
+
blockingByDefault: true,
|
|
327
|
+
},
|
|
311
328
|
libraryResearchStatus: 'pending-verification',
|
|
312
329
|
libraryDecisions: [
|
|
313
330
|
{
|
|
@@ -541,6 +558,8 @@ function buildDesignIntentContractObject({
|
|
|
541
558
|
requireBuildFromHandoff: true,
|
|
542
559
|
requireGapNotesBeforeFallback: true,
|
|
543
560
|
forbidGenericLayoutFallbackWithoutReason: true,
|
|
561
|
+
forbidTestingDemoCopyInUi: true,
|
|
562
|
+
forbidTerminalOnlyUserFlows: true,
|
|
544
563
|
},
|
|
545
564
|
},
|
|
546
565
|
reviewRubric: {
|
|
@@ -628,6 +647,7 @@ function buildDesignIntentContractObject({
|
|
|
628
647
|
'requireSignatureMove',
|
|
629
648
|
'rejectTemplateNeutralLayout',
|
|
630
649
|
'requireAiSafeUiAudit',
|
|
650
|
+
'requireProductionContentPolicy',
|
|
631
651
|
'requireAiColorAudit',
|
|
632
652
|
'rejectAiColorDefaults',
|
|
633
653
|
'requireMotionSpatialCourageAudit',
|
|
@@ -636,6 +656,8 @@ function buildDesignIntentContractObject({
|
|
|
636
656
|
'rejectAiSafeUiTemplateLook',
|
|
637
657
|
'requireThreeProductSpecificSignals',
|
|
638
658
|
'rejectDecorativeBackgroundPatternsWithoutProductFunction',
|
|
659
|
+
'rejectTestingDemoUiCopy',
|
|
660
|
+
'rejectTerminalOnlyUserFlows',
|
|
639
661
|
],
|
|
640
662
|
requiredDesignSections: DESIGN_REQUIRED_SECTIONS,
|
|
641
663
|
implementation: {
|
|
@@ -4,6 +4,36 @@ import {
|
|
|
4
4
|
} from './constants.mjs';
|
|
5
5
|
import { buildDesignIntentSeed } from './design-contract.mjs';
|
|
6
6
|
|
|
7
|
+
function buildDockerStrategyExecutionBlock(dockerStrategy) {
|
|
8
|
+
const selectedDockerStrategy = String(dockerStrategy || '').trim();
|
|
9
|
+
const normalizedDockerStrategy = selectedDockerStrategy.toLowerCase();
|
|
10
|
+
|
|
11
|
+
if (!selectedDockerStrategy || normalizedDockerStrategy.startsWith('no docker')) {
|
|
12
|
+
return [
|
|
13
|
+
'## Docker Execution Gate',
|
|
14
|
+
'Docker was not selected. Do not create container assets unless the user changes scope.',
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const requiredAssetFloor = [
|
|
19
|
+
'.dockerignore',
|
|
20
|
+
normalizedDockerStrategy.includes('development') || normalizedDockerStrategy.includes('both') ? 'compose.yaml for development' : null,
|
|
21
|
+
normalizedDockerStrategy.includes('production') || normalizedDockerStrategy.includes('both') ? 'compose.prod.yaml or a documented production Compose override' : null,
|
|
22
|
+
'Dockerfile stage(s) derived from the actual stack',
|
|
23
|
+
'docs/docker-runtime.md or a deployment runbook with ports, entrypoints, health checks, and source URLs',
|
|
24
|
+
].filter(Boolean).join(', ');
|
|
25
|
+
|
|
26
|
+
return [
|
|
27
|
+
'## Docker Execution Gate',
|
|
28
|
+
`Selected Docker strategy: ${selectedDockerStrategy}`,
|
|
29
|
+
'- Load .agent-context/rules/docker-runtime.md and verify current official Docker docs before authoring assets.',
|
|
30
|
+
'- Materialize Docker assets from the actual stack; do not stop at docs-only acknowledgement or runtime notes.',
|
|
31
|
+
'- Required asset floor: ' + requiredAssetFloor + '.',
|
|
32
|
+
'- Keep development and production lanes separate when both are selected.',
|
|
33
|
+
'- If the user asks to create files without commands, write the files and documented commands, but do not execute Docker build, Compose, or registry commands.',
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
|
|
7
37
|
export function buildProjectContextBootstrapPrompt({
|
|
8
38
|
discoveryAnswers,
|
|
9
39
|
initContext,
|
|
@@ -59,6 +89,8 @@ export function buildProjectContextBootstrapPrompt({
|
|
|
59
89
|
`- Additional runtime constraints: ${Array.isArray(initContext.additionalStackFileNames) && initContext.additionalStackFileNames.length > 0 ? initContext.additionalStackFileNames.map((stackFileName) => toTitleCase(stackFileName)).join(', ') : 'none'}`,
|
|
60
90
|
`- Additional architecture constraints: ${Array.isArray(initContext.additionalBlueprintFileNames) && initContext.additionalBlueprintFileNames.length > 0 ? initContext.additionalBlueprintFileNames.map((blueprintFileName) => toTitleCase(blueprintFileName)).join(', ') : 'none'}`,
|
|
61
91
|
'',
|
|
92
|
+
...buildDockerStrategyExecutionBlock(discoveryAnswers.dockerStrategy),
|
|
93
|
+
'',
|
|
62
94
|
'## Key Features',
|
|
63
95
|
featuresList,
|
|
64
96
|
'',
|
|
@@ -127,23 +159,24 @@ export function buildDesignBootstrapPrompt({
|
|
|
127
159
|
'8. derivedTokenLogic',
|
|
128
160
|
'9. motionPaletteDecision',
|
|
129
161
|
'10. aiSafeUiAudit',
|
|
130
|
-
'11.
|
|
131
|
-
'12.
|
|
132
|
-
'13.
|
|
133
|
-
'14.
|
|
134
|
-
'15.
|
|
135
|
-
'16.
|
|
136
|
-
'17.
|
|
137
|
-
'18.
|
|
138
|
-
'19.
|
|
139
|
-
'20.
|
|
140
|
-
'21.
|
|
141
|
-
'22.
|
|
142
|
-
'23.
|
|
143
|
-
'24.
|
|
144
|
-
'25.
|
|
145
|
-
'26.
|
|
146
|
-
'27.
|
|
162
|
+
'11. productionContentPolicy',
|
|
163
|
+
'12. libraryResearchStatus',
|
|
164
|
+
'13. libraryDecisions',
|
|
165
|
+
'14. mathSystems',
|
|
166
|
+
'15. tokenSystem',
|
|
167
|
+
'16. colorTruth',
|
|
168
|
+
'17. crossViewportAdaptation',
|
|
169
|
+
'18. motionSystem',
|
|
170
|
+
'19. componentMorphology',
|
|
171
|
+
'20. accessibilityPolicy',
|
|
172
|
+
'21. designExecutionPolicy',
|
|
173
|
+
'22. designExecutionHandoff',
|
|
174
|
+
'23. reviewRubric',
|
|
175
|
+
'24. contextHygiene',
|
|
176
|
+
'25. forbiddenPatterns',
|
|
177
|
+
'26. requiredDesignSections',
|
|
178
|
+
'27. implementation',
|
|
179
|
+
'28. repoEvidence when onboarding or detector evidence exists',
|
|
147
180
|
'',
|
|
148
181
|
'## Mechanical Gates',
|
|
149
182
|
'1. Do not copy external style guides.',
|
|
@@ -163,7 +196,7 @@ export function buildDesignBootstrapPrompt({
|
|
|
163
196
|
'15. Cover focus visibility, focus appearance, target size, accessible authentication, keyboard access, and dynamic status/state access.',
|
|
164
197
|
'16. Do not depend on screenshot capture, browser automation, or image diffs as the default quality path.',
|
|
165
198
|
'17. Make one memorable visual bet before code.',
|
|
166
|
-
'18. Do not ship AI-safe UI, decorative grid wallpaper, generic SaaS gradients, or default component-kit styling without product rationale.',
|
|
199
|
+
'18. Do not ship AI-safe UI, decorative grid, line, scanline, or calibration-mark wallpaper, generic SaaS gradients, or default component-kit styling without product rationale.',
|
|
167
200
|
'19. Use visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity.',
|
|
168
201
|
'20. Complete the AI color audit before code.',
|
|
169
202
|
'21. Treat motion, 3D, canvas, WebGL, scroll choreography, and modern animation libraries as first-class options.',
|
|
@@ -180,10 +213,13 @@ export function buildDesignBootstrapPrompt({
|
|
|
180
213
|
'32. Define reviewRubric and require genericity findings to name the actual drift signal.',
|
|
181
214
|
'33. Separate taste from failure. Bold accessible work is valid.',
|
|
182
215
|
'34. For zero-based redesign, create visualResetStrategy and reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.',
|
|
216
|
+
'35. Treat productionContentPolicy as blocking: remove visible testing, demo, sample, placeholder, lorem, TODO, coming soon, and scaffold copy unless it is a real product state.',
|
|
217
|
+
'36. Do not make core user workflows terminal-only unless the product is explicitly a CLI, developer tool, or operational runbook.',
|
|
183
218
|
'',
|
|
184
219
|
'## Creative Ambition Floor',
|
|
185
220
|
'Before implementation, the design contract must name one authored visual bet, one product-derived palette move, one signature motion/spatial/interaction behavior, and one morphology or composition choice that would not appear in a generic AI template.',
|
|
186
221
|
'The ambition floor is not a fixed aesthetic. Quiet, dense, utilitarian, or text-heavy interfaces are allowed when the product requires them, but they still need a project-specific visual decision and a real reason for omitting richer motion, 3D, canvas, WebGL, scroll choreography, or animation libraries.',
|
|
222
|
+
'Measurement, calibration, crop, route, timeline, and inspection marks may be used only as task-bound overlays or control affordances. They must not become page wallpaper, hero texture, or first-output background filler.',
|
|
187
223
|
'Use reduced-motion fallbacks instead of suppressing motion.',
|
|
188
224
|
'',
|
|
189
225
|
'## Token Derivation Audit',
|
|
@@ -225,7 +261,8 @@ export function buildDesignBootstrapPrompt({
|
|
|
225
261
|
'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.',
|
|
226
262
|
'15. Record conceptualAnchor.agentResearchMode, specificReferencePoint, signatureMotion, typographicDecision, visualRiskBudget, motionRiskBudget, and cohesionChecks so the final UI cannot quietly fall back to a timid dashboard/admin mental model.',
|
|
227
263
|
'16. Preserve derivedTokenLogic, libraryResearchStatus, and libraryDecisions so token choices and dependency uncertainty stay visible before implementation.',
|
|
228
|
-
'17.
|
|
264
|
+
'17. Preserve productionContentPolicy so UI output is ship-ready and not a testing-looking scaffold.',
|
|
265
|
+
'18. After the contract exists, use it as a first-class source for future UI tasks.',
|
|
229
266
|
'',
|
|
230
267
|
].join('\n');
|
|
231
268
|
}
|