Skip to content

chore(archive): apply add-scene-autodetect-and-persistence deltas#117

Merged
chenchaoyi merged 1 commit into
mainfrom
chore/archive-add-scene-autodetect-and-persistence
May 22, 2026
Merged

chore(archive): apply add-scene-autodetect-and-persistence deltas#117
chenchaoyi merged 1 commit into
mainfrom
chore/archive-add-scene-autodetect-and-persistence

Conversation

@chenchaoyi
Copy link
Copy Markdown
Owner

Summary

Archives add-scene-autodetect-and-persistence (#116). Two things land:

  • Spec deltas applied into the canonical openspec/specs/ tree:
    • scenes — resolution precedence requirement expanded from 3 tiers to 5; new scenes.yaml requirement; new heuristic requirement
    • event-logscene_source enum expanded from {cli, env, default} to {cli, env, yaml, auto, default} with new scenarios
    • tui-shell — new startup-banner requirement (auto / yaml banner formats, stderr-only, DITING_SCENE_QUIET=1 suppression)
  • Change directory moves to openspec/changes/archive/2026-05-22-add-scene-autodetect-and-persistence/.

Test plan

  • openspec validate --specs --strict — 22/22 passed
  • All artifacts done, all tasks complete

Generated with Claude Code

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 chenchaoyi merged commit c0f62d3 into main May 22, 2026
5 checks passed
@chenchaoyi chenchaoyi deleted the chore/archive-add-scene-autodetect-and-persistence branch May 22, 2026 10:41
@chenchaoyi chenchaoyi mentioned this pull request May 22, 2026
8 tasks
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant