@diffra-ai/cli 0.2.1 → 0.2.2
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/CHANGELOG.md +12 -0
- package/dist/bundle/chunks/{anthropic-messages-UM2LSKVG.js → anthropic-messages-VPHYDMHB.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-LLULQ6UR.js → azure-openai-responses-JYJ2VXQ2.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-I6QEKFFB.js → chunk-2IABWVGX.js} +1 -1
- package/dist/bundle/chunks/{chunk-6NW7EDTU.js → chunk-6RV2XP5B.js} +6 -6
- package/dist/bundle/chunks/{chunk-Y5LGEDHU.js → chunk-FCSMMPE4.js} +1 -1
- package/dist/bundle/chunks/{chunk-MAMCTGRH.js → chunk-JEYYTVUX.js} +1 -1
- package/dist/bundle/chunks/chunk-NPHITI73.js +30 -0
- package/dist/bundle/chunks/{chunk-UBBD6YWP.js → chunk-QQYLP3HG.js} +1 -1
- package/dist/bundle/chunks/{chunk-J2CQ7AOB.js → chunk-QY4GYLLA.js} +1 -1
- package/dist/bundle/chunks/{chunk-MWJ5PWKE.js → chunk-REVASUCD.js} +1 -1
- package/dist/bundle/chunks/{chunk-BSCVN57O.js → chunk-S7OTLWTF.js} +1 -1
- package/dist/bundle/chunks/{chunk-QCEU5NDS.js → chunk-TOBZDLTR.js} +1 -1
- package/dist/bundle/chunks/{chunk-37INV3TW.js → chunk-Z4BBBJG4.js} +1 -1
- package/dist/bundle/chunks/{cli-VEFNOOXB.js → cli-I4RCHKMY.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-VQHACWH5.js → cloudflare-workers-ai-system-one-OTYUASP3.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-YFRD2UAD.js → google-generative-ai-DI3FOC25.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-7EWCT4BL.js → google-vertex-VBHHROPU.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-D5PC6EEP.js → llama-cpp-classify-MUFWIFOW.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-ILNLXCLF.js → mistral-conversations-Q2PGF352.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-YESP5ZRN.js → openai-codex-responses-WWZAXEPG.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-BKYCRYVB.js → openai-completions-4C7QTL2T.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-OZVDLRU3.js → openai-decisions-NYOT2XIF.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-GSXMBGMK.js → openai-responses-R5MW34FB.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-TK5PJTOE.js → openrouter-images-FBKW4PD4.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-AHAEGVU4.js → pi-messages-LJZPZBQY.js} +1 -1
- package/dist/bundle/chunks/{typesafe-system-one-XHINCFVH.js → typesafe-system-one-7MCWBLJY.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-7F3I52A6.js → virtual-modules-J4Z2IMRZ.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/cli.js +0 -0
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli.js +0 -0
- package/dist/core/model-resolver.js +3 -3
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/extensions/skills/bundled/find-skills/LICENSE +21 -0
- package/dist/extensions/skills/bundled/find-skills/SKILL.md +117 -0
- package/dist/extensions/skills/bundled/grill-me/LICENSE +21 -0
- package/dist/extensions/skills/bundled/grill-me/SKILL.md +44 -0
- package/dist/extensions/skills/bundled/handoff/LICENSE +21 -0
- package/dist/extensions/skills/bundled/handoff/SKILL.md +31 -0
- package/dist/extensions/skills/bundled/mcp-builder/LICENSE.txt +202 -0
- package/dist/extensions/skills/bundled/mcp-builder/SKILL.md +260 -0
- package/dist/extensions/skills/bundled/mcp-builder/reference/evaluation.md +432 -0
- package/dist/extensions/skills/bundled/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/dist/extensions/skills/bundled/mcp-builder/reference/node_mcp_server.md +972 -0
- package/dist/extensions/skills/bundled/mcp-builder/reference/node_mcp_server_v2.md +747 -0
- package/dist/extensions/skills/bundled/mcp-builder/reference/python_mcp_server.md +719 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/LICENSE +21 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/SKILL.md +251 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/app-interface.csv +33 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/charts.csv +26 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/colors.csv +195 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/google-fonts.csv +1935 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/icons.csv +106 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/landing.csv +35 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/motion.csv +21 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/products.csv +195 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/angular.csv +51 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/avalonia.csv +57 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/html-tailwind.csv +60 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/javafx.csv +76 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/laravel.csv +51 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/nextjs.csv +62 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/nuxt-ui.csv +84 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/nuxtjs.csv +68 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/pyside6-qss.csv +103 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/react.csv +67 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/shadcn.csv +69 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/svelte.csv +56 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/threejs.csv +54 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/uno.csv +60 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/uwp.csv +56 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/winui.csv +60 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/stacks/wpf.csv +57 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/styles.csv +90 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/typography.csv +75 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/ui-reasoning.csv +195 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/data/ux-guidelines.csv +142 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/references/pro-rules.md +117 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/references/quick-reference.md +275 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/scripts/core.py +1111 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/scripts/design_system.py +1922 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/scripts/preview.py +557 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/scripts/reasoning_contract.py +123 -0
- package/dist/extensions/skills/bundled/ui-ux-pro-max/scripts/search.py +257 -0
- package/dist/extensions/skills/index.d.ts +4 -4
- package/dist/extensions/skills/index.d.ts.map +1 -1
- package/dist/extensions/skills/index.js +9 -4
- package/dist/extensions/skills/index.js.map +1 -1
- package/dist/rpc-entry.js +0 -0
- package/docs/builtin-skills.md +46 -3
- package/docs/docs.json +1 -1
- package/docs/skills.md +1 -1
- package/docs/slash-commands.md +2 -0
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +0 -0
- package/package.json +6 -6
- package/dist/bundle/chunks/chunk-UIVU7TEF.js +0 -30
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
UI/UX Pro Max Search - BM25 search engine for UI/UX style guides
|
|
5
|
+
Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--max-results 3]
|
|
6
|
+
python search.py "<query>" --design-system [-p "Project Name"]
|
|
7
|
+
python search.py "<query>" --design-system --tokens dtcg|css
|
|
8
|
+
python search.py "<query>" --design-system --persist [-p "Project Name"] --output-dir "<project-root>" [--page "dashboard"]
|
|
9
|
+
python search.py "<query>" --design-system --persist --preview [-p "Project Name"] --output-dir "<project-root>"
|
|
10
|
+
python search.py "<query>" --design-system --variance 8 --motion 9 --density 7
|
|
11
|
+
|
|
12
|
+
Domains: style, color, chart, landing, product, ux, typography, google-fonts, icons, gsap, react, web
|
|
13
|
+
Stacks: react, nextjs, vue, svelte, astro, swiftui, react-native, flutter, nuxtjs, nuxt-ui,
|
|
14
|
+
html-tailwind, shadcn, jetpack-compose, threejs, angular, laravel
|
|
15
|
+
|
|
16
|
+
Design dials (1-10, only with --design-system):
|
|
17
|
+
--variance DESIGN_VARIANCE: 1=centered/minimal, 10=bold/asymmetric
|
|
18
|
+
--motion MOTION_INTENSITY: 1=subtle, 10=complex; attaches a GSAP snippet from motion.csv
|
|
19
|
+
--density VISUAL_DENSITY: 1=spacious, 10=dense/dashboard; overrides the spacing scale
|
|
20
|
+
|
|
21
|
+
Token export (only with --design-system):
|
|
22
|
+
--tokens dtcg Print W3C Design Tokens JSON (color, font, semantic layers)
|
|
23
|
+
--tokens css Print :root CSS variables using the same names generate-tokens.cjs emits
|
|
24
|
+
|
|
25
|
+
Persistence (Master + Overrides pattern):
|
|
26
|
+
--persist Save design system to design-system/<project-slug>/MASTER.md
|
|
27
|
+
--output-dir Directory the design-system/ folder is created under (defaults to cwd --
|
|
28
|
+
always pass this explicitly, pointed at the project root)
|
|
29
|
+
--page Also create a page-specific override file in design-system/<project-slug>/pages/
|
|
30
|
+
Token files are master-level only; --page does not emit page-specific tokens
|
|
31
|
+
--force Overwrite an existing MASTER.md (without this, persistence is skipped
|
|
32
|
+
if MASTER.md already exists, so prior design decisions aren't lost)
|
|
33
|
+
With --tokens, also writes tokens.json (and tokens.css when --tokens css)
|
|
34
|
+
--preview Write preview.html for the generated system (requires --design-system).
|
|
35
|
+
With --persist, the file is written next to MASTER.md. Without --persist,
|
|
36
|
+
it is written to --output-dir or to a temp file whose path is printed.
|
|
37
|
+
--lang Set the preview language tag (e.g. ar, he)
|
|
38
|
+
--direction Set the preview text direction (ltr or rtl)
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
import argparse
|
|
42
|
+
import json as json_module
|
|
43
|
+
import os
|
|
44
|
+
import sys
|
|
45
|
+
import io
|
|
46
|
+
|
|
47
|
+
# Embedded Python builds (for example AutoClaw's bundled runtime, which ships a
|
|
48
|
+
# ._pth file) do not add this script's directory to sys.path. Resolve sibling
|
|
49
|
+
# modules explicitly so `python <path>/search.py` works in those environments.
|
|
50
|
+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
51
|
+
|
|
52
|
+
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, RTL_LEVEL_CHOICES, UNTRUNCATED_COLS, search, search_stack
|
|
53
|
+
from design_system import generate_design_system
|
|
54
|
+
|
|
55
|
+
# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default)
|
|
56
|
+
if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
|
57
|
+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
58
|
+
if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8':
|
|
59
|
+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
|
60
|
+
|
|
61
|
+
TRUNCATE_AT = 300
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def format_output(result, full=False):
|
|
65
|
+
"""Format results for Claude consumption (token-optimized)"""
|
|
66
|
+
if "error" in result:
|
|
67
|
+
return f"Error: {result['error']}"
|
|
68
|
+
|
|
69
|
+
output = []
|
|
70
|
+
if result.get("stack"):
|
|
71
|
+
output.append("## UI Pro Max Stack Guidelines")
|
|
72
|
+
output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
|
|
73
|
+
else:
|
|
74
|
+
output.append("## UI Pro Max Search Results")
|
|
75
|
+
domain_note = result['domain']
|
|
76
|
+
if result.get("auto_detected"):
|
|
77
|
+
domain_note += " (auto-detected"
|
|
78
|
+
if result.get("runner_up_domain"):
|
|
79
|
+
domain_note += f", runner-up: {result['runner_up_domain']}"
|
|
80
|
+
domain_note += ")"
|
|
81
|
+
output.append(f"**Domain:** {domain_note} | **Query:** {result['query']}")
|
|
82
|
+
output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
|
|
83
|
+
|
|
84
|
+
if result['count'] == 0:
|
|
85
|
+
redirect = result.get("redirect")
|
|
86
|
+
if redirect:
|
|
87
|
+
output.append(
|
|
88
|
+
"This legacy style label is now modeled in the "
|
|
89
|
+
f"`{redirect['domain']}` domain as `{redirect['id']}`. "
|
|
90
|
+
"Search that domain instead of treating a page composition as a visual style."
|
|
91
|
+
)
|
|
92
|
+
return "\n".join(output)
|
|
93
|
+
output.append(
|
|
94
|
+
"No matches. This is not a match with an empty value -- the query "
|
|
95
|
+
"did not hit the database. Retry with broader/different keywords "
|
|
96
|
+
"before falling back to general defaults, and say explicitly that "
|
|
97
|
+
"no database match was found if you do fall back."
|
|
98
|
+
)
|
|
99
|
+
suggestions = result.get("suggestions") or []
|
|
100
|
+
if suggestions:
|
|
101
|
+
output.append(f"**Closest known terms:** {', '.join(suggestions)}")
|
|
102
|
+
return "\n".join(output)
|
|
103
|
+
|
|
104
|
+
for i, row in enumerate(result['results'], 1):
|
|
105
|
+
output.append(f"### Result {i}")
|
|
106
|
+
for key, value in row.items():
|
|
107
|
+
value_str = str(value)
|
|
108
|
+
if not full and key not in UNTRUNCATED_COLS and len(value_str) > TRUNCATE_AT:
|
|
109
|
+
value_str = value_str[:TRUNCATE_AT] + "..."
|
|
110
|
+
output.append(f"- **{key}:** {value_str}")
|
|
111
|
+
output.append("")
|
|
112
|
+
|
|
113
|
+
return "\n".join(output)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if __name__ == "__main__":
|
|
117
|
+
parser = argparse.ArgumentParser(description="UI Pro Max Search")
|
|
118
|
+
parser.add_argument("query", help="Search query")
|
|
119
|
+
parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
|
|
120
|
+
parser.add_argument("--rtl", nargs="?", const="all", choices=list(RTL_LEVEL_CHOICES), metavar="LEVEL",
|
|
121
|
+
help="Filter style/product results by RTL compatibility: full (mirrors without work), "
|
|
122
|
+
"partial (mirrors with per-component work), caveats (layout depends on reading "
|
|
123
|
+
"direction); omit the value for all levels. Requires --domain style or product")
|
|
124
|
+
parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help=f"Stack-specific search. Available: {', '.join(AVAILABLE_STACKS)}")
|
|
125
|
+
parser.add_argument("--max-results", "-n", type=int, choices=range(1, 21), default=MAX_RESULTS,
|
|
126
|
+
metavar="1-20", help="Max results (default: 3)")
|
|
127
|
+
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
|
128
|
+
parser.add_argument("--full", action="store_true", help="Do not truncate long field values in text output")
|
|
129
|
+
# Design system generation
|
|
130
|
+
parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
|
|
131
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
|
|
132
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system (ignored if --json)")
|
|
133
|
+
# Persistence (Master + Overrides pattern)
|
|
134
|
+
parser.add_argument("--persist", action="store_true", help="Save design system to design-system/<project-slug>/MASTER.md (creates hierarchical structure)")
|
|
135
|
+
parser.add_argument("--page", type=str, default=None, help="Create page-specific override file in design-system/<project-slug>/pages/")
|
|
136
|
+
parser.add_argument("--output-dir", "-o", type=str, default=None, help="Output directory for persisted files (default: current directory -- pass this explicitly, pointed at the project root)")
|
|
137
|
+
parser.add_argument("--force", action="store_true", help="Overwrite an existing MASTER.md when persisting (default: skip if it already exists)")
|
|
138
|
+
parser.add_argument("--preview", action="store_true", help="Write a self-contained preview.html of the generated design system (requires --design-system)")
|
|
139
|
+
parser.add_argument("--lang", help="Set the preview language tag, e.g. ar or he (requires --design-system)")
|
|
140
|
+
parser.add_argument("--direction", choices=["ltr", "rtl"], help="Set the preview text direction (requires --design-system)")
|
|
141
|
+
parser.add_argument("--tokens", choices=["dtcg", "css"], default=None,
|
|
142
|
+
help="Export design tokens as W3C DTCG JSON or CSS variables (requires --design-system)")
|
|
143
|
+
# Design dials (1-10), only applied with --design-system
|
|
144
|
+
parser.add_argument("--variance", type=int, choices=range(1, 11), metavar="1-10", help="DESIGN_VARIANCE dial: 1=centered/minimal, 10=bold/asymmetric (only with --design-system)")
|
|
145
|
+
parser.add_argument("--motion", type=int, choices=range(1, 11), metavar="1-10", help="MOTION_INTENSITY dial: 1=subtle, 10=complex; pulls a matching GSAP snippet from motion.csv (only with --design-system)")
|
|
146
|
+
parser.add_argument("--density", type=int, choices=range(1, 11), metavar="1-10", help="VISUAL_DENSITY dial: 1=spacious, 10=dense/dashboard; overrides the spacing scale (only with --design-system)")
|
|
147
|
+
|
|
148
|
+
args = parser.parse_args()
|
|
149
|
+
|
|
150
|
+
if args.preview and not args.design_system:
|
|
151
|
+
parser.error("--preview requires --design-system")
|
|
152
|
+
if (args.lang is not None or args.direction is not None) and not args.design_system:
|
|
153
|
+
parser.error("--lang and --direction require --design-system")
|
|
154
|
+
if args.tokens and not args.design_system:
|
|
155
|
+
parser.error("--tokens requires --design-system")
|
|
156
|
+
|
|
157
|
+
# Design system takes priority
|
|
158
|
+
if args.design_system:
|
|
159
|
+
if args.rtl is not None:
|
|
160
|
+
parser.error(
|
|
161
|
+
"--rtl is not supported with --design-system; "
|
|
162
|
+
"run a separate --domain style or --domain product query"
|
|
163
|
+
)
|
|
164
|
+
if args.stack:
|
|
165
|
+
print(
|
|
166
|
+
f"note: --stack {args.stack} is ignored in --design-system mode; "
|
|
167
|
+
"run a separate --stack query for stack-specific guidelines",
|
|
168
|
+
file=sys.stderr,
|
|
169
|
+
)
|
|
170
|
+
result = generate_design_system(
|
|
171
|
+
args.query,
|
|
172
|
+
args.project_name,
|
|
173
|
+
args.format,
|
|
174
|
+
persist=args.persist,
|
|
175
|
+
page=args.page,
|
|
176
|
+
output_dir=args.output_dir,
|
|
177
|
+
variance=args.variance,
|
|
178
|
+
motion=args.motion,
|
|
179
|
+
density=args.density,
|
|
180
|
+
force=args.force,
|
|
181
|
+
preview=args.preview,
|
|
182
|
+
token_format=args.tokens,
|
|
183
|
+
lang=args.lang,
|
|
184
|
+
direction=args.direction,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
if args.json:
|
|
188
|
+
payload = {
|
|
189
|
+
"design_system": result["design_system"],
|
|
190
|
+
"persistence": result["persistence"],
|
|
191
|
+
}
|
|
192
|
+
if args.preview:
|
|
193
|
+
payload["preview"] = result["preview"]
|
|
194
|
+
if result.get("tokens") is not None:
|
|
195
|
+
payload["tokens"] = result["tokens"]
|
|
196
|
+
print(json_module.dumps(payload, indent=2, ensure_ascii=False))
|
|
197
|
+
else:
|
|
198
|
+
# Token export is meant to be redirected; keep a trailing newline
|
|
199
|
+
# matching generate-tokens.cjs stdout without doubling print()'s.
|
|
200
|
+
text = result["text"]
|
|
201
|
+
if args.tokens:
|
|
202
|
+
sys.stdout.write(text if text.endswith("\n") else text + "\n")
|
|
203
|
+
else:
|
|
204
|
+
print(text)
|
|
205
|
+
|
|
206
|
+
if args.persist:
|
|
207
|
+
persistence = result["persistence"] or {}
|
|
208
|
+
persist_stream = sys.stderr if args.tokens else sys.stdout
|
|
209
|
+
print("\n" + "=" * 60, file=persist_stream)
|
|
210
|
+
if persistence.get("status") == "skipped_exists":
|
|
211
|
+
print(f"⚠️ {persistence.get('message', 'MASTER.md already exists; not overwritten.')}",
|
|
212
|
+
file=persist_stream)
|
|
213
|
+
else:
|
|
214
|
+
ds_dir = persistence.get("design_system_dir", "design-system/<project>")
|
|
215
|
+
print(f"✅ Design system persisted to {ds_dir}/", file=persist_stream)
|
|
216
|
+
for f in persistence.get("created_files", []):
|
|
217
|
+
print(f" 📄 {f}", file=persist_stream)
|
|
218
|
+
print("", file=persist_stream)
|
|
219
|
+
print(f"📖 Usage: When building a page, check {ds_dir}/pages/[page].md first.",
|
|
220
|
+
file=persist_stream)
|
|
221
|
+
print(" If it exists, its rules override MASTER.md. Otherwise, use MASTER.md.",
|
|
222
|
+
file=persist_stream)
|
|
223
|
+
print("=" * 60, file=persist_stream)
|
|
224
|
+
|
|
225
|
+
if args.preview:
|
|
226
|
+
preview = result["preview"] or {}
|
|
227
|
+
preview_stream = sys.stderr if args.tokens else sys.stdout
|
|
228
|
+
print("\n" + "=" * 60, file=preview_stream)
|
|
229
|
+
if preview.get("status") == "skipped_exists":
|
|
230
|
+
print(f"⚠️ {preview.get('message', 'preview.html already exists; not overwritten.')}",
|
|
231
|
+
file=preview_stream)
|
|
232
|
+
else:
|
|
233
|
+
print(f"✅ Design system preview: {preview.get('preview_file')}",
|
|
234
|
+
file=preview_stream)
|
|
235
|
+
print("=" * 60, file=preview_stream)
|
|
236
|
+
# Stack search
|
|
237
|
+
elif args.stack:
|
|
238
|
+
if args.rtl is not None:
|
|
239
|
+
parser.error(
|
|
240
|
+
"--rtl cannot be combined with --stack; "
|
|
241
|
+
"use --domain style or --domain product"
|
|
242
|
+
)
|
|
243
|
+
result = search_stack(args.query, args.stack, args.max_results)
|
|
244
|
+
if args.json:
|
|
245
|
+
print(json_module.dumps(result, indent=2, ensure_ascii=False))
|
|
246
|
+
else:
|
|
247
|
+
print(format_output(result, full=args.full))
|
|
248
|
+
# Domain search
|
|
249
|
+
else:
|
|
250
|
+
try:
|
|
251
|
+
result = search(args.query, args.domain, args.max_results, rtl=args.rtl)
|
|
252
|
+
except ValueError as exc:
|
|
253
|
+
parser.error(str(exc))
|
|
254
|
+
if args.json:
|
|
255
|
+
print(json_module.dumps(result, indent=2, ensure_ascii=False))
|
|
256
|
+
else:
|
|
257
|
+
print(format_output(result, full=args.full))
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Built-in skills as an extension. The CLI loads it as a built-in extension; SDK users add
|
|
3
3
|
* `createBuiltinSkillsExtension()` to their extension factories.
|
|
4
4
|
*
|
|
5
|
-
* It adds the bundled `review
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* project skill.
|
|
5
|
+
* It adds the bundled skills (`review`, `batch`, `find-skills`, `grill-me`, `handoff`, `mcp-builder`, and
|
|
6
|
+
* `ui-ux-pro-max`) to the session's skills, so the model can use them, with `/review`, `/batch`, `/grill-me`, and
|
|
7
|
+
* `/handoff` as shortcuts for their `/skill:` commands. `grill-me` and `handoff` run only on request. A project or user
|
|
8
|
+
* skill of the same name wins. `/learn` asks the agent to turn a document, URL, or text into a new project skill.
|
|
9
9
|
*/
|
|
10
10
|
import type { ExtensionFactory } from "../../core/extensions/types.ts";
|
|
11
11
|
/** Create the built-in skills extension. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/skills/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAgB,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/skills/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAgB,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAsBrF,4CAA4C;AAC5C,wBAAgB,4BAA4B,IAAI,gBAAgB,CAkC/D"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Built-in skills as an extension. The CLI loads it as a built-in extension; SDK users add
|
|
3
3
|
* `createBuiltinSkillsExtension()` to their extension factories.
|
|
4
4
|
*
|
|
5
|
-
* It adds the bundled `review
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* project skill.
|
|
5
|
+
* It adds the bundled skills (`review`, `batch`, `find-skills`, `grill-me`, `handoff`, `mcp-builder`, and
|
|
6
|
+
* `ui-ux-pro-max`) to the session's skills, so the model can use them, with `/review`, `/batch`, `/grill-me`, and
|
|
7
|
+
* `/handoff` as shortcuts for their `/skill:` commands. `grill-me` and `handoff` run only on request. A project or user
|
|
8
|
+
* skill of the same name wins. `/learn` asks the agent to turn a document, URL, or text into a new project skill.
|
|
9
9
|
*/
|
|
10
10
|
import { existsSync, readdirSync } from "node:fs";
|
|
11
11
|
import { join } from "node:path";
|
|
@@ -17,6 +17,11 @@ const SKILL_COMMANDS = [
|
|
|
17
17
|
description: "Review code changes: [pr-number|pr-url|file-path] [--effort low|medium|high] [--comment] [--fix]",
|
|
18
18
|
},
|
|
19
19
|
{ name: "batch", description: "Apply one change to many files in parallel: <operation> <file-pattern>" },
|
|
20
|
+
{ name: "grill-me", description: "Interview me about a plan or design until every decision is settled: [topic]" },
|
|
21
|
+
{
|
|
22
|
+
name: "handoff",
|
|
23
|
+
description: "Write a handoff document for another agent to continue: [focus of the next session]",
|
|
24
|
+
},
|
|
20
25
|
];
|
|
21
26
|
const LEARN_USAGE = `Usage: /learn <path|URL|text> [focus]
|
|
22
27
|
Examples:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/extensions/skills/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,cAAc,GAAG;IACtB;QACC,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kGAAkG;KAC/G;IACD,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,wEAAwE,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/extensions/skills/index.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Built-in skills as an extension. The CLI loads it as a built-in extension; SDK users add\n * `createBuiltinSkillsExtension()` to their extension factories.\n *\n * It adds the bundled skills (`review`, `batch`, `find-skills`, `grill-me`, `handoff`, `mcp-builder`, and\n * `ui-ux-pro-max`) to the session's skills, so the model can use them, with `/review`, `/batch`, `/grill-me`, and\n * `/handoff` as shortcuts for their `/skill:` commands. `grill-me` and `handoff` run only on request. A project or user\n * skill of the same name wins. `/learn` asks the agent to turn a document, URL, or text into a new project skill.\n */\n\nimport { existsSync, readdirSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { getBundledSkillsDir } from \"../../config.ts\";\nimport type { ExtensionAPI, ExtensionFactory } from \"../../core/extensions/types.ts\";\nimport { learnPrompt } from \"./learn.ts\";\n\nconst SKILL_COMMANDS = [\n\t{\n\t\tname: \"review\",\n\t\tdescription: \"Review code changes: [pr-number|pr-url|file-path] [--effort low|medium|high] [--comment] [--fix]\",\n\t},\n\t{ name: \"batch\", description: \"Apply one change to many files in parallel: <operation> <file-pattern>\" },\n\t{ name: \"grill-me\", description: \"Interview me about a plan or design until every decision is settled: [topic]\" },\n\t{\n\t\tname: \"handoff\",\n\t\tdescription: \"Write a handoff document for another agent to continue: [focus of the next session]\",\n\t},\n];\n\nconst LEARN_USAGE = `Usage: /learn <path|URL|text> [focus]\nExamples:\n /learn docs/release-process.md\n /learn https://example.com/guide/deploy only the rollback steps\n /learn Always run npm run check before committing, and fix every warning`;\n\n/** Create the built-in skills extension. */\nexport function createBuiltinSkillsExtension(): ExtensionFactory {\n\treturn (diffra) => {\n\t\tdiffra.on(\"resources_discover\", () => ({ skillPaths: [getBundledSkillsDir()] }));\n\n\t\tfor (const { name, description } of SKILL_COMMANDS) {\n\t\t\tdiffra.registerCommand(name, {\n\t\t\t\tdescription,\n\t\t\t\thandler: async (args, ctx) => {\n\t\t\t\t\tif (!skillLoaded(diffra, name)) {\n\t\t\t\t\t\treturn ctx.ui.notify(\n\t\t\t\t\t\t\t`The ${name} skill is not loaded. Skills are off (--no-skills) or it failed to load.`,\n\t\t\t\t\t\t\t\"error\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tdiffra.sendUserMessage(`/skill:${name} ${args}`.trim(), {\n\t\t\t\t\t\texpandPromptTemplates: true,\n\t\t\t\t\t\t...(ctx.isIdle() ? {} : { deliverAs: \"followUp\" }),\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tdiffra.registerCommand(\"learn\", {\n\t\t\tdescription: \"Create a reusable skill from a knowledge source (file, URL, conversation, or text)\",\n\t\t\thandler: async (args, ctx) => {\n\t\t\t\tconst input = args.trim();\n\t\t\t\tif (!input) return ctx.ui.notify(LEARN_USAGE, \"error\");\n\t\t\t\tdiffra.sendUserMessage(\n\t\t\t\t\tlearnPrompt(input, existingSkills(ctx.cwd)),\n\t\t\t\t\tctx.isIdle() ? undefined : { deliverAs: \"followUp\" },\n\t\t\t\t);\n\t\t\t},\n\t\t});\n\t};\n}\n\nfunction skillLoaded(diffra: ExtensionAPI, name: string): boolean {\n\treturn diffra.getCommands().some((command) => command.name === `skill:${name}`);\n}\n\n/** Names of the project's skill directories, so a learned skill does not reuse one. */\nfunction existingSkills(cwd: string): string[] {\n\tconst dir = join(cwd, \".diffra\", \"skills\");\n\tif (!existsSync(dir)) return [];\n\treturn readdirSync(dir, { withFileTypes: true })\n\t\t.filter((entry) => entry.isDirectory())\n\t\t.map((entry) => entry.name);\n}\n\nexport default createBuiltinSkillsExtension();\n"]}
|
package/dist/rpc-entry.js
CHANGED
|
File without changes
|
package/docs/builtin-skills.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Built-in Skills
|
|
2
2
|
|
|
3
|
-
Diffra ships
|
|
3
|
+
Diffra ships seven skills and a command. They come from the built-in extension `builtin:skills`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
| Skill | What it does | Shortcut | The model uses it on its own |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| `review` | Reviews code changes | `/review` | yes |
|
|
8
|
+
| `batch` | Applies one change to many files in parallel | `/batch` | yes |
|
|
9
|
+
| `find-skills` | Finds and installs skills from the open skills ecosystem | | yes |
|
|
10
|
+
| `mcp-builder` | Guides building and evaluating an MCP server | | yes |
|
|
11
|
+
| `ui-ux-pro-max` | UI/UX design guidance with a searchable local database | | yes |
|
|
12
|
+
| `grill-me` | Interviews you about a plan until every decision is settled | `/grill-me` | no |
|
|
13
|
+
| `handoff` | Writes a handoff document for another agent | `/handoff` | no |
|
|
14
|
+
|
|
15
|
+
`/learn` turns a document, page, or text into a new skill.
|
|
16
|
+
|
|
17
|
+
These are ordinary [skills](skills.md): every skill runs as `/skill:<name>`, and the shortcuts are the same commands. The model sees the skills it may use on its own in its skill list; `grill-me` and `handoff` set `disable-model-invocation` and run only when you ask. A project or user skill with the same name replaces the built-in one.
|
|
6
18
|
|
|
7
19
|
## /review
|
|
8
20
|
|
|
@@ -35,6 +47,35 @@ Posting never approves or requests changes on your own pull request, and does no
|
|
|
35
47
|
|
|
36
48
|
The agent finds the matching files (leaving out tests, generated and vendored directories, lock files, minified and binary files, and files over 500 KB), splits them into up to 5 chunks, and runs one `general-purpose` subagent per chunk in parallel. It reports every file as succeeded, failed, or skipped. It stops above 100 files and lists the files above 50. Ask for a dry run to see the plan first. All workers edit the same working tree.
|
|
37
49
|
|
|
50
|
+
## find-skills
|
|
51
|
+
|
|
52
|
+
Ask for a skill ("is there a skill for Playwright tests?") and the agent searches with the [Skills CLI](https://skills.sh/) (`npx skills find`, which needs Node.js and network access), checks install counts, the source, and the skill's files, and suggests what fits. It installs only after you choose a skill and a scope, with `-a pi`, which writes to `~/.agents/skills/` (with `-g`) or the project's `.agents/skills/`; Diffra reads both. Run `/reload` to use the new skill. Adapted from vercel-labs/skills (MIT).
|
|
53
|
+
|
|
54
|
+
## grill-me
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
/grill-me the plan in .diffra/plans/cache.md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The agent maps the plan as a tree of decisions and asks every question it can ask now in one round, each with its recommended answer, then waits for your answers before the next round. It looks up facts itself, with an `Explore` subagent for broad searches, and puts only decisions to you. It ends with a summary of the decisions and does not act on the plan until you confirm. Adapted from mattpocock/skills (MIT).
|
|
61
|
+
|
|
62
|
+
## handoff
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
/handoff
|
|
66
|
+
/handoff finish the settings migration
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The agent writes a summary of the conversation for a fresh agent: the goal, the state, the decisions and why, open questions, next steps, and the skills to load. It references plans, specs, and commits by path instead of copying them, redacts secrets, and saves the file in the system's temporary directory (not the workspace), named `handoff-<topic>-<date>.md`. Text after the command says what the next session will focus on. Adapted from mattpocock/skills (MIT).
|
|
70
|
+
|
|
71
|
+
## mcp-builder
|
|
72
|
+
|
|
73
|
+
A guide for building an MCP server in TypeScript or Python: research and planning, implementation, testing, and evaluation, with reference guides for both SDKs and for writing evaluation questions. Evaluations run with Diffra itself: the server is registered with `diffra mcp add`, and each question runs in `diffra --print --no-session --tools 'mcp__<server>__*'`, so the answer can come only from the server's tools. Adapted from anthropics/skills (Apache-2.0); the upstream Python harness, which calls the Anthropic API, is not included.
|
|
74
|
+
|
|
75
|
+
## ui-ux-pro-max
|
|
76
|
+
|
|
77
|
+
UI/UX rules by priority (accessibility, interaction, performance, style, layout, typography and color, motion, forms, navigation, charts) and a search tool over a local database of styles, palettes, font pairings, UX guidelines, icons, charts, and guidelines for 22 stacks. `--design-system` proposes a whole design system for a product and can save it to `design-system/<project>/MASTER.md`, export tokens, and write an HTML preview. The search tool needs Python 3 (standard library only, no network); without it, the agent says so and falls back to the written rules. Adapted from nextlevelbuilder/ui-ux-pro-max-skill v2.15.0 (MIT); the upstream data-maintenance scripts, tests, and catalog sources are not included.
|
|
78
|
+
|
|
38
79
|
## /learn
|
|
39
80
|
|
|
40
81
|
```text
|
|
@@ -45,6 +86,8 @@ The agent finds the matching files (leaving out tests, generated and vendored di
|
|
|
45
86
|
|
|
46
87
|
The agent reads the source (with `web_fetch` for a URL, the file tools for a path, or the text itself), treating it as data rather than instructions, and writes `.diffra/skills/learned-skill-<name>/SKILL.md` with `source: learned` in its frontmatter and sections When to Use, Procedure, and Pitfalls. Text after a URL or path says what to focus on. `/reload` makes the new skill available as `/skill:<name>`. Project skills load only in a trusted project.
|
|
47
88
|
|
|
89
|
+
Each adapted skill keeps its upstream license file in its folder.
|
|
90
|
+
|
|
48
91
|
## Differences from Qwen Code
|
|
49
92
|
|
|
50
93
|
- `/review` is a skill the model follows with its own tools. Qwen Code's review uses deterministic helper commands (`qwen review fetch-pr`, `compose-review`, and others), review worktrees, a cache, incremental re-reviews, `--resume`, `--topology`, Aone Code, and `review.*` settings; Diffra has none of these.
|
package/docs/docs.json
CHANGED
package/docs/skills.md
CHANGED
|
@@ -56,7 +56,7 @@ Set `disable-model-invocation: true` in frontmatter when a skill should be avail
|
|
|
56
56
|
|
|
57
57
|
## Built-in skills
|
|
58
58
|
|
|
59
|
-
Diffra ships the `review` and `
|
|
59
|
+
Diffra ships the `review`, `batch`, `find-skills`, `grill-me`, `handoff`, `mcp-builder`, and `ui-ux-pro-max` skills, with `/review`, `/batch`, `/grill-me`, and `/handoff` as shortcuts. A skill of yours with the same name replaces the built-in one. See [Built-in Skills](builtin-skills.md), which also covers `/learn` for turning a document into a skill.
|
|
60
60
|
|
|
61
61
|
## Add it to Diffra
|
|
62
62
|
|
package/docs/slash-commands.md
CHANGED
|
@@ -58,6 +58,8 @@ Review a session before exporting or sharing it. Sessions can contain prompts, t
|
|
|
58
58
|
| `/goal [<objective> \| set \| edit \| pause \| resume \| clear]` | Show, set, or control a [Goal](goals.md) the agent works toward across turns |
|
|
59
59
|
| `/review [target] [--effort ...] [--comment] [--fix]` | Review local changes, a pull request, or a file with the built-in [review skill](builtin-skills.md#review) |
|
|
60
60
|
| `/batch <operation> <file-pattern>` | Apply one change to many files with parallel subagents ([batch skill](builtin-skills.md#batch)) |
|
|
61
|
+
| `/grill-me [topic]` | Have the agent interview you about a plan or design until every decision is settled ([grill-me skill](builtin-skills.md#grill-me)) |
|
|
62
|
+
| `/handoff [focus]` | Write a handoff document for a new session or another agent ([handoff skill](builtin-skills.md#handoff)) |
|
|
61
63
|
| `/learn <path\|URL\|text> [focus]` | Turn a source into a project skill under `.diffra/skills/` ([details](builtin-skills.md#learn)) |
|
|
62
64
|
| `/lsp` | List the [language servers](lsp.md) of the project and their status (when LSP is on) |
|
|
63
65
|
| `/loop [interval] [prompt] \| list \| clear` | Run a prompt now and again on an interval or at the model's pace; see [Schedule Prompts and Loops](scheduled-tasks.md) |
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diffra-ai/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"diffraConfig": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"prepublishOnly": "npm run clean && npm run build"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@diffra-ai/agent-core": "0.2.
|
|
45
|
-
"@diffra-ai/ai": "0.2.
|
|
46
|
-
"@diffra-ai/codemode": "0.2.
|
|
47
|
-
"@diffra-ai/mcp": "0.2.
|
|
48
|
-
"@diffra-ai/tui": "0.2.
|
|
44
|
+
"@diffra-ai/agent-core": "0.2.2",
|
|
45
|
+
"@diffra-ai/ai": "0.2.2",
|
|
46
|
+
"@diffra-ai/codemode": "0.2.2",
|
|
47
|
+
"@diffra-ai/mcp": "0.2.2",
|
|
48
|
+
"@diffra-ai/tui": "0.2.2",
|
|
49
49
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
50
50
|
"brace-expansion": "5.0.12",
|
|
51
51
|
"chalk": "6.0.0",
|