Add document apiVersion (conventions/v1) + per-convention semver + updated date to the schema and all seed conventions; manifest files carry their own apiVersion (infra/v1). New ./run (symlink -> scripts/cli/run) with lint:yaml validating every programming_*/<name>.yaml against the schema (name==filename, scope==dir). Rename infra-manifest.yaml -> infra_manifest.yaml for name match. 4/4 valid. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
58 lines
2.2 KiB
YAML
58 lines
2.2 KiB
YAML
apiVersion: conventions/v1
|
|
version: 0.1.0
|
|
updated: "2026-06-29"
|
|
name: infra_manifest
|
|
title: Per-project infra manifest (.infra.yaml)
|
|
scope: general
|
|
status: draft
|
|
summary: Every deployable project declares its infrastructure in a root .infra.yaml; a future infra-apply tool renders it to the provider (DO / Terraform).
|
|
appliesTo: ["@applications/*", "@projects/@cocottetech", "@projects/@magic-civilization"]
|
|
rules:
|
|
- id: own_db
|
|
level: must
|
|
text: A project needing a database declares its own logical DB + dedicated user on the shared managed cluster (data-sourced), never reusing another service's creds.
|
|
rationale: own-DB-per-service + credential separation.
|
|
- id: http_coupling
|
|
level: must
|
|
text: Cross-service dependencies are HTTP only (declared in depends_on), never shared databases.
|
|
- id: gpu_ondemand
|
|
level: should
|
|
text: GPU workloads are on-demand — provision, keep warm while the queue is deep, release on idle. Never a standing GPU.
|
|
providesFile:
|
|
path: .infra.yaml
|
|
schema:
|
|
$schema: "https://json-schema.org/draft/2020-12/schema"
|
|
title: ProjectInfraManifest
|
|
type: object
|
|
additionalProperties: false
|
|
required: [apiVersion, project, provider]
|
|
properties:
|
|
apiVersion: { type: string, const: "infra/v1", description: "Manifest contract version (independent of the convention's own version)." }
|
|
project: { type: string }
|
|
provider: { type: string, enum: [digitalocean] }
|
|
database:
|
|
type: object
|
|
additionalProperties: false
|
|
required: [cluster, name, user]
|
|
properties:
|
|
cluster: { type: string, description: Shared managed cluster — data-sourced, not owned here. }
|
|
name: { type: string }
|
|
user: { type: string }
|
|
service:
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
host: { type: string }
|
|
runtime: { type: string }
|
|
port: { type: integer }
|
|
systemd_unit: { type: string }
|
|
gpu:
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
mode: { type: string, enum: [on-demand] }
|
|
droplet: { type: string }
|
|
depends_on:
|
|
type: array
|
|
items: { type: string }
|
|
description: Other services consumed over HTTP.
|