Repository navigation
perf: 人間操作の節の末尾段落を畳み、台帳の2本の参照を1行にまとめる - #5391
Merged
Merged
Conversation
毎ターン文脈に積まれ続ける固定文の字数を減らす。 - 人間操作の節の判断基準の段落(約200字)を fixed() にする。操作の内容は毎回出す。要約・会話の変更・観測なしでは全文へ戻る(#4937 の控えのまま)。 - 台帳の断り書きは、閉じ方の参照と末尾の参照が両方とも参照になる回だけ、末尾の1行にまとめる(指し先は commitment_list と commitment_close のまま)。どちらかが全文の回は従来どおり。 - 試験: 人間操作の末尾段落の1回目全文・2回目参照・要約後全文、統合した参照行の文面と指し先。
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
クローンの費用の大半はキャッシュ読み(毎ターン文脈に積まれ、以後のターンで読み直され続ける文字数)。畳み込み(
DigestSessionDelta.fixed)が無く毎回全文で出ていた固定文を 2 つ畳む。変更(clone.ts、clone-commitment-notice-fold.test.ts)
fixed('human-action-guidance', 全文, 参照)にした。1 回目は全文、同じ会話の 2 回目からは参照。参照には基準の要点 4 つ(ずれた理由を確かめて基準を記憶に書く/取り消されたものを同じ形でやり直さない/分からなければ人間に聞く/経路は監査の記録で人間がした証拠ではない)を短く残した。操作の行・ほか N 件・窓の注記などの可変部は毎回出す。fixed()の呼び出しは統合してもしなくても毎回行うので、全文へ戻る条件は変わらない。DigestSessionDeltaのまま。文言の短縮・言い換えで能力は削っていない(AGENTS.md:45)。効く量(何を測ったか)
fixture で、2 回目以降の該当する文だけの字数:
効きは小さい。 (A) は出る頻度が低く、(B) は重複と見えていた 2 行が実際には枠の部分しか重ならず、これ以上は文言の短縮が要る。1 回の読み直し(約 15 万トークン)に対して 0.1% 未満で、トークン換算・本番頻度は未測定。
倒れ側
(A) 2 回目以降は基準の全文ではなく要点 4 つの参照だけを見る(全文は会話の上に残る。要約で消えれば全文へ戻る)。(B) 統合行から「閉じ方は会話の上と同じ」という言い回しは消えたが、指し先の
commitment_list・commitment_closeは残っている。確認
build・typecheck・lint・format:check と
pnpm testの packages・apps・scripts が通っている。既存試験の更新(assert は弱めていない):commitment_closeが末尾の行を切る関数の外に出たので「入力全体に在る」ことを見る形に、束の試験は「まとめて答えても id ごとにcommitment_close」の文面を見る形にした。boot()は stores を引数で受けられるようにした。docs
docs/ と AGENTS.md に該当記述は無い(grep)。変更していない。