refactor: rename slash commands tw-* → taskwing:* and MCP server → taskwing#24
Merged
josephgoksu merged 3 commits intomainfrom Mar 9, 2026
Merged
Conversation
…r 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 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().
Owner
Author
|
@greptile |
Replace absolute dev binary path with portable "taskwing" command name so the config works on any machine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tw-*totaskwing:*(e.g.,/tw-next→/taskwing:next)taskwing-mcptotaskwingTest plan
make buildpassestw-references in source (only legacy detection code)taskwing-mcpreferences in source (only legacy detection code)Greptile Summary
This PR renames all slash commands from
tw-*→taskwing:*(Claude Code namespace format) and the MCP server fromtaskwing-mcp→taskwingacross 24 files. The renaming intent is sound —taskwing:askis a cleaner, tool-namespaced UX thantw-ask. Documentation, runtime strings, test fixtures, andmcpcfg/naming.goare all updated correctly. However,internal/bootstrap/initializer.go— the single file responsible for actually writing command files to disk — contains three bugs that would cause silent or hard failures at install time:createOpenCodeCommandsvalidates command names against^[a-z0-9]+(-[a-z0-9]+)*$, but now passescmd.SlashCmd(e.g.,"taskwing:ask") which contains a colon. Every command fails validation on the first iteration; no OpenCode commands are ever written.taskwing/taskwing:ask.mdinstead oftaskwing/ask.md. Colons are illegal in Windows filenames, and Claude Code would resolve this as/taskwing:taskwing:ask(double-namespaced) rather than the intended/taskwing:ask. The comment on line 377 correctly documents the right mapping (taskwing/ask.md → /taskwing:ask) — the implementation just doesn't match it.tw-*.mdcleanup is broken:managedSlashCommandBases()registers"tw-" + cmd.SlashCmd="tw-taskwing:ask"as the legacy key, but actual legacy files on disk are named usingcmd.BaseName(tw-ask.md). Since"tw-ask"is never in the managed set, old files are silently skipped and never pruned.All three issues stem from the same root cause: using
cmd.SlashCmd(the fulltaskwing:asktoken) wherecmd.BaseName(justask) is needed for filesystem operations.Confidence Score: 1/5
initializer.go, which actually writes slash command files to disk — has three distinct bugs in the new namespace logic, all caused by usingcmd.SlashCmd(containing a colon) instead ofcmd.BaseNamein filesystem operations. The tests pass because they mirror the same buggy expected-filename logic, so the test suite gives false confidence. Real-world installs on every supported AI tool would be broken or produce incorrect command names.internal/bootstrap/initializer.gorequires targeted fixes inexpectedSlashCommandFiles,managedSlashCommandBases,CreateSlashCommands(filename construction), andcreateOpenCodeCommands(validation + filename). The test fileinternal/bootstrap/mcp_healthcheck_test.goshould also be updated once the filename logic is corrected.Important Files Changed
taskwing:ask.md) breaking Claude Code namespacing and Windows compatibility; OpenCode validation regex rejectscmd.SlashCmd(contains colon), blocking all OpenCode installs; legacytw-*cleanup logic usescmd.SlashCmdinstead ofcmd.BaseNameso old files are never removed.taskwing/namespace subdirectory for command files and detect legacytw-*flat files; logic is consistent but depends on the correct filenames being written byinitializer.go(which has bugs).nsDir(namespace subdirectory) when writing test fixture files, and assertion strings updated to new MCP server name; the tests pass because they mirror the (buggy) expected-filename logic, not because the resulting filenames are correct.CanonicalServerNamechanged from"taskwing-mcp"to"taskwing",IsLegacyServerNameupdated reciprocally; logic is correct and well-structured.Implementation.Namechanged from"taskwing-mcp"to"taskwing"— straightforward, correct rename with no side effects.tw-*totaskwing:*; purely cosmetic/doc changes, no logic affected.commandarray still contains a hardcoded absolute path to a developer-specific machine path — pre-existing issue but should be addressed.tw-*totaskwing:*— no logic changes./tw-nextto/taskwing:next— correct rename in all four call sites.mcpcfg.ContainsCanonicalServerNamewhich is correctly updated innaming.go.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[taskwing bootstrap] --> B{AI Tool type?} B -->|Claude Code / Gemini TOML| C[CreateSlashCommands] B -->|OpenCode| D[createOpenCodeCommands] B -->|GitHub Copilot| E[createSingleFileInstructions] C --> F[mkdir .claude/commands/taskwing/] F --> G["Write taskwing/⚠️taskwing:ask.md\n(BUG: should be ask.md)"] G --> H[pruneStaleSlashCommands] H --> I["Scan root for tw-* files\n⚠️ BUG: 'tw-ask' not in managedBases\n→ legacy files NOT removed"] H --> J["Scan taskwing/ for stale files\n(expects taskwing:ask.md keys)"] D --> K["Validate cmd.SlashCmd\nagainst ^[a-z0-9]+(-[a-z0-9]+)*$\n⚠️ BUG: 'taskwing:ask' has colon\n→ validation FAILS, returns error"] E --> L[Write single instructions .md file] L --> M[Embed MCP config with 'taskwing' server name ✓] style G fill:#ff6b6b,color:#fff style I fill:#ff6b6b,color:#fff style K fill:#ff6b6b,color:#fff style M fill:#51cf66,color:#fffComments Outside Diff (12)
internal/bootstrap/initializer.go, line 469-476 (link)Colon in filename will fail on macOS (HFS+/APFS)
After this rename,
cmd.BaseNameis"taskwing:ask","taskwing:next", etc. The code constructsfileName = cmd.BaseName + ".md"→"taskwing:ask.md"and passes it toos.WriteFile. On macOS (HFS+ / APFS), the colon:is a reserved path separator and is not permitted in filenames. The syscall will returnEINVAL, silently breakingtaskwing bootstrapfor every Claude, Cursor, Codex, and Gemini user on macOS.For Claude Code's namespaced slash commands (e.g.
/taskwing:next), the correct approach is a subdirectory, not a colon in the filename:.claude/commands/taskwing/next.md→ Claude Code exposes it as/taskwing:nextThe
SlashCommandstruct already has a separateSlashCmdfield ("next","ask", etc.) that should be used as the filename, while"taskwing"becomes the subdirectory name.Note: this same issue affects the Gemini TOML path (
cmd.BaseName + ".toml"at the equivalent location).internal/bootstrap/initializer.go, line 662-666 (link)OpenCode bootstrap will always error — all commands fail name validation
openCodeSkillNameRegexis `^[a-z0-9]+(-[a-z0-9]+)*## Summarytw-*totaskwing:*(e.g.,/tw-next→/taskwing:next)taskwing-mcptotaskwingTest plan
make buildpassestw-references in source (only legacy detection code)taskwing-mcpreferences in source (only legacy detection code)Greptile Summary
This PR renames slash commands from
tw-*totaskwing:*and the MCP server fromtaskwing-mcptotaskwingacross 24 files. The intent is sound and most changes are executed cleanly — the MCP server rename, documentation, and string updates are consistent and correct.However, the slash command rename introduces three critical runtime bugs in
internal/bootstrap/initializer.gothat will silently fail bootstrap for affected users:macOS filesystem failure: The code uses
cmd.BaseName(now"taskwing:ask","taskwing:next", etc.) directly as a filename. On macOS (HFS+/APFS), colons are reserved path separators and forbidden in filenames.os.WriteFilewill returnEINVALfor all Claude, Cursor, Codex, and Gemini users on macOS when runningtaskwing bootstrap.OpenCode validation failure: The OpenCode regex `^[a-z0-9]+(-[a-z0-9]+)*## Summary
tw-*totaskwing:*(e.g.,/tw-next→/taskwing:next)taskwing-mcptotaskwingTest plan
make buildpassestw-references in source (only legacy detection code)taskwing-mcpreferences in source (only legacy detection code)Greptile Summary
This PR renames all slash commands from
tw-*→taskwing:*(Claude Code namespace format) and the MCP server fromtaskwing-mcp→taskwingacross 24 files. The renaming intent is sound —taskwing:askis a cleaner, tool-namespaced UX thantw-ask. Documentation, runtime strings, test fixtures, andmcpcfg/naming.goare all updated correctly. However,internal/bootstrap/initializer.go— the single file responsible for actually writing command files to disk — contains three bugs that would cause silent or hard failures at install time:createOpenCodeCommandsvalidates command names against^[a-z0-9]+(-[a-z0-9]+)*$, but now passescmd.SlashCmd(e.g.,"taskwing:ask") which contains a colon. Every command fails validation on the first iteration; no OpenCode commands are ever written.taskwing/taskwing:ask.mdinstead oftaskwing/ask.md. Colons are illegal in Windows filenames, and Claude Code would resolve this as/taskwing:taskwing:ask(double-namespaced) rather than the intended/taskwing:ask. The comment on line 377 correctly documents the right mapping (taskwing/ask.md → /taskwing:ask) — the implementation just doesn't match it.tw-*.mdcleanup is broken:managedSlashCommandBases()registers"tw-" + cmd.SlashCmd="tw-taskwing:ask"as the legacy key, but actual legacy files on disk are named usingcmd.BaseName(tw-ask.md). Since"tw-ask"is never in the managed set, old files are silently skipped and never pruned.All three issues stem from the same root cause: using
cmd.SlashCmd(the fulltaskwing:asktoken) wherecmd.BaseName(justask) is needed for filesystem operations.Confidence Score: 1/5
initializer.go, which actually writes slash command files to disk — has three distinct bugs in the new namespace logic, all caused by usingcmd.SlashCmd(containing a colon) instead ofcmd.BaseNamein filesystem operations. The tests pass because they mirror the same buggy expected-filename logic, so the test suite gives false confidence. Real-world installs on every supported AI tool would be broken or produce incorrect command names.internal/bootstrap/initializer.gorequires targeted fixes inexpectedSlashCommandFiles,managedSlashCommandBases,CreateSlashCommands(filename construction), andcreateOpenCodeCommands(validation + filename). The test fileinternal/bootstrap/mcp_healthcheck_test.goshould also be updated once the filename logic is corrected.Important Files Changed
taskwing:ask.md) breaking Claude Code namespacing and Windows compatibility; OpenCode validation regex rejectscmd.SlashCmd(contains colon), blocking all OpenCode installs; legacytw-*cleanup logic usescmd.SlashCmdinstead ofcmd.BaseNameso old files are never removed.taskwing/namespace subdirectory for command files and detect legacytw-*flat files; logic is consistent but depends on the correct filenames being written byinitializer.go(which has bugs).nsDir(namespace subdirectory) when writing test fixture files, and assertion strings updated to new MCP server name; the tests pass because they mirror the (buggy) expected-filename logic, not because the resulting filenames are correct.CanonicalServerNamechanged from"taskwing-mcp"to"taskwing",IsLegacyServerNameupdated reciprocally; logic is correct and well-structured.Implementation.Namechanged from"taskwing-mcp"to"taskwing"— straightforward, correct rename with no side effects.tw-*totaskwing:*; purely cosmetic/doc changes, no logic affected.commandarray still contains a hardcoded absolute path to a developer-specific machine path — pre-existing issue but should be addressed.tw-*totaskwing:*— no logic changes./tw-nextto/taskwing:next— correct rename in all four call sites.mcpcfg.ContainsCanonicalServerNamewhich is correctly updated innaming.go.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[taskwing bootstrap] --> B{AI Tool type?} B -->|Claude Code / Gemini TOML| C[CreateSlashCommands] B -->|OpenCode| D[createOpenCodeCommands] B -->|GitHub Copilot| E[createSingleFileInstructions] C --> F[mkdir .claude/commands/taskwing/] F --> G["Write taskwing/⚠️taskwing:ask.md\n(BUG: should be ask.md)"] G --> H[pruneStaleSlashCommands] H --> I["Scan root for tw-* files\n⚠️ BUG: 'tw-ask' not in managedBases\n→ legacy files NOT removed"] H --> J["Scan taskwing/ for stale files\n(expects taskwing:ask.md keys)"] D --> K["Validate cmd.SlashCmd\nagainst ^[a-z0-9]+(-[a-z0-9]+)*$\n⚠️ BUG: 'taskwing:ask' has colon\n→ validation FAILS, returns error"] E --> L[Write single instructions .md file] L --> M[Embed MCP config with 'taskwing' server name ✓] style G fill:#ff6b6b,color:#fff style I fill:#ff6b6b,color:#fff style K fill:#ff6b6b,color:#fff style M fill:#51cf66,color:#fffexplicitly rejects colons. All 9 command names fail validation on the first iteration, making
taskwing bootstrap --ai opencodecompletely broken.managedSlashCommandBases()function only recognizes the new"taskwing:*"names. Oldtw-*files will never be pruned, leaving orphaned files in users'.claude/commands/and.cursor/rules/directories after upgrade.The MCP server rename in
internal/mcpcfg/naming.go,cmd/mcp_server.go, and test fixtures is well-executed. All documentation and in-prompt references are consistently updated.Confidence Score: 1/5
BaseNamevalues containing colons, which are then used directly as raw filenames inCreateSlashCommandsandcreateOpenCodeCommands. On macOS (the primary dev platform given Homebrew in docs and/Users/josephgoksuinopencode.json), colons are forbidden filesystem characters — this is a hardEINVALfailure, not an edge case. For OpenCode, the validation regex explicitly rejects colons, guaranteeing failure on every command. Additionally, the migration cleanup function won't recognize oldtw-*files, leaving orphaned files. These are not theoretical issues — they affect the coretaskwing bootstrapflow for the majority of users (macOS + OpenCode users).internal/bootstrap/initializer.gorequires critical fixes: filename construction must use subdirectories for namespaced commands (Claude/Cursor/Codex/Gemini) and short names (OpenCode). Migration cleanup must recognize both old and new basenames.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[taskwing bootstrap --ai X] --> B{AI type?} B -- "claude / cursor / codex" --> C[CreateSlashCommands] B -- "opencode" --> D[createOpenCodeCommands] B -- "copilot" --> E[createSingleFileInstructions] B -- "gemini" --> F[CreateSlashCommands TOML] C --> G["fileName = cmd.BaseName + '.md'<br/>e.g. 'taskwing:ask.md'"] G --> H{"macOS HFS+/APFS?"} H -- "Yes" --> I["❌ os.WriteFile fails<br/>EINVAL: colon in filename"] H -- "No Linux" --> J["✅ File created<br/>but wrong path for<br/>Claude Code namespace"] D --> K["openCodeSkillNameRegex<br/>^[a-z0-9]+(-[a-z0-9]+)*$<br/>match 'taskwing:ask'?"] K -- "NO colon fails regex" --> L["❌ Error returned<br/>on EVERY command<br/>bootstrap always fails"] K -- "match" --> M["✅ File created"] F --> N["fileName = cmd.BaseName + '.toml'<br/>e.g. 'taskwing:ask.toml'"] N --> H E --> O["Single file: copilot-instructions.md<br/>cmd.BaseName used only in display text"] O --> P["✅ No filesystem colon issue"] C --> Q[pruneStaleSlashCommands] Q --> R{"base 'tw-ask' in<br/>managedBases?"} R -- "NO only 'taskwing:ask' present" --> S["🟡 Old tw-* files<br/>NOT pruned"]. Every command in
SlashCommandsnow hascmd.BaseNameset to"taskwing:ask","taskwing:next", etc. The colon character is explicitly rejected by this regex, so theif !openCodeSkillNameRegex.MatchString(cmd.BaseName)check will fail on the very first command and return an error every single time.taskwing bootstrap --ai opencodeis now completely broken.For OpenCode (flat directory, no namespace hierarchy), the correct fix is to use the short
SlashCmdfield ("ask","next", etc.) as the filename, with a descriptive prefix if disambiguation is needed:internal/bootstrap/initializer.go, line 384-390 (link)Old
tw-*files will not be pruned during migrationmanagedSlashCommandBases()now returns a map with keys"taskwing:ask","taskwing:next", etc. (the newBaseNamevalues). WhenpruneStaleSlashCommandschecks an existingtw-ask.md:Users upgrading from the old naming will have orphaned
tw-ask.md,tw-next.md, etc. left in their.claude/commands/directory indefinitely, because the old names are no longer recognized as "managed by us." To handle the migration,managedSlashCommandBases()should include both the old and new base names:internal/bootstrap/initializer.go, line 277-284 (link)Misleading comment on
SlashCommandNames()The updated comment says "without /taskwing: prefix", but the function iterates over
cmd.SlashCmd(values like"ask","next","done"), which carry no prefix at all — neither the old/tw-form nor the new/taskwing:form. The comment should be updated to accurately describe what is returned:internal/bootstrap/initializer.go, line 713-714 (link)OpenCode command install broken — colon in
cmd.SlashCmdfails regexcmd.SlashCmdis now"taskwing:ask","taskwing:next", etc. — all containing a colon (:). The OpenCode validation regex `^[a-z0-9]+(-[a-z0-9]+)*## Summarytw-*totaskwing:*(e.g.,/tw-next→/taskwing:next)taskwing-mcptotaskwingTest plan
make buildpassestw-references in source (only legacy detection code)taskwing-mcpreferences in source (only legacy detection code)Greptile Summary
This PR renames all slash commands from
tw-*→taskwing:*(Claude Code namespace format) and the MCP server fromtaskwing-mcp→taskwingacross 24 files. The renaming intent is sound —taskwing:askis a cleaner, tool-namespaced UX thantw-ask. Documentation, runtime strings, test fixtures, andmcpcfg/naming.goare all updated correctly. However,internal/bootstrap/initializer.go— the single file responsible for actually writing command files to disk — contains three bugs that would cause silent or hard failures at install time:createOpenCodeCommandsvalidates command names against^[a-z0-9]+(-[a-z0-9]+)*$, but now passescmd.SlashCmd(e.g.,"taskwing:ask") which contains a colon. Every command fails validation on the first iteration; no OpenCode commands are ever written.taskwing/taskwing:ask.mdinstead oftaskwing/ask.md. Colons are illegal in Windows filenames, and Claude Code would resolve this as/taskwing:taskwing:ask(double-namespaced) rather than the intended/taskwing:ask. The comment on line 377 correctly documents the right mapping (taskwing/ask.md → /taskwing:ask) — the implementation just doesn't match it.tw-*.mdcleanup is broken:managedSlashCommandBases()registers"tw-" + cmd.SlashCmd="tw-taskwing:ask"as the legacy key, but actual legacy files on disk are named usingcmd.BaseName(tw-ask.md). Since"tw-ask"is never in the managed set, old files are silently skipped and never pruned.All three issues stem from the same root cause: using
cmd.SlashCmd(the fulltaskwing:asktoken) wherecmd.BaseName(justask) is needed for filesystem operations.Confidence Score: 1/5
initializer.go, which actually writes slash command files to disk — has three distinct bugs in the new namespace logic, all caused by usingcmd.SlashCmd(containing a colon) instead ofcmd.BaseNamein filesystem operations. The tests pass because they mirror the same buggy expected-filename logic, so the test suite gives false confidence. Real-world installs on every supported AI tool would be broken or produce incorrect command names.internal/bootstrap/initializer.gorequires targeted fixes inexpectedSlashCommandFiles,managedSlashCommandBases,CreateSlashCommands(filename construction), andcreateOpenCodeCommands(validation + filename). The test fileinternal/bootstrap/mcp_healthcheck_test.goshould also be updated once the filename logic is corrected.Important Files Changed
taskwing:ask.md) breaking Claude Code namespacing and Windows compatibility; OpenCode validation regex rejectscmd.SlashCmd(contains colon), blocking all OpenCode installs; legacytw-*cleanup logic usescmd.SlashCmdinstead ofcmd.BaseNameso old files are never removed.taskwing/namespace subdirectory for command files and detect legacytw-*flat files; logic is consistent but depends on the correct filenames being written byinitializer.go(which has bugs).nsDir(namespace subdirectory) when writing test fixture files, and assertion strings updated to new MCP server name; the tests pass because they mirror the (buggy) expected-filename logic, not because the resulting filenames are correct.CanonicalServerNamechanged from"taskwing-mcp"to"taskwing",IsLegacyServerNameupdated reciprocally; logic is correct and well-structured.Implementation.Namechanged from"taskwing-mcp"to"taskwing"— straightforward, correct rename with no side effects.tw-*totaskwing:*; purely cosmetic/doc changes, no logic affected.commandarray still contains a hardcoded absolute path to a developer-specific machine path — pre-existing issue but should be addressed.tw-*totaskwing:*— no logic changes./tw-nextto/taskwing:next— correct rename in all four call sites.mcpcfg.ContainsCanonicalServerNamewhich is correctly updated innaming.go.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[taskwing bootstrap] --> B{AI Tool type?} B -->|Claude Code / Gemini TOML| C[CreateSlashCommands] B -->|OpenCode| D[createOpenCodeCommands] B -->|GitHub Copilot| E[createSingleFileInstructions] C --> F[mkdir .claude/commands/taskwing/] F --> G["Write taskwing/⚠️taskwing:ask.md\n(BUG: should be ask.md)"] G --> H[pruneStaleSlashCommands] H --> I["Scan root for tw-* files\n⚠️ BUG: 'tw-ask' not in managedBases\n→ legacy files NOT removed"] H --> J["Scan taskwing/ for stale files\n(expects taskwing:ask.md keys)"] D --> K["Validate cmd.SlashCmd\nagainst ^[a-z0-9]+(-[a-z0-9]+)*$\n⚠️ BUG: 'taskwing:ask' has colon\n→ validation FAILS, returns error"] E --> L[Write single instructions .md file] L --> M[Embed MCP config with 'taskwing' server name ✓] style G fill:#ff6b6b,color:#fff style I fill:#ff6b6b,color:#fff style K fill:#ff6b6b,color:#fff style M fill:#51cf66,color:#fffdoes not allow colons, so this check will return an error for every command on the very first iteration, making OpenCode command installation completely non-functional after this PR.
The old code passed
cmd.BaseName(e.g.,"ask"), which matched the regex. OpenCode uses flat filenames without namespacing, socmd.BaseNameis still the right field here.The same fix applies to the
filePathconstruction two lines below (line 727) and theverboseprint (line 733) — all three should referencecmd.BaseName, notcmd.SlashCmd.internal/bootstrap/initializer.go, line 516-529 (link)Colon in generated filenames breaks Claude Code namespacing
cmd.SlashCmdis"taskwing:ask"(etc.), sofileNamebecomes"taskwing:ask.md"/"taskwing:ask.toml". This produces files at.claude/commands/taskwing/taskwing:ask.md.Two concrete problems:
commands/<namespace>/<file>as/<namespace>:<file-stem>. Sotaskwing/taskwing:ask.mdwould produce/taskwing:taskwing:ask(double-namespaced), not/taskwing:ask.The comment on line 377 itself documents the correct mapping:
".claude/commands/taskwing/ask.md → /taskwing:ask". The filename insidensDirshould therefore becmd.BaseName, notcmd.SlashCmd.expectedSlashCommandFileson line 384 also needs the same fix (expected[cmd.BaseName+ext]) so the health-check stays consistent with what is actually written to disk.internal/bootstrap/initializer.go, line 389-397 (link)Legacy
tw-*.mdcleanup silently skipped — old files will never be removedmanagedSlashCommandBases()now populates the legacy entry as"tw-" + cmd.SlashCmd="tw-taskwing:ask". But files written by the previous version of TaskWing usedcmd.BaseNameas the stem, producingtw-ask.md,tw-next.md, etc.When
pruneStaleSlashCommandsscans the commands root and calculatesbase = "tw-ask", it checksmanagedBases["tw-ask"]— which is absent (the map only contains"tw-taskwing:ask"). The guard at line 418 fires, and the file is skipped, never cleaned up. Existing users upgrading from the oldtw-*commands will silently retain all stale files.internal/bootstrap/initializer.go, line 277-283 (link)Stale
SlashCommandNamesdoc comment — returns full names, not short namesThe comment says the function returns
"short names (e.g., 'ask', 'next', 'done')", but since line 281 now readsnames = append(names, cmd.SlashCmd), it actually returns fully-qualified names like"taskwing:ask","taskwing:next", etc.opencode.json, line 1-10 (link)Developer-only absolute path committed to repo
The
commandarray contains a hardcoded absolute path pointing to a specific developer's machine:Every contributor cloning this repo will have a broken local
opencode.jsonconfig. This file should either not be committed (add to.gitignore) or use the installed binary name"taskwing"directly — matching the README's recommended config:This was a pre-existing issue, but it is surfaced here again because the key was changed in this PR.
Last reviewed commit: c4da094