Problem
basectl doctor <project> checks artifact installation, Brewfile dependencies, mise tool availability, IDE setup, demo script validity, and required env/port health. But it does not check build target configuration.
Specifically, manifest_checks in cli/python/base_setup/engine.py calls check_demo for the demo contract but has no equivalent check_build call. This means:
- A build target that declares
working_dir: services/api where that directory does not exist produces no finding in basectl doctor or basectl check. The misconfiguration is invisible until basectl build is run.
- A manifest that references
build.default: [go] but declares no go target in build.targets also produces no doctor finding — this would be a manifest parsing error caught at read time, but broken working directories are not.
docs/doctor-findings.md has no BASE-P07x namespace for build findings.
Proposed Fix
Add check_build to cli/python/base_setup/demo.py (or a new build_checks.py) that verifies:
- Each target in
build.targets has a command — already validated at manifest parse time, so this is a no-op.
- Each target's
working_dir exists and is a directory under the project root — this is the meaningful check since working directory misconfiguration is only caught at runtime today.
- All targets listed in
build.default exist in build.targets — already validated at parse time.
Suggested doctor output:
ok BASE-P070 build.targets.api Build target 'api' working directory './services/api' exists.
error BASE-P070 build.targets.worker Build target 'worker' working directory './services/worker' does not exist.
Fix: Create the directory or update build.targets.worker.working_dir in base_manifest.yaml.
Add BASE-P070 (build target working directory) to docs/doctor-findings.md.
Why This Matters
basectl doctor is the pre-flight check before setup. If a developer clones a project and runs basectl doctor, they should learn about broken build configuration before they try to build. The current gap means basectl doctor passes but basectl build fails, which violates the "diagnose before you run" promise.
Problem
basectl doctor <project>checks artifact installation, Brewfile dependencies, mise tool availability, IDE setup, demo script validity, and required env/port health. But it does not checkbuildtarget configuration.Specifically,
manifest_checksincli/python/base_setup/engine.pycallscheck_demofor the demo contract but has no equivalentcheck_buildcall. This means:working_dir: services/apiwhere that directory does not exist produces no finding inbasectl doctororbasectl check. The misconfiguration is invisible untilbasectl buildis run.build.default: [go]but declares nogotarget inbuild.targetsalso produces no doctor finding — this would be a manifest parsing error caught at read time, but broken working directories are not.docs/doctor-findings.mdhas noBASE-P07xnamespace for build findings.Proposed Fix
Add
check_buildtocli/python/base_setup/demo.py(or a newbuild_checks.py) that verifies:build.targetshas acommand— already validated at manifest parse time, so this is a no-op.working_direxists and is a directory under the project root — this is the meaningful check since working directory misconfiguration is only caught at runtime today.build.defaultexist inbuild.targets— already validated at parse time.Suggested doctor output:
Add
BASE-P070(build target working directory) todocs/doctor-findings.md.Why This Matters
basectl doctoris the pre-flight check before setup. If a developer clones a project and runsbasectl doctor, they should learn about broken build configuration before they try to build. The current gap meansbasectl doctorpasses butbasectl buildfails, which violates the "diagnose before you run" promise.