opencodekit 0.20.7 → 0.21.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 (82) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +60 -0
  3. package/dist/template/.opencode/agent/build.md +3 -2
  4. package/dist/template/.opencode/agent/explore.md +14 -14
  5. package/dist/template/.opencode/agent/general.md +1 -1
  6. package/dist/template/.opencode/agent/plan.md +1 -1
  7. package/dist/template/.opencode/agent/review.md +1 -1
  8. package/dist/template/.opencode/agent/vision.md +0 -9
  9. package/dist/template/.opencode/memory.db +0 -0
  10. package/dist/template/.opencode/memory.db-shm +0 -0
  11. package/dist/template/.opencode/memory.db-wal +0 -0
  12. package/dist/template/.opencode/opencode.json +83 -614
  13. package/dist/template/.opencode/opencodex-fast.jsonc +1 -1
  14. package/dist/template/.opencode/package.json +1 -1
  15. package/dist/template/.opencode/plugin/copilot-auth.ts +27 -12
  16. package/dist/template/.opencode/plugin/prompt-leverage.ts +193 -0
  17. package/dist/template/.opencode/plugin/prompt-leverage.ts.bak +228 -0
  18. package/dist/template/.opencode/plugin/sdk/copilot/copilot-provider.ts +14 -2
  19. package/dist/template/.opencode/plugin/sdk/copilot/index.ts +2 -2
  20. package/dist/template/.opencode/plugin/sdk/copilot/responses/convert-to-openai-responses-input.ts +335 -0
  21. package/dist/template/.opencode/plugin/sdk/copilot/responses/map-openai-responses-finish-reason.ts +22 -0
  22. package/dist/template/.opencode/plugin/sdk/copilot/responses/openai-config.ts +18 -0
  23. package/dist/template/.opencode/plugin/sdk/copilot/responses/openai-error.ts +22 -0
  24. package/dist/template/.opencode/plugin/sdk/copilot/responses/openai-responses-api-types.ts +214 -0
  25. package/dist/template/.opencode/plugin/sdk/copilot/responses/openai-responses-language-model.ts +1770 -0
  26. package/dist/template/.opencode/plugin/sdk/copilot/responses/openai-responses-prepare-tools.ts +173 -0
  27. package/dist/template/.opencode/plugin/sdk/copilot/responses/openai-responses-settings.ts +1 -0
  28. package/dist/template/.opencode/plugin/sdk/copilot/responses/tool/code-interpreter.ts +87 -0
  29. package/dist/template/.opencode/plugin/sdk/copilot/responses/tool/file-search.ts +127 -0
  30. package/dist/template/.opencode/plugin/sdk/copilot/responses/tool/image-generation.ts +114 -0
  31. package/dist/template/.opencode/plugin/sdk/copilot/responses/tool/local-shell.ts +64 -0
  32. package/dist/template/.opencode/plugin/sdk/copilot/responses/tool/web-search-preview.ts +103 -0
  33. package/dist/template/.opencode/plugin/sdk/copilot/responses/tool/web-search.ts +102 -0
  34. package/dist/template/.opencode/pnpm-lock.yaml +791 -9
  35. package/dist/template/.opencode/skill/api-and-interface-design/SKILL.md +162 -0
  36. package/dist/template/.opencode/skill/beads/SKILL.md +10 -9
  37. package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +10 -10
  38. package/dist/template/.opencode/skill/ci-cd-and-automation/SKILL.md +202 -0
  39. package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +253 -0
  40. package/dist/template/.opencode/skill/code-simplification/SKILL.md +211 -0
  41. package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +12 -0
  42. package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +16 -6
  43. package/dist/template/.opencode/skill/deprecation-and-migration/SKILL.md +189 -0
  44. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +12 -48
  45. package/dist/template/.opencode/skill/documentation-and-adrs/SKILL.md +220 -0
  46. package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +29 -0
  47. package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +237 -0
  48. package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +38 -0
  49. package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +509 -0
  50. package/dist/template/.opencode/skill/incremental-implementation/SKILL.md +191 -0
  51. package/dist/template/.opencode/skill/performance-optimization/SKILL.md +236 -0
  52. package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +90 -0
  53. package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +91 -0
  54. package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +157 -0
  55. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +11 -0
  56. package/dist/template/.opencode/skill/screenshot/SKILL.md +48 -0
  57. package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +54 -0
  58. package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +22 -0
  59. package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +40 -0
  60. package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +126 -0
  61. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +163 -0
  62. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +585 -0
  63. package/dist/template/.opencode/skill/security-and-hardening/SKILL.md +296 -0
  64. package/dist/template/.opencode/skill/security-threat-model/SKILL.md +36 -0
  65. package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +255 -0
  66. package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +32 -0
  67. package/dist/template/.opencode/skill/skill-installer/SKILL.md +58 -0
  68. package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +21 -0
  69. package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +313 -0
  70. package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +106 -0
  71. package/dist/template/.opencode/skill/structured-edit/SKILL.md +10 -0
  72. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +66 -1
  73. package/package.json +1 -1
  74. package/dist/template/.opencode/skill/beads-bridge/SKILL.md +0 -321
  75. package/dist/template/.opencode/skill/code-navigation/SKILL.md +0 -130
  76. package/dist/template/.opencode/skill/mqdh/SKILL.md +0 -171
  77. package/dist/template/.opencode/skill/obsidian/SKILL.md +0 -192
  78. package/dist/template/.opencode/skill/obsidian/mcp.json +0 -22
  79. package/dist/template/.opencode/skill/pencil/SKILL.md +0 -72
  80. package/dist/template/.opencode/skill/ralph/SKILL.md +0 -296
  81. package/dist/template/.opencode/skill/tilth-cli/SKILL.md +0 -207
  82. package/dist/template/.opencode/skill/tool-priority/SKILL.md +0 -299
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.20.7";
23
+ var version = "0.21.0";
24
24
 
25
25
  //#endregion
26
26
  //#region src/utils/license.ts
@@ -22,6 +22,20 @@ When instructions conflict:
22
22
 
23
23
  1. **Security** — never expose or invent credentials
24
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
25
+
26
+ ### Source Hierarchy
27
+
28
+ When verifying facts or API usage, rank sources by authority:
29
+
30
+ | Tier | Source | Trust Level |
31
+ | --------------------- | ------------------------------------------------------------ | ------------------------------------- |
32
+ | **1 (Authoritative)** | Official documentation, type definitions, source code | High — use directly |
33
+ | **2 (Supportive)** | Official blog posts, changelogs, web standards specs | Medium — cross-reference |
34
+ | **3 (Contextual)** | Browser compat tables, release notes, migration guides | Medium — verify currency |
35
+ | **4 (Unreliable)** | Stack Overflow, blog posts, AI-generated docs, training data | Low — never cite without verification |
36
+
37
+ If a source from Tier 4 conflicts with Tier 1-2, the higher tier wins. If Tier 1-2 sources conflict with each other, state the conflict explicitly.
38
+
25
39
  3. **User intent** — do what was asked, simply and directly
26
40
  4. **Agency preservation** — "likely difficult" ≠ "impossible" ≠ "don't try"
27
41
  5. This `AGENTS.md`
@@ -45,6 +59,7 @@ If a newer user instruction conflicts with an earlier one, follow the newer inst
45
59
  - Stay in scope; no speculative refactors
46
60
  - Read files before editing
47
61
  - Delegate when work is large, uncertain, or cross-domain
62
+ - When you notice something that should be improved but isn't part of the current task, log it as **"NOTICED BUT NOT TOUCHING: [description]"** and continue with the current task. This makes scope-creep visible and auditable without derailing the work.
48
63
 
49
64
  ### Simplicity First
50
65
 
@@ -317,6 +332,51 @@ For major tracked work:
317
332
  - **Skills** hold reusable procedures
318
333
  - **Agent prompts** stay role-focused; don't duplicate long checklists
319
334
  - **Load skills on demand**, not by default
335
+ - **Auto-load on input** — The `prompt-leverage` skill is a pre-processing layer that activates on every meaningful user input to upgrade prompts before planning/execution
336
+
337
+ ### Pre-Processing Layer
338
+
339
+ On every meaningful user input (not just greetings or确认):
340
+
341
+ 1. **Load `prompt-leverage`** skill
342
+ 2. Apply the seven-block framework to strengthen the user's prompt
343
+ 3. Preserve original intent; add only necessary structure
344
+ 4. Proceed with planning/execution using the upgraded prompt
345
+
346
+ This ensures every prompt is execution-ready before work begins.
347
+
348
+ ### Intent → Skill Mapping
349
+
350
+ When user intent is clear, load the appropriate skills:
351
+
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` |
320
380
 
321
381
  ---
322
382
 
@@ -92,6 +92,7 @@ Every diff you produce must meet these standards:
92
92
  - **Strong typing** — no `as any`, no `@ts-ignore` unless documented with a reason
93
93
  - **Reuse existing interfaces** — extend or compose existing types before creating new ones
94
94
  - **Minimal tests** — if the file you're editing has adjacent tests, add coverage for your change
95
+
95
96
  ## Ritual Structure
96
97
 
97
98
  Each task follows a five-phase ritual. Constraints create the container; the ritual transforms intent into output.
@@ -181,9 +182,9 @@ Load contextually when needed:
181
182
  | Debug/bug work | `systematic-debugging`, `root-cause-tracing` |
182
183
  | Test-heavy work | `test-driven-development`, `testing-anti-patterns` |
183
184
  | UI work | `frontend-design`, `react-best-practices` |
184
- | Parallel orchestration | `swarm-coordination`, `beads-bridge` |
185
+ | Parallel orchestration | `swarm-coordination` |
185
186
  | Before completion | `requesting-code-review`, `finishing-a-development-branch` |
186
- | Codebase exploration | `code-navigation` |
187
+ | Codebase exploration | `code-search-patterns` |
187
188
 
188
189
  ## Execution Mode
189
190
 
@@ -43,20 +43,20 @@ Find relevant files, symbols, and usage paths quickly for the caller.
43
43
 
44
44
  ## Tools — Use These for Local Code Search
45
45
 
46
- **Prefer tilth CLI** (`npx -y tilth`) for symbol search and file reading — it combines grep + tree-sitter + cat into one call. See `tilth-cli` skill for full syntax.
47
-
48
- | Tool | Use For | Example |
49
- |------|---------|--------|
50
- | `tilth` (symbol) | AST-aware symbol search (definitions + usages) | `npx -y tilth handleAuth --scope src/` |
51
- | `tilth` (read) | Smart file reading with outline for large files | `npx -y tilth src/auth.ts --section 44-89` |
52
- | `tilth` (glob) | Find files by pattern with token estimates | `npx -y tilth "*.test.ts" --scope src/` |
53
- | `tilth` (map) | Codebase structural overview | `npx -y tilth --map --scope src/` |
54
- | `grep` | Find text/regex patterns in files | `grep(pattern: "PatchEntry", include: "*.ts")` |
55
- | `glob` | Find files by name/pattern | `glob(pattern: "src/**/*.ts")` |
56
- | `lsp` (goToDefinition) | Jump to symbol definition | `lsp(operation: "goToDefinition", filePath: "...", line: N, character: N)` |
57
- | `lsp` (findReferences) | Find all usages of a symbol | `lsp(operation: "findReferences", ...)` |
58
- | `lsp` (hover) | Get type info and docs | `lsp(operation: "hover", ...)` |
59
- | `read` | Read file content | `read(filePath: "src/utils/patch.ts")` |
46
+ **Prefer tilth CLI** (`npx -y tilth`) for symbol search and file reading — it combines grep + tree-sitter + cat into one call. See `code-search-patterns` skill for full syntax.
47
+
48
+ | Tool | Use For | Example |
49
+ | ---------------------- | ----------------------------------------------- | -------------------------------------------------------------------------- |
50
+ | `tilth` (symbol) | AST-aware symbol search (definitions + usages) | `npx -y tilth handleAuth --scope src/` |
51
+ | `tilth` (read) | Smart file reading with outline for large files | `npx -y tilth src/auth.ts --section 44-89` |
52
+ | `tilth` (glob) | Find files by pattern with token estimates | `npx -y tilth "*.test.ts" --scope src/` |
53
+ | `tilth` (map) | Codebase structural overview | `npx -y tilth --map --scope src/` |
54
+ | `grep` | Find text/regex patterns in files | `grep(pattern: "PatchEntry", include: "*.ts")` |
55
+ | `glob` | Find files by name/pattern | `glob(pattern: "src/**/*.ts")` |
56
+ | `lsp` (goToDefinition) | Jump to symbol definition | `lsp(operation: "goToDefinition", filePath: "...", line: N, character: N)` |
57
+ | `lsp` (findReferences) | Find all usages of a symbol | `lsp(operation: "findReferences", ...)` |
58
+ | `lsp` (hover) | Get type info and docs | `lsp(operation: "hover", ...)` |
59
+ | `read` | Read file content | `read(filePath: "src/utils/patch.ts")` |
60
60
 
61
61
  **NEVER** use `websearch`, `webfetch`, or `codesearch` — those search the internet, not your project.
62
62
  **NEVER** modify files or run destructive commands — bash is for tilth CLI and read-only operations only.
@@ -157,7 +157,7 @@ Before claiming task done:
157
157
  4. Run validation (lint/typecheck/tests as applicable)
158
158
  5. Report changed files with `file:line` references
159
159
 
160
- **Code navigation:** Use tilth CLI for AST-aware search when available — see `tilth-cli` skill for syntax. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for symbol definitions.
160
+ **Code navigation:** Use tilth CLI for AST-aware search when available — see `code-search-patterns` skill for syntax. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for symbol definitions.
161
161
 
162
162
  ## Progress Updates
163
163
 
@@ -386,7 +386,7 @@ When planning under constraint:
386
386
  4. **Release**: Write actionable plan with exact file paths, commands, and verification
387
387
  5. **Reset**: End with a concrete next command (`/ship <id>`, `/start <child-id>`, etc.)
388
388
 
389
- **Code navigation:** Use tilth CLI for AST-aware search and `--map` for structural overview — see `tilth-cli` skill.
389
+ **Code navigation:** Use tilth CLI for AST-aware search and `--map` for structural overview — see `code-search-patterns` skill.
390
390
 
391
391
  ## Output
392
392
 
@@ -178,7 +178,7 @@ return <div>No messages</div> // State exists but not used
178
178
  3. For each finding: explain why, when it happens, and impact
179
179
  4. If no qualifying findings exist, say so explicitly
180
180
 
181
- **Code navigation:** Use tilth CLI for AST-aware symbol search when tracing cross-file dependencies — see `tilth-cli` skill. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for understanding call chains.
181
+ **Code navigation:** Use tilth CLI for AST-aware symbol search when tracing cross-file dependencies — see `code-search-patterns` skill. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for understanding call chains.
182
182
 
183
183
  ## Output
184
184
 
@@ -71,7 +71,6 @@ Route by need:
71
71
  | Mockup-to-implementation mapping | `mockup-to-code` |
72
72
  | Distinctive UI direction / anti-slop guidance | `frontend-design` |
73
73
  | Figma design data (read/write via MCP) | `figma-go` |
74
- | OpenPencil design-as-code workflow | `pencil` |
75
74
  | Brand identity extraction from URLs | `webclaw` |
76
75
 
77
76
  ### Taste-Skill Variants (installed)
@@ -108,14 +107,6 @@ If Figma is available, request MCP access via `figma-go` and ground feedback in
108
107
  2. Use `figma-go` to pull `get_design_context` or `get_node`
109
108
  3. Reference node IDs in findings for traceability
110
109
 
111
- ## OpenPencil Workflow (when no Figma)
112
-
113
- If design must be created or iterated quickly, use OpenPencil via the legacy `pencil` skill:
114
-
115
- 1. Create/modify `.op` via `op` CLI
116
- 2. Export PNGs or code for review
117
- 3. Provide audit with node-level critique where possible
118
-
119
110
  ## Brand Extraction Workflow (when auditing existing sites)
120
111
 
121
112
  Use `webclaw` MCP to extract brand identity from live sites:
Binary file