Skip to content

insightflo/edu-deck-skills / edu-deck

edu-deck

Flagged

Entry skill for education deck requests. Use FIRST when the user wants 교육자료, 강의 자료, 교육용 슬라이드, 직원 교육 덱, or a training series (예: "○○ 교육자료 만들어줘", "사내 교육 시리즈 만들어", "여러 편으로 나눠 교육 자료"). 판별 후 단일 발행(주제 하나, 파일 하나)이면 edu-deck-solo 경로를, 여러 편 시리즈·진도 관리·허브가 필요하면 edu-deck-series 경로를 탄다. 애매하면 사용자에게 한 번 묻는다. 덱 제작 절차는 이 스킬에 없고 각 하위 스킬에 있다.

FileKindSize
SKILL.mdskill md14.1 KB
distribution/NOTICES.mdmarkdown1.5 KB
distribution/README.mdmarkdown3.4 KB
distribution/USAGE.mdmarkdown5.5 KB
shared/assets/css/components.cssother23.2 KB
shared/assets/css/core.cssother15.1 KB
shared/assets/css/pack-runtime.cssother9.4 KB
shared/assets/css/responsive.cssother10.6 KB
shared/assets/css/theme-switch.cssother3.4 KB
shared/assets/css/themes.cssother11.2 KB
shared/assets/css/tokens.cssother2.5 KB
shared/assets/css/viewer.cssother17.5 KB
shared/assets/css/visual-motion.cssother19.3 KB
shared/assets/fonts/GowunBatang-Regular.woff2binary523.3 KB
shared/assets/fonts/GowunDodum-Regular.woff2binary435.5 KB
shared/assets/fonts/OFL-GowunBatang.txtmarkdown4.3 KB
shared/assets/fonts/OFL-GowunDodum.txtmarkdown4.3 KB
shared/assets/fonts/OFL.txtmarkdown4.3 KB
shared/assets/fonts/PretendardVariable.woff2binary2.0 MB
shared/assets/icons/base.svgother9.3 KB
shared/assets/icons/extra.svgother18.4 KB
shared/assets/icons/si.svgother7.6 KB
shared/assets/js/cover-art.jsscript82.9 KB
shared/assets/js/motion.jsscript84.4 KB
shared/assets/js/patterns.jsscript7.2 KB
shared/assets/js/responsive.jsscript21.6 KB
shared/assets/js/sheet.jsscript1.5 KB
shared/assets/js/study.jsscript33.6 KB
shared/assets/js/talk.jsscript9.2 KB
shared/assets/js/themes.jsscript7.8 KB
shared/assets/js/viewer.jsscript29.1 KB
shared/assets/kit/patterns.cssother5.4 KB
shared/assets/kit/stack.jsscript15.8 KB
shared/assets/pack-shell.htmlother2.9 MB
shared/assets/packs/atlas/style.cssother1.7 KB
shared/assets/packs/atlas/template.htmlother2.1 KB
shared/assets/packs/base.cssother2.2 KB
shared/assets/packs/briefing/style.cssother1.4 KB
shared/assets/packs/briefing/template.htmlother1.7 KB
shared/assets/packs/casebook/style.cssother1.4 KB
shared/assets/packs/casebook/template.htmlother1.5 KB
shared/assets/packs/catalog.jsonconfig10.3 KB
shared/assets/packs/editorial/style.cssother1.2 KB
shared/assets/packs/editorial/template.htmlother2.0 KB
shared/assets/packs/field/style.cssother1.5 KB
shared/assets/packs/field/template.htmlother1.6 KB
shared/assets/packs/flows.jsonconfig21.8 KB
shared/assets/packs/lab/style.cssother1.4 KB
shared/assets/packs/lab/template.htmlother1.6 KB
shared/assets/packs/seminar/style.cssother1.4 KB
shared/assets/packs/seminar/template.htmlother1.7 KB
shared/assets/packs/workbook/style.cssother1.6 KB
shared/assets/packs/workbook/template.htmlother1.7 KB
shared/assets/shell.htmlother2.9 MB
shared/assets/snippets/01-cover-bauhaus.htmlother3.3 KB
shared/assets/snippets/01-cover-bento.htmlother6.7 KB
shared/assets/snippets/01-cover-bigstat.htmlother2.3 KB
shared/assets/snippets/01-cover-blueprint.htmlother4.3 KB
shared/assets/snippets/01-cover-bold-poster.htmlother3.4 KB
shared/assets/snippets/01-cover-center.htmlother2.5 KB
shared/assets/snippets/01-cover-diagram.htmlother2.4 KB
shared/assets/snippets/01-cover-editorial-lab.htmlother3.6 KB
shared/assets/snippets/01-cover-future-portal.htmlother3.6 KB
shared/assets/snippets/01-cover-learning-path.htmlother3.7 KB
shared/assets/snippets/01-cover-modular-cards.htmlother3.9 KB
shared/assets/snippets/01-cover-monograph.htmlother3.1 KB
shared/assets/snippets/01-cover-mosaic.htmlother2.4 KB
shared/assets/snippets/01-cover-paper-collage.htmlother3.1 KB
shared/assets/snippets/01-cover-split.htmlother2.8 KB
shared/assets/snippets/01-cover-stripes.htmlother2.4 KB
shared/assets/snippets/01-cover-workbook-notes.htmlother3.8 KB
shared/assets/snippets/02-agenda.htmlother21.2 KB
shared/assets/snippets/03-timeline.htmlother14.2 KB
shared/assets/snippets/04-map.htmlother16.3 KB
shared/assets/snippets/05-mechanism.htmlother14.5 KB
shared/assets/snippets/06-traits-grid.htmlother16.9 KB
shared/assets/snippets/07-meter.htmlother17.1 KB
shared/assets/snippets/08-compare-2.htmlother18.2 KB
shared/assets/snippets/09-compare-table.htmlother16.0 KB
shared/assets/snippets/10-hub.htmlother15.1 KB
shared/assets/snippets/11-levels.htmlother15.1 KB
shared/assets/snippets/12-tile-grid.htmlother12.3 KB
shared/assets/snippets/13-sequence.htmlother15.0 KB
shared/assets/snippets/14-mapping.htmlother13.7 KB
shared/assets/snippets/15-mock-legend.htmlother11.2 KB
shared/assets/snippets/16-mock-options.htmlother10.5 KB
shared/assets/snippets/17-statement.htmlother7.5 KB
shared/assets/snippets/18-build-up.htmlother14.0 KB
shared/assets/snippets/19-frame-form.htmlother9.2 KB
shared/assets/snippets/20-before-after.htmlother13.6 KB
shared/assets/snippets/21-worked-example.htmlother16.5 KB
shared/assets/snippets/22-worked-artifact.htmlother9.2 KB
shared/assets/snippets/23-quiz-ab.htmlother7.1 KB
shared/assets/snippets/24-quiz-sort.htmlother8.0 KB
shared/assets/snippets/25-quiz-ox.htmlother6.9 KB
shared/assets/snippets/26-rules-dark.htmlother13.7 KB
shared/assets/snippets/27-checklist.htmlother8.3 KB
shared/assets/snippets/28-sources.htmlother9.8 KB
shared/assets/snippets/29-closing.htmlother6.0 KB
shared/assets/snippets/30-check.htmlother10.3 KB
shared/assets/snippets/31-stat-strip.htmlother11.4 KB
shared/assets/snippets/32-screen-cite.htmlother14.1 KB
shared/assets/snippets/33-chart-bar.htmlother17.0 KB
shared/assets/snippets/34-chart-line.htmlother17.9 KB
shared/assets/snippets/35-explore.htmlother9.6 KB
shared/assets/snippets/36-detail-sheet.htmlother9.9 KB
shared/assets/snippets/37-arch-flow.htmlother17.2 KB
shared/assets/snippets/38-part-divider.htmlother7.0 KB
shared/assets/snippets/39-quadrant.htmlother10.0 KB
shared/assets/snippets/40-flashcards.htmlother12.4 KB
shared/assets/snippets/41-ops-report.htmlother22.8 KB
shared/assets/snippets/42-sankey-flow.htmlother9.7 KB
shared/assets/snippets/43-decision-tree.htmlother8.7 KB
shared/assets/snippets/44-kanban-board.htmlother9.4 KB
shared/assets/snippets/45-version-graph.htmlother8.9 KB
shared/assets/snippets/46-event-fanout.htmlother8.1 KB
shared/assets/snippets/47-route-tour.htmlother9.3 KB
shared/assets/snippets/48-waterfall.htmlother7.9 KB
shared/assets/snippets/49-mesh-network.htmlother7.8 KB
shared/assets/snippets/50-heatmap-grid.htmlother11.9 KB
shared/assets/snippets/51-swimlane.htmlother8.2 KB
shared/assets/snippets/52-cycle-ring.htmlother7.1 KB
shared/assets/snippets/53-verdict.htmlother6.9 KB
shared/assets/snippets/54-diagnose.htmlother3.0 KB
shared/assets/snippets/55-window-frame.htmlother3.3 KB
shared/assets/snippets/56-gate-chain.htmlother5.6 KB
shared/assets/snippets/patterns/code.htmlother1.2 KB
shared/assets/snippets/patterns/faq.htmlother839 B
shared/assets/snippets/patterns/fx.htmlother2.8 KB
shared/assets/snippets/patterns/pin-shot.htmlother1.5 KB
shared/assets/snippets/patterns/tabs.htmlother1.1 KB
shared/assets/style-sheets/README.mdmarkdown1.7 KB
shared/assets/style-sheets/previews/clean-professional.pngbinary1.4 MB
shared/assets/style-sheets/previews/creative-magazine.pngbinary2.1 MB
shared/assets/style-sheets/previews/data-dashboard.pngbinary1.3 MB
shared/assets/style-sheets/previews/e-ink-magazine.pngbinary2.4 MB
shared/assets/style-sheets/previews/handdrawn-technical.pngbinary2.0 MB
shared/assets/style-sheets/previews/handdrawn-whiteboard.pngbinary1.9 MB
shared/assets/style-sheets/previews/mckinsey-style.pngbinary1.7 MB
shared/assets/style-sheets/previews/party-government-red.pngbinary1.5 MB
shared/assets/style-sheets/previews/retro-flat-illustration.pngbinary2.3 MB
shared/assets/style-sheets/previews/scientific-defense.pngbinary1.4 MB
shared/assets/style-sheets/previews/teaching-courseware.pngbinary1.4 MB
shared/assets/style-sheets/previews/warm-handmade.pngbinary2.3 MB
shared/assets/style-sheets/党政红风格.mdmarkdown8.5 KB
shared/assets/style-sheets/创意杂志风.mdmarkdown3.3 KB
shared/assets/style-sheets/复古扁平插画风.mdmarkdown3.3 KB
shared/assets/style-sheets/手绘技术解释风.mdmarkdown4.7 KB
shared/assets/style-sheets/手绘白板风.mdmarkdown3.3 KB
shared/assets/style-sheets/教学课件风.mdmarkdown9.7 KB
shared/assets/style-sheets/数据仪表盘风.mdmarkdown3.4 KB
shared/assets/style-sheets/清爽专业风.mdmarkdown4.4 KB
shared/assets/style-sheets/温暖手工风.mdmarkdown3.3 KB
shared/assets/style-sheets/电子墨水杂志风.mdmarkdown4.6 KB
shared/assets/style-sheets/科研答辩风.mdmarkdown9.1 KB
shared/assets/style-sheets/麦肯锡风格.mdmarkdown14.8 KB
shared/dev/README.mdmarkdown12.7 KB
shared/dev/crayon-reference.htmlother19.1 KB
shared/dev/defect_test.pyscript5.7 KB
shared/dev/fill_test.pyscript3.4 KB
shared/dev/make_icons.pyscript10.0 KB
shared/dev/make_snippets.pyscript16.0 KB
shared/dev/pack_shell_template.htmlother35.7 KB
shared/dev/port.pyscript1.5 KB
shared/dev/shell_template.htmlother61.0 KB
shared/dev/test_absorb_snippets.pyscript5.5 KB
shared/dev/test_arch_lanes.pyscript12.0 KB
shared/dev/test_arch_si.pyscript17.5 KB
shared/dev/test_arch_trace.pyscript5.6 KB
shared/dev/test_check_talk_est.pyscript4.1 KB
shared/dev/test_chrome_menu.pyscript13.2 KB
shared/dev/test_consult_chart.pyscript35.9 KB
shared/dev/test_consult_regen.pyscript3.5 KB
shared/dev/test_consulting_check.pyscript7.4 KB
shared/dev/test_contrast_backdrop.pyscript8.6 KB
shared/dev/test_contrast_matrix.pyscript9.2 KB
shared/dev/test_cover_art.pyscript10.7 KB
shared/dev/test_cover_custom.pyscript10.8 KB
shared/dev/test_cover_rework.pyscript8.3 KB
shared/dev/test_dblclick_finish.pyscript6.5 KB
shared/dev/test_diagram_variants.pyscript13.8 KB
shared/dev/test_extract_copy.pyscript7.3 KB
shared/dev/test_extract_style.pyscript13.8 KB
shared/dev/test_figslot.pyscript14.0 KB
shared/dev/test_final_gate.pyscript2.5 KB
shared/dev/test_flint_model.pyscript5.5 KB
shared/dev/test_flint_theme.pyscript4.6 KB
shared/dev/test_free_mode.pyscript10.7 KB
shared/dev/test_fx_absorb.pyscript13.8 KB
shared/dev/test_fx_draft.pyscript38.0 KB
shared/dev/test_fx_patterns.pyscript16.8 KB
shared/dev/test_key_motion.pyscript9.3 KB
shared/dev/test_koboyo_icons.pyscript8.6 KB
shared/dev/test_miniflow.pyscript11.7 KB
shared/dev/test_motion_techniques.pyscript11.9 KB
shared/dev/test_ops_report.pyscript11.4 KB
shared/dev/test_pack_browser.pyscript15.7 KB
shared/dev/test_pack_checker.pyscript10.1 KB
shared/dev/test_pack_icons.pyscript6.5 KB
shared/dev/test_pack_router.pyscript5.1 KB

shared/dev/test_contrast_backdrop.py

View on GitHub
#!/usr/bin/env python3
"""대비 배경 해석 회귀 시험: 불투명 카드 우선 + 이미지 배경 픽셀 샘플링.

[목적] TASK-contrast-fix G1~G4. 옛 backdrop() 은 조상 체인을 위에서 내려오며
       backgroundImage 를 만나면 즉시 null 을 돌려줘, 그라데이션 슬라이드 안
       불투명 카드 위의 연한 글자를 검사에서 빼먹었다. 새 해석은 (1) 글자에서 위로
       올라가며 첫 불투명 배경을 쓰고, (2) 글자와 불투명 배경 사이에 이미지·
       그라데이션이 끼면 렌더 픽셀을 샘플링해 최악 대비를 잰다.
[입력] 테스트 안 문자열 픽스처(스니펫에 넣지 않는다).
[출력] 없음(단정문). 실패는 배경 해석 퇴행·샘플링 불능·기존 규칙 붕괴다.
[주의] RENDER_JS 의 SAMPLE 항목(sev='SAMPLE')은 검사기가 요소 영역을 다시 찍어
       재야 하는 요청이다 — 이 테스트는 render_checks 와 같이
       check_deck.measure_img_contrast 로 각 항목을 해소한다.
"""
import sys
import tempfile
import unittest
from pathlib import Path

from playwright.sync_api import sync_playwright

SHARED = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(SHARED / 'scripts'))
import build_deck            # noqa: E402
import check_deck            # noqa: E402

NOTE = ('발표자 노트입니다. 화면의 구조와 대비 검사가 어떻게 잡히는지 설명하는 자리로, '
        '실제 수업에서 쓸 발표 내용에 해당하는 충분한 분량의 문장을 둡니다.')
QUIET = check_deck.QUIET_CSS

# 그라데이션 배경 슬라이드(밝은 → 어두운) — 글자는 카드 안/밖 둘로 나눈다
GRAD = 'linear-gradient(135deg, rgb(226,232,236) 0%, rgb(32,43,53) 55%, rgb(24,32,40) 100%)'

LIGHT_TXT = 'color:rgb(196,208,216)'   # 흰 카드 위 대비 ≈1.4 — 미달
DARK_TXT = 'color:rgb(34,44,54)'       # 흰 카드·밝은 그라데이션 위 대비 충분


def slide(body, arch='statement', extra=''):
    return (f'<section class="slide" data-archetype="{arch}" '
            f'style="background-image:{GRAD};position:relative;display:block;padding:128px{extra}">'
            + body + f'<aside class="notes">{NOTE}</aside></section>')


CARD = 'background:rgb(247,248,249);border-radius:16px;padding:40px;width:700px'


def mk_decks():
    """픽스처 → (이름, 표지아키타입, 본문 HTML) 목록."""
    light_card = slide(
        f'<div style="{CARD};position:absolute;left:160px;top:300px">'
        f'<p style="font-size:30px;{LIGHT_TXT}">흰 카드 위의 연한 글자</p></div>')
    dark_card = slide(
        f'<div style="{CARD};position:absolute;left:160px;top:300px">'
        f'<p style="font-size:30px;{DARK_TXT}">흰 카드 위의 진한 글자</p></div>')
    no_card_light = slide(
        f'<p style="position:absolute;left:160px;top:300px;font-size:30px;{LIGHT_TXT}">'
        '그라데이션 위의 연한 글자</p>')
    no_card_dark = slide(
        f'<p style="position:absolute;left:160px;top:300px;font-size:30px;{DARK_TXT}">'
        '그라데이션 밝은 쪽의 진한 글자</p>')
    half_card = (
        '<section class="slide" data-archetype="statement" '
        'style="background:rgb(28,39,51);position:relative;display:block">'
        '<div style="position:absolute;left:160px;top:300px;width:700px;padding:40px;'
        'border-radius:16px;background:rgba(255,255,255,0.6)">'
        '<p style="font-size:30px;color:rgb(150,160,168)">반투명 카드 위 연한 글자</p>'
        f'<aside class="notes">{NOTE}</aside></div></section>')
    dimmed = slide(
        f'<p style="position:absolute;left:160px;top:300px;font-size:30px;opacity:.5;{LIGHT_TXT}">'
        '불투명도 .5 라서 검사 제외</p>'
        '<svg style="position:absolute;left:160px;top:420px" width="400" height="80" viewBox="0 0 400 80">'
        f'<text x="0" y="40" font-size="30" fill="rgb(196,208,216)">SVG 글자는 대비 제외</text></svg>')
    cover_light = slide(
        f'<div style="{CARD};position:absolute;left:160px;top:300px">'
        f'<h1 class="cx-title" style="font-size:60px;{LIGHT_TXT}">표지 안 연한 제목</h1></div>',
        arch='cover', extra=';padding:0')
    return {
        'a_light_card': light_card, 'b_dark_card': dark_card,
        'c_light_nocard': no_card_light, 'c_dark_nocard': no_card_dark,
        'd_half_card': half_card, 'e_exclusions': dimmed,
        'f_cover': cover_light,
    }


class ContrastBackdrop(unittest.TestCase):
    """렌더 패스 — 슬라이드별 픽스처 덱을 만들고 SAMPLE 해소까지 수행한다."""

    @classmethod
    def setUpClass(cls):
        cls.tmp = tempfile.TemporaryDirectory(prefix='edu-contrast-')
        cls.addClassCleanup(cls.tmp.cleanup)
        cls.out = Path(cls.tmp.name)
        cls.pw = sync_playwright().start()
        cls.addClassCleanup(cls.pw.stop)
        cls.browser = check_deck.launch(cls.pw)
        cls.addClassCleanup(cls.browser.close)
        cls.decks = {}
        tail = ('<section class="slide" data-archetype="closing"><h1>마무리</h1>'
                f'<aside class="notes">{NOTE}</aside></section>')
        for name, first in mk_decks().items():
            d = cls.out / name
            (d / 'src').mkdir(parents=True)
            (d / 'deck.json').write_text('{"title":"대비 시험","output":"result.html"}', encoding='utf-8')
            (d / 'src' / '01.html').write_text(first, encoding='utf-8')
            (d / 'src' / '02.html').write_text(tail, encoding='utf-8')
            build_deck.build('대비 시험', sorted((d / 'src').glob('*.html')),
                             [SHARED / 'assets' / 'css'], [SHARED / 'assets' / 'icons'], d / 'result.html')
            cls.decks[name] = d / 'result.html'

    def page(self):
        ctx = self.browser.new_context(viewport={'width': 1920, 'height': 1080},
                                       reduced_motion='reduce')
        self.addCleanup(ctx.close)
        return ctx.new_page()

    def contrast_errors(self, name, slide=0):
        """render_checks 와 같은 순서: RENDER_JS 항목 + SAMPLE 픽셀 샘플링 해소."""
        p = self.page()
        p.goto(self.decks[name].as_uri())
        p.add_style_tag(content=QUIET)
        p.evaluate(check_deck.DECKINFO_POLYFILL)
        items = []
        info = p.evaluate('window.deckInfo()')
        top = int(info.get('maxStep') or 0)
        for s in range(top + 1):
            p.evaluate(f'window.deckGo({slide}, {s})')
            for f in p.evaluate(check_deck.RENDER_JS, [slide]):
                if f['sev'] == 'SAMPLE':
                    ratio = check_deck.measure_img_contrast(p, slide, f)
                    if ratio is not None and ratio < f['need']:
                        items.append({'sev': 'ERROR', 'kind': '대비',
                                      'msg': f"{f['target']} 대비 {ratio:.2f} (기준 {f['need']})",
                                      'target': f['target']})
                    continue
                items.append(f)
        return [i for i in items if i['sev'] == 'ERROR' and i['kind'] == '대비']

    # (a) 그라데이션 슬라이드 + 불투명 흰 카드 + 연한 글자 → 카드가 배경 → ERROR
    def test_opaque_card_light_text_errors(self):
        errs = self.contrast_errors('a_light_card')
        self.assertTrue(errs, '불투명 카드 위 연한 글자가 잡히지 않음(구멍 재현)')

    # (b) 같은 구조 + 충분히 진한 글자 → ERROR 없음
    def test_opaque_card_dark_text_passes(self):
        self.assertEqual(self.contrast_errors('b_dark_card'), [])

    # (c) 투명 카드(없음): 그라데이션 위 연한 글자 → 샘플링 ERROR, 진한 글자 → 없음
    def test_gradient_light_text_sampled_error(self):
        self.assertTrue(self.contrast_errors('c_light_nocard'),
                        '그라데이션 위 연한 글자를 픽셀 샘플링으로 못 잡음')

    def test_gradient_dark_text_sampled_pass(self):
        self.assertEqual(self.contrast_errors('c_dark_nocard'), [])

    # (d) 반투명 카드(alpha .6) 위 연한 글자 → 합성(렌더) 배경으로 판정 → ERROR
    def test_half_transparent_card_errors(self):
        self.assertTrue(self.contrast_errors('d_half_card'))

    # (e) 기존 제외 규칙 유지: 불투명도 0.6 미만 글자·SVG 글자는 대비 검사 대상이 아님
    def test_existing_exclusions_kept(self):
        self.assertEqual(self.contrast_errors('e_exclusions'), [])

    # (f) 표지(cover) 안 글자도 같은 규칙 — 카드 위 연한 제목 → ERROR
    def test_cover_text_same_rule(self):
        self.assertTrue(self.contrast_errors('f_cover'))


if __name__ == '__main__':
    unittest.main()
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall