skills/housekeeping/SKILL.md
Usage `rdc:housekeeping [--fix]` — Weekly maintenance audit: directory structure verification, PUBLISH.md URL validation, CLAUDE.md freshness, orphan detection, places compliance, and stale version scan. Produces `.rdc/reports/YYYY-MM-DD-housekeeping.md`. With `--fix`, auto-remediate safe issues.
npx skillsauth add LIFEAI/rdc-skills rdc:housekeepingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
⚠️ OUTPUT CONTRACT (READ FIRST):
guides/output-contract.mdChecklist-only output. No tool-call narration. No raw MCP/JSON/log dumps. One checklist upfront, updated in place, shown again at end with a 1-line verdict.
If dispatching subagents or running as a subagent: read
{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.mdfirst (fallback:{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md), then{PROJECT_ROOT}/.rdc/guides/engineering-behavior.md(fallback:{PROJECT_ROOT}/.rdc/guides/engineering-behavior.md).
Sandbox contract: This skill honors
RDC_TEST=1perguides/agent-bootstrap.md§ RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag.
workspace-intelligence-auditrdc:overnight as a pre-flight if --housekeeping flag setrdc:housekeeping — audit only, report issuesrdc:housekeeping --fix — auto-remediate safe issues (scaffold missing CLAUDE.md, fix PUBLISH.md URLs, create missing tracker dirs)Scan every deployable target for required files:
For each dir in apps/*, sites/*, models/*, workers/*, mcp-servers/*, packages/*:
| Target Type | Required Files |
|-------------|---------------|
| Next.js app (apps/* with next.config) | package.json, CLAUDE.md, PUBLISH.md, tsconfig.json |
| Vite SPA (models/*, sites/* with vite.config) | package.json, CLAUDE.md, PUBLISH.md, vite.config.js or .ts, dist/ |
| Static site (sites/* no vite/next) | index.html, CLAUDE.md, PUBLISH.md |
| Worker (workers/*) | package.json, CLAUDE.md, wrangler.toml, src/index.ts |
| MCP server (mcp-servers/*) | package.json, CLAUDE.md, ARCHITECTURE.md, PUBLISH.md |
| Package (packages/*) | package.json, CLAUDE.md, tsconfig.json, src/ |
Report: PASS / MISSING: <file list> per target.
With --fix: Scaffold missing CLAUDE.md files using package.json description + src/ inspection (same pattern as the 2026-06-08 audit). Do NOT auto-create PUBLISH.md (requires domain knowledge).
For every PUBLISH.md that exists:
entity_slug, environments, statusapp_deployments for the slug:
SELECT app_slug, environment, url, host_type FROM app_deployments WHERE app_slug = '<slug>';
app_deployments.url for that environment.claude/rules/domain-conventions.md):
*.dev.place.fund (dev) / *.place.fund (prod)dev.<brand> (dev) / <brand> (prod)*.dev.regendevcorp.com (dev) / *.regendevcorp.com (prod)MISMATCH: PUBLISH.md says <X>, app_deployments says <Y>With --fix: Update PUBLISH.md URLs to match app_deployments (the DB is the source of truth).
For each package with a CLAUDE.md:
STALE: CLAUDE.md older than src/ by <N> dayssrc/index.ts that aren't mentioned in CLAUDE.mdWith --fix: Re-scaffold CLAUDE.md from current src/ state.
For each package:
version — flag 0.0.0 or 0.1.0 on packages with >5 src files as potentially staleexports field exists (required for monorepo packages)name matches @regen/<dir-name> or @lifeai/<dir-name> conventionFor each directory under places/:
schema_version, prt_slug, project_type, research_status).claude/rules/history-md-convention.md)corpus/INDEX.md existstracker/ directory exists with DECISIONS.md + MILESTONES.mdartifacts/ directory existsWith --fix: Scaffold missing PLACE.md from HISTORY.md frontmatter, create missing tracker/corpus dirs.
C:/Dev/ for repos that have monorepo copies and compare versionsstatus='down' or status='broken'Query Coolify API for apps serving .dev.* URLs — these should be on PM2 per domain conventions:
TOKEN=$(curl -s http://127.0.0.1:52437/v/coolify-api)
curl -s -H "Authorization: Bearer $TOKEN" "https://deploy.regendevcorp.com/api/v1/applications" | \
python3 -c "import sys,json; [print(a['name'], a.get('fqdn','')) for a in json.load(sys.stdin) if '.dev.' in (a.get('fqdn',''))]"
Flag any .dev apps still on Coolify.
Read workers/media-cdn/src/index.ts ALLOWED_SUFFIXES. Cross-reference against all class-A brand domains from app_deployments:
SELECT DISTINCT url FROM app_deployments WHERE host_type = 'coolify' AND url NOT LIKE '%.place.fund' AND url NOT LIKE '%.regendevcorp.com';
Flag any class-A domain NOT in ALLOWED_SUFFIXES.
With --fix: Add missing suffixes to ALLOWED_SUFFIXES and redeploy the worker.
Write to .rdc/reports/YYYY-MM-DD-housekeeping.md:
# Housekeeping Report — YYYY-MM-DD
## Summary
| Check | Pass | Fail | Fixed |
|-------|------|------|-------|
## Directory Structure
<table of targets with issues>
## PUBLISH.md URL Validation
<table of mismatches>
## CLAUDE.md Freshness
<stale entries>
## Package Health
<version/exports/naming issues>
## Places Compliance
<incomplete places>
## Orphans
<empty dirs, dead deployments>
## Media CDN
<missing allowlist entries>
## Verdict: CLEAN / HAS_ISSUES
Read all .rdc/lessons/*.md with status: open (schema + procedure: .rdc/guides/lessons-learned-spec.md § Triage procedure). Cluster by area + root-cause similarity (dedupe repeats into one fix). For each cluster:
scope: simple → apply the fix directly (rule line, skill-doc edit, config, guard), commit it, set the lesson(s) status: applied with the commit linked.scope: architectural → do NOT edit. Present the issue + options via AskUserQuestion (per .claude/rules/architectural-change-approval.md). On approval, apply via the correct lifecycle (rdc-skills tag/push for skills; cited commit for rules) and set status: applied. If deferred, set status: triaged and spawn a work_item.status: wont-fix with a one-line reason.Never delete lesson files — applied and wont-fix stay as the audit trail. Report captured / applied / escalated / deferred counts in the housekeeping report.
pnpm build — not needed for this audit--fix flag only auto-remediates safe issues (CLAUDE.md scaffold, missing dirs, URL alignment)development
Read recent enhancement-log entries, cluster failures by pattern, generate candidate verifier rules, test them against the known-good corpus and the failure corpus, and propose pull requests adding the highest-confidence rules to forbidden-patterns.json. Use this skill on a nightly cadence (3 AM PT), or manually when the user says "extract verifier rules", "promote enhancement log", "what new rules should we add", or after a significant brochure run produced many failures.
testing
Orchestrate a Brochurify job from source ingest through delivered PDF, using six parallel-dispatched typed sub-agents and the convergence loop. Use this skill EVERY TIME the user invokes Brochurify directly via "brochurify this", "make a brochure from", "convert this to a brochure PDF", or "rdc:brochurify". Also runs automatically when a job arrives from the broker via monkey_dispatch. The skill enforces D-001 through D-016 from the brochurify DECISIONS-LOG.
devops
The mandatory contract for authoring brochure JSX using @lifeai/brochure-kit. Use this skill EVERY TIME any AI engine (Claude, Cursor, Copilot, /design, Cowork, v0) generates JSX intended for the Brochurify pipeline — whether the user says "write a brochure," "make a one-pager," "draft a PDF report," or any equivalent. Also trigger when a file imports from @lifeai/brochure-kit. Failing to read this skill before authoring is a defect.
tools
Convert Office documents to/from Markdown with the build-corpus CLI: .docx/.pptx/.ppt → Markdown (Word OMML equations become KaTeX-readable TeX; tables, images, headings preserved), and Markdown → Word (.docx) where inline $...$ and display $$...$$ LaTeX become NATIVE Office Math (OMML) that Word renders as real equations. Use this skill whenever the user asks to convert a Word/PowerPoint document to Markdown, build a Markdown corpus from Office files, turn Markdown into a .docx (optionally with a .dotx template), or "open the report" to edit. Install build-corpus straight from GitHub and run it in the session.