ae-kb

AE/TE knowledge base CLI manual for creating, importing read-only compiled snapshots, querying, LLM-powered ask, listing accessible knowledge bases and their sources, deterministic index/grep/read retrieval, checking status, ZIP source upload and directory management, raw child-file reading, revisio

By thinkingaiagenticengine · 506 installs

npx skills add thinkingaiagenticengine/ae-cli --skill ae-kb

Source repository · Upstream listing

ae kb Cross skill collaboration When remaining work is outside this skill's scope, or a necessary prerequisite needs another capability, follow [the collaboration protocol](references/collaboration.md). Choose from the skills available in this run by capability, preserve verified context, and continue the remaining task. Reuse this protocol if already loaded. AE CLI ( ae cli ) knowledge base commands are invoked through: Formal publication and pinned reads Read [Publication and read contexts](references/publication.md) for company approval, personal auto publication, candidate inspection and changed only approval previews ( kb candidate changes ), explicit published queries, or consistent multi command retrieval. Compile success can mean a candidate awaiting approval; use kb publication get to verify formal publication. Never treat the working build status as proof that the formal version changed. Global Rules Use this skill for AE knowledge base tasks: create, import a compiled snapshot, query, ask with LLM, list accessible knowledge bases and their sources, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases. Searching a knowledge base for an answer is the most common task. If that is what you are doing, go straight to [Explore Knowledge Base Pages]( explore knowledge base pages) and read [ references/query workflow.md ](references/query workflow.md) first — it is the retrieval procedure. The other commands below are for managing knowledge bases, not answering from them. When retrieved pages will guide project scoped business data analysis, read and follow [ references/analysis workflow.md ](references/analysis workflow.md) before running any data query. This is mandatory after a KB hit identifies an asset, definition, parameter, time rule, conflict, or decision boundary. Verify semantic coverage before execution; a related page or KB limitation is not task completion. Continue ordinary analysis for uncovered requirements without jumping directly to unverified ad hoc analysis or SQL. Read operations can run directly after required inputs are known. Write operations require explicit user intent. Only high risk write commands require the CLI confirmation prompt; use yes after explicit authorization. Prefer dry run before destructive or broad writes when the user has not already validated the target. Do not invent knowledge base names, scopes, source IDs, source display names, or JSON payloads. Ask the user or query known context when values are missing. When building a sources ref (or +read source ), copy the exact scope and name from +list output — run ae cli kb +list first when the scope of a named knowledge base is unknown. JSON flags must be valid JSON strings, usually wrapped in single quotes in shell commands. Successful commands return JSON by default. Use format table only when a table is easier for a human to scan. Envelope may include optional notice.host compat . host <url overrides the active AE host. It is available on every command and may be placed after the subcommand, e.g. ae cli kb +<command host <url . CRITICAL — Host compat (do this first): After each ae cli run, check stderr and notice.host compat . If either is present, open the user reply with a short ⚠️ version warning and quote the npm i g / npx skills add (or update cluster) lines verbatim , then present the business result. Soft tip; ok: true can still carry the notice. Retrieval ( +index / +grep / +read ) is deterministic and server side LLM free; use it for simple factual lookups. Use +ask when the question requires synthesizing across multiple pages or multi hop reasoning. Commands Command Risk Purpose : source create text write Create one ordinary Markdown source from text, UTF 8 file or explicit stdin; saves without compiling. source read text read Read complete ordinary text with its corresponding revision; optionally save original UTF 8 bytes to a new file. source check url updates write Submit an asynchronous check for one compiled custom URL source; success means accepted only. source check updates write Check one compiled Feishu source with the scheduled detector; mark changes without compiling. +ask read LLM powered Q&A over knowledge bases; for multi page synthesis or multi hop questions. +ask status read Query an ask execution, or revisit its original versioned citation with source index . project target get read Resolve the authoritative company project semantic target by project ID, including tag conflicts, disabled and restricted states. +list read List accessible knowledge bases filtered by buildStatus (default: compiled). +list sources read List source metadata for one knowledge base so exact source identifiers can be discovered safely. +index read List accessible knowledge bases and their index.md navigation maps. +grep read Keyword search knowledge base pages; returns a page level results array (hitCount / pageKind / sections previews). +read read Read a full knowledge base page, a line window, or (with outline ) only the page heading tree. +new write Create a new personal or company knowledge base. +import write Import a compiled Markdown ZIP as a personal or company read only snapshot; scope defaults to personal . +import status read Query one snapshot import task by request id without polling; output includes the persisted scope . +add write Upload local files (including ZIP directory sources), a non recursive directory, or HTTP(S) pages converted to markdown. +url write Upload a URL source directly with optional display name and parsing instruction. +schema write Generate the compile schema for a knowledge base. +compile write Compile a knowledge base in incremental or full mode. +status read Query the current status of a knowledge base. usage list read List one page of compilation usage logs, including elapsed time in milliseconds. +rm source high risk write Delete one source from a knowledge base by stable ID; exact display name is legacy compatibility only. +remove write Delete an entire knowledge base. Project Semantic Target Use project target get for project semantic maintenance; +list remains a visible catalog and cannot prove that a project target is missing. The server verifies project access and considers all undeleted company candidates bound to that project, without filtering by enabled state or build state. One candidate is reused for legacy compatibility. With several candidates, exactly one fixed business tag 项目语义 selects the target; zero returns multiple/untagged , several returns multiple/tag conflict . With no binding, the authoritative exact name <project name 项目语义知识库 without another project binding is the legacy fallback, using the same tag rule. available returns the exact target identity and access capabilities. restricted , disabled , and multiple stop maintenance; never select a different visible KB or create a replacement. Only missing permits creation. A query/auth failure or HTTP 404 from an older server is terminal; do not infer absence. Existing explicit target IDs, including stored automation targets, must not be silently switched. +new purpose project semantic is optional and company only, requires one valid project ID, presets the fixed tag on both client and server, and rechecks the target under the server KB write lock. User tags are preserved within the existing total limit of two; overflow fails explicitly. A 409 means refresh the target, not retry with a different name. Ordinary creation without purpose retains its existing behavior. The tag classifies purpose and never grants access. Deploy the supporting Agent API before using the new CLI/Skill path; old CLI requests remain accepted by the new server. Transition status: transitional Owning module: te claude Project Semantic Knowledge Base API Current transport: authenticated Agent REST via kbApi Gateway target: TBD (project semantic target resolution and purpose aware creation) Review after: 2027 01 27 Exit condition: migrate when the KB Gateway equivalent exists, preserving target identity, project isolation, tag and state semantics. Compilation Usage Logs Returns { items, total, page, pageSize } . page defaults to 1; page size defaults to 20 and accepts 1–100. Fetch each page explicitly. durationMs is the usage log's finishedAt startedAt , in milliseconds. A missing or invalid timestamp yields null ; zero remains zero. Failed records can have duration even when usageAvailable is false. Historical missing durations are not reconstructed from compile runs. startedAt and finishedAt are ISO timestamps or null . Requires the same Schema read permission as the Web compilation usage list. Imported snapshots do not expose usage. scope selects exactly personal or company; omission keeps the existing personal then company lookup. dry run previews the read without sending a request. Default output retains numeric/null values; use the existing jq and format table options for a compact table. Transition status: transitional Owning module: te claude External Knowledge Base Usage API Current transport: authenticated External REST via kbApi Gateway target: TBD (compilation usage list) Review after: 2026 12 14 Exit condition: migrate to the Gateway equivalent when available, preserving typed pagination and duration/null semantics. Published Version History Use the nine version commands described in [ references/versions.md ](references/versions.md) to inspect immutable published history, compare source changes, and explicitly roll back an earlier version as a new publication. These commands manage history. Ordinary queries resolve formal published content; Agent/Ask executions and explicit read contexts keep the formal versions captured at the start of that execution or context. Use the returned readView to identify the content actually read. Command Risk Purpose +versions read List published versions and latestVersionId. +version show read Show one version summary. +version sources read Discover historical source IDs. +version diff read Compare two versions. +version tree read List a historical ZIP/URL source directory. +version read read Preview a historical directory child file. +version download read Save one ordinary historical file source; no directory download. +rollback high risk write Restore an earlier version and create a new version. +rollback status read Query a persisted rollback Operation without polling. Source Draft Replacement and Restoration Use [ references/source mutations.md ](references/source mutations.md) for file/ZIP source replacement and restoration. These new commands use kb source <action ; +rollback remains a whole KB publication operation. Command Risk Purpose source replace write Replace an ordinary file draft, or prepare a ZIP archive replacement preview. source restore write Restore a file draft from a published version, or prepare a ZIP source/child restore preview. source preview read Read a page of ZIP candidate changes before confirmation. source commit high risk write Confirm a reviewed ZIP candidate, including any deletions. source cancel high risk write Discard an uncommitted ZIP candidate. Require exact name , scope , current id , and a current expected revision for mutations. File replacements keep the original format but allow differ