chore(archive): apply add-scene-autodetect-and-persistence deltas#117
Merged
chenchaoyi merged 1 commit intoMay 22, 2026
Merged
Conversation
Applies the spec deltas from #116 into the canonical openspec/specs/ tree: - MODIFIED specs/scenes/spec.md — resolution precedence expanded from 3 tiers (cli / env / default) to 5 tiers (cli / env / yaml / auto / default); 6 new scenarios; new documentation of fall-through behaviour for invalid env. - ADDED specs/scenes/spec.md — `scenes.yaml SHALL map networks to scenes` requirement (4 scenarios covering missing file, SSID match, gateway_mac precedence, invalid entry handling). - ADDED specs/scenes/spec.md — `Auto-detect heuristic SHALL classify from observable network signals` requirement (5 scenarios covering Enterprise auth, BSSID density, sparse network, open network not auto-classifying as public). - MODIFIED specs/event-log/spec.md — session_meta `scene_source` field enum extended from {cli, env, default} to {cli, env, yaml, auto, default}; 2 new scenarios for the yaml + auto sources. - ADDED specs/tui-shell/spec.md — `Scene classification SHALL print a one-line banner at startup` requirement (4 scenarios covering auto banner, yaml banner, explicit-flag silence, DITING_SCENE_QUIET). Moves the change dir to openspec/changes/archive/2026-05-22-add-scene-autodetect-and-persistence/. All artifacts done, all tasks complete, validate --specs --strict green (22/22). 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-autodetect-and-persistence(#116). Two things land:openspec/specs/tree:scenes— resolution precedence requirement expanded from 3 tiers to 5; newscenes.yamlrequirement; new heuristic requirementevent-log—scene_sourceenum expanded from{cli, env, default}to{cli, env, yaml, auto, default}with new scenariostui-shell— new startup-banner requirement (auto / yaml banner formats, stderr-only,DITING_SCENE_QUIET=1suppression)openspec/changes/archive/2026-05-22-add-scene-autodetect-and-persistence/.Test plan
openspec validate --specs --strict— 22/22 passedGenerated with Claude Code