Notechondria — Long-Form Agent Handoff
Project-local agent rules and the open-work / caution list. The
canonical cross-project rules live in the
AGENTS.md/ submodule (pinned to
Trance-0/AGENTS.md).
Read in order:
AGENTS.md/AGENTS.md— shared dev contract (tone, scope discipline, per-stack expectations, commit rules).- §0 below — project-specific overrides that beat the shared contract when they conflict.
- The rest of this file — repo map + open-work list.
readme.md— human-facing project overview.client/andserver/backend.md— the per-component deep dives (three frontend apps + backend).../LLM_CHECK.md— end-of-round checklist.
0. Project-specific overrides
Rules in this section override the shared ruleset in
AGENTS.md/AGENTS.md when they conflict.
Keep this section short; deeper explanations belong in the per-component
docs.
- Upstream target branch is
main. As of 0.1.68 the active development branch flipped fromcodexback tomain:codex(188 commits) was merged intomain, and the pre-mergemainwas archived locally ashuman-effortsfor provenance. Future PRs targetmain. The GitHub Release workflow triggers onv*tag push (seedeployment/release.md), not branch, so the flip doesn't affect release mechanics. - Frontend is three standalone Flutter apps under
frontend/editor_app/,frontend/planner_app/,frontend/portal_app/. Do not merge them back into a monolith. Per-app docs: editor, planner, portal. - Backend tests run with
DJANGO_SETTINGS_MODULE=notechondria.settings_test; that settings file must define a non-emptySECRET_KEY. Seeserver/backend.md#tests. - Vendor SDK clients (OpenAI, etc.) must initialize lazily at call
time, never at module import. As of 0.1.18 the OpenAI SDK is
removed entirely — future AI goes through an external microservice
over HTTP. See
development/ai_integration.md. backend/requirements-render.txtstays free of heavy ML packages (torch,llvmlite,numba, etc.) for Render free-tier compatibility.backend/requirements.txtitself is also now pruned of that stack;dj-database-urlis required (Northflank + Render both useDATABASE_URL).- GitHub Pages builds use the project-site base paths
/Notechondria/editor/,/Notechondria/planner/,/Notechondria/portal/. - Never assume host ports (
80,443,8080,5432, …) are free; verify on the target machine before assigning. - Target Python 3.9. The Dockerfile pins
python:3.9.18-bullseye, so do NOT use PEP 604 unions (X | Y) in runtime annotations — usetyping.Optional/typing.Union. This overridesAGENTS.md/AGENTS.md§4.1's "target 3.11+" default. - Never edit
.gitignore. Owner-enforced rule. If a new tracked template/config needs to be added, use a path the existing ignore rules already permit. If a tracked file drifted into holding secrets, copy the secrets out to a gitignored path and reset the tracked file — do not unlock via a new!-whitelist.
1. Repository map
<repo>/
├── AGENTS.md/ ← git submodule (Trance-0/AGENTS.md)
├── backend/ ← Django project (see server/backend.md)
├── frontend/
│ ├── editor_app/ ← see client/editor_app.md
│ ├── planner_app/ ← see client/planner_app.md
│ ├── portal_app/ ← see client/portal_app.md
│ └── notechondria_shared/ ← shared UI primitives consumed by the
│ three apps via path: ../notechondria_shared
├── deployment/ ← per-target CI/CD scripts (jenkins/,
│ docker/, render/, northflank/)
├── docs/ ← this directory
├── sample/ ← seed course content + media
├── course_template/ ← older course template artifacts
├── LLM_CHECK.md ← end-of-round checklist and pitfall log
├── README.md ← repo-root overview
├── TODO.md ← (symlink/alias target; live TODO lives
│ in docs/TODO.md)
├── VERSION ← bump third digit per round
├── northflank.json ← Northflank infra template
├── render-deploy.sh ← Render start wrapper
├── Jenkinsfile ← Jenkins pipeline
└── docker-compose.yml ← full-stack local compose
Not every folder is described here — see the per-component docs.
2. Component pointers
Instead of duplicating architecture narrative here, the long-form detail lives next to the code:
- Backend —
server/backend.md. Django apps (creators,notes,mcp,gptutils[stubbed]), URL topology, model/view/service inventory with cross-refs, the handshake and request-timing middleware, entrypoint flow, deploy paths. - Frontend —
client/editor_app.md,client/planner_app.md,client/portal_app.md. Role, library layout, local-store keys, API client contract, build/deploy, and known drift per app.
3. Backend verification reality
- Python dependencies install successfully with local
uv/pipinside a 3.9 env. manage.py testrequires a reachable PostgreSQL (orsettings_test.py's in-memory sqlite). Docker is the supported full-stack path locally.
4. Frontend verification reality
Each of editor_app, planner_app, portal_app passes:
flutter test test/smoke_test.dartflutter build web --release --base-href /Notechondria/<app>/ --no-web-resources-cdn
Shared UI now lives in frontend/notechondria_shared/ and is consumed
by all three apps via a path-package dependency. Per-app app_shell.dart
and modules/settings.dart still own each app's screen-level behavior;
extract more shared widgets only when a duplication bug actually shows up.
5. Deployment topology (short)
Four supported paths — per-target detail lives in deployment/:
- Render free-tier (backend only) —
deployment/render_free_tier.md. - Northflank (backend only) —
deployment/northflank.md+ repo-rootnorthflank.json. - Jenkins (full-stack self-hosted) —
deployment/deploy.md. - GitHub Pages (frontend only) —
.github/workflows/frontend-pages.yml.
Plus local Docker compose for dev.
6. Open work / caution list
- Shared UI primitives (sidebar, splash, error-state, debug card, auth
dialogs, app-preferences rows, plus the
ActionFeedback/ApiDebugSnapshotmodels andshowBlurDialog/formatCompactTimestamphelpers) now live infrontend/notechondria_shared/. Per-appapp_shell.dartandmodules/settings.dartstill hold their own behavior — extract more shared widgets only when a real second-source-of-truth bug appears, not preemptively. - Backend local verification still needs a reachable PostgreSQL service to complete full Django test runs.
- Any future PR to upstream should target
Trance-0/Notechondria:codex, not the fork'smain. - Render free-tier
SECRET_KEYis a placeholder; rotate before any real production traffic. requirements-render.txtmust stay free of heavy ML packages (torch, etc.) for free-tier compatibility.portal_appandplanner_appstill contain stale modules (front.dart,course.dart,activity.dart,learner.dart) that theirvisibleIndicesdon't use; removing these requires rewriting theirapp_shell.dart.editor_app/app_shell.dart(~2500 lines) andclient.dart(~812 lines) remain above the 500-LOC target; further splits would need mixin-based architecture changes.- Portal Settings is only partially at feature parity with editor
Settings. Tracked as deferred in
versions/0.1.18.md. - Frontend compile-time default API URL
(
_kDefaultApiUrlin each app'score/helpers.dart) is baked at build time and doesn't react to "I changed my backend" at runtime for fresh visits. Use--dart-define=DEFAULT_API_URL=...in the Pages workflow or bump the fallback constant when the backend hostname changes. Handshake guard in Settings prevents accidental commits to a wrong server on runtime URL edits. - A cosmetic
manage.py migrate --checkwarning about unreflectednotesapp changes is non-blocking; investigate only if it becomes load-bearing.
7. Prompt recipe for the next engineer
Work on
Trance-0/Notechondriausing thecodexbranch as the upstream target. Keep frontend as three standalone Flutter apps underfrontend/editor_app,frontend/planner_app, andfrontend/portal_app. Keep the Jenkins pipeline full-stack with backend/frontend test and deploy branches running in parallel. Verify each app locally with Flutter before claiming success. Run backend tests withDJANGO_SETTINGS_MODULE=notechondria.settings_test, keepSECRET_KEYdefined there, and avoid import-time vendor SDK initialization. Target Python 3.9 — no PEP 604 unions at runtime. Follow the shared rules inAGENTS.md/AGENTS.md; this file's §0 wins on conflicts.