@ryuenn3123/agentic-senior-core 4.3.1 → 4.3.4
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 +56 -222
- package/.agent-context/rules/api-docs.md +17 -126
- package/.agent-context/rules/api-versioning.md +9 -86
- package/.agent-context/rules/architecture.md +18 -136
- package/.agent-context/rules/background-jobs.md +9 -85
- package/.agent-context/rules/config-and-flags.md +8 -71
- package/.agent-context/rules/database-design.md +9 -65
- package/.agent-context/rules/docker-runtime.md +9 -62
- package/.agent-context/rules/efficiency-vs-hype.md +7 -37
- package/.agent-context/rules/error-handling.md +8 -33
- package/.agent-context/rules/event-driven.md +8 -34
- package/.agent-context/rules/frontend-architecture.md +22 -140
- package/.agent-context/rules/git-workflow.md +8 -77
- package/.agent-context/rules/microservices.md +8 -36
- package/.agent-context/rules/migrations.md +8 -76
- package/.agent-context/rules/observability.md +7 -60
- package/.agent-context/rules/performance.md +8 -28
- package/.agent-context/rules/realtime.md +7 -22
- package/.agent-context/rules/resilience.md +9 -69
- package/.agent-context/rules/security.md +9 -64
- package/.agent-context/rules/testing.md +8 -34
- package/AGENTS.md +10 -17
- package/README.md +1 -1
- package/lib/cli/adaptive-context/catalog.mjs +1 -6
- package/lib/cli/compiler.mjs +1 -2
- package/lib/cli/project-scaffolder/prompt-builders.mjs +21 -149
- package/package.json +1 -1
- package/scripts/frontend-usability-audit.mjs +4 -45
- package/scripts/release-gate/constants.mjs +1 -0
- package/scripts/validate/config.mjs +20 -134
- package/scripts/validate/coverage-checks.mjs +2 -12
- package/scripts/validate/file-structure.mjs +165 -0
- package/scripts/validate/markdown-content.mjs +109 -0
- package/scripts/validate/project-metadata.mjs +166 -0
- package/scripts/validate.mjs +42 -435
- package/.agent-context/prompts/research-design.md +0 -160
|
@@ -136,7 +136,6 @@ export function buildDesignBootstrapPrompt({
|
|
|
136
136
|
'',
|
|
137
137
|
'You are the Lead UI/UX Art Director for this project.',
|
|
138
138
|
'Create a dynamic design contract, not a fixed stylistic template.',
|
|
139
|
-
'Use imperative, compact, mechanical rules.',
|
|
140
139
|
'',
|
|
141
140
|
'## Mission',
|
|
142
141
|
`Author docs/DESIGN.md in ${docsLanguage.toUpperCase()} language with strong art direction and engineering-ready guidance.`,
|
|
@@ -146,133 +145,21 @@ export function buildDesignBootstrapPrompt({
|
|
|
146
145
|
'1. docs/DESIGN.md',
|
|
147
146
|
'2. docs/design-intent.json',
|
|
148
147
|
'',
|
|
149
|
-
'##
|
|
150
|
-
'
|
|
151
|
-
'
|
|
152
|
-
'
|
|
153
|
-
'
|
|
154
|
-
'5. Token Architecture and Alias Strategy',
|
|
155
|
-
'6. Responsive Strategy and Cross-Viewport Adaptation Matrix',
|
|
156
|
-
'7. Motion and Interaction Rules',
|
|
157
|
-
'8. Component Language and Morphology',
|
|
158
|
-
'9. Context Hygiene and Source Boundaries',
|
|
159
|
-
'10. Accessibility Non-Negotiables',
|
|
160
|
-
'11. Anti-Patterns to Avoid',
|
|
161
|
-
'12. Implementation Notes for Future UI Tasks',
|
|
148
|
+
'## Design Direction Process',
|
|
149
|
+
'Follow `.agent-context/prompts/bootstrap-design.md` for the three-step design direction:',
|
|
150
|
+
'1. Name your defaults (three temptations and why each flattens this product)',
|
|
151
|
+
'2. Choose a concrete anchor (googleable, specific, not a generic quality word)',
|
|
152
|
+
'3. Record creative commitments (typography, palette, motion, composition)',
|
|
162
153
|
'',
|
|
163
|
-
'##
|
|
164
|
-
'1.
|
|
165
|
-
'2.
|
|
166
|
-
'3.
|
|
167
|
-
'4.
|
|
168
|
-
'5.
|
|
169
|
-
'6.
|
|
170
|
-
'7.
|
|
171
|
-
'8.
|
|
172
|
-
'9. derivedTokenLogic',
|
|
173
|
-
'10. motionPaletteDecision',
|
|
174
|
-
'11. aiSafeUiAudit',
|
|
175
|
-
'12. productionContentPolicy',
|
|
176
|
-
'13. libraryResearchStatus',
|
|
177
|
-
'14. libraryDecisions',
|
|
178
|
-
'15. mathSystems',
|
|
179
|
-
'16. tokenSystem',
|
|
180
|
-
'17. colorTruth',
|
|
181
|
-
'18. crossViewportAdaptation',
|
|
182
|
-
'19. motionSystem',
|
|
183
|
-
'20. componentMorphology',
|
|
184
|
-
'21. accessibilityPolicy',
|
|
185
|
-
'22. designExecutionPolicy',
|
|
186
|
-
'23. designExecutionHandoff',
|
|
187
|
-
'24. reviewRubric',
|
|
188
|
-
'25. contextHygiene',
|
|
189
|
-
'26. forbiddenPatterns',
|
|
190
|
-
'27. requiredDesignSections',
|
|
191
|
-
'28. implementation',
|
|
192
|
-
'29. researchDossier',
|
|
193
|
-
'30. repoEvidence when onboarding or detector evidence exists',
|
|
194
|
-
'',
|
|
195
|
-
'## Mechanical Gates',
|
|
196
|
-
'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.',
|
|
197
|
-
'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.',
|
|
198
|
-
'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.',
|
|
199
|
-
'1. Do not copy external style guides.',
|
|
200
|
-
'2. Do not anchor the final design language to famous products, benchmark visuals, or external reference surfaces.',
|
|
201
|
-
'3. Do not choose final style, library, palette, typography, motion, or layout from this offline scaffold.',
|
|
202
|
-
'4. Use repo evidence, active brief, current docs, and current official docs for technology choices.',
|
|
203
|
-
'5. Keep UI-only requests context-isolated; load frontend rules first.',
|
|
204
|
-
'6. Preserve Design continuity is opt-in. Use current repo evidence unless the user approves continuity.',
|
|
205
|
-
'7. Treat prior website memory, unrelated project aesthetics, remembered screenshots, and old design docs as tainted unless approved.',
|
|
206
|
-
'8. Use primitive, semantic, and component tokens. Component tokens must consume semantic aliases.',
|
|
207
|
-
'9. Encode colorTruth in perceptual terms. Hex values are implementation derivatives.',
|
|
208
|
-
'10. Define viewport mutation rules for mobile, tablet, and desktop. Shrinking desktop is failure.',
|
|
209
|
-
'11. Keep structured execution representation-first: surface plan, component graph, content-priority map, viewport mutation plan, and interaction-state matrix.',
|
|
210
|
-
'12. Make design-intent.json carry designExecutionPolicy and designExecutionHandoff, not prose-only policy.',
|
|
211
|
-
'12a. Make design-intent.json carry designFlexibilityPolicy so locked outcomes, candidate moves, and flexible expression axes stay separate.',
|
|
212
|
-
'13. Keep semantic review focused on contract fidelity, distinctiveness, hierarchy, state behavior, and viewport mutation.',
|
|
213
|
-
'14. Treat WCAG 2.2 AA as the hard floor. Use APCA only as advisory tuning.',
|
|
214
|
-
'15. Cover focus visibility, focus appearance, target size, accessible authentication, keyboard access, and dynamic status/state access.',
|
|
215
|
-
'16. Do not depend on screenshot capture, browser automation, or image diffs as the default quality path.',
|
|
216
|
-
'17. Make one memorable visual bet before code.',
|
|
217
|
-
'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.',
|
|
218
|
-
'19. Use visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity.',
|
|
219
|
-
'20. Complete the AI color audit before code.',
|
|
220
|
-
'21. Treat motion, 3D, canvas, WebGL, scroll choreography, and modern animation libraries as first-class options.',
|
|
221
|
-
'22. If motion or spatial UI is omitted, document the product-fit reason and replacement interaction quality.',
|
|
222
|
-
'23. If the user supplies research files, library lists, screenshots, articles, or benchmark notes, read them as candidate evidence and verify technology claims.',
|
|
223
|
-
'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.',
|
|
224
|
-
'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.',
|
|
225
|
-
'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.',
|
|
226
|
-
'26. Reject final anchors named dashboard, portal, cards, admin panel, SaaS shell, web app shell, or minimalist interface.',
|
|
227
|
-
'27. Reject anchors described only as modern, clean, premium, expressive, minimal, or bold.',
|
|
228
|
-
'27a. Do not default anchors to room, darkroom, counting room, control room, war room, studio, lab, cockpit, or command center unless the product genuinely depends on that physical place model.',
|
|
229
|
-
'27b. Prefer artifacts, custody flows, instruments, data behaviors, material systems, editorial systems, service rituals, or interaction mechanisms over "where the interface lives".',
|
|
230
|
-
'28. Set conceptualAnchor.anchorReference and make derivedTokenLogic.anchorReference match exactly.',
|
|
231
|
-
'29. Fill derivedTokenLogic before code. If a token cannot trace to anchorReference, revise it.',
|
|
232
|
-
'29a. Lock semantic roles before exact values. Do not freeze fonts, color primitives, radius, shadows, or component-kit theme treatment unless repo evidence, accessibility validation, implementation constraints, or explicit user approval requires it.',
|
|
233
|
-
'30. Research current official docs before importing any new UI-related library.',
|
|
234
|
-
'31. Do not default to shadcn/ui, Tailwind-only, native-only, or any component kit by habit, and do not avoid them out of guardrail fear; choose the UI foundation from product fit, accessibility, interaction quality, runtime constraints, and official docs.',
|
|
235
|
-
'32. If research is unavailable, set libraryResearchStatus to pending-verification and use native CSS, browser APIs, or existing dependencies only when they can preserve the intended ambition.',
|
|
236
|
-
'33. Do not reject modern lightweight libraries solely because they add a dependency; package count or vague performance fear is not a blocker by itself.',
|
|
237
|
-
'33a. Tailwind-first is valid only when the stack, token model, and team workflow support it; pure Tailwind, vanilla CSS, shadcn/ui, or any component kit is not neutral by default and not forbidden by default.',
|
|
238
|
-
'33b. For fresh framework projects, prefer official setup commands when official docs show they create the supported project shape; manual file assembly requires a repo, prototype, learning, or architecture reason.',
|
|
239
|
-
'34. Define reviewRubric and require genericity findings to name the actual drift signal.',
|
|
240
|
-
'35. Separate taste from failure. Bold accessible work is valid.',
|
|
241
|
-
'36. For zero-based redesign, create visualResetStrategy and reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.',
|
|
242
|
-
'37. Treat productionContentPolicy as blocking: remove visible testing, demo, sample, placeholder, lorem, TODO, coming soon, and scaffold copy unless it is a real product state.',
|
|
243
|
-
'38. Do not make core user workflows terminal-only unless the product is explicitly a CLI, developer tool, or operational runbook.',
|
|
244
|
-
'39. Separate required experience outcomes from candidate implementation moves. Candidate signature moves are proposals until product evidence, accessibility, or user approval makes them required.',
|
|
245
|
-
'40. Translate conceptual anchors non-literally first. Do not turn anchor artifacts into required chrome, decorative props, wallpaper, or theme objects unless they serve a named product function.',
|
|
246
|
-
'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.',
|
|
247
|
-
'',
|
|
248
|
-
'## Research-Design Brief Gates (research-design.md)',
|
|
249
|
-
'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.',
|
|
250
|
-
'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.',
|
|
251
|
-
'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.',
|
|
252
|
-
'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`.',
|
|
253
|
-
'45. Strengthened rename test: rename the product to three genuinely different categories that are remote from each other and from the actual product. Pick fresh test categories per anchor; do not reuse the same triple across every anchor. Record the three test categories explicitly in the dossier so a human reviewer can audit them. Score the result: 0/3 coherent equals STRONG PASS, 1/3 equals PASS, 2/3 equals REVISE, 3/3 equals DISCARD. Never select an anchor with verdict DISCARD; revise REVISE candidates until they fail in at least 2 of 3 categories.',
|
|
254
|
-
'46. Make `conceptualAnchor.anchorReference` and `derivedTokenLogic.anchorReference` match the selected anchor exactly. The selected anchor must have verdict STRONG PASS or PASS.',
|
|
255
|
-
'',
|
|
256
|
-
'## Creative Ambition Floor',
|
|
257
|
-
'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.',
|
|
258
|
-
'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.',
|
|
259
|
-
'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.',
|
|
260
|
-
'Use reduced-motion fallbacks instead of suppressing motion.',
|
|
261
|
-
'',
|
|
262
|
-
'## Token Derivation Audit',
|
|
263
|
-
'Before implementation, docs/design-intent.json must include derivedTokenLogic.anchorReference plus colorDerivationSource, spacingDerivationSource, typographyDerivationSource, motionDerivationSource, colorSpace, spatialBaseUnit, typeScaleMethod, motionBudget, and validationRule.',
|
|
264
|
-
'Every semantic token role must be explainable from anchorReference. If the rationale is only looks good, common practice, modern default, or framework default, derive the token again before UI code.',
|
|
265
|
-
'Keep exact primitive values flexible until repo evidence, accessibility validation, implementation constraints, or explicit user approval locks them.',
|
|
266
|
-
'',
|
|
267
|
-
'## Implementation Craft Layer',
|
|
268
|
-
'Record explicit CSS craft decisions before UI code: color space and commitment level, fluid typography method, spacing base unit, motion budget, and the default CSS reflex this project rejects.',
|
|
269
|
-
'Prefer OKLCH, tinted neutrals, clamp() type scales, transform/opacity motion, and responsive recomposition when supported by the stack; preserve existing design-system tokens and document fallbacks instead of forcing rewrites.',
|
|
270
|
-
'',
|
|
271
|
-
'## Library Research Protocol',
|
|
272
|
-
'If web search is available, verify every new UI, animation, scroll, 3D, canvas, chart, icon, styling, or primitive library against current official docs and record source URL, fetched date, stable compatible version, purpose, risk, and fallback.',
|
|
273
|
-
'If web search is unavailable or fails, set libraryResearchStatus to pending-verification, record LIBRARY_TO_VERIFY notes, and use native CSS, browser APIs, or already-present project dependencies only when they can preserve the intended ambition until verification is possible.',
|
|
274
|
-
'Select UI foundations dynamically. Use ready-made primitives or component kits for mechanics when they fit, but replace library-default visual language with project-specific composition, tokens, motion, state treatment, and morphology.',
|
|
275
|
-
'For fresh projects, compare the user-constrained or strongest-fit framework against at least one plausible alternative when no framework is explicitly selected. Do not let Next.js or any familiar web stack win by pattern frequency.',
|
|
154
|
+
'## Hard Rules',
|
|
155
|
+
'1. Do not copy external style guides or anchor to famous product surfaces.',
|
|
156
|
+
'2. Do not choose final style, library, palette, typography, or motion from this offline scaffold.',
|
|
157
|
+
'3. Use repo evidence, active brief, current docs, and current official docs for technology choices.',
|
|
158
|
+
'4. WCAG 2.2 AA is the hard floor. APCA is advisory perceptual tuning only.',
|
|
159
|
+
'5. Research current official docs before importing any new UI-related library.',
|
|
160
|
+
'6. Do not default to any component kit by habit, and do not avoid them when they fit.',
|
|
161
|
+
'7. Keep research vocabulary internal; evidence, anchor, and category-code labels must not appear in public-facing docs.',
|
|
162
|
+
'8. Treat production content as blocking: remove demo, placeholder, lorem, TODO, and scaffold copy.',
|
|
276
163
|
'',
|
|
277
164
|
'## Project Inputs',
|
|
278
165
|
`- Project name: ${discoveryAnswers.projectName}`,
|
|
@@ -283,33 +170,18 @@ export function buildDesignBootstrapPrompt({
|
|
|
283
170
|
`- Architecture constraint: ${initContext.blueprintFileName === 'agent-decision-architecture.md' ? 'agent recommendation required before coding' : toTitleCase(initContext.blueprintFileName)}`,
|
|
284
171
|
'',
|
|
285
172
|
'## Seed Machine Contract',
|
|
286
|
-
'Refine this scaffold seed instead of discarding it.
|
|
173
|
+
'Refine this scaffold seed instead of discarding it. Replace placeholder direction with agent-chosen decisions grounded in repo evidence and the active brief.',
|
|
287
174
|
'```json',
|
|
288
175
|
designIntentSeed.trim(),
|
|
289
176
|
'```',
|
|
290
177
|
'',
|
|
291
178
|
'## Required Execution',
|
|
292
|
-
'1. Create or update docs/DESIGN.md with complete content.',
|
|
293
|
-
'2. Create or update docs/design-intent.json with machine-readable design intent.',
|
|
294
|
-
'3. Keep both files synchronized
|
|
295
|
-
'4.
|
|
296
|
-
'5.
|
|
297
|
-
'6.
|
|
298
|
-
'7. Encode a stable review rubric: required dimensions, genericity signals, valid bold signals, and reporting rules that separate taste from real failure.',
|
|
299
|
-
'7a. Encode designFlexibilityPolicy and designExecutionHandoff.expressionFlexibility so future agents know what is locked and what can change.',
|
|
300
|
-
'8. Make the handoff executable without screenshot dependency. The contract must still guide high-precision UI generation from repo evidence and changed code alone.',
|
|
301
|
-
'9. Preserve repoEvidence.designEvidenceSummary when onboarding or detector evidence exists instead of discarding it.',
|
|
302
|
-
'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.',
|
|
303
|
-
'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.',
|
|
304
|
-
'12. Keep visualResetStrategy in the machine-readable handoff so reset-language tasks cannot quietly become restyles of the previous UI.',
|
|
305
|
-
'13. Preserve externalResearchIntake so user-provided research becomes reviewed evidence without turning into an offline style or dependency preset.',
|
|
306
|
-
'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.',
|
|
307
|
-
'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.',
|
|
308
|
-
'15a. Record conceptualAnchor.categoryCodes.candidateEntries (Section 3 of research-design.md), conceptualAnchor.morphologicalExploration with selectedCombination and uncomfortableCombination (Section 4), and conceptualAnchor.anchorCandidates.candidates with full renameTest results (Section 5) before UI implementation.',
|
|
309
|
-
'16. Preserve derivedTokenLogic, libraryResearchStatus, and libraryDecisions so token choices and dependency uncertainty stay visible before implementation.',
|
|
310
|
-
'16a. Preserve designFlexibilityPolicy so the machine contract guides consistency without freezing literal anchor artifacts, exact token primitives, or component-kit visual language.',
|
|
311
|
-
'17. Preserve productionContentPolicy so UI output is ship-ready and not a testing-looking scaffold.',
|
|
312
|
-
'18. After the contract exists, use it as a first-class source for future UI tasks.',
|
|
179
|
+
'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.',
|
|
180
|
+
'2. Create or update docs/design-intent.json with machine-readable design intent including conceptualAnchor, creative commitments, and anti-repeat ledger.',
|
|
181
|
+
'3. Keep both files synchronized.',
|
|
182
|
+
'4. Make the contract executable without screenshot dependency.',
|
|
183
|
+
'5. Preserve repoEvidence.designEvidenceSummary when onboarding or detector evidence exists.',
|
|
184
|
+
'6. After the contract exists, use it as a first-class source for future UI tasks.',
|
|
313
185
|
'',
|
|
314
186
|
].join('\n');
|
|
315
187
|
}
|
package/package.json
CHANGED
|
@@ -50,30 +50,6 @@ const REQUIRED_ARCHITECTURE_CHECKLIST_SNIPPETS = [
|
|
|
50
50
|
];
|
|
51
51
|
|
|
52
52
|
const REQUIRED_FRONTEND_RULE_SNIPPETS = [
|
|
53
|
-
'Frontend Design and Interaction Boundaries',
|
|
54
|
-
'Load this rule for UI-facing work. Keep the loaded surface small.',
|
|
55
|
-
'## FE-001: Activation',
|
|
56
|
-
'## FE-002: Authority',
|
|
57
|
-
'Treat `.agent-context/` as design governance authority.',
|
|
58
|
-
'Treat `README.md` as public and developer overview, setup, usage, and user-facing context only',
|
|
59
|
-
'Do not choose final style, framework, palette, typography, layout paradigm, or animation library offline.',
|
|
60
|
-
'Keep design continuity opt-in.',
|
|
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.',
|
|
64
|
-
'## FE-003: Required Design Contract',
|
|
65
|
-
'## FE-004: Anti-Generic UI Gate',
|
|
66
|
-
'Do not ship interchangeable dashboard chrome',
|
|
67
|
-
'Do not let repeated surfaces share one visual treatment by habit',
|
|
68
|
-
'Use the rename test:',
|
|
69
|
-
'decorative geometry are invalid as wallpaper',
|
|
70
|
-
'## FE-005: Dynamic Anchor Gate',
|
|
71
|
-
'## FE-006: Motion, Palette, and 3D',
|
|
72
|
-
'Treat motion, 3D, WebGL, canvas, scroll choreography, and animation libraries as first-class options.',
|
|
73
|
-
'Prefer visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity.',
|
|
74
|
-
'## FE-008: Responsive Mutation',
|
|
75
|
-
'Responsive quality is not scale-only.',
|
|
76
|
-
'container queries',
|
|
77
53
|
'## FE-009: Accessibility',
|
|
78
54
|
'WCAG 2.2 AA is the hard floor.',
|
|
79
55
|
'APCA is advisory perceptual tuning only.',
|
|
@@ -84,26 +60,10 @@ const REQUIRED_FRONTEND_RULE_SNIPPETS = [
|
|
|
84
60
|
];
|
|
85
61
|
|
|
86
62
|
const REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS = [
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'repoEvidence.designEvidenceSummary',
|
|
92
|
-
'research current official docs',
|
|
93
|
-
'Responsive design means recomposition, not resizing.',
|
|
94
|
-
'Implementation Craft Layer',
|
|
95
|
-
'agent-chosen visual direction',
|
|
96
|
-
'viewport mutation rules',
|
|
97
|
-
'WCAG 2.2 AA is the hard floor',
|
|
98
|
-
'APCA may be used only as advisory perceptual tuning',
|
|
99
|
-
'unresearched dependency choices',
|
|
100
|
-
'Dynamic UI Foundation Selection',
|
|
101
|
-
'Adaptive Research Freshness',
|
|
102
|
-
'fixed calendar range',
|
|
103
|
-
'research vocabulary internal',
|
|
104
|
-
'A new dependency, package count, or vague performance concern is not a blocker by itself.',
|
|
105
|
-
'default component-kit styling without product rationale',
|
|
106
|
-
'genericity findings that cannot name the exact drift signal',
|
|
63
|
+
'WCAG 2.2 AA is the hard compliance floor',
|
|
64
|
+
'Name Your Defaults',
|
|
65
|
+
'Choose an Anchor',
|
|
66
|
+
'Creative Commitments'
|
|
107
67
|
];
|
|
108
68
|
|
|
109
69
|
const REQUIRED_UI_DESIGN_JUDGE_SNIPPETS = [
|
|
@@ -135,7 +95,6 @@ const REQUIRED_INSTRUCTIONS_SNIPPETS = [
|
|
|
135
95
|
'External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted',
|
|
136
96
|
'WCAG 2.2 AA as the hard compliance floor',
|
|
137
97
|
'APCA as advisory perceptual tuning only',
|
|
138
|
-
'Do not require screenshot capture as a baseline dependency',
|
|
139
98
|
];
|
|
140
99
|
|
|
141
100
|
const REQUIRED_DESIGN_EVIDENCE_SNIPPETS = [
|
|
@@ -44,6 +44,7 @@ export const REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS = [
|
|
|
44
44
|
'Backend/API governance was applied through global domain rules',
|
|
45
45
|
];
|
|
46
46
|
|
|
47
|
+
export const REQUIRED_RELEASE_VERSION = '4.3.4';
|
|
47
48
|
export const REQUIRED_REFACTOR_PROMPT_SNIPPETS = [
|
|
48
49
|
'Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.',
|
|
49
50
|
'Prioritize maintainability over compressed one-liners.',
|
|
@@ -21,16 +21,7 @@ export const FORMAL_ARTIFACT_PATHS = [
|
|
|
21
21
|
'GEMINI.md',
|
|
22
22
|
];
|
|
23
23
|
export const REQUIRED_HUMAN_WRITING_SNIPPETS = [
|
|
24
|
-
|
|
25
|
-
path: '.agent-context/rules/api-docs.md',
|
|
26
|
-
snippets: [
|
|
27
|
-
'## API-006: Human Writing Standard (Mandatory)',
|
|
28
|
-
'This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations.',
|
|
29
|
-
'Style baseline findings are advisory by default and must not block endpoint-change commits that already include accurate docs/spec updates.',
|
|
30
|
-
'Write formal project docs in English by default',
|
|
31
|
-
'No emoji in formal artifacts.',
|
|
32
|
-
],
|
|
33
|
-
},
|
|
24
|
+
|
|
34
25
|
{
|
|
35
26
|
path: '.agent-context/review-checklists/pr-checklist.md',
|
|
36
27
|
snippets: [
|
|
@@ -161,18 +152,8 @@ export const REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS = [
|
|
|
161
152
|
'produce a short evidence-backed recommendation from the brief, repo evidence, and live official documentation before coding',
|
|
162
153
|
],
|
|
163
154
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
snippets: [
|
|
167
|
-
'Do not force a default architecture label before the repo, delivery model, and boundary evidence are clear.',
|
|
168
|
-
],
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
path: '.agent-context/rules/microservices.md',
|
|
172
|
-
snippets: [
|
|
173
|
-
'Do not start with microservices by fashion, fear, or habit.',
|
|
174
|
-
],
|
|
175
|
-
},
|
|
155
|
+
|
|
156
|
+
|
|
176
157
|
{
|
|
177
158
|
path: 'lib/cli/commands/init.mjs',
|
|
178
159
|
snippets: [
|
|
@@ -192,16 +173,7 @@ export const REQUIRED_UNIVERSAL_SOP_SNIPPETS = [
|
|
|
192
173
|
'Do not write application, firmware, or UI code',
|
|
193
174
|
],
|
|
194
175
|
},
|
|
195
|
-
|
|
196
|
-
path: '.agent-context/rules/architecture.md',
|
|
197
|
-
snippets: [
|
|
198
|
-
'## ARCH-003: Universal SOP Baseline (Mandatory)',
|
|
199
|
-
'Root `README.md` must exist for every fresh or existing project',
|
|
200
|
-
'`docs/doc-index.md` must exist whenever `docs/` exists',
|
|
201
|
-
'Security and testing are non-negotiable baseline requirements.',
|
|
202
|
-
'If required project context docs are missing, stop implementation and bootstrap docs before writing application code.',
|
|
203
|
-
],
|
|
204
|
-
},
|
|
176
|
+
|
|
205
177
|
{
|
|
206
178
|
path: '.agent-context/prompts/init-project.md',
|
|
207
179
|
snippets: [
|
|
@@ -252,20 +224,12 @@ export const REQUIRED_UNIVERSAL_SOP_SNIPPETS = [
|
|
|
252
224
|
'Documentation-first policy:',
|
|
253
225
|
'Keep README.md public and developer friendly',
|
|
254
226
|
'For docs-only/docs-first requests, do not write application, firmware, or UI code until the user asks or approves an implementation plan.',
|
|
255
|
-
'
|
|
227
|
+
'Follow the three-step design direction process in bootstrap-design.md',
|
|
256
228
|
],
|
|
257
229
|
},
|
|
258
230
|
];
|
|
259
231
|
export const REQUIRED_DIAGRAM_FORMAT_SNIPPETS = [
|
|
260
|
-
|
|
261
|
-
path: '.agent-context/rules/api-docs.md',
|
|
262
|
-
snippets: [
|
|
263
|
-
'## API-013: Documentation Diagram Format (Mandatory)',
|
|
264
|
-
'Mermaid.js as the default diagram format',
|
|
265
|
-
'Do not use PlantUML',
|
|
266
|
-
'convert the relevant sections to Mermaid diagrams in the same change',
|
|
267
|
-
],
|
|
268
|
-
},
|
|
232
|
+
|
|
269
233
|
{
|
|
270
234
|
path: 'lib/cli/project-scaffolder/prompt-builders.mjs',
|
|
271
235
|
snippets: [
|
|
@@ -328,15 +292,9 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
328
292
|
'Documentation-First Mode',
|
|
329
293
|
'English by default',
|
|
330
294
|
'do not write application, firmware, or UI code',
|
|
331
|
-
'
|
|
332
|
-
'
|
|
295
|
+
'three-step direction process',
|
|
296
|
+
'anti-repeat ledger',
|
|
333
297
|
'perform live web research',
|
|
334
|
-
'research-design.md',
|
|
335
|
-
'researchDossier.metadata',
|
|
336
|
-
'researchVerifiedAt',
|
|
337
|
-
'freshnessWindowDays',
|
|
338
|
-
'Anti-repeat ledger',
|
|
339
|
-
'user-explicit redesign',
|
|
340
298
|
],
|
|
341
299
|
},
|
|
342
300
|
{
|
|
@@ -346,8 +304,6 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
346
304
|
'UI Design Mode',
|
|
347
305
|
'bootstrap-design.md',
|
|
348
306
|
'frontend-architecture.md',
|
|
349
|
-
'Motion/Palette Decision',
|
|
350
|
-
'product categories are heuristics',
|
|
351
307
|
'do not eagerly load unrelated backend-only rules',
|
|
352
308
|
'valid style context',
|
|
353
309
|
'External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted',
|
|
@@ -358,63 +314,16 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
358
314
|
{
|
|
359
315
|
path: '.agent-context/prompts/bootstrap-design.md',
|
|
360
316
|
snippets: [
|
|
361
|
-
'
|
|
362
|
-
'
|
|
363
|
-
'
|
|
364
|
-
'
|
|
365
|
-
'
|
|
366
|
-
'
|
|
317
|
+
'WCAG 2.2 AA is the hard compliance floor',
|
|
318
|
+
'Name Your Defaults',
|
|
319
|
+
'Choose an Anchor',
|
|
320
|
+
'Creative Commitments',
|
|
321
|
+
'anti-repeat ledger',
|
|
322
|
+
'Named Defaults to Avoid',
|
|
323
|
+
'Post-Implementation Check',
|
|
324
|
+
'Redesign Protocol',
|
|
367
325
|
'research current official docs',
|
|
368
|
-
'
|
|
369
|
-
'AI-safe UI',
|
|
370
|
-
'Creative Ambition Floor',
|
|
371
|
-
'AI Color and Template Residue Audit',
|
|
372
|
-
'Motion and 3D Courage Rule',
|
|
373
|
-
'Design Flexibility Layer',
|
|
374
|
-
'visually exploratory, product-derived palettes',
|
|
375
|
-
'decorative grid wallpaper',
|
|
376
|
-
'`aiSafeUiAudit`',
|
|
377
|
-
'AI color drift',
|
|
378
|
-
'first-class UI options',
|
|
379
|
-
'product categories are heuristics',
|
|
380
|
-
'Responsive design means recomposition, not resizing.',
|
|
381
|
-
'agent-chosen visual direction',
|
|
382
|
-
'viewport mutation rules',
|
|
383
|
-
'WCAG 2.2 AA is the hard floor',
|
|
384
|
-
'APCA may be used only as advisory perceptual tuning',
|
|
385
|
-
'unresearched dependency choices',
|
|
386
|
-
'Dynamic UI Foundation Selection',
|
|
387
|
-
'Adaptive Research Freshness',
|
|
388
|
-
'fixed calendar range',
|
|
389
|
-
'research vocabulary internal',
|
|
390
|
-
'locked outcomes from flexible expression',
|
|
391
|
-
'A new dependency, package count, or vague performance concern is not a blocker by itself.',
|
|
392
|
-
'default component-kit styling without product rationale',
|
|
393
|
-
'genericity findings that cannot name the exact drift signal',
|
|
394
|
-
'research-design.md',
|
|
395
|
-
'Section 3 gate from `research-design.md`',
|
|
396
|
-
'Pre-Emit Identity Check',
|
|
397
|
-
],
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
path: '.agent-context/prompts/research-design.md',
|
|
401
|
-
snippets: [
|
|
402
|
-
'# Research-Design Brief',
|
|
403
|
-
'## Section 3 — Creative Direction',
|
|
404
|
-
'### 3a. Category defaults to avoid',
|
|
405
|
-
'### 3b. Anchor reference',
|
|
406
|
-
'### 3c. Four creative commitments',
|
|
407
|
-
'AI slop',
|
|
408
|
-
'Anti-Repeat Ledger Gate',
|
|
409
|
-
'Live Source Freshness Gate',
|
|
410
|
-
'rolling-current',
|
|
411
|
-
'evidenceTable[]',
|
|
412
|
-
'old-timeless',
|
|
413
|
-
'Research vocabulary is internal-only',
|
|
414
|
-
'previousAnchors',
|
|
415
|
-
'previousMotionSignatures',
|
|
416
|
-
'tokenContinuityClassification',
|
|
417
|
-
'categoryCodes',
|
|
326
|
+
'product-specific reason',
|
|
418
327
|
],
|
|
419
328
|
},
|
|
420
329
|
{
|
|
@@ -566,8 +475,7 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
566
475
|
'LAYER 1: RULES (SCOPE-RESOLVED)',
|
|
567
476
|
'LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS',
|
|
568
477
|
'bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign',
|
|
569
|
-
'
|
|
570
|
-
'git-workflow.md',
|
|
478
|
+
'three-step design direction process in bootstrap-design.md',
|
|
571
479
|
'designEvidenceSummary',
|
|
572
480
|
],
|
|
573
481
|
},
|
|
@@ -580,18 +488,7 @@ export const REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS = [
|
|
|
580
488
|
'For Docker or Compose work, load `docker-runtime.md` and verify the latest official Docker docs before authoring container assets.',
|
|
581
489
|
],
|
|
582
490
|
},
|
|
583
|
-
|
|
584
|
-
path: '.agent-context/rules/docker-runtime.md',
|
|
585
|
-
snippets: [
|
|
586
|
-
'latest official Docker documentation first',
|
|
587
|
-
'Docker Compose Quickstart',
|
|
588
|
-
'Compose file reference',
|
|
589
|
-
'Dockerfile best practices',
|
|
590
|
-
'Use current `docker compose` workflows and `compose.yaml`.',
|
|
591
|
-
'Do not add the top-level Compose `version` field by default.',
|
|
592
|
-
'Use the latest stable compatible Docker base image',
|
|
593
|
-
],
|
|
594
|
-
},
|
|
491
|
+
|
|
595
492
|
{
|
|
596
493
|
path: '.agent-context/prompts/init-project.md',
|
|
597
494
|
snippets: [
|
|
@@ -607,17 +504,7 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
|
|
|
607
504
|
'use the latest stable compatible dependency set and official setup flow',
|
|
608
505
|
],
|
|
609
506
|
},
|
|
610
|
-
|
|
611
|
-
path: '.agent-context/rules/efficiency-vs-hype.md',
|
|
612
|
-
snippets: [
|
|
613
|
-
'Latest-Compatible-First Rule',
|
|
614
|
-
'latest stable compatible dependency version',
|
|
615
|
-
'official scaffolder or setup command',
|
|
616
|
-
'Only step down to an older dependency version after documenting',
|
|
617
|
-
'Do not treat dependency avoidance as an engineering virtue by itself.',
|
|
618
|
-
'performance-fear choices',
|
|
619
|
-
],
|
|
620
|
-
},
|
|
507
|
+
|
|
621
508
|
{
|
|
622
509
|
path: '.agent-context/prompts/init-project.md',
|
|
623
510
|
snippets: [
|
|
@@ -649,7 +536,6 @@ export const FORBIDDEN_ACTIVE_BIAS_ANCHOR_SNIPPETS = [
|
|
|
649
536
|
snippets: [
|
|
650
537
|
'stylistic inspiration',
|
|
651
538
|
'famous brand reference',
|
|
652
|
-
'If no approved reference system exists',
|
|
653
539
|
'explicitly approved reference systems',
|
|
654
540
|
],
|
|
655
541
|
},
|
|
@@ -360,13 +360,9 @@ export async function validateInstructionAdapters(context) {
|
|
|
360
360
|
'unreachable_files',
|
|
361
361
|
'validation_plan',
|
|
362
362
|
];
|
|
363
|
-
const requiredUiReadabilitySnippets = [
|
|
364
|
-
'Motion/Palette Decision',
|
|
365
|
-
'product categories are heuristics',
|
|
366
|
-
];
|
|
367
363
|
const instructionFootprintLimits = [
|
|
368
364
|
{ path: 'AGENTS.md', maxLines: 180 },
|
|
369
|
-
{ path: '.agent-context/prompts/bootstrap-design.md', maxLines:
|
|
365
|
+
{ path: '.agent-context/prompts/bootstrap-design.md', maxLines: 80 },
|
|
370
366
|
{ path: '.agent-context/rules/frontend-architecture.md', maxLines: 180 },
|
|
371
367
|
];
|
|
372
368
|
|
|
@@ -378,13 +374,7 @@ export async function validateInstructionAdapters(context) {
|
|
|
378
374
|
}
|
|
379
375
|
}
|
|
380
376
|
|
|
381
|
-
|
|
382
|
-
if (canonicalInstructionContent.includes(requiredUiReadabilitySnippet)) {
|
|
383
|
-
pass(`AGENTS.md includes UI readability snippet: ${requiredUiReadabilitySnippet}`);
|
|
384
|
-
} else {
|
|
385
|
-
fail(`AGENTS.md is missing UI readability snippet: ${requiredUiReadabilitySnippet}`);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
377
|
+
|
|
388
378
|
|
|
389
379
|
for (const footprintLimit of instructionFootprintLimits) {
|
|
390
380
|
const absoluteFootprintPath = join(ROOT_DIR, footprintLimit.path);
|