-
Notifications
You must be signed in to change notification settings - Fork 0
Manifest System
Every composable module lives at cli/templates/<module-id>/manifest.json. The manifest is data, not executable code.
interface TemplateManifest {
id: string;
overlays?: OverlayDefinition[];
packages?: PackageContribution[];
env?: EnvironmentContribution[];
patches?: PatchDefinition[];
}See cli/src/composer/manifest.ts for the authoritative types and cli/src/composer/compose.ts for semantics.
A contribution may constrain any of:
| Selector | Values |
|---|---|
language |
typescript, javascript
|
framework |
next, vite, vue, astro, angular
|
projectType |
frontend, backend, fullstack, pro-backend
|
cache |
redis, memcached, none
|
proStack |
python-django, go-gin
|
capability |
One canonical Pro capability |
cloud |
aws, azure, gcp
|
Selectors use AND semantics: every specified field must match. An omitted selector is unconstrained. A capability selector matches resolved Pro capabilities, not only the user's requested list.
| Scope | Frontend project | Backend project | Fullstack project | Pro backend |
|---|---|---|---|---|
root |
output root | output root | output root | output root |
frontend |
output root | invalid/unselected | frontend/ |
invalid/unselected |
backend |
invalid/unselected | output root | backend/ |
output root when used |
Scope keeps the same module portable between standalone and fullstack layouts.
An overlay copies a module-local directory into its resolved output scope. Paths are confined; absolute paths and traversal outside the module/output are rejected. By default, copying over an existing file is an error. replace: true makes replacement explicit—used by UI styles to replace a framework starter page.
Tokens are replaced in text file contents and supported path segments during copy. Binary assets pass through unchanged.
Contributions merge dependencies, devDependencies, and scripts into the package.json in their scope. Conflicting versions or script definitions are rejected rather than silently choosing one. This makes incompatible modules fail visibly.
Environment keys are accumulated per scope and written to .env.example; no real secret values are generated. Duplicate keys are deduplicated. Generated applications copy this file to .env during setup.
Patches apply exact string replacement to an existing text file:
{
"scope": "root",
"file": "docker-compose.yml",
"find": " # @praxis:services",
"replace": " redis:\n image: redis:8.8-alpine\n # @praxis:services",
"capability": "redis-cache"
}Anchors are deliberately preserved in replacement text when later capabilities must patch the same location. A target must exist exactly once; missing or ambiguous targets fail composition. Patch ordering follows module and array order.
flowchart LR
Core[pro.core] --> Stack[pro.django]
Stack --> Redis[pro.capability.redis-cache]
Redis --> Jobs[pro.capability.background-jobs]
Jobs --> Compose[pro.compose]
Core -. base files .-> Output[(Generated backend)]
Stack -. framework files .-> Output
Redis -. cache code/env .-> Output
Jobs -. worker code .-> Output
Compose -. services and wiring patches .-> Output
background-jobs implies redis-cache, so the Redis module appears before the jobs module. Stack-specific overlays provide Celery for Django and a Go worker implementation for Gin. pro.compose sees the effective capabilities and patches the appropriate services into the stack's base Compose file.
- Choose a stable, lowercase dotted ID and matching directory name.
- Add minimal overlays with explicit selectors.
- Prefer anchors owned by a base/stack module; preserve reusable anchors.
- Declare package/env changes in the manifest rather than editing unrelated modules.
- Add resolver selection or capability registration.
- Test positive output, negative absence, conflicts, and package contents.
- Update this Wiki when behavior or extension rules change.
This Wiki is generated from the repository's versioned docs/ source. Update and review the source files; do not rely on hand edits to generated Wiki pages.
- Core-Internals
- Architecture
- Repository-Map
- Code-Architecture
- Generation-Pipeline
- Manifest-System
- UI-Templates
- Testing
- Agent-Guide
- Wiki-Publishing
- Template-Architecture
- Standard-Projects
- Standard-Frontend-Architecture
- Express-Architecture
- Fullstack-Architecture
- Praxis-Pro
- Django-Architecture
- Gin-Architecture
- Capability-Architecture
- Compose-Architecture
- Kubernetes-Architecture
- Terraform-Architecture
- Extending-Generated-Projects
- Generated-Backends