$30 off During Our Annual Pro Sale. View Details »

The future of tbls and "Documentation as Code" / phpconfuk 2023

The future of tbls and "Documentation as Code" / phpconfuk 2023

Ken’ichiro Oyama

June 24, 2023
Tweet

More Decks by Ken’ichiro Oyama

Other Decks in Technology

Transcript

  1. The future of tbls and
    “Documentation as Code"
    খࢁ݈Ұ࿠ / GMO PEPABO inc.
    2023.6.24 PHPΧϯϑΝϨϯε෱Ԭ2023
    1

    View Slide

  2. ࣗݾ঺հ
    ٕज़෦ɹٕज़ج൫νʔϜ
    2018೥ த్ೖࣾ
    খࢁ ݈Ұ࿠ Ken’ichiro Oyama
    গ࣮͠༻తͰখ͞ͳOSSΛॻ͘ͷ͕झຯɻ
    ● GitHub : k1LoW
    ● Twitter : @k1LoW
    2

    View Slide

  3. GMOϖύϘʹ͍ͭͯ
    3
    https://pepabo.com

    View Slide

  4. 4
    ͸͡Ίʹ

    View Slide

  5. 5
    ͸͡Ίʹ
    • tblsΛத৺ʹൃද͢Δͷ͸࣮ʹ5೥ͿΓ2ճ໨Ͱ͢
    • ຊηογϣϯͰ͸tblsͱDocumentation as Codeʹ͍ͭͯ࿩͠·͢
    • tblsͱDocumentation as Codeʹ͍ͭͯͷ5೥෼ͷूେ੒ʹͳΓ·͢
    • օ͞Μʹ͸tblsͷ࿩Λฉ͖ͳ͕Β΋ɺ΋ͬͱந৅తͳʮυΩϡϝϯςʔγϣ
    ϯͷͨΊͷπʔϧʯΛΠϝʔδͯ͠΄͍͠Ͱ͢
    • tblsʹݶͬͨ࿩Ͱ͸ͳ͍ͱࢲ͸৴͍ͯ͡·͢

    View Slide

  6. 6

    View Slide

  7. 7
    About tbls
    tbls is a CI-Friendly tool for document a database, written in Go.
    • CIϑϨϯυϦͳσʔλϕʔευΩϡϝϯτੜ੒πʔϧ
    • ൃԻ͸ /ˈteɪbl ̩z/ʢςʔϒϧεʣ
    • PostgreSQL, MySQLͳͲͷRDBMS͚ͩͰͳ͘ɺBigQuery΍
    Amazon DynamoDB, Cloud Spannerͱ͍༷ͬͨʑͳσʔλιʔ
    εʹରԠ
    • υΩϡϝϯτΛॆ࣮ͤ͞Δػೳͱͯ͠ϝλσʔλΛΞϊςʔ
    γϣϯ͢Δ͜ͱ͕Մೳ
    • ςʔϒϧɺΧϥϜͳͲͷίϝϯτ෇༩͚ͩͰͳ͘ϥϕ
    ϧɺϦϨʔγϣϯγοϓͳͲ

    View Slide

  8. 8
    About tbls
    tbls doc
    • σʔλϕʔεʹ઀ଓͯ͠σʔλϕʔευΩϡϝϯτΛੜ੒͢ΔαϒίϚϯυ
    DEMO

    View Slide

  9. 9
    About tbls
    ϝτϦΫεͰݟΔtbls
    • 2018೥5݄17೔ʹ։ൃ։࢝ɻ2023೥6݄23೔࣌఺Ͱ1,863೔ʢ5ϱ೥1ϲ݄6೔ʣ
    • 14σʔλιʔεαϙʔτ
    • 1,816ίϛοτɻ392ϓϧϦΫΤετ
    • k1LoW୯ಠͰ1,146ίϛοτɺ303ϓϧϦΫΤετ
    • 170ϦϦʔε
    • όʔδϣϯv1.68.0
    • ίʔυ9,690ߦ / ςετίʔυ3,958ߦ
    • k1LoW୯ಠͰ691,018 ++ / 603,716 --
    • 2,477ελʔ

    View Slide

  10. 10
    Documentation as Code

    View Slide

  11. %PDVNFOUBUJPOBT$PEF %PDTBT$PEF
    SFGFSTUPBQIJMPTPQIZUIBUZPV
    TIPVMECFXSJUJOHEPDVNFOUBUJPOXJUIUIFTBNFUPPMTBTDPEF
    *TTVF5SBDLFST
    7FSTJPO$POUSPM (JU

    1MBJO5FYU.BSLVQ .BSLEPXO SF4USVDUVSFE5FYU "TDJJEPD

    $PEF3FWJFXT
    "VUPNBUFE5FTUT
    5IJTNFBOTGPMMPXJOHUIFTBNFXPSL
    fl
    PXTBTEFWFMPQNFOUUFBNT BOECFJOH
    JOUFHSBUFEJOUIFQSPEVDUUFBN*UFOBCMFTBDVMUVSFXIFSFXSJUFSTBOE
    EFWFMPQFSTCPUIGFFMPXOFSTIJQPGEPDVNFOUBUJPO BOEXPSLUPHFUIFSUP
    NBLFJUBTHPPEBTQPTTJCMF
    ɹΑΓൈਮɹ

    Documentation as Code

    View Slide

  12. 12
    Documentation as Code
    Documentation as Codeͷݪ఺
    • ʮDocumentation as Codeͱ͸ɺίʔυͱಉ͡πʔϧΛ࢖ͬͯυΩϡϝϯςʔγϣϯΛॻ͘΂͖
    ͩͱ͍͏఩ֶʯby Write the DocsίϛϡχςΟ
    • Issue Trackers
    • Version Control (Git)
    • Plain Text Markup (Markdown, reStructuredText, Asciidoc)
    • Code Reviews
    • Automated Tests
    • γεςϜͷ։ൃͷۙ͘ʹυΩϡϝϯτ࡞੒ͷ࢓૊ΈΛஔ͘͜ͱͰɺ։ൃαΠΫϧͷதʹυΩϡϝ
    ϯτ࡞੒Λ౷߹͠ɺγεςϜͱυΩϡϝϯτͷဃ཭Λখ͘͞͠Α͏ͱ͍ͯ͠Δ͜ͱ͕Θ͔Δ

    View Slide

  13. 13
    Documentation as Code
    Documentation as Codeͷ՝୊

    View Slide

  14. 14
    Documentation as Code
    γεςϜͱυΩϡϝϯτͷဃ཭
    • ʮγεςϜͱυΩϡϝϯτͷဃ཭Λখ͘͞ʯ͚ͩͰ͸࣌ͱ࣮ͯ͠༻ʹ͸ݫ͍͠
    • ဃ཭͕ʢগ͠Ͱ΋ʣ͋ΔͱԿ͕ਖ਼͍͔͕͠Θ͔Βͳ͘ͳΔ
    • ਓ͸γεςϜͱͷဃ཭Λൃݟ͢Δͱ΋͏ͦͷυΩϡϝϯτΛ৴༻͠ͳ͘ͳͬͯ͠·͏
    • ׂΕ૭ཧ࿦
    • υΩϡϝϯτ͕ߋ৽͞ΕΕ͹ɺਓ͸ߋ৽෼ʹ͍ͭͯਖ਼͍͔͠Ͳ͏͔ͷϨϏϡʔ͸Ͱ͖Δɻ͔͠
    ͠ɺγεςϜ։ൃ͕ਐΜͰऔΓ࢒͞Εͯ͠·ͬͨυΩϡϝϯτͷϨϏϡʔͷλΠϛϯά͕ͳ͍ɻ

    View Slide

  15. Documentation as Code+
    15

    View Slide

  16. 16
    Documentation as Code+
    ࣮༻తͳʢγεςϜͱဃ཭͠ͳ͍ͨΊͷʣDocumentation as Code
    • ͦ΋ͦ΋ʮγεςϜͱυΩϡϝϯτͷဃ཭ʯ͸ͳͥى͜Δͷ͔
    • γεςϜ͸࣌ؒͷܦաʹΑͬͯมԽ͢Δ͕ɺυΩϡϝϯτ͸ͦͷมԽʹ௥ै͠ͳ͍͔Β
    ʢ΋͘͠͸௥ै͢Δʹ΋λΠϜϥά͕ൃੜ͢Δ͔Βʣ
    • ࣌ؒܦաʹ଱͑ΔͨΊʹ͸ɺ౎౓ɺγεςϜΛͦͷ··υΩϡϝϯτʢ΋͘͠͸υΩϡϝϯτͷ
    ਽ܗʣʹม׵Ͱ͖Ε͹ྑ͍
    • ͜͜ͷϞσϧԽʹڵຯ͋Δํ͸ͪ͜Βˠ
    • ʮγεςϜΛͦͷ··ʯ

    ʹγεςϜ͔Βߏ଄ԽσʔλΛநग़͢Δ
    https://speakerdeck.com/k1low/web-system-architecture-number-8

    View Slide

  17. 17
    Documentation as Code+
    γεςϜͱυΩϡϝϯτͷဃ཭Λθϩʹ͢Δ
    • γεςϜ͔Βߏ଄ԽσʔλΛநग़ͯ͠ɺͦͷߏ଄Խσʔλ͔ΒυΩϡϝϯτΛੜ੒͢Δ
    • Α͘஌ΒΕ͍ͯΔ΋ͷͱͯ͠͸PHPDoc΍godocͱ͍ͬͨιʔείʔυ͔ΒυΩϡϝϯτΛ
    ੜ੒͢ΔΞϓϩʔνʢιʔείʔυ΋γεςϜͷࣸ૾ͱ͍͑Δʣ
    • ߏ଄Խσʔλ͔ΒγεςϜͱυΩϡϝϯτͷ྆ํΛੜ੒͢Δ
    • OpenAPI
    • Protocol Buffersʢprotocʣ
    • γεςϜͱυΩϡϝϯτͷဃ཭Λθϩʹ͢ΔDocumentation as CodeΛຊൃදʢ͚ͩʣͰ͸
    Documentation as Code+ͱݺͿ

    View Slide

  18. 18
    Documentation as Code+
    tbls։ൃͷ͖͔͚ͬ
    • ౰࣌ΞϧϑΝஈ֊ͷϓϩδΣΫτͰઈࢍ։ൃதʹɺϓϩμΫτΦʔφʔ͕SQLΛॻ͘ਓͰʮσʔ
    λϕʔεఆٛॻ͸Ͳ͜ʹ͋Γ·͔͢ʁʯͱฉ͔Εͯ͠·ͬͨ
    • σʔλϕʔεεΩʔϚ΋೔ʑมΘ͍ͬͯΔΑ͏ͳϑΣʔζͰ৘ใ͕ϚΠάϨʔγϣϯϑΝΠ
    ϧͱίϛοτϩάʹ͔͠ͳ͔ͬͨ
    • γεςϜʢσʔλϕʔεʣͱυΩϡϝϯτͷ

    ဃ཭Λθϩʹ͢Δπʔϧͱͯ͠tblsͷ։ൃΛ

    ͸͡Ίͨ
    https://speakerdeck.com/k1low/pepabo-tech-conference-number-16

    View Slide

  19. 19
    Documentation as Code+
    Documentation as Code+ͷࢹ఺Ͱ࡞੒͞Εͨtbls
    • tbls͸ߏ଄Խσʔλʢσʔλϕʔεʣ͔ΒυΩϡϝϯτΛੜ੒͢ΔΞϓϩʔν
    • CIͰυΩϡϝϯτΛੜ੒͢Δ͜ͱͰܧଓతʹγεςϜͱͷဃ཭Λθϩʹ͢Δ
    • ʮContinuous Documentationʯ
    • CIϑϨϯυϦ=ϫϯόΠφϦͰ؆୯ʹΠϯετʔϧͰ͖Δ
    https://speakerdeck.com/k1low/pepabo-tech-conference-number-16

    View Slide

  20. 20
    Documentation as Code+
    k1LoW/setup-tbls
    • tblsΛηοτΞοϓ͢ΔAction for GitHub Actions
    • https://github.com/k1LoW/setup-tbls
    • ΑΓCIϑϨϯυϦʹ

    View Slide

  21. 21
    Documentation as Code+
    Documentation as Code+Λ
    αϙʔτ͢ΔtblsαϒίϚϯυ

    View Slide

  22. 22
    Documentation as Code+
    tbls diff
    • ࠩ෼Λ֬ೝ͢ΔίϚϯυɻ
    • σʔλϕʔε-υΩϡϝϯτɺσʔλϕʔε-σʔλϕʔεͲͪΒ΋Մೳ

    View Slide

  23. 23
    Documentation as Code+
    tbls coverage
    • ιʔείʔυͱಉ͡Α͏ʹυΩϡϝϯτͷΧόϨοδʢςʔϒϧ΍ΧϥϜͷίϝϯτͷຒ·Γ
    ཰ʣΛ֬ೝͰ͖Δ

    View Slide

  24. 24
    Documentation as Code+
    tbls lint
    • σʔλϕʔευΩϡϝϯτʢͱσʔλϕʔεʣͷͨΊͷLinter
    • ίϝϯτͷ༗ແ΍ؔ࿈ͷ༗ແɺςʔϒϧ͝ͱͷΧϥϜ਺ͳͲΛνΣοΫର৅ʹͰ͖Δɻ

    View Slide

  25. ͜͜·Ͱ͕ɺ
    ౰࣌ߟ͍͑ͯͨ Documentation as Code
    25

    View Slide

  26. 26
    Documentation as Code+
    Documentation as Code+ͷ՝୊

    View Slide

  27. 27
    Documentation as Code+
    ਖ਼͍͠ɻ͕ɺ໾ʹཱͨͳ͍
    • ਖ਼͍͠σʔλϕʔευΩϡϝϯτͰ͋Δͱ͍͏҆৺ײ͸ಘΒΕͨ
    • tblsద༻ҎલͰ͸ಘΒΕͳ͔ͬͨײ֮Ͱ͋Δ͜ͱ͸ؒҧ͍ͳ͍
    • σʔλϕʔεͷςʔϒϧ΍ΧϥϜͷίϝϯτɺϦϨʔγϣϯ͕੔උ͞Ε͍ͯΔυΩϡϝϯτ͕͋
    Δ͜ͱͰҰఆͷ໾ʹ͸ཱ͕ͭɺͦΕҎ্Ͱ΋ͦΕҎԼͰ΋ͳ͍
    • γεςϜͷ։ൃϥΠϑαΠΫϧʹ͓͍ͯ໾ʹཱͭλΠϛϯά͕গͳ͍
    • ·ͩ·ͩυΩϡϝϯτΛ׆༻Ͱ͖͍ͯΔͱ͸ݴ͑ͳ͍ͷͰ͸ʁ

    View Slide

  28. 28
    Documentaion as Code++

    View Slide

  29. 29
    Documentation as Code++
    υΩϡϝϯτʢʹσʔλʣͷ׆༻ൣғΛ޿͛Δ
    • γεςϜͷ։ൃϥΠϑαΠΫϧʹ͓͍ͯʮσʔλϕʔεΛ࢖༻͢ΔλΠϛϯάʯʮσʔλϕʔε
    Λ࢖ͬͯߟ͑ΔλΠϛϯάʯ͸ଟ͋͘Δ͸ͣ
    • σʔλϕʔεʮυΩϡϝϯτʯ͚ͩͰ͸଍Γͳ͍ͷ͔΋͠Εͳ͍ɻ
    • γεςϜ͔Βநग़ͨ͠৘ใҎ֎ͷ৘ใ΋෇༩͢Δɻ
    • ʮσʔλϕʔευΩϡϝϯτʯͱ͍͏ܗ͕ࣜϚον͍ͯ͠ͳ͍ͷ͔΋͠Εͳ͍ɻ
    • ਖ਼͍͠σʔλϕʔευΩϡϝϯτ͸ਖ਼͍͠σʔλͰ͋Δͱ͍͑ΔͷͰσʔλ׆༻ͷ؍఺͔
    Β઀఺Λ૿΍͢ɻ

    View Slide

  30. 30
    Documentation as Code++
    γεςϜͷཧղΛॿ͚Δ
    υΩϡϝϯςʔγϣϯ

    View Slide


  31. ιϑτ΢ΣΞΞʔΩςΫνϟͷଟ͘ͷஶऀ͕ɺͨͬͨͭͷϞσϧΛ࢖ͬͯιϑτ΢ΣΞ
    ΞʔΩςΫνϟΛهड़͢Δ͜ͱ͸શ͘ෆՄೳͩͱࢦఠ͍ͯ͠ΔɻͦͷΑ͏ͳϞσϧ͸ɺ
    ཧղ͠ʹ্͍͘ɺΞʔΩςΫνϟͰ࠷΋ॏཁͳػೳΛ໌֬ʹಛఆͰ͖ΔݟࠐΈ͸΄ͱΜ
    Ͳͳ͍ɻʢதུʣ
    ϏϡʔʢWJFXʣͱ͸ɺҰਓҎ্ͷεςʔΫϗϧμ๊͕͍͍ͯΔͭ·ͨ͸ͦΕҎ্ͷؔ
    ৺ࣄʹɺΞʔΩςΫνϟ͕Ͳ͏ରԠ͢Δ͔Λࣔ͢ɺΞʔΩςΫνϟͷͭҎ্ͷߏ଄తଆ
    ໘Λදݱͨ͠΋ͷͰ͋Δɻ
    χοΫɾϩβϯεΩ Φ΢Σϯɾ΢οζιϑτ΢ΣΞγεςϜΞʔΩςΫνϟߏஙͷݪཧୈ൛ +BQBOFTF&EJUJPO
    ΑΓൈਮɹ

    View Slide

  32. 32
    Documentation as Code++
    γεςϜͷཧղΛॿ͚ΔυΩϡϝϯςʔγϣϯ
    • ʮؔ৺ࣄʹ߹ΘͤͯΞʔΩςΫνϟΛ1ͭҎ্ͷଆ໘ʢ੾ΓޱʣͰදݱ͢Δʯ͜ͷߟ͑ํ͸ઃܭ
    ͚ͩͰͳ͘υΩϡϝϯςʔγϣϯʹ΋౰ͯ͸ΊΔ͜ͱ͕Ͱ͖Δ
    • γεςϜʹର͢Δؔ৺ࣄʹ߹ΘͤͯඞཁͳγεςϜͷཁૉ͚ͩΛ·ͱΊͯʮϏϡʔʢϏϡʔϙΠ
    ϯτʣʯͱ͠υΩϡϝϯτԽ͢ΔʢʮϢʔβ͔ΒͷHTTPϦΫΤετʯʮϚΠΫϩαʔϏε୯
    ҐʯͳͲʣ
    • ؔ৺ࣄ…γεςϜΛཧղ͢Δ্Ͱҙຯ

    ͷ͋Δάϧʔϐϯά
    https://speakerdeck.com/k1low/phperkaigi-2021

    View Slide

  33. 33
    Documentation as Code++
    labels: / comments[].labels: / comments[].columnLabels:
    • εΩʔϚ΍ςʔϒϧ΍ΧϥϜʹϥϕϧΛ෇༩Ͱ͖Δ
    • ϥϕϧ͸BigQueryʹ͸ػೳͱͯ͠ଘࡏ͍ͯ͠Δ͕tblsΛ࢖͏͜ͱͰ͋ΒΏΔσʔλϕʔεͷ
    υΩϡϝϯτʹϥϕϧΛ෇༩Ͱ͖Δ
    • ϥϕϧ৘ใ͸ͦͷ··υΩϡϝϯτʹ΋ͦͷ··൓ө͞ΕΔ
    • ʮηϯγςΟϒ৘ใ͕ೖΔΧϥϜʹ `sesitive` ͱ͍͏ϥϕϧΛ෇༩͠ɺͦͷϥϕϧ͕͋ΔΧϥϜ
    ͷ৘ใʹ͸ϚεΫΛ͢ΔɻӾཡݖݶΛߜΔʯ

    View Slide

  34. 34
    Documentation as Code++
    viewpoints:
    • σʔλϕʔευΩϡϝϯτʹ͓͚ΔʮϏϡʔϙΠϯτʯΛ
    ࣮ݱͨ͠ػೳ
    • ؔ৺ࣄʹ߹Θͤͯςʔϒϧ໊ͱϥϕϧͰؔ࿈ςʔϒϧΛߜ
    ΓࠐΈɺͦͷؔ৺ࣄΛઆ໌͢ΔυΩϡϝϯτΛ࡞੒Ͱ͖Δ
    • άϧʔϐϯά΋Մೳ

    View Slide

  35. 35
    Documentation as Code++
    ߏ଄Խσʔλͷ׆༻

    View Slide

  36. 36
    Documentation as Code++
    schema.json
    • ߏ଄ԽσʔλΛυΩϡϝϯτʹ͚͔ͩ͠࢖Θͳ͍ͱ͍͏ͷ͸΋͍ͬͨͳ͍
    • σʔλ׆༻ͷൣғΛ޿͛ΔͨΊʹɺtbls͕σʔλϕʔεεΩʔϚͱ.tbls.ymlΛ࢖༻ͯ͠υΩϡϝϯ
    τΛੜ੒͢ΔͨΊʹ಺෦Ͱߏங͍ͯ͠Δߏ଄Խσʔλʢschema.jsonʣΛग़ྗ͢ΔΑ͏ʹ͢Δ
    • ΋ͱ΋ͱ tbls out -t json Ͱग़ྗͰ͖Δ͕ɺv1.57.0͔Βtbls docͰ΋σϑΥϧτͰग़ྗ͢Δ
    Α͏ʹͨ͠
    • σϑΥϧτͰग़ྗ͞Ε͍ͯΕ͹ग़ྗ͞Ε͍ͯΔલఏͰ࣮૷͕Ͱ͖Δ
    • schema.json͸tblsʹͱͬͯ͸MySQL΍PostgreSQLͱಉ͡σʔλιʔεͳͷͰɺ json:// εΩʔϜ
    ΍ github:// εΩʔϜΛ࢖ͬͯࢦఆ͢Δ͜ͱͰɺmysql:// ΍ pg:// ͱಉ༷ʹ࢖༻Ͱ͖Δ

    View Slide

  37. 37
    Documentation as Code++
    tbls ls
    • σʔλϕʔεͷςʔϒϧҰཡ΍ΧϥϜҰཡΛग़ྗ͢ΔίϚϯυʢઈࢍ֦ுதʣ
    • schema.jsonΛҰ࣍৘ใͱͯ͠࢖༻͢Δ͜ͱͰɺ࣮ࡍͷσʔλϕʔεʹ઀ଓ͢Δ͜ͱͳ͘࢖༻Մ

    DEMO

    View Slide

  38. 38
    Documentation as Code++
    ֎෦αϒίϚϯυ΁ͷߏ଄Խσʔλͷड͚౉͠
    • ghʢGitHub CLIʣίϚϯυ΍gitίϚϯυɺkubectlίϚϯυͷΑ͏ͳαϒίϚϯυ֦ுػೳ
    • ࣮͸tblsʹ΋͋ΔϓϥάΠϯػߏ
    • σʔλϕʔεͷղੳ΍.tbls.ymlͷ৘ใऔಘ͸tbls͕ߦ͍ɺαϒίϚϯυʹ͸ղੳ݁Ռͷ
    schema.json͕؀ڥม਺Λ௨ͯ͡౉Δ࢓૊Έ
    • .tbls.ymlͰهࡌͨ͠ίϝϯτ΍ϥϕϧΛ

    ٯʹBitQueryʹઃఆ͢Δtbls-metaͳͲ͕͋Δ
    • https://github.com/k1LoW/tbls-meta
    https://speakerdeck.com/k1low/pepabohatena

    View Slide

  39. 39
    Documentation as Code++
    େن໛ݴޠϞσϧʢLLMʣΛ
    ࢖༻ͨ͠͞ΒͳΔ֦ு

    View Slide

  40. 40
    Documentation as Code++
    ਖ਼͘͠ඞཁͳσʔλΛLLMʹ౉ͤΔͱ͍͏ϝϦοτ
    • tblsͰσʔλϕʔευΩϡϝϯτ͸ਖ਼͍͜͠ͱ͕෼͔͍ͬͯΔɻίϯςΩετ৘ใ΋ଟ࣋ͬͯ͘
    ͍Δɻ
    • ίϝϯτ΍ؔ࿈ɺϏϡʔϙΠϯτͳͲ
    • ʮจষ͕༩͑ΒΕͨ࣌ɺ࣍ͷจষΛਪଌ͢Δʯͱ͍͏LLM͕ಘҙͱ͢Δ໰୊ʹ౰ͯ͸ΊΔ
    • ʮίϝϯτ෇͖ͷਖ਼͍͠σʔλϕʔεεΩʔϚʯͱʮ࣭໰ʯΛ༩͑ͯLLMʹਪଌͤ͞Δ
    • ۩ମతʹ͸ɺσʔλϕʔεεΩʔϚͱίϯςΩετʹԊͬͨΫΤϦΛ࡞੒ͤ͞Δ͜ͱ͕Մೳ

    View Slide

  41. • schema.json͔Βʮਖ਼͍͠ίϯςΩετΛ࣋ͬͨσʔλϕʔεεΩʔϚʢίϝϯτ෇͖DDLʣʯ
    Λ࡞੒ͯ͠ɺ಺෦తʹϓϩϯϓτʹ࢖༻͢Δ
    41
    Documentation as Code++
    tbls ask ( PoC: https://github.com/k1LoW/tbls-ask )
    DEMO

    View Slide

  42. 42
    Documentation as Code++
    υΩϡϝϯτ׆༻ͷΠϯλʔϑΣʔεΛ޿͛Δ
    • schema.jsonΛܦ༝͢Δ͜ͱͰʢ࣮σʔλϕʔεʹ઀ଓ͠ͳͯ͘΋ʣܧଓతʹਖ਼͍͠৘ใΛσʔ
    λΛऩू͢Δ͜ͱ͕Ͱ͖Δ
    • LLMʹΑͬͯʮਖ਼͍͠υΩϡϝϯτʢߏ଄ԽσʔλʣΛ࢖ͬͨਪଌʯͱ͍͏Ξϓϩʔν
    • ྫ͑͹ʮνϟοτϘοτʯͱ͍͏υΩϡϝϯτ׆༻ͷΠϯλʔϑΣʔε
    • ʮ@tbls-bot query minneͷྦྷੵྲྀ௨ֹͷ߹ܭʯʮSELECT * ʙʯ͕༰қʹ࣮ݱͰ͖Δɻ
    • ͞ΒʹΫΤϦͷ࣮ߦΛڐ͢ͷͰ͋Ε͹
    • ʮ@tbls-bot minneͷྦྷੵྲྀ௨ֹͷ߹ܭΛڭ͑ͯʯʮ͸͍ɻ 2023೥6݄15೔࣌఺Ͱͷྦྷܭ
    ྲྀ௨ֹ߹ܭ͸1,000,00*,***,***Ͱ͢ɻ࣮ߦͨ͠ΫΤϦ͸XXXͰ͢ɻʯ͕࣮ݱͰ͖Δɻ

    View Slide

  43. 43
    Documentation as Code++
    ͞ΒʹٯͷΞϓϩʔν

    View Slide

  44. 44
    Documentation as Code++
    ࣮σʔλΛ࢖༻ͨ͠υΩϡϝϯςʔγϣϯͷิ׬
    • ʮςʔϒϧͷϨίʔυͷαϯϓϧʯΛ༩͑ͯLLMʹʮςʔϒϧͱΧϥϜͷઆ໌ʯΛਪଌͤ͞Δ
    • ࣮σʔλͰυΩϡϝϯςʔγϣϯΛͯ͠͠·͓͏ͱ͍͏tblsͱٯͷΞϓϩʔν
    • By @pyama86
    • ϖύϘࣾ಺Ͱଟ͘ͷChatGPTΞϓϦέʔγϣϯΛఏڙ͖͔ͯͨ͠Βͦ͜ͷൃ૝
    • https://ten-snapon.com/archives/2908

    View Slide

  45. ͓ΘΓʹ
    45

    View Slide

  46. 46
    https://star-history.com/blog/star-history-monthly-pick-202302
    ʢ͜ͷϓϩδΣΫτ͸5೥Ҏ্લ͔ΒΦʔϓϯιʔεԽ͞Ε͍ͯΔ
    ͕ɺࠓ೥ͷॳΊʹ੕ͷ਺͕ٸ૿ͨ͠ɻͦͷؒʹԿ͕͋ͬͨͷ͔ɺ
    Ͳͳ͔͓ͨΘ͔ΓʹͳΓ·͔͢ʁʣ
    The project has been open-sourced for 5+ years,
    but the number of stars had a spike earlier this year.
    Anyone has any idea what happened in between?

    View Slide

  47. 47
    ͓ΘΓʹ
    ͓ΘΓʹ
    • ౴͑ͱͯ͠͸ʮΘ͔Γ·ͤΜɻ͔͠͠ɺDocumentation as Codeʹ͍ͭͯߟ͑ͳ͕Βɺܧଓత
    ʹ։ൃΛ͖ͯ͠·ͨ͠ʯ
    • Documentation as Codeͷݪ఺͸ʮυΩϡϝϯτΛίʔυͱಉ͡Α͏ʹӡ༻͍ͯ͘͠ʯ
    • ͦͯͦ͠ͷઌΛߟ࣮͑૷͖ͯͨ͠ɻ
    • ࠓ࣌఺ͷࢲͷDocumentation as Codeͷείʔϓ͸ʮਖ਼͍͠υΩϡϝϯτ͸ਖ਼͍͠σʔλͰ͋
    ΓɺυΩϡϝϯτͷൣᙝΛӽ͑ྑ࣭ͳೖྗʹͳΔʯ

    View Slide

  48. Thank You!
    Thank You!
    48

    View Slide