@draig/lexis-two 1.0.0
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/.agents/plugins/marketplace.json +21 -0
- package/.claude-plugin/marketplace.json +29 -0
- package/.claude-plugin/plugin.json +9 -0
- package/.clinerules/lexis-two.md +163 -0
- package/.codex-plugin/plugin.json +31 -0
- package/.cursor/rules/lexis-two.mdc +169 -0
- package/.env.example +8 -0
- package/.github/FUNDING.yml +1 -0
- package/.github/copilot-instructions.md +47 -0
- package/.github/plugin/marketplace.json +20 -0
- package/.github/plugin/plugin.json +16 -0
- package/.github/workflows/deploy-site.yml +53 -0
- package/.github/workflows/test.yml +29 -0
- package/.kiro/steering/lexis-two.md +167 -0
- package/.nojekyll +0 -0
- package/.opencode/command/lexis-two-audit.md +5 -0
- package/.opencode/command/lexis-two-debt.md +5 -0
- package/.opencode/command/lexis-two-help.md +5 -0
- package/.opencode/command/lexis-two-plan.md +5 -0
- package/.opencode/command/lexis-two-review.md +5 -0
- package/.opencode/command/lexis-two-security.md +5 -0
- package/.opencode/command/lexis-two.md +5 -0
- package/.opencode/plugins/lexis-two.mjs +74 -0
- package/.windsurf/rules/lexis-two.md +163 -0
- package/AGENTS.md +163 -0
- package/AUDIT.md +74 -0
- package/CNAME +1 -0
- package/LICENSE +23 -0
- package/README.md +301 -0
- package/SPECXIS.md +576 -0
- package/assets/benchmark-3model.svg +21 -0
- package/assets/lexis-two-complete.webp +0 -0
- package/assets/lexis-two-nobg.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/social-preview.png +0 -0
- package/benchmarks/README.md +114 -0
- package/benchmarks/arms/baseline.js +2 -0
- package/benchmarks/arms/caveman-SKILL.md +67 -0
- package/benchmarks/arms/caveman.js +8 -0
- package/benchmarks/arms/lexis-two.js +10 -0
- package/benchmarks/arms/ponytail.js +6 -0
- package/benchmarks/behavior.js +58 -0
- package/benchmarks/behavior.yaml +40 -0
- package/benchmarks/benchmark-local.py +156 -0
- package/benchmarks/benchmark-opencode-go.js +294 -0
- package/benchmarks/correctness.js +294 -0
- package/benchmarks/lib/aggregate-opencode-go.js +103 -0
- package/benchmarks/lib/load-env.js +31 -0
- package/benchmarks/lib/opencode-go-client.js +151 -0
- package/benchmarks/loc.js +13 -0
- package/benchmarks/opencode-go-models.json +31 -0
- package/benchmarks/promptfooconfig.yaml +41 -0
- package/benchmarks/prompts.json +15 -0
- package/benchmarks/render-opencode-go-report.js +28 -0
- package/benchmarks/results/2026-06-15-llama3.2-local.md +76 -0
- package/benchmarks/results/2026-06-16-opencode-go.md +56 -0
- package/benchmarks/results/opencode-go-2026-06-16-report.html +226 -0
- package/benchmarks/results/opencode-go-2026-06-16.json +1339 -0
- package/commands/lexis-two-audit.toml +3 -0
- package/commands/lexis-two-debt.toml +3 -0
- package/commands/lexis-two-help.toml +3 -0
- package/commands/lexis-two-plan.toml +3 -0
- package/commands/lexis-two-review.toml +3 -0
- package/commands/lexis-two-security.toml +3 -0
- package/commands/lexis-two.toml +3 -0
- package/docs/assets/lexis-two-nobg.png +0 -0
- package/docs/assets/logo.png +0 -0
- package/docs/assets/logo.svg +4 -0
- package/docs/portability.md +147 -0
- package/docs/site.md +52 -0
- package/examples/api-endpoint.md +68 -0
- package/examples/caching.md +74 -0
- package/examples/date-picker.md +48 -0
- package/examples/email-validation.md +51 -0
- package/examples/sorting.md +42 -0
- package/gemini-extension.json +7 -0
- package/hooks/copilot-hooks.json +21 -0
- package/hooks/hooks.json +31 -0
- package/hooks/lexis-two-activate.js +72 -0
- package/hooks/lexis-two-config.js +101 -0
- package/hooks/lexis-two-instructions.js +126 -0
- package/hooks/lexis-two-mode-tracker.js +55 -0
- package/hooks/lexis-two-runtime.js +50 -0
- package/hooks/lexis-two-statusline.ps1 +19 -0
- package/hooks/lexis-two-statusline.sh +11 -0
- package/opencode.json +4 -0
- package/package.json +31 -0
- package/pi-extension/index.js +161 -0
- package/pi-extension/package.json +8 -0
- package/pi-extension/test/extension.test.js +89 -0
- package/pi-extension/test/helpers.test.js +35 -0
- package/scripts/check-rule-copies.js +82 -0
- package/site/astro.config.mjs +18 -0
- package/site/package-lock.json +4913 -0
- package/site/package.json +14 -0
- package/site/public/CNAME +1 -0
- package/site/public/assets/lexis-two-nobg.png +0 -0
- package/site/public/assets/logo.png +0 -0
- package/site/public/assets/logo.svg +4 -0
- package/site/public/robots.txt +4 -0
- package/site/src/components/Adapt.astro +33 -0
- package/site/src/components/Benchmarks.astro +232 -0
- package/site/src/components/Commands.astro +33 -0
- package/site/src/components/Ecosystem.astro +30 -0
- package/site/src/components/Example.astro +77 -0
- package/site/src/components/Footer.astro +28 -0
- package/site/src/components/Header.astro +87 -0
- package/site/src/components/Hero.astro +58 -0
- package/site/src/components/Home.astro +46 -0
- package/site/src/components/Hosts.astro +62 -0
- package/site/src/components/Install.astro +143 -0
- package/site/src/components/LanguageSwitcher.astro +82 -0
- package/site/src/components/Philosophy.astro +23 -0
- package/site/src/components/Stacks.astro +33 -0
- package/site/src/components/Suggested.astro +39 -0
- package/site/src/data/opencode-go-benchmark.json +230 -0
- package/site/src/i18n/en.ts +155 -0
- package/site/src/i18n/es.ts +158 -0
- package/site/src/i18n/index.ts +14 -0
- package/site/src/layouts/Layout.astro +114 -0
- package/site/src/pages/benchmarks.astro +4 -0
- package/site/src/pages/es/benchmarks.astro +4 -0
- package/site/src/pages/es/index.astro +10 -0
- package/site/src/pages/index.astro +10 -0
- package/site/src/styles/global.css +780 -0
- package/site/tsconfig.json +3 -0
- package/skills/lexis-two/SKILL.md +109 -0
- package/skills/lexis-two-audit/SKILL.md +21 -0
- package/skills/lexis-two-debt/SKILL.md +22 -0
- package/skills/lexis-two-plan/SKILL.md +25 -0
- package/skills/lexis-two-review/SKILL.md +24 -0
- package/skills/lexis-two-security/SKILL.md +24 -0
- package/tests/behavior.test.js +80 -0
- package/tests/commands.test.js +40 -0
- package/tests/copilot-plugin.test.js +33 -0
- package/tests/correctness.test.js +191 -0
- package/tests/gemini-extension.test.js +78 -0
- package/tests/hooks-windows.test.js +48 -0
- package/tests/hooks.test.js +177 -0
- package/tests/opencode-plugin.test.js +64 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lexis-two-site",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "astro dev",
|
|
7
|
+
"build": "astro build",
|
|
8
|
+
"preview": "astro preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@astrojs/sitemap": "^3.7.3",
|
|
12
|
+
"astro": "^6.4.7"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lexis-two.excelso.xyz
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 48" role="img" aria-label="Lexis-Two">
|
|
2
|
+
<rect x="0" y="8" width="220" height="32" rx="4" fill="#141816" stroke="#7cba8a" stroke-width="1.5"/>
|
|
3
|
+
<text x="110" y="30" fill="#7cba8a" font-family="ui-monospace, monospace" font-size="14" font-weight="600" text-anchor="middle" letter-spacing="0.12em">LEXIS-TWO</text>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
adapt: {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
cards: readonly {
|
|
7
|
+
title: string;
|
|
8
|
+
desc: string;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { adapt } = Astro.props;
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<section id="adapt">
|
|
17
|
+
<div class="wrap">
|
|
18
|
+
<div class="section-head">
|
|
19
|
+
<h2>{adapt.title}</h2>
|
|
20
|
+
<p>{adapt.subtitle}</p>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="adapt-list">
|
|
23
|
+
{
|
|
24
|
+
adapt.cards.map((card) => (
|
|
25
|
+
<article class="adapt-card">
|
|
26
|
+
<h3>{card.title}</h3>
|
|
27
|
+
<p set:html={card.desc} />
|
|
28
|
+
</article>
|
|
29
|
+
))
|
|
30
|
+
}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</section>
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
---
|
|
2
|
+
import benchmarkData from "../data/opencode-go-benchmark.json";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
benchmarks: {
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle: string;
|
|
8
|
+
runDate: string;
|
|
9
|
+
runsPerCell: string;
|
|
10
|
+
source: string;
|
|
11
|
+
totalLoc: string;
|
|
12
|
+
reduction: string;
|
|
13
|
+
time: string;
|
|
14
|
+
byTask: string;
|
|
15
|
+
summary: string;
|
|
16
|
+
colModel: string;
|
|
17
|
+
colBaseline: string;
|
|
18
|
+
colLexis: string;
|
|
19
|
+
colReduction: string;
|
|
20
|
+
colCorrect: string;
|
|
21
|
+
regenerate: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const { benchmarks } = Astro.props;
|
|
26
|
+
const chartPayload = JSON.stringify(benchmarkData);
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<section id="benchmarks" class="benchmark-page">
|
|
30
|
+
<div class="wrap">
|
|
31
|
+
<div class="section-head benchmark-head">
|
|
32
|
+
<h2>{benchmarks.title}</h2>
|
|
33
|
+
<p>{benchmarks.subtitle}</p>
|
|
34
|
+
<p class="benchmark-meta">
|
|
35
|
+
{benchmarks.runDate}: <strong>{benchmarkData.date}</strong>
|
|
36
|
+
· {benchmarkData.repeat} {benchmarks.runsPerCell}
|
|
37
|
+
· {benchmarks.source}: <code>{benchmarkData.source}</code>
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="benchmark-grid">
|
|
42
|
+
<section class="benchmark-card wide" aria-labelledby="chart-total-loc-title">
|
|
43
|
+
<h3 id="chart-total-loc-title">{benchmarks.totalLoc}</h3>
|
|
44
|
+
<canvas id="chart-total-loc" height="280"></canvas>
|
|
45
|
+
</section>
|
|
46
|
+
|
|
47
|
+
<section class="benchmark-card" aria-labelledby="chart-reduction-title">
|
|
48
|
+
<h3 id="chart-reduction-title">{benchmarks.reduction}</h3>
|
|
49
|
+
<canvas id="chart-reduction" height="280"></canvas>
|
|
50
|
+
</section>
|
|
51
|
+
|
|
52
|
+
<section class="benchmark-card" aria-labelledby="chart-time-title">
|
|
53
|
+
<h3 id="chart-time-title">{benchmarks.time}</h3>
|
|
54
|
+
<canvas id="chart-time" height="280"></canvas>
|
|
55
|
+
</section>
|
|
56
|
+
|
|
57
|
+
<section class="benchmark-card wide" aria-labelledby="chart-by-task-title">
|
|
58
|
+
<h3 id="chart-by-task-title">{benchmarks.byTask}</h3>
|
|
59
|
+
<canvas id="chart-by-task" height="280"></canvas>
|
|
60
|
+
</section>
|
|
61
|
+
|
|
62
|
+
<section class="benchmark-card wide" aria-labelledby="summary-table-title">
|
|
63
|
+
<h3 id="summary-table-title">{benchmarks.summary}</h3>
|
|
64
|
+
<div class="table-wrap">
|
|
65
|
+
<table id="summary-table">
|
|
66
|
+
<thead>
|
|
67
|
+
<tr>
|
|
68
|
+
<th scope="col">{benchmarks.colModel}</th>
|
|
69
|
+
<th scope="col">{benchmarks.colBaseline}</th>
|
|
70
|
+
<th scope="col">{benchmarks.colLexis}</th>
|
|
71
|
+
<th scope="col">{benchmarks.colReduction}</th>
|
|
72
|
+
<th scope="col">{benchmarks.colCorrect}</th>
|
|
73
|
+
</tr>
|
|
74
|
+
</thead>
|
|
75
|
+
<tbody></tbody>
|
|
76
|
+
</table>
|
|
77
|
+
</div>
|
|
78
|
+
</section>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<p class="benchmark-foot">
|
|
82
|
+
{benchmarks.regenerate}
|
|
83
|
+
<code>npm run benchmark:opencode-go && npm run benchmark:report</code>
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
86
|
+
</section>
|
|
87
|
+
|
|
88
|
+
<script define:vars={{ chartPayload, benchmarks }} is:inline>
|
|
89
|
+
(function () {
|
|
90
|
+
const CHART_JS_URL = "https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js";
|
|
91
|
+
const section = document.getElementById("benchmarks");
|
|
92
|
+
if (!section) return;
|
|
93
|
+
|
|
94
|
+
let loaded = false;
|
|
95
|
+
|
|
96
|
+
function renderCharts() {
|
|
97
|
+
if (loaded) return;
|
|
98
|
+
loaded = true;
|
|
99
|
+
|
|
100
|
+
const DATA = JSON.parse(chartPayload);
|
|
101
|
+
const labels = DATA.models.map(function (m) { return m.label; });
|
|
102
|
+
|
|
103
|
+
Chart.defaults.color = "#a0aa9e";
|
|
104
|
+
Chart.defaults.borderColor = "#1e2420";
|
|
105
|
+
Chart.defaults.font.family = "Syne, system-ui, sans-serif";
|
|
106
|
+
|
|
107
|
+
new Chart(document.getElementById("chart-total-loc"), {
|
|
108
|
+
type: "bar",
|
|
109
|
+
data: {
|
|
110
|
+
labels: labels,
|
|
111
|
+
datasets: [
|
|
112
|
+
{
|
|
113
|
+
label: "baseline",
|
|
114
|
+
data: DATA.models.map(function (m) { return m.totals.baselineLoc; }),
|
|
115
|
+
backgroundColor: "#c97a7a",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: "lexis-two",
|
|
119
|
+
data: DATA.models.map(function (m) { return m.totals.lexisLoc; }),
|
|
120
|
+
backgroundColor: "#7cba8a",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
options: {
|
|
125
|
+
responsive: true,
|
|
126
|
+
plugins: { legend: { position: "bottom" } },
|
|
127
|
+
scales: { y: { beginAtZero: true } },
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
new Chart(document.getElementById("chart-reduction"), {
|
|
132
|
+
type: "bar",
|
|
133
|
+
data: {
|
|
134
|
+
labels: labels,
|
|
135
|
+
datasets: [
|
|
136
|
+
{
|
|
137
|
+
label: benchmarks.reduction,
|
|
138
|
+
data: DATA.models.map(function (m) { return m.totals.reductionPct; }),
|
|
139
|
+
backgroundColor: "#7cba8a",
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
options: {
|
|
144
|
+
indexAxis: "y",
|
|
145
|
+
responsive: true,
|
|
146
|
+
plugins: { legend: { display: false } },
|
|
147
|
+
scales: {
|
|
148
|
+
x: { beginAtZero: true, max: 100, ticks: { callback: function (v) { return v + "%"; } } },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
new Chart(document.getElementById("chart-time"), {
|
|
154
|
+
type: "bar",
|
|
155
|
+
data: {
|
|
156
|
+
labels: labels,
|
|
157
|
+
datasets: [
|
|
158
|
+
{
|
|
159
|
+
label: "baseline",
|
|
160
|
+
data: DATA.models.map(function (m) { return m.totals.baselineTimeSec; }),
|
|
161
|
+
backgroundColor: "#c97a7a",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
label: "lexis-two",
|
|
165
|
+
data: DATA.models.map(function (m) { return m.totals.lexisTimeSec; }),
|
|
166
|
+
backgroundColor: "#7cba8a",
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
},
|
|
170
|
+
options: {
|
|
171
|
+
responsive: true,
|
|
172
|
+
plugins: { legend: { position: "bottom" } },
|
|
173
|
+
scales: { y: { beginAtZero: true } },
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
var taskColors = ["#7cba8a", "#5a9a6a", "#9fd4a8", "#4a7356", "#3d5f48"];
|
|
178
|
+
new Chart(document.getElementById("chart-by-task"), {
|
|
179
|
+
type: "bar",
|
|
180
|
+
data: {
|
|
181
|
+
labels: labels,
|
|
182
|
+
datasets: DATA.tasks.map(function (taskId, i) {
|
|
183
|
+
return {
|
|
184
|
+
label: taskId,
|
|
185
|
+
data: DATA.models.map(function (m) { return m.locByArmTask["lexis-two"][taskId]; }),
|
|
186
|
+
backgroundColor: taskColors[i % taskColors.length],
|
|
187
|
+
};
|
|
188
|
+
}),
|
|
189
|
+
},
|
|
190
|
+
options: {
|
|
191
|
+
responsive: true,
|
|
192
|
+
plugins: { legend: { position: "bottom" } },
|
|
193
|
+
scales: { y: { beginAtZero: true } },
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
var tbody = document.querySelector("#summary-table tbody");
|
|
198
|
+
DATA.models.forEach(function (m) {
|
|
199
|
+
var c = m.correctByArm["lexis-two"];
|
|
200
|
+
var tr = document.createElement("tr");
|
|
201
|
+
tr.innerHTML =
|
|
202
|
+
"<td>" + m.label + "</td>" +
|
|
203
|
+
"<td>" + m.totals.baselineLoc + "</td>" +
|
|
204
|
+
"<td class=\"good\">" + m.totals.lexisLoc + "</td>" +
|
|
205
|
+
"<td class=\"good\">" + m.totals.reductionPct + "%</td>" +
|
|
206
|
+
"<td>" + c.pass + "/" + c.total + "</td>";
|
|
207
|
+
tbody.appendChild(tr);
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function loadChartJS(callback) {
|
|
212
|
+
if (typeof Chart !== "undefined") { callback(); return; }
|
|
213
|
+
var s = document.createElement("script");
|
|
214
|
+
s.src = CHART_JS_URL;
|
|
215
|
+
s.onload = callback;
|
|
216
|
+
document.head.appendChild(s);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if ("IntersectionObserver" in window) {
|
|
220
|
+
var observer = new IntersectionObserver(function (entries) {
|
|
221
|
+
if (entries[0].isIntersecting) {
|
|
222
|
+
observer.disconnect();
|
|
223
|
+
loadChartJS(renderCharts);
|
|
224
|
+
}
|
|
225
|
+
}, { rootMargin: "200px" });
|
|
226
|
+
observer.observe(section);
|
|
227
|
+
} else {
|
|
228
|
+
// Fallback: load immediately
|
|
229
|
+
loadChartJS(renderCharts);
|
|
230
|
+
}
|
|
231
|
+
})();
|
|
232
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
commands: {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
items: readonly {
|
|
7
|
+
name: string;
|
|
8
|
+
desc: string;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { commands } = Astro.props;
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<section id="commands">
|
|
17
|
+
<div class="wrap">
|
|
18
|
+
<div class="section-head">
|
|
19
|
+
<h2>{commands.title}</h2>
|
|
20
|
+
<p>{commands.subtitle}</p>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="cmd-grid">
|
|
23
|
+
{
|
|
24
|
+
commands.items.map((cmd) => (
|
|
25
|
+
<div class="cmd-card">
|
|
26
|
+
<code>{cmd.name}</code>
|
|
27
|
+
<p>{cmd.desc}</p>
|
|
28
|
+
</div>
|
|
29
|
+
))
|
|
30
|
+
}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</section>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
ecosystem: {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { ecosystem } = Astro.props;
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<section id="ecosystem">
|
|
13
|
+
<div class="wrap">
|
|
14
|
+
<div class="section-head">
|
|
15
|
+
<h2>{ecosystem.title}</h2>
|
|
16
|
+
<p>{ecosystem.subtitle}</p>
|
|
17
|
+
</div>
|
|
18
|
+
<pre
|
|
19
|
+
class="ecosystem"
|
|
20
|
+
aria-label="Lexis ecosystem diagram">
|
|
21
|
+
Lexis-One (private) ──extracts the best──▶ Lexis-Two (public)
|
|
22
|
+
│ │
|
|
23
|
+
│ personal configuration │ portable rules + skills
|
|
24
|
+
│ providers & API keys │ multi-host adapters
|
|
25
|
+
└───────────────────────────────────────────┘
|
|
26
|
+
│
|
|
27
|
+
Lexis-Core (future)
|
|
28
|
+
public orchestrator</pre>
|
|
29
|
+
</div>
|
|
30
|
+
</section>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
example: {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
without: string;
|
|
7
|
+
with: string;
|
|
8
|
+
withoutFoot: string;
|
|
9
|
+
withFoot: string;
|
|
10
|
+
copy: string;
|
|
11
|
+
copied: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { example } = Astro.props;
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<section id="example">
|
|
19
|
+
<div class="wrap">
|
|
20
|
+
<div class="section-head">
|
|
21
|
+
<h2>{example.title}</h2>
|
|
22
|
+
<p set:html={example.subtitle} />
|
|
23
|
+
</div>
|
|
24
|
+
<div class="compare">
|
|
25
|
+
<article class="panel">
|
|
26
|
+
<div class="panel-head bad">{example.without}</div>
|
|
27
|
+
<div class="panel-body">
|
|
28
|
+
<pre><code set:html={`function quickSort(arr, compareFn = (a, b) => a - b) {
|
|
29
|
+
if (arr.length <= 1) return arr;
|
|
30
|
+
const pivot = arr[Math.floor(arr.length / 2)];
|
|
31
|
+
const left = [], right = [], equal = [];
|
|
32
|
+
for (const item of arr) {
|
|
33
|
+
const cmp = compareFn(item, pivot);
|
|
34
|
+
if (cmp < 0) left.push(item);
|
|
35
|
+
else if (cmp > 0) right.push(item);
|
|
36
|
+
else equal.push(item);
|
|
37
|
+
}
|
|
38
|
+
return [...quickSort(left), ...equal, ...quickSort(right)];
|
|
39
|
+
}`} /></pre>
|
|
40
|
+
</div>
|
|
41
|
+
<p class="panel-foot">{example.withoutFoot}</p>
|
|
42
|
+
</article>
|
|
43
|
+
<article class="panel">
|
|
44
|
+
<div class="panel-head good">{example.with}</div>
|
|
45
|
+
<div class="panel-body">
|
|
46
|
+
<button data-copied={example.copied}
|
|
47
|
+
type="button"
|
|
48
|
+
class="copy-btn"
|
|
49
|
+
data-copy="// lexis: this exists
|
|
50
|
+
numbers.sort((a, b) => a - b)"
|
|
51
|
+
>
|
|
52
|
+
{example.copy}
|
|
53
|
+
</button>
|
|
54
|
+
<pre><code>// lexis: this exists
|
|
55
|
+
numbers.sort((a, b) => a - b)</code></pre>
|
|
56
|
+
</div>
|
|
57
|
+
<p class="panel-foot"><strong set:html={example.withFoot} /></p>
|
|
58
|
+
</article>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</section>
|
|
62
|
+
|
|
63
|
+
<script>
|
|
64
|
+
document.querySelectorAll(".copy-btn").forEach(function (btn) {
|
|
65
|
+
btn.addEventListener("click", function () {
|
|
66
|
+
var text = btn.getAttribute("data-copy");
|
|
67
|
+
navigator.clipboard.writeText(text!).then(function () {
|
|
68
|
+
var prev = btn.textContent;
|
|
69
|
+
var copiedText = btn.getAttribute("data-copied") || "Copied";
|
|
70
|
+
btn.textContent = copiedText;
|
|
71
|
+
setTimeout(function () {
|
|
72
|
+
btn.textContent = prev;
|
|
73
|
+
}, 1500);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
footer: {
|
|
4
|
+
license: string;
|
|
5
|
+
forked: string;
|
|
6
|
+
built: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { footer } = Astro.props;
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<footer class="site-footer">
|
|
14
|
+
<div class="wrap">
|
|
15
|
+
<p>
|
|
16
|
+
<a href="https://github.com/nitdraig/lexis-two"
|
|
17
|
+
>github.com/nitdraig/lexis-two</a
|
|
18
|
+
>
|
|
19
|
+
· {footer.license}
|
|
20
|
+
</p>
|
|
21
|
+
<p>
|
|
22
|
+
{footer.forked}
|
|
23
|
+
<a href="https://github.com/nitdraig">@nitdraig</a>.
|
|
24
|
+
</p>
|
|
25
|
+
<p set:html={footer.built} />
|
|
26
|
+
<p>Powered by <a href="https://excelso.xyz">Excelso</a></p>
|
|
27
|
+
</div>
|
|
28
|
+
</footer>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Locale } from "../i18n/index.js";
|
|
3
|
+
import LanguageSwitcher from "./LanguageSwitcher.astro";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
locale: Locale;
|
|
7
|
+
nav: {
|
|
8
|
+
philosophy: string;
|
|
9
|
+
example: string;
|
|
10
|
+
hosts: string;
|
|
11
|
+
commands: string;
|
|
12
|
+
install: string;
|
|
13
|
+
benchmarks: string;
|
|
14
|
+
github: string;
|
|
15
|
+
skipLink: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { locale, nav } = Astro.props;
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<a class="skip-link" href="#main">{nav.skipLink}</a>
|
|
23
|
+
|
|
24
|
+
<header class="site-header">
|
|
25
|
+
<div class="wrap header-inner">
|
|
26
|
+
<a class="brand" href="#">
|
|
27
|
+
<img src="/assets/logo.png" width="220" height="48" alt="Lexis-Two" />
|
|
28
|
+
<span class="brand-text">Lexis-Two</span>
|
|
29
|
+
</a>
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
class="nav-toggle"
|
|
33
|
+
aria-expanded="false"
|
|
34
|
+
aria-controls="site-nav"
|
|
35
|
+
aria-label="Open menu"
|
|
36
|
+
>
|
|
37
|
+
<span class="nav-toggle-bar" aria-hidden="true"></span>
|
|
38
|
+
<span class="nav-toggle-bar" aria-hidden="true"></span>
|
|
39
|
+
<span class="nav-toggle-bar" aria-hidden="true"></span>
|
|
40
|
+
</button>
|
|
41
|
+
<nav id="site-nav" class="nav" aria-label="Primary">
|
|
42
|
+
<a href="#philosophy">{nav.philosophy}</a>
|
|
43
|
+
<a href="#example">{nav.example}</a>
|
|
44
|
+
<a href="#hosts">{nav.hosts}</a>
|
|
45
|
+
<a href="#commands">{nav.commands}</a>
|
|
46
|
+
<a href="#install">{nav.install}</a>
|
|
47
|
+
<a href="#benchmarks">{nav.benchmarks}</a>
|
|
48
|
+
<a href="https://github.com/nitdraig/lexis-two">{nav.github}</a>
|
|
49
|
+
<LanguageSwitcher locale={locale} />
|
|
50
|
+
</nav>
|
|
51
|
+
</div>
|
|
52
|
+
</header>
|
|
53
|
+
|
|
54
|
+
<script>
|
|
55
|
+
(function () {
|
|
56
|
+
var header = document.querySelector(".site-header");
|
|
57
|
+
var toggle = document.querySelector(".nav-toggle");
|
|
58
|
+
var nav = document.getElementById("site-nav");
|
|
59
|
+
if (!header || !toggle || !nav) return;
|
|
60
|
+
|
|
61
|
+
function setNavOpen(open: boolean) {
|
|
62
|
+
header!.classList.toggle("is-nav-open", open);
|
|
63
|
+
toggle!.setAttribute("aria-expanded", open ? "true" : "false");
|
|
64
|
+
toggle!.setAttribute("aria-label", open ? "Close menu" : "Open menu");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
toggle!.addEventListener("click", function () {
|
|
68
|
+
setNavOpen(!header!.classList.contains("is-nav-open"));
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
nav!.querySelectorAll("a").forEach(function (link) {
|
|
72
|
+
link.addEventListener("click", function () {
|
|
73
|
+
setNavOpen(false);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
document.addEventListener("keydown", function (event) {
|
|
78
|
+
if (event.key === "Escape") setNavOpen(false);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
window
|
|
82
|
+
.matchMedia("(min-width: 768px)")
|
|
83
|
+
.addEventListener("change", function (event) {
|
|
84
|
+
if (event.matches) setNavOpen(false);
|
|
85
|
+
});
|
|
86
|
+
})();
|
|
87
|
+
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Locale } from "../i18n/index.js";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
locale: Locale;
|
|
6
|
+
hero: {
|
|
7
|
+
badge: string;
|
|
8
|
+
title: string;
|
|
9
|
+
tagline: string;
|
|
10
|
+
benchmark: string;
|
|
11
|
+
ctaBenchmark: string;
|
|
12
|
+
benchmarkLink: string;
|
|
13
|
+
benchmarkCode: string;
|
|
14
|
+
ctaGitHub: string;
|
|
15
|
+
ctaInstall: string;
|
|
16
|
+
ctaDocs: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const { locale, hero } = Astro.props;
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<section class="hero">
|
|
24
|
+
<div class="wrap">
|
|
25
|
+
<div class="hero-content">
|
|
26
|
+
<img src="/assets/logo.png" width="220" height="48" alt="Lexis-Two" />
|
|
27
|
+
<p class="hero-badge">{hero.badge}</p>
|
|
28
|
+
<h1>{hero.title}</h1>
|
|
29
|
+
</div>
|
|
30
|
+
<p class="tagline">{hero.tagline}</p>
|
|
31
|
+
<p class="benchmark-note">
|
|
32
|
+
{hero.benchmark}
|
|
33
|
+
<a href="#benchmarks">{hero.ctaBenchmark}</a>
|
|
34
|
+
·
|
|
35
|
+
<a href="https://github.com/nitdraig/lexis-two/blob/main/benchmarks/README.md#opencode-go">
|
|
36
|
+
{hero.benchmarkLink}
|
|
37
|
+
</a>
|
|
38
|
+
(<code>{hero.benchmarkCode}</code>).
|
|
39
|
+
</p>
|
|
40
|
+
<div class="cta-row">
|
|
41
|
+
<a
|
|
42
|
+
class="btn btn-primary"
|
|
43
|
+
href="https://github.com/nitdraig/lexis-two"
|
|
44
|
+
rel="noopener noreferrer"
|
|
45
|
+
>
|
|
46
|
+
{hero.ctaGitHub}
|
|
47
|
+
</a>
|
|
48
|
+
<a class="btn btn-ghost" href="#install">{hero.ctaInstall}</a>
|
|
49
|
+
<a class="btn btn-ghost" href="#benchmarks">{hero.ctaBenchmark}</a>
|
|
50
|
+
<a
|
|
51
|
+
class="btn btn-ghost"
|
|
52
|
+
href="https://github.com/nitdraig/lexis-two/blob/main/docs/portability.md"
|
|
53
|
+
>
|
|
54
|
+
{hero.ctaDocs}
|
|
55
|
+
</a>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</section>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Locale } from "../i18n/index.js";
|
|
3
|
+
import { getDictionary } from "../i18n/index.js";
|
|
4
|
+
import Header from "./Header.astro";
|
|
5
|
+
import Hero from "./Hero.astro";
|
|
6
|
+
import Philosophy from "./Philosophy.astro";
|
|
7
|
+
import Example from "./Example.astro";
|
|
8
|
+
import Hosts from "./Hosts.astro";
|
|
9
|
+
import Commands from "./Commands.astro";
|
|
10
|
+
import Install from "./Install.astro";
|
|
11
|
+
import Adapt from "./Adapt.astro";
|
|
12
|
+
import Stacks from "./Stacks.astro";
|
|
13
|
+
import Suggested from "./Suggested.astro";
|
|
14
|
+
import Benchmarks from "./Benchmarks.astro";
|
|
15
|
+
import Ecosystem from "./Ecosystem.astro";
|
|
16
|
+
import Footer from "./Footer.astro";
|
|
17
|
+
|
|
18
|
+
interface Props {
|
|
19
|
+
locale: Locale;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const { locale } = Astro.props;
|
|
23
|
+
const t = getDictionary(locale);
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<Header locale={locale} nav={t.nav} />
|
|
27
|
+
|
|
28
|
+
<main id="main">
|
|
29
|
+
<Hero locale={locale} hero={t.hero} />
|
|
30
|
+
<Philosophy philosophy={t.philosophy} />
|
|
31
|
+
<Example example={t.example} />
|
|
32
|
+
<Hosts hosts={t.hosts} />
|
|
33
|
+
<Commands commands={t.commands} />
|
|
34
|
+
<Install install={t.install} />
|
|
35
|
+
<Adapt adapt={t.adapt} />
|
|
36
|
+
<Stacks stacks={t.stacks} />
|
|
37
|
+
<Suggested suggested={t.suggested} />
|
|
38
|
+
<Benchmarks benchmarks={t.benchmarks} />
|
|
39
|
+
<Ecosystem ecosystem={t.ecosystem} />
|
|
40
|
+
</main>
|
|
41
|
+
|
|
42
|
+
<Footer footer={t.footer} />
|
|
43
|
+
|
|
44
|
+
<style is:global>
|
|
45
|
+
@import "../styles/global.css";
|
|
46
|
+
</style>
|