gemini-designer 0.1.43 → 0.1.44
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/commands/agents-md.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/commands/agents-md.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoFpC,eAAO,MAAM,eAAe,SA0BxB,CAAC"}
|
|
@@ -15,34 +15,45 @@ function getAgentsMdSection() {
|
|
|
15
15
|
'',
|
|
16
16
|
'## Golden rules',
|
|
17
17
|
'- Prefer Gemini Designer MCP tools for UI work; avoid hand-writing large UI blobs unless explicitly requested.',
|
|
18
|
-
'
|
|
18
|
+
'Do not loop endlessly.',
|
|
19
|
+
'- Prefer deterministic + patchable flows: generate a FileBundle, then write with apply_file_bundle (avoid direct writes when possible).',
|
|
19
20
|
'- Always maintain WCAG AA, keyboard navigation, and strong :focus-visible states.',
|
|
20
|
-
'- Avoid generic layouts (cookie-cutter SaaS grids) and generic gradients.',
|
|
21
|
+
'- Avoid generic layouts (cookie-cutter SaaS grids) and generic gradients. Aim for a clear aesthetic direction.',
|
|
22
|
+
'- When unsure about repo conventions, read/search the repo (repo_search / repo_read_files) instead of guessing.',
|
|
21
23
|
'',
|
|
22
24
|
'## Recommended workflows',
|
|
23
25
|
'',
|
|
24
26
|
'### A) New page / new component (highest quality, lowest back-and-forth)',
|
|
25
27
|
'1) (Optional) detect_ui_stack(projectRoot) to learn framework/styling conventions.',
|
|
26
|
-
'2)
|
|
27
|
-
'3)
|
|
28
|
-
'4)
|
|
28
|
+
'2) (Optional) repo_search / repo_read_files to match existing patterns (routing, layout, components).',
|
|
29
|
+
'3) generate_vibes(vibeCount=3..5) and pick ONE vibe.',
|
|
30
|
+
'4) ui_generate(..., vibe=...) → apply_file_bundle(bundle=...) (deterministic write).',
|
|
31
|
+
'5) If polish is needed: ONE modify_ui pass (surgical edits) → apply_file_bundle(bundle=...).',
|
|
32
|
+
'6) (Optional) validate_project(script="typecheck"|"lint"|"build") if enabled.',
|
|
29
33
|
'',
|
|
30
34
|
'### B) Tight iteration on existing UI (no re-generation)',
|
|
31
|
-
'1)
|
|
32
|
-
'2)
|
|
35
|
+
'1) repo_read_files(paths=[targetFile,...]) to confirm current code + conventions.',
|
|
36
|
+
'2) modify_ui(targetFile, instruction, preserveLogic=true, outputFormat="json", applyChanges=false, returnDiff=true).',
|
|
37
|
+
'3) If it looks good: apply_file_bundle(bundle=...) (deterministic write).',
|
|
38
|
+
'4) Stop after ONE extra refinement pass unless user explicitly requests more.',
|
|
33
39
|
'',
|
|
34
|
-
'### C) Screenshot →
|
|
35
|
-
'1) ui_review(imagePath, targets=[
|
|
36
|
-
'2) modify_ui
|
|
40
|
+
'### C) Screenshot → implementation (patchable, multi-file)',
|
|
41
|
+
'1) ui_review(imagePath|imageBase64, targets=[{path,...}], instruction=...) → apply_file_bundle(bundle=...)',
|
|
42
|
+
'2) Optional: ONE modify_ui pass for alignment/spacing/accessibility → apply_file_bundle(bundle=...).',
|
|
43
|
+
'3) (Optional) validate_project if enabled.',
|
|
37
44
|
'',
|
|
38
45
|
'### D) Repo refactor / consistency',
|
|
46
|
+
'- repo_search to find patterns/usages across the codebase.',
|
|
39
47
|
'- catalog_components to discover existing exports to reuse.',
|
|
40
|
-
'- analyze_tokens to extract tokens from CSS/SCSS.',
|
|
48
|
+
'- analyze_tokens to extract tokens from CSS/SCSS (if needed).',
|
|
41
49
|
'- sync_design_tokens to normalize/convert tokens (css-vars/scss-vars/tailwind/tokens-studio/style-dictionary).',
|
|
50
|
+
'- Use modify_ui (multi-file targets) → apply_file_bundle for consistent, patchable changes.',
|
|
42
51
|
'',
|
|
43
52
|
'### E) Architecture planning (before implementation)',
|
|
44
|
-
'1) scaffold_project(name, pages, features) to get a structured plan + scaffold.',
|
|
45
|
-
'2)
|
|
53
|
+
'1) scaffold_project(name, pages, features, strategy="ai"|"template") to get a structured plan + scaffold bundles.',
|
|
54
|
+
'2) apply_file_bundle(bundle=...) to write scaffolds (preferred deterministic write).',
|
|
55
|
+
'3) Implement/replace stubs via ui_generate → apply_file_bundle.',
|
|
56
|
+
'4) If scaffold uses sessions/cursors: keep calling scaffold_project(sessionId, output="files") until done.',
|
|
46
57
|
'',
|
|
47
58
|
'## High-signal request template (copy/paste)',
|
|
48
59
|
'Purpose: <what this UI is for>',
|
|
@@ -53,12 +64,12 @@ function getAgentsMdSection() {
|
|
|
53
64
|
'- Mobile-first responsive',
|
|
54
65
|
'- Strong :focus-visible states',
|
|
55
66
|
'- Avoid generic “SaaS card grids” + generic gradients',
|
|
56
|
-
'Design direction: <ONE clear aesthetic (editorial | brutalist | art-deco | luxury | playful)>',
|
|
67
|
+
'Design direction: <ONE clear aesthetic (editorial | brutalist | art-deco | luxury | playful | your own choice)>',
|
|
57
68
|
'',
|
|
58
69
|
'Tip: For marketing pages, explicitly list required sections (hero, how-it-works, examples, testimonials, pricing, CTA).',
|
|
59
70
|
END,
|
|
60
71
|
'',
|
|
61
|
-
].join('
|
|
72
|
+
].join('\\n');
|
|
62
73
|
}
|
|
63
74
|
function upsertSection(existing, section) {
|
|
64
75
|
if (existing.includes(BEGIN) && existing.includes(END)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md.js","sourceRoot":"","sources":["../../src/commands/agents-md.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,KAAK,GAAG,0CAA0C,CAAC;AACzD,MAAM,GAAG,GAAG,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"agents-md.js","sourceRoot":"","sources":["../../src/commands/agents-md.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,KAAK,GAAG,0CAA0C,CAAC;AACzD,MAAM,GAAG,GAAG,wCAAwC,CAAC;AACrD,SAAS,kBAAkB;IACzB,OAAO;QACL,KAAK;QACL,8CAA8C;QAC9C,EAAE;QACF,iBAAiB;QACjB,gHAAgH;QAChH,wBAAwB;QACxB,yIAAyI;QACzI,mFAAmF;QACnF,gHAAgH;QAChH,iHAAiH;QACjH,EAAE;QACF,0BAA0B;QAC1B,EAAE;QACF,0EAA0E;QAC1E,oFAAoF;QACpF,uGAAuG;QACvG,sDAAsD;QACtD,sFAAsF;QACtF,8FAA8F;QAC9F,+EAA+E;QAC/E,EAAE;QACF,0DAA0D;QAC1D,mFAAmF;QACnF,sHAAsH;QACtH,2EAA2E;QAC3E,+EAA+E;QAC/E,EAAE;QACF,4DAA4D;QAC5D,4GAA4G;QAC5G,sGAAsG;QACtG,4CAA4C;QAC5C,EAAE;QACF,oCAAoC;QACpC,4DAA4D;QAC5D,6DAA6D;QAC7D,+DAA+D;QAC/D,gHAAgH;QAChH,6FAA6F;QAC7F,EAAE;QACF,sDAAsD;QACtD,mHAAmH;QACnH,sFAAsF;QACtF,iEAAiE;QACjE,4GAA4G;QAC5G,EAAE;QACF,8CAA8C;QAC9C,gCAAgC;QAChC,yBAAyB;QACzB,+DAA+D;QAC/D,cAAc;QACd,WAAW;QACX,2BAA2B;QAC3B,gCAAgC;QAChC,uDAAuD;QACvD,iHAAiH;Q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ACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;QACrC,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,WAAW,CAAC,CAAC,CAAC;IAChF,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9C,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAEvC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,IAAI,CAAC,mFAAmF,CAAC,CAChG,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -10,7 +10,6 @@ import chalk from 'chalk';
|
|
|
10
10
|
|
|
11
11
|
const BEGIN = '<!-- gemini-designer:agents-md:begin -->';
|
|
12
12
|
const END = '<!-- gemini-designer:agents-md:end -->';
|
|
13
|
-
|
|
14
13
|
function getAgentsMdSection(): string {
|
|
15
14
|
return [
|
|
16
15
|
BEGIN,
|
|
@@ -18,34 +17,45 @@ function getAgentsMdSection(): string {
|
|
|
18
17
|
'',
|
|
19
18
|
'## Golden rules',
|
|
20
19
|
'- Prefer Gemini Designer MCP tools for UI work; avoid hand-writing large UI blobs unless explicitly requested.',
|
|
21
|
-
'
|
|
20
|
+
'Do not loop endlessly.',
|
|
21
|
+
'- Prefer deterministic + patchable flows: generate a FileBundle, then write with apply_file_bundle (avoid direct writes when possible).',
|
|
22
22
|
'- Always maintain WCAG AA, keyboard navigation, and strong :focus-visible states.',
|
|
23
|
-
'- Avoid generic layouts (cookie-cutter SaaS grids) and generic gradients.',
|
|
23
|
+
'- Avoid generic layouts (cookie-cutter SaaS grids) and generic gradients. Aim for a clear aesthetic direction.',
|
|
24
|
+
'- When unsure about repo conventions, read/search the repo (repo_search / repo_read_files) instead of guessing.',
|
|
24
25
|
'',
|
|
25
26
|
'## Recommended workflows',
|
|
26
27
|
'',
|
|
27
28
|
'### A) New page / new component (highest quality, lowest back-and-forth)',
|
|
28
29
|
'1) (Optional) detect_ui_stack(projectRoot) to learn framework/styling conventions.',
|
|
29
|
-
'2)
|
|
30
|
-
'3)
|
|
31
|
-
'4)
|
|
30
|
+
'2) (Optional) repo_search / repo_read_files to match existing patterns (routing, layout, components).',
|
|
31
|
+
'3) generate_vibes(vibeCount=3..5) and pick ONE vibe.',
|
|
32
|
+
'4) ui_generate(..., vibe=...) → apply_file_bundle(bundle=...) (deterministic write).',
|
|
33
|
+
'5) If polish is needed: ONE modify_ui pass (surgical edits) → apply_file_bundle(bundle=...).',
|
|
34
|
+
'6) (Optional) validate_project(script="typecheck"|"lint"|"build") if enabled.',
|
|
32
35
|
'',
|
|
33
36
|
'### B) Tight iteration on existing UI (no re-generation)',
|
|
34
|
-
'1)
|
|
35
|
-
'2)
|
|
37
|
+
'1) repo_read_files(paths=[targetFile,...]) to confirm current code + conventions.',
|
|
38
|
+
'2) modify_ui(targetFile, instruction, preserveLogic=true, outputFormat="json", applyChanges=false, returnDiff=true).',
|
|
39
|
+
'3) If it looks good: apply_file_bundle(bundle=...) (deterministic write).',
|
|
40
|
+
'4) Stop after ONE extra refinement pass unless user explicitly requests more.',
|
|
36
41
|
'',
|
|
37
|
-
'### C) Screenshot →
|
|
38
|
-
'1) ui_review(imagePath, targets=[
|
|
39
|
-
'2) modify_ui
|
|
42
|
+
'### C) Screenshot → implementation (patchable, multi-file)',
|
|
43
|
+
'1) ui_review(imagePath|imageBase64, targets=[{path,...}], instruction=...) → apply_file_bundle(bundle=...)',
|
|
44
|
+
'2) Optional: ONE modify_ui pass for alignment/spacing/accessibility → apply_file_bundle(bundle=...).',
|
|
45
|
+
'3) (Optional) validate_project if enabled.',
|
|
40
46
|
'',
|
|
41
47
|
'### D) Repo refactor / consistency',
|
|
48
|
+
'- repo_search to find patterns/usages across the codebase.',
|
|
42
49
|
'- catalog_components to discover existing exports to reuse.',
|
|
43
|
-
'- analyze_tokens to extract tokens from CSS/SCSS.',
|
|
50
|
+
'- analyze_tokens to extract tokens from CSS/SCSS (if needed).',
|
|
44
51
|
'- sync_design_tokens to normalize/convert tokens (css-vars/scss-vars/tailwind/tokens-studio/style-dictionary).',
|
|
52
|
+
'- Use modify_ui (multi-file targets) → apply_file_bundle for consistent, patchable changes.',
|
|
45
53
|
'',
|
|
46
54
|
'### E) Architecture planning (before implementation)',
|
|
47
|
-
'1) scaffold_project(name, pages, features) to get a structured plan + scaffold.',
|
|
48
|
-
'2)
|
|
55
|
+
'1) scaffold_project(name, pages, features, strategy="ai"|"template") to get a structured plan + scaffold bundles.',
|
|
56
|
+
'2) apply_file_bundle(bundle=...) to write scaffolds (preferred deterministic write).',
|
|
57
|
+
'3) Implement/replace stubs via ui_generate → apply_file_bundle.',
|
|
58
|
+
'4) If scaffold uses sessions/cursors: keep calling scaffold_project(sessionId, output="files") until done.',
|
|
49
59
|
'',
|
|
50
60
|
'## High-signal request template (copy/paste)',
|
|
51
61
|
'Purpose: <what this UI is for>',
|
|
@@ -56,12 +66,12 @@ function getAgentsMdSection(): string {
|
|
|
56
66
|
'- Mobile-first responsive',
|
|
57
67
|
'- Strong :focus-visible states',
|
|
58
68
|
'- Avoid generic “SaaS card grids” + generic gradients',
|
|
59
|
-
'Design direction: <ONE clear aesthetic (editorial | brutalist | art-deco | luxury | playful)>',
|
|
69
|
+
'Design direction: <ONE clear aesthetic (editorial | brutalist | art-deco | luxury | playful | your own choice)>',
|
|
60
70
|
'',
|
|
61
71
|
'Tip: For marketing pages, explicitly list required sections (hero, how-it-works, examples, testimonials, pricing, CTA).',
|
|
62
72
|
END,
|
|
63
73
|
'',
|
|
64
|
-
].join('
|
|
74
|
+
].join('\\n');
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
function upsertSection(existing: string, section: string): string {
|