Skip to content

Commit 6f109da

Browse files
authored
refactor: rename recall→ask, fix multi-repo bootstrap, add security s… (#15)
* refactor: rename recall→ask, fix multi-repo bootstrap, add security scanning Rename: - DB column suggested_recall_queries → suggested_ask_queries with migration - Go variable recallLimit → candidateLimit (IR terminology preserved) - Stale comments referencing /tw-brief and recall updated throughout - CLAUDE.md, AGENTS.md, GEMINI.md slash commands synced with registry - Shell scripts, architecture docs, and training data updated Bootstrap fixes: - Fix 100% evidence rejection in multi-repo mode by prefixing evidence file paths with service-relative directory before verification - Fix split-brain database: refresh project context after init creates local .taskwing/ so ingestion writes to correct DB - Handle workspace-relative git paths in verification agent Cleanup: - Remove removedLegacySlashCommands backward compatibility mechanism - Fix stale /tw-brief references in DemoSection, WORKFLOW_CONTRACT Security: - Add CodeQL workflow for Go static analysis - Add Trivy workflow with filesystem and binary vulnerability scanning * fix(ci): remove unused function and dead integration job Remove newPostHogClientWithEnqueuer (unused after test file deletion) and integration-opencode CI job (tests/integration/ no longer exists). * fix(mcp): remember tool returns empty ID due to value receiver UpsertNodeBySummary takes Node by value, so the ID generated inside the store never propagates back to the caller. Generate node ID in AddNode before passing to the store. * fix(docs): sync managed markdown blocks with partials Add missing `taskwing ask` to core_commands partial and re-sync all target files (README, CLAUDE, GEMINI, TUTORIAL, PRODUCT_VISION) to match the canonical partials.
1 parent eccd455 commit 6f109da

114 files changed

Lines changed: 735 additions & 20445 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,3 @@ jobs:
4343
- name: Test
4444
run: go test ./...
4545

46-
# OpenCode integration tests - runs on main merges and PRs
47-
integration-opencode:
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v4
51-
52-
- uses: actions/setup-go@v5
53-
with:
54-
go-version: '1.24'
55-
cache: true
56-
57-
- name: Build binary for integration tests
58-
run: make build
59-
60-
- name: Run OpenCode integration tests
61-
run: go test -v ./tests/integration/... -run "TestOpenCode"

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags-ignore:
7+
- 'v*'
8+
pull_request:
9+
branches: [main]
10+
schedule:
11+
- cron: '0 6 * * 1' # Weekly Monday 06:00 UTC
12+
13+
jobs:
14+
analyze:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
18+
contents: read
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language: [go]
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: actions/setup-go@v5
27+
with:
28+
go-version: '1.24'
29+
cache: true
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v3
33+
with:
34+
languages: ${{ matrix.language }}
35+
36+
- name: Build
37+
run: make build
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: '/language:${{ matrix.language }}'

.github/workflows/trivy.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Trivy Security Scan
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags-ignore:
7+
- 'v*'
8+
pull_request:
9+
branches: [main]
10+
schedule:
11+
- cron: '0 6 * * 1' # Weekly Monday 06:00 UTC
12+
13+
jobs:
14+
vulnerability-scan:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Run Trivy vulnerability scanner (filesystem)
23+
uses: aquasecurity/trivy-action@0.34.0
24+
with:
25+
scan-type: fs
26+
scan-ref: .
27+
severity: CRITICAL,HIGH
28+
format: sarif
29+
output: trivy-fs.sarif
30+
31+
- name: Upload Trivy filesystem results to GitHub Security
32+
uses: github/codeql-action/upload-sarif@v3
33+
if: always()
34+
with:
35+
sarif_file: trivy-fs.sarif
36+
category: trivy-filesystem
37+
38+
binary-scan:
39+
runs-on: ubuntu-latest
40+
permissions:
41+
security-events: write
42+
contents: read
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- uses: actions/setup-go@v5
47+
with:
48+
go-version: '1.24'
49+
cache: true
50+
51+
- name: Build binary
52+
run: |
53+
make build
54+
mkdir -p scan-target
55+
cp taskwing scan-target/
56+
57+
- name: Run Trivy on compiled binary
58+
uses: aquasecurity/trivy-action@0.34.0
59+
with:
60+
scan-type: rootfs
61+
scan-ref: ./scan-target
62+
severity: CRITICAL,HIGH
63+
format: sarif
64+
output: trivy-binary.sarif
65+
66+
- name: Upload Trivy binary results to GitHub Security
67+
uses: github/codeql-action/upload-sarif@v3
68+
if: always()
69+
with:
70+
sarif_file: trivy-binary.sarif
71+
category: trivy-binary

.taskwing.example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ data:
2929
# # Query uses cheap fast models for frequent context lookups
3030
# models:
3131
# bootstrap: "openai:gpt-5" # Used by: tw bootstrap, tw plan
32-
# query: "gemini:gemini-2.0-flash" # Used by: tw context, recall MCP
32+
# query: "gemini:gemini-2.0-flash" # Used by: tw context, ask MCP
3333
#
3434
# # API keys can also be set via environment variables:
3535
# # OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY

AGENTS.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,22 @@ Brand names and logos are trademarks of their respective owners; usage here indi
6767
<!-- TASKWING_LEGAL_END -->
6868

6969
### Slash Commands
70-
- /tw-brief - Use when you need a compact project brief.
71-
- /tw-next - Use when you are ready to start the next approved task.
72-
- /tw-done - Use when implementation is verified and ready to complete.
73-
- /tw-plan - Use when you need to clarify a goal and build a plan.
74-
- /tw-status - Use when you need current task progress.
75-
- /tw-debug - Use when debugging must start from root-cause evidence.
76-
- /tw-explain - Use when you need a deep symbol explanation.
77-
- /tw-simplify - Use when you want to simplify code without behavior changes.
70+
- /tw-ask - Use when you need to search project knowledge (decisions, patterns, constraints).
71+
- /tw-remember - Use when you want to persist a decision, pattern, or insight to project memory.
72+
- /tw-next - Use when you are ready to start the next approved TaskWing task with full context.
73+
- /tw-done - Use when implementation is verified and you are ready to complete the current task.
74+
- /tw-status - Use when you need current task progress and acceptance criteria status.
75+
- /tw-plan - Use when you need to clarify a goal and build an approved execution plan.
76+
- /tw-debug - Use when an issue requires root-cause-first debugging before proposing fixes.
77+
- /tw-explain - Use when you need a deep explanation of a code symbol and its call graph.
78+
- /tw-simplify - Use when you want to simplify code while preserving behavior.
7879

7980
### Core Commands
8081

8182
<!-- TASKWING_COMMANDS_START -->
8283
- taskwing bootstrap
8384
- taskwing goal "<goal>"
85+
- taskwing ask "<query>"
8486
- taskwing task
8587
- taskwing plan status
8688
- taskwing slash
@@ -95,7 +97,7 @@ Brand names and logos are trademarks of their respective owners; usage here indi
9597
<!-- TASKWING_MCP_TOOLS_START -->
9698
| Tool | Description |
9799
|------|-------------|
98-
| recall | Retrieve project knowledge (decisions, patterns, constraints) |
100+
| ask | Search project knowledge (decisions, patterns, constraints) |
99101
| task | Unified task lifecycle (next, current, start, complete) |
100102
| plan | Plan management (clarify, decompose, expand, generate, finalize, audit) |
101103
| code | Code intelligence (find, search, explain, callers, impact, simplify) |

CLAUDE.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ Uses CloudWeGo Eino for multi-provider support:
142142

143143
### MCP Server
144144

145-
`taskwing mcp` starts a JSON-RPC stdio server exposing `recall`, `task`, `plan`, `code`, `debug`, and `remember` tools.
145+
`taskwing mcp` starts a JSON-RPC stdio server exposing `ask`, `task`, `plan`, `code`, `debug`, and `remember` tools.
146146

147147
### Task Context Binding
148148

149149
Tasks receive architectural context via a **hybrid early+late binding** approach:
150150

151-
1. **Early binding** (at task creation): `TaskEnricher` executes recall queries and embeds results in `Task.ContextSummary`
151+
1. **Early binding** (at task creation): `TaskEnricher` executes ask queries and embeds results in `Task.ContextSummary`
152152
2. **Late binding** (at display): `FormatRichContext()` uses early-bound context or fetches fresh context as fallback
153153

154154
This ensures tasks always have relevant architecture context while maintaining backward compatibility with older tasks.
@@ -323,40 +323,42 @@ Brand names and logos are trademarks of their respective owners; usage here indi
323323
<!-- TASKWING_LEGAL_END -->
324324

325325
### Slash Commands
326-
- /tw-brief - Use when you need a compact project brief.
327-
- /tw-next - Use when you are ready to start the next approved task.
328-
- /tw-done - Use when implementation is verified and ready to complete.
329-
- /tw-plan - Use when you need to clarify a goal and build a plan.
330-
- /tw-status - Use when you need current task progress.
331-
- /tw-debug - Use when debugging must start from root-cause evidence.
332-
- /tw-explain - Use when you need a deep symbol explanation.
333-
- /tw-simplify - Use when you want to simplify code without behavior changes.
326+
- /tw-ask - Use when you need to search project knowledge (decisions, patterns, constraints).
327+
- /tw-remember - Use when you want to persist a decision, pattern, or insight to project memory.
328+
- /tw-next - Use when you are ready to start the next approved TaskWing task with full context.
329+
- /tw-done - Use when implementation is verified and you are ready to complete the current task.
330+
- /tw-status - Use when you need current task progress and acceptance criteria status.
331+
- /tw-plan - Use when you need to clarify a goal and build an approved execution plan.
332+
- /tw-debug - Use when an issue requires root-cause-first debugging before proposing fixes.
333+
- /tw-explain - Use when you need a deep explanation of a code symbol and its call graph.
334+
- /tw-simplify - Use when you want to simplify code while preserving behavior.
334335

335336
### Core Commands
336337

337338
<!-- TASKWING_COMMANDS_START -->
338-
- taskwing bootstrap
339-
- taskwing goal "<goal>"
340-
- taskwing task
341-
- taskwing plan status
342-
- taskwing slash
343-
- taskwing mcp
344-
- taskwing doctor
345-
- taskwing config
346-
- taskwing start
339+
- `taskwing bootstrap`
340+
- `taskwing goal "<goal>"`
341+
- `taskwing ask "<query>"`
342+
- `taskwing task`
343+
- `taskwing plan status`
344+
- `taskwing slash`
345+
- `taskwing mcp`
346+
- `taskwing doctor`
347+
- `taskwing config`
348+
- `taskwing start`
347349
<!-- TASKWING_COMMANDS_END -->
348350

349351
### MCP Tools (Canonical Contract)
350352

351353
<!-- TASKWING_MCP_TOOLS_START -->
352354
| Tool | Description |
353355
|------|-------------|
354-
| recall | Retrieve project knowledge (decisions, patterns, constraints) |
355-
| task | Unified task lifecycle (next, current, start, complete) |
356-
| plan | Plan management (clarify, decompose, expand, generate, finalize, audit) |
357-
| code | Code intelligence (find, search, explain, callers, impact, simplify) |
358-
| debug | Diagnose issues systematically with AI-powered analysis |
359-
| remember | Store knowledge in project memory |
356+
| `ask` | Search project knowledge (decisions, patterns, constraints) |
357+
| `task` | Unified task lifecycle (`next`, `current`, `start`, `complete`) |
358+
| `plan` | Plan management (`clarify`, `decompose`, `expand`, `generate`, `finalize`, `audit`) |
359+
| `code` | Code intelligence (`find`, `search`, `explain`, `callers`, `impact`, `simplify`) |
360+
| `debug` | Diagnose issues systematically with AI-powered analysis |
361+
| `remember` | Store knowledge in project memory |
360362
<!-- TASKWING_MCP_TOOLS_END -->
361363

362364
### Autonomous Task Execution (Hooks)

GEMINI.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The system is composed of a CLI tool with an embedded MCP server and a web dashb
100100

101101
## MCP Integration
102102

103-
TaskWing exposes a `recall` tool. When working on this feature:
103+
TaskWing exposes an `ask` tool. When working on this feature:
104104
* Ensure responses stay within token budgets (500-1000 tokens).
105105
* Test with `taskwing mcp` locally or use `make test-mcp`.
106106

@@ -211,40 +211,42 @@ Brand names and logos are trademarks of their respective owners; usage here indi
211211
<!-- TASKWING_LEGAL_END -->
212212

213213
### Slash Commands
214-
- /tw-brief - Use when you need a compact project brief.
215-
- /tw-next - Use when you are ready to start the next approved task.
216-
- /tw-done - Use when implementation is verified and ready to complete.
217-
- /tw-plan - Use when you need to clarify a goal and build a plan.
218-
- /tw-status - Use when you need current task progress.
219-
- /tw-debug - Use when debugging must start from root-cause evidence.
220-
- /tw-explain - Use when you need a deep symbol explanation.
221-
- /tw-simplify - Use when you want to simplify code without behavior changes.
214+
- /tw-ask - Use when you need to search project knowledge (decisions, patterns, constraints).
215+
- /tw-remember - Use when you want to persist a decision, pattern, or insight to project memory.
216+
- /tw-next - Use when you are ready to start the next approved TaskWing task with full context.
217+
- /tw-done - Use when implementation is verified and you are ready to complete the current task.
218+
- /tw-status - Use when you need current task progress and acceptance criteria status.
219+
- /tw-plan - Use when you need to clarify a goal and build an approved execution plan.
220+
- /tw-debug - Use when an issue requires root-cause-first debugging before proposing fixes.
221+
- /tw-explain - Use when you need a deep explanation of a code symbol and its call graph.
222+
- /tw-simplify - Use when you want to simplify code while preserving behavior.
222223

223224
### Core Commands
224225

225226
<!-- 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
227+
- `taskwing bootstrap`
228+
- `taskwing goal "<goal>"`
229+
- `taskwing ask "<query>"`
230+
- `taskwing task`
231+
- `taskwing plan status`
232+
- `taskwing slash`
233+
- `taskwing mcp`
234+
- `taskwing doctor`
235+
- `taskwing config`
236+
- `taskwing start`
235237
<!-- TASKWING_COMMANDS_END -->
236238

237239
### MCP Tools (Canonical Contract)
238240

239241
<!-- TASKWING_MCP_TOOLS_START -->
240242
| Tool | Description |
241243
|------|-------------|
242-
| recall | Retrieve project knowledge (decisions, patterns, constraints) |
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) |
246-
| debug | Diagnose issues systematically with AI-powered analysis |
247-
| remember | Store knowledge in project memory |
244+
| `ask` | Search project knowledge (decisions, patterns, constraints) |
245+
| `task` | Unified task lifecycle (`next`, `current`, `start`, `complete`) |
246+
| `plan` | Plan management (`clarify`, `decompose`, `expand`, `generate`, `finalize`, `audit`) |
247+
| `code` | Code intelligence (`find`, `search`, `explain`, `callers`, `impact`, `simplify`) |
248+
| `debug` | Diagnose issues systematically with AI-powered analysis |
249+
| `remember` | Store knowledge in project memory |
248250
<!-- TASKWING_MCP_TOOLS_END -->
249251

250252
### Autonomous Task Execution (Hooks)

0 commit comments

Comments
 (0)