@tacitai/mcp-server 0.6.23 → 0.6.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -3
- package/dist/prompts.d.ts +22 -22
- package/dist/prompts.js +31 -12
- package/dist/tools/gm.d.ts +26 -1
- package/dist/tools/gm.js +186 -4
- package/dist/tools/kb.d.ts +10 -1
- package/dist/tools/kb.js +94 -8
- package/dist/tools/pyramid.d.ts +2 -1
- package/dist/tools/pyramid.js +27 -6
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.js +5 -3
- package/dist/workflow-gate.d.ts +119 -0
- package/dist/workflow-gate.js +250 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64,6 +64,11 @@ import { registerPrompts } from './prompts.js';
|
|
|
64
64
|
import { getRequestPrincipal } from './client.js';
|
|
65
65
|
// Setup wizard (MV-1057h / W5)
|
|
66
66
|
import { setup, profileToEnvVar } from './setup.js';
|
|
67
|
+
import { WorkflowGate } from './workflow-gate.js';
|
|
68
|
+
// FEAT-249: one WorkflowGate per server process — GM placement workflow state keyed
|
|
69
|
+
// by request principal (stdio shares the single '__stdio__' slot). Never store gate
|
|
70
|
+
// state inside the per-request AsyncLocalStorage context; see workflow-gate.ts.
|
|
71
|
+
const gate = new WorkflowGate();
|
|
67
72
|
// ─── ESM __dirname replacement ───────────────────────────────────────────────
|
|
68
73
|
const __filename = fileURLToPath(import.meta.url);
|
|
69
74
|
const __dirname = path.dirname(__filename);
|
|
@@ -168,9 +173,9 @@ async function run() {
|
|
|
168
173
|
registerExportTools(server, getClient);
|
|
169
174
|
registerMoveTools(server, getClient);
|
|
170
175
|
registerAgentTools(server, getClient);
|
|
171
|
-
registerPyramidTools(server, getClient);
|
|
176
|
+
registerPyramidTools(server, getClient, gate);
|
|
172
177
|
registerSharingTools(server, getClient);
|
|
173
|
-
registerKbTools(server, getClient);
|
|
178
|
+
registerKbTools(server, getClient, gate);
|
|
174
179
|
registerLakeTools(server, getClient);
|
|
175
180
|
registerGithubTools(server, getClient);
|
|
176
181
|
registerWebUrlTools(server);
|
|
@@ -179,7 +184,7 @@ async function run() {
|
|
|
179
184
|
registerCrewTools(server, getClient);
|
|
180
185
|
registerPeopleTools(server, getClient);
|
|
181
186
|
registerLakeStructureTools(server, getClient);
|
|
182
|
-
registerGmTools(server, getClient);
|
|
187
|
+
registerGmTools(server, getClient, gate);
|
|
183
188
|
registerResearchTools(server, getClient, getRequestPrincipal);
|
|
184
189
|
registerSkillTools(server, getClient);
|
|
185
190
|
registerWikiTools(server, getClient);
|
package/dist/prompts.d.ts
CHANGED
|
@@ -20,33 +20,33 @@ export declare const GM_WORKFLOW: {
|
|
|
20
20
|
readonly steps: readonly [{
|
|
21
21
|
readonly id: "ingest";
|
|
22
22
|
readonly name: "Ingest";
|
|
23
|
-
readonly action: "Call tacit_gm_ingest with a title and the content (inline text via \"content\", or a local file via \"file_path\" — never both). Do NOT set domain_id. The response includes a placement_proposal with suggested_surface (\"kb\" or \"pyramid\") and a confidence score — use this as a starting hint for step 2, but let the user choose the final surface.";
|
|
23
|
+
readonly action: "Call tacit_gm_ingest with a title and the content (inline text via \"content\", or a local file via \"file_path\" — never both). Do NOT set domain_id. When the user wants the content placed on two surfaces (pyramid AND KB), set cross_reference: true on tacit_gm_ingest — the first placement cycle then chains into a second automatically. The response includes a placement_proposal with suggested_surface (\"kb\" or \"pyramid\") and a confidence score — use this as a starting hint for step 2, but let the user choose the final surface.";
|
|
24
24
|
readonly tools: readonly ["tacit_gm_ingest"];
|
|
25
25
|
readonly signal: "You receive a catalog_id, artifact_id, content_type, and is_duplicate flag. Save the catalog_id — you will need it for placement.";
|
|
26
26
|
readonly on_duplicate: "If is_duplicate is true, tell the user this content already exists and ask how to proceed: update, skip, or ingest as a new version.";
|
|
27
27
|
}, {
|
|
28
28
|
readonly id: "classify_present";
|
|
29
29
|
readonly name: "Present classification and offer options";
|
|
30
|
-
readonly action: "Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM's suggested surface. Say something like: \"Your [title] is cataloged. Where should it live? I can file it in your workspace structure, add it to your knowledge base, both, or keep it in the data lake for now. Or say 'you decide' and I'll recommend a spot.\" STOP here and wait for the user to respond. Do not proceed until they choose. IMPORTANT: When the user picks a surface (e.g. \"pyramid\", \"KB\", \"workspace structure\"), that is a SURFACE CHOICE — it tells you which direction to explore, NOT which specific location to place it. You MUST still proceed to step 3 (drill down) and step 4 (propose specific location and wait for approval). Surface choice ≠ location approval.";
|
|
30
|
+
readonly action: "Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM's suggested surface. Say something like: \"Your [title] is cataloged. Where should it live? I can file it in your workspace structure, add it to your knowledge base, both, or keep it in the data lake for now. Or say 'you decide' and I'll recommend a spot.\" STOP here and wait for the user to respond. Do not proceed until they choose. IMPORTANT: When the user picks a surface (e.g. \"pyramid\", \"KB\", \"workspace structure\"), that is a SURFACE CHOICE — it tells you which direction to explore, NOT which specific location to place it. You MUST still proceed to step 3 (drill down) and step 4 (propose specific location and wait for approval). Surface choice ≠ location approval. If the user changes their mind about the surface mid-flow, call tacit_gm_reset and offer the surfaces again.";
|
|
31
31
|
readonly tools: readonly [];
|
|
32
32
|
readonly signal: "User chooses: workspace structure, knowledge base, both, lake-only, or \"you decide.\" This choice triggers drill-down and a specific location proposal — it is NOT placement approval.";
|
|
33
33
|
}, {
|
|
34
34
|
readonly id: "review_structure";
|
|
35
35
|
readonly name: "Review workspace structure (MANDATORY for pyramid placement)";
|
|
36
|
-
readonly action: "You MUST call ALL FOUR tools in sequence — do not skip any: (1) Call tacit_pyramid_list_portfolios to see all portfolios. Pick the best fit. (2) Call tacit_pyramid_list_value_streams — if value streams exist, identify which one aligns with the content. (3) Call tacit_pyramid_list_programs with the portfolio_id. Pick the best-fit program. (4) Call tacit_pyramid_list_dossiers with that program_id. Pick the best-fit dossier. If no dossier fits, note that you will propose creating a new one. You MUST drill down to the dossier level — placing at the program level without a dossier creates an orphan.";
|
|
36
|
+
readonly action: "You MUST call ALL FOUR tools in sequence — do not skip any: (1) Call tacit_pyramid_list_portfolios to see all portfolios. Pick the best fit. (2) Call tacit_pyramid_list_value_streams — if value streams exist, identify which one aligns with the content. (3) Call tacit_pyramid_list_programs with the portfolio_id. Pick the best-fit program. (4) Call tacit_pyramid_list_dossiers with that program_id. Pick the best-fit dossier. If no dossier fits, note that you will propose creating a new one. You MUST drill down to the dossier level — placing at the program level without a dossier creates an orphan. For a KB surface: call tacit_kb_list_collections and pick the best-fit collection.";
|
|
37
37
|
readonly tools: readonly ["tacit_pyramid_list_portfolios", "tacit_pyramid_list_value_streams", "tacit_pyramid_list_programs", "tacit_pyramid_list_dossiers"];
|
|
38
38
|
readonly signal: "You have identified a specific portfolio → value stream (if any) → program → dossier, or determined a new dossier name is needed.";
|
|
39
|
-
readonly skip_when: "User chose
|
|
39
|
+
readonly skip_when: "User chose lake-only.";
|
|
40
40
|
}, {
|
|
41
41
|
readonly id: "propose";
|
|
42
42
|
readonly name: "Propose and WAIT for approval";
|
|
43
|
-
readonly action: "Present a specific proposal and STOP. Do not call tacit_gm_approve yet. For pyramid, say: \"I'd file this under [portfolio] → [value stream] → [program] → [dossier] — [one sentence reason]. Should I go ahead?\" (Omit value stream only if the workspace has none.) If proposing a new dossier: \"There's no dossier that fits under [program], so I'd create one called [name]. Good?\" For KB: \"I'd add this to your [collection] knowledge base
|
|
43
|
+
readonly action: "Present a specific proposal and STOP. Do not call tacit_gm_approve yet. For pyramid, say: \"I'd file this under [portfolio] → [value stream] → [program] → [dossier] — [one sentence reason]. Should I go ahead?\" (Omit value stream only if the workspace has none.) If proposing a new dossier: \"There's no dossier that fits under [program], so I'd create one called [name]. Good?\" For KB: \"I'd add this to your [collection] knowledge base as a draft article you can publish anytime. Approve?\" CRITICAL: You MUST wait for the user to say yes, approve, or confirm BEFORE proceeding to the next step. Do NOT interpret ANY of these as approval of a specific location: \"place it\", \"add it to the workspace\", \"you decide\", \"pyramid\", \"KB\", \"knowledge base\", \"workspace structure\". Those are SURFACE choices — the user still needs to see and approve the SPECIFIC portfolio → value stream → program → dossier path (or specific collection for KB) that you are proposing. If the classifier's suggestion does not fit, propose a better location; never place it yourself instead of asking.";
|
|
44
44
|
readonly tools: readonly [];
|
|
45
45
|
readonly signal: "User explicitly approves (\"yes\", \"approve\", \"do it\", \"go ahead\"), redirects to a different location, or declines.";
|
|
46
46
|
}, {
|
|
47
47
|
readonly id: "place";
|
|
48
48
|
readonly name: "Execute approved placement";
|
|
49
|
-
readonly action: "ONLY after the user explicitly approved the proposal in step 4: For pyramid — if a new dossier is needed, call tacit_pyramid_create_dossier first to get the dossier_id. Then call tacit_gm_approve with the catalog_id from step 1, surface=\"pyramid\", collection_or_program set to the program UUID, and dossier_id set to the dossier UUID. NEVER call tacit_gm_approve without a dossier_id for pyramid placement. For KB: call tacit_kb_promote_from_artifact with the artifact_id from step 1
|
|
49
|
+
readonly action: "ONLY after the user explicitly approved the proposal in step 4: For pyramid — if a new dossier is needed, call tacit_pyramid_create_dossier first to get the dossier_id. Then call tacit_gm_approve with the catalog_id from step 1, surface=\"pyramid\", collection_or_program set to the program UUID, and dossier_id set to the dossier UUID. NEVER call tacit_gm_approve without a dossier_id for pyramid placement. For KB: call tacit_kb_promote_from_artifact with the artifact_id from step 1, the collection UUID, and status \"DRAFT\" — the article lands as a draft the user can publish anytime (tacit_gm_approve does not place KB content). For both: pyramid first, then KB (two separate calls). For lake-only: no call needed.";
|
|
50
50
|
readonly tools: readonly ["tacit_gm_approve", "tacit_kb_promote_from_artifact", "tacit_pyramid_create_dossier"];
|
|
51
51
|
readonly signal: "tacit_gm_approve or tacit_kb_promote_from_artifact returns success.";
|
|
52
52
|
readonly skip_when: "User chose lake-only.";
|
|
@@ -100,26 +100,26 @@ export declare const EXPERIENCES: readonly [{
|
|
|
100
100
|
readonly name: "Build Your Map";
|
|
101
101
|
readonly tier: 1;
|
|
102
102
|
readonly tierName: "Orient & Equip";
|
|
103
|
-
readonly action: "
|
|
104
|
-
readonly signal: "
|
|
105
|
-
readonly tip: "You can always reorganize later. Say \"Move this to [collection]\" or \"Create a new
|
|
103
|
+
readonly action: "Show the user their current Pyramid structure by calling tacit_pyramid_list_portfolios, then tacit_pyramid_list_programs for each portfolio. Present a clear map of what exists. Then invite the user to make ONE change to prove they can reshape it — suggest something concrete like: \"Want to create a new program, rename something, or move content around? Pick one and I will walk you through it.\" WAIT for the user to try something. Do NOT mark this experience complete until the user has either (a) made a structural change (create, rename, move) or (b) explicitly said they are satisfied with the current structure and want to move on. Showing the map alone is not completion — the user must interact with the structure.";
|
|
104
|
+
readonly signal: "User has explored their workspace map AND either made a change or confirmed they are satisfied with the current structure";
|
|
105
|
+
readonly tip: "You can always reorganize later. Say \"Move this to [collection]\" or \"Create a new program for [topic]\" anytime. Your General Manager proposes, you approve.";
|
|
106
106
|
}, {
|
|
107
107
|
readonly id: "connect_your_tools";
|
|
108
108
|
readonly num: 6;
|
|
109
109
|
readonly name: "Connect Your Tools";
|
|
110
110
|
readonly tier: 1;
|
|
111
111
|
readonly tierName: "Orient & Equip";
|
|
112
|
-
readonly action: "
|
|
113
|
-
readonly signal: "
|
|
114
|
-
readonly tip: "";
|
|
112
|
+
readonly action: "First, CHECK what is already connected before telling the user anything: (1) Call tacit_github_list_connections to see GitHub repo connections. (2) Check your available MCP tool list — if you have Gmail tools (mcp__claude_ai_Gmail__*), Gmail IS connected. If you have Slack tools (mcp__plugin_*_slack__*), Slack IS connected. If you have Google Calendar tools, Calendar IS connected. If you have Google Drive tools, Drive IS connected. Present a CONNECTION STATUS showing what is already active and what is not. For anything already connected, say \"Already connected — ready to use.\" For anything not connected, explain how to connect it via claude.ai Settings → Integrations. Also show GitHub workspace connections from step 1. Do NOT say a tool is disconnected if you can see its MCP tools in your available tool list. WAIT for the user to either connect something new or confirm they want to move on.";
|
|
113
|
+
readonly signal: "User knows their connection status and has either connected new tools or confirmed they are ready to proceed";
|
|
114
|
+
readonly tip: "GitHub connections sync your repos into the workspace. Gmail and Slack power the Morning Brief. Google Drive lets you pull in documents directly.";
|
|
115
115
|
}, {
|
|
116
116
|
readonly id: "research_publish";
|
|
117
117
|
readonly num: 7;
|
|
118
118
|
readonly name: "Research & Publish";
|
|
119
119
|
readonly tier: 2;
|
|
120
120
|
readonly tierName: "The Operating System";
|
|
121
|
-
readonly action: "Research a topic and publish a report
|
|
122
|
-
readonly signal: "First research artifact published
|
|
121
|
+
readonly action: "Research a topic and publish a report. Ask the user what they want to research, or suggest a topic relevant to their business. Then: (1) Search workspace knowledge via tacit_search or tacit_synthesize. (2) Search the web for current information. (3) Combine findings into a STYLED HTML REPORT — this MUST be a proper designed artifact opened in the browser for the user to see, not plain text in the chat. The report should have a title, date, executive summary, sections with findings, citations, and a professional layout. Use the artifact/design tools available to create and open the HTML report so the user sees it in their browser. (4) After the report is created, route it through the GM workflow (tacit_gm_ingest) so the GM proposes where to file it. The user approves placement. The key deliverable is the HTML report opened in the browser — the user should SEE a polished document, not just read text in the terminal.";
|
|
122
|
+
readonly signal: "First research artifact published as an HTML report opened in the browser, then filed via GM workflow";
|
|
123
123
|
readonly tip: "After publishing, your General Manager will propose where to place the report in your knowledge structure — you approve the placement.";
|
|
124
124
|
}, {
|
|
125
125
|
readonly id: "run_sales";
|
|
@@ -127,18 +127,18 @@ export declare const EXPERIENCES: readonly [{
|
|
|
127
127
|
readonly name: "Run Sales";
|
|
128
128
|
readonly tier: 2;
|
|
129
129
|
readonly tierName: "The Operating System";
|
|
130
|
-
readonly action: "
|
|
131
|
-
readonly signal: "First sales deliverable
|
|
132
|
-
readonly tip: "Voice
|
|
130
|
+
readonly action: "Part 1 — Discovery Brief: Say \"Prepare a discovery brief for a potential client.\" TACIT uses workspace knowledge to build a discovery framework. The brief should be a STYLED HTML REPORT opened in the browser (same as Experience 7). Part 2 — Voice Composition: After the brief, draft an intro email using the TACIT Voice Resonance system. MANDATORY: (1) Call tacit_voice_list_profiles to find the user's voice profile. A profile MUST exist — voice samples were pre-loaded during workspace setup. (2) Call tacit_compose_in_voice with the email request and the user's profile. This uses TACIT's actual voice fingerprinting system, NOT LLM approximation. NEVER draft the email yourself and claim it matches the user's voice — that is fake voice matching. NEVER offer to \"paste a sample email\" or \"upload writing samples\" — voice profiles are already loaded. If tacit_voice_list_profiles returns no profiles, say \"I expected to find your voice profile but it is not set up yet — let me check with the team\" and move on. Do NOT fall back to LLM-generated voice mimicry.";
|
|
131
|
+
readonly signal: "First sales deliverable as HTML report, then first voice-matched composition using TACIT Voice Resonance (not LLM approximation)";
|
|
132
|
+
readonly tip: "Voice Resonance is a real system — it analyzes your writing samples to capture your cadence, vocabulary, and patterns. Every \"in my voice\" request routes through this system.";
|
|
133
133
|
}, {
|
|
134
134
|
readonly id: "morning_brief";
|
|
135
135
|
readonly num: 9;
|
|
136
136
|
readonly name: "Morning Brief";
|
|
137
137
|
readonly tier: 2;
|
|
138
138
|
readonly tierName: "The Operating System";
|
|
139
|
-
readonly action: "
|
|
140
|
-
readonly signal: "First daily operating picture with
|
|
141
|
-
readonly tip: "Meet your executive team.
|
|
139
|
+
readonly action: "IMPORTANT — CONNECTOR DETECTION: Before running the brief, CHECK your available MCP tool list to determine what is connected. Gmail IS connected if you have mcp__claude_ai_Gmail__* tools available. Slack IS connected if you have mcp__plugin_*_slack__* tools. Calendar IS connected if you have mcp__claude_ai_Google_Calendar__* tools. Do NOT say \"Gmail not connected\" if you can see Gmail MCP tools — that is a false negative. Run the COS daily brief: gather workspace state (programs, deadlines, proposals, KB freshness), and for each connected tool, pull real data — Gmail threads, Slack channels, Calendar events. Present the full operating picture. If a connector genuinely has no MCP tools available, say \"not yet connected\" and explain how to connect via claude.ai Integrations. After the brief, offer to draft a team message using tacit_compose_in_voice (same voice system as Experience 8 — NEVER LLM approximation).";
|
|
140
|
+
readonly signal: "First daily operating picture with accurate connector status and real data from connected tools";
|
|
141
|
+
readonly tip: "Meet your executive team. COS (Chief of Staff — daily ops, email, meetings), COO (Chief Operating Officer — business ops, sales, audits), GM (General Manager — content ingestion, classification, pyramid placement). Address them by name to route through their workflow.";
|
|
142
142
|
}, {
|
|
143
143
|
readonly id: "audit_business";
|
|
144
144
|
readonly num: 10;
|
|
@@ -154,8 +154,8 @@ export declare const EXPERIENCES: readonly [{
|
|
|
154
154
|
readonly name: "Your Operating Rhythm";
|
|
155
155
|
readonly tier: 3;
|
|
156
156
|
readonly tierName: "Agentic Mastery";
|
|
157
|
-
readonly action: "
|
|
158
|
-
readonly signal: "
|
|
157
|
+
readonly action: "Summarize what the user has accomplished across the onboarding and suggest their operating rhythm. CONNECTOR STATUS: Check your available MCP tool list — if you have Gmail/Slack/Calendar/Drive MCP tools, those ARE connected. Do NOT say they are disconnected. VOICE: Call tacit_voice_list_profiles — if profiles exist, voice is ready. Do NOT ask the user to upload samples if profiles already exist. Focus on: (1) Daily rhythm — morning brief via COS, email triage, meeting prep. (2) Weekly rhythm — COO business review, GM content organization. (3) Delegation — crew dispatch for complex deliverables. (4) What to explore next based on what they have connected and used.";
|
|
158
|
+
readonly signal: "User has a clear picture of their operating rhythm and next steps";
|
|
159
159
|
readonly tip: "By now you know the team: COS for daily ops, COO for business operations, GM for content. Address them directly anytime.";
|
|
160
160
|
}];
|
|
161
161
|
export declare function registerPrompts(server: McpServer, getClientFn?: () => Promise<TacitClient>): void;
|
package/dist/prompts.js
CHANGED
|
@@ -18,6 +18,25 @@ function buildAssistantSystemPrompt(state) {
|
|
|
18
18
|
lines.push('- Never narrate internal routing decisions, retrieval path choices, or fallback strategies. If one approach does not return results, silently try another. The user should see the answer, not the search process.');
|
|
19
19
|
lines.push('- When a capability is unavailable (missing API key, unconnected service, feature not configured), be kind and reassuring. Say what you CAN do, not what is broken. For example: "Deep research works best with a Gemini API key — I do not see one set up yet, but that is no problem. I have great research tools built in, so let me use those today." Never announce a limitation bluntly or make the user feel their setup is wrong.');
|
|
20
20
|
lines.push('');
|
|
21
|
+
lines.push('## Connector detection (MANDATORY)');
|
|
22
|
+
lines.push('');
|
|
23
|
+
lines.push('NEVER assume a tool is disconnected without checking. Your MCP tool list IS the source of truth:');
|
|
24
|
+
lines.push('- Gmail IS connected if you have tools matching mcp__claude_ai_Gmail__*');
|
|
25
|
+
lines.push('- Slack IS connected if you have tools matching mcp__plugin_*_slack__*');
|
|
26
|
+
lines.push('- Google Calendar IS connected if you have tools matching mcp__claude_ai_Google_Calendar__*');
|
|
27
|
+
lines.push('- Google Drive IS connected if you have tools matching mcp__claude_ai_Google_Drive__*');
|
|
28
|
+
lines.push('- GitHub connections: call tacit_github_list_connections to check workspace repo connections');
|
|
29
|
+
lines.push('If a tool is in your available tool list, it IS connected. Do NOT tell the user to "connect" something that is already connected. When presenting connector status, check your tool list first.');
|
|
30
|
+
lines.push('');
|
|
31
|
+
lines.push('## Voice composition (MANDATORY)');
|
|
32
|
+
lines.push('');
|
|
33
|
+
lines.push('When the user asks for anything "in my voice" or you need voice-matched composition:');
|
|
34
|
+
lines.push('1. Call tacit_voice_list_profiles to find their voice profile.');
|
|
35
|
+
lines.push('2. Call tacit_compose_in_voice with the request. This uses TACIT Voice Resonance — a real system that analyzes writing samples to capture cadence, vocabulary, and patterns.');
|
|
36
|
+
lines.push('3. NEVER draft text yourself and claim it matches the user\'s voice. That is LLM approximation, not voice matching.');
|
|
37
|
+
lines.push('4. NEVER offer to "paste a sample email" or "upload writing samples" during onboarding — voice profiles are pre-loaded during workspace setup.');
|
|
38
|
+
lines.push('5. If no voice profile exists, say so honestly and move on — do not fake it.');
|
|
39
|
+
lines.push('');
|
|
21
40
|
lines.push('## How you work');
|
|
22
41
|
lines.push('');
|
|
23
42
|
lines.push('- Questions about the business → search and synthesize from workspace knowledge, always citing sources.');
|
|
@@ -127,7 +146,7 @@ export const GM_WORKFLOW = {
|
|
|
127
146
|
{
|
|
128
147
|
id: 'ingest',
|
|
129
148
|
name: 'Ingest',
|
|
130
|
-
action: 'Call tacit_gm_ingest with a title and the content (inline text via "content", or a local file via "file_path" — never both). Do NOT set domain_id. The response includes a placement_proposal with suggested_surface ("kb" or "pyramid") and a confidence score — use this as a starting hint for step 2, but let the user choose the final surface.',
|
|
149
|
+
action: 'Call tacit_gm_ingest with a title and the content (inline text via "content", or a local file via "file_path" — never both). Do NOT set domain_id. When the user wants the content placed on two surfaces (pyramid AND KB), set cross_reference: true on tacit_gm_ingest — the first placement cycle then chains into a second automatically. The response includes a placement_proposal with suggested_surface ("kb" or "pyramid") and a confidence score — use this as a starting hint for step 2, but let the user choose the final surface.',
|
|
131
150
|
tools: ['tacit_gm_ingest'],
|
|
132
151
|
signal: 'You receive a catalog_id, artifact_id, content_type, and is_duplicate flag. Save the catalog_id — you will need it for placement.',
|
|
133
152
|
on_duplicate: 'If is_duplicate is true, tell the user this content already exists and ask how to proceed: update, skip, or ingest as a new version.',
|
|
@@ -135,29 +154,29 @@ export const GM_WORKFLOW = {
|
|
|
135
154
|
{
|
|
136
155
|
id: 'classify_present',
|
|
137
156
|
name: 'Present classification and offer options',
|
|
138
|
-
action: 'Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM\'s suggested surface. Say something like: "Your [title] is cataloged. Where should it live? I can file it in your workspace structure, add it to your knowledge base, both, or keep it in the data lake for now. Or say \'you decide\' and I\'ll recommend a spot." STOP here and wait for the user to respond. Do not proceed until they choose. IMPORTANT: When the user picks a surface (e.g. "pyramid", "KB", "workspace structure"), that is a SURFACE CHOICE — it tells you which direction to explore, NOT which specific location to place it. You MUST still proceed to step 3 (drill down) and step 4 (propose specific location and wait for approval). Surface choice ≠ location approval.',
|
|
157
|
+
action: 'Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM\'s suggested surface. Say something like: "Your [title] is cataloged. Where should it live? I can file it in your workspace structure, add it to your knowledge base, both, or keep it in the data lake for now. Or say \'you decide\' and I\'ll recommend a spot." STOP here and wait for the user to respond. Do not proceed until they choose. IMPORTANT: When the user picks a surface (e.g. "pyramid", "KB", "workspace structure"), that is a SURFACE CHOICE — it tells you which direction to explore, NOT which specific location to place it. You MUST still proceed to step 3 (drill down) and step 4 (propose specific location and wait for approval). Surface choice ≠ location approval. If the user changes their mind about the surface mid-flow, call tacit_gm_reset and offer the surfaces again.',
|
|
139
158
|
tools: [],
|
|
140
159
|
signal: 'User chooses: workspace structure, knowledge base, both, lake-only, or "you decide." This choice triggers drill-down and a specific location proposal — it is NOT placement approval.',
|
|
141
160
|
},
|
|
142
161
|
{
|
|
143
162
|
id: 'review_structure',
|
|
144
163
|
name: 'Review workspace structure (MANDATORY for pyramid placement)',
|
|
145
|
-
action: 'You MUST call ALL FOUR tools in sequence — do not skip any: (1) Call tacit_pyramid_list_portfolios to see all portfolios. Pick the best fit. (2) Call tacit_pyramid_list_value_streams — if value streams exist, identify which one aligns with the content. (3) Call tacit_pyramid_list_programs with the portfolio_id. Pick the best-fit program. (4) Call tacit_pyramid_list_dossiers with that program_id. Pick the best-fit dossier. If no dossier fits, note that you will propose creating a new one. You MUST drill down to the dossier level — placing at the program level without a dossier creates an orphan.',
|
|
164
|
+
action: 'You MUST call ALL FOUR tools in sequence — do not skip any: (1) Call tacit_pyramid_list_portfolios to see all portfolios. Pick the best fit. (2) Call tacit_pyramid_list_value_streams — if value streams exist, identify which one aligns with the content. (3) Call tacit_pyramid_list_programs with the portfolio_id. Pick the best-fit program. (4) Call tacit_pyramid_list_dossiers with that program_id. Pick the best-fit dossier. If no dossier fits, note that you will propose creating a new one. You MUST drill down to the dossier level — placing at the program level without a dossier creates an orphan. For a KB surface: call tacit_kb_list_collections and pick the best-fit collection.',
|
|
146
165
|
tools: ['tacit_pyramid_list_portfolios', 'tacit_pyramid_list_value_streams', 'tacit_pyramid_list_programs', 'tacit_pyramid_list_dossiers'],
|
|
147
166
|
signal: 'You have identified a specific portfolio → value stream (if any) → program → dossier, or determined a new dossier name is needed.',
|
|
148
|
-
skip_when: 'User chose
|
|
167
|
+
skip_when: 'User chose lake-only.',
|
|
149
168
|
},
|
|
150
169
|
{
|
|
151
170
|
id: 'propose',
|
|
152
171
|
name: 'Propose and WAIT for approval',
|
|
153
|
-
action: 'Present a specific proposal and STOP. Do not call tacit_gm_approve yet. For pyramid, say: "I\'d file this under [portfolio] → [value stream] → [program] → [dossier] — [one sentence reason]. Should I go ahead?" (Omit value stream only if the workspace has none.) If proposing a new dossier: "There\'s no dossier that fits under [program], so I\'d create one called [name]. Good?" For KB: "I\'d add this to your [collection] knowledge base
|
|
172
|
+
action: 'Present a specific proposal and STOP. Do not call tacit_gm_approve yet. For pyramid, say: "I\'d file this under [portfolio] → [value stream] → [program] → [dossier] — [one sentence reason]. Should I go ahead?" (Omit value stream only if the workspace has none.) If proposing a new dossier: "There\'s no dossier that fits under [program], so I\'d create one called [name]. Good?" For KB: "I\'d add this to your [collection] knowledge base as a draft article you can publish anytime. Approve?" CRITICAL: You MUST wait for the user to say yes, approve, or confirm BEFORE proceeding to the next step. Do NOT interpret ANY of these as approval of a specific location: "place it", "add it to the workspace", "you decide", "pyramid", "KB", "knowledge base", "workspace structure". Those are SURFACE choices — the user still needs to see and approve the SPECIFIC portfolio → value stream → program → dossier path (or specific collection for KB) that you are proposing. If the classifier\'s suggestion does not fit, propose a better location; never place it yourself instead of asking.',
|
|
154
173
|
tools: [],
|
|
155
174
|
signal: 'User explicitly approves ("yes", "approve", "do it", "go ahead"), redirects to a different location, or declines.',
|
|
156
175
|
},
|
|
157
176
|
{
|
|
158
177
|
id: 'place',
|
|
159
178
|
name: 'Execute approved placement',
|
|
160
|
-
action: 'ONLY after the user explicitly approved the proposal in step 4: For pyramid — if a new dossier is needed, call tacit_pyramid_create_dossier first to get the dossier_id. Then call tacit_gm_approve with the catalog_id from step 1, surface="pyramid", collection_or_program set to the program UUID, and dossier_id set to the dossier UUID. NEVER call tacit_gm_approve without a dossier_id for pyramid placement. For KB: call tacit_kb_promote_from_artifact with the artifact_id from step 1
|
|
179
|
+
action: 'ONLY after the user explicitly approved the proposal in step 4: For pyramid — if a new dossier is needed, call tacit_pyramid_create_dossier first to get the dossier_id. Then call tacit_gm_approve with the catalog_id from step 1, surface="pyramid", collection_or_program set to the program UUID, and dossier_id set to the dossier UUID. NEVER call tacit_gm_approve without a dossier_id for pyramid placement. For KB: call tacit_kb_promote_from_artifact with the artifact_id from step 1, the collection UUID, and status "DRAFT" — the article lands as a draft the user can publish anytime (tacit_gm_approve does not place KB content). For both: pyramid first, then KB (two separate calls). For lake-only: no call needed.',
|
|
161
180
|
tools: ['tacit_gm_approve', 'tacit_kb_promote_from_artifact', 'tacit_pyramid_create_dossier'],
|
|
162
181
|
signal: 'tacit_gm_approve or tacit_kb_promote_from_artifact returns success.',
|
|
163
182
|
skip_when: 'User chose lake-only.',
|
|
@@ -176,13 +195,13 @@ export const EXPERIENCES = [
|
|
|
176
195
|
{ id: 'see_capabilities', num: 2, name: 'See What\'s Possible', tier: 1, tierName: 'Orient & Equip', action: 'Type: "What can TACIT do for me?" — discover the full range of capabilities available to you.', signal: 'You know what TACIT can do and are ready to try it', tip: '' },
|
|
177
196
|
{ id: 'first_light', num: 3, name: 'First Light', tier: 1, tierName: 'Orient & Equip', action: 'Ask a question about your business — try "What do we know about [topic]?"', signal: 'First grounded answer drawn from your workspace knowledge', tip: '' },
|
|
178
197
|
{ id: 'feed_it', num: 4, name: 'Feed It', tier: 1, tierName: 'Orient & Equip', action: 'Turn your first answer into a workspace document. Say: "Take what you just told me and add it to the workspace." TACIT will use the synthesis from your last question as the document body and route it through your General Manager. The GM will classify it, then propose where it should live in your workspace. You approve before anything moves. If you already know where you want it, say so — otherwise say "you decide" and the GM will recommend a spot.', signal: 'First content ingested and placed via GM propose-then-approve', tip: 'Your General Manager handles content routing and placement. Everything goes through a propose-then-approve flow — the GM recommends where content belongs, and nothing moves without your say-so.' },
|
|
179
|
-
{ id: 'build_your_map', num: 5, name: 'Build Your Map', tier: 1, tierName: 'Orient & Equip', action: '
|
|
180
|
-
{ id: 'connect_your_tools', num: 6, name: 'Connect Your Tools', tier: 1, tierName: 'Orient & Equip', action: '
|
|
181
|
-
{ id: 'research_publish', num: 7, name: 'Research & Publish', tier: 2, tierName: 'The Operating System', action: 'Research a topic and publish a report
|
|
182
|
-
{ id: 'run_sales', num: 8, name: 'Run Sales', tier: 2, tierName: 'The Operating System', action: '
|
|
183
|
-
{ id: 'morning_brief', num: 9, name: 'Morning Brief', tier: 2, tierName: 'The Operating System', action: '
|
|
198
|
+
{ id: 'build_your_map', num: 5, name: 'Build Your Map', tier: 1, tierName: 'Orient & Equip', action: 'Show the user their current Pyramid structure by calling tacit_pyramid_list_portfolios, then tacit_pyramid_list_programs for each portfolio. Present a clear map of what exists. Then invite the user to make ONE change to prove they can reshape it — suggest something concrete like: "Want to create a new program, rename something, or move content around? Pick one and I will walk you through it." WAIT for the user to try something. Do NOT mark this experience complete until the user has either (a) made a structural change (create, rename, move) or (b) explicitly said they are satisfied with the current structure and want to move on. Showing the map alone is not completion — the user must interact with the structure.', signal: 'User has explored their workspace map AND either made a change or confirmed they are satisfied with the current structure', tip: 'You can always reorganize later. Say "Move this to [collection]" or "Create a new program for [topic]" anytime. Your General Manager proposes, you approve.' },
|
|
199
|
+
{ id: 'connect_your_tools', num: 6, name: 'Connect Your Tools', tier: 1, tierName: 'Orient & Equip', action: 'First, CHECK what is already connected before telling the user anything: (1) Call tacit_github_list_connections to see GitHub repo connections. (2) Check your available MCP tool list — if you have Gmail tools (mcp__claude_ai_Gmail__*), Gmail IS connected. If you have Slack tools (mcp__plugin_*_slack__*), Slack IS connected. If you have Google Calendar tools, Calendar IS connected. If you have Google Drive tools, Drive IS connected. Present a CONNECTION STATUS showing what is already active and what is not. For anything already connected, say "Already connected — ready to use." For anything not connected, explain how to connect it via claude.ai Settings → Integrations. Also show GitHub workspace connections from step 1. Do NOT say a tool is disconnected if you can see its MCP tools in your available tool list. WAIT for the user to either connect something new or confirm they want to move on.', signal: 'User knows their connection status and has either connected new tools or confirmed they are ready to proceed', tip: 'GitHub connections sync your repos into the workspace. Gmail and Slack power the Morning Brief. Google Drive lets you pull in documents directly.' },
|
|
200
|
+
{ id: 'research_publish', num: 7, name: 'Research & Publish', tier: 2, tierName: 'The Operating System', action: 'Research a topic and publish a report. Ask the user what they want to research, or suggest a topic relevant to their business. Then: (1) Search workspace knowledge via tacit_search or tacit_synthesize. (2) Search the web for current information. (3) Combine findings into a STYLED HTML REPORT — this MUST be a proper designed artifact opened in the browser for the user to see, not plain text in the chat. The report should have a title, date, executive summary, sections with findings, citations, and a professional layout. Use the artifact/design tools available to create and open the HTML report so the user sees it in their browser. (4) After the report is created, route it through the GM workflow (tacit_gm_ingest) so the GM proposes where to file it. The user approves placement. The key deliverable is the HTML report opened in the browser — the user should SEE a polished document, not just read text in the terminal.', signal: 'First research artifact published as an HTML report opened in the browser, then filed via GM workflow', tip: 'After publishing, your General Manager will propose where to place the report in your knowledge structure — you approve the placement.' },
|
|
201
|
+
{ id: 'run_sales', num: 8, name: 'Run Sales', tier: 2, tierName: 'The Operating System', action: 'Part 1 — Discovery Brief: Say "Prepare a discovery brief for a potential client." TACIT uses workspace knowledge to build a discovery framework. The brief should be a STYLED HTML REPORT opened in the browser (same as Experience 7). Part 2 — Voice Composition: After the brief, draft an intro email using the TACIT Voice Resonance system. MANDATORY: (1) Call tacit_voice_list_profiles to find the user\'s voice profile. A profile MUST exist — voice samples were pre-loaded during workspace setup. (2) Call tacit_compose_in_voice with the email request and the user\'s profile. This uses TACIT\'s actual voice fingerprinting system, NOT LLM approximation. NEVER draft the email yourself and claim it matches the user\'s voice — that is fake voice matching. NEVER offer to "paste a sample email" or "upload writing samples" — voice profiles are already loaded. If tacit_voice_list_profiles returns no profiles, say "I expected to find your voice profile but it is not set up yet — let me check with the team" and move on. Do NOT fall back to LLM-generated voice mimicry.', signal: 'First sales deliverable as HTML report, then first voice-matched composition using TACIT Voice Resonance (not LLM approximation)', tip: 'Voice Resonance is a real system — it analyzes your writing samples to capture your cadence, vocabulary, and patterns. Every "in my voice" request routes through this system.' },
|
|
202
|
+
{ id: 'morning_brief', num: 9, name: 'Morning Brief', tier: 2, tierName: 'The Operating System', action: 'IMPORTANT — CONNECTOR DETECTION: Before running the brief, CHECK your available MCP tool list to determine what is connected. Gmail IS connected if you have mcp__claude_ai_Gmail__* tools available. Slack IS connected if you have mcp__plugin_*_slack__* tools. Calendar IS connected if you have mcp__claude_ai_Google_Calendar__* tools. Do NOT say "Gmail not connected" if you can see Gmail MCP tools — that is a false negative. Run the COS daily brief: gather workspace state (programs, deadlines, proposals, KB freshness), and for each connected tool, pull real data — Gmail threads, Slack channels, Calendar events. Present the full operating picture. If a connector genuinely has no MCP tools available, say "not yet connected" and explain how to connect via claude.ai Integrations. After the brief, offer to draft a team message using tacit_compose_in_voice (same voice system as Experience 8 — NEVER LLM approximation).', signal: 'First daily operating picture with accurate connector status and real data from connected tools', tip: 'Meet your executive team. COS (Chief of Staff — daily ops, email, meetings), COO (Chief Operating Officer — business ops, sales, audits), GM (General Manager — content ingestion, classification, pyramid placement). Address them by name to route through their workflow.' },
|
|
184
203
|
{ id: 'audit_business', num: 10, name: 'Audit Your Business', tier: 2, tierName: 'The Operating System', action: 'Ask "How healthy is our business?" or request a pulse audit.', signal: 'First scored business health audit', tip: 'You can also say "Have COO review our operational health" — COO coordinates cross-team status and health checks.' },
|
|
185
|
-
{ id: 'operating_rhythm', num: 11, name: 'Your Operating Rhythm', tier: 3, tierName: 'Agentic Mastery', action: '
|
|
204
|
+
{ id: 'operating_rhythm', num: 11, name: 'Your Operating Rhythm', tier: 3, tierName: 'Agentic Mastery', action: 'Summarize what the user has accomplished across the onboarding and suggest their operating rhythm. CONNECTOR STATUS: Check your available MCP tool list — if you have Gmail/Slack/Calendar/Drive MCP tools, those ARE connected. Do NOT say they are disconnected. VOICE: Call tacit_voice_list_profiles — if profiles exist, voice is ready. Do NOT ask the user to upload samples if profiles already exist. Focus on: (1) Daily rhythm — morning brief via COS, email triage, meeting prep. (2) Weekly rhythm — COO business review, GM content organization. (3) Delegation — crew dispatch for complex deliverables. (4) What to explore next based on what they have connected and used.', signal: 'User has a clear picture of their operating rhythm and next steps', tip: 'By now you know the team: COS for daily ops, COO for business operations, GM for content. Address them directly anytime.' },
|
|
186
205
|
];
|
|
187
206
|
export function registerPrompts(server, getClientFn) {
|
|
188
207
|
server.prompt('assistant_system', 'System prompt for the TACIT workspace assistant — includes persona, progressive disclosure, and safety rules.', async () => {
|
package/dist/tools/gm.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
11
11
|
import { TacitClient } from '../client.js';
|
|
12
|
+
import { WorkflowGate } from '../workflow-gate.js';
|
|
12
13
|
export interface ToolRequest {
|
|
13
14
|
execute(): Promise<{
|
|
14
15
|
content: Array<{
|
|
@@ -50,6 +51,7 @@ export declare const gmIngestInputSchema: z.ZodObject<{
|
|
|
50
51
|
domain?: string | undefined;
|
|
51
52
|
content_type?: string | undefined;
|
|
52
53
|
}>>;
|
|
54
|
+
cross_reference: z.ZodOptional<z.ZodBoolean>;
|
|
53
55
|
}, "strip", z.ZodTypeAny, {
|
|
54
56
|
title: string;
|
|
55
57
|
content?: string | undefined;
|
|
@@ -60,6 +62,7 @@ export declare const gmIngestInputSchema: z.ZodObject<{
|
|
|
60
62
|
domain?: string | undefined;
|
|
61
63
|
content_type?: string | undefined;
|
|
62
64
|
} | undefined;
|
|
65
|
+
cross_reference?: boolean | undefined;
|
|
63
66
|
}, {
|
|
64
67
|
title: string;
|
|
65
68
|
content?: string | undefined;
|
|
@@ -70,6 +73,7 @@ export declare const gmIngestInputSchema: z.ZodObject<{
|
|
|
70
73
|
domain?: string | undefined;
|
|
71
74
|
content_type?: string | undefined;
|
|
72
75
|
} | undefined;
|
|
76
|
+
cross_reference?: boolean | undefined;
|
|
73
77
|
}>;
|
|
74
78
|
export type GmIngestInput = z.infer<typeof gmIngestInputSchema>;
|
|
75
79
|
export declare const GM_INGEST_TOOL_DEF: {
|
|
@@ -110,6 +114,10 @@ export declare const GM_INGEST_TOOL_DEF: {
|
|
|
110
114
|
};
|
|
111
115
|
description: string;
|
|
112
116
|
};
|
|
117
|
+
cross_reference: {
|
|
118
|
+
type: string;
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
113
121
|
};
|
|
114
122
|
required: string[];
|
|
115
123
|
};
|
|
@@ -147,6 +155,7 @@ export declare const gmApproveInputSchema: z.ZodObject<{
|
|
|
147
155
|
surface: string;
|
|
148
156
|
reason?: string | undefined;
|
|
149
157
|
}>, "many">>>;
|
|
158
|
+
target_path: z.ZodOptional<z.ZodString>;
|
|
150
159
|
}, "strict", z.ZodTypeAny, {
|
|
151
160
|
catalog_id: string;
|
|
152
161
|
approved_targets: {
|
|
@@ -158,6 +167,7 @@ export declare const gmApproveInputSchema: z.ZodObject<{
|
|
|
158
167
|
surface: string;
|
|
159
168
|
reason?: string | undefined;
|
|
160
169
|
}[];
|
|
170
|
+
target_path?: string | undefined;
|
|
161
171
|
}, {
|
|
162
172
|
catalog_id: string;
|
|
163
173
|
approved_targets: {
|
|
@@ -169,6 +179,7 @@ export declare const gmApproveInputSchema: z.ZodObject<{
|
|
|
169
179
|
surface: string;
|
|
170
180
|
reason?: string | undefined;
|
|
171
181
|
}[] | undefined;
|
|
182
|
+
target_path?: string | undefined;
|
|
172
183
|
}>;
|
|
173
184
|
export type GmApproveInput = z.infer<typeof gmApproveInputSchema>;
|
|
174
185
|
export declare const GM_APPROVE_TOOL_DEF: {
|
|
@@ -227,6 +238,10 @@ export declare const GM_APPROVE_TOOL_DEF: {
|
|
|
227
238
|
};
|
|
228
239
|
description: string;
|
|
229
240
|
};
|
|
241
|
+
target_path: {
|
|
242
|
+
type: string;
|
|
243
|
+
description: string;
|
|
244
|
+
};
|
|
230
245
|
};
|
|
231
246
|
required: string[];
|
|
232
247
|
};
|
|
@@ -239,5 +254,15 @@ export declare function handleGmApprove(args: unknown): Promise<{
|
|
|
239
254
|
}>;
|
|
240
255
|
isError?: boolean;
|
|
241
256
|
}>;
|
|
242
|
-
export declare
|
|
257
|
+
export declare const gmResetInputSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
258
|
+
export declare const GM_RESET_TOOL_DEF: {
|
|
259
|
+
name: "tacit_gm_reset";
|
|
260
|
+
description: string;
|
|
261
|
+
inputSchema: {
|
|
262
|
+
type: "object";
|
|
263
|
+
properties: {};
|
|
264
|
+
required: string[];
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
export declare function registerGmTools(server: McpServer, getClientFn: () => Promise<TacitClient>, gate: WorkflowGate): void;
|
|
243
268
|
export {};
|