qubinode_navigator
Copilot instructions1 starsChanged 11 months agoMITView on GitHub
The AI Assistant now includes a PydanticAI-based orchestrator for intent-based infrastructure deployment:
- Reads credentials
- Sends data out
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/adr-reference.mdcCursor rule
- .cursor/rules/dag-development.mdcCursor rule
- .cursor/rules/diagnostics.mdcCursor rule
- .cursor/rules/infrastructure-services.mdcCursor rule
- .cursor/rules/qubinode-overview.mdcCursor rule
- .cursor/rules/rag-knowledge.mdcCursor rule
- .cursor/rules/system-operations.mdcCursor rule
- .cursor/rules/troubleshooting.mdcCursor rule
- .cursor/rules/vm-operations.mdcCursor rule
- github-issue-resolverSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 66
Keep plugin names/class names synchronized with config/plugins.yml.
- Very specific: line 67
Always return SystemState snapshots with Python primitives.
- Very specific: line 68
Use get_dependencies() to express ordering (e.g., deployment plugins can depend on OS prep plugins).
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Qubinode Navigator Copilot Instructions
Architecture Snapshot
- Container-first, plugin-based automation platform:
core/holds orchestration services (plugin manager, event bus, config, rollout/rollback, monitoring) that load plugins fromplugins/**. - Plugins follow ADR-0028: each class subclasses
core/base_plugin.py::QubiNodePlugin, implements_initialize_plugin,check_state,get_desired_state, andapply_changesreturningPluginResultwith idempotentSystemStatecomparisons. qubinode_cli.pyis the canonical entry point; it wiresConfigManager,PluginManager, andExecutionContext, exposinglist,execute,status, andaskcommands.- Configuration lives in
config/plugins.yml:global.plugin_directoriescontrols discovery,plugins.enableddefines runtime order, and each plugin section mirrors the Python class name. - Major plugin families:
plugins/os(RHEL/Rocky/CentOS),plugins/cloud(Hetzner, Equinix),plugins/services(AI assistant, log analysis, vault integration), andplugins/environments(deployment contexts).
PydanticAI Orchestrator (ADR-0063, ADR-0066)
The AI Assistant now includes a PydanticAI-based orchestrator for intent-based infrastructure deployment:
- Manager Agent: Analyzes user intent, finds matching DAGs, creates execution plans
- Developer Agent: Validates DAGs, checks prerequisites, handles execution
- Observer Agent: Monitors DAG runs, detects shadow errors, provides status updates
Orchestrator Endpoints (port 8080)
| Endpoint | Method | Purpose |
/orchestrator/status | GET | Check orchestrator availability and API keys |
/orchestrator/dags | GET | List discovered DAGs from airflow/dags/ |
/orchestrator/intent | POST | Natural language deployment (main entry point) |
/orchestrator/observe | POST | Monitor DAG run status with Observer Agent |
/orchestrator/shadow-errors | GET | Check for shadow failures in executions |
Example: Intent-Based Deployment
# Deploy FreeIPA using natural language
curl -X POST http://localhost:8080/orchestrator/intent \
-H "Content-Type: application/json" \
-d '{
"intent": "Deploy FreeIPA server for identity management",
"params": {"vm_name": "freeipa", "action": "create"},
"auto_approve": true,
"auto_execute": true
}'
# Monitor with Observer Agent
curl -X POST "http://localhost:8080/orchestrator/observe?dag_id=freeipa_deployment"Environment Variables for PydanticAI
OPENROUTER_API_KEY=sk-or-... # Required: LLM provider for agents
PYDANTICAI_MODEL=openai/gpt-4o # Optional: Override default model
USE_LOCAL_MODEL=false # Skip local llama.cpp model downloadDay-to-Day Workflows
- Environment bootstrap:
./deploy-qubinode.sh(or./scripts/development/deploy-qubinode.sh) is the modern one-shot deployment entry point; handles plugin orchestration, AI assistant setup, and post-deployment checks. Legacyqubinode_navigator_legacy.shstill available for vault-integrated advanced deployments. - Execution images:
make install-ansible-navigatorandmake build-image(seeMakefile) install the required ansible-navigator ≥25.5.0 and build thequbinode-installerexecution environment via ansible-builder. - Navigator config:
make copy-navigatorsyncsansible-navigator/release-ansible-navigator.ymlinto~/.ansible-navigator.yml; keep SOURCE/INSTALL paths aligned when relocating repos. - Plugin runs:
python3 qubinode_cli.py execute --plugins RHEL10Plugin HetznerDeploymentPlugin --inventory localhostexecutes in dependency order with the config defaults. - MCP validation:
make mcp-installpullstosin2013.mcp_audit;make test-mcp,test-mcp-ai, ortest-mcp-airflow(seetests/mcp/*.yml) run Ansible-based MCP audits and emit Markdown summaries. - Python tests: lightweight validation still uses
python3 -m pytest tests/unitor targeted plugin suites (mirrors root README guidance). - Development scripts (
scripts/development/):setup_modernized.shprepares ansible-navigator environments,deploy-qubinode.shis the primary one-shot deployment entry point, andserve-docs-with-podman.shruns the docs site inside Podman—favor these helpers instead of re-implementing their logic.
Plugin & Config Conventions
- Keep plugin names/class names synchronized with
config/plugins.yml; enabling a plugin without matching class breaks dependency resolution incore/plugin_manager.py. - Always return
SystemStatesnapshots with Python primitives; avoid non-serializable objects since comparisons power idempotency short-circuiting. - Use
get_dependencies()to express ordering (e.g., deployment plugins can depend on OS prep plugins); the topological sort inPluginManager._resolve_dependenciesstops execution if requirements go missing. - Build
ExecutionContext-aware behavior (inventory, environment,context.configoverrides) rather than reading globals; CLI and future MCP servers rely on that contract. - Emit actionable
PluginResult.data(e.g., installed packages, versions) soqubinode_clistatus output stays informative and downstream analytics incore/analytics_engine.pycan consume the metadata.
AI Assistant & MCP Services
ai-assistant/is a standalone FastAPI service with dual architecture:- Local LLM (optional): llama.cpp + IBM Granite 4B for offline RAG queries
- PydanticAI Orchestrator (ADR-0063): Cloud LLM agents for intent-based deployment
- Build via
ai-assistant/scripts/build.sh, run with Podman (sudo podman run ... localhost/qubinode-ai-assistant:latest). - Key endpoints:
/health- Service health check/chat- RAG-powered chat (local or cloud LLM)/orchestrator/intent- PydanticAI intent-based deployment (primary interface)/orchestrator/observe- DAG monitoring with Observer Agent/orchestrator/dags- DAG discovery from airflow/dags/
ai-assistant/mcp_server*.pyexpose MCP tools:query_documents,chat_with_context,get_project_status, andask_qubinode.- The
AIAssistantPlugin(plugins/services/ai_assistant_plugin.py) checks health atai_service_url, can auto-start the container (auto_start: true), and surfaces log-analysis helpers to other plugins. qubinode_cli.py ask "question"tunnels directly into the AI Assistant's/chat; scripts should reuse this HTTP API rather than shelling out to CLI helpers.
PydanticAI Agent Architecture
User Intent ("Deploy FreeIPA")
│
▼
┌───────────────────┐
│ Manager Agent │ → Analyzes intent, finds DAG, creates plan
└─────────┬─────────┘
▼
┌───────────────────┐
│ Developer Agent │ → Validates DAG, checks prerequisites
└─────────┬─────────┘
▼
┌───────────────────┐
│ Airflow DAG │ → Executes via airflow trigger
└─────────┬─────────┘
▼
┌───────────────────┐
│ Observer Agent │ → Monitors status, detects shadow errors
└───────────────────┘Airflow Orchestration Layer
airflow/implements ADR-0036/0037 by bundling docker/podman-compose stacks, DAGs, and custom operators underairflow/plugins/qubinode/(e.g.,operators.py,sensors.py,hooks.py).- Feature flag
ENABLE_AIRFLOWplus credentials live inairflow/config/airflow.env; pods start withpodman-compose up -d(preferred on RHEL) ordocker-compose up -d. - DAGs assume kcli + AI assistant availability; keep DAG-side env vars synced with the main repo
.envto avoid MCP auth failures. - Airflow MCP server runs on 8889 (see
airflow/start-mcp-services.sh) and is covered bytests/mcp/test_airflow_mcp.yml; coordination scripts live inairflow/scripts/.
Documentation & Decision Records
- Project docs are Just-the-Docs Jekyll site inside
docs/; runcd docs && bundle install && bundle exec jekyll serveto preview. - ADRs (
docs/adrs/*.md) capture design rationale referenced throughout code comments (e.g., ADR-0026 for RHEL10 breaking changes, ADR-0028 for plugins, ADR-0036/0037 for Airflow). - The AI assistant README (
ai-assistant/README.md) and Airflow README (airflow/README.md) contain authoritative configuration matrices—link to them when adding new automation so instructions stay centralized.
Gotchas
- Most shell scripts assume Podman (not Docker) and RHEL-style paths; when targeting other hosts update both script shebangs and the instructions in
README.mdto avoid confusing contributors. - Secrets (Vault tokens, MCP API keys) are loaded from
.env/setup-vault-integration.sh; never hardcode them—referenceVaultIntegrationPlugindefaults and environment variable names documented there. - Tests expect AI/Airflow services reachable on localhost; if you change ports, adjust
config/plugins.yml,tests/mcp/*.yml, and the respective README callouts together.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

