feat(build): 3x3 build-recipe contract + CLI-surface reconciliation (closes #57) - #58
Merged
Merged
Conversation
Net-new buildable slice from the Prophet CLI & System Architecture spec (#57). Two schema-shaped artifacts with teeth, both wired into `make validate` and CI: build/recipes.yaml — `prophet build local|region|macro` as an ordered, acyclic chain of stages, each with a required health gate so stage N+1 cannot start until stage N verifies. manifests/build-recipes.schema.json is the source of truth for the tier enum and stage keys, so schema and validator cannot drift. scripts/validate_build_recipes.py proves the ordering is a DAG (no cycles, no forward edges, no skip edges) and every stage carries a real gate. Reject fixtures under build/fixtures/ fire on forward dep, missing gate, unknown tier, and cycle; --self-test asserts the accept fixture verifies and each reject fixture is rejected. manifests/cli-surface.json + scripts/validate_cli_surface.py reconcile the spec command tree (context/config/build/fs/graph/... /agents) onto the canonical verb model in docs/CLI_SURFACE_POLICY.md. Verb drift fires both ways (declared-but-not-in-policy and in-policy-but-not-declared); nouns must resolve only to canonical verbs (no competing command language); per phase-1 policy, deferred nouns must not scaffold empty subtrees. Only nouns with a real delegate (build/vocab/search/agents) are adopted; the rest are deferred as follow-up. Consume-not-fork: recipes delegate to already-real engines (sourceos-spec Genesis/Inception/Twin, estate gitops-promote); this repo owns only the ordering + gate contract and the surface reconciliation.
…LI-surface deferred-delegate/duplicate-noun bypasses Red-team of the merged teeth surfaced four holes the validators admitted: - recipe: a stage with an unknown key (e.g. skip:true) passed although the schema declares additionalProperties:false -- a runtime-honoured field could bypass the health gate the contract exists to enforce; - recipe: two recipes sharing a tier passed, making prophet build <tier> ambiguous (the 3x3 contract is one recipe per tier); - recipe: stage ids violating the schema id pattern passed; - cli-surface: a deferred noun with a real delegate (no verbs) scaffolded a subtree, and duplicate noun entries were silently deduped. Harden both validators (schema-driven, no new deps) and add reject fixtures reject-duplicate-tier.yaml and reject-unknown-key.yaml plus deferred-delegate and duplicate-noun self-test cases. All teeth fire both ways.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57. cc @mdheller. Related: #76.
Lands the one net-new, schema-shaped slice from the Prophet CLI & System Architecture spec (intake 2026-07-31). Everything else the spec commits to is already-real elsewhere and is consumed, not rebuilt (sourceos-spec Genesis/Inception/Twin,
source-os/runtime/quorumd, estate gitops-promote / gate.yml / canary lifecycle, TriTRPC transport skins, prophet-platform deploy plane). This repo owns only the ordering + gate contract and the surface reconciliation.1. 3x3 build-recipe contract (DAG + health-gate teeth)
build/recipes.yaml—prophet build local|region|macro, each an ordered, acyclic chain of 3 stages. Every stage declaresdepends_on+ a required health gate, so stage N+1 cannot start until stage N verifies.manifests/build-recipes.schema.json— schema-as-code. It is the single source of truth for the tier enum and stage keys;scripts/validate_build_recipes.pyreads them back, so schema and validator cannot silently drift.scripts/validate_build_recipes.py— proves the ordering is a DAG: no cycles, no forward edges, no skip edges, and every stage has a real gate (required: true+ non-emptycheck; anything weaker is treated as missing).Teeth (both ways)
Accept fixture (
build/recipes.yaml) VERIFIES. Reject fixtures underbuild/fixtures/each fire:reject-forward-dep.yamlreject-missing-gate.yamlreject-unknown-tier.yamlreject-cycle.yamldepends_on--self-testasserts accept passes AND every reject fires with the expected reason. Negative control confirmed: weakening a reject fixture makes--self-testexit non-zero.2. Command-tree reconciliation (decision-as-data)
manifests/cli-surface.json+scripts/validate_cli_surface.pyreconcile the spec command tree (context/config/build/fs/graph/docker/conda/minio/rsync/kafka/work/vocab/gib/search/opencog/genesis/inception/twin/bridge/agents) onto the canonical verb model indocs/CLI_SURFACE_POLICY.md.build,vocab,search,agents); the remaining 16 are deferred as follow-up (surface growth is policy-gated).Wiring
make validate→validate-manifests→ both self-tests. Alsomake validate-recipes/make validate-surface..github/workflows/build-recipes.yml;validate.ymlgains Python +pyyamlsomake validatestays green.Local teeth results
Follow-up (out of this slice)
Deferred noun-namespace adoption (the 16 nouns without a real delegate) — filed separately @mdheller; surface growth is policy-gated and must not scaffold empty subtrees.