learning_ai_common_plat/AI.dev/PROMPTS/ecosystem-audit.md
saravanakumardb 32c7b1ba7e docs(prompts): add 14 reusable AI prompts for ecosystem-wide workflows
- roadmap-execution: phased roadmap execution with checkpoints
- new-product-scaffold: scaffold new ByteLyst product repos
- prd-to-implementation: convert PRDs to concrete plans
- cross-repo-debug: systematic multi-repo debugging
- backend-module-crud: Fastify CRUD modules (types/repo/routes/tests)
- platform-integration: wire products into common platform
- refactor-with-tests: test-first safe refactoring
- test-gap-analysis: coverage gap identification and remediation
- type-safety-sweep: TypeScript error triage and fix
- dependency-health-check: cross-repo dependency audit
- pre-release-validation: comprehensive release checklist
- docker-production-prep: production Docker images
- agents-md-sync: keep AI instruction files accurate
- ecosystem-audit: full ecosystem health dashboard
2026-05-17 16:48:58 -07:00

149 lines
4.1 KiB
Markdown

---
name: ecosystem-audit
description: 'Run a full health audit across the ByteLyst ecosystem — builds, tests, types, dependencies, config drift, and produce an actionable dashboard.'
argument-hint: 'Depth and focus, e.g. "full audit", "quick health check", "backend focus", "config drift only"'
agent: agent
---
# Ecosystem Audit Prompt
Produce a comprehensive health dashboard across all ByteLyst repos with actionable findings.
## Context — ByteLyst Ecosystem
**37 repos** in `D:\BYTELYST\CODE\`, including:
**Core platform:**
- `learning_ai_common_plat` — shared packages + services
**Active products (with backends):**
- `learning_ai_efforise` (EffoRise, port 4020)
- `learning_ai_flowmonk` (FlowMonk, port 4017)
- `learning_ai_dev_intelli` (DevIntelli, port 4021)
- `learning_ai_peakpulse` (PeakPulse, port 4010)
- `learning_ai_clock` (ChronoMind, port 4011)
- `learning_ai_jarvis_jr` (JarvisJr, port 4012)
- `learning_ai_fastgap` (NomGap, port 4013)
- `learning_multimodal_memory_agents` (MindLyst, port 4014)
**Active products (platform-only):**
- `learning_ai_auth_app` (ByteLyst Auth — no backend)
- `learning_ai_notes` (NoteLett)
- `learning_ai_trails` (ActionTrail)
**Tooling & infrastructure:**
- `learning_ai_local_llms`, `learning_ai_local_memory_gpt`
- `learning_windsurf_setup`, `learning_claude_code_setup`, `learning_sidecar_setup`
- `learning_agent_monitoring_fx`, `learning_agentic_tools_portal`
## Audit Dimensions
### 1. Build Health
For each repo with a `package.json`:
```bash
pnpm install --frozen-lockfile # Can deps resolve?
pnpm build # Does it compile?
```
### 2. Type Safety
```bash
pnpm typecheck # TypeScript clean?
```
### 3. Test Health
```bash
pnpm test --run # All tests pass?
```
Record: total tests, passing, failing, skipped.
### 4. Config Consistency
Check alignment across repos:
- `.npmrc` matches canonical template?
- `.nvmrc` specifies Node 22?
- `tsconfig.json` extends base correctly?
- `.editorconfig` present?
- `shared/product.json` correct?
- `.env.example` up to date?
### 5. Package Version Alignment
Verify shared deps are on compatible versions:
- TypeScript, Zod, Fastify, Vitest, React, Next.js
- `@bytelyst/*` packages (all on `workspace:*` or `file:`)
### 6. Security
```bash
pnpm audit
# Check for high/critical vulnerabilities
```
### 7. Documentation Currency
- AGENTS.md matches current layout?
- README.md has setup instructions?
- CLAUDE.md exists?
### 8. Git Hygiene
- Any repos with uncommitted changes?
- Any repos behind remote?
- Any repos with merge conflicts?
## Output: Ecosystem Dashboard
```markdown
# ByteLyst Ecosystem Health Dashboard
> Generated: <date>
## Executive Summary
- Repos audited: N
- 🟢 Healthy: N
- 🟡 Issues: N
- 🔴 Critical: N
## Scorecard
| Repo | Build | Types | Tests | Config | Deps | Security | Docs | Git |
|------|-------|-------|-------|--------|------|----------|------|-----|
| common_plat | ✅ | ✅ | 876/876 | ✅ | ✅ | ✅ | ✅ | clean |
| efforise | ✅ | ✅ | 65/65 | ✅ | ✅ | ⚠️ 2 | ✅ | clean |
| flowmonk | ✅ | ⚠️ 3 | 196/196 | ✅ | ✅ | ✅ | ✅ | dirty |
| ... | | | | | | | | |
## Critical Issues (Fix First)
| Repo | Issue | Impact | Fix |
|------|-------|--------|-----|
## Action Queue (Prioritized)
| # | Repo | Action | Effort | Impact |
|---|------|--------|--------|--------|
| 1 | ... | ... | S/M/L | High/Med/Low |
## Config Drift Report
| Config | Expected | Drifted Repos |
|--------|----------|--------------|
| .npmrc | canonical template | <list> |
| .nvmrc | "22" | <list> |
## Dependency Alignment
| Package | Version | Aligned | Misaligned |
|---------|---------|---------|-----------|
```
## Execution Tips
- **Start with common_plat** — it's the foundation
- **Skip node_modules-only repos** — focus on active development repos
- **Parallelize where possible** — run independent repo checks simultaneously
- **Time-box expensive checks** — if `pnpm install` takes >2min, skip and note
## Commit
```bash
# If you fix issues during audit:
cd <repo>
git add .
git commit -m "fix(<scope>): resolve audit findings
- <finding 1>
- <finding 2>"
git push
```