Domain extension system (ADR-012): bash-layer dispatch activates repo_kind-conditional CLI domains. install.nu copies domains/ tree; short_alias wrappers generated (personal, prov). ore help and describe capabilities domain-aware. personal domain (PersonalOntology): career skills/talks/publications/positioning, CFP pipeline (Watching→Delivered), opportunities lifecycle, content pipeline, Sessionize integration. Daemon pages: /career, /personal. provisioning domain (DevWorkspace/Mixed): FSM state, next transitions, connections graph, gates, workspace card, capabilities, backlog. Daemon page: /provisioning. VCS abstraction layer (ADR-013): reflection/modules/vcs.nu — uniform jj/git API via filesystem detection (.jj/ vs .git/). opmode.nu and git-event.nu migrated off ^git. reflection/bin/jjw.nu — jj + ontoref + Radicle agent workspace lifecycle. jjw-ncl-merge.nu registered as jj merge tool for .ontology/ NCL conflicts. init-repo.nu for new_project mode. jj/rad not in ontoref requirements — belong in orchestration project manifests. 'Framework RepoKind: ontology/schemas/manifest.ncl gains 'Framework variant; ontoref self-identifies as framework — no domain activates for the protocol itself. Web presence: personal.html and provisioning.html domain subpages. index.html gains "Project Types — Domain Extensions" section with type cards and subpage links. Nav compacted (Arch/Prov labels, solid backdrop-filter background). on+re: vcs-abstraction (adrs: adr-013) and agent-workspace-orchestration Practice nodes; 21 manifest capabilities; state.ncl catalysts updated.
90 lines
3.8 KiB
Text
90 lines
3.8 KiB
Text
let s = import "../schema.ncl" in
|
|
|
|
# Mode: new_project
|
|
# Creates a new project in the ecosystem with ontology, kogral, syntaxis, and NATS wiring.
|
|
#
|
|
# Required params (substituted in cmd via {param}):
|
|
# {project_name} — identifier used for kogral init and syntaxis project create
|
|
# {project_dir} — absolute path where the repository is created
|
|
# {ontoref_dir} — absolute path to the ontoref checkout (for ontology template)
|
|
{
|
|
id = "new_project",
|
|
trigger = "Initialize a new project in the ontoref ecosystem",
|
|
|
|
preconditions = [
|
|
"git is available in PATH",
|
|
"nickel is available in PATH",
|
|
"{project_dir} parent directory exists and is writable",
|
|
"kogral CLI available (optional — init_kogral continues on failure)",
|
|
"syntaxis CLI available (optional — create_syntaxis_project continues on failure)",
|
|
"nats CLI available (optional — configure_nats and publish_ecosystem_event continue on failure)",
|
|
"{ontoref_dir}/.ontology/ or templates/ontology/ exists",
|
|
],
|
|
|
|
steps = [
|
|
{
|
|
id = "init_repo",
|
|
action = "initialize_git_repository",
|
|
actor = 'Both,
|
|
cmd = "nu {ontoref_dir}/reflection/bin/init-repo.nu {project_dir}",
|
|
depends_on = [],
|
|
on_error = { strategy = 'Stop },
|
|
},
|
|
{
|
|
id = "copy_ontology_template",
|
|
action = "scaffold_ontology_directory",
|
|
actor = 'Agent,
|
|
cmd = "cp -r {ontoref_dir}/templates/ontology {project_dir}/.ontology",
|
|
depends_on = [{ step = "init_repo", kind = 'OnSuccess }],
|
|
on_error = { strategy = 'Stop },
|
|
note = "Copies core.ncl, state.ncl, gate.ncl stubs — project owner fills in axioms",
|
|
},
|
|
{
|
|
id = "init_kogral",
|
|
action = "initialize_kogral_graph",
|
|
actor = 'Agent,
|
|
cmd = "kogral init --name {project_name} --dir {project_dir}/.kogral",
|
|
depends_on = [{ step = "init_repo", kind = 'OnSuccess }],
|
|
on_error = { strategy = 'Continue },
|
|
note = "kogral is optional — ecosystem functions without it; execution continues on failure",
|
|
},
|
|
{
|
|
id = "create_syntaxis_project",
|
|
action = "register_project_in_syntaxis",
|
|
actor = 'Agent,
|
|
cmd = "syntaxis project create --name {project_name} --path {project_dir}",
|
|
depends_on = [{ step = "init_repo", kind = 'OnSuccess }],
|
|
on_error = { strategy = 'Continue },
|
|
note = "syntaxis is optional — execution continues on failure",
|
|
},
|
|
{
|
|
id = "configure_nats",
|
|
action = "create_nats_consumer_for_project",
|
|
actor = 'Agent,
|
|
cmd = "^nats stream add ECOSYSTEM --subjects 'ecosystem.{project_name}.>' --no-headers-only --defaults err> /dev/null",
|
|
depends_on = [{ step = "init_repo", kind = 'OnSuccess }],
|
|
on_error = { strategy = 'Continue },
|
|
note = "NATS stream creation is idempotent and optional",
|
|
},
|
|
{
|
|
id = "publish_ecosystem_event",
|
|
action = "announce_project_created",
|
|
actor = 'Agent,
|
|
cmd = "nats pub ecosystem.project.created '{\"project_name\": \"{project_name}\", \"project_dir\": \"{project_dir}\"}'",
|
|
depends_on = [
|
|
{ step = "copy_ontology_template", kind = 'OnSuccess },
|
|
{ step = "init_kogral", kind = 'Always },
|
|
{ step = "create_syntaxis_project", kind = 'Always },
|
|
{ step = "configure_nats", kind = 'Always },
|
|
],
|
|
on_error = { strategy = 'Continue },
|
|
note = "Final announcement — best-effort, does not block project creation",
|
|
},
|
|
],
|
|
|
|
postconditions = [
|
|
"{project_dir} is an initialized git repository",
|
|
"{project_dir}/.ontology/ contains core.ncl, state.ncl, gate.ncl from templates",
|
|
"ecosystem.project.created published to NATS (best-effort)",
|
|
],
|
|
} | (s.Mode String)
|