{"id":50485709,"url":"https://github.com/anrylu/infer-spec","last_synced_at":"2026-06-01T22:02:21.213Z","repository":{"id":359069568,"uuid":"1244374730","full_name":"anrylu/infer-spec","owner":"anrylu","description":"Reverse-infer OpenSpec specs from codebase + git history + docs. For legacy code without specs.","archived":false,"fork":false,"pushed_at":"2026-05-29T01:41:24.000Z","size":94,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-29T02:07:43.181Z","etag":null,"topics":["agentic","brownfield","claude-code","claude-skill","dds","legacy-code","openspec","sdd","spec-driven-development"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anrylu.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-20T07:54:13.000Z","updated_at":"2026-05-29T01:42:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/anrylu/infer-spec","commit_stats":null,"previous_names":["anrylu/infer-spec"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/anrylu/infer-spec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrylu%2Finfer-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrylu%2Finfer-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrylu%2Finfer-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrylu%2Finfer-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anrylu","download_url":"https://codeload.github.com/anrylu/infer-spec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrylu%2Finfer-spec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33795114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","brownfield","claude-code","claude-skill","dds","legacy-code","openspec","sdd","spec-driven-development"],"created_at":"2026-06-01T22:02:17.760Z","updated_at":"2026-06-01T22:02:21.207Z","avatar_url":"https://github.com/anrylu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English](/README.md) | [繁體中文](/README.zh-tw.md) | [简体中文](/README.zh-cn.md) | [日本語](/README.ja.md)\n\n# InferSpec\n\n**コードベース + Git 履歴 + ドキュメントから OpenSpec 仕様書を逆推論** —\n仕様書のない legacy code のために設計されています。\n\n[![CI](https://github.com/anrylu/infer-spec/actions/workflows/ci.yml/badge.svg)](https://github.com/anrylu/infer-spec/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003e **Development-Driven Spec (DDS)** — Spec-Driven Development の逆向きの実践。\n\u003e From Code \u0026 Context to Clear Specs.\n\n## SDD vs DDS\n\n[Spec-Driven Development（SDD）](https://github.com/Fission-AI/OpenSpec)は、\nまず仕様書を書き、それに沿って実装するという開発規律で、greenfield プロジ\nェクトには非常に有効です。\n\n**しかし現実の多くは brownfield。** あなたは 5 万行ある Flask サービスを引き\n継いだ。仕様書は存在しない — 3 年放置された Jira ボード、誰も更新しない\nConfluence wiki、そして Git log だけ。SDD はここに入口がありません。\n\n**InferSpec はこのループを反転させます — Development-Driven Spec（DDS）。**\nコードはすでに存在する。これ（＋ git 履歴、チケット、ドキュメント、MCP 接続\nの wiki）を真実の源として扱い、構造化された OpenSpec 仕様書を*逆推論*し\nます。仕様書が揃ったら、新機能には SDD に戻ればよい。\n\n| モード | 起点 | 成果物 |\n|--------|------|--------|\n| **SDD**（Spec-Driven Development） | 仕様書 | コード |\n| **DDS**（Development-Driven Spec） | コード + 履歴 + ドキュメント | 仕様書 |\n\n## なぜ InferSpec？\n\n**InferSpec はその全てを読み**、構造化された OpenSpec 仕様書を生成します — capability ごとに 1 つの `spec.md`、各 Requirement は `file:line` または ticket ID へ引用付き。AI が不確実な箇所は `[GAP]`/`[TBD]` でマークされ、後でインタラクティブに埋められます。\n\n## 仕組み\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  Layer 1 — uvx Python パッケージ: installer + CLI            │\n│  （LLM API は決して呼びません）                                │\n└─────────────────────────────────────────────────────────────┘\n                       │ skill をインストール\n                       ▼\n┌─────────────────────────────────────────────────────────────┐\n│  Layer 2 — Skill は Claude Code / Codex / Gemini / Copilot  │\n│  / OpenCode 内で動作し、host の subscription AI を使う          │\n└─────────────────────────────────────────────────────────────┘\n```\n\nInferSpec はあなたが既に契約している AI サブスクリプションに依存します。API key も不要、クラウド endpoint の設定も不要です。\n\n## インストール\n\n```bash\nuvx inferspec init --platform claude-code\n```\n\nこれでカレントディレクトリの `.claude/skills/` に `/inferspec-scan` +\n`/inferspec-cap` がインストールされます。サポート対象プラットフォームの全\nリストは `inferspec platforms` で確認できます。\n\n### アップデート\n\n`inferspec` パッケージの新版がリリースされても、各 repo の `.claude/skills/`\n（または同等のパス）配下にある skill ファイルはインストール時のバージョン\nのままです。次の手順で更新してください：\n\n```bash\npip install -U inferspec        # または：uvx --refresh inferspec ...\ninferspec update                # `inferspec init` を実行した各 repo で\n```\n\n`inferspec update` は `.inferspec.yaml` を読み込み、以前選んだ platforms に対\nして skill bundle を再コピーします（再質問なし）。`inferspec update --check`\nで書き込みなしのドリフト確認、`inferspec doctor` で platform ごとの「インス\nトール済み vs パッケージ」バージョン比較が可能です。\n\n## 使い方\n\n対象 repo で AI agent を開く。2 つの skill が利用可能：\n\n**`/inferspec-scan`** — bulk モード、全 capability の spec を一括推論：\n\n```\n/inferspec-scan\n```\n\n`graphify` でファイルを capability にクラスタリングし、各 cap ごとに code +\n`git log` + `docs/` + (利用可能なら) MCP 経由の Jira/Confluence + host の\nWebFetch 経由の URL を読み、OpenSpec 形式で `openspec/specs/\u003ccap\u003e/spec.md` を\n生成。AI が不確実な箇所は `[GAP]` / `[TBD]` でマーク。\n\n**`/inferspec-cap \u003cslug\u003e`** — 単一 cap の深掘り + インタラクティブ Q\u0026A：\n\n```\n/inferspec-cap user-auth\n/inferspec-cap \"rate limiting\"       # ファジーマッチ\n/inferspec-cap                       # インタラクティブ選択\n/inferspec-cap new-feature --new     # 新規 cap bootstrap\n```\n\n単一 cap について、skill が Jira/Confluence/URL を能動的に尋ね、各 `[GAP]`\nマーカーに対し焦点を絞った質問を spec が収束するまで 1 つずつ提示。終了時に\nコミット要否を確認。\n\n外部データソース（Jira、Confluence、URL）は自動処理 — InferSpec は host 環境\nの MCP server を検出するため、独自 client は持たない。\n\n## 出力フォーマット\n\n[OpenSpec](https://github.com/Fission-AI/OpenSpec) と同じ規約：\n\n```markdown\n## Purpose\n\n注文ポータルのユーザー認証 — incident-1234 を受けて旧 SSO bridge を置き換え。\nAUTH-456 参照。\n\n## Requirements\n\n### Requirement: Rate Limiting\nシステムは 60 秒以内に 5 回失敗したログイン試行を SHALL 拒否する。\n\n**Source:** auth.py:18-21, [JIRA AUTH-456]\n\n#### Scenario: 連続失敗後のロックアウト\n- **GIVEN** 過去 1 分以内に 5 回失敗\n- **WHEN** さらに POST /auth/login が到達\n- **THEN** server が 429 を返す\n```\n\n## ステータス\n\n**v0.3 alpha**。以下を提供：\n- `/inferspec-scan` — bulk モード、加えて design-doc 自動探索、OpenAPI/Swagger\n  検出、`--since \u003crev\u003e` 増分スキャン、用語集の強制（`.inferspec-glossary.txt`）、\n  削除提案（静かに消さず `openspec/changes/` に出力）\n- `/inferspec-cap \u003cslug\u003e` — インタラクティブ単一 cap モード、既存 spec の\n  gap-fill にも対応\n- `inferspec update` — 各 repo でインストール済み skill bundle を再リフレッシュ\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanrylu%2Finfer-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanrylu%2Finfer-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanrylu%2Finfer-spec/lists"}