@ryuenn3123/agentic-senior-core 4.3.6 → 4.3.7

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.
@@ -59,4 +59,4 @@ When the user says "redesign from zero" or equivalent: treat existing UI as beha
59
59
 
60
60
  ## Required Docs
61
61
 
62
- Generate or refine `docs/DESIGN.md` (human-readable design direction) and `docs/design-intent.json` (machine-readable intent with `conceptualAnchor`, creative commitments, and anti-repeat ledger) before UI implementation.
62
+ Generate or refine `docs/DESIGN.md` before UI implementation. Keep design rationale, creative commitments, and any anti-repeat notes in the markdown contract instead of a separate machine-readable JSON file.
@@ -26,7 +26,7 @@ If the user describes a project or feature, the agent must:
26
26
  If the user asks to create, complete, fix, or review project docs, documentation, dokumen, `docs/*`, architecture docs, flow docs, API docs, or "lengkapkan docs", treat the request as documentation-first.
27
27
 
28
28
  The agent must:
29
- 1. Materialize or refine required project docs before implementation: root `README.md` for every fresh or existing project; `docs/doc-index.md` whenever `docs/` exists; `docs/project-brief.md`; `docs/architecture-decision-record.md`; `docs/flow-overview.md`; `docs/api-contract.md` when APIs, firmware endpoints, CLI commands, or web application flows exist; `docs/database-schema.md` when persistent data exists; and `docs/DESIGN.md` plus `docs/design-intent.json` for UI scope.
29
+ 1. Materialize or refine required project docs before implementation: root `README.md` for every fresh or existing project; `docs/doc-index.md` whenever `docs/` exists; `docs/project-brief.md`; `docs/architecture-decision-record.md`; `docs/flow-overview.md`; `docs/api-contract.md` when APIs, firmware endpoints, CLI commands, or web application flows exist; `docs/database-schema.md` when persistent data exists; and `docs/DESIGN.md` for UI scope.
30
30
  2. Write formal project docs in English by default unless the user explicitly asks for another documentation language.
31
31
  3. Keep `docs/doc-index.md` short. Use it as the read-routing map with document path, purpose, reads-when triggers, status, and last-updated date. Do not duplicate the docs it points to.
32
32
  4. Keep `README.md` public and developer friendly even for private projects: explain what the project is, who it is for, how to set it up, how to run the core workflow, how to configure it, and where deeper docs live. Do not put internal agent notes, private reasoning, secrets, or governance policy in the README.
@@ -58,5 +58,5 @@ See [.agent-context/state/onboarding-report.json](../state/onboarding-report.jso
58
58
 
59
59
  ## UI/UX Bootstrap
60
60
 
61
- When a user requests frontend or UI/UX design, the agent must automatically execute the [bootstrap-design.md](./bootstrap-design.md) prompt to synthesize a dynamic design contract (`docs/DESIGN.md` + `docs/design-intent.json`).
61
+ When a user requests frontend or UI/UX design, the agent must automatically execute the [bootstrap-design.md](./bootstrap-design.md) prompt to synthesize a dynamic markdown design contract (`docs/DESIGN.md`).
62
62
  Keep UI-only requests context-isolated: load [bootstrap-design.md](./bootstrap-design.md) and [frontend-architecture.md](../rules/frontend-architecture.md) first, and do not eagerly load backend-only rules unless the task explicitly crosses backend boundaries.
@@ -11,7 +11,7 @@ Before editing:
11
11
  3. If required project docs are missing, stop and bootstrap or update docs first.
12
12
  4. If the change touches UI, load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md before editing.
13
13
  5. If the change touches a dependency, framework, Docker, runtime, or ecosystem claim, verify current official docs before choosing.
14
- 6. Enforce Universal SOP hard gate: stop implementation if root `README.md` is missing, if `docs/doc-index.md` is missing while `docs/` exists, if `docs/project-brief.md` is missing, if `docs/architecture-decision-record.md` is missing, if `docs/flow-overview.md` is missing, if `docs/database-schema.md` is missing while the project uses persistent data, if `docs/api-contract.md` is missing while the project exposes API or web application flows, or for UI scope if `docs/DESIGN.md` or `docs/design-intent.json` is missing.
14
+ 6. Enforce Universal SOP hard gate: stop implementation if root `README.md` is missing, if `docs/doc-index.md` is missing while `docs/` exists, if `docs/project-brief.md` is missing, if `docs/architecture-decision-record.md` is missing, if `docs/flow-overview.md` is missing, if `docs/database-schema.md` is missing while the project uses persistent data, if `docs/api-contract.md` is missing while the project exposes API or web application flows, or for UI scope if `docs/DESIGN.md` is missing.
15
15
  7. Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.
16
16
  8. For backend/API scope, enforce layered boundaries, zero-trust input validation, safe centralized error responses, bounded list reads, transaction safety for multi-write mutations, idempotency for sensitive mutations, and behavior-focused API tests.
17
17
  9. Backend/API governance is global and stack-agnostic. Do not create stack-specific adapters or framework-specific rule branches; apply the global rules through the framework already present in the target project.
@@ -10,8 +10,8 @@ Before reviewing:
10
10
  2. Read .agent-context/review-checklists/pr-checklist.md.
11
11
  3. Read .agent-context/review-checklists/architecture-review.md only when architecture or boundaries changed.
12
12
  4. Load only the rules relevant to the changed scope.
13
- 5. For UI changes, load .agent-context/prompts/bootstrap-design.md, .agent-context/rules/frontend-architecture.md, docs/DESIGN.md, and docs/design-intent.json when present.
14
- 6. Enforce Universal SOP hard gate: block coding flow when required project docs are missing (root `README.md`; `docs/doc-index.md` when `docs/` exists; `docs/project-brief.md`; `docs/architecture-decision-record.md`; `docs/flow-overview.md`; `docs/database-schema.md` when persistent data exists; `docs/api-contract.md` when API or web application flows exist; and for UI scope `docs/DESIGN.md` plus `docs/design-intent.json`).
13
+ 5. For UI changes, load .agent-context/prompts/bootstrap-design.md, .agent-context/rules/frontend-architecture.md, and docs/DESIGN.md when present.
14
+ 6. Enforce Universal SOP hard gate: block coding flow when required project docs are missing (root `README.md`; `docs/doc-index.md` when `docs/` exists; `docs/project-brief.md`; `docs/architecture-decision-record.md`; `docs/flow-overview.md`; `docs/database-schema.md` when persistent data exists; `docs/api-contract.md` when API or web application flows exist; and for UI scope `docs/DESIGN.md`).
15
15
  7. Enforce single-source and lazy-loading policy: canonical rule source must be explicitly enforced, global domain governance must load lazily based on touched scope, and conflicting duplicate rule instructions must not appear during normal flow.
16
16
 
17
17
  Prioritize findings in this order:
@@ -80,7 +80,7 @@ Run this before declaring a task done. Apply only the sections relevant to the c
80
80
 
81
81
  ## 7. UI And Accessibility
82
82
 
83
- - [ ] UI work follows `docs/DESIGN.md` and `docs/design-intent.json`.
83
+ - [ ] UI work follows `docs/DESIGN.md`.
84
84
  - [ ] Visual direction is project-specific and not a template/default component-kit habit.
85
85
  - [ ] UI work includes a Motion/Palette Decision, and product categories were treated as heuristics rather than style presets.
86
86
  - [ ] Responsive behavior recomposes content and priority, not only shrinking desktop layout.
@@ -129,7 +129,7 @@ Run this before declaring a task done. Apply only the sections relevant to the c
129
129
  - [ ] Coding flow is blocked if `docs/flow-overview.md` is missing
130
130
  - [ ] Coding flow is blocked if `docs/database-schema.md` is missing while the project uses persistent data
131
131
  - [ ] Coding flow is blocked if `docs/api-contract.md` is missing while the project exposes API or web application flows
132
- - [ ] UI implementation flow is blocked if `docs/DESIGN.md` or `docs/design-intent.json` is missing
132
+ - [ ] UI implementation flow is blocked if `docs/DESIGN.md` is missing
133
133
 
134
134
  ## Verdict
135
135
 
package/README.md CHANGED
@@ -115,7 +115,7 @@ If you see `Property $schema is not allowed`, keep `.vscode/mcp.json` without `$
115
115
 
116
116
  ## Design Direction
117
117
 
118
- For UI, UX, layout, screen, Tailwind, frontend, or redesign work, the pack routes agents through a research dossier prompt and design bootstrap before code changes. The flow synthesizes a conceptual anchor, derives typography, spacing, morphology, motion, and responsive behavior, and carries a 90-day freshness gate with an anti-repeat ledger to avoid recycling the same visual direction. Existing projects read the real repository and docs first; fresh projects ask the agent to recommend the stack from current evidence instead of hardcoding a framework.
118
+ For UI, UX, layout, screen, Tailwind, frontend, or redesign work, the pack routes agents through a compact design bootstrap before code changes. The flow asks the agent to reject generic defaults, choose a concrete interaction anchor, record creative commitments, and write the result into `docs/DESIGN.md`. Existing projects read the real repository and docs first; fresh projects ask the agent to recommend the stack from current evidence instead of hardcoding a framework.
119
119
 
120
120
  See [docs/doc-index.md](docs/doc-index.md) for the full doc routing map.
121
121
 
@@ -415,7 +415,7 @@ export const DOCS_BY_LABEL = {
415
415
  ARCH: ['docs/architecture-decision-record.md', 'docs/flow-overview.md'],
416
416
  API: ['docs/api-contract.md'],
417
417
  DATA: ['docs/database-schema.md'],
418
- FE: ['docs/DESIGN.md', 'docs/design-intent.json'],
418
+ FE: ['docs/DESIGN.md'],
419
419
  TEST: ['docs/flow-overview.md'],
420
420
  };
421
421
 
@@ -468,7 +468,6 @@ export async function buildCompiledRulesContent({
468
468
  'api-contract.md',
469
469
  'flow-overview.md',
470
470
  'DESIGN.md',
471
- 'design-intent.json',
472
471
  'runbook.md',
473
472
  'troubleshooting.md',
474
473
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "4.3.6",
3
+ "version": "4.3.7",
4
4
  "type": "module",
5
5
  "description": "Change your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -169,7 +169,7 @@ export function summarizeDesignExecutionPolicy(designIntentContent) {
169
169
 
170
170
  const notes = [];
171
171
  if (!policyPresent) {
172
- notes.push('designExecutionPolicy is missing from docs/design-intent.json.');
172
+ notes.push('designExecutionPolicy is missing from optional structured design context.');
173
173
  }
174
174
  if (representationStrategy !== 'surface-plan-v1') {
175
175
  notes.push('Structured design execution should declare representationStrategy "surface-plan-v1".');
@@ -6,8 +6,8 @@ export function buildSystemPrompt() {
6
6
  return [
7
7
  'You are a Principal UI/UX Design Reviewer.',
8
8
  'Compare the changed UI code against the provided design contract.',
9
- 'Treat docs/design-intent.json as the machine-readable source of truth.',
10
- 'Treat docs/DESIGN.md as explanatory context, not a generic style guide.',
9
+ 'Treat docs/DESIGN.md as the design contract source of truth, not a generic style guide.',
10
+ 'Treat optional legacy structured design context as supplemental only when present.',
11
11
  'Treat designExecutionPolicy as the execution contract for how the UI must be planned, structured, and reviewed.',
12
12
  'Treat designExecutionHandoff as the explicit bridge between design intent and implementation decisions.',
13
13
  'Treat reviewRubric as the stable scoring frame for distinctiveness, contract fidelity, visual consistency, heuristic UX quality, and motion discipline.',
@@ -19,7 +19,7 @@ export function buildSystemPrompt() {
19
19
  'Treat WCAG 2.2 AA failures as hard accessibility drift.',
20
20
  'Treat APCA as advisory perceptual tuning only. Do not set blocking solely because APCA indicates a stronger readability adjustment when WCAG hard requirements still pass.',
21
21
  'Check focus visibility, focus appearance, target size, keyboard access, accessible authentication, and status or dynamic state access when the diff touches those surfaces.',
22
- 'Check design-intent.json for reviewRubric.genericityAutoFail. If true and forbiddenPatterns or genericitySignals are detected in the changed UI, this audit is no longer merely advisory for that finding: set blockingRecommended to true, mark the relevant rubric dimension as blocking, and require rebuilding the drifted surface instead of polishing it.',
22
+ 'Check the optional reviewRubric.genericityAutoFail flag when structured context is present. If true and forbiddenPatterns or genericitySignals are detected in the changed UI, this audit is no longer merely advisory for that finding: set blockingRecommended to true, mark the relevant rubric dimension as blocking, and require rebuilding the drifted surface instead of polishing it.',
23
23
  'Focus on color intent, typographic hierarchy, responsive re-layout, purposeful motion, component morphology across states, interaction behavior, and genericity drift.',
24
24
  'If you call something generic, explain the specific genericity signal or anti-pattern that caused that judgment.',
25
25
  'Separate taste from failure. A bold design that follows the contract must not be penalized only because it is unusual.',
@@ -38,7 +38,7 @@ export function buildUserMessage(designIntentContent, designGuideContent, diffCo
38
38
  '## Changed UI Files',
39
39
  changedUiFiles.length > 0 ? changedUiFiles.map((filePath) => `- ${filePath}`).join('\n') : '- none',
40
40
  '',
41
- '## design-intent.json',
41
+ '## Optional Legacy Structured Design Context',
42
42
  '```json',
43
43
  JSON.stringify(designIntentContent, null, 2),
44
44
  '```',
@@ -94,12 +94,12 @@ async function main() {
94
94
  const designIntentContent = loadDesignIntent();
95
95
  const designGuideContent = loadDesignGuide();
96
96
 
97
- if (!designIntentContent) {
97
+ if (!designGuideContent.trim()) {
98
98
  emitMachineReadableReport(buildReport({
99
99
  skipped: true,
100
- skipReason: 'Design contract is missing or unreadable. Skipping UI design judge.',
100
+ skipReason: 'Design guide is missing or unreadable. Skipping UI design judge.',
101
101
  contractPresent: false,
102
- notes: ['docs/design-intent.json is required for contract-aware UI judging.'],
102
+ notes: ['docs/DESIGN.md is required for contract-aware UI judging.'],
103
103
  }));
104
104
  return;
105
105
  }
@@ -115,14 +115,15 @@ async function main() {
115
115
  driftCount: 0,
116
116
  blockingCandidateCount: 0,
117
117
  designExecutionSignalCount: 0,
118
+ genericityStatus: 'unclear',
118
119
  },
119
120
  notes: ['UI design judge only evaluates changed UI surfaces.'],
120
121
  }));
121
122
  return;
122
123
  }
123
124
 
124
- const designExecutionSummary = summarizeDesignExecutionPolicy(designIntentContent);
125
- const reviewRubricSummary = summarizeReviewRubric(designIntentContent);
125
+ const designExecutionSummary = summarizeDesignExecutionPolicy(designIntentContent || {});
126
+ const reviewRubricSummary = summarizeReviewRubric(designIntentContent || {});
126
127
 
127
128
  const systemPrompt = buildSystemPrompt();
128
129
  const userMessage = buildUserMessage(
@@ -193,7 +193,7 @@ export const REQUIRED_UNIVERSAL_SOP_SNIPPETS = [
193
193
  'Coding flow is blocked if `docs/flow-overview.md` is missing',
194
194
  'Coding flow is blocked if `docs/database-schema.md` is missing while the project uses persistent data',
195
195
  'Coding flow is blocked if `docs/api-contract.md` is missing while the project exposes API or web application flows',
196
- 'UI implementation flow is blocked if `docs/DESIGN.md` or `docs/design-intent.json` is missing',
196
+ 'UI implementation flow is blocked if `docs/DESIGN.md` is missing',
197
197
  ],
198
198
  },
199
199
  {
@@ -308,7 +308,7 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
308
308
  'Name Your Defaults',
309
309
  'Choose an Anchor',
310
310
  'Creative Commitments',
311
- 'anti-repeat ledger',
311
+ 'Previous Directions',
312
312
  'Named Defaults to Avoid',
313
313
  'Post-Implementation Check',
314
314
  'Redesign Protocol',