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_pack_browser.py

View on GitHub
#!/usr/bin/env python3
"""Build all 64 real pack combinations and run the unchanged browser checker.

Outputs are QA fixtures, not finished training material. Only speaker notes are
replaced with explicitly labelled realistic sample notes; generated slide bodies
are retained. Re-run into a new output directory to preserve previous evidence.
"""
import argparse
from concurrent.futures import ThreadPoolExecutor
import json
from pathlib import Path
import subprocess
import sys
import shutil

from bs4 import BeautifulSoup

SHARED = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(SHARED / 'scripts'))
from resource_packs import DESIGNS, FLOWS


def command(args, log):
    result = subprocess.run([sys.executable, *map(str, args)], capture_output=True, text=True)
    log.write_text(result.stdout + result.stderr)
    if result.returncode:
        raise RuntimeError(f'{log}: exit {result.returncode}')


def combination(root, pair):
    design, flow = pair
    out = root / f'{design}-{flow}'
    command([SHARED / 'scripts/resource_packs.py', 'init', out,
             '--design', design, '--flow', flow, '--title', '근거를 확인하고 업무에 적용하기'],
            root / f'{design}-{flow}-init.log')
    for source in sorted((out / 'src').glob('*.html')):
        soup = BeautifulSoup(source.read_text(), 'html.parser')
        prompt = soup.select_one('.pack-prompt').get_text(' ', strip=True)
        body = soup.select_one('.pack-body').get_text(' ', strip=True)
        notes = ('[갤러리 검증용 예시 설명] ' + prompt + ' 먼저 자신의 업무에서 비슷한 상황을 떠올려 보세요. '
                 + body + ' 예를 들어 요청을 처리하기 전에 요청자, 필요한 자료, 완료 조건을 따로 적어 봅니다. '
                 '자료에서 직접 확인한 사실과 아직 확인하지 못한 추측을 구분하세요. 짝과 답을 비교한 뒤 '
                 '선택한 이유를 한 문장으로 설명하고, 근거가 부족한 부분은 다음 확인 항목으로 남깁니다.')
        assert 110 <= len(notes) <= 450, len(notes)
        soup.select_one('.notes').string = notes
        source.write_text(str(soup))
    command([SHARED / 'scripts/build_deck.py', out], out / 'build.log')
    args = [SHARED / 'scripts/check_deck.py', out / 'deck.html', '--json', out / 'check.json']
    if flow == 'problem':
        args += ['--sheets', out / 'sheets', '--shots', out / 'shots']
    result = subprocess.run([sys.executable, *map(str, args)], capture_output=True, text=True)
    (out / 'check.log').write_text(result.stdout + result.stderr)
    data = json.loads((out / 'check.json').read_text())
    row = {'design': design, 'flow': flow, 'exit': result.returncode,
           **{key: data[key] for key in ('result', 'errors', 'warnings', 'render')},
           'slides': len(data['slides'])}
    # 텍스트 나열 WARN은 저작 권고(check_deck 결과 자체는 PASS) — 전 장이 텍스트 계열인
    # 팩 조합(casebook·workbook)에서 의도 발화하므로 실패 집계에서는 뺀다.
    advisory = sum(
        1 for scope in (data['slides'], data.get('deck', []))
        for s in scope
        for f in (s.get('findings', []) if isinstance(s, dict) else [])
        if f.get('sev') == 'WARN' and f.get('kind') == '텍스트 나열')
    if advisory:
        row['warnings'] -= advisory
        row['advisory_warnings'] = advisory
    print(json.dumps(row), flush=True)
    return row


def matrix(root):
    root.mkdir(parents=True, exist_ok=True)
    with ThreadPoolExecutor(max_workers=2) as pool:
        rows = list(pool.map(lambda pair: combination(root, pair),
                             [(d, f) for d in DESIGNS for f in FLOWS]))
    (root / 'matrix.json').write_text(json.dumps(rows, indent=2))
    from PIL import Image, ImageDraw
    sheet = Image.new('RGB', (1440, 4 * 435), '#dddddd')
    draw = ImageDraw.Draw(sheet)
    for i, design in enumerate(DESIGNS):
        x, y = (i % 2) * 720, (i // 2) * 435
        draw.text((x + 12, y + 8), design, fill='#222222')
        image = Image.open(root / f'{design}-problem/shots/slide-01.png')
        sheet.paste(image.resize((720, 405)), (x, y + 30))
    sheet.save(root / 'eight-designs.png')
    return int(any(r['exit'] or r['render'] != 'RUN' or r['errors'] or r['warnings'] for r in rows))


def interactions(root, matrix_root):
    """Exercise actual quiz/study runtime in every design, with motion on/off."""
    from playwright.sync_api import sync_playwright
    from check_deck import launch, RENDER_JS, QUIET_CSS
    root.mkdir(parents=True, exist_ok=True)
    results = []
    with sync_playwright() as pw:
        browser = launch(pw)
        for design in DESIGNS:
            out = root / design
            shutil.copytree(matrix_root / f'{design}-problem', out)
            note = ('[상호작용 검증용 예시 설명] 업무 요청을 처리하기 전에 자료의 작성자와 기준 날짜를 확인합니다. '
                    '자료에 직접 적힌 사실과 자신의 해석을 분리하면 잘못된 결정을 줄일 수 있습니다. '
                    '이 문제에서는 먼저 오답을 선택해 해설을 읽고 다시 풀어 보세요. 정답을 선택한 다음에는 '
                    '자신의 실제 업무에서 확인할 근거를 한 가지 적고 동료에게 그 이유를 설명해 보세요.')
            fixture = f'''<section class="slide pack pack-{design}" data-design="{design}">
<p class="pack-kicker">상호작용 예제</p><h1 class="pack-prompt">근거를 확인하는 첫 행동은 무엇인가요?</h1>
<p class="pack-body" data-step="1">사실과 추측을 구분한 뒤 답을 선택하세요.</p>
<div class="chk"><p class="chk-q"><span class="chk-n">1</span>업무 자료를 받으면 무엇부터 하나요?</p>
<div class="chk-opts"><button class="chk-o">제목만 보고 결론을 내립니다.</button>
<button class="chk-o" data-ok>작성자와 기준 날짜를 확인합니다.</button></div>
<p class="chk-why">누가 언제 만든 자료인지 확인해야 지금 판단에 쓸 수 있는지 알 수 있습니다.</p></div>
<aside class="notes">{note}</aside></section>'''
            (out / 'src/99-interaction.html').write_text(fixture)
            command([SHARED / 'scripts/build_deck.py', out], out / 'interaction-build.log')
            command([SHARED / 'scripts/check_deck.py', out / 'deck.html', '--json', out / 'interaction-check.json'], out / 'interaction-check.log')
            report = json.loads((out / 'interaction-check.json').read_text())
            assert report['render'] == 'RUN' and report['warnings'] == 0 and report['errors'] == 0, report
            for reduced in (False, True):
                ctx = browser.new_context(viewport={'width': 1920, 'height': 1080},
                                          reduced_motion='reduce' if reduced else 'no-preference')
                page = ctx.new_page()
                errors = []
                page.on('pageerror', lambda e: errors.append(str(e)))
                page.goto((out / 'deck.html').as_uri())
                page.evaluate('localStorage.clear()')
                page.reload()
                page.keyboard.press('End')
                assert page.evaluate('deckInfo().slide') == 5
                assert page.evaluate('deckInfo().step') == 0
                page.keyboard.press('ArrowRight')
                assert page.evaluate('deckInfo().step') == 1
                page.keyboard.press('ArrowLeft')
                assert page.evaluate('deckInfo().step') == 0
                page.keyboard.press('ArrowRight')
                page.evaluate('''() => { window.motionSamples = []; window.motionTimer = setInterval(() => {
                    const mark = document.querySelector('.active .ed-mark canvas');
                    if (mark) window.motionSamples.push(mark._edProgress ?? 0);
                }, 50); }''')
                page.locator('.active .chk-o').first.click()
                assert page.locator('.active .chk-ng .chk-msg').is_visible()
                assert '아직' in page.locator('.active .chk-msg').inner_text()
                page.wait_for_timeout(1400)
                samples = page.evaluate('() => {clearInterval(window.motionTimer); return window.motionSamples;}')
                mark = page.locator('.active .ed-mark canvas')
                assert mark.count() == 1
                assert mark.evaluate('''(c)=>{const x=c.getContext('2d'),d=x.getImageData(0,0,c.width,c.height).data;
                    let n=0;for(let i=3;i<d.length;i+=40){if(d[i])n++;}return n>200;}''')
                if reduced:
                    assert all(value == 1 for value in samples), samples
                else:
                    assert len(set(samples)) > 2, samples
                assert mark.evaluate('(c)=>c._edProgress===1')
                page.screenshot(path=str(out / ('wrong-reduced.png' if reduced else 'wrong-crayon.png')))
                page.locator('.active .chk-again').click()
                assert page.locator('.active .chk-done').count() == 0
                assert page.locator('.active .ed-mark').count() == 0
                assert page.locator('.active .chk-o').first.is_enabled()
                page.locator('.active .chk-o[data-ok]').click()
                assert page.locator('.active .chk-ok .chk-msg').inner_text() == '맞았습니다.'
                page.wait_for_timeout(1400)
                page.add_style_tag(content=QUIET_CSS)
                findings = page.evaluate(RENDER_JS, [5, True])
                assert not findings, findings
                page.screenshot(path=str(out / ('correct-reduced.png' if reduced else 'correct-crayon.png')))
                # Presentation shortcuts belong to the page, not the quiz button.
                page.evaluate('document.activeElement.blur()')
                page.keyboard.press('n')
                assert page.locator('#notes').is_visible()
                assert note in page.locator('#notesText').inner_text()
                page.keyboard.press('n')
                assert not page.locator('#notes').is_visible()
                page.keyboard.press('s')
                assert page.locator('.st-panel').is_visible()
                assert '상호작용 검증용' in page.locator('.st-pb').inner_text()
                page.screenshot(path=str(out / ('study-reduced.png' if reduced else 'study.png')))
                page.keyboard.press('s')
                assert not page.locator('.st-panel').is_visible()
                page.keyboard.press('Home')
                assert page.evaluate('deckInfo().slide') == 0
                page.keyboard.press('ArrowRight')
                expected = 0 if design == 'workbook' else 1
                assert page.evaluate('deckInfo().slide') == expected
                assert not errors, errors
                results.append({'design': design, 'reduced_motion': reduced,
                                'quiz_wrong_retry_correct': 'PASS', 'semantic_canvas_mark': 'PASS',
                                'motion_distinct_frames': len(set(samples)),
                                'keyboard_steps_navigation': 'PASS', 'notes_study': 'PASS',
                                'graded_layout': 'PASS', 'errors': errors})
                (root / 'interactions.json').write_text(json.dumps(results, indent=2))
                ctx.close()
        browser.close()
    return 0


def keyboard_activation(root, deck):
    """Independent negative regression: focused native quiz buttons must activate."""
    from playwright.sync_api import sync_playwright
    from check_deck import launch
    root.mkdir(parents=True, exist_ok=True)
    results = []
    with sync_playwright() as pw:
        browser = launch(pw)
        for key in ('Enter', 'Space'):
            ctx = browser.new_context(viewport={'width': 1920, 'height': 1080})
            page = ctx.new_page()
            page.goto(deck.as_uri())
            page.evaluate('localStorage.clear()')
            page.reload()
            page.evaluate('deckGo(5,1)')
            page.locator('.active .chk-o[data-ok]').focus()
            page.keyboard.press(key)
            page.wait_for_timeout(200)
            passed = page.locator('.active .chk-ok').count() == 1
            results.append({'key': key, 'result': 'PASS' if passed else 'FAIL',
                            'expected': 'focused correct answer is graded',
                            'actual_graded_count': page.locator('.active .chk-done').count(),
                            'deckInfo': page.evaluate('deckInfo()')})
            page.screenshot(path=str(root / f'keyboard-{key}.png'))
            ctx.close()
        ctx = browser.new_context(viewport={'width': 1920, 'height': 1080})
        page = ctx.new_page()
        page.goto(deck.as_uri())
        # Removing the native-control guard must fail these real DOM probes.
        controls = {
            'button-child': '<button><span tabindex="0">button</span></button>',
            'link-child': '<a href="#"><span tabindex="0">link</span></a>',
            'input': '<input value="text">',
            'textarea': '<textarea>text</textarea>',
            'select': '<select><option>A</option><option>B</option></select>',
            'summary': '<details><summary>details</summary>body</details>',
            'editable-child': '<div contenteditable="true"><span tabindex="0">text</span></div>',
        }
        for name, html in controls.items():
            page.evaluate('deckGo(5,0)')
            page.evaluate('''html => {
                document.getElementById('keyboard-probe')?.remove();
                const box = document.createElement('div'); box.id = 'keyboard-probe';
                box.innerHTML = html; document.querySelector('.active').append(box);
                box.querySelector('span,input,textarea,select,summary,button,a').focus();
            }''', html)
            for key in ('Enter', ' ', 'ArrowRight', 'Home', 'End', 'Backspace'):
                result = page.evaluate('''key => {
                    const e = new KeyboardEvent('keydown', {key, bubbles:true, cancelable:true});
                    document.activeElement.dispatchEvent(e);
                    return {prevented:e.defaultPrevented, info:deckInfo()};
                }''', key)
                passed = not result['prevented'] and result['info']['slide'] == 5 and result['info']['step'] == 0
                results.append({'control': name, 'key': key, 'result': 'PASS' if passed else 'FAIL', **result})
        page.evaluate("document.getElementById('keyboard-probe').remove(); document.activeElement.blur(); deckGo(5,0)")
        page.keyboard.press('Space')
        step_ok = page.evaluate('deckInfo().step') == 1
        page.keyboard.press('Home')
        home_ok = page.evaluate('deckInfo().slide') == 0
        page.keyboard.press('End')
        end_ok = page.evaluate('deckInfo().slide') == 5
        results.append({'control': 'page', 'result': 'PASS' if step_ok and home_ok and end_ok else 'FAIL',
                        'space_step': step_ok, 'home': home_ok, 'end': end_ok})
        ctx.close()
        browser.close()
    (root / 'keyboard-activation.json').write_text(json.dumps(results, indent=2))
    print(json.dumps(results, indent=2))
    return int(any(row['result'] != 'PASS' for row in results))


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('output', type=Path)
    parser.add_argument('--interactions-from', type=Path)
    parser.add_argument('--keyboard-activation-from', type=Path,
                        help='Built six-slide interaction deck; nonzero exit if Enter/Space cannot grade')
    args = parser.parse_args()
    if args.keyboard_activation_from:
        sys.exit(keyboard_activation(args.output.resolve(), args.keyboard_activation_from.resolve()))
    sys.exit(interactions(args.output.resolve(), args.interactions_from.resolve())
             if args.interactions_from else matrix(args.output.resolve()))
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