refactor(cli): remove bogus .please legacy migration#42
Merged
Conversation
.please/ is the active workspace metadata directory for tracks, specs, and decisions — it is not a legacy ASK layout. The migrateLegacyWorkspace function incorrectly flagged any project containing .please/ and emitted a misleading "ASK legacy layout detected" warning. Since there is no actual legacy layout to migrate from, the migration code path was unreachable in practice. Remove migrate-legacy.ts and its test file, and drop all four call sites from index.ts.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Deploying ask-registry with
|
| Latest commit: |
91822e2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d9232cf0.ask-registry.pages.dev |
| Branch Preview URL: | https://amondnet-innovative-lingonbe.ask-registry.pages.dev |
Contributor
There was a problem hiding this comment.
No issues found across 3 files
Auto-approved: Removes incorrect legacy migration logic that was causing false positive warnings; purely reductive change that eliminates unused and misleading code from core command paths.
Architecture diagram
sequenceDiagram
participant User as User / Shell
participant CLI as CLI Entry (index.ts)
participant FS as Local Filesystem
participant Config as Config Loader (io.js)
Note over CLI, FS: Refactored Workflow: Standard Command Execution
User->>CLI: ask docs [add | sync | list | remove]
CLI->>CLI: Identify project directory (cwd)
Note over CLI, FS: CHANGED: No longer checks for or migrates .please/ directory
alt Command: add / sync
CLI->>Config: loadConfig(projectDir)
Config->>FS: Read .ask/config.json
FS-->>Config: config data
Config-->>CLI: Config Object
opt Command: sync
CLI->>FS: readLock(projectDir)
FS-->>CLI: lockfile data
end
CLI->>CLI: Execute core business logic
else Command: list
CLI->>FS: listDocs(projectDir)
FS-->>CLI: list of downloaded entries
CLI-->>User: Output table of docs
else Command: remove
CLI->>CLI: parseSpec(args.spec)
CLI->>CLI: removeSkill(...)
CLI->>FS: Update filesystem/config
end
Note over CLI, FS: .please/ directory is now ignored as a legacy source
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
migrate-legacy.tsand its test file entirelymigrateLegacyWorkspacefromindex.ts(add,sync,list,removecommands)Rationale
.please/is the active workspace metadata directory used by this repo for tracks, specs, and decisions — it is not a legacy ASK layout. ThemigrateLegacyWorkspacefunction incorrectly detected any project containing.please/and emitted a misleading"ASK legacy layout detected"warning. The migration code path was unreachable in practice because.please/is never an old ASK location.Test Plan
bun run --cwd packages/cli buildpasses with no type errorsask docs add,ask docs sync,ask docs list,ask docs removeno longer emit any.pleasemigration warningSummary by cubic
Removed the bogus
.pleaselegacy migration in the CLI to stop false “ASK legacy layout detected” warnings..please/is the active workspace dir, so the migration was unused and misleading.Bug Fixes
.please/exists.Refactors
migrate-legacy.tsand its test.migrateLegacyWorkspacecalls fromadd,sync,list, andremove.Written for commit 91822e2. Summary will update on new commits.