| name | edit-context |
| description | Complete the missing fields in a single client's (or domain's) Nekt Context document — re-trying a data-based fill first, then asking the user for the rest, and saving the update. Use this when the user wants to finish, complete, or fill in context for a specific client/domain, or follows up after build-context — e.g. "/edit-context Padoca Digital", "completar o contexto do cliente Padoca", "preencher as informações faltantes da ACME", "finish the context doc for client X". Works through the Nekt MCP (get_semantic_context, generate_sql, execute_sql, update_context_document). |
Add Missing Context
build-context creates a Context document per client/domain and auto-fills what's derivable from the data, leaving judgment calls as > TODO markers. This skill finishes one entity's document: it re-attempts a data fill for each gap, asks the user for anything that isn't in the data, and saves the result.
Respond in the user's language (pt-BR or English), mirroring how they write.
Prerequisite
The Nekt MCP must be connected (get_semantic_context, generate_sql, execute_sql, update_context_document). If not, tell the user and stop.
Reuse these references (from the manage-context-template skill)
../manage-context-template/references/response-style.md — how to talk to the user (surface gaps once, show diffs not full docs, lean reports). Read first.
../manage-context-template/references/context-doc-authoring.md — naming convention + annotation grammar (so edits stay valid).
../manage-context-template/references/client-context-template.md — field list + fill modes.
Workflow
1. Identify the entity
Take the client/domain name from the invocation argument (e.g. /edit-context Padoca Digital). If none was given, ask which client/domain to complete.
2. Locate its document
- If a
doc_id for this entity was produced by a build-context run earlier in this session, use it directly (you also have its content).
- Otherwise call
get_semantic_context("<Nome> contexto perfil") and select the document whose name matches the convention (Cliente — <Nome> / Client — <Name> / Domínio — <Nome>). Use its returned content as the current state.
- If nothing matches → tell the user no Context document exists for this entity yet and suggest running build-context. If several plausibly match → ask which one.
3. Find the gaps
Parse the current content for empty fields and > TODO (…) blockquotes. Hold the list internally — surface it merged into the ask in step 4, not as a separate "here's what's missing" turn.
4. Fill the gaps
For each gap, in order:
- Re-try a reference fill. Many TODOs (segment, size, contacts, key tables) live in a table now. Locate which table/field holds each —
get_relevant_tables_ddl / get_table_preview, or get_semantic_context → generate_sql to find it — then fill the gap with a @table::/@field:: pointer, not a copied value (reference, don't duplicate — see the authoring reference; the agent reads the live value through the pointer). Keep annotations valid.
- Ask the user — once, batched for what isn't in any table (objetivos/KPIs, regras de negócio, anything judgment-based) — that's the knowledge worth writing out as a value. List the remaining gaps compactly in one message and accept all answers at once; don't interrogate field-by-field.
Don't invent values — an honest remaining > TODO is better than a wrong fact, and a pointer to live data beats a copied value that will drift.
5. Save the update
update_context_document replaces the whole body, so rebuild the full document (everything, not just the changed fields), preserving sections you didn't touch.
- Show only what changed — present the updated fields/sections as a focused before → after, not the whole document (the user already has it). Get explicit approval.
- On approval:
- With a known
doc_id: update_context_document(doc_id=…, name=…, content=…, confirm=True).
- Standalone fallback: if you don't have the
doc_id (a fresh session, and get_semantic_context doesn't return the document's own id), ask the user to paste the document id from the Nekt UI, then update. (This step disappears once the Nekt MCP exposes document ids / a list endpoint — see the plugin README.)
6. Report
In 2–3 lines: what you filled (data vs. user) and what's still > TODO. Offer to move on to the next client/domain.
Key behaviors
- Keep chat tight. Surface gaps once, show a before → after diff (not the full doc), report in a few lines — see
response-style.md.
- Reference, don't duplicate — table-backed gaps become pointers (
@table::/@field::), not copied values — see context-doc-authoring.md.
- Confirm before writing, showing only the changes — surface just the updated fields/sections (before → after); never echo the full existing document back to the user.
- Send full content to
update_context_document — partial bodies would wipe the rest of the doc. (Full body for the tool; focused diff for the user.)
- One entity per document — never merge another client's data in.