Prompt file imported from loiane/specs-driven-development-spring-angular (
.github/prompts/onboard.prompt.md). Copyright stays with the author.
/onboard
Phase: 0 — bootstrap
Owning agent: .github/chatmodes/spring-onboarding.chatmode.md
Skills used: brownfield-onboarding, maven-harness-pom, flyway-or-liquibase-detection, harness-report-parsing, archunit-rules
Purpose
Inspect the repository, classify it as greenfield or brownfield, capture a baseline harness run, and produce .specs/_onboarding.md so future commands know the stack.
Inputs
None required. Optional argument: a path to constrain the scan.
- For a single-project repo: omit the argument; the script reads
./pom.xml. - For a multi-module Maven build: pass the submodule directory.
- For a polyglot monorepo (e.g. Spring Boot backend + Angular/React frontend in sibling top-level dirs): pass the Maven module directory (e.g.
shoply-api). Sibling non-JVM apps are auto-detected and recorded undersiblingsin_stack.jsonand as context-only notes in_onboarding.md. The harness only validates the Maven module; frontend tooling is owned by its own pipeline.
Reads
pom.xml(root and any submodules)src/main/**,src/test/**(counts only)db/migration/**,db/changelog/**- Existing
.specs/if any
Writes
.specs/_onboarding.md.specs/_stack.json(output of.github/scripts/detect-stack.sh).specs/_baseline.json(only if any test exists; output of.github/scripts/harness.sh --baseline)
Process
- Resolve the Maven module path (
MODULE= optional arg, else.). Run.github/scripts/detect-stack.sh "$MODULE/pom.xml" > .specs/_stack.json. Refuse to proceed ifmigration == "both". - Count source/test files under
$MODULE/src/; classify:- Greenfield if no
src/main/java/**or only the Spring BootApplication.java(auto-generated*ApplicationTests.javaandTestcontainers*.javascaffolding do not change the classification). - Brownfield otherwise.
- Greenfield if no
- If brownfield, run
.github/scripts/harness.sh --module "$MODULE" --baselineand capture results. Do NOT attempt to fix failures. - Diff
$MODULE/pom.xmlagainst.github/maven/parent-pom-fragment.xml; list missing harness layers as Findings. - Write
.specs/_onboarding.mdcovering: classification, module path, sibling apps (if any), stack JSON, baseline gate results (or “N/A — greenfield”), missing layers, recommended/specstarting point.
Refuse if
migration == "both"— fatal; ask the user to pick one.- No
pom.xmlis found at the resolved module path. (In a polyglot monorepo the user must pass the Maven module directory.)
Done when
.specs/_onboarding.md exists and the user has been shown a one-paragraph summary plus the next recommended command.