Skip to content

refactor(cli): remove bogus .please legacy migration#42

Merged
amondnet merged 1 commit into
mainfrom
amondnet/innovative-lingonberry
Apr 9, 2026
Merged

refactor(cli): remove bogus .please legacy migration#42
amondnet merged 1 commit into
mainfrom
amondnet/innovative-lingonberry

Conversation

@amondnet

@amondnet amondnet commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes migrate-legacy.ts and its test file entirely
  • Drops all 4 call sites of migrateLegacyWorkspace from index.ts (add, sync, list, remove commands)

Rationale

.please/ is the active workspace metadata directory used by this repo for tracks, specs, and decisions — it is not a legacy ASK layout. The migrateLegacyWorkspace function 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 build passes with no type errors
  • ask docs add, ask docs sync, ask docs list, ask docs remove no longer emit any .please migration warning
  • No regression in existing CLI tests

Summary by cubic

Removed the bogus .please legacy 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

    • Stop emitting the legacy migration warning when .please/ exists.
  • Refactors

    • Remove migrate-legacy.ts and its test.
    • Drop migrateLegacyWorkspace calls from add, sync, list, and remove.

Written for commit 91822e2. Summary will update on new commits.

.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

codecov Bot commented Apr 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ask-registry with  Cloudflare Pages  Cloudflare Pages

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

View logs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading

@amondnet amondnet self-assigned this Apr 9, 2026
@amondnet
amondnet merged commit 372e5e1 into main Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant