@ryuenn3123/agentic-senior-core 3.0.14 → 3.0.16
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 +30 -16
- package/.agent-context/prompts/init-project.md +4 -0
- package/.agent-context/rules/architecture.md +13 -0
- package/.agent-context/rules/docker-runtime.md +12 -0
- package/.agent-context/rules/efficiency-vs-hype.md +17 -6
- package/.agent-context/rules/frontend-architecture.md +5 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.agent-context/state/onboarding-report.json +0 -1
- package/.cursorrules +66 -29
- package/.gemini/instructions.md +1 -1
- package/.github/copilot-instructions.md +1 -1
- package/.instructions.md +4 -3
- package/.windsurfrules +66 -29
- package/AGENTS.md +1 -1
- package/lib/cli/architect.mjs +71 -784
- package/lib/cli/commands/init.mjs +32 -98
- package/lib/cli/commands/optimize.mjs +0 -4
- package/lib/cli/commands/upgrade.mjs +2 -5
- package/lib/cli/compiler.mjs +3 -11
- package/lib/cli/constants.mjs +3 -73
- package/lib/cli/detector/design-evidence.mjs +427 -0
- package/lib/cli/detector.mjs +13 -116
- package/lib/cli/init-options.mjs +0 -118
- package/lib/cli/project-scaffolder/constants.mjs +67 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +554 -0
- package/lib/cli/project-scaffolder/discovery.mjs +315 -0
- package/lib/cli/project-scaffolder/prompt-builders.mjs +196 -0
- package/lib/cli/project-scaffolder/storage.mjs +154 -0
- package/lib/cli/project-scaffolder.mjs +32 -1160
- package/lib/cli/utils.mjs +2 -11
- package/package.json +1 -1
- package/scripts/frontend-usability-audit.mjs +53 -0
- package/scripts/validate/config.mjs +401 -0
- package/scripts/validate/coverage-checks.mjs +429 -0
- package/scripts/validate.mjs +44 -754
- package/lib/cli/init-architecture-flow.mjs +0 -233
- package/lib/cli/profile-packs.mjs +0 -108
package/lib/cli/utils.mjs
CHANGED
|
@@ -28,7 +28,7 @@ export function printUsage() {
|
|
|
28
28
|
console.log('');
|
|
29
29
|
console.log('Usage:');
|
|
30
30
|
console.log(' agentic-senior-core launch');
|
|
31
|
-
console.log(' agentic-senior-core init [target-directory] [--preset <name>] [--
|
|
31
|
+
console.log(' agentic-senior-core init [target-directory] [--preset <name>] [--stack <name>] [--blueprint <name>] [--project-description <text>] [--ci <true|false>] [--token-optimize] [--no-token-optimize] [--token-agent <name>] [--memory-continuity] [--no-memory-continuity] [--scaffold-docs] [--no-scaffold-docs] [--docs-lang <en|id>] [--project-config <path>] [--runtime-env <auto|linux-wsl|linux|windows|macos>]');
|
|
32
32
|
console.log(' agentic-senior-core upgrade [target-directory] [--dry-run] [--yes] [--mcp-template] [--no-mcp-template] [--prune] [--no-prune]');
|
|
33
33
|
console.log(' agentic-senior-core optimize [target-directory] [--agent <copilot|claude|cursor|windsurf|gemini|codex|cline>] [--enable|--disable] [--show]');
|
|
34
34
|
console.log(' agentic-senior-core mcp');
|
|
@@ -38,19 +38,10 @@ export function printUsage() {
|
|
|
38
38
|
console.log('Options:');
|
|
39
39
|
console.log(' --help Show help');
|
|
40
40
|
console.log(' --version Show CLI version');
|
|
41
|
-
console.log(' --profile Legacy override for beginner, balanced, or strict (default init path is Golden Standard)');
|
|
42
41
|
console.log(` --preset Use a plug-and-play starter preset (${presetNames})`);
|
|
43
|
-
console.log(' --profile-pack Apply a team profile pack (startup, regulated, platform)');
|
|
44
|
-
console.log(' --newbie Legacy alias for --profile beginner');
|
|
45
42
|
console.log(' --stack Override stack selection');
|
|
46
43
|
console.log(' --blueprint Override blueprint selection');
|
|
47
|
-
console.log(' --project-description
|
|
48
|
-
console.log(' --architect-token-budget Max token estimate used by recommendation research (default: 900)');
|
|
49
|
-
console.log(' --architect-timeout-ms Max recommendation research time in milliseconds (default: 1500)');
|
|
50
|
-
console.log(' --architect-research-mode Recommendation evidence mode (snapshot or realtime; default: realtime in init)');
|
|
51
|
-
console.log(' --enable-realtime-research Allow trusted realtime evidence ingestion (enabled by default in init)');
|
|
52
|
-
console.log(' --disable-realtime-research Force deterministic snapshot-only baseline in init');
|
|
53
|
-
console.log(' --architect-realtime-signal-file Optional JSON payload path for trusted realtime stack/design signals');
|
|
44
|
+
console.log(' --project-description Project intent text used to build an offline architecture brief before agent-led live research');
|
|
54
45
|
console.log(' --ci Override CI/CD quality checks (guardrails) (true|false)');
|
|
55
46
|
console.log(' --token-optimize Explicitly enable token optimization policy during init (default behavior)');
|
|
56
47
|
console.log(' --token-agent Set token optimization agent target (copilot, claude, cursor, windsurf, gemini, codex, cline)');
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ const REQUIRED_FILES = [
|
|
|
26
26
|
'.agent-context/rules/frontend-architecture.md',
|
|
27
27
|
'.agent-context/review-checklists/pr-checklist.md',
|
|
28
28
|
'.agent-context/review-checklists/architecture-review.md',
|
|
29
|
+
'lib/cli/detector/design-evidence.mjs',
|
|
29
30
|
];
|
|
30
31
|
|
|
31
32
|
const REQUIRED_ROADMAP_SNIPPETS = [
|
|
@@ -62,6 +63,8 @@ const REQUIRED_FRONTEND_RULE_SNIPPETS = [
|
|
|
62
63
|
const REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS = [
|
|
63
64
|
'UI Design Mode is context-isolated by default:',
|
|
64
65
|
'Responsive Strategy and Cross-Viewport Adaptation Matrix',
|
|
66
|
+
'Token Architecture and Alias Strategy',
|
|
67
|
+
'tokenSystem',
|
|
65
68
|
'colorTruth.format',
|
|
66
69
|
'crossViewportAdaptation.mutationRules.mobile/tablet/desktop',
|
|
67
70
|
'motionSystem',
|
|
@@ -83,6 +86,19 @@ const REQUIRED_INSTRUCTIONS_SNIPPETS = [
|
|
|
83
86
|
'do not eagerly load unrelated backend-only rules',
|
|
84
87
|
];
|
|
85
88
|
|
|
89
|
+
const REQUIRED_DESIGN_EVIDENCE_SNIPPETS = [
|
|
90
|
+
'summaryVersion',
|
|
91
|
+
"source: 'lightweight-static-scan'",
|
|
92
|
+
'cssVariables',
|
|
93
|
+
'componentInventory',
|
|
94
|
+
'tokenBypassSignals',
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
const REQUIRED_COMPILER_UI_EVIDENCE_SNIPPETS = [
|
|
98
|
+
'frontendEvidenceMetrics',
|
|
99
|
+
'designEvidenceSummary',
|
|
100
|
+
];
|
|
101
|
+
|
|
86
102
|
function assertFileExists(relativeFilePath, failures) {
|
|
87
103
|
const absoluteFilePath = resolve(REPOSITORY_ROOT, relativeFilePath);
|
|
88
104
|
if (!existsSync(absoluteFilePath)) {
|
|
@@ -111,6 +127,8 @@ function runAudit() {
|
|
|
111
127
|
const instructionsPath = '.instructions.md';
|
|
112
128
|
const prChecklistPath = '.agent-context/review-checklists/pr-checklist.md';
|
|
113
129
|
const architectureChecklistPath = '.agent-context/review-checklists/architecture-review.md';
|
|
130
|
+
const designEvidenceExtractorPath = 'lib/cli/detector/design-evidence.mjs';
|
|
131
|
+
const compilerPath = 'lib/cli/compiler.mjs';
|
|
114
132
|
|
|
115
133
|
if (existsSync(resolve(REPOSITORY_ROOT, roadmapPath))) {
|
|
116
134
|
const roadmapContent = readFileSync(resolve(REPOSITORY_ROOT, roadmapPath), 'utf8');
|
|
@@ -165,12 +183,47 @@ function runAudit() {
|
|
|
165
183
|
);
|
|
166
184
|
}
|
|
167
185
|
|
|
186
|
+
let designEvidenceExtractorContent = '';
|
|
187
|
+
let compilerContent = '';
|
|
188
|
+
|
|
189
|
+
if (existsSync(resolve(REPOSITORY_ROOT, designEvidenceExtractorPath))) {
|
|
190
|
+
designEvidenceExtractorContent = readFileSync(resolve(REPOSITORY_ROOT, designEvidenceExtractorPath), 'utf8');
|
|
191
|
+
assertContains(
|
|
192
|
+
'Design evidence extractor',
|
|
193
|
+
designEvidenceExtractorPath,
|
|
194
|
+
designEvidenceExtractorContent,
|
|
195
|
+
REQUIRED_DESIGN_EVIDENCE_SNIPPETS,
|
|
196
|
+
failures
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (existsSync(resolve(REPOSITORY_ROOT, compilerPath))) {
|
|
201
|
+
compilerContent = readFileSync(resolve(REPOSITORY_ROOT, compilerPath), 'utf8');
|
|
202
|
+
assertContains(
|
|
203
|
+
'Compiler UI evidence projection',
|
|
204
|
+
compilerPath,
|
|
205
|
+
compilerContent,
|
|
206
|
+
REQUIRED_COMPILER_UI_EVIDENCE_SNIPPETS,
|
|
207
|
+
failures
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
168
211
|
const reportPayload = {
|
|
169
212
|
generatedAt: new Date().toISOString(),
|
|
170
213
|
auditName: 'frontend-usability-audit',
|
|
171
214
|
passed: failures.length === 0,
|
|
172
215
|
failureCount: failures.length,
|
|
173
216
|
failures,
|
|
217
|
+
phase2DesignEvidenceCoverage: {
|
|
218
|
+
extractorFilePath: designEvidenceExtractorPath,
|
|
219
|
+
compilerFilePath: compilerPath,
|
|
220
|
+
extractorIncludesSummaryVersion: designEvidenceExtractorContent.includes('summaryVersion'),
|
|
221
|
+
extractorIncludesCssVariables: designEvidenceExtractorContent.includes('cssVariables'),
|
|
222
|
+
extractorIncludesComponentInventory: designEvidenceExtractorContent.includes('componentInventory'),
|
|
223
|
+
extractorIncludesTokenBypassSignals: designEvidenceExtractorContent.includes('tokenBypassSignals'),
|
|
224
|
+
compilerProjectsFrontendEvidenceMetrics: compilerContent.includes('frontendEvidenceMetrics'),
|
|
225
|
+
compilerProjectsDesignEvidenceSummary: compilerContent.includes('designEvidenceSummary'),
|
|
226
|
+
},
|
|
174
227
|
};
|
|
175
228
|
|
|
176
229
|
console.log(JSON.stringify(reportPayload, null, 2));
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
export const ALLOWED_SEVERITIES = new Set(['critical', 'high', 'medium', 'low']);
|
|
2
|
+
export const OVERRIDE_WARNING_WINDOW_DAYS = 30;
|
|
3
|
+
export const THIN_ADAPTER_PATHS = [
|
|
4
|
+
'AGENTS.md',
|
|
5
|
+
'.github/copilot-instructions.md',
|
|
6
|
+
'.gemini/instructions.md',
|
|
7
|
+
];
|
|
8
|
+
export const FORMAL_ARTIFACT_PATHS = [
|
|
9
|
+
'.instructions.md',
|
|
10
|
+
'README.md',
|
|
11
|
+
'CHANGELOG.md',
|
|
12
|
+
'docs/deep_analysis_and_roadmap_backlog.md',
|
|
13
|
+
'.agent-context/rules/api-docs.md',
|
|
14
|
+
'.agent-context/review-checklists/pr-checklist.md',
|
|
15
|
+
'.agent-context/prompts/review-code.md',
|
|
16
|
+
'AGENTS.md',
|
|
17
|
+
'.github/copilot-instructions.md',
|
|
18
|
+
'.gemini/instructions.md',
|
|
19
|
+
];
|
|
20
|
+
export const REQUIRED_HUMAN_WRITING_SNIPPETS = [
|
|
21
|
+
{
|
|
22
|
+
path: '.agent-context/rules/api-docs.md',
|
|
23
|
+
snippets: [
|
|
24
|
+
'## Human Writing Standard (Mandatory)',
|
|
25
|
+
'This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations.',
|
|
26
|
+
'Style baseline findings are advisory by default and must not block endpoint-change commits that already include accurate docs/spec updates.',
|
|
27
|
+
'No emoji in formal artifacts.',
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: '.agent-context/review-checklists/pr-checklist.md',
|
|
32
|
+
snippets: [
|
|
33
|
+
'Scope applied: This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations',
|
|
34
|
+
'Style scope review is advisory and does not block merge when API docs are synced in the same commit and contract details are correct',
|
|
35
|
+
'No emoji in formal documentation or review summaries',
|
|
36
|
+
'Documentation uses plain English and avoids AI cliches',
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
path: 'docs/deep_analysis_and_roadmap_backlog.md',
|
|
41
|
+
snippets: [
|
|
42
|
+
'## Part 6: Documentation and Explanation Standards (Mandatory)',
|
|
43
|
+
'This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations.',
|
|
44
|
+
'No emoji in formal artifacts. This is mandatory.',
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
export const TERMINOLOGY_REFERENCE_PATHS = [
|
|
49
|
+
'README.md',
|
|
50
|
+
'docs/roadmap.md',
|
|
51
|
+
];
|
|
52
|
+
export const REQUIRED_TERMINOLOGY_ROW_PATTERNS = [
|
|
53
|
+
{
|
|
54
|
+
label: 'Federated Governance -> Federated Rules Operations',
|
|
55
|
+
pattern: /\|\s*Federated Governance\s*\|\s*Federated Rules Operations\s*\|/u,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Governance Engine -> Rules Engine',
|
|
59
|
+
pattern: /\|\s*Governance Engine\s*\|\s*Rules Engine\s*\|/u,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Guardrails -> Quality Checks',
|
|
63
|
+
pattern: /\|\s*Guardrails\s*\|\s*Quality Checks\s*\|/u,
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
export const REQUIRED_TERMINOLOGY_RULE_SNIPPET =
|
|
67
|
+
'Rule: on first mention in developer-facing docs, include canonical term in parentheses.';
|
|
68
|
+
export const TERMINOLOGY_REFERENCE_DOCUMENT_PATH = 'docs/terminology-mapping.md';
|
|
69
|
+
export const REQUIRED_DEVELOPER_FIRST_MENTION_PATTERNS = [
|
|
70
|
+
{
|
|
71
|
+
path: 'README.md',
|
|
72
|
+
label: 'Rules Engine first mention includes Governance Engine',
|
|
73
|
+
pattern: /Rules Engine\s*\(Governance Engine\)/u,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
path: 'docs/deep-dive.md',
|
|
77
|
+
label: 'Dynamic Rules Engine first mention includes Governance Engine',
|
|
78
|
+
pattern: /Dynamic Rules Engine\s*\(Governance Engine\)/u,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: 'docs/faq.md',
|
|
82
|
+
label: 'Quality Checks first mention includes Guardrails',
|
|
83
|
+
pattern: /Quality Checks\s*\(Guardrails\)/u,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
path: '.agent-context/prompts/init-project.md',
|
|
87
|
+
label: 'Init prompt first mention includes Federated Governance baseline',
|
|
88
|
+
pattern: /rules operations context\s*\(Federated Governance baseline\)/iu,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: 'lib/cli/commands/init.mjs',
|
|
92
|
+
label: 'Init command wording includes Federated Governance baseline',
|
|
93
|
+
pattern: /rules operations\s+(assets|pack)[^\n]*\(Federated Governance baseline\)/iu,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
path: 'lib/cli/commands/upgrade.mjs',
|
|
97
|
+
label: 'Upgrade command wording includes Federated Governance baseline',
|
|
98
|
+
pattern: /rules operations upgrade assistant\s*\(Federated Governance baseline\)/iu,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: 'lib/cli/utils.mjs',
|
|
102
|
+
label: 'CLI help wording includes quality checks and guardrails',
|
|
103
|
+
pattern: /quality checks\s*\(guardrails\)/iu,
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
export const COMPLIANCE_TERMINOLOGY_BOUNDARY_PATHS = [
|
|
107
|
+
'.agent-context/review-checklists/pr-checklist.md',
|
|
108
|
+
'.agent-context/review-checklists/architecture-review.md',
|
|
109
|
+
'scripts/release-gate.mjs',
|
|
110
|
+
'scripts/forbidden-content-check.mjs',
|
|
111
|
+
];
|
|
112
|
+
export const COMPLIANCE_ALIAS_TERMS = [
|
|
113
|
+
'Federated Rules Operations',
|
|
114
|
+
];
|
|
115
|
+
export const REQUIRED_COMPLIANCE_CANONICAL_SNIPPETS = [
|
|
116
|
+
{
|
|
117
|
+
path: '.agent-context/review-checklists/pr-checklist.md',
|
|
118
|
+
snippet: '### 15. Universal SOP Consolidation',
|
|
119
|
+
label: 'PR checklist keeps consolidated Universal SOP section',
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
export const REQUIRED_DETECTION_TRANSPARENCY_SNIPPETS = [
|
|
123
|
+
{
|
|
124
|
+
path: 'lib/cli/commands/init.mjs',
|
|
125
|
+
snippets: [
|
|
126
|
+
'Existing project detection transparency:',
|
|
127
|
+
'Use detected setup for this existing project?',
|
|
128
|
+
'detectionTransparency',
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
path: 'lib/cli/commands/upgrade.mjs',
|
|
133
|
+
snippets: [
|
|
134
|
+
'Existing project detection transparency:',
|
|
135
|
+
'formatDetectionCandidates(projectDetection.rankedCandidates)',
|
|
136
|
+
'detectionTransparency',
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
path: 'lib/cli/compiler.mjs',
|
|
141
|
+
snippets: [
|
|
142
|
+
'detectionTransparency = null',
|
|
143
|
+
'detectionTransparency: detectionTransparency || null',
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
];
|
|
147
|
+
export const REQUIRED_STACK_RESEARCH_ENGINE_SNIPPETS = [
|
|
148
|
+
{
|
|
149
|
+
path: 'lib/cli/architect.mjs',
|
|
150
|
+
snippets: [
|
|
151
|
+
'STACK_SIGNAL_WEIGHTS',
|
|
152
|
+
'briefType',
|
|
153
|
+
'recommendArchitecture',
|
|
154
|
+
'formatArchitectureRecommendation',
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
path: 'lib/cli/commands/init.mjs',
|
|
159
|
+
snippets: [
|
|
160
|
+
'recommendArchitecture',
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
export const REQUIRED_UNIVERSAL_SOP_SNIPPETS = [
|
|
165
|
+
{
|
|
166
|
+
path: '.agent-context/rules/architecture.md',
|
|
167
|
+
snippets: [
|
|
168
|
+
'## Universal SOP Baseline (Mandatory)',
|
|
169
|
+
'Security and testing are non-negotiable baseline requirements.',
|
|
170
|
+
'If required project context docs are missing, stop implementation and bootstrap docs before writing application code.',
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
path: '.agent-context/review-checklists/pr-checklist.md',
|
|
175
|
+
snippets: [
|
|
176
|
+
'### 15. Universal SOP Consolidation',
|
|
177
|
+
'Coding flow is blocked if `docs/architecture-decision-record.md` (or `docs/Architecture-Decision-Record.md`) is missing',
|
|
178
|
+
'UI implementation flow is blocked if `docs/DESIGN.md` or `docs/design-intent.json` is missing',
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
path: '.agent-context/prompts/review-code.md',
|
|
183
|
+
snippets: [
|
|
184
|
+
'Enforce Universal SOP hard gate: block coding flow when required project docs are missing (`docs/architecture-decision-record.md`, and for UI scope `docs/DESIGN.md` plus `docs/design-intent.json`).',
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
path: '.agent-context/prompts/refactor.md',
|
|
189
|
+
snippets: [
|
|
190
|
+
'6. Enforce Universal SOP hard gate: stop implementation if `docs/architecture-decision-record.md` is missing, and for UI scope stop if `docs/DESIGN.md` or `docs/design-intent.json` is missing.',
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
path: 'lib/cli/compiler.mjs',
|
|
195
|
+
snippets: [
|
|
196
|
+
'Universal SOP hard block policy:',
|
|
197
|
+
'Hard block: do not write application code until docs/project-brief.md and docs/architecture-decision-record.md exist.',
|
|
198
|
+
'For UI scope: if docs/DESIGN.md or docs/design-intent.json is missing, execute bootstrap-design prompt before implementing UI surfaces.',
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
export const REQUIRED_TEMPLATE_FREE_BOOTSTRAP_SNIPPETS = [
|
|
203
|
+
{
|
|
204
|
+
path: 'lib/cli/project-scaffolder/storage.mjs',
|
|
205
|
+
snippets: [
|
|
206
|
+
'generateProjectDocumentation',
|
|
207
|
+
"bootstrapMode: 'ai-synthesis'",
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
path: 'lib/cli/project-scaffolder/prompt-builders.mjs',
|
|
212
|
+
snippets: [
|
|
213
|
+
'Write project context docs from scratch (no template rendering, no placeholder boilerplate).',
|
|
214
|
+
'For any ecosystem or technology claim, perform live web research and include citation metadata (source + fetchedAt timestamp) rather than relying on offline heuristics.',
|
|
215
|
+
],
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
path: 'lib/cli/commands/init.mjs',
|
|
219
|
+
snippets: [
|
|
220
|
+
'Project docs will be authored dynamically by your IDE assistant from these prompts.',
|
|
221
|
+
'bootstrap-project-context.md',
|
|
222
|
+
'Seed docs:',
|
|
223
|
+
'I prepared dynamic synthesis bootstrap prompts',
|
|
224
|
+
],
|
|
225
|
+
},
|
|
226
|
+
];
|
|
227
|
+
export const REQUIRED_UPGRADE_UI_CONTRACT_WARNING_SNIPPETS = [
|
|
228
|
+
{
|
|
229
|
+
path: 'lib/cli/commands/upgrade.mjs',
|
|
230
|
+
snippets: [
|
|
231
|
+
'UI/frontend scope was detected, but the dynamic design contract is incomplete:',
|
|
232
|
+
'docs/design-intent.json',
|
|
233
|
+
'Planned seed on apply: docs/design-intent.json',
|
|
234
|
+
'Upgrade synchronizes governance assets and can seed docs/design-intent.json, but it does not author project-specific docs/DESIGN.md automatically.',
|
|
235
|
+
'detectUiScopeSignals',
|
|
236
|
+
'seed-generated-during-upgrade',
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
];
|
|
240
|
+
export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
241
|
+
{
|
|
242
|
+
path: '.instructions.md',
|
|
243
|
+
snippets: [
|
|
244
|
+
'UI Design Mode',
|
|
245
|
+
'bootstrap-design.md',
|
|
246
|
+
'frontend-architecture.md',
|
|
247
|
+
'do not eagerly load unrelated backend-only rules',
|
|
248
|
+
],
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
path: '.agent-context/prompts/bootstrap-design.md',
|
|
252
|
+
snippets: [
|
|
253
|
+
'UI Design Mode is context-isolated by default:',
|
|
254
|
+
'Token Architecture and Alias Strategy',
|
|
255
|
+
'`tokenSystem`',
|
|
256
|
+
'`repoEvidence.designEvidenceSummary`',
|
|
257
|
+
'Responsive Strategy and Cross-Viewport Adaptation Matrix',
|
|
258
|
+
'`colorTruth.format`',
|
|
259
|
+
'`crossViewportAdaptation.mutationRules.mobile/tablet/desktop`',
|
|
260
|
+
'`motionSystem`',
|
|
261
|
+
'`componentMorphology`',
|
|
262
|
+
'Do not reuse a color palette, component skin, or motion signature from prior chats, memories, or unrelated projects',
|
|
263
|
+
'If no approved reference system exists, synthesize the design from zero using current product context, constraints, and content only.',
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
path: 'scripts/ui-design-judge.mjs',
|
|
268
|
+
snippets: [
|
|
269
|
+
'Advisory-first UI design contract judge.',
|
|
270
|
+
'Repo-internal workflow audit; no user-facing runtime modes.',
|
|
271
|
+
'Runs only in advisory mode for this repository workflow.',
|
|
272
|
+
'Do not reward generic SaaS defaults or popular template patterns.',
|
|
273
|
+
'UI design judge only evaluates changed UI surfaces.',
|
|
274
|
+
],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
path: 'lib/cli/project-scaffolder/design-contract.mjs',
|
|
278
|
+
snippets: [
|
|
279
|
+
'tokenSystem',
|
|
280
|
+
'colorTruth',
|
|
281
|
+
'crossViewportAdaptation',
|
|
282
|
+
'motionSystem',
|
|
283
|
+
'componentMorphology',
|
|
284
|
+
'requireViewportMutationRules',
|
|
285
|
+
'allowHexDerivatives',
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
path: 'lib/cli/detector.mjs',
|
|
290
|
+
snippets: [
|
|
291
|
+
'frontendEvidenceMetrics',
|
|
292
|
+
'designEvidenceSummary',
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
path: 'lib/cli/detector/design-evidence.mjs',
|
|
297
|
+
snippets: [
|
|
298
|
+
'summaryVersion',
|
|
299
|
+
'hardcodedColorCount',
|
|
300
|
+
'propDrillingCandidateCount',
|
|
301
|
+
'arbitraryBreakpointCount',
|
|
302
|
+
'cssVariables',
|
|
303
|
+
'componentInventory',
|
|
304
|
+
'tokenBypassSignals',
|
|
305
|
+
],
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
path: 'lib/cli/compiler.mjs',
|
|
309
|
+
snippets: [
|
|
310
|
+
'LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS',
|
|
311
|
+
'bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign',
|
|
312
|
+
'Keep UI-only requests context-isolated',
|
|
313
|
+
'designEvidenceSummary',
|
|
314
|
+
],
|
|
315
|
+
},
|
|
316
|
+
];
|
|
317
|
+
export const REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS = [
|
|
318
|
+
{
|
|
319
|
+
path: '.instructions.md',
|
|
320
|
+
snippets: [
|
|
321
|
+
'docker-runtime.md',
|
|
322
|
+
'For Docker or Compose work, load `docker-runtime.md` and verify the latest official Docker docs before authoring container assets.',
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
path: '.agent-context/rules/docker-runtime.md',
|
|
327
|
+
snippets: [
|
|
328
|
+
'latest official Docker documentation first',
|
|
329
|
+
'Docker Compose Quickstart',
|
|
330
|
+
'Compose file reference',
|
|
331
|
+
'Dockerfile best practices',
|
|
332
|
+
'Prefer current `docker compose` workflows and `compose.yaml`.',
|
|
333
|
+
'Do not add the top-level Compose `version` field by default.',
|
|
334
|
+
'Prefer the latest stable compatible Docker base image',
|
|
335
|
+
],
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
path: '.agent-context/prompts/init-project.md',
|
|
339
|
+
snippets: [
|
|
340
|
+
'If Docker or Compose is in scope, load [docker-runtime.md](../rules/docker-runtime.md) and verify the latest official Docker guidance before authoring container assets.',
|
|
341
|
+
'If containerization is selected, Docker assets must follow [docker-runtime.md](../rules/docker-runtime.md) and the latest official Docker docs instead of stale blog-era patterns.',
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
];
|
|
345
|
+
export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
|
|
346
|
+
{
|
|
347
|
+
path: '.instructions.md',
|
|
348
|
+
snippets: [
|
|
349
|
+
'prefer the latest stable compatible dependency set and official setup flow',
|
|
350
|
+
],
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
path: '.agent-context/rules/efficiency-vs-hype.md',
|
|
354
|
+
snippets: [
|
|
355
|
+
'Latest-Compatible-First Rule',
|
|
356
|
+
'latest stable compatible dependency version',
|
|
357
|
+
'official scaffolder or setup command',
|
|
358
|
+
'Only step down to an older dependency version after documenting',
|
|
359
|
+
],
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
path: '.agent-context/prompts/init-project.md',
|
|
363
|
+
snippets: [
|
|
364
|
+
'latest stable compatible dependency set and official framework setup flow first',
|
|
365
|
+
'Prefer official framework setup commands or canonical starter flows',
|
|
366
|
+
],
|
|
367
|
+
},
|
|
368
|
+
];
|
|
369
|
+
export const FORBIDDEN_TEMPLATE_BOOTSTRAP_SNIPPETS = [
|
|
370
|
+
{
|
|
371
|
+
path: 'lib/cli/project-scaffolder/prompt-builders.mjs',
|
|
372
|
+
snippets: [
|
|
373
|
+
'.tmpl',
|
|
374
|
+
],
|
|
375
|
+
},
|
|
376
|
+
];
|
|
377
|
+
export const REQUIRED_DETERMINISTIC_BOUNDARY_ENFORCEMENT_SNIPPETS = [
|
|
378
|
+
{
|
|
379
|
+
path: 'scripts/documentation-boundary-audit.mjs',
|
|
380
|
+
snippets: [
|
|
381
|
+
'reportVersion',
|
|
382
|
+
'violations',
|
|
383
|
+
'suggestedActions',
|
|
384
|
+
'diagnosticCode',
|
|
385
|
+
'autoDocsSyncScope',
|
|
386
|
+
'rolloutMetrics',
|
|
387
|
+
'precision',
|
|
388
|
+
'recall',
|
|
389
|
+
],
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
path: 'scripts/release-gate.mjs',
|
|
393
|
+
snippets: [
|
|
394
|
+
'documentation-boundary-hard-rule',
|
|
395
|
+
'documentation-boundary-diagnostics-machine-readable',
|
|
396
|
+
'diagnostics.documentationBoundaryAudit',
|
|
397
|
+
'auto-docs-sync-scope-phase1',
|
|
398
|
+
'auto-docs-sync-rollout-metrics',
|
|
399
|
+
],
|
|
400
|
+
},
|
|
401
|
+
];
|