@ryuenn3123/agentic-senior-core 4.2.8 → 4.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ Check `docs/design-intent.json`:
29
29
  4. Record `motionPaletteDecision` before UI code; product categories are heuristics, not style presets.
30
30
  5. Encode `repoEvidence.designEvidenceSummary` when onboarding or detector evidence exists.
31
31
  6. Keep both design docs synchronized after implementation.
32
- 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).
32
+ 7. Complete the Section 3 gate from `research-design.md` before UI implementation: `conceptualAnchor.categoryCodes` (at least three category defaults to avoid with rejection notes), `conceptualAnchor.anchorReference` (one concrete, googleable reference), and four creative commitments (typography, palette, motion, composition) recorded in design docs.
33
33
  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.
34
34
  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`.
35
35
  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`.
@@ -120,122 +120,52 @@ Reference material is fuel for variance, not a style source.
120
120
 
121
121
  If references are not provided by the user and web search is unavailable, set `referenceIntakeStatus` to `internal-evidence-only` and constrain Sections 3 to 5 to repo evidence and project docs.
122
122
 
123
- ## Section 3 — Category Code Identification
123
+ ## Section 3 — Creative Direction
124
124
 
125
- Before exploring variance, name the cliches the product category will default to without intervention. These are the patterns reviewers recognize on sight as "the standard look" for the category.
125
+ Before UI code, commit to a specific visual direction. The agent tends to converge toward generic, "on distribution" outputs. In frontend design this creates what users call the "AI slop" aesthetic. This section exists to prevent that.
126
126
 
127
- This list becomes `categoryCodes` in the design-intent.json. Specificity standard: a category code is only valid if someone can recognize the exact cliche from the text description alone, without seeing the UI and without knowing the product name.
127
+ ### 3a. Category defaults to avoid
128
128
 
129
- Fails specificity:
130
- - `clean typography` (too abstract, applies to anything)
131
- - `modern color palette` (not falsifiable)
132
- - `smooth animations` (describes nothing specific)
129
+ Name at least three specific cliches your product category will fall into without intervention. Be specific enough that someone unfamiliar with the project can visualize the exact aesthetic trap from the text alone.
133
130
 
134
- Examples of cliches described with sufficient specificity. Read carefully: these examples illustrate the description format. They are themselves AI-defaultable cliches of their categories. They are NOT target aesthetics. They are not aesthetic candidates for any product. They appear here so you can see what specificity reads like; you are not allowed to ship them.
131
+ Common AI-safe cliches to name and reject when your product sits anywhere near them:
135
132
 
136
- The three example categories below were chosen specifically because they are unlikely to overlap with common software products, to prevent leakage:
137
-
138
- - `children's storybook illustration site: hand-painted gouache textures with irregular hand-lettered titles, off-grid spreads with whitespace gutters, page-turn pacing rather than scroll` (instantly recognizable as kids book category default)
139
- - `luxury car configurator: full-bleed monochrome photography on black, ultra-thin sans-serif tracked wide, slow horizontal scroll with locked vertical alignment, micro-counters that tick instead of slide` (instantly recognizable as luxury auto category default)
140
- - `academic philosophy journal: high-contrast black-on-cream, book-class serif body at 11pt with generous leading, footnote markers with hover panels, numbered table-of-contents navigation, no hero imagery` (instantly recognizable as academic journal category default)
141
-
142
- Anti-leakage rule: listing a cliche is identifying a trap, not endorsing an aesthetic. If your product happens to fall in one of the example categories above, the matching cliche still must appear in your `categoryCodes` AND must carry an explicit rejection note. The same applies to the AI-safe defaults below.
143
-
144
- Common AI-safe cliches you must list and reject if your product is anywhere near them. Software products almost always pattern-match one of these without intervention:
145
-
146
- - `dev-tool default: condensed tabular numerics with minimal chrome and monospace code blocks on dark slate background, sans-serif metadata at 11–12px, monochrome status dots, single-line settings rows`
147
- - `AI-startup landing default: purple-to-pink gradient hero with floating 3D glass cards, sans-serif display type at 700–900 weight, vague hero copy, three-up feature grid below the fold`
148
- - `health/wellness app default: mint accent on white surface with coral status indicators, rounded pill-shaped buttons, friendly sans-serif at high weight, soft drop shadows on cards`
149
- - `SaaS admin default: left-side icon-only nav, top utility bar, three-card KPI row above a single data table, neutral grey-on-white with one accent color, modal-driven detail flows`
133
+ - `dev-tool default: condensed tabular numerics with minimal chrome and monospace code blocks on dark slate background, sans-serif metadata at 11-12px, monochrome status dots`
134
+ - `AI-startup landing default: purple-to-pink gradient hero with floating 3D glass cards, sans-serif display type at 700-900 weight, vague hero copy, three-up feature grid`
135
+ - `SaaS admin default: left-side icon-only nav, top utility bar, three-card KPI row above a single data table, neutral grey-on-white with one accent color`
150
136
  - `marketing site default: hero image with one-line headline plus subhead, three feature tiles below, two pricing tiers, testimonial carousel, footer link grid`
151
137
 
152
- If you find yourself describing your selected direction in the same shape as any of these, you have inverted the test. Revise.
153
-
154
- Self-test: read each category code aloud to someone unfamiliar with the project.
155
-
156
- - If they cannot visualize a specific aesthetic direction from the text alone, the code is too abstract. Revise until it passes.
157
- - If they say "yeah that's basically the X cliche", the description is specific enough. The cliche then belongs on your reject list, not on your candidate list.
158
-
159
- Output: at least three category codes per product surface in `categoryCodes`. Each entry must pass the specificity self-test, must include the one-sentence reason that pattern is the default for the category, and must include an explicit one-sentence rejection note ("I will not ship this; here is the trap it sets") so the cliche cannot quietly become the target.
160
-
161
- ### Dimensional split (mandatory)
162
-
163
- Category codes must be broken down by dimension. Do not collapse multiple dimensions into a single category-level cliche. Each cluster lists the patterns that the product category will default to without intervention.
164
-
165
- - `typographyClusters`: font family combinations that are the category default. Be explicit about font families. Name the actual trio or pair that this product's category currently defaults to, derived from live portfolio observation for THIS task. Do not anchor on examples from other categories or other timeframes.
166
- - `paletteClusters`: palette signatures that are the category default.
167
- - `layoutClusters`: layout patterns that are the category default.
168
- - `motionClusters`: motion signatures that are the category default.
169
- - `imageryClusters`: image style or visual treatment that is the category default.
170
-
171
- Self-check before proceeding to Section 4: do the typography choices the agent is about to commit to in `derivedTokenLogic` (or downstream token sections) overlap with any item in `typographyClusters`? If yes, the agent must either:
172
-
173
- 1. Flag the typography as a continuity choice with an explicit rationale, set `derivedTokenLogic.tokenContinuityClassification.typography` to `continuity-retained`, and record the reason that font family swap is deferred. The previous typography ledger entry stays as historical record; the classification declares the retention is intentional. OR
174
- 2. Revise the typography pick to escape the autopilot cluster and set `tokenContinuityClassification.typography` to `anchor-derived` only when the new choice is causally tied to the anchor's real-world reality.
175
-
176
- This self-check applies to every dimension, not only typography. Do not let an output token match a category-code item from the agent's own list without explicit (1) or (2) treatment per dimension. Pretending continuity is derivation is the failure mode this gate exists to prevent.
177
-
178
- ## Section 4 — Morphological Exploration
179
-
180
- A morphological matrix forces the design space to be explored beyond the first idea.
181
-
182
- Choose five or six dimensions that matter for this product. Common dimensions include hierarchy, density, type role contrast, motion language, state vocabulary, material logic, color behavior, composition rhythm, and interaction grammar. Generate four or five values per dimension. Do not include the category code defaults from Section 3 as values; the matrix is for variance, not for ratifying the cliche.
183
-
184
- Output a 5x5 or 6x5 morphological matrix. Then:
185
-
186
- 1. Highlight the combination that becomes the basis for Section 5 candidates.
187
- 2. Highlight at least ONE combination that feels instinctively wrong or uncomfortable but CAN be argued with product logic. This is the uncomfortable combination requirement.
188
-
189
- The uncomfortable combination exists to prove the matrix actually spans the design space. If every combination in the matrix feels safe, shippable, and unobjectionable, the matrix has not explored far enough; it is clustering in the safe-creative zone.
190
-
191
- Rules for the uncomfortable combination:
192
- - It must be genuinely uncomfortable (the agent's first reaction is "this would not work").
193
- - It must be arguable (the agent can construct a two-sentence product-logic justification for why it could work despite discomfort).
194
- - It must not be random noise (uncomfortable plus unjustifiable equals waste, not exploration).
195
- - The user is not required to choose it. Its purpose is to prove the design space was explored beyond the comfort boundary.
196
-
197
- If the agent cannot produce an uncomfortable-but-arguable combination, the dimensions chosen are too narrow. Widen at least one dimension and regenerate the matrix.
138
+ Each category default must include a one-sentence rejection note explaining the trap it sets.
198
139
 
199
- Output: `morphologicalExploration` block with `dimensions[]`, `matrix` (rendered as a Markdown table inside `docs/DESIGN.md` and as a structured array inside `docs/design-intent.json`), `selectedCombination`, `uncomfortableCombination` ({ `combinationLabel`, `discomfortReason`, `productLogicJustification` }).
140
+ Output: `categoryCodes[]` with at least three entries in `docs/design-intent.json`. Each entry has `description`, `categoryDefaultReason`, and `rejectionNote`.
200
141
 
201
- ## Section 5 — Anchor Candidates
142
+ ### 3b. Anchor reference
202
143
 
203
- From the selected morphological combination, generate exactly five anchor candidates. An anchor is a real-world reference whose mechanics, hierarchy, density, type roles, state language, and motion behavior translate into UI grammar without copying its surface.
144
+ Pick one concrete, googleable real-world reference whose mechanics (not surface) translate to your UI. The anchor must be specific enough that renaming the product to a different category breaks coherence.
204
145
 
205
- Hard constraints on anchors:
206
- - The anchor must be concrete and googleable. "Modern", "clean", "premium", "expressive", "minimal", "bold", "futuristic", "elegant" are not anchors.
207
- - Specific premium digital products are valid anchors when the borrowed element is an interaction mechanic, hierarchy pattern, or motion behavior — not a palette or brand. Be specific enough that the reference fails the rename test.
208
- - Do not default to spatial place metaphors such as room, darkroom, control room, counting room, war room, studio, lab, cockpit, command center. Use them only when the product genuinely depends on a physical place model. Prefer artifacts, custody flows, instruments, data behaviors, materials, editorial systems, service rituals, or interaction mechanisms.
209
- - Pass the strengthened rename test: mentally rename the product to three genuinely different categories. Categories must be remote from each other and from the actual product (for example, if the product is a health app, test against fintech dashboard, kids educational game, and industrial equipment monitoring console).
146
+ Hard constraints:
147
+ - Reject generic quality words as anchors: "modern", "clean", "premium", "expressive", "minimal", "bold", "futuristic", "elegant" are not anchors.
148
+ - Specific premium digital products are valid anchors when the borrowed element is an interaction mechanic, hierarchy pattern, or motion behavior -- not a palette or brand.
149
+ - Do not default to spatial place metaphors (room, darkroom, control room, studio, lab, cockpit, command center). Prefer artifacts, workflows, instruments, data behaviors, materials, editorial systems, or interaction mechanisms.
150
+ - Draw from IDE themes, cultural aesthetics, cinematic campaigns, editorial systems, material artifacts, or specific product experiences for inspiration.
210
151
 
211
- Strengthened rename test scoring:
212
- - UI still coherent in zero of three renamed categories: anchor is highly specific. STRONG PASS.
213
- - UI still coherent in one of three: anchor is specific enough. PASS with note.
214
- - UI still coherent in two of three: anchor is too generic. REVISE the anchor to add product-specific constraints until it fails in at least two of three.
215
- - UI still coherent in three of three: anchor is category-agnostic. DISCARD immediately.
152
+ Output: `conceptualAnchor.anchorReference` in `docs/design-intent.json`.
216
153
 
217
- Test-category freshness: do not reuse the same three test categories across every anchor. Pick fresh categories per anchor. Categories used in earlier examples (fintech dashboard, kids educational game, industrial equipment monitoring console) are listed only as illustration of "remote from each other"; they are not a fixed test triple. Reusing the same triple lets the agent memorize the pass condition instead of stress-testing the anchor.
154
+ ### 3c. Four creative commitments (record before coding)
218
155
 
219
- The three test categories must be stated explicitly in the dossier alongside each anchor's rename test result. This makes the test auditable by human reviewers.
156
+ 1. **Typography**: Choose distinctive fonts with meaningful role contrast. Avoid overused families (Inter, Roboto, Arial, Space Grotesk, system fonts). Pick choices that elevate the aesthetic. Record one variable-axis or pairing decision.
157
+ 2. **Color and palette**: Commit to a cohesive product-derived palette. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Name what product evidence makes the palette fit and one color behavior that would not transfer to another category.
158
+ 3. **Motion and interaction**: Define one signature motion behavior more specific than "smooth." Focus on high-impact moments: one well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions. Use CSS-only or a modern motion library.
159
+ 4. **Composition**: Make one composition choice that avoids interchangeable card stacks. Create atmosphere and depth rather than defaulting to solid backgrounds.
220
160
 
221
- For EACH of the five candidates, record:
161
+ Avoid generic AI-generated aesthetics:
162
+ - Overused font families and cliched color schemes (particularly purple gradients)
163
+ - Predictable layouts and cookie-cutter component patterns
164
+ - Solid-color backgrounds without atmosphere or depth
222
165
 
223
- - `anchorReference` (concrete, googleable)
224
- - `conceptualFamily`
225
- - `jobFit` (one sentence linking to product)
226
- - `hierarchyImplication`
227
- - `densityImplication`
228
- - `typeImplication` (variable axis or pairing logic, not just family)
229
- - `stateLanguage` (loading, empty, error, partial, stale, optimistic, success using the anchor's own vocabulary)
230
- - `motionImplication` (choreography rule, what state change it serves)
231
- - `whatItRulesOut` (proves variance)
232
- - `renameTest`:
233
- - `testCategories`: three remote categories used for testing
234
- - `results`: coherent or incoherent per category, in order
235
- - `verdict`: STRONG PASS, PASS, REVISE, or DISCARD
236
- - `categoryCodeOverlap` check: list any Section 3 category codes this candidate accidentally inherits, with reasoning
166
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. The agent still tends to converge on common choices across generations; resist this.
237
167
 
238
- Output: `anchorCandidates[]` (length five). Discard any candidate with `verdict: DISCARD` before selection. The selected anchor populates `conceptualAnchor.anchorReference` and `derivedTokenLogic.anchorReference` (they must match exactly).
168
+ Output: Record all four commitments in `docs/design-intent.json` before UI code. The `derivedTokenLogic.tokenContinuityClassification` must classify each of typography, palette, motion, and spacing as `anchor-derived`, `continuity-retained`, or `newly-introduced` with rationale.
239
169
 
240
170
  ## Done Criteria
241
171
 
@@ -243,9 +173,9 @@ The brief is complete when:
243
173
 
244
174
  1. `productReading` is filled with evidence-backed sentences.
245
175
  2. `referenceIntake[]` records the borrowed mechanic and the explicit non-copy boundary per reference (or `referenceIntakeStatus: internal-evidence-only` is set).
246
- 3. `categoryCodes[]` has at least three entries that pass the specificity self-test.
247
- 4. `morphologicalExploration` has a 5x5 or 6x5 matrix, a selected combination, and an uncomfortable combination with the three required fields.
248
- 5. `anchorCandidates[]` has exactly five entries; each has a complete `renameTest`; the selected anchor has `verdict: STRONG PASS` or `verdict: PASS`.
176
+ 3. `categoryCodes[]` has at least three entries with rejection notes.
177
+ 4. One anchor reference is recorded that passes the specificity test (renaming the product to a different category breaks coherence).
178
+ 5. Four creative commitments are recorded with product-derived rationale.
249
179
  6. Generic anchors and spatial-place defaults are rejected with the rejection reason recorded.
250
180
 
251
181
  Only after the brief is complete does the agent move on to `docs/DESIGN.md` and the rest of `docs/design-intent.json` (token logic, motion budget, accessibility policy, review rubric, library decisions, etc., per `bootstrap-design.md`).
package/AGENTS.md CHANGED
@@ -74,8 +74,8 @@ Location: `.agent-context/prompts/`. Load the matching prompt only, plus `compac
74
74
  - `init-project.md` -> create, build, new project, scaffold
75
75
  - `refactor.md` -> refactor, improve, clean up, fix
76
76
  - `review-code.md` -> review, audit, check, analyze
77
- - `bootstrap-design.md` -> ui, ux, layout, screen, tailwind, frontend, redesign (always paired with `research-design.md` for the Section 3-5 dossier gate)
78
- - `research-design.md` -> design research dossier (Section 3 categoryCodes, Section 4 morphologicalExploration, Section 5 anchorCandidates with strengthened rename test). Loads before `bootstrap-design.md` whenever the dossier is missing, the design contract status is a seed, `researchDossier.metadata.researchVerifiedAt` is null or older than `freshnessWindowDays`, or the user explicitly requests a redesign.
77
+ - `bootstrap-design.md` -> ui, ux, layout, screen, tailwind, frontend, redesign (always paired with `research-design.md` for the Section 3 creative direction gate)
78
+ - `research-design.md` -> design research dossier (Section 3 creative direction: category defaults to avoid, anchor reference, four creative commitments). Loads before `bootstrap-design.md` whenever the dossier is missing, the design contract status is a seed, `researchDossier.metadata.researchVerifiedAt` is null or older than `freshnessWindowDays`, or the user explicitly requests a redesign.
79
79
 
80
80
  For UI-only work, load `bootstrap-design.md`, `research-design.md`, and `frontend-architecture.md` first; do not eagerly load unrelated backend-only rules unless the request crosses that boundary. The valid style context is current repo evidence, current brief, and current project docs. External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted unless the user makes them current-task constraints. Treat WCAG 2.2 AA as the hard compliance floor and APCA as advisory perceptual tuning only. Do not require screenshot capture as a baseline dependency.
81
81
 
@@ -141,7 +141,7 @@ Trigger: ui, ux, layout, screen, tailwind, frontend, redesign.
141
141
  2. Detect user-explicit redesign first ("redesign from zero", "redesain dari 0", "ulang dari 0", "research ulang", any explicit reset). It bypasses the freshness gate; run research-design.md regardless of dossier age and treat existing direction as anti-repeat ledger input only.
142
142
  3. Route by `docs/design-intent.json` state. File missing, status one of `seed-needs-design-synthesis`, `seed-generated-during-init`, `seed-generated-during-upgrade`, OR active with `researchDossier.metadata.researchVerifiedAt` null or older than `freshnessWindowDays` (90): run research-design.md, then bootstrap-design.md, then flip status to active and write today's ISO date to `researchVerifiedAt`. Active and fresh and no explicit redesign: run bootstrap-design.md only for additive UI tasks; do not auto-refresh `researchVerifiedAt`.
143
143
  4. Scenario routing: backend-only init then later UI request (Scenario B) requires `npx @ryuenn3123/agentic-senior-core upgrade` to re-sync UI governance when `bootstrap-design.md` or `research-design.md` is missing; upgrade-migrated metadata (Scenario D) and init on existing project that already had design-intent.json (Scenario E) populate the anti-repeat ledger from previous anchor, palette, and motion. Treat every ledger entry as a hard blocklist when running research-design.md.
144
- 5. Anti-repeat ledger contract: read `researchDossier.metadata.antiRepeatLedger` before producing candidates. The five Section 5 anchor candidates must each differ from every blocklisted entry on at least conceptual family, hierarchy implication, and motion implication. Restating an existing direction with new wording is REVISE.
144
+ 5. Anti-repeat ledger contract: read `researchDossier.metadata.antiRepeatLedger` before producing candidates. The chosen anchor must differ from every blocklisted entry on at least conceptual family, hierarchy implication, and motion implication. Restating an existing direction with new wording is REVISE.
145
145
  6. Include a one-line Motion/Palette Decision before UI code; product categories are heuristics, not style presets. Record one real-world anchor, one signature motion behavior, and one typographic role contrast.
146
146
  7. Ensure `docs/design-intent.json` includes `conceptualAnchor.anchorReference`, top-level `derivedTokenLogic`, `researchDossier.metadata`, `libraryResearchStatus`, `libraryDecisions[]`, and motion/palette decisions. Generate or refine `docs/DESIGN.md` plus `docs/design-intent.json` before UI implementation.
147
147
  8. Keep context isolated; do not eagerly load unrelated backend-only rules. For broad screens or redesigns, treat expressive motion, spatial hierarchy, distinctive composition, and product-specific interaction as the baseline; quiet or static surfaces require a concrete product, performance, accessibility, device, or dependency reason.
@@ -3,11 +3,11 @@
3
3
  * that force agents to commit to a real-world reference, motion, and typography
4
4
  * decision before UI implementation, instead of defaulting to spatial cliches.
5
5
  *
6
- * Carries the Section 3-5 dossier from
6
+ * Carries the Section 3 dossier from
7
7
  * `.agent-context/prompts/research-design.md`:
8
- * - categoryCodes (Section 3)
9
- * - morphologicalExploration (Section 4)
10
- * - anchorCandidates (Section 5)
8
+ * - categoryCodes (Section 3a)
9
+ * - anchorReference (Section 3b)
10
+ * - creativeCommitments (Section 3c)
11
11
  */
12
12
 
13
13
  export function buildConceptualAnchorSection() {
@@ -126,7 +126,6 @@ export function buildConceptualAnchorSection() {
126
126
  selfTestRule: 'Read each category code aloud to someone unfamiliar with the project. If they cannot visualize a specific aesthetic direction from the text alone, the code is too abstract; revise. If they say "that is basically the X cliche", the description is specific enough; the cliche then belongs on the reject list with a rejection note, not as a candidate target.',
127
127
  requiredFieldsPerEntry: [
128
128
  'description',
129
- 'specificityEvidence',
130
129
  'categoryDefaultReason',
131
130
  'rejectionNote',
132
131
  ],
@@ -139,73 +138,7 @@ export function buildConceptualAnchorSection() {
139
138
  ],
140
139
  candidateEntries: [],
141
140
  },
142
- morphologicalExploration: {
143
- mode: 'agent-must-complete-before-ui-implementation',
144
- blockingByDefault: true,
145
- researchBriefSection: 'Section 4',
146
- researchBriefPath: '.agent-context/prompts/research-design.md',
147
- requiredMatrixShape: '5x5-or-6x5',
148
- minimumDimensions: 5,
149
- maximumDimensions: 6,
150
- valuesPerDimension: 5,
151
- forbidCategoryCodeValuesInMatrix: true,
152
- requireSelectedCombination: true,
153
- requireUncomfortableCombination: true,
154
- uncomfortableCombinationRule: 'Highlight at least one combination that feels instinctively wrong or uncomfortable but can be argued with product logic. The uncomfortable combination proves the matrix actually spans the design space; if every combination feels safe, shippable, and unobjectionable, the matrix is clustering in the safe-creative zone.',
155
- uncomfortableCombinationRequiredFields: [
156
- 'combinationLabel',
157
- 'discomfortReason',
158
- 'productLogicJustification',
159
- ],
160
- widenDimensionsWhenUncomfortableCombinationCannotBeProduced: true,
161
- seedDimensions: [],
162
- seedMatrix: [],
163
- selectedCombination: null,
164
- uncomfortableCombination: null,
165
- },
166
- anchorCandidates: {
167
- mode: 'agent-must-complete-before-ui-implementation',
168
- blockingByDefault: true,
169
- researchBriefSection: 'Section 5',
170
- researchBriefPath: '.agent-context/prompts/research-design.md',
171
- requiredCandidateCount: 5,
172
- requiredFieldsPerCandidate: [
173
- 'anchorReference',
174
- 'conceptualFamily',
175
- 'jobFit',
176
- 'hierarchyImplication',
177
- 'densityImplication',
178
- 'typeImplication',
179
- 'stateLanguage',
180
- 'motionImplication',
181
- 'whatItRulesOut',
182
- 'renameTest',
183
- 'categoryCodeOverlap',
184
- ],
185
- renameTest: {
186
- mode: 'strengthened',
187
- requiredTestCategoryCount: 3,
188
- testCategoryDistanceRule: 'The three test categories must be remote from each other and from the actual product (for example, if the product is a health app, test against fintech dashboard, kids educational game, and industrial equipment monitoring console).',
189
- testCategoryFreshnessRule: 'Pick fresh test categories per anchor. Reusing the same triple across every anchor lets the agent memorize the pass condition instead of stress-testing the anchor. The illustrative triple in testCategoryDistanceRule is not a fixed test set.',
190
- verdictScoring: {
191
- 'STRONG PASS': 'UI still coherent in 0 of 3 renamed categories.',
192
- PASS: 'UI still coherent in 1 of 3. Pass with note.',
193
- REVISE: 'UI still coherent in 2 of 3. Anchor is too generic. Revise the anchor to add product-specific constraints until it fails in at least 2 of 3.',
194
- DISCARD: 'UI still coherent in 3 of 3. Anchor is category-agnostic. Discard immediately.',
195
- },
196
- requireTestCategoriesRecordedInDossier: true,
197
- auditableByHumanReviewer: true,
198
- renameTestRequiredFields: [
199
- 'testCategories',
200
- 'results',
201
- 'verdict',
202
- ],
203
- },
204
- categoryCodeOverlapRule: 'List any Section 3 category codes this candidate accidentally inherits, with reasoning.',
205
- forbiddenSelectedVerdicts: ['DISCARD'],
206
- requiredSelectedVerdicts: ['STRONG PASS', 'PASS'],
207
- candidates: [],
208
- },
141
+
209
142
  finalAnchorContract: {
210
143
  requiredFields: [
211
144
  'name',
@@ -213,8 +213,6 @@ export function validateConceptualAnchor(designIntentContract, validationErrors)
213
213
  validateVisualRiskBudgetAndLiteralPolicy(conceptualAnchor, validationErrors);
214
214
  validateFinalAnchorContract(conceptualAnchor, validationErrors);
215
215
  validateCategoryCodes(conceptualAnchor, validationErrors, { isSeedStatus });
216
- validateMorphologicalExploration(conceptualAnchor, validationErrors, { isSeedStatus });
217
- validateAnchorCandidates(conceptualAnchor, validationErrors, { isSeedStatus });
218
216
  return validationErrors;
219
217
  }
220
218
 
@@ -281,11 +279,10 @@ function validateCategoryCodes(conceptualAnchor, validationErrors, options = {})
281
279
  if (
282
280
  !Array.isArray(categoryCodes.requiredFieldsPerEntry)
283
281
  || !categoryCodes.requiredFieldsPerEntry.includes('description')
284
- || !categoryCodes.requiredFieldsPerEntry.includes('specificityEvidence')
285
282
  || !categoryCodes.requiredFieldsPerEntry.includes('categoryDefaultReason')
286
283
  || !categoryCodes.requiredFieldsPerEntry.includes('rejectionNote')
287
284
  ) {
288
- validationErrors.push('designIntent.conceptualAnchor.categoryCodes.requiredFieldsPerEntry must require description, specificityEvidence, categoryDefaultReason, and rejectionNote.');
285
+ validationErrors.push('designIntent.conceptualAnchor.categoryCodes.requiredFieldsPerEntry must require description, categoryDefaultReason, and rejectionNote.');
289
286
  }
290
287
  if (!Array.isArray(categoryCodes.forbiddenPlaceholderPhrases) || categoryCodes.forbiddenPlaceholderPhrases.length === 0) {
291
288
  validationErrors.push('designIntent.conceptualAnchor.categoryCodes.forbiddenPlaceholderPhrases must list the abstract phrases that fail the specificity self-test.');
@@ -295,162 +292,3 @@ function validateCategoryCodes(conceptualAnchor, validationErrors, options = {})
295
292
  }
296
293
  }
297
294
 
298
- function validateMorphologicalExploration(conceptualAnchor, validationErrors, options = {}) {
299
- const { isSeedStatus = false } = options;
300
- const morphologicalExploration = conceptualAnchor.morphologicalExploration;
301
- if (!morphologicalExploration || typeof morphologicalExploration !== 'object') {
302
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration must exist (Section 4 of research-design.md).');
303
- return;
304
- }
305
- if (morphologicalExploration.mode !== 'agent-must-complete-before-ui-implementation') {
306
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.mode must equal "agent-must-complete-before-ui-implementation".');
307
- }
308
- if (morphologicalExploration.blockingByDefault !== true) {
309
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.blockingByDefault must equal true.');
310
- }
311
- if (morphologicalExploration.researchBriefSection !== 'Section 4') {
312
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.researchBriefSection must equal "Section 4".');
313
- }
314
- if (morphologicalExploration.requiredMatrixShape !== '5x5-or-6x5') {
315
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.requiredMatrixShape must equal "5x5-or-6x5".');
316
- }
317
- if (morphologicalExploration.minimumDimensions !== 5) {
318
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.minimumDimensions must equal 5.');
319
- }
320
- if (morphologicalExploration.maximumDimensions !== 6) {
321
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.maximumDimensions must equal 6.');
322
- }
323
- if (morphologicalExploration.valuesPerDimension !== 5) {
324
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.valuesPerDimension must equal 5.');
325
- }
326
- if (morphologicalExploration.forbidCategoryCodeValuesInMatrix !== true) {
327
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.forbidCategoryCodeValuesInMatrix must equal true so Section 3 cliches do not re-enter the matrix as values.');
328
- }
329
- if (morphologicalExploration.requireSelectedCombination !== true) {
330
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.requireSelectedCombination must equal true.');
331
- }
332
- if (morphologicalExploration.requireUncomfortableCombination !== true) {
333
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.requireUncomfortableCombination must equal true.');
334
- }
335
- if (!hasNonEmptyString(morphologicalExploration.uncomfortableCombinationRule)) {
336
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.uncomfortableCombinationRule must be a non-empty string explaining why the uncomfortable combination is required.');
337
- }
338
- if (
339
- !Array.isArray(morphologicalExploration.uncomfortableCombinationRequiredFields)
340
- || !morphologicalExploration.uncomfortableCombinationRequiredFields.includes('combinationLabel')
341
- || !morphologicalExploration.uncomfortableCombinationRequiredFields.includes('discomfortReason')
342
- || !morphologicalExploration.uncomfortableCombinationRequiredFields.includes('productLogicJustification')
343
- ) {
344
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.uncomfortableCombinationRequiredFields must include combinationLabel, discomfortReason, and productLogicJustification.');
345
- }
346
- if (morphologicalExploration.widenDimensionsWhenUncomfortableCombinationCannotBeProduced !== true) {
347
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.widenDimensionsWhenUncomfortableCombinationCannotBeProduced must equal true.');
348
- }
349
-
350
- if (morphologicalExploration.uncomfortableCombination !== null && typeof morphologicalExploration.uncomfortableCombination === 'object') {
351
- const uncomfortableCombination = morphologicalExploration.uncomfortableCombination;
352
- if (!hasNonEmptyString(uncomfortableCombination.combinationLabel)) {
353
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.uncomfortableCombination.combinationLabel must be a non-empty string.');
354
- }
355
- if (!hasNonEmptyString(uncomfortableCombination.discomfortReason)) {
356
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.uncomfortableCombination.discomfortReason must be a non-empty string.');
357
- }
358
- if (!hasNonEmptyString(uncomfortableCombination.productLogicJustification)) {
359
- validationErrors.push('designIntent.conceptualAnchor.morphologicalExploration.uncomfortableCombination.productLogicJustification must be a non-empty string.');
360
- }
361
- }
362
- }
363
-
364
- function validateAnchorCandidates(conceptualAnchor, validationErrors, options = {}) {
365
- const { isSeedStatus = false } = options;
366
- const anchorCandidates = conceptualAnchor.anchorCandidates;
367
- if (!anchorCandidates || typeof anchorCandidates !== 'object') {
368
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates must exist (Section 5 of research-design.md).');
369
- return;
370
- }
371
- if (anchorCandidates.mode !== 'agent-must-complete-before-ui-implementation') {
372
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.mode must equal "agent-must-complete-before-ui-implementation".');
373
- }
374
- if (anchorCandidates.blockingByDefault !== true) {
375
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.blockingByDefault must equal true.');
376
- }
377
- if (anchorCandidates.researchBriefSection !== 'Section 5') {
378
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.researchBriefSection must equal "Section 5".');
379
- }
380
- if (anchorCandidates.requiredCandidateCount !== 5) {
381
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.requiredCandidateCount must equal 5.');
382
- }
383
- if (
384
- !Array.isArray(anchorCandidates.requiredFieldsPerCandidate)
385
- || !anchorCandidates.requiredFieldsPerCandidate.includes('anchorReference')
386
- || !anchorCandidates.requiredFieldsPerCandidate.includes('jobFit')
387
- || !anchorCandidates.requiredFieldsPerCandidate.includes('hierarchyImplication')
388
- || !anchorCandidates.requiredFieldsPerCandidate.includes('densityImplication')
389
- || !anchorCandidates.requiredFieldsPerCandidate.includes('typeImplication')
390
- || !anchorCandidates.requiredFieldsPerCandidate.includes('stateLanguage')
391
- || !anchorCandidates.requiredFieldsPerCandidate.includes('motionImplication')
392
- || !anchorCandidates.requiredFieldsPerCandidate.includes('whatItRulesOut')
393
- || !anchorCandidates.requiredFieldsPerCandidate.includes('renameTest')
394
- || !anchorCandidates.requiredFieldsPerCandidate.includes('categoryCodeOverlap')
395
- ) {
396
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.requiredFieldsPerCandidate must list the full anchor dossier fields including renameTest and categoryCodeOverlap.');
397
- }
398
-
399
- const renameTest = anchorCandidates.renameTest;
400
- if (!renameTest || typeof renameTest !== 'object') {
401
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest must exist.');
402
- return;
403
- }
404
- if (renameTest.mode !== 'strengthened') {
405
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.mode must equal "strengthened".');
406
- }
407
- if (renameTest.requiredTestCategoryCount !== 3) {
408
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.requiredTestCategoryCount must equal 3.');
409
- }
410
- if (!hasNonEmptyString(renameTest.testCategoryDistanceRule)) {
411
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.testCategoryDistanceRule must be a non-empty string requiring remote categories.');
412
- }
413
- if (!hasNonEmptyString(renameTest.testCategoryFreshnessRule)) {
414
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.testCategoryFreshnessRule must be a non-empty string preventing reuse of the same test triple across every anchor.');
415
- }
416
- if (!renameTest.verdictScoring || typeof renameTest.verdictScoring !== 'object') {
417
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.verdictScoring must define STRONG PASS, PASS, REVISE, and DISCARD verdicts.');
418
- } else {
419
- for (const verdict of ['STRONG PASS', 'PASS', 'REVISE', 'DISCARD']) {
420
- if (!hasNonEmptyString(renameTest.verdictScoring[verdict])) {
421
- validationErrors.push(`designIntent.conceptualAnchor.anchorCandidates.renameTest.verdictScoring["${verdict}"] must be a non-empty string.`);
422
- }
423
- }
424
- }
425
- if (renameTest.requireTestCategoriesRecordedInDossier !== true) {
426
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.requireTestCategoriesRecordedInDossier must equal true.');
427
- }
428
- if (renameTest.auditableByHumanReviewer !== true) {
429
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.auditableByHumanReviewer must equal true.');
430
- }
431
- if (
432
- !Array.isArray(renameTest.renameTestRequiredFields)
433
- || !renameTest.renameTestRequiredFields.includes('testCategories')
434
- || !renameTest.renameTestRequiredFields.includes('results')
435
- || !renameTest.renameTestRequiredFields.includes('verdict')
436
- ) {
437
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.renameTest.renameTestRequiredFields must include testCategories, results, and verdict.');
438
- }
439
-
440
- if (!hasNonEmptyString(anchorCandidates.categoryCodeOverlapRule)) {
441
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.categoryCodeOverlapRule must be a non-empty string.');
442
- }
443
- if (!Array.isArray(anchorCandidates.forbiddenSelectedVerdicts) || !anchorCandidates.forbiddenSelectedVerdicts.includes('DISCARD')) {
444
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.forbiddenSelectedVerdicts must include "DISCARD".');
445
- }
446
- if (
447
- !Array.isArray(anchorCandidates.requiredSelectedVerdicts)
448
- || !anchorCandidates.requiredSelectedVerdicts.includes('STRONG PASS')
449
- || !anchorCandidates.requiredSelectedVerdicts.includes('PASS')
450
- ) {
451
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.requiredSelectedVerdicts must include "STRONG PASS" and "PASS".');
452
- }
453
- if (!Array.isArray(anchorCandidates.candidates)) {
454
- validationErrors.push('designIntent.conceptualAnchor.anchorCandidates.candidates must be an array (empty in the seed; populated by the agent).');
455
- }
456
- }
@@ -60,12 +60,10 @@ function buildDesignIntentContractObject({
60
60
  return {
61
61
  _gate: {
62
62
  phase: 'scaffold-only',
63
- instruction: 'DO NOT fill conceptualAnchor, derivedTokenLogic, or any token values until research-design.md Sections 3, 4, and 5 are complete. Do not simplify or rewrite this scaffold. Fill fields in-place after research.',
63
+ instruction: 'DO NOT fill conceptualAnchor, derivedTokenLogic, or any token values until research-design.md Section 3 is complete. Do not simplify or rewrite this scaffold. Fill fields in-place after research.',
64
64
  blockedFields: [
65
65
  'conceptualAnchor.anchorReference',
66
66
  'conceptualAnchor.categoryCodes.candidateEntries',
67
- 'conceptualAnchor.morphologicalExploration.selectedCombination',
68
- 'conceptualAnchor.anchorCandidates.candidates',
69
67
  'derivedTokenLogic.colorDerivationSource',
70
68
  'motionPaletteDecision'
71
69
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "4.2.8",
3
+ "version": "4.2.9",
4
4
  "type": "module",
5
5
  "description": "Change your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -392,20 +392,18 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
392
392
  'default component-kit styling without product rationale',
393
393
  'genericity findings that cannot name the exact drift signal',
394
394
  'research-design.md',
395
- 'Section 3-5 gates from `research-design.md`',
395
+ 'Section 3 gate from `research-design.md`',
396
396
  ],
397
397
  },
398
398
  {
399
399
  path: '.agent-context/prompts/research-design.md',
400
400
  snippets: [
401
401
  '# Research-Design Brief',
402
- '## Section 3 — Category Code Identification',
403
- '## Section 4 — Morphological Exploration',
404
- '## Section 5 — Anchor Candidates',
405
- 'specificity self-test',
406
- 'uncomfortable combination',
407
- 'STRONG PASS',
408
- 'DISCARD',
402
+ '## Section 3 — Creative Direction',
403
+ '### 3a. Category defaults to avoid',
404
+ '### 3b. Anchor reference',
405
+ '### 3c. Four creative commitments',
406
+ 'AI slop',
409
407
  'Anti-Repeat Ledger Gate',
410
408
  'Live Source Freshness Gate',
411
409
  'rolling-current',
@@ -414,13 +412,8 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
414
412
  'Research vocabulary is internal-only',
415
413
  'previousAnchors',
416
414
  'previousMotionSignatures',
417
- 'Dimensional split',
418
- 'typographyClusters',
419
- 'paletteClusters',
420
- 'layoutClusters',
421
- 'motionClusters',
422
- 'imageryClusters',
423
415
  'tokenContinuityClassification',
416
+ 'categoryCodes',
424
417
  ],
425
418
  },
426
419
  {