import type { ClientPlatform } from "./types.js"; /** * The configuration object the algorithm runs against: WHERE everything * lives in the repository. No role implementation may hardcode a path — * every file operation resolves through this layout, which is what makes * the algorithm portable across projects with the same architecture. * * All paths are relative to `root` unless stated otherwise. */ export interface RepoLayout { /** Absolute path to the repository root. */ root: string; backend: BackendPaths; contract: ContractPaths; /** One entry per UI client the algorithm builds. */ clients: Record; behavior: BehaviorPaths; smokeTests: SmokeTestPaths; infra: InfraPaths; } export interface BackendPaths { /** The api-server package. */ root: string; /** * The bounded contexts of the app layer — each holds its use cases and * domain objects. The backend agent finds/creates use cases here, and * the domain-distillation step reads and extends the aggregates here. */ boundedContexts: string[]; /** Where new use cases get registered. */ useCaseResolver: string; /** HTTP routes/controllers — where endpoints are wired to use cases. */ routes: string; /** The database layer as a whole. */ database: string; /** The in-memory (fake) repository implementations. */ inMemoryDatabase: string; /** The Postgres repository implementations. */ postgresDatabase: string; /** The schema definition files the migration diff runs against. */ postgresSchema: string; /** Generated migration files. */ migrations: string; /** The SQL queries directory the typed query code is generated from. */ sqlQueries: string; /** The fake-vs-Postgres repository equivalence tests (loop B2). */ repoEquivalenceTests: string; } export interface ContractPaths { /** The OpenAPI package. */ root: string; /** The shared spec, if the project has one. */ sharedSpec?: string; /** Each client's slice of the contract. */ perClientSpecs: Record; } /** The per-client seams — the same shape for every UI client. */ export interface ClientPaths { /** The client's package. */ root: string; /** The fake API implementation compiled into the client (C1's target). */ fakeBackend: string; /** The real API client (wired in the real-api phase). */ realBackend: string; /** * The API types the client codes against: generated from the OpenAPI * spec where generation is set up, hand-written models otherwise. */ apiModels: string; /** The fake-vs-real contract tests (loop C2, `*.int.spec.ts`). */ backendIntegrationTests: string; /** The client's e2e suite against its fake (loop C1). */ e2eTests: string; /** * Where the client's own backend-for-frontend routes live, one * directory per use case, when the client has a server side (the * Next.js app does; a pure SPA does not). */ apiRoutes?: string; /** The shared selector constants for this client — never inline ids. */ selectors: string; } export interface BehaviorPaths { /** The behavior package. */ root: string; /** The Gherkin feature files (tagged @web / @mobile / @feature-flags-admin). */ features: string; /** * The shared DSL directory (dsl.ts plus per-client subsets such as * mobile-dsl.ts that Pick<> from it so vocabulary cannot drift). */ dsl: string; /** DSLs fully separate from the shared one (e.g. the flags-admin DSL). */ separateDsls: Partial>; /** Protocol-driver implementations, per client. */ protocolDrivers: Record; /** Acceptance tests, per client. */ acceptanceTests: Record; } export interface SmokeTestPaths { /** The smoke-tests package (hand-written journey flows, mobile only). */ root: string; /** The journey flow files the smoke phase weaves interactions into. */ flows: string; /** The smoke runner's workspace config. */ runnerConfig: string; } export interface InfraPaths { /** Container stacks for running the app and its dependencies locally. */ localDevelopment: string; /** The task runner entry point — the algorithm runs suites through it. */ taskfile: string; /** The CI pipeline definition — names the jobs the RemoteTestExecutor reuses. */ ciConfig: string; /** Pinned tool versions (node, go, postgres, ...). */ globalConfiguration: string; } /** * The nextjs-fastify example project, inside farketari's own repository. * * The stacks live in the REPO, not in the npm package, so this resolves * to a real directory in a checkout and to a nonexistent one in an * installed copy — which is correct: an installed farketari is always * told where its example is, through exampleProjectSource or --example, * and loadTemplate overwrites this root with that path. */ export declare const NEXTJS_FASTIFY_EXAMPLE_ROOT: string; /** * The layout of the nextjs-fastify example project, as a worked example * and the default for that stack. */ export declare const NEXTJS_FASTIFY_BOILERPLATE_LAYOUT: RepoLayout;