opencodekit 0.15.21 → 0.16.1
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 +5 -7
- package/dist/template/.opencode/AGENTS.md +85 -23
- package/dist/template/.opencode/agent/build.md +88 -7
- package/dist/template/.opencode/agent/explore.md +1 -1
- package/dist/template/.opencode/agent/general.md +54 -4
- package/dist/template/.opencode/agent/looker.md +1 -1
- package/dist/template/.opencode/agent/painter.md +1 -1
- package/dist/template/.opencode/agent/plan.md +52 -0
- package/dist/template/.opencode/agent/review.md +1 -1
- package/dist/template/.opencode/agent/scout.md +3 -3
- package/dist/template/.opencode/agent/vision.md +1 -1
- package/dist/template/.opencode/command/create.md +231 -91
- package/dist/template/.opencode/command/design.md +40 -7
- package/dist/template/.opencode/command/handoff.md +22 -0
- package/dist/template/.opencode/command/init.md +49 -78
- package/dist/template/.opencode/command/plan.md +36 -16
- package/dist/template/.opencode/command/pr.md +15 -0
- package/dist/template/.opencode/command/research.md +3 -0
- package/dist/template/.opencode/command/resume.md +8 -18
- package/dist/template/.opencode/command/review-codebase.md +30 -0
- package/dist/template/.opencode/command/ship.md +199 -0
- package/dist/template/.opencode/command/start.md +316 -28
- package/dist/template/.opencode/command/status.md +24 -1
- package/dist/template/.opencode/command/ui-review.md +36 -7
- package/dist/template/.opencode/command/verify.md +307 -0
- package/dist/template/.opencode/memory/_templates/prd.md +29 -0
- package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
- package/dist/template/.opencode/memory/_templates/spec.md +66 -0
- package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
- package/dist/template/.opencode/memory/_templates/tech-stack.md +50 -0
- package/dist/template/.opencode/memory/project/tech-stack.md +53 -0
- package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
- package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +18 -4
- package/dist/template/.opencode/package.json +1 -0
- package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +418 -0
- package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +170 -0
- package/dist/template/.opencode/plans/1770013678126-witty-planet.md +278 -0
- package/dist/template/.opencode/plugin/lib/memory-db.ts +828 -0
- package/dist/template/.opencode/plugin/memory.ts +38 -1
- package/dist/template/.opencode/skill/index-knowledge/SKILL.md +76 -31
- package/dist/template/.opencode/skill/memory-system/SKILL.md +110 -55
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
- package/dist/template/.opencode/tool/memory-get.ts +143 -0
- package/dist/template/.opencode/tool/memory-maintain.ts +167 -0
- package/dist/template/.opencode/tool/memory-migrate.ts +319 -0
- package/dist/template/.opencode/tool/memory-read.ts +17 -46
- package/dist/template/.opencode/tool/memory-search.ts +131 -28
- package/dist/template/.opencode/tool/memory-timeline.ts +105 -0
- package/dist/template/.opencode/tool/memory-update.ts +21 -26
- package/dist/template/.opencode/tool/observation.ts +112 -100
- package/dist/template/.opencode/tsconfig.json +19 -19
- package/package.json +1 -1
- package/dist/template/.opencode/command/accessibility-check.md +0 -331
- package/dist/template/.opencode/command/agent-browser.md +0 -21
- package/dist/template/.opencode/command/analyze-mockup.md +0 -423
- package/dist/template/.opencode/command/analyze-project.md +0 -295
- package/dist/template/.opencode/command/brainstorm.md +0 -373
- package/dist/template/.opencode/command/cloudflare.md +0 -70
- package/dist/template/.opencode/command/commit.md +0 -245
- package/dist/template/.opencode/command/complete-next-task.md +0 -77
- package/dist/template/.opencode/command/design-audit.md +0 -480
- package/dist/template/.opencode/command/edit-image.md +0 -242
- package/dist/template/.opencode/command/finish.md +0 -255
- package/dist/template/.opencode/command/fix-ci.md +0 -109
- package/dist/template/.opencode/command/fix-types.md +0 -104
- package/dist/template/.opencode/command/fix-ui.md +0 -117
- package/dist/template/.opencode/command/fix.md +0 -168
- package/dist/template/.opencode/command/frontend-design.md +0 -21
- package/dist/template/.opencode/command/generate-diagram.md +0 -349
- package/dist/template/.opencode/command/generate-icon.md +0 -283
- package/dist/template/.opencode/command/generate-image.md +0 -246
- package/dist/template/.opencode/command/generate-pattern.md +0 -247
- package/dist/template/.opencode/command/generate-storyboard.md +0 -250
- package/dist/template/.opencode/command/implement.md +0 -609
- package/dist/template/.opencode/command/import-plan.md +0 -406
- package/dist/template/.opencode/command/index-knowledge.md +0 -25
- package/dist/template/.opencode/command/integration-test.md +0 -424
- package/dist/template/.opencode/command/issue.md +0 -102
- package/dist/template/.opencode/command/new-feature.md +0 -651
- package/dist/template/.opencode/command/opensrc.md +0 -58
- package/dist/template/.opencode/command/quick-build.md +0 -238
- package/dist/template/.opencode/command/ralph.md +0 -41
- package/dist/template/.opencode/command/research-and-implement.md +0 -148
- package/dist/template/.opencode/command/research-ui.md +0 -466
- package/dist/template/.opencode/command/restore-image.md +0 -424
- package/dist/template/.opencode/command/revert-feature.md +0 -386
- package/dist/template/.opencode/command/skill-create.md +0 -517
- package/dist/template/.opencode/command/skill-optimize.md +0 -556
- package/dist/template/.opencode/command/summarize.md +0 -412
- package/dist/template/.opencode/command/triage.md +0 -398
- package/dist/template/.opencode/memory/_templates/README.md +0 -35
- package/dist/template/.opencode/memory/_templates/observation.md +0 -39
- package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
- package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
- package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
- package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
- package/dist/template/.opencode/memory/_templates/prompt-engineering.md +0 -333
- package/dist/template/.opencode/memory/observations/2026-01-22-decision-agents-md-prompt-engineering-improvement.md +0 -29
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-agent-roles-build-orchestrates-general-e.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-simplified-swarm-helper-tool-to-fix-type.md +0 -20
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-use-beads-as-swarm-board-source-of-truth.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-25-learning-user-wants-real-swarm-coordination-guida.md +0 -15
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-created-deep-research-skill-for-thorough.md +0 -29
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-oracle-tool-optimal-usage-patterns.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-28-learning-ampcode-deep-mode-research-integration-w.md +0 -42
- package/dist/template/.opencode/memory/observations/2026-01-28-pattern-research-delegation-pattern-explore-for-.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-29-decision-copilot-auth-plugin-rate-limit-handling.md +0 -27
- package/dist/template/.opencode/memory/observations/2026-01-29-decision-spec-driven-approach-for-opencodekit.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +0 -44
- package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-30-discovery-kimi-k2-5-agent-swarm-architecture-patte.md +0 -45
- package/dist/template/.opencode/memory/observations/2026-01-30-pattern-swarm-tools-architecture.md +0 -28
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +0 -63
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-created-dedicated-worker-agent-for-swarm.md +0 -20
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-rollback-to-v1-1-47-for-copilot-claude-r.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-simplified-swarm-to-task-tool-pattern.md +0 -44
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-swarm-architecture-task-tool-over-tmux.md +0 -33
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-worker-skills-defined-for-swarm-delegati.md +0 -30
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-gpt-reasoning-config-for-github-copilot.md +0 -51
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +0 -61
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +0 -66
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-custom-tools-api.md +0 -48
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-v1-1-48-skills-as-slash-command.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-swarm-system-simplified-removed-mailbox-.md +0 -30
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-v1-1-48-native-copilot-reasoning-via-pr-.md +0 -45
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-cannot-add-custom-config-to-opencode-jso.md +0 -18
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +0 -48
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-opencode-v1-1-48-claude-thinking-block-s.md +0 -51
- package/dist/template/.opencode/memory/project/architecture.md +0 -60
- package/dist/template/.opencode/memory/project/commands.md +0 -72
- package/dist/template/.opencode/memory/project/conventions.md +0 -68
- package/dist/template/.opencode/memory/project/gotchas.md +0 -41
- package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
- package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
- package/dist/template/.opencode/tool/notebooklm.ts +0 -488
- package/dist/template/.opencode/tool/oracle.ts +0 -240
- /package/dist/template/.opencode/memory/{user.example.md → _templates/user.md} +0 -0
- /package/dist/template/.opencode/memory/{user.md → project/user.md} +0 -0
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: warning
|
|
3
|
-
created: 2026-01-31T13:04:00.635Z
|
|
4
|
-
confidence: high
|
|
5
|
-
valid_until: null
|
|
6
|
-
superseded_by: null
|
|
7
|
-
concepts: ["opencode.json", "config", "schema", "tmux", "custom-config", "validation"]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# ⚠️ Cannot add custom config to opencode.json
|
|
11
|
-
|
|
12
|
-
🟢 **Confidence:** high
|
|
13
|
-
|
|
14
|
-
opencode.json has a strict JSON schema (https://opencode.ai/config.json). You CANNOT add arbitrary config sections like "tmux". The schema only allows specific keys like: agent, autoupdate, compaction, experimental, formatter, instructions, keybinds, mcp, model, permission, plugin, provider, share, small_model, tools, tui, watcher.
|
|
15
|
-
|
|
16
|
-
Custom tool configuration must be handled within the tool itself (via environment variables, separate config file, or hardcoded defaults) - NOT in opencode.json.
|
|
17
|
-
|
|
18
|
-
The user already commented out the invalid tmux section at lines 785-790.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: warning
|
|
3
|
-
created: 2026-01-31T05:19:40.401Z
|
|
4
|
-
confidence: high
|
|
5
|
-
valid_until: null
|
|
6
|
-
superseded_by: null
|
|
7
|
-
concepts: ["copilot", "claude", "routing", "v1", "404", "not-found", "anthropic", "messages-api", "limitation"]
|
|
8
|
-
files: ["api.githubcopilot.com"]
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# ⚠️ Copilot Claude /v1 Endpoint Returns 404 - Confirmed
|
|
12
|
-
|
|
13
|
-
🟢 **Confidence:** high
|
|
14
|
-
|
|
15
|
-
## Confirmed: GitHub Copilot Does NOT Support Claude /v1 Endpoint
|
|
16
|
-
|
|
17
|
-
### Test Result
|
|
18
|
-
Re-enabling Claude routing with `/v1` endpoint causes 404 "Not Found" errors.
|
|
19
|
-
|
|
20
|
-
### Root Cause
|
|
21
|
-
GitHub Copilot API (`api.githubcopilot.com`) only exposes:
|
|
22
|
-
- `/v1/chat/completions` - OpenAI-compatible endpoint
|
|
23
|
-
|
|
24
|
-
It does NOT expose:
|
|
25
|
-
- `/v1/messages` - Anthropic's native Messages API (required for extended thinking)
|
|
26
|
-
|
|
27
|
-
### Conclusion
|
|
28
|
-
**Extended thinking/reasoning is NOT available for Claude through GitHub Copilot.**
|
|
29
|
-
|
|
30
|
-
The Copilot API acts as a proxy that:
|
|
31
|
-
1. Accepts OpenAI-format requests
|
|
32
|
-
2. Translates them internally to Claude
|
|
33
|
-
3. Returns OpenAI-format responses
|
|
34
|
-
|
|
35
|
-
This translation layer strips thinking blocks and doesn't support the `thinking` parameter.
|
|
36
|
-
|
|
37
|
-
### Final Configuration
|
|
38
|
-
All Claude models must use `@ai-sdk/github-copilot` SDK, NOT `@ai-sdk/anthropic`.
|
|
39
|
-
|
|
40
|
-
```typescript
|
|
41
|
-
// This is the ONLY working configuration
|
|
42
|
-
model.api.npm = "@ai-sdk/github-copilot";
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Workaround for Reasoning
|
|
46
|
-
To get Claude reasoning, users must:
|
|
47
|
-
1. Use direct Anthropic API with separate API key
|
|
48
|
-
2. Or use a provider that exposes native Anthropic Messages API (Vertex AI, AWS Bedrock)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: warning
|
|
3
|
-
created: 2026-01-31T17:14:16.151Z
|
|
4
|
-
confidence: high
|
|
5
|
-
valid_until: null
|
|
6
|
-
superseded_by: null
|
|
7
|
-
concepts: ["opencode", "copilot", "claude", "thinking-block", "signature", "reasoning", "v1.1.48", "bug", "sdk", "backup"]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# ⚠️ OpenCode v1.1.48+ Claude Thinking Block Signature Bug
|
|
11
|
-
|
|
12
|
-
🟢 **Confidence:** high
|
|
13
|
-
|
|
14
|
-
## Problem
|
|
15
|
-
When upgrading OpenCode from v1.1.48 to dev branch, Claude models via GitHub Copilot fail with:
|
|
16
|
-
`messages.1.content.0: Invalid 'signature' in 'thinking' block`
|
|
17
|
-
|
|
18
|
-
## Root Cause
|
|
19
|
-
- OpenCode v1.1.48+ native `@ai-sdk/github-copilot` SDK validates thinking block signatures
|
|
20
|
-
- Switching models mid-session causes signature validation failures
|
|
21
|
-
- Thinking blocks from one model (GLM 4.7, MiniMax, etc.) have incompatible signatures with Claude
|
|
22
|
-
- GitHub issue #6418, fix in draft PR #8958
|
|
23
|
-
|
|
24
|
-
## Working Configuration (Pre-upgrade)
|
|
25
|
-
Location: `backup/sdk/` contains custom copilot SDK that bypassed signature validation
|
|
26
|
-
- `backup/sdk/copilot/` - Custom @ai-sdk/github-copilot implementation
|
|
27
|
-
- `~/.config/opencode/plugin/copilot-auth.ts` - Auth plugin with disabled custom reasoning (664 lines)
|
|
28
|
-
- `~/.config/opencode/opencode.json` - Model configurations
|
|
29
|
-
|
|
30
|
-
## Key Files in Backup SDK
|
|
31
|
-
```
|
|
32
|
-
backup/sdk/copilot/
|
|
33
|
-
├── chat/
|
|
34
|
-
│ ├── convert-to-openai-compatible-chat-messages.ts
|
|
35
|
-
│ ├── get-response-metadata.ts
|
|
36
|
-
│ ├── map-openai-compatible-finish-reason.ts
|
|
37
|
-
│ ├── openai-compatible-api-types.ts
|
|
38
|
-
│ ├── openai-compatible-chat-language-model.ts
|
|
39
|
-
│ ├── openai-compatible-chat-options.ts
|
|
40
|
-
│ ├── openai-compatible-metadata-extractor.ts
|
|
41
|
-
│ └── openai-compatible-prepare-tools.ts
|
|
42
|
-
├── copilot-provider.ts
|
|
43
|
-
├── index.ts
|
|
44
|
-
└── openai-compatible-error.ts
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Workarounds
|
|
48
|
-
1. Don't switch to Claude mid-session from models with thinking blocks
|
|
49
|
-
2. Start fresh sessions when using Claude with extended thinking
|
|
50
|
-
3. Wait for PR #8958 to be merged
|
|
51
|
-
4. Restore custom SDK from backup (breaks native reasoning handling)
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
purpose: Key modules, directory structure, architectural decisions
|
|
3
|
-
updated: { { DATE } }
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Project Architecture
|
|
7
|
-
|
|
8
|
-
## Directory Structure
|
|
9
|
-
|
|
10
|
-
```
|
|
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
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Key Modules
|
|
22
|
-
|
|
23
|
-
### Module Name
|
|
24
|
-
|
|
25
|
-
**Purpose**: Brief description
|
|
26
|
-
|
|
27
|
-
**Files**:
|
|
28
|
-
|
|
29
|
-
- `src/module/file.ts`
|
|
30
|
-
|
|
31
|
-
**Dependencies**:
|
|
32
|
-
|
|
33
|
-
- External libs
|
|
34
|
-
- Internal modules
|
|
35
|
-
|
|
36
|
-
## Data Flow
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
User Action
|
|
40
|
-
→ Module A
|
|
41
|
-
→ Module B
|
|
42
|
-
→ External Service
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## External Dependencies
|
|
46
|
-
|
|
47
|
-
- **Library**: Version, purpose
|
|
48
|
-
- **Service**: API endpoint, auth method
|
|
49
|
-
|
|
50
|
-
## Architectural Decisions
|
|
51
|
-
|
|
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,72 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: notebooklm
|
|
3
|
-
description: >
|
|
4
|
-
Query Google NotebookLM notebooks directly from OpenCode for source-grounded, citation-backed answers.
|
|
5
|
-
Use when user mentions NotebookLM, shares notebook URLs, or wants to query their uploaded documents.
|
|
6
|
-
Provides document-only responses with drastically reduced hallucinations.
|
|
7
|
-
version: "1.0.0"
|
|
8
|
-
license: MIT
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# NotebookLM Skill
|
|
12
|
-
|
|
13
|
-
Interact with Google NotebookLM to query documentation with Gemini's source-grounded answers. Each question opens a fresh browser session, retrieves the answer exclusively from uploaded documents, and closes.
|
|
14
|
-
|
|
15
|
-
## When to Use This Skill
|
|
16
|
-
|
|
17
|
-
Trigger when user:
|
|
18
|
-
|
|
19
|
-
- Mentions NotebookLM explicitly
|
|
20
|
-
- Shares NotebookLM URL (`https://notebooklm.google.com/notebook/...`)
|
|
21
|
-
- Asks to query their notebooks/documentation
|
|
22
|
-
- Wants to add documentation to NotebookLM library
|
|
23
|
-
- Uses phrases like "ask my NotebookLM", "check my docs", "query my notebook"
|
|
24
|
-
|
|
25
|
-
## Prerequisites
|
|
26
|
-
|
|
27
|
-
Before using this skill, ensure:
|
|
28
|
-
|
|
29
|
-
1. **Python 3.10+** is installed
|
|
30
|
-
2. **Google Chrome** browser is installed
|
|
31
|
-
3. **NotebookLM account** with uploaded documents
|
|
32
|
-
4. **Google authentication** (one-time setup)
|
|
33
|
-
|
|
34
|
-
## Quick Start
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
// Check authentication status
|
|
38
|
-
await notebooklm({ operation: "auth", subOperation: "status" });
|
|
39
|
-
|
|
40
|
-
// Query a notebook
|
|
41
|
-
await notebooklm({
|
|
42
|
-
operation: "query",
|
|
43
|
-
question: "What are the key findings in this document?",
|
|
44
|
-
notebookUrl: "https://notebooklm.google.com/notebook/...",
|
|
45
|
-
});
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Core Workflow
|
|
49
|
-
|
|
50
|
-
### Step 1: Check Authentication
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
const authStatus = await notebooklm({
|
|
54
|
-
operation: "auth",
|
|
55
|
-
subOperation: "status",
|
|
56
|
-
});
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
If not authenticated, proceed to setup.
|
|
60
|
-
|
|
61
|
-
### Step 2: Authenticate (One-Time Setup)
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
await notebooklm({
|
|
65
|
-
operation: "auth",
|
|
66
|
-
subOperation: "setup",
|
|
67
|
-
showBrowser: true, // Browser must be visible for manual login
|
|
68
|
-
});
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Important:**
|
|
72
|
-
|
|
73
|
-
- Browser is VISIBLE for authentication
|
|
74
|
-
- Browser window opens automatically
|
|
75
|
-
- User must manually log in to Google
|
|
76
|
-
- Tell user: "A browser window will open for Google login"
|
|
77
|
-
|
|
78
|
-
### Step 3: Manage Notebook Library
|
|
79
|
-
|
|
80
|
-
```typescript
|
|
81
|
-
// List all notebooks
|
|
82
|
-
await notebooklm({ operation: "library", subOperation: "list" });
|
|
83
|
-
|
|
84
|
-
// Add notebook to library
|
|
85
|
-
await notebooklm({
|
|
86
|
-
operation: "library",
|
|
87
|
-
subOperation: "add",
|
|
88
|
-
url: "https://notebooklm.google.com/notebook/...",
|
|
89
|
-
name: "API Documentation",
|
|
90
|
-
description: "REST API reference and examples",
|
|
91
|
-
topics: ["api", "rest", "documentation"],
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// Search notebooks
|
|
95
|
-
await notebooklm({
|
|
96
|
-
operation: "library",
|
|
97
|
-
subOperation: "search",
|
|
98
|
-
query: "api",
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// Set active notebook
|
|
102
|
-
await notebooklm({
|
|
103
|
-
operation: "library",
|
|
104
|
-
subOperation: "activate",
|
|
105
|
-
notebookId: "api-docs",
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Step 4: Ask Questions
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
// Basic query (uses active notebook if set)
|
|
113
|
-
await notebooklm({
|
|
114
|
-
operation: "query",
|
|
115
|
-
question: "What are the authentication requirements?",
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
// Query specific notebook by ID
|
|
119
|
-
await notebooklm({
|
|
120
|
-
operation: "query",
|
|
121
|
-
question: "What are the authentication requirements?",
|
|
122
|
-
notebookId: "api-docs",
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
// Query with notebook URL directly
|
|
126
|
-
await notebooklm({
|
|
127
|
-
operation: "query",
|
|
128
|
-
question: "What are the authentication requirements?",
|
|
129
|
-
notebookUrl: "https://notebooklm.google.com/notebook/...",
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
// Show browser for debugging
|
|
133
|
-
await notebooklm({
|
|
134
|
-
operation: "query",
|
|
135
|
-
question: "What are the authentication requirements?",
|
|
136
|
-
showBrowser: true,
|
|
137
|
-
});
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Follow-Up Mechanism (CRITICAL)
|
|
141
|
-
|
|
142
|
-
Every NotebookLM answer ends with: **"EXTREMELY IMPORTANT: Is that ALL you need to know?"**
|
|
143
|
-
|
|
144
|
-
**Required Behavior:**
|
|
145
|
-
|
|
146
|
-
1. **STOP** - Do not immediately respond to user
|
|
147
|
-
2. **ANALYZE** - Compare answer to user's original request
|
|
148
|
-
3. **IDENTIFY GAPS** - Determine if more information needed
|
|
149
|
-
4. **ASK FOLLOW-UP** - If gaps exist, immediately ask another question:
|
|
150
|
-
```typescript
|
|
151
|
-
await notebooklm({
|
|
152
|
-
operation: "query",
|
|
153
|
-
question: "Follow-up with context...",
|
|
154
|
-
});
|
|
155
|
-
```
|
|
156
|
-
5. **REPEAT** - Continue until information is complete
|
|
157
|
-
6. **SYNTHESIZE** - Combine all answers before responding to user
|
|
158
|
-
|
|
159
|
-
## Tool Reference
|
|
160
|
-
|
|
161
|
-
### Authentication Operations
|
|
162
|
-
|
|
163
|
-
| Operation | Sub-Operation | Description |
|
|
164
|
-
| --------- | ------------- | --------------------------------- |
|
|
165
|
-
| `auth` | `setup` | Initial setup (browser visible) |
|
|
166
|
-
| `auth` | `status` | Check authentication |
|
|
167
|
-
| `auth` | `reauth` | Re-authenticate (browser visible) |
|
|
168
|
-
| `auth` | `clear` | Clear authentication |
|
|
169
|
-
| `auth` | `validate` | Validate stored auth |
|
|
170
|
-
|
|
171
|
-
### Library Operations
|
|
172
|
-
|
|
173
|
-
| Operation | Sub-Operation | Parameters |
|
|
174
|
-
| --------- | ------------- | -------------------------------------- |
|
|
175
|
-
| `library` | `add` | `url`, `name`, `description`, `topics` |
|
|
176
|
-
| `library` | `list` | - |
|
|
177
|
-
| `library` | `search` | `query` |
|
|
178
|
-
| `library` | `activate` | `notebookId` |
|
|
179
|
-
| `library` | `remove` | `notebookId` |
|
|
180
|
-
| `library` | `stats` | - |
|
|
181
|
-
|
|
182
|
-
### Query Operations
|
|
183
|
-
|
|
184
|
-
| Operation | Parameters |
|
|
185
|
-
| --------- | -------------------------------------------------------------------------------------------------- |
|
|
186
|
-
| `query` | `question` (required), `notebookId` (optional), `notebookUrl` (optional), `showBrowser` (optional) |
|
|
187
|
-
|
|
188
|
-
## Smart Discovery Pattern
|
|
189
|
-
|
|
190
|
-
When user wants to add a notebook without providing details:
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
// Step 1: Query the notebook to discover its content
|
|
194
|
-
const discovery = await notebooklm({
|
|
195
|
-
operation: "query",
|
|
196
|
-
question:
|
|
197
|
-
"What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely",
|
|
198
|
-
notebookUrl: "https://notebooklm.google.com/notebook/...",
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
// Step 2: Use discovered information to add it
|
|
202
|
-
await notebooklm({
|
|
203
|
-
operation: "library",
|
|
204
|
-
subOperation: "add",
|
|
205
|
-
url: "https://notebooklm.google.com/notebook/...",
|
|
206
|
-
name: "[Based on content]",
|
|
207
|
-
description: "[Based on content]",
|
|
208
|
-
topics: ["[Based on content]"],
|
|
209
|
-
});
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Decision Flow
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
User mentions NotebookLM
|
|
216
|
-
↓
|
|
217
|
-
Check auth → notebooklm({ operation: "auth", subOperation: "status" })
|
|
218
|
-
↓
|
|
219
|
-
If not authenticated → notebooklm({ operation: "auth", subOperation: "setup", showBrowser: true })
|
|
220
|
-
↓
|
|
221
|
-
Check/Add notebook → notebooklm({ operation: "library", subOperation: "list/add" })
|
|
222
|
-
↓
|
|
223
|
-
Activate notebook → notebooklm({ operation: "library", subOperation: "activate", notebookId: "..." })
|
|
224
|
-
↓
|
|
225
|
-
Ask question → notebooklm({ operation: "query", question: "..." })
|
|
226
|
-
↓
|
|
227
|
-
See "Is that ALL you need?" → Ask follow-ups until complete
|
|
228
|
-
↓
|
|
229
|
-
Synthesize and respond to user
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## Troubleshooting
|
|
233
|
-
|
|
234
|
-
| Problem | Solution |
|
|
235
|
-
| -------------------- | --------------------------------------- |
|
|
236
|
-
| Not authenticated | Run auth setup with `showBrowser: true` |
|
|
237
|
-
| Authentication fails | Browser must be visible for setup |
|
|
238
|
-
| Rate limit (50/day) | Wait or switch Google account |
|
|
239
|
-
| Notebook not found | Check with `library` → `list` operation |
|
|
240
|
-
| ModuleNotFoundError | Tool auto-installs dependencies |
|
|
241
|
-
|
|
242
|
-
## Best Practices
|
|
243
|
-
|
|
244
|
-
1. **Always check auth first** - Before any operations
|
|
245
|
-
2. **Follow-up questions** - Don't stop at first answer
|
|
246
|
-
3. **Browser visible for auth** - Required for manual login
|
|
247
|
-
4. **Include context** - Each question is independent
|
|
248
|
-
5. **Synthesize answers** - Combine multiple responses
|
|
249
|
-
|
|
250
|
-
## Limitations
|
|
251
|
-
|
|
252
|
-
- No session persistence (each question = new browser)
|
|
253
|
-
- Rate limits on free Google accounts (50 queries/day)
|
|
254
|
-
- Manual upload required (user must add docs to NotebookLM)
|
|
255
|
-
- Browser overhead (few seconds per question)
|
|
256
|
-
- Requires Python and Chrome installed
|
|
257
|
-
|
|
258
|
-
## Data Storage
|
|
259
|
-
|
|
260
|
-
All data stored in `~/.opencode/skills/notebooklm/data/`:
|
|
261
|
-
|
|
262
|
-
- `library.json` - Notebook metadata
|
|
263
|
-
- `auth_info.json` - Authentication status
|
|
264
|
-
- `browser_state/` - Browser cookies and session
|
|
265
|
-
|
|
266
|
-
**Security:** Protected by `.gitignore`, never commit to git.
|
|
267
|
-
|
|
268
|
-
## Resources
|
|
269
|
-
|
|
270
|
-
- **Original Skill**: https://github.com/PleasePrompto/notebooklm-skill
|
|
271
|
-
- **NotebookLM**: https://notebooklm.google.com
|
|
272
|
-
- **Setup Guide**: See `references/setup.md`
|