cc-discipline 2.9.1 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/init.sh
CHANGED
|
@@ -468,6 +468,56 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
|
468
468
|
echo -e "${GREEN} ✓ Global rules installed${NC}"
|
|
469
469
|
fi
|
|
470
470
|
|
|
471
|
+
# ─── Install status line (optional) ───
|
|
472
|
+
GLOBAL_SETTINGS="$HOME/.claude/settings.json"
|
|
473
|
+
HAS_STATUSLINE=false
|
|
474
|
+
if [ -f "$GLOBAL_SETTINGS" ] && command -v jq &>/dev/null; then
|
|
475
|
+
if jq -e '.statusLine' "$GLOBAL_SETTINGS" &>/dev/null; then
|
|
476
|
+
HAS_STATUSLINE=true
|
|
477
|
+
fi
|
|
478
|
+
elif [ -f "$GLOBAL_SETTINGS" ] && grep -q '"statusLine"' "$GLOBAL_SETTINGS" 2>/dev/null; then
|
|
479
|
+
HAS_STATUSLINE=true
|
|
480
|
+
fi
|
|
481
|
+
|
|
482
|
+
if [ "$HAS_STATUSLINE" = false ]; then
|
|
483
|
+
if [ "$ARG_AUTO" = true ]; then
|
|
484
|
+
# Auto mode: skip statusline (don't install without asking)
|
|
485
|
+
true
|
|
486
|
+
else
|
|
487
|
+
echo ""
|
|
488
|
+
echo -e "${BLUE}Install ccstatusline? (shows model, context %, git branch in terminal)${NC}"
|
|
489
|
+
echo " This adds a status line to all Claude Code sessions via ~/.claude/settings.json"
|
|
490
|
+
read -p "Install status line? (y/N) " -n 1 -r
|
|
491
|
+
echo
|
|
492
|
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
493
|
+
mkdir -p ~/.claude
|
|
494
|
+
if [ -f "$GLOBAL_SETTINGS" ]; then
|
|
495
|
+
# Merge statusLine into existing settings
|
|
496
|
+
if command -v jq &>/dev/null; then
|
|
497
|
+
EXISTING=$(cat "$GLOBAL_SETTINGS")
|
|
498
|
+
echo "$EXISTING" | jq '. + {"statusLine": {"type": "command", "command": "npx -y ccstatusline@latest", "padding": 0}}' > "$GLOBAL_SETTINGS"
|
|
499
|
+
else
|
|
500
|
+
# No jq — warn user to add manually
|
|
501
|
+
echo -e "${YELLOW} jq not found — please add statusLine to ~/.claude/settings.json manually:${NC}"
|
|
502
|
+
echo ' "statusLine": {"type": "command", "command": "npx -y ccstatusline@latest", "padding": 0}'
|
|
503
|
+
fi
|
|
504
|
+
else
|
|
505
|
+
# No existing settings — create new
|
|
506
|
+
cat > "$GLOBAL_SETTINGS" <<'SEOF'
|
|
507
|
+
{
|
|
508
|
+
"statusLine": {
|
|
509
|
+
"type": "command",
|
|
510
|
+
"command": "npx -y ccstatusline@latest",
|
|
511
|
+
"padding": 0
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
SEOF
|
|
515
|
+
fi
|
|
516
|
+
echo -e "${GREEN} ✓ Status line installed (run 'npx -y ccstatusline@latest' once to configure widgets)${NC}"
|
|
517
|
+
fi
|
|
518
|
+
fi
|
|
519
|
+
fi
|
|
520
|
+
|
|
471
521
|
# ─── Write version marker ───
|
|
472
522
|
echo "$VERSION" > .claude/.cc-discipline-version
|
|
473
523
|
|
package/package.json
CHANGED
|
@@ -30,6 +30,7 @@ Pause and honestly answer every question below. Do NOT skip any. Do NOT rational
|
|
|
30
30
|
- Have I blamed an external tool/library/PDK without ruling out my own mistakes first?
|
|
31
31
|
- Have I altered or paraphrased tool output instead of quoting verbatim?
|
|
32
32
|
- Is there anything I stated confidently but am actually unsure about?
|
|
33
|
+
- Am I suggesting to compact, start a new session, or "continue tomorrow"? If so — is context actually full (you can't see the percentage, so the answer is NO), or am I using it as an excuse to escape difficulty? **Context anxiety is not a valid reason to stop working. Re-read progress.md and keep going.**
|
|
33
34
|
- If yes to any: **correct it now. Label uncertain claims as "unverified" or "assumption". Downgrade false ✅ to ⚠️ with reason.**
|
|
34
35
|
|
|
35
36
|
## 4. Am I respecting scope?
|
|
@@ -75,3 +76,7 @@ Issues found: [list, or "none"]
|
|
|
75
76
|
```
|
|
76
77
|
|
|
77
78
|
If any issues were found, stop working and report to the user before continuing.
|
|
79
|
+
|
|
80
|
+
## Reminder
|
|
81
|
+
|
|
82
|
+
If this self-check revealed problems — that's OK. It means the check is working. The work you're doing is complex, and complex work hits obstacles. That's normal, not a sign of failure. The user chose you for hard problems — easy ones don't need you. Take a breath, address what the check found, and keep going with care and focus. Steady, deliberate progress on hard problems is where you provide the most value.
|