catalog granularity: decide whether skills should be split, merged, or regrouped (static check + paid partition eval)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- ai, devtools, testing-qa
Línea de trabajo
Start with the existing catalog check, catalog trigger-set, catalog trigger-probe, and plan catalog implementations, plus efficiency.py and the referenced issues #94, #217, #331, and #413. Read the documented arm grammar and paired bootstrap approach first; the issue describes a multi-stage CLI feature with prompt generation, routing experiments, clustering, and statistical decisions. Done means static candidates appear in catalog check, the paid command reproduces recorded PR-family and dpnp fixture results, and the method is documented in the README.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Why
The question "is this one skill or several?" keeps coming up. Two examples:
- The napetrov-skills PR family (
pr-review,pr-address,pr-land,pr-queue): should it be split or merged? - The 8
dpnp-*skills in intel/skills: quickstart, migration and troubleshooting share triggers such as NotImplementedError, fallback, dpctl device and porting from NumPy.
Today there is no command for this. The answer depends on routing behaviour, not on reading the skill. An experiment on the PR family (haiku, 3 reps, about $7) showed:
| Finding | Number |
|---|---|
| Current split descriptions load the right skill | 0.13 recall on held-out prompts |
| Merged vs split with matched wording | Recall gap is gone (S' − M = +0.10 [+0.01, +0.20]). The merge's edge was description wording. |
| Cross tasks (need 2+ skills) | Merged 0.67–0.75 full coverage vs split 0.04–0.29. Haiku loads at most about one split skill per run. |
| Sibling confusion | 0 |
| Tokens per load | Merged 21.5k vs split about 5.8k |
Lessons that the command must build in:
- Always include a sharpened-descriptions arm. Without it, merge vs split confounds structure with wording.
- Use held-out prompts. Check for a 4-gram leak against every arm's description.
- Decide on cross coverage and sibling confusion, not on recall alone.
- Check whether the outcome tasks are at ceiling first. The PR outcome tasks were solved without the skill.
Proposal (in the #94 v2 grammar)
Tier 1: free, part of catalog check
A granularity section is added to catalog check output (and to repo scan as a summary line). It never gives a verdict, only candidates:
- Merge candidates. Pairs with high description similarity, shared trigger clauses, or body or snippet duplication.
- Split candidates. Bodies with several section clusters that never reference each other, a long body, or many disjoint "Use when" clauses.
- The output is a hint carrying the exact
catalog granularitycommand and its estimated cost.
Tier 2: paid, catalog granularity ROOT [paid]
dokimi catalog granularity ROOT
--units SKILL[,SKILL...] # merge/regroup: the units are skills
--split SKILL # split: the units are the skill's sections (H2/H3 or job segments)
--from-check # take candidates from catalog check
--k auto|1..N # default auto: dendrogram cuts, see Method
--arms as-is,sharpened,partition[,router]
--prompts auto|FILE --heldout-check
--outcome TASKS_GLOB # optional phase 2, reuses plan catalog / eval tasks
--model haiku --reps 3 --budget USD
plan catalog --preset livecan include it as one cell.- Output:
verdict.jsonplus a markdown section inreport. The verdict is one ofno-change | sharpen-descriptions | merge{groups} | split{k, parts} | add-router, with the deciding metric and its CI.
Method: choosing K and the grouping
Brute force is out. Partitions of 6 skills number 203, and of 8 skills 4140. Instead:
-
Units. For a merge, the units are skills. For a split, they are sections or job segments.
-
Need matrix. Generate user-voice prompts per unit, per pair (cross) and as negatives. Each prompt is labelled with the set of units it needs.
-
Pair affinity (cheap). Three signals feed it:
- co-need rate;
- sibling confusion from one as-is routing pass;
- static overlap (description similarity, body Jaccard, shared snippets).
The distance between two units is 1 − affinity.
- Semantic validation, 11-06: embeddings (bge, Cohere v4) and TF-IDF do not predict confusion, cross-need or wording gains. Example: 6–9 pairs predicted, 0 real on the PR family. Their natural K is unstable. Static signals therefore only build the shortlist; affinity has to come mainly from measured co-need and confusion.
-
Candidate partitions. Average-linkage clustering gives N nested partitions, one per K = 1..N. The cut with the largest dendrogram gap or the best silhouette is the "natural K". Keep K = 1, K = N, the natural K and its neighbours. That is about 4 to 5 candidates.
-
Hard constraints filter the candidates:
- every part must get a description under 1536 chars;
- a classifier must be able to tell the descriptions apart on the prompts;
- each part must be at least a minimum size;
- shared invariants either stay in one part or go to a shared reference file.
-
Paid routing for each surviving candidate. It uses the sharpened arm and held-out prompts, at 3 reps.
The objective isJ = cross_coverage + recall − confusion − λ·tokens_per_load.- Parsimony rule: choose the fewest-tokens candidate whose J lies within the CI of the best one.
- K = 1 wins (no split / merge all) when co-need is high, i.e. most tasks need 2+ units, or when the clustering shows no natural gap.
- K = N plus a router is tested when the split wins recall but loses cross coverage.
-
Outcome (optional). Run the chosen partition against as-is and no skill on discriminating tasks.
Done when
catalog checkemits granularity candidates (free, warn-only in CI).catalog granularityreproduces the PR-family result, and the dpnp result once it is in, from a fixture with a recorded run.- The verdict and the method are documented in the README (user docs, not AGENTS.md).
Related: #94 (CLI grammar), #217 (trigger-probe), #138 (catalog CI), #331 (eval coverage), #413 (corpus-scale scan gaps).
Flow
catalog check(free) returns the candidates and a hint with the estimated cost.- The user opts in.
- Prompt generation, with the leak check.
- Arm build: as-is, sharpened, partitions, router.
- Probe-0: an as-is routing pass. It measures co-need and confusion, and from those builds the candidate partitions.
- Routing, with paired CIs and the J score.
- Outcome (optional). It runs a ceiling gate first.
- Output:
verdict.jsonand the sharpened descriptions as a patch. - Regression re-run on the pinned prompt set whenever the descriptions change.
Integration
| Piece | Reuse | New |
|---|---|---|
| Static candidates | catalog check, #413 |
granularity section (TF-IDF overlap, duplicated sections and snippets, far-away prompts) |
| Prompts | catalog trigger-set, eval tasks generate |
--kind granularity, labelled with units, plus the n-gram leak check |
| Arms | arm grammar §2.5, the skill-catalog arm | sharpened, partition and router builders |
| Routing | catalog trigger-probe (#217), the no-notice discover arm (#110) |
capture of multiple loads, no-load recorded as its own outcome |
| Stats | efficiency.py paired bootstrap |
J score, the parsimony rule, candidates from affinity |
| Outcome | plan catalog, Harbor tasks, #331 |
ceiling gate |
| Output and CI | §2.6/§2.7, #318, #138 | verdict.json; in CI, static warnings only and a paid run on a label |
PR order
- Static granularity section in
catalog check. - Prompt generator and leak check.
- Arm builders and multi-load capture.
catalog granularity: probe-0, partitions, verdict.- Outcome phase with the ceiling gate.
plan catalogcell and the Action label.
Blockers
- Harbor runs with the Claude CLI fail every model call in the container (
api_retry, unknown error), while a plain container reaches Bedrock. The${AWS_BEARER_TOKEN_BEDROCK}text in the job config is Harbor's redaction for persistence and is resolved at run time, so it is not the cause. Leading suspect: the egress-control sidecar blockingbedrock-runtime.*. Next suspect: the background small/fast model resolving to a non-Bedrock ID. - The paired-bootstrap stats are unmerged (the skill-utility branch).
- Outcome tasks sit at ceiling without the skill: dpnp Harbor no_skill scores 1.0, and the PR outcome tasks are solved without it. Discriminating tasks need to come from #331.
- Lenguaje dominante
- Python
- Estrellas
- 11
- Forks
- 9
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 349
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de intel/dokimi
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
catalog check --per-skill: load skill bodies one at a time, not all up frontPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
arms: significance and interval from one sign-flip test (D018 for eval/stats.py)Posiblemente ocupada @antonwolfy la tomó hace 2 días. Abiertoenhancement
intel/dokimi#421 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de intel/dokimi
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
igormcsouza/tether#278 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
aws-samples/sample-per-model-bedrock#803 ·
Los mantenedores suelen responder en 1 día
-
documentation p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
huggingface/accelerate#4511 ·
Los mantenedores suelen responder en 1 día
-
follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día