Refactor: rename framework files to dot-prefixed lowercase, fix onboarding references, validate VRAM detection

- Rename AGENT.md -> .agent.md, RULES.md -> .rules.md, ONBOARDING.md -> .onboarding.md
- Rename BUG_REPORT.md -> .bug_report.md, ADVERSARIAL_BUG_REPORT.md -> .adversarial_bug_report.md, VERDICT.md -> .verdict.md
- Fix onboarding.md references to use new .onboarding.md path
- Fix stop-hook-pattern.md reference to use .onboarding.md
- Update README.md, config.md, install.sh, update.sh, prompts/*, references/*
- VRAM detection script validated and working
This commit is contained in:
2026-06-12 12:40:15 -04:00
parent c629661b28
commit 502f47eb21
22 changed files with 150 additions and 150 deletions
+19 -19
View File
@@ -172,7 +172,7 @@ detect_model_context() {
# Try to detect from config.md (global framework model settings)
local project_dir="${1:-.}"
local config_md="${HOME}/.agent-framework/config.md"
local config_md="${HOME}/.automaton/config.md"
local model_from_config=""
local override_context=""
if [[ -f "$config_md" ]]; then
@@ -200,13 +200,13 @@ detect_model_context() {
return
fi
# Try to detect from AGENT.md (project-level model override)
local agent_md="${project_dir}/.agent-framework/AGENT.md"
# Try to detect from .agent.md (project-level model override)
local agent_md="${project_dir}/.automaton/.agent.md"
if [[ -f "$agent_md" ]]; then
local model_line
model_line=$(grep -i "model" "$agent_md" 2>/dev/null | grep -v "#" | grep -v "target" | grep -v "headroom" | grep -v "peak" | grep -v "Auto-detect" | head -1)
if [[ -n "$model_line" ]]; then
echo "Found model in AGENT.md: $model_line"
echo "Found model in .agent.md: $model_line"
# Extract model name from the line
local model
model=$(echo "$model_line" | sed -E 's/.*[:=[:space:]]+//i' | tr -d '[:space:]')
@@ -237,13 +237,13 @@ detect_model_context() {
"config.yml"
"config.json"
"settings.yaml"
".agent-framework/config.yaml"
".agent-framework/config.json"
".automaton/config.yaml"
".automaton/config.json"
)
for config_file in "${config_files[@]}"; do
local abs_file=""
for candidate in "${project_dir}/${config_file}" "${project_dir}/.agent-framework/${config_file}"; do
for candidate in "${project_dir}/${config_file}" "${project_dir}/.automaton/${config_file}"; do
if [[ -f "$candidate" ]]; then
abs_file="$candidate"
break
@@ -272,7 +272,7 @@ detect_model_context() {
fi
done
echo "Model: Unknown (could not detect from AGENT.md or config files)"
echo "Model: Unknown (could not detect from .agent.md or config files)"
echo "0"
}
@@ -283,22 +283,22 @@ calculate_overhead() {
# Count tokens for the framework files that are loaded during orchestration
# These are the files loaded during the most common phase (orchestration):
# AGENT.md + RULES.md + workflow.md + orchestrate.md
# .agent.md + .rules.md + workflow.md + orchestrate.md
# Note: other phase files (decompose.md, implement.md, etc.) are only loaded during
# their specific phases, so they don't contribute to the peak context during orchestration.
local framework_files=(
"${project_dir}/.agent-framework/AGENT.md"
"${project_dir}/.agent-framework/RULES.md"
"${project_dir}/.agent-framework/prompts/workflow.md"
"${project_dir}/.agent-framework/prompts/orchestrate.md"
"${project_dir}/.automaton/.agent.md"
"${project_dir}/.automaton/.rules.md"
"${project_dir}/.automaton/prompts/workflow.md"
"${project_dir}/.automaton/prompts/orchestrate.md"
)
# Fallback: check home directory if project dir doesn't have framework
if [[ ! -f "${project_dir}/.agent-framework/AGENT.md" ]]; then
if [[ ! -f "${project_dir}/.automaton/.agent.md" ]]; then
framework_files=(
"${HOME}/.agent-framework/AGENT.md"
"${HOME}/.agent-framework/RULES.md"
"${HOME}/.agent-framework/prompts/workflow.md"
"${HOME}/.agent-framework/prompts/orchestrate.md"
"${HOME}/.automaton/.agent.md"
"${HOME}/.automaton/.rules.md"
"${HOME}/.automaton/prompts/workflow.md"
"${HOME}/.automaton/prompts/orchestrate.md"
)
fi
@@ -325,7 +325,7 @@ recommend_context() {
local overhead_tokens="$4"
# Read VRAM config from config.md if it exists
local config_md="${HOME}/.agent-framework/config.md"
local config_md="${HOME}/.automaton/config.md"
local auto_detect="Yes"
local target_context_kb=0
local override_headroom=25