fix: remove orphaned devai bootstrap shim from skeleton src#137
Merged
Conversation
The skeleton shipped src/Prompts/{DevAiPrompt,PostCreateHook}.php — a
half-built "offer to install marko/devai on create-project" bootstrap.
It was never wired up:
- no scripts.post-create-project-cmd entry to invoke it (never added)
- no PSR-4 autoload in the shipped skeleton composer.json, so the classes
weren't even loadable in a generated project
- only references anywhere were the classes' own unit tests
Because src/Prompts/ wasn't export-ignored, composer create-project copied
it into every new project as dead code under the user's own src/ namespace.
The real devai install machinery already lives in marko/devai
(InstallCommand, InstallationOrchestrator, StdinPrompter); this shim
duplicated the prompt logic and delegated to `marko devai:install` anyway.
Removes the two src classes plus their tests, and drops the now-dead
Marko\Skeleton\ src autoload-dev mapping (the directory no longer exists).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
Creating a new project from
marko/skeleton(e.g.composer create-project) left an unexpectedsrc/Prompts/directory in the generated app, containingDevAiPrompt.phpandPostCreateHook.php(namespaceMarko\Skeleton\Prompts).Root cause
These were a half-built bootstrap shim meant to offer "Install marko/devai for AI-assisted development? [Y/n]" during project creation, then run
composer require --dev marko/devaiand hand off tomarko devai:install. The feature was never finished:scripts.post-create-project-cmdentry was ever added (confirmed viagit log -S), so the hook never ran.composer.jsonhas no PSR-4autoloadblock, soMarko\Skeleton\Prompts\*couldn't even load in a generated project.Because
src/Prompts/wasn'texport-ignored,composer create-projectcopied it into every new project as dead code sitting in the user's ownsrc/namespace.Why not move it into marko/devai?
It can't live there — a package can't bootstrap its own installation (devai isn't a default dependency; it's only in the skeleton
suggestblock). The bootstrap role is legitimately skeleton-side. But the real prompt/install machinery already exists and is properly tested inmarko/devai(InstallCommand,InstallationOrchestrator,StdinPrompter/ConfirmationPrompterInterface); this shim just reimplemented the prompt and delegated tomarko devai:install.Change
packages/skeleton/src/Prompts/{DevAiPrompt,PostCreateHook}.phpand their tests underpackages/skeleton/tests/Unit/Prompts/.Marko\Skeleton\→packages/skeleton/src/autoload-dev mapping from the rootcomposer.json(the directory no longer exists).No working functionality is lost. If the create-time devai prompt is wanted later, it should be implemented properly as a
post-create-project-cmdscript that calls into devai's existing installer.Verification
composer dump-autoload— clean, no warnings.🤖 Generated with Claude Code