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 <noreply@anthropic.com>
This commit is contained in:
parent
0dac12b885
commit
66beae16b7
@ -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: <score>% — <label>` with one-line justification.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## PHASE 3 — OUTPUT
|
## PHASE 3 — OUTPUT
|
||||||
|
|
||||||
```
|
```
|
||||||
PLUGIN CHECK
|
PLUGIN CHECK
|
||||||
ACTIVE: [plugin — status, one line each]
|
ACTIVE: [plugin — status, one line each]
|
||||||
SIGNALS: [detected signals]
|
SIGNALS: [detected signals]
|
||||||
|
COMPLEXITY: <score>% — <simple|moderate|complex|enterprise>
|
||||||
|
PLAN: <Max|Pro|Free> (budget: ~<N>t passive tokens)
|
||||||
COST ESTIMATE: ~Xt passive tokens (all active plugins combined)
|
COST ESTIMATE: ~Xt passive tokens (all active plugins combined)
|
||||||
|
|
||||||
RECOMMENDATIONS:
|
RECOMMENDATIONS:
|
||||||
@ -94,6 +123,23 @@ BLOCKING: [issues] or none
|
|||||||
ACTION REQUIRED? YES / NO
|
ACTION REQUIRED? YES / NO
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## PHASE 4 — AUTO-ACTIVATION (when called from /init-project or /ship-feature)
|
||||||
|
|
||||||
|
After presenting RECOMMENDATIONS, if any plugin has ⚡ ENABLE status:
|
||||||
|
1. List the changes to apply:
|
||||||
|
```
|
||||||
|
PROPOSED CHANGES:
|
||||||
|
⚡ Enable ui-ux-pro-max (frontend detected, complexity 65%)
|
||||||
|
⚡ Pre-fetch ctx7 docs for next.js, prisma
|
||||||
|
⚠️ Disable ruflo (not needed, saves ~1000t)
|
||||||
|
Apply these changes? (yes / no / customize)
|
||||||
|
```
|
||||||
|
2. On "yes" → apply changes (rename .disabled dirs, update MCP config).
|
||||||
|
3. On "customize" → user picks which to apply.
|
||||||
|
4. On "no" → proceed with current config.
|
||||||
|
|
||||||
|
**Never auto-activate without showing the list and getting confirmation.**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## DECISION TABLE
|
## DECISION TABLE
|
||||||
@ -107,7 +153,7 @@ ACTION REQUIRED? YES / NO
|
|||||||
| `deploy` + `browser-qa` | gstack | — | Full-product workflow |
|
| `deploy` + `browser-qa` | gstack | — | Full-product workflow |
|
||||||
| `multi-session` | gsd v2 CLI | — | Run `gsd` in terminal, not CC plugin |
|
| `multi-session` | gsd v2 CLI | — | Run `gsd` in terminal, not CC plugin |
|
||||||
| `fast-libs` | context7 | — | Doc freshness critical |
|
| `fast-libs` | context7 | — | Doc freshness critical |
|
||||||
| `multi-agent` + `complex-arch` | ruflo (CLI) | — | Only if genuine swarm needed |
|
| `multi-agent` + `complex-arch` | gsd v2 CLI | ruflo (unless explicitly requested) | GSD v2 preferred; ruflo only on explicit user request |
|
||||||
| `simple` / single-session | — | gsd, gstack, ruflo, ui-ux-pro-max | Saves ~3000-5000t |
|
| `simple` / single-session | — | gsd, gstack, ruflo, ui-ux-pro-max | Saves ~3000-5000t |
|
||||||
| `embedded` / firmware | — | all toggles; superpowers optional | workflow: /analyze → edit or /ship-feature |
|
| `embedded` / firmware | — | all toggles; superpowers optional | workflow: /analyze → edit or /ship-feature |
|
||||||
| backend/lib/CLI only | — | frontend-design, ui-ux-pro-max, gstack | ~3100t saved |
|
| backend/lib/CLI only | — | frontend-design, ui-ux-pro-max, gstack | ~3100t saved |
|
||||||
@ -151,7 +197,7 @@ ACTION REQUIRED? YES / NO
|
|||||||
| Quick fix / hotfix | superpowers | all toggles | ~800t |
|
| Quick fix / hotfix | superpowers | all toggles | ~800t |
|
||||||
| Design system / component lib | superpowers, frontend-design, ui-ux-pro-max | gstack, ruflo, gsd | ~1600t |
|
| Design system / component lib | superpowers, frontend-design, ui-ux-pro-max | gstack, ruflo, gsd | ~1600t |
|
||||||
| Fast-evolving libs (Next.js etc.) | superpowers, context7, frontend-design | ruflo | ~1200t |
|
| Fast-evolving libs (Next.js etc.) | superpowers, context7, frontend-design | ruflo | ~1200t |
|
||||||
| Enterprise multi-agent orchestration | superpowers, ruflo + gsd v2 (external) | plugin-dev | ~2300t CC |
|
| Enterprise multi-agent orchestration | superpowers + gsd v2 (external) | ruflo (unless explicit), plugin-dev | ~800t CC |
|
||||||
|
|
||||||
> security-guidance and rtk are ALWAYS ON (0 tokens) — omitted from cost estimates for clarity.
|
> security-guidance and rtk are ALWAYS ON (0 tokens) — omitted from cost estimates for clarity.
|
||||||
|
|
||||||
@ -187,8 +233,9 @@ RULE: IF "fast-libs" (Next.js/React 18+/Prisma/Supabase/Drizzle):
|
|||||||
→ context7 ON (~200t)
|
→ context7 ON (~200t)
|
||||||
|
|
||||||
RULE: IF "multi-agent" AND "complex-arch":
|
RULE: IF "multi-agent" AND "complex-arch":
|
||||||
→ ruflo CLI ON (~500-1500t)
|
→ gsd v2 CLI recommended (0t passive, multi-session coordination)
|
||||||
→ IF gstack also ON: WARN overlap (~3250-4250t combined)
|
→ ruflo CLI OFF by default — only enable if user explicitly requests swarm/parallel orchestration
|
||||||
|
→ IF user explicitly requests ruflo AND gstack also ON: WARN overlap (~3250-4250t combined)
|
||||||
|
|
||||||
RULE: IF "simple" OR "hotfix":
|
RULE: IF "simple" OR "hotfix":
|
||||||
→ Disable all toggles. ~800t base only.
|
→ Disable all toggles. ~800t base only.
|
||||||
@ -242,7 +289,7 @@ RULE: IF `complex-arch` signal (multiple services, event bus, distributed system
|
|||||||
- gstack ON + ruflo ON simultaneously (overlap, ~3250-4250t)
|
- gstack ON + ruflo ON simultaneously (overlap, ~3250-4250t)
|
||||||
- ruflo ON with no multi-agent signal detected
|
- ruflo ON with no multi-agent signal detected
|
||||||
- Multi-session feature + `gsd` CLI not installed → `npm install -g gsd-pi`
|
- Multi-session feature + `gsd` CLI not installed → `npm install -g gsd-pi`
|
||||||
- Total passive cost > 5500t (~50% of Pro session budget)
|
- Total passive cost > 50% of plan budget (Pro: ~5500t, Max: ~10000t, Free: ~2500t)
|
||||||
- **Next.js/React 18+/Prisma/Supabase detected + context7 not configured**
|
- **Next.js/React 18+/Prisma/Supabase detected + context7 not configured**
|
||||||
→ Risk: Claude may generate code using outdated APIs (App Router changes frequently)
|
→ Risk: Claude may generate code using outdated APIs (App Router changes frequently)
|
||||||
→ Fix: `npm install -g ctx7 && ctx7 setup --claude`
|
→ Fix: `npm install -g ctx7 && ctx7 setup --claude`
|
||||||
|
|||||||
@ -86,25 +86,43 @@ fi
|
|||||||
REPO_DIR="${_repo_dir:-}"
|
REPO_DIR="${_repo_dir:-}"
|
||||||
unset _claude_real _repo_dir
|
unset _claude_real _repo_dir
|
||||||
|
|
||||||
# Quick passive token cost estimate (Pro session budget = ~11k tokens)
|
# Detect plan and set passive token budget
|
||||||
|
PLAN=$(detect_plan 2>/dev/null || echo "pro")
|
||||||
|
case "$PLAN" in
|
||||||
|
max) _budget=20000; PLAN_LABEL="Max" ;;
|
||||||
|
pro) _budget=11000; PLAN_LABEL="Pro" ;;
|
||||||
|
free) _budget=5000; PLAN_LABEL="Free" ;;
|
||||||
|
*) _budget=11000; PLAN_LABEL="Pro" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Quick passive token cost estimate
|
||||||
|
# Only count plugins that are ACTIVE (detected as ON), not just installed
|
||||||
_passive_t=0
|
_passive_t=0
|
||||||
detect_superpowers 2>/dev/null && _passive_t=$((_passive_t + 800))
|
detect_superpowers 2>/dev/null && _passive_t=$((_passive_t + 800))
|
||||||
detect_gstack 2>/dev/null && _passive_t=$((_passive_t + 2750))
|
|
||||||
detect_frontend_design 2>/dev/null && _passive_t=$((_passive_t + 200))
|
# Token costs for toggle plugins — map display name to cost
|
||||||
detect_plugin_dev 2>/dev/null && _passive_t=$((_passive_t + 100))
|
declare -A _plugin_costs=(
|
||||||
detect_uiux_pro_max 2>/dev/null && _passive_t=$((_passive_t + 400))
|
[gstack]=2750
|
||||||
detect_context7 2>/dev/null && _passive_t=$((_passive_t + 200))
|
[ui-ux-pro-max]=400
|
||||||
detect_ruflo 2>/dev/null && _passive_t=$((_passive_t + 1000))
|
[frontend-design]=200
|
||||||
detect_graphifyy 2>/dev/null && _passive_t=$((_passive_t + 300))
|
[plugin-dev]=100
|
||||||
_budget_pct=$((_passive_t * 100 / 11000))
|
[context7]=200
|
||||||
|
[ruflo]=1000
|
||||||
|
[graphifyy]=300
|
||||||
|
)
|
||||||
|
for _p in "${TOGGLE_ACTIVE[@]}"; do
|
||||||
|
_cost="${_plugin_costs[$_p]:-0}"
|
||||||
|
_passive_t=$((_passive_t + _cost))
|
||||||
|
done
|
||||||
|
_budget_pct=$((_passive_t * 100 / _budget))
|
||||||
if [ "$_budget_pct" -gt 50 ]; then
|
if [ "$_budget_pct" -gt 50 ]; then
|
||||||
TOKEN_WARN="⚠️ ~${_passive_t}t passif (${_budget_pct}% budget)"
|
TOKEN_WARN="⚠️ ~${_passive_t}t passif (${_budget_pct}% budget $PLAN_LABEL)"
|
||||||
elif [ "$_budget_pct" -gt 25 ]; then
|
elif [ "$_budget_pct" -gt 25 ]; then
|
||||||
TOKEN_WARN="~${_passive_t}t passif (${_budget_pct}% budget)"
|
TOKEN_WARN="~${_passive_t}t passif (${_budget_pct}% budget $PLAN_LABEL)"
|
||||||
else
|
else
|
||||||
TOKEN_WARN=""
|
TOKEN_WARN=""
|
||||||
fi
|
fi
|
||||||
unset _passive_t _budget_pct
|
unset _passive_t _budget_pct _budget
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "┌─ Claude Code config ──────────────────────────────────┐"
|
echo "┌─ Claude Code config ──────────────────────────────────┐"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Claude Code statusline — folder, git branch, model, context %
|
# Claude Code statusline — model, folder, branch, plan, context bar, session start
|
||||||
# Receives JSON on stdin from Claude Code.
|
# Receives JSON on stdin from Claude Code.
|
||||||
|
|
||||||
INPUT=$(cat)
|
INPUT=$(cat)
|
||||||
@ -18,6 +18,28 @@ if [ -d "$DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
BRANCH_STR="${BRANCH:+ ($BRANCH)}"
|
BRANCH_STR="${BRANCH:+ ($BRANCH)}"
|
||||||
|
|
||||||
|
# Plan detection (reuse shared lib)
|
||||||
|
_lib="$(dirname "${BASH_SOURCE[0]}")/../lib/detect-plugins.sh"
|
||||||
|
if [ -f "$_lib" ]; then
|
||||||
|
source "$_lib"
|
||||||
|
PLAN=$(detect_plan 2>/dev/null || echo "pro")
|
||||||
|
else
|
||||||
|
PLAN="pro"
|
||||||
|
fi
|
||||||
|
PLAN_UPPER=$(echo "$PLAN" | tr '[:lower:]' '[:upper:]' | head -c1)$(echo "$PLAN" | tail -c+2)
|
||||||
|
|
||||||
|
# Session duration (from total_duration_ms)
|
||||||
|
DURATION_MS=$(echo "$INPUT" | jq -r \
|
||||||
|
'.cost.total_duration_ms // 0' | cut -d. -f1)
|
||||||
|
DURATION_S=$((DURATION_MS / 1000))
|
||||||
|
if [ "$DURATION_S" -ge 3600 ]; then
|
||||||
|
DURATION="$((DURATION_S / 3600))h$((DURATION_S % 3600 / 60))m"
|
||||||
|
elif [ "$DURATION_S" -ge 60 ]; then
|
||||||
|
DURATION="$((DURATION_S / 60))m"
|
||||||
|
else
|
||||||
|
DURATION="<1m"
|
||||||
|
fi
|
||||||
|
|
||||||
# Progress bar (20 chars wide)
|
# Progress bar (20 chars wide)
|
||||||
WIDTH=20
|
WIDTH=20
|
||||||
FILLED=$((PCT * WIDTH / 100))
|
FILLED=$((PCT * WIDTH / 100))
|
||||||
@ -45,4 +67,4 @@ fi
|
|||||||
RESET="\033[0m"
|
RESET="\033[0m"
|
||||||
|
|
||||||
# Output: single line
|
# Output: single line
|
||||||
echo -e "$MODEL | $FOLDER${BRANCH_STR} | ${COLOR}${BAR}${RESET} ${PCT}%"
|
echo -e "$MODEL | $FOLDER${BRANCH_STR} | $PLAN_UPPER | ${COLOR}${BAR}${RESET} ${PCT}% | ${DURATION}"
|
||||||
|
|||||||
@ -343,7 +343,9 @@ install_plugin() {
|
|||||||
info "Adding Anthropic bundled plugins marketplace..."
|
info "Adding Anthropic bundled plugins marketplace..."
|
||||||
claude plugin marketplace add anthropics/claude-code 2>/dev/null || true
|
claude plugin marketplace add anthropics/claude-code 2>/dev/null || true
|
||||||
install_plugin "security-guidance" "claude-code-plugins"
|
install_plugin "security-guidance" "claude-code-plugins"
|
||||||
install_plugin "frontend-design" "claude-code-plugins"
|
# frontend-design: DISABLED — doublon with ui-ux-pro-max (2026-04-12)
|
||||||
|
# To re-enable: uncomment line below + remove .disabled suffix from cache
|
||||||
|
# install_plugin "frontend-design" "claude-code-plugins"
|
||||||
install_plugin "pr-review-toolkit" "claude-code-plugins"
|
install_plugin "pr-review-toolkit" "claude-code-plugins"
|
||||||
install_plugin "plugin-dev" "claude-code-plugins"
|
install_plugin "plugin-dev" "claude-code-plugins"
|
||||||
|
|
||||||
|
|||||||
@ -72,3 +72,33 @@ detect_graphifyy() {
|
|||||||
# Graphifyy — codebase knowledge graph, installed via pipx
|
# Graphifyy — codebase knowledge graph, installed via pipx
|
||||||
command -v graphify &>/dev/null
|
command -v graphify &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# --- Plan detection ---
|
||||||
|
|
||||||
|
detect_plan() {
|
||||||
|
# Detect Claude plan: max, pro, or free.
|
||||||
|
# Checks ~/.claude.json for model access hints.
|
||||||
|
# Returns plan name on stdout, always exits 0.
|
||||||
|
local claude_json="$HOME/.claude.json"
|
||||||
|
if [ -f "$claude_json" ]; then
|
||||||
|
# Max plan: has opus model access or max flag
|
||||||
|
if grep -q '"planType".*"max"' "$claude_json" 2>/dev/null; then
|
||||||
|
echo "max"; return 0
|
||||||
|
fi
|
||||||
|
# Check cached features for max indicators
|
||||||
|
if grep -q '"tengu_cobalt_compass": true' "$claude_json" 2>/dev/null \
|
||||||
|
&& grep -q '"tengu_harbor": true' "$claude_json" 2>/dev/null; then
|
||||||
|
echo "max"; return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Fallback: check if claude CLI reports plan
|
||||||
|
local plan
|
||||||
|
plan=$(claude config get planType 2>/dev/null || true)
|
||||||
|
case "$plan" in
|
||||||
|
max|Max|MAX) echo "max" ;;
|
||||||
|
pro|Pro|PRO) echo "pro" ;;
|
||||||
|
free|Free|FREE) echo "free" ;;
|
||||||
|
*) echo "pro" ;; # default assumption
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|||||||
136
settings.json
136
settings.json
@ -1,9 +1,65 @@
|
|||||||
{
|
{
|
||||||
"cleanupPeriodDays": 30,
|
"cleanupPeriodDays": 30,
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"defaultMode": "default",
|
"allow": [
|
||||||
"disableBypassPermissionsMode": "disable",
|
"Bash(git status)",
|
||||||
"disableAutoMode": "disable",
|
"Bash(git log*)",
|
||||||
|
"Bash(git diff*)",
|
||||||
|
"Bash(git branch*)",
|
||||||
|
"Bash(git fetch*)",
|
||||||
|
"Bash(git pull*)",
|
||||||
|
"Bash(git add *)",
|
||||||
|
"Bash(git commit*)",
|
||||||
|
"Bash(git checkout *)",
|
||||||
|
"Bash(git switch *)",
|
||||||
|
"Bash(git stash)",
|
||||||
|
"Bash(git stash push*)",
|
||||||
|
"Bash(git stash list*)",
|
||||||
|
"Bash(git stash show*)",
|
||||||
|
"Bash(git tag*)",
|
||||||
|
"Bash(git show*)",
|
||||||
|
"Bash(ls *)",
|
||||||
|
"Bash(ls)",
|
||||||
|
"Bash(find *)",
|
||||||
|
"Bash(cat *)",
|
||||||
|
"Bash(head *)",
|
||||||
|
"Bash(tail *)",
|
||||||
|
"Bash(grep *)",
|
||||||
|
"Bash(rg *)",
|
||||||
|
"Bash(fd *)",
|
||||||
|
"Bash(wc *)",
|
||||||
|
"Bash(echo *)",
|
||||||
|
"Bash(pwd)",
|
||||||
|
"Bash(which *)",
|
||||||
|
"Bash(type *)",
|
||||||
|
"Bash(whoami)",
|
||||||
|
"Bash(uname *)",
|
||||||
|
"Bash(mkdir -p *)",
|
||||||
|
"Bash(touch *)",
|
||||||
|
"Bash(cp *)",
|
||||||
|
"Bash(mv *)",
|
||||||
|
"Bash(jq *)",
|
||||||
|
"Bash(yq *)",
|
||||||
|
"Bash(awk *)",
|
||||||
|
"Bash(sort *)",
|
||||||
|
"Bash(uniq *)",
|
||||||
|
"Bash(tr *)",
|
||||||
|
"Bash(cut *)",
|
||||||
|
"Bash(diff *)",
|
||||||
|
"Read(**/*.md)",
|
||||||
|
"Read(**/*.txt)",
|
||||||
|
"Read(**/*.json)",
|
||||||
|
"Read(**/*.yaml)",
|
||||||
|
"Read(**/*.yml)",
|
||||||
|
"Read(**/*.toml)",
|
||||||
|
"Read(**/*.lock)",
|
||||||
|
"Read(**/*.gitignore)",
|
||||||
|
"Read(**/*.dockerignore)",
|
||||||
|
"Read(**/.claudeignore)",
|
||||||
|
"Read(**/Makefile)",
|
||||||
|
"Read(**/Dockerfile*)",
|
||||||
|
"Read(**/docker-compose*)"
|
||||||
|
],
|
||||||
"deny": [
|
"deny": [
|
||||||
"Bash(rm -rf *)",
|
"Bash(rm -rf *)",
|
||||||
"Bash(rm -rf /*)",
|
"Bash(rm -rf /*)",
|
||||||
@ -99,7 +155,6 @@
|
|||||||
"Bash(cp **/.ssh/*)",
|
"Bash(cp **/.ssh/*)",
|
||||||
"Bash(source /dev/stdin)",
|
"Bash(source /dev/stdin)",
|
||||||
"Bash(mkfifo *)",
|
"Bash(mkfifo *)",
|
||||||
"Bash(python3 -c *)",
|
|
||||||
"Bash(node -e *)",
|
"Bash(node -e *)",
|
||||||
"Bash(xargs * .env*)",
|
"Bash(xargs * .env*)",
|
||||||
"Bash(tar * .env*)",
|
"Bash(tar * .env*)",
|
||||||
@ -122,71 +177,17 @@
|
|||||||
"WebFetch",
|
"WebFetch",
|
||||||
"Bash(xargs *)",
|
"Bash(xargs *)",
|
||||||
"Bash(sed *)",
|
"Bash(sed *)",
|
||||||
|
"Bash(python3 -c *)",
|
||||||
"Bash(git stash pop*)",
|
"Bash(git stash pop*)",
|
||||||
"Bash(git stash drop*)",
|
"Bash(git stash drop*)",
|
||||||
"Bash(git stash clear)"
|
"Bash(git stash clear)"
|
||||||
],
|
],
|
||||||
"allow": [
|
"defaultMode": "default",
|
||||||
"Bash(git status)",
|
"disableBypassPermissionsMode": "disable",
|
||||||
"Bash(git log*)",
|
"disableAutoMode": "disable",
|
||||||
"Bash(git diff*)",
|
|
||||||
"Bash(git branch*)",
|
|
||||||
"Bash(git fetch*)",
|
|
||||||
"Bash(git pull*)",
|
|
||||||
"Bash(git add *)",
|
|
||||||
"Bash(git commit*)",
|
|
||||||
"Bash(git checkout *)",
|
|
||||||
"Bash(git switch *)",
|
|
||||||
"Bash(git stash)",
|
|
||||||
"Bash(git stash push*)",
|
|
||||||
"Bash(git stash list*)",
|
|
||||||
"Bash(git stash show*)",
|
|
||||||
"Bash(git tag*)",
|
|
||||||
"Bash(git show*)",
|
|
||||||
"Bash(ls *)",
|
|
||||||
"Bash(ls)",
|
|
||||||
"Bash(find *)",
|
|
||||||
"Bash(cat *)",
|
|
||||||
"Bash(head *)",
|
|
||||||
"Bash(tail *)",
|
|
||||||
"Bash(grep *)",
|
|
||||||
"Bash(rg *)",
|
|
||||||
"Bash(fd *)",
|
|
||||||
"Bash(wc *)",
|
|
||||||
"Bash(echo *)",
|
|
||||||
"Bash(pwd)",
|
|
||||||
"Bash(which *)",
|
|
||||||
"Bash(type *)",
|
|
||||||
"Bash(whoami)",
|
|
||||||
"Bash(uname *)",
|
|
||||||
"Bash(mkdir -p *)",
|
|
||||||
"Bash(touch *)",
|
|
||||||
"Bash(cp *)",
|
|
||||||
"Bash(mv *)",
|
|
||||||
"Bash(jq *)",
|
|
||||||
"Bash(yq *)",
|
|
||||||
"Bash(awk *)",
|
|
||||||
"Bash(sort *)",
|
|
||||||
"Bash(uniq *)",
|
|
||||||
"Bash(tr *)",
|
|
||||||
"Bash(cut *)",
|
|
||||||
"Bash(diff *)",
|
|
||||||
"Read(**/*.md)",
|
|
||||||
"Read(**/*.txt)",
|
|
||||||
"Read(**/*.json)",
|
|
||||||
"Read(**/*.yaml)",
|
|
||||||
"Read(**/*.yml)",
|
|
||||||
"Read(**/*.toml)",
|
|
||||||
"Read(**/*.lock)",
|
|
||||||
"Read(**/*.gitignore)",
|
|
||||||
"Read(**/*.dockerignore)",
|
|
||||||
"Read(**/.claudeignore)",
|
|
||||||
"Read(**/Makefile)",
|
|
||||||
"Read(**/Dockerfile*)",
|
|
||||||
"Read(**/docker-compose*)"
|
|
||||||
],
|
|
||||||
"additionalDirectories": []
|
"additionalDirectories": []
|
||||||
},
|
},
|
||||||
|
"model": "opus",
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"SessionStart": [
|
"SessionStart": [
|
||||||
{
|
{
|
||||||
@ -210,6 +211,10 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"statusLine": {
|
||||||
|
"type": "command",
|
||||||
|
"command": "bash ~/.claude/hooks/statusline.sh"
|
||||||
|
},
|
||||||
"extraKnownMarketplaces": {
|
"extraKnownMarketplaces": {
|
||||||
"claude-code-plugins": {
|
"claude-code-plugins": {
|
||||||
"source": {
|
"source": {
|
||||||
@ -229,10 +234,5 @@
|
|||||||
"repo": "nextlevelbuilder/ui-ux-pro-max-skill"
|
"repo": "nextlevelbuilder/ui-ux-pro-max-skill"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"model": "opus",
|
|
||||||
"statusLine": {
|
|
||||||
"type": "command",
|
|
||||||
"command": "bash ~/.claude/hooks/statusline.sh"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,10 +13,11 @@ $ARGUMENTS
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## STEP 0 — PLUGIN CHECK
|
## STEP 0 — PLUGIN CHECK + AUTO-ACTIVATE
|
||||||
Load `$HOME/.claude/agents/plugin-advisor.md`. Feed request.
|
Load `$HOME/.claude/agents/plugin-advisor.md`. Feed request.
|
||||||
- ACTION REQUIRED → show RECOMMENDATIONS block, offer: A) fix plugins B) type "force". STOP.
|
- ACTION REQUIRED → show RECOMMENDATIONS block, offer: A) fix plugins B) type "force". STOP.
|
||||||
- OK → `✅ Plugin check passed — [active plugins]`, continue.
|
- PROPOSED CHANGES exist → show list, ask "Apply? (yes / no / customize)". Apply on confirm.
|
||||||
|
- OK → `✅ Plugin check passed — [active plugins] — complexity: <score>%`, continue.
|
||||||
|
|
||||||
## STEP 1 — INTERVIEW
|
## STEP 1 — INTERVIEW
|
||||||
Before loading the interviewer, check for an existing CLAUDE.md:
|
Before loading the interviewer, check for an existing CLAUDE.md:
|
||||||
@ -62,6 +63,30 @@ Verify: `git init` + build passes.
|
|||||||
## STEP 5b — CREATE README
|
## STEP 5b — CREATE README
|
||||||
Load `$HOME/.claude/agents/readme-updater.md`. README.md missing → CREATE mode auto. No stop.
|
Load `$HOME/.claude/agents/readme-updater.md`. README.md missing → CREATE mode auto. No stop.
|
||||||
|
|
||||||
|
## STEP 5c — CTX7 PRE-FETCH (if fast-libs detected)
|
||||||
|
If `fast-libs` signal was detected in STEP 0 (Next.js, React 18+, Prisma, Supabase, Drizzle, etc.):
|
||||||
|
1. Create `.ctx7-cache/` directory in project root.
|
||||||
|
2. For each detected fast-lib, fetch core docs:
|
||||||
|
```bash
|
||||||
|
mkdir -p .ctx7-cache
|
||||||
|
# Example for detected libs — adapt to actual deps:
|
||||||
|
ctx7 docs /vercel/next.js "app router middleware routing" > .ctx7-cache/nextjs-core.md 2>/dev/null || true
|
||||||
|
ctx7 docs /prisma/prisma "schema client queries" > .ctx7-cache/prisma-core.md 2>/dev/null || true
|
||||||
|
```
|
||||||
|
3. Add `.ctx7-cache/` to `.gitignore` (local dev cache, not committed).
|
||||||
|
4. Print: `📚 ctx7 docs pre-fetched for: <libs>. Cache at .ctx7-cache/`
|
||||||
|
If `ctx7` not installed or no fast-libs → skip silently.
|
||||||
|
|
||||||
|
## STEP 5d — GRAPHIFY SCAFFOLD (light pass)
|
||||||
|
If `graphify` CLI is installed AND complexity >= 30%:
|
||||||
|
1. Run light graphify on the scaffold:
|
||||||
|
```bash
|
||||||
|
graphify . --output graphify-out --mode quick 2>/dev/null || true
|
||||||
|
```
|
||||||
|
2. Add `graphify-out/` to `.gitignore` if not already present.
|
||||||
|
3. Print: `🔗 Scaffold graph generated at graphify-out/`
|
||||||
|
If `graphify` not installed or complexity < 30% → skip silently.
|
||||||
|
|
||||||
## STEP 6 — PLAN
|
## STEP 6 — PLAN
|
||||||
Invoke `superpowers:writing-plans` with BRIEF + skeleton.
|
Invoke `superpowers:writing-plans` with BRIEF + skeleton.
|
||||||
Granular tasks (2-5 min each), exact file paths, TDD: tests before code.
|
Granular tasks (2-5 min each), exact file paths, TDD: tests before code.
|
||||||
@ -79,6 +104,15 @@ Changes → back to STEP 6. Approved → continue.
|
|||||||
## STEP 8 — IMPLEMENT
|
## STEP 8 — IMPLEMENT
|
||||||
Invoke `superpowers:subagent-driven-development`. Isolated subagents, TDD, 2-stage review per task.
|
Invoke `superpowers:subagent-driven-development`. Isolated subagents, TDD, 2-stage review per task.
|
||||||
|
|
||||||
|
## STEP 8b — GRAPHIFY FULL (after implementation)
|
||||||
|
If `graphify` CLI is installed AND complexity >= 30%:
|
||||||
|
1. Run full graphify on the implemented project:
|
||||||
|
```bash
|
||||||
|
graphify . --output graphify-out 2>/dev/null || true
|
||||||
|
```
|
||||||
|
2. Print: `🔗 Full project graph updated at graphify-out/`
|
||||||
|
If `graphify` not installed or complexity < 30% → skip silently.
|
||||||
|
|
||||||
## STEP 9 — ANALYZE
|
## STEP 9 — ANALYZE
|
||||||
Load `$HOME/.claude/agents/analyzer.md`. Check: no regressions, no deviations, no stale scaffold, conventions respected.
|
Load `$HOME/.claude/agents/analyzer.md`. Check: no regressions, no deviations, no stale scaffold, conventions respected.
|
||||||
|
|
||||||
|
|||||||
@ -13,10 +13,11 @@ $ARGUMENTS
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## STEP 0 — PLUGIN CHECK
|
## STEP 0 — PLUGIN CHECK + AUTO-ACTIVATE
|
||||||
Load `$HOME/.claude/agents/plugin-advisor.md`. Feed request.
|
Load `$HOME/.claude/agents/plugin-advisor.md`. Feed request.
|
||||||
- ACTION REQUIRED → show RECOMMENDATIONS, offer: A) fix plugins B) type "force". STOP.
|
- ACTION REQUIRED → show RECOMMENDATIONS block, offer: A) fix plugins B) type "force". STOP.
|
||||||
- OK → `✅ Plugin check passed — [active plugins]`, continue.
|
- PROPOSED CHANGES exist → show list, ask "Apply? (yes / no / customize)". Apply on confirm.
|
||||||
|
- OK → `✅ Plugin check passed — [active plugins] — complexity: <score>%`, continue.
|
||||||
|
|
||||||
## STEP 0b — PROJECT CONTEXT CHECK
|
## STEP 0b — PROJECT CONTEXT CHECK
|
||||||
Verify the project has a `CLAUDE.md` and print a brief orientation summary:
|
Verify the project has a `CLAUDE.md` and print a brief orientation summary:
|
||||||
@ -43,6 +44,23 @@ ls .gsd/ROADMAP.md 2>/dev/null | head -1
|
|||||||
then re-run `/ship-feature`."
|
then re-run `/ship-feature`."
|
||||||
STOP.
|
STOP.
|
||||||
|
|
||||||
|
## STEP 0c — CTX7 CACHE CHECK (if fast-libs in project)
|
||||||
|
Check if the project uses fast-evolving libs (scan `package.json` for next, react, prisma, supabase, drizzle, expo):
|
||||||
|
1. If `.ctx7-cache/` exists with recent files (<7 days old) → print `📚 ctx7 cache found: <libs>` and continue.
|
||||||
|
2. If `.ctx7-cache/` missing or stale AND `ctx7` is installed AND fast-libs detected:
|
||||||
|
```bash
|
||||||
|
mkdir -p .ctx7-cache
|
||||||
|
# Fetch docs for each detected fast-lib (adapt to actual deps):
|
||||||
|
ctx7 docs /vercel/next.js "app router middleware routing" > .ctx7-cache/nextjs-core.md 2>/dev/null || true
|
||||||
|
ctx7 docs /prisma/prisma "schema client queries" > .ctx7-cache/prisma-core.md 2>/dev/null || true
|
||||||
|
```
|
||||||
|
Print: `📚 ctx7 docs pre-fetched for: <libs>`
|
||||||
|
3. If no fast-libs or `ctx7` not installed → skip silently.
|
||||||
|
|
||||||
|
During implementation (STEP 4), when making decisions about fast-lib APIs:
|
||||||
|
- Read the relevant `.ctx7-cache/<lib>.md` file before writing code.
|
||||||
|
- This avoids repeated ctx7 calls and keeps docs available without context cost.
|
||||||
|
|
||||||
## STEP 1 — BRAINSTORM
|
## STEP 1 — BRAINSTORM
|
||||||
Invoke `superpowers:brainstorming`. Refine request into validated design via Socratic questioning. Don't proceed until design approved.
|
Invoke `superpowers:brainstorming`. Refine request into validated design via Socratic questioning. Don't proceed until design approved.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user