-
-
Notifications
You must be signed in to change notification settings - Fork 0
K. Source File Format
Li+ source ファイル (rules/*.md / skills/*/SKILL.md) の構造的 wrap 形式仕様。AI 側の section boundary detection 強化を目的として、Markdown コンテナ内に semantic tag を埋め込む。
- AI が rule / skill body を読む時の節境界認識を強化する
- compact / resume 後の re-anchoring 精度を上げる
- 節の終わり (markdown では暗黙的、次見出しまでの推測が必要) を明示的に signal する
「文章のまとまり認識」が design intent。AI consumption を主軸、人間 GitHub render は副次。
---
[frontmatter]
---
<rule-name>
# Rule Name
<section-name>
## Section Name
[body content]
</section-name>
<another-section-name>
## Another Section Name
[body content]
</another-section-name>
</rule-name>
- wrap 対象: H1 と H2 のみ
- wrap 対象外: H3 / H4 は plain markdown のまま (H2 wrap 内に nest)
-
tag 配置: opening tag が heading の前 (
<tag>→ 空行 →# headingの順、Option Y) - tag name 生成: heading text を slugify (lowercase, kebab-case, em-dash 等は hyphen に変換または削除)
-
空行: 各
<tag>の後と各</tag>の前に空行 1 行 (GFM type-7 HTML block を 1 行で閉じるため、後続 markdown を正常 render させる) - frontmatter 保持: 既存 YAML frontmatter 不変
- body 内容: 不変 (purely additive wrap)
-
拡張子:
.md維持 (.palへの変更は code-review mode 誤発火のため不可、過去実験で確認)
| heading | tag |
|---|---|
# Operations |
<operations> |
## Evolution Layer |
<evolution-layer> |
## Source Check — Two-Pillar Verify |
<source-check-two-pillar-verify> (em-dash 削除) |
# Characters |
<characters> |
# Li+ Coding Rule |
<li-coding-rule> (+ は slugify で削除) |
-
rules/*.md(全 layer、L1 含む) -
skills/*/SKILL.md(全 layer)
-
adapter/claude/CLAUDE.md/adapter/codex/AGENTS.md— host instruction entrypoint で扱いが異なる -
docs/*.md— heading 構造そのものが思想 doc の load-bearing 要素のため wrap しない - multi-H1 ファイル (例:
skills/operations-on-release/SKILL.mdは H1 が 11 個ある特殊構造) — refactor 後に適用判断
| 候補 | 採否 | 理由 |
|---|---|---|
| PascalCase + H1 削除 | 採用せず | GitHub UI で H1 タイトル喪失 |
<h1> 等の HTML 標準タグ流用 |
採用せず | GFM が実 h1 要素として render、視覚崩壊 |
| 全 heading (H1-H4) wrap | 採用せず | 同名 generic tag (<rules>, <trigger> 等) の同一ファイル内重複、token cost 4 倍 |
| H1+H2 wrap、tag が見出しの前、kebab-case lowercase | 採用 | AI boundary detection 改善 + 人間視覚 H1 維持 + 階層 case consistency |
cross-file での同名 H2 (<trigger>, <position>, <scope> 等) は accepted tradeoff。tag は unique ID ではなく semantic marker、HTML の <div> <section> が文書内で何度も出現するのと同じ位置付け。階層 nest (outer <operations> 等) が context を提供。
PR #1400 で N=3 並列 subagent による readability 比較を実施 (L1 タグなし vs L2+ Option Y タグ付き)。
- 3/3 subagent が タグ付き preference、magnitude "meaningful"
- 最大 gain: boundary detection (closing tag による explicit end signal、markdown の implicit「次見出しまで」推測不要)
- 二番目: re-anchoring (open/close pair で named region chunk、compact 後再読の精度向上)
- citation 軸では大差なし (heading text 直接参照と tag 参照が functionally equivalent)
- cost: 視覚密度 ~15% 増加、初回 linear read で marginal noise、再読・lookup で benefit に反転
詳細は PR #1400 readability test コメント参照。
awk / 同等の slugify script で wrap を機械的に適用。手動で書く場合は本仕様の規約 (H1+H2 wrap、tag が先、kebab-case lowercase、空行 discipline) に従う。
新たな H1 / H2 追加で wrap 構造を維持。H3 / H4 追加は wrap 不要。
wrap は purely additive で revert clean。形式変更が必要な場合は別 PR で全 file 一括変換 (PR #1400 / #1402 のパターン)。
- G. Sheepdog-Engineering — pal / Lilayer 軸定義
- E. Li+language — Li+ source の言語規定
-
rules/model/liplus-coding-rule.md— source language (英語) + 本仕様 cross-ref - PR #1399 (proposal) / PR #1400 (非 L1 実装) / PR #1402 (L1 実装)
この Wiki は、Li+ に基づく開発・運用を支えるための情報整理空間です。
数字で始まるページは、 Li+プログラムの各レイヤーの仕様を定義するページです。
- 要求(何を満たすか)と仕様(どう振る舞うか)を一体として記述する
- 実装前に作成または更新する
- issue群から採用された要件を集約する
これらのページは 安定性と一貫性を重視して管理されます。
アルファベットで始まるページは、 Li+の構想・設定・導入手順などの参照用ページです。
- 設計思想・背景
- 設定リファレンス・インストール手順
これらのページは 必要に応じて更新・拡張されます。
リポジトリ内の rules/**/*.md(L1–L4 の常時ロード分、subdir 含む)、skills/**/SKILL.md(トリガー起動分)、adapter/claude/CLAUDE.md、adapter/claude/hooks-settings.md、adapter/claude/hooks/*.sh、adapter/codex/AGENTS.md、およびルート直下の Li+config.md、Li+update.md は、
AIやランタイムが直接読む実行用プログラム / 定義ファイルです。
-
docs/は人間向けの仕様書・要求仕様・手順書 -
rules/,skills/および adapter / update は実行時に読み込まれる本体
両者は対応しているが、役割は同じではない。
Home | 1. Model | 2. Evolution | 3. Task | 4. Operations | A. Concept
要求仕様書 (1-6)
参考文書 (A-K)
- A. Concept
- B. Configuration
- C. Update
- D. Installation
- E. Li+ language
- F. Behavior-First
- G. Sheepdog Engineering
- H. Roles and Evaluation
- K. Source File Format
判断構造
- Decision Structure
- layer reorg rationale
- github app user-to-server token expiration
- sheepdog engineering concept
- prerelease tag recovery procedure
- release flip drift patterns
- Li+ long-term vision (feedback only)
- Master role as client-architect
- current architecture as concession
- Li+ license Apache-2.0 rationale
- Character_Instance evolution history
- prompt as emotion vector controller
- agentic-search five-phase refactor
- Character_Instance output-styles migration
- Li+ lightening L1 gate override
- subagent state-machine label mechanism
- LSP integration out of scope
- Character_Instance opt-in and surface scope
- parallel-subagent-eval three-axis decomposition
- parallel-subagent-eval cost acceptance
- bootstrap walkthrough skip and gh install relocation
- wiki sync sidebar integrity check
- decision structure rename rationale
- decision structure industry positioning
- subtractive structural beauty framing
- Li+ authorship is collaborative
- Li+ design intent vs current limit
- Li+ history is empirical
- Master verification at runtime not spec
- rules cache fetch address table
- dialogue-evaluator scoring redesign