@draig/lexis-two 1.1.0 → 1.2.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/.opencode/commands/lexis-two-debug-triage.md +5 -0
- package/.opencode/commands/lexis-two-doubt-driven.md +5 -0
- package/.opencode/commands/lexis-two-help.md +21 -1
- package/.opencode/commands/lexis-two-incremental-impl.md +5 -0
- package/.opencode/commands/lexis-two-predict.md +5 -0
- package/.opencode/commands/lexis-two-scenario.md +5 -0
- package/.opencode/commands/lexis-two-source-driven.md +5 -0
- package/.opencode/commands/lexis.md +8 -0
- package/README.md +19 -6
- package/commands/lexis-two-debug-triage.toml +3 -0
- package/commands/lexis-two-doubt-driven.toml +3 -0
- package/commands/lexis-two-help.toml +1 -1
- package/commands/lexis-two-incremental-impl.toml +3 -0
- package/commands/lexis-two-predict.toml +3 -0
- package/commands/lexis-two-scenario.toml +3 -0
- package/commands/lexis-two-source-driven.toml +3 -0
- package/commands/lexis.toml +1 -1
- package/package.json +58 -58
- package/pi-extension/index.js +63 -55
- package/scripts/install.js +3 -3
- package/skills/lexis-two-debug-triage/SKILL.md +24 -0
- package/skills/lexis-two-doubt-driven/SKILL.md +26 -0
- package/skills/lexis-two-incremental-impl/SKILL.md +27 -0
- package/skills/lexis-two-predict/SKILL.md +23 -0
- package/skills/lexis-two-scenario/SKILL.md +20 -0
- package/skills/lexis-two-source-driven/SKILL.md +22 -0
|
@@ -2,4 +2,24 @@
|
|
|
2
2
|
description: Quick reference for lexis-two levels, skills, and commands
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Show the lexis-two quick reference. One shot, change nothing: do not switch mode, write flag files, or persist anything.
|
|
5
|
+
Show the lexis-two quick reference. One shot, change nothing: do not switch mode, write flag files, or persist anything.
|
|
6
|
+
|
|
7
|
+
Levels: `/lexis lite`, `/lexis full` (default), `/lexis ultra`, `/lexis off`.
|
|
8
|
+
|
|
9
|
+
Commands (canonical `/lexis <name>`; skills live under `lexis-two-*`):
|
|
10
|
+
- `plan` — lazy feature plan before coding
|
|
11
|
+
- `review` — diff review for over-engineering
|
|
12
|
+
- `audit` — whole-repo over-engineering audit
|
|
13
|
+
- `debt` — harvest `// lexis:` comments
|
|
14
|
+
- `security` — security audit (Node/TS default)
|
|
15
|
+
- `doubt` — clarify ambiguous requirements (no code)
|
|
16
|
+
- `incremental` — smallest vertical slice first
|
|
17
|
+
- `debug` — minimal repro and smallest fix
|
|
18
|
+
- `source` — ground in docs and existing code
|
|
19
|
+
- `predict` — proposed vs lazy comparison
|
|
20
|
+
- `scenario` — happy / edge / failure scenarios
|
|
21
|
+
- `help` — this card
|
|
22
|
+
|
|
23
|
+
Legacy `/lexis-two-*` names still work with a deprecation notice.
|
|
24
|
+
|
|
25
|
+
Deactivate: `stop lexis`, `normal mode`, or `/lexis off`. Default mode: `LEXIS_TWO_DEFAULT_MODE` or `~/.config/lexis-two/config.json`.
|
|
@@ -13,6 +13,14 @@ Subcommands (when $ARGUMENTS matches):
|
|
|
13
13
|
- `audit` or `a`: audit the entire repository for over-engineering.
|
|
14
14
|
- `debt` or `d`: harvest all `// lexis:` comments into a tracked ledger.
|
|
15
15
|
- `security` or `s`: run a focused security audit on the stack.
|
|
16
|
+
- `doubt`: challenge ambiguous requirements (questions only, no code).
|
|
17
|
+
- `incremental` or `inc`: ship the smallest vertical slice first.
|
|
18
|
+
- `debug` or `triage`: minimal repro and smallest bug fix.
|
|
19
|
+
- `source` or `src`: read repo sources and official docs before inventing APIs.
|
|
20
|
+
- `predict`: compare proposed vs lazy approach (LOC, deps, maintenance).
|
|
21
|
+
- `scenario`: walk happy, edge, and failure scenarios before design.
|
|
16
22
|
- `help` or `h`: show the quick reference card.
|
|
17
23
|
|
|
24
|
+
Legacy `lexis-two-*` slash names still work but are deprecated.
|
|
25
|
+
|
|
18
26
|
Respond in Spanish.
|
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ Non-interactive example (Cursor + OpenCode + `AGENTS.md`):
|
|
|
96
96
|
npx @draig/lexis-two install --host cursor,opencode,agents --scope project --yes
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Hosts covered: Cursor, Windsurf, Cline, Kiro, OpenCode (`opencode.json` merge), `copilot-repo`, and project `AGENTS.md`. Plugin marketplaces (`claude`, `copilot`, `gemini`, `pi`) print setup hints. See [docs/setup.md](./docs/setup.md).
|
|
99
|
+
Hosts covered: Cursor, Windsurf, Cline, Kiro, OpenCode (`opencode.json` merge + slash commands), `copilot-repo`, and project `AGENTS.md`. Plugin marketplaces (`claude`, `copilot`, `gemini`, `pi`) print setup hints. See [docs/setup.md](./docs/setup.md). Modes: [docs/modes.md](./docs/modes.md).
|
|
100
100
|
|
|
101
101
|
Uninstall (removes only unchanged Lexis-Two files):
|
|
102
102
|
|
|
@@ -201,7 +201,16 @@ Manage Lexis senior dev mode, intensity levels, and quality/security tools under
|
|
|
201
201
|
* **`/lexis help` (Shortcut: `/lexis h`)**
|
|
202
202
|
* **What it does:** Displays a quick reference card with all commands, levels, and configuration options.
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
#### Workflow skills (v1.2)
|
|
205
|
+
|
|
206
|
+
* **`/lexis doubt`** — Clarify ambiguous requirements (max 3 questions, no code).
|
|
207
|
+
* **`/lexis incremental` (or `inc`)** — Ship the smallest vertical slice; defer the rest.
|
|
208
|
+
* **`/lexis debug` (or `triage`)** — Repro, smallest fix, verify — no drive-by refactors.
|
|
209
|
+
* **`/lexis source` (or `src`)** — Ground in repo code and official docs before inventing APIs.
|
|
210
|
+
* **`/lexis predict`** — Compare proposed vs lazy approach (LOC, deps, maintenance).
|
|
211
|
+
* **`/lexis scenario`** — Happy, edge, and failure scenarios before design.
|
|
212
|
+
|
|
213
|
+
_(Skill folders remain `skills/lexis-two-*`. Legacy `/lexis-two-*` slash names still work with a deprecation notice.)_
|
|
205
214
|
|
|
206
215
|
---
|
|
207
216
|
|
|
@@ -316,10 +325,10 @@ Make it easy to adopt Lexis in any new project.
|
|
|
316
325
|
- [ ] `AGENTS.template.md` — project-level AGENTS.md template with commented sections (stack, design tokens, glossary, conventions)
|
|
317
326
|
- [x] `docs/portability.md` — hosts, commands, skills, install paths
|
|
318
327
|
- [x] `docs/site.md` — GitHub Pages + `lexis-two.excelso.xyz`
|
|
319
|
-
- [x] `docs/setup.md` — installer guide (
|
|
320
|
-
- [
|
|
321
|
-
- [x] `npx lexis-two install` — setup script (
|
|
322
|
-
- [
|
|
328
|
+
- [x] `docs/setup.md` — installer guide (OpenCode merge + global commands)
|
|
329
|
+
- [x] `docs/modes.md` — lite / full / ultra / off and default resolution
|
|
330
|
+
- [x] `npx @draig/lexis-two install` — setup script (rules, OpenCode, uninstall, hints)
|
|
331
|
+
- [x] README links to `examples/` before/after catalog
|
|
323
332
|
- [x] `examples/nextjs/01-modal-library` — gold-standard before/after (B1)
|
|
324
333
|
- [x] `examples/nextjs/` + `examples/express/` — six before/after cases (B2)
|
|
325
334
|
- [x] `examples/fastapi/` — three before/after cases (B3)
|
|
@@ -399,5 +408,9 @@ Focus areas: stack-specific shortcuts for other tech stacks, new examples, addit
|
|
|
399
408
|
|
|
400
409
|
MIT — see [LICENSE](./LICENSE).
|
|
401
410
|
|
|
411
|
+
## Changelog
|
|
412
|
+
|
|
413
|
+
See [CHANGELOG.md](./CHANGELOG.md).
|
|
414
|
+
|
|
402
415
|
Original ponytail concept by [DietrichGebert](https://github.com/DietrichGebert/ponytail).
|
|
403
416
|
Lexis ecosystem by [@nitdraig](https://github.com/nitdraig).
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
name = "lexis-two-help"
|
|
2
2
|
description = "Quick reference for lexis-two levels, skills, and commands"
|
|
3
|
-
prompt = "Show the lexis-two quick reference. One shot, change nothing
|
|
3
|
+
prompt = "Show the lexis-two quick reference. One shot, change nothing. Levels: /lexis lite|full|ultra|off. Commands: /lexis plan, review, audit, debt, security, doubt, incremental, debug, source, predict, scenario, help. Legacy lexis-two-* names are deprecated."
|
package/commands/lexis.toml
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
name = "lexis"
|
|
2
2
|
description = "Manage Lexis senior dev mode, intensity levels, and quality/security tools"
|
|
3
|
-
prompt = "Manage Lexis senior dev mode. Handle the requested subcommand: plan (p), review (r), audit (a), debt (d), security (s), help (h), status, or intensity level (lite/full/ultra/off)."
|
|
3
|
+
prompt = "Manage Lexis senior dev mode. Handle the requested subcommand: plan (p), review (r), audit (a), debt (d), security (s), doubt, incremental (inc), debug (triage), source (src), predict, scenario, help (h), status, or intensity level (lite/full/ultra/off)."
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@draig/lexis-two",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "The simple way to obtain the best code. Portable rules, skills, and slash commands for AI agents with lowest tokens usage.",
|
|
5
|
-
"bin": {
|
|
6
|
-
"lexis-two": "scripts/install.js"
|
|
7
|
-
},
|
|
8
|
-
"main": "./.opencode/plugins/lexis-two.mjs",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": "./.opencode/plugins/lexis-two.mjs",
|
|
11
|
-
"./server": "./.opencode/plugins/lexis-two.mjs",
|
|
12
|
-
"./tui": "./.opencode/plugins/lexis-two-tui.mjs"
|
|
13
|
-
},
|
|
14
|
-
"oc-plugin": [
|
|
15
|
-
"server",
|
|
16
|
-
"tui"
|
|
17
|
-
],
|
|
18
|
-
"files": [
|
|
19
|
-
"AGENTS.md",
|
|
20
|
-
".cursor/rules/lexis-two.mdc",
|
|
21
|
-
".windsurf/rules/lexis-two.md",
|
|
22
|
-
".clinerules/lexis-two.md",
|
|
23
|
-
".kiro/steering/lexis-two.md",
|
|
24
|
-
".github/copilot-instructions.md",
|
|
25
|
-
".opencode/plugins/lexis-two.mjs",
|
|
26
|
-
".opencode/plugins/lexis-two-tui.mjs",
|
|
27
|
-
".opencode/commands/",
|
|
28
|
-
"commands/",
|
|
29
|
-
"hooks/",
|
|
30
|
-
"skills/",
|
|
31
|
-
"templates/",
|
|
32
|
-
"scripts/",
|
|
33
|
-
"pi-extension/index.js"
|
|
34
|
-
],
|
|
35
|
-
"keywords": [
|
|
36
|
-
"pi-package",
|
|
37
|
-
"pi",
|
|
38
|
-
"skills",
|
|
39
|
-
"lexis-two"
|
|
40
|
-
],
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"scripts": {
|
|
43
|
-
"postinstall": "node scripts/opencode-wrapper-postinstall.mjs",
|
|
44
|
-
"test": "node --test tests/*.test.js && npm test --prefix pi-extension",
|
|
45
|
-
"benchmark:opencode-go": "node benchmarks/benchmark-opencode-go.js --repeat 3 --write-md",
|
|
46
|
-
"benchmark:report": "node benchmarks/render-opencode-go-report.js",
|
|
47
|
-
"site:dev": "npm run dev --prefix site",
|
|
48
|
-
"site:build": "npm run build --prefix site"
|
|
49
|
-
},
|
|
50
|
-
"pi": {
|
|
51
|
-
"extensions": [
|
|
52
|
-
"./pi-extension/index.js"
|
|
53
|
-
],
|
|
54
|
-
"skills": [
|
|
55
|
-
"./skills"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@draig/lexis-two",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "The simple way to obtain the best code. Portable rules, skills, and slash commands for AI agents with lowest tokens usage.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"lexis-two": "scripts/install.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "./.opencode/plugins/lexis-two.mjs",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./.opencode/plugins/lexis-two.mjs",
|
|
11
|
+
"./server": "./.opencode/plugins/lexis-two.mjs",
|
|
12
|
+
"./tui": "./.opencode/plugins/lexis-two-tui.mjs"
|
|
13
|
+
},
|
|
14
|
+
"oc-plugin": [
|
|
15
|
+
"server",
|
|
16
|
+
"tui"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"AGENTS.md",
|
|
20
|
+
".cursor/rules/lexis-two.mdc",
|
|
21
|
+
".windsurf/rules/lexis-two.md",
|
|
22
|
+
".clinerules/lexis-two.md",
|
|
23
|
+
".kiro/steering/lexis-two.md",
|
|
24
|
+
".github/copilot-instructions.md",
|
|
25
|
+
".opencode/plugins/lexis-two.mjs",
|
|
26
|
+
".opencode/plugins/lexis-two-tui.mjs",
|
|
27
|
+
".opencode/commands/",
|
|
28
|
+
"commands/",
|
|
29
|
+
"hooks/",
|
|
30
|
+
"skills/",
|
|
31
|
+
"templates/",
|
|
32
|
+
"scripts/",
|
|
33
|
+
"pi-extension/index.js"
|
|
34
|
+
],
|
|
35
|
+
"keywords": [
|
|
36
|
+
"pi-package",
|
|
37
|
+
"pi",
|
|
38
|
+
"skills",
|
|
39
|
+
"lexis-two"
|
|
40
|
+
],
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"scripts": {
|
|
43
|
+
"postinstall": "node scripts/opencode-wrapper-postinstall.mjs",
|
|
44
|
+
"test": "node --test tests/*.test.js && npm test --prefix pi-extension",
|
|
45
|
+
"benchmark:opencode-go": "node benchmarks/benchmark-opencode-go.js --repeat 3 --write-md",
|
|
46
|
+
"benchmark:report": "node benchmarks/render-opencode-go-report.js",
|
|
47
|
+
"site:dev": "npm run dev --prefix site",
|
|
48
|
+
"site:build": "npm run build --prefix site"
|
|
49
|
+
},
|
|
50
|
+
"pi": {
|
|
51
|
+
"extensions": [
|
|
52
|
+
"./pi-extension/index.js"
|
|
53
|
+
],
|
|
54
|
+
"skills": [
|
|
55
|
+
"./skills"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
package/pi-extension/index.js
CHANGED
|
@@ -52,6 +52,47 @@ export function parseLexisCommand(text, defaultMode = DEFAULT_MODE) {
|
|
|
52
52
|
|
|
53
53
|
export { writeDefaultMode };
|
|
54
54
|
|
|
55
|
+
/** @type {Record<string, string>} Maps /lexis subcommand (and short alias) → skill id */
|
|
56
|
+
const LEXIS_SKILL_ROUTES = {
|
|
57
|
+
plan: "lexis-two-plan",
|
|
58
|
+
p: "lexis-two-plan",
|
|
59
|
+
review: "lexis-two-review",
|
|
60
|
+
r: "lexis-two-review",
|
|
61
|
+
audit: "lexis-two-audit",
|
|
62
|
+
a: "lexis-two-audit",
|
|
63
|
+
debt: "lexis-two-debt",
|
|
64
|
+
d: "lexis-two-debt",
|
|
65
|
+
security: "lexis-two-security",
|
|
66
|
+
s: "lexis-two-security",
|
|
67
|
+
help: "lexis-two-help",
|
|
68
|
+
h: "lexis-two-help",
|
|
69
|
+
doubt: "lexis-two-doubt-driven",
|
|
70
|
+
incremental: "lexis-two-incremental-impl",
|
|
71
|
+
inc: "lexis-two-incremental-impl",
|
|
72
|
+
debug: "lexis-two-debug-triage",
|
|
73
|
+
triage: "lexis-two-debug-triage",
|
|
74
|
+
source: "lexis-two-source-driven",
|
|
75
|
+
src: "lexis-two-source-driven",
|
|
76
|
+
predict: "lexis-two-predict",
|
|
77
|
+
scenario: "lexis-two-scenario",
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** @type {Array<{ command: string, lexisSubcommand: string }>} */
|
|
81
|
+
const DEPRECATED_LEXIS_SKILL_COMMANDS = [
|
|
82
|
+
{ command: "lexis-two-review", lexisSubcommand: "review" },
|
|
83
|
+
{ command: "lexis-two-audit", lexisSubcommand: "audit" },
|
|
84
|
+
{ command: "lexis-two-debt", lexisSubcommand: "debt" },
|
|
85
|
+
{ command: "lexis-two-plan", lexisSubcommand: "plan" },
|
|
86
|
+
{ command: "lexis-two-security", lexisSubcommand: "security" },
|
|
87
|
+
{ command: "lexis-two-help", lexisSubcommand: "help" },
|
|
88
|
+
{ command: "lexis-two-doubt-driven", lexisSubcommand: "doubt" },
|
|
89
|
+
{ command: "lexis-two-incremental-impl", lexisSubcommand: "incremental" },
|
|
90
|
+
{ command: "lexis-two-debug-triage", lexisSubcommand: "debug" },
|
|
91
|
+
{ command: "lexis-two-source-driven", lexisSubcommand: "source" },
|
|
92
|
+
{ command: "lexis-two-predict", lexisSubcommand: "predict" },
|
|
93
|
+
{ command: "lexis-two-scenario", lexisSubcommand: "scenario" },
|
|
94
|
+
];
|
|
95
|
+
|
|
55
96
|
export default function lexisExtension(pi) {
|
|
56
97
|
let currentMode = DEFAULT_MODE;
|
|
57
98
|
let configuredDefaultMode = getDefaultMode();
|
|
@@ -95,28 +136,10 @@ export default function lexisExtension(pi) {
|
|
|
95
136
|
ctx?.ui?.notify?.(`Lexis: current ${currentMode} • default ${configuredDefaultMode}`, "info");
|
|
96
137
|
return;
|
|
97
138
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (subcommand === "review" || subcommand === "r") {
|
|
103
|
-
sendAlias("/skill:lexis-two-review", restArgs, ctx);
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
if (subcommand === "audit" || subcommand === "a") {
|
|
107
|
-
sendAlias("/skill:lexis-two-audit", restArgs, ctx);
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
if (subcommand === "debt" || subcommand === "d") {
|
|
111
|
-
sendAlias("/skill:lexis-two-debt", restArgs, ctx);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (subcommand === "security" || subcommand === "s") {
|
|
115
|
-
sendAlias("/skill:lexis-two-security", restArgs, ctx);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (subcommand === "help" || subcommand === "h") {
|
|
119
|
-
sendAlias("/skill:lexis-two-help", restArgs, ctx);
|
|
139
|
+
|
|
140
|
+
const skillId = LEXIS_SKILL_ROUTES[subcommand];
|
|
141
|
+
if (skillId) {
|
|
142
|
+
sendAlias(`/skill:${skillId}`, restArgs, ctx);
|
|
120
143
|
return;
|
|
121
144
|
}
|
|
122
145
|
|
|
@@ -148,7 +171,15 @@ export default function lexisExtension(pi) {
|
|
|
148
171
|
handler: async (args, ctx) => {
|
|
149
172
|
const parsedArgs = String(args || "").trim();
|
|
150
173
|
const [subcommand] = parsedArgs.toLowerCase().split(/\s+/);
|
|
151
|
-
const validSubcommands = [
|
|
174
|
+
const validSubcommands = [
|
|
175
|
+
"status",
|
|
176
|
+
...Object.keys(LEXIS_SKILL_ROUTES),
|
|
177
|
+
"lite",
|
|
178
|
+
"full",
|
|
179
|
+
"ultra",
|
|
180
|
+
"off",
|
|
181
|
+
"default",
|
|
182
|
+
];
|
|
152
183
|
|
|
153
184
|
if (validSubcommands.includes(subcommand)) {
|
|
154
185
|
ctx?.ui?.notify?.(`[Deprecated] Use '/lexis ${parsedArgs}' instead.`, "warning");
|
|
@@ -164,42 +195,19 @@ export default function lexisExtension(pi) {
|
|
|
164
195
|
handler: (args, ctx) => sendAlias("/skill:specxis", args, ctx),
|
|
165
196
|
});
|
|
166
197
|
|
|
167
|
-
const makeDeprecatedHandler = (
|
|
198
|
+
const makeDeprecatedHandler = (lexisSubcommand, skillCommand) => {
|
|
168
199
|
return (args, ctx) => {
|
|
169
|
-
ctx?.ui?.notify?.(`[Deprecated] Use '/lexis ${
|
|
170
|
-
sendAlias(`/skill
|
|
200
|
+
ctx?.ui?.notify?.(`[Deprecated] Use '/lexis ${lexisSubcommand}' instead.`, "warning");
|
|
201
|
+
sendAlias(`/skill:${skillCommand}`, args, ctx);
|
|
171
202
|
};
|
|
172
203
|
};
|
|
173
204
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
description: "[Deprecated] Use /lexis audit instead",
|
|
181
|
-
handler: makeDeprecatedHandler("audit"),
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
pi.registerCommand("lexis-two-debt", {
|
|
185
|
-
description: "[Deprecated] Use /lexis debt instead",
|
|
186
|
-
handler: makeDeprecatedHandler("debt"),
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
pi.registerCommand("lexis-two-plan", {
|
|
190
|
-
description: "[Deprecated] Use /lexis plan instead",
|
|
191
|
-
handler: makeDeprecatedHandler("plan"),
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
pi.registerCommand("lexis-two-security", {
|
|
195
|
-
description: "[Deprecated] Use /lexis security instead",
|
|
196
|
-
handler: makeDeprecatedHandler("security"),
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
pi.registerCommand("lexis-two-help", {
|
|
200
|
-
description: "[Deprecated] Use /lexis help instead",
|
|
201
|
-
handler: makeDeprecatedHandler("help"),
|
|
202
|
-
});
|
|
205
|
+
for (const { command, lexisSubcommand } of DEPRECATED_LEXIS_SKILL_COMMANDS) {
|
|
206
|
+
pi.registerCommand(command, {
|
|
207
|
+
description: `[Deprecated] Use /lexis ${lexisSubcommand} instead`,
|
|
208
|
+
handler: makeDeprecatedHandler(lexisSubcommand, command),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
203
211
|
|
|
204
212
|
pi.on("input", async (event) => {
|
|
205
213
|
if (event?.source === "extension") return;
|
package/scripts/install.js
CHANGED
|
@@ -252,9 +252,9 @@ function fileExists(target) {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
function getOpencodeConfigDir(home) {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return
|
|
255
|
+
// lexis: match `opencode debug paths` — on Windows OpenCode uses ~/.config/opencode, not %APPDATA%/opencode
|
|
256
|
+
if (process.env.OPENCODE_CONFIG_DIR) {
|
|
257
|
+
return process.env.OPENCODE_CONFIG_DIR;
|
|
258
258
|
}
|
|
259
259
|
const xdg = process.env.XDG_CONFIG_HOME;
|
|
260
260
|
if (xdg) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lexis-two-debug-triage
|
|
3
|
+
description: Minimal reproduction and smallest fix — no drive-by refactors
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Debug the reported issue. **Fix the bug, not the codebase.**
|
|
7
|
+
|
|
8
|
+
Steps:
|
|
9
|
+
|
|
10
|
+
1. **Reproduce:** state exact steps or the failing command/output. If not reproducible, say what's missing.
|
|
11
|
+
2. **Hypothesis:** one primary cause (two max if tied).
|
|
12
|
+
3. **Evidence:** file:line or log line — no guessing without reading.
|
|
13
|
+
4. **Fix:** smallest diff that fixes the root cause. No unrelated cleanup.
|
|
14
|
+
5. **Verify:** one command or test that proves the fix.
|
|
15
|
+
|
|
16
|
+
Forbidden during triage:
|
|
17
|
+
|
|
18
|
+
- New libraries, new layers, "while we're here" refactors
|
|
19
|
+
- Renaming unrelated symbols
|
|
20
|
+
- Broad error-handler rewrites
|
|
21
|
+
|
|
22
|
+
If the lazy fix is a one-liner, ship the one-liner. Mark intentional shortcuts with `// lexis:`.
|
|
23
|
+
|
|
24
|
+
Output: Repro → Cause → Fix (with paths) → Verify. Respond in Spanish.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lexis-two-doubt-driven
|
|
3
|
+
description: Challenge ambiguous requirements with minimal questions before any code
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The user request is underspecified or scope is unclear. **Do not write code yet.**
|
|
7
|
+
|
|
8
|
+
Apply YAGNI at the requirement level:
|
|
9
|
+
|
|
10
|
+
1. Restate what you think they want in one sentence.
|
|
11
|
+
2. Ask at most **3** razor questions that unblock the laziest correct implementation.
|
|
12
|
+
3. For each question, suggest the default you'd pick if they say "whatever is simplest."
|
|
13
|
+
|
|
14
|
+
Question targets (pick only what applies):
|
|
15
|
+
|
|
16
|
+
- Does this feature need to exist at all, or does an existing flow cover it?
|
|
17
|
+
- What is the smallest user-visible outcome that counts as done?
|
|
18
|
+
- What can be explicitly out of scope for v1?
|
|
19
|
+
|
|
20
|
+
Output format:
|
|
21
|
+
|
|
22
|
+
- **Assumption:** …
|
|
23
|
+
- **Questions:** numbered 1–3
|
|
24
|
+
- **Lazy default if no answer:** one line
|
|
25
|
+
|
|
26
|
+
No code, no file edits, no new dependencies. Respond in Spanish.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lexis-two-incremental-impl
|
|
3
|
+
description: Ship the smallest vertical slice first; defer the rest explicitly
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Plan and implement **one** incremental slice — not the full feature.
|
|
7
|
+
|
|
8
|
+
1. Read the request and list the full feature in one line.
|
|
9
|
+
2. Split into vertical slices ordered by: ships value → reduces risk → deletes unknowns.
|
|
10
|
+
3. Define **slice 1 only**: files touched, behavior delivered, what is explicitly deferred.
|
|
11
|
+
4. Implement slice 1 with the lazy ladder (YAGNI, stdlib, native, existing deps).
|
|
12
|
+
5. End with a **deferred** list (max 5 bullets) — not a roadmap essay.
|
|
13
|
+
|
|
14
|
+
Rules:
|
|
15
|
+
|
|
16
|
+
- No scaffolding "for later" in slice 1.
|
|
17
|
+
- No new abstraction until slice 2 proves reuse.
|
|
18
|
+
- If slice 1 is still too big, cut again and say so.
|
|
19
|
+
|
|
20
|
+
Output:
|
|
21
|
+
|
|
22
|
+
- **Slice 1 scope:** …
|
|
23
|
+
- **Implementation:** (code or diff as requested)
|
|
24
|
+
- **Deferred:** …
|
|
25
|
+
- **Ship when:** one acceptance check for slice 1
|
|
26
|
+
|
|
27
|
+
Respond in Spanish.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lexis-two-predict
|
|
3
|
+
description: Compare proposed approach vs lazy alternative — LOC, deps, maintenance
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Compare the user's proposed approach (or the obvious one) against the **lazy alternative**. No implementation unless asked.
|
|
7
|
+
|
|
8
|
+
For each option (max 2: **proposed** vs **lazy**):
|
|
9
|
+
|
|
10
|
+
| Dimension | Score |
|
|
11
|
+
| --------- | ----- |
|
|
12
|
+
| New files | count |
|
|
13
|
+
| Est. LOC | range |
|
|
14
|
+
| New dependencies | yes/no — which |
|
|
15
|
+
| Ongoing maintenance | low / med / high — one line why |
|
|
16
|
+
| Failure modes | top 1 |
|
|
17
|
+
|
|
18
|
+
End with:
|
|
19
|
+
|
|
20
|
+
- **Pick:** proposed or lazy — one sentence why
|
|
21
|
+
- **Kill condition:** when to revisit (e.g. "third endpoint needs same DTO")
|
|
22
|
+
|
|
23
|
+
Keep the table compact. No essays. Respond in Spanish.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lexis-two-scenario
|
|
3
|
+
description: Walk through concrete scenarios before designing or coding
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Before design or code, walk **3 scenarios** for the requested feature:
|
|
7
|
+
|
|
8
|
+
1. **Happy path** — minimal user action, expected outcome (3–5 lines, concrete data).
|
|
9
|
+
2. **Edge** — boundary input or permission edge (what breaks if ignored).
|
|
10
|
+
3. **Failure** — one realistic failure (network, validation, concurrency) and expected UX/error.
|
|
11
|
+
|
|
12
|
+
Then:
|
|
13
|
+
|
|
14
|
+
- **Minimum scope:** what all three scenarios need in common (that's v1).
|
|
15
|
+
- **Defer:** what only edge/failure needs — skip for v1 unless user insists.
|
|
16
|
+
- **Open question:** one line if scenarios conflict.
|
|
17
|
+
|
|
18
|
+
No code unless the user already asked for implementation. No new dependencies in the plan.
|
|
19
|
+
|
|
20
|
+
Respond in Spanish.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lexis-two-source-driven
|
|
3
|
+
description: Read official sources and existing code before inventing APIs
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Before proposing or implementing, **ground in sources** — not memory.
|
|
7
|
+
|
|
8
|
+
1. Identify the stack (framework, library versions from `package.json` / lockfile / imports).
|
|
9
|
+
2. Read in-repo truth: types, existing callers, similar patterns (grep/read — don't assume).
|
|
10
|
+
3. Prefer official docs for APIs you will call (link or doc section name).
|
|
11
|
+
4. Propose the smallest approach that matches those sources.
|
|
12
|
+
|
|
13
|
+
Output:
|
|
14
|
+
|
|
15
|
+
- **Sources checked:** bullet list (file paths + doc URLs if used)
|
|
16
|
+
- **What exists already:** reuse opportunities
|
|
17
|
+
- **Recommendation:** one paragraph + code only if the user asked for implementation
|
|
18
|
+
- **Avoid:** APIs or patterns not supported by the versions in this repo
|
|
19
|
+
|
|
20
|
+
If official docs contradict the request, say so and offer the lazy compliant path.
|
|
21
|
+
|
|
22
|
+
Respond in Spanish.
|