Skip to content

feat(onboarding): add onboarder persona + onboard-project meta-pipeline (1.1)#1581

Merged
nextlevelshit merged 1 commit into
mainfrom
1576-onboarder-meta-pipeline
Apr 29, 2026
Merged

feat(onboarding): add onboarder persona + onboard-project meta-pipeline (1.1)#1581
nextlevelshit merged 1 commit into
mainfrom
1576-onboarder-meta-pipeline

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

Summary

  • Adds onboarder persona for project introspection and .agents/* generation
  • Adds onboard-project meta-pipeline (4 steps: detect → propose → generate → finalize)
  • Adds detection.schema.json JSON Schema for validating persona detection output
  • Adds prompts under internal/defaults/prompts/onboard/ for each step
  • Writes sentinel .agents/.onboarding-done via PRE-2 MarkDoneAt helper

Related to #1576

Changes

  • internal/defaults/personas/onboarder.{md,yaml} — new persona definition
  • internal/defaults/pipelines/onboard-project.yaml — meta-pipeline (mirrors ops-bootstrap.yaml pattern)
  • internal/defaults/contracts/detection.schema.json + .agents/contracts/detection.schema.json — JSON schema for detection output
  • internal/defaults/prompts/onboard/{detect,propose,generate,finalize}.md — step prompts
  • internal/defaults/onboarder_test.go — embed + schema validation tests
  • specs/1576-onboarder-meta-pipeline/{spec,plan,tasks}.md — planning docs

Test Plan

  • go test ./internal/defaults/... (embed + schema validation)
  • Smoke run wave run onboard-project on Go repo
  • Smoke run wave run onboard-project on Node repo
  • Verify .agents/personas/*, .agents/pipelines/*, .agents/prompts/* produced
  • Verify sentinel .agents/.onboarding-done written

…ne (1.1)

Phase 1.1 of Epic #1565. Ships the first user-facing artefact of the
onboarding-as-session vision: a four-step meta-pipeline that surveys an
existing project, proposes a tailored .agents/* overlay, writes it, and
marks the project as onboarded.

- internal/defaults/personas/onboarder.{md,yaml}: workspace-scoped agent
  with hard rule "never write outside .agents/"
- internal/defaults/contracts/detection.schema.json (+ mirror in
  .agents/contracts/): schema for the detect step's JSON output
- internal/defaults/prompts/onboard/{detect,propose,generate,finalize}.md
- internal/defaults/pipelines/onboard-project.yaml: four steps wired with
  artifact handover, json_schema contract on detect, non_empty_file
  contracts elsewhere
- Tests: schema validates valid + invalid fixtures, registry load checks
  for the persona / pipeline / prompts, persona-count bumped 31 -> 32

Issue: #1576
@nextlevelshit nextlevelshit merged commit 5065e28 into main Apr 29, 2026
11 checks passed
@nextlevelshit nextlevelshit deleted the 1576-onboarder-meta-pipeline branch April 29, 2026 21:50
nextlevelshit added a commit that referenced this pull request Apr 29, 2026
#1586)

* fix(cli): unblock cold-start bootstrap pipelines + materialise outputs

The 1.1 onboarder pipeline (PR #1581) merged with three latent
chicken-and-egg gates that prevented `wave run onboard-project` from
ever executing on a fresh repo — the exact scenario it was designed for.

Fixes:

- `checkOnboarding(pipelineName)` now exempts a small bootstrap
  allowlist (`onboard-project`, `ops-bootstrap`). Other pipelines
  still require a primed `.agents/` or `wave.yaml`.

- `loadManifestStrict` falls back to a synthesised in-memory
  manifest from embedded defaults when a bootstrap pipeline runs
  with no on-disk wave.yaml. The pipeline is expected to write the
  real manifest as part of its output.

- `pipeline.LoadByName` falls back to embedded defaults for the
  bootstrap allowlist only, preserving the existing "manifest owns
  pipeline resolution" contract for everything else.

- `claude.prepareWorkspace` now reads base-protocol.md + persona
  prompts from embedded defaults when missing on disk, so the
  workspace can be assembled before scaffolding completes.

- `runDetached` + `buildStateStore` mkdir-all `.agents/` so SQLite
  can open `state.db` in a cold-start repo.

- New `materialiseBootstrapOutputs` post-pipeline hook copies the
  sentinel, wave.yaml, output JSONs, and any custom personas /
  pipelines / prompts / contracts from the run's worktree
  workspaces back to the project root. Without this the worktree
  isolation that's correct for impl-issue PRs traps the onboarding
  artefacts inside `.agents/workspaces/<run-id>/`.

- onboard-project.yaml: removed `model: cheapest` defaults so CLI
  `--model` flag is respected (was forcing cheapest regardless).

Real-verification (run on cold-start `/tmp/wave-smoke-onboard-{go,node}`
repos with `--adapter claude --model balanced --detach`):

- Go smoke: 4/4 steps, 180s, 73k tokens. Sentinel + 4 output JSONs
  at project root.
- Node smoke: 4/4 steps, 230s, 79k tokens. Sentinel + 3 output JSONs
  + generated `node-implementer.md` persona at project root.

Updates:
- TestBaseProtocolMissingError → TestBaseProtocolEmbeddedFallback,
  asserts new fallback semantics.
- All other tests in cmd/wave/commands and internal/pipeline still
  pass.

* fix(defaults): split embed FS into sub-package to break import cycle

Moving the embed FS readers into internal/defaults/embedfs (a leaf
package with no internal/manifest dependency) lets internal/adapter
and internal/pipeline pull cold-start fallback content without
forming an import cycle through internal/manifest's permissions test.

- internal/defaults/embedfs: leaf package owning all embedded asset
  files (personas, pipelines, contracts, prompts, schemas, skills)
  + simple readers returning string maps
- internal/defaults: now a thin wrapper that re-exports the embedfs
  readers and adds the manifest-typed GetPersonaConfigs (only used
  by internal/onboarding, which transitively imports manifest)
- internal/adapter/claude.go: cold-start fallback for base-protocol.md
  + persona prompts now reads via embedfs (was internal/defaults,
  triggered the cycle)
- internal/pipeline/load_by_name.go: bootstrap embedded-pipeline
  fallback now reads via embedfs

Test path updates for sync_test.go + impl_finding_workspace_test.go +
all_pipelines_load_test.go to point at the new embedfs/* directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant