@ryuenn3123/agentic-senior-core 3.0.25 → 3.0.27

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 (38) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +3 -3
  2. package/.agent-context/prompts/refactor.md +2 -0
  3. package/.agent-context/prompts/review-code.md +2 -2
  4. package/.agent-context/review-checklists/architecture-review.md +12 -0
  5. package/.agent-context/review-checklists/pr-checklist.md +10 -2
  6. package/.agent-context/rules/api-docs.md +4 -0
  7. package/.agent-context/rules/architecture.md +3 -3
  8. package/.agent-context/rules/database-design.md +9 -0
  9. package/.agent-context/rules/error-handling.md +8 -0
  10. package/.agent-context/rules/event-driven.md +3 -0
  11. package/.agent-context/rules/frontend-architecture.md +2 -2
  12. package/.agent-context/rules/microservices.md +2 -0
  13. package/.agent-context/rules/security.md +11 -0
  14. package/.agent-context/rules/testing.md +8 -0
  15. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  16. package/.agent-context/state/weekly-governance-report.json +234 -31
  17. package/.cursorrules +1 -1
  18. package/.gemini/instructions.md +3 -2
  19. package/.github/copilot-instructions.md +3 -2
  20. package/.instructions.md +16 -1
  21. package/.windsurfrules +1 -1
  22. package/AGENTS.md +4 -3
  23. package/README.md +6 -5
  24. package/lib/cli/commands/init.mjs +6 -0
  25. package/lib/cli/commands/upgrade.mjs +13 -0
  26. package/lib/cli/compiler.mjs +9 -8
  27. package/lib/cli/memory-continuity.mjs +137 -0
  28. package/lib/cli/project-scaffolder/design-contract.mjs +3 -3
  29. package/lib/cli/project-scaffolder/prompt-builders.mjs +2 -2
  30. package/lib/cli/token-optimization.mjs +56 -0
  31. package/package.json +1 -1
  32. package/scripts/governance-weekly-report.mjs +138 -1
  33. package/scripts/release-gate/audit-checks.mjs +1 -1
  34. package/scripts/release-gate/constants.mjs +11 -0
  35. package/scripts/rules-guardian-audit.mjs +1 -1
  36. package/scripts/single-source-lazy-loading-audit.mjs +10 -8
  37. package/scripts/sync-thin-adapters.mjs +7 -4
  38. package/scripts/ui-design-judge/prompting.mjs +1 -1
@@ -22,8 +22,22 @@ const ARGUMENT_FLAGS = new Set(process.argv.slice(2));
22
22
  const isStdoutOnlyMode = ARGUMENT_FLAGS.has('--stdout-only');
23
23
  const WEEKLY_WINDOW_DAYS = 7;
24
24
  const HISTORY_LIMIT = 26;
25
+ const BACKEND_REQUIRED_DOMAIN_NAMES = new Set([
26
+ 'backend-architecture',
27
+ 'backend-security',
28
+ 'backend-data-access',
29
+ 'backend-error-handling',
30
+ 'backend-api-contract',
31
+ 'backend-testing',
32
+ 'backend-performance',
33
+ 'backend-idempotency',
34
+ 'backend-risk-map',
35
+ ]);
25
36
  const REQUIRED_VERIFIED_DOMAINS = new Set([
26
37
  'canonical-instructions',
38
+ 'frontend-design-contract',
39
+ 'frontend-architecture',
40
+ ...Array.from(BACKEND_REQUIRED_DOMAIN_NAMES),
27
41
  'pr-checklist',
28
42
  'architecture-review',
29
43
  'mcp-server',
@@ -31,11 +45,100 @@ const REQUIRED_VERIFIED_DOMAINS = new Set([
31
45
  ]);
32
46
  const GOVERNANCE_SURFACE_PATHS = {
33
47
  'canonical-instructions': '.instructions.md',
48
+ 'frontend-design-contract': '.agent-context/prompts/bootstrap-design.md',
49
+ 'frontend-architecture': '.agent-context/rules/frontend-architecture.md',
50
+ 'backend-architecture': '.agent-context/rules/architecture.md',
51
+ 'backend-security': '.agent-context/rules/security.md',
52
+ 'backend-data-access': '.agent-context/rules/database-design.md',
53
+ 'backend-error-handling': '.agent-context/rules/error-handling.md',
54
+ 'backend-api-contract': '.agent-context/rules/api-docs.md',
55
+ 'backend-testing': '.agent-context/rules/testing.md',
56
+ 'backend-performance': '.agent-context/rules/performance.md',
57
+ 'backend-idempotency': '.agent-context/rules/event-driven.md',
58
+ 'backend-risk-map': '.agent-context/state/architecture-map.md',
34
59
  'pr-checklist': '.agent-context/review-checklists/pr-checklist.md',
35
60
  'architecture-review': '.agent-context/review-checklists/architecture-review.md',
36
61
  'mcp-server': 'scripts/mcp-server.mjs',
37
62
  'state-continuity': '.agent-context/state',
38
63
  };
64
+ const BACKEND_GOVERNANCE_COVERAGE = [
65
+ {
66
+ constraint: 'Layered architecture and separation of concerns',
67
+ status: 'covered',
68
+ sourcePaths: [
69
+ '.agent-context/rules/architecture.md',
70
+ '.agent-context/review-checklists/architecture-review.md',
71
+ ],
72
+ signal: 'Transport, application, domain, and infrastructure boundaries are explicit.',
73
+ },
74
+ {
75
+ constraint: 'Global backend/API rule routing',
76
+ status: 'strengthened',
77
+ sourcePaths: [
78
+ '.instructions.md',
79
+ '.agent-context/rules/architecture.md',
80
+ '.agent-context/prompts/refactor.md',
81
+ ],
82
+ signal: 'Backend/API governance routes by problem domain and stays stack-agnostic; no stack-specific governance adapters are created.',
83
+ },
84
+ {
85
+ constraint: 'Zero-trust input validation',
86
+ status: 'strengthened',
87
+ sourcePaths: [
88
+ '.agent-context/rules/security.md',
89
+ '.agent-context/review-checklists/pr-checklist.md',
90
+ ],
91
+ signal: 'User-controlled body, query, params, headers, cookies, files, webhooks, and job payloads must be validated before service logic.',
92
+ },
93
+ {
94
+ constraint: 'Data access performance and integrity',
95
+ status: 'strengthened',
96
+ sourcePaths: [
97
+ '.agent-context/rules/database-design.md',
98
+ '.agent-context/rules/performance.md',
99
+ '.agent-context/state/architecture-map.md',
100
+ ],
101
+ signal: 'Backend reads must avoid N+1 and unbounded list responses; multi-write mutations need transaction or recovery evidence.',
102
+ },
103
+ {
104
+ constraint: 'Distributed consistency and outbox safety',
105
+ status: 'strengthened',
106
+ sourcePaths: [
107
+ '.agent-context/rules/event-driven.md',
108
+ '.agent-context/rules/database-design.md',
109
+ '.agent-context/rules/microservices.md',
110
+ ],
111
+ signal: 'Dual-write flows need outbox or equivalent replay safety, and cross-service consistency must define saga, compensation, or recovery behavior instead of defaulting to two-phase commit.',
112
+ },
113
+ {
114
+ constraint: 'Safe centralized API errors',
115
+ status: 'strengthened',
116
+ sourcePaths: [
117
+ '.agent-context/rules/error-handling.md',
118
+ '.agent-context/rules/api-docs.md',
119
+ ],
120
+ signal: 'HTTP/API responses use safe machine-readable error shapes, may align with RFC 9457 Problem Details, and preserve safe trace/correlation identifiers without leaking internals.',
121
+ },
122
+ {
123
+ constraint: 'Sensitive mutation idempotency',
124
+ status: 'strengthened',
125
+ sourcePaths: [
126
+ '.agent-context/rules/api-docs.md',
127
+ '.agent-context/rules/testing.md',
128
+ '.agent-context/rules/event-driven.md',
129
+ ],
130
+ signal: 'Payments, orders, status changes, and other risky mutations must document and test duplicate-submit behavior.',
131
+ },
132
+ {
133
+ constraint: 'API contract and behavior testing',
134
+ status: 'strengthened',
135
+ sourcePaths: [
136
+ '.agent-context/rules/testing.md',
137
+ '.agent-context/review-checklists/pr-checklist.md',
138
+ ],
139
+ signal: 'API tests cover validation, auth, documented error shapes, pagination defaults, empty states, and mutation retry safety.',
140
+ },
141
+ ];
39
142
 
40
143
  function readJsonOrNull(filePath) {
41
144
  if (!existsSync(filePath)) {
@@ -194,6 +297,37 @@ async function collectSkillTrustSignals() {
194
297
  };
195
298
  }
196
299
 
300
+ function buildBackendGovernancePosture(skillTrustSignals) {
301
+ const backendSurfaceRows = skillTrustSignals.domains.filter((trustRow) => {
302
+ return BACKEND_REQUIRED_DOMAIN_NAMES.has(trustRow.domain);
303
+ });
304
+ const missingBackendSurfaceNames = backendSurfaceRows
305
+ .filter((trustRow) => trustRow.tier !== 'verified')
306
+ .map((trustRow) => trustRow.domain);
307
+ const verifiedSurfaceCount = backendSurfaceRows.length - missingBackendSurfaceNames.length;
308
+
309
+ return {
310
+ status: missingBackendSurfaceNames.length === 0 ? 'verified' : 'needs-attention',
311
+ summary: missingBackendSurfaceNames.length === 0
312
+ ? 'Backend governance is verified across architecture, security, data access, error handling, API contracts, testing, performance, idempotency, and risk-map surfaces.'
313
+ : 'Backend governance is missing one or more required surfaces.',
314
+ requiredSurfaceCount: backendSurfaceRows.length,
315
+ verifiedSurfaceCount,
316
+ missingSurfaceNames: missingBackendSurfaceNames,
317
+ coverage: BACKEND_GOVERNANCE_COVERAGE,
318
+ developmentFocus: [
319
+ {
320
+ focus: 'Keep backend guidance global and stack-agnostic.',
321
+ reason: 'The repo should enforce architecture, security, API, data, error, event, and testing thinking without building Nest, Laravel, FastAPI, Express, Go, or other stack-specific governance adapters.',
322
+ },
323
+ {
324
+ focus: 'Use framework facts only when implementing inside an existing project.',
325
+ reason: 'LLMs can apply current ecosystem knowledge directly; governance should route the relevant global constraints instead of acting as a stack detector.',
326
+ },
327
+ ],
328
+ };
329
+ }
330
+
197
331
  function buildBlockers(qualityTrendReport, skillTrustSignals, commitSignals) {
198
332
  const blockers = [];
199
333
 
@@ -222,6 +356,7 @@ function buildHistoryEntry(weeklyReport) {
222
356
  blockerCount: weeklyReport.releaseReadiness.blockers.length,
223
357
  gatePassRatePercent: weeklyReport.qualitySignals.governanceHealth.gatePassRatePercent,
224
358
  verifiedSkillDomainCount: weeklyReport.skillTrust.tierCounts.verified,
359
+ backendVerifiedSurfaceCount: weeklyReport.backendGovernance?.verifiedSurfaceCount ?? null,
225
360
  releaseFrequencyPercent: weeklyReport.commitSignals.releaseFrequencyPercent,
226
361
  rollbackFrequencyPercent: weeklyReport.commitSignals.rollbackFrequencyPercent,
227
362
  };
@@ -243,6 +378,7 @@ async function runWeeklyGovernanceReport() {
243
378
  const qualityTrendReport = qualityTrendState.report;
244
379
 
245
380
  const skillTrustSignals = await collectSkillTrustSignals();
381
+ const backendGovernance = buildBackendGovernancePosture(skillTrustSignals);
246
382
  const commitSignals = collectCommitSignals(WEEKLY_WINDOW_DAYS);
247
383
  const blockers = buildBlockers(qualityTrendReport, skillTrustSignals, commitSignals);
248
384
 
@@ -267,12 +403,13 @@ async function runWeeklyGovernanceReport() {
267
403
  tokenEfficiency: qualityTrendReport?.tokenEfficiency || null,
268
404
  },
269
405
  skillTrust: skillTrustSignals,
406
+ backendGovernance,
270
407
  commitSignals,
271
408
  releaseReadiness: {
272
409
  isReady: blockers.length === 0,
273
410
  blockers,
274
411
  summary: blockers.length === 0
275
- ? 'Weekly governance posture is ready for maintenance releases.'
412
+ ? 'Weekly governance posture is ready for maintenance releases with frontend and backend governance surfaces verified.'
276
413
  : 'Weekly governance posture is blocked by unresolved readiness signals.',
277
414
  },
278
415
  artifact: {
@@ -312,7 +312,7 @@ export function runAuditReleaseChecks(results, diagnostics) {
312
312
  singleSourceLazyLoadingAuditExecution.report?.lazyRuleLoading?.enforced === true,
313
313
  'lazy-rule-loading-hard-rule',
314
314
  singleSourceLazyLoadingAuditExecution.report?.lazyRuleLoading?.enforced === true
315
- ? 'Language-specific guidance is loaded lazily by detected scope'
315
+ ? 'Global domain governance is loaded lazily by touched scope'
316
316
  : 'Lazy rule loading enforcement failed in single-source lazy-loading audit'
317
317
  );
318
318
  pushResult(
@@ -32,17 +32,24 @@ export const REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS = [
32
32
  'No premature abstraction.',
33
33
  'Readability over brevity.',
34
34
  'backend and shared core modules',
35
+ 'Do not create or load stack-specific governance adapters as the baseline.',
35
36
  ];
36
37
 
37
38
  export const REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS = [
38
39
  'No clever hacks in backend and shared core modules',
39
40
  'No premature abstraction (base classes/util layers created only after repeated stable patterns)',
40
41
  'Readability over brevity for maintainability',
42
+ 'Controllers, route handlers, and transport adapters do not contain business policy',
43
+ 'Sensitive mutations include idempotency or duplicate-submit coverage',
44
+ 'Backend/API governance was applied through global domain rules',
41
45
  ];
42
46
 
43
47
  export const REQUIRED_REFACTOR_PROMPT_SNIPPETS = [
44
48
  'Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.',
45
49
  'Prioritize maintainability over compressed one-liners.',
50
+ 'zero-trust input validation',
51
+ 'idempotency for sensitive mutations',
52
+ 'Backend/API governance is global and stack-agnostic.',
46
53
  ];
47
54
 
48
55
  export const REQUIRED_ARCHITECTURE_REVIEW_CHECKLIST_SNIPPETS = [
@@ -50,4 +57,8 @@ export const REQUIRED_ARCHITECTURE_REVIEW_CHECKLIST_SNIPPETS = [
50
57
  'No clever hacks in backend and shared core modules',
51
58
  'No premature abstraction',
52
59
  'Readability over brevity',
60
+ 'Service or use-case code owns orchestration',
61
+ 'Relational reads avoid N+1 patterns',
62
+ 'Global backend/API governance is used directly',
63
+ 'Dual-write database plus message flows use an outbox',
53
64
  ];
@@ -67,7 +67,7 @@ const REQUIRED_PR_CHECKLIST_SNIPPETS = [
67
67
 
68
68
  const REQUIRED_REVIEW_PROMPT_SNIPPETS = [
69
69
  'Review the code with a production-risk mindset.',
70
- 'Do not invent stack-specific concerns unless the repo or changed files prove they apply.',
70
+ 'Do not create stack-specific governance concerns.',
71
71
  ];
72
72
 
73
73
  function pushResult(results, isPassed, checkName, details) {
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Enforces V3.0-010 policy:
7
7
  * - One canonical rule source is explicitly defined and enforced.
8
- * - Language-specific rule guidance loads lazily by detected scope.
8
+ * - Global domain governance loads lazily by touched scope.
9
9
  * - Conflicting duplicate instruction paths are prevented.
10
10
  */
11
11
 
@@ -60,24 +60,24 @@ const MAX_EAGER_STACK_MENTIONS = 4;
60
60
  const REQUIRED_ARCHITECTURE_RULE_SNIPPETS = [
61
61
  '## Single Source of Truth and Lazy Rule Loading',
62
62
  'Canonical rule source is .instructions.md.',
63
- 'Load language-specific stack guidance lazily based on detected scope.',
64
- 'Do not preload unrelated stack profiles during normal flow.',
63
+ 'Load global domain rules lazily based on touched scope.',
64
+ 'Do not create or load stack-specific governance adapters as the baseline.',
65
65
  ];
66
66
 
67
67
  const REQUIRED_PR_CHECKLIST_SNIPPETS = [
68
68
  'Canonical rule source is explicitly defined and enforced',
69
- 'Language-specific guidance is loaded lazily based on detected scope',
69
+ 'Global domain governance is loaded lazily based on touched scope',
70
70
  'No conflicting duplicate rule instructions during normal flow',
71
71
  ];
72
72
 
73
73
  const REQUIRED_REVIEW_PROMPT_SNIPPETS = [
74
- 'Enforce single-source and lazy-loading policy: canonical rule source must be explicitly enforced, language-specific guidance must load lazily based on detected scope, and conflicting duplicate rule instructions must not appear during normal flow.',
74
+ '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.',
75
75
  ];
76
76
 
77
77
  const REQUIRED_COMPILER_SNIPPETS = [
78
78
  '## LAYER 2 POLICY: LAZY RULE LOADING',
79
- 'Load runtime-specific guidance only when task scope touches that runtime.',
80
- 'Avoid eager loading unrelated runtime guidance to prevent instruction conflicts.',
79
+ 'Load global domain rules only when task scope touches that domain.',
80
+ 'Avoid eager loading unrelated runtime or domain guidance to prevent instruction conflicts.',
81
81
  "stackLoadingMode: 'lazy'",
82
82
  ];
83
83
 
@@ -377,6 +377,7 @@ function runAudit() {
377
377
  if (lazyPolicy
378
378
  && lazyPolicy.canonicalSource === CANONICAL_SOURCE_PATH
379
379
  && lazyPolicy.stackLoadingMode === 'lazy'
380
+ && (lazyPolicy.domainRuleLoadingMode === 'lazy' || typeof lazyPolicy.domainRuleLoadingMode === 'undefined')
380
381
  && lazyPolicy.loadedOnDemand === true) {
381
382
  onboardingLazyPolicyMode = 'explicit-lazy-policy';
382
383
  onboardingLazyPolicyValidated = true;
@@ -478,7 +479,7 @@ function runAudit() {
478
479
  && !eagerLoadingDetected;
479
480
 
480
481
  if (lazyRuleLoadingEnforced) {
481
- pushResult(results, true, 'lazy-rule-loading-hard-rule', 'Language-specific guidance is loaded lazily by detected scope');
482
+ pushResult(results, true, 'lazy-rule-loading-hard-rule', 'Global domain governance is loaded lazily by touched scope');
482
483
  } else {
483
484
  failures.push('Lazy rule loading hard-rule is not fully enforced');
484
485
  pushResult(results, false, 'lazy-rule-loading-hard-rule', 'Lazy loading enforcement failed');
@@ -514,6 +515,7 @@ function runAudit() {
514
515
  onboardingPolicyValidated: onboardingLazyPolicyValidated,
515
516
  eagerLoadingDetected,
516
517
  maxAllowedStackMentions: MAX_EAGER_STACK_MENTIONS,
518
+ globalDomainGovernance: true,
517
519
  },
518
520
  duplicationPolicy: {
519
521
  noConflictingDuplicates,
@@ -44,8 +44,9 @@ If your host stops at this file instead of following the full chain, obey the Cr
44
44
  - Memory continuity does not replace bootstrap loading. It is host-dependent project memory, not a guarantee that instructions were reloaded for this session.
45
45
  - 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.
46
46
  - For UI scope: if \`docs/DESIGN.md\` or \`docs/design-intent.json\` is missing, materialize or refine them before implementing UI changes.
47
+ - For backend, API, data, auth, error, event, queue, worker, or distributed-system requests: load the relevant global rules from [.agent-context/rules/](.agent-context/rules); do not create stack-specific governance adapters.
47
48
  - For refactor, improve, clean up, or fix requests: inspect the active rules and propose a plan before editing.
48
- - For new project or module requests: clarify constraints, stack decisions, and required docs before generating code.
49
+ - For new project or module requests: clarify constraints, runtime decisions, and required docs before generating code.
49
50
  - For ecosystem, framework, dependency, or Docker claims: perform live web research instead of relying on stale local heuristics.
50
51
 
51
52
  ## Mandatory Bootstrap Chain
@@ -57,7 +58,7 @@ If your host stops at this file instead of following the full chain, obey the Cr
57
58
  5. Enforce review contracts from [.agent-context/review-checklists/](.agent-context/review-checklists).
58
59
  6. Read change-risk maps and continuity state from [.agent-context/state/](.agent-context/state).
59
60
  7. Enforce policy thresholds from [.agent-context/policies/](.agent-context/policies).
60
- 8. Use dynamic stack, structure, and live research signals from project context docs.
61
+ 8. Use runtime evidence, structure, and live research signals from project context docs.
61
62
 
62
63
  ## Trigger Rules
63
64
 
@@ -82,6 +83,7 @@ If your host stops at this file, follow this minimum floor:
82
83
  - Read \`.agent-instructions.md\` next when it exists.
83
84
  - 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.
84
85
  - If UI scope and \`docs/DESIGN.md\` or \`docs/design-intent.json\` is missing, materialize them before UI implementation.
86
+ - For backend/API/data/auth/event requests, load relevant global rules from [.agent-context/rules/](../.agent-context/rules) and do not create stack-specific governance adapters.
85
87
  - Memory continuity is host-dependent project memory and does not replace bootstrap loading.
86
88
 
87
89
  ## Required Load Order
@@ -92,7 +94,7 @@ If your host stops at this file, follow this minimum floor:
92
94
  4. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
93
95
  5. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
94
96
  6. Apply state awareness from [.agent-context/state/](../.agent-context/state) and thresholds from [.agent-context/policies/](../.agent-context/policies).
95
- 7. Resolve stack, structure, and dependency choices from project context docs plus live evidence.
97
+ 7. Resolve runtime, structure, and dependency choices from project context docs plus live evidence.
96
98
 
97
99
  ## Completion Gate
98
100
 
@@ -113,6 +115,7 @@ If your host stops at this file, follow this minimum floor:
113
115
  - Read \`.agent-instructions.md\` next when it exists.
114
116
  - 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.
115
117
  - If UI scope and \`docs/DESIGN.md\` or \`docs/design-intent.json\` is missing, materialize them before UI implementation.
118
+ - For backend/API/data/auth/event requests, load relevant global rules from [.agent-context/rules/](../.agent-context/rules) and do not create stack-specific governance adapters.
116
119
  - Memory continuity is host-dependent project memory and does not replace bootstrap loading.
117
120
 
118
121
  ## Bootstrap Sequence
@@ -123,7 +126,7 @@ If your host stops at this file, follow this minimum floor:
123
126
  4. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
124
127
  5. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
125
128
  6. Apply state awareness from [.agent-context/state/](../.agent-context/state) and policy thresholds from [.agent-context/policies/](../.agent-context/policies).
126
- 7. Resolve stack, structure, and dependency choices from project context docs plus live evidence.
129
+ 7. Resolve runtime, structure, and dependency choices from project context docs plus live evidence.
127
130
 
128
131
  ## Completion Gate
129
132
 
@@ -14,7 +14,7 @@ export function buildSystemPrompt() {
14
14
  'Use repoEvidence.designEvidenceSummary as implementation evidence when deciding whether the diff follows the intended system.',
15
15
  'Do not reward generic SaaS defaults or popular template patterns.',
16
16
  'Do not penalize originality when the implementation still aligns with the contract.',
17
- 'Purposeful motion is allowed and can improve quality. Only flag motion when it drifts from the contract, ignores reduced-motion expectations, or adds avoidable performance/accessibility risk.',
17
+ 'Treat purposeful motion as a first-class quality signal for modern UI work. Flag missing or timid motion when the contract calls for expressive interaction, and only flag motion itself when it drifts from the contract, ignores reduced-motion expectations, or adds avoidable performance/accessibility risk.',
18
18
  'Only flag drift when there is a clear mismatch with the contract, accessibility non-negotiables, or cross-viewport adaptation rules.',
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.',