atomic

flowstate-flowstate-platform-epicdm-gateway-routes

Package-local agent skill for @epicdm/gateway-routes.

Tags

Publisher

Versions

1 version published — latest: 0.1.0

  • 0.1.0
    publishedInvalid Date

Skill

gateway-routes Package Skill

Package: @epicdm/gateway-routes Repository: flowstate-platform Path: packages/gateway-routes Version: 0.1.0

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

Primary Package Workflow

Gateway Routes Route Table Workflow

Status: Active Purpose: Preserve one canonical gateway route source across Cloudflare and local Kong. Scope: packages/gateway-routes Trigger: Gateway route paths, upstreams, auth mode, scope, local bindings, or emitter output need to change. Input: Service path, logical service, upstream binding, auth requirement, local/cloud availability, and strip-path behavior. Output: Updated route table, logical mapping, emitter behavior, and tests.


Workflow

  1. Edit src/routes.ts as the source of truth. Place more-specific paths before catch-all patterns such as /auth/*, /dojo/*, or service wildcards.
  2. If the service is new, update src/logical.ts in both CLOUD_BINDINGS and LOCAL_BINDINGS. Use null for services that do not exist in that environment.
  3. Choose scope deliberately: shared, cloud-only, or local-only. emitCfRoutes excludes local-only; Kong local emission needs a local binding.
  4. Set stripPath, upstreamPrefix, auth, methods, and devOnly based on upstream route expectations.
  5. Run or update tests in src/__tests__/emit-cf.test.ts, emit-kong.test.ts, emit-kong.snapshot.test.ts, and smoke.test.ts.
  6. Check the worker consumer at packages/worker-gateway/src/config/routes.ts and any gateway smoke expectations.

Example

For a public docs route, prefer an exact path entry with auth: 'none', methods: ['GET'], and placement before the authenticated wildcard for that service.

Verification

  • yarn workspace @epicdm/gateway-routes test
  • yarn workspace @epicdm/gateway-routes typecheck
  • yarn workspace @epicdm/gateway-routes lint

Composition

  • Use gateway-specs-openapi-bundle-workflow when adding a gateway API surface that must be represented in OpenAPI specs.

Package Skill Inventory

Skill Inventory: @epicdm/gateway-routes

Created Skills

SkillTypeTrigger
gateway-routes-route-table-workflowWorkflowUse when changing the canonical gateway route table or route emitters.

Candidate Future Skills

CandidateReason to Split Later
gateway-routes-kong-emitterKong JWT/CORS/plugin behavior is dense enough for a future reference.
gateway-routes-smoke-specsSmoke spec generation may deserve its own workflow if gateway checks expand.

Source Evidence

  • src/routes.ts documents ordering and route metadata.
  • src/logical.ts binds logical services to cloud and local targets.
  • src/emit-cf.ts and src/emit-kong.ts are separate emitter paths.
  • src/__tests__/* verifies filtering, snapshots, and route emission.

Review Gate

Review: @epicdm/gateway-routes Skills

Result: Pass for source-backed package-local workflow guidance.

Checks

  • The skill emphasizes route ordering, logical mappings, and emitter-specific verification.
  • It cites the canonical route files and worker-gateway consumer.
  • It does not duplicate the entire route table.
  • Generated .flowstate/dojo files were not modified.

Residual Risk

Kong-specific plugin internals may need a reference skill before major local gateway rewrites.

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/gateway-routes/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-flowstate-platform-epicdm-gateway-routes --target <target> --out ./skills

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