Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ai-context/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion base_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions demo/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 2 additions & 1 deletion tests/demo_test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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"* ]]
Expand Down
20 changes: 20 additions & 0 deletions tests/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading