opencodekit 0.14.5 → 0.15.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 (94) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +100 -58
  3. package/dist/template/.opencode/.env.example +1 -0
  4. package/dist/template/.opencode/AGENTS.md +13 -24
  5. package/dist/template/.opencode/README.md +8 -119
  6. package/dist/template/.opencode/agent/explore.md +2 -3
  7. package/dist/template/.opencode/agent/general.md +56 -0
  8. package/dist/template/.opencode/agent/plan.md +54 -0
  9. package/dist/template/.opencode/agent/scout.md +15 -5
  10. package/dist/template/.opencode/command/analyze-project.md +2 -2
  11. package/dist/template/.opencode/command/brainstorm.md +1 -1
  12. package/dist/template/.opencode/command/design-audit.md +4 -5
  13. package/dist/template/.opencode/command/design.md +4 -13
  14. package/dist/template/.opencode/command/generate-pattern.md +2 -9
  15. package/dist/template/.opencode/command/implement.md +4 -4
  16. package/dist/template/.opencode/command/init.md +1 -1
  17. package/dist/template/.opencode/command/new-feature.md +2 -3
  18. package/dist/template/.opencode/command/plan.md +1 -1
  19. package/dist/template/.opencode/command/pr.md +0 -1
  20. package/dist/template/.opencode/command/research.md +20 -6
  21. package/dist/template/.opencode/command/restore-image.md +1 -9
  22. package/dist/template/.opencode/command/revert-feature.md +1 -1
  23. package/dist/template/.opencode/command/review-codebase.md +4 -4
  24. package/dist/template/.opencode/command/status.md +1 -2
  25. package/dist/template/.opencode/command/summarize.md +1 -2
  26. package/dist/template/.opencode/command/triage.md +4 -32
  27. package/dist/template/.opencode/dcp.jsonc +68 -68
  28. package/dist/template/.opencode/memory/_templates/README.md +35 -0
  29. package/dist/template/.opencode/memory/_templates/project/architecture.md +60 -0
  30. package/dist/template/.opencode/memory/_templates/project/commands.md +72 -0
  31. package/dist/template/.opencode/memory/_templates/project/conventions.md +68 -0
  32. package/dist/template/.opencode/memory/_templates/project/gotchas.md +41 -0
  33. package/dist/template/.opencode/memory/beads-workflow.md +30 -29
  34. package/dist/template/.opencode/memory/project/architecture.md +31 -50
  35. package/dist/template/.opencode/memory/project/commands.md +41 -22
  36. package/dist/template/.opencode/memory/project/conventions.md +39 -177
  37. package/dist/template/.opencode/memory/project/gotchas.md +21 -177
  38. package/dist/template/.opencode/memory/user.example.md +5 -0
  39. package/dist/template/.opencode/opencode.json +644 -533
  40. package/dist/template/.opencode/package.json +18 -21
  41. package/dist/template/.opencode/plugin/compaction.ts +79 -85
  42. package/dist/template/.opencode/plugin/env-ctx.ts +34 -0
  43. package/dist/template/.opencode/plugin/lib/notify.ts +41 -45
  44. package/dist/template/.opencode/plugin/lsp.ts +197 -200
  45. package/dist/template/.opencode/plugin/memory.ts +14 -112
  46. package/dist/template/.opencode/plugin/package.json +5 -5
  47. package/dist/template/.opencode/plugin/sessions.ts +1 -1
  48. package/dist/template/.opencode/plugin/skill-mcp.ts +486 -521
  49. package/dist/template/.opencode/plugin/truncator.ts +47 -50
  50. package/dist/template/.opencode/plugin/tsconfig.json +14 -14
  51. package/dist/template/.opencode/skill/chrome-devtools/mcp.json +17 -17
  52. package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +17 -12
  53. package/dist/template/.opencode/skill/condition-based-waiting/example.ts +63 -69
  54. package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +14 -8
  55. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +14 -3
  56. package/dist/template/.opencode/skill/playwright/mcp.json +14 -14
  57. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +21 -8
  58. package/dist/template/.opencode/skill/requesting-code-review/review.md +14 -0
  59. package/dist/template/.opencode/skill/root-cause-tracing/SKILL.md +18 -4
  60. package/dist/template/.opencode/skill/source-code-research/SKILL.md +9 -7
  61. package/dist/template/.opencode/skill/test-driven-development/SKILL.md +49 -32
  62. package/dist/template/.opencode/skill/testing-anti-patterns/SKILL.md +40 -22
  63. package/dist/template/.opencode/skill/testing-skills-with-subagents/SKILL.md +46 -26
  64. package/dist/template/.opencode/skill/tool-priority/SKILL.md +117 -44
  65. package/dist/template/.opencode/skill/v0/SKILL.md +1 -7
  66. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +27 -19
  67. package/dist/template/.opencode/skill/writing-skills/anthropic-best-practices.md +171 -148
  68. package/dist/template/.opencode/skill/writing-skills/persuasion-principles.md +39 -6
  69. package/dist/template/.opencode/tool/memory-read.ts +44 -56
  70. package/dist/template/.opencode/tool/memory-search.ts +8 -291
  71. package/dist/template/.opencode/tool/memory-update.ts +47 -51
  72. package/dist/template/.opencode/tool/observation.ts +6 -180
  73. package/dist/template/.opencode/tsconfig.json +19 -19
  74. package/package.json +19 -15
  75. package/dist/template/.opencode/.background-tasks.json +0 -114
  76. package/dist/template/.opencode/.ralph-state.json +0 -12
  77. package/dist/template/.opencode/agent/build.md +0 -327
  78. package/dist/template/.opencode/agent/planner.md +0 -281
  79. package/dist/template/.opencode/agent/rush.md +0 -223
  80. package/dist/template/.opencode/memory/handoffs/README.md +0 -83
  81. package/dist/template/.opencode/memory/observations/.gitkeep +0 -0
  82. package/dist/template/.opencode/memory/observations/2026-01-09-pattern-ampcode-mcp-json-includetools-pattern.md +0 -42
  83. package/dist/template/.opencode/memory/vector_db/memories.lance/_transactions/0-0d25ba80-ba3b-4209-9046-b45d6093b4da.txn +0 -0
  84. package/dist/template/.opencode/memory/vector_db/memories.lance/_versions/1.manifest +0 -0
  85. package/dist/template/.opencode/memory/vector_db/memories.lance/data/1111100101010101011010004a9ef34df6b29f36a9a53a2892.lance +0 -0
  86. package/dist/template/.opencode/tool/ast-grep.ts +0 -245
  87. package/dist/template/.opencode/tool/background.ts +0 -509
  88. package/dist/template/.opencode/tool/bd-inbox.ts +0 -110
  89. package/dist/template/.opencode/tool/bd-msg.ts +0 -62
  90. package/dist/template/.opencode/tool/bd-release.ts +0 -71
  91. package/dist/template/.opencode/tool/bd-reserve.ts +0 -121
  92. package/dist/template/.opencode/tool/memory-embed.ts +0 -183
  93. package/dist/template/.opencode/tool/memory-index.ts +0 -769
  94. package/dist/template/.opencode/tool/repo-map.ts +0 -451
@@ -0,0 +1,72 @@
1
+ ---
2
+ purpose: Build, test, lint, deploy commands discovered for this project
3
+ updated: { { DATE } }
4
+ ---
5
+
6
+ # Project Commands
7
+
8
+ ## Development
9
+
10
+ ```bash
11
+ npm run dev # Start development server
12
+ bun run src/index.ts # Run CLI directly
13
+ ```
14
+
15
+ ## Build
16
+
17
+ ```bash
18
+ npm run build # Build for production
19
+ bun build ... # Additional build options
20
+ ```
21
+
22
+ ## Test
23
+
24
+ ```bash
25
+ bun test # Run all tests
26
+ bun test --watch # Watch mode
27
+ bun test file.ts # Run single file
28
+ ```
29
+
30
+ ## Lint
31
+
32
+ ```bash
33
+ npm run lint # Check for issues
34
+ npm run lint:fix # Auto-fix issues
35
+ ```
36
+
37
+ ## Typecheck
38
+
39
+ ```bash
40
+ npm run typecheck # TypeScript checking only
41
+ ```
42
+
43
+ ## Database
44
+
45
+ ```bash
46
+ npm run db:push # Push schema changes
47
+ npm run db:studio # Open database UI
48
+ ```
49
+
50
+ ## Deployment
51
+
52
+ ```bash
53
+ npm run deploy # Deploy to production
54
+ ```
55
+
56
+ ## CI/CD
57
+
58
+ - **Lint**: Runs on push
59
+ - **Test**: Runs on push
60
+ - **Deploy**: Triggers on main branch
61
+
62
+ ## Beads (Task Tracking)
63
+
64
+ ```bash
65
+ bd ready # Find unblocked tasks
66
+ bd list --status=open # All open issues
67
+ bd show <id> # Full details
68
+ bd create "Title" -p 2 # Create task
69
+ bd update <id> --status in_progress # Claim
70
+ bd close <id> --reason "Done" # Complete
71
+ bd sync # Push to git
72
+ ```
@@ -0,0 +1,68 @@
1
+ ---
2
+ purpose: Code patterns, commit style, team conventions
3
+ updated: { { DATE } }
4
+ ---
5
+
6
+ # Project Conventions
7
+
8
+ ## Code Style
9
+
10
+ ### TypeScript
11
+
12
+ - **Module**: ESNext, bundler moduleResolution
13
+ - **Strict**: Disabled
14
+ - **Imports**: Group stdlib, third-party, local
15
+
16
+ ### Python
17
+
18
+ - **Version**: 3.10+
19
+ - **Style**: type hints required, dataclasses for config
20
+
21
+ ## Naming Conventions
22
+
23
+ | Type | Convention | Example |
24
+ | --------- | ---------- | ----------------- |
25
+ | Classes | PascalCase | `UserService` |
26
+ | Functions | snake_case | `get_user_data()` |
27
+ | Variables | snake_case | `user_data` |
28
+ | Constants | UPPER_CASE | `MAX_RETRIES` |
29
+ | Files | kebab-case | `user-service.ts` |
30
+
31
+ ## Import Order
32
+
33
+ ```typescript
34
+ // 1. Node.js stdlib
35
+ import fs from "node:fs/promises";
36
+ import path from "node:path";
37
+
38
+ // 2. Third-party
39
+ import { cli } from "cac";
40
+ import { log } from "@clack/prompts";
41
+
42
+ // 3. Local
43
+ import { initCommand } from "./commands/init.js";
44
+ ```
45
+
46
+ ## Commit Messages
47
+
48
+ ```
49
+ type(scope): subject
50
+
51
+ body (optional)
52
+
53
+ footer (optional)
54
+ ```
55
+
56
+ **Types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
57
+
58
+ ## Code Review
59
+
60
+ - **Self-review**: Run lint/typecheck before PR
61
+ - **Test coverage**: Add tests for new features
62
+ - **Docs**: Update README for user-facing changes
63
+
64
+ ## Patterns to Avoid
65
+
66
+ - Premature abstraction
67
+ - Circular dependencies
68
+ - Magic numbers/strings
@@ -0,0 +1,41 @@
1
+ ---
2
+ purpose: Footguns, edge cases, and "don't forget this" warnings
3
+ updated: { { DATE } }
4
+ ---
5
+
6
+ # Project Gotchas
7
+
8
+ ## Configuration Quirks
9
+
10
+ ### Field Name
11
+
12
+ **Issue**: What goes wrong
13
+ **Fix**: How to handle it
14
+
15
+ ## Dependencies
16
+
17
+ ### Package Name
18
+
19
+ **Version**: x.y.z
20
+ **Why Required**: Purpose
21
+ **Gotcha**: Edge case or limitation
22
+
23
+ ## Time Wasters
24
+
25
+ ### Issue Description
26
+
27
+ **Symptoms**: What you'll see
28
+ **Cause**: Root cause
29
+ **Fix**: Solution
30
+
31
+ ## Common Errors
32
+
33
+ | Error Message | Cause | Fix |
34
+ | ------------- | ------ | --------- |
35
+ | "Error: ..." | Reason | Fix steps |
36
+
37
+ ## TODO
38
+
39
+ - [ ] Document more edge cases
40
+ - [ ] Add troubleshooting section
41
+ - [ ] List known issues
@@ -147,27 +147,28 @@ git worktree prune
147
147
  ```
148
148
  Leader Agents (touch beads, sync, coordinate)
149
149
  ├── build - Primary implementation agent
150
- └── rush - Fast-track implementation agent
150
+ └── plan - Architecture and planning agent
151
151
 
152
152
  Subagents (read-only, stateless workers)
153
+ ├── general - Fast, well-defined tasks
153
154
  ├── explore - Codebase search, patterns
154
155
  ├── scout - External docs, best practices
155
- ├── planner - Architecture, decomposition
156
156
  ├── review - Code review, debugging
157
157
  └── vision - UI/UX, visual analysis
158
158
  ```
159
159
 
160
160
  ### Delegation Rules
161
161
 
162
- | Agent | Can Do | Cannot Do |
163
- | --------- | -------------------------- | ---------------------- |
164
- | `build` | All beads ops, `bd sync` | - |
165
- | `rush` | All beads ops, `bd sync` | - |
166
- | `explore` | Read, grep, glob, ast-grep | Edit, write, `bd sync` |
167
- | `scout` | Fetch, search, Context7 | Edit, write, `bd sync` |
168
- | `planner` | Read, create artifacts | Edit files, `bd sync` |
169
- | `review` | Read, analyze, suggest | Edit files, `bd sync` |
170
- | `vision` | Analyze images, mockups | All beads operations |
162
+ | Agent | Can Do | Cannot Do |
163
+ | --------- | ------------------------ | ---------------------- |
164
+ | `build` | All beads ops, `bd sync` | - |
165
+ | `plan` | All beads ops, `bd sync` | - |
166
+ | `general` | Read, small edits | `bd sync`, beads write |
167
+ | `explore` | Read, grep, glob | Edit, write, `bd sync` |
168
+ | `scout` | Fetch, search, Context7 | Edit, write, `bd sync` |
169
+ | `plan` | Read, create artifacts | Edit files, `bd sync` |
170
+ | `review` | Read, analyze, suggest | Edit files, `bd sync` |
171
+ | `vision` | Analyze images, mockups | All beads operations |
171
172
 
172
173
  ### Parallel Research Pattern
173
174
 
@@ -203,9 +204,9 @@ Task({
203
204
 
204
205
  | Situation | Delegate To | Why |
205
206
  | ------------------------ | ----------- | -------------------------- |
206
- | Need codebase patterns | `@explore` | Fast grep/glob/ast-grep |
207
+ | Need codebase patterns | `@explore` | Fast grep/glob |
207
208
  | Need library docs | `@scout` | Context7, GitHub patterns |
208
- | Complex planning | `@planner` | Structured decomposition |
209
+ | Complex planning | `@plan` | Structured decomposition |
209
210
  | Code review before merge | `@review` | Fresh eyes, evidence-based |
210
211
  | UI/mockup analysis | `@vision` | Visual expertise |
211
212
  | Stuck on implementation | `@explore` | Fresh search perspective |
@@ -229,7 +230,7 @@ Based on [OpenCode Command Docs](https://opencode.ai/docs/commands/).
229
230
  ---
230
231
  description: Short description shown in TUI command list
231
232
  argument-hint: "<required> [optional] [--flag]"
232
- agent: build | planner | scout | explore | review | vision
233
+ agent: build | plan | scout | explore | review | vision
233
234
  subtask: true # Run as subagent (doesn't pollute primary context)
234
235
  model: gemini-2.5-pro # Override default model
235
236
  ---
@@ -302,11 +303,11 @@ model: gemini-2.5-pro # Override default model
302
303
  | `/start <id> --worktree` | build | + Create git worktree | Isolated feature work |
303
304
  | `/start <id> --research` | build | + Parallel subagent research | Complex task preparation |
304
305
  | `/create` | build | `bd create`, `bd sync` | Create new tracked task |
305
- | `/new-feature` | planner | `bd create` (epic + subtasks), `bd dep add`, `bd sync` | Complex feature with phases |
306
- | `/new-feature --worktree` | planner | + Create git worktree for epic | Isolated feature branch |
306
+ | `/new-feature` | plan | `bd create` (epic + subtasks), `bd dep add`, `bd sync` | Complex feature with phases |
307
+ | `/new-feature --worktree` | plan | + Create git worktree for epic | Isolated feature branch |
307
308
  | `/issue <num>` | build | `bd create`, `bd sync`, `gh issue comment` | Import GitHub issue |
308
- | `/plan <id>` | planner | `bd create` (subtasks), `bd dep add`, `bd sync` | Break down task |
309
- | `/plan <id> --create-beads` | planner | Create child beads after planning | Auto-hierarchy creation |
309
+ | `/plan <id>` | plan | `bd create` (subtasks), `bd dep add`, `bd sync` | Break down task |
310
+ | `/plan <id> --create-beads` | plan | Create child beads after planning | Auto-hierarchy creation |
310
311
  | `/implement <id>` | build | `bd update --status in_progress`, `bd sync` | Do the work |
311
312
  | `/implement <id> --parallel` | build | + Aggressive subagent research | Complex implementation |
312
313
  | `/commit [id]` | build | `bd sync` (if bead-id provided) | Commit with traceability |
@@ -322,21 +323,21 @@ model: gemini-2.5-pro # Override default model
322
323
  | Command | Agent | Beads Operations | Notes |
323
324
  | ------------------ | ------- | --------------------- | -------------------------- |
324
325
  | `/research <id>` | scout | `bd show` (read-only) | NO `bd sync` - subagent |
325
- | `/brainstorm` | planner | None | Pure planning, no tracking |
326
+ | `/brainstorm` | plan | None | Pure planning, no tracking |
326
327
  | `/analyze-project` | explore | None | Codebase exploration |
327
328
  | `/summarize` | explore | None | Session/code summary |
328
329
  | `/review-codebase` | review | None | Code review |
329
330
 
330
331
  ### Non-Beads Commands
331
332
 
332
- | Command | Agent | Purpose |
333
- | ---------------------- | ------- | ------------------------------ |
334
- | `/quick-build` | build | Trivial fixes, no bead created |
335
- | `/design` | planner | Architecture design |
336
- | `/ui-review` | vision | UI/UX analysis |
337
- | `/accessibility-check` | vision | A11y audit |
338
- | `/fix-ci` | build | CI pipeline fixes |
339
- | `/fix-types` | build | TypeScript errors |
333
+ | Command | Agent | Purpose |
334
+ | ---------------------- | ------ | ------------------------------ |
335
+ | `/quick-build` | build | Trivial fixes, no bead created |
336
+ | `/design` | plan | Architecture design |
337
+ | `/ui-review` | vision | UI/UX analysis |
338
+ | `/accessibility-check` | vision | A11y audit |
339
+ | `/fix-ci` | build | CI pipeline fixes |
340
+ | `/fix-types` | build | TypeScript errors |
340
341
 
341
342
  ## Workflow Patterns
342
343
 
@@ -486,13 +487,13 @@ bd sync
486
487
  | Agent | Can Do | Cannot Do |
487
488
  | ------- | ------------------------------- | --------- |
488
489
  | `build` | All beads operations, `bd sync` | - |
489
- | `rush` | All beads operations, `bd sync` | - |
490
+ | `plan` | All beads operations, `bd sync` | - |
490
491
 
491
492
  ### Subagents (Read-Only Beads)
492
493
 
493
494
  | Agent | Can Do | Cannot Do |
494
495
  | --------- | -------------------------------------- | --------------------- |
495
- | `planner` | `bd show`, `bd list`, create artifacts | `bd sync`, `bd close` |
496
+ | `plan` | `bd show`, `bd list`, create artifacts | `bd sync`, `bd close` |
496
497
  | `scout` | `bd show` (read context) | Any writes |
497
498
  | `explore` | `bd show`, `bd list` | Any writes |
498
499
  | `review` | `bd show` | Any writes |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  purpose: Key modules, directory structure, architectural decisions
3
- updated: 2025-01-06
3
+ updated: { { DATE } }
4
4
  ---
5
5
 
6
6
  # Project Architecture
@@ -8,72 +8,53 @@ updated: 2025-01-06
8
8
  ## Directory Structure
9
9
 
10
10
  ```
11
- src/
12
- index.ts # CLI entry point (cac-based)
13
- commands/
14
- init.ts # ock init - scaffolds .opencode/
15
- agent.ts # ock agent - manage agents
16
- skill.ts # ock skill - manage skills
17
- config.ts # ock config - edit opencode.json
18
- upgrade.ts # ock upgrade - update templates
19
- menu.ts # Interactive menu, doctor, status
20
- completion.ts # Shell completions
21
- utils/
22
- logger.ts # Logging utilities
23
- errors.ts # Error handling
24
- safe-prompts.ts # @clack/prompts wrappers
25
-
26
- dist/
27
- index.js # Built CLI bundle
28
- template/.opencode/ # Template files copied during init
29
-
30
- .opencode/ # OpenCode configuration (source of truth)
31
- agent/ # Agent definitions
32
- command/ # Workflow commands
33
- skills/ # Skills library
34
- tool/ # Custom tools (memory-*, bd-*)
35
- plugin/ # OpenCode plugins
36
- memory/ # Persistent knowledge
37
-
38
- .beads/ # Task tracking database
11
+ src/ # Source code
12
+ index.ts # Entry point
13
+ commands/ # CLI commands
14
+ utils/ # Utilities
15
+
16
+ dist/ # Built output
17
+ .opencode/ # OpenCode configuration
18
+ .beads/ # Task tracking
39
19
  ```
40
20
 
41
21
  ## Key Modules
42
22
 
43
- ### CLI (src/index.ts)
23
+ ### Module Name
44
24
 
45
- Entry point using `cac` library. Registers commands, parses args, handles errors.
25
+ **Purpose**: Brief description
46
26
 
47
- ### Init Command (src/commands/init.ts)
27
+ **Files**:
48
28
 
49
- Core command - copies `.opencode/` template from dist to target project.
29
+ - `src/module/file.ts`
50
30
 
51
- ### Build Process
31
+ **Dependencies**:
52
32
 
53
- 1. `bun build` bundles src/index.ts → dist/index.js
54
- 2. rsync copies .opencode/ → dist/template/.opencode/
55
- 3. Published package includes dist/ only
33
+ - External libs
34
+ - Internal modules
56
35
 
57
36
  ## Data Flow
58
37
 
59
38
  ```
60
- User runs: npx opencodekit init
61
- dist/index.js executes
62
- init command copies dist/template/.opencode/ to ./.opencode/
63
- User has full OpenCode setup
39
+ User Action
40
+ Module A
41
+ Module B
42
+ External Service
64
43
  ```
65
44
 
66
45
  ## External Dependencies
67
46
 
68
- - **cac**: CLI framework
69
- - **@clack/prompts**: Interactive prompts
70
- - **zod**: Schema validation
71
- - **beads-village**: Task tracking integration
72
- - **@opencode-ai/plugin**: Plugin SDK
47
+ - **Library**: Version, purpose
48
+ - **Service**: API endpoint, auth method
73
49
 
74
50
  ## Architectural Decisions
75
51
 
76
- 1. **Bun-first**: Uses Bun for speed, but builds to Node-compatible output
77
- 2. **Template bundling**: .opencode/ copied at build time, not runtime
78
- 3. **No transpilation**: TypeScript bundled directly by Bun
79
- 4. **Colocated tests**: Tests live next to source files (*.test.ts)
52
+ | Decision | Rationale | Trade-offs |
53
+ | -------- | ------------ | ------------ |
54
+ | Choice 1 | Why this way | Limitation 1 |
55
+
56
+ ## TODO
57
+
58
+ - [ ] Document missing modules
59
+ - [ ] Add dependency diagram
60
+ - [ ] Map data flow diagrams
@@ -1,53 +1,72 @@
1
1
  ---
2
2
  purpose: Build, test, lint, deploy commands discovered for this project
3
- updated: 2025-01-06
3
+ updated: { { DATE } }
4
4
  ---
5
5
 
6
6
  # Project Commands
7
7
 
8
+ ## Development
9
+
10
+ ```bash
11
+ npm run dev # Start development server
12
+ bun run src/index.ts # Run CLI directly
13
+ ```
14
+
8
15
  ## Build
9
16
 
10
17
  ```bash
11
- npm run build # Bundles src/index.ts + copies .opencode/ to dist/template/
12
- npm run typecheck # TypeScript type checking only (no emit)
18
+ npm run build # Build for production
19
+ bun build ... # Additional build options
13
20
  ```
14
21
 
15
22
  ## Test
16
23
 
17
24
  ```bash
18
- bun test # Run all tests
19
- bun test src/commands/init.ts # Run single test file
20
- bun test --watch # Watch mode
25
+ bun test # Run all tests
26
+ bun test --watch # Watch mode
27
+ bun test file.ts # Run single file
21
28
  ```
22
29
 
23
30
  ## Lint
24
31
 
25
32
  ```bash
26
- npm run lint # Check with Biome
27
- npm run lint:fix # Auto-fix issues
33
+ npm run lint # Check for issues
34
+ npm run lint:fix # Auto-fix issues
28
35
  ```
29
36
 
30
- ## Development
37
+ ## Typecheck
31
38
 
32
39
  ```bash
33
- bun run src/index.ts # Run CLI directly
34
- npm run dev # Same as above
35
- bun build src/index.ts --compile --outfile ock # Compile to binary
40
+ npm run typecheck # TypeScript checking only
36
41
  ```
37
42
 
38
- ## Beads (Task Tracking)
43
+ ## Database
44
+
45
+ ```bash
46
+ npm run db:push # Push schema changes
47
+ npm run db:studio # Open database UI
48
+ ```
49
+
50
+ ## Deployment
39
51
 
40
52
  ```bash
41
- bd ready # Find unblocked tasks
42
- bd list --status=open # All open issues
43
- bd show <id> # Full details
44
- bd create "Title" -t task -p 2 # Create task
45
- bd update <id> --status in_progress # Claim work
46
- bd close <id> --reason "Done" # Complete
47
- bd sync # Sync with git (always run at session end)
53
+ npm run deploy # Deploy to production
48
54
  ```
49
55
 
50
56
  ## CI/CD
51
57
 
52
- - GitHub Actions workflow at `.github/workflows/opencode.yml`
53
- - Triggered by `/oc` or `/opencode` comments on issues/PRs
58
+ - **Lint**: Runs on push
59
+ - **Test**: Runs on push
60
+ - **Deploy**: Triggers on main branch
61
+
62
+ ## Beads (Task Tracking)
63
+
64
+ ```bash
65
+ bd ready # Find unblocked tasks
66
+ bd list --status=open # All open issues
67
+ bd show <id> # Full details
68
+ bd create "Title" -p 2 # Create task
69
+ bd update <id> --status in_progress # Claim
70
+ bd close <id> --reason "Done" # Complete
71
+ bd sync # Push to git
72
+ ```