opencodekit 0.15.21 → 0.16.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 (116) hide show
  1. package/dist/index.js +5 -7
  2. package/dist/template/.opencode/AGENTS.md +21 -20
  3. package/dist/template/.opencode/agent/build.md +88 -7
  4. package/dist/template/.opencode/agent/explore.md +1 -1
  5. package/dist/template/.opencode/agent/general.md +54 -4
  6. package/dist/template/.opencode/agent/looker.md +1 -1
  7. package/dist/template/.opencode/agent/painter.md +1 -1
  8. package/dist/template/.opencode/agent/plan.md +52 -0
  9. package/dist/template/.opencode/agent/review.md +1 -1
  10. package/dist/template/.opencode/agent/scout.md +3 -3
  11. package/dist/template/.opencode/agent/vision.md +1 -1
  12. package/dist/template/.opencode/command/create.md +201 -95
  13. package/dist/template/.opencode/command/design.md +5 -7
  14. package/dist/template/.opencode/command/handoff.md +7 -0
  15. package/dist/template/.opencode/command/init.md +25 -47
  16. package/dist/template/.opencode/command/plan.md +35 -16
  17. package/dist/template/.opencode/command/resume.md +7 -18
  18. package/dist/template/.opencode/command/ship.md +156 -0
  19. package/dist/template/.opencode/command/start.md +315 -28
  20. package/dist/template/.opencode/command/ui-review.md +5 -7
  21. package/dist/template/.opencode/command/verify.md +279 -0
  22. package/dist/template/.opencode/memory/_templates/README.md +57 -19
  23. package/dist/template/.opencode/memory/_templates/prd.md +29 -0
  24. package/dist/template/.opencode/memory/_templates/project/tech-stack.md +50 -0
  25. package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
  26. package/dist/template/.opencode/memory/_templates/spec.md +66 -0
  27. package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
  28. package/dist/template/.opencode/memory/observations/2026-02-01-decision-add-skills-vs-commands-to-global-agents-.md +15 -0
  29. package/dist/template/.opencode/memory/observations/2026-02-01-decision-build-agent-auto-loads-skills-contextual.md +31 -0
  30. package/dist/template/.opencode/memory/observations/2026-02-01-decision-fixed-agent-configuration-for-opencodeki.md +25 -0
  31. package/dist/template/.opencode/memory/observations/2026-02-01-decision-focused-agents-md-upgrade-for-opencode-k.md +14 -0
  32. package/dist/template/.opencode/memory/observations/2026-02-01-decision-implement-tier-1-permission-upgrades.md +15 -0
  33. package/dist/template/.opencode/memory/observations/2026-02-01-decision-instructions-config-explicit-paths-not-w.md +40 -0
  34. package/dist/template/.opencode/memory/observations/2026-02-01-decision-merged-context-into-memory-project-singl.md +42 -0
  35. package/dist/template/.opencode/memory/observations/2026-02-01-decision-oracle-tool-should-use-review-agent-not-.md +14 -0
  36. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-agent-auto-loads-skills-contextuall.md +31 -0
  37. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-phased-oracle-command-merge-into-ne.md +14 -0
  38. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prd-workflow-uses-prd-and-prd-task-skill.md +23 -0
  39. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prefer-review-agent-via-opencode-cli-ove.md +14 -0
  40. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-add-ship-command-with.md +14 -0
  41. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command-.md +14 -0
  42. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command.md +14 -0
  43. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-skills-vs-commands-section-from-a.md +14 -0
  44. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-tool-with-ship-command-fl.md +14 -0
  45. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-with-ship-command-workflo.md +14 -0
  46. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-proxypal-oracle-with-cli-review-.md +14 -0
  47. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-dist-template-only-tech-stack.md +50 -0
  48. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-templates-only-tech-stack-md.md +26 -0
  49. package/dist/template/.opencode/memory/observations/2026-02-01-decision-subagents-load-minimal-skills-stay-lean.md +29 -0
  50. package/dist/template/.opencode/memory/observations/2026-02-01-decision-user-approved-permission-upgrades-in-ope.md +15 -0
  51. package/dist/template/.opencode/memory/observations/2026-02-01-discovery-verify-command-already-implemented.md +28 -0
  52. package/dist/template/.opencode/memory/observations/2026-02-01-feature-openspec-phase-b-complete-template-upgra.md +43 -0
  53. package/dist/template/.opencode/memory/observations/2026-02-01-learning-build-agent-should-use-dynamic-lsp-not-f.md +14 -0
  54. package/dist/template/.opencode/memory/observations/2026-02-01-learning-kimi-k2-5-model-requires-temperature-1-0.md +22 -0
  55. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-already-imple.md +27 -0
  56. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-uses-instruct.md +35 -0
  57. package/dist/template/.opencode/memory/observations/2026-02-01-learning-update-build-agent-prompt-to-use-context.md +14 -0
  58. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-using-opencode-expert-.md +14 -0
  59. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-g.md +14 -0
  60. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-r.md +14 -0
  61. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-prefers-copilot-gpt-5-2-codex-mediu.md +14 -0
  62. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-contextu.md +15 -0
  63. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-reviewed.md +15 -0
  64. package/dist/template/.opencode/memory/project/command-rules.md +122 -0
  65. package/dist/template/.opencode/memory/project/tech-stack.md +50 -0
  66. package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
  67. package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
  68. package/dist/template/.opencode/opencode.json +916 -803
  69. package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
  70. package/package.json +1 -1
  71. package/dist/template/.opencode/command/accessibility-check.md +0 -331
  72. package/dist/template/.opencode/command/agent-browser.md +0 -21
  73. package/dist/template/.opencode/command/analyze-mockup.md +0 -423
  74. package/dist/template/.opencode/command/analyze-project.md +0 -295
  75. package/dist/template/.opencode/command/brainstorm.md +0 -373
  76. package/dist/template/.opencode/command/cloudflare.md +0 -70
  77. package/dist/template/.opencode/command/commit.md +0 -245
  78. package/dist/template/.opencode/command/complete-next-task.md +0 -77
  79. package/dist/template/.opencode/command/design-audit.md +0 -480
  80. package/dist/template/.opencode/command/edit-image.md +0 -242
  81. package/dist/template/.opencode/command/finish.md +0 -255
  82. package/dist/template/.opencode/command/fix-ci.md +0 -109
  83. package/dist/template/.opencode/command/fix-types.md +0 -104
  84. package/dist/template/.opencode/command/fix-ui.md +0 -117
  85. package/dist/template/.opencode/command/fix.md +0 -168
  86. package/dist/template/.opencode/command/frontend-design.md +0 -21
  87. package/dist/template/.opencode/command/generate-diagram.md +0 -349
  88. package/dist/template/.opencode/command/generate-icon.md +0 -283
  89. package/dist/template/.opencode/command/generate-image.md +0 -246
  90. package/dist/template/.opencode/command/generate-pattern.md +0 -247
  91. package/dist/template/.opencode/command/generate-storyboard.md +0 -250
  92. package/dist/template/.opencode/command/implement.md +0 -609
  93. package/dist/template/.opencode/command/import-plan.md +0 -406
  94. package/dist/template/.opencode/command/index-knowledge.md +0 -25
  95. package/dist/template/.opencode/command/integration-test.md +0 -424
  96. package/dist/template/.opencode/command/issue.md +0 -102
  97. package/dist/template/.opencode/command/new-feature.md +0 -651
  98. package/dist/template/.opencode/command/opensrc.md +0 -58
  99. package/dist/template/.opencode/command/quick-build.md +0 -238
  100. package/dist/template/.opencode/command/ralph.md +0 -41
  101. package/dist/template/.opencode/command/research-and-implement.md +0 -148
  102. package/dist/template/.opencode/command/research-ui.md +0 -466
  103. package/dist/template/.opencode/command/restore-image.md +0 -424
  104. package/dist/template/.opencode/command/revert-feature.md +0 -386
  105. package/dist/template/.opencode/command/skill-create.md +0 -517
  106. package/dist/template/.opencode/command/skill-optimize.md +0 -556
  107. package/dist/template/.opencode/command/summarize.md +0 -412
  108. package/dist/template/.opencode/command/triage.md +0 -398
  109. package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
  110. package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
  111. package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
  112. package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
  113. package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
  114. package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
  115. package/dist/template/.opencode/tool/notebooklm.ts +0 -488
  116. package/dist/template/.opencode/tool/oracle.ts +0 -240
@@ -0,0 +1,29 @@
1
+ ---
2
+ type: decision
3
+ created: 2026-02-01T16:04:17.552Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["general", "subagent", "skills", "lean", "minimal", "delegation-packet", "verification"]
8
+ ---
9
+
10
+ # 🎯 Subagents load minimal skills, stay lean
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ General subagent (and other subagents) follow different skill philosophy than build leader:
15
+
16
+ **Subagents stay LEAN:**
17
+ - NO beads skill (read-only, don't modify state)
18
+ - NO swarm-coordination (leader handles swarm)
19
+ - NO prd/prd-task (leader responsibility)
20
+ - NO brainstorming (execute, don't design)
21
+
22
+ **Subagents load MINIMAL:**
23
+ - ALWAYS: verification-before-completion
24
+ - IF bug fix: systematic-debugging
25
+ - IF test task: test-driven-development
26
+
27
+ **Trust delegation packets:** If present, follow strictly without loading override skills.
28
+
29
+ This keeps subagents fast, focused, and prevents skill bloat.
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: decision
3
+ created: 2026-02-01T09:31:02.379Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["opencode.json", "permissions", "best-practices", "security", "bead-protocol"]
8
+ files: [".opencode/opencode.json"]
9
+ ---
10
+
11
+ # 🎯 User approved permission upgrades in opencode.json
12
+
13
+ 🟢 **Confidence:** high
14
+
15
+ User asked to implement the recommended best-practice permission upgrades for .opencode/opencode.json (Tier 1 security improvements like tighter git, secret patterns, and publish protections). Proceed only after creating/claiming a bead as per protocol.
@@ -0,0 +1,28 @@
1
+ ---
2
+ type: discovery
3
+ created: 2026-02-01T15:16:50.162Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["verify", "command", "openspec", "completeness", "correctness", "coherence"]
8
+ files: [".opencode/command/verify.md"]
9
+ ---
10
+
11
+ # 💡 Verify command already implemented
12
+
13
+ 🟢 **Confidence:** high
14
+
15
+ The `/verify` command already exists at `.opencode/command/verify.md` with full implementation:
16
+
17
+ **Three dimensions:**
18
+ 1. Completeness - Are all required artifacts present? All tasks addressed?
19
+ 2. Correctness - Do automated gates pass? (build, test, lint, typecheck)
20
+ 3. Coherence - Do artifacts agree with each other? No contradictions?
21
+
22
+ **Features:**
23
+ - `--quick` - Skip coherence check, gates only
24
+ - `--fix` - Auto-fix issues where possible
25
+ - Multi-language support (Node, Rust, Python, Go)
26
+ - Updates bead notes with verification results
27
+
28
+ This was identified as "short-term" in OpenSpec research but is already done!
@@ -0,0 +1,43 @@
1
+ ---
2
+ type: feature
3
+ created: 2026-02-01T13:54:45.946Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["openspec", "templates", "context-injection", "workflow", "beads"]
8
+ files: [".opencode/memory/_templates/proposal.md", ".opencode/memory/_templates/spec.md", ".opencode/memory/_templates/tasks.md", ".opencode/context/project.md", "opencode.json", ".opencode/opencode.json", ".opencode/memory/_templates/README.md", ".opencode/command/plan.md"]
9
+ ---
10
+
11
+ # ✨ OpenSpec Phase B Complete: Template Upgrade + Context Injection
12
+
13
+ 🟢 **Confidence:** high
14
+
15
+ ## Phase B Complete
16
+
17
+ Adapted OpenSpec patterns into the kit + beads system:
18
+
19
+ ### New Templates Created
20
+ - `.opencode/memory/_templates/proposal.md` - Captures WHY (motivation, impact)
21
+ - `.opencode/memory/_templates/spec.md` - WHEN/THEN behavioral requirements
22
+ - `.opencode/memory/_templates/tasks.md` - Numbered implementation checklists
23
+
24
+ ### Context Injection Added
25
+ - `.opencode/context/project.md` - Tech stack, constraints, integrations
26
+ - Added to `opencode.json` instructions[] for auto-injection into all prompts
27
+
28
+ ### Key Adaptation Decisions
29
+ 1. **Kept our comprehensive style** - OpenSpec templates are minimal scaffolds (~10 lines), ours provide more structure
30
+ 2. **Used instructions[] not config.yaml** - OpenCode's native mechanism vs OpenSpec's custom parser
31
+ 3. **No CLI tooling** - We're AI-native, commands ARE the interface
32
+ 4. **Flat template structure** - No per-schema subdirectories (simpler)
33
+
34
+ ### OpenSpec Patterns NOT Adopted
35
+ - Canonical spec maintenance (our beads are ephemeral)
36
+ - Delta spec merging (no long-running specs)
37
+ - Multiple schema workflows (keeping single flow for now)
38
+ - Shell completions (not relevant for AI workflow)
39
+
40
+ ### Files Modified
41
+ - `.opencode/opencode.json` - Added context/project.md to instructions[]
42
+ - `.opencode/memory/_templates/README.md` - Documented all templates
43
+ - `.opencode/command/plan.md` - Added templates reference section
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T10:01:36.015Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["build agent", "LSP", "dynamic tooling", "gpt-5.2-codex", "prompt update"]
8
+ ---
9
+
10
+ # 📚 Build agent should use dynamic LSP, not forced 9 calls
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ User reports that with gpt-5.2-codex, build agent prompt forces 9 LSP tool calls. User wants build agent prompt updated to use dynamic, best-practice LSP usage (only the needed operations).
@@ -0,0 +1,22 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T04:58:58.391Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["kimi_k25", "temperature", "thinking mode", "opencode zen", "model configuration", "scout agent"]
8
+ ---
9
+
10
+ # 📚 Kimi K2.5 model requires temperature 1.0
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ The kimi_k25 (Kimi K2.5) model is a thinking mode model that requires temperature to be exactly 1.0. The parameter is immutable - you cannot set custom temperatures.
15
+
16
+ Error message: "Parameter 'temperature' is immutable for kimi_k25 and must be 1.0 (thinking mode). Got 0.3."
17
+
18
+ Solution options:
19
+ 1. Change scout.md temperature from 0.3 to 1.0 to use kimi-k2.5-free
20
+ 2. Use a different model like minimax-m2.1-free that supports custom temperatures
21
+
22
+ Other thinking models in opencode.json also have "temperature": 1 in their configuration (e.g., big-pickle, glm-4.6, glm-4.7 with reasoning enabled).
@@ -0,0 +1,27 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T15:16:13.160Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["opencode", "context-injection", "instructions", "agents-md", "config"]
8
+ files: ["AGENTS.md", ".opencode/memory/user.md", "project/tech-stack.md", ".opencode/AGENTS.md"]
9
+ ---
10
+
11
+ # 📚 OpenCode context injection already implemented
12
+
13
+ 🟢 **Confidence:** high
14
+
15
+ OpenCode doesn't support `context` or `rules` fields from OpenSpec research.
16
+
17
+ Instead, OpenCode uses:
18
+ 1. `instructions` array in opencode.json → files injected into prompts (we have: user.md, tech-stack.md)
19
+ 2. `AGENTS.md` files → rules and guidelines (project-level + global)
20
+ 3. `command` field in opencode.json → per-command customization
21
+
22
+ Our current setup already follows best practices:
23
+ - `.opencode/memory/user.md` + `project/tech-stack.md` via instructions[]
24
+ - `.opencode/AGENTS.md` for global rules
25
+ - `.opencode/command/*.md` for commands
26
+
27
+ No additional context injection needed - we're already doing it right!
@@ -0,0 +1,35 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T13:39:55.750Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["opencode", "openspec", "context injection", "instructions", "config", "prompt", "agent configuration"]
8
+ files: [".opencode/memory/project/context.md"]
9
+ ---
10
+
11
+ # 📚 OpenCode context injection uses 'instructions' not 'context'
12
+
13
+ 🟢 **Confidence:** high
14
+
15
+ OpenCode config (opencode.json) doesn't have a `context` field like OpenSpec's config.yaml. Instead, it uses:
16
+
17
+ 1. **`instructions`** - Array of file paths that get injected into prompts
18
+ - Current: `[".opencode/memory/user.md", ".opencode/memory/project/*.md"]`
19
+ - These files are loaded and included in the system prompt
20
+
21
+ 2. **Per-agent `prompt`** - Custom prompt string per agent via `agent.<name>.prompt`
22
+
23
+ 3. **Per-command `template`** - Via `command.<name>.template`
24
+
25
+ OpenSpec's approach:
26
+ - `context:` - Global context injected into ALL artifacts
27
+ - `rules:` - Per-artifact rules (e.g., `rules.proposal: ["Include rollback plan"]`)
28
+
29
+ To adapt OpenSpec's context injection pattern to OpenCode:
30
+ - Use `instructions` with well-structured markdown files
31
+ - Create `.opencode/memory/project/context.md` for global project context
32
+ - Use agent-specific `prompt` fields for per-agent rules
33
+ - Or create command-specific files that commands load via skill pattern
34
+
35
+ Key difference: OpenCode's approach is file-based, OpenSpec's is config-based inline text.
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T10:05:57.086Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["build agent", "prompt", "LSP", "contextual usage", "best practice"]
8
+ ---
9
+
10
+ # 📚 Update build agent prompt to use contextual LSP
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ User wants the build agent prompt updated to avoid forcing all 9 LSP calls. They want a brutal, best-practice policy: use LSP contextually (documentSymbol/hover first, add other ops only when needed).
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T10:26:42.193Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["AGENTS.md", "opencode-expert", "project rules", "opencode kit"]
8
+ ---
9
+
10
+ # 📚 Upgrade AGENTS.md using opencode-expert reference
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ User requested upgrading project rules in AGENTS.md for an OpenCode kit, referencing dmmulroy/.dotfiles opencode-expert.md.
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T10:27:47.569Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["AGENTS.md", "opencode-expert", "configuration", "best practices"]
8
+ ---
9
+
10
+ # 📚 Upgrade AGENTS.md with OpenCode expert guidance
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ User requested a focused upgrade to AGENTS.md using dmmulroy/.dotfiles opencode-expert.md as reference for OpenCode configuration best practices and links.
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T10:27:01.422Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["AGENTS.md", "opencode-expert", "project rules", "opencode kit"]
8
+ ---
9
+
10
+ # 📚 Upgrade AGENTS.md with OpenCode expert rules
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ User requested upgrading project AGENTS.md using dmmulroy/.dotfiles opencode-expert.md as reference to make the kit better for OpenCode users.
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T09:56:48.021Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["copilot", "gpt-5.2-codex", "medium", "speed", "model preference"]
8
+ ---
9
+
10
+ # 📚 User prefers Copilot GPT-5.2-Codex medium for speed
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ User reports that GitHub Copilot gpt-5.2-codex medium variant provides good speed and is preferred for their OpenCode setup.
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T10:19:23.691Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["general agent", "LSP", "contextual usage", "prompt update"]
8
+ files: [".opencode/agent/general.md"]
9
+ ---
10
+
11
+ # 📚 User wants general agent prompt contextual LSP
12
+
13
+ 🟢 **Confidence:** high
14
+
15
+ User asked to update .opencode/agent/general.md to use contextual LSP usage (avoid forced LSP calls), similar to build agent prompt.
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: learning
3
+ created: 2026-02-01T10:18:29.926Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["general agent", "prompt review", "LSP policy", "best practice", "opencode"]
8
+ files: [".opencode/agent/general.md"]
9
+ ---
10
+
11
+ # 📚 User wants general agent prompt reviewed and tightened
12
+
13
+ 🟢 **Confidence:** high
14
+
15
+ User requested a review of .opencode/agent/general.md and wants a more brutal/best-practice upgrade similar to build agent prompt changes (e.g., LSP usage policy).
@@ -0,0 +1,122 @@
1
+ ---
2
+ purpose: Per-command context and rules injected during command execution
3
+ updated: 2026-02-01
4
+ pattern: OpenSpec context/rules injection adapted for OpenCodeKit
5
+ ---
6
+
7
+ # Command-Specific Rules
8
+
9
+ Rules automatically injected based on active command context.
10
+
11
+ ## Planning Commands
12
+
13
+ ### /plan
14
+
15
+ - Include rollback plan for risky changes
16
+ - Break tasks into independently-testable units
17
+ - Estimate complexity per task (S/M/L)
18
+ - Identify dependencies between tasks explicitly
19
+
20
+ ### /design
21
+
22
+ - Research existing patterns before proposing new ones
23
+ - Include concrete file paths in all designs
24
+ - Show interface contracts for public APIs
25
+ - Specify error handling strategy
26
+
27
+ ### /research
28
+
29
+ - Cite sources with URLs
30
+ - Distinguish facts from inferences
31
+ - Note confidence level (high/medium/low)
32
+ - Identify gaps in available information
33
+
34
+ ## Implementation Commands
35
+
36
+ ### /start
37
+
38
+ - Check for existing bead before creating new
39
+ - Load relevant memory files first
40
+ - Verify task context with `bd show <id>`
41
+
42
+ ### /resume
43
+
44
+ - Re-read spec before continuing
45
+ - Check what's already completed
46
+ - Don't re-implement existing work
47
+
48
+ ### /ship
49
+
50
+ - Run all verification gates before claiming done
51
+ - Include test evidence in close reason
52
+ - Never skip lint/typecheck even for "small" changes
53
+
54
+ ## Review Commands
55
+
56
+ ### /review
57
+
58
+ - Focus on correctness over style
59
+ - Identify security implications
60
+ - Check for unhandled edge cases
61
+ - Suggest simplifications where possible
62
+
63
+ ### /verify
64
+
65
+ - Check completeness: all artifacts exist
66
+ - Check correctness: implementation matches spec
67
+ - Check coherence: no contradictions between artifacts
68
+
69
+ ### /ui-review
70
+
71
+ - Check accessibility (WCAG compliance)
72
+ - Verify responsive behavior
73
+ - Identify inconsistent patterns
74
+
75
+ ## Handoff Commands
76
+
77
+ ### /handoff
78
+
79
+ - Include current bead state
80
+ - List completed vs remaining tasks
81
+ - Note any blockers or decisions needed
82
+ - Provide session context for continuity
83
+
84
+ ### /init
85
+
86
+ - Don't overwrite existing memory files
87
+ - Detect project type from existing files
88
+ - Set up minimal viable structure first
89
+
90
+ ## Context Injection
91
+
92
+ These rules are automatically considered when:
93
+
94
+ 1. User invokes a command explicitly (e.g., `/plan`)
95
+ 2. Agent recognizes a command-like workflow
96
+ 3. Subagent receives delegated work matching a command pattern
97
+
98
+ ---
99
+
100
+ ## Tech Stack Rules (Project-Specific)
101
+
102
+ When working in this project, always:
103
+
104
+ - **Runtime**: Use Bun (not Node.js)
105
+ - **Language**: TypeScript with ESM imports
106
+ - **Linting**: Run `npm run lint:fix` before commits
107
+ - **Types**: Run `npm run typecheck` to validate
108
+ - **Formatting**: Use Biome (configured in biome.json)
109
+
110
+ ## Git Rules
111
+
112
+ - Never commit to main directly
113
+ - Always ask before `git push`
114
+ - Use conventional commit format: `type(scope): message`
115
+ - Never force push unless explicitly requested
116
+
117
+ ## File Structure Rules
118
+
119
+ - Commands go in `.opencode/command/`
120
+ - Skills go in `.opencode/skill/`
121
+ - Memory files go in `.opencode/memory/`
122
+ - Plugin code goes in `.opencode/plugin/`
@@ -0,0 +1,50 @@
1
+ ---
2
+ purpose: Tech stack, constraints, and integrations for AI context injection
3
+ updated: 2026-02-01
4
+ ---
5
+
6
+ # Tech Stack
7
+
8
+ This file is automatically injected into ALL AI prompts via `opencode.json` instructions[].
9
+
10
+ ## Framework & Language
11
+
12
+ - **Framework:** [e.g., Next.js 15, React 19]
13
+ - **Language:** TypeScript (strict mode)
14
+ - **Runtime:** [e.g., Node.js 22, Bun 1.x]
15
+
16
+ ## Styling & UI
17
+
18
+ - **CSS:** [e.g., Tailwind CSS v4]
19
+ - **Components:** [e.g., shadcn/ui, Radix Primitives]
20
+ - **Design System:** [e.g., Custom tokens in tailwind.config.ts]
21
+
22
+ ## Data & State
23
+
24
+ - **Database:** [e.g., PostgreSQL via Supabase]
25
+ - **ORM:** [e.g., Drizzle, Prisma]
26
+ - **State Management:** [e.g., Zustand, React Query]
27
+ - **API Style:** [e.g., REST, tRPC, GraphQL]
28
+
29
+ ## Testing
30
+
31
+ - **Unit Tests:** [e.g., Vitest]
32
+ - **E2E Tests:** [e.g., Playwright]
33
+ - **Coverage Target:** [e.g., 80%]
34
+
35
+ ## Key Constraints
36
+
37
+ - [Constraint 1: e.g., Must work offline]
38
+ - [Constraint 2: e.g., WCAG 2.1 AA compliance required]
39
+ - [Constraint 3: e.g., Bundle size < 500KB]
40
+
41
+ ## Active Integrations
42
+
43
+ - [Service 1: e.g., Stripe for payments]
44
+ - [Service 2: e.g., Resend for email]
45
+ - [Service 3: e.g., Sentry for error tracking]
46
+
47
+ ---
48
+
49
+ _Update this file when tech stack or constraints change._
50
+ _AI will capture architecture, conventions, and gotchas via the `observation` tool as it works._