feat(docs): app-owned context-dependent skills + live-URL scope - #64
Draft
jordanssv wants to merge 1 commit into
Draft
feat(docs): app-owned context-dependent skills + live-URL scope#64jordanssv wants to merge 1 commit into
jordanssv wants to merge 1 commit into
Conversation
- docs context skill (context.md/context.json -> materialized SKILL.md):
live-Google-Doc grounding, gdrive-files read/edit/write surface,
approval honesty, formatting preservation
- app-owned Actions catalogue (src/apps/docs/skills.ts): the research-board
set (Draft-from-note / Polish / Summarize / Notes->brief / Review
comments / Redesign) + docs-home 'Summarize recent work'; AppSkills
provider threaded hostSurface -> Workspace -> ChatColumn -> ChatHeader ->
ActionsRail with central-catalogue fallback (gmail untouched)
- context-dependent scope: engine emits browser-navigated {key,url} on
main-frame address change (Host::emit_navigated); DocsTab derives
docs-home vs doc from the live tab URL and carries file_id to skills
via content metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Docs becomes the first app with a real, app-owned Actions catalogue and context-dependent skill scopes — riding the
extraSkillsseam from #48, and giving the agent a docs context skill that grounds on the live Google Doc.Docs context skill (
src/apps/docs/context.md+context.json) — materialized as a SKILL.md: the open surface is a live Google Doc (not a brains board), reads via the browser, all writes throughgdrive-filesact_on_integration(read_document/edit_doc_text/write_document), approval honesty ("never claim it changed until the approval executes; re-read to verify"), formatting/fact preservation, and the honest v19 limits (64 KB html cap, no surgical colour).App-owned docs skills (
src/apps/docs/skills.ts→HostSurface.skills) — the research-board set: Draft-from-a-note / Polish / Summarize / Notes→brief / Review comments / Redesign (open doc), plus "Summarize recent work" (docs home). The central catalogue's docs entries are removed — exactly what the app-contributed seam's comment invites — so the rail shows one set, app-owned. Gmail's stay central until it migrates.Context-dependent scope from the live tab URL — the engine emits
browser-navigated {key, url}on every main-frame address change (Host::emit_navigated← CEFon_address_change); DocsTab derivesdocs-home(list) vsdoc(/document/d/<id>/) and carries thefile_idto skills via content metadata. Chromium-engine only; the mock falls back to content presence.One addition to the seam:
Skill.instruction— the composed-path counterpart tobrief. App-contributed skills that need the workstation runner (content-port read +{CONTENT}/{TITLE}/{METADATA}/{BRIEF}splices) carryinstruction; docs skills need{METADATA}for the open doc's file id.briefstays the raw fast path; one field + a one-line fallback incomposeSkillPrompt.Why URL, not DOM, for scope
The URL is the most stable contract Google exposes (
/document/d/<id>/is the Drive API key;on_address_changeis browser-level, invisible to their frontend). Doc content comes from the Drive API, never scraped. A DOM observer (selection, active comment — ARIA-anchored, fail-soft, gmail-style) is the planned enrichment slice, not this one; same for a drift canary in the eval lane.Notes
dev@ f6eb11c; context manifest regenerated under feat(context+agents): native per-app workspaces — sessions load skills the CLI's way #48's engine (6 contexts).file_idplumbing the scoped-act-grants work (BRNS-MCP-053 — desktop live edits) sits on.Testing
lint:imports/lint:manifests/lint:sizegreen · 890 vitest pass (the 72 unhandled jsdom worker errors reproduce identically ondev's tip in a clean worktree — pre-existing, local Node v20 vs the dep bump).skills.test.tsupdated: pins that centralSKILLSno longer names docs scopes (they're app-contributed now).gdrive-filesv19).🤖 Generated with Claude Code