Adopt existing project
Skill notwld/engineering-baseline/skills/adopt-existing-project
Production-grade engineering skills for Cursor and Claude Code, full-stack architecture, TDD, security, Docker, queues, caching, and consistent UI.
npx -y skills add notwld/engineering-baseline --skill adopt-existing-projectAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 25 days oldThe repository was created 25 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Safely adopt, audit, production-harden, restructure, or refactor an existing application after Engineering Baseline is installed. Use on first run when `.engineering-baseline-lock.json` has `adoption.status: pending`, and whenever a user asks to make an existing repository production-ready, apply all baseline/security frameworks, correct its directory structure, reduce complexity with Ponytail, or introduce Superpowers without breaking behavior. Begin with read-only context gathering, present findings and required questions, and make no project changes until the user explicitly approves a proposed plan.
SKILL.md
7.6 KB, as published. Nobody here has run it
Adopt an Existing Project
Existing applications require migration, not scaffolding. Preserve behavior and data while moving toward the production contract incrementally.
Gate 0 — Check adoption state
Read .engineering-baseline-lock.json first.
pending: run this skill before any application implementation or refactor.approved: execute only the approved plan and scope.in_progress: resume from recorded plan/checkpoint; do not restart discovery.complete: use the normal Engineering Baseline workflow unless the user asks for a new full assessment.not_required: the project was empty/new when installed; use Production Full-Stack for creation.
If the file is absent but the repository contains an existing application,
treat adoption as pending.
Gate 1 — Read-only discovery
Until the user approves a plan, do not edit, create, move, rename, format or delete project files. Do not install dependencies, run migrations, start containers, execute application scripts, or invoke autofix tools. Read-only inspection and safe version/status commands are allowed.
- Confirm the repository root and current working directory. Never assume the folder containing this skill is the application root.
- Run
scripts/inspect_project.py --project <root>from this skill and inspect the relevant files it identifies. - Read repository instructions, README, manifests, lockfiles, entry points, source layout, tests, schemas/migrations, CI, Docker/deployment, environment examples, generated contracts and security documentation.
- Inspect Git status and preserve all existing user changes.
- Map runtime components, data stores, integrations, trust boundaries, public APIs, persisted data, authentication/authorization and deployment assumptions.
- Identify existing commands for build, test, lint, typecheck, migrations and local startup, but do not execute them before approval.
Read references/discovery.md for the complete inventory.
Gate 2 — Present assessment and ask questions
Before modifying anything, respond in chat with:
- Current architecture and directory map.
- Existing behavior and compatibility surfaces that must be preserved.
- Production-readiness gaps against Production Full-Stack.
- Security gaps across every required framework—not a generic summary.
- Ponytail opportunities: deletion, reuse, dependency reduction, duplication removal and simpler native/platform alternatives.
- Relevant Superpowers workflows for each proposed phase.
- A risk-ordered, reversible migration plan with files/areas affected.
- The minimum unanswered questions needed to proceed.
Ask questions that materially change architecture, compatibility, security, deployment or migration. Do not silently choose on the user's behalf. Use references/questions-and-plan.md.
End with an explicit approval request. Silence, an unrelated reply, or approval of only one decision is not approval of the whole plan.
Gate 3 — Record approval and establish safety net
Only after explicit approval:
- Run
scripts/adoption_state.py approve --project <root>from this skill. - Use Superpowers brainstorming/writing-plans to turn the approved proposal into a checkpointed implementation plan.
- Use a feature branch or Superpowers worktree workflow unless the user declines or the environment cannot support it.
- Record baseline build/test/lint/typecheck behavior. If existing checks fail, separate pre-existing failures from new regressions.
- Add characterization/contract tests around public APIs, critical workflows, authorization, persisted data and integration boundaries before refactoring.
- Back up or rehearse migration/rollback for stateful or irreversible changes.
- Run
scripts/adoption_state.py start --project <root>when implementation begins.
Gate 4 — Incremental migration
Use small independently verifiable changes. Do not combine directory moves, behavior changes, security rewrites and cosmetic refactors in one step.
Order by dependency and risk:
- Characterization tests and observability needed to detect regressions.
- Ponytail cleanup proven behavior-neutral.
- Critical/high security fixes and server-side policy enforcement.
- Configuration, secrets, error handling, logging, rate limits and audit events.
- Queue/worker, caching, pagination and resource/concurrency boundaries.
- Directory/architecture migration with compatibility adapters where needed.
- Docker/Compose, CI/CD, operations, backup/restore and production evidence.
- Impeccable frontend consistency and accessibility improvements.
For each step use the relevant Superpowers skill:
systematic-debuggingfor failures or unexpected behavior.test-driven-developmentfor fixes and new behavior.executing-plansorsubagent-driven-developmentonly when available and suitable; never claim subagents that the host does not provide.requesting-code-reviewafter each meaningful phase.verification-before-completionbefore every completion claim.finishing-a-development-branchwhen the approved work is complete.
Read references/migration-and-verification.md.
Framework enforcement for existing code
Security Review is mandatory during discovery and after every phase:
- STRIDE: evaluate all six categories for every component/data flow/trust boundary; record threats, mitigations, verification and residual risk.
- OWASP ASVS 5.0.0 Level 2: build a requirement-level matrix from the official Level 2 catalog. Record every applicable requirement ID as pass/fail/N/A with reason and evidence. Chapter-level prose is not compliance.
- OWASP Top 10:2025: assess all ten categories plus the explicit SSRF gate.
- NIST CSF 2.0: record Govern, Identify, Protect, Detect, Respond and Recover outcomes, owners and gaps.
- Zero Trust: verify each protected resource/action server-side; do not trust network location, frontend state, cookies, headers, parameters or bodies.
Do not say frameworks were applied unless the matrices and verification evidence exist. Scanners supplement manual verification; they do not replace it.
Ponytail refactor contract
Ponytail may reduce code only after behavior is protected by tests or equivalent evidence. Preserve public APIs, response contracts, database semantics, events, security controls, accessibility and error behavior unless the approved plan explicitly changes them. Prefer deletion and reuse, but never trade away correctness, security, observability or compatibility.
Completion
Run all baseline and new checks, review the final diff, rehearse rollback where needed, update documentation/evidence, and show results. Then run:
python3 <this-skill-dir>/scripts/adoption_state.py complete --project <root>
Do not mark complete with failing new checks, unverified migrations, missing framework evidence, or unaccepted critical/high residual risk.