solutions: Solutions Guide engine (catalog, rules, wizard state, native config, knowledge index, CLI)

New nested module yetano.dev/yetano/core/solutions: loads the catalog
in assets/solutions on top of the Big Picture, evaluates questions and
conditions, resolves packages/modules/capabilities, generates native
configuration from typed fragments with per-value origins, and builds
architecture graph, plan, lock file and handbook. Knowledge index with
yetano: references, search and lint (incl. manual sections). CLI with
yet's conventions (solution, task, knowledge, open), standalone as
yetano-solutions. No execution, no network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-12-01 08:42:58 +01:00
1 parent 586e76889c
commit 2481a0dd27
48 files changed
+10304

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
interfaces: []
connections:
- {id: connection.app-idp, from: product.app, to: product.idp, type: authenticatesVia, label: signs in through, scope: general, review: confirmed}
+2
View File
@@ -0,0 +1,2 @@
title: Test Big Picture
content: {topics: topics.yaml, products: products, stories: stories, connections: connections.yaml}
+3
View File
@@ -0,0 +1,3 @@
id: product.app
name: app
summary: The test application.
+3
View File
@@ -0,0 +1,3 @@
id: product.idp
name: idp
summary: An identity provider.
+5
View File
@@ -0,0 +1,5 @@
id: story.run-app
title: Run the app
intent: I want to run the app.
outcome: The app runs.
primaryTopic: topic.t
+2
View File
@@ -0,0 +1,2 @@
topics:
- {id: topic.t, title: Testing, summary: Test topic}
+18
View File
@@ -0,0 +1,18 @@
apiVersion: yetano.dev/v1
kind: Catalog
metadata: {id: test, version: 1.0.0}
spec:
bigpicture: ../bp
webBase: https://example.test/
categories: [{id: t, topic: topic.t}]
---
apiVersion: yetano.dev/v1
kind: Capabilities
metadata: {id: caps}
spec:
capabilities:
- {id: app.serve, title: Serve the app, requires: [auth.users]}
- {id: auth.users, title: Users}
- {id: auth.sso, title: Single sign-on}
- {id: backup.files, title: Backups, external: [{id: tool, title: Your tool}]}
- {id: feature.x, title: Feature X}
+48
View File
@@ -0,0 +1,48 @@
apiVersion: yetano.dev/v1
kind: Package
metadata: {id: app}
spec:
bigpicture: product.app
sources: [test]
modules:
- {id: server, title: Server, program: app-server, kind: daemon, provides: [app.serve]}
- {id: users, title: Local users, kind: library, provides: [auth.users], priority: 10}
- {id: extra, title: Extra, program: app-extra, kind: daemon, provides: [feature.x]}
- {id: ghost, title: Not built, support: not-implemented, provides: [auth.sso]}
---
apiVersion: yetano.dev/v1
kind: Package
metadata: {id: idp}
spec:
bigpicture: product.idp
sources: [test]
modules:
- {id: sso, title: SSO, program: idp, kind: daemon, provides: [auth.sso, auth.users], priority: 1}
---
apiVersion: yetano.dev/v1
kind: Package
metadata: {id: bak, summary: Backups}
spec:
sources: [test]
modules:
- {id: b, title: Backup, program: bak, provides: [backup.files], support: experimental}
---
apiVersion: yetano.dev/v1
kind: Profile
metadata: {id: base, package: app}
spec:
modules: {server: enabled, users: enabled, extra: disabled}
config:
- file: app/app.yaml
set: {log: info, listen: ":8080", limits: {max: 10, min: 1}}
---
apiVersion: yetano.dev/v1
kind: Profile
metadata: {id: big, package: app}
spec:
extends: base
modules: {extra: enabled}
config:
- file: app/app.yaml
set: {limits: {max: 100}}
- {file: app/extra.yaml, module: extra, set: {on: true}}
+60
View File
@@ -0,0 +1,60 @@
apiVersion: yetano.dev/v1
kind: Solution
metadata: {id: app-run, version: 1.0.0, category: t, status: supported}
spec:
bigpicture: story.run-app
capabilities: {required: [app.serve], recommended: [backup.files]}
packages:
- {id: app, profile: base, role: core, when: {size: small}}
- {id: app, profile: big, role: core, when: {size: big}}
questions:
- id: size
type: select
title: How big?
default: small
options:
- {id: small, title: Small, recommended: true, reason: fits most}
- {id: big, title: Big}
- {id: hosts, type: list, item: hostname, title: Host names, required: true, instanceSpecific: true, validation: {minItems: 1}}
- id: identity
type: select
title: Users?
level: guided
default: local
options:
- {id: local, title: Local}
- {id: central, title: Central IdP, requires: {packages: [idp], capabilities: [auth.sso]}}
- {id: ghost, title: Ghost, support: not-implemented, supportNote: not built}
- {id: realm, type: string, title: Realm, visibleWhen: {identity: central}, required: true}
- {id: token, type: secret, level: advanced, title: Token}
- {id: owner, type: email, level: guided, title: Owner, default: "admin@${hosts[0]}"}
- id: backup
type: select
title: Backup
level: guided
default: none
options:
- {id: none, title: None}
- {id: mine, title: My tool, provides: [backup.files]}
- {id: bak, title: bak, requires: {packages: [bak]}}
- {id: port, type: port, level: advanced, title: Port, default: 8080}
rules:
- {id: big-warn, when: {size: big}, message: Big needs more memory., severity: warning}
- {id: no-x-small, when: {size: small}, excludes: {capabilities: [feature.x]}}
configuration:
- id: main
file: app/app.yaml
set: {hosts: "${hosts}", owner: "${owner}", listen: ":${port}", first: "${hosts[0]}", n: "${hosts.count}"}
- {id: sso, file: app/app.yaml, when: {identity: central}, set: {sso: {realm: "${realm}"}}}
- {id: tok, file: app/app.yaml, when: {token: {set: true}}, set: {token: "${token}"}}
- {id: idp, file: idp/idp.yaml, set: {realm: "${realm}"}, when: {identity: central}}
- {id: never, file: bak/bak.yaml, set: {x: 1}}
steps:
- {id: add, title: "Add ${item}", forEach: hosts, run: "app add ${item}", phase: data, mutating: true}
- {id: inst, title: "Install ${item}", package: app, forEach: $modules, run: "yet install ${item}", phase: install}
requirements:
- {id: port, title: Port free, kind: port, params: {port: "${port}"}, local: true}
- {id: bigonly, title: Memory, kind: manual, when: {size: big}}
architecture:
nodes: [{id: users, type: client, title: "Users of ${hosts[0]}"}]
edges: [{from: users, to: "mod:app/server", type: connectsTo}]