Existing Project Audit
Purpose
Understand what already exists before changing it. Produce an accurate picture of the repository — structure, stack, applications, tests, security posture, and state — that requirements, application, and stack decisions can rely on.
When to Use
- Any request against an existing codebase (enhancement, feature, bug, refactor, migration, review).
- Before recommending changes or a stack for an existing repo.
- Not for greenfield work (record "greenfield" and skip).
Inputs
- Read access to the repository.
- The classified request (to scope the audit).
Discovery Questions
- Which parts of the repo are in scope for this request?
- Are there known problem areas, recent incidents, or fragile modules?
- What is the current build/test/deploy story?
Responsibilities
- Inventory structure (apps, packages, modules, entry points).
- Detect the stack actually in use (frameworks, DB, data layer, testing tools).
- Identify applications present (mobile/web/dashboard/backend/worker/etc.).
- Assess tests (levels, tools, coverage signal).
- Assess security posture at a high level (secrets, auth, exposure) — flag, don't fix here.
- Determine implementation state (what's done, in-progress, stubbed).
- Record findings; do not edit code during the audit.
Required Workflow
- Scope the audit to the request.
- Map structure and entry points.
- Detect stack and applications from manifests/config/code, and record the technology baseline: installed versions from lock files (not ranges), runtime version (
engines, .nvmrc, Docker/CI images), build tooling. Run agentflow drift (npm) or the ecosystem's audit, and quote it. The audit changes no code, but it does not leave findings as notes: a vulnerability affecting the project is escalated at once — opened through bug intake at P0/P1 with its smallest safe version — and an end-of-life runtime becomes a migration work item, both separate from the current request, which continues (../../system/TECHNOLOGY_GOVERNANCE_RULES.md §4). Newer-but-supported versions are reported as available, not recommended.
- Survey tests and CI.
- Note security-relevant signals (hand deep analysis to
security-review).
- Summarize state and risks in
../../projects/current/ / ../../generated/audits/.
Decision Rules
- Report what the repo proves, separate from what you infer.
- If the request is small, scope the audit to the affected area — don't audit the whole repo needlessly.
- Deep security/performance analysis is delegated (
security-review, performance-review), not done here.
Rules
- Read-only: no edits during the audit.
- Do not print discovered secret values — flag location/type, redacted (
../../system/SECURITY_RULES.md).
- Ground later stages in findings, not guesses.
Anti-Patterns
- Proposing changes before understanding the current state.
- Auditing the entire monorepo for a one-file fix.
- Treating inferences as confirmed facts.
Validation Checklist
Definition of Done
A recorded audit (scoped to the request) covering structure, stack, applications, tests, security signals, and state — with confirmed vs inferred separated — ready to inform requirements, applications, and stack.
Related Skills
request-classification, requirements-analysis, application-selection, stack-recommendation, dependency-audit, environment-audit, security-review, performance-review.
Related Knowledge
../../knowledge/ (existing architecture notes, if any).
Related References
None typically; a stack reference folder only if an unfamiliar framework is present.
Context Loading Guidance
- Requires: repository read access, the classified request.
- Does not require: the full stack decision space, unrelated references, or every skill.
- May load:
dependency-audit, environment-audit for deeper inventory; security-review for posture.
- Stop when: the scoped audit is recorded.
Token Efficiency Guidance
Read entry points, manifests, and config first; sample representative files rather than reading everything. Summarize into findings; don't paste large files into the record.
1---2name: existing-project-audit3description: Use when a codebase already exists, before proposing any changes. It inventories structure, stack, applications present, tests, security posture, and implementation state so planning is grounded in reality rather than assumptions.4metadata:5 source: https://skillmd.com/skills/ahtishamshahzad/existing-project-audit6---78# Existing Project Audit910## Purpose1112Understand what already exists before changing it. Produce an accurate picture of the repository — structure, stack, applications, tests, security posture, and state — that requirements, application, and stack decisions can rely on.1314## When to Use1516- Any request against an existing codebase (enhancement, feature, bug, refactor, migration, review).17- Before recommending changes or a stack for an existing repo.18- **Not** for greenfield work (record "greenfield" and skip).1920## Inputs2122- Read access to the repository.23- The classified request (to scope the audit).2425## Discovery Questions2627- Which parts of the repo are in scope for this request?28- Are there known problem areas, recent incidents, or fragile modules?29- What is the current build/test/deploy story?3031## Responsibilities3233- Inventory **structure** (apps, packages, modules, entry points).34- Detect the **stack** actually in use (frameworks, DB, data layer, testing tools).35- Identify **applications present** (mobile/web/dashboard/backend/worker/etc.).36- Assess **tests** (levels, tools, coverage signal).37- Assess **security posture** at a high level (secrets, auth, exposure) — flag, don't fix here.38- Determine **implementation state** (what's done, in-progress, stubbed).39- Record findings; do **not** edit code during the audit.4041## Required Workflow42431. Scope the audit to the request.442. Map structure and entry points.453. Detect stack and applications from manifests/config/code, and record the **technology baseline**: installed versions from lock files (not ranges), runtime version (`engines`, `.nvmrc`, Docker/CI images), build tooling. Run `agentflow drift` (npm) or the ecosystem's audit, and quote it. The audit changes no code, but it does **not** leave findings as notes: a **vulnerability affecting the project is escalated at once** — opened through bug intake at P0/P1 with its smallest safe version — and an end-of-life runtime becomes a migration work item, both separate from the current request, which continues (`../../system/TECHNOLOGY_GOVERNANCE_RULES.md` §4). Newer-but-supported versions are reported as available, not recommended.464. Survey tests and CI.475. Note security-relevant signals (hand deep analysis to `security-review`).486. Summarize state and risks in `../../projects/current/` / `../../generated/audits/`.4950## Decision Rules5152- Report what the repo **proves**, separate from what you **infer**.53- If the request is small, scope the audit to the affected area — don't audit the whole repo needlessly.54- Deep security/performance analysis is delegated (`security-review`, `performance-review`), not done here.5556## Rules5758- Read-only: no edits during the audit.59- Do not print discovered secret values — flag location/type, redacted (`../../system/SECURITY_RULES.md`).60- Ground later stages in findings, not guesses.6162## Anti-Patterns6364- Proposing changes before understanding the current state.65- Auditing the entire monorepo for a one-file fix.66- Treating inferences as confirmed facts.6768## Validation Checklist6970- [ ] Structure and entry points mapped.71- [ ] Stack and applications detected.72- [ ] Tests and CI surveyed.73- [ ] Security signals flagged (redacted).74- [ ] Implementation state and risks recorded.75- [ ] No code edited.7677## Definition of Done7879A recorded audit (scoped to the request) covering structure, stack, applications, tests, security signals, and state — with confirmed vs inferred separated — ready to inform requirements, applications, and stack.8081## Related Skills8283`request-classification`, `requirements-analysis`, `application-selection`, `stack-recommendation`, `dependency-audit`, `environment-audit`, `security-review`, `performance-review`.8485## Related Knowledge8687`../../knowledge/` (existing architecture notes, if any).8889## Related References9091None typically; a stack reference folder only if an unfamiliar framework is present.9293## Context Loading Guidance9495- **Requires:** repository read access, the classified request.96- **Does not require:** the full stack decision space, unrelated references, or every skill.97- **May load:** `dependency-audit`, `environment-audit` for deeper inventory; `security-review` for posture.98- **Stop when:** the scoped audit is recorded.99100## Token Efficiency Guidance101102Read entry points, manifests, and config first; sample representative files rather than reading everything. Summarize into findings; don't paste large files into the record.