본문으로 건너뛰기
cccskills
무료GitHub에 공개

check-cell-order

Detect cell-ordering / enchainement problems in Jupyter notebooks (canonical-order slippage, misplaced or forgotten cells). Arguments: [target] [--severity HIGH|MED|LOW] [--json]

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Check Cell Order

Scan notebooks for cell-ordering and enchainement (flow) problems — the class friction reported after the SymbolicLearning session: "certaines choses n'étaient pas à leur place" (canonical-order slippage and forgotten / misplaced cells that slip through upstream review).

Backed by scripts/notebook_tools/scan_cell_ordering.py, which reads the beginning and the end of every cell and reports graded findings, each citing the offending text so it is spot-checkable. Epic #3240.

Target: $ARGUMENTS

Arguments

  • target: a notebook path, a family subpath (--family SymbolicAI/SymbolicLearning), or --all
  • --severity HIGH|MED|LOW: only show findings at or above this level
  • --json: machine-readable output (for piping / CI)
  • --fail-on HIGH|MED|LOW: exit 1 if any finding at/above this level (default HIGH)

What it detects

SeverityCategoryMeaning
HIGHSECTION_ORDERnumbered markdown headers go backwards under the same parent (## 3. then ## 2.)
HIGHEXERCISE_ORDERExercice N / Exemple N labels out of order
MEDDANGLING_INTROa markdown cell ends announcing imminent code, but the next cell is not code (forgotten / misplaced cell)
MEDINTERP_BEFORE_CODEan interpretation markdown sits before the code it comments instead of after its output
LOWSECTION_GAPa numbered header skips a value (possible omission)
LOWCONSECUTIVE_CODEmore than 3 code cells in a row with no markdown between

Legitimate numbering is silent by design: a normal increment (1→2), a sub-section open/close (3→3.1→4), a reset-to-1 group restart, a level-mixed H1 title (# 13. series number vs ## 1. sections), fenced-code comments, and TOC / overview cells listing ≥2 labels.

Process

  1. Run the scanner on the target:

    python scripts/notebook_tools/scan_cell_ordering.py <target> --severity HIGH
    # or a whole family:
    python scripts/notebook_tools/scan_cell_ordering.py --family SymbolicAI/SymbolicLearning
    # or the whole repo:
    python scripts/notebook_tools/scan_cell_ordering.py --all --severity HIGH
    

    On this machine the script needs a Python with the stdlib only; any of the notebook kernels works (e.g. C:/Users/MYIA/AppData/Local/Programs/Python/Python310/python.exe).

  2. Ground-truth every HIGH finding before acting (rule G.1 — the finding is a signal, not a verdict). Dump the actual headers / labels in document order to confirm it is a true positive, e.g.:

    python - <<'PY'
    import json, re
    from pathlib import Path
    H = re.compile(r"^(#{1,6})\s+(\d+(?:\.\d+)*)\b")
    nb = json.loads(Path("<notebook>").read_text(encoding="utf-8"))
    for i, c in enumerate(nb["cells"]):
        if c.get("cell_type") != "markdown":
            continue
        for ln in "".join(c["source"]).splitlines():
            if H.match(ln.strip()):
                print(f"cell#{i}", ln.strip()[:70])
    PY
    
  3. Fix or justify:

    • True positive → re-order the cells with NotebookEdit (work bottom→top to avoid index shift). Re-order clears outputs, so re-execute the affected notebook (Papermill, rule C.2) before commit.
    • Defensible by design (rare residual FP) → leave it; if recurrent, harden the scanner and add a regression case to scripts/notebook_tools/tests/test_scan_cell_ordering.py.
  4. Re-scan the notebook / family to confirm 0 unjustified HIGH before commit.

Conventions

  • Canonical ordering convention: see .claude/rules/notebook-conventions.md ("Structure pédagogique" + "Enchaînement des cellules").
  • Classification of Exercice vs Exemple is content-based — do NOT relabel to silence a finding (see .claude/rules/exercise-example-labeling.md).
  • C.1/C.2/C.3 still apply: no raise NotImplementedError in stubs; commit with outputs; only stage notebooks whose source changed.

CI

The scanner is wired into a per-PR gate that scans the notebooks changed by a PR and fails on HIGH (--fail-on HIGH). Pre-existing findings in untouched notebooks are tracked separately under Epic #3240 and do not block unrelated PRs.

Notes

  • The scanner is read-only — it never edits notebooks. Fixes are a separate, deliberate step.
  • Exit codes: 0 clean / 1 finding at/above --fail-on / 2 usage or IO error.
  • A malformed notebook prints ERROR <path>: <reason> and the scan continues.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Cycle 30 min du secrétaire vérificateur myia-po-2026:CoursIA-3. Atteste en tiers, du plus ancien au plus récent, les PRs ouvertes sans dossier valide (chaque READY, une fois lu et approuvé par ai-01, est mergé sans attendre son cycle), et fait circuler l'information sur workspace-CoursIA-3.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jsboige/CoursIA162026년 10월 19일 업데이트

Analyze a Slidev deck qualitatively — organ reports (structure, composition) + vision AI on rendered PNGs. Arguments: <deck_id> [--slides 1,5,10]

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jsboige/CoursIA162026년 10월 19일 업데이트

Build or improve Jupyter notebooks iteratively with quality scoring. Arguments: <new|improve|fix> <path> [--topic] [--domain] [--level] [--quality] [--max-iter]

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jsboige/CoursIA162026년 10월 19일 업데이트

Clean up and reorganize markdown in enriched Jupyter notebooks. Arguments: [target] [--dry-run] [--aggressive] [--hierarchy-only]

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jsboige/CoursIA162026년 10월 19일 업데이트

Cycle de coordination ai-01 (coordinateur UNIQUEMENT — jamais sur un worker). Lit memoire + dashboards + inbox + GitHub, merge les PRs pretes, tranche les design-gates, dispatche des grains par lane, reporte. Arguments: [--dispatch] [--focus <topic>]

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jsboige/CoursIA162026년 10월 19일 업데이트

Cycle horaire du coordinateur adjoint myia-po-2025:CoursIA-2. Réduit la file, répond aux ASK CoursIA-2, publie des preflights COMMENTED et dispatche les lanes CoursIA-2, sans merge ni arbitrage réservé à ai-01.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jsboige/CoursIA162026년 10월 19일 업데이트

jsboige의 스킬 모두 보기

이 스킬의 문제 신고