chat-Claude 2026-08-31: 「IRさえ書ければエージェントは不要なので、 connector-inventory や comparator の 出力 JSON から IR を 機械的に 生成する経路が 作れます。 それができれば 完全に ローカル・無料・LLM なしで 図が 出ます」
本 STEP 1648 で 実装: rei-aios comparator harvest_lag report (data/comparator/harvest-lag-latest.json、 STEP 1626 v1.0 gauge) を 入力に、 Archify architecture IR を 決定的に emit。 判定経路に LLM なし、 変換規則は 全て src/archify-emit/emit-harvest-lag.ts に code として 座る (chat-Claude 「著作物ではなく 被測定を 測った結果」 の 実装条件 満たすため、 SRC evidence mode = repository URL + 40-hex commit SHA + component 単位 file:line pin を 前提化)。
| File | 役割 | Side effect |
|---|---|---|
src/archify-emit/types.ts | Archify IR TS types (schema authoritative subset)、 id/SHA regex validator | なし |
src/archify-emit/src-evidence.ts | getEvidenceContext() = git rev-parse HEAD + status --porcelain で dirty-tree 検知、 makeSource() helper | git subprocess (read-only) |
src/archify-emit/emit-harvest-lag.ts | emitHarvestLagIR({report, cwd?}) = 7 component + 8 connection + 2 boundary + 3 view IR 生成、 決定的 (input 同一 → output byte-identical) | なし (git 呼出は src-evidence 経由のみ) |
src/archify-emit/index.ts | Public re-export | なし |
scripts/archify-emit/emit-harvest-lag.ts | CLI runner: latest.json 読取 → IR 出力 + honest-scope.txt 併記 | fs write (data/archify-ir/) |
Authoritative schema: architecture.schema.json + common.schema.json (2026-09-01 fetch、 gh api 経由 raw content)。
本 emitter で 満たしている 制約:
schema_version: 1 (const)diagram_type: "architecture" (const)meta.title 必須 = "harvest_lag gauge pipeline — v1.0-oracle-ok-nullable-scope-note"meta.repository.url = GitHub URL pattern 適合 / meta.repository.revision = 40-hex commit SHA (isValidCommitSha validator)components[].id = ^[a-zA-Z][a-zA-Z0-9_-]*$ pattern (isValidArchifyId validator、 全 7 component check pass)components[].type = enum frontend | backend | database | cloud | security | messagebus | external の subset (external / backend / security / cloud / database の 5 種 使用)components[].sources[] = SRC evidence pin (file path + optional line/end_line/label)boundaries[].kind = region | security-group (両方 使用)connections[].variant = default | emphasis | security | dashed (4 種のうち 3 種 使用、 retention-skip は dashed)meta.views[] = ≤5 (3 view 定義)meta.title: harvest_lag gauge pipeline — v1.0-oracle-ok-nullable-scope-note meta.subtitle: arxiv-recent × 9 feeds → arxiv-api oracle → 5-verdict emitter meta.repository: https://github.com/fc0web/rei-aios meta.revision: 535ee3f02c8b87133e11152f8fbf3a573ba77f86 (Archify verify 対象) visual_preset: signal-flow animation: trace components (7): feed-source (external) arxiv-recent × 9 feeds harvester (backend) ← SRC scripts/comparator/run-harvest-lag-v02.ts + gauges/harvest_lag_v02.ts:196-210 retention-gate (security) ← SRC gauges/harvest_lag_v02.ts:238-240 (retentionOk gate) oracle-arxiv-api (cloud) ← SRC scripts/comparator/lib/oracle-arxiv.ts (createArxivOracle) comparator (backend) ← SRC gauges/harvest_lag_v02.ts:245-300 (windowCompared derivation) verdict-emitter (backend) ← SRC gauges/harvest_lag_v02.ts:240-355 (verdict decision table) sink-latest-json (database) ← SRC data/comparator/harvest-lag-latest.json connections (8): feed-source → harvester "publish" harvester → retention-gate "internal IDs" retention-gate → oracle-arxiv-api "oracle window (if retentionOk)" [emphasis] retention-gate → verdict-emitter "skip → N/A (if retention short)" [dashed] ← STEP 1626 v0.9 短絡 oracle-arxiv-api → comparator "external IDs" harvester → comparator "top-N internal" comparator → verdict-emitter "diff" verdict-emitter → sink-latest-json "report JSON" boundaries (2): region "Measurement pipeline" wraps harvester/retention-gate/comparator/verdict-emitter security-group "Oracle domain (external)" wraps oracle-arxiv-api views (3): happy-path 6 focus ids "retentionOk → oracle → 5-verdict emit" retention-skip 4 focus ids "retention short → oracle skipped → verdict N/A (8/9 feeds at report time)" provenance 3 focus ids "source → harvester → sink JSON (input & output traceable)" SRC evidence: 8 source refs across components
| Section | 内容 | 件数 |
|---|---|---|
| 1. type validators | isValidArchifyId (5 pass/fail cases) + isValidCommitSha (5 cases) | 12 |
| 2. src-evidence | getEvidenceContext (live git + dirty detection) + makeSource helper (line/end_line/label) | 10 |
| 3. emit against real report | schema_version + diagram_type + meta.title / repository / preset / component 7 全て存在 | ~20 |
| 4. connection integrity | 各 connection の from/to が valid id、 variant enum、 dashed 分岐 (retention-skip) 検出 | ~18 |
| 5. views (≤5) | 3 view 全て id/focus/note、 focus ids は component id で存在 | ~15 |
| 6. boundaries wrap valid | 2 boundary、 kind enum、 wraps 全 id が component 存在 | ~10 |
| 7. honest scope + dirty-tree honesty | ≥5 items、 schema/render 制限 mention | ~5 |
| 8. determinism | 同一 input で byte-identical output (JSON stringify 比較) | 3 |
| 9. synthetic edge cases | empty perFeed / all-N/A report で tag が counts 反映 | ~15 |
Total: 108 pass / 0 fail。 実行: npm run test:step1648。 STEP 1639 (88/88) + STEP 1644 (52/52) regression clean。
chat-Claude 2026-08-31: 「READMEが明示しているとおり、 reach やルートは 『authored (書かれた通り)』 であって、 コードから 検証されたものではありません。 (中略) SRC マーク付きの evidence モードだけが commit 固定の ソース参照を 持ちます。 つまり既定では、 この図は 被測定を 測った結果ではなく、 著作物です」
本 emitter の discipline:
getEvidenceContext() が git rev-parse HEAD で 実 SHA を 取得、 40-hex validator 通過 のみ IR 出力可npx skills add tt-a1i/archify -g or clone + node bin/archify.mjs deliver で render 検証可、 chat-Claude 「npx installer 通す必要は ない (archify.zip 同梱)」 忠告 通り clone 経路推奨node bin/archify.mjs validate/preview/deliver data/archify-ir/harvest-lag-latest.architecture.json で 実 HTML 確認、 schema validation の runtime pass も 副次的に verify 可