npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@exabugs/mobilespec

v1.1.8

Published

モバイルアプリ仕様管理ライブラリ - L2/L3/L4仕様の定義、バリデーション、生成ツール

Readme

mobilespec

Structure-Driven Development (SDD) 仕様エンジン

mobilespec は
Structure-Driven Development(構造駆動開発) を実践するための
構造検証・可視化・契約整合エンジンです。


🎯 SDD とは

SDD は、

  • API 構造(OpenAPI)
  • 画面遷移構造(L2)
  • UI 構成構造(L3)
  • 状態・データ契約構造(L4)

唯一の正(SSOT) とし、

実装コードを生成物として扱う開発手法です。


🧠 基本原則

  1. 構造が正、実装は生成物
  2. OpenAPI は API 契約の唯一の正
  3. L2 / L3 / L4 は UI 契約の唯一の正
  4. URL / HTTP メソッド直書き禁止
  5. L4 は operationId のみ参照
  6. selectRoot は必須(OpenAPI で証明可能であること)
  7. 契約違反は CI が検知する(AIは検知しない)

🔎 診断ポリシー(固定)

mobilespec は 2段階のみ を採用する。

| level | 意味 | | ----- | ---------------------- | | error | 実装不能(CI fail) | | info | 状態可視化(常時表示) |

warning は使用しない。


🔗 構造接続ルール

L3.action
↓
L2.transition.id
↓
L4.events key
↓
L4.data (query/mutation key)
↓
OpenAPI.operationId

この縦接続が成立している状態を
Structural Integrity(構造整合) と呼ぶ。


📐 検証内容

L2

  • screen 重複
  • 遷移ターゲット不正
  • entry から到達不能 screen → ❌ error
  • 未使用 transition → ℹ️ info

L3

  • action → L2 transition 不一致 → ❌ error

L4

  • screenKey 不一致 → ❌ error
  • event ↔ L2 transition 不一致 → ❌ error
  • query / mutation 未定義参照 → ❌ error

OpenAPI

  • operationId 未定義 → ❌ error
  • 重複 → ❌ error
  • L4 が存在しない operationId 参照 → ❌ error
  • 未使用 operationId → ℹ️ info(構造進捗表示)

i18n

  • key 不存在 → ❌ error
  • 未翻訳(ja以外) → ℹ️ info

📂 推奨構成

specs/
  L2.screenflows/
  L3.ui/
  L4.state/
  i18n/

原則:

1 screen = 1 file


⚙ CLI

mobilespec check
mobilespec update

check(CI / read-only)

CI では check のみを実行する(ファイルを生成・更新しない):

pnpm run sdd:check

error が1件でもあれば exit 1。

update(local / write)

ローカル開発では、仕様変更後に 生成物(i18n / mermaid)を更新してから検証したい場合がある。

pnpm run sdd:update

update は i18n / mermaid を更新し、その後に check を実行する(副作用あり)。


🧠 SDD のゴール

  • 実装は破棄可能
  • フレームワーク変更可能
  • AI は構造のみ読めば生成可能
  • 契約違反は自動検知
  • トークン消費最小

🔥 mobilespec の役割

構造を正とするための検証エンジン


📚 詳細ドキュメント構成

docs/
  adr/
  01_principles.md
  02_structure_model.md
  03_validation_model.md
  04_ci_policy.md
  05_lifecycle.md
  06_ai_collaboration.md
  07_configuration.md

README は「入口」。

詳細は docs/ 以下へ。