{
  "project": "Kradle",
  "description": "Kubernetes-native forge runtime with Argo CD and Kradle-managed repository hosting",
  "package": {
    "name": "@a5c-ai/kradle",
    "version": "6.0.3",
    "private": true
  },
  "entrypoints": {
    "library": "./src/index.js",
    "cli": "./bin/kradle-demo.mjs",
    "runtimeServer": "./bin/kradle-server.mjs",
    "webPreview": "./public/index.html",
    "nextUi": "./apps/web",
    "generatedSummary": "./dist/kradle-summary.json",
    "lifecycleSnapshot": "./dist/kradle-lifecycle.json",
    "helmChart": "./charts/kradle",
    "minikubeSetup": "./scripts/setup-minikube.mjs"
  },
  "commands": {
    "build": "npm run build",
    "demo": "npm run demo",
    "serve": "npm run serve",
    "check": "npm run check",
    "test": "npm test",
    "smoke": "npm run smoke",
    "validateDocs": "npm run validate:docs",
    "e2e": "npm run e2e",
    "packageCheck": "npm run package:check",
    "setupMinikube": "npm run setup:minikube -- --dry-run",
    "dev": "npm run dev",
    "uiBuild": "npm run ui:build",
    "uiValidate": "npm run ui:validate"
  },
  "docs": [
    "docs/README.md",
    "docs/product-requirements.md",
    "docs/system-requirements.md",
    "docs/architecture-spec.md",
    "docs/user-stories.md",
    "docs/roadmap-mvp.md",
    "docs/local-minikube.md",
    "docs/install.md",
    "docs/ontology/README.md"
  ],
  "components": [
    {
      "id": "control-plane",
      "title": "Control Plane",
      "area": "api",
      "resources": [
        "Repository",
        "BranchProtection",
        "RefPolicy"
      ],
      "evidence": [
        "src/control-plane.js",
        "charts/kradle/crds"
      ],
      "implemented": true,
      "resourceCount": 3,
      "docs": "docs/components/control-plane.md"
    },
    {
      "id": "data-plane",
      "title": "Repository Data Plane",
      "area": "git",
      "resources": [
        "Repository"
      ],
      "evidence": [
        "src/data-plane.js",
        "src/gitea-backend.js",
        "charts/kradle/templates/gitea.yaml"
      ],
      "implemented": true,
      "resourceCount": 1,
      "docs": "docs/components/data-plane.md"
    },
    {
      "id": "identity-policy",
      "title": "Identity, RBAC, and Policy",
      "area": "security",
      "resources": [
        "BranchProtection",
        "RefPolicy"
      ],
      "evidence": [
        "src/identity-policy.js",
        "examples/policy-kyverno-pr-title.yaml"
      ],
      "implemented": true,
      "resourceCount": 2,
      "docs": "docs/components/identity-policy.md"
    },
    {
      "id": "runners-ci",
      "title": "Runners and CI",
      "area": "automation",
      "resources": [
        "RunnerPool",
        "Pipeline",
        "Job"
      ],
      "evidence": [
        "src/runners-ci.js",
        "docs/components/runners-ci.md"
      ],
      "implemented": true,
      "resourceCount": 3,
      "docs": "docs/components/runners-ci.md"
    },
    {
      "id": "hooks-events",
      "title": "Hooks and Events",
      "area": "integrations",
      "resources": [
        "WebhookSubscription",
        "WebhookDelivery"
      ],
      "evidence": [
        "src/hooks-events.js",
        "docs/components/hooks-events.md"
      ],
      "implemented": true,
      "resourceCount": 2,
      "docs": "docs/components/hooks-events.md"
    },
    {
      "id": "operations-publishing",
      "title": "Operations and Publishing",
      "area": "release",
      "resources": [
        "APIService",
        "Deployment"
      ],
      "evidence": [
        "src/operations.js",
        "charts/kradle",
        "scripts/setup-minikube.mjs"
      ],
      "implemented": true,
      "resourceCount": 0,
      "docs": "docs/components/operations-publishing.md"
    },
    {
      "id": "web-ui",
      "title": "Web UI",
      "area": "experience",
      "resources": [
        "View"
      ],
      "evidence": [
        "src/web-ui.js",
        "public/index.html"
      ],
      "implemented": true,
      "resourceCount": 1,
      "docs": "docs/components/web-ui.md"
    }
  ],
  "lifecycle": {
    "project": "Kradle",
    "version": "0.1.0",
    "generatedAt": "2026-08-10T20:00:41.991Z",
    "status": "ready-for-local-development",
    "components": [
      {
        "id": "control-plane",
        "title": "Control Plane",
        "area": "api",
        "resources": [
          "Repository",
          "BranchProtection",
          "RefPolicy"
        ],
        "evidence": [
          "src/control-plane.js",
          "charts/kradle/crds"
        ],
        "implemented": true,
        "resourceCount": 3,
        "docs": "docs/components/control-plane.md"
      },
      {
        "id": "data-plane",
        "title": "Repository Data Plane",
        "area": "git",
        "resources": [
          "Repository"
        ],
        "evidence": [
          "src/data-plane.js",
          "src/gitea-backend.js",
          "charts/kradle/templates/gitea.yaml"
        ],
        "implemented": true,
        "resourceCount": 1,
        "docs": "docs/components/data-plane.md"
      },
      {
        "id": "identity-policy",
        "title": "Identity, RBAC, and Policy",
        "area": "security",
        "resources": [
          "BranchProtection",
          "RefPolicy"
        ],
        "evidence": [
          "src/identity-policy.js",
          "examples/policy-kyverno-pr-title.yaml"
        ],
        "implemented": true,
        "resourceCount": 2,
        "docs": "docs/components/identity-policy.md"
      },
      {
        "id": "runners-ci",
        "title": "Runners and CI",
        "area": "automation",
        "resources": [
          "RunnerPool",
          "Pipeline",
          "Job"
        ],
        "evidence": [
          "src/runners-ci.js",
          "docs/components/runners-ci.md"
        ],
        "implemented": true,
        "resourceCount": 3,
        "docs": "docs/components/runners-ci.md"
      },
      {
        "id": "hooks-events",
        "title": "Hooks and Events",
        "area": "integrations",
        "resources": [
          "WebhookSubscription",
          "WebhookDelivery"
        ],
        "evidence": [
          "src/hooks-events.js",
          "docs/components/hooks-events.md"
        ],
        "implemented": true,
        "resourceCount": 2,
        "docs": "docs/components/hooks-events.md"
      },
      {
        "id": "operations-publishing",
        "title": "Operations and Publishing",
        "area": "release",
        "resources": [
          "APIService",
          "Deployment"
        ],
        "evidence": [
          "src/operations.js",
          "charts/kradle",
          "scripts/setup-minikube.mjs"
        ],
        "implemented": true,
        "resourceCount": 0,
        "docs": "docs/components/operations-publishing.md"
      },
      {
        "id": "web-ui",
        "title": "Web UI",
        "area": "experience",
        "resources": [
          "View"
        ],
        "evidence": [
          "src/web-ui.js",
          "public/index.html"
        ],
        "implemented": true,
        "resourceCount": 1,
        "docs": "docs/components/web-ui.md"
      }
    ],
    "resources": {
      "repository": "Repository",
      "branchProtection": "BranchProtection",
      "refPolicy": "RefPolicy",
      "runnerPool": "RunnerPool",
      "subscription": "WebhookSubscription",
      "pullRequest": "PullRequest",
      "pipelineRun": "Pipeline",
      "delivery": "WebhookDelivery",
      "replay": "WebhookDelivery",
      "triageView": "View"
    },
    "storage": {
      "etcd": [
        "Repository",
        "BranchProtection",
        "RefPolicy",
        "RunnerPool",
        "WebhookSubscription",
        "View"
      ],
      "postgres": [
        "PullRequest",
        "Pipeline",
        "Job",
        "Job",
        "WebhookDelivery",
        "WebhookDelivery"
      ]
    },
    "flows": [
      "Open and review a PR",
      "Debug a failing run",
      "Configure a runner pool",
      "Add a webhook and verify it works",
      "Write a PR policy with audit-to-enforce rollout",
      "Cross-repo triage with saved filters"
    ],
    "operations": {
      "chart": "charts/kradle",
      "setup": "scripts/setup-minikube.mjs",
      "releaseGates": [
        "build",
        "docs and ontology coverage",
        "unit acceptance tests",
        "e2e package lifecycle tests",
        "package validation",
        "minikube dry-run setup",
        "smoke flow",
        "backup restore validation",
        "known limitations reviewed"
      ],
      "observability": {
        "metrics": [
          "api_request_latency",
          "postgres_aggregate_lag",
          "gitea_receive_pack_latency",
          "runner_queue_depth",
          "webhook_delivery_phase",
          "admission_denials"
        ],
        "logs": [
          "control-plane audit",
          "gitea access",
          "runner job",
          "webhook dispatcher",
          "controller reconcile"
        ],
        "alerts": [
          "APIService unavailable",
          "Postgres unavailable",
          "repository service unavailable",
          "runner saturation",
          "webhook failure burst",
          "backup validation failed"
        ]
      }
    },
    "validation": []
  },
  "resources": {
    "repository": "Repository",
    "branchProtection": "BranchProtection",
    "refPolicy": "RefPolicy",
    "runnerPool": "RunnerPool",
    "subscription": "WebhookSubscription",
    "pullRequest": "PullRequest",
    "pipelineRun": "workflow",
    "delivery": "WebhookDelivery",
    "replay": "WebhookDelivery",
    "triageView": "View"
  },
  "storage": {
    "etcd": [
      "Repository",
      "BranchProtection",
      "RefPolicy",
      "RunnerPool",
      "WebhookSubscription",
      "View"
    ],
    "postgres": [
      "PullRequest",
      "Pipeline",
      "Job",
      "Job",
      "WebhookDelivery",
      "WebhookDelivery"
    ]
  },
  "excellentFlows": [
    "Open and review a PR",
    "Debug a failing run",
    "Configure a runner pool",
    "Add a webhook and verify it works",
    "Write a PR policy with audit-to-enforce rollout",
    "Cross-repo triage with saved filters"
  ],
  "agents": null,
  "operations": {
    "chartPackage": {
      "chart": "charts/kradle",
      "values": "charts/kradle/values.yaml",
      "crds": [
        "Repository",
        "BranchProtection",
        "RefPolicy",
        "RunnerPool",
        "WebhookSubscription",
        "View",
        "Selector"
      ],
      "templates": [
        "CRDs",
        "optional APIService",
        "ServiceAccount",
        "ClusterRole",
        "ClusterRoleBinding",
        "Deployment",
        "Service",
        "NetworkPolicy",
        "Gitea backend",
        "Argo CD Application"
      ],
      "examples": [
        "examples/minikube-demo.yaml",
        "examples/policy-kyverno-pr-title.yaml"
      ],
      "validation": [
        "npm run e2e",
        "npm run package:check",
        "npm run setup:minikube -- --dry-run"
      ]
    },
    "localSetup": {
      "script": "scripts/setup-minikube.mjs",
      "defaultMode": "dry-run",
      "applyMode": "npm run setup:minikube -- --apply",
      "requiredTools": [
        "minikube",
        "kubectl",
        "helm",
        "node",
        "npm"
      ],
      "defaultProfile": "kradle",
      "namespace": "kradle-system"
    }
  },
  "releaseGates": [
    "build",
    "docs and ontology coverage",
    "unit acceptance tests",
    "e2e package lifecycle tests",
    "package validation",
    "minikube dry-run setup",
    "smoke flow",
    "backup restore validation",
    "known limitations reviewed"
  ],
  "smoke": {
    "ok": true,
    "assertions": []
  },
  "generatedAt": "2026-08-10T20:00:41.992Z",
  "controller": {
    "status": "degraded",
    "namespace": "kradle-org-default",
    "endpoints": [
      {
        "method": "GET",
        "path": "/healthz",
        "purpose": "container and load-balancer health"
      },
      {
        "method": "GET",
        "path": "/api/controller?org=:org",
        "purpose": "live Kradle org model"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/resources",
        "purpose": "org-scoped Kradle resource listing"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/resources",
        "purpose": "org-scoped Kradle resource apply flow"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/resources/:kind/:name",
        "purpose": "org-scoped Kradle resource detail"
      },
      {
        "method": "DELETE",
        "path": "/api/orgs/:org/resources/:kind/:name",
        "purpose": "org-scoped Kradle resource delete flow"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/repositories",
        "purpose": "list org repositories through Kradle"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/repositories",
        "purpose": "create org repositories through Kradle"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/repositories/:name",
        "purpose": "get org repository details through Kradle"
      },
      {
        "method": "DELETE",
        "path": "/api/orgs/:org/repositories/:name",
        "purpose": "delete org repositories through Kradle"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/policies",
        "purpose": "list Kradle policy profiles, templates, bindings, Kyverno health, and exception requests"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/policies",
        "purpose": "create org policy bindings in audit or enforce mode"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/policy-reports",
        "purpose": "list normalized Kyverno policy report results"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/policy-exception-requests",
        "purpose": "list pending and approved Kradle policy exception requests"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/policy-exception-requests",
        "purpose": "request a temporary policy exception through Kradle"
      },
      {
        "method": "GET",
        "path": "/api/watch/orgs/:org/*",
        "purpose": "org-scoped Kradle live event stream bridged to browser updates"
      },
      {
        "method": "POST",
        "path": "/api/git-proxy",
        "purpose": "repository streaming proxy when configured"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/stacks",
        "purpose": "list agent stacks and capability status"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/runs",
        "purpose": "list agent dispatch runs with queue and status"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/rules",
        "purpose": "list trigger rules and delivery status"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/sessions",
        "purpose": "list agent sessions with lifecycle state"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/workspaces",
        "purpose": "list agent workspaces with lifecycle state"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/approvals",
        "purpose": "list pending and resolved agent approvals"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/permissions/review",
        "purpose": "explainable permission check for agent dispatch"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/adapters",
        "purpose": "list agent adapters and transport bindings"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/providers",
        "purpose": "list model provider configurations"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/projects",
        "purpose": "list agent projects with board config"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/dispatch",
        "purpose": "create manual agent dispatch run"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/approvals/:name/decide",
        "purpose": "approve or deny a pending agent approval request"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/triggers/process",
        "purpose": "evaluate an event against trigger rules and dispatch matching agents"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/workspaces",
        "purpose": "provision a new agent workspace with worktree and runtime"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/workspaces/:name/archive",
        "purpose": "archive an agent workspace and mark it for cleanup"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/workspaces/:name/link",
        "purpose": "link a work item to an agent workspace"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/memory/query",
        "purpose": "query Company Brain memory with graph and grep search"
      },
      {
        "method": "POST",
        "path": "/api/orgs/:org/agents/memory/imports",
        "purpose": "create a memory import from a babysitter run"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/memory/snapshots",
        "purpose": "list memory snapshots for an organization"
      },
      {
        "method": "GET",
        "path": "/api/orgs/:org/agents/memory/repositories",
        "purpose": "list memory repositories for an organization"
      }
    ],
    "metrics": {
      "components": 8,
      "resources": 11,
      "events": 11,
      "auditEntries": 0,
      "users": 1,
      "teams": 1,
      "invites": 1,
      "repositories": 1,
      "pullRequests": 0,
      "issues": 0,
      "projects": 0,
      "pipelines": 0,
      "jobs": 0,
      "runnerPools": 1,
      "webhookDeliveries": 0,
      "policyViolations": 0,
      "policyBindings": 0,
      "deployments": 0,
      "releases": 0,
      "agentStacks": 0,
      "agentRuns": 0,
      "agentSessions": 0,
      "greenChecks": 5,
      "totalChecks": 6
    },
    "operations": {
      "image": "ghcr.io/<owner>/<repo>/kradle-controller",
      "chart": "charts/kradle",
      "installCommands": [
        "Install Kradle release package",
        "Apply the demo workspace configuration"
      ],
      "releaseGates": [
        "npm run check",
        "docker build",
        "helm package charts/kradle",
        "npm pack --json"
      ]
    }
  },
  "runtime": {
    "resources": {
      "Organization": 0,
      "User": 1,
      "Team": 1,
      "Invite": 1,
      "IdentityMapping": 1,
      "AuthProvider": 2,
      "Repository": 1,
      "SSHKey": 0,
      "RepositoryPermission": 0,
      "BranchProtection": 1,
      "RefPolicy": 1,
      "RunnerPool": 1,
      "PullRequest": 0,
      "Issue": 0,
      "Review": 0,
      "Pipeline": 0,
      "Job": 0,
      "WebhookSubscription": 1,
      "WebhookDelivery": 0
    },
    "events": 11,
    "auditEntries": 11
  }
}