Skip to content

feat: attach chat knowledge packets to coding tasks - #11

Merged
Peyton-Spencer merged 5 commits into
feat/discord-live-inboxfrom
feat/chat-knowledge-packets
Aug 30, 2026
Merged

Peyton-Spencer merged 5 commits into
feat/discord-live-inboxfrom
feat/chat-knowledge-packets

Conversation

@Peyton-Spencer

@Peyton-Spencer Peyton-Spencer commented Aug 29, 2026 •

Copy link
Copy Markdown

Summary

Turns selected local chats into private, agent-native knowledge packets for coding tasks.

Type /discord Liam, /telegram Brian White, or /chat Omar in the coding composer, select a conversation, and the task receives a navigable packet containing the bounded transcript plus available attachments. @ remains reserved for workspace files.

Task-native behavior

  • packets are scoped to the exact draft/thread and execution mode; they cannot leak into another project or composer
  • both Current checkout and New worktree materialize into the actual task destination before provider dispatch
  • packet-only submissions are valid and receive a concise default instruction
  • the inbox attachment action targets the most recently active coding task and is disabled when no task target exists
  • /discord and /telegram query only their matching adapter; /chat intentionally aggregates

Each packet is written atomically under a task-specific .t3/knowledge-packets/<task-turn>/<packet>/ directory with:

  • INDEX.md as the agent entry point
  • transcript.md with chronological content and provenance
  • manifest.json with scope, truncation, attachment metadata, hashes, and copy errors
  • bounded localized attachment files when the source exposes them

Git's local exclude plus a packet-root deny-all .gitignore keep the data out of commits. Symlink redirection is rejected, remote downloads are host/redirect/size bounded, and packet identity includes message content and attachment metadata rather than message IDs alone.

Validation

  • 6 packet-writer tests pass, including cross-task isolation and content-sensitive identity
  • 160 focused web tests pass, including packet-only submission, cross-draft isolation, slash search, and composer behavior
  • server and web typechecks pass; full workspace typecheck passes on the stack head
  • GitHub CI is running on the corrected stacked head

Remaining boundary

Telegram cannot yet supply arbitrary historical chats or attachments. A full orchestration integration test proving the final filesystem location immediately before provider dispatch is still follow-up work.

Stack

Layer 4 of 6 in Stack pingdotgg#13, based on #8 (feat/discord-live-inbox).

Note

Add chat knowledge packet attachment for coding tasks

  • Adds a KnowledgePacketWriter module and server logic in ws.ts to materialize chat transcripts and attachments into git-ignored worktree directories from bootstrap.knowledgePackets.
  • Web composer and store: Adds /chat, /discord, /telegram triggers in ChatComposer.tsx to search and attach conversations. ChatView.tsx treats attached packets as sendable content, adds a bootstrap prompt, and clears them after sending.
  • Inbox integration: InboxPage.tsx adds a "Use in coding task" button to attach the current chat to the active coding task.
  • Behavioral Change: makeChannelRegistry in ChannelRegistry.ts changes listConversations (without accountId) to ignore failing adapters via orElseSucceed(() => []), returning partial results instead of failing the whole call.

Macroscope summarized ef6dbec.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 13.3 KiB — 15.1 KiB ✅
Codex Thread snapshot wire — 6.9 KiB — 7.3 KiB ✅
Codex Live turn WebSocket wire — 6.4 KiB — 7.8 KiB ✅
Codex Live turn WebSocket decoded — 55.5 KiB — 66.4 KiB ✅
Codex Live turn messages — 9 — 21 ✅
Claude Total thread wire — 13.5 KiB — 15.1 KiB ✅
Claude Thread snapshot wire — 6.9 KiB — 7.3 KiB ✅
Claude Live turn WebSocket wire — 6.6 KiB — 7.8 KiB ✅
Claude Live turn WebSocket decoded — 57.9 KiB — 66.4 KiB ✅
Claude Live turn messages — 11 — 21 ✅

Baseline: unavailable · PR result: ef6dbec · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch from af4b3e3 to 5a95af2 Compare August 29, 2026 07:32
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch from 5a95af2 to d501fa3 Compare August 29, 2026 19:09
@github-actions github-actions Bot added size:XXL and removed size:XL labels Aug 29, 2026
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch from d501fa3 to 67c00fd Compare August 29, 2026 19:12
@Peyton-Spencer Peyton-Spencer changed the title Attach chat knowledge packets to coding tasks feat: attach chat knowledge packets to coding tasks Aug 29, 2026
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch from 67c00fd to 1887c90 Compare August 29, 2026 19:17
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch from 1887c90 to ec490d2 Compare August 29, 2026 20:51
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch 2 times, most recently from 07b4e54 to 43b2b17 Compare August 29, 2026 21:41
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch 3 times, most recently from d1de125 to bd7e094 Compare August 29, 2026 22:03
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/chat-knowledge-packets branch from bd7e094 to ef6dbec Compare August 29, 2026 22:08
@Peyton-Spencer
Peyton-Spencer marked this pull request as ready for review August 30, 2026 18:50
@Peyton-Spencer
Peyton-Spencer merged commit 747ebe9 into feat/unified-inbox Aug 30, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant