Skip to content

Commit 2d61193

Browse files
committed
fix(bedrock): correct embedding default, provider-agnostic messages, and DRY docs
- Fix Bedrock embeddings defaulting to OpenAI model name (text-embedding-3-small) by adding DefaultBedrockEmbeddingModel (amazon.titan-embed-text-v2:0) and using it in both client.go embedder and llm_loader.go config resolution - Make bootstrap error messages provider-agnostic instead of referencing OPENAI_API_KEY - Add Bedrock/Anthropic/Gemini to CLAUDE.md LLM Integration quick-reference - Add Bedrock and Anthropic configuration sections to example.env - Add tests for Bedrock region resolution (env var mapping, AWS_REGION fallback) - Add test for Bedrock embedding model default in LoadLLMConfig - Consolidate DRY doc partials and sync scripts - Expand config commands and Bedrock region support - Update CI, README, GEMINI.md, and tutorial docs
1 parent 3293462 commit 2d61193

28 files changed

Lines changed: 1282 additions & 206 deletions

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ on:
99
branches: [main]
1010

1111
jobs:
12+
docs-consistency:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check docs consistency
18+
run: ./scripts/check-doc-consistency.sh
19+
1220
lint:
1321
runs-on: ubuntu-latest
1422
steps:

CLAUDE.md

Lines changed: 70 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ The production MCP server (`taskwing-mcp`) uses the installed Homebrew binary. C
4141
# 2. Air auto-rebuilds ./bin/taskwing
4242

4343
# 3. Test via local dev MCP (in Claude Code)
44-
# Use: mcp__taskwing-local-dev-mcp__explain_symbol, detect_drift, etc.
44+
# Use: mcp__taskwing-local-dev-mcp__task, mcp__taskwing-local-dev-mcp__plan, mcp__taskwing-local-dev-mcp__code
4545

4646
# 4. Verify CLI works
47-
go run . explain NewRecallApp
48-
go run . drift
47+
go run . --help
48+
go run . doctor
4949

5050
# 5. Run tests
5151
make test-quick
@@ -82,15 +82,17 @@ TaskWing gives AI coding assistants permanent memory. It extracts architectural
8282
cmd/ # Cobra CLI commands
8383
├── root.go # Base command, global flags (--json, --verbose, --preview, --quiet)
8484
├── bootstrap.go # Auto-generate knowledge from repo
85-
├── add.go # Add knowledge (AI classifies type)
86-
├── context.go # Semantic search with --answer for AI responses
87-
├── list.go # View knowledge by type
88-
├── memory.go # Maintenance: check/repair/rebuild-index
85+
├── goal.go # Goal-first flow: clarify -> generate -> activate
86+
├── knowledge.go # View stored project knowledge nodes
87+
├── plan.go # Plan lifecycle management
88+
├── task.go # Task lifecycle management
89+
├── slash.go # Slash command content for assistants
8990
├── mcp_server.go # MCP server for AI tool integration
90-
├── plan.go # Plan management (new/list/start)
91-
├── task.go # Atomic task management
92-
├── hook.go # Claude Code hooks for autonomous execution
93-
└── eval.go # Evaluation benchmarks
91+
├── doctor.go # Diagnostics and integration repair
92+
├── config.go # Provider and runtime configuration
93+
├── start.go # Local API/dashboard runtime
94+
├── hook.go # Hook handlers used by assistant integrations
95+
└── version.go # Version output
9496
9597
internal/
9698
├── memory/ # Data layer
@@ -101,7 +103,7 @@ internal/
101103
│ ├── scanner.go # Heuristic scanner
102104
│ └── llm_analyzer.go # LLM-powered analysis with streaming
103105
├── llm/
104-
│ └── client.go # Multi-provider LLM factory (OpenAI, Ollama via Eino)
106+
│ └── client.go # Multi-provider LLM factory (OpenAI, Anthropic, Gemini, Bedrock, Ollama via Eino)
105107
└── knowledge/
106108
├── classify.go # AI classification of knowledge types
107109
└── embed.go # Embedding generation
@@ -131,13 +133,16 @@ Graph traversal uses recursive CTEs for GetDependencies/GetDependents.
131133

132134
Uses CloudWeGo Eino for multi-provider support:
133135
- OpenAI: Set `OPENAI_API_KEY` or `TASKWING_LLM_APIKEY`
136+
- Anthropic: Set `ANTHROPIC_API_KEY` and `TASKWING_LLM_PROVIDER=anthropic`
137+
- Gemini: Set `GOOGLE_API_KEY` and `TASKWING_LLM_PROVIDER=gemini`
138+
- Bedrock: Set `BEDROCK_API_KEY`, `TASKWING_LLM_PROVIDER=bedrock`, and `TASKWING_LLM_BEDROCK_REGION=<region>`
134139
- Ollama: Set `TASKWING_LLM_PROVIDER=ollama` and `TASKWING_LLM_MODEL=<model>`
135140

136141
**Bootstrap requires an LLM API key by default** to analyze architecture. Use `--skip-analyze` for CI/testing without LLM (hidden flag, deterministic mode only).
137142

138143
### MCP Server
139144

140-
`taskwing mcp` starts a JSON-RPC stdio server exposing `recall` tool for AI assistants. Target token budget: 500-1000 tokens per context response.
145+
`taskwing mcp` starts a JSON-RPC stdio server exposing `recall`, `task`, `plan`, `code`, `debug`, and `remember` tools.
141146

142147
### Task Context Binding
143148

@@ -160,10 +165,10 @@ See `docs/architecture/ADR_CONTEXT_BINDING.md` for full design rationale.
160165
TaskWing integrates with Claude Code's hook system for autonomous plan execution:
161166

162167
```bash
163-
tw hook session-init # Initialize session tracking (SessionStart hook)
164-
tw hook continue-check # Check if should continue to next task (Stop hook)
165-
tw hook session-end # Cleanup session (SessionEnd hook)
166-
tw hook status # View current session state
168+
taskwing hook session-init # Initialize session tracking (SessionStart hook)
169+
taskwing hook continue-check # Check if should continue to next task (Stop hook)
170+
taskwing hook session-end # Cleanup session (SessionEnd hook)
171+
taskwing hook status # View current session state
167172
```
168173

169174
**Circuit breakers** prevent runaway execution:
@@ -290,9 +295,35 @@ Interactive script that prompts for version, opens editor for notes, creates tag
290295

291296
## TaskWing Integration
292297

293-
TaskWing provides project memory for AI assistants via MCP tools and slash commands.
298+
TaskWing helps me turn a goal into executed tasks with persistent context across AI sessions.
299+
300+
### Supported Models
301+
302+
<!-- TASKWING_PROVIDERS_START -->
303+
[![OpenAI](https://img.shields.io/badge/OpenAI-412991?logo=openai&logoColor=white)](https://platform.openai.com/)
304+
[![Anthropic](https://img.shields.io/badge/Anthropic-191919?logo=anthropic&logoColor=white)](https://www.anthropic.com/)
305+
[![Google Gemini](https://img.shields.io/badge/Google_Gemini-4285F4?logo=google&logoColor=white)](https://ai.google.dev/)
306+
[![AWS Bedrock](https://img.shields.io/badge/AWS_Bedrock-OpenAI--Compatible_Beta-FF9900?logo=amazonaws&logoColor=white)](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html)
307+
[![Ollama](https://img.shields.io/badge/Ollama-Local-000000?logo=ollama&logoColor=white)](https://ollama.com/)
308+
<!-- TASKWING_PROVIDERS_END -->
309+
310+
### Works With
311+
312+
<!-- TASKWING_TOOLS_START -->
313+
[![Claude Code](https://img.shields.io/badge/Claude_Code-191919?logo=anthropic&logoColor=white)](https://www.anthropic.com/claude-code)
314+
[![OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-412991?logo=openai&logoColor=white)](https://developers.openai.com/codex)
315+
[![Cursor](https://img.shields.io/badge/Cursor-111111?logo=cursor&logoColor=white)](https://cursor.com/)
316+
[![GitHub Copilot](https://img.shields.io/badge/GitHub_Copilot-181717?logo=githubcopilot&logoColor=white)](https://github.com/features/copilot)
317+
[![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-4285F4?logo=google&logoColor=white)](https://github.com/google-gemini/gemini-cli)
318+
[![OpenCode](https://img.shields.io/badge/OpenCode-000000?logo=opencode&logoColor=white)](https://opencode.ai/)
319+
<!-- TASKWING_TOOLS_END -->
320+
321+
<!-- TASKWING_LEGAL_START -->
322+
Brand names and logos are trademarks of their respective owners; usage here indicates compatibility, not endorsement.
323+
<!-- TASKWING_LEGAL_END -->
294324

295325
### Slash Commands
326+
296327
- `/tw-brief` - Get compact project knowledge brief (decisions, patterns, constraints)
297328
- `/tw-next` - Start next task with architecture context
298329
- `/tw-done` - Complete current task with summary
@@ -302,24 +333,32 @@ TaskWing provides project memory for AI assistants via MCP tools and slash comma
302333
- `/tw-explain` - Get deep-dive explanation of a code symbol
303334
- `/tw-simplify` - Simplify code while preserving behavior
304335

305-
### MCP Tools
336+
### Core Commands
337+
338+
<!-- TASKWING_COMMANDS_START -->
339+
- `taskwing bootstrap`
340+
- `taskwing goal "<goal>"`
341+
- `taskwing task`
342+
- `taskwing plan status`
343+
- `taskwing slash`
344+
- `taskwing mcp`
345+
- `taskwing doctor`
346+
- `taskwing config`
347+
- `taskwing start`
348+
<!-- TASKWING_COMMANDS_END -->
349+
350+
### MCP Tools (Canonical Contract)
351+
352+
<!-- TASKWING_MCP_TOOLS_START -->
306353
| Tool | Description |
307354
|------|-------------|
308355
| `recall` | Retrieve project knowledge (decisions, patterns, constraints) |
309-
| `task` | Unified task lifecycle (next, current, start, complete) |
310-
| `plan` | Plan management (clarify, generate, audit) |
311-
| `code` | Code intelligence (find, search, explain, callers, impact, simplify) |
356+
| `task` | Unified task lifecycle (`next`, `current`, `start`, `complete`) |
357+
| `plan` | Plan management (`clarify`, `decompose`, `expand`, `generate`, `finalize`, `audit`) |
358+
| `code` | Code intelligence (`find`, `search`, `explain`, `callers`, `impact`, `simplify`) |
312359
| `debug` | Diagnose issues systematically with AI-powered analysis |
313360
| `remember` | Store knowledge in project memory |
314-
315-
### CLI Commands
316-
```bash
317-
tw bootstrap # Initialize project memory (first-time setup)
318-
tw context "query" # Search knowledge semantically
319-
tw add "content" # Add knowledge to memory
320-
tw plan new "goal" # Create development plan
321-
tw task list # List tasks from active plan
322-
```
361+
<!-- TASKWING_MCP_TOOLS_END -->
323362

324363
### Autonomous Task Execution (Hooks)
325364

GEMINI.md

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* **Language:** Go 1.24+
1515
* **CLI Framework:** Cobra
1616
* **Database:** SQLite (modernc.org/sqlite) - *Single source of truth*
17-
* **LLM Orchestration:** CloudWeGo Eino (OpenAI, Ollama support)
17+
* **LLM Orchestration:** CloudWeGo Eino (OpenAI, Anthropic, Gemini, Bedrock, Ollama support)
1818
* **Frontend (Dashboard):**
1919
* React 19
2020
* Vite 7
@@ -96,7 +96,7 @@ The system is composed of a CLI tool with an embedded MCP server and a web dashb
9696
* Ensure MCP tests pass if modifying server logic.
9797
* **New:** Unit tests for `internal/knowledge` and `internal/memory` are required.
9898
4. **Style:** Follow standard Go idioms. Use `make lint` to enforce.
99-
5. **LLM Integration:** Use the `internal/llm` client factory to support multiple providers (OpenAI, Ollama) agnostic of the specific API.
99+
5. **LLM Integration:** Use the `internal/llm` client factory to support multiple providers (OpenAI, Anthropic, Gemini, Bedrock, Ollama) agnostic of the specific API.
100100

101101
## MCP Integration
102102

@@ -183,7 +183,32 @@ Interactive script that prompts for version, opens editor for notes, creates tag
183183

184184
## TaskWing Integration
185185

186-
TaskWing provides project memory for AI assistants via MCP tools and slash commands.
186+
TaskWing helps me turn a goal into executed tasks with persistent context across AI sessions.
187+
188+
### Supported Models
189+
190+
<!-- TASKWING_PROVIDERS_START -->
191+
[![OpenAI](https://img.shields.io/badge/OpenAI-412991?logo=openai&logoColor=white)](https://platform.openai.com/)
192+
[![Anthropic](https://img.shields.io/badge/Anthropic-191919?logo=anthropic&logoColor=white)](https://www.anthropic.com/)
193+
[![Google Gemini](https://img.shields.io/badge/Google_Gemini-4285F4?logo=google&logoColor=white)](https://ai.google.dev/)
194+
[![AWS Bedrock](https://img.shields.io/badge/AWS_Bedrock-OpenAI--Compatible_Beta-FF9900?logo=amazonaws&logoColor=white)](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html)
195+
[![Ollama](https://img.shields.io/badge/Ollama-Local-000000?logo=ollama&logoColor=white)](https://ollama.com/)
196+
<!-- TASKWING_PROVIDERS_END -->
197+
198+
### Works With
199+
200+
<!-- TASKWING_TOOLS_START -->
201+
[![Claude Code](https://img.shields.io/badge/Claude_Code-191919?logo=anthropic&logoColor=white)](https://www.anthropic.com/claude-code)
202+
[![OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-412991?logo=openai&logoColor=white)](https://developers.openai.com/codex)
203+
[![Cursor](https://img.shields.io/badge/Cursor-111111?logo=cursor&logoColor=white)](https://cursor.com/)
204+
[![GitHub Copilot](https://img.shields.io/badge/GitHub_Copilot-181717?logo=githubcopilot&logoColor=white)](https://github.com/features/copilot)
205+
[![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-4285F4?logo=google&logoColor=white)](https://github.com/google-gemini/gemini-cli)
206+
[![OpenCode](https://img.shields.io/badge/OpenCode-000000?logo=opencode&logoColor=white)](https://opencode.ai/)
207+
<!-- TASKWING_TOOLS_END -->
208+
209+
<!-- TASKWING_LEGAL_START -->
210+
Brand names and logos are trademarks of their respective owners; usage here indicates compatibility, not endorsement.
211+
<!-- TASKWING_LEGAL_END -->
187212

188213
### Slash Commands
189214
- `/tw-brief` - Get compact project knowledge brief (decisions, patterns, constraints)
@@ -195,24 +220,32 @@ TaskWing provides project memory for AI assistants via MCP tools and slash comma
195220
- `/tw-explain` - Get deep-dive explanation of a code symbol
196221
- `/tw-simplify` - Simplify code while preserving behavior
197222

198-
### MCP Tools
223+
### Core Commands
224+
225+
<!-- TASKWING_COMMANDS_START -->
226+
- `taskwing bootstrap`
227+
- `taskwing goal "<goal>"`
228+
- `taskwing task`
229+
- `taskwing plan status`
230+
- `taskwing slash`
231+
- `taskwing mcp`
232+
- `taskwing doctor`
233+
- `taskwing config`
234+
- `taskwing start`
235+
<!-- TASKWING_COMMANDS_END -->
236+
237+
### MCP Tools (Canonical Contract)
238+
239+
<!-- TASKWING_MCP_TOOLS_START -->
199240
| Tool | Description |
200241
|------|-------------|
201242
| `recall` | Retrieve project knowledge (decisions, patterns, constraints) |
202-
| `task` | Unified task lifecycle (next, current, start, complete) |
203-
| `plan` | Plan management (clarify, generate, audit) |
204-
| `code` | Code intelligence (find, search, explain, callers, impact, simplify) |
243+
| `task` | Unified task lifecycle (`next`, `current`, `start`, `complete`) |
244+
| `plan` | Plan management (`clarify`, `decompose`, `expand`, `generate`, `finalize`, `audit`) |
245+
| `code` | Code intelligence (`find`, `search`, `explain`, `callers`, `impact`, `simplify`) |
205246
| `debug` | Diagnose issues systematically with AI-powered analysis |
206247
| `remember` | Store knowledge in project memory |
207-
208-
### CLI Commands
209-
```bash
210-
tw bootstrap # Initialize project memory (first-time setup)
211-
tw context "query" # Search knowledge semantically
212-
tw add "content" # Add knowledge to memory
213-
tw plan new "goal" # Create development plan
214-
tw task list # List tasks from active plan
215-
```
248+
<!-- TASKWING_MCP_TOOLS_END -->
216249

217250
### Autonomous Task Execution (Hooks)
218251

README.md

Lines changed: 70 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@
55
[![Go Report Card](https://goreportcard.com/badge/github.com/josephgoksu/TaskWing)](https://goreportcard.com/report/github.com/josephgoksu/TaskWing)
66
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
77

8+
## Supported Models
9+
10+
<!-- TASKWING_PROVIDERS_START -->
11+
[![OpenAI](https://img.shields.io/badge/OpenAI-412991?logo=openai&logoColor=white)](https://platform.openai.com/)
12+
[![Anthropic](https://img.shields.io/badge/Anthropic-191919?logo=anthropic&logoColor=white)](https://www.anthropic.com/)
13+
[![Google Gemini](https://img.shields.io/badge/Google_Gemini-4285F4?logo=google&logoColor=white)](https://ai.google.dev/)
14+
[![AWS Bedrock](https://img.shields.io/badge/AWS_Bedrock-OpenAI--Compatible_Beta-FF9900?logo=amazonaws&logoColor=white)](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html)
15+
[![Ollama](https://img.shields.io/badge/Ollama-Local-000000?logo=ollama&logoColor=white)](https://ollama.com/)
16+
<!-- TASKWING_PROVIDERS_END -->
17+
18+
## Works With
19+
20+
<!-- TASKWING_TOOLS_START -->
21+
[![Claude Code](https://img.shields.io/badge/Claude_Code-191919?logo=anthropic&logoColor=white)](https://www.anthropic.com/claude-code)
22+
[![OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-412991?logo=openai&logoColor=white)](https://developers.openai.com/codex)
23+
[![Cursor](https://img.shields.io/badge/Cursor-111111?logo=cursor&logoColor=white)](https://cursor.com/)
24+
[![GitHub Copilot](https://img.shields.io/badge/GitHub_Copilot-181717?logo=githubcopilot&logoColor=white)](https://github.com/features/copilot)
25+
[![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-4285F4?logo=google&logoColor=white)](https://github.com/google-gemini/gemini-cli)
26+
[![OpenCode](https://img.shields.io/badge/OpenCode-000000?logo=opencode&logoColor=white)](https://opencode.ai/)
27+
<!-- TASKWING_TOOLS_END -->
28+
29+
<!-- TASKWING_LEGAL_START -->
30+
Brand names and logos are trademarks of their respective owners; usage here indicates compatibility, not endorsement.
31+
<!-- TASKWING_LEGAL_END -->
32+
833
## Focused Workflow
934

1035
```bash
@@ -21,26 +46,6 @@ taskwing goal "Add Stripe billing"
2146
/tw-done
2247
```
2348

24-
## Bootstrap and Repair Model
25-
26-
- `taskwing bootstrap` auto-repairs only TaskWing-managed local AI assets.
27-
- If drift is unmanaged (marker missing/user-owned), bootstrap warns and does not mutate files.
28-
- Global MCP repair is explicit via `taskwing doctor --fix`.
29-
- Unmanaged adoption is explicit via `taskwing doctor --fix --adopt-unmanaged`.
30-
31-
Recovery examples:
32-
33-
```bash
34-
# Inspect current health
35-
taskwing doctor
36-
37-
# Apply safe repairs for managed drift and MCP config
38-
taskwing doctor --fix --yes
39-
40-
# Explicitly adopt unmanaged TaskWing-like files, then repair
41-
taskwing doctor --fix --adopt-unmanaged --yes --ai claude
42-
```
43-
4449
## What TaskWing Does
4550

4651
- Stores architecture decisions, constraints, and patterns in local project memory.
@@ -49,15 +54,57 @@ taskwing doctor --fix --adopt-unmanaged --yes --ai claude
4954

5055
## Core Commands
5156

57+
<!-- TASKWING_COMMANDS_START -->
5258
- `taskwing bootstrap`
5359
- `taskwing goal "<goal>"`
60+
- `taskwing task`
5461
- `taskwing plan status`
55-
- `taskwing task list`
56-
- `taskwing slash next`
62+
- `taskwing slash`
5763
- `taskwing mcp`
58-
- `taskwing start`
5964
- `taskwing doctor`
6065
- `taskwing config`
66+
- `taskwing start`
67+
<!-- TASKWING_COMMANDS_END -->
68+
69+
## MCP Tools
70+
71+
<!-- TASKWING_MCP_TOOLS_START -->
72+
| Tool | Description |
73+
|------|-------------|
74+
| `recall` | Retrieve project knowledge (decisions, patterns, constraints) |
75+
| `task` | Unified task lifecycle (`next`, `current`, `start`, `complete`) |
76+
| `plan` | Plan management (`clarify`, `decompose`, `expand`, `generate`, `finalize`, `audit`) |
77+
| `code` | Code intelligence (`find`, `search`, `explain`, `callers`, `impact`, `simplify`) |
78+
| `debug` | Diagnose issues systematically with AI-powered analysis |
79+
| `remember` | Store knowledge in project memory |
80+
<!-- TASKWING_MCP_TOOLS_END -->
81+
82+
## AWS Bedrock (OpenAI-Compatible) Setup
83+
84+
TaskWing supports Bedrock as a first-class provider for chat/planning/query flows.
85+
86+
```yaml
87+
llm:
88+
provider: bedrock
89+
model: anthropic.claude-sonnet-4-5-20250929-v1:0
90+
bedrock:
91+
region: us-east-1
92+
apiKeys:
93+
bedrock: ${BEDROCK_API_KEY}
94+
```
95+
96+
You can also configure it interactively:
97+
98+
```bash
99+
taskwing config
100+
```
101+
102+
Recommended Bedrock model IDs:
103+
- `anthropic.claude-opus-4-6-v1` (highest quality reasoning)
104+
- `anthropic.claude-sonnet-4-5-20250929-v1:0` (best default balance)
105+
- `amazon.nova-premier-v1:0` (AWS flagship Nova)
106+
- `amazon.nova-pro-v1:0` (strong balance)
107+
- `meta.llama4-maverick-17b-instruct-v1:0` (open-weight strong general model)
61108

62109
## MCP Setup (Claude/Codex)
63110

0 commit comments

Comments
 (0)