oh-my-customcode 0.58.1 → 0.58.3
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/dist/cli/index.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/templates/.claude/agents/fe-design-expert.md +7 -14
- package/templates/.claude/agents/fe-svelte-agent.md +1 -0
- package/templates/.claude/agents/fe-vuejs-agent.md +1 -0
- package/templates/.claude/hooks/scripts/cost-cap-advisor.sh +2 -2
- package/templates/.claude/hooks/scripts/feedback-collector.sh +16 -1
- package/templates/.claude/rules/SHOULD-hud-statusline.md +13 -2
- package/templates/.claude/skills/release-plan/SKILL.md +18 -1
- package/templates/.claude/statusline.sh +43 -4
- package/templates/manifest.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -9325,7 +9325,7 @@ var init_package = __esm(() => {
|
|
|
9325
9325
|
workspaces: [
|
|
9326
9326
|
"packages/*"
|
|
9327
9327
|
],
|
|
9328
|
-
version: "0.58.
|
|
9328
|
+
version: "0.58.3",
|
|
9329
9329
|
description: "Batteries-included agent harness for Claude Code",
|
|
9330
9330
|
type: "module",
|
|
9331
9331
|
bin: {
|
|
@@ -30415,7 +30415,7 @@ async function removeDeprecatedFiles(targetDir, options) {
|
|
|
30415
30415
|
return removed;
|
|
30416
30416
|
}
|
|
30417
30417
|
function extractFrontmatterName(content) {
|
|
30418
|
-
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
30418
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
30419
30419
|
if (!match)
|
|
30420
30420
|
return null;
|
|
30421
30421
|
const nameMatch = match[1].match(/^name:\s*(.+)$/m);
|
package/dist/index.js
CHANGED
|
@@ -1672,7 +1672,7 @@ var package_default = {
|
|
|
1672
1672
|
workspaces: [
|
|
1673
1673
|
"packages/*"
|
|
1674
1674
|
],
|
|
1675
|
-
version: "0.58.
|
|
1675
|
+
version: "0.58.3",
|
|
1676
1676
|
description: "Batteries-included agent harness for Claude Code",
|
|
1677
1677
|
type: "module",
|
|
1678
1678
|
bin: {
|
|
@@ -2398,7 +2398,7 @@ async function removeDeprecatedFiles(targetDir, options) {
|
|
|
2398
2398
|
return removed;
|
|
2399
2399
|
}
|
|
2400
2400
|
function extractFrontmatterName(content) {
|
|
2401
|
-
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
2401
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
2402
2402
|
if (!match)
|
|
2403
2403
|
return null;
|
|
2404
2404
|
const nameMatch = match[1].match(/^name:\s*(.+)$/m);
|
package/package.json
CHANGED
|
@@ -30,20 +30,13 @@ External from https://github.com/pbakaus/impeccable (v1.0.0)
|
|
|
30
30
|
|
|
31
31
|
## Capabilities
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| **colorize** | "add color", "color palette", "fix colors" | Introduce strategic color using OKLCH; build tinted neutrals, avoid pure black/white |
|
|
41
|
-
| **animate** | "add motion", "animation", "transitions" | Add purposeful motion using 100ms/300ms/500ms rule; avoid decorative bounce/elastic |
|
|
42
|
-
| **normalize** | "align design system", "tokens", "consistency" | Align with design system standards; enforce spacing scale and token usage |
|
|
43
|
-
| **polish** | "final pass", "ship ready", "pre-launch review" | Pre-ship quality sweep across all dimensions; AI slop test included |
|
|
44
|
-
| **clarify** | "improve copy", "UX writing", "button labels" | Improve unclear labels, microcopy, empty states, and error messages |
|
|
45
|
-
| **arrange** | "fix layout", "spacing", "visual rhythm" | Fix layout structure, whitespace, alignment, and visual rhythm |
|
|
46
|
-
| **adapt** | "responsive", "mobile", "breakpoints" | Adapt design for different screen sizes and input modes |
|
|
33
|
+
## Steering Commands
|
|
34
|
+
|
|
35
|
+
10 Impeccable commands available via the `impeccable-design` skill:
|
|
36
|
+
|
|
37
|
+
**Review**: critique, audit | **Typography**: typeset | **Color**: colorize | **Motion**: animate | **Standards**: normalize, polish | **Copy**: clarify | **Layout**: arrange | **Responsive**: adapt
|
|
38
|
+
|
|
39
|
+
See `impeccable-design` skill for detailed command workflows and triggers.
|
|
47
40
|
|
|
48
41
|
### AI Slop Test
|
|
49
42
|
|
|
@@ -19,8 +19,8 @@ if [ ! -f "$COST_FILE" ]; then
|
|
|
19
19
|
exit 0
|
|
20
20
|
fi
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
IFS=$'\t' read -r cost_usd ctx_pct timestamp < "$COST_FILE" 2>/dev/null || {
|
|
22
|
+
# TSV: cost_usd, ctx_pct, timestamp, rl_5h_pct, rl_7d_pct, rl_5h_resets, rl_7d_resets
|
|
23
|
+
IFS=$'\t' read -r cost_usd ctx_pct timestamp _rl_5h _rl_7d _rl_5h_resets _rl_7d_resets < "$COST_FILE" 2>/dev/null || {
|
|
24
24
|
echo "$input"
|
|
25
25
|
exit 0
|
|
26
26
|
}
|
|
@@ -19,6 +19,12 @@ OUTCOMES_FILE="/tmp/.claude-task-outcomes-${PPID}"
|
|
|
19
19
|
DB_PATH="${HOME}/.config/oh-my-customcode/eval-core.sqlite"
|
|
20
20
|
[ -f "$DB_PATH" ] || exit 0
|
|
21
21
|
|
|
22
|
+
# Log file for error diagnostics
|
|
23
|
+
LOG_FILE="/tmp/.claude-feedback-collector-${PPID}.log"
|
|
24
|
+
|
|
25
|
+
# SQL injection safety: escape single quotes
|
|
26
|
+
_sql_escape() { printf '%s' "${1//\'/\'\'}"; }
|
|
27
|
+
|
|
22
28
|
# Count failures per agent type
|
|
23
29
|
declare -A FAILURE_COUNTS
|
|
24
30
|
declare -A TOTAL_COUNTS
|
|
@@ -62,7 +68,16 @@ for agent_type in "${!FAILURE_COUNTS[@]}"; do
|
|
|
62
68
|
failure_rate=$(awk "BEGIN {printf \"%.2f\", $count/$total}")
|
|
63
69
|
description="Agent '${agent_type}' failed ${count}/${total} times (${failure_rate} failure rate) in session"
|
|
64
70
|
|
|
65
|
-
|
|
71
|
+
escaped_agent_type=$(_sql_escape "$agent_type")
|
|
72
|
+
escaped_action_type=$(_sql_escape "$action_type")
|
|
73
|
+
escaped_description=$(_sql_escape "$description")
|
|
74
|
+
escaped_confidence=$(_sql_escape "$confidence")
|
|
75
|
+
escaped_timestamp=$(_sql_escape "$TIMESTAMP")
|
|
76
|
+
|
|
77
|
+
sqlite3 "$DB_PATH" "INSERT INTO improvement_actions (target_type, target_name, action_type, description, confidence, feedback_source, status, created_at) VALUES ('agent', '${escaped_agent_type}', '${escaped_action_type}', '${escaped_description}', '${escaped_confidence}', 'outcome_derived', 'proposed', '${escaped_timestamp}');" \
|
|
78
|
+
2>>"$LOG_FILE" || {
|
|
79
|
+
echo "[feedback-collector] INSERT failed for ${agent_type}" >> "$LOG_FILE"
|
|
80
|
+
}
|
|
66
81
|
|
|
67
82
|
INSERTED=$((INSERTED + 1))
|
|
68
83
|
done
|
|
@@ -41,10 +41,10 @@ Implemented in `.claude/hooks/hooks.json` (PreToolUse → Agent/Task matcher).
|
|
|
41
41
|
### Format
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
{Cost} | {project} | {branch} | RL:{rate_limit}% | WL:{weekly_limit}% | CTX:{usage}%
|
|
44
|
+
{Cost} | {project} | {branch} | RL:{rate_limit}% {countdown} | WL:{weekly_limit}% {countdown} | CTX:{usage}%
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Example: `$0.05 | my-project | develop | RL:45% | WL:72% | CTX:42%`
|
|
47
|
+
Example: `$0.05 | my-project | develop | RL:45% 3h20m | WL:72% 2d3h | CTX:42%`
|
|
48
48
|
|
|
49
49
|
### Configuration
|
|
50
50
|
|
|
@@ -81,6 +81,17 @@ The `RL:{rate_limit}%` segment only appears when Claude Code v2.1.80+ provides `
|
|
|
81
81
|
|
|
82
82
|
The `WL:{weekly_limit}%` segment shows the 7-day rolling rate limit percentage. Both RL and WL segments are omitted on older versions.
|
|
83
83
|
|
|
84
|
+
### Countdown Format
|
|
85
|
+
|
|
86
|
+
The `{countdown}` shows time until RL/WL resets. Omitted when data is unavailable.
|
|
87
|
+
|
|
88
|
+
| Remaining | Display | Example |
|
|
89
|
+
|-----------|---------|---------|
|
|
90
|
+
| >= 1 day | `{d}d{h}h` | `2d3h` |
|
|
91
|
+
| >= 1 hour | `{h}h{m}m` | `5h30m` |
|
|
92
|
+
| < 1 hour | `{m}m` | `45m` |
|
|
93
|
+
| expired/unavailable | (omitted) | `WL:72%` |
|
|
94
|
+
|
|
84
95
|
## Integration
|
|
85
96
|
|
|
86
97
|
Integrates with R007 (Agent ID), R008 (Tool ID), R009 (Parallel).
|
|
@@ -80,6 +80,13 @@ Use title keywords as additional hints:
|
|
|
80
80
|
- `Part of #NNN` or `Depends on #NNN` → sequential constraint
|
|
81
81
|
- Epic references → group constraint
|
|
82
82
|
|
|
83
|
+
**Epic handling**:
|
|
84
|
+
- Epic issues (title starts with "epic:" or has `epic` label) with `verify-done` label:
|
|
85
|
+
- Do NOT include the epic itself in release bins
|
|
86
|
+
- DO scan epic body for child issue references (#NNN)
|
|
87
|
+
- Include any open child issues that have `verify-done` label
|
|
88
|
+
- If all child issues are closed, recommend closing the epic
|
|
89
|
+
|
|
83
90
|
### Phase 4: Group into Release Units
|
|
84
91
|
|
|
85
92
|
Apply these grouping rules:
|
|
@@ -91,7 +98,7 @@ Apply these grouping rules:
|
|
|
91
98
|
3. **Sequential dependencies stay ordered** — if #A depends on #B, they go in the same release or #B's release precedes #A's
|
|
92
99
|
4. **Independent issues may be batched** — up to the size cap
|
|
93
100
|
5. **Minimum 1 issue per release** — never create empty releases
|
|
94
|
-
6. **L-sized issues occupy their own release bin** — an L-sized issue that exceeds the M cap is not split; document as a large release with a scope note
|
|
101
|
+
6. **L-sized issues occupy their own release bin** — an L-sized issue that exceeds the M cap is not split; document as a large release with a scope note. **L-sized issues MUST NOT be deferred to "next session" or "future release" — they are planned in the current run as a standalone release unit.**
|
|
95
102
|
|
|
96
103
|
Grouping algorithm:
|
|
97
104
|
1. Sort all issues: P1 → P2 → P3, then by size (L first, then M, S, XS)
|
|
@@ -141,6 +148,16 @@ For each release group, produce:
|
|
|
141
148
|
- {any dependency constraints, breaking changes, or risks}
|
|
142
149
|
```
|
|
143
150
|
|
|
151
|
+
### Completeness Check
|
|
152
|
+
|
|
153
|
+
Before generating the plan document, verify:
|
|
154
|
+
- Every verify-done issue is assigned to a release bin (none dropped)
|
|
155
|
+
- Epic child issues with verify-done are included
|
|
156
|
+
- Issue count in plan == issue count from Phase 1 collection (minus epics themselves)
|
|
157
|
+
- No issue is deferred without explicit user approval
|
|
158
|
+
|
|
159
|
+
If any issue is missing from release bins, halt and report the discrepancy.
|
|
160
|
+
|
|
144
161
|
**Agent suggestion heuristic**:
|
|
145
162
|
| Issue domain | Suggested agent |
|
|
146
163
|
|--------------|----------------|
|
|
@@ -66,9 +66,9 @@ fi
|
|
|
66
66
|
|
|
67
67
|
# ---------------------------------------------------------------------------
|
|
68
68
|
# 4. Single jq call — extract all fields as TSV
|
|
69
|
-
# Fields: model_name, project_dir, ctx_pct, ctx_size, cost_usd, rl_5h_pct, rl_7d_pct
|
|
69
|
+
# Fields: model_name, project_dir, ctx_pct, ctx_size, cost_usd, rl_5h_pct, rl_7d_pct, rl_5h_resets, rl_7d_resets
|
|
70
70
|
# ---------------------------------------------------------------------------
|
|
71
|
-
IFS=$'\t' read -r model_name project_dir ctx_pct ctx_size cost_usd rl_5h_pct rl_7d_pct <<< "$(
|
|
71
|
+
IFS=$'\t' read -r model_name project_dir ctx_pct ctx_size cost_usd rl_5h_pct rl_7d_pct rl_5h_resets rl_7d_resets <<< "$(
|
|
72
72
|
printf '%s' "$json" | jq -r '[
|
|
73
73
|
(.model.display_name // "unknown"),
|
|
74
74
|
(.workspace.current_dir // ""),
|
|
@@ -76,7 +76,9 @@ IFS=$'\t' read -r model_name project_dir ctx_pct ctx_size cost_usd rl_5h_pct rl_
|
|
|
76
76
|
(.context_window.context_window_size // 0),
|
|
77
77
|
(.cost.total_cost_usd // 0),
|
|
78
78
|
(.rate_limits.five_hour.used_percentage // -1),
|
|
79
|
-
(.rate_limits.seven_day.used_percentage // -1)
|
|
79
|
+
(.rate_limits.seven_day.used_percentage // -1),
|
|
80
|
+
(.rate_limits.five_hour.resets_at // -1),
|
|
81
|
+
(.rate_limits.seven_day.resets_at // -1)
|
|
80
82
|
] | @tsv'
|
|
81
83
|
)"
|
|
82
84
|
|
|
@@ -85,7 +87,32 @@ IFS=$'\t' read -r model_name project_dir ctx_pct ctx_size cost_usd rl_5h_pct rl_
|
|
|
85
87
|
# ---------------------------------------------------------------------------
|
|
86
88
|
COST_BRIDGE_FILE="/tmp/.claude-cost-${PPID}"
|
|
87
89
|
_tmp="${COST_BRIDGE_FILE}.tmp.$$"
|
|
88
|
-
printf '%s\t%s\t%s\t%s\t%s\n' "$cost_usd" "$ctx_pct" "$(date +%s)" "$rl_5h_pct" "$rl_7d_pct" > "$_tmp" 2>/dev/null && mv -f "$_tmp" "$COST_BRIDGE_FILE" 2>/dev/null || true
|
|
90
|
+
printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' "$cost_usd" "$ctx_pct" "$(date +%s)" "$rl_5h_pct" "$rl_7d_pct" "$rl_5h_resets" "$rl_7d_resets" > "$_tmp" 2>/dev/null && mv -f "$_tmp" "$COST_BRIDGE_FILE" 2>/dev/null || true
|
|
91
|
+
|
|
92
|
+
# ---------------------------------------------------------------------------
|
|
93
|
+
# 4c. Countdown helper — converts resets_at epoch to human-readable duration
|
|
94
|
+
# ---------------------------------------------------------------------------
|
|
95
|
+
_countdown() {
|
|
96
|
+
local resets_at="$1"
|
|
97
|
+
if [[ "$resets_at" =~ ^[0-9]+$ ]] && [[ "$resets_at" -gt 0 ]]; then
|
|
98
|
+
local now
|
|
99
|
+
now=$(date +%s)
|
|
100
|
+
local remaining=$((resets_at - now))
|
|
101
|
+
if [[ "$remaining" -gt 0 ]]; then
|
|
102
|
+
local days=$((remaining / 86400))
|
|
103
|
+
local hours=$(( (remaining % 86400) / 3600 ))
|
|
104
|
+
if [[ "$days" -gt 0 ]]; then
|
|
105
|
+
printf '%dd%dh' "$days" "$hours"
|
|
106
|
+
elif [[ "$hours" -gt 0 ]]; then
|
|
107
|
+
local mins=$(( (remaining % 3600) / 60 ))
|
|
108
|
+
printf '%dh%dm' "$hours" "$mins"
|
|
109
|
+
else
|
|
110
|
+
local mins=$((remaining / 60))
|
|
111
|
+
printf '%dm' "$mins"
|
|
112
|
+
fi
|
|
113
|
+
fi
|
|
114
|
+
fi
|
|
115
|
+
}
|
|
89
116
|
|
|
90
117
|
# ---------------------------------------------------------------------------
|
|
91
118
|
# 5. Model display name + color (bash 3.2 compatible case pattern matching)
|
|
@@ -271,6 +298,12 @@ if [[ "$rl_5h_int" -ge 0 ]]; then
|
|
|
271
298
|
fi
|
|
272
299
|
fi
|
|
273
300
|
|
|
301
|
+
# Append countdown to RL display if available
|
|
302
|
+
rl_countdown="$(_countdown "$rl_5h_resets")"
|
|
303
|
+
if [[ -n "$rl_countdown" && -n "$rl_display" ]]; then
|
|
304
|
+
rl_display="${rl_display} ${rl_countdown}"
|
|
305
|
+
fi
|
|
306
|
+
|
|
274
307
|
# ---------------------------------------------------------------------------
|
|
275
308
|
# 9c. Weekly rate limit percentage with color (v2.1.80+, optional)
|
|
276
309
|
# ---------------------------------------------------------------------------
|
|
@@ -292,6 +325,12 @@ if [[ "$wl_7d_int" -ge 0 ]]; then
|
|
|
292
325
|
fi
|
|
293
326
|
fi
|
|
294
327
|
|
|
328
|
+
# Append countdown to WL display if available
|
|
329
|
+
wl_countdown="$(_countdown "$rl_7d_resets")"
|
|
330
|
+
if [[ -n "$wl_countdown" && -n "$wl_display" ]]; then
|
|
331
|
+
wl_display="${wl_display} ${wl_countdown}"
|
|
332
|
+
fi
|
|
333
|
+
|
|
295
334
|
# ---------------------------------------------------------------------------
|
|
296
335
|
# 10. Assemble and output the status line
|
|
297
336
|
# ---------------------------------------------------------------------------
|
package/templates/manifest.json
CHANGED