@ryuenn3123/agentic-senior-core 4.2.3 → 4.2.5
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 +7 -6
- package/.agent-context/prompts/research-design.md +27 -0
- package/.agent-context/rules/frontend-architecture.md +6 -3
- package/README.md +4 -0
- package/lib/cli/backup.mjs +16 -0
- package/lib/cli/commands/init.mjs +22 -0
- package/lib/cli/compiler.mjs +2 -0
- package/lib/cli/init-options.mjs +11 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +57 -0
- package/lib/cli/project-scaffolder/prompt-builders.mjs +6 -1
- package/package.json +1 -1
- package/scripts/frontend-usability-audit.mjs +5 -0
- package/scripts/validate/config.mjs +8 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# Bootstrap Dynamic Design Contract
|
|
2
|
-
|
|
3
2
|
Use this prompt for UI, UX, frontend layout, screen, Tailwind, animation, 3D, canvas, or redesign work.
|
|
4
3
|
|
|
5
4
|
Create or refine `docs/DESIGN.md` for human reasoning and `docs/design-intent.json` for machine-readable design intent, guardrails, and review signals.
|
|
@@ -10,8 +9,9 @@ This contract is a decision scaffold, not a style preset. We guide the agent; we
|
|
|
10
9
|
- Treat `README.md` as public and developer overview, setup, usage, and user-facing context only. Do not use it as coding, architecture, or design authority when `.agent-context/` gives a stricter rule.
|
|
11
10
|
- Use current repo evidence, product copy, route names, component names, user goals, and existing constraints as the source of truth.
|
|
12
11
|
- Treat prior-chat visuals, unrelated project memory, benchmark screenshots, and famous-product aesthetics as tainted context unless the user explicitly approves continuity.
|
|
13
|
-
- Keep external references non-copying; extract constraints only.
|
|
12
|
+
- Keep external references non-copying and research vocabulary internal; extract constraints only, and do not leak evidence, dossier, anchor, category-code, morphology, rename-test, or source-freshness labels into UI copy or final rationale unless requested.
|
|
14
13
|
- Before choosing a new UI, animation, scroll, 3D, canvas, chart, icon, styling, or component library, research current official docs.
|
|
14
|
+
- For design research, use the session current date as the rolling freshness reference. Prefer the newest relevant official or primary evidence; never define modern by a fixed calendar range.
|
|
15
15
|
## Required Order
|
|
16
16
|
1. Read `AGENTS.md`, this prompt, `research-design.md`, `../rules/frontend-architecture.md`, current UI code, current project docs, and existing design docs.
|
|
17
17
|
2. Refine existing `docs/DESIGN.md` and `docs/design-intent.json`; do not replace them blindly.
|
|
@@ -22,17 +22,16 @@ This contract is a decision scaffold, not a style preset. We guide the agent; we
|
|
|
22
22
|
7. Complete the Section 3-5 gates from `research-design.md` before UI implementation: `conceptualAnchor.categoryCodes.candidateEntries`, `conceptualAnchor.morphologicalExploration` (selected and uncomfortable combinations), and `conceptualAnchor.anchorCandidates.candidates` (exactly five, each with the strengthened rename test recorded).
|
|
23
23
|
8. Set `derivedTokenLogic.tokenContinuityClassification` for each of typography, palette, motion, and spacing. Use `anchor-derived` only when the token choice is causally tied to the anchor's real-world reality. Use `continuity-retained` when the token is kept from a previous design iteration without re-derivation. Use `newly-introduced` when the token is fresh but not anchor-derived. If any token category is `continuity-retained`, the typography, palette, or motion entry in `researchDossier.metadata.antiRepeatLedger` stays as historical record, and the classification declares the retention is intentional with explicit rationale recorded in the matching `derivationSource` field.
|
|
24
24
|
9. After agent and user select an anchor, set `researchDossier.metadata.researchVerifiedAt` to today's ISO date and flip `status` from any seed value to `active`. This closes the freshness window for additive UI tasks within `freshnessWindowDays`.
|
|
25
|
+
10. Complete the Live Source Freshness Gate from `research-design.md` before claiming that a visual pattern, library, browser feature, accessibility requirement, or interaction style is current. Record `sourceFreshness` and `evidenceTable[]` in `docs/design-intent.json`.
|
|
25
26
|
## Creative Commitment Gate
|
|
26
27
|
Before broad compliance review or UI implementation, record an agent-chosen visual direction in both design docs:
|
|
27
28
|
- one concrete real-world anchor reference
|
|
28
29
|
- one signature motion behavior more specific than "smooth"
|
|
29
30
|
- one typographic decision with meaningful role contrast
|
|
30
31
|
- one authored visual bet visible in the first viewport
|
|
31
|
-
|
|
32
32
|
Reject generic anchors. Do not accept "modern", "clean", "premium", "expressive", "minimal", or "bold" as the anchor. Name a material, instrument, artifact class, architectural system, editorial genre, cinematic behavior, exhibition system, scientific apparatus, or industrial mechanism.
|
|
33
33
|
## Dynamic Avant-Garde Anchor Engine
|
|
34
34
|
If no current-task research or visual reference exists, activate the Dynamic Avant-Garde Anchor Engine before coding.
|
|
35
|
-
|
|
36
35
|
Rules:
|
|
37
36
|
- Treat old design docs, prior UI, and scaffold seeds as evidence, not research.
|
|
38
37
|
- Internally consider at least three high-variance anchors.
|
|
@@ -50,7 +49,6 @@ Before UI code, record:
|
|
|
50
49
|
- one signature motion, spatial, or interaction behavior
|
|
51
50
|
- one morphology or composition choice that avoids interchangeable card stacks when the product allows it
|
|
52
51
|
- at least three at-a-glance product-specific signals for new screens or broad redesigns
|
|
53
|
-
|
|
54
52
|
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. If a conceptual anchor suggests a forbidden motif, the forbidden motif wins; express the anchor through workflow, hierarchy, density, typography, material behavior, state design, and interaction grammar instead of literal wallpaper.
|
|
55
53
|
## Brave Redesign Default
|
|
56
54
|
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.
|
|
@@ -63,6 +61,10 @@ Only downshift ambition after naming the concrete blocker: product fit, content
|
|
|
63
61
|
## External Inspiration Boundary
|
|
64
62
|
Using outside websites, benchmark apps, galleries, or component examples is useful for constraint discovery, interaction mechanics, and implementation options, but never as a style source to imitate. Extract why a pattern works, then translate it into a current-project rule. Do not copy layout rhythm, palette, component skin, visual metaphor, or brand posture from a reference unless the user explicitly approves that continuity and it passes product fit.
|
|
65
63
|
|
|
64
|
+
## Adaptive Research Freshness
|
|
65
|
+
Modern is relative to the current date, not a fixed release year: implementation/platform claims require current official docs or primary release notes; trend, category-code, and visual-language claims prefer sources published or materially updated within the last 24 months; older sources must be labeled `old-timeless` and cannot prove a current-year trend.
|
|
66
|
+
User-provided concepts are first-class constraints; adapt research to support, refine, or challenge the concept, and if live research is unavailable set source freshness to pending verification instead of claiming current-year modernity.
|
|
67
|
+
|
|
66
68
|
## AI Color and Template Residue Audit
|
|
67
69
|
AI color drift happens when a palette uses safe defaults before product meaning.
|
|
68
70
|
|
|
@@ -133,7 +135,6 @@ Define viewport mutation rules:
|
|
|
133
135
|
- For each viewport, name what is reordered, merged, hidden, disclosed, promoted, and forbidden.
|
|
134
136
|
|
|
135
137
|
## Required `docs/DESIGN.md` Sections
|
|
136
|
-
|
|
137
138
|
1. Design Intent and Product Personality
|
|
138
139
|
2. Audience and Use-Context Signals
|
|
139
140
|
3. Visual Direction and Distinctive Moves
|
|
@@ -15,6 +15,33 @@ This brief is a single document with five sections. Sections 1 and 2 set up the
|
|
|
15
15
|
- Treat external websites, benchmark apps, prior chats, and unrelated-project memory as candidate evidence for constraints, mechanics, and quality bars only. Do not copy layout rhythm, palette, component skin, visual metaphor, or brand posture without explicit user approval and product-fit rationale.
|
|
16
16
|
- WCAG 2.2 AA is the hard compliance floor. APCA may be used only as advisory perceptual tuning.
|
|
17
17
|
|
|
18
|
+
## Live Source Freshness Gate
|
|
19
|
+
|
|
20
|
+
Run this gate before Section 2 whenever web search is available. Treat modernity as rolling-current: use the session's current date as the freshness reference, and prefer the newest stable evidence that is relevant to the product and implementation surface.
|
|
21
|
+
|
|
22
|
+
Rules:
|
|
23
|
+
|
|
24
|
+
- For browser capability, framework setup, UI library, animation, 3D, canvas, charting, styling, accessibility, and package/API claims, use current official documentation or primary release notes first. Do not use trend posts as implementation authority.
|
|
25
|
+
- For design trend, category-code, visual-language, motion-pattern, typography, color, and interaction claims, prefer sources published or materially updated within the last 24 months from the current date. If stronger older evidence is used, label it `old-timeless` and restrict it to durable principles, not "current modern" claims.
|
|
26
|
+
- For product-category defaults, observe the current live category for this task. Do not rely on old examples, old galleries, or remembered benchmark screenshots as proof of what the category defaults to now.
|
|
27
|
+
- If web search is unavailable, set `sourceFreshnessStatus` to `pending-live-verification`; use repo evidence and user-provided material only, and do not claim a direction is current-year modern.
|
|
28
|
+
- If sources disagree, choose by product fit, accessibility, browser/runtime support, maintainability, and implementation feasibility, then record the disagreement.
|
|
29
|
+
- If the user provides a concept, treat it as a first-class constraint. Research should support, refine, or challenge that concept with evidence; it must not override the concept with generic trend defaults unless there is a concrete product, accessibility, technical, or evidence conflict.
|
|
30
|
+
|
|
31
|
+
Output: `sourceFreshness` block with `freshnessAnchorDate`, `rollingLookbackMonths` (default 24 for trend evidence), `sourceFreshnessStatus`, `officialDocsRequiredFor`, `oldSourcePolicy`, `userConceptAdaptation`, and `disagreements[]`.
|
|
32
|
+
|
|
33
|
+
Every important research claim must also appear in `evidenceTable[]` with:
|
|
34
|
+
|
|
35
|
+
- `claim`
|
|
36
|
+
- `sourceUrl`
|
|
37
|
+
- `sourceType` (`official`, `primary`, `industry`, `opinion`, `old-timeless`, `repo-evidence`, `user-provided`)
|
|
38
|
+
- `publishedOrUpdatedAt` when visible, otherwise `unknown`
|
|
39
|
+
- `fetchedAt`
|
|
40
|
+
- `confidence` (`high`, `medium`, `low`)
|
|
41
|
+
- `decisionImpact`
|
|
42
|
+
|
|
43
|
+
Research vocabulary is internal-only. Use `sourceFreshness`, `evidenceTable[]`, `researchDossier`, `anchor`, `categoryCodes`, `morphologicalExploration`, and `renameTest` to audit decisions, but do not expose those labels in UI copy, public-facing docs, section headings, or final user-facing rationale unless the user explicitly asks for the research trace.
|
|
44
|
+
|
|
18
45
|
## Anti-Repeat Ledger Gate (read first)
|
|
19
46
|
|
|
20
47
|
If `docs/design-intent.json` already exists and carries `researchDossier.metadata.antiRepeatLedger`, treat every entry under `previousAnchors`, `previousPalettes`, and `previousMotionSignatures` as a hard blocklist before producing any candidate in Sections 3-5.
|
|
@@ -31,9 +31,12 @@ Load this rule for UI-facing work. Keep the loaded surface small.
|
|
|
31
31
|
3. Treat `README.md` as public and developer overview, setup, usage, and user-facing context only when design or architecture rules conflict.
|
|
32
32
|
4. Do not choose final style, framework, palette, typography, layout paradigm, or animation library offline.
|
|
33
33
|
5. Research current official docs before adding a new UI, animation, scroll, 3D, canvas, charting, icon, styling, or primitive library.
|
|
34
|
-
6.
|
|
35
|
-
7.
|
|
36
|
-
8. Keep
|
|
34
|
+
6. Use the current date as the freshness anchor for design research. Trend and category-default claims should come from the newest relevant evidence, preferably material published or updated within the last 24 months. Older sources are acceptable only as labeled durable principles, not proof that a direction is currently modern.
|
|
35
|
+
7. Treat user-provided concepts as first-class constraints. Adapt research to support, refine, or challenge the concept with evidence; do not override it with trend defaults unless a concrete product, accessibility, technical, or evidence conflict is recorded.
|
|
36
|
+
8. Keep research vocabulary internal. Evidence, dossier, anchor, category-code, morphology, rename-test, and freshness labels may guide decisions, but must not appear in UI copy, public-facing docs, or final user-facing rationale unless the user explicitly asks for the research trace.
|
|
37
|
+
9. Dynamic UI Foundation: do not hardcode shadcn/ui, Tailwind-only, native-only, or any component library as the universal answer, and do not avoid them out of guardrail fear when they fit. Tailwind-first is valid when the stack, token model, and team workflow support it; pure Tailwind, vanilla CSS, shadcn/ui, or any kit is not neutral by itself. Modern primitives, motion/canvas/WebGL helpers, charting libraries, and styling tools are valid when product evidence, accessibility, runtime constraints, and official docs support them.
|
|
38
|
+
10. For fresh projects, prefer official framework scaffolders or setup commands when official docs show they produce the current supported shape. Build files manually only when approved architecture, repo constraints, or learning/prototype scope makes that better.
|
|
39
|
+
11. Keep design continuity opt-in. Repo evidence outranks memory residue.
|
|
37
40
|
|
|
38
41
|
## FE-003: Required Design Contract
|
|
39
42
|
|
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ Options:
|
|
|
26
26
|
- Add `--mcp-template` to generate VS Code MCP workspace config.
|
|
27
27
|
- Default init keeps MCP files opt-in.
|
|
28
28
|
- Add `--no-token-optimize` only when you do not want ASCX command guidance enabled.
|
|
29
|
+
- Add `--local-only` to ignore instructions (AGENTS.md, .agent-context/, and bridges) in .gitignore so they are not pushed to GitHub.
|
|
29
30
|
- Local backup snapshots are written under `.agentic-backup/` and excluded from version control.
|
|
30
31
|
|
|
31
32
|
## Upgrade
|
|
@@ -41,6 +42,9 @@ Preview changes with `--dry-run`, then apply with `--yes`. Upgrade prunes obsole
|
|
|
41
42
|
|
|
42
43
|
## Core Commands
|
|
43
44
|
|
|
45
|
+
> [!NOTE]
|
|
46
|
+
> To run commands directly without `npx` (e.g., `ascx` or `agentic-senior-core`), install the CLI globally: `npm install -g @ryuenn3123/agentic-senior-core`.
|
|
47
|
+
|
|
44
48
|
| Command | Purpose |
|
|
45
49
|
|---------|---------|
|
|
46
50
|
| `agentic-senior-core init` | Initialize the compact project guidance pack and native agent entrypoints |
|
package/lib/cli/backup.mjs
CHANGED
|
@@ -12,6 +12,15 @@ const RUNTIME_ARTIFACT_GITIGNORE_ENTRIES = [
|
|
|
12
12
|
];
|
|
13
13
|
const RUNTIME_ARTIFACT_GITIGNORE_COMMENT = '# agentic-senior-core: local runtime artifacts';
|
|
14
14
|
|
|
15
|
+
const GOVERNANCE_GITIGNORE_ENTRIES = [
|
|
16
|
+
'.agent-context/',
|
|
17
|
+
'AGENTS.md',
|
|
18
|
+
'CLAUDE.md',
|
|
19
|
+
'GEMINI.md',
|
|
20
|
+
'mcp.json',
|
|
21
|
+
];
|
|
22
|
+
const GOVERNANCE_GITIGNORE_COMMENT = '# agentic-senior-core: local-only governance files';
|
|
23
|
+
|
|
15
24
|
/**
|
|
16
25
|
* Calculates a SHA-256 hash of a file's contents.
|
|
17
26
|
*/
|
|
@@ -192,3 +201,10 @@ export async function ensureRuntimeArtifactGitignoreEntries(targetDirectoryPath)
|
|
|
192
201
|
entries: RUNTIME_ARTIFACT_GITIGNORE_ENTRIES,
|
|
193
202
|
});
|
|
194
203
|
}
|
|
204
|
+
|
|
205
|
+
export async function ensureLocalGovernanceGitignoreEntries(targetDirectoryPath) {
|
|
206
|
+
return ensureGitignoreEntries(targetDirectoryPath, {
|
|
207
|
+
comment: GOVERNANCE_GITIGNORE_COMMENT,
|
|
208
|
+
entries: GOVERNANCE_GITIGNORE_ENTRIES,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
createBackup,
|
|
50
50
|
ensureBackupGitignoreEntry,
|
|
51
51
|
ensureRuntimeArtifactGitignoreEntries,
|
|
52
|
+
ensureLocalGovernanceGitignoreEntries,
|
|
52
53
|
} from '../backup.mjs';
|
|
53
54
|
import {
|
|
54
55
|
runProjectDiscovery,
|
|
@@ -384,6 +385,25 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
384
385
|
);
|
|
385
386
|
}
|
|
386
387
|
|
|
388
|
+
const shouldKeepLocalOnly = typeof initOptions.localOnly === 'boolean'
|
|
389
|
+
? initOptions.localOnly
|
|
390
|
+
: isInteractiveSession
|
|
391
|
+
? await askYesNo(
|
|
392
|
+
'Add AI instructions and governance files to .gitignore? (Prevents pushing them to GitHub/Git)',
|
|
393
|
+
userInterface,
|
|
394
|
+
false
|
|
395
|
+
)
|
|
396
|
+
: false;
|
|
397
|
+
|
|
398
|
+
if (shouldKeepLocalOnly) {
|
|
399
|
+
const localGovernanceGitignoreResult = await ensureLocalGovernanceGitignoreEntries(resolvedTargetDirectoryPath);
|
|
400
|
+
if (localGovernanceGitignoreResult.status !== 'unchanged') {
|
|
401
|
+
console.log(
|
|
402
|
+
`AI governance files ignored in .gitignore (${localGovernanceGitignoreResult.addedEntries.join(', ')}).`
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
387
407
|
await copyGovernanceAssetsToTarget(resolvedTargetDirectoryPath, {
|
|
388
408
|
includeMcpTemplate: shouldIncludeMcpTemplate,
|
|
389
409
|
});
|
|
@@ -523,6 +543,7 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
523
543
|
selectedBlueprintFileName: selectedResolvedBlueprintFileName,
|
|
524
544
|
selectedAdditionalBlueprintFileNames,
|
|
525
545
|
includeCiGuardrails,
|
|
546
|
+
localOnly: shouldKeepLocalOnly,
|
|
526
547
|
setupDurationMs,
|
|
527
548
|
projectDetection,
|
|
528
549
|
runtimeEnvironment: {
|
|
@@ -577,6 +598,7 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
577
598
|
console.log('- Generated files: AGENTS.md, CLAUDE.md, GEMINI.md, .agent-context/, and .agent-context/state/onboarding-report.json');
|
|
578
599
|
console.log('- Default activation cues: Adaptive Context bootstrap, ASCX command wrappers, Compact Natural final replies');
|
|
579
600
|
console.log('- Default response mode: Compact Natural Mode enabled (.agent-context/prompts/compact-natural-mode.md)');
|
|
601
|
+
console.log('- CLI Usage: Install globally (`npm i -g @ryuenn3123/agentic-senior-core`) to use `ascx` directly, or prefix commands with `npx`.');
|
|
580
602
|
if (scaffoldingResult?.bootstrapMode === 'ai-synthesis') {
|
|
581
603
|
console.log(`- Bootstrap prompts: ${(scaffoldingResult.generatedPromptFileNames || []).length} files generated in .agent-context/prompts/`);
|
|
582
604
|
if ((scaffoldingResult.materializedFileNames || []).length > 0) {
|
package/lib/cli/compiler.mjs
CHANGED
|
@@ -145,6 +145,7 @@ export async function writeOnboardingReport({
|
|
|
145
145
|
selectedBlueprintFileName,
|
|
146
146
|
selectedAdditionalBlueprintFileNames = [],
|
|
147
147
|
includeCiGuardrails,
|
|
148
|
+
localOnly = false,
|
|
148
149
|
setupDurationMs,
|
|
149
150
|
projectDetection,
|
|
150
151
|
runtimeEnvironment = null,
|
|
@@ -197,6 +198,7 @@ export async function writeOnboardingReport({
|
|
|
197
198
|
agentDecisionRequired: !hasExplicitRuntimeDecision,
|
|
198
199
|
},
|
|
199
200
|
ciGuardrailsEnabled: includeCiGuardrails,
|
|
201
|
+
localOnly,
|
|
200
202
|
setupDurationMs,
|
|
201
203
|
runtimeEnvironment,
|
|
202
204
|
containerizationStrategy: buildContainerizationStrategySnapshot(dockerStrategy),
|
package/lib/cli/init-options.mjs
CHANGED
|
@@ -24,6 +24,7 @@ export function parseInitArguments(commandArguments) {
|
|
|
24
24
|
memoryContinuity: true,
|
|
25
25
|
tokenAgent: 'copilot',
|
|
26
26
|
includeMcpTemplate: false,
|
|
27
|
+
localOnly: undefined,
|
|
27
28
|
scaffoldDocs: undefined,
|
|
28
29
|
docsLang: 'en',
|
|
29
30
|
docsLangProvided: false,
|
|
@@ -143,6 +144,16 @@ export function parseInitArguments(commandArguments) {
|
|
|
143
144
|
continue;
|
|
144
145
|
}
|
|
145
146
|
|
|
147
|
+
if (currentArgument === '--local-only') {
|
|
148
|
+
parsedInitOptions.localOnly = true;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (currentArgument === '--no-local-only') {
|
|
153
|
+
parsedInitOptions.localOnly = false;
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
|
|
146
157
|
if (currentArgument === '--scaffold-docs') {
|
|
147
158
|
parsedInitOptions.scaffoldDocs = true;
|
|
148
159
|
continue;
|
|
@@ -90,6 +90,30 @@ function buildDesignIntentContractObject({
|
|
|
90
90
|
requireSummaryOfUsedSignals: true,
|
|
91
91
|
requireFitFiltering: true,
|
|
92
92
|
requireOfficialDocsVerificationForTechnologyClaims: true,
|
|
93
|
+
sourceFreshnessPolicy: {
|
|
94
|
+
mode: 'rolling-current-date',
|
|
95
|
+
currentDateAnchor: 'session-current-date',
|
|
96
|
+
trendLookbackMonths: 24,
|
|
97
|
+
implementationClaimsRequire: 'current-official-docs-or-primary-release-notes',
|
|
98
|
+
olderSourcePolicy: 'older sources may support durable principles only when labeled old-timeless; they cannot prove current modernity',
|
|
99
|
+
noLiveResearchFallback: 'set sourceFreshnessStatus to pending-live-verification and do not claim current-year modernity',
|
|
100
|
+
},
|
|
101
|
+
internalVocabularyPolicy: { terms: ['evidence', 'dossier', 'anchor', 'category-code', 'morphology', 'rename-test', 'source-freshness'], rule: 'Use research vocabulary for internal audit only; translate it into product-native language before UI copy, public docs, or user-facing rationale unless the user asks for the research trace.' },
|
|
102
|
+
adaptiveUserConceptPolicy: {
|
|
103
|
+
userConceptIsFirstClassConstraint: true,
|
|
104
|
+
researchRole: 'support-refine-or-challenge-user-concept-with-evidence',
|
|
105
|
+
overrideRequires: 'recorded product accessibility technical or evidence conflict',
|
|
106
|
+
trendDefaultsCannotOverrideUserConceptSilently: true,
|
|
107
|
+
},
|
|
108
|
+
requiredEvidenceTableFields: [
|
|
109
|
+
'claim',
|
|
110
|
+
'sourceUrl',
|
|
111
|
+
'sourceType',
|
|
112
|
+
'publishedOrUpdatedAt',
|
|
113
|
+
'fetchedAt',
|
|
114
|
+
'confidence',
|
|
115
|
+
'decisionImpact',
|
|
116
|
+
],
|
|
93
117
|
candidateDomains: [
|
|
94
118
|
'visual-direction',
|
|
95
119
|
'motion-and-scroll',
|
|
@@ -127,6 +151,39 @@ function buildDesignIntentContractObject({
|
|
|
127
151
|
conceptualAnchor: buildConceptualAnchorSection(),
|
|
128
152
|
researchDossier: {
|
|
129
153
|
metadata: buildResearchDossierMetadata(),
|
|
154
|
+
sourceFreshness: {
|
|
155
|
+
status: 'agent-must-complete-before-ui-implementation',
|
|
156
|
+
freshnessAnchorDate: 'session-current-date',
|
|
157
|
+
rollingLookbackMonths: 24,
|
|
158
|
+
officialDocsRequiredFor: [
|
|
159
|
+
'browser-capability',
|
|
160
|
+
'framework-setup',
|
|
161
|
+
'ui-library',
|
|
162
|
+
'animation-library',
|
|
163
|
+
'3d-canvas-charting-library',
|
|
164
|
+
'styling-tool',
|
|
165
|
+
'accessibility-claim',
|
|
166
|
+
],
|
|
167
|
+
sourceTypePolicy: {
|
|
168
|
+
official: 'required for implementation and package/API claims when available',
|
|
169
|
+
primary: 'preferred for product/studio/release claims',
|
|
170
|
+
industry: 'allowed for trend discovery after fit filtering',
|
|
171
|
+
opinion: 'advisory only; cannot lock design decisions alone',
|
|
172
|
+
oldTimeless: 'allowed for durable principles only, not current-year modern claims',
|
|
173
|
+
repoEvidence: 'highest authority for product constraints',
|
|
174
|
+
userProvided: 'candidate evidence and concept constraint, not automatic final prescription',
|
|
175
|
+
},
|
|
176
|
+
evidenceTableRequiredFields: [
|
|
177
|
+
'claim',
|
|
178
|
+
'sourceUrl',
|
|
179
|
+
'sourceType',
|
|
180
|
+
'publishedOrUpdatedAt',
|
|
181
|
+
'fetchedAt',
|
|
182
|
+
'confidence',
|
|
183
|
+
'decisionImpact',
|
|
184
|
+
],
|
|
185
|
+
evidenceTable: [],
|
|
186
|
+
},
|
|
130
187
|
},
|
|
131
188
|
derivedTokenLogic: {
|
|
132
189
|
anchorReference: 'agent-defined-anchor-reference',
|
|
@@ -188,10 +188,13 @@ export function buildDesignBootstrapPrompt({
|
|
|
188
188
|
'26. forbiddenPatterns',
|
|
189
189
|
'27. requiredDesignSections',
|
|
190
190
|
'28. implementation',
|
|
191
|
-
'29.
|
|
191
|
+
'29. researchDossier',
|
|
192
|
+
'30. repoEvidence when onboarding or detector evidence exists',
|
|
192
193
|
'',
|
|
193
194
|
'## Mechanical Gates',
|
|
194
195
|
'0. Read `.agent-context/prompts/research-design.md` first. Sections 3 (Category Code Identification), 4 (Morphological Exploration), and 5 (Anchor Candidates) are gates: each must produce an auditable artifact before UI implementation.',
|
|
196
|
+
'0a. Complete the Live Source Freshness Gate from research-design.md before claiming a pattern, library, browser feature, accessibility requirement, or interaction style is current. Use the session current date as the rolling freshness reference; modern means relative to that date, not a fixed calendar range.',
|
|
197
|
+
'0b. Keep research vocabulary internal: evidence, dossier, anchor, category-code, morphology, rename-test, and source-freshness labels guide decisions but must not leak into UI copy, public-facing docs, or final user-facing rationale unless the user asks for the research trace.',
|
|
195
198
|
'1. Do not copy external style guides.',
|
|
196
199
|
'2. Do not anchor the final design language to famous products, benchmark visuals, or external reference surfaces.',
|
|
197
200
|
'3. Do not choose final style, library, palette, typography, motion, or layout from this offline scaffold.',
|
|
@@ -216,6 +219,7 @@ export function buildDesignBootstrapPrompt({
|
|
|
216
219
|
'21. Treat motion, 3D, canvas, WebGL, scroll choreography, and modern animation libraries as first-class options.',
|
|
217
220
|
'22. If motion or spatial UI is omitted, document the product-fit reason and replacement interaction quality.',
|
|
218
221
|
'23. If the user supplies research files, library lists, screenshots, articles, or benchmark notes, read them as candidate evidence and verify technology claims.',
|
|
222
|
+
'23a. User-provided concepts are first-class constraints: support, refine, or challenge them with evidence; do not override them with trend defaults unless a product, accessibility, technical, or evidence conflict is recorded.',
|
|
219
223
|
'24. If no user-supplied research or reference exists, activate the Dynamic Avant-Garde Anchor Engine before coding; old design docs do not count as research.',
|
|
220
224
|
'25. In Dynamic Avant-Garde mode, consider three high-variance anchors, discard the two safest or most predictable options, and output only the chosen anchor.',
|
|
221
225
|
'26. Reject final anchors named dashboard, portal, cards, admin panel, SaaS shell, web app shell, or minimalist interface.',
|
|
@@ -241,6 +245,7 @@ export function buildDesignBootstrapPrompt({
|
|
|
241
245
|
'41. Use external websites and benchmark examples as candidate evidence for constraints, mechanics, and quality bars only; do not copy layout rhythm, palette, component skin, visual metaphor, or brand posture.',
|
|
242
246
|
'',
|
|
243
247
|
'## Research-Design Brief Gates (research-design.md)',
|
|
248
|
+
'41a. Live Source Freshness Gate: record researchDossier.sourceFreshness and evidenceTable[] with claim, sourceUrl, sourceType, publishedOrUpdatedAt, fetchedAt, confidence, and decisionImpact. Use current official docs or primary release notes for implementation claims. Trend, category-code, and visual-language claims prefer sources published or materially updated within the last 24 months from the current date. Older sources must be labeled old-timeless and may support durable principles only.',
|
|
244
249
|
'42. Section 3 — Category Code Identification: list at least three category codes per product surface in `conceptualAnchor.categoryCodes.candidateEntries`. Each entry must record `description`, `specificityEvidence`, `categoryDefaultReason`, and `rejectionNote`. The specificity floor is: a reader unfamiliar with the project must be able to visualize a specific aesthetic direction from the text alone, without seeing the UI and without knowing the product name. Reject placeholder phrases like "clean typography", "modern color palette", or "smooth animations". Anti-leakage rule: listing a cliche identifies a trap, not a target; the example cliches in the brief are not aesthetic candidates for any project. If the project pattern-matches a common AI-safe default (dev-tool dark slate, AI-startup purple-pink gradient, health-app mint, SaaS admin three-card KPI, marketing-site three-tile hero), name that cliche in `candidateEntries` with an explicit rejection note.',
|
|
245
250
|
'43. Section 4 — Morphological Exploration: build a 5x5 or 6x5 matrix in `conceptualAnchor.morphologicalExploration`. Choose 5 or 6 dimensions and 5 values per dimension. Do not seed the matrix with the Section 3 category codes as values. Highlight the selected combination, and ALSO highlight at least one uncomfortable combination that feels instinctively wrong but can be argued with product logic. The uncomfortable combination must record `combinationLabel`, `discomfortReason`, and `productLogicJustification`. If you cannot produce an uncomfortable-but-arguable combination, the dimensions are too narrow; widen at least one and regenerate.',
|
|
246
251
|
'44. Section 5 — Anchor Candidates: produce exactly five entries in `conceptualAnchor.anchorCandidates.candidates`. Each candidate must record `anchorReference`, `conceptualFamily`, `jobFit`, `hierarchyImplication`, `densityImplication`, `typeImplication`, `stateLanguage`, `motionImplication`, `whatItRulesOut`, `renameTest`, and `categoryCodeOverlap`.',
|
package/package.json
CHANGED
|
@@ -59,6 +59,8 @@ const REQUIRED_FRONTEND_RULE_SNIPPETS = [
|
|
|
59
59
|
'Do not choose final style, framework, palette, typography, layout paradigm, or animation library offline.',
|
|
60
60
|
'Keep design continuity opt-in.',
|
|
61
61
|
'Repo evidence outranks memory residue.',
|
|
62
|
+
'Use the current date as the freshness anchor for design research.',
|
|
63
|
+
'Treat user-provided concepts as first-class constraints.',
|
|
62
64
|
'## FE-003: Required Design Contract',
|
|
63
65
|
'## FE-004: Anti-Generic UI Gate',
|
|
64
66
|
'Do not ship interchangeable dashboard chrome',
|
|
@@ -96,6 +98,9 @@ const REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS = [
|
|
|
96
98
|
'APCA may be used only as advisory perceptual tuning',
|
|
97
99
|
'unresearched dependency choices',
|
|
98
100
|
'Dynamic UI Foundation Selection',
|
|
101
|
+
'Adaptive Research Freshness',
|
|
102
|
+
'fixed calendar range',
|
|
103
|
+
'research vocabulary internal',
|
|
99
104
|
'A new dependency, package count, or vague performance concern is not a blocker by itself.',
|
|
100
105
|
'default component-kit styling without product rationale',
|
|
101
106
|
'genericity findings that cannot name the exact drift signal',
|
|
@@ -358,6 +358,9 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
358
358
|
'APCA may be used only as advisory perceptual tuning',
|
|
359
359
|
'unresearched dependency choices',
|
|
360
360
|
'Dynamic UI Foundation Selection',
|
|
361
|
+
'Adaptive Research Freshness',
|
|
362
|
+
'fixed calendar range',
|
|
363
|
+
'research vocabulary internal',
|
|
361
364
|
'locked outcomes from flexible expression',
|
|
362
365
|
'A new dependency, package count, or vague performance concern is not a blocker by itself.',
|
|
363
366
|
'default component-kit styling without product rationale',
|
|
@@ -378,6 +381,11 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
378
381
|
'STRONG PASS',
|
|
379
382
|
'DISCARD',
|
|
380
383
|
'Anti-Repeat Ledger Gate',
|
|
384
|
+
'Live Source Freshness Gate',
|
|
385
|
+
'rolling-current',
|
|
386
|
+
'evidenceTable[]',
|
|
387
|
+
'old-timeless',
|
|
388
|
+
'Research vocabulary is internal-only',
|
|
381
389
|
'previousAnchors',
|
|
382
390
|
'previousMotionSignatures',
|
|
383
391
|
'Dimensional split',
|