بنقرة واحدة
speckit-brownfield-migrate
Incrementally adopt SDD for existing features with reverse-engineered specs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Incrementally adopt SDD for existing features with reverse-engineered specs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Generate spec-kit configuration tailored to the existing codebase
Auto-discover project structure, tech stack, frameworks, and architecture patterns
Verify bootstrap output matches actual project structure and conventions
Use for all development work on plugins built with WPBoilerplate/wordpress-plugin-boilerplate: hooks via the Loader singleton, PSR-4 namespace layout, security baseline (nonces/capabilities/escaping), settings API, REST endpoints, lifecycle, i18n, multisite, performance, and the @wordpress/scripts build pipeline.
Use when implementing custom database tables in WordPress plugins with berlindb/core. Covers Schema/Table/Row/Query class wiring, the allow_null gotcha, upsert return-value handling, JSON column encoding, tri-state tinyint columns, and all failure modes discovered in production use.
Audit a WordPress plugin's REST surface and produce a standardized audit document proposing Abilities API registrations. Produces a markdown doc with a YAML schema and prose sections that humans and agents can both consume when planning a registration rollout. Works on any WP plugin.
| name | speckit-brownfield-migrate |
| description | Incrementally adopt SDD for existing features with reverse-engineered specs |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"brownfield:commands/speckit.brownfield.migrate.md"} |
Reverse-engineer spec-kit artifacts (spec.md, plan.md, tasks.md) for features that were built before spec-kit was adopted. This brings existing work into the SDD workflow so teams can track, refine, and extend features using spec-kit commands.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). The user may specify a feature or module to migrate (e.g., "auth system", "payments module"), a branch name, or "all" to migrate everything.
.specify/ directory/speckit.brownfield.bootstrap first if missing)Identify migration targets: Determine what to migrate based on user input:
| Input | Action |
|---|---|
| Specific feature name | Locate the feature in the codebase by searching for related files, modules, or directories |
| Specific branch name | Analyze the branch's commits and changed files to identify the feature scope |
| Module path | Treat the entire module as a single feature to migrate |
all | List all identifiable features and let the user select which to migrate |
| No input | Show a list of detected features and ask the user to pick one |
Detect feature boundaries: For each migration target, determine its scope:
Reverse-engineer spec.md: Analyze the code to reconstruct what the feature does:
status: migrated to distinguish from specs created through the normal workflowReverse-engineer plan.md: Reconstruct the implementation approach:
Reverse-engineer tasks.md: Create a task list reflecting what was actually built:
[x] (completed) since the feature already existsCreate feature branch and artifacts: For each migrated feature:
specs/{feature-name}/spec.md, plan.md, and tasks.md into the feature directoryPresent migration plan: Show what will be created before writing:
# Migration Plan: User Authentication
## Detected Scope
| Category | Files | Lines |
|----------|-------|-------|
| Source | 8 files | ~420 lines |
| Tests | 3 files | ~180 lines |
| Migrations | 2 files | ~45 lines |
## Artifacts to Generate
| File | Content |
|------|---------|
| `specs/user-auth/spec.md` | 4 user scenarios, 12 requirements, 6 success criteria |
| `specs/user-auth/plan.md` | 3 implementation phases, 8 technical decisions |
| `specs/user-auth/tasks.md` | 14 tasks (all completed), 2 gaps identified |
## Gaps Found
- ⚠️ No error handling tests for expired tokens
- ⚠️ No rate limiting on login endpoint
Proceed with migration?
Execute migration: After user confirmation, write all artifacts.
Report:
# Migration Complete: User Authentication
| Artifact | Status |
|----------|--------|
| spec.md | ✅ Created — 4 scenarios, 12 requirements |
| plan.md | ✅ Created — 3 phases |
| tasks.md | ✅ Created — 14/14 tasks complete |
## Identified Gaps
1. No error handling tests for expired tokens → consider `/speckit.specify` for a follow-up feature
2. No rate limiting on login endpoint → consider `/speckit.bugfix.report` to track
## Next Steps
- Review generated artifacts in `specs/user-auth/`
- Use `/speckit.refine.update` to adjust any inaccurate specs
- Use `/speckit.specify` for new features — they'll follow the same SDD workflow
- Run `/speckit.brownfield.migrate` again for additional features
status: migrated to distinguish from fresh specs