@ryuenn3123/agentic-senior-core 3.0.19 → 3.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent-context/prompts/bootstrap-design.md +84 -103
- package/.agent-context/prompts/init-project.md +32 -100
- package/.agent-context/prompts/refactor.md +22 -44
- package/.agent-context/prompts/review-code.md +28 -52
- package/.agent-context/review-checklists/architecture-review.md +31 -62
- package/.agent-context/review-checklists/pr-checklist.md +74 -108
- package/.agent-context/rules/api-docs.md +18 -206
- package/.agent-context/rules/architecture.md +40 -207
- package/.agent-context/rules/database-design.md +10 -199
- package/.agent-context/rules/docker-runtime.md +5 -5
- package/.agent-context/rules/efficiency-vs-hype.md +11 -149
- package/.agent-context/rules/error-handling.md +9 -231
- package/.agent-context/rules/event-driven.md +17 -221
- package/.agent-context/rules/frontend-architecture.md +66 -119
- package/.agent-context/rules/git-workflow.md +1 -1
- package/.agent-context/rules/microservices.md +28 -161
- package/.agent-context/rules/naming-conv.md +8 -138
- package/.agent-context/rules/performance.md +9 -175
- package/.agent-context/rules/realtime.md +11 -44
- package/.agent-context/rules/security.md +11 -295
- package/.agent-context/rules/testing.md +9 -174
- package/.agent-context/state/benchmark-analysis.json +3 -3
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.agent-context/state/onboarding-report.json +71 -11
- package/.agents/workflows/init-project.md +7 -24
- package/.agents/workflows/refactor.md +7 -24
- package/.agents/workflows/review-code.md +7 -24
- package/.cursorrules +22 -21
- package/.gemini/instructions.md +2 -2
- package/.github/copilot-instructions.md +2 -2
- package/.instructions.md +112 -213
- package/.windsurfrules +22 -21
- package/AGENTS.md +4 -4
- package/CONTRIBUTING.md +13 -22
- package/README.md +6 -20
- package/lib/cli/commands/init.mjs +102 -148
- package/lib/cli/commands/launch.mjs +3 -3
- package/lib/cli/commands/optimize.mjs +14 -4
- package/lib/cli/commands/upgrade.mjs +25 -23
- package/lib/cli/compiler.mjs +96 -62
- package/lib/cli/constants.mjs +28 -136
- package/lib/cli/detector/design-evidence.mjs +189 -6
- package/lib/cli/detector.mjs +6 -7
- package/lib/cli/init-detection-flow.mjs +10 -93
- package/lib/cli/init-selection.mjs +2 -68
- package/lib/cli/project-scaffolder/constants.mjs +1 -1
- package/lib/cli/project-scaffolder/design-contract.mjs +162 -108
- package/lib/cli/project-scaffolder/discovery.mjs +36 -82
- package/lib/cli/project-scaffolder/prompt-builders.mjs +41 -55
- package/lib/cli/project-scaffolder/storage.mjs +0 -2
- package/lib/cli/token-optimization.mjs +1 -1
- package/lib/cli/utils.mjs +75 -9
- package/package.json +2 -2
- package/scripts/detection-benchmark.mjs +4 -15
- package/scripts/documentation-boundary-audit.mjs +9 -9
- package/scripts/explain-on-demand-audit.mjs +11 -11
- package/scripts/forbidden-content-check.mjs +9 -9
- package/scripts/frontend-usability-audit.mjs +45 -35
- package/scripts/llm-judge.mjs +1 -1
- package/scripts/mcp-server/constants.mjs +2 -2
- package/scripts/mcp-server/tool-registry.mjs +1 -1
- package/scripts/release-gate/audit-checks.mjs +4 -4
- package/scripts/release-gate/static-checks.mjs +5 -5
- package/scripts/release-gate.mjs +1 -1
- package/scripts/rules-guardian-audit.mjs +14 -13
- package/scripts/single-source-lazy-loading-audit.mjs +3 -3
- package/scripts/sync-thin-adapters.mjs +5 -5
- package/scripts/ui-design-judge/design-execution-summary.mjs +27 -1
- package/scripts/ui-design-judge/prompting.mjs +4 -4
- package/scripts/ui-design-judge/reporting.mjs +2 -1
- package/scripts/ui-design-judge/rubric-calibration.mjs +8 -5
- package/scripts/ui-design-judge/rubric-goldset.json +2 -2
- package/scripts/ui-design-judge.mjs +70 -6
- package/scripts/validate/config.mjs +138 -48
- package/scripts/validate/coverage-checks.mjs +32 -7
- package/scripts/validate.mjs +8 -4
- package/lib/cli/architect.mjs +0 -431
|
@@ -8,7 +8,7 @@ export function buildSystemPrompt() {
|
|
|
8
8
|
'Compare the changed UI code against the provided design contract.',
|
|
9
9
|
'Treat docs/design-intent.json as the machine-readable source of truth.',
|
|
10
10
|
'Treat docs/DESIGN.md as explanatory context, not a generic style guide.',
|
|
11
|
-
'Treat designExecutionPolicy as the execution contract for how the UI
|
|
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.',
|
|
14
14
|
'Use repoEvidence.designEvidenceSummary as implementation evidence when deciding whether the diff follows the intended system.',
|
|
@@ -17,15 +17,15 @@ export function buildSystemPrompt() {
|
|
|
17
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.',
|
|
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
|
-
'Treat APCA as advisory perceptual tuning only. Do not
|
|
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
22
|
'This audit always runs in advisory mode for this repository workflow.',
|
|
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
|
-
'Separate taste from failure. A bold design that follows the contract
|
|
25
|
+
'Separate taste from failure. A bold design that follows the contract must not be penalized only because it is unusual.',
|
|
26
26
|
'Return ONLY one JSON object on a single line prefixed with JSON_VERDICT:.',
|
|
27
27
|
'Schema:',
|
|
28
|
-
'{"alignmentScore": number|null, "genericityAssessment": {"status": "distinctive|mixed|generic|unclear", "reason": string}, "tasteVsFailureSeparated": boolean, "rubricBreakdown": [{"dimension": string, "score": number|null, "verdict": "strong|acceptable|weak|unclear", "reason": string, "blocking": boolean}], "notes": string[], "findings": [{"area": string, "severity": "high|medium|low", "problem": string, "evidence": string, "
|
|
28
|
+
'{"alignmentScore": number|null, "genericityAssessment": {"status": "distinctive|mixed|generic|unclear", "reason": string}, "tasteVsFailureSeparated": boolean, "rubricBreakdown": [{"dimension": string, "score": number|null, "verdict": "strong|acceptable|weak|unclear", "reason": string, "blocking": boolean}], "notes": string[], "findings": [{"area": string, "severity": "high|medium|low", "problem": string, "evidence": string, "requiredAction": string, "blockingRecommended": boolean}]}',
|
|
29
29
|
].join('\n');
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -49,7 +49,7 @@ export function normalizeFindings(rawFindings) {
|
|
|
49
49
|
severity: normalizeSeverity(rawFinding?.severity),
|
|
50
50
|
problem: String(rawFinding?.problem || 'No problem description provided.'),
|
|
51
51
|
evidence: String(rawFinding?.evidence || 'No evidence provided.'),
|
|
52
|
-
|
|
52
|
+
requiredAction: String(rawFinding?.requiredAction || 'No required action provided.'),
|
|
53
53
|
blockingRecommended: rawFinding?.blockingRecommended === true,
|
|
54
54
|
}));
|
|
55
55
|
}
|
|
@@ -154,6 +154,7 @@ export function buildReport(partialReport) {
|
|
|
154
154
|
statusChanged: false,
|
|
155
155
|
namedGenericityRequired: false,
|
|
156
156
|
matchedGenericitySignals: [],
|
|
157
|
+
matchedForbiddenPatterns: [],
|
|
157
158
|
matchedValidBoldSignals: [],
|
|
158
159
|
blockingFindingCount: 0,
|
|
159
160
|
contractFidelityWeak: false,
|
|
@@ -24,7 +24,7 @@ function collectEvidenceTexts({
|
|
|
24
24
|
finding?.area,
|
|
25
25
|
finding?.problem,
|
|
26
26
|
finding?.evidence,
|
|
27
|
-
finding?.
|
|
27
|
+
finding?.requiredAction,
|
|
28
28
|
])
|
|
29
29
|
: []),
|
|
30
30
|
...(Array.isArray(notes) ? notes : []),
|
|
@@ -93,6 +93,7 @@ export function calibrateGenericityAssessment({
|
|
|
93
93
|
});
|
|
94
94
|
const matchedGenericitySignals = collectMatchedSignals(reviewRubricSummary?.genericitySignals, evidenceTexts);
|
|
95
95
|
const matchedValidBoldSignals = collectMatchedSignals(reviewRubricSummary?.validBoldSignals, evidenceTexts);
|
|
96
|
+
const matchedForbiddenPatterns = collectMatchedSignals(reviewRubricSummary?.forbiddenPatterns, evidenceTexts);
|
|
96
97
|
const { blockingFindingCount, contractFidelityWeak, contractDriftDetected } = detectContractDrift(
|
|
97
98
|
rubricBreakdown,
|
|
98
99
|
findings,
|
|
@@ -106,17 +107,18 @@ export function calibrateGenericityAssessment({
|
|
|
106
107
|
namedGenericityRequired
|
|
107
108
|
&& ['generic', 'mixed'].includes(providerStatus)
|
|
108
109
|
&& matchedGenericitySignals.length === 0
|
|
110
|
+
&& matchedForbiddenPatterns.length === 0
|
|
109
111
|
) {
|
|
110
112
|
calibratedStatus = 'unclear';
|
|
111
113
|
calibrationNotes.push('Genericity claim was not backed by any named drift signal.');
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
if (matchedGenericitySignals.length > 0 && matchedValidBoldSignals.length === 0) {
|
|
115
|
-
calibratedStatus = contractDriftDetected || matchedGenericitySignals.length >= 2
|
|
116
|
+
if ((matchedGenericitySignals.length > 0 || matchedForbiddenPatterns.length > 0) && matchedValidBoldSignals.length === 0) {
|
|
117
|
+
calibratedStatus = contractDriftDetected || matchedGenericitySignals.length + matchedForbiddenPatterns.length >= 2
|
|
116
118
|
? 'generic'
|
|
117
119
|
: 'mixed';
|
|
118
120
|
calibrationNotes.push('Named genericity drift signals dominate the review evidence.');
|
|
119
|
-
} else if (matchedValidBoldSignals.length > 0 && matchedGenericitySignals.length === 0) {
|
|
121
|
+
} else if (matchedValidBoldSignals.length > 0 && matchedGenericitySignals.length === 0 && matchedForbiddenPatterns.length === 0) {
|
|
120
122
|
if (contractDriftDetected) {
|
|
121
123
|
calibratedStatus = 'mixed';
|
|
122
124
|
calibrationNotes.push('Authored signals are present, but contract drift prevents a distinctive verdict.');
|
|
@@ -127,7 +129,7 @@ export function calibrateGenericityAssessment({
|
|
|
127
129
|
calibratedStatus = 'mixed';
|
|
128
130
|
calibrationNotes.push('One valid bold signal was named, but evidence is not strong enough for a distinctive verdict.');
|
|
129
131
|
}
|
|
130
|
-
} else if (matchedGenericitySignals.length > 0 && matchedValidBoldSignals.length > 0) {
|
|
132
|
+
} else if ((matchedGenericitySignals.length > 0 || matchedForbiddenPatterns.length > 0) && matchedValidBoldSignals.length > 0) {
|
|
131
133
|
calibratedStatus = contractDriftDetected ? 'mixed' : 'mixed';
|
|
132
134
|
calibrationNotes.push('The evidence contains both generic drift and legitimate authored moves.');
|
|
133
135
|
} else if (providerStatus === 'distinctive' && contractDriftDetected) {
|
|
@@ -151,6 +153,7 @@ export function calibrateGenericityAssessment({
|
|
|
151
153
|
statusChanged: calibratedStatus !== providerStatus,
|
|
152
154
|
namedGenericityRequired,
|
|
153
155
|
matchedGenericitySignals,
|
|
156
|
+
matchedForbiddenPatterns,
|
|
154
157
|
matchedValidBoldSignals,
|
|
155
158
|
blockingFindingCount,
|
|
156
159
|
contractFidelityWeak,
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"severity": "high",
|
|
78
78
|
"problem": "Mobile layout no longer follows the contract.",
|
|
79
79
|
"evidence": "The primary action now drops below supporting proof.",
|
|
80
|
-
"
|
|
80
|
+
"requiredAction": "Restore the intended task order.",
|
|
81
81
|
"blockingRecommended": true
|
|
82
82
|
}
|
|
83
83
|
],
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"severity": "high",
|
|
116
116
|
"problem": "The page uses balanced card grid without priority shift.",
|
|
117
117
|
"evidence": "Every block carries equal weight and the CTA no longer leads.",
|
|
118
|
-
"
|
|
118
|
+
"requiredAction": "Rebuild the page around one dominant task surface.",
|
|
119
119
|
"blockingRecommended": true
|
|
120
120
|
}
|
|
121
121
|
],
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* ui-design-judge.mjs
|
|
6
6
|
*
|
|
7
|
-
* Advisory-
|
|
7
|
+
* Advisory-default UI design contract judge.
|
|
8
8
|
*
|
|
9
9
|
* Repo-internal workflow audit; no user-facing runtime modes.
|
|
10
|
-
*
|
|
10
|
+
* Stays advisory by default for this repository workflow, but genericityAutoFail
|
|
11
|
+
* must escalate findings into blocking required actions when named drift signals
|
|
12
|
+
* or forbidden patterns are detected.
|
|
11
13
|
*
|
|
12
14
|
* Validation anchors for repo governance:
|
|
13
15
|
* - Do not reward generic SaaS defaults or popular template patterns.
|
|
@@ -17,6 +19,7 @@
|
|
|
17
19
|
* - designExecutionPolicy
|
|
18
20
|
* - designExecutionHandoff
|
|
19
21
|
* - handoffReady
|
|
22
|
+
* - structuredInspectionAvailable
|
|
20
23
|
*/
|
|
21
24
|
|
|
22
25
|
import { collectChangedFiles, collectPullRequestDiff, isUiRelevantFilePath } from './ui-design-judge/git-input.mjs';
|
|
@@ -33,6 +36,56 @@ import {
|
|
|
33
36
|
} from './ui-design-judge/reporting.mjs';
|
|
34
37
|
import { loadDesignGuide, loadDesignIntent, summarizeDesignExecutionPolicy, summarizeReviewRubric } from './ui-design-judge/design-execution-summary.mjs';
|
|
35
38
|
|
|
39
|
+
function applyGenericityAutoFail({
|
|
40
|
+
reviewRubricSummary,
|
|
41
|
+
calibration,
|
|
42
|
+
findings,
|
|
43
|
+
notes,
|
|
44
|
+
}) {
|
|
45
|
+
const autoFailEnabled = reviewRubricSummary?.genericityAutoFail === true;
|
|
46
|
+
const namedGenericityDetected = Array.isArray(calibration?.matchedGenericitySignals)
|
|
47
|
+
&& calibration.matchedGenericitySignals.length > 0;
|
|
48
|
+
const forbiddenPatternDetected = Array.isArray(calibration?.matchedForbiddenPatterns)
|
|
49
|
+
&& calibration.matchedForbiddenPatterns.length > 0;
|
|
50
|
+
const shouldAutoFail = autoFailEnabled
|
|
51
|
+
&& calibration?.calibratedStatus === 'generic'
|
|
52
|
+
&& (namedGenericityDetected || forbiddenPatternDetected);
|
|
53
|
+
|
|
54
|
+
if (!shouldAutoFail) {
|
|
55
|
+
return {
|
|
56
|
+
findings,
|
|
57
|
+
notes,
|
|
58
|
+
autoFailTriggered: false,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const normalizedFindings = Array.isArray(findings) ? findings.map((finding) => ({ ...finding })) : [];
|
|
63
|
+
const updatedFindings = normalizedFindings.length > 0
|
|
64
|
+
? normalizedFindings.map((finding) => ({
|
|
65
|
+
...finding,
|
|
66
|
+
blockingRecommended: true,
|
|
67
|
+
}))
|
|
68
|
+
: [
|
|
69
|
+
{
|
|
70
|
+
area: 'design-contract',
|
|
71
|
+
severity: 'high',
|
|
72
|
+
problem: 'The UI matches named genericity drift signals that the contract marks as auto-fail.',
|
|
73
|
+
evidence: `Matched signals: ${[...(calibration.matchedGenericitySignals || []), ...(calibration.matchedForbiddenPatterns || [])].join(', ')}`,
|
|
74
|
+
requiredAction: 'Rebuild the affected UI surfaces from the contract and remove the named generic patterns instead of polishing them.',
|
|
75
|
+
blockingRecommended: true,
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
findings: updatedFindings,
|
|
81
|
+
notes: [
|
|
82
|
+
...(Array.isArray(notes) ? notes : []),
|
|
83
|
+
'reviewRubric.genericityAutoFail triggered because named genericity drift signals or forbidden patterns were detected.',
|
|
84
|
+
],
|
|
85
|
+
autoFailTriggered: true,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
36
89
|
async function main() {
|
|
37
90
|
const changedFiles = collectChangedFiles();
|
|
38
91
|
const changedUiFiles = changedFiles.filter(isUiRelevantFilePath);
|
|
@@ -100,6 +153,7 @@ async function main() {
|
|
|
100
153
|
driftCount: 0,
|
|
101
154
|
blockingCandidateCount: 0,
|
|
102
155
|
designExecutionSignalCount: designExecutionSummary.enabledCapabilities.length,
|
|
156
|
+
structuredInspectionAvailable: designExecutionSummary.structuredInspectionAvailable,
|
|
103
157
|
genericityStatus: calibration.calibratedStatus,
|
|
104
158
|
},
|
|
105
159
|
designExecution: designExecutionSummary,
|
|
@@ -154,6 +208,7 @@ async function main() {
|
|
|
154
208
|
driftCount: 0,
|
|
155
209
|
blockingCandidateCount: 0,
|
|
156
210
|
designExecutionSignalCount: designExecutionSummary.enabledCapabilities.length,
|
|
211
|
+
structuredInspectionAvailable: designExecutionSummary.structuredInspectionAvailable,
|
|
157
212
|
genericityStatus: calibration.calibratedStatus,
|
|
158
213
|
},
|
|
159
214
|
designExecution: designExecutionSummary,
|
|
@@ -188,7 +243,6 @@ async function main() {
|
|
|
188
243
|
const tasteVsFailureSeparated = typeof verdict?.tasteVsFailureSeparated === 'boolean'
|
|
189
244
|
? verdict.tasteVsFailureSeparated
|
|
190
245
|
: null;
|
|
191
|
-
const blockingCandidateCount = findings.filter((finding) => finding.blockingRecommended || finding.severity === 'high').length;
|
|
192
246
|
const alignmentScore = typeof verdict?.alignmentScore === 'number' ? verdict.alignmentScore : null;
|
|
193
247
|
const notes = Array.isArray(verdict?.notes)
|
|
194
248
|
? verdict.notes.map((note) => String(note))
|
|
@@ -202,6 +256,15 @@ async function main() {
|
|
|
202
256
|
notes,
|
|
203
257
|
tasteVsFailureSeparated,
|
|
204
258
|
});
|
|
259
|
+
const autoFailResolution = applyGenericityAutoFail({
|
|
260
|
+
reviewRubricSummary,
|
|
261
|
+
calibration,
|
|
262
|
+
findings,
|
|
263
|
+
notes,
|
|
264
|
+
});
|
|
265
|
+
const resolvedFindings = autoFailResolution.findings;
|
|
266
|
+
const resolvedNotes = autoFailResolution.notes;
|
|
267
|
+
const blockingCandidateCount = resolvedFindings.filter((finding) => finding.blockingRecommended || finding.severity === 'high').length;
|
|
205
268
|
|
|
206
269
|
emitMachineReadableReport(buildReport({
|
|
207
270
|
provider: selectedProvider.providerName,
|
|
@@ -211,9 +274,10 @@ async function main() {
|
|
|
211
274
|
summary: {
|
|
212
275
|
changedUiFileCount: changedUiFiles.length,
|
|
213
276
|
alignmentScore,
|
|
214
|
-
driftCount:
|
|
277
|
+
driftCount: resolvedFindings.length,
|
|
215
278
|
blockingCandidateCount,
|
|
216
279
|
designExecutionSignalCount: designExecutionSummary.enabledCapabilities.length,
|
|
280
|
+
structuredInspectionAvailable: designExecutionSummary.structuredInspectionAvailable,
|
|
217
281
|
genericityStatus: calibration.calibratedStatus,
|
|
218
282
|
},
|
|
219
283
|
designExecution: designExecutionSummary,
|
|
@@ -229,10 +293,10 @@ async function main() {
|
|
|
229
293
|
skipped: false,
|
|
230
294
|
skipReason: null,
|
|
231
295
|
},
|
|
232
|
-
findings,
|
|
296
|
+
findings: resolvedFindings,
|
|
233
297
|
notes: malformed
|
|
234
298
|
? ['LLM response was malformed. Advisory mode kept the audit non-blocking.', ...designExecutionSummary.notes]
|
|
235
|
-
: [...
|
|
299
|
+
: [...resolvedNotes, ...calibration.notes, ...designExecutionSummary.notes],
|
|
236
300
|
}));
|
|
237
301
|
}
|
|
238
302
|
|
|
@@ -84,18 +84,18 @@ export const REQUIRED_DEVELOPER_FIRST_MENTION_PATTERNS = [
|
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
path: '.agent-context/prompts/init-project.md',
|
|
87
|
-
label: 'Init prompt first mention includes
|
|
88
|
-
pattern: /
|
|
87
|
+
label: 'Init prompt first mention includes strict AI coding guidance context',
|
|
88
|
+
pattern: /strict AI coding guidance context/iu,
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
path: 'lib/cli/commands/init.mjs',
|
|
92
|
-
label: 'Init command wording includes
|
|
93
|
-
pattern: /
|
|
92
|
+
label: 'Init command wording includes project guidance pack',
|
|
93
|
+
pattern: /copy the project guidance pack[^\n]*compile a single rulebook/iu,
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
path: 'lib/cli/commands/upgrade.mjs',
|
|
97
|
-
label: 'Upgrade command wording includes
|
|
98
|
-
pattern: /
|
|
97
|
+
label: 'Upgrade command wording includes managed guidance upgrade',
|
|
98
|
+
pattern: /running managed guidance upgrade for an existing repository\./iu,
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
path: 'lib/cli/utils.mjs',
|
|
@@ -121,10 +121,9 @@ export const REQUIRED_COMPLIANCE_CANONICAL_SNIPPETS = [
|
|
|
121
121
|
];
|
|
122
122
|
export const REQUIRED_DETECTION_TRANSPARENCY_SNIPPETS = [
|
|
123
123
|
{
|
|
124
|
-
path: 'lib/cli/
|
|
124
|
+
path: 'lib/cli/init-detection-flow.mjs',
|
|
125
125
|
snippets: [
|
|
126
|
-
'
|
|
127
|
-
'Use detected setup for this existing project?',
|
|
126
|
+
'existing-project-evidence-only',
|
|
128
127
|
'detectionTransparency',
|
|
129
128
|
],
|
|
130
129
|
},
|
|
@@ -144,20 +143,38 @@ export const REQUIRED_DETECTION_TRANSPARENCY_SNIPPETS = [
|
|
|
144
143
|
],
|
|
145
144
|
},
|
|
146
145
|
];
|
|
147
|
-
export const
|
|
146
|
+
export const REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS = [
|
|
147
|
+
{
|
|
148
|
+
path: '.instructions.md',
|
|
149
|
+
snippets: [
|
|
150
|
+
'Do not silently choose frameworks or architecture from offline heuristics.',
|
|
151
|
+
'produce a short recommendation from evidence and live official documentation before coding',
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
path: '.agent-context/prompts/init-project.md',
|
|
156
|
+
snippets: [
|
|
157
|
+
'If the user already named a stack or framework, treat it as an explicit constraint.',
|
|
158
|
+
'produce a short evidence-backed recommendation from the brief, repo evidence, and live official documentation before coding',
|
|
159
|
+
],
|
|
160
|
+
},
|
|
148
161
|
{
|
|
149
|
-
path: '
|
|
162
|
+
path: '.agent-context/rules/architecture.md',
|
|
150
163
|
snippets: [
|
|
151
|
-
'
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
164
|
+
'Do not force a default architecture label before the repo, delivery model, and boundary evidence are clear.',
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
path: '.agent-context/rules/microservices.md',
|
|
169
|
+
snippets: [
|
|
170
|
+
'Do not start with microservices by fashion, fear, or habit.',
|
|
155
171
|
],
|
|
156
172
|
},
|
|
157
173
|
{
|
|
158
174
|
path: 'lib/cli/commands/init.mjs',
|
|
159
175
|
snippets: [
|
|
160
|
-
'
|
|
176
|
+
'AGENT_DECISION_STACK_FILE_NAME',
|
|
177
|
+
'agent recommendation required from current repo/brief evidence',
|
|
161
178
|
],
|
|
162
179
|
},
|
|
163
180
|
];
|
|
@@ -254,12 +271,13 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
254
271
|
{
|
|
255
272
|
path: '.instructions.md',
|
|
256
273
|
snippets: [
|
|
274
|
+
'Resolve the smallest relevant layer set for the current request.',
|
|
257
275
|
'UI Design Mode',
|
|
258
276
|
'bootstrap-design.md',
|
|
259
277
|
'frontend-architecture.md',
|
|
260
278
|
'do not eagerly load unrelated backend-only rules',
|
|
261
279
|
'valid style context',
|
|
262
|
-
'
|
|
280
|
+
'External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted',
|
|
263
281
|
'WCAG 2.2 AA as the hard compliance floor',
|
|
264
282
|
'APCA as advisory perceptual tuning only',
|
|
265
283
|
],
|
|
@@ -267,39 +285,30 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
267
285
|
{
|
|
268
286
|
path: '.agent-context/prompts/bootstrap-design.md',
|
|
269
287
|
snippets: [
|
|
270
|
-
'
|
|
288
|
+
'This contract is a decision scaffold, not a style preset.',
|
|
289
|
+
'We guide the agent; we do not pick the final style',
|
|
271
290
|
'Token Architecture and Alias Strategy',
|
|
272
|
-
'`tokenSystem`',
|
|
273
291
|
'`repoEvidence.designEvidenceSummary`',
|
|
274
|
-
'Responsive
|
|
275
|
-
'
|
|
276
|
-
'
|
|
277
|
-
'
|
|
278
|
-
'
|
|
279
|
-
'
|
|
280
|
-
'
|
|
281
|
-
'
|
|
282
|
-
'
|
|
283
|
-
'
|
|
284
|
-
'
|
|
285
|
-
'If no approved reference system exists, synthesize the design from zero using current product context, constraints, and content only.',
|
|
286
|
-
'Design continuity is opt-in.',
|
|
287
|
-
'WCAG 2.2 AA as the blocking baseline',
|
|
288
|
-
'APCA only as advisory perceptual tuning',
|
|
289
|
-
'Structured design execution must stay representation-first',
|
|
290
|
-
'structured handoff',
|
|
291
|
-
'surface plan',
|
|
292
|
-
'component graph',
|
|
293
|
-
'stable review rubric',
|
|
294
|
-
'Genericity findings must name the actual drift signal',
|
|
292
|
+
'Responsive Recomposition Plan',
|
|
293
|
+
'source of truth',
|
|
294
|
+
'research current official docs',
|
|
295
|
+
'Responsive design means recomposition, not resizing.',
|
|
296
|
+
'agent-chosen visual direction',
|
|
297
|
+
'viewport mutation rules',
|
|
298
|
+
'WCAG 2.2 AA is the hard floor',
|
|
299
|
+
'APCA may be used only as advisory perceptual tuning',
|
|
300
|
+
'unresearched dependency choices',
|
|
301
|
+
'default component-kit styling without product rationale',
|
|
302
|
+
'genericity findings that cannot name the exact drift signal',
|
|
295
303
|
],
|
|
296
304
|
},
|
|
297
305
|
{
|
|
298
306
|
path: 'scripts/ui-design-judge.mjs',
|
|
299
307
|
snippets: [
|
|
300
|
-
'Advisory-
|
|
308
|
+
'Advisory-default UI design contract judge.',
|
|
301
309
|
'Repo-internal workflow audit; no user-facing runtime modes.',
|
|
302
|
-
'
|
|
310
|
+
'genericityAutoFail',
|
|
311
|
+
'blocking required actions',
|
|
303
312
|
'Do not reward generic SaaS defaults or popular template patterns.',
|
|
304
313
|
'UI design judge only evaluates changed UI surfaces.',
|
|
305
314
|
'Structured design execution summary was supplied to semantic review.',
|
|
@@ -309,7 +318,9 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
309
318
|
'reviewRubric',
|
|
310
319
|
'genericityStatus',
|
|
311
320
|
'handoffReady',
|
|
321
|
+
'structuredInspectionAvailable',
|
|
312
322
|
'calibratedStatus',
|
|
323
|
+
'applyGenericityAutoFail',
|
|
313
324
|
],
|
|
314
325
|
},
|
|
315
326
|
{
|
|
@@ -317,6 +328,7 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
317
328
|
snippets: [
|
|
318
329
|
'ui-rubric-calibration-v1',
|
|
319
330
|
'matchedGenericitySignals',
|
|
331
|
+
'matchedForbiddenPatterns',
|
|
320
332
|
'matchedValidBoldSignals',
|
|
321
333
|
'contractDriftDetected',
|
|
322
334
|
'Genericity claim was not backed by any named drift signal.',
|
|
@@ -346,6 +358,8 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
346
358
|
'accessibilityPolicy',
|
|
347
359
|
'designExecutionPolicy',
|
|
348
360
|
'seedRefinementRequiredBeforeUiImplementation',
|
|
361
|
+
'requirePerSurfaceMutationOps',
|
|
362
|
+
'forbidUniformSiblingSurfaceTreatment',
|
|
349
363
|
'requireStructuredHandoff',
|
|
350
364
|
'handoffFormatVersion',
|
|
351
365
|
'designExecutionHandoff',
|
|
@@ -368,16 +382,21 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
368
382
|
'signatureMoveRationale',
|
|
369
383
|
'implementationGuardrails',
|
|
370
384
|
'reviewRubric',
|
|
385
|
+
'genericityAutoFail',
|
|
371
386
|
'genericitySignals',
|
|
372
387
|
'validBoldSignals',
|
|
373
388
|
'mustExplainGenericity',
|
|
374
389
|
'mustSeparateTasteFromFailure',
|
|
390
|
+
'offline-prescribed-style-used-as-final-direction',
|
|
391
|
+
'unresearched-library-or-framework-choice',
|
|
392
|
+
'single-safe-typographic-family-without-role-contrast-or-rationale',
|
|
375
393
|
'hardComplianceFloor',
|
|
376
394
|
'advisoryContrastModel',
|
|
377
395
|
'contextHygiene',
|
|
378
396
|
'repoEvidenceOverridesMemory',
|
|
379
397
|
'requireExplicitContinuityApproval',
|
|
380
398
|
'forbidCarryoverWhenUnapproved',
|
|
399
|
+
'approvedExternalConstraintUsage',
|
|
381
400
|
'requireViewportMutationRules',
|
|
382
401
|
'allowHexDerivatives',
|
|
383
402
|
],
|
|
@@ -398,15 +417,21 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
398
417
|
'arbitraryBreakpointCount',
|
|
399
418
|
'cssVariables',
|
|
400
419
|
'componentInventory',
|
|
420
|
+
'structuredInspection',
|
|
421
|
+
'classAttributeCount',
|
|
422
|
+
'inlineStyleObjectCount',
|
|
401
423
|
'tokenBypassSignals',
|
|
402
424
|
],
|
|
403
425
|
},
|
|
404
426
|
{
|
|
405
427
|
path: 'lib/cli/compiler.mjs',
|
|
406
428
|
snippets: [
|
|
429
|
+
'Resolve the smallest relevant layer set before responding.',
|
|
430
|
+
'LAYER 1: RULES (SCOPE-RESOLVED)',
|
|
407
431
|
'LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS',
|
|
408
432
|
'bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign',
|
|
409
433
|
'Keep UI-only requests context-isolated',
|
|
434
|
+
'git-workflow.md',
|
|
410
435
|
'designEvidenceSummary',
|
|
411
436
|
],
|
|
412
437
|
},
|
|
@@ -426,9 +451,9 @@ export const REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS = [
|
|
|
426
451
|
'Docker Compose Quickstart',
|
|
427
452
|
'Compose file reference',
|
|
428
453
|
'Dockerfile best practices',
|
|
429
|
-
'
|
|
454
|
+
'Use current `docker compose` workflows and `compose.yaml`.',
|
|
430
455
|
'Do not add the top-level Compose `version` field by default.',
|
|
431
|
-
'
|
|
456
|
+
'Use the latest stable compatible Docker base image',
|
|
432
457
|
],
|
|
433
458
|
},
|
|
434
459
|
{
|
|
@@ -443,7 +468,7 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
|
|
|
443
468
|
{
|
|
444
469
|
path: '.instructions.md',
|
|
445
470
|
snippets: [
|
|
446
|
-
'
|
|
471
|
+
'use the latest stable compatible dependency set and official setup flow',
|
|
447
472
|
],
|
|
448
473
|
},
|
|
449
474
|
{
|
|
@@ -458,8 +483,8 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
|
|
|
458
483
|
{
|
|
459
484
|
path: '.agent-context/prompts/init-project.md',
|
|
460
485
|
snippets: [
|
|
461
|
-
'latest stable compatible dependency set and official framework setup flow
|
|
462
|
-
'
|
|
486
|
+
'recommend the latest stable compatible dependency set and official framework setup flow from live official documentation before coding',
|
|
487
|
+
'Use official framework setup commands or canonical starter flows',
|
|
463
488
|
],
|
|
464
489
|
},
|
|
465
490
|
];
|
|
@@ -471,13 +496,78 @@ export const FORBIDDEN_TEMPLATE_BOOTSTRAP_SNIPPETS = [
|
|
|
471
496
|
],
|
|
472
497
|
},
|
|
473
498
|
];
|
|
499
|
+
export const FORBIDDEN_ACTIVE_BIAS_ANCHOR_SNIPPETS = [
|
|
500
|
+
{
|
|
501
|
+
path: '.instructions.md',
|
|
502
|
+
snippets: [
|
|
503
|
+
'illustrative, not exhaustive',
|
|
504
|
+
'explicitly approved reference systems',
|
|
505
|
+
'Do not auto-recommend frameworks',
|
|
506
|
+
'prefer the latest stable compatible dependency set',
|
|
507
|
+
],
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
path: '.agent-context/prompts/bootstrap-design.md',
|
|
511
|
+
snippets: [
|
|
512
|
+
'stylistic inspiration',
|
|
513
|
+
'famous brand reference',
|
|
514
|
+
'If no approved reference system exists',
|
|
515
|
+
'explicitly approved reference systems',
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
path: '.agent-context/prompts/init-project.md',
|
|
520
|
+
snippets: [
|
|
521
|
+
'Compact User Prompt Patterns',
|
|
522
|
+
'latest stable compatible dependency set and official framework setup flow first',
|
|
523
|
+
'Prefer official framework setup commands',
|
|
524
|
+
'ask for confirmation instead of silently choosing a stack',
|
|
525
|
+
],
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
path: 'lib/cli/project-scaffolder/design-contract.mjs',
|
|
529
|
+
snippets: [
|
|
530
|
+
'explicitly-approved-reference-systems',
|
|
531
|
+
'approvedReferenceUsage',
|
|
532
|
+
],
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
path: 'lib/cli/constants.mjs',
|
|
536
|
+
snippets: [
|
|
537
|
+
'BLUEPRINT_RECOMMENDATIONS',
|
|
538
|
+
`java-${'enter'}${'prise'}-api`,
|
|
539
|
+
`dotnet-${'enter'}${'prise'}-api`,
|
|
540
|
+
],
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
path: 'lib/cli/init-detection-flow.mjs',
|
|
544
|
+
snippets: [
|
|
545
|
+
`Using detected ${'stack'} automatically`,
|
|
546
|
+
`Use detected ${'setup'} for this existing project?`,
|
|
547
|
+
'Override detected stack',
|
|
548
|
+
],
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
path: 'scripts/ui-design-judge/prompting.mjs',
|
|
552
|
+
snippets: [
|
|
553
|
+
'"recommendation": string',
|
|
554
|
+
],
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
path: 'scripts/documentation-boundary-audit.mjs',
|
|
558
|
+
snippets: [
|
|
559
|
+
'suggestedActions',
|
|
560
|
+
'suggestedDocumentationUpdates',
|
|
561
|
+
],
|
|
562
|
+
},
|
|
563
|
+
];
|
|
474
564
|
export const REQUIRED_DETERMINISTIC_BOUNDARY_ENFORCEMENT_SNIPPETS = [
|
|
475
565
|
{
|
|
476
566
|
path: 'scripts/documentation-boundary-audit.mjs',
|
|
477
567
|
snippets: [
|
|
478
568
|
'reportVersion',
|
|
479
569
|
'violations',
|
|
480
|
-
'
|
|
570
|
+
'requiredActions',
|
|
481
571
|
'diagnosticCode',
|
|
482
572
|
'autoDocsSyncScope',
|
|
483
573
|
'rolloutMetrics',
|