opencodekit 0.17.11 → 0.17.13

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.
@@ -44,23 +44,44 @@ When instructions conflict:
44
44
  - Read files before editing
45
45
  - Delegate when work is large, uncertain, or cross-domain
46
46
 
47
+ ### Anti-Redundancy
48
+
49
+ - **Search before creating** — always check if a utility, helper, or component already exists before creating a new one
50
+ - **No wrapper files** — don't create files that only re-export from other files; import directly from the source
51
+ - **One home per concept** — if a function/class already exists somewhere, use it; don't duplicate in a new location
52
+
47
53
  ### Verification Before Completion
48
54
 
49
55
  - No success claims without fresh evidence
56
+ - **Verify external APIs before using** — check local type definitions, source code, or official docs; never guess library method signatures or options
50
57
  - Run relevant commands (typecheck/lint/test/build) after meaningful changes
51
58
  - If verification fails twice on the same approach, stop and escalate with blocker details
59
+ - **Lint churn auto-resolution** — if staged diffs are formatting-only, auto-resolve without asking. If a commit was already requested, auto-stage formatting follow-ups.
60
+ - **Auto-detect project toolchain** — look for `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `Makefile`, etc. and run the appropriate verification commands
61
+ - **Common verification patterns:**
62
+
63
+ | Indicator | Typecheck | Lint | Test |
64
+ | ---------------- | --------------------------------------- | ----------------------- | --------------- |
65
+ | `package.json` | `npm run typecheck` | `npm run lint` | `npm test` |
66
+ | `Cargo.toml` | `cargo check` | `cargo clippy` | `cargo test` |
67
+ | `pyproject.toml` | `mypy .` or `pyright` | `ruff check .` | `pytest` |
68
+ | `go.mod` | `go vet ./...` | `golangci-lint run` | `go test ./...` |
69
+ | `pom.xml` | `mvn compile` | `mvn checkstyle:check` | `mvn test` |
70
+ | `build.gradle` | `gradle compileJava` | `gradle checkstyleMain` | `gradle test` |
71
+ | `Makefile` | Check for `check`/`lint`/`test` targets | | |
52
72
 
53
73
  ---
54
74
 
55
75
  ## Hard Constraints (Never Violate)
56
76
 
57
- | Constraint | Rule |
58
- | ------------- | ------------------------------------------------- |
59
- | Security | Never expose/invent credentials |
60
- | Git Safety | Never force push main/master; never bypass hooks |
61
- | Honesty | Never fabricate tool output; never guess URLs |
62
- | Paths | Use absolute paths for file operations |
63
- | Reversibility | Ask first before destructive/irreversible actions |
77
+ | Constraint | Rule |
78
+ | ------------- | --------------------------------------------------------------------------------- |
79
+ | Security | Never expose/invent credentials |
80
+ | Git Safety | Never force push main/master; never bypass hooks |
81
+ | Git Restore | Never run `reset --hard`, `checkout .`, `clean -fd` without explicit user request |
82
+ | Honesty | Never fabricate tool output; never guess URLs |
83
+ | Paths | Use absolute paths for file operations |
84
+ | Reversibility | Ask first before destructive/irreversible actions |
64
85
 
65
86
  ---
66
87
 
@@ -76,6 +97,18 @@ If blocked, report the blocker; do not bypass constraints.
76
97
 
77
98
  ---
78
99
 
100
+ ## Multi-Agent Safety
101
+
102
+ When multiple agents or subagents work on the same codebase:
103
+
104
+ - **Don't create git stash or worktree** unless the user explicitly requests it
105
+ - **Scope commits to your changes only** — don't stage unrelated files
106
+ - **Never use `git add .`** — stage specific files you modified
107
+ - **Coordinate on shared files** — if another agent is editing the same file, wait or delegate
108
+ - **No speculative cleanup** — don't reformat or refactor files you didn't need to change
109
+
110
+ ---
111
+
79
112
  ## Delegation Policy
80
113
 
81
114
  Use specialist agents by intent:
@@ -167,11 +200,14 @@ For major tracked work:
167
200
 
168
201
  ### File Size Guidance
169
202
 
203
+ Files over ~500 lines become hard to maintain and review. Extract helpers, split modules, or refactor when approaching this threshold.
204
+
170
205
  | Size | Strategy |
171
206
  | ------------- | --------------------------------- |
172
207
  | < 100 lines | Full rewrite often easier |
173
208
  | 100-400 lines | Structured edit with good context |
174
209
  | > 400 lines | Strongly prefer structured edits |
210
+ | > 500 lines | Consider splitting the file |
175
211
 
176
212
  **Use the `structured-edit` skill for complex edits.**
177
213
 
@@ -36,7 +36,7 @@ You are opencode, an interactive CLI tool that helps users with software enginee
36
36
  - Prefer specialized tools over shell for file operations:
37
37
  - Use Read to view files, Edit to modify files, and Write only when needed.
38
38
  - Use Glob to find files by name and Grep to search file contents.
39
- - Use Bash for terminal operations (git, bun, builds, tests, running scripts).
39
+ - Use Bash for terminal operations (git, npm/pnpm, builds, tests, running scripts).
40
40
  - Run tool calls in parallel when neither call needs the other's output; otherwise run sequentially.
41
41
 
42
42
  # Planning Guidelines
@@ -118,7 +118,7 @@ Report what was codified:
118
118
  | # | Type | Title | Concepts |
119
119
  |---|-----------|------------------------------|------------------------|
120
120
  | 1 | pattern | ... | auth, jwt |
121
- | 2 | gotcha | ... | bun, build |
121
+ | 2 | gotcha | ... | node, build |
122
122
  | 3 | bugfix | ... | typecheck, strict-mode |
123
123
 
124
124
  **AGENTS.md updates suggested:** [yes/no - describe if yes]
@@ -67,7 +67,7 @@ Run verification after each wave:
67
67
 
68
68
  - `npm run typecheck`
69
69
  - `npm run lint`
70
- - `bun test` (if tests exist for changed areas)
70
+ - `vitest` (if tests exist for changed areas)
71
71
 
72
72
  Checkpoint only at `checkpoint:human-verify` or `checkpoint:decision` tasks.
73
73
 
@@ -43,9 +43,9 @@ OpenCodeKit (`ock`) enables developers to bootstrap AI-assisted development envi
43
43
 
44
44
  ## Tech Stack
45
45
 
46
- - **Runtime:** Bun >= 1.3.2
46
+ - **Runtime:** Node.js >= 20.19.0
47
47
  - **Language:** TypeScript (ESNext, strict mode)
48
- - **Build:** `bun build` + rsync for template bundling
48
+ - **Build:** tsdown + rsync for template bundling
49
49
  - **CLI Framework:** cac
50
50
  - **UI Prompts:** @clack/prompts
51
51
  - **Validation:** zod
@@ -43,9 +43,9 @@ updated: 2026-02-12
43
43
 
44
44
  ### Technical
45
45
 
46
- - Bun runtime required (>= 1.3.2)
46
+ - Node.js runtime required (>= 20.19.0)
47
47
  - TypeScript strict mode enforced
48
- - Build uses rsync to bundle .opencode/ template
48
+ - Build uses tsdown + rsync to bundle .opencode/ template
49
49
  - oxlint for linting (fast, modern)
50
50
 
51
51
  ### Product
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  purpose: Tech stack, constraints, and integrations for AI context injection
3
- updated: 2026-02-02
3
+ updated: 2026-02-24
4
4
  ---
5
5
 
6
6
  # Tech Stack
@@ -11,34 +11,34 @@ This file is automatically injected into ALL AI prompts via `opencode.json` inst
11
11
 
12
12
  - **Framework:** CLI tool (cac for argument parsing)
13
13
  - **Language:** TypeScript (ESNext, strict mode, bundler moduleResolution)
14
- - **Runtime:** Bun >= 1.3.2
14
+ - **Runtime:** Node.js >= 20.19.0
15
15
 
16
16
  ## Key Dependencies
17
17
 
18
18
  - **CLI Framework:** cac (^6.7.14) - Command-line argument parsing
19
19
  - **UI Prompts:** @clack/prompts (^0.7.0) - Interactive CLI prompts
20
- - **TUI Framework:** @opentui/core (^0.1.72) + @opentui/solid (^0.1.72) - Terminal UI
21
20
  - **Validation:** zod (^3.25.76) - Schema validation
22
21
  - **Task Tracking:** beads-village (^1.3.3) - Git-backed task management
23
22
  - **AI SDK:** @ai-sdk/provider (^3.0.6) - AI provider integration
24
23
 
25
24
  ## Build & Tools
26
25
 
27
- - **Build:** `bun run build.ts` + rsync for template bundling
26
+ - **Build:** tsdown + rsync for template bundling
28
27
  - **Lint:** oxlint (^1.38.0) - Fast JavaScript/TypeScript linter
29
28
  - **Format:** oxfmt (^0.23.0) - Code formatter
30
- - **TypeCheck:** TypeScript 5.9.3
29
+ - **TypeCheck:** tsgo (@typescript/native-preview)
30
+ - **Dev Runner:** tsx - TypeScript execution for development
31
31
 
32
32
  ## Testing
33
33
 
34
- - **Unit Tests:** bun test (native Bun test runner)
34
+ - **Unit Tests:** vitest
35
35
  - **Test Location:** src/\*_/_.test.ts (colocated)
36
- - **Run Single:** bun test src/commands/init.test.ts
36
+ - **Run Single:** vitest src/commands/init.test.ts
37
37
 
38
38
  ## Key Constraints
39
39
 
40
- - Must maintain Bun compatibility (engines.bun >= 1.3.2)
41
- - Node.js not officially supported
40
+ - Node.js >= 20.19.0 required (engines.node in package.json)
41
+ - pnpm for package management
42
42
  - Build copies .opencode/ to dist/template/ - don't edit dist/ directly
43
43
  - Keep .opencode/ structure minimal and focused
44
44
 
@@ -23,9 +23,9 @@ updated: 2025-01-06
23
23
 
24
24
  ## Technical Preferences
25
25
 
26
- - Runtime: Bun
26
+ - Runtime: Node.js
27
27
  - Language: TypeScript
28
- - Linter: Biome
28
+ - Linter: oxlint
29
29
 
30
30
  ## Rules to Always Follow
31
31