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

View on GitHub
"""Acceptance: arch_lanes.mjs — 레인(업무 절차) · 시퀀스(호출/응답) 생성기.

[검사 항목]
- 결정성: 같은 모델 → 같은 바이트(2회 실행). 레이아웃·토큰 계산에 시간·난수가 없다는 증거.
- 스키마: draw 예산(12)·루프 방향·분기 완전성·참조 무결 위반은 FAIL(exit 1)로 막는다.
- 토큰: 반려 루프에서 t1 이 두 번(2·9단계) 점등되고, 실행되지 않은 갈래(t4·e07)는
  게이트 단계에서 구조로만 공개된다 — 손plot 없이 계산기 출력만 쓴다는 증거.
- 엔진 의존 0: 산출 조각의 모션 속성은 data-step/only 뿐이고 data-step·data-only 외
  새 속성, script, SMIL, CSS 애니메이션이 없다.
- 문서 순서: loop 흐름이 마지막 path — engine draw() 가 순서대로 12개를 그리므로
  반려선이 마지막에 그려져야 재방문 장면이 자연스럽다.

[실행] cd edu-deck/shared && python3 -m unittest dev.test_arch_lanes -v
[주의] node 18+ 가 PATH 에 있어야 한다(없으면 skip). 저장소에는 아무것도 쓰지 않는다(임시 폴더 사용).
"""
import json
import re
import shutil
import subprocess
import tempfile
import unittest
from pathlib import Path

S = Path(__file__).resolve().parents[1]      # edu-deck/shared
ROOT = S.parents[1]                          # 저장소 루트
GEN = S / 'scripts' / 'arch_lanes.mjs'
MODELS = ROOT / 'examples' / 'arch-si' / 'models'
B1 = MODELS / 'b1-swimlane.json'
B2 = MODELS / 'b2-sequence.json'
D1 = MODELS / 'd1-astobe.json'
NODE = shutil.which('node')


def run(model_path, out=None, extra=()):
    """생성기 실행 — (returncode, stdout+stderr). out 이 있으면 그 파일에 쓴다."""
    cmd = [NODE, str(GEN), '--in', str(model_path)]
    if out:
        cmd += ['-o', str(out)]
    cmd += list(extra)
    p = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
    return p.returncode, (p.stdout + p.stderr)


@unittest.skipUnless(NODE, 'node 없음')
class ArchLanesTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.tmp = Path(tempfile.mkdtemp(prefix='edudeck-lanes-'))

    @classmethod
    def tearDownClass(cls):
        shutil.rmtree(cls.tmp, ignore_errors=True)

    # ── 결정성 ──────────────────────────────────────────────────────
    def test_b1_deterministic(self):
        a, b = self.tmp / 'b1a.html', self.tmp / 'b1b.html'
        for f in (a, b):
            code, log = run(B1, f)
            self.assertEqual(code, 0, log)
        self.assertEqual(a.read_bytes(), b.read_bytes(), 'b1: 두 실행 결과가 다르다')

    def test_b2_deterministic(self):
        a, b = self.tmp / 'b2a.html', self.tmp / 'b2b.html'
        for f in (a, b):
            code, log = run(B2, f)
            self.assertEqual(code, 0, log)
        self.assertEqual(a.read_bytes(), b.read_bytes(), 'b2: 두 실행 결과가 다르다')

    # ── 스키마 가드 ─────────────────────────────────────────────────
    def _mutate(self, src, fn, name):
        model = json.loads(Path(src).read_text(encoding='utf-8'))
        fn(model)
        p = self.tmp / name
        p.write_text(json.dumps(model, ensure_ascii=False), encoding='utf-8')
        return p

    def test_draw_budget_rejected(self):
        def add_edges(m):
            m['edges'].append({'id': 'e99', 'from': 't3', 'to': 't6', 'flow': 'seq'})
        p = self._mutate(B1, add_edges, 'over.json')
        code, log = run(p, self.tmp / 'over.html')
        self.assertEqual(code, 1)
        self.assertIn('draw 예산', log)

    def test_loop_must_go_back(self):
        def bad(m):
            for e in m['edges']:
                if e['id'] == 'e12':
                    e['from'], e['to'] = 't1', 't7'
        p = self._mutate(B1, bad, 'loop.json')
        code, log = run(p, self.tmp / 'loop.html')
        self.assertEqual(code, 1)
        self.assertIn('loop 은 앞 열로', log)

    def test_decision_needs_two_branches(self):
        def bad(m):
            m['edges'] = [e for e in m['edges'] if e['id'] != 'e05']
        p = self._mutate(B1, bad, 'dec.json')
        code, log = run(p, self.tmp / 'dec.html')
        self.assertEqual(code, 1)
        self.assertIn('decision 은 나가는 흐름이 2개 이상', log)

    def test_unknown_lane_rejected(self):
        def bad(m):
            m['nodes'][1]['lane'] = 'nope'
        p = self._mutate(B1, bad, 'lane.json')
        code, log = run(p, self.tmp / 'lane.html')
        self.assertEqual(code, 1)
        self.assertIn('알 수 없는 lane', log)

    # ── 토큰: 반려 재방문 ───────────────────────────────────────────
    def test_token_revisit_and_structure(self):
        tok = self.tmp / 'b1-tokens.json'
        code, log = run(B1, self.tmp / 'b1.html', ['--tokens', str(tok)])
        self.assertEqual(code, 0, log)
        t = json.loads(tok.read_text(encoding='utf-8'))
        at = [s['at'] for s in t['steps']]
        self.assertEqual(at[:2], ['s1', 't1'])
        # 반려 루프: t1 이 2단계와 9단계에 다시 점등된다
        self.assertEqual([i + 1 for i, a in enumerate(at) if a == 't1'], [2, 9])
        self.assertTrue(t['route'][-1]['to'] == 'e1')
        # 실행되지 않은 갈래(t4)는 게이트 단계에서 구조로 공개된다
        self.assertIn('t4', t['nodeStep'])
        self.assertEqual(t['nodeStep']['t4'], t['nodeStep']['g1'])
        # loop 흐름은 재방문 단계에 켜진다
        self.assertEqual(t['edgeStep']['e12'], 9)
        # 모든 노드·흐름이 끝 단계까지 공개된다
        self.assertEqual(set(t['nodeStep']), {n['id'] for n in json.loads(B1.read_text())['nodes']})
        self.assertEqual(set(t['edgeStep']), {e['id'] for e in json.loads(B1.read_text())['edges']})

    # ── 엔진 의존 0 ─────────────────────────────────────────────────
    def test_only_engine_attributes(self):
        for src in (B1, B2, D1):
            out = self.tmp / (src.stem + '.html')
            code, log = run(src, out)
            self.assertEqual(code, 0, log)
            html = out.read_text(encoding='utf-8')
            attrs = set(re.findall(r'\bdata-[a-z-]+', html))
            self.assertTrue(attrs <= {'data-archetype', 'data-step', 'data-only', 'data-until'}, f'{src.name}: 예상 밖 속성 {attrs}')
            for bad in ('<script', '<animate', '@keyframes', 'data-fx', 'requestAnimationFrame'):
                self.assertNotIn(bad, html, f'{src.name}: {bad} 발견')

    def test_loop_is_last_path(self):
        out = self.tmp / 'b1-order.html'
        code, log = run(B1, out)
        self.assertEqual(code, 0, log)
        paths = re.findall(r'<path class="(k-ln-[bo])"[^>]*', out.read_text(encoding='utf-8'))
        self.assertEqual(len(paths), 12, 'path 는 링크 수와 같아야 한다(장식 path 금지)')
        self.assertEqual(paths[-1], 'k-ln-o', 'loop(점선) 흐름이 마지막 path 여야 한다')
        self.assertEqual(paths.count('k-ln-o'), 1)

    def test_only_one_path_per_edge(self):
        out = self.tmp / 'b1-paths.html'
        run(B1, out)
        html = out.read_text(encoding='utf-8')
        self.assertEqual(html.count('<path '), 12, '장식에 path 를 쓰면 draw 예산이 줄어든다')

    # ── 시퀀스 모드 ─────────────────────────────────────────────────
    def test_sequence_messages_and_kinds(self):
        out = self.tmp / 'b2.html'
        code, log = run(B2, out)
        self.assertEqual(code, 0, log)
        html = out.read_text(encoding='utf-8')
        self.assertEqual(html.count('<path '), 8, '메시지 1개 = path 1개')
        replies = re.findall(r'<path class="k-ln-g"[^>]*stroke-dasharray:10 8', html)
        self.assertEqual(len(replies), 4, '응답(reply) 4개만 점선 path — 범례는 polyline')
        self.assertEqual(html.count('data-step='), 8 + 1 + 4, 'data-step = 메시지 8 + 헤더·생명선 그룹 1 + 활성 막대 4')
        # 생명선은 polyline(장식) — path 가 아니다
        self.assertGreaterEqual(html.count('class="k-ln-g" points='), 4)

    # ── 대조(compare) 모드 ─────────────────────────────────────────
    def test_compare_deterministic(self):
        a, b = self.tmp / 'd1a.html', self.tmp / 'd1b.html'
        for f in (a, b):
            code, log = run(D1, f)
            self.assertEqual(code, 0, log)
        self.assertEqual(a.read_bytes(), b.read_bytes(), 'd1: 두 실행 결과가 다르다')

    def test_compare_four_states(self):
        out = self.tmp / 'd1.html'
        code, log = run(D1, out)
        self.assertEqual(code, 0, log)
        html = out.read_text(encoding='utf-8')
        for word in ('유지', '신규', '변경', '제거'):
            self.assertIn(f'>{word}</text>', html, f'범례에 {word} 없음')
        # 제거 = 1단계까지 원형, 2단계부터 흐린 취소선 카드
        self.assertIn('data-until="1"', html)
        self.assertIn('>제거</text>', html)
        # 변경 = 3단계까지 옛 모습, 4단계에 새 모습
        self.assertIn('data-until="3"', html)
        self.assertIn('>변경</text>', html)
        # 위치 아이덴티티: 같은 시스템이 한 좌표에 두 번 그려지지 않는다(상태 교체는 data-until/step 쌍)
        self.assertEqual(html.count('>단일 WAS</text>'), 1, '변경 전 모습은 한 번만')
        self.assertEqual(html.count('>WAS-1</text>'), 1, '변경 후 모습은 한 번만')

    def test_compare_rejects_unknown_state(self):
        def bad(m):
            m['nodes'][0]['change'] = 'maybe'
        p = self._mutate(D1, bad, 'cmp.json')
        code, log = run(p, self.tmp / 'cmp.html')
        self.assertEqual(code, 1)
        self.assertIn('change 는 keep|new|change|remove', log)

    def test_sequence_unknown_actor_rejected(self):
        def bad(m):
            m['messages'][0]['to'] = 'ghost'
        p = self._mutate(B2, bad, 'seq.json')
        code, log = run(p, self.tmp / 'seq.html')
        self.assertEqual(code, 1)
        self.assertIn('알 수 없는 액터', log)

    # ── 시나리오 키 계약 ────────────────────────────────────────────
    def test_scenario_bad_branch_key_rejected(self):
        # 게이트 g1 의 나가는 갈래는 A|B 뿐 — 'X' 는 조용한 대체 없이 명시 오류
        def bad(m):
            m['scenario']['g1'] = ['X']
        p = self._mutate(B1, bad, 'sckey.json')
        code, log = run(p, self.tmp / 'sckey.html')
        self.assertEqual(code, 1)
        self.assertIn('g1', log)
        self.assertIn('X', log)
        self.assertIn('branch', log)

    def test_scenario_key_exhaustion_rejected(self):
        # g2 는 반려 루프로 두 번 방문 — 키 하나면 두 번째 방문에서 소진
        def bad(m):
            m['scenario']['g2'] = ['R']
        p = self._mutate(B1, bad, 'scex.json')
        code, log = run(p, self.tmp / 'scex.html')
        self.assertEqual(code, 1)
        self.assertIn('분기키 소진', log)
        self.assertIn('g2', log)

    def test_scenario_cycle_rejected(self):
        # 반려만 계속 고르는 시나리오 — end 에 도달하지 못하고 40회 상한에 걸린다
        # (g1 도 매 순환마다 재방문되므로 키를 충분히 줘 소진 오류가 먼저 나지 않게 한다)
        def bad(m):
            m['scenario']['g1'] = ['A'] * 30
            m['scenario']['g2'] = ['R'] * 30
        p = self._mutate(B1, bad, 'sccyc.json')
        code, log = run(p, self.tmp / 'sccyc.html')
        self.assertEqual(code, 1)
        self.assertIn('end 노드에 도달하지 못했다', log)


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