flowstate-epic-flowstate-community-epicdm-flowstate-agents-knowledge-store
Package-local agent skill for @epicdm/flowstate-agents-knowledge-store.
Tags
Publisher
Versions
1 version published — latest: 1.0.7
- 1.0.7publishedInvalid Date
Skill
flowstate-agents-knowledge-store Package Skill
Package: @epicdm/flowstate-agents-knowledge-store
Repository: epic-flowstate-community
Path: packages/flowstate-agents-knowledge-store
Version: 1.0.7
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
FlowState Agents Knowledge Store
Status: Active
Purpose: Help agents use @epicdm/flowstate-agents-knowledge-store correctly instead of treating it as a generic semantic-search package.
Scope: /Users/sthornock/code/epic/epic-flowstate-community/packages/flowstate-agents-knowledge-store
Trigger: Agent memory storage, LLM prompt enrichment, coordinator memory workflows, package maintenance, or Redis-backed knowledge retrieval.
Input: Redis connection details, package source/docs, intended namespace, knowledge item shape, and retrieval goal.
Output: Correctly configured client usage, safe knowledge operations, and verified retrieval behavior.
Overview
This package stores typed KnowledgeItem JSON documents in Redis and exposes a TypeScript client. It is not a full hosted vector database. Text search scans Redis keys and filters in memory; semantic search works only when callers provide embeddings or an embedding.embedFn.
Use this package when an agent or service needs durable, namespaced knowledge such as directives, patterns, decisions, insights, errors, requirements, strategies, preferences, or lessons.
Route by Task
| Task | Use Skill |
|---|---|
| Create or configure a client | flowstate-knowledge-store-client-lifecycle |
| Create, read, update, delete, batch, TTL, or access tracking | flowstate-knowledge-store-crud |
Retrieve prompt context with text search or retrieve() | flowstate-knowledge-store-retrieval |
| Add embedding-backed semantic search | flowstate-knowledge-store-semantic-search |
| Look up schemas, enums, filters, limits, Redis keys, or errors | flowstate-knowledge-store-contracts |
| Debug empty results, validation failures, Redis issues, or downstream memory gaps | flowstate-knowledge-store-troubleshooting |
Minimum Happy Path
import {
createKnowledgeStoreClient,
KnowledgePriority,
KnowledgeType,
} from '@epicdm/flowstate-agents-knowledge-store'
const client = createKnowledgeStoreClient({
redis: { host: 'localhost', port: 6379 },
trackAccess: true,
})
const connected = await client.isConnected()
if (!connected) throw new Error('Redis is not reachable')
const result = await client.create({
type: KnowledgeType.DIRECTIVE,
namespace: 'project_alpha',
title: 'Use TypeScript strict mode',
content: 'All packages should keep TypeScript strict mode enabled.',
metadata: {
source: 'architecture-review',
priority: KnowledgePriority.HIGH,
tags: ['typescript', 'standards'],
},
})
if (!result.success || !result.data) {
throw new Error(result.error ?? 'Knowledge create failed')
}
const context = await client.retrieve({
query: 'typescript standards',
namespace: 'project_alpha',
limit: 5,
})
await client.disconnect()
Composition
This package is consumed by:
packages/flowstate-agents-llm-clientfor pre-query knowledge enrichment viaretrieve().packages/flowstate-coordinatorfor memory distillation, initiative context, roundtable memory, and voice/profile knowledge.
When changing behavior, inspect reverse references with:
rg -n "flowstate-agents-knowledge-store|KnowledgeStoreClient|KnowledgeType|retrieve\\(" /Users/sthornock/code/epic/epic-flowstate-community/packages
Important Pitfalls
create,get,update, anddeletereturnOperationResult; checksuccessbefore readingdata.retrieve,search, andsemanticSearchdegrade to empty results on errors.getStatsthrows on error.- Namespace and tag validation currently allows only alphanumeric, dash, and underscore. Downstream code using values like
agent:${id}ortrace:${id}needs sanitization or a package fix. PACKAGE_INFO.versioninsrc/constants.tsis currently drifted frompackage.json.
Verification
yarn workspace @epicdm/flowstate-agents-knowledge-store test
yarn workspace @epicdm/flowstate-agents-knowledge-store typecheck
yarn workspace @epicdm/flowstate-agents-knowledge-store build
Done When
- The right subskill has been used for the task.
- Redis connectivity and result handling are verified.
- Namespaces/tags are valid for the package validator.
- Downstream consumers are checked when public behavior changes.
Package Skill Inventory
Package Skill Inventory: @epicdm/flowstate-agents-knowledge-store
Package Context
Package path: /Users/sthornock/code/epic/epic-flowstate-community/packages/flowstate-agents-knowledge-store
@epicdm/flowstate-agents-knowledge-store@1.0.7 is a publishable TypeScript library for Redis-backed long-term agent knowledge. Its usable surface is centered on KnowledgeStoreClient, createKnowledgeStoreClient, typed knowledge item contracts, text retrieval, best-effort LLM context retrieval, semantic vector search with caller-provided embeddings, stats, TTL, and access tracking.
Existing .flowstate/dojo files are treated as generated prototypes. They list features but do not yet teach package operation.
Skill Map
| Skill | Type | Trigger | Teaches | Evidence | Depends On | Dojo |
|---|---|---|---|---|---|---|
flowstate-agents-knowledge-store | orchestrator | Use when wiring or operating Redis-backed long-term agent knowledge storage | Which package workflow to use, setup checklist, downstream composition, verification | package.json, src/index.ts, src/KnowledgeStoreClient.ts, .flowstate/docs/quick-start.md | Redis runtime, package docs | ready-after-review |
flowstate-knowledge-store-client-lifecycle | workflow | Use when creating, configuring, checking, or disconnecting a KnowledgeStoreClient | Redis config, factory/direct constructor, isConnected, disconnect, debug and access tracking options | constructor, createKnowledgeStoreClient, quick start | Redis runtime | ready-after-review |
flowstate-knowledge-store-crud | workflow | Use when storing, updating, deleting, or batch-managing knowledge items | create, get, update, delete, TTL, metadata defaults, batch results, OperationResult.success checks | CRUD and batch methods, types.ts | client lifecycle, contracts | ready-after-review |
flowstate-knowledge-store-retrieval | workflow | Use when retrieving knowledge for prompts, agent context, roundtables, initiatives, or voice profiles | search versus retrieve, filters, confidence sorting, pagination, best-effort failure behavior | search, retrieve, tests, downstream LLM/coordinator references | client lifecycle, contracts | ready-after-review |
flowstate-knowledge-store-semantic-search | workflow | Use when adding embedding-backed semantic retrieval to knowledge items | embedding.embedFn, automatic embeddings, manual vectors, metrics, thresholds, dimension pitfalls | EmbeddingConfig, semanticSearch, constants, quick start | embedding provider skill when needed | ready-after-review |
flowstate-knowledge-store-contracts | reference | Use when checking knowledge schemas, enums, Redis key shapes, limits, filters, or error/result contracts | KnowledgeType, metadata, filters, limits, validation patterns, key patterns | types.ts, constants.ts | none | local-only |
flowstate-knowledge-store-troubleshooting | troubleshooting | Use when knowledge storage/search returns no data or coordinator memory does not persist | Redis reachability, empty best-effort retrieval, validation failures, namespace/tag mismatch, docs/version drift | validation patterns, downstream references, tests, constants | lifecycle, contracts | ready-after-review |
Anti-Sprawl Decision
Seven skills is appropriate for this package because it has one main client with four distinct workflows, one dense contract surface, and one meaningful troubleshooting path. Batch operations, TTL, stats, access tracking, and constants are folded into workflow/reference skills rather than split into feature-sized skilllets.
Feature Coverage
| Feature Group | Source Evidence | Covered By | Notes |
|---|---|---|---|
| Client and factory | src/KnowledgeStoreClient.ts, src/index.ts | orchestrator, lifecycle | Main package entry point |
| Redis config/defaults | RedisConfig, DEFAULT_REDIS_CONFIG, quick start | lifecycle, contracts | Do not invent env vars; callers supply config |
| CRUD and result handling | create, get, update, delete, OperationResult | CRUD, troubleshooting | Always check success before data |
| Batch, TTL, access tracking | batchCreate, batchDelete, defaultTTL, trackAccess | CRUD, contracts | Support behavior, not separate skills |
| Text search | search, SearchOptions, SearchFilter | retrieval | Substring and in-memory filtering over Redis keys |
| LLM context retrieval | retrieve, tests, LLM client/coordinator use | retrieval | Best-effort and returns [] on error |
| Semantic search | semanticSearch, EmbeddingConfig, quick start | semantic-search | Provider-neutral; caller owns embeddings |
| Types/enums/constants | types.ts, constants.ts | contracts | Reference skill, not one skill per constant |
| Validation/errors | VALIDATION_PATTERNS, LIMITS, KnowledgeStoreError | contracts, troubleshooting | Include namespace/tag pitfalls |
| Generated Dojo files | .flowstate/dojo/* | deferred | Rebuild from reviewed skills before publish |
Composition Model
Use the package orchestrator first when the task is broad. It routes setup to lifecycle, data mutation to CRUD, prompt enrichment to retrieval, vector search to semantic search, lookup work to contracts, and failures to troubleshooting.
This package composes with @epicdm/flowstate-agents-llm-client for pre-query context and @epicdm/flowstate-coordinator for memory, initiative, roundtable, and voice workflows.
Deferred Skills
| Deferred Skill | Reason | Next Review Condition |
|---|---|---|
| One skill per exported constant | Not task-triggered and would reproduce the bad generated pattern | Never, unless constants become a protocol surface |
| Dojo publication skill | Existing Dojo files are generated/prototype-grade | After local skills pass review and Dojo manifests are rebuilt |
| Redis migration/performance skill | Package has no migration API and uses simple key scans | Add when source adds migration/index management |
| Coordinator namespace repair skill | This is a cross-package bug/contract issue | Add after package or coordinator standardizes namespace/tag encoding |
Review Questions
- Should validation allow
:in namespaces/tags, or should coordinator sanitize values likeagent:${id}andtrace:${id}? - Should
PACKAGE_INFO.versionbe removed or synchronized withpackage.json? - Should root README be updated before Dojo publication?
- Should
getStatsthrow while search/retrieve degrade, or should the error model be standardized?
Review Gate
Package Skills Review: @epicdm/flowstate-agents-knowledge-store
Verdict
Pass with fixes.
The test skillset is a strong replacement for the generated Dojo feature-list output. It teaches concrete package workflows, names entry points, shows code, explains verification, and records downstream contract risks. Before publishing to Dojo, rebuild .flowstate/dojo from these reviewed skills and decide how to handle the namespace/tag validation mismatch.
Findings
| Severity | Skill | Issue | Evidence | Required Fix |
|---|---|---|---|---|
| Important | all | Dojo files remain generated/prototype-grade | .flowstate/dojo/agent-skillset.md is feature-list shaped | Rebuild Dojo manifests from reviewed skills before publishing |
| Important | troubleshooting/contracts | Namespace/tag mismatch is documented but not fixed | Package validator rejects : while coordinator references use colon-shaped values | Create package or coordinator follow-up before claiming full integration safety |
| Minor | contracts | Version drift is recorded but not repaired | PACKAGE_INFO.version differs from package.json | Track as maintenance bug |
| Minor | CRUD/semantic | Current tests do not cover most workflows taught by skills | Only retrieve.test.ts exists | Add tests when implementation changes touch those workflows |
Coverage
| Feature Group | Status | Skill | Notes |
|---|---|---|---|
| Client lifecycle | Covered | flowstate-knowledge-store-client-lifecycle | Includes setup/check/disconnect |
| CRUD/batch/TTL/access tracking | Covered | flowstate-knowledge-store-crud | Batch and TTL included without sprawl |
| Text retrieval and prompt enrichment | Covered | flowstate-knowledge-store-retrieval | Explains search vs retrieve |
| Semantic search | Covered | flowstate-knowledge-store-semantic-search | Provider-neutral and dimension-aware |
| Contracts/constants/errors | Covered | flowstate-knowledge-store-contracts | Local-only reference skill |
| Failures/drift | Covered | flowstate-knowledge-store-troubleshooting | Includes downstream mismatch |
| Existing Dojo files | Deferred | none | Rebuild after review |
Drift and Contract Risks
| Area | Risk | Evidence | Decision |
|---|---|---|---|
| Namespace/tag validation | Coordinator values with colons can fail writes | VALIDATION_PATTERNS, downstream coordinator references | Keep in troubleshooting; create follow-up repair |
| Docs | Docs mention fewer knowledge types than source | .flowstate/docs/index.md, src/types.ts | Use source as authority in skills |
| Version metadata | PACKAGE_INFO.version is stale | src/constants.ts, package.json | Track maintenance issue |
| Dojo | Existing generated content is not useful enough | .flowstate/dojo/* | Do not publish until rebuilt |
Dojo Publication Decision
Do not publish existing generated Dojo files. The reviewed local skills are eligible to be converted into Dojo skill content after flowstate-package-dojo-sync rebuilds manifests and validates them.
Follow-Up Work
- Rebuild package
.flowstate/dojofiles from reviewed local skills. - Decide whether package validation or downstream coordinator values should change for colon-separated namespaces/tags.
- Update root README and package docs to match source behavior.
- Add tests for CRUD, validation, semantic search, stats, TTL, and downstream compatibility when implementation work is in scope.
Usage
Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-agents-knowledge-store/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.
Install
Run this in your project to install via CLI:
fscloud dojo skill install flowstate-epic-flowstate-community-epicdm-flowstate-agents-knowledge-store --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.