agentleFS
OpenThrottleOpenThrottle/monorepo/skills/ot-stack/SKILL.md

ot-stack

Skill2 starsChanged 2 months agoApache-2.0View on GitHub

Conventions for the OpenThrottle platform itself. USE WHEN changing openthrottle-server, openthrottle-developer, databases or database:import-docs, embeddings, packages/openthrottle-mcp, or the GraphQL schema and semantic ingest. Not for routine OT plan CRUD (see ot-plans), SQL migrations (ot-postgres), or scaffolding (ot-generators).

  • Reads credentials

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use ot-generators for scaffolding, nx-workspace for graph and targets, ot-plans for OpenThrottle plans/tasks and MCP traceability, …

    line 20
  2. Very specific:

    Backwards-compatible schema: when updating .entity files the GraphQL schema must stay backwards compatible.

    line 50
  3. Very specific:

    New server surface: use NX_ISOLATE_PLUGINS=false pnpm nx g @tools/generators:nestjs (see ot-generators).

    line 60
  4. Distinctive:

    Test all new methods added to resolvers, services and repositories.

    line 64
  5. Distinctive:

    Use model factories from the repository and entity factories from the service where they exist.

    line 66
  6. Very specific:

    After GraphQL schema changes or fresh clone: pnpm nx run openthrottle-developer:codegen-graphql (also noted in run doc above).

    line 104
  7. Very specific:

    Prefer existing route and settings patterns (e.g.

    line 105
  8. Very specific:

    Extending tools: add or adjust GraphQL operations against openthrottle-server first.

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OpenThrottle stack (server, data, developer app, MCP)

When to read this skill

  • You touch applications/openthrottle-server (NestJS GraphQL, queues, repositories).
  • You touch databases/, pnpm run database:*, embeddings, or plan/docs ingest scripts.
  • You touch applications/openthrottle-developer (routes, loaders, GraphQL client).
  • You extend or debug packages/openthrottle-mcp (tools, env, smoke checks).

Use ot-generators for scaffolding, nx-workspace for graph and targets, ot-plans for OpenThrottle plans/tasks and MCP traceability, agents-ralph for the per-task execution discipline.

How this fits other skills

NeedUse
@tools/generators, NX_ISOLATE_PLUGINSot-generators
Plans, Plan-Id / Task-Id, work-ledger commit recordingot-plans
Ralph loop prompt (one task at a time)agents-ralph
Ralph CLI, BullMQ mental modeltools/workflows/README.md (no skill)
Nx graph, nx show project, affectednx-workspace (installed skill — invoke by name)
Run nx targetsnx-workspace (installed skill — invoke by name)
SQL migrations / table commentsot-postgres
This fileServer conventions, DB/embeddings, developer UI, openthrottle-mcp package

1. NestJS GraphQL (openthrottle-server)

Canonical paths

TopicPath
App module and GraphQL wiringapplications/openthrottle-server/src/app.module.ts
GraphQL modulesapplications/openthrottle-server/src/graphql/
Generated / audited schema (reference)applications/openthrottle-server/schema.gql
Schema audit notesapplications/openthrottle-server/docs/SCHEMA_AUDIT.md

Conventions (align with workspace rules)

  • Backwards-compatible schema: when updating .entity files the GraphQL schema must stay backwards compatible. Avoid removing fields or changing types on existing ObjectTypes; if a field is no longer needed, mark it @deprecated(reason: "...") instead of deleting it.
  • Resolver return types: resolver methods should return an ObjectType built with Result(), PaginatedResult() or ListResult() (or a module-specific *ResultObject), never a raw entity:

    @ObjectType()
    export class PlatformShiftListResult extends ListResult(PlatformShift) {}

    New GraphQL services from the nestjs generator already follow the Result / PaginatedResult pattern — see tools/generators/src/generators/nestjs/files/graphql-service/.

  • New server surface: use NX_ISOLATE_PLUGINS=false pnpm nx g @tools/generators:nestjs (see ot-generators); sub-generators include graphql-service, simple-service, module, queue, ai-agent and application — always --describe first for the required flags per sub-generator. <SERVICE_NAME> is kebab-case, often plural for services.

Testing

  • Test all new methods added to resolvers, services and repositories.
  • Co-located tests (e.g. *.test.ts next to resolvers), with every NestJS provider mocked in the beforeEach block.
  • Use model factories from the repository and entity factories from the service where they exist.
  • Each if statement in the logic gets its own describe block, and always include edge cases.

2. Data, embeddings, imports (databases/)

SQL migrations and table comments: ot-postgres (COMMENT ON TABLE, migration naming, diff-scoped lint). Schema, ingest, embeddings: databases/README.md.

Typical commands (repo root)

ScriptRole
pnpm run database:startPostgres + Redis (Compose)
pnpm run database:migrateApply migrations
pnpm run database:import-docsIngest docs/ + NX READMEs into documentation tables
pnpm run database:import-agent-assetsIngest skills/ + .agents/ assets into documentation tables

Embeddings: dimension strategy and Ollama / OPENAI_API_KEY are documented in databases/README.md (embedding section). For local Ollama and Cursor proxy, see docs/monorepo/Ollama.md and AGENTS.md (local embeddings / OLLAMA_*).

Relationship to MCP: openthrottle-mcp does not connect to Postgres directly — only openthrottle-server GraphQL. DB scripts and migrations are for the server and offline ingest, not for MCP process configuration.


3. React Router UI (openthrottle-developer)

Canonical paths

TopicPath
Routes (file-based)applications/openthrottle-developer/app/routes/
Shared UI primitives@openthrottle/react-router-shadcn — packages/react-router-shadcn/src/components/
Env defaultsapplications/openthrottle-developer/.env.default
Full stack quick pathdocs/openthrottle/run-openthrottle-server-developer.md

Conventions

  • New UI: react-router generator (ot-generators); application name openthrottle-developer from --list=applications.
  • After GraphQL schema changes or fresh clone: pnpm nx run openthrottle-developer:codegen-graphql (also noted in run doc above).
  • Prefer existing route and settings patterns (e.g. settings.*, plans.*) over one-off structure.

Testing: component tests colocated under app/routes/__tests__/ and route-adjacent *.test.tsx; generate mock data from the GraphQL types in the application's mocks.ts. UI testing conventions (component not screen, userEvent not fireEvent, asserting behavior over copy) live in docs/monorepo/code-style.md.


4. @openthrottle/openthrottle-mcp

Boundary: MCP tools call openthrottle-server GraphQL only — no direct DB driver in the MCP package.

Canonical paths

TopicPath
Package READMEpackages/openthrottle-mcp/README.md
Auth tokenspackages/openthrottle-mcp/docs/AUTH.md
Env, smoke checklist, secondary workspacepackages/openthrottle-mcp/docs/verification-environment.md
Cursor registration.cursor/mcp.json (server id openthrottle-mcp)
Env probe scriptscripts/verify-openthrottle-mcp-env.sh

Local verification (minimal): install, root + server .env, pnpm run database:start + pnpm run database:migrate, pnpm nx run openthrottle-server:dev, align API_URL / API_URL_INTERNAL with server port; OPENTHROTTLE_MCP_AUTH_TOKEN for authenticated tools. Details and failure modes: verification-environment.md.

Extending tools: add or adjust GraphQL operations against openthrottle-server first; keep MCP as a thin GraphQL client and document env in README/AUTH/verification docs.


Cross-links

  • Run server + UI + ports: docs/openthrottle/run-openthrottle-server-developer.md
  • Monorepo OT overview: AGENTS.md
  • Queues and workflows: tools/workflows/README.md (loop prompt: agents-ralph)
  • Code style (TypeScript, components, testing): docs/monorepo/code-style.md, normative in AGENTS.md § Code style
  • Where files go and what they are named: ot-folders

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.