Prompt file imported from jabrena/dvbe26-workshop (
.cursor/commands/onboarding.md). Copyright stays with the author.
onboarding
Establish the two repository prerequisites for issue-driven work: root AGENTS.md and exactly one unambiguous OpenSpec project.
Usage
/onboarding
Owner and delegation
- Owner:
@plinth-architect - Missing root guidance: delegate to
200-agents-mdwith the repository root as context. - Missing OpenSpec project: delegate standard initialization to
042-planning-openspecwith the selected result directory and its parent project root as context.
/onboarding coordinates these existing workflows. It does not duplicate their interactive questions, generation rules, validation, or CLI safeguards.
Prerequisite outcomes
- Preserve an existing root
AGENTS.mdunchanged. - Recursively discover every directory whose name is exactly
openspec; accept and preserve exactly one directory wherever it is located. - When no OpenSpec directory exists, ask for a normalized repository-relative result path and offer
documentation/openspecas the default. - Stop before every mutation when more than one OpenSpec directory exists.
Workflow
- Resolve the repository root. Inspect
<repository-root>/AGENTS.mdand recursively discover the complete set of directories named exactlyopenspecbefore starting any delegated workflow or changing any file. - Evaluate OpenSpec ambiguity before mutation.
- If more than one directory named
openspecwas found, report every conflicting repository-relative path, identify the ambiguity as technical debt, and stop. - Do not start
200-agents-mdor042-planning-openspec, even when rootAGENTS.mdis missing. - If exactly one was found, record and preserve that project without asking for another path or starting initialization.
- If more than one directory named
- When no directory named
openspecexists, ask the user to select the resulting OpenSpec directory and offerdocumentation/openspecas the default.- Treat the selection as a result directory, not as the project-root argument to
openspec init. - Normalize the selection before mutation.
- Reject absolute paths, any normalized path that escapes the repository, and any path whose final segment is not exactly
openspec. - On invalid input, explain the failure and ask for a valid repository-relative OpenSpec directory or an explicit cancellation.
- If the user cancels, report cancellation and stop without starting either delegated workflow or changing repository content.
- Treat the selection as a result directory, not as the project-root argument to
- For a valid missing-OpenSpec selection, derive its parent directory as the initialization project root. For example:
documentation/openspec-> initialization project rootdocumentationarchitecture/openspec-> initialization project rootarchitectureDelegate only standardopenspec initbehavior to042-planning-openspec, passing both the selected result directory and derived parent project root. Do not pass the result directory itself as the project root. Do not silently choose another path after failure.
- Sequence missing prerequisites safely.
- If both prerequisites are missing, wait for delegated OpenSpec initialization to complete successfully before starting
200-agents-md; never run the interactive delegations concurrently. - If OpenSpec initialization fails or is cancelled, do not start
200-agents-mdand report that both prerequisites remain incomplete. - If OpenSpec initialization succeeds, preserve it even if the later
200-agents-mdworkflow fails or is cancelled; do not roll back delegated work.
- If both prerequisites are missing, wait for delegated OpenSpec initialization to complete successfully before starting
- When root
AGENTS.mdis missing and OpenSpec discovery is unambiguous, delegate its creation to200-agents-mdwith the repository root as context. When rootAGENTS.mdexists, preserve it unchanged and do not start its generation workflow. - Recheck root
AGENTS.mdand recursively rediscover directories named exactlyopenspecafter delegation. Report each prerequisite as preserved, created, initialized, skipped, failed, cancelled, or blocked, include the OpenSpec path when present, and distinguish full success from partial completion. - On a retry after partial completion, preserve the one initialized OpenSpec project and retry only missing root guidance. When root
AGENTS.mdand exactly one OpenSpec project already exist, perform no writes, start no delegated workflow, and report the existing OpenSpec location.
Output
- Root
AGENTS.mdoutcome: preserved, created, skipped, failed, cancelled, or blocked - OpenSpec outcome and repository-relative path: preserved, initialized, skipped, failed, cancelled, or blocked
- Overall onboarding result: successful, partially complete, cancelled, failed, or blocked by ambiguity
- Every conflicting OpenSpec location and technical-debt warning when discovery is ambiguous
Safeguards
- Complete recursive OpenSpec discovery before every mutation or delegated workflow.
- Never modify an existing root
AGENTS.mdor existing OpenSpec project. - Never select, merge, relocate, or initialize around multiple OpenSpec projects; report all conflicts and stop.
- Never accept an absolute, repository-escaping, non-normalized, or non-
openspecresult path. - Never pass the selected OpenSpec result directory directly as the
openspec initproject root; pass its parent. - Never run
200-agents-mdconcurrently with042-planning-openspecor before missing OpenSpec initialization succeeds. - Never roll back successful delegated work after a later failure or cancellation.
- Do not inspect project maturity, infer specifications from implementation, or create a custom specification baseline.
- Do not select or implement an issue.
- Do not claim success unless the final recheck finds root
AGENTS.mdand exactly one OpenSpec directory.
