atomic

flowstate-epic-flowstate-community-epicdm-flowstate-document-store

Package-local agent skill for @epicdm/flowstate-document-store.

Tags

Publisher

Versions

1 version published — latest: 1.0.8

  • 1.0.8
    publishedInvalid Date

Skill

flowstate-document-store Package Skill

Package: @epicdm/flowstate-document-store Repository: epic-flowstate-community Path: packages/flowstate-document-store Version: 1.0.8

Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.

Primary Package Workflow

Document Store Auth And Tenancy

Use this skill when debugging tenant scoping or auth behavior.

Auth Model

Protected routes use authMiddleware, which can validate JWT or trust proxy-provided auth depending on config. Routes then rely on req.user fields such as domain, org, workspace, and user.

Tenant Rules

  • Document routes require domain context and use domain-keyed RxDB REST clients.
  • Codebase sync-batch checks body org ID against JWT-derived org/domain.
  • Codebase cleanup/status/purge need careful review because adapter queries are not consistently org-filtered.

Pitfalls

  • Domain ID and org ID can differ in local dev setups.
  • Workspace ID is not always cross-checked.
  • Tenant safety should be verified in query predicates, not only comments.

Package Skill Inventory

Package Skill Inventory: @epicdm/flowstate-document-store

Skill Map

SkillTypeTriggerTeachesDojo
flowstate-document-storeorchestratorUse when working on document-store service, indexer, docs, or DojoPackage boundaries and skill routinglocal-only
flowstate-document-store-service-operationsworkflowUse when configuring/running the service, health/status, RAG worker, or shutdownEnv/config, Express server, RAG queue/worker lifecycleready-after-review
flowstate-document-store-document-apiworkflowUse when creating, uploading, downloading, listing, updating, deleting, or searching documentsPresigned/direct routes, S3 keys, RxDB metadata, RAG queueready-after-review
flowstate-document-store-rag-pipelineworkflowUse when changing extraction/chunking/embedding/vector write behaviorRAG queue, worker, extractor, chunker, embedding service, Surreal adapterready-after-review
flowstate-document-store-codebase-sync-apiworkflowUse when using /sync-batch, /cleanup, /get-hashes, /status, or /purgeBatch limits, hash preflight, org checks, tenant caveatsready-after-review
flowstate-document-store-indexer-libraryworkflow/referenceUse when importing @epicdm/flowstate-document-store/indexerCodebaseIndexer, CodeAdapter, RagIgnore, PackageDetector, git diff helpersready-after-review
flowstate-document-store-auth-and-tenancytroubleshooting/referenceUse when working on JWT/proxy auth, domain/org/workspace semantics, or tenant boundariesAuth middleware, domain/org matching, route-level risksready-after-review
flowstate-document-store-surreal-contractsreferenceUse when changing rag_documents, code/document collections, metadata, vectors, or query contractsSurreal schema compatibility with RAG sync/client/MCPready-after-review
flowstate-document-store-maintenancemaintenanceUse before changing public routes, exports, docs, feature matrix, or DojoVerification, downstream refs, root import hazard, anti-sprawllocal-only

Anti-Sprawl Decision

Do not create one skill per route or class. The useful boundaries are service operations, document API, RAG pipeline, codebase sync, indexer library, auth/tenancy, Surreal contracts, and maintenance.

Review Gate

Package Skills Review: @epicdm/flowstate-document-store

Verdict

Pass with fixes.

The authored skills emphasize actual package boundaries, especially the service root import hazard and ./indexer library surface.

Findings

SeveritySkillIssueEvidenceRequired Fix
Highorchestrator/indexerRoot import starts the servicesrc/index.ts, package exportsTeach ./indexer for library use
Highauth/tenancy/codebaseCodebase cleanup/status/purge tenant scoping is weaker than comments implyroutes/codebase.ts, worker/code-adapter.tsFix or explicitly track before publication
Importantdocument-api/upload-direct is less validated than /uploadroutes/documents.tsDocument trusted/internal usage or validate
ImportantmaintenanceDocs/Dojo are stale/generated.flowstate/docs, .flowstate/dojoRebuild before publishing

Verification

Commands run:

yarn workspace @epicdm/flowstate-document-store test
yarn workspace @epicdm/flowstate-document-store typecheck
yarn workspace @epicdm/flowstate-document-store build
yarn workspace @epicdm/flowstate-document-store lint

Results:

  • Tests passed: 24 suites, 260 tests.
  • Typecheck passed.
  • Build passed.
  • Lint passed with 45 existing warnings.
  • Jest reported one worker process forced-exit/open-handle warning after tests.

Dojo Publication Decision

Do not publish existing generated .flowstate/dojo artifacts. Rebuild from reviewed skills after verification and after tenancy/import/direct-upload caveats are fixed or explicitly tracked.

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-document-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-document-store --target <target> --out ./skills

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