Add ai-sources task, update ai-docs to include all docs
ai-sources: concatenates all git-tracked files (excluding lock files and other non-useful artifacts) for full codebase AI context (~353K tokens). ai-docs: now concatenates all docs instead of a curated subset (~85K tokens). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4ca2e39901
commit
9566d8fec9
2 changed files with 26 additions and 20 deletions
|
|
@ -1,26 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#MISE description="Prime AI context with key BlumeOps documentation"
|
#MISE description="Prime AI context with all BlumeOps documentation"
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
DOCS_DIR="$(cd "$(dirname "$0")/.." && pwd)/docs"
|
DOCS_DIR="$(cd "$(dirname "$0")/.." && pwd)/docs"
|
||||||
|
|
||||||
# Key files for AI context priming, in order of importance
|
# Concatenate all docs (excluding changelog fragments)
|
||||||
FILES=(
|
find "$DOCS_DIR" -name '*.md' -not -path '*/changelog.d/*' | sort | while read -r f; do
|
||||||
"$DOCS_DIR/tutorials/ai-assistance-guide.md"
|
printf '=== %s ===\n' "${f#"$DOCS_DIR/"}"
|
||||||
"$DOCS_DIR/how-to/agent-change-process.md"
|
cat "$f"
|
||||||
"$DOCS_DIR/index.md"
|
printf '\n'
|
||||||
"$DOCS_DIR/how-to/operations/troubleshooting.md"
|
done
|
||||||
"$DOCS_DIR/explanation/architecture.md"
|
|
||||||
"$DOCS_DIR/reference/tools/mise-tasks.md"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Concatenate files with headers showing paths
|
|
||||||
bat --style=header --color=never --decorations=always "$@" "${FILES[@]}"
|
|
||||||
|
|
||||||
# Documentation tree — replaces the old hand-curated index files
|
|
||||||
echo ""
|
|
||||||
echo "=== Documentation Structure ==="
|
|
||||||
echo "All docs under $DOCS_DIR (excluding changelog.d/):"
|
|
||||||
echo ""
|
|
||||||
find "$DOCS_DIR" -name '*.md' -not -path '*/changelog.d/*' | sort | sed "s|$DOCS_DIR/||"
|
|
||||||
|
|
|
||||||
19
mise-tasks/ai-sources
Executable file
19
mise-tasks/ai-sources
Executable file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#MISE description="Concatenate all BlumeOps source files for AI context"
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
|
||||||
|
# All git-tracked files, excluding lock files and other non-useful artifacts
|
||||||
|
git -C "$ROOT" ls-files \
|
||||||
|
| grep -v '\.lock$' \
|
||||||
|
| grep -v '\.gitignore$' \
|
||||||
|
| grep -v '\.gitkeep$' \
|
||||||
|
| grep -v '\.gitattributes$' \
|
||||||
|
| grep -v '^LICENSE$' \
|
||||||
|
| while read -r f; do
|
||||||
|
printf '=== %s ===\n' "$f"
|
||||||
|
cat "$ROOT/$f"
|
||||||
|
printf '\n'
|
||||||
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue