From 66beae16b7cc1681425faa021ed43bf3a1daafa8 Mon Sep 17 00:00:00 2001 From: bastien Date: Sun, 12 Apr 2026 14:56:22 +0200 Subject: [PATCH] auto-detect plan, complexity scoring, ctx7 cache, graphify in workflows - detect_plan() auto-detects Max/Pro/Free from ~/.claude.json - session-start budget adapts to plan (Max=20k, Pro=11k, Free=5k) - token counting now uses only ACTIVE plugins, not installed binaries - statusline shows plan label + session duration instead of start time - plugin-advisor: complexity assessment (0-100%) drives tool selection - plugin-advisor: auto-activation with confirmation (PHASE 4) - ruflo OFF by default, GSD v2 preferred for multi-session - init-project: ctx7 pre-fetch + graphify scaffold + graphify full - ship-feature: ctx7 cache check before implementation - frontend-design disabled in installer (doublon with ui-ux-pro-max) - python3 -c moved from deny to ask (unblocks graphify) Co-Authored-By: Claude Opus 4.6 --- agents/plugin-advisor.md | 57 +++++++++++++-- hooks/session-start.sh | 42 +++++++---- hooks/statusline.sh | 26 ++++++- install-plugins.sh | 4 +- lib/detect-plugins.sh | 30 ++++++++ settings.json | 136 +++++++++++++++++------------------ skills/init-project/SKILL.md | 38 +++++++++- skills/ship-feature/SKILL.md | 24 ++++++- 8 files changed, 264 insertions(+), 93 deletions(-) diff --git a/agents/plugin-advisor.md b/agents/plugin-advisor.md index b9ae780..7282473 100644 --- a/agents/plugin-advisor.md +++ b/agents/plugin-advisor.md @@ -74,12 +74,41 @@ Detect signals from the project description and filesystem scan: --- +## PHASE 2.5 — COMPLEXITY ASSESSMENT + +Rate project complexity 0-100% to decide tool depth. +Factors (weighted): + +| Factor | Weight | Low (0-30) | Med (30-70) | High (70-100) | +|---|---|---|---|---| +| Data model | 25% | Static pages, no DB | Simple CRUD, 1 DB | Relations, multi-DB, sessions, auth | +| Business logic | 25% | Display only | Forms, validation | Algorithms, real-time, social, payments | +| Integration surface | 20% | Standalone | 1-2 APIs | OAuth, webhooks, queues, 3rd-party SDKs | +| Frontend complexity | 15% | None or static | SPA, basic routing | Design system, animations, a11y, i18n | +| Infra/deploy | 15% | Local only | Single deploy target | Multi-env, CI/CD, containers, monitoring | + +**Score thresholds:** +- **0-30% (simple)**: superpowers only. No gstack, no gsd, no ctx7, no graphify. + _Examples: site vitrine, landing page, script CLI, simple CRUD._ +- **30-60% (moderate)**: + context7 if fast-libs, + graphify after implementation. + _Examples: blog with auth, dashboard with charts, API with validation._ +- **60-85% (complex)**: + gstack if browser-QA, + gsd if multi-session, + graphify both passes. + _Examples: SaaS with billing, game with social features, e-commerce._ +- **85-100% (enterprise)**: all tools justified. Consider ruflo only if explicitly requested. + _Examples: multi-service platform, real-time collab app, marketplace._ + +Output: `COMPLEXITY: % —