Install
$ agentstack add skill-notwld-engineering-baseline-adopt-existing-project ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
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 --projectfrom 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](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](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 --projectfrom 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 --projectwhen 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](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 /scripts/adoption_state.py complete --project
Do not mark complete with failing new checks, unverified migrations, missing framework evidence, or unaccepted critical/high residual risk.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: notwld
- Source: notwld/engineering-baseline
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.