In-app chat v0.0.1 — the chat helps you write the prompt
augment-it now has a chat panel that doesn't just execute on your fundraising-pipeline records — it helps you author the prompt that drives the enrichment. You state a goal in your own words; the chat drafts a prompt template against a sample of your record set's columns and renders it inline. You react to the draft conversationally, refining it across a turn or two. When it's right, you click run, and the same chat surface narrates the enrichment job's progress and checks at the end that the columns the prompt promised actually got populated. The structural answer to bulk-AI-enrichment-gone-haywire is conversational gating: draft, improve, then apply explicitly. This entry walks through what shipped, how it works, and what v0.0.2 brings in.
STUB — fill in after the v0.0.1 session lands.
publish: falseuntil the work is actually shipped. Once the session is complete, setpublish: true, bumpdate_modified, fill infiles_changed, and revise sections marked TODO with what actually happened (not what the plan said would happen).
Why Care?
If you've ever pointed an AI tool at a spreadsheet of companies or contacts and asked it to enrich them, you know the failure mode: a bulk run that goes sideways, fills the wrong columns, hallucinates LinkedIn URLs, or quietly returns nothing for half the rows. The fix isn't a smarter model — it's a gate. Something has to sit between "I want this" and "the records change."
augment-it's gate is conversational. You state the goal. The chat drafts the prompt. You react to the draft. The chat refines it. You explicitly click run. Then — and only then — the records change. The same chat surface watches the enrichment finish and checks whether the prompt actually delivered what it promised.
That's the entire v0.0.1 thesis: the chat is the place where the user and the model author the enrichment together, before any records move.
What's New?
A chat panel ships in the augment-it shell — Configuration A from [[Slides_Anatomy-of-the-In-App-Agent-Shell]] (chat-as-primary).
Four new capabilities in
@augment-it/workspace:prompts.draft— drafts a prompt template from a user goal + a sample of the record set's columnsprompts.improve— given a draft + feedback, produces a refined version linked to its parent viaderived_fromprompts.apply— a ScriptCapability that binds the drafted prompt to a record set scope and runs the enrichment, with postconditions that check the result (rows enriched, exit code, norows_enriched=0)records.list— read the records as they look right now
A new
Promptentity in the workspace with draft-versioning (derived_frompreserves the iteration history;improvecreates a new version, never mutates in place).A chat service container (
services/chat/) — Node/Fastify, SSE, assembles the four-slab system prompt with explicit cache breakpoints.A federation remote for the chat surface (
apps/chat/) with four components, the load-bearing one beingPromptDraftPanel.svelte— drafts render inline in the chat conversation, not in a side panel.An anticipation map keyed off
(activeView.kind, last_capability)— the chat suggests 1–3 next verbs every time a capability completes.Strict alignment mode by default: the model is biased toward
proposeoverinvokefor anything ambiguous. Good demo posture; live-mode tightening is a v0.0.2 knob.
How it Works
Four capabilities, two adapter shapes ([[Chat-As-Verb-Surface-Patterns]] Pattern 1): three TypeScript handlers and one ScriptCapability with postconditions.
user types goal
↓
prompts.draft ────────────────────────────────────► draft renders inline
↓ ↓
workspace.prompts.save({ status: 'draft' }) ↓
↓
user reacts conversationally
↓
prompts.improve ───────────────────────────────► refined draft renders inline
↓ ↓
new Prompt with derived_from = parent.id ↓
↓
user clicks "Run this"
↓
prompts.apply ────────────────────────────────► character-cast row narrates
↓ ↓
ScriptCapability fires ↓
postconditions evaluate ↓
- exit_code == 0 ↓
- rows_enriched >= 1 ↓
- stdout contains rows_enriched=N (and not =0) ↓
↓
anticipation suggests records.listThe chat is the only thing that talks to the model. The capability registry
is the only thing that mutates the workspace. Drafts are inert — they live
in the workspace as Prompt entities but no record is touched until apply
fires. This is the gating discipline from
[[project_augment_it_gating_and_microfrontend_thesis]] rendered as a verb
triad.
The three response modes
The chat's static system-prompt slab declares three intents the model chooses between every turn:
answer— text only, no capability invokedpropose— one or more capability suggestions with prefilled args, awaiting user acceptinvoke— tool call against a single capability
For v0.0.1, default alignment is strict: when the user's intent is ambiguous, the chat proposes rather than invokes. The user clicks once more to confirm. For a client demo this reads as the chat asking before acting — exactly the posture you want.
Under the Hood
The system prompt has four cache-eligible slabs in stable order ([[Chat-As-Verb-Surface-Patterns]] Pattern 5):
Static spine (package-version-pinned framing + the three response modes
one explicit instruction that
improvedoesn'tapply)
Capability schemas for the per-turn whitelist
Active skills — empty in v0.0.1
Per-org reminders — empty in v0.0.1
Cache breakpoints sit between each slab. Even with slabs 3 and 4 empty for v0.0.1, the breakpoints are scaffolded so v0.0.2 doesn't have to restructure.
The prompts.apply ScriptCapability's expected_effect.postconditions
is the new quality-monitoring surface. Two stdout_matches postconditions
together encode "we got an explicit row count, and it wasn't zero" — a
rows_enriched=0 outcome is treated as a violation, not a successful
no-op. That's the failure shape the gated-enhancement pattern is meant to
catch.
What's Next
McpCapability adapter — likely firecrawl or tavily wrapped as
corpus.searchor similar, so the chat can pull live company-page data duringprompts.applyinstead of relying on the model's training data alone.SkillCapability adapter — wrap
crawl-fetch-ingestso the chat can plan an ingestion run from the SKILL.md trigger pattern, thenapplyexecutes it.requires_user_confirmationgating onprompts.applyfor non-trivial scopes (anything over ~10 records). v0.0.1 ran without it because the demo arc was the confirmation.Per-organization reminders + AI memory cache — the
reminders.*andcache.*capabilities from [[Memory-Layers-for-the-In-App-Chat-Package]] once thestudies/memory-layers-for-agents/neoreads land.Memopop adopts the patterns next, then dididecks. The shared
@lossless/in-app-agentpackage extraction happens after the second app, not the first — wait for the abstraction to be honest.
References
[[Chat-As-Verb-Surface-Patterns]] (ai-labs) — the blueprint v0.0.1 implements
[[Per-App-Workspace-Conventions]] (ai-labs) — the verb vocabulary including the
draft → improve → applytriad[[Augment-It-Workspace-Walking-Skeleton]] — the substrate v0.0.1 rides on
[[Prompt-Template-Manager-Walking-Skeleton]] — the prompt-template work v0.0.1 leans on
[[Remote-Mount-Contract-for-In-App-Agent]] (ai-labs) — the WorkspaceAdapter seam
[[In-App-Chat-as-Agent-Surface-for-Client-Apps]] (ai-labs) — origin exploration
Plan:
context-v/plans/In-App-Chat-v0-0-1-for-Augment-It.mdUpstream prior art (in
ai-labs/studies/open-specs-and-standards/):ai-skills/,modelcontextprotocol/schema/2025-11-25/,12-factor-agents/content/factor-{04,05,07,08}-*.md
