@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.
Files changed (140) hide show
  1. package/.agents/plugins/marketplace.json +21 -0
  2. package/.claude-plugin/marketplace.json +29 -0
  3. package/.claude-plugin/plugin.json +9 -0
  4. package/.clinerules/lexis-two.md +163 -0
  5. package/.codex-plugin/plugin.json +31 -0
  6. package/.cursor/rules/lexis-two.mdc +169 -0
  7. package/.env.example +8 -0
  8. package/.github/FUNDING.yml +1 -0
  9. package/.github/copilot-instructions.md +47 -0
  10. package/.github/plugin/marketplace.json +20 -0
  11. package/.github/plugin/plugin.json +16 -0
  12. package/.github/workflows/deploy-site.yml +53 -0
  13. package/.github/workflows/test.yml +29 -0
  14. package/.kiro/steering/lexis-two.md +167 -0
  15. package/.nojekyll +0 -0
  16. package/.opencode/command/lexis-two-audit.md +5 -0
  17. package/.opencode/command/lexis-two-debt.md +5 -0
  18. package/.opencode/command/lexis-two-help.md +5 -0
  19. package/.opencode/command/lexis-two-plan.md +5 -0
  20. package/.opencode/command/lexis-two-review.md +5 -0
  21. package/.opencode/command/lexis-two-security.md +5 -0
  22. package/.opencode/command/lexis-two.md +5 -0
  23. package/.opencode/plugins/lexis-two.mjs +74 -0
  24. package/.windsurf/rules/lexis-two.md +163 -0
  25. package/AGENTS.md +163 -0
  26. package/AUDIT.md +74 -0
  27. package/CNAME +1 -0
  28. package/LICENSE +23 -0
  29. package/README.md +301 -0
  30. package/SPECXIS.md +576 -0
  31. package/assets/benchmark-3model.svg +21 -0
  32. package/assets/lexis-two-complete.webp +0 -0
  33. package/assets/lexis-two-nobg.png +0 -0
  34. package/assets/logo.png +0 -0
  35. package/assets/social-preview.png +0 -0
  36. package/benchmarks/README.md +114 -0
  37. package/benchmarks/arms/baseline.js +2 -0
  38. package/benchmarks/arms/caveman-SKILL.md +67 -0
  39. package/benchmarks/arms/caveman.js +8 -0
  40. package/benchmarks/arms/lexis-two.js +10 -0
  41. package/benchmarks/arms/ponytail.js +6 -0
  42. package/benchmarks/behavior.js +58 -0
  43. package/benchmarks/behavior.yaml +40 -0
  44. package/benchmarks/benchmark-local.py +156 -0
  45. package/benchmarks/benchmark-opencode-go.js +294 -0
  46. package/benchmarks/correctness.js +294 -0
  47. package/benchmarks/lib/aggregate-opencode-go.js +103 -0
  48. package/benchmarks/lib/load-env.js +31 -0
  49. package/benchmarks/lib/opencode-go-client.js +151 -0
  50. package/benchmarks/loc.js +13 -0
  51. package/benchmarks/opencode-go-models.json +31 -0
  52. package/benchmarks/promptfooconfig.yaml +41 -0
  53. package/benchmarks/prompts.json +15 -0
  54. package/benchmarks/render-opencode-go-report.js +28 -0
  55. package/benchmarks/results/2026-06-15-llama3.2-local.md +76 -0
  56. package/benchmarks/results/2026-06-16-opencode-go.md +56 -0
  57. package/benchmarks/results/opencode-go-2026-06-16-report.html +226 -0
  58. package/benchmarks/results/opencode-go-2026-06-16.json +1339 -0
  59. package/commands/lexis-two-audit.toml +3 -0
  60. package/commands/lexis-two-debt.toml +3 -0
  61. package/commands/lexis-two-help.toml +3 -0
  62. package/commands/lexis-two-plan.toml +3 -0
  63. package/commands/lexis-two-review.toml +3 -0
  64. package/commands/lexis-two-security.toml +3 -0
  65. package/commands/lexis-two.toml +3 -0
  66. package/docs/assets/lexis-two-nobg.png +0 -0
  67. package/docs/assets/logo.png +0 -0
  68. package/docs/assets/logo.svg +4 -0
  69. package/docs/portability.md +147 -0
  70. package/docs/site.md +52 -0
  71. package/examples/api-endpoint.md +68 -0
  72. package/examples/caching.md +74 -0
  73. package/examples/date-picker.md +48 -0
  74. package/examples/email-validation.md +51 -0
  75. package/examples/sorting.md +42 -0
  76. package/gemini-extension.json +7 -0
  77. package/hooks/copilot-hooks.json +21 -0
  78. package/hooks/hooks.json +31 -0
  79. package/hooks/lexis-two-activate.js +72 -0
  80. package/hooks/lexis-two-config.js +101 -0
  81. package/hooks/lexis-two-instructions.js +126 -0
  82. package/hooks/lexis-two-mode-tracker.js +55 -0
  83. package/hooks/lexis-two-runtime.js +50 -0
  84. package/hooks/lexis-two-statusline.ps1 +19 -0
  85. package/hooks/lexis-two-statusline.sh +11 -0
  86. package/opencode.json +4 -0
  87. package/package.json +31 -0
  88. package/pi-extension/index.js +161 -0
  89. package/pi-extension/package.json +8 -0
  90. package/pi-extension/test/extension.test.js +89 -0
  91. package/pi-extension/test/helpers.test.js +35 -0
  92. package/scripts/check-rule-copies.js +82 -0
  93. package/site/astro.config.mjs +18 -0
  94. package/site/package-lock.json +4913 -0
  95. package/site/package.json +14 -0
  96. package/site/public/CNAME +1 -0
  97. package/site/public/assets/lexis-two-nobg.png +0 -0
  98. package/site/public/assets/logo.png +0 -0
  99. package/site/public/assets/logo.svg +4 -0
  100. package/site/public/robots.txt +4 -0
  101. package/site/src/components/Adapt.astro +33 -0
  102. package/site/src/components/Benchmarks.astro +232 -0
  103. package/site/src/components/Commands.astro +33 -0
  104. package/site/src/components/Ecosystem.astro +30 -0
  105. package/site/src/components/Example.astro +77 -0
  106. package/site/src/components/Footer.astro +28 -0
  107. package/site/src/components/Header.astro +87 -0
  108. package/site/src/components/Hero.astro +58 -0
  109. package/site/src/components/Home.astro +46 -0
  110. package/site/src/components/Hosts.astro +62 -0
  111. package/site/src/components/Install.astro +143 -0
  112. package/site/src/components/LanguageSwitcher.astro +82 -0
  113. package/site/src/components/Philosophy.astro +23 -0
  114. package/site/src/components/Stacks.astro +33 -0
  115. package/site/src/components/Suggested.astro +39 -0
  116. package/site/src/data/opencode-go-benchmark.json +230 -0
  117. package/site/src/i18n/en.ts +155 -0
  118. package/site/src/i18n/es.ts +158 -0
  119. package/site/src/i18n/index.ts +14 -0
  120. package/site/src/layouts/Layout.astro +114 -0
  121. package/site/src/pages/benchmarks.astro +4 -0
  122. package/site/src/pages/es/benchmarks.astro +4 -0
  123. package/site/src/pages/es/index.astro +10 -0
  124. package/site/src/pages/index.astro +10 -0
  125. package/site/src/styles/global.css +780 -0
  126. package/site/tsconfig.json +3 -0
  127. package/skills/lexis-two/SKILL.md +109 -0
  128. package/skills/lexis-two-audit/SKILL.md +21 -0
  129. package/skills/lexis-two-debt/SKILL.md +22 -0
  130. package/skills/lexis-two-plan/SKILL.md +25 -0
  131. package/skills/lexis-two-review/SKILL.md +24 -0
  132. package/skills/lexis-two-security/SKILL.md +24 -0
  133. package/tests/behavior.test.js +80 -0
  134. package/tests/commands.test.js +40 -0
  135. package/tests/copilot-plugin.test.js +33 -0
  136. package/tests/correctness.test.js +191 -0
  137. package/tests/gemini-extension.test.js +78 -0
  138. package/tests/hooks-windows.test.js +48 -0
  139. package/tests/hooks.test.js +177 -0
  140. package/tests/opencode-plugin.test.js +64 -0
@@ -0,0 +1,35 @@
1
+ import test from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { resolveSessionMode, parseLexisCommand } from "../index.js";
4
+
5
+ test("resolveSessionMode resolves mode from branch entries", () => {
6
+ const entries = [
7
+ { type: "user-message", text: "hello" },
8
+ { type: "custom", customType: "lexis-two-mode", data: { mode: "lite" } },
9
+ { type: "assistant-message", text: "world" },
10
+ ];
11
+ assert.equal(resolveSessionMode(entries, "full"), "lite");
12
+ });
13
+
14
+ test("resolveSessionMode falls back to default mode if no entries", () => {
15
+ assert.equal(resolveSessionMode([], "lite"), "lite");
16
+ });
17
+
18
+ test("parseLexisCommand parses empty command as default toggle", () => {
19
+ assert.deepEqual(parseLexisCommand("", "full"), { type: "set-mode", mode: "full" });
20
+ assert.deepEqual(parseLexisCommand(" ", "off"), { type: "set-mode", mode: "full" });
21
+ });
22
+
23
+ test("parseLexisCommand parses status command", () => {
24
+ assert.deepEqual(parseLexisCommand("status"), { type: "status" });
25
+ });
26
+
27
+ test("parseLexisCommand parses default command", () => {
28
+ assert.deepEqual(parseLexisCommand("default lite"), { type: "set-default", mode: "lite" });
29
+ assert.deepEqual(parseLexisCommand("default invalid"), { type: "invalid", reason: "invalid-default-mode" });
30
+ });
31
+
32
+ test("parseLexisCommand parses mode command", () => {
33
+ assert.deepEqual(parseLexisCommand("ultra"), { type: "set-mode", mode: "ultra" });
34
+ assert.deepEqual(parseLexisCommand("invalid"), { type: "invalid", reason: "invalid-mode", mode: "invalid" });
35
+ });
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env node
2
+ // lexis-two — rule copy integrity check
3
+ //
4
+ // To avoid runtime overhead, instruction-tier hosts (Windsurf, Cline, Kiro,
5
+ // Cursor) load static copies of the rules. This script acts as a build/CI guard
6
+ // to ensure those copies never drift from the canonical source (AGENTS.md).
7
+ //
8
+ // It asserts that:
9
+ // 1. Every rule copy file exists.
10
+ // 2. Every copy is completely identical to AGENTS.md (ignoring host-specific frontmatter).
11
+ // 3. The canonical AGENTS.md itself contains the load-bearing Lexis-Two rules.
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ const root = path.join(__dirname, '..');
17
+
18
+ // Canonical source of truth
19
+ const SOURCE_FILE = 'AGENTS.md';
20
+
21
+ // Static copies to validate
22
+ const COPIES = [
23
+ '.windsurf/rules/lexis-two.md',
24
+ '.clinerules/lexis-two.md',
25
+ '.kiro/steering/lexis-two.md',
26
+ '.cursor/rules/lexis-two.mdc',
27
+ ];
28
+
29
+ // Load-bearing phrases that MUST exist in the source of truth. If these are
30
+ // missing, the source file has been gutted, and the copies are validating
31
+ // against an empty shell.
32
+ const INVARIANTS = [
33
+ 'lazy senior',
34
+ 'Input validation at trust boundaries',
35
+ 'YAGNI',
36
+ ];
37
+
38
+ function read(relPath) {
39
+ try {
40
+ return fs.readFileSync(path.join(root, relPath), 'utf8');
41
+ } catch (e) {
42
+ console.error(`Error: failed to read ${relPath}`);
43
+ process.exit(1);
44
+ }
45
+ }
46
+
47
+ // 1. Validate canonical source
48
+ const source = read(SOURCE_FILE);
49
+ for (const phrase of INVARIANTS) {
50
+ if (!source.includes(phrase)) {
51
+ console.error(`Error: canonical source (${SOURCE_FILE}) is missing load-bearing rule: "${phrase}"`);
52
+ process.exit(1);
53
+ }
54
+ }
55
+
56
+ // Helper to strip frontmatter (metadata blocks between '---' at start of file)
57
+ function stripFrontmatter(content) {
58
+ return content.replace(/^---[\s\S]*?---\s*/, '');
59
+ }
60
+
61
+ // 2. Validate copies
62
+ let failed = false;
63
+ const canonicalBody = stripFrontmatter(source).trim();
64
+
65
+ for (const copyPath of COPIES) {
66
+ const copyContent = read(copyPath);
67
+ const copyBody = stripFrontmatter(copyContent).trim();
68
+
69
+ if (copyBody !== canonicalBody) {
70
+ console.error(`Drift detected: ${copyPath} does not match ${SOURCE_FILE}`);
71
+ failed = true;
72
+ }
73
+ }
74
+
75
+ if (failed) {
76
+ console.error('\nIntegrity check FAILED. Rule copies have drifted from AGENTS.md.');
77
+ console.error('To fix, copy AGENTS.md content into the drifted files, preserving their frontmatter if any.');
78
+ process.exit(1);
79
+ }
80
+
81
+ console.log('Rule copy integrity check PASSED.');
82
+ process.exit(0);
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from "astro/config";
2
+ import sitemap from "@astrojs/sitemap";
3
+
4
+ export default defineConfig({
5
+ site: "https://lexis-two.excelso.xyz",
6
+ output: "static",
7
+ i18n: {
8
+ defaultLocale: "en",
9
+ locales: ["en", "es"],
10
+ routing: {
11
+ prefixDefaultLocale: false,
12
+ },
13
+ },
14
+ build: {
15
+ format: "directory",
16
+ },
17
+ integrations: [sitemap()],
18
+ });