en un clic
counterfact-runtime-architecture
// Safely change Counterfact runtime/server internals while preserving module boundaries, hot reload behavior, and backward compatibility guarantees.
// Safely change Counterfact runtime/server internals while preserving module boundaries, hot reload behavior, and backward compatibility guarantees.
Keep contributor changes aligned with repository test patterns, diagnostics, release/versioning workflow, documentation requirements, and compatibility.
Provide Counterfact repository orientation, high-level architecture, and the canonical command reference for install/build/test/lint workflows.
Update Counterfact CLI option behavior, config resolution, telemetry-safe startup handling, and bootstrap/runtime entrypoint flow.
Modify TypeScript generator internals, OpenAPI parsing/schema handling, and generated file writing behavior without regressing regeneration guarantees.
Add and evolve Counterfact context classes in _.context.ts files, including required unit test coverage for context behavior.
Edit Counterfact route files to add endpoint behavior while keeping handlers thin and delegating business logic to context classes.
| name | counterfact-runtime-architecture |
| description | Safely change Counterfact runtime/server internals while preserving module boundaries, hot reload behavior, and backward compatibility guarantees. |
| applyTo | ["src/app.ts","src/api-runner.ts","src/server/**/*.ts","src/util/**/*.ts","test/server/**/*.test.ts","test/app.test.ts"] |
Use this skill when changing runtime orchestration, server dispatch flow, module loading/hot reload, or context/registry behavior.
src/app.tssrc/api-runner.tssrc/server/dispatcher.tssrc/server/module-loader.tssrc/server/web-server/create-koa-app.tsdocs/reference.md (architecture + runtime behavior)app.ts / ApiRunner; avoid leaking server details into generator modules.registry, context-registry, module-loader, dispatcher) and connected through explicit constructor interfaces.docs/development/design-principles.md).src/server/* code paths.app.ts.dispatcher or Koa middleware.yarn lint, yarn build, yarn test.test/server/dispatcher.test.ts, test/server/module-loader.test.ts, test/app.test.ts.yarn go:example when behavior changes.