lean-agents 0.0.0-stage → 0.8.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 (132) hide show
  1. package/LICENSE +21 -0
  2. package/README.es.md +454 -0
  3. package/README.md +453 -2
  4. package/core/AGENTS.es.md +60 -0
  5. package/core/AGENTS.md +60 -0
  6. package/core/README.md +8 -0
  7. package/core/agents/debug.md +14 -0
  8. package/core/agents/explore.md +13 -0
  9. package/core/agents/planner.md +14 -0
  10. package/core/agents/research.md +13 -0
  11. package/core/agents/review.md +13 -0
  12. package/core/copilot-usage-tui.js +186 -0
  13. package/core/mcp.json +38 -0
  14. package/core/pins.json +30 -0
  15. package/core/tiers.json +4 -0
  16. package/node_modules/@clack/core/LICENSE +9 -0
  17. package/node_modules/@clack/core/README.md +22 -0
  18. package/node_modules/@clack/core/dist/index.d.mts +503 -0
  19. package/node_modules/@clack/core/dist/index.mjs +1003 -0
  20. package/node_modules/@clack/core/package.json +63 -0
  21. package/node_modules/@clack/prompts/LICENSE +9 -0
  22. package/node_modules/@clack/prompts/README.md +396 -0
  23. package/node_modules/@clack/prompts/dist/index.d.mts +949 -0
  24. package/node_modules/@clack/prompts/dist/index.mjs +1423 -0
  25. package/node_modules/@clack/prompts/package.json +67 -0
  26. package/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
  27. package/node_modules/fast-string-truncated-width/dist/index.js +111 -0
  28. package/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
  29. package/node_modules/fast-string-truncated-width/dist/types.js +2 -0
  30. package/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
  31. package/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
  32. package/node_modules/fast-string-truncated-width/license +21 -0
  33. package/node_modules/fast-string-truncated-width/package.json +35 -0
  34. package/node_modules/fast-string-truncated-width/readme.md +59 -0
  35. package/node_modules/fast-string-width/dist/index.d.ts +4 -0
  36. package/node_modules/fast-string-width/dist/index.js +14 -0
  37. package/node_modules/fast-string-width/license +21 -0
  38. package/node_modules/fast-string-width/package.json +34 -0
  39. package/node_modules/fast-string-width/readme.md +42 -0
  40. package/node_modules/fast-wrap-ansi/LICENSE +23 -0
  41. package/node_modules/fast-wrap-ansi/README.md +26 -0
  42. package/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
  43. package/node_modules/fast-wrap-ansi/lib/main.js +218 -0
  44. package/node_modules/fast-wrap-ansi/package.json +51 -0
  45. package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
  46. package/node_modules/jsonc-parser/LICENSE.md +21 -0
  47. package/node_modules/jsonc-parser/README.md +364 -0
  48. package/node_modules/jsonc-parser/SECURITY.md +41 -0
  49. package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
  50. package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
  51. package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
  52. package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
  53. package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
  54. package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
  55. package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
  56. package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
  57. package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
  58. package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
  59. package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
  60. package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
  61. package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
  62. package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
  63. package/node_modules/jsonc-parser/package.json +37 -0
  64. package/node_modules/sisteransi/license +21 -0
  65. package/node_modules/sisteransi/package.json +34 -0
  66. package/node_modules/sisteransi/readme.md +113 -0
  67. package/node_modules/sisteransi/src/index.js +58 -0
  68. package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  69. package/package.json +29 -4
  70. package/profiles/README.md +10 -0
  71. package/profiles/anthropic-api/gsd-defaults.json +26 -0
  72. package/profiles/anthropic-api.json +18 -0
  73. package/profiles/antigravity.json +12 -0
  74. package/profiles/claude-subscription/gsd-defaults.json +26 -0
  75. package/profiles/claude-subscription.json +17 -0
  76. package/profiles/github-copilot/gsd-defaults.json +26 -0
  77. package/profiles/github-copilot.json +17 -0
  78. package/profiles/openai-api/gsd-defaults.json +26 -0
  79. package/profiles/openai-api.json +17 -0
  80. package/profiles/opencode-go/gsd-defaults.json +26 -0
  81. package/profiles/opencode-go.json +17 -0
  82. package/profiles/vertex-gemini/gsd-defaults.json +26 -0
  83. package/profiles/vertex-gemini.json +18 -0
  84. package/scripts/adhd-skill.mjs +12 -0
  85. package/scripts/bump-pins.mjs +104 -0
  86. package/scripts/check-private.sh +52 -0
  87. package/scripts/check-readme.mjs +131 -0
  88. package/scripts/ci-download.sh +20 -0
  89. package/scripts/ci-install-opencode-v2.sh +6 -0
  90. package/scripts/ci-latest-report.mjs +38 -0
  91. package/scripts/copilot-context-mode.mjs +33 -0
  92. package/scripts/labels.sh +55 -0
  93. package/scripts/lean.mjs +700 -0
  94. package/scripts/lib/adapters/antigravity.mjs +72 -0
  95. package/scripts/lib/adapters/claude.mjs +122 -0
  96. package/scripts/lib/adapters/copilot-cli.mjs +81 -0
  97. package/scripts/lib/adapters/cursor.mjs +60 -0
  98. package/scripts/lib/adapters/opencode-v1.mjs +86 -0
  99. package/scripts/lib/adapters/opencode-v2.mjs +168 -0
  100. package/scripts/lib/adapters/vscode-copilot.mjs +56 -0
  101. package/scripts/lib/adhd.mjs +28 -0
  102. package/scripts/lib/adopt.mjs +474 -0
  103. package/scripts/lib/agent-lifecycle.mjs +163 -0
  104. package/scripts/lib/copilot-usage.mjs +49 -0
  105. package/scripts/lib/doctor.mjs +207 -0
  106. package/scripts/lib/feedback.mjs +30 -0
  107. package/scripts/lib/fsops.mjs +291 -0
  108. package/scripts/lib/gsd.mjs +42 -0
  109. package/scripts/lib/inventory.mjs +195 -0
  110. package/scripts/lib/lean-update.mjs +30 -0
  111. package/scripts/lib/migrate.mjs +407 -0
  112. package/scripts/lib/network.mjs +79 -0
  113. package/scripts/lib/node-runtime.mjs +85 -0
  114. package/scripts/lib/parallel.mjs +265 -0
  115. package/scripts/lib/pins.mjs +47 -0
  116. package/scripts/lib/project.mjs +38 -0
  117. package/scripts/lib/redact.mjs +30 -0
  118. package/scripts/lib/render.mjs +101 -0
  119. package/scripts/lib/system.mjs +178 -0
  120. package/scripts/lib/terminals.mjs +218 -0
  121. package/scripts/lib/ui.mjs +34 -0
  122. package/scripts/lib/unverified.mjs +49 -0
  123. package/scripts/lib/upgrade.mjs +130 -0
  124. package/scripts/lib/verify-commit.mjs +16 -0
  125. package/scripts/lib/verify-sha256.mjs +20 -0
  126. package/scripts/lint-workflows.mjs +25 -0
  127. package/scripts/models-refresh.mjs +58 -0
  128. package/scripts/parallel.mjs +59 -0
  129. package/scripts/pins-latest.mjs +43 -0
  130. package/scripts/release.mjs +46 -0
  131. package/scripts/verify-pins.mjs +36 -0
  132. package/scripts/version-watch.mjs +118 -0
@@ -0,0 +1,113 @@
1
+ # sister ANSI [![Version](https://img.shields.io/npm/v/sisteransi.svg)](https://www.npmjs.com/package/sisteransi) [![Build Status](https://travis-ci.org/terkelg/sisteransi.svg?branch=master)](https://travis-ci.org/terkelg/sisteransi) [![Downloads](https://img.shields.io/npm/dm/sisteransi.svg)](https://www.npmjs.com/package/sisteransi)
2
+
3
+ > Ansi escape codes faster than you can say "[Bam bam](https://www.youtube.com/watch?v=OcaPu9JPenU)".
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ npm install sisteransi
9
+ ```
10
+
11
+
12
+ ## Usage
13
+
14
+ ```js
15
+ const ansi = require('sisteransi');
16
+ // or const { cursor } = require('sisteransi');
17
+
18
+ const p = str => process.stdout.write(str);
19
+
20
+ // move cursor to 2, 1
21
+ p(ansi.cursor.to(2, 1));
22
+
23
+ // to up, one down
24
+ p(ansi.cursor.up(2)+ansi.cursor.down(1));
25
+ ```
26
+
27
+ ## API
28
+
29
+ ### cursor
30
+
31
+ #### to(x, y)
32
+ Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.
33
+
34
+ #### move(x, y)
35
+ Set the position of the cursor relative to its current position.
36
+
37
+ #### up(count = 1)
38
+ Move cursor up a specific amount of rows. Default is `1`.
39
+
40
+ #### down(count = 1)
41
+ Move cursor down a specific amount of rows. Default is `1`.
42
+
43
+ #### forward(count = 1)
44
+ Move cursor forward a specific amount of rows. Default is `1`.
45
+
46
+ #### backward(count = 1)
47
+ Move cursor backward a specific amount of rows. Default is `1`.
48
+
49
+ #### nextLine(count = 1)
50
+ Move cursor to the next line a specific amount of lines. Default is `1`.
51
+
52
+ #### prevLine(count = 1)
53
+ Move cursor to the previous a specific amount of lines. Default is `1`.
54
+
55
+ #### left
56
+ Move cursor to the left side.
57
+
58
+ #### hide
59
+ Hide cursor.
60
+
61
+ #### show
62
+ Show cursor.
63
+
64
+ #### save
65
+
66
+ Save cursor position.
67
+
68
+ #### restore
69
+
70
+ Restore cursor position.
71
+
72
+
73
+ ### scroll
74
+
75
+ #### up(count = 1)
76
+ Scroll display up a specific amount of lines. Default to `1`.
77
+
78
+ #### down(count = 1)
79
+ Scroll display down a specific amount of lines. Default to `1`.
80
+
81
+
82
+ ### erase
83
+
84
+ #### screen
85
+ Erase the screen and move the cursor the top left position.
86
+
87
+ #### up(count = 1)
88
+ Erase the screen from the current line up to the top of the screen. Default to `1`.
89
+
90
+ #### down(count = 2)
91
+ Erase the screen from the current line down to the bottom of the screen. Default to `1`.
92
+
93
+ #### line
94
+ Erase the entire current line.
95
+
96
+ #### lineEnd
97
+ Erase from the current cursor position to the end of the current line.
98
+
99
+ #### lineStart
100
+ Erase from the current cursor position to the start of the current line.
101
+
102
+ #### lines(count)
103
+ Erase from the current cursor position up the specified amount of rows.
104
+
105
+
106
+ ## Credit
107
+
108
+ This is a fork of [ansi-escapes](https://github.com/sindresorhus/ansi-escapes).
109
+
110
+
111
+ ## License
112
+
113
+ MIT © [Terkel Gjervig](https://terkel.com)
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ const ESC = '\x1B';
4
+ const CSI = `${ESC}[`;
5
+ const beep = '\u0007';
6
+
7
+ const cursor = {
8
+ to(x, y) {
9
+ if (!y) return `${CSI}${x + 1}G`;
10
+ return `${CSI}${y + 1};${x + 1}H`;
11
+ },
12
+ move(x, y) {
13
+ let ret = '';
14
+
15
+ if (x < 0) ret += `${CSI}${-x}D`;
16
+ else if (x > 0) ret += `${CSI}${x}C`;
17
+
18
+ if (y < 0) ret += `${CSI}${-y}A`;
19
+ else if (y > 0) ret += `${CSI}${y}B`;
20
+
21
+ return ret;
22
+ },
23
+ up: (count = 1) => `${CSI}${count}A`,
24
+ down: (count = 1) => `${CSI}${count}B`,
25
+ forward: (count = 1) => `${CSI}${count}C`,
26
+ backward: (count = 1) => `${CSI}${count}D`,
27
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
28
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
29
+ left: `${CSI}G`,
30
+ hide: `${CSI}?25l`,
31
+ show: `${CSI}?25h`,
32
+ save: `${ESC}7`,
33
+ restore: `${ESC}8`
34
+ }
35
+
36
+ const scroll = {
37
+ up: (count = 1) => `${CSI}S`.repeat(count),
38
+ down: (count = 1) => `${CSI}T`.repeat(count)
39
+ }
40
+
41
+ const erase = {
42
+ screen: `${CSI}2J`,
43
+ up: (count = 1) => `${CSI}1J`.repeat(count),
44
+ down: (count = 1) => `${CSI}J`.repeat(count),
45
+ line: `${CSI}2K`,
46
+ lineEnd: `${CSI}K`,
47
+ lineStart: `${CSI}1K`,
48
+ lines(count) {
49
+ let clear = '';
50
+ for (let i = 0; i < count; i++)
51
+ clear += this.line + (i < count - 1 ? cursor.up() : '');
52
+ if (count)
53
+ clear += cursor.left;
54
+ return clear;
55
+ }
56
+ }
57
+
58
+ module.exports = { cursor, scroll, erase, beep };
@@ -0,0 +1,35 @@
1
+ export const beep: string;
2
+ export const clear: string;
3
+
4
+ export namespace cursor {
5
+ export const left: string;
6
+ export const hide: string;
7
+ export const show: string;
8
+ export const save: string;
9
+ export const restore: string;
10
+
11
+ export function to(x: number, y?: number): string;
12
+ export function move(x: number, y: number): string;
13
+ export function up(count?: number): string;
14
+ export function down(count?: number): string;
15
+ export function forward(count?: number): string;
16
+ export function backward(count?: number): string;
17
+ export function nextLine(count?: number): string;
18
+ export function prevLine(count?: number): string;
19
+ }
20
+
21
+ export namespace scroll {
22
+ export function up(count?: number): string;
23
+ export function down(count?: number): string;
24
+ }
25
+
26
+ export namespace erase {
27
+ export const screen: string;
28
+ export const line: string;
29
+ export const lineEnd: string;
30
+ export const lineStart: string;
31
+
32
+ export function up(count?: number): string;
33
+ export function down(count?: number): string;
34
+ export function lines(count: number): string;
35
+ }
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
2
  "name": "lean-agents",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.0",
4
+ "description": "Cross-agent, token-efficient AI coding setup.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/estebanmr99/lean-agents.git"
9
+ },
10
+ "type": "module",
11
+ "engines": {
12
+ "node": ">=22.20"
13
+ },
14
+ "bin": {
15
+ "lean-agents": "scripts/lean.mjs"
16
+ },
17
+ "files": [
18
+ "scripts/",
19
+ "core/",
20
+ "profiles/"
21
+ ],
22
+ "bundleDependencies": true,
23
+ "scripts": {
24
+ "test": "node --test tests/*.test.mjs",
25
+ "check-private": "bash scripts/check-private.sh"
26
+ },
27
+ "dependencies": {
28
+ "@clack/prompts": "1.8.1",
29
+ "jsonc-parser": "^3.3.1"
30
+ }
31
+ }
@@ -0,0 +1,10 @@
1
+ # Model profiles
2
+
3
+ Dated templates that map tiers (`fast`, `balanced`, `strong`) to concrete models for one subscription or provider. The `update-models` skill keeps your local copy current. See [docs/SPEC.md section 9](../docs/SPEC.md#9-models-that-stay-current).
4
+
5
+ ## Review notes
6
+
7
+ `node scripts/models-refresh.mjs` (monthly in CI) reports a newer model of the same family unless the profile already uses it or it produces other outputs (for example images). Check price and training terms before changing a profile.
8
+
9
+ - 2026-11-03, issue #6. `opencode-go` stays on `kimi-k3` (balanced) and `kimi-k3.1-pro` (strong). K3.1 Pro costs less per token ($2 / $10 per 1M input / output against $3 / $15), and OpenCode Go says neither is used for training ([opencode.ai/docs/go](https://opencode.ai/docs/go)). It is the deeper-reasoning tier, so it is kept for `strong` and the two tiers stay different. **VERIFY:** its speed and output-token use against K3.
10
+ - 2026-11-03, issue #6. `vertex-gemini` stays on `gemini-3.8-flash`: `gemini-nano-banana-2.1` outputs images and is not a coding model ([models.dev](https://models.dev/api.json)).
@@ -0,0 +1,26 @@
1
+ {
2
+ "_comment": "Maps GSD agents to tiers; lean-agents resolves each tier to this profile's model and writes model_overrides to ~/.gsd/defaults.json.",
3
+ "model_overrides": {
4
+ "gsd-planner": "strong",
5
+ "gsd-roadmapper": "strong",
6
+ "gsd-debugger": "strong",
7
+ "gsd-debug-session-manager": "strong",
8
+ "gsd-security-auditor": "strong",
9
+ "gsd-executor": "balanced",
10
+ "gsd-verifier": "balanced",
11
+ "gsd-advisor-researcher": "balanced",
12
+ "gsd-code-fixer": "balanced",
13
+ "gsd-code-reviewer": "balanced",
14
+ "gsd-phase-researcher": "fast",
15
+ "gsd-project-researcher": "fast",
16
+ "gsd-research-synthesizer": "fast",
17
+ "gsd-domain-researcher": "fast",
18
+ "gsd-ai-researcher": "fast",
19
+ "gsd-ui-researcher": "fast",
20
+ "gsd-plan-checker": "fast",
21
+ "gsd-integration-checker": "fast",
22
+ "gsd-ui-checker": "fast",
23
+ "gsd-codebase-mapper": "fast",
24
+ "gsd-pattern-mapper": "fast"
25
+ }
26
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "anthropic-api",
3
+ "description": "OpenCode with an Anthropic API key or Claude login.",
4
+ "verified_on": "2026-10-31",
5
+ "agents": ["opencode-v2", "opencode-v1"],
6
+ "provider": "anthropic",
7
+ "tiers": {
8
+ "fast": { "model": "anthropic/claude-haiku-5-5" },
9
+ "balanced": { "model": "anthropic/claude-sonnet-5-5" },
10
+ "strong": { "model": "anthropic/claude-opus-5-5" }
11
+ },
12
+ "primary": {
13
+ "plan": "strong",
14
+ "build": "balanced"
15
+ },
16
+ "main_model": "anthropic/claude-sonnet-5-5",
17
+ "notes": "Confirm IDs with `opencode models anthropic`."
18
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "antigravity",
3
+ "description": "Antigravity CLI tiers. Subagents take flash, pro or inherit, not model IDs.",
4
+ "verified_on": "2026-10-30",
5
+ "agents": ["antigravity"],
6
+ "tiers": {
7
+ "fast": { "model": "flash" },
8
+ "balanced": { "model": "flash" },
9
+ "strong": { "model": "pro" }
10
+ },
11
+ "notes": "Set by the adapter; not a choice for --profile."
12
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "_comment": "Maps GSD agents to tiers; lean-agents resolves each tier to this profile's model and writes model_overrides to ~/.gsd/defaults.json.",
3
+ "model_overrides": {
4
+ "gsd-planner": "strong",
5
+ "gsd-roadmapper": "strong",
6
+ "gsd-debugger": "strong",
7
+ "gsd-debug-session-manager": "strong",
8
+ "gsd-security-auditor": "strong",
9
+ "gsd-executor": "balanced",
10
+ "gsd-verifier": "balanced",
11
+ "gsd-advisor-researcher": "balanced",
12
+ "gsd-code-fixer": "balanced",
13
+ "gsd-code-reviewer": "balanced",
14
+ "gsd-phase-researcher": "fast",
15
+ "gsd-project-researcher": "fast",
16
+ "gsd-research-synthesizer": "fast",
17
+ "gsd-domain-researcher": "fast",
18
+ "gsd-ai-researcher": "fast",
19
+ "gsd-ui-researcher": "fast",
20
+ "gsd-plan-checker": "fast",
21
+ "gsd-integration-checker": "fast",
22
+ "gsd-ui-checker": "fast",
23
+ "gsd-codebase-mapper": "fast",
24
+ "gsd-pattern-mapper": "fast"
25
+ }
26
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "claude-subscription",
3
+ "description": "Claude Code with a Claude Pro or Max plan. Uses aliases, so it always tracks the newest models.",
4
+ "verified_on": "2026-10-31",
5
+ "agents": ["claude"],
6
+ "tiers": {
7
+ "fast": { "model": "haiku" },
8
+ "balanced": { "model": "sonnet" },
9
+ "strong": { "model": "opus" }
10
+ },
11
+ "overrides": {
12
+ "review": "fast",
13
+ "debug": "balanced"
14
+ },
15
+ "main_model": "sonnet",
16
+ "notes": "Opus is for planning and hard problems only. Pro plans hit Opus limits quickly."
17
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "_comment": "Maps GSD agents to tiers; lean-agents resolves each tier to this profile's model and writes model_overrides to ~/.gsd/defaults.json.",
3
+ "model_overrides": {
4
+ "gsd-planner": "strong",
5
+ "gsd-roadmapper": "strong",
6
+ "gsd-debugger": "strong",
7
+ "gsd-debug-session-manager": "strong",
8
+ "gsd-security-auditor": "strong",
9
+ "gsd-executor": "balanced",
10
+ "gsd-verifier": "balanced",
11
+ "gsd-advisor-researcher": "balanced",
12
+ "gsd-code-fixer": "balanced",
13
+ "gsd-code-reviewer": "balanced",
14
+ "gsd-phase-researcher": "fast",
15
+ "gsd-project-researcher": "fast",
16
+ "gsd-research-synthesizer": "fast",
17
+ "gsd-domain-researcher": "fast",
18
+ "gsd-ai-researcher": "fast",
19
+ "gsd-ui-researcher": "fast",
20
+ "gsd-plan-checker": "fast",
21
+ "gsd-integration-checker": "fast",
22
+ "gsd-ui-checker": "fast",
23
+ "gsd-codebase-mapper": "fast",
24
+ "gsd-pattern-mapper": "fast"
25
+ }
26
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "github-copilot",
3
+ "description": "GitHub Copilot subscription, in Copilot CLI or in OpenCode through /connect.",
4
+ "verified_on": "2026-10-30",
5
+ "agents": ["copilot-cli", "opencode-v2", "opencode-v1"],
6
+ "provider": "github-copilot",
7
+ "tiers": {
8
+ "fast": { "model": "github-copilot/claude-haiku-5.5" },
9
+ "balanced": { "model": "github-copilot/claude-sonnet-5.5" },
10
+ "strong": { "model": "github-copilot/claude-opus-5.5" }
11
+ },
12
+ "primary": {
13
+ "plan": "strong", "build": "balanced"
14
+ },
15
+ "main_model": "github-copilot/claude-sonnet-5.5",
16
+ "notes": "Copilot CLI uses the IDs without the github-copilot/ prefix. Copilot bills by usage since 2026-06-01, so check current rates. Your plan or organization may hide some models; the update-models skill lists what you can use."
17
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "_comment": "Maps GSD agents to tiers; lean-agents resolves each tier to this profile's model and writes model_overrides to ~/.gsd/defaults.json.",
3
+ "model_overrides": {
4
+ "gsd-planner": "strong",
5
+ "gsd-roadmapper": "strong",
6
+ "gsd-debugger": "strong",
7
+ "gsd-debug-session-manager": "strong",
8
+ "gsd-security-auditor": "strong",
9
+ "gsd-executor": "balanced",
10
+ "gsd-verifier": "balanced",
11
+ "gsd-advisor-researcher": "balanced",
12
+ "gsd-code-fixer": "balanced",
13
+ "gsd-code-reviewer": "balanced",
14
+ "gsd-phase-researcher": "fast",
15
+ "gsd-project-researcher": "fast",
16
+ "gsd-research-synthesizer": "fast",
17
+ "gsd-domain-researcher": "fast",
18
+ "gsd-ai-researcher": "fast",
19
+ "gsd-ui-researcher": "fast",
20
+ "gsd-plan-checker": "fast",
21
+ "gsd-integration-checker": "fast",
22
+ "gsd-ui-checker": "fast",
23
+ "gsd-codebase-mapper": "fast",
24
+ "gsd-pattern-mapper": "fast"
25
+ }
26
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "openai-api",
3
+ "description": "OpenCode with an OpenAI API key.",
4
+ "verified_on": "2026-10-30",
5
+ "agents": ["opencode-v2", "opencode-v1"],
6
+ "provider": "openai",
7
+ "tiers": {
8
+ "fast": { "model": "openai/gpt-6-luna" },
9
+ "balanced": { "model": "openai/gpt-6.1-sol" },
10
+ "strong": { "model": "openai/gpt-6-astra" }
11
+ },
12
+ "primary": {
13
+ "plan": "strong", "build": "balanced"
14
+ },
15
+ "main_model": "openai/gpt-6.1-sol",
16
+ "notes": "Confirm IDs with `opencode models openai`."
17
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "_comment": "Maps GSD agents to tiers; lean-agents resolves each tier to this profile's model and writes model_overrides to ~/.gsd/defaults.json.",
3
+ "model_overrides": {
4
+ "gsd-planner": "strong",
5
+ "gsd-roadmapper": "strong",
6
+ "gsd-debugger": "strong",
7
+ "gsd-debug-session-manager": "strong",
8
+ "gsd-security-auditor": "strong",
9
+ "gsd-executor": "balanced",
10
+ "gsd-verifier": "balanced",
11
+ "gsd-advisor-researcher": "balanced",
12
+ "gsd-code-fixer": "balanced",
13
+ "gsd-code-reviewer": "balanced",
14
+ "gsd-phase-researcher": "fast",
15
+ "gsd-project-researcher": "fast",
16
+ "gsd-research-synthesizer": "fast",
17
+ "gsd-domain-researcher": "fast",
18
+ "gsd-ai-researcher": "fast",
19
+ "gsd-ui-researcher": "fast",
20
+ "gsd-plan-checker": "fast",
21
+ "gsd-integration-checker": "fast",
22
+ "gsd-ui-checker": "fast",
23
+ "gsd-codebase-mapper": "fast",
24
+ "gsd-pattern-mapper": "fast"
25
+ }
26
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "opencode-go",
3
+ "description": "OpenCode Go subscription: low-cost open models, in OpenCode through /connect.",
4
+ "verified_on": "2026-10-30",
5
+ "agents": ["opencode-v2", "opencode-v1"],
6
+ "provider": "opencode-go",
7
+ "tiers": {
8
+ "fast": { "model": "opencode-go/glm-5.3-flash" },
9
+ "balanced": { "model": "opencode-go/kimi-k3" },
10
+ "strong": { "model": "opencode-go/kimi-k3.1-pro" }
11
+ },
12
+ "primary": {
13
+ "plan": "strong", "build": "balanced"
14
+ },
15
+ "main_model": "opencode-go/kimi-k3",
16
+ "notes": "Chosen models are not used for training per opencode.ai/docs/go. Avoid models named Contributor or Free: some train on your prompts. Confirm IDs with `opencode models opencode-go`."
17
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "_comment": "Maps GSD agents to tiers; lean-agents resolves each tier to this profile's model and writes model_overrides to ~/.gsd/defaults.json.",
3
+ "model_overrides": {
4
+ "gsd-planner": "strong",
5
+ "gsd-roadmapper": "strong",
6
+ "gsd-debugger": "strong",
7
+ "gsd-debug-session-manager": "strong",
8
+ "gsd-security-auditor": "strong",
9
+ "gsd-executor": "balanced",
10
+ "gsd-verifier": "balanced",
11
+ "gsd-advisor-researcher": "balanced",
12
+ "gsd-code-fixer": "balanced",
13
+ "gsd-code-reviewer": "balanced",
14
+ "gsd-phase-researcher": "fast",
15
+ "gsd-project-researcher": "fast",
16
+ "gsd-research-synthesizer": "fast",
17
+ "gsd-domain-researcher": "fast",
18
+ "gsd-ai-researcher": "fast",
19
+ "gsd-ui-researcher": "fast",
20
+ "gsd-plan-checker": "fast",
21
+ "gsd-integration-checker": "fast",
22
+ "gsd-ui-checker": "fast",
23
+ "gsd-codebase-mapper": "fast",
24
+ "gsd-pattern-mapper": "fast"
25
+ }
26
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "vertex-gemini",
3
+ "description": "OpenCode with Gemini models on Google Vertex AI (good fit for Google Cloud credits).",
4
+ "verified_on": "2026-10-26",
5
+ "agents": ["opencode-v2", "opencode-v1"],
6
+ "provider": "google-vertex",
7
+ "tiers": {
8
+ "fast": { "model": "google-vertex/gemini-3.5-flash-lite" },
9
+ "balanced": { "model": "google-vertex/gemini-3.8-flash" },
10
+ "strong": { "model": "google-vertex/gemini-4-argon", "options": { "reasoningEffort": "high" } }
11
+ },
12
+ "primary": {
13
+ "plan": "strong",
14
+ "build": "balanced"
15
+ },
16
+ "main_model": "google-vertex/gemini-3.8-flash",
17
+ "notes": "Requires GOOGLE_CLOUD_PROJECT and a Vertex location in your environment. Confirm IDs with `opencode models google-vertex`; the update-models skill refreshes them."
18
+ }
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ // Usage: adhd-skill.mjs on|off <home>. See scripts/lib/adhd.mjs for why this exists.
3
+ import fs from 'node:fs';
4
+ import { adhdSkillFiles, setInvocable } from './lib/adhd.mjs';
5
+
6
+ const [mode, home] = process.argv.slice(2);
7
+ const files = adhdSkillFiles(home);
8
+ for (const f of files) fs.writeFileSync(f, setInvocable(fs.readFileSync(f, 'utf8'), mode === 'on'));
9
+ if (mode === 'on' && !files.length) {
10
+ console.error('i-have-adhd skill not found');
11
+ process.exit(1);
12
+ }
@@ -0,0 +1,104 @@
1
+ #!/usr/bin/env node
2
+ // After a green daily ci-latest run: bump core/pins.json to the newest stable version at least 14 days old and write the
3
+ // PR body. A human merges the PR. The workflow does the git work; this script only edits the file.
4
+ // node scripts/bump-pins.mjs <body-file> (needs GITHUB_TOKEN for GitHub API calls)
5
+ import fs from 'node:fs';
6
+ import { fileURLToPath, pathToFileURL } from 'node:url';
7
+ import { isNewer, latestVersion, notesUrl, tagSha } from './version-watch.mjs';
8
+ import { compare, minVersion } from './lib/node-runtime.mjs';
9
+
10
+ const FILE = fileURLToPath(new URL('../core/pins.json', import.meta.url));
11
+ const PKG = fileURLToPath(new URL('../package.json', import.meta.url));
12
+ const STABLE = /^v?\d+\.\d+\.\d+$/;
13
+ const DAY = 86400000;
14
+ // The skill pin for this repo is bumped by the release, never by the daily run.
15
+ const SKIP = new Set(['lean-update']);
16
+
17
+ // { version, date } of the newest candidate at least `days` old, or null. npm: from the registry's publish times.
18
+ // Skill (GitHub tag): the newest tag's release date; null when it has no release or is too young.
19
+ export async function pickVersion(p, get, now, days = 14) {
20
+ const old = (iso) => now - Date.parse(iso) >= days * DAY;
21
+ if (p.kind === 'npm') {
22
+ const times = (await get(`https://registry.npmjs.org/${p.source.replace('/', '%2F')}`)).time ?? {};
23
+ const best = Object.keys(times).filter((v) => STABLE.test(v) && old(times[v])).reduce((b, v) => (!b || isNewer(b, v) ? v : b), null);
24
+ return best && { version: best, date: times[best].slice(0, 10) };
25
+ }
26
+ const tag = await latestVersion(p, get);
27
+ if (!tag) return null;
28
+ const published = (await get(`https://api.github.com/repos/${p.source}/releases/tags/${tag}`)).published_at;
29
+ return published && old(published) ? { version: tag, date: published.slice(0, 10) } : null;
30
+ }
31
+
32
+ // Edits only the version, verified, sha and integrity values on the pin's own line, so the file keeps its layout.
33
+ export function applyBump(text, key, version, verified, extra = {}) {
34
+ return text.split('\n').map((l) => {
35
+ if (!l.trimStart().startsWith(`"${key}":`)) return l;
36
+ let out = l.replace(/"version": "[^"]*"/, `"version": "${version}"`).replace(/"verified": "[^"]*"/, `"verified": "${verified}"`);
37
+ for (const [field, value] of Object.entries(extra)) out = out.replace(new RegExp(`"${field}": "[^"]*"`), `"${field}": "${value}"`);
38
+ return out;
39
+ }).join('\n');
40
+ }
41
+
42
+ // The commit SHA (git, skill) or npm integrity a bumped pin must carry; {} for pins that have neither.
43
+ async function checks(p, version, get) {
44
+ const extra = {};
45
+ if (p.sha) extra.sha = await tagSha(p.source, version, get);
46
+ if (p.integrity) {
47
+ const meta = await get(`https://registry.npmjs.org/${p.source.replace('/', '%2F')}/${version}`);
48
+ extra.integrity = meta.dist.integrity;
49
+ // shortcut: only rewrites a `node` field the pin already has; a range that appears later is caught by verify-pins.
50
+ if (p.node !== undefined) extra.node = meta.engines?.node ?? '';
51
+ }
52
+ return extra;
53
+ }
54
+
55
+ export async function bump({ text, get, now = Date.now(), today = new Date(now).toISOString().slice(0, 10), log = console.log }) {
56
+ const pins = JSON.parse(text).pins;
57
+ const changes = [];
58
+ for (const [key, p] of Object.entries(pins)) {
59
+ if (SKIP.has(key) || p.kind === 'download') continue;
60
+ if (p.hold) { log(`held: ${key} ${p.version} (${p.hold})`); continue; }
61
+ try {
62
+ const pick = await pickVersion(p, get, now);
63
+ if (!pick || !isNewer(p.version, pick.version)) continue;
64
+ const extra = await checks(p, pick.version, get);
65
+ text = applyBump(text, key, pick.version, today, extra);
66
+ changes.push({ key, from: p.version, to: pick.version, ci: p.ci, notes: notesUrl(p, pick.version), published: pick.date, nodeFrom: p.node, nodeTo: extra.node });
67
+ } catch (e) { log(`! ${key}: ${e.message}`); }
68
+ }
69
+ return { text, changes };
70
+ }
71
+
72
+ // "22.13 -> 22.15 ⚠ raised ⚠ above lean floor"; "-" for a pin that declares no range.
73
+ const lowest = (r) => (r ? minVersion(r) : [0, 0, 0]);
74
+ export function nodeCell(c, floor = lowest(JSON.parse(fs.readFileSync(PKG, 'utf8')).engines.node)) {
75
+ if (!c.nodeFrom && !c.nodeTo) return '-';
76
+ const flags = [compare(lowest(c.nodeTo), lowest(c.nodeFrom)) > 0 && '⚠ raised', compare(lowest(c.nodeTo), floor) > 0 && '⚠ above lean floor'].filter(Boolean);
77
+ return [`${c.nodeFrom || 'none'} → ${c.nodeTo || 'none'}`, ...flags].join(' ');
78
+ }
79
+
80
+ export const render = (changes) => [
81
+ 'Daily `ci-latest` was green. These pins move to the newest stable version published at least 14 days ago. The picked versions can differ from the ones `ci-latest` tested, so `ci.yml` is dispatched on this branch with the new pins. A human merges this PR.',
82
+ '',
83
+ '| Pin | From | To | Node from → to | Published | Notes | CI job |',
84
+ '| --- | --- | --- | --- | --- | --- | --- |',
85
+ ...changes.map((c) => `| ${c.key} | ${c.from} | ${c.to} | ${nodeCell(c)} | ${c.published} | ${c.notes} | ${c.ci} |`),
86
+ '',
87
+ 'Merge only when the `ci` job named for each pin is green for this head commit (VERIFY: the checks come from the workflow dispatch, not from a PR event).',
88
+ ].join('\n');
89
+
90
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
91
+ const body = process.argv[2];
92
+ if (!body) { console.error('usage: bump-pins.mjs <body-file>'); process.exit(1); }
93
+ const token = process.env.GITHUB_TOKEN;
94
+ const get = async (url) => {
95
+ const r = await fetch(url, { headers: { accept: 'application/json', ...(token && url.includes('api.github.com') ? { authorization: `Bearer ${token}` } : {}) } });
96
+ if (!r.ok) throw new Error(`${url}: ${r.status}`);
97
+ return r.json();
98
+ };
99
+ const { text, changes } = await bump({ text: fs.readFileSync(FILE, 'utf8'), get });
100
+ if (!changes.length) { console.log('nothing to bump'); process.exit(0); }
101
+ fs.writeFileSync(FILE, text);
102
+ fs.writeFileSync(body, `${render(changes)}\n`);
103
+ for (const c of changes) console.log(`${c.key}: ${c.from} -> ${c.to}`);
104
+ }