mirror of
https://github.com/MaksTinyWorkshop/_Assistant_Lead_Tech
synced 2026-04-06 21:41:42 +02:00
update symlinks & script
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# sync-ai-instructions.sh
|
||||
# Génère CLAUDE.md depuis _AI_INSTRUCTIONS.md + _projects.conf
|
||||
# puis recrée AGENTS.md comme symlink vers CLAUDE.md
|
||||
# Génère un unique CLAUDE.md dans le repo Lead_tech depuis _AI_INSTRUCTIONS.md + _projects.conf
|
||||
# puis recrée les liens symboliques nécessaires vers ce fichier unique
|
||||
# selon la machine courante (Darwin = Mac, Linux = NUC)
|
||||
|
||||
set -euo pipefail
|
||||
@@ -35,8 +35,7 @@ build_projects_table() {
|
||||
done < "$PROJECTS_CONF"
|
||||
}
|
||||
|
||||
# --- Fonction de génération ---
|
||||
generate() {
|
||||
generate_repo_claude() {
|
||||
local header="$1"
|
||||
local dest="$2"
|
||||
local projects_table
|
||||
@@ -79,6 +78,8 @@ ensure_symlink() {
|
||||
if [ "$current_target" = "$target" ]; then
|
||||
return 0
|
||||
fi
|
||||
elif [ -e "$link_path" ]; then
|
||||
rm -f "$link_path"
|
||||
fi
|
||||
|
||||
rm -f "$link_path"
|
||||
@@ -89,11 +90,11 @@ ensure_symlink() {
|
||||
CLAUDE_HEADER="# Instructions globales — Lead Tech Copilote
|
||||
|
||||
Ce fichier est chargé automatiquement par Claude Code ou Codex à chaque session.
|
||||
Il pointe vers la base de connaissance commune à tous les projets."
|
||||
Il constitue la porte d'entrée principale de la base de connaissance Lead_tech et oriente vers les fichiers spécialisés utilisés par tous les projets."
|
||||
|
||||
generate "$CLAUDE_HEADER" "$HOME/.claude/CLAUDE.md"
|
||||
generate "$CLAUDE_HEADER" "$SCRIPT_DIR/CLAUDE.md"
|
||||
generate_repo_claude "$CLAUDE_HEADER" "$SCRIPT_DIR/CLAUDE.md"
|
||||
|
||||
ensure_symlink "$SCRIPT_DIR/CLAUDE.md" "$HOME/.claude/CLAUDE.md"
|
||||
ensure_symlink "$HOME/.claude/CLAUDE.md" "$HOME/.codex/AGENTS.md"
|
||||
ensure_symlink "$SCRIPT_DIR/CLAUDE.md" "$SCRIPT_DIR/AGENTS.md"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user