Skip to content

docs(phase-5): Supabase Hybrid PLAN outline — sub-PR 5.0 first commit#272

Merged
dackclup merged 1 commit into
mainfrom
claude/phase-5-supabase-foundation
May 27, 2026
Merged

docs(phase-5): Supabase Hybrid PLAN outline — sub-PR 5.0 first commit#272
dackclup merged 1 commit into
mainfrom
claude/phase-5-supabase-foundation

Conversation

@dackclup
Copy link
Copy Markdown
Owner

⚠️ STATUS: OUTLINE ONLY — DO NOT MERGE

First commit of Phase 5 (Supabase hybrid). Outline draft at .claude/skills/phase-5/supabase-hybrid/PLAN.md (~76 lines). All sub-PR acceptance-criteria sections are placeholders. This PR will gain additional commits before flipping Draft → Ready.

Locked direction (AskUserQuestion 2026-05-27)

  • Phase slot A — Phase 5 = Supabase, ML push to Phase 6, Sentiment v2 → 7, Regime → 8, Universe expansion → 9
  • Sub-features 5.1-5.4 — Foundation + Auth + Watchlist + Alerts. NO comment (legal risk on educational-disclaimer site)
  • Wait-for-merge handoff — branched from origin/main 75b6c68 (post PR docs: Agentic 6-Phase Cadence + session-start bullet #271 merge)

phase-coordinator Mode A verdict (agent id a0578bd4794157369)

PROCEED — no collision blocker. 3 findings:

  1. Stub overlap — 5 phase-5 ML stubs (backtest-infrastructure · conformal-predict · meta-label · shap-explain · triple-barrier-label) need git mv → phase-6/. 3 phase-6 sentiment stubs (finbert-score · lazy-prices-detect · whisper-transcribe) need → phase-7/.
  2. Doc lockstep cleanPHASE_STATUS_INFLIGHT.md has 1 unrelated entry (Issue GOOG/GOOGL multi-class shares overcount — opposite direction to PR #257 allowlist (Alphabet aggregate-only filer) #261 PR-B). SKILL.md has existing Supabase library-matrix row needing label update only.
  3. Skill gaps (3, all folded into PLAN.md):
    • Postgres↔TS lockstep (propose SKILL.md Rule 19 candidate in 5.3)
    • security-reviewer Route Handler cue on frontend/app/api/** (5.1)
    • Alerts observability Metadata.alerts_* BEFORE Resend wiring (5.4, mirrors Phase 4.5e PR 2 → PR 3)

Sub-PR 5.0 scope (this PR; complete in later commits)

  • PLAN.md outline committed (7b7f5d2)
  • Each sub-PR acceptance-criteria section expanded after user approval
  • git mv 5 phase-5 ML stubs → phase-6/
  • git mv 3 phase-6 sentiment stubs → phase-7/
  • WORKFLOW.md:496-502 "Phase 5 foundational" → "Phase 6 foundational"
  • SKILL.md Supabase library-matrix row label update
  • 6-file doc lockstep: CLAUDE.md / WORKFLOW.md / PHASE_STATUS.md / SKILL.md / AGENTS.md / README.md
  • PHASE_STATUS_INFLIGHT.md entry
  • GH_TOKEN-backed cross-session-collision-check 7-day sibling check (Mode A skipped this — auth unavailable in sandbox)

Hard rules preserved (Phase 5 scope locks)

  • ❌ Composite formula UNCHANGED (Rule 16)
  • ❌ Pydantic↔TS schema triple UNCHANGED (Rule 9)
  • ❌ static-export output: 'export' PRESERVED
  • ❌ Ranking JSON pipeline UNTOUCHED — only ADD user-state surface on top
  • ✅ Free-tier first: Supabase free (500MB DB, 50k MAU) + Resend free (3k/mo) + Vercel Cron free (2/day)

License posture

  • Supabase: Apache-2.0 ✅
  • Resend: SaaS free tier OK (commercial, no source license issue)
  • Existing 18 subagents + 45 skills + frontend / compute pipeline untouched

Awaiting user feedback before next commit

Per chat 2026-05-27 — 4 questions queued:

  1. Outline structure approval (add/remove/merge sections?)
  2. Expansion priority — 5.0 only, or 5.0+5.1 pair, or full 5.0-5.4?
  3. ToS / Privacy Policy doc — sub-PR 5.1.5 separate or bundled with 5.2 Auth?
  4. Auth provider list — Google + GitHub + magic-link, or add Apple ($99/yr) / X / Discord?

Test plan

  • ruff check . — N/A (no Python)
  • python -m compute.output.schema_check — N/A (no schemas)
  • pytest tests/ -m "not network" — N/A (no test surface)
  • CI (Python lint+test, Frontend build) — expected green (outline doc only)
  • Vercel preview — N/A (no frontend code; preview rebuilds main)
  • docs-reviewer subagent — run before flip to Ready
  • security-reviewer subagent — run when first env-var lands (5.1)

Subscribe-after-PR-open suggestion: same as PR #271 pattern — user can subscribe me to PR activity for CI + review comments.


Generated by Claude Code

…commit)

First commit on `claude/phase-5-supabase-foundation` branch. Outline
draft per locked user direction (AskUserQuestion 2026-05-27):
- Phase slot A — Phase 5 = Supabase, ML push to Phase 6
- Sub-features 5.1-5.4 — Foundation + Auth + Watchlist + Alerts
  (NO comment — legal-risk-skipped on educational-disclaimer site)
- Wait-for-merge handoff after PR #271 cadence section landed

`phase-coordinator` Mode A verdict (agent id a0578bd4794157369):
PROCEED — no collision blocker; 3 skill gaps flagged for PLAN
acceptance criteria (Postgres↔TS lockstep / Route Handler security
cue / alerts observability Rule 18).

This commit ships ONLY the outline (~76 lines) at
`.claude/skills/phase-5/supabase-hybrid/PLAN.md`. Subsequent commits
on the same PR (5.0) will:
- Expand each sub-PR acceptance-criteria section after user approval
- `git mv` the 5 phase-5 ML stubs → phase-6/ + 3 phase-6 sentiment
  stubs → phase-7/ (per Mode A finding)
- Update 6 doc files in lockstep (CLAUDE.md / WORKFLOW.md /
  PHASE_STATUS.md / SKILL.md / AGENTS.md / README.md)
- Add PHASE_STATUS_INFLIGHT.md entry
- Update WORKFLOW.md:496-502 "Phase 5 foundational" → "Phase 6
  foundational" + SKILL.md Supabase library-matrix row label

Hard rules preserved per Phase 5 scope locks: composite formula
UNCHANGED (Rule 16) · Pydantic↔TS triple UNCHANGED (Rule 9) ·
static-export `output: 'export'` PRESERVED · ranking JSON pipeline
UNTOUCHED. Only ADD user-state surface on top.

License posture: Supabase Apache-2.0 ✅ · Resend free-tier OK.

Status: OUTLINE only — Draft PR will note this explicitly. No
review-ready expectation; awaiting user feedback on section structure
+ expansion priority + ToS sub-PR placement + auth provider list.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quantrank Ready Ready Preview, Comment May 27, 2026 11:08am

@dackclup dackclup marked this pull request as ready for review May 27, 2026 11:13
@dackclup dackclup merged commit 6564999 into main May 27, 2026
4 checks passed
@dackclup dackclup deleted the claude/phase-5-supabase-foundation branch May 27, 2026 11:13
dackclup added a commit that referenced this pull request May 27, 2026
…#273)

Walks the 2026-05-27 "QuantRank — Deep Research Recommendations" report
(top 1% target) against the project's current state (schema
`0.10.5-phase4.5e`, 33 declared defense flags, tag v1.3.0-phase4.5e) and
files the 5 actionable planning artifacts per the user-authorized
autonomous pipeline.

Calibration log at `.claude/research/calibration-2026-05-27.md` —
classifies every recommendation as DONE / ACTIONABLE / BLOCKED with
references to existing modules. License posture per dep verified.

PLAN files committed (one per feature, standard template — Goal, Files,
Schema delta, Defense mode, Tests, Production verification, Fallback,
Acceptance):

1. `.claude/skills/phase-4.6/survivorship-bias-fix/PLAN.md` — P0
   (Section 7.4 of report) — historical S&P 500 membership CSV +
   `compute/ingest/historical_universe.py` module + Metadata fields
2. `.claude/skills/phase-4.6/jkp-pillar-refactor/PLAN.md` —
   MAJOR-bump 8→9 pillar refactor per Jensen-Kelly-Pedersen 2023 JF
   13-theme taxonomy (1-2 weeks; defer)
3. `.claude/skills/phase-4.5e/larcker-10b5-1/PLAN.md` —
   3-red-flag extension of existing 10b5-1 filter per Larcker 2021
   CGRI Closer Look 88 (2-3 days; defer)
4. `.claude/skills/phase-6/lazy-prices-pillar/PLAN.md` —
   10-K/10-Q TF-IDF cosine similarity pillar per Cohen-Malloy-Nguyen
   2020 JF (3-4 weeks; defer)
5. `.claude/skills/phase-5/ml-meta-learner/PLAN.md` —
   XGBoost + Triple-Barrier + MAPIE + SHAP per Gu-Kelly-Xiu 2020
   RFS (6-8 weeks; defer)

Note (PR #272 conflict): the Phase 5 slot was outlined for Supabase
hybrid in PR #272. Research Report v1.0 reassigns Phase 5 to ML
meta-learner. Phase-numbering resolution deferred to user — PLAN
explicitly flags the conflict.

Execution scope this session: Feature 1 (Survivorship-bias) on its own
branch + draft PR. Features 2-5 ship as PLAN-only per the "ห้าม
half-done" user rule; multi-week scope cannot land safely in one
session.

License posture (verified per dep):
- xgboost / lightgbm / mapie: Apache 2.0
- shap / joblib: MIT / BSD-3
- scikit-learn / hmmlearn / PyPortfolioOpt / ripser.py: BSD / MIT
- mlfinlab AGPL — EXCLUDED (Triple-Barrier custom in PLAN 5)
- gudhi GPL-3 — EXCLUDED
- JKP DATA CC BY-NC 4.0 — EXCLUDED (use taxonomy CONCEPT only,
  replicate from Compustat/yfinance)

McLean-Pontiff decay budget locked at 32% (paper exact, not 35%
approximation) per user hard constraint.

Hard rules preserved across all 5 PLANs:
- Rule 16 (composite formula sacred) — JKP refactor remaps inputs
  only; composite formula UNCHANGED
- Rule 9 (schema triple) — all bumps atomic Pydantic + TS + snapshot
- Rule 18 (observability-before-wiring) — every feature ships
  Metadata diagnostic FIRST
- Universe S&P 500 only (Phase 8 expansion OUT of scope)
- NO live inference in browser
- NO trade recommendations

Honest performance ceiling per Report §8: net α 2-5%/yr vs SPY
(NOT 10%+). Section 7 validation gate stack: PBO ≤ 0.5 + DSR > 0 +
BH-FDR < 0.05 + survivorship-corrected universe.

Subsequent commit on this branch: nothing (planning-only PR).
Subsequent branches: claude/phase-4.6-survivorship-bias-fix (PR #1
execution per pipeline).

Co-authored-by: Claude <noreply@anthropic.com>
dackclup added a commit that referenced this pull request May 27, 2026
Closes the Phase 4.6 honest re-validation harness epic (PRs #273-#282 +
adjacent #267-#272). Five new validation modules, one new ingest
module (historical S&P 500 membership, Hou-Xue-Zhang 2020 RFS), one
new honest-baseline CLI. Schema bump 0.10.6-phase4.5e → 0.10.7-phase4.6
(PATCH; additive Metadata.universe_membership_as_of +
Metadata.survivorship_bias_corrected). Defense layer unchanged at 33
declared boolean flags — Phase 4.6 ships infrastructure only.

See docs/release-notes/v1.4.0-phase4.6.md for the full notes.

https://claude.ai/code/session_01AGU8d6pm4u2fQQ5cebg9qa

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants