Skip to content

Plan 21: session-start context dedup + Phase C sensors#46

Merged
LastStep merged 1 commit into
mainfrom
plan-21-session-dedup-phase-c
Apr 21, 2026
Merged

Plan 21: session-start context dedup + Phase C sensors#46
LastStep merged 1 commit into
mainfrom
plan-21-session-dedup-phase-c

Conversation

@LastStep

Copy link
Copy Markdown
Owner

Summary

Session-start context dedup + Plan 08 Phase C sensors (compact-recovery, context-guard verify/plan patterns). Cuts redundant protocol dumps, fixes session-context misfire, and moves UX prefs to memory.md Feedback where they belong.

Changes

  • catalog/sensors/session-context/session-context.sh.tmpl — drop end reminder, filter empty FieldNotes, summarize Reports, filter memory/session-start protocols
  • catalog/sensors/session-context/meta.yaml — add matcher=startup|resume|clear
  • catalog/protocols/session-start/session-start.md — rewrite (short, assumes sensor did the work)
  • catalog/sensors/context-guard/context-guard.sh.tmpl — add verify + plan pattern detection
  • catalog/sensors/compact-recovery/meta.yaml — NEW
  • catalog/sensors/compact-recovery/compact-recovery.sh.tmpl — NEW
  • station/agent/Core/self-awareness.md — drop User Preferences section
  • station/agent/Core/memory.md — UX preferences moved under Feedback
  • station/agent/Sensors/* + station/agent/Protocols/session-start.md + station/.claude/settings.json + station/CLAUDE.md — regenerated by bonsai update

Plan

station/Playbook/Plans/Active/21-session-start-dedup-and-phase-c-sensors.md

Verification

  • make build
  • go test ./...
  • gofmt -s -l . clean
  • Fresh-install smoke test in /tmp — settings.json has two matchers, compact-recovery.sh generated
  • session-context byte-count smaller than baseline (30951 < 34726); banned strings absent; required strings present
  • context-guard manual pattern tests pass (verify/plan/wrap-up/negative)
  • compact-recovery output includes only Quick Triggers + Work State (station's verbose Work State pushes it slightly above the 2000-byte target — plan acknowledges this edge case is acceptable)

Cuts session-start context redundancy and completes Plan 08 Phase C:
- session-context sensor now filters memory/session-start protocols
  (duplicates of sensor-injected content), skips empty FieldNotes,
  summarizes pending reports instead of full-cat, drops misfired
  end-of-session reminder block, and scopes to SessionStart matcher
  startup|resume|clear so /compact can be handled by a separate sensor.
- session-start protocol rewritten to assume sensor did the heavy
  lifting — no more 10-step re-read list.
- context-guard gains verify + plan pattern detection with word-boundary
  (not end-anchored) regex; planning reminder suppressed when wrap-up
  already fired to avoid triple-stacking.
- new compact-recovery sensor (matcher=compact) re-injects minimal
  context (Quick Triggers + Work State) after /compact, <2000 chars
  in normal conditions.
- station self-awareness.md trimmed: durable UX preferences moved to
  memory.md Feedback section where they structurally belong.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@LastStep LastStep marked this pull request as ready for review April 21, 2026 07:48
@LastStep LastStep merged commit d14edbe into main Apr 21, 2026
6 checks passed
@LastStep LastStep deleted the plan-21-session-dedup-phase-c branch April 21, 2026 07:48
LastStep added a commit that referenced this pull request Apr 21, 2026
PR #46 merged d14edbe. Plan 08 Phase C shipped via Plan 21 (C1 + C2);
C3 stays deferred permanently.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
LastStep added a commit that referenced this pull request Apr 21, 2026
Session log for Plan 21 shipped via PR #46. Updated backlog:
session-start payload research item revised with Plan 21 progress +
remaining optimization ideas; new P3 research entry for Plan 08 C3
with explicit revisit criteria.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
LastStep added a commit that referenced this pull request Apr 22, 2026
Strip 13 inline `<!-- resolved -->` HTML comments from Backlog.md +
delete the duplicated/already-resolved "Pre-release docs audit" entry
(now in StatusArchive Resolutions section) + remove obsolete "Re-plan
Phase C" item (shipped 2026-04-21 via Plan 21 / PR #46).

StatusArchive.md gains a "Resolved Backlog Items" section listing all
14 resolutions with provenance (PR + plan + scope). Backlog.md is
~10% lighter and only carries actionable open items.

Co-Authored-By: Claude Opus 4.7 <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