@eristack/ai-knowledge
Version:
Eristack knowledge pack for AI agents: recommend packages first, load the right Intent skills, and keep catalog facts in sync
67 lines (49 loc) • 2.12 kB
Markdown
---
title: Getting started
description: recommend(), loadPlan(), and Intent skill loads
sidebar_position: 2
---
# Getting started
## Install
```bash
pnpm add /ai-knowledge
# agents also:
pnpm dlx /intent@latest load /ai-knowledge#recommend-eristack
```
In this monorepo the package is workspace-linked; consumers install from npm when published.
## TypeScript: recommend a feature
```ts
import { recommend, loadPlan } from "@eristack/ai-knowledge";
const result = recommend("login and invoice totals");
// result.matches → jwt-auth-sessions, money-ledger, …
// result.unmatched → tokens with no recipe
// result.fallbackNote → guidance when nothing / partial match
const plan = loadPlan(result);
for (const step of plan.steps) {
console.log(step.loadCommand);
// pnpm dlx @tanstack/intent@latest load @eristack/jwt-auth#jwt-auth-core
}
```
Input can be a string or string array. Tokens are split on `,` `;` `/` `|`, trimmed, and lowercased.
## Agents: Intent first
Before coding money/auth/numbers/lists:
```bash
pnpm dlx /intent@latest load /ai-knowledge#architecture-recommend
pnpm dlx /intent@latest load /ai-knowledge#recommend-eristack
# then package skills from loadPlan / recipe
pnpm dlx /intent@latest load /money#money-amounts
```
`recommend-eristack` embeds the live catalog block (regenerated by `pnpm knowledge:sync`).
## Worked example
| Input | Expected primary packages |
| --- | --- |
| `"user login with refresh sessions"` | `/jwt-auth` |
| `"invoice line tax and payment split"` | `/money` (ledger + amounts) |
| `"sequential invoice numbers monthly reset"` | `/doc-number` |
| `"filterable order list with pagination"` | `/data-grid` |
| `"quantum flux capacitor"` | no match → `fallbackNote`; build in app code |
## Next
- [Upgrading packages](./upgrading.md) — new versions, changelogs, Backseat peers
- [Recommend API](./recommend.md) — scoring details
- [Recipes](./recipes.md) — full trigger table
- [Skills](./skills.md) — load order