atomic

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.7
    publishedInvalid 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

TaskUse Skill
Create or configure a clientflowstate-knowledge-store-client-lifecycle
Create, read, update, delete, batch, TTL, or access trackingflowstate-knowledge-store-crud
Retrieve prompt context with text search or retrieve()flowstate-knowledge-store-retrieval
Add embedding-backed semantic searchflowstate-knowledge-store-semantic-search
Look up schemas, enums, filters, limits, Redis keys, or errorsflowstate-knowledge-store-contracts
Debug empty results, validation failures, Redis issues, or downstream memory gapsflowstate-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-client for pre-query knowledge enrichment via retrieve().
  • packages/flowstate-coordinator for 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, and delete return OperationResult; check success before reading data.
  • retrieve, search, and semanticSearch degrade to empty results on errors.
  • getStats throws on error.
  • Namespace and tag validation currently allows only alphanumeric, dash, and underscore. Downstream code using values like agent:${id} or trace:${id} needs sanitization or a package fix.
  • PACKAGE_INFO.version in src/constants.ts is currently drifted from package.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

SkillTypeTriggerTeachesEvidenceDepends OnDojo
flowstate-agents-knowledge-storeorchestratorUse when wiring or operating Redis-backed long-term agent knowledge storageWhich package workflow to use, setup checklist, downstream composition, verificationpackage.json, src/index.ts, src/KnowledgeStoreClient.ts, .flowstate/docs/quick-start.mdRedis runtime, package docsready-after-review
flowstate-knowledge-store-client-lifecycleworkflowUse when creating, configuring, checking, or disconnecting a KnowledgeStoreClientRedis config, factory/direct constructor, isConnected, disconnect, debug and access tracking optionsconstructor, createKnowledgeStoreClient, quick startRedis runtimeready-after-review
flowstate-knowledge-store-crudworkflowUse when storing, updating, deleting, or batch-managing knowledge itemscreate, get, update, delete, TTL, metadata defaults, batch results, OperationResult.success checksCRUD and batch methods, types.tsclient lifecycle, contractsready-after-review
flowstate-knowledge-store-retrievalworkflowUse when retrieving knowledge for prompts, agent context, roundtables, initiatives, or voice profilessearch versus retrieve, filters, confidence sorting, pagination, best-effort failure behaviorsearch, retrieve, tests, downstream LLM/coordinator referencesclient lifecycle, contractsready-after-review
flowstate-knowledge-store-semantic-searchworkflowUse when adding embedding-backed semantic retrieval to knowledge itemsembedding.embedFn, automatic embeddings, manual vectors, metrics, thresholds, dimension pitfallsEmbeddingConfig, semanticSearch, constants, quick startembedding provider skill when neededready-after-review
flowstate-knowledge-store-contractsreferenceUse when checking knowledge schemas, enums, Redis key shapes, limits, filters, or error/result contractsKnowledgeType, metadata, filters, limits, validation patterns, key patternstypes.ts, constants.tsnonelocal-only
flowstate-knowledge-store-troubleshootingtroubleshootingUse when knowledge storage/search returns no data or coordinator memory does not persistRedis reachability, empty best-effort retrieval, validation failures, namespace/tag mismatch, docs/version driftvalidation patterns, downstream references, tests, constantslifecycle, contractsready-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 GroupSource EvidenceCovered ByNotes
Client and factorysrc/KnowledgeStoreClient.ts, src/index.tsorchestrator, lifecycleMain package entry point
Redis config/defaultsRedisConfig, DEFAULT_REDIS_CONFIG, quick startlifecycle, contractsDo not invent env vars; callers supply config
CRUD and result handlingcreate, get, update, delete, OperationResultCRUD, troubleshootingAlways check success before data
Batch, TTL, access trackingbatchCreate, batchDelete, defaultTTL, trackAccessCRUD, contractsSupport behavior, not separate skills
Text searchsearch, SearchOptions, SearchFilterretrievalSubstring and in-memory filtering over Redis keys
LLM context retrievalretrieve, tests, LLM client/coordinator useretrievalBest-effort and returns [] on error
Semantic searchsemanticSearch, EmbeddingConfig, quick startsemantic-searchProvider-neutral; caller owns embeddings
Types/enums/constantstypes.ts, constants.tscontractsReference skill, not one skill per constant
Validation/errorsVALIDATION_PATTERNS, LIMITS, KnowledgeStoreErrorcontracts, troubleshootingInclude namespace/tag pitfalls
Generated Dojo files.flowstate/dojo/*deferredRebuild 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 SkillReasonNext Review Condition
One skill per exported constantNot task-triggered and would reproduce the bad generated patternNever, unless constants become a protocol surface
Dojo publication skillExisting Dojo files are generated/prototype-gradeAfter local skills pass review and Dojo manifests are rebuilt
Redis migration/performance skillPackage has no migration API and uses simple key scansAdd when source adds migration/index management
Coordinator namespace repair skillThis is a cross-package bug/contract issueAdd after package or coordinator standardizes namespace/tag encoding

Review Questions

  • Should validation allow : in namespaces/tags, or should coordinator sanitize values like agent:${id} and trace:${id}?
  • Should PACKAGE_INFO.version be removed or synchronized with package.json?
  • Should root README be updated before Dojo publication?
  • Should getStats throw 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

SeveritySkillIssueEvidenceRequired Fix
ImportantallDojo files remain generated/prototype-grade.flowstate/dojo/agent-skillset.md is feature-list shapedRebuild Dojo manifests from reviewed skills before publishing
Importanttroubleshooting/contractsNamespace/tag mismatch is documented but not fixedPackage validator rejects : while coordinator references use colon-shaped valuesCreate package or coordinator follow-up before claiming full integration safety
MinorcontractsVersion drift is recorded but not repairedPACKAGE_INFO.version differs from package.jsonTrack as maintenance bug
MinorCRUD/semanticCurrent tests do not cover most workflows taught by skillsOnly retrieve.test.ts existsAdd tests when implementation changes touch those workflows

Coverage

Feature GroupStatusSkillNotes
Client lifecycleCoveredflowstate-knowledge-store-client-lifecycleIncludes setup/check/disconnect
CRUD/batch/TTL/access trackingCoveredflowstate-knowledge-store-crudBatch and TTL included without sprawl
Text retrieval and prompt enrichmentCoveredflowstate-knowledge-store-retrievalExplains search vs retrieve
Semantic searchCoveredflowstate-knowledge-store-semantic-searchProvider-neutral and dimension-aware
Contracts/constants/errorsCoveredflowstate-knowledge-store-contractsLocal-only reference skill
Failures/driftCoveredflowstate-knowledge-store-troubleshootingIncludes downstream mismatch
Existing Dojo filesDeferrednoneRebuild after review

Drift and Contract Risks

AreaRiskEvidenceDecision
Namespace/tag validationCoordinator values with colons can fail writesVALIDATION_PATTERNS, downstream coordinator referencesKeep in troubleshooting; create follow-up repair
DocsDocs mention fewer knowledge types than source.flowstate/docs/index.md, src/types.tsUse source as authority in skills
Version metadataPACKAGE_INFO.version is stalesrc/constants.ts, package.jsonTrack maintenance issue
DojoExisting 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/dojo files 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 ./skills

Replace <target> with your agent target identifier. See the CLI docs for details.