You are about to install and configure the Siftable CLI — a unified command-line interface for task management, agent work queues, calendar, knowledge, people/CRM, semantic code search, code memory, structured datasets, documents, encrypted vault, and project context. The primary binary is `sift`. Compatibility aliases `siftable` and `exf` may also exist, but write all new workspace config with `sift` commands. Follow these phases exactly. Complete each phase before moving to the next. Do not skip steps. Do not paraphrase commands — run the command shown for the branch you are in. ═══════════════════════════════════════════════════════════════════════════ PHASE 1 — ENVIRONMENT CHECK ═══════════════════════════════════════════════════════════════════════════ 1. Run: node --version → Require v18+. If missing or too old, stop and tell me. 2. Run: sift --version → If this returns a version string, save it and continue to Phase 2. → If "command not found", run: npm install -g @siftable/cli → After install, run: sift --version 3. If install fails with an EEXIST error for an old `exf` binary: Run: exf --version → If this prints `@siftable/cli`, run: npm uninstall -g @execufunction/cli → Then run: npm install -g @siftable/cli → Then run: sift --version 4. Run: siftable --version Run: exf --version → These aliases should print the same package/version. If either alias is missing but `sift` works, continue and note that only the primary binary is available. ═══════════════════════════════════════════════════════════════════════════ PHASE 2 — AUTHENTICATION ═══════════════════════════════════════════════════════════════════════════ Run: sift auth status --json If authenticated=true, continue. If not authenticated, run: sift auth login This uses device flow — it will print a verification code and a URL. Show me the code and URL. I will open the link in my browser and approve it. Wait for the CLI to confirm the login before continuing. If this hangs or fails, tell me to run this manually in a separate terminal and then come back. After login succeeds, run: sift projects list --json Save this output — you will need it in Phase 3. ═══════════════════════════════════════════════════════════════════════════ PHASE 3 — PERSONALIZE ═══════════════════════════════════════════════════════════════════════════ Ask the user THREE questions, one at a time. Wait for each answer before asking the next. Do NOT answer these yourself or skip ahead. If you have access to a structured user-question tool, use it for each question. Otherwise, present the options as text and wait for a response. QUESTION 1 — Role: header: "Role" question: "What's your role?" options: - label: "Developer" description: "Writing and shipping code" - label: "PM" description: "Specs, roadmaps, and coordination" - label: "DevOps" description: "Infrastructure, deploys, and secrets" - label: "Lead" description: "Code review, team oversight, mentoring" - label: "Researcher" description: "Knowledge, documents, and discovery" multiSelect: false If the user says "defaults" or "skip" at any point, stop asking and use: role=Developer, domains=all, autonomy=Auto-safe QUESTION 2 — Domains: header: "Domains" question: "Which domains matter most for this project?" options: - label: "Tasks" description: "Track work items, priorities, and progress" - label: "Code" description: "Semantic code search, memory, history, expertise" - label: "Knowledge" description: "Notes, documents, and semantic search" - label: "Calendar" description: "Events, scheduling, and deadlines" - label: "Work" description: "Agent work queues and handoffs" - label: "Data" description: "Structured datasets, analysis, import/export" multiSelect: true Vault, people/CRM, auth, and project context are always included for safety rules and basic orientation, even if they are not selected as focus domains. QUESTION 3 — Autonomy: header: "Autonomy" question: "How autonomous should I be with sift commands?" options: - label: "Confirm everything" description: "Ask before any command that writes data" - label: "Auto-safe" description: "Run reads and normal creates/updates; confirm risky actions" - label: "Full trust" description: "Auto-execute everything except vault reads" multiSelect: false ──────────────────────────────────────────────────────────────────────── PROJECT SELECTION ──────────────────────────────────────────────────────────────────────── Using the projects list output from Phase 2, determine which scenario applies: A) NO PROJECTS EXIST (empty list): This is the user's first project. Run: sift projects create --name "" --summary "" --json Show the user what you created and save the project ID. B) EXISTING PROJECT MATCHES this repo: If a project name clearly matches the current repo/directory, confirm: "I see a project called '' — should I link this workspace to it?" If yes, save that project ID. If no, offer to create a new one. C) NO MATCHING PROJECT but other projects exist: Show the user a short project list and ask: "Which project is this workspace for? Or should I create a new one?" If new, run: sift projects create --name "" --summary "" --json Save the project ID either way. Once a project is selected, run: sift projects context --json Read the output silently. Use it to understand existing tasks, notes, signals, and conventions when writing the config files in Phase 5. ═══════════════════════════════════════════════════════════════════════════ PHASE 4 — LEARN THE TOOL ═══════════════════════════════════════════════════════════════════════════ Run: sift --help Do NOT paste the full output into chat. Read it silently. Use this knowledge to write the config files in Phase 5. The current top-level domains are: auth — Authentication lifecycle tasks — Human planning tasks: intent, priority, dependencies, approval projects — Project context, planning, membership, signals notes — Knowledge notes and semantic search calendar — Events and scheduling people — Contacts and CRM search codebase — Repository indexing, snapshots, semantic code search code — Git history, blame, expertise, task-code links, code memory work — Executable agent work queue: claim, lease, run, review, verify agents — Agent aliases and assigned work datasets — Structured datasets, records, analysis, ranking, plots documents — Upload PDFs, Markdown, or text into knowledge vault — Encrypted secret metadata and audited reads organizations — Organizations and companies codex — Codex automation helpers Every command supports --json for machine-readable output. Use --json whenever you parse output or need reliable context. Pipe large output to a temp file and summarize only the relevant parts. ═══════════════════════════════════════════════════════════════════════════ PHASE 5 — CONFIGURE WORKSPACE ═══════════════════════════════════════════════════════════════════════════ Detect which agent environment you are running in, then create or update the appropriate config files. You may need to create MORE THAN ONE if multiple config standards exist in this repo. Create ALL files that apply. Do not ask me which ones — detect and do it. If a file already has a Siftable CLI section, update that section in place. If no Siftable CLI section exists, append a new section. Do not overwrite unrelated content. Use a clear header: ## Siftable CLI Use the user's answers from Phase 3 to customize the config. ──────────────────────────────────────────────────────────────────────── PERSONALIZATION RULES ──────────────────────────────────────────────────────────────────────── ROLE-BASED EMPHASIS — tailor "When to use sift" and "Always Do" sections: [developer] Emphasize: tasks, codebase search, code memory, vault metadata [PM] Emphasize: tasks with acceptance criteria and scope, calendar, notes, project planning. De-emphasize code memory and vault. [devops] Emphasize: vault metadata, code memory integration/gotcha facts, codebase search, project context. Add: "check vault list on session start for credential awareness." [lead] Emphasize: code expertise, who-knows, task phase review, people, meeting notes, project context. [researcher] Emphasize: notes, document upload, datasets, read-only codebase search. De-emphasize vault and task mutation. [other] Use the full default set — do not de-emphasize anything. DOMAIN SCOPING — include entries and examples for the selected domains. If the user picked "all" or "defaults", include everything. Always keep auth, project context, people lookup, and vault safety rules. AUTONOMY — adjust the "Rules" / "Safe commands" / "Ask First" sections: [confirm-everything] - Auto-execute read-only commands: list, search, get, context, status. - Ask before any command that creates, updates, completes, stores, archives, deletes, imports, indexes, uploads, or writes data. - Show the command you intend to run and wait for approval. [auto-safe] (default) - Auto-execute: list, search, get, context, status, create, update, complete, store, register, snapshot. - Confirm before: delete, bulk-delete, archive, vault read, calendar create, datasets import/export/delete-record, codebase delete, documents upload. [full-trust] - Auto-execute everything except vault read. - Still never cache or log vault secrets in plaintext. PROJECT CONTEXT — include the project ID from Phase 3 in the config: - Add: "Default project: ()" - Add: "Run `sift projects context --json` to refresh context" ──────────────────────────────────────────────────────────────────────── 5A. CLAUDE.md (if you are Claude Code, or if this file exists) ──────────────────────────────────────────────────────────────────────── Append or update this section in CLAUDE.md at the repo root: ## Siftable CLI This project uses `sift` for persistent task tracking, project context, knowledge management, calendar, people/CRM, semantic code search, code memory, agent work queues, datasets, documents, and encrypted vault metadata. `exf` is only a compatibility alias. Default project: () Run `sift projects context --json` to refresh context. ### When to use sift [Include only entries for the user's selected domains, plus project context.] - Track human planning tasks: `sift tasks create --title "..." --priority schedule --project ` - Create executable agent work: `sift work create --title "..." --task --agent --project --verify "npm test" --json` - Find what's in flight: `sift tasks list --status in_progress --project --json` - Get full project context: `sift projects context --json` - Search knowledge base: `sift notes search "..." --json` - Upload documents: `sift documents upload --json` - Semantic code search: `sift codebase search "..." --repo --json` - Store architecture decisions: `sift code memory store --fact "..." --category architecture --repo ` - Check code expertise: `sift code who-knows --json` - Check calendar: `sift calendar list --start YYYY-MM-DD --end YYYY-MM-DD --json` - Look up contacts: `sift people search "..." --json` - Claim agent work: `sift work claim --owner "" --json` - List agent work: `sift work list --agent --project --json` - List datasets: `sift datasets list --json` - Query a dataset: `sift datasets query --json` [IF role=PM, add:] - Create tasks with specs: `sift tasks create --title "..." --project --acceptance-criteria "criterion 1; criterion 2" --scope '{"include":["..."],"exclude":["..."]}'` [IF role=devops, add:] - Audit credential inventory: `sift vault list --json` - Store integration facts: `sift code memory store --fact "..." --category integration --repo ` [IF role=lead, add:] - Check code expertise: `sift code who-knows --json` - Review task status: `sift tasks list --phase in_flight --project --json` ### Rules [Apply AUTONOMY level from Phase 3] - Use `sift tasks create` for human planning records: intent, priority, dependencies, and approval. - Use `sift work create` for executable agent work: claimable queue items with write scope, verification, artifacts, blockers, leases, and review state. - Do not put agent runtime churn into `sift tasks`; link agent work to a parent human task with `--task ` when a planning record exists. - Prefer tracked Siftable records over TODO comments or local markdown checklists. - Prefer `sift notes search` over grepping local notes for knowledge. - Prefer `sift codebase search` over manual grep when semantic lookup is useful. - Prefer `sift code memory store` over adding comments like "NOTE:" in code. - Always use --json when piping output to scripts or parsing programmatically. - When commands produce large output, pipe to a temp file and grep what you need. Do NOT dump raw CLI output into the conversation. - NEVER run `sift vault read` without asking me first. Vault reads are audit-logged and may contain production secrets. [IF autonomy=confirm-everything:] - Ask before running any sift command that creates, updates, completes, stores, imports, uploads, archives, deletes, or otherwise writes data. [IF autonomy=auto-safe:] - Auto-execute reads, creates, updates, completion, context refreshes, and code memory stores. Confirm deletes, archives, vault reads, calendar creates, document uploads, dataset import/export/delete-record, and codebase deletes. [IF autonomy=full-trust:] - Auto-execute all commands. Only confirm vault reads. ──────────────────────────────────────────────────────────────────────── 5B. .cursor/rules/execufunction.mdc (if .cursor/ dir exists) ──────────────────────────────────────────────────────────────────────── Create or update .cursor/rules/execufunction.mdc with this structure: --- description: Rules for using the Siftable CLI (sift) — personalized for [ROLE] globs: "**/*" alwaysApply: false --- Siftable CLI Usage When the user mentions tasks, project context, knowledge lookup, code search, agent work, datasets, calendar, people, or secrets, use the sift CLI. Default project: () Run `sift projects context --json` to refresh context. Use the `sift` CLI for persistent operations: [Include selected domains from this list, plus project context.] - `sift tasks` — human planning: intent, priority, dependencies, approval - `sift projects context --json` — full project snapshot - `sift notes search "" --json` — semantic knowledge search - `sift documents upload --json` — upload PDF, Markdown, or text - `sift codebase search "" --repo --json` — semantic code search - `sift code memory store/search/list` — persistent code facts - `sift code who-knows --json` — code expertise - `sift calendar list/create` — scheduling - `sift people search "" --json` / `sift people list --json` — CRM/contact lookup - `sift work` — executable agent work queue lifecycle: create, claim, start, heartbeat, review, complete - `sift agents` — agent aliases and assigned work - `sift datasets` — structured dataset search, analysis, ranking, bucketing, import/export, schema, and record operations - `sift vault list/search/read` — encrypted secrets; vault read requires user confirmation [Apply AUTONOMY rules] Always use `--json` when parsing output programmatically. Never dump large CLI output into chat — pipe to file and grep. Use `exf` only as a compatibility alias when `sift` is unavailable. ──────────────────────────────────────────────────────────────────────── 5C. .windsurf/rules/execufunction.md (if .windsurf/ dir exists) ──────────────────────────────────────────────────────────────────────── Create or update .windsurf/rules/execufunction.md: # Siftable CLI — [ROLE] profile Default project: () Run `sift projects context --json` to refresh context. Use `sift` for persistent task tracking, project context, knowledge, calendar, code search, code memory, agent work queues, datasets, people/CRM, and encrypted vault metadata. `exf` is only a compatibility alias. Human planning and agent execution are separate lifecycles: - `sift tasks` is for human planning: intent, priority, dependencies, and approval. - `sift work` is for executable agent work: queue rank, claim/lease, write scope, verification commands, artifacts, blockers, and review state. - When agent work comes from a human task, link it with `sift work create --task `. ## Safe commands (auto-execute OK) [IF autonomy=confirm-everything:] Read-only: sift auth status, sift tasks list/get, sift projects list/context, sift notes search/list/get, sift codebase search/list/status/snapshot, sift code memory search/list, sift code blame/history/who-knows, sift calendar list, sift people search/list, sift vault list/search, sift work list/get, sift agents list/get, sift datasets list/get/query/summarize. [IF autonomy=auto-safe:] sift auth status, sift tasks list/get/create/update/complete, sift projects list/context/update, sift notes search/list/get/create/update, sift codebase search/list/status/register/snapshot, sift code memory search/list/store, sift code blame/history/who-knows/expertise/link, sift calendar list, sift people search/list/create/update, sift vault list/search, sift work list/get/create/claim/start/heartbeat/release/review/complete/block/fail, sift agents list/get/create/update, sift datasets list/get/query/summarize/analyze/rank/aggregate/compare/bucket/compute/plot. [IF autonomy=full-trust:] All commands except sift vault read. ## Requires confirmation [Inverse of the above — whatever is NOT in safe commands] ## Rules [Include domain-scoped and role-based rules per PERSONALIZATION RULES above] - Use --json for programmatic parsing. Pipe large output to temp files. - Prefer sift over local markdown files for task and knowledge tracking. - Never cache or log vault secrets in plaintext. ──────────────────────────────────────────────────────────────────────── 5D. AGENTS.md (always create if missing, append or update if exists) ──────────────────────────────────────────────────────────────────────── Append or update this section in AGENTS.md at the repo root: ## Siftable CLI — [ROLE] profile Default project: () Run `sift projects context --json` to refresh context. ### Always Do [Include based on selected domains and role:] - Use `sift tasks create` for human planning tasks instead of TODO comments - Use `sift notes search` to check knowledge base before asking the user - Use `sift codebase search` for semantic code lookup - Use `sift code memory store` to persist architecture decisions and gotchas - Use `sift work create` for agent-executable work queues, linked with `--task ` when a parent human planning task exists - Use `sift datasets` for structured data analysis and record operations - Use `--json` flag when parsing output in scripts - Pipe large command output to temp files instead of dumping to chat [IF role=PM, add:] - Include acceptance criteria and scope boundaries on every task create - Use project planning/context before rebucketing or assigning work [IF role=devops, add:] - Run `sift vault list --json` at session start for credential awareness - Use code memory category "integration" for service connection docs [IF role=lead, add:] - Use `sift code who-knows` to identify reviewers and knowledge holders - Check task phases before assigning new work ### Ask First [Apply AUTONOMY level:] [IF autonomy=confirm-everything:] - Any command that creates, updates, completes, stores, imports, uploads, archives, deletes, or otherwise writes data - `sift vault read` — contains production secrets, audit-logged [IF autonomy=auto-safe:] - `sift vault read` — contains production secrets, audit-logged - Any delete or bulk-delete operation - `sift projects archive` — irreversible project state change - `sift calendar create` — creates real calendar events - `sift documents upload` — persists document content to knowledge - `sift datasets import` / `sift datasets export` / `sift datasets delete-record` - `sift codebase delete` — deletes indexed repository data [IF autonomy=full-trust:] - `sift vault read` — always confirm, contains production secrets ### Never Do - Cache or log vault secrets in plaintext anywhere - Run `sift vault read` without explicit user approval - Dump raw verbose CLI output directly into the conversation [IF autonomy != full-trust:] - Delete tasks, notes, contacts, datasets, code memory, codebase indexes, or calendar events without confirmation ═══════════════════════════════════════════════════════════════════════════ PHASE 6 — VERIFY ═══════════════════════════════════════════════════════════════════════════ 1. Run: sift tasks list --limit 5 --project --json 2. Run: sift projects context --json 3. Run: sift --help 4. List the files you created or modified in Phase 5. Show me a concise summary of the results. Do not paste full JSON unless I ask. If everything returned data, say: "Siftable is configured for as a [ROLE] workspace with [AUTONOMY] autonomy. You can now use `sift` commands in this project."