chore(archive): apply add-scene-awareness spec deltas#115
Merged
Conversation
Applies the spec deltas from add-scene-awareness (#114) into the canonical openspec/specs/ tree: - NEW openspec/specs/scenes/spec.md — full capability spec (Purpose + 3 requirements + 8 scenarios) - MODIFIED specs/cli/spec.md — adds --scene SCENE requirement - MODIFIED specs/event-log/spec.md — adds session_meta requirement - MODIFIED specs/analyze/spec.md — adds session_meta consumer + --for-llm scene context requirements - MODIFIED specs/bluetooth-scanning/spec.md — presence_gate_s default sourced from scene, --ble-presence-gate flag overrides - MODIFIED specs/tui-shell/spec.md — adds subtitle scene chip requirement (EN + ZH formats) Moves the change dir to openspec/changes/archive/2026-05-22-add-scene-awareness/. All artifacts done, all tasks complete, validate --specs --strict green (22/22 — scenes is the 22nd capability). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chenchaoyi
added a commit
that referenced
this pull request
May 22, 2026
Scene awareness. diting now carries an explicit notion of where
the user is right now, threaded through pollers + the JSONL
session header + the LLM prompt bundle.
Four named scenes (home / office / public / audit), each with:
- per-scene BLE presence_gate_s default (home=5s, office=15s,
public=30s, audit=0s)
- per-scene LLM prior injected into --for-llm prompt template
- chip in the TUI title bar showing the active scene
Resolution precedence (5 tiers, highest first):
1. --scene SCENE CLI flag
2. DITING_SCENE env var
3. scenes.yaml SSID / gateway_mac match (per-network pinning,
mirrors aps.yaml pattern, git-ignored, human-curated only)
4. classify_environment heuristic on the active connection
(WPA-Enterprise auth -> office; >= 30 BSSIDs visible ->
office; otherwise home; public stays opt-in because
captive-portal detection without active probing is
unreliable)
5. home default
scene_source field on session_meta records the tier that won:
{cli, env, yaml, auto, default}. session_meta is a new JSONL
event type written as line 1 of every diting session, carrying
scene + scene_source + diting_version + ssid + gateway_ip +
hostname (BSSID intentionally left out for PII reasons).
PRs bundled: #114 (P1 + P4 scene awareness), #115 (archive),
#116 (P2 auto-detect + scenes.yaml), #117 (archive).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Archives
add-scene-awareness(#114). Two things land:openspec/specs/tree — newopenspec/specs/scenes/spec.md(full capability spec with Purpose + 3 requirements + 8 scenarios), plus MODIFIED requirements incli(--scene SCENE),event-log(session_meta),analyze(session_meta consumer + LLM scene context),bluetooth-scanning(presence_gate_s sourced from scene), andtui-shell(subtitle scene chip).openspec/changes/archive/2026-05-22-add-scene-awareness/.Test plan
openspec validate --specs --strict— 22/22 passed (was 21;scenesis the 22nd capability)Generated with Claude Code