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
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- applications/AGENTS.mdAGENTS.md
- databases/AGENTS.mdAGENTS.md
- infra/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/nx-rules.mdcCursor rule
- frontend-designSkill
- grillingSkill
- improveSkill
- link-workspace-packagesSkill
- monitor-ciSkill
- nx-workspaceSkill
- agents-ralphSkill
- github-commitSkill
- github-pull-requestSkill
- github-squashSkill
- ot-foldersSkill
- ot-generatorsSkill
- ot-loopSkill
- ot-onboardingSkill
- ot-plansSkill
- ot-postgresSkill
- ot-skill-syncSkill
- ot-worktreeSkill
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
- Distinctive: line 20
Use ot-generators for scaffolding, nx-workspace for graph and targets, ot-plans for OpenThrottle plans/tasks and MCP traceability, …
- Very specific: line 50
Backwards-compatible schema: when updating .entity files the GraphQL schema must stay backwards compatible.
- Very specific: line 60
New server surface: use NX_ISOLATE_PLUGINS=false pnpm nx g @tools/generators:nestjs (see ot-generators).
- Distinctive: line 64
Test all new methods added to resolvers, services and repositories.
- Distinctive: line 66
Use model factories from the repository and entity factories from the service where they exist.
- Very specific: line 104
After GraphQL schema changes or fresh clone: pnpm nx run openthrottle-developer:codegen-graphql (also noted in run doc above).
- Very specific: line 105
Prefer existing route and settings patterns (e.g.
- Very specific: line 127
Extending tools: add or adjust GraphQL operations against openthrottle-server first.
≈ “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.
Files
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
| Need | Use |
@tools/generators, NX_ISOLATE_PLUGINS | ot-generators |
Plans, Plan-Id / Task-Id, work-ledger commit recording | ot-plans |
| Ralph loop prompt (one task at a time) | agents-ralph |
| Ralph CLI, BullMQ mental model | tools/workflows/README.md (no skill) |
Nx graph, nx show project, affected | nx-workspace (installed skill — invoke by name) |
Run nx targets | nx-workspace (installed skill — invoke by name) |
| SQL migrations / table comments | ot-postgres |
| This file | Server conventions, DB/embeddings, developer UI, openthrottle-mcp package |
1. NestJS GraphQL (openthrottle-server)
Canonical paths
| Topic | Path |
| App module and GraphQL wiring | applications/openthrottle-server/src/app.module.ts |
| GraphQL modules | applications/openthrottle-server/src/graphql/ |
| Generated / audited schema (reference) | applications/openthrottle-server/schema.gql |
| Schema audit notes | applications/openthrottle-server/docs/SCHEMA_AUDIT.md |
Conventions (align with workspace rules)
- Backwards-compatible schema: when updating
.entityfiles 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()orListResult()(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/PaginatedResultpattern — seetools/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 includegraphql-service,simple-service,module,queue,ai-agentandapplication— always--describefirst 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.tsnext to resolvers), with every NestJS provider mocked in thebeforeEachblock. - Use model factories from the repository and entity factories from the service where they exist.
- Each
ifstatement in the logic gets its owndescribeblock, 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)
| Script | Role |
pnpm run database:start | Postgres + Redis (Compose) |
pnpm run database:migrate | Apply migrations |
pnpm run database:import-docs | Ingest docs/ + NX READMEs into documentation tables |
pnpm run database:import-agent-assets | Ingest 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
| Topic | Path |
| Routes (file-based) | applications/openthrottle-developer/app/routes/ |
| Shared UI primitives | @openthrottle/react-router-shadcn — packages/react-router-shadcn/src/components/ |
| Env defaults | applications/openthrottle-developer/.env.default |
| Full stack quick path | docs/openthrottle/run-openthrottle-server-developer.md |
Conventions
- New UI: react-router generator (ot-generators); application name
openthrottle-developerfrom--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
| Topic | Path |
| Package README | packages/openthrottle-mcp/README.md |
| Auth tokens | packages/openthrottle-mcp/docs/AUTH.md |
| Env, smoke checklist, secondary workspace | packages/openthrottle-mcp/docs/verification-environment.md |
| Cursor registration | .cursor/mcp.json (server id openthrottle-mcp) |
| Env probe script | scripts/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 inAGENTS.md§ Code style - Where files go and what they are named:
ot-folders
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
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.

