A capstone script should make the intended amount of work visible before it runs. This example builds a bounded task plan from a fixed list.

Program

Play the script to choose how many automation steps are planned for the run.

automation_task_plan.sh
#!/usr/bin/env bash

task_count=
completed=0
plan=""
for task in lint test publish docs cleanup; do
    if [[ "$completed" -ge "$task_count" ]]; then
        break
    fi
    completed=$((completed + 1))
    plan="${plan}${task} "
done
summary="${plan% }"
echo "planned=$completed steps=$summary"
#!/usr/bin/env bash

task_count=
completed=0
plan=""
for task in lint test publish docs cleanup; do
    if [[ "$completed" -ge "$task_count" ]]; then
        break
    fi
    completed=$((completed + 1))
    plan="${plan}${task} "
done
summary="${plan% }"
echo "planned=$completed steps=$summary"
capstone plan A capstone automation script should expose the steps it intends to run.
work bound A numeric bound keeps a script from doing more work than intended.
plan summary A compact summary makes the selected steps easy to review.