# knowledge-09.md — Inner Life [90]
# Patterns and lessons only — Lean Load Standard
# Last updated: 07/19/26

## Live API Paths (updated 07/17/26)
- Inbox:   backend/api/critical/inbox-api.php
- Records: backend/api/critical/records-api.php
- Knowledge: backend/knowledge/db/api.php (unchanged)
- Transfers: transfers/index.php (unchanged)
- File write: file_write_web.php (root, unchanged)
- System DB: systems/90-inner/data/api.php (unchanged)
- Old paths 301-redirect — always use new API paths directly

## Governance Files (updated 07/17/26)
- RULES-S.md → RULES-REG.md
- STANDARDS-S.md → STANDARDS-REG.md
- ORIENT-REG.md — load at step 2 every open (platform map)
- Series K EXEC_OPEN is current — Series J retired

## Patterns
- System DB api.php HTTP 500 on add_decision — workaround: direct PHP to backend/tmp/
- save.php uses --data-urlencode (not -d)
- Community inbox uses system code 09 / transfers use decade code 90
- Gov files named -09 (system code) — NEVER -90 (decade code)
- Inbox deliver for transfers uses inbox-api.php (new path) NOT transfers/index.php
- file_write_web.php large uploads: use Python urllib
- DB name is 90-sys.db (decade-named) — NOT 09-sys.db
- cmd-popup.js loads mid-body — DOMContentLoaded already fired — use immediate IIFE not listener
- WAF blocks new PHP files at systems/commands/ — Server [40] must whitelist before external calls work

## Display Labels (07/18/26)
- Decade codes in all UI: Inner Life [90] not Inner Life [09]
- System code (09) only in: inbox api system= param, gov/ file suffixes

## Master List — Task Groups (07/19/26)
56 open tasks across 16 groups. Priority order:
1. SERVER [40] first — blocks most (UPDATE auth, SYNC, CATCHUP, log-api)
2. Admin [00] decisions — T44 (backup standard), T256 (top-bar rule), T202 (pull architecture)
3. Then clusters open: BACKUP, Audit Pass 7, COMMANDS wiring
Independent (do anytime): Gym Logger, Tech [03], Daily [05], Travel [95], Hub Pages, DB Admin

Groups:
- COMMANDS-[decade].php: T98, T60, T34, T210 (4)
- BACKUP system: T44, T233, T234, T235, T264, T265, T266, T50, T48, T29 (10)
- WHITELIST + GOV files: T237, T238, T239, T218 (4)
- REG HTML pages: T219, T220, T216 (3)
- PAGE INVENTORY / AUDIT PASS 7: T192, T215, T254, T255, T256 (5)
- DB ADMIN bugs: T94, T97, T9, T57, T195 (5)
- SERVER [40] fixes: T7, T14, T46, T47, T209, T259 (6)
- DASHBOARD: T198, T214, T256 (3)
- GYM LOGGER: T59, T40 (2)
- HUB PAGES: T22, T42 (2)
- TECH [03]: T54, T30 (2)
- DAILY [05]: T12, T258 (2)
- PLATFORM INFRA: T222 (1)
- MASTER [01]: T1, T13, T199, T202 (4)
- TRAVEL [95]: T221 (1)
- CLOSE NOW: T1 (test), T260 (Series J done)

## Lessons
- gov/ directory wiped TWICE by Builder [02] hub rebuilds — check existence first at every open
- Builder writes -90 in gov paths (wrong) — fix after every Builder session
- WHITELIST-09.md shipped with 09-sys.db — corrected to 90-sys.db in v1.1
- Inbox path changed to backend/api/critical/inbox-api.php — old path is stub only
- Jurisdiction gate shows 0 even when J075/J094-J097 registered — decade/system mismatch in gate query

## WISDOM
- 07/13/26: gov/ 404 at open — seed all 5 immediately
- 07/13/26: verify identity pills and gov paths after any hub rebuild
- 07/14/26: gov/ wiped again by Builder — first action at open: check gov/ exists
- 07/14/26: query jurisdiction.db before registering — Master may have already done it
- 07/18/26: always use new API paths — old paths are stubs, not guaranteed to stay
- 07/18/26: WHITELIST shipped with wrong DB name — review all Master-generated files for Inner Life-specific errors
- 07/19/26: cmd-popup.js — DOMContentLoaded fires before script loads mid-body — always use IIFE
- 07/19/26: new PHP in systems/commands/ gets 403 until Server [40] WAFs it — log ticket immediately
- 07/21/26: - records.db real path: /home/yttcooyc/public_html/backend/records/db/records.db — NOT backend/api/critical/records.db (that one is empty). Bootstrap scripts must use the real path directly.