folio は AI agent (Claude Code) と人間が共同で「仕様書 (architecture spec)」 を書き続ける meta framework。 すべての spec を HTML 形式で記述するルール (P-2) のもと、 ディレクトリ整理 + index + 各仕様書間ハイパーリンクで関係性を表現したい。 ただし、 新規 spec ファイル追加時に 既存ハイパーリンク網に正しく組み込まれ整合性が保たれる仕組み が必要。 一方で HTML ファイル全文を AI agent に毎回読ませると context window が圧迫され管理破綻する懸念がある。
Beads (github.com/steveyegge/beads) は GitHub Issue の依存関係を Dolt (versioned SQL database) で管理し、 issue 間の関係をグラフとして表現することで AI agent が効率的に dependency を辿れる仕組みを実現している。 これと類推して spec ファイル間の関係 (cross-reference / 依存 / extend / supersede 等)、 要約・メタデータ、 グラフノード構造をデータベース技術で整理し、 AI が HTML 全文を読まなくても全体構造を把握できるか — を検証することが本調査の趣旨。
dolt_* system tables/procedures で version control 操作。dcterms:replaces が 「supersedes」 関係を W3C 標準としてすでに提供 (URI: http://purl.org/dc/terms/replaces)。 ただし「depends-on」 の標準語彙は存在せず ドメイン固有 ontology が必要。12 ツールを 4 軸 (ストレージ / Backlink 戦略 / Link 解決 / Broken link 動作) で整理 (詳細マトリクスは §3.2 参照)。 ストレージは大別して 4 種類:
objects.inv (zlib + 行形式)、 DocFX xrefmap.yml (YAML refs list)Map<family, Map<key, file>>)、 Obsidian resolvedLinks (Record<src, Record<dest, number>>)pagelinks + linktarget (immutable、 正規化された varbinary キャッシュ + 整数 FK):block/refs, :block/path-refs)、 Roam (Datomic)、 Foam (graphlib)、 DokuWiki (専用 .idx + Memory/File Index)blocks / parent-child / related / discovered-from / conditional-blocks / waits-for / replies-to / supersedes / duplicates。 hash-based ID (bd-a1b2) で分散衝突防止。constitution.html (frozen) / decisions/*.html (ADR active) / research/*.html (ephemeral) に対応。bd prime (CLI) は 1-2k tokens → 10-50x context efficiency。 folio も同様に folio prime 相当の context injection を CLI で実現可能。Adr.supersedeBy() ―― 双方向リンク自動 materializationsuperseded by [new-slug](path) に書換え、 新しい側に Supersedes [old-slug](path) リンクを自動追加。 これは Backstage の bidirectional relations (dependsOn ↔ dependencyOf 等) と同じ思想。 folio の P-10 amendment 戦略に直接転用可能。<script type="application/ld+json"> ブロックで HTML 構造から decoupled。 @id による linked data 構築が容易。 microdata は nested で maintenance nightmare、 RDFa は niche shrinking、 HTML5 data-* は MDN が明示的に「機械可読 metadata に非推奨」 と警告。@id で external resources への参照を持つ linked data を、 DB なしで構築可能。relations テーブル整合性検証、 (iv) ADR supersede 関係を log4brains 風に materialize。両 worker が独立に Beads を深掘りし、 結論が完全一致 ―― 信頼度 high。 Beads 設計の核心 4 判断:
bd-a1b2) ―― 分散衝突防止| Beads edge type | 意味 | ready 判定 | folio 類推 |
|---|---|---|---|
blocks | X must close before Y | ✓ | depends-on |
parent-child | hierarchical | ✓ (親 block 時) | subsection-of |
related | soft reference | ✗ | related-to |
discovered-from | audit trail | ✗ | discovered-during |
conditional-blocks | B runs only if A fails | ✓ | alternative-to |
waits-for | fanout gate | ✓ | (不要) |
supersedes | A replaces B | ✗ | supersedes (P-10 と直結) |
duplicates | A duplicates B | ✗ | duplicate-of |
replies-to | message thread | ✗ | (不要) |
| Beads Phase | folio Layer | 永続性 | Sync |
|---|---|---|---|
| Solid (Proto) | scratch/constitution.html | Frozen template | Yes |
| Liquid (Mol) | scratch/decisions/*.html (ADR) | Active persistent | Yes |
| Vapor (Wisp) | scratch/research/*.html 等 | Ephemeral | No (Wisp=true) |
| ツール | ストレージ | Backlink 戦略 | Link 解決 | Broken link 動作 |
|---|---|---|---|---|
| Sphinx | flat zlib (objects.inv) | build バッチ | UID + domain:role | missing-reference event |
| DocFX | YAML (xrefmap.yml) | build バッチ | UID 中央集権 | build warning |
| Antora | in-memory Map (ContentCatalog) | build バッチ | Resource ID version@component:module:family$file | unresolved |
| MkDocs | files coll. + page.toc | build バッチ | path + anchor | validation.links.* 設定 |
| Docusaurus | Set per page | build バッチ | path-based | production build のみ |
| Hugo | page lookup + fallback | build バッチ | page → resource → global | warning |
| Obsidian | Record<src, Record<dest, count>> | incremental (events) | shortest-path | unresolvedLinks 別管理 |
| Foam | graphlib (dagre) NoteGraph | incremental | wikilink | graph 表示 |
| Logseq | Datalog EAV (:block/refs, :block/path-refs) | クエリ時計算 | Datalog query | graph 表示 |
| Roam | Datomic EAV | クエリ時計算 | block-uid 9 文字 | graph 表示 |
| MediaWiki | RDBMS (pagelinks + linktarget) | incremental (LinksUpdate Job) | namespace + title FK | brokenlinks (旧版) |
| DokuWiki | .idx flat + relation_references | バックグラウンド (TaskRunner) | namespace + title | 暗黙 |
Anthropic が Agent Skills で実装している 3-tier loading が folio HTML 仕様書管理に直接適用可能:
| Tier | Anthropic Skills | tokens | folio 対応 |
|---|---|---|---|
| Tier 1 | YAML name + description | 30-50 / skill | CLAUDE.md, MEMORY.md, inventory file (Sphinx objects.inv 風) |
| Tier 2 | SKILL.md 本体 | 500-2000 | 各 *.html の <head> JSON-LD + 本文サマリ |
| Tier 3 | FORMS.md, REFERENCE.md | unbounded | 各 *.html 本文 + research/*.html |
140x efficiency。 folio は vector DB に頼らず grep-friendly な HTML 構造 を目指すべき (Claude Code は意図的に indexing しないため)。
| 技術 | folio fit | 理由 |
|---|---|---|
JSON-LD (<script type="application/ld+json">) | ★★★★★ | HTML から decoupled、 @id で linked data、 Google 推奨、 Sambal 事例あり、 extruct で抽出容易 |
| Microdata | ★★ | visible content と 1:1 だが nested で破綻、 HTML 構造に tight coupling |
| RDFa | ★★ | 複数 vocabulary 同時可能だが complexity max、 niche shrinking |
HTML5 data-* | ★ | MDN が明示的に「機械可読 metadata に非推奨」 と警告 |
Custom <meta> tag | ★★★ | document-level metadata に向く、 Sphinx objects.inv のような flat 形式 |
folio が JSON-LD で関係性を表現する場合、 独自の folio:supersedes を作らず DCMI 既存語彙を使うべき:
{
"@context": {
"dc": "http://purl.org/dc/terms/",
"folio": "https://folio.dev/spec/v1/"
},
"@id": "decisions/ADR-0042-database-choice.html",
"@type": "TechArticle",
"dc:replaces": { "@id": "decisions/ADR-0017-original-database.html" },
"folio:depends-on": { "@id": "constitution.html#P-3" }
}
| folio 関係 | 標準語彙 | 備考 |
|---|---|---|
| supersedes | dc:replaces | 逆: dc:isReplacedBy |
| change history | dc:provenance | 監査用 |
| cross-reference | dc:references / dc:isReferencedBy | 双方向 dual |
| subsection | dc:hasPart / dc:isPartOf | schema.org も同じ |
| depends-on | (独自必要) | W3C 標準なし、 folio:depends-on 等 |
| extends | (独自必要) | schema.org additionalType で近似可能だが弱い |
| derived-from | prov:wasDerivedFrom | PROV-O |
log4brains の Adr.supersedeBy() メソッド (TypeScript ソースから直接抽出) は、 folio が採用すべき双方向リンク自動化パターン:
supersedeBy(superseder: Adr): void {
const relation = new AdrRelation(this, "superseded by", superseder);
this.body.setHeaderMetadata("Status", relation.toMarkdown());
superseder.markAsSuperseder(this); // 自動的に逆参照を生成
}
private markAsSuperseder(superseded: Adr): void {
const relation = new AdrRelation(this, "Supersedes", superseded);
this.body.addLinkNoDuplicate(relation.toMarkdown());
}
Backstage も同じ思想で 8 対の双方向 relations を提供 (dependsOn ↔ dependencyOf, partOf ↔ hasPart, ownedBy ↔ ownerOf 等)。 folio で同じパターンを採用すれば、 人間も AI も「片方を編集すれば反対側が自動で同期」 する保証が得られる。
<head> に JSON-LD ブロック埋め込み
<script type="application/ld+json"> で関係性を機械可読化dc:replaces, dc:references, dc:hasPart など W3C 標準語彙を使用folio:depends-on, folio:extends) は @context で別 prefix 化scratch/inventory.json を build 時生成
objects.inv パターンの JSON 版{id, title, summary, status, relations[]} を 1 ファイルに集約folio-link-materialize.py で log4brains 風に双方向化dc:replaces したら、 ADR B 側に dc:isReplacedBy を自動追加extruct.extract(html, syntaxes=['json-ld'], uniform=True) で JSON-LD 抽出specs + relations テーブルに upsertbd 相当)
folio prime: Beads bd prime 相当の context injection (CLI で 1-2k tokens 注入)folio ready: 未解決決定 / 未承認 amendment の列挙folio graph <id>: 指定 spec の dependency 上流 / 下流クエリfolio supersede <old> <new>: 双方向 materialization を CLI 一発で実行| 案 | 方針 | 主な利点 | 主な欠点 | 判定 |
|---|---|---|---|---|
| A | HTML SSoT + DB sync (片方向) | HTML 直接編集可能、 グラフクエリも可能、 P-2 尊重 | sync パイプライン必要、 DB は cache (stale 可能性)、 保守コスト | Phase 2 採用 |
| B | HTML 内 JSON-LD + inventory file (DB なし) | 最もシンプル、 file system のみで完結、 P-1 (simplicity) と整合 | グラフクエリは grep + JSON-LD parse の繰り返し、 scale 限界 | Phase 1 採用 |
| C | 完全 DB 中心、 HTML はビュー生成 | Beads 実証済、 cell-level merge、 distributed | HTML 直接編集禁止 → P-2 と正面衝突、 既存 HTML 移行コスト | 採用しない |
Beads は issue tracker の文脈で Dolt SSoT を採用したが、 folio の core value は異なる:
案 A はこれらを回避しながら DB の利点を享受する妥協案。 Phase 2 で specs が増えてグラフクエリが必要になったときに導入する。
dcterms / schema.org / PROV-O を使う (interoperability)critique で PASS と判定済だが、 Phase 2 (Dolt 統合) 着手前に取得を推奨する nice-to-have の gap が 4 件:
internal/storage/dolt/ 配下の Go ファイル直接読みが必要。CreativeWork / TechArticle 系の文書間関係プロパティisBasedOn, citation, hasPart 等の詳細プロパティが文書間関係表現に使える可能性。 今回は dc:* 語彙を中心に調査したが、 schema.org の補完候補として深掘り余地あり。これらは Phase 2 着手時の設計検討で WebFetch + 追加 researcher spawn で補完予定。 Phase 1 着手には影響しない。
計 117 件。 全ソースは 2026-05-22 に確認。 公式ソース (Anthropic / W3C / DCMI / MS Research / GitHub README / 公式 docs) は 46% を占める。
| # | Title | URL | Source Type |
|---|---|---|---|
| 1 | Beads GitHub repository (steveyegge/beads) | github.com/steveyegge/beads | GitHub README |
| 2 | Restoring Beads Classic — DoltHub Blog | dolthub.com/blog/2026-04-02 | 公式 blog |
| 3 | Beads DeepWiki | deepwiki.com/steveyegge/beads | コミュニティ wiki |
| 4 | Beads Architecture - DeepWiki (Dolt backend) | deepwiki.com/.../5.3-dolt-backend | コミュニティ wiki |
| 5 | Beads Agent Memory - MorphLLM | morphllm.com/beads-agent-memory | 技術 blog |
| 6 | Beads ARCHITECTURE.md | github.com/.../ARCHITECTURE.md | GitHub docs |
| 7 | Beads FAQ.md | github.com/.../FAQ.md | GitHub docs |
| 8 | Beads DOLT.md | github.com/.../DOLT.md | GitHub docs |
| 9 | Beads MOLECULES.md | github.com/.../MOLECULES.md | GitHub docs |
| 10 | Beads CLAUDE_INTEGRATION.md | github.com/.../CLAUDE_INTEGRATION.md | GitHub docs |
| 11 | Beads METADATA.md | github.com/.../METADATA.md | GitHub docs |
| 12 | Dolt Storage Engine — DoltHub Docs | docs.dolthub.com/architecture/storage-engine | 公式 docs |
| 13 | What Is Dolt? — DoltHub Docs | docs.dolthub.com | 公式 docs |
| 14 | How to Version Control a Database — DoltHub Blog | dolthub.com/blog/2026-01-07 | 公式 blog |
| 15 | Schema.org Documentation | schema.org/docs/documents.html | 公式 標準 |
| 16 | DCMI: Replaces property | dublincore.org/.../replaces/ | W3C 標準 |
| 17 | Dublin Core to PROV Mapping — W3C | w3.org/TR/prov-dc/ | W3C 標準 |
| 18 | RDF Triple Stores vs Property Graphs — Neo4j Blog | neo4j.com/blog/.../rdf-vs-property-graphs | ベンダー blog |
| 19 | Neo4j Cypher Manual Introduction | neo4j.com/docs/cypher-manual | 公式 docs |
| 20 | Schema.org: Evolution of Structured Data — ACM Queue | queue.acm.org/detail.cfm?id=2857276 | 学術 |
| 21 | Property Graph vs RDF Triple Store — PLOS One | journals.plos.org/plosone | 学術 |
| 22 | Datasette Agent — Simon Willison | simonw.substack.com/.../datasette-agent | 技術 blog |
| 23 | Text2Cypher arxiv 2412.10064 | arxiv.org/html/2412.10064v1 | 学術 |
| 24 | DITA OASIS specification | docs.oasis-open.org/dita | 公式 標準 |
| 25 | sqlite-schema-viz | github.com/paulsmith/sqlite-schema-viz | GitHub tool |
| # | Title | URL | Source Type |
|---|---|---|---|
| 26 | sphinx.ext.intersphinx | sphinx-doc.org/.../intersphinx.html | Official docs |
| 27 | sphobjinv objects.inv v2 Syntax | sphobjinv.readthedocs.io | Project docs |
| 28 | sphinx/util/inventory.py source | github.com/sphinx-doc/sphinx | Source code |
| 29 | Sphinx Domain API | sphinx-doc.org/.../domainapi.html | Official docs |
| 30 | DocFX Links and Cross References | dotnet.github.io/docfx | Official docs |
| 31 | Antora Xref Macros | docs.antora.org/antora | Official docs |
| 32 | Antora content-catalog.js source | gitlab.com/antora/antora | Source code |
| 33 | MkDocs Link Validation (DeepWiki) | deepwiki.com/mkdocs-ng | DeepWiki |
| 34 | docusaurus brokenLinks.ts source | github.com/facebook/docusaurus | Source code |
| 35 | Hugo Link render hooks | gohugo.io/render-hooks/links | Official docs |
| 36 | Obsidian MetadataCache | docs.obsidian.md/.../MetadataCache | Official docs |
| 37 | Obsidian resolvedLinks | docs.obsidian.md/.../resolvedLinks | Official docs |
| 38 | obsidian-backlink-cache plugin | github.com/mnaoumov/obsidian-backlink-cache | GitHub |
| 39 | Foam PR #83 graph refactor | github.com/foambubble/foam/pull/83 | GitHub PR |
| 40 | Logseq Database Schema (DeepWiki) | deepwiki.com/logseq/logseq | DeepWiki |
| 41 | Logseq datascript schema gist | gist.github.com/tiensonqin | Gist |
| 42 | Logseq path-refs forum | discuss.logseq.com/.../path-refs | Forum |
| 43 | Roam Data Structure Deep Dive | zsolt.blog/.../Roam-Data-Structure | Tech blog |
| 44 | MediaWiki Pagelinks table | mediawiki.org/.../Pagelinks_table | Official docs |
| 45 | MediaWiki Linktarget table | mediawiki.org/.../Linktarget_table | Official docs |
| 46 | MediaWiki LinksUpdate.php source | doc.wikimedia.org/.../LinksUpdate | Source docs |
| 47 | MediaWiki RefreshLinksJob | mediawiki.org/.../RefreshLinksJob | Official docs |
| 48 | DokuWiki devel:metadata | dokuwiki.org/devel:metadata | Official docs |
| 49 | DokuWiki Indexing (DeepWiki) | deepwiki.com/dokuwiki/dokuwiki | DeepWiki |
| 50 | DokuWiki indexer.php source | github.com/dokuwiki/dokuwiki | Source code |
| # | Title | URL | Source Type |
|---|---|---|---|
| 51 | Best practices for Claude Code | code.claude.com/docs/en/best-practices | Anthropic 公式 |
| 52 | Contextual Retrieval — Anthropic | anthropic.com/news/contextual-retrieval | Anthropic 公式 |
| 53 | Claude Code Doesn't Index Your Codebase | vadim.blog/claude-code-no-indexing | Tech blog |
| 54 | Effective context engineering — Anthropic | anthropic.com/engineering/...context | Anthropic 公式 |
| 55 | Equipping agents with Agent Skills — Anthropic | anthropic.com/engineering/...skills | Anthropic 公式 |
| 56 | Claude Skills Solve the Context Window Problem | tylerfolkman.substack.com | Tech blog |
| 57 | GraphRAG — Microsoft Research | microsoft.com/.../graphrag | MS Research 公式 |
| 58 | LazyGraphRAG — Microsoft Research | microsoft.com/.../lazygraphrag | MS Research 公式 |
| 59 | GraphRAG vs LazyGraphRAG | dev.to/.../graphrag-vs-lazygraphrag | Community blog |
| 60 | Knowledge Base vs Knowledge Graph 2026 | kloia.com/blog/...kg-llm | Tech blog |
| 61 | Implementing Contextual Retrieval | medium.com/.../contextual-retrieval | Tech blog |
| 62 | LlamaIndex Index Types Guide | developers.llamaindex.ai | LlamaIndex 公式 |
| 63 | DocumentSummaryIndex — LlamaIndex | llamaindex.ai/blog/.../summary-index | LlamaIndex 公式 |
| 64 | GraphRAG v2 with LlamaIndex | developers.llamaindex.ai/.../graphrag_v2 | LlamaIndex 公式 |
| 65 | Cursor Codebase Indexing | cursor.com/docs/context/codebase-indexing | Cursor 公式 |
| 66 | How Cursor Actually Indexes Your Codebase | towardsdatascience.com/.../cursor-indexes | Tech blog |
| 67 | claude-context (zilliztech) | github.com/zilliztech/claude-context | GitHub |
| 68 | HyDE | emergentmind.com/.../hyde | Research summary |
| 69 | Better RAG with HyDE — Zilliz | zilliz.com/learn/.../hyde | Vendor blog |
| 70 | Knowledge Graphs vs RAG 2026 | atlan.com/know/.../kg-vs-rag | Industry blog |
| 71 | CLAUDE.md Configuration Hierarchy | agentfactory.panaversity.org | Tutorial |
| # | Title | URL | Source Type |
|---|---|---|---|
| 72 | log4brains AdrStatus.ts | github.com/thomvaill/log4brains/.../AdrStatus.ts | Source code |
| 73 | log4brains AdrRelation.ts | github.com/.../AdrRelation.ts | Source code |
| 74 | log4brains Adr.ts | github.com/.../Adr.ts | Source code |
| 75 | MADR full template | github.com/adr/madr/.../adr-template.md | Public template |
| 76 | MADR ADR-0013 YAML frontmatter | adr.github.io/madr/.../0013-yaml | 公式 ADR |
| 77 | MADR ADR-0009 Links between ADRs | adr.github.io/madr/.../0009-links | 公式 ADR |
| 78 | mkdocs-material-adr | github.com/Kl0ven/mkdocs-material-adr | OSS |
| 79 | ArchUnit User Guide | archunit.org/userguide | 公式 docs |
| 80 | Spectral Create a Ruleset | docs.stoplight.io/.../spectral/ruleset | 公式 docs |
| 81 | Spectral GitHub | github.com/stoplightio/spectral | OSS |
| 82 | Specmatic Contract Testing | docs.specmatic.io/.../contract_testing | 公式 docs |
| 83 | Specmatic MCP Server | github.com/specmatic/specmatic-mcp-server | OSS |
| 84 | Backstage Catalog Descriptor Format | backstage.io/docs/.../descriptor-format | 公式 docs |
| 85 | Backstage Creating the Catalog Graph | backstage.io/docs/.../catalog-graph | 公式 docs |
| 86 | Backstage ADR005 Catalog Core Entities | backstage.io/docs/.../adrs-adr005 | 公式 ADR |
| 87 | IETF RFC Process | ietf.org/process/rfcs | 公式仕様 |
| 88 | IETF Datatracker | datatracker.ietf.org | 公式ツール |
| 89 | Diátaxis Framework | diataxis.fr | Framework |
| 90 | log4brains public ADR site | thomvaill.github.io/log4brains/adr | Public site |
| # | Title | URL | Source Type |
|---|---|---|---|
| 91 | HTML Microdata (W3C) | w3.org/TR/2017/WD-microdata | W3C 標準 |
| 92 | Google Structured Data | developers.google.com/.../structured_data | Google 公式 |
| 93 | extruct (Scrapinghub) | github.com/scrapinghub/extruct | OSS |
| 94 | Microdata vs JSON-LD vs RDFa 2026 | rishikc.com/articles/structured-data | Tech blog |
| 95 | Microdata vs RDFa vs JSON-LD | structured-context.com | Tech blog |
| 96 | Scrape JSON-LD with extruct | hackersandslackers.com/.../json-ld | Tutorial |
| 97 | TechArticle (schema.org) | schema.org/TechArticle | schema.org 公式 |
| 98 | JSON-LD vs Microdata vs RDFa 2026 | schemavalidator.org/.../microdata-vs-json-ld | Tech guide |
| 99 | meta HTML element (MDN) | developer.mozilla.org/.../meta | MDN 公式 |
| 100 | JSON-LD 1.1 (W3C) | w3.org/TR/json-ld11 | W3C 標準 |
| 101 | JSON-LD spices up SSG | chen4119.me/.../json-ld-ssg | Tech blog |
| 102 | JSON-LD Tutorial 2026 | squin.org/.../json-ld-tutorial | Tutorial |
| 103 | Sambal (JSON-LD SSG) | sambal.dev/about | Project site |
| 104 | data-* attribute (MDN) | developer.mozilla.org/.../data-* | MDN 公式 |
| 105 | Single source of truth (Wikipedia) | en.wikipedia.org/wiki/Single_source_of_truth | Reference |
| 106 | lychee | github.com/lycheeverse/lychee | OSS |
| 107 | lychee-action | github.com/lycheeverse/lychee-action | OSS |
| 108 | htmltest | github.com/wjdp/htmltest | OSS |
| 109 | muffet | github.com/raviqqe/muffet | OSS |
| 110 | Link checking benchmarks | wellshapedwords.com/.../benchmarks | Tech blog |
| 111 | hyperlink (untitaker) | github.com/untitaker/hyperlink | OSS |
| 112 | html-proofer | github.com/gjtorikian/html-proofer | OSS |
| 113 | mlc (Markup Link Checker) | github.com/becheran/mlc | OSS |
| 114 | Azure SDK broken link detection | devblogs.microsoft.com/.../broken-link | MS 公式 blog |
| 115 | API Schema Drift Tools 2026 | dev.to/.../api-schema-drift | Tech blog |
| 116 | oasdiff | oasdiff.com | Project site |
| 117 | MyST Cross-references | myst-parser.readthedocs.io/.../cross-referencing | 公式 docs |
c3c53fbb (snapshot: /tmp/research-search-c3c53fbb/)/research:controller-search (deep モード) — Plan → Parallel Research (5 workers) → Integrate → Critique → Report の 5 段階scratch/research/ 配下の調査資料。 folio rule に縛られない自由形式。 試作 plugin が完成したら archive 候補。