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.
- package/dist/index.js +4653 -11498
- package/dist/template/.opencode/AGENTS.md +43 -7
- package/dist/template/.opencode/agent/plan.md +1 -1
- package/dist/template/.opencode/command/compound.md +1 -1
- package/dist/template/.opencode/command/lfg.md +1 -1
- package/dist/template/.opencode/memory/project/project.md +2 -2
- package/dist/template/.opencode/memory/project/state.md +2 -2
- package/dist/template/.opencode/memory/project/tech-stack.md +9 -9
- package/dist/template/.opencode/memory/project/user.md +2 -2
- package/dist/template/.opencode/opencode.json +292 -100
- package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +3 -3
- package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +2 -2
- package/dist/template/.opencode/plans/swarm-protocol.md +7 -7
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
- package/dist/template/.opencode/skill/context-management/SKILL.md +82 -66
- package/dist/template/.opencode/skill/deep-research/SKILL.md +12 -10
- package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +4 -4
- package/dist/template/.opencode/skill/test-driven-development/SKILL.md +9 -6
- package/package.json +14 -17
|
@@ -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
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
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,
|
|
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 | ... |
|
|
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
|
-
- `
|
|
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:**
|
|
46
|
+
- **Runtime:** Node.js >= 20.19.0
|
|
47
47
|
- **Language:** TypeScript (ESNext, strict mode)
|
|
48
|
-
- **Build:**
|
|
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
|
-
-
|
|
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-
|
|
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:**
|
|
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:**
|
|
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:**
|
|
29
|
+
- **TypeCheck:** tsgo (@typescript/native-preview)
|
|
30
|
+
- **Dev Runner:** tsx - TypeScript execution for development
|
|
31
31
|
|
|
32
32
|
## Testing
|
|
33
33
|
|
|
34
|
-
- **Unit Tests:**
|
|
34
|
+
- **Unit Tests:** vitest
|
|
35
35
|
- **Test Location:** src/\*_/_.test.ts (colocated)
|
|
36
|
-
- **Run Single:**
|
|
36
|
+
- **Run Single:** vitest src/commands/init.test.ts
|
|
37
37
|
|
|
38
38
|
## Key Constraints
|
|
39
39
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
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
|
|