/** * Install-time Context Cloud guidance for assistant-specific instruction surfaces. * Reconstruct-owned artifacts use HTML comment markers for safe removal via * `reconstruct uninstall-guidance`. */ import type { McpInstallTargetId } from "../assistants/install-targets"; export declare const GUIDANCE_MARKER_START = ""; export declare const GUIDANCE_MARKER_END = ""; export declare const CURSOR_GUIDANCE_RULE_BASENAME = "reconstruct-context-cloud.mdc"; export declare const COPILOT_INSTRUCTIONS_REL: string; /** Shared markdown body (without markers). */ export declare const CONTEXT_CLOUD_GUIDANCE_BODY = "## Reconstruct Context Cloud (when linked)\n\nUse Context Cloud **only when the workspace is linked and MCP is up**\u2014never block the user's task on it.\n\n**Decision gate (quick; do not loop)**\n\n1. **MCP connected?** Reconstruct tools (`ask_context_cloud`, `query_context`, \u2026) must be available. If not \u2192 skip Context Cloud; use the repo, docs, or ask the user. Do not retry MCP setup mid-task.\n\n2. **Workspace linked?** Look for **`.reconstruct/preferences.json`** from the current working directory upward (stop at the git/repo root). \n - **No `.reconstruct/`** \u2192 not linked. Skip Context Cloud. Mention `/recon-setup` only if the user explicitly wants Reconstruct project knowledge. \n - **File exists** \u2192 read JSON and take **`project_id`** (UUID string). \n - **Missing or empty `project_id`** \u2192 skip Context Cloud; do not call tools without a valid id.\n\n3. **Need project knowledge?** (architecture, conventions, prior decisions, \"how does X work?\") \u2192 one call with that id:\n\n```\nask_context_cloud({\n project_id: \"\",\n question: \"\"\n})\n```\n\nFor raw sections or filters, use **`query_context`** with the same **`project_id`**.\n\n**If retrieval is weak** (`no_matches`, `thin_context`, `retrieval_failed`): read the tool's `guidance` once, optionally one `query_context` follow-up, then **move on**. Do not invent project facts, do not retry in a loop, and do not stall the task.\n\n**`ask_constructor`** is for implementation packages (capsule + plan), not casual lookups.\n\n**Keep momentum:** Prefer shipping the user's request over perfect Context Cloud coverage."; export declare const CURSOR_GUIDANCE_RULE_DESCRIPTION = "When .reconstruct/preferences.json exists, read project_id and use ask_context_cloud for project-knowledge questions; skip if MCP missing, workspace unlinked, or retrieval is weak."; export type GuidanceArtifactKind = "file" | "section"; export type GuidanceArtifact = { kind: GuidanceArtifactKind; path: string; /** Repo root when artifact is workspace-scoped (Copilot). */ workspaceRoot?: string; }; export type GuidanceManifest = { version: 1; artifacts: Partial>; }; export declare function wrapWithMarkers(body: string): string; export declare function insertOrReplaceMarkedSection(existing: string, body: string): string; export declare function removeMarkedSection(content: string): { content: string; removed: boolean; }; export declare function fileContainsReconstructGuidance(content: string): boolean; export declare function getGuidanceManifestPath(): string; export declare function getCursorGuidanceRulePath(): string; export declare function getClaudeGuidancePath(): string; export declare function getCodexGuidancePath(): string; export declare function getCopilotRepoInstructionsPath(workspaceRoot?: string): string; /** Cursor: always-on global rule (opt-in via --with-guidance). */ export declare function installCursorGuidance(): Promise; /** Claude Code: marked section in user CLAUDE.md (opt-in via --with-guidance). */ export declare function installClaudeGuidance(): Promise; /** Codex: marked section in global AGENTS.md (automatic on Codex install). */ export declare function installCodexGuidance(): Promise; /** Copilot: marked repo instructions (opt-in via --with-guidance). */ export declare function installCopilotRepoGuidance(workspaceRoot?: string): Promise; export type GuidanceUninstallResult = { removed: string[]; skipped: string[]; }; export declare function uninstallGuidanceForTarget(target: McpInstallTargetId, options?: { workspaceRoot?: string; }): Promise; export declare function uninstallGuidance(targets: McpInstallTargetId[], options?: { workspaceRoot?: string; }): Promise; //# sourceMappingURL=guidance-install.d.ts.map