Ghost-ALICE OS

Session Gate Matrix

언어: 🇺🇸 English 🇰🇷 한국어

session gate SSOT는 skill-catalog/session-gates.json이다. 이 문서는 human-readable matrix다.

Contents

Required Entrypoints

Situation Required entrypoint
모든 user input의 first intake session-intent-analyzer
session-intent intake와 jailbreak-detector downstream gate 이후, downstream work/tool calls 전 첫 agent routing step task-router
development/coding request coding-convention/using-coding-convention
bug fix coding-convention/systematic-debugging
production code change coding-convention/test-driven-development
executed work가 complete, fixed, successful, freshly verified라고 claim하는 final response coding-convention/verification-before-completion
commit/push 직전 coding-convention/finishing-a-development-branch
새 task, sub-task, follow-up item 정의 시 necessity-gate
task-router가 boundary-contract: required를 route한 직후 boundary-contract

Turn Routing Contract

session-intent-analyzer intake가 first다. pending-merge precheck 이후 session-intent-analyzer는 skill-evolution (report-only terminal branch)와 jailbreak-detector로 fan out한다. current-lineage block gate가 없으면 session-intent preflight 뒤 task-router가 release된다. allow turn에서는 downstream-gates.json이 없을 수 있으며, current-lineage model block이 기록되지 않았다면 그 absence는 silent allow다. flow를 task-router → session-intent-analyzer, linear session-intent-analyzer → skill-evolution → jailbreak-detector → task-router chain, 또는 jailbreak-detector downstream gate를 bypass하는 task-router로 설명하면 contract violation이다.

task-router는 일이 커 보일 때만 쓰는 classifier가 아니다. user input이 감지된 모든 turn에서 session-intent-analyzer intake와 jailbreak-detector downstream gate 이후, downstream work 또는 tool call 전에 적용한다.

task-routersession-intent-analyzerjailbreak-detector/downstream-gates.json context의 consumer이며 agent-side request decomposition step이다. user-input intake, raw intent inference, ledger updates, jailbreak decisions, downstream gate state, tool permission을 소유하지 않는다.

task-router reminder hook은 session-intent preflight가 존재하고 current-lineage block check가 run될 수 있을 때까지 task-router를 withhold해야 한다. current-lineage block gate가 없으면 absent downstream-gates.json은 silent allow다. release 이후 task-router는 session intent ledger를 읽고 atomic meaning decomposition을 수행한 뒤 output, verification, lifecycle, boundary skills를 assign한다.

다음은 모두 fresh routing targets다.

previous turn이 routed 됐다는 사실은 next turn의 evidence가 아니다. hook payload가 current platform pending-merge precheck가 run됐고 pending warning이 없다는 contract를 제공하면 merge-companion-precheck: clean (hook-verified)를 기록하고 shell manifest check를 반복하지 않는다. hook evidence가 없거나 hookless/manual environment일 때만 current platform manifest를 직접 읽는다.

runtime smoke는 docs/ko/policies/live-smoke-regression.md를 따른다. 이 procedure는 동일한 README first 10 lines input을 Claude Code, Codex, Antigravity로 보내 task-router, verification-before-completion, concise tool-checkpoint failure surface, skill activation permission signal을 관찰한다.

Session Intent Ledger Contract

session-intent-analyzer는 모든 user input마다 session intent ledger를 update한다. Hooks는 input digest와 event metadata만 저장하며 raw prompts는 절대 저장하지 않는다. user goal, constraints, decisions, non-goals가 바뀌면 agent는 compressed delta를 intent-state.json에 기록한다.

intent-state.json은 update-plus-accumulate state다. current_goal, user_intent_summary 같은 latest scalar intent fields는 newer semantic deltas로 replace되고, constraints, non-goals, open questions, acceptance criteria, consumer hints, active decisions 같은 list-like fields는 stable identity 또는 deduped value로 merge된다. intent-events.jsonl은 append-only audit metadata이며 raw prompt transcript가 아니다.

First-entry intake invariant:

Runtime Hook Graph Contract

pending-merge precheck는 user-input governance graph가 시작되기 전에 run한다. 이는 pre-routing/session-start layer이며 session-intent-analyzer, skill-evolution, jailbreak-detector, tool-checkpoint가 여는 downstream gate가 아니다. undecided entry가 있으면 runtime은 merge-companion을 먼저 surface해야 하지만 user-explicit defer/skip은 해당 entry를 undecided로 남긴 채 계속 진행할 수 있다.

pending-merge precheck가 clean이거나 user가 명시적으로 defer한 뒤 user-input governance graph는 user intent first, downstream gate state second, tool-stage tool-checkpoint third 순서로 정렬된다.

tool-checkpoint는 PreToolUse/BeforeTool checkpoint이며 user-input intake order의 일부가 아니다. surfaced될 때 visible control schema에는 hook-stage: PreToolUsemeaning: tool-call retry checkpoint, not user-input intake가 함께 있어야 한다.

  1. user input은 every turn에서 session-intent-analyzer를 trigger한다. hook은 input digest, session ledger, current-session.json pointer를 쓰고 agent turn을 allow한다.
  2. skill-evolutionjailbreak-detector는 platform과 session id로 keyed된 같은 session temp files를 consume한다. skill-evolution은 report-only and self-terminating이며 downstream gates를 open/close하지 않고 task-router로 feed하지 않는다.
  3. jailbreak-detector는 ledger에 model_security_decision을 기록하고 current-lineage block decisions만 downstream gateway인 downstream-gates.json으로 carry한다. deterministic hard-block rules는 explicit high-confidence attack signals에 대한 narrow regression guards이며 모든 jailbreak attempts를 block한다는 proof가 아니다. gate block은 deterministic text matching이 아니라 model-recorded judgment (model_security_decision)에서만 derive된다. gradual multi-turn jailbreak resistance는 session-intent summary quality와 cumulative constraint comparison에 달려 있다. current-lineage block gate가 있으면 tool execution은 tool-shape review 전에 deny된다. current block gate가 없으면 absent downstream-gates.json은 silent allow다.
  4. task-router reminder hook은 session-intent preflight가 존재하고 current-lineage block check가 first chance를 가질 때까지 기다린다. opened=false 또는 decision=block인 current-lineage block gate가 있으면 task-router를 withhold하고, absent downstream-gates.json은 silent allow다. release 이후 task-router가 current-session pointer와 session intent ledger를 읽고 accepted intent를 atomic meaning units로 decompose한 뒤 output, verification, lifecycle, boundary skills를 assign한다. raw user intent를 infer하거나 tool permission을 decide하지 않는다.
  5. tool-checkpoint는 session-intent-analyzer intake와 jailbreak-detector downstream gate가 first chance를 가진 뒤 tool stage에서 run한다. missing intake evidence는 bootstrap/recovery를 시작할 이유이지 task-routersession-intent-analyzerjailbreak-detector보다 앞세울 이유가 아니다. runtime decision은 current-lineage block gate만 읽는다. opened=false 또는 decision=block이면 deny하고, absent gate 또는 다른 state는 silently allow한다. tool-call identity, payload content, audit/log/correlation metadata는 decision inputs가 아니다. audit/log/correlation metadata는 decision path 밖에 둔다.

Dynamic Focus Contract

Dynamic focus control은 session gate contract의 일부다. work는 semantic atoms로 나뉘지만 attention scope는 고정되지 않고 한 방향으로만 expand하지 않는다. user interaction, mismatch location, verification burden, recovery cost는 current focus를 micro, meso, macro, meta layers 사이에서 이동시킬 수 있다.

mismatch가 나타나면 runtime procedure는 cause를 포함하는 가장 작은 layer를 reopen한다. larger premise 또는 integrated logic이 틀렸으면 macro 또는 meta를 repair한다. atomic output 또는 local sub-task가 틀렸으면 micro 또는 meso를 repair한다. calls는 static and sparse 상태로 남으며 repeated focus movement, scope reopen point handling, re-verification loops는 procedure와 runtime verification에 속한다.

Work-Impact Projection Contract

Work-Impact Projection은 hook-internal value를 다음 work decision을 바꾸는지 기준으로 분류한다. value는 work boundary, focus layer, verification burden, recovery path를 바꿀 수 있을 때 중요하다.

Runtime Checkpoints

Ghost-ALICE OS documents는 English canonical narrative + English control surface를 default coordination contract로 사용한다. reader-facing documentation tree가 pair를 expose하는 곳에는 Korean paired counterpart를 둔다. field names, enum values, literal tokens, gate schemas, allowed/forbidden values는 English로 유지하고 번역하지 않는다.

first commentary는 다음 block을 포함해야 한다.

[gate-state]
- merge-companion-precheck: clean | pending=N | unsupported
- session-intent-analyzer: done | hook-observed | pending
- task-router: done
- using-coding-convention: done | n/a
- boundary-contract: required | done | n/a
- skill-call: session-intent-analyzer (this turn); task-router (this turn); using-coding-convention (this turn) | n/a
- next-required: <skill-name|none>

final response가 executed work의 complete, fixed, successful, freshly verified 상태를 claim할 때 다음 block을 포함해야 한다.

[completion-check]
- verification-before-completion: done
- skill-call: verification-before-completion (this turn)
- acceptance-criteria:
  - <criterion-id>: <user-intent-or-contract-condition> [source: user-explicit | inferred | previous-tool | system-doc]
- claim-evidence-map:
  - claim: <completion-or-recommendation-claim>
    criterion: <criterion-id>
    evidence: <fresh command, inspected file, source locator, or tool output>
    verdict: pass | fail
- unverified:
  - none
- evidence: <fresh command or inspected file>

acceptance-criteria는 user intent, locked decisions, boundary-contract에서 추출한 verifiable criteria다. claim-evidence-map은 closure claim을 criterion과 fresh evidence에 연결한다. unverifiednone이 아니면 completion 또는 success가 settled된 것처럼 말하지 않는다. finalized [completion-check]verdict: pass | failunverified: none을 사용한다. unverified item이 있으면 finalizing하지 말고 prose로 partial state와 remaining verification을 보고한다. Installed Stop completion hooks는 executed-work closure claim에 [completion-check]를 요구하고 routine non-closure response는 allow한다.

Hard sequence: skill load/call -> fresh verification -> [completion-check]. executed work가 complete, fixed, successful, freshly verified라고 claim하기 전에는 current turn에서 verification-before-completion을 load/call하고, fresh verification을 run/read한 뒤에만 skill-call: verification-before-completion (this turn)가 있는 [completion-check]를 쓴다. If any step is missing or out of order, the completion-check is invalid.

skill-call: line은 그 skill workflow가 current turn에서 실제로 실행됐다는 record다. Claude Code에서는 visible Skill call 이후에만 쓴다. Codex처럼 visible Skill tool이 없는 환경에서는 current turn에 해당 skill의 SKILL.md를 실제로 읽고 workflow를 따른 뒤에만 쓴다.

verification-before-completion은 executed-work closure claim 전 lifecycle gate다. Routine explanations, meta-discussion, options는 finished work 또는 verified result를 claim하지 않는 한 이 gate를 요구하지 않는다. Claude Code 같은 visible skill surface에서는 actual call 전 [completion-check]skill-call: verification-before-completion (this turn)를 쓰지 않는다. Codex에서는 해당 SKILL.md를 실제로 읽고 workflow를 따른 경우에만 쓴다.

[completion-check]skill-call: verification-before-completion (this turn)를 claim하면 같은 final response의 [io-trace] skills-loadedverification-before-completion을 포함해야 한다. Stop completion hook이 final response를 validate하는 곳에서는 이 mismatch 또는 missing [completion-check]가 retry loop를 만들 수 있다.

Codex environments without a visible Skill surface:

tool-checkpoint Visible Surface

tool-checkpoint는 PreToolUse/BeforeTool checkpoint다. user-input intake order의 일부가 아니며 session-intent-analyzer, jailbreak-detector, task-router보다 먼저 run한다고 설명하면 안 된다.

default [tool-checkpoint] block은 intentwhy를 carries한다. procedure는 next work decision을 바꾸거나 non-routine step을 명확히 할 때 추가한다. contract-refcontract-check는 boundary-contract가 active일 때 추가한다. localized-human-note, rejected-alternatives, unverified-premises, failure-mode-if-wrong은 side effect, forced signal, mismatch, meaningful user decision point 때문에 field가 useful할 때만 추가한다. 이렇게 checkpoint procedure는 유지하되 work boundary, focus layer, verification burden, recovery를 바꾸지 않는 low-impact tool call에 무의미한 값을 반복하지 않는다.

recovery-action은 conditional이다. failure mode가 concrete recovery step, scope reopen, external side effect handling, 또는 hard-to-recover action을 요구할 때만 추가한다. stable English action phrase 또는 slug로 유지한다. mismatch가 scope를 바꾸면 procedure 또는 recovery-actionfocus-layerscope-reopen target을 적는다.

routine tool checkpoint에서는 별도의 recovery-cost 또는 recovery-note fields를 요구하지 않는다. Recovery cost는 work-impact projection, verification planning, high-impact exception handling에 속하며, every PreToolUse message에 속하지 않는다. human-facing recovery explanation은 operator의 next decision을 바꿀 때만 localized-human-note 또는 conditional recovery-action에 둔다.

tool-checkpoint Batch / Continuation Compression

Runtime hook은 session input lineage마다 full [tool-checkpoint]를 한 번 surface하고, 같은 lineage의 later tool call은 계속 check하되 user-facing text는 반복하지 않는다.

[tool-checkpoint:batch][tool-checkpoint:continuation]은 repeated full-gate cost를 줄이는 compact forms다. new permission을 만들지 않고 new tool action이 safe하다고 infer하지 않는다.

[tool-checkpoint:continuation]은 same process/session/tool-call id의 output polling만 가리킨다. new user input, current-lineage block/deny, mismatch, other state change는 surfaced [tool-checkpoint]로 돌아간다.

same ref의 simple polling은 output을 영원히 반복하라는 의무가 아니다. compact form은 full gate 반복을 피한다. input lineage의 first poll 또는 state change 때 expose한다.

Notes