@ryuenn3123/agentic-senior-core 3.0.16 → 3.0.19

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.
Files changed (39) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +31 -4
  2. package/.agent-context/rules/frontend-architecture.md +26 -0
  3. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  4. package/.cursorrules +1 -1
  5. package/.gemini/instructions.md +7 -1
  6. package/.github/copilot-instructions.md +7 -1
  7. package/.instructions.md +3 -0
  8. package/.windsurfrules +1 -1
  9. package/AGENTS.md +13 -1
  10. package/lib/cli/commands/init.mjs +2 -2
  11. package/lib/cli/memory-continuity.mjs +2 -1
  12. package/lib/cli/project-scaffolder/constants.mjs +1 -0
  13. package/lib/cli/project-scaffolder/design-contract.mjs +523 -171
  14. package/lib/cli/project-scaffolder/prompt-builders.mjs +38 -15
  15. package/lib/cli/project-scaffolder/storage.mjs +0 -2
  16. package/package.json +2 -2
  17. package/scripts/documentation-boundary-audit.mjs +5 -2
  18. package/scripts/frontend-usability-audit.mjs +34 -0
  19. package/scripts/mcp-server/constants.mjs +60 -0
  20. package/scripts/mcp-server/tool-registry.mjs +149 -0
  21. package/scripts/mcp-server/tools.mjs +446 -0
  22. package/scripts/mcp-server.mjs +23 -661
  23. package/scripts/release-gate/audit-checks.mjs +426 -0
  24. package/scripts/release-gate/constants.mjs +53 -0
  25. package/scripts/release-gate/runtime.mjs +63 -0
  26. package/scripts/release-gate/static-checks.mjs +182 -0
  27. package/scripts/release-gate.mjs +12 -771
  28. package/scripts/sync-thin-adapters.mjs +24 -0
  29. package/scripts/ui-design-judge/constants.mjs +24 -0
  30. package/scripts/ui-design-judge/design-execution-summary.mjs +233 -0
  31. package/scripts/ui-design-judge/git-input.mjs +131 -0
  32. package/scripts/ui-design-judge/prompting.mjs +73 -0
  33. package/scripts/ui-design-judge/providers.mjs +102 -0
  34. package/scripts/ui-design-judge/reporting.mjs +181 -0
  35. package/scripts/ui-design-judge/rubric-calibration.mjs +211 -0
  36. package/scripts/ui-design-judge/rubric-goldset.json +188 -0
  37. package/scripts/ui-design-judge.mjs +130 -441
  38. package/scripts/ui-rubric-calibration.mjs +35 -0
  39. package/scripts/validate/config.mjs +98 -0
@@ -30,6 +30,16 @@ The agent must:
30
30
  14. Do not reuse a color palette, component skin, or motion signature from prior chats, memories, or unrelated projects unless current repo evidence or the active brand brief explicitly asks for that continuity.
31
31
  15. Treat prior website memory, old portfolio styles, and remembered screenshots as tainted context unless the user explicitly asks to continue or evolve that specific visual system.
32
32
  16. Do not default to balanced card grids, soft startup gradients, safe centered heroes, or neutral dashboard chrome unless the product context explicitly justifies them.
33
+ 17. For design work, only these count as valid style context by default: current repo evidence, the current user brief, current project docs, and explicitly approved reference systems.
34
+ 18. Design continuity is opt-in. If the user does not explicitly ask for continuity with an older system, prefer fresh synthesis from the current repo and brief.
35
+ 19. Accessibility must be split into a hard compliance floor and an advisory readability layer. Use WCAG 2.2 AA as the blocking baseline, and use APCA only as advisory perceptual tuning. APCA must never waive a WCAG failure.
36
+ 20. Accessibility planning must cover more than color contrast. It must explicitly address focus visibility, focus appearance, target size, keyboard access, accessible authentication, and dynamic state/status access.
37
+ 21. Structured design execution must stay representation-first. Define a surface plan, component graph, content-priority map, viewport mutation plan, and interaction-state matrix before relying on semantic review.
38
+ 22. Do not depend on screenshot capture, browser automation, or image diff artifacts as the default path. The contract must be strong enough to guide precise UI from repo evidence, component logic, and user intent alone.
39
+ 23. Semantic review should judge contract fidelity, distinctiveness, hierarchy, state behavior, and viewport mutation directly from the contract and changed UI code.
40
+ 24. Distinctive design review must use a stable review rubric. The contract should define how to judge distinctiveness, contract fidelity, visual consistency, heuristic UX quality, and motion discipline without collapsing those into one vague taste score.
41
+ 25. Genericity findings must name the actual drift signal. Do not say "generic" without tying it to a rubric dimension or explicit anti-pattern.
42
+ 26. Separate taste from failure. A bold design is valid when it still follows the contract, serves the product, and respects accessibility and runtime constraints.
33
43
 
34
44
  Required `docs/DESIGN.md` sections:
35
45
  1. Design Intent and Product Personality
@@ -42,9 +52,10 @@ Required `docs/DESIGN.md` sections:
42
52
  8. Responsive Strategy and Cross-Viewport Adaptation Matrix
43
53
  9. Interaction, Motion, and Feedback Rules
44
54
  10. Component Language, Morphology, and Shared Patterns
45
- 11. Accessibility Non-Negotiables
46
- 12. Anti-Patterns to Avoid
47
- 13. Implementation Notes for Future UI Tasks
55
+ 11. Context Hygiene and Approved Reference Boundaries
56
+ 12. Accessibility Non-Negotiables
57
+ 13. Anti-Patterns to Avoid
58
+ 14. Implementation Notes for Future UI Tasks
48
59
 
49
60
  Required `docs/design-intent.json` fields:
50
61
  - `mode`
@@ -60,6 +71,11 @@ Required `docs/design-intent.json` fields:
60
71
  - `crossViewportAdaptation`
61
72
  - `motionSystem`
62
73
  - `componentMorphology`
74
+ - `accessibilityPolicy`
75
+ - `designExecutionPolicy`
76
+ - `designExecutionHandoff`
77
+ - `reviewRubric`
78
+ - `contextHygiene`
63
79
  - `experiencePrinciples`
64
80
  - `forbiddenPatterns`
65
81
  - `validationHints`
@@ -73,13 +89,24 @@ Output:
73
89
  - `docs/design-intent.json` must define a real token system, not just loose style notes. Include primitive, semantic, and component layers plus aliasing rules and naming constraints.
74
90
  - `docs/design-intent.json` must include deterministic fields for `colorTruth.format`, `colorTruth.allowHexDerivatives`, and `crossViewportAdaptation.mutationRules.mobile/tablet/desktop`.
75
91
  - `docs/design-intent.json` must also include `motionSystem` and `componentMorphology` so future UI work preserves state behavior and purposeful motion without collapsing into generic static output.
92
+ - `docs/design-intent.json` must also include `accessibilityPolicy` so the hard compliance floor, advisory contrast model, and blocking-vs-advisory checks stay machine-readable.
93
+ - `docs/design-intent.json` must also include `designExecutionPolicy` so structured handoff rules, representation strategy, semantic review focus, and non-screenshot execution boundaries stay machine-readable.
94
+ - `docs/design-intent.json` must also include `designExecutionHandoff` so surface plans, component graph relationships, content priority, viewport mutation, interaction states, and signature move rationale are explicit before implementation begins.
95
+ - `docs/design-intent.json` must also include `reviewRubric` so distinctiveness, genericity drift, taste-vs-failure boundaries, and motion discipline are judged with stable dimensions instead of ad hoc opinion.
96
+ - `docs/design-intent.json` must include `contextHygiene` so valid design sources, tainted carryover sources, and continuity rules are machine-readable.
76
97
  - If onboarding or detector evidence exists, preserve it under `repoEvidence.designEvidenceSummary` instead of throwing away the machine-readable snapshot of the current UI system.
77
98
  - Token intent must stay structure-first: primitive tokens hold raw values, semantic tokens carry purpose, and component tokens consume semantic tokens instead of bypassing them with raw values.
78
99
  - Color intent must be defined in a perceptual or relational color model first. Hex values may appear only as implementation derivatives.
79
100
  - The contract must encode viewport mutation rules, not just breakpoint names.
80
101
  - Motion guidance must preserve creativity: allow meaningful animation, define reduced-motion behavior, and optimize choreography instead of suppressing it by default.
102
+ - Accessibility guidance must split hard compliance from advisory tuning: treat WCAG 2.2 AA as the minimum blocking floor and APCA as advisory perceptual guidance for readability nuance, especially in typography and dark mode.
103
+ - Accessibility scope must include focus visibility, focus appearance, target size, accessible authentication, keyboard access, use-of-color-only failures, and dynamic status/state access.
104
+ - Structured design execution guidance must define the surface plan, component graph, content-priority map, viewport mutation plan, interaction-state matrix, and semantic review focus without relying on screenshot capture.
105
+ - Structured design execution must include an explicit structured handoff in `docs/design-intent.json`, not just policy booleans. The handoff should be detailed enough that a future agent can implement the UI without falling back to generic layout defaults.
106
+ - The review rubric must define stable dimensions, genericity signals, valid bold signals, and reporting rules that force the agent to explain why something is generic or valid.
81
107
  - Color direction must come from the current project context. Similarity to prior unrelated projects is drift unless the brief or repo evidence explicitly supports it.
82
108
  - If no approved reference system exists, synthesize the design from zero using current product context, constraints, and content only.
83
- - The resulting system should feel authored and recognizable in screenshots, not politely interchangeable with common template kits.
109
+ - Explicitly record which sources are allowed to shape the visual language and which sources are tainted unless the user opts into continuity.
110
+ - The resulting system should feel authored and recognizable in implementation, not politely interchangeable with common template kits.
84
111
  - Use practical, modern, accessible language grounded in the project, not generic SaaS defaults or copycat brand systems.
85
112
  - Wait for user approval before generating Figma or code assets.
@@ -17,6 +17,32 @@ Mandatory behavior when triggered:
17
17
  - reject template-only repetitive outputs and force a distinct layout direction
18
18
  - treat prior website memory or old-project visual carryover as invalid evidence unless the user explicitly requests continuity with that exact system
19
19
  - do not flatten ambitious visual or motion ideas by default; keep them when they are optimized, intentional, and accessible
20
+ - let current repo evidence, the active brief, current project docs, and explicitly approved reference systems outrank remembered style residue every time
21
+
22
+ ## Context Hygiene and Reference Boundaries (Mandatory)
23
+
24
+ - Valid visual-context sources are limited to the current repo evidence, the current user brief, current project docs, and explicitly approved reference systems.
25
+ - Design continuity is opt-in. If the user does not request continuity with a prior visual system, synthesize from the current project context instead.
26
+ - Old project screenshots, remembered website styles, and cross-chat visual residue are tainted context unless the user explicitly authorizes them.
27
+ - When repo evidence and memory residue conflict, repo evidence wins.
28
+ - If a reference system is approved, adapt its reasoning and constraints. Do not copy its surface 1:1.
29
+
30
+ ## Accessibility Split (Mandatory)
31
+
32
+ - Treat WCAG 2.2 AA as the hard compliance floor for release-blocking accessibility issues.
33
+ - Treat APCA as an advisory readability model for perceptual tuning, especially for typography, dark mode, and nuanced contrast review.
34
+ - Advisory APCA findings must never waive a WCAG hard failure.
35
+ - Hard accessibility checks must cover more than contrast alone. They must include focus visibility, focus appearance, target size, keyboard access, use-of-color-only failures, accessible authentication, and status or dynamic state access.
36
+ - Keep accessibility compatible with expressive design. Fix the violation without flattening the interface into generic low-risk layouts unless that is the only safe option.
37
+
38
+ ## Structured Design Execution Boundaries (Mandatory)
39
+
40
+ - UI review must stay representation-first. The contract should define a surface plan, component graph, content-priority map, viewport mutation plan, interaction-state matrix, and task-flow narrative before implementation drifts into styling guesswork.
41
+ - Semantic review should judge contract fidelity, distinctiveness, hierarchy, component-state behavior, and cross-viewport mutation directly from the contract plus changed UI code.
42
+ - Do not make screenshot capture, browser automation, or pixel diff artifacts a baseline dependency for design quality in this repo.
43
+ - Required coverage must still include mobile, tablet, and desktop behavior unless the product scope explicitly excludes one of those surfaces.
44
+ - Escalate to semantic review only when deterministic evidence shows meaningful drift, missing required viewport coverage, or another contract-critical visual failure.
45
+ - Do not use semantic review to invent aesthetic problems when deterministic evidence says the surface is stable.
20
46
 
21
47
  ## UI Consistency Guardrails (Mandatory)
22
48
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-22T12:33:03.350Z",
2
+ "generatedAt": "2026-04-23T10:22:34.642Z",
3
3
  "reportName": "memory-continuity-benchmark",
4
4
  "schemaVersion": "1.0.0",
5
5
  "passed": true,
package/.cursorrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.16
3
+ Generated by Agentic-Senior-Core CLI v3.0.19
4
4
  Timestamp: 2026-04-22T12:30:18.799Z
5
5
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
6
6
 
@@ -2,10 +2,16 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
5
+ Canonical Snapshot SHA256: 3ddc44d1c3cad20aa06e31c45b5d7289b1b4cde46decb668b0347817222fb022
6
6
 
7
7
  Canonical policy source: [.instructions.md](../.instructions.md).
8
8
 
9
+ If your host stops at this file, follow this minimum floor:
10
+ - Read `.agent-instructions.md` next when it exists.
11
+ - For UI or redesign requests, load [.agent-context/prompts/bootstrap-design.md](../.agent-context/prompts/bootstrap-design.md) and [.agent-context/rules/frontend-architecture.md](../.agent-context/rules/frontend-architecture.md) before coding.
12
+ - If UI scope and `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize them before UI implementation.
13
+ - Memory continuity is host-dependent project memory and does not replace bootstrap loading.
14
+
9
15
  ## Bootstrap Sequence
10
16
 
11
17
  1. Load [.instructions.md](../.instructions.md) first as the canonical baseline.
@@ -2,10 +2,16 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
5
+ Canonical Snapshot SHA256: 3ddc44d1c3cad20aa06e31c45b5d7289b1b4cde46decb668b0347817222fb022
6
6
 
7
7
  The canonical policy source for this repository is [.instructions.md](../.instructions.md).
8
8
 
9
+ If your host stops at this file, follow this minimum floor:
10
+ - Read `.agent-instructions.md` next when it exists.
11
+ - For UI or redesign requests, load [.agent-context/prompts/bootstrap-design.md](../.agent-context/prompts/bootstrap-design.md) and [.agent-context/rules/frontend-architecture.md](../.agent-context/rules/frontend-architecture.md) before coding.
12
+ - If UI scope and `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize them before UI implementation.
13
+ - Memory continuity is host-dependent project memory and does not replace bootstrap loading.
14
+
9
15
  ## Required Load Order
10
16
 
11
17
  1. Read [.instructions.md](../.instructions.md) first as the canonical baseline.
package/.instructions.md CHANGED
@@ -134,6 +134,9 @@ Meta-prompts that provide complete workflows for common scenarios:
134
134
 
135
135
  **What to do**: When user request matches a trigger, load the full prompt to understand the workflow.
136
136
  For UI-only requests, keep context isolated: load `bootstrap-design.md` and `frontend-architecture.md` first, and do not eagerly load unrelated backend-only rules such as `database-design.md`, `docker-runtime.md`, or `microservices.md` unless the request explicitly crosses those boundaries.
137
+ For design work, treat only the current repo evidence, the current brief, current project docs, and explicitly approved reference systems as valid style context. Do not let prior-chat or unrelated-project visual memory steer the result unless the user explicitly asks for continuity.
138
+ For accessibility in UI work, treat WCAG 2.2 AA as the hard compliance floor and APCA as advisory perceptual tuning only.
139
+ For UI review, use structured design execution evidence first: `designExecutionPolicy`, `docs/DESIGN.md`, `repoEvidence.designEvidenceSummary`, and the changed UI diff. Do not require screenshot capture as a baseline dependency.
137
140
 
138
141
  ---
139
142
 
package/.windsurfrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.16
3
+ Generated by Agentic-Senior-Core CLI v3.0.19
4
4
  Timestamp: 2026-04-22T12:30:18.799Z
5
5
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
6
6
 
package/AGENTS.md CHANGED
@@ -2,11 +2,23 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
5
+ Canonical Snapshot SHA256: 3ddc44d1c3cad20aa06e31c45b5d7289b1b4cde46decb668b0347817222fb022
6
6
 
7
7
  This file is an adapter entrypoint for agent discovery.
8
8
  The canonical policy source is [.instructions.md](.instructions.md).
9
9
 
10
+ If your host stops at this file instead of following the full chain, obey the Critical Bootstrap Floor below before coding.
11
+
12
+ ## Critical Bootstrap Floor
13
+
14
+ - If `.agent-instructions.md` exists, prefer it immediately after this file because it is the compiled project-specific snapshot.
15
+ - Memory continuity does not replace bootstrap loading. It is host-dependent project memory, not a guarantee that instructions were reloaded for this session.
16
+ - For UI, UX, layout, screen, tailwind, frontend, or redesign requests: load [.agent-context/prompts/bootstrap-design.md](.agent-context/prompts/bootstrap-design.md) and [.agent-context/rules/frontend-architecture.md](.agent-context/rules/frontend-architecture.md) before editing code.
17
+ - For UI scope: if `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize or refine them before implementing UI changes.
18
+ - For refactor, improve, clean up, or fix requests: inspect the active rules and propose a plan before editing.
19
+ - For new project or module requests: propose architecture before generating code.
20
+ - For ecosystem, framework, dependency, or Docker claims: perform live web research instead of relying on stale local heuristics.
21
+
10
22
  ## Mandatory Bootstrap Chain
11
23
 
12
24
  1. Load [.instructions.md](.instructions.md) first as the canonical baseline.
@@ -651,7 +651,7 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
651
651
  });
652
652
 
653
653
  await writeMemoryContinuityState(resolvedTargetDirectoryPath, memoryContinuityState);
654
- console.log(`Memory continuity policy enabled (${memoryContinuityState.hydrationMode}).`);
654
+ console.log(`Project memory continuity metadata enabled (${memoryContinuityState.hydrationMode}, host-supported).`);
655
655
  }
656
656
 
657
657
  let tokenOptimizationState = null;
@@ -844,7 +844,7 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
844
844
  console.log(`- Repository workflows copied: no (workflows remain source-repo assets)`);
845
845
  console.log(`- MCP configuration: ${shouldIncludeMcpTemplate ? 'auto-configured for your IDEs (VS Code, Cursor, Zed, Gemini)' : 'disabled (--no-mcp-template)'}`);
846
846
  if (isMemoryContinuityEnabled) {
847
- console.log('- Memory continuity policy: enabled (index + selective hydration)');
847
+ console.log('- Memory continuity policy: enabled (index + selective hydration; host support required)');
848
848
  } else {
849
849
  console.log('- Memory continuity policy: disabled (--no-memory-continuity)');
850
850
  }
@@ -379,7 +379,7 @@ export function buildMemoryContinuityGuidanceBlock(memoryContinuityState) {
379
379
  : 2;
380
380
 
381
381
  return [
382
- 'Memory continuity mode is enabled.',
382
+ 'Project memory continuity mode is enabled.',
383
383
  'Hydration mode: progressive-disclosure.',
384
384
  adapterGuidanceLine,
385
385
  '',
@@ -389,6 +389,7 @@ export function buildMemoryContinuityGuidanceBlock(memoryContinuityState) {
389
389
  '- Always redact sensitive text before persistence (<private> blocks and inline secret-like fields).',
390
390
  '',
391
391
  'Host compatibility scope:',
392
+ '- This memory layer does not replace reading bootstrap instruction files at the start of a session.',
392
393
  '- Works for local IDE, CLI, and cloud IDE chat hosts that implement the memory adapter contract or MCP retrieval path.',
393
394
  '- Generic web chat sessions without repository tools cannot auto-hydrate runtime memory and should rely on manual summary export/import.',
394
395
  ].join('\n');
@@ -61,6 +61,7 @@ export const DESIGN_REQUIRED_SECTIONS = [
61
61
  'Responsive Strategy and Cross-Viewport Adaptation Matrix',
62
62
  'Interaction, Motion, and Feedback Rules',
63
63
  'Component Language, Morphology, and Shared Patterns',
64
+ 'Context Hygiene and Approved Reference Boundaries',
64
65
  'Accessibility Non-Negotiables',
65
66
  'Anti-Patterns to Avoid',
66
67
  'Implementation Notes for Future UI Tasks',