opencodekit 0.21.0 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/template/.opencode/AGENTS.md +51 -30
  3. package/dist/template/.opencode/agent/vision.md +0 -1
  4. package/dist/template/.opencode/memory.db +0 -0
  5. package/dist/template/.opencode/memory.db-shm +0 -0
  6. package/dist/template/.opencode/memory.db-wal +0 -0
  7. package/dist/template/.opencode/opencode.json +2 -2
  8. package/dist/template/.opencode/package.json +20 -21
  9. package/dist/template/.opencode/plugin/README.md +0 -7
  10. package/dist/template/.opencode/plugin/copilot-auth.ts +59 -0
  11. package/dist/template/.opencode/plugin/prompt-leverage.ts +136 -138
  12. package/dist/template/.opencode/pnpm-lock.yaml +140 -706
  13. package/dist/template/.opencode/skill/agent-evals/SKILL.md +208 -0
  14. package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +76 -0
  15. package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +222 -0
  16. package/dist/template/.opencode/skill/context-condensation/SKILL.md +149 -0
  17. package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +139 -0
  18. package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +253 -0
  19. package/dist/template/.opencode/skill/html-deck-export/SKILL.md +189 -0
  20. package/dist/template/.opencode/skill/test-driven-development/SKILL.md +15 -0
  21. package/package.json +1 -1
  22. package/dist/template/.opencode/plugin/prompt-leverage.ts.bak +0 -228
  23. package/dist/template/.opencode/plugin/stitch.ts +0 -307
  24. package/dist/template/.opencode/skill/stitch/SKILL.md +0 -164
  25. package/dist/template/.opencode/skill/stitch-design-taste/DESIGN.md +0 -121
  26. package/dist/template/.opencode/skill/stitch-design-taste/SKILL.md +0 -197
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
20
 
21
21
  //#endregion
22
22
  //#region package.json
23
- var version = "0.21.0";
23
+ var version = "0.21.2";
24
24
 
25
25
  //#endregion
26
26
  //#region src/utils/license.ts
@@ -3125,9 +3125,9 @@ const MODEL_PRESETS = {
3125
3125
  recommend: {
3126
3126
  model: "github-copilot/gpt-5.4",
3127
3127
  agents: {
3128
- build: "github-copilot/claude-opus-4.6",
3128
+ build: "github-copilot/gpt-5.4",
3129
3129
  plan: "github-copilot/gpt-5.4",
3130
- review: "github-copilot/claude-opus-4.6",
3130
+ review: "github-copilot/gpt-5.3-codex",
3131
3131
  explore: "github-copilot/claude-haiku-4.5",
3132
3132
  general: "github-copilot/gpt-5.3-codex",
3133
3133
  vision: "github-copilot/gemini-3.1-pro-preview",
@@ -3453,7 +3453,7 @@ async function initCommand(rawOptions = {}) {
3453
3453
  {
3454
3454
  value: "recommend",
3455
3455
  label: "Recommended models",
3456
- hint: "gpt-5.4, opus-4.6, sonnet-4.6, gemini-3.1"
3456
+ hint: "gpt-5.4, gpt-5.3-codex, sonnet-4.6, gemini-3.1"
3457
3457
  },
3458
3458
  {
3459
3459
  value: "custom",
@@ -21,7 +21,7 @@ Your loop: **perceive → create → verify → ship.**
21
21
  When instructions conflict:
22
22
 
23
23
  1. **Security** — never expose or invent credentials
24
- 2. **Anti-hallucination** — verify before asserting; if context is missing, prefer lookup over guessing; if you must proceed without full context, label assumptions explicitly and choose a reversible action
24
+ 2. **Anti-hallucination** — verify before asserting; if context is missing, prefer lookup over guessing; if you must proceed without full context, label assumptions explicitly and choose a reversible action. **Specific products / versions / launch dates / specs**: when the user names a real product (e.g. "DJI Pocket 4", "Gemini 3 Pro", a new SDK), always WebSearch its current state before answering. Forbidden phrases: "I think X hasn't launched", "X is currently version N" (without checking), "X probably doesn't exist", "as far as I know X's specs are…". Allowed: "Let me search for the latest state of X."
25
25
 
26
26
  ### Source Hierarchy
27
27
 
@@ -70,6 +70,8 @@ If a newer user instruction conflicts with an earlier one, follow the newer inst
70
70
  - Include effort signal when proposing work: **S** (<1h), **M** (1-3h), **L** (1-2d), **XL** (>2d)
71
71
  - Stop when "good enough" — note what signals would justify revisiting
72
72
 
73
+ **Trivial Task Escape Hatch.** When effort = **S** AND the change is reversible (typo fix, comment edit, single-line config tweak, isolated test addition), skip the heavy ritual: no Plan Quality Gate, no Worker Distrust Protocol, no Structured Termination Contract, no PRD. Just do it, run the relevant verification command, and report. Rigor scales with risk — don't pay overhead the change doesn't warrant.
74
+
73
75
  ### Anti-Redundancy
74
76
 
75
77
  - **Search before creating** — always check if a utility, helper, or component already exists before creating a new one
@@ -102,12 +104,16 @@ If a newer user instruction conflicts with an earlier one, follow the newer inst
102
104
  - Don't stop early when another tool call would improve the result
103
105
  - Keep calling tools until the task is complete **and** verification passes
104
106
  - If a tool returns empty or partial results, retry with a different strategy before giving up (see Empty Result Recovery)
107
+ - For present-day facts, external APIs, provider behavior, and prior-session context claims, check tools or memory first instead of answering from stale recall
108
+ - If the user provides a specific URL, file path, error log, screenshot, or artifact, inspect that exact evidence before abstracting from it
105
109
 
106
110
  ### Dependency Checks
107
111
 
108
112
  - Before taking an action, check whether prerequisite discovery, lookup, or memory retrieval steps are required
109
113
  - Don't skip prerequisite steps because the final action seems obvious
110
114
  - If a task depends on the output of a prior step, resolve that dependency first
115
+ - Don't claim a capability, tool, or context is unavailable until you've checked the relevant tool, memory, or file evidence
116
+ - If the user writes as if prior context exists ("continue", "that bug", "my project", "what we decided"), search memory or prior sessions before asking them to restate it
111
117
 
112
118
  ### Empty Result Recovery
113
119
 
@@ -115,7 +121,8 @@ If a lookup, search, or tool call returns empty, partial, or suspiciously narrow
115
121
 
116
122
  1. Don't immediately conclude that no results exist
117
123
  2. Try at least 1-2 fallback strategies (alternative query terms, broader filters, different source/tool)
118
- 3. Only then report "no results found" along with what strategies were attempted
124
+ 3. If results look off-target, refine and retry before concluding the task is blocked
125
+ 4. Only then report "no results found" along with what strategies were attempted
119
126
 
120
127
  ### Completeness Tracking
121
128
 
@@ -123,6 +130,8 @@ If a lookup, search, or tool call returns empty, partial, or suspiciously narrow
123
130
  - Maintain an internal checklist of deliverables (use TodoWrite for multi-step work)
124
131
  - For lists, batches, or paginated results: determine expected scope, track processed items, confirm full coverage
125
132
  - If any item is blocked by missing data, mark it `[blocked]` and state exactly what is missing
133
+ - For multi-part requests, address every part and synthesize the result instead of making the user inspect raw logs or partial outputs
134
+ - Once you start a task, see it through to a natural stopping point unless blocked by a real dependency or reversibility constraint
126
135
 
127
136
  ### Plan Quality Gate
128
137
 
@@ -311,6 +320,9 @@ Ask only when:
311
320
  - Ambiguity materially changes outcome
312
321
  - Action is destructive/irreversible
313
322
 
323
+ Before asking, prefer a reversible action, tool lookup, or narrow assumption when that can resolve the ambiguity safely.
324
+ If a question is still needed, ask at most one targeted question when possible.
325
+
314
326
  Keep questions targeted and minimal.
315
327
 
316
328
  ---
@@ -349,34 +361,41 @@ This ensures every prompt is execution-ready before work begins.
349
361
 
350
362
  When user intent is clear, load the appropriate skills:
351
363
 
352
- | Intent | Phase | Skills to Load |
353
- | ------------------------- | -------------- | ---------------------------------------------------------------------------------- |
354
- | "Build a feature" | Define → Build | `prd` → `writing-plans` → `incremental-implementation` + `test-driven-development` |
355
- | "Fix a bug" | Verify | `systematic-debugging` → `root-cause-tracing` |
356
- | "Review code" | Review | `receiving-code-review` or `requesting-code-review` |
357
- | "Simplify / refactor" | Review | `code-simplification` |
358
- | "Ship it" | Ship | `verification-before-completion` → `finishing-a-development-branch` |
359
- | "Plan this" | Plan | `brainstorming` → `prd` → `writing-plans` |
360
- | "Execute a plan" | Build | `executing-plans` + `subagent-driven-development` |
361
- | "Debug flaky tests" | Verify | `condition-based-waiting` + `systematic-debugging` |
362
- | "Debug in browser" | Verify | `chrome-devtools` or `playwright` |
363
- | "Write / fix tests" | Verify | `test-driven-development` + `testing-anti-patterns` |
364
- | "Build UI" | Build | `frontend-design` + `design-taste-frontend` |
365
- | "Build UI from mockup" | Build | `mockup-to-code` + `frontend-design` |
366
- | "Redesign existing UI" | Build | `redesign-existing-projects` + `design-taste-frontend` |
367
- | "Review UI / UX" | Review | `web-design-guidelines` + `visual-analysis` + `accessibility-audit` |
368
- | "Audit accessibility" | Verify | `accessibility-audit` |
369
- | "Build React / Next.js" | Build | `react-best-practices` + `frontend-design` |
370
- | "Research X" | Define | `deep-research` or `opensrc` |
371
- | "Design an API" | Build | `api-and-interface-design` + `documentation-and-adrs` |
372
- | "Set up CI/CD" | Ship | `ci-cd-and-automation` + `verification-gates` |
373
- | "Deploy app" | Ship | `vercel-deploy-claimable` |
374
- | "Deprecate / migrate" | Ship | `deprecation-and-migration` + `incremental-implementation` |
375
- | "Write docs / record ADR" | Define | `documentation-and-adrs` |
376
- | "Optimize performance" | Verify | `performance-optimization` |
377
- | "Harden security" | Verify | `security-and-hardening` + `defense-in-depth` |
378
- | "Verify before merge" | Ship | `reconcile` + `verification-gates` |
379
- | "Create a skill" | Build | `skill-creator` + `writing-skills` |
364
+ | Intent | Phase | Skills to Load |
365
+ | ----------------------------- | -------------- | ------------------------------------------------------------------------------------------------ |
366
+ | "Build a feature" | Define → Build | `prd` → `writing-plans` → `incremental-implementation` + `test-driven-development` |
367
+ | "Fix a bug" | Verify | `systematic-debugging` → `root-cause-tracing` |
368
+ | "Review code" | Review | `receiving-code-review` or `requesting-code-review` |
369
+ | "Simplify / refactor" | Review | `code-simplification` |
370
+ | "Ship it" | Ship | `verification-before-completion` → `finishing-a-development-branch` |
371
+ | "Plan this" | Plan | `brainstorming` → `prd` → `writing-plans` |
372
+ | "Execute a plan" | Build | `executing-plans` + `subagent-driven-development` |
373
+ | "Debug flaky tests" | Verify | `condition-based-waiting` + `systematic-debugging` |
374
+ | "Debug in browser" | Verify | `chrome-devtools` or `playwright` |
375
+ | "Write / fix tests" | Verify | `test-driven-development` + `testing-anti-patterns` |
376
+ | "Build UI" | Build | `frontend-design` + `design-taste-frontend` |
377
+ | "Build UI from mockup" | Build | `mockup-to-code` + `frontend-design` |
378
+ | "Redesign existing UI" | Build | `redesign-existing-projects` + `design-taste-frontend` |
379
+ | "Build branded design" | Build | `brand-asset-protocol` + `anti-ai-slop` + (target skill: frontend-design / hi-fi-prototype-html) |
380
+ | "Vague design brief" | Define | `design-direction-advisor` + `anti-ai-slop` |
381
+ | "Build hi-fi prototype" | Build | `hi-fi-prototype-html` + `anti-ai-slop` + `playwright` |
382
+ | "Build slide deck" | Build | `html-deck-export` + `anti-ai-slop` + (optional: `brand-asset-protocol`) |
383
+ | "Avoid AI design defaults" | Build / Review | `anti-ai-slop` |
384
+ | "Review UI / UX" | Review | `web-design-guidelines` + `visual-analysis` + `accessibility-audit` |
385
+ | "Audit accessibility" | Verify | `accessibility-audit` |
386
+ | "Build React / Next.js" | Build | `react-best-practices` + `frontend-design` |
387
+ | "Research X" | Define | `deep-research` or `opensrc` |
388
+ | "Design an API" | Build | `api-and-interface-design` + `documentation-and-adrs` |
389
+ | "Set up CI/CD" | Ship | `ci-cd-and-automation` + `verification-gates` |
390
+ | "Deploy app" | Ship | `vercel-deploy-claimable` |
391
+ | "Deprecate / migrate" | Ship | `deprecation-and-migration` + `incremental-implementation` |
392
+ | "Write docs / record ADR" | Define | `documentation-and-adrs` |
393
+ | "Optimize performance" | Verify | `performance-optimization` |
394
+ | "Harden security" | Verify | `security-and-hardening` + `defense-in-depth` |
395
+ | "Verify before merge" | Ship | `reconcile` + `verification-gates` |
396
+ | "Measure if a skill helps" | Verify | `agent-evals` |
397
+ | "Compress / hand off context" | Build | `context-condensation` + `context-management` |
398
+ | "Create a skill" | Build | `skill-creator` + `writing-skills` |
380
399
 
381
400
  ---
382
401
 
@@ -461,12 +480,14 @@ When tilth MCP is available with `--edit` mode, use hash-anchored edits as a **f
461
480
  ## Output Style
462
481
 
463
482
  - Be concise, direct, and collaborative
483
+ - Keep tone constructive and matter-of-fact; avoid condescension
464
484
  - Prefer deterministic outputs over prose-heavy explanations
465
485
  - Cite concrete file paths and line numbers for non-trivial claims
466
486
  - **No cheerleading** — avoid motivational language, artificial reassurance, or filler ("Got it!", "Great question!", "Sure thing!")
467
487
  - **Never narrate abstractly** — explain what you're doing and why, not that you're "going to look into this"
468
488
  - **Code reviews: bugs first** — identify bugs, risks, and regressions before style or readability comments
469
489
  - **Flat lists preferred** — use sections for hierarchy instead of deeply nested bullets
490
+ - Own mistakes directly and fix them without excessive apology or self-abasement
470
491
 
471
492
  _Complexity is the enemy. Minimize moving parts._
472
493
 
@@ -82,7 +82,6 @@ Use these when the user requests a specific visual direction or when your audit
82
82
  - `high-end-visual-design` — luxury/premium visual polish
83
83
  - `minimalist-ui` — editorial/clean, monochrome, sharp borders
84
84
  - `industrial-brutalist-ui` — experimental/CRT/Swiss mechanical aesthetic
85
- - `stitch-design-taste` — design rules aligned to Stitch export patterns
86
85
  - `full-output-enforcement` — when outputs are lazy/incomplete
87
86
 
88
87
  ## Design Taste Protocol (anti-slop)
Binary file
@@ -3,7 +3,7 @@
3
3
  "agent": {
4
4
  "build": {
5
5
  "description": "Primary development agent with full codebase access",
6
- "model": "github-copilot/claude-opus-4.6"
6
+ "model": "github-copilot/gpt-5.4"
7
7
  },
8
8
  "compaction": {
9
9
  "description": "Session summarizer for context continuity across compactions"
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "review": {
28
28
  "description": "Code review, debugging, and security audit specialist",
29
- "model": "github-copilot/claude-opus-4.6"
29
+ "model": "github-copilot/gpt-5.3-codex"
30
30
  },
31
31
  "scout": {
32
32
  "description": "External research specialist for library docs and patterns",
@@ -1,22 +1,21 @@
1
1
  {
2
- "name": "opencode",
3
- "version": "1.0.0",
4
- "description": "Opencode plugin",
5
- "keywords": [],
6
- "license": "ISC",
7
- "author": "",
8
- "type": "module",
9
- "main": "index.js",
10
- "scripts": {
11
- "type-check": "tsc --noEmit"
12
- },
13
- "dependencies": {
14
- "@google/stitch-sdk": "^0.0.3",
15
- "@opencode-ai/plugin": "1.4.6"
16
- },
17
- "devDependencies": {
18
- "@types/node": "^25.3.0",
19
- "bun-types": "^1.3.9",
20
- "typescript": "^5.9.3"
21
- }
22
- }
2
+ "name": "opencode",
3
+ "version": "1.0.0",
4
+ "description": "Opencode plugin",
5
+ "keywords": [],
6
+ "license": "ISC",
7
+ "author": "",
8
+ "type": "module",
9
+ "main": "index.js",
10
+ "scripts": {
11
+ "type-check": "tsc --noEmit"
12
+ },
13
+ "dependencies": {
14
+ "@opencode-ai/plugin": "1.4.9"
15
+ },
16
+ "devDependencies": {
17
+ "@types/node": "^25.3.0",
18
+ "bun-types": "^1.3.9",
19
+ "typescript": "^5.9.3"
20
+ }
21
+ }
@@ -9,7 +9,6 @@ plugin/
9
9
  ├── memory.ts # 4-tier automated memory system (capture → distill → curate → inject)
10
10
  ├── sessions.ts # Session search tools (find/read)
11
11
  ├── copilot-auth.ts # GitHub Copilot provider/auth integration
12
- ├── stitch.ts # Google Stitch UI generation (8 tools via @google/stitch-sdk)
13
12
  ├── skill-mcp.ts # Skill-scoped MCP bridge (skill_mcp tools)
14
13
  └── lib/
15
14
  ├── memory-tools.ts # 6 core memory tools (observation, search, get, read, update, timeline)
@@ -59,12 +58,6 @@ plugin/
59
58
  - Handles GitHub Copilot OAuth/device flow
60
59
  - Adds model/provider request shaping for compatible reasoning behavior
61
60
 
62
- - `stitch.ts`
63
- - Google Stitch UI generation via `@google/stitch-sdk`
64
- - 8 tools: create_project, get_project, list_projects, list_screens, get_screen, generate_screen, edit_screens, generate_variants
65
- - Direct HTTP to `stitch.googleapis.com/mcp` (no MCP subprocess)
66
- - Auth: STITCH_API_KEY or STITCH_ACCESS_TOKEN env var
67
-
68
61
  ## Notes
69
62
 
70
63
  - OpenCode auto-discovers every `.ts` file in `plugin/` as a plugin — keep helper modules in `lib/`
@@ -864,6 +864,65 @@ export const CopilotAuthPlugin: Plugin = async ({ client: sdk, directory }) => {
864
864
  ),
865
865
  );
866
866
  }
867
+
868
+ // Sanitize tool definitions: strip non-standard fields like
869
+ // "custom" (wrapping eager_input_streaming) injected by
870
+ // runtime layers. These cause "Extra inputs are not permitted"
871
+ // on the Copilot API.
872
+ const toolSource = modifiedBody || body;
873
+ if (Array.isArray(toolSource?.tools)) {
874
+ let toolsChanged = false;
875
+ const sanitizedTools = toolSource.tools.map(
876
+ (tool: any) => {
877
+ if (!tool || typeof tool !== "object") return tool;
878
+
879
+ let result = tool;
880
+
881
+ // Strip top-level non-standard fields from tool object
882
+ if (
883
+ "custom" in result ||
884
+ "eager_input_streaming" in result
885
+ ) {
886
+ toolsChanged = true;
887
+ const {
888
+ custom: _custom,
889
+ eager_input_streaming: _eis,
890
+ ...clean
891
+ } = result;
892
+ result = clean;
893
+ }
894
+
895
+ // Also check nested function object (Chat Completions format)
896
+ if (
897
+ result.function &&
898
+ typeof result.function === "object" &&
899
+ ("custom" in result.function ||
900
+ "eager_input_streaming" in result.function)
901
+ ) {
902
+ toolsChanged = true;
903
+ const {
904
+ custom: _c,
905
+ eager_input_streaming: _e,
906
+ ...cleanFn
907
+ } = result.function;
908
+ result = { ...result, function: cleanFn };
909
+ }
910
+
911
+ return result;
912
+ },
913
+ );
914
+
915
+ if (toolsChanged) {
916
+ modifiedBody = {
917
+ ...(modifiedBody || body),
918
+ tools: sanitizedTools,
919
+ };
920
+ log(
921
+ "debug",
922
+ "Stripped non-standard fields (custom/eager_input_streaming) from tool definitions",
923
+ );
924
+ }
925
+ }
867
926
  } catch {}
868
927
 
869
928
  const headers: Record<string, string> = {