opencodekit 0.17.1 → 0.17.2

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 (26) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENT_ALIGNMENT.md +564 -0
  3. package/dist/template/.opencode/agent/build.md +140 -0
  4. package/dist/template/.opencode/agent/general.md +89 -0
  5. package/dist/template/.opencode/agent/plan.md +175 -0
  6. package/dist/template/.opencode/agent/review.md +96 -0
  7. package/dist/template/.opencode/command/create.md +57 -15
  8. package/dist/template/.opencode/command/init-context.md +259 -0
  9. package/dist/template/.opencode/command/init-user.md +103 -0
  10. package/dist/template/.opencode/command/init.md +53 -39
  11. package/dist/template/.opencode/command/plan.md +200 -16
  12. package/dist/template/.opencode/command/ship.md +251 -17
  13. package/dist/template/.opencode/command/start.md +35 -4
  14. package/dist/template/.opencode/memory/_templates/PROJECT.md +58 -0
  15. package/dist/template/.opencode/memory/_templates/ROADMAP.md +93 -0
  16. package/dist/template/.opencode/memory/_templates/STATE.md +89 -0
  17. package/dist/template/.opencode/memory/_templates/tech-stack.md +35 -0
  18. package/dist/template/.opencode/memory/project/project.md +92 -0
  19. package/dist/template/.opencode/memory/project/roadmap.md +142 -0
  20. package/dist/template/.opencode/memory/project/state.md +84 -0
  21. package/dist/template/.opencode/opencode.json +1030 -1027
  22. package/dist/template/.opencode/package.json +1 -1
  23. package/dist/template/.opencode/skill/context-initialization/SKILL.md +60 -0
  24. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +76 -0
  25. package/dist/template/.opencode/skill/writing-plans/SKILL.md +68 -0
  26. package/package.json +1 -1
@@ -0,0 +1,93 @@
1
+ ---
2
+ purpose: Project roadmap with phases, milestones, and bead organization
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # Roadmap
7
+
8
+ ## Overview
9
+
10
+ <!-- High-level project breakdown -->
11
+
12
+ | Phase | Goal | Status | Beads |
13
+ | --------- | ------------------- | ------------- | ----- |
14
+ | [Phase 1] | [One-sentence goal] | [Not Started] | [#] |
15
+ | [Phase 2] | [One-sentence goal] | [Not Started] | [#] |
16
+ | [Phase 3] | [One-sentence goal] | [Not Started] | [#] |
17
+
18
+ ## Phase 1: [Name]
19
+
20
+ **Goal:** [Outcome-shaped description]
21
+
22
+ **Success Criteria:**
23
+
24
+ - [ ] [Criterion 1]
25
+ - [ ] [Criterion 2]
26
+ - [ ] [Criterion 3]
27
+
28
+ **Beads:**
29
+ | ID | Title | Type | Status | Depends On |
30
+ |----|-------|------|--------|------------|
31
+ | br-xxx | [Title] | task | open | - |
32
+ | br-xxx | [Title] | task | open | br-xxx |
33
+
34
+ **Out of Scope:**
35
+
36
+ - [What's explicitly deferred to later phases]
37
+
38
+ ---
39
+
40
+ ## Phase 2: [Name]
41
+
42
+ **Goal:** [Outcome-shaped description]
43
+
44
+ **Success Criteria:**
45
+
46
+ - [ ] [Criterion 1]
47
+ - [ ] [Criterion 2]
48
+
49
+ **Beads:**
50
+ | ID | Title | Type | Status | Depends On |
51
+ |----|-------|------|--------|------------|
52
+ | br-xxx | [Title] | feature | open | Phase 1 |
53
+
54
+ **Dependencies:**
55
+
56
+ - Requires Phase 1 completion
57
+
58
+ ---
59
+
60
+ ## Phase 3: [Name]
61
+
62
+ **Goal:** [Outcome-shaped description]
63
+
64
+ **Success Criteria:**
65
+
66
+ - [ ] [Criterion 1]
67
+
68
+ **Beads:**
69
+ | ID | Title | Type | Status | Depends On |
70
+ |----|-------|------|--------|------------|
71
+ | br-xxx | [Title] | epic | open | Phase 2 |
72
+
73
+ ---
74
+
75
+ ## Legend
76
+
77
+ **Status:**
78
+
79
+ - `Not Started` - No work begun
80
+ - `In Progress` - Active development
81
+ - `Complete` - All beads closed
82
+
83
+ **Type:**
84
+
85
+ - `task` - Tactical, single-session work
86
+ - `feature` - New capability, multi-session
87
+ - `epic` - Cross-domain, significant scope
88
+ - `bug` - Fix for broken behavior
89
+
90
+ ---
91
+
92
+ _Update this file when phases complete or roadmap changes._
93
+ _Use `/plan` command to create detailed plans for active phases._
@@ -0,0 +1,89 @@
1
+ ---
2
+ purpose: Current project state, active decisions, blockers, and position tracking
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # State
7
+
8
+ ## Current Position
9
+
10
+ <!-- Where are we right now? What just happened? -->
11
+
12
+ **Active Bead:** br-xxx - [Title]
13
+ **Status:** [In Progress / Blocked / Review]
14
+ **Started:** [Date]
15
+ **Phase:** [Phase name from ROADMAP.md]
16
+
17
+ ## Recent Completed Work
18
+
19
+ <!-- Last 3-5 completed beads -->
20
+
21
+ | Bead | Title | Completed | Summary |
22
+ | ------ | ------- | --------- | ------------------ |
23
+ | br-xxx | [Title] | [Date] | [One-line summary] |
24
+ | br-xxx | [Title] | [Date] | [One-line summary] |
25
+
26
+ ## Active Decisions
27
+
28
+ <!-- Decisions made that affect current and future work -->
29
+
30
+ | Date | Decision | Rationale | Impact |
31
+ | ------ | ------------------ | --------- | ----------------- |
32
+ | [Date] | [What was decided] | [Why] | [What it affects] |
33
+
34
+ ## Blockers
35
+
36
+ <!-- What's preventing progress? -->
37
+
38
+ | Bead | Blocker | Since | Owner |
39
+ | ------ | ------------------------ | ------ | ------------------- |
40
+ | br-xxx | [Description of blocker] | [Date] | [Who's responsible] |
41
+
42
+ ## Open Questions
43
+
44
+ <!-- Questions that need answers before proceeding -->
45
+
46
+ | Question | Context | Blocking | Priority |
47
+ | ---------- | ------------------ | -------- | -------------- |
48
+ | [Question] | [Where it came up] | [Yes/No] | [High/Med/Low] |
49
+
50
+ ## Context Notes
51
+
52
+ <!-- Important context that doesn't fit elsewhere -->
53
+
54
+ ### Technical
55
+
56
+ - [Technical decision or constraint]
57
+ - [Pattern or convention established]
58
+
59
+ ### Product
60
+
61
+ - [Product decision or direction]
62
+ - [User feedback or requirement]
63
+
64
+ ### Process
65
+
66
+ - [Workflow change or improvement]
67
+ - [Team agreement or process]
68
+
69
+ ## Next Actions
70
+
71
+ <!-- Immediate next steps -->
72
+
73
+ 1. [ ] [Action item with owner if applicable]
74
+ 2. [ ] [Action item]
75
+ 3. [ ] [Action item]
76
+
77
+ ## Session Handoff
78
+
79
+ <!-- For multi-session work, what's the state for the next session? -->
80
+
81
+ **Last Session:** [Date]
82
+ **Next Session Priority:** [What's most important to do next]
83
+ **Known Issues:** [Any issues to be aware of]
84
+ **Context Links:** [Relevant files, PRs, docs]
85
+
86
+ ---
87
+
88
+ _Update this file at the end of each significant session or when state changes._
89
+ _This file is the "you are here" marker for the project._
@@ -44,6 +44,41 @@ This file is automatically injected into ALL AI prompts via `opencode.json` inst
44
44
  - [Service 2: e.g., Resend for email]
45
45
  - [Service 3: e.g., Sentry for error tracking]
46
46
 
47
+ ## Context Budget Guidelines
48
+
49
+ **Quality Degradation Rule:** Target ~50% context per plan execution for consistent quality.
50
+
51
+ | Task Complexity | Max Tasks/Plan | Typical Context Usage |
52
+ | --------------- | -------------- | --------------------- |
53
+ | Simple (CRUD) | 3 | ~30-45% |
54
+ | Complex (auth) | 2 | ~40-50% |
55
+ | Very complex | 1-2 | ~30-50% |
56
+
57
+ **Split Signals:**
58
+
59
+ - More than 3 tasks → Create child plans
60
+ - Multiple subsystems → Separate plans
61
+ - > 5 file modifications per task → Split
62
+ - Discovery + implementation → Split
63
+
64
+ ## Verification Commands
65
+
66
+ **Always run before claiming complete:**
67
+
68
+ ```bash
69
+ # Type checking
70
+ [typecheck command, e.g., npm run typecheck]
71
+
72
+ # Linting
73
+ [lint command, e.g., npm run lint]
74
+
75
+ # Testing
76
+ [test command, e.g., npm test]
77
+
78
+ # Building
79
+ [build command, e.g., npm run build]
80
+ ```
81
+
47
82
  ---
48
83
 
49
84
  _Update this file when tech stack or constraints change._
@@ -0,0 +1,92 @@
1
+ ---
2
+ purpose: Project vision, success criteria, and core principles
3
+ updated: 2026-02-12
4
+ ---
5
+
6
+ # OpenCodeKit
7
+
8
+ ## Vision
9
+
10
+ A project scaffolding tool that generates OpenCode-ready project templates.
11
+
12
+ OpenCodeKit (`ock`) enables developers to bootstrap AI-assisted development environments with all essential configurations, skills, commands, and integrations pre-configured and validated.
13
+
14
+ ## Success Criteria
15
+
16
+ - [ ] Users can `ock init` and get a working OpenCode project in under 60 seconds
17
+ - [ ] Generated projects include all essential files (AGENTS.md, skills, commands, memory)
18
+ - [ ] 100% of generated templates pass validation (typecheck, lint)
19
+ - [ ] Templates are customizable through CLI prompts or config
20
+ - [ ] Integration with beads for task tracking works out-of-the-box
21
+
22
+ ## Target Users
23
+
24
+ ### Primary
25
+
26
+ - **Solo developers** setting up AI-assisted workflows for personal projects
27
+ - **Teams** standardizing their OpenCode configuration across multiple projects
28
+
29
+ ### User Needs
30
+
31
+ - Quick setup without manual configuration
32
+ - Consistent, validated project structures
33
+ - Customizable templates for different use cases
34
+ - Integrated task tracking from day one
35
+
36
+ ## Core Principles
37
+
38
+ 1. **Convention over configuration** - Sensible defaults, minimal setup required
39
+ 2. **Minimal but complete** - Include only essential files, no bloat
40
+ 3. **Extensible** - Easy to add custom skills, commands, and templates
41
+ 4. **Validated by default** - All generated projects pass typecheck and lint
42
+ 5. **Git-backed** - All state and tracking integrated with git workflow
43
+
44
+ ## Tech Stack
45
+
46
+ - **Runtime:** Bun >= 1.3.2
47
+ - **Language:** TypeScript (ESNext, strict mode)
48
+ - **Build:** `bun build` + rsync for template bundling
49
+ - **CLI Framework:** cac
50
+ - **UI Prompts:** @clack/prompts
51
+ - **Validation:** zod
52
+ - **Task Tracking:** beads_rust (br)
53
+
54
+ ## Current Phase
55
+
56
+ **Scale** - Core complete, adding advanced features.
57
+
58
+ See [roadmap.md](./roadmap.md) for phase details and [state.md](./state.md) for current position.
59
+
60
+ ## Architecture
61
+
62
+ ```
63
+ src/
64
+ ├── index.ts # CLI entry point
65
+ ├── commands/ # CLI commands (init, etc.)
66
+ ├── utils/ # Shared utilities
67
+ └── validation/ # Validation scripts
68
+
69
+ dist/
70
+ ├── index.js # Built CLI
71
+ └── template/ # Bundled .opencode/ template
72
+
73
+ .opencode/
74
+ ├── agent/ # Agent definitions
75
+ ├── command/ # OpenCode commands
76
+ ├── skill/ # Reusable skills
77
+ ├── tool/ # Custom tools
78
+ └── memory/ # Project memory
79
+ ```
80
+
81
+ ## Key Files
82
+
83
+ | File | Purpose |
84
+ | ------------- | --------------------------- |
85
+ | AGENTS.md | Project rules for AI agents |
86
+ | package.json | Dependencies and scripts |
87
+ | build.ts | Build configuration |
88
+ | tsconfig.json | TypeScript configuration |
89
+
90
+ ---
91
+
92
+ _Update this file when vision, success criteria, or principles change._
@@ -0,0 +1,142 @@
1
+ ---
2
+ purpose: Project roadmap with phases, milestones, and bead organization
3
+ updated: 2026-02-12
4
+ ---
5
+
6
+ # Roadmap
7
+
8
+ ## Overview
9
+
10
+ | Phase | Goal | Status | Beads |
11
+ | ------ | ------------------------------------------------- | ----------- | ----- |
12
+ | MVP | Core `ock init` command with basic template | Complete | [#] |
13
+ | Extend | Additional commands (`/ship`, `/plan`, `/resume`) | Complete | [#] |
14
+ | Polish | Error handling, docs, validation improvements | Complete | [#] |
15
+ | Scale | Plugin system, custom templates, advanced config | In Progress | [#] |
16
+
17
+ ## Phase 1: MVP
18
+
19
+ **Goal:** Users can run `ock init` to generate a working OpenCode project template.
20
+
21
+ **Success Criteria:**
22
+
23
+ - [x] `ock init` command creates project structure
24
+ - [x] Generated files include AGENTS.md, skills, commands, memory
25
+ - [x] Templates pass typecheck and lint
26
+ - [x] Basic CLI prompts for project configuration
27
+
28
+ **Beads:**
29
+
30
+ | ID | Title | Type | Status | Depends On |
31
+ | --- | ----------------- | ------- | ------ | ---------- |
32
+ | - | Core init command | feature | closed | - |
33
+ | - | Template bundling | task | closed | - |
34
+ | - | CLI prompts | task | closed | - |
35
+
36
+ **Out of Scope:**
37
+
38
+ - Advanced customization
39
+ - Plugin system
40
+ - Multiple template options
41
+
42
+ ---
43
+
44
+ ## Phase 2: Extend
45
+
46
+ **Goal:** Add essential OpenCode commands for common workflows.
47
+
48
+ **Success Criteria:**
49
+
50
+ - [x] `/ship` command for deployment workflows
51
+ - [x] `/plan` command for implementation planning
52
+ - [x] `/resume` command for continuing work
53
+ - [x] `/handoff` command for session handoffs
54
+ - [x] `/status` command for project state
55
+
56
+ **Beads:**
57
+
58
+ | ID | Title | Type | Status | Depends On |
59
+ | --- | --------------- | ------- | ------ | ---------- |
60
+ | - | Ship command | feature | closed | MVP |
61
+ | - | Plan command | feature | closed | MVP |
62
+ | - | Resume command | feature | closed | MVP |
63
+ | - | Handoff command | feature | closed | MVP |
64
+ | - | Status command | feature | closed | MVP |
65
+
66
+ **Dependencies:**
67
+
68
+ - Requires MVP completion
69
+
70
+ ---
71
+
72
+ ## Phase 3: Polish
73
+
74
+ **Goal:** Improve quality, documentation, and error handling.
75
+
76
+ **Success Criteria:**
77
+
78
+ - [x] Comprehensive error messages with actionable guidance
79
+ - [x] Documentation for all commands
80
+ - [x] Validation scripts for template integrity
81
+ - [x] Improved CLI UX with progress indicators
82
+
83
+ **Beads:**
84
+
85
+ | ID | Title | Type | Status | Depends On |
86
+ | --- | ------------------- | ---- | ------ | ---------- |
87
+ | - | Error handling | task | closed | Extend |
88
+ | - | Documentation | task | closed | Extend |
89
+ | - | Validation scripts | task | closed | Extend |
90
+ | - | CLI UX improvements | task | closed | Extend |
91
+
92
+ **Dependencies:**
93
+
94
+ - Requires Extend completion
95
+
96
+ ---
97
+
98
+ ## Phase 4: Scale
99
+
100
+ **Goal:** Add advanced features for power users and customization.
101
+
102
+ **Success Criteria:**
103
+
104
+ - [ ] Plugin system for extending CLI functionality
105
+ - [ ] Custom template support (user-defined templates)
106
+ - [ ] Advanced configuration options
107
+ - [ ] Template marketplace or sharing mechanism
108
+
109
+ **Beads:**
110
+
111
+ | ID | Title | Type | Status | Depends On |
112
+ | --- | ---------------- | ------- | ------ | ------------- |
113
+ | - | Plugin system | epic | open | Polish |
114
+ | - | Custom templates | feature | open | Polish |
115
+ | - | Advanced config | task | open | Polish |
116
+ | - | Template sharing | epic | open | Plugin system |
117
+
118
+ **Dependencies:**
119
+
120
+ - Requires Polish completion
121
+
122
+ ---
123
+
124
+ ## Legend
125
+
126
+ **Status:**
127
+
128
+ - `Not Started` - No work begun
129
+ - `In Progress` - Active development
130
+ - `Complete` - All beads closed
131
+
132
+ **Type:**
133
+
134
+ - `task` - Tactical, single-session work
135
+ - `feature` - New capability, multi-session
136
+ - `epic` - Cross-domain, significant scope
137
+ - `bug` - Fix for broken behavior
138
+
139
+ ---
140
+
141
+ _Update this file when phases complete or roadmap changes._
142
+ _Use `/plan` command to create detailed plans for active phases._
@@ -0,0 +1,84 @@
1
+ ---
2
+ purpose: Current project state, active decisions, blockers, and position tracking
3
+ updated: 2026-02-12
4
+ ---
5
+
6
+ # State
7
+
8
+ ## Current Position
9
+
10
+ **Active Bead:** (none active)
11
+ **Status:** Ready for new work
12
+ **Started:** 2026-02-12
13
+ **Phase:** Scale
14
+
15
+ ## Recent Completed Work
16
+
17
+ | Bead | Title | Completed | Summary |
18
+ | ---- | --------------------- | --------- | ------------------------------------------------- |
19
+ | - | Polish phase tasks | 2026-02 | Error handling, docs, validation, UX improvements |
20
+ | - | Extend phase commands | 2026-02 | Ship, plan, resume, handoff, status commands |
21
+ | - | MVP core features | 2026-02 | Init command, template bundling, CLI prompts |
22
+
23
+ ## Active Decisions
24
+
25
+ | Date | Decision | Rationale | Impact |
26
+ | ---------- | ----------------- | ------------------------------------------ | ------------------------------- |
27
+ | 2026-02-12 | Scale phase focus | Core complete, ready for advanced features | Plugin system, custom templates |
28
+
29
+ ## Blockers
30
+
31
+ | Bead | Blocker | Since | Owner |
32
+ | ---- | ------- | ----- | ----- |
33
+ | - | (none) | - | - |
34
+
35
+ ## Open Questions
36
+
37
+ | Question | Context | Blocking | Priority |
38
+ | -------------------------------- | ------------------------------ | -------- | -------- |
39
+ | What plugin system architecture? | Scale phase planning | Yes | High |
40
+ | How to handle custom templates? | User-defined templates feature | Yes | High |
41
+
42
+ ## Context Notes
43
+
44
+ ### Technical
45
+
46
+ - Bun runtime required (>= 1.3.2)
47
+ - TypeScript strict mode enforced
48
+ - Build uses rsync to bundle .opencode/ template
49
+ - oxlint for linting (fast, modern)
50
+
51
+ ### Product
52
+
53
+ - Target: solo developers and teams
54
+ - Key differentiator: validated, ready-to-use templates
55
+ - Integration with beads_rust for task tracking
56
+
57
+ ### Process
58
+
59
+ - Run `npm run lint:fix` before commits
60
+ - Validate with `npm run typecheck`
61
+ - Never modify dist/ directly
62
+
63
+ ## Next Actions
64
+
65
+ 1. [ ] Define plugin system architecture
66
+ 2. [ ] Design custom template API
67
+ 3. [ ] Create Scale phase implementation plan
68
+ 4. [ ] Identify Scale phase beads
69
+
70
+ ## Session Handoff
71
+
72
+ **Last Session:** 2026-02-12
73
+ **Next Session Priority:** Define plugin system architecture
74
+ **Known Issues:** None currently blocking
75
+ **Context Links:**
76
+
77
+ - AGENTS.md - Project rules
78
+ - .opencode/skill/ - Available skills
79
+ - .opencode/command/ - Available commands
80
+
81
+ ---
82
+
83
+ _Update this file at the end of each significant session or when state changes._
84
+ _This file is the "you are here" marker for the project._