diff --git a/.ai-context/manifest.md b/.ai-context/manifest.md index bb51f31..d615482 100644 --- a/.ai-context/manifest.md +++ b/.ai-context/manifest.md @@ -17,7 +17,7 @@ base-demo's manifest is intentional and maps to a visible Base workflow. | `build.targets` | `basectl build` | `info` target runs `src/build-info.sh` | | `test.command` | `basectl test` | Runs `tests/validate.sh` | | `demo.script` | `basectl demo` | Runs `demo/demo.sh` | -| `artifacts` | `basectl setup` | Empty — no external Python packages needed | +| `artifacts` | `basectl setup` | Requests the `bats-core` tool artifact; setup reports whether the Homebrew package is already current or would be installed | ## Design Intent diff --git a/README.md b/README.md index 699c67b..521e543 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ each field maps to a visible Base workflow: | `build.targets` | `basectl build base-demo` | Declares build targets; the `info` target runs `src/build-info.sh`. | | `test.command` | `basectl test base-demo` | Defines the project-owned validation command. | | `demo.script` | `basectl demo base-demo` | Defines the project-owned interactive walkthrough. | -| `artifacts` | `basectl setup base-demo` | Lists Base-managed artifacts. The baseline demo uses an empty list to avoid unnecessary installs. | +| `artifacts` | `basectl setup base-demo` | Requests the `bats-core` tool artifact; the project setup layer reports whether Homebrew already has it or would install it. | The demo now includes a shallow but representative environment: multi-language service fixtures, one Dockerized app service, a React/Vite UI, Compose-backed diff --git a/base_manifest.yaml b/base_manifest.yaml index 97d5d5e..9b4f624 100644 --- a/base_manifest.yaml +++ b/base_manifest.yaml @@ -59,4 +59,7 @@ demo: script: ./demo/demo.sh description: Interactive walkthrough of Base-managed project conventions -artifacts: [] +artifacts: + - type: tool + name: bats-core + version: latest diff --git a/demo/demo.sh b/demo/demo.sh index 7bfc890..81d76ff 100755 --- a/demo/demo.sh +++ b/demo/demo.sh @@ -197,10 +197,14 @@ setup_step() { step 4 "Setup Contract" printf 'Showing the setup reconciliation plan for manifest artifacts, Brewfile dependencies, mise tools, and the project virtualenv.\n' + printf 'The representative manifest artifact is bats-core, managed as a Homebrew tool artifact by Base.\n' printf 'The walkthrough uses --dry-run so it is stable on machines where setup is already complete or local tool trust is pending.\n' printf 'For this process only, the project root is trusted for mise checks without changing persistent mise trust.\n' output="$(capture_command "$BASE_DEMO_BASECTL" setup "$BASE_DEMO_PROJECT" --manifest "$BASE_DEMO_ROOT/base_manifest.yaml" --dry-run --no-notify)" printf '%s\n' "$output" + if [[ "$output" != *"bats-core"* ]]; then + printf 'Artifact reconciliation may be deferred until the project virtualenv is healthy; the declared artifact is bats-core.\n' + fi pause } diff --git a/tests/demo_test.bats b/tests/demo_test.bats index c41f9b8..0089ed9 100755 --- a/tests/demo_test.bats +++ b/tests/demo_test.bats @@ -71,7 +71,7 @@ case "$*" in printf 'base-demo %s\n' "${BASE_PROJECT_ROOT:?}" ;; setup\ base-demo\ --manifest\ *\ --dry-run\ --no-notify) - printf '[DRY-RUN] Would reconcile base_manifest.yaml, Brewfile, mise, and project virtualenv.\n' + printf '[DRY-RUN] Would reconcile base_manifest.yaml, Brewfile, mise, project virtualenv, and bats-core artifact.\n' ;; check\ base-demo\ --manifest\ *) printf 'Base CLI environment check passed.\n' @@ -197,6 +197,7 @@ EOF [[ "$output" == *"base-demo Walkthrough"* ]] [[ "$output" == *"Workspace Discovery"* ]] [[ "$output" == *"Setup Contract"* ]] + [[ "$output" == *"bats-core"* ]] [[ "$output" == *"Project Diagnostics"* ]] [[ "$output" == *"post-activation green path"* ]] [[ "$output" == *"Declared Commands"* ]] diff --git a/tests/validate.sh b/tests/validate.sh index 77ed997..2ea37fa 100755 --- a/tests/validate.sh +++ b/tests/validate.sh @@ -296,6 +296,26 @@ grep -Fq 'currently includes mise, Gradle, and Maven' .ai-context/manifest.md || exit 1 } +grep -Fq 'artifacts:' base_manifest.yaml && grep -Fq 'name: bats-core' base_manifest.yaml || { + printf 'base_manifest.yaml does not declare the bats-core artifact.\n' >&2 + exit 1 +} + +grep -Fq 'type: tool' base_manifest.yaml && grep -Fq 'version: latest' base_manifest.yaml || { + printf 'base_manifest.yaml does not declare the bats-core artifact as a latest tool artifact.\n' >&2 + exit 1 +} + +grep -Fq 'bats-core' README.md || { + printf 'README.md does not document the demonstrated bats-core artifact.\n' >&2 + exit 1 +} + +grep -Fq 'bats-core' .ai-context/manifest.md || { + printf '.ai-context/manifest.md does not document the demonstrated bats-core artifact.\n' >&2 + exit 1 +} + grep -Fq 'build:' base_manifest.yaml || { printf 'base_manifest.yaml does not declare build targets.\n' >&2 exit 1