ADR-0021 で constitution を layout 不変化 (P-7 で 3-domain を抽象 model として固定、 dir 名は self-spec §2 / rules §2 へ委譲、 P-13 で HOW/verification を design-intent 空間外と明示) した結果、 具体 layout を確定する責務が self-spec §2 / rules §2 に移った。 X4-0 はこの canonical layout を確定する (試作卒業 = scratch → 完成形 layout への移行の前提)。
確定すべき論点 (x4-plan §3) は amendment + dig で resolve 済: ① folio 自身が canonical 構造を self-host するか + framework-core (constitution/rules/self-spec) の配置 (F1) ② design-intent 3-domain に属さない Diátaxis (howto/tutorial/explanation) + Kiro steering/ の扱い (F3) ③ 自動修正 CLI 命名 fix vs doctor (F4) ④ verification 実体の配置 (sibling) ⑤ spec_path の location override (Q3)。 user 承認は AskUq (F1/F3/F4 + Q3) で取得済。
folio (Layer 0) は自身の rules を self-hostし、 consumer (Layer 1) と同一の canonical 構造を採る:
architecture/ # design-intent 空間 (declarative、 constitution P-7 の 3-domain)
├── spec/ # design intent (WHAT)
├── decisions/ # decision (WHY、 ADR)
├── research/ # exploration
└── assets/ # mermaid 等 vendor (support、 domain でない)
verification/ # HOW-test (architecture/ の sibling、 executable、 P-3/P-11)
<harness or impl> # HOW-impl: folio=.claude-plugin/+hooks/ / consumer=src/ 等
| fork | 確定 |
|---|---|
| F1 framework-core 配置 | constitution / rules / folio-self-spec / relations / verification を architecture/spec/ に flat 配置。 folio が完全に self-host し consumer の architecture/spec/constitution.html と self-consistent。 |
| F3 Diátaxis + steering | canonical から除去 (triad に絞る)。 spec/decisions/research + verification のみ folio govern。 一般 docs (tutorial/howto/explanation) + AI-context (steering) は consumer の自由領域 (folio 非 govern)。 explanation は decision と重複、 tutorial/howto は spec でないため。 |
| F4 自動修正 CLI 命名 | fix (doctor 不採用)。 ADR-0003 + bin/folio help に整合、 validate (検出) の対として直感的。 |
| verification 実体配置 | architecture/ の sibling の verification/ (executable HOW、 design-intent 空間外)。 契約 (verification.html) は architecture/spec/。 |
| spec_path (Q3) | architecture/spec/ を canonical default、 物理 location は folio.config.yaml で override 可。 folio 自身の self-host 時は architecture/spec/。 |
本 ADR の適用 = spec への canonical layout 反映 (PARENT): folio-self-spec §2 (Layer 0 layout tree + 図 2 mermaid を architecture/{spec,decisions,research} + verification sibling へ rework、 CLI doctor→fix)、 rules §2 (consumer layout から Diátaxis/steering 除去、 3-domain + verification sibling 反映)、 constitution §7 Citations narrowing (Kiro steering 言及除去)。 物理移動 (scratch→architecture) と実装更新 (bin/folio scan dir、 scripts/plugin.json spec_path、 golden 再生成) は X4-C (SPAWN + feature-dev)。 X4-0 完了時点では spec が canonical target を記述し、 物理実体は scratch のまま (P-1 未来理想 anchor、 X4-C で追従)。
| 案 | 採用可否 |
|---|---|
| F1: framework-core を architecture/spec/ flat (採用) | folio 完全 self-host、 consumer と self-consistent、 最もシンプル |
| F1 alt: constitution のみ architecture/ root / framework-core を repo root 維持 | 不採用 — root 維持は folio が architecture/ を完全 self-host しない非対称を生む。 flat が一意性に最も寄与 |
| F3: Diátaxis/steering を triad 外 optional / spec sub として残す | 不採用 — tutorial/howto は architecture spec でなく、 explanation は decision と重複。 folio core は triad に絞り consumer の docs 自由度を尊重 |
| F4: doctor | 不採用 — ADR-0003 + bin/folio help が既に fix。 doctor 採用は既存 trace の書換要 |
| verification を architecture/verification/ 配下に domain 化 | 不採用 — executable HOW を declarative design-intent 空間に混在させ TDD 的混乱 (P-3/P-11)。 sibling が正 |