context-load walks from cwd upward, loading CLAUDE.md, CONTEXT.md, MEMORY.md, and BESTPRACTICES.md files with directory trees and git status. start-claude wraps the claude CLI with --append-system-prompt. CLAUDE.md: removed Ansible/Helm sections (in best-practices/), folded Validate Before Deploying into Process Principles, deduped secrets bullet, fixed best-practices path references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
673 B
Bash
Executable File
26 lines
673 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# start-claude — Launch Claude Code with pre-loaded project context
|
|
#
|
|
# Runs context-load to gather CLAUDE.md files, directory trees,
|
|
# CONTEXT.md files, cwd markdown, and git status, then passes
|
|
# the result as an appended system prompt.
|
|
#
|
|
# All arguments are forwarded to claude.
|
|
set -uo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
CONTEXT_LOADER="${SCRIPT_DIR}/context-load"
|
|
|
|
if [[ ! -x "$CONTEXT_LOADER" ]]; then
|
|
echo "Error: context-load not found at $CONTEXT_LOADER" >&2
|
|
exit 1
|
|
fi
|
|
|
|
context="$("$CONTEXT_LOADER")"
|
|
|
|
if [[ -n "$context" ]]; then
|
|
exec claude --append-system-prompt "$context" "$@"
|
|
else
|
|
exec claude "$@"
|
|
fi
|