Skip to content

marcuspat/agentic-powered-golden-path-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Agentic Golden Path β€” AI-Powered Developer Onboarding

Say what you want to deploy. Watch it appear in ArgoCD.

Natural language in β†’ GitHub repos created β†’ Kubernetes workload running β†’ ArgoCD synced. Under 2 minutes, zero manual steps.

CI License: Apache-2.0 Python 3.8+


⚑ Quick Start β€” Three Commands

git clone https://github.com/marcuspat/agentic-powered-golden-path-demo.git
cd agentic-powered-golden-path-demo

make setup      # downloads idpbuilder, creates Python venv, installs deps
make bootstrap  # spins up KinD cluster with ArgoCD + Tekton + Nginx (~3 min)

Set your credentials:

export GITHUB_TOKEN=ghp_...
export GITHUB_USERNAME=your-username
export OPENROUTER_API_KEY=sk-or-...

Then run the demo:

make preflight  # 8 pre-flight checks (cluster, ArgoCD, GitHub API, deps)
make demo       # AI agent onboards a new developer app end-to-end

That's it. Watch ArgoCD at https://cnoe.localtest.me/argocd as the app deploys itself.


πŸ—ΊοΈ How It Works

Developer: "I need to deploy my inventory-api service"
                        β”‚
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  OpenRouter LLM  β”‚  ← extracts app name from natural language
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ AppNameExtracted
                       β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  GitHub Agent   β”‚  ← creates inventory-api + inventory-api-gitops repos
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ ReposCreated
                       β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Template Engine β”‚  ← Jinja2 renders Node.js stack into both repos
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ ReposPopulated
                       β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  ArgoCD Agent   β”‚  ← registers ArgoCD Application CRD
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ ArgoCDAppCreated β†’ GitOpsSynced β†’ WorkloadHealthy
                       β–Ό
         http://inventory-api.cnoe.localtest.me  πŸŽ‰

7 domain events. Zero manual steps.


πŸ“‹ Prerequisites

Requirement Notes
Docker (24+) KinD cluster runs inside Docker
Python 3.8+ AI agent runtime
GitHub PAT Scopes: repo, workflow
OpenRouter API key Free tier works; used for NLP name extraction
kubectl, curl, git Standard CLI tools

make setup will tell you what's missing. make preflight validates everything before the live demo.


🎯 Make Targets

make help         β†’ self-documenting target reference
make setup        β†’ download idpbuilder binary + create venv + install deps
make bootstrap    β†’ idpbuilder create (KinD + ArgoCD + Tekton + Nginx)
make preflight    β†’ 8 pre-demo checks (env, tools, cluster, ArgoCD, GitHub, templates)
make demo         β†’ run the AI onboarding agent end-to-end
make test         β†’ run unit + integration test suite (v1 agent, v2 agent, manifests)
make status       β†’ cluster + ArgoCD app status snapshot
make clean        β†’ destroy cluster + remove venv + reset binaries

πŸ—οΈ Architecture

Two Agent Implementations

v1 Agent (ai-onboarding-agent/agent.py) v2 Agent (src/agent.py)
Style Procedural OOP OnboardingAgent class
Entry point make demo Direct import
Config 3 env vars 5 env vars, configurable paths
Purpose Live demo Production reference

Both implementations are intentionally preserved. See ADR-0022 for the rationale.

Platform Stack

KinD (Kubernetes in Docker)
β”œβ”€β”€ ArgoCD          β†’ GitOps reconciliation (https://cnoe.localtest.me/argocd)
β”œβ”€β”€ Tekton          β†’ CI pipeline runtime
β”œβ”€β”€ Nginx           β†’ Ingress controller (*.cnoe.localtest.me)
└── CNOE ecosystem  β†’ Cloud Native Operational Excellence baseline

Stack Templates (cnoe-stacks/)

  • nodejs-template/ β€” Node.js app source (index.js, Dockerfile, k8s manifests)
  • nodejs-gitops-template/ β€” ArgoCD Application + Kustomize overlays

πŸ” Verify a Deployment

After make demo:

# ArgoCD CLI
argocd app get <app-name>
argocd app wait <app-name> --health

# Kubernetes
kubectl get pods -n <app-name>

# Hit the endpoint
curl http://<app-name>.cnoe.localtest.me

ArgoCD dashboard: https://cnoe.localtest.me/argocd

  • Username: admin
  • Password: kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

πŸ“ Repository Structure

agentic-powered-golden-path-demo/
β”œβ”€β”€ Makefile                     # ← start here: make help
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ setup.sh                 # platform-aware bootstrap (macOS/Linux, amd64/arm64)
β”‚   └── preflight.sh             # 8 pre-demo validation checks
β”œβ”€β”€ ai-onboarding-agent/
β”‚   β”œβ”€β”€ agent.py                 # v1 demo agent (procedural)
β”‚   └── test_agent.py            # v1 unit tests
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agent.py                 # v2 production agent (OOP)
β”‚   └── test_agent.py            # v2 unit tests
β”œβ”€β”€ cnoe-stacks/
β”‚   β”œβ”€β”€ nodejs-template/         # Node.js application source template
β”‚   └── nodejs-gitops-template/  # ArgoCD + k8s manifests template
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ golden_path_tests.py
β”‚   └── test-integration-e2e.py
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ adr/                     # 22 Architecture Decision Records (ADR-0001–0022)
β”‚   └── ddd/                     # 13 Domain-Driven Design documents
β”œβ”€β”€ requirements.txt
└── .github/workflows/ci.yml     # 5-job CI: lint, test-v1, test-v2, validate-manifests, smoke

πŸ“š Decision Trail

This repo ships with complete architectural documentation:

  • 22 ADRs (docs/adr/) β€” every non-obvious decision recorded with context, alternatives, and consequences
  • 13 DDD documents (docs/ddd/) β€” bounded contexts, domain events, ubiquitous language, and the implementation runbook

Key ADRs:

  • ADR-0021 β€” Why Makefile over Taskfile / justfile / pyproject scripts
  • ADR-0022 β€” v1 vs v2 agent co-existence strategy

πŸ”§ Troubleshooting

idpbuilder fails to start

docker ps          # Docker must be running
make clean         # tear down any partial state
make bootstrap     # retry

ArgoCD stuck / apps not syncing

make status        # snapshot current state
kubectl get pods -n argocd
argocd app sync <app-name> --force

GitHub push fails

curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
# Must return your user object β€” not a 401

openai module not found / import errors

source .venv/bin/activate
pip install -r requirements.txt

See docs/ddd/13-implementation-runbook.md for the full troubleshooting guide.


🀝 Contributing

make test          # run full test suite before opening a PR

CI runs on every push: lint (ruff), test-v1, test-v2, manifest validation, dry-run smoke.


πŸ“„ License

Apache-2.0 β€” see LICENSE.

About

AI-powered developer onboarding platform using natural language to deploy applications via GitOps. Golden path workflows with ArgoCD and OpenRouter integration.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors