@ccoalm/ccl-skills 0.12.0 → 0.14.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/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/SKILL.md +21 -12
- package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/references/diagnosis-playbook.md +42 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/SKILL.md +7 -4
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-context-freshness.md +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-tool-dispatch.md +2 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/inference-capacity-operations.md +20 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/llm-client-gateway.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/model-prompt-evaluation.md +3 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/retrieval-agent-safety.md +5 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/SKILL.md +13 -9
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/references/multi-agent-delegation-playbook.md +12 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/SKILL.md +14 -41
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/attention-budget-ratchet.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/correction-routing-map.md +22 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/coverage-exhaustion-traps.md +7 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/description-authoring.md +26 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/dual-track-review-gate.md +2 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/eval-routing.md +2 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/external-practice-controls.md +6 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-quickstart.md +4 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/harness-patterns-and-eval.md +22 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/incident-postmortem-extraction.md +8 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/rule-consolidation.md +1 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-register.md +70 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-judgment-extraction.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/validation-and-landing.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/entrypoint_form_census.py +169 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/reference-access-census.sh +157 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/review_ledger_binding.py +454 -103
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_regressions.sh +8 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_entrypoint_form_census.sh +174 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_reference_access_census.sh +209 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_review_ledger_binding.sh +331 -0
- package/dist/assets/release.json +56 -31
- package/package.json +1 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Reference-access census: which of a skill package's files were actually
|
|
3
|
+
# touched by real agent sessions on THIS host, over a lookback window.
|
|
4
|
+
#
|
|
5
|
+
# Why this exists: a rule set must not grow monotonically, but "retire what is
|
|
6
|
+
# not pulling its weight" needs a signal that is not the author's opinion. The
|
|
7
|
+
# closest observable proxy on a local host is the per-file access record in the
|
|
8
|
+
# agent's own session transcripts (Claude Code `~/.claude/projects/**/*.jsonl`,
|
|
9
|
+
# Codex `~/.codex/sessions/**/*.jsonl`): a reference that no session mentioned
|
|
10
|
+
# in N days is a relocation/retirement candidate; one mentioned in most sessions
|
|
11
|
+
# that loaded the skill is a candidate for promotion into the entrypoint. This
|
|
12
|
+
# is the local instantiation of the usage counters that context-evolution
|
|
13
|
+
# methods keep per bullet (helpful/harmful counts) and of the "ignored content
|
|
14
|
+
# is unnecessary or poorly signaled" observation in the official skill-authoring
|
|
15
|
+
# guidance — advisory only, never a gate (Goodhart: a count that becomes a
|
|
16
|
+
# target gets gamed by mentioning files).
|
|
17
|
+
#
|
|
18
|
+
# Privacy contract: the transcripts are private per-host data. This script
|
|
19
|
+
# prints ONLY repo-relative skill file paths, per-file session counts, and
|
|
20
|
+
# last-touched dates. It never prints transcript text, prompts, absolute paths
|
|
21
|
+
# outside the skill tree, or session ids. Its output is safe to paste into a
|
|
22
|
+
# private charter; it is still not shared-tree content by itself.
|
|
23
|
+
#
|
|
24
|
+
# Counting unit: a SESSION (one transcript file) counts once per skill file it
|
|
25
|
+
# mentions, whatever the tool (Read, sed, grep, Skill load). "Mentioned" is a
|
|
26
|
+
# superset of "read to depth" — treat a count as an upper bound on real use.
|
|
27
|
+
#
|
|
28
|
+
# Usage:
|
|
29
|
+
# reference-access-census.sh [--skill <name>] [--days <n>] [--repo-root <dir>]
|
|
30
|
+
# [--logs <dir>[,<dir>...]]
|
|
31
|
+
# Defaults: skill=skill-extraction-workflow, days=60, repo-root=cwd-derived,
|
|
32
|
+
# logs=$HOME/.claude/projects,$HOME/.codex/sessions
|
|
33
|
+
# Exit 0 on a completed census or an honest unevaluated result (no transcripts);
|
|
34
|
+
# exit 2 on usage errors and on input errors (unreadable/vanished/unexecutable
|
|
35
|
+
# inputs) — counts are withheld rather than printed as zeros.
|
|
36
|
+
set -euo pipefail
|
|
37
|
+
|
|
38
|
+
skill="skill-extraction-workflow"
|
|
39
|
+
days=60
|
|
40
|
+
repo_root=""
|
|
41
|
+
logs="${HOME:+${HOME}/.claude/projects,${HOME}/.codex/sessions}"
|
|
42
|
+
logs_explicit=0
|
|
43
|
+
while [ $# -gt 0 ]; do
|
|
44
|
+
case "$1" in
|
|
45
|
+
--skill|--days|--repo-root|--logs)
|
|
46
|
+
if [ $# -lt 2 ]; then echo "reference_access_census_usage_error: $1 needs a value" >&2; exit 2; fi ;;
|
|
47
|
+
esac
|
|
48
|
+
case "$1" in
|
|
49
|
+
--skill) skill="$2"; shift 2 ;;
|
|
50
|
+
--days) days="$2"; shift 2 ;;
|
|
51
|
+
--repo-root) repo_root="$2"; shift 2 ;;
|
|
52
|
+
--logs) logs="$2"; logs_explicit=1; shift 2 ;;
|
|
53
|
+
-h|--help) sed -n '2,32p' "$0"; exit 0 ;;
|
|
54
|
+
*) echo "reference_access_census_usage_error: unknown argument (see --help)" >&2; exit 2 ;;
|
|
55
|
+
esac
|
|
56
|
+
done
|
|
57
|
+
if [ -z "$repo_root" ]; then
|
|
58
|
+
repo_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
59
|
+
fi
|
|
60
|
+
skill_dir="$repo_root/skills/$skill"
|
|
61
|
+
if [ ! -d "$skill_dir" ]; then
|
|
62
|
+
echo "reference_access_census_usage_error: --skill names no tracked skill package under the repo root" >&2; exit 2
|
|
63
|
+
fi
|
|
64
|
+
case "$days" in ''|*[!0-9]*) echo "reference_access_census_usage_error: --days must be an integer" >&2; exit 2 ;; esac
|
|
65
|
+
|
|
66
|
+
# Inventory: every tracked markdown file in the package (entrypoint + references).
|
|
67
|
+
files=()
|
|
68
|
+
while IFS= read -r f; do files+=("$f"); done < <(cd "$repo_root" && git ls-files "skills/$skill/SKILL.md" "skills/$skill/references/*.md" 2>/dev/null | sort)
|
|
69
|
+
if [ "${#files[@]}" -eq 0 ]; then
|
|
70
|
+
echo "reference_access_census_usage_error: --skill names a package with no tracked SKILL.md or references" >&2; exit 2
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Candidate transcripts: any .jsonl under the log roots modified within the window.
|
|
74
|
+
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
75
|
+
roots=(); if [ -n "$logs" ]; then IFS=',' read -r -a roots <<<"$logs"; fi
|
|
76
|
+
: > "$tmp/candidates0"; : > "$tmp/errors"
|
|
77
|
+
# Input errors are never zeros: every scan phase collects stderr, and a non-empty
|
|
78
|
+
# error log withholds the table (exit 2) instead of printing counts that would
|
|
79
|
+
# read as evidence. grep's no-match status writes nothing to stderr, so it never
|
|
80
|
+
# trips this; unreadable, vanished, or unexecutable inputs do. The error log is
|
|
81
|
+
# summarized as a count only — file names would be private paths.
|
|
82
|
+
withhold_if_errors() {
|
|
83
|
+
if [ -s "$tmp/errors" ]; then
|
|
84
|
+
n="$(wc -l < "$tmp/errors" | tr -d ' ')"
|
|
85
|
+
echo "reference_access_census_unevaluated: $n input error(s) while scanning transcripts (unreadable, vanished, or unexecutable inputs); counts withheld"
|
|
86
|
+
exit 2
|
|
87
|
+
fi
|
|
88
|
+
}
|
|
89
|
+
# A default root that is absent is normal (the host may run only one agent); an
|
|
90
|
+
# explicitly supplied root that is absent is an input error — the caller asked
|
|
91
|
+
# for a scan that cannot happen, and skipping it would read as a real count.
|
|
92
|
+
for r in "${roots[@]}"; do
|
|
93
|
+
[ -n "$r" ] || continue
|
|
94
|
+
if [ ! -d "$r" ]; then
|
|
95
|
+
if [ "$logs_explicit" -eq 1 ]; then echo "missing explicit log root" >> "$tmp/errors"; fi
|
|
96
|
+
continue
|
|
97
|
+
fi
|
|
98
|
+
find "$r" -type f -name '*.jsonl' -mtime "-$days" -print0 >> "$tmp/candidates0" 2>> "$tmp/errors" || echo "transcript listing failed under one log root" >> "$tmp/errors"
|
|
99
|
+
done
|
|
100
|
+
withhold_if_errors
|
|
101
|
+
# The inventory is NUL-delimited (a pathname may contain a newline) and
|
|
102
|
+
# deduplicated by pathname: overlapping roots (a root and its own subtree, or
|
|
103
|
+
# the same root twice) list a transcript more than once, and a session must
|
|
104
|
+
# count once. Two names for one file (symlinked roots) are not canonicalized.
|
|
105
|
+
sort -zu "$tmp/candidates0" -o "$tmp/candidates0"
|
|
106
|
+
total_sessions="$(tr -cd '\0' < "$tmp/candidates0" | wc -c | tr -d ' ')"
|
|
107
|
+
if [ "$total_sessions" -eq 0 ]; then
|
|
108
|
+
echo "reference_access_census_unevaluated: no transcripts within ${days}d under ${#roots[@]} log root(s); counts withheld"
|
|
109
|
+
exit 0
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# Sessions that mention the package at all (fixed-string prefilter keeps this fast).
|
|
113
|
+
# xargs batches keep this under ARG_MAX; grep exit 1 (no match in a batch) is not an error.
|
|
114
|
+
# grep exit 1 (no match in a batch) is success; any other non-zero status —
|
|
115
|
+
# with or without a stderr line — is an input error, so each batch runs under a
|
|
116
|
+
# small wrapper that normalizes 1 to 0 and lets xargs report anything else.
|
|
117
|
+
# `|| rc=$?` keeps the batch alive when the caller exported SHELLOPTS=errexit:
|
|
118
|
+
# a bare `grep; rc=$?` would exit the child at status 1 before normalizing it.
|
|
119
|
+
grep_batch() { local rc=0; grep -lF --null "$@" || rc=$?; [ "$rc" -le 1 ] && return 0; return "$rc"; }
|
|
120
|
+
export -f grep_batch 2>/dev/null || true
|
|
121
|
+
if ! xargs -0 -n 200 bash -c 'grep_batch "$@"' _ "skills/$skill/" < "$tmp/candidates0" > "$tmp/touching0" 2>> "$tmp/errors"; then
|
|
122
|
+
echo "transcript scan failed in at least one batch" >> "$tmp/errors"
|
|
123
|
+
fi
|
|
124
|
+
withhold_if_errors
|
|
125
|
+
touching="$(tr -cd '\0' < "$tmp/touching0" | wc -c | tr -d ' ')"
|
|
126
|
+
|
|
127
|
+
# Per-file session count + last-touched date (mtime of the newest touching transcript).
|
|
128
|
+
: > "$tmp/rows"
|
|
129
|
+
for f in "${files[@]}"; do
|
|
130
|
+
rel="${f#skills/$skill/}"
|
|
131
|
+
if [ "$touching" -eq 0 ]; then n=0; last="-"; else
|
|
132
|
+
if ! xargs -0 -n 200 bash -c 'grep_batch "$@"' _ "$f" < "$tmp/touching0" > "$tmp/hits0" 2>> "$tmp/errors"; then
|
|
133
|
+
echo "transcript scan failed in at least one batch" >> "$tmp/errors"
|
|
134
|
+
fi
|
|
135
|
+
withhold_if_errors
|
|
136
|
+
n="$(tr -cd '\0' < "$tmp/hits0" | wc -c | tr -d ' ')"
|
|
137
|
+
if [ "$n" -gt 0 ]; then
|
|
138
|
+
# BSD stat first, GNU stat as the fallback; only the fallback's failure is an
|
|
139
|
+
# error. Every substitution is guarded so a failing pipeline cannot abort the
|
|
140
|
+
# script under set -e before withhold_if_errors runs.
|
|
141
|
+
last="$(xargs -0 stat -f '%Sm' -t '%Y-%m-%d' < "$tmp/hits0" 2>/dev/null | sort | tail -1)" || last=""
|
|
142
|
+
if [ -z "$last" ]; then
|
|
143
|
+
last="$(xargs -0 stat -c '%y' < "$tmp/hits0" 2>> "$tmp/errors" | cut -c1-10 | sort | tail -1)" || last=""
|
|
144
|
+
fi
|
|
145
|
+
if [ -z "$last" ]; then
|
|
146
|
+
[ -s "$tmp/errors" ] || echo "stat produced no timestamp for a touching transcript" >> "$tmp/errors"
|
|
147
|
+
withhold_if_errors
|
|
148
|
+
fi
|
|
149
|
+
else last="-"; fi
|
|
150
|
+
fi
|
|
151
|
+
if [ "$touching" -gt 0 ]; then share="$(( n * 100 / touching ))%"; else share="-"; fi
|
|
152
|
+
printf '%s | %s | %s | %s\n' "$rel" "$n" "$last" "$share" >> "$tmp/rows"
|
|
153
|
+
done
|
|
154
|
+
printf '%s\n' "reference_access_census: skill=$skill window=${days}d transcripts=$total_sessions sessions_touching_package=$touching"
|
|
155
|
+
printf '%s\n' "file | sessions | last_touched | share_of_touching"
|
|
156
|
+
sort -t'|' -k2,2nr "$tmp/rows"
|
|
157
|
+
echo "reference_access_census_ok"
|