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.8publishedInvalid 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-batchchecks 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
| Skill | Type | Trigger | Teaches | Dojo |
|---|---|---|---|---|
flowstate-document-store | orchestrator | Use when working on document-store service, indexer, docs, or Dojo | Package boundaries and skill routing | local-only |
flowstate-document-store-service-operations | workflow | Use when configuring/running the service, health/status, RAG worker, or shutdown | Env/config, Express server, RAG queue/worker lifecycle | ready-after-review |
flowstate-document-store-document-api | workflow | Use when creating, uploading, downloading, listing, updating, deleting, or searching documents | Presigned/direct routes, S3 keys, RxDB metadata, RAG queue | ready-after-review |
flowstate-document-store-rag-pipeline | workflow | Use when changing extraction/chunking/embedding/vector write behavior | RAG queue, worker, extractor, chunker, embedding service, Surreal adapter | ready-after-review |
flowstate-document-store-codebase-sync-api | workflow | Use when using /sync-batch, /cleanup, /get-hashes, /status, or /purge | Batch limits, hash preflight, org checks, tenant caveats | ready-after-review |
flowstate-document-store-indexer-library | workflow/reference | Use when importing @epicdm/flowstate-document-store/indexer | CodebaseIndexer, CodeAdapter, RagIgnore, PackageDetector, git diff helpers | ready-after-review |
flowstate-document-store-auth-and-tenancy | troubleshooting/reference | Use when working on JWT/proxy auth, domain/org/workspace semantics, or tenant boundaries | Auth middleware, domain/org matching, route-level risks | ready-after-review |
flowstate-document-store-surreal-contracts | reference | Use when changing rag_documents, code/document collections, metadata, vectors, or query contracts | Surreal schema compatibility with RAG sync/client/MCP | ready-after-review |
flowstate-document-store-maintenance | maintenance | Use before changing public routes, exports, docs, feature matrix, or Dojo | Verification, downstream refs, root import hazard, anti-sprawl | local-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
| Severity | Skill | Issue | Evidence | Required Fix |
|---|---|---|---|---|
| High | orchestrator/indexer | Root import starts the service | src/index.ts, package exports | Teach ./indexer for library use |
| High | auth/tenancy/codebase | Codebase cleanup/status/purge tenant scoping is weaker than comments imply | routes/codebase.ts, worker/code-adapter.ts | Fix or explicitly track before publication |
| Important | document-api | /upload-direct is less validated than /upload | routes/documents.ts | Document trusted/internal usage or validate |
| Important | maintenance | Docs/Dojo are stale/generated | .flowstate/docs, .flowstate/dojo | Rebuild 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 ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.