opencodekit 0.23.3 → 0.23.4

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 (41) hide show
  1. package/README.md +7 -14
  2. package/dist/index.js +1 -1
  3. package/dist/template/.opencode/AGENTS.md +89 -17
  4. package/dist/template/.opencode/README.md +43 -6
  5. package/dist/template/.opencode/artifacts/harness-workflows/plan.md +317 -0
  6. package/dist/template/.opencode/command/audit.md +65 -0
  7. package/dist/template/.opencode/command/init.md +19 -2
  8. package/dist/template/.opencode/command/research.md +67 -16
  9. package/dist/template/.opencode/command/ship.md +55 -5
  10. package/dist/template/.opencode/command/verify.md +5 -5
  11. package/dist/template/.opencode/opencode.json +12 -0
  12. package/dist/template/.opencode/plugin/README.md +0 -6
  13. package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +0 -2
  14. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +11 -9
  15. package/dist/template/.opencode/skill/manifest.json +77 -0
  16. package/dist/template/.opencode/workflows/audit-pattern.md +51 -0
  17. package/dist/template/.opencode/workflows/batch-implement.md +82 -0
  18. package/dist/template/.opencode/workflows/deep-research.md +58 -0
  19. package/dist/template/.opencode/workflows/development-lifecycle-workflow.md +129 -0
  20. package/package.json +1 -1
  21. package/dist/template/.opencode/command/clarify.md +0 -46
  22. package/dist/template/.opencode/command/commit.md +0 -53
  23. package/dist/template/.opencode/command/design.md +0 -129
  24. package/dist/template/.opencode/command/explore.md +0 -169
  25. package/dist/template/.opencode/command/improve-architecture.md +0 -55
  26. package/dist/template/.opencode/command/pr.md +0 -148
  27. package/dist/template/.opencode/command/refactor.md +0 -65
  28. package/dist/template/.opencode/command/review-codebase.md +0 -128
  29. package/dist/template/.opencode/command/test.md +0 -66
  30. package/dist/template/.opencode/command/ui-review.md +0 -109
  31. package/dist/template/.opencode/opencodex-fast.jsonc +0 -3
  32. package/dist/template/.opencode/plugin/rtk.ts +0 -43
  33. package/dist/template/.opencode/skill/agent-teams/SKILL.md +0 -268
  34. package/dist/template/.opencode/skill/code-navigation/SKILL.md +0 -142
  35. package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +0 -135
  36. package/dist/template/.opencode/skill/condition-based-waiting/example.ts +0 -171
  37. package/dist/template/.opencode/skill/context-engineering/SKILL.md +0 -176
  38. package/dist/template/.opencode/skill/memory-system/SKILL.md +0 -147
  39. package/dist/template/.opencode/skill/structured-edit/SKILL.md +0 -191
  40. package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +0 -184
  41. package/dist/template/.opencode/skill/v0/SKILL.md +0 -158
@@ -1,184 +0,0 @@
1
- ---
2
- name: ubiquitous-language
3
- description: Establishes and maintains shared vocabulary across codebase, context files, and team conversation — inspired by Evans' Domain-Driven Design and Pocock's AI agent glossary technique. Use when terms are ambiguous, the AI does the wrong thing, or you need to align code with domain concepts.
4
- version: 1.0.0
5
- tags: [architecture, domain-driven-design, ai-workflow]
6
- dependencies: []
7
- agent_types: [planner, scout]
8
- tools: [grep, memory]
9
- ---
10
-
11
- # Ubiquitous Language
12
-
13
- > Based on Eric Evans' *Domain-Driven Design* and Matt Pocock's AI-agent glossary technique
14
-
15
- ## Overview
16
-
17
- A ubiquitous language is a **shared vocabulary** that is used consistently across:
18
-
19
- - **Code** — types, classes, functions, modules, files
20
- - **Conversation** — how developers and domain experts talk about the system
21
- - **AI context** — AGENTS.md, CLAUDE.md, and other files that guide AI agents
22
- - **Specs and docs** — PRDs, design docs, specifications
23
-
24
- When these four use the same words for the same concepts, communication is precise, AI agents produce correct code more often, and the "wrong thing" failure mode is dramatically reduced.
25
-
26
- When they diverge, every translation gap is a bug waiting to happen.
27
-
28
- > *"Conversations among developers and expressions of the code are all derived from the same domain model."* — Eric Evans
29
-
30
- **Why this matters for AI agents:** Matt Pocock demonstrated that feeding a structured glossary (extracted from the codebase) as persistent context to an LLM reduces verbose reasoning and aligns implementation more closely with intent. Ubiquitous language isn't a documentation luxury — it's a direct input into AI correctness.
31
-
32
- ## When to Use
33
-
34
- - Terms are used interchangeably that shouldn't be ("User" vs "Account" vs "Profile")
35
- - AI agents consistently implement the wrong concept
36
- - Specs use different vocabulary than the codebase
37
- - Starting a new domain module that needs clear boundaries
38
- - Onboarding new developers or agents who need to learn the vocabulary
39
- - The codebase has multiple ways to refer to the same domain concept
40
-
41
- ## When NOT to Use
42
-
43
- - Trivial utilities with no domain concept at stake
44
- - Short-lived spike code
45
- - Already consistent codebases with clear terminology (maintain, don't re-engineer)
46
-
47
- ## Core Principle
48
-
49
- > **Every concept in the domain should have exactly one name in the codebase.**
50
-
51
- If two terms mean the same thing, consolidate. If one term means two different things, split them into separate concepts with separate names.
52
-
53
- ## Technique 1: Glossary Extraction
54
-
55
- ### From Codebase
56
-
57
- Scan the codebase for key terms and build a glossary:
58
-
59
- ```
60
- src/
61
- types/ → Extract type/interface names
62
- models/ → Extract model/entity names
63
- routes/ → Extract resource names from URL patterns
64
- services/ → Extract domain operation names
65
- commands/ → Extract command/mutation names
66
- ```
67
-
68
- **Automated approach:**
69
- ```bash
70
- # Extract type definitions (TypeScript example)
71
- grep -rn "^export (type|interface|class|enum) " src/ --include='*.ts' |
72
- cut -d' ' -f3- | sort -u
73
-
74
- # Extract module/file names that correspond to domain concepts
75
- ls -d src/models/*/ | xargs -I{} basename {} | sort -u
76
- ```
77
-
78
- ### From AGENTS.md / Context Files
79
-
80
- Every term used in your AGENTS.md or CLAUDE.md should map to a code symbol. Cross-reference:
81
-
82
- 1. List every capitalized noun phrase in AGENTS.md
83
- 2. Search the codebase for each phrase
84
- 3. For mismatches: either rename the code symbol or update the context file
85
-
86
- ### Glossary Table Format
87
-
88
- ```markdown
89
- ## Glossary
90
-
91
- | Term | Definition | Code Symbol | Context |
92
- |------|------------|-------------|---------|
93
- | Order | A customer's purchase request in PENDING state | `Order` class, `orders` table | Checkout context |
94
- | OrderFulfillment | The shipping/delivery of items for an Order | `Fulfillment` class, `fulfillments` table | Fulfillment context |
95
- | User | An authenticated person using the system | `User` model, `users` table | Auth context |
96
- | Account | A User's billing/subscription profile | `Account` model, `accounts` table | Billing context |
97
- ```
98
-
99
- ## Technique 2: Bounded Context Mapping
100
-
101
- In DDD, the same term can mean different things in different contexts. The "Ubiquitous" in "Ubiquitous Language" is bounded — it applies *within* one context, not globally.
102
-
103
- **Example:** An "Order" in the **Checkout** context means "pending payment." An "Order" in the **Fulfillment** context means "packed and shipped." These are different concepts that happen to share a name.
104
-
105
- ### When Contexts Conflict
106
-
107
- | Option | When | Tradeoff |
108
- |---|---|---|
109
- | **Split the term** | Different behaviors, data, lifecycle | Clearer but more types to manage |
110
- | **Keep one term, document the phases** | Same entity, different states | Simpler but confusion at boundaries |
111
- | **Use sub-types** | Shared core with context-specific properties | Precise but more complex |
112
-
113
- **Default:** Split the term if the two contexts never share code. Keep one term if they share a code path.
114
-
115
- ## Technique 3: Glossary as AI Context
116
-
117
- This technique — from Matt Pocock's AI Engineer Summit talk — directly improves AI agent output:
118
-
119
- 1. **Extract** your glossary from the codebase (Technique 1)
120
- 2. **Format** it as a markdown table in your AGENTS.md or a dedicated `.md` file
121
- 3. **Persist** it — include it in every prompt or reference it from context files
122
- 4. **Read thinking traces** — when the LLM uses a term incorrectly, update the glossary
123
-
124
- ### Example: Glossary Section in AGENTS.md
125
-
126
- ```markdown
127
- ## Glossary
128
-
129
- - **Order** = `src/orders/Order.ts` — purchase request in PENDING state
130
- - **Invoice** = `src/billing/Invoice.ts` — billing record generated from Order
131
- - **Shipment** = `src/fulfillment/Shipment.ts` — physical delivery of items
132
- ```
133
-
134
- ### Why This Works
135
-
136
- Pocock observed that reading the model's thinking traces confirmed this technique:
137
-
138
- - **Reduces verbose reasoning** — the AI doesn't have to infer what a term means from context
139
- - **Aligns implementation with intent** — the AI uses the correct code symbols from the start
140
- - **Prevents drift** — the glossary is extracted from truth (the codebase), not from conversation
141
-
142
- ## Technique 4: Detecting Language Drift
143
-
144
- Over time, vocabulary naturally diverges. Watch for:
145
-
146
- | Signal | What to do |
147
- |---|---|
148
- | AI generates a new term the codebase doesn't use | Update the glossary or rename the generated code |
149
- | Two developers use different names for the same concept | Align on one name, update code and context |
150
- | AGENTS.md mentions a term not found in code | Add the code symbol or remove the stale term |
151
- | Same term used for different concepts in code | Refactor or split the type |
152
- | PR review consistently corrects naming | Create a glossary entry and enforce it |
153
-
154
- ### Drift Check Frequency
155
-
156
- - **Per sprint** — scan for new terms in code vs AGENTS.md
157
- - **Per AI session** — check that AGENTS.md terms match the module you're working in
158
- - **Per refactor** — regenerate the glossary when domain types change
159
-
160
- ## Output Checklist
161
-
162
- - [ ] Glossary extracted from codebase: types, modules, routes, domain operations
163
- - [ ] AGENTS.md vocabulary cross-referenced against code symbols
164
- - [ ] Bounded contexts identified where same term has different meanings
165
- - [ ] Glossary formatted and persisted for AI context
166
- - [ ] Language drift signals documented for ongoing maintenance
167
-
168
- ## See Also
169
-
170
- - **spec-driven-development** — Define vocabulary in the spec before implementation
171
- - **deep-module-design** — Module boundaries align with bounded contexts
172
- - **memory-system** — Persist glossary for cross-session AI context
173
-
174
- ## Skill Result Contract
175
-
176
- ```xml
177
- <skill_result>
178
- <skill>ubiquitous-language</skill>
179
- <status>success|partial|blocked|failure</status>
180
- <evidence>Glossary generated, cross-references checked, bounded contexts mapped</evidence>
181
- <artifacts>Glossary file, AGENTS.md updates, detected drifts</artifacts>
182
- <risks>Unaligned terms deferred, contexts not fully mapped, or none</risks>
183
- </skill_result>
184
- ```
@@ -1,158 +0,0 @@
1
- ---
2
- name: v0
3
- description: Use when you need AI-powered UI generation for React components, dashboards, or quick prototypes via v0. MUST load before creating v0 chats or generating components via v0 MCP.
4
- mcp:
5
- v0:
6
- command: npx
7
- args: ["mcp-remote", "https://mcp.v0.dev", "--header", "Authorization: Bearer ${V0_API_KEY}"]
8
- env:
9
- V0_API_KEY: "${V0_API_KEY}"
10
- version: 1.0.0
11
- tags: [ui, mcp, design]
12
- dependencies: []
13
- ---
14
-
15
- # v0 AI Code Generation (MCP)
16
-
17
- ## When to Use
18
-
19
- - When you need AI-generated UI components or chat-based design iteration via v0.
20
-
21
- ## When NOT to Use
22
-
23
- - When you need to implement UI from a fixed design system without AI generation.
24
-
25
-
26
- ## Prerequisites
27
-
28
- Set your v0 API key as an environment variable:
29
-
30
- ```bash
31
- export V0_API_KEY="your-v0-api-key"
32
- ```
33
-
34
- To get your v0 API key:
35
-
36
- 1. Go to [v0 account settings](https://v0.app/chat/settings/keys)
37
- 2. Create a new API key
38
- 3. Copy and set as environment variable
39
-
40
- ## Quick Start
41
-
42
- After loading this skill, list available tools:
43
-
44
- ```
45
- skill_mcp(skill_name="v0", list_tools=true)
46
- ```
47
-
48
- Then invoke tools:
49
-
50
- ```
51
- skill_mcp(skill_name="v0", tool_name="create_chat", arguments='{"prompt": "Create a React dashboard component with a sidebar"}')
52
- ```
53
-
54
- ## Available Tools
55
-
56
- ### create_chat
57
-
58
- Create a new v0 chat with a prompt.
59
-
60
- | Parameter | Type | Required | Description |
61
- | --------- | ------ | -------- | ---------------------------------- |
62
- | `prompt` | string | Yes | The prompt for v0 to generate code |
63
-
64
- **Example:**
65
-
66
- ```
67
- skill_mcp(skill_name="v0", tool_name="create_chat", arguments='{"prompt": "Build a responsive navbar with dark mode toggle"}')
68
- ```
69
-
70
- ### get_chat
71
-
72
- Get details about an existing chat.
73
-
74
- | Parameter | Type | Required | Description |
75
- | --------- | ------ | -------- | -------------- |
76
- | `chatId` | string | Yes | The v0 chat ID |
77
-
78
- **Example:**
79
-
80
- ```
81
- skill_mcp(skill_name="v0", tool_name="get_chat", arguments='{"chatId": "abc123"}')
82
- ```
83
-
84
- ### find_chats
85
-
86
- Search through your v0 chats.
87
-
88
- | Parameter | Type | Required | Description |
89
- | --------- | ------ | -------- | ------------ |
90
- | `query` | string | No | Search query |
91
-
92
- **Example:**
93
-
94
- ```
95
- skill_mcp(skill_name="v0", tool_name="find_chats", arguments='{"query": "React components"}')
96
- ```
97
-
98
- ### send_message
99
-
100
- Continue a conversation in an existing chat.
101
-
102
- | Parameter | Type | Required | Description |
103
- | --------- | ------ | -------- | --------------- |
104
- | `chatId` | string | Yes | The v0 chat ID |
105
- | `message` | string | Yes | Message to send |
106
-
107
- **Example:**
108
-
109
- ```
110
- skill_mcp(skill_name="v0", tool_name="send_message", arguments='{"chatId": "abc123", "message": "Add dark mode support"}')
111
- ```
112
-
113
- ## Workflow
114
-
115
- ### 1. Generate a New Component
116
-
117
- ```
118
- # Create a new chat with your requirements
119
- skill_mcp(skill_name="v0", tool_name="create_chat", arguments='{"prompt": "Create a modern pricing table with 3 tiers using Tailwind CSS"}')
120
-
121
- # The response includes a chat ID and generated code
122
- ```
123
-
124
- ### 2. Iterate on Design
125
-
126
- ```
127
- # Send follow-up messages to refine
128
- skill_mcp(skill_name="v0", tool_name="send_message", arguments='{"chatId": "chat-id-here", "message": "Make the recommended tier more prominent with a gradient border"}')
129
- ```
130
-
131
- ### 3. Search Previous Work
132
-
133
- ```
134
- # Find relevant previous chats
135
- skill_mcp(skill_name="v0", tool_name="find_chats", arguments='{"query": "dashboard"}')
136
- ```
137
-
138
- ## Use Cases
139
-
140
- - **Component Generation**: Create React/Next.js components from descriptions
141
- - **UI Prototyping**: Rapidly prototype UI ideas
142
- - **Design Iteration**: Refine designs through conversation
143
- - **Code Assistance**: Get help with Tailwind CSS, responsive design, etc.
144
-
145
- ## Tips
146
-
147
- - **Be specific** in prompts - include framework (React, Next.js), styling (Tailwind, CSS), and functionality details
148
- - **Iterate** using `send_message` rather than creating new chats for refinements
149
- - **Search first** with `find_chats` to reuse previous work
150
- - **Include context** about your existing design system or component patterns
151
-
152
- ## Troubleshooting
153
-
154
- **"Invalid API key"**: Ensure `V0_API_KEY` environment variable is set correctly.
155
-
156
- **"Rate limit exceeded"**: v0 has usage limits. Wait a few minutes or check your plan.
157
-
158
- **"Chat not found"**: Verify the chat ID is correct. Use `find_chats` to list available chats.