LifeMate — Personal, Family & Learning Companion
test/personal-notification-settings
chore/phase1-repository-cleanup
deploy/stable-web-apk
deployment-static
design/mobile-accessibility-v2
design/mobile-navigation-review
docs/child-education-access-decision
docs/offline-data-rescue-options
docs/owner-guide-and-delivery-plan
docs/phase1-policy-options
docs/public-review-live-2026-10-15
feat/aparat-learning-library
feat/child-device-safety
feat/child-identity-schema
feat/flutter-mobile-navigation
feat/learning-content-operations
feat/local-signing-preflight
feat/online-family-stage0
feat/personal-encrypted-recovery
feat/private-planner-series-api
feat/public-review-page
feat/standalone-weekly-planner
feat/weekly-planner-android
final-feature-1/iran-family-school
fix/auth-abuse-expiry-safety
fix/auth-expiry-after-lock
fix/backend-request-safety
fix/lifeguide-bootstrap-naming-ci
fix/lifeguide-pages-qa-base-preflight
fix/lifeguide-qa-pages-env-deployment
fix/local-task-persistence
fix/managed-child-session-boundary
fix/personal-jalali-dates
fix/personal-notification-controls
fix/personal-upgrade-delivery-guard
fix/sms-approval-gates
fix/study-duration-display
infra/cloudflare-neon-migration
infra/lifeguide-cloudflare-qa
infra/lifeguide-github-pages-qa
infra/lifeguide-supabase-qa
main
phase-1/foundation-completion
phase-2/product-foundation-identity
phase-3/planner-school-family-core
phase-4/ai-learning-wellbeing
phase-5/hardening-observability-release
test/android-reminder-acceptance
test/personal-notification-settings
test/personal-recovery-acceptance
test/role-entry-apk
| 1 | #!/usr/bin/env python3 |
| 2 | """Inventory every remaining legacy-name text occurrence in tracked source.""" |
| 3 | import argparse |
| 4 | import re |
| 5 | import subprocess |
| 6 | from pathlib import Path |
| 7 | |
| 8 | parser = argparse.ArgumentParser() |
| 9 | parser.add_argument('--check', action='store_true') |
| 10 | args = parser.parse_args() |
| 11 | files = subprocess.check_output(['git', 'ls-files', '-z']).decode().split('\0') |
| 12 | rows, errors = [], [] |
| 13 | active_docs = {'README.md', 'AGENTS.md', 'PROJECT_STATE.md', 'CHANGELOG.md'} |
| 14 | for name in filter(None, files): |
| 15 | p = Path(name) |
| 16 | if not p.is_file() or name == 'docs/audits/2026-10-08-naming.md': continue |
| 17 | raw = p.read_bytes() |
| 18 | if b'\0' in raw: continue |
| 19 | for line_no, line in enumerate(raw.decode('utf-8', errors='replace').splitlines(), 1): |
| 20 | if not re.search('lifemate', line, re.I): continue |
| 21 | historical = name.startswith(('docs/history/', 'docs/final/', 'docs/plans/', 'docs/ux/', 'docs/product/', 'docs/quality/', 'docs/safety/', 'docs/architecture/', 'docs/superpowers/')) or name == 'docs/ROADMAP.md' or name.startswith('docs/audits/') or name in {'docs/decisions/0005-backend-supabase.md', 'docs/decisions/0006-provider-neutral-postgresql-backend.md'} |
| 22 | internal = re.search(r'LifeMateApp|_LifeMateAppState|davoodmehraban89/LifeMate|/LifeMate|apps/lifemate|package:lifemate|lifemate[-_]|\blifemate\b|LIFEMATE', line) |
| 23 | if historical: |
| 24 | category, reason = 'historical — keep', 'snapshot/previous decision; not current deployment evidence' |
| 25 | elif internal: |
| 26 | category, reason = 'protocol-sensitive/internal — keep', 'repository/path/package/resource or JWT/service/test compatibility' |
| 27 | else: |
| 28 | category, reason = 'user-facing — change', 'legacy display name requires review' |
| 29 | errors.append(f'{name}:{line_no}') |
| 30 | # Display declarations must never hide behind adjacent internal paths. |
| 31 | if name.startswith(('apps/lifemate/lib/', 'apps/lifemate/web/', '.github/workflows/')) and re.search(r"['\"][^'\"]*\bLifeMate\b[^'\"]*['\"]", line) and not re.search(r'LifeMateApp|package:', line): |
| 32 | category, reason = 'user-facing — change', 'legacy label/literal in active client or workflow' |
| 33 | errors.append(f'{name}:{line_no}') |
| 34 | snippet = line.strip().replace('|', '\\|').replace('`', "'")[:220] |
| 35 | rows.append(f'| {name}:{line_no} | {category} | {reason} | {snippet} |') |
| 36 | if args.check: |
| 37 | if errors: raise SystemExit('Unchanged user-facing legacy name:\n' + '\n'.join(sorted(set(errors)))) |
| 38 | print(f'Naming audit passed: {len(rows)} retained text occurrences classified; binary fonts/icons excluded.') |
| 39 | else: |
| 40 | Path('docs/audits/2026-10-08-naming.md').write_text('# LifeGuide — remaining legacy-name inventory\n\nGenerated with `python3 scripts/audit-naming.py` from tracked source. Product displays are LifeGuide; repository/schema/JWT/internal compatibility and historical evidence retain their original names. Rows classify every remaining case-insensitive legacy-name line; repeated occurrences on that line share its classification. Binary fonts/icons are not text. This inventory excludes itself.\n\n| Location | Classification | Reason | Source excerpt |\n| --- | --- | --- | --- |\n' + '\n'.join(rows) + '\n') |
| 41 | print(f'Wrote {len(rows)} classified rows; {len(set(errors))} display-name review items.') |