15 changed files with 279 additions and 24 deletions
+24
View File
@@ -0,0 +1,24 @@
# Agent Rules
## Model Selection Advisor
Whenever you receive a new user request or begin a new task, you MUST invoke the `model_advisor` skill to evaluate the optimal model and tool strategy before proceeding with any significant planning or code modifications.
## OKF Knowledge Base Access
Whenever the user asks you to search, query, access, or update their "knowledge", "OKF", or "Wissensdatenbank", you MUST use the custom `ctx-guard` CLI tool.
The tool is executed from the Orchestrator's virtual environment: `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge`.
**Available commands:**
- `search`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge search "query" --limit 5`
- `capture`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge capture "Note" --context privat`
- `status`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge status`
- `ingest`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge ingest`
Always run this command directly using your `run_command` tool to retrieve or update knowledge before answering the user's queries.
## PR Workflow Rule
All code changes or configurations made by agents MUST go through a Pull Request / Merge Request.
- You are not allowed to do quicksaves directly to the main branch.
- You must create a new branch, commit your changes, push to the remote, and open a PR.
- After creating the PR, you must review it for viability and only merge it once confirmed.
+11
View File
@@ -0,0 +1,11 @@
{
"last_updated": "2026-07-16T20:12:30Z",
"providers": {
"codex": {
"models": []
},
"antigravity": {
"models": []
}
}
}
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# check_quotas.sh - Modular script to check quotas
export PATH="$HOME/.local/bin:$PATH"
check_codex_quota() {
if command -v codex &> /dev/null; then
echo "[Codex Quota]"
codex quota || echo "Failed to fetch Codex quota"
fi
}
check_agy_quota() {
if command -v agy &> /dev/null; then
echo "[Antigravity Quota]"
agy quota || echo "Failed to fetch Antigravity quota"
fi
}
echo "--- Current Quotas ---"
check_codex_quota
check_agy_quota
echo "----------------------"
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# install_clis.sh - Install configured CLIs
set -e
echo "Starting CLI installations..."
echo "Checking codex..."
if command -v codex &> /dev/null; then
echo "codex is already installed. Version: $(codex --version 2>/dev/null || echo 'unknown')"
else
echo "Installing codex via curl..."
curl -fsSL https://chatgpt.com/codex/install.sh | sh
echo "codex installed successfully."
fi
echo "Checking agy (antigravity)..."
if command -v agy &> /dev/null; then
echo "agy is already installed."
else
echo "Warning: agy is not installed. Please install it manually."
fi
echo "All CLIs are set up."
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# setup_apis.sh - Trigger browser login flows
set -e
export PATH="$HOME/.local/bin:$PATH"
CLIS=("codex" "agy")
echo "Starting API Configuration via Browser Login..."
for cli in "${CLIS[@]}"; do
echo "Configuring $cli..."
if command -v "$cli" &> /dev/null; then
if [ "$cli" == "agy" ]; then
"$cli" auth
else
"$cli" login
fi
echo "$cli configured."
else
echo "Warning: $cli not installed. Please run install_clis.sh first."
fi
done
echo "API setup complete."
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
# update_models_config.sh - Fetches latest models and quotas
export PATH="$HOME/.local/bin:$PATH"
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CONFIG_FILE="$DIR/../models_config.json"
echo "{" > "$CONFIG_FILE"
echo " \"last_updated\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"," >> "$CONFIG_FILE"
# Logic to update config
echo " \"providers\": {" >> "$CONFIG_FILE"
# Codex Models
echo " \"codex\": {" >> "$CONFIG_FILE"
if command -v codex &> /dev/null; then
echo " \"models\": $(codex models --json 2>/dev/null || echo '[]')" >> "$CONFIG_FILE"
else
echo " \"models\": []" >> "$CONFIG_FILE"
fi
echo " }," >> "$CONFIG_FILE"
# Antigravity Models
echo " \"antigravity\": {" >> "$CONFIG_FILE"
if command -v agy &> /dev/null; then
echo " \"models\": $(agy models --json 2>/dev/null || echo '[]')" >> "$CONFIG_FILE"
else
echo " \"models\": []" >> "$CONFIG_FILE"
fi
echo " }" >> "$CONFIG_FILE"
echo " }" >> "$CONFIG_FILE"
echo "}" >> "$CONFIG_FILE"
echo "Models config updated at $CONFIG_FILE"
+35
View File
@@ -0,0 +1,35 @@
---
name: model_advisor
description: Evaluates a task and orchestrates execution across available CLI models based on cost, quotas, and strengths.
---
# Instructions
You have been invoked to act as a central orchestrator. You must evaluate the task, check available models and quotas, and delegate the work via CLI.
## Step 1: Check Quotas & Models
Run the following scripts from your workspace:
- `.agents/scripts/check_quotas.sh`
- Review `.agents/models_config.json` to see currently available models.
## Step 2: Evaluate the Task
Consider the following criteria:
1. **Complexity & Context**: Does it require massive context (Gemini Pro) or deep nuance (Claude Sonnet)?
2. **Cost & Quota**: Are quotas low? Use cheaper models if the task is simple.
## Step 3: Output a Recommendation & Delegate
If the task is best suited for a CLI-driven model (e.g., Codex or Antigravity with a specific model), you MUST proactively write and execute the terminal command to delegate the task.
Example output:
> [!TIP]
> **Model Advisor Recommendation**: The quota for Antigravity is healthy. I am delegating this refactoring task to Claude 3.5 Sonnet via the CLI.
Example command you might run:
```bash
agy run --model claude-3-5-sonnet "refactor the payment gateway"
```
If the task is best suited for the *current* IDE model, advise the user to proceed normally without CLI delegation. If it's suited for an IDE model you are *not* currently using, advise the user to switch models manually in the IDE.
## Step 4: Proceed
Once the CLI command completes, or if you decided to handle it locally, complete the user's request.
+76
View File
@@ -0,0 +1,76 @@
# New Device Setup Guide
This guide explains how to get your full Monorepo, AI Orchestrator, CLI agents, and Knowledge Base (`ctx-guard`) up and running on a brand new device.
## Prerequisites
Ensure the following tools are installed on your new device:
- `git`
- `python3.12` or newer
- `pipx`
- `curl`
## Step 1: Clone the Monorepo
Clone the Orchestrator to your preferred workspace directory (e.g., `~/coden`):
```bash
mkdir -p ~/coden
cd ~/coden
git clone https://git.d-hive.de/ankn/Orchestrator.git
cd Orchestrator
```
## Step 2: Set up the Knowledge CLI (`ctx-guard`)
The `ctx-guard` tool requires a Python virtual environment.
```bash
cd ~/coden/Orchestrator
python3 -m venv .venv
source .venv/bin/activate
# Install the monorepo-cli package in editable mode
cd shared/tools/monorepo-cli
pip install -e .
```
To register the new machine to your federation topology, run the built-in onboard command:
```bash
# Replace <machine_name> with your device name
ctx-guard onboard <machine_name> "privat,dhive,bahn,shared"
```
## Step 3: Install the AI CLIs
Install the Codex CLI:
```bash
curl -fsSL https://chatgpt.com/codex/install.sh | sh
```
Install the Antigravity CLI:
```bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
```
Run `codex login` and `agy login` in your terminal to authenticate via the browser.
## Step 4: AI Agent Customizations
Because the `.agents` folder is now version-controlled inside the Orchestrator monorepo (`~/coden/Orchestrator/.agents`), your AI agents will *automatically* discover your custom skills (like `model_advisor`) and rules (like strictly using `ctx-guard` for knowledge tasks).
To ensure your models catalog is kept up to date, you can manually run the updater script:
```bash
cd ~/coden/Orchestrator
./.agents/scripts/update_models_config.sh
```
*(Note: In your primary environment, an agent has scheduled this as a daily cron job. You can instruct the agent to set up the same schedule on the new device by typing `/schedule daily run .agents/scripts/update_models_config.sh` in the chat).*
## Step 5: Sync Federation Repositories
Finally, pull down the rest of your private and shared federation repositories from the `dhive` GitLab:
```bash
ctx-guard fed-sync --context dhive
```
Your environment is now fully identical to your original machine!
+2 -2
View File
@@ -5,12 +5,12 @@ Personal knowledge graph and CV/profile generation system (TypeScript/Node)
## Metadata ## Metadata
- **Deployment Target:** local-cli - **Deployment Target:** local-cli
- **Upstream URL:** https://github.com/DoctoDre/CV - **Upstream URL:** https://git.d-hive.de/ankn/Orchestrator.git
- **Status:** active - **Status:** active
## Interconnections ## Interconnections
- (to be documented) - (to be documented)
## Notes ## Notes
- Part of privat context in the Orchestrator monorepo - Part of privat context in the Orchestrator monorepo at `privat/CV`
+2 -2
View File
@@ -28,7 +28,7 @@ build-frontend:
- privat/CV/andreknie.de/dist/ - privat/CV/andreknie.de/dist/
expire_in: 1 day expire_in: 1 day
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"' - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
changes: changes:
- "privat/CV/andreknie.de/**/*" - "privat/CV/andreknie.de/**/*"
@@ -39,7 +39,7 @@ deploy-andreknie:
dependencies: dependencies:
- build-frontend - build-frontend
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"' - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
changes: changes:
- "privat/CV/andreknie.de/**/*" - "privat/CV/andreknie.de/**/*"
script: script:
+5
View File
@@ -1,3 +1,7 @@
www.andreknie.de {
redir https://andreknie.de{uri} permanent
}
andreknie.de { andreknie.de {
root * /opt/andreknie/site root * /opt/andreknie/site
encode zstd gzip encode zstd gzip
@@ -8,6 +12,7 @@ andreknie.de {
X-Frame-Options "DENY" X-Frame-Options "DENY"
Referrer-Policy "strict-origin-when-cross-origin" Referrer-Policy "strict-origin-when-cross-origin"
Permissions-Policy "camera=(), geolocation=(), microphone=()" Permissions-Policy "camera=(), geolocation=(), microphone=()"
Content-Security-Policy "default-src 'self'; script-src 'self' https://stats.andreknie.de; connect-src 'self' https://stats.andreknie.de; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data: https:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests"
} }
handle /api/* { handle /api/* {
+9
View File
@@ -6,6 +6,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dr. André Knie — KI, Transformation & Leadership</title> <title>Dr. André Knie — KI, Transformation & Leadership</title>
<meta name="description" content="Nüchterne KI-Expertise für Mittelstand, Verwaltung und Hochschulen. Souverän, praktisch, evidenzbasiert." /> <meta name="description" content="Nüchterne KI-Expertise für Mittelstand, Verwaltung und Hochschulen. Souverän, praktisch, evidenzbasiert." />
<script
defer
src="https://stats.andreknie.de/script.js"
data-website-id="8a8bc632-eb3d-433c-8724-10f8ebc771bc"
data-domains="andreknie.de,www.andreknie.de"
data-exclude-search="true"
data-exclude-hash="true"
data-do-not-track="true"
></script>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
@@ -38,8 +38,11 @@ export default function Datenschutz() {
<p><strong style={{ color: 'var(--text-primary)' }}>9. Ihre Rechte</strong></p> <p><strong style={{ color: 'var(--text-primary)' }}>9. Ihre Rechte</strong></p>
<p>Sie haben das Recht auf Auskunft, Berichtigung, Löschung, Einschränkung der Verarbeitung und Datenübertragbarkeit. Wenden Sie sich an: <a href="mailto:datenschutz@d-hive.de">datenschutz@d-hive.de</a></p> <p>Sie haben das Recht auf Auskunft, Berichtigung, Löschung, Einschränkung der Verarbeitung und Datenübertragbarkeit. Wenden Sie sich an: <a href="mailto:datenschutz@d-hive.de">datenschutz@d-hive.de</a></p>
<p><strong style={{ color: 'var(--text-primary)' }}>10. Cookies</strong></p> <p><strong style={{ color: 'var(--text-primary)' }}>10. Reichweitenmessung mit Umami</strong></p>
<p>Diese Webseite verwendet keine Tracking-Cookies und keine Analyse-Tools von Drittanbietern. Es werden ausschließlich technisch notwendige Funktionen genutzt.</p> <p>Diese Webseite nutzt die selbst gehostete Webanalyse-Software Umami unter stats.andreknie.de. Umami wird ohne Tracking-Cookies eingesetzt. Die Einbindung ist auf andreknie.de und www.andreknie.de beschränkt, Suchparameter und URL-Fragmente werden nicht erfasst und die Do-Not-Track-Einstellung Ihres Browsers wird respektiert. Die Auswertung dient ausschließlich dazu, die Nutzung der Webseite besser zu verstehen und Inhalte technisch sowie redaktionell zu verbessern.</p>
<p><strong style={{ color: 'var(--text-primary)' }}>11. Cookies</strong></p>
<p>Diese Webseite verwendet keine Tracking-Cookies. Es werden ausschließlich technisch notwendige Funktionen genutzt.</p>
</div> </div>
</div> </div>
</main> </main>
+6 -17
View File
@@ -5,31 +5,20 @@ federation:
conflict_strategy: "team-wins" conflict_strategy: "team-wins"
team_repos: team_repos:
- context: privat
url: "https://github.com/andreknie/privat-team.git"
branch: main
sync_direction: bidirectional
sync_frequency: "on-push"
shared_mirror:
enabled: true
paths:
- "shared/tools/common-scripts/"
- "shared/config/base-config.yaml"
mode: read-only
- context: dhive - context: dhive
url: "https://gitlab.dhive.io/team/dhive-mono.git" url: "https://git.d-hive.de/team/dhive-mono.git"
branch: main branch: main
sync_direction: bidirectional sync_direction: bidirectional
sync_frequency: "on-push" sync_frequency: "on-push"
shared_mirror: shared_mirror:
enabled: true enabled: true
paths: paths:
- "shared/tools/" - "privat/"
- "shared/powers/db-dxp-platform/" - "shared/AI-Orchestrator/"
- "shared/mcp-servers/"
- "shared/OrgMyLife/" - "shared/OrgMyLife/"
mode: read-only - "shared/config/"
- "shared/tools/"
mode: bidirectional
- context: bahn - context: bahn
url: "https://gitlab.2700.2db.it/team/bahn-workspace.git" url: "https://gitlab.2700.2db.it/team/bahn-workspace.git"
@@ -218,7 +218,7 @@ class SharedMirrorConfig:
enabled: bool enabled: bool
paths: list[str] = field(default_factory=list) paths: list[str] = field(default_factory=list)
mode: Literal["read-only"] = "read-only" mode: Literal["read-only", "bidirectional"] = "read-only"
@dataclass @dataclass