Skip to content

Commit 6e04dec

Browse files
authored
refactor: rename slash commands tw-* → taskwing:* and MCP server → taskwing (#24)
* refactor: rename slash commands from tw-* to taskwing:* and MCP server to taskwing Standardize naming convention across the entire codebase: - Slash commands: /tw-ask → /taskwing:ask, /tw-next → /taskwing:next, etc. - MCP server name: taskwing-mcp → taskwing - No backward compatibility shims — old names detected as legacy for cleanup * fix(bootstrap): use subdirectory for namespaced slash commands Fix three critical runtime bugs identified by Greptile review: 1. macOS filesystem failure: colons in filenames (taskwing:ask.md) are invalid on HFS+/APFS. Now uses subdirectory approach: .claude/commands/taskwing/ask.md → /taskwing:ask 2. OpenCode validation failure: regex rejects colons. Now uses SlashCmd field (ask, next, etc.) instead of BaseName for OpenCode filenames. 3. Migration cleanup: managedSlashCommandBases() now includes legacy tw-* names so old files are properly pruned during upgrade. Also fixes misleading comment on SlashCommandNames(). * fix(config): remove hardcoded dev path from opencode.json Replace absolute dev binary path with portable "taskwing" command name so the config works on any machine.
1 parent bdfcc5f commit 6e04dec

24 files changed

Lines changed: 212 additions & 145 deletions

AGENTS.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ Brand names and logos are trademarks of their respective owners; usage here indi
7979

8080
### Slash Commands
8181

82-
- /tw-ask - Use when you need to search project knowledge (decisions, patterns, constraints).
83-
- /tw-remember - Use when you want to persist a decision, pattern, or insight to project memory.
84-
- /tw-next - Use when you are ready to start the next approved TaskWing task with full context.
85-
- /tw-done - Use when implementation is verified and you are ready to complete the current task.
86-
- /tw-status - Use when you need current task progress and acceptance criteria status.
87-
- /tw-plan - Use when you need to clarify a goal and build an approved execution plan.
88-
- /tw-debug - Use when an issue requires root-cause-first debugging before proposing fixes.
89-
- /tw-explain - Use when you need a deep explanation of a code symbol and its call graph.
90-
- /tw-simplify - Use when you want to simplify code while preserving behavior.
82+
- /taskwing:ask - Use when you need to search project knowledge (decisions, patterns, constraints).
83+
- /taskwing:remember - Use when you want to persist a decision, pattern, or insight to project memory.
84+
- /taskwing:next - Use when you are ready to start the next approved TaskWing task with full context.
85+
- /taskwing:done - Use when implementation is verified and you are ready to complete the current task.
86+
- /taskwing:status - Use when you need current task progress and acceptance criteria status.
87+
- /taskwing:plan - Use when you need to clarify a goal and build an approved execution plan.
88+
- /taskwing:debug - Use when an issue requires root-cause-first debugging before proposing fixes.
89+
- /taskwing:explain - Use when you need a deep explanation of a code symbol and its call graph.
90+
- /taskwing:simplify - Use when you want to simplify code while preserving behavior.
9191

9292
### Core Commands
9393

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
- "TaskWing helps turn a goal into executed tasks with persistent context across AI sessions."
2323
- Updated slash and MCP prompt contracts to unified `task` and `plan` action-based interfaces.
2424
- Purged stale/outdated architecture documentation that no longer matches shipped behavior.
25-
- Reworked `/tw-plan`, `/tw-next`, `/tw-done`, and `/tw-debug` prompts as explicit process contracts with hard gates and refusal fallbacks.
25+
- Reworked `/taskwing:plan`, `/taskwing:next`, `/taskwing:done`, and `/taskwing:debug` prompts as explicit process contracts with hard gates and refusal fallbacks.
2626
- Updated slash command descriptions to trigger-focused "Use when ..." phrasing across assistant command generation.
2727
- Session initialization output now injects TaskWing Workflow Contract v1 for hook-enabled assistants.
2828

CLAUDE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Two MCP servers are available for testing:
1515

1616
| MCP Server | Binary | Use Case |
1717
| ------------------------ | ------------------------------ | ----------------------------------- |
18-
| `taskwing-mcp` | Production (`taskwing`) | Stable features, production testing |
18+
| `taskwing` | Production (`taskwing`) | Stable features, production testing |
1919
| `taskwing-local-dev-mcp` | Development (`./bin/taskwing`) | Testing new/changed features |
2020

2121
### Testing New Features
@@ -28,7 +28,7 @@ When developing new MCP tools or modifying existing ones:
2828

2929
### Important: MCP Server Caching
3030

31-
The production MCP server (`taskwing-mcp`) uses the installed Homebrew binary. Changes to code are **NOT reflected** until:
31+
The production MCP server (`taskwing`) uses the installed Homebrew binary. Changes to code are **NOT reflected** until:
3232

3333
- You rebuild: `make build && brew reinstall taskwing` (if using Homebrew)
3434
- Or test with: `go run . mcp` directly
@@ -339,15 +339,15 @@ Brand names and logos are trademarks of their respective owners; usage here indi
339339

340340
### Slash Commands
341341

342-
- /tw-ask - Use when you need to search project knowledge (decisions, patterns, constraints).
343-
- /tw-remember - Use when you want to persist a decision, pattern, or insight to project memory.
344-
- /tw-next - Use when you are ready to start the next approved TaskWing task with full context.
345-
- /tw-done - Use when implementation is verified and you are ready to complete the current task.
346-
- /tw-status - Use when you need current task progress and acceptance criteria status.
347-
- /tw-plan - Use when you need to clarify a goal and build an approved execution plan.
348-
- /tw-debug - Use when an issue requires root-cause-first debugging before proposing fixes.
349-
- /tw-explain - Use when you need a deep explanation of a code symbol and its call graph.
350-
- /tw-simplify - Use when you want to simplify code while preserving behavior.
342+
- /taskwing:ask - Use when you need to search project knowledge (decisions, patterns, constraints).
343+
- /taskwing:remember - Use when you want to persist a decision, pattern, or insight to project memory.
344+
- /taskwing:next - Use when you are ready to start the next approved TaskWing task with full context.
345+
- /taskwing:done - Use when implementation is verified and you are ready to complete the current task.
346+
- /taskwing:status - Use when you need current task progress and acceptance criteria status.
347+
- /taskwing:plan - Use when you need to clarify a goal and build an approved execution plan.
348+
- /taskwing:debug - Use when an issue requires root-cause-first debugging before proposing fixes.
349+
- /taskwing:explain - Use when you need a deep explanation of a code symbol and its call graph.
350+
- /taskwing:simplify - Use when you want to simplify code while preserving behavior.
351351

352352
### Core Commands
353353

GEMINI.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,15 @@ Brand names and logos are trademarks of their respective owners; usage here indi
218218

219219
### Slash Commands
220220

221-
- /tw-ask - Use when you need to search project knowledge (decisions, patterns, constraints).
222-
- /tw-remember - Use when you want to persist a decision, pattern, or insight to project memory.
223-
- /tw-next - Use when you are ready to start the next approved TaskWing task with full context.
224-
- /tw-done - Use when implementation is verified and you are ready to complete the current task.
225-
- /tw-status - Use when you need current task progress and acceptance criteria status.
226-
- /tw-plan - Use when you need to clarify a goal and build an approved execution plan.
227-
- /tw-debug - Use when an issue requires root-cause-first debugging before proposing fixes.
228-
- /tw-explain - Use when you need a deep explanation of a code symbol and its call graph.
229-
- /tw-simplify - Use when you want to simplify code while preserving behavior.
221+
- /taskwing:ask - Use when you need to search project knowledge (decisions, patterns, constraints).
222+
- /taskwing:remember - Use when you want to persist a decision, pattern, or insight to project memory.
223+
- /taskwing:next - Use when you are ready to start the next approved TaskWing task with full context.
224+
- /taskwing:done - Use when implementation is verified and you are ready to complete the current task.
225+
- /taskwing:status - Use when you need current task progress and acceptance criteria status.
226+
- /taskwing:plan - Use when you need to clarify a goal and build an approved execution plan.
227+
- /taskwing:debug - Use when an issue requires root-cause-first debugging before proposing fixes.
228+
- /taskwing:explain - Use when you need a deep explanation of a code symbol and its call graph.
229+
- /taskwing:simplify - Use when you want to simplify code while preserving behavior.
230230

231231
### Core Commands
232232

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ taskwing goal "Add Stripe billing"
116116
# → Plan decomposed into 5 executable tasks
117117

118118
# 3. Execute with your AI assistant
119-
/tw-next # Get next task with full context
119+
/taskwing:next # Get next task with full context
120120
# ...work...
121-
/tw-done # Mark complete, advance to next
121+
/taskwing:done # Mark complete, advance to next
122122
```
123123

124124
## MCP Tools
@@ -141,7 +141,7 @@ Add to your AI tool's MCP config:
141141
```json
142142
{
143143
"mcpServers": {
144-
"taskwing-mcp": {
144+
"taskwing": {
145145
"command": "taskwing",
146146
"args": ["mcp"]
147147
}
@@ -155,15 +155,15 @@ Once connected, use these slash commands from your AI assistant:
155155

156156
| Command | When to use |
157157
|:--------|:------------|
158-
| `/tw-ask` | Search project knowledge (decisions, patterns, constraints) |
159-
| `/tw-remember` | Persist a decision, pattern, or insight to project memory |
160-
| `/tw-next` | Start the next approved task with full context |
161-
| `/tw-done` | Complete the current task after verification |
162-
| `/tw-status` | Check current task progress and acceptance criteria |
163-
| `/tw-plan` | Clarify a goal and build an approved execution plan |
164-
| `/tw-debug` | Root-cause-first debugging before proposing fixes |
165-
| `/tw-explain` | Deep explanation of a code symbol and its call graph |
166-
| `/tw-simplify` | Simplify code while preserving behavior |
158+
| `/taskwing:ask` | Search project knowledge (decisions, patterns, constraints) |
159+
| `/taskwing:remember` | Persist a decision, pattern, or insight to project memory |
160+
| `/taskwing:next` | Start the next approved task with full context |
161+
| `/taskwing:done` | Complete the current task after verification |
162+
| `/taskwing:status` | Check current task progress and acceptance criteria |
163+
| `/taskwing:plan` | Clarify a goal and build an approved execution plan |
164+
| `/taskwing:debug` | Root-cause-first debugging before proposing fixes |
165+
| `/taskwing:explain` | Deep explanation of a code symbol and its call graph |
166+
| `/taskwing:simplify` | Simplify code while preserving behavior |
167167

168168
## Core Commands
169169

cmd/doctor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,12 @@ func printNextSteps(checks []DoctorCheck) {
517517
fmt.Println("Next steps:")
518518
if !hasActivePlan {
519519
fmt.Println(" 1. Create and activate plan: taskwing goal \"your development goal\"")
520-
fmt.Println(" 2. Open Claude Code and run: /tw-next")
520+
fmt.Println(" 2. Open Claude Code and run: /taskwing:next")
521521
} else if !hasSession {
522522
fmt.Println(" 1. Open Claude Code (session will auto-initialize)")
523-
fmt.Println(" 2. Run: /tw-next")
523+
fmt.Println(" 2. Run: /taskwing:next")
524524
} else {
525-
fmt.Println(" • In Claude Code, run: /tw-next")
525+
fmt.Println(" • In Claude Code, run: /taskwing:next")
526526
fmt.Println(" • Tasks will auto-continue until circuit breaker triggers")
527527
}
528528
}

cmd/goal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func runGoal(cmd *cobra.Command, args []string) error {
151151

152152
fmt.Printf("Plan created and activated: %s (%d task(s))\n", genRes.PlanID, len(genRes.Tasks))
153153
fmt.Println("Next:")
154-
fmt.Println(" 1. In your AI tool, run /tw-next")
154+
fmt.Println(" 1. In your AI tool, run /taskwing:next")
155155
fmt.Println(" 2. Or use MCP tool task with action=next")
156156
return nil
157157
}

cmd/hook.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func runContinueCheck(maxTasks, maxMinutes int) error {
209209
_ = saveHookSession(session)
210210

211211
return outputHookResponse(HookResponse{
212-
Reason: fmt.Sprintf("Sentinel circuit breaker: Critical deviation detected in previous task. %s\n\nReview the changes before proceeding. Use /tw-next to continue after review.", session.LastDeviationSummary),
212+
Reason: fmt.Sprintf("Sentinel circuit breaker: Critical deviation detected in previous task. %s\n\nReview the changes before proceeding. Use /taskwing:next to continue after review.", session.LastDeviationSummary),
213213
})
214214
}
215215

@@ -232,11 +232,11 @@ func runContinueCheck(maxTasks, maxMinutes int) error {
232232
if err != nil {
233233
if isMissingProjectMemoryError(err) {
234234
return outputHookResponse(HookResponse{
235-
Reason: "No project memory found. Run 'taskwing bootstrap' to initialize project memory, or use /tw-next to continue manually.",
235+
Reason: "No project memory found. Run 'taskwing bootstrap' to initialize project memory, or use /taskwing:next to continue manually.",
236236
})
237237
}
238238
return outputHookResponse(HookResponse{
239-
Reason: fmt.Sprintf("Could not open repository: %v. Use /tw-next to continue manually.", err),
239+
Reason: fmt.Sprintf("Could not open repository: %v. Use /taskwing:next to continue manually.", err),
240240
})
241241
}
242242
defer func() { _ = repo.Close() }()
@@ -332,7 +332,7 @@ func runContinueCheck(maxTasks, maxMinutes int) error {
332332
blockDecision := "block"
333333
return outputHookResponse(HookResponse{
334334
Decision: &blockDecision,
335-
Reason: fmt.Sprintf("Continue to task %d/%d: %s\n\n%s\n\nIf auto-continue fails, use /tw-next to proceed manually.", session.TasksCompleted+1, len(activePlan.Tasks), nextTask.Title, contextStr),
335+
Reason: fmt.Sprintf("Continue to task %d/%d: %s\n\n%s\n\nIf auto-continue fails, use /taskwing:next to proceed manually.", session.TasksCompleted+1, len(activePlan.Tasks), nextTask.Title, contextStr),
336336
})
337337
}
338338

@@ -415,7 +415,7 @@ Circuit breakers are configured in .claude/settings.json (defaults: %d tasks, %d
415415
416416
%s
417417
418-
Use /tw-next to start the first task, or it will auto-continue after each task.
418+
Use /taskwing:next to start the first task, or it will auto-continue after each task.
419419
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
420420
`, session.SessionID, session.StartedAt.Format("15:04:05"), planInfo, DefaultMaxTasksPerSession, DefaultMaxSessionMinutes, workflowContractBanner)
421421

cmd/mcp_detect.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func detectExistingMCPConfigs() []string {
3636
return found
3737
}
3838

39-
// detectClaudeMCP checks if Claude Code CLI has taskwing-mcp configured.
39+
// detectClaudeMCP checks if Claude Code CLI has taskwing configured.
4040
func detectClaudeMCP() bool {
4141
// First check if claude CLI is available
4242
_, err := exec.LookPath("claude")
@@ -56,7 +56,7 @@ func detectClaudeMCP() bool {
5656
return mcpcfg.ContainsCanonicalServerName(string(output))
5757
}
5858

59-
// detectGeminiMCP checks if Gemini CLI has taskwing-mcp configured.
59+
// detectGeminiMCP checks if Gemini CLI has taskwing configured.
6060
func detectGeminiMCP() bool {
6161
// First check if gemini CLI is available
6262
_, err := exec.LookPath("gemini")
@@ -78,7 +78,7 @@ func detectGeminiMCP() bool {
7878
return mcpcfg.ContainsCanonicalServerName(string(output))
7979
}
8080

81-
// detectCodexMCP checks if Codex CLI has taskwing-mcp configured.
81+
// detectCodexMCP checks if Codex CLI has taskwing configured.
8282
func detectCodexMCP() bool {
8383
// First check if codex CLI is available
8484
_, err := exec.LookPath("codex")

cmd/mcp_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func runMCPServer(ctx context.Context) error {
146146

147147
// Create MCP server
148148
impl := &mcpsdk.Implementation{
149-
Name: "taskwing-mcp",
149+
Name: "taskwing",
150150
Version: version,
151151
}
152152

0 commit comments

Comments
 (0)