| name | listening |
| description | Golden path /listen — ingest all new signals: chronicle releases, Supabase feedback, DM exports, growth matches. |
| user-invocable | true |
| allowed-tools | Read, Write, Glob, Grep, Edit, Bash, Skill |
/listen — Ingest All New Signals
Golden path command that auto-chains the Observer's intake pipeline. Ingests chronicle releases, daily synthesis feedback, unprocessed DM exports, and growth response matching.
Chain
- Preflight:
gp_check_gh_auth, gp_check_supabase_key
- Chronicle ingest (if gh auth passes):
scripts/observer/chronicle-ingest.sh → count new entries
- Daily synthesis: invoke
/daily-synthesis truename → count new signals
- DM export scan: check
grimoires/keeper/dm-exports/ for unprocessed files → invoke /ingest-dm for each
- Growth matching: run
scripts/observer/growth-state.sh outcome matching for new responses
- Gap state sync: run
scripts/observer/gap-sync.sh to pull GitHub issue closures back to canvases
- Status + suggest next
Execution
source scripts/observer/golden-path-lib.sh
gp_status_header "listen"
if gp_check_gh_auth; then
chronicle_output=$(scripts/observer/chronicle-ingest.sh 2>&1)
new_entries=$(echo "$chronicle_output" | grep -o '[0-9]* new entries' | head -1 | grep -o '[0-9]*')
if [[ "${new_entries:-0}" -gt 0 ]]; then
gp_status_ok "chronicle" "${new_entries} new entries ingested"
else
gp_status_skip "chronicle" "no new releases"
fi
else
gp_status_fail "chronicle" "gh not authenticated — run: gh auth login"
fi
if gp_check_supabase_key; then
gp_status_ok "daily-synthesis" "processing new feedback"
else
gp_status_fail "daily-synthesis" "Supabase key not found — set SUPABASE_KEY"
fi
dm_dir="grimoires/keeper/dm-exports"
if [[ -d "$dm_dir" ]]; then
pending=$(find "$dm_dir" -name "*.txt" -o -name "*.md" 2>/dev/null | wc -l | tr -d ' ')
if [[ "$pending" -gt 0 ]]; then
gp_status_ok "ingest-dm" "${pending} pending exports"
else
gp_status_skip "ingest-dm" "no pending exports"
fi
else
gp_status_skip "ingest-dm" "no exports directory"
fi
proposed_count=0
dedup_count=0
if gp_check_growth_dir; then
find grimoires/keeper/growth/ -name "*.tmp" -mmin +5 -delete 2>/dev/null
declare -A signals_by_user
FOR each newly_ingested_signal:
user = signal.user
growth_path = "grimoires/keeper/growth/${user}.yaml"
IF NOT exists(growth_path): CONTINUE
signals_by_user[$user] += signal
FOR user, signals IN signals_by_user:
all_matches = []
FOR signal IN signals:
match_result = Run: scripts/observer/growth-match.sh \
"$user" "$signal.signal_id" "$signal.raw_text" "$signal.timestamp" "${signal.thread_id:-}"
IF match_result is not empty:
all_matches += parse_yaml_documents(match_result)
IF all_matches is empty: CONTINUE
proposed_path = "grimoires/keeper/growth/${user}.proposed_matches.yaml"
lock_path = "grimoires/keeper/growth/${user}.yaml.lock"
WITH flock(lock_path):
IF NOT exists(proposed_path):
proposed_content = {schema_version: 1, user: "$user", matches: []}
ELSE:
proposed_content = read_yaml(proposed_path)
FOR match_entry in all_matches:
existing = any(m for m in proposed_content.matches
where m.signal_id == match_entry.signal_id
AND m.follow_up_id == match_entry.follow_up_id)
IF existing:
dedup_count += 1
CONTINUE
match_entry.proposed_at = now_iso8601()
match_entry.status = "pending"
match_entry.confirmed_at = null
proposed_content.matches.append(match_entry)
proposed_count += 1
write_yaml(proposed_path + ".tmp", proposed_content)
mv(proposed_path + ".tmp", proposed_path)
if [[ "$proposed_count" -gt 0 ]]; then
msg="${proposed_count} proposed matches (run /grow to confirm)"
if [[ "$dedup_count" -gt 0 ]]; then
msg="$msg (${dedup_count} duplicates skipped)"
fi
gp_status_ok "growth-matching" "$msg"
else
gp_status_skip "growth-matching" "no new responses matched"
fi
else
gp_status_skip "growth-matching" "no growth files yet"
fi
if [[ -f "grimoires/keeper/gap-index.jsonl" ]]; then
if command -v gh &>/dev/null && gh auth status &>/dev/null 2>&1; then
sync_output=$(scripts/observer/gap-sync.sh 2>&1)
resolved_count=$(echo "$sync_output" | grep -c "FILED → RESOLVED" || true)
if [[ "$resolved_count" -gt 0 ]]; then
gp_status_ok "gap-sync" "${resolved_count} gaps resolved (issues closed on GitHub)"
else
gp_status_skip "gap-sync" "no state changes"
fi
else
gp_status_fail "gap-sync" "gh not authenticated — run: gh auth login"
fi
else
gp_status_skip "gap-sync" "no gap-index.jsonl — run gap-index-backfill.sh first"
fi
gp_progression_summary
gp_suggest_next "listen"
gp_status_footer
Truenames Chained
| Truename | Purpose |
|---|
/daily-synthesis | Pull + classify Supabase feedback |
/ingest-dm | Import DM conversations |
growth-state.sh | Match responses to follow-ups |
chronicle-ingest.sh | Poll GitHub releases |
gap-sync.sh | Pull GitHub issue state back to canvases |