optimize plugin-probe+advisor: d8 — FRAMEWORK-DEPS exact dep@version (no preact false-hit, fallback fires), advisor derives frontend/fast-libs from it, PLAN echoed-or-unknown (no invention)
This commit is contained in:
@@ -25,6 +25,18 @@ field. PROBE REPORT missing or a field absent → emit
|
||||
`PLUGIN CHECK — VERDICT: ERROR(probe report missing/invalid: <what>)` and
|
||||
STOP. Fail closed: no recommendations over invented detection.
|
||||
|
||||
`FRAMEWORK-DEPS` carries exact `"dep": "version"` pairs (or
|
||||
`framework-deps-none`). Derive signal classes from those names + versions:
|
||||
`frontend` = react/react-dom/vue/nuxt/svelte/astro/next present;
|
||||
`fast-libs` = next, react ≥18 (version prefix), prisma/@prisma/client,
|
||||
supabase/@supabase/supabase-js, drizzle-orm, expo. Never re-scan the
|
||||
manifest to make this split.
|
||||
|
||||
`REQUEST` MAY carry `PLAN: Max|Pro|Free` from the dispatcher. Echo it in
|
||||
the output. Absent → output `PLAN: unknown (not provided)` and SKIP the
|
||||
plan-budget WARN (absolute COST ESTIMATE still reported). Never assume a
|
||||
plan.
|
||||
|
||||
---
|
||||
|
||||
## PHASE 2 — ANALYZE
|
||||
@@ -86,7 +98,7 @@ ACTIVE: [plugin — status, one line each]
|
||||
PROFILE: [active skill profile — name + match%, or "custom"]
|
||||
SIGNALS: [detected signals]
|
||||
COMPLEXITY: <score>% — <simple|moderate|complex|enterprise>
|
||||
PLAN: <Max|Pro|Free> (budget: ~<N>t passive tokens)
|
||||
PLAN: <Max|Pro|Free (echoed from REQUEST) | unknown (not provided)> (budget: ~<N>t | n/a)
|
||||
COST ESTIMATE: ~Xt passive tokens (all active plugins combined)
|
||||
|
||||
RECOMMENDATIONS:
|
||||
@@ -315,7 +327,7 @@ or by applying a profile that lists it (e.g. `apply web` to restore
|
||||
|
||||
- Active toggle plugins not needed for this task (dead passive cost)
|
||||
- Multi-session feature + `gsd` CLI not installed → `npm install -g gsd-pi`
|
||||
- Total passive cost > 50% of plan budget (Pro: ~5500t, Max: ~10000t, Free: ~2500t)
|
||||
- Total passive cost > 50% of plan budget (Pro: ~5500t, Max: ~10000t, Free: ~2500t) — only when PLAN was provided; PLAN unknown → skip this WARN
|
||||
- **Next.js/React 18+/Prisma/Supabase detected + context7 not configured**
|
||||
→ Risk: Claude may generate code using outdated APIs (App Router changes frequently)
|
||||
→ Fix: `npm install -g ctx7 && ctx7 setup --claude`
|
||||
|
||||
@@ -34,7 +34,8 @@ command -v rtk &>/dev/null && rtk --version 2>/dev/null | head -1 || echo "rtk-n
|
||||
|
||||
# Project signals (run from project root)
|
||||
ls package.json pyproject.toml Cargo.toml go.mod 2>/dev/null | head -5
|
||||
grep -rl "next\|react\|vue\|prisma\|supabase" package.json 2>/dev/null | head -3 || true
|
||||
# Exact-key dep match with versions ("react": won't match "preact":)
|
||||
grep -ohE '"(next|react|react-dom|vue|nuxt|svelte|astro|prisma|@prisma/client|@supabase/supabase-js|supabase|drizzle-orm|expo)"[[:space:]]*:[[:space:]]*"[^"]*"' package.json 2>/dev/null || echo "framework-deps-none"
|
||||
find . -name "*.tsx" -o -name "*.jsx" 2>/dev/null | head -3 | wc -l
|
||||
find . -name "docker-compose*" -o -name "Dockerfile" 2>/dev/null | head -3 | wc -l
|
||||
|
||||
@@ -72,7 +73,7 @@ EXTERNAL : <toggle-external list output>
|
||||
PROFILE : <profile current output>
|
||||
CLIS : ctx7=<v|absent> gsd=<v|absent> rtk=<v|absent>
|
||||
MANIFESTS : <files found>
|
||||
FRAMEWORK-DEPS: <grep hits in package.json>
|
||||
FRAMEWORK-DEPS: <exact "dep": "version" pairs, or framework-deps-none>
|
||||
TSX-JSX-COUNT : <n>
|
||||
DOCKER-COUNT : <n>
|
||||
ANIM : eligibility=<status|package|reason> installed=<lib|no>
|
||||
|
||||
Reference in New Issue
Block a user